Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

📦 Publish Mitosis #1666

Merged
merged 1 commit into from
Jan 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 0 additions & 61 deletions .changeset/good-books-move.md

This file was deleted.

7 changes: 7 additions & 0 deletions packages/cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @builder.io/mitosis-cli

## 0.5.28

### Patch Changes

- Updated dependencies [b63279f]
- @builder.io/[email protected]

## 0.5.27

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@builder.io/mitosis-cli",
"version": "0.5.27",
"version": "0.5.28",
"description": "mitosis CLI",
"types": "build/types/types.d.ts",
"bin": {
Expand Down
62 changes: 62 additions & 0 deletions packages/core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,67 @@
# Change Log

## 0.5.28

### Patch Changes

- b63279f: [angular, stencil]: Add `attributePassing` to enable passing attributes like `data-*`, `aria-*` or `class` to correct child.

There is a wired behaviour for Angular and Stencil (without shadow DOM), where attributes are rendered on parent elements like this:

**Input**

```angular2html
<!-- Angular -->
<my-component class="cool" data-nice="true" aria-label="wow"></my-component>
```

**Output**

```html
<!-- DOM -->
<my-component class="cool" data-nice="true" aria-label="wow">
<button class="my-component">My Component</button>
</my-component>
```

In general, we want to pass those attributes down to the rendered child, like this:

```html
<!-- DOM -->
<my-component>
<button class="my-component cool" data-nice="true" aria-label="wow">My Component</button>
</my-component>
```

We provide 2 ways to enable this attribute passing:

**Metadata**

```tsx
// my-component.lite.tsx
useMetadata({
attributePassing: {
enabled: true,
// customRef: "_myRef";
},
});
```

**Config**

```js
// mitosis.config.cjs
module.exports = {
// ... other settings
attributePassing: {
enabled: true,
// customRef: "_myRef";
},
};
```

If you enable the `attributePassing` we add a new `ref` to the root element named `_root` to interact with the DOM element. If you wish to control the name of the ref, because you already have a `useRef` on your root element, you can use the `customRef` property to select it.

## 0.5.27

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"name": "Builder.io",
"url": "https://www.builder.io"
},
"version": "0.5.27",
"version": "0.5.28",
"homepage": "https://github.com/BuilderIO/mitosis",
"main": "./dist/src/index.js",
"exports": {
Expand Down
Loading