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

📦 Publish Mitosis #1666

merged 1 commit into from
Jan 20, 2025

Conversation

builderio-bot
Copy link
Contributor

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

@builder.io/[email protected]

Patch Changes

@builder.io/[email protected]

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

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

    Output

    <!-- 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:

    <!-- 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

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

    Config

    // 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.

Copy link

cloudflare-workers-and-pages bot commented Jan 20, 2025

Deploying mitosis with  Cloudflare Pages  Cloudflare Pages

Latest commit: a3f1038
Status: ✅  Deploy successful!
Preview URL: https://92fb0baf.mitosis-9uh.pages.dev
Branch Preview URL: https://changeset-release-main.mitosis-9uh.pages.dev

View logs

Copy link

nx-cloud bot commented Jan 20, 2025

View your CI Pipeline Execution ↗ for commit a3f1038.

Command Status Duration Result
nx e2e @builder.io/e2e-app ✅ Succeeded 1m 7s View ↗
nx run-many --target test ✅ Succeeded 4m 44s View ↗
nx run-many --target build --exclude @builder.i... ✅ Succeeded 3m 45s View ↗
nx build @builder.io/mitosis-site ✅ Succeeded 2m 28s View ↗

☁️ Nx Cloud last updated this comment at 2025-01-20 16:40:38 UTC

@samijaber samijaber enabled auto-merge (squash) January 20, 2025 17:06
@samijaber samijaber merged commit 8b492b7 into main Jan 20, 2025
15 checks passed
@samijaber samijaber deleted the changeset-release/main branch January 20, 2025 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants