Skip to content

Commit

Permalink
📦 Publish Mitosis (#1658)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
builderio-bot and github-actions[bot] authored Jan 15, 2025
1 parent af43f50 commit f94ea11
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 64 deletions.
31 changes: 0 additions & 31 deletions .changeset/clean-cobras-know.md

This file was deleted.

31 changes: 0 additions & 31 deletions .changeset/polite-pugs-pull.md

This file was deleted.

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

## 0.5.25

### Patch Changes

- Updated dependencies [af43f50]
- Updated dependencies [20ad8dc]
- @builder.io/[email protected]

## 0.5.24

### 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.24",
"version": "0.5.25",
"description": "mitosis CLI",
"types": "build/types/types.d.ts",
"bin": {
Expand Down
60 changes: 60 additions & 0 deletions packages/core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,65 @@
# Change Log

## 0.5.25

### Patch Changes

- af43f50: [All] Refactored `useMetadata` hook to enable import resolution instead of simple `JSON5` parsing.

You could use a normal JS `Object` and import it inside your `*.lite.tsx` file like this:

```ts
// data.ts

export const myMetadata: Record<string, string | number> = {
a: 'b',
c: 1,
};
```

```tsx
// my-button.lite.tsx
import { useMetadata } from '@builder.io/mitosis';
import { myMetadata } from './data.ts';

useMetadata({
x: 'y',
my: myMetadata,
});

export default function MyButton() {
return <button></button>;
}
```

- 20ad8dc: [angular]: Fix issue with events forced to become `toLowerCase()`.

Based on [choosing-event-names](https://angular.dev/guide/components/outputs#choosing-event-names) custom events are camelCase.
[DOM events](https://www.w3schools.com/jsref/dom_obj_event.asp) are always lower-cased for Angular components.

Checkout [event-handlers.ts](https://github.com/BuilderIO/mitosis/blob/main/packages/core/src/helpers/event-handlers.ts) for a list of all events that are automatically lower-cased. Everything else will be treated as a custom event and therefore camelCased.

If you need some other event to be lower-cased you can use `useMetadata.angular.nativeEvents`:

```tsx
import { useMetadata } from '@builder.io/mitosis';

useMetadata({
angular: {
nativeEvents: ['onNativeEvent'],
},
});

export default function MyComponent(props) {
return (
<div>
<input onNativeEvent={(event) => console.log(event)} />
Hello!
</div>
);
}
```

## 0.5.24

### 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.24",
"version": "0.5.25",
"homepage": "https://github.com/BuilderIO/mitosis",
"main": "./dist/src/index.js",
"exports": {
Expand Down

0 comments on commit f94ea11

Please sign in to comment.