Open
Conversation
Convert passkey-core.js to UMD so it serves both Luma (AMD/RequireJS) and Hyva (window global) without duplication. Add hyva_-prefixed layout handles that swap in Alpine.js-powered templates for login, enrollment prompt, and passkey management pages. All Tailwind classes stay within Hyva's default palette so no hyva_config_generate_before observer or tailwind.config.js registration is needed. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Register all components via Alpine.data() in alpine:init listeners (CSP build requires no parens/args in x-data attributes) - Replace inline expressions with getters (notLoading, hasMessage, messageClasses, notEditing) to avoid unsafe-eval - Replace x-model with :value + @input handler - Pass config via data- attributes instead of x-data arguments - Extract per-row editing into nested passkeyRow component with $dispatch for parent message communication - Move all <script defer src> tags from templates into layout XML via hyva_default.xml + before.body.end block - No x-model, no negation, no object literal :class, no method arguments in event handlers — fully CSP-build compatible Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
passkey-core.jsto UMD wrapper so a single file serves both Luma (AMD/RequireJS) and Hyva (window.passkeyCore) with zero duplicationhyva_-prefixed layout handles (hyva_customer_account_login,hyva_customer_account,hyva_passkey_account_index) that swap Luma templates for Alpine.js-powered Hyva templatesfetch+ WebAuthn), enrollment prompt (private-content-loadedevent), and passkey management (inline rename, nativeconfirm/promptdialogs)hyva_config_generate_beforeobserver or Tailwind config registration neededNew files (9)
hyva_customer_account_login.xml,hyva_customer_account.xml,hyva_passkey_account_index.xmlhyva/login/passkey-buttons.phtml,hyva/account/passkeys.phtml,hyva/enrollment-prompt.phtmljs/hyva/passkey-login.js,js/hyva/passkey-manage.js,js/hyva/passkey-enrollment.jsModified files (1)
passkey-core.js— AMDdefine()→ UMD wrapper (backwards-compatible, no changes to Luma consumers)Test plan
🤖 Generated with Claude Code