@antheo/morph 0.0.0-stage → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +266 -2
- package/SKILL.md +61 -0
- package/dist/ai/cli-provider.d.ts +80 -0
- package/dist/ai/cli-provider.js +250 -0
- package/dist/ai/gate.d.ts +39 -0
- package/dist/ai/gate.js +124 -0
- package/dist/ai/provider.d.ts +36 -0
- package/dist/ai/provider.js +168 -0
- package/dist/ai/repair.d.ts +90 -0
- package/dist/ai/repair.js +172 -0
- package/dist/analyzer/deps.d.ts +30 -0
- package/dist/analyzer/deps.js +265 -0
- package/dist/analyzer/manifest.d.ts +5 -0
- package/dist/analyzer/manifest.js +119 -0
- package/dist/analyzer/parse.d.ts +21 -0
- package/dist/analyzer/parse.js +29 -0
- package/dist/batch-worker.d.ts +16 -0
- package/dist/batch-worker.js +10 -0
- package/dist/batch.d.ts +26 -0
- package/dist/batch.js +227 -0
- package/dist/bridge/index.d.ts +26 -0
- package/dist/bridge/index.js +138 -0
- package/dist/bridge/props.d.ts +56 -0
- package/dist/bridge/props.js +191 -0
- package/dist/bridge/wrappers.d.ts +24 -0
- package/dist/bridge/wrappers.js +276 -0
- package/dist/cli/format.d.ts +7 -0
- package/dist/cli/format.js +30 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +492 -0
- package/dist/fonts/carry.d.ts +34 -0
- package/dist/fonts/carry.js +113 -0
- package/dist/fonts/fallback.d.ts +11 -0
- package/dist/fonts/fallback.js +21 -0
- package/dist/fonts/google.d.ts +65 -0
- package/dist/fonts/google.js +343 -0
- package/dist/fonts/index.d.ts +27 -0
- package/dist/fonts/index.js +48 -0
- package/dist/fonts/local.d.ts +46 -0
- package/dist/fonts/local.js +150 -0
- package/dist/fonts/sfnt.d.ts +19 -0
- package/dist/fonts/sfnt.js +174 -0
- package/dist/fonts/shim.d.ts +14 -0
- package/dist/fonts/shim.js +96 -0
- package/dist/gate.d.ts +105 -0
- package/dist/gate.js +157 -0
- package/dist/index.d.ts +55 -0
- package/dist/index.js +74 -0
- package/dist/ir/annotate.d.ts +16 -0
- package/dist/ir/annotate.js +145 -0
- package/dist/ir/as-child.d.ts +18 -0
- package/dist/ir/as-child.js +239 -0
- package/dist/ir/compounds.d.ts +27 -0
- package/dist/ir/compounds.js +183 -0
- package/dist/ir/contexts.d.ts +26 -0
- package/dist/ir/contexts.js +185 -0
- package/dist/ir/dom.d.ts +11 -0
- package/dist/ir/dom.js +60 -0
- package/dist/ir/effect-returns.d.ts +10 -0
- package/dist/ir/effect-returns.js +25 -0
- package/dist/ir/extract-ui-types.d.ts +33 -0
- package/dist/ir/extract-ui-types.js +224 -0
- package/dist/ir/extract-ui.d.ts +34 -0
- package/dist/ir/extract-ui.js +567 -0
- package/dist/ir/falsy.d.ts +13 -0
- package/dist/ir/falsy.js +66 -0
- package/dist/ir/forward-refs.d.ts +11 -0
- package/dist/ir/forward-refs.js +155 -0
- package/dist/ir/fragment-source.d.ts +4 -0
- package/dist/ir/fragment-source.js +13 -0
- package/dist/ir/fragments.d.ts +32 -0
- package/dist/ir/fragments.js +192 -0
- package/dist/ir/helper-snippets.d.ts +30 -0
- package/dist/ir/helper-snippets.js +550 -0
- package/dist/ir/latest-refs.d.ts +11 -0
- package/dist/ir/latest-refs.js +187 -0
- package/dist/ir/live-args.d.ts +26 -0
- package/dist/ir/live-args.js +335 -0
- package/dist/ir/lower.d.ts +83 -0
- package/dist/ir/lower.js +6016 -0
- package/dist/ir/markup-values.d.ts +16 -0
- package/dist/ir/markup-values.js +188 -0
- package/dist/ir/model.d.ts +605 -0
- package/dist/ir/model.js +1 -0
- package/dist/ir/oracle.d.ts +91 -0
- package/dist/ir/oracle.js +610 -0
- package/dist/ir/radix.d.ts +122 -0
- package/dist/ir/radix.js +344 -0
- package/dist/ir/rename.d.ts +15 -0
- package/dist/ir/rename.js +151 -0
- package/dist/ir/render-props.d.ts +31 -0
- package/dist/ir/render-props.js +67 -0
- package/dist/ir/rewrite.d.ts +44 -0
- package/dist/ir/rewrite.js +381 -0
- package/dist/ir/running-index.d.ts +11 -0
- package/dist/ir/running-index.js +217 -0
- package/dist/ir/snapshots.d.ts +12 -0
- package/dist/ir/snapshots.js +140 -0
- package/dist/ir/style.d.ts +19 -0
- package/dist/ir/style.js +76 -0
- package/dist/ir/types.d.ts +42 -0
- package/dist/ir/types.js +271 -0
- package/dist/ir/walk.d.ts +11 -0
- package/dist/ir/walk.js +18 -0
- package/dist/mcp/server.d.ts +81 -0
- package/dist/mcp/server.js +518 -0
- package/dist/pipeline.d.ts +26 -0
- package/dist/pipeline.js +750 -0
- package/dist/registry/add.d.ts +91 -0
- package/dist/registry/add.js +273 -0
- package/dist/registry/fetch.d.ts +40 -0
- package/dist/registry/fetch.js +186 -0
- package/dist/registry/ip.d.ts +18 -0
- package/dist/registry/ip.js +153 -0
- package/dist/registry/item.d.ts +39 -0
- package/dist/registry/item.js +131 -0
- package/dist/registry/load.d.ts +35 -0
- package/dist/registry/load.js +106 -0
- package/dist/registry/paths.d.ts +8 -0
- package/dist/registry/paths.js +43 -0
- package/dist/registry/publish.d.ts +119 -0
- package/dist/registry/publish.js +439 -0
- package/dist/targets/angular/bank/bank.d.ts +39 -0
- package/dist/targets/angular/bank/bank.js +61 -0
- package/dist/targets/angular/bank/helpers.d.ts +64 -0
- package/dist/targets/angular/bank/helpers.js +246 -0
- package/dist/targets/angular/bank/kept.d.ts +98 -0
- package/dist/targets/angular/bank/kept.js +791 -0
- package/dist/targets/angular/bank/plan-helpers.d.ts +17 -0
- package/dist/targets/angular/bank/plan-helpers.js +286 -0
- package/dist/targets/angular/bank/plan.d.ts +22 -0
- package/dist/targets/angular/bank/plan.js +152 -0
- package/dist/targets/angular/bank/receivers.d.ts +66 -0
- package/dist/targets/angular/bank/receivers.js +293 -0
- package/dist/targets/angular/bank/runtime.d.ts +14 -0
- package/dist/targets/angular/bank/runtime.js +152 -0
- package/dist/targets/angular/controlled.d.ts +7 -0
- package/dist/targets/angular/controlled.js +37 -0
- package/dist/targets/angular/dynamic-tags.d.ts +34 -0
- package/dist/targets/angular/dynamic-tags.js +192 -0
- package/dist/targets/angular/emit.d.ts +41 -0
- package/dist/targets/angular/emit.js +5970 -0
- package/dist/targets/angular/exports.d.ts +48 -0
- package/dist/targets/angular/exports.js +243 -0
- package/dist/targets/angular/helpers.d.ts +15 -0
- package/dist/targets/angular/helpers.js +33 -0
- package/dist/targets/angular/host-boundary.d.ts +5 -0
- package/dist/targets/angular/host-boundary.js +166 -0
- package/dist/targets/angular/host-form.d.ts +150 -0
- package/dist/targets/angular/host-form.js +727 -0
- package/dist/targets/angular/markup-values.d.ts +58 -0
- package/dist/targets/angular/markup-values.js +661 -0
- package/dist/targets/angular/motion-directive.d.ts +12 -0
- package/dist/targets/angular/motion-directive.js +257 -0
- package/dist/targets/angular/motion-hooks.d.ts +73 -0
- package/dist/targets/angular/motion-hooks.js +293 -0
- package/dist/targets/angular/motion-layout.d.ts +14 -0
- package/dist/targets/angular/motion-layout.js +74 -0
- package/dist/targets/angular/motion-templates.d.ts +10 -0
- package/dist/targets/angular/motion-templates.js +65 -0
- package/dist/targets/angular/motion.d.ts +57 -0
- package/dist/targets/angular/motion.js +202 -0
- package/dist/targets/angular/narrowing.d.ts +24 -0
- package/dist/targets/angular/narrowing.js +205 -0
- package/dist/targets/angular/ngc.d.ts +23 -0
- package/dist/targets/angular/ngc.js +134 -0
- package/dist/targets/angular/passed-handle.d.ts +39 -0
- package/dist/targets/angular/passed-handle.js +154 -0
- package/dist/targets/angular/projected.d.ts +9 -0
- package/dist/targets/angular/projected.js +63 -0
- package/dist/targets/angular/radix/cores/alert-dialog.d.ts +13 -0
- package/dist/targets/angular/radix/cores/alert-dialog.js +388 -0
- package/dist/targets/angular/radix/cores/index.d.ts +17 -0
- package/dist/targets/angular/radix/cores/index.js +50 -0
- package/dist/targets/angular/radix/cores/slider.d.ts +8 -0
- package/dist/targets/angular/radix/cores/slider.js +202 -0
- package/dist/targets/angular/radix/index.d.ts +21 -0
- package/dist/targets/angular/radix/index.js +35 -0
- package/dist/targets/angular/radix/packages.d.ts +3 -0
- package/dist/targets/angular/radix/packages.js +558 -0
- package/dist/targets/angular/radix/part.d.ts +236 -0
- package/dist/targets/angular/radix/part.js +71 -0
- package/dist/targets/angular/radix/prepare.d.ts +66 -0
- package/dist/targets/angular/radix/prepare.js +548 -0
- package/dist/targets/angular/radix/template.d.ts +43 -0
- package/dist/targets/angular/radix/template.js +172 -0
- package/dist/targets/angular/refs.d.ts +68 -0
- package/dist/targets/angular/refs.js +443 -0
- package/dist/targets/angular/slots.d.ts +22 -0
- package/dist/targets/angular/slots.js +60 -0
- package/dist/targets/angular/source-types.d.ts +10 -0
- package/dist/targets/angular/source-types.js +45 -0
- package/dist/targets/angular/spread-forward.d.ts +24 -0
- package/dist/targets/angular/spread-forward.js +72 -0
- package/dist/targets/angular/spread.d.ts +32 -0
- package/dist/targets/angular/spread.js +182 -0
- package/dist/targets/angular/svg-hosts.d.ts +25 -0
- package/dist/targets/angular/svg-hosts.js +107 -0
- package/dist/targets/angular/template-expr.d.ts +36 -0
- package/dist/targets/angular/template-expr.js +287 -0
- package/dist/targets/angular/types.d.ts +9 -0
- package/dist/targets/angular/types.js +63 -0
- package/dist/targets/angular/walk.d.ts +11 -0
- package/dist/targets/angular/walk.js +26 -0
- package/dist/targets/react-native/emit.d.ts +14 -0
- package/dist/targets/react-native/emit.js +585 -0
- package/dist/targets/react-native/fidelity.d.ts +5 -0
- package/dist/targets/react-native/fidelity.js +43 -0
- package/dist/targets/react-native/motion.d.ts +10 -0
- package/dist/targets/react-native/motion.js +290 -0
- package/dist/targets/react-native/skia.d.ts +30 -0
- package/dist/targets/react-native/skia.js +358 -0
- package/dist/targets/shared/context.d.ts +47 -0
- package/dist/targets/shared/context.js +195 -0
- package/dist/targets/shared/foreign.d.ts +10 -0
- package/dist/targets/shared/foreign.js +72 -0
- package/dist/targets/shared/fragments.d.ts +21 -0
- package/dist/targets/shared/fragments.js +309 -0
- package/dist/targets/shared/handles.d.ts +65 -0
- package/dist/targets/shared/handles.js +299 -0
- package/dist/targets/shared/inline.d.ts +53 -0
- package/dist/targets/shared/inline.js +524 -0
- package/dist/targets/shared/layout.d.ts +70 -0
- package/dist/targets/shared/layout.js +224 -0
- package/dist/targets/shared/markup.d.ts +26 -0
- package/dist/targets/shared/markup.js +65 -0
- package/dist/targets/shared/module.d.ts +84 -0
- package/dist/targets/shared/module.js +468 -0
- package/dist/targets/shared/motion-hooks.d.ts +37 -0
- package/dist/targets/shared/motion-hooks.js +87 -0
- package/dist/targets/shared/motion-layout.d.ts +70 -0
- package/dist/targets/shared/motion-layout.js +392 -0
- package/dist/targets/shared/portal.d.ts +10 -0
- package/dist/targets/shared/portal.js +23 -0
- package/dist/targets/shared/prop-writes.d.ts +11 -0
- package/dist/targets/shared/prop-writes.js +32 -0
- package/dist/targets/shared/prune.d.ts +54 -0
- package/dist/targets/shared/prune.js +405 -0
- package/dist/targets/shared/react-libs.d.ts +25 -0
- package/dist/targets/shared/react-libs.js +142 -0
- package/dist/targets/shared/react-types.d.ts +16 -0
- package/dist/targets/shared/react-types.js +374 -0
- package/dist/targets/shared/react-values.d.ts +20 -0
- package/dist/targets/shared/react-values.js +145 -0
- package/dist/targets/shared/ref-callback.d.ts +16 -0
- package/dist/targets/shared/ref-callback.js +114 -0
- package/dist/targets/shared/script.d.ts +65 -0
- package/dist/targets/shared/script.js +406 -0
- package/dist/targets/shared/unused.d.ts +12 -0
- package/dist/targets/shared/unused.js +146 -0
- package/dist/targets/svelte/dom-spread.d.ts +27 -0
- package/dist/targets/svelte/dom-spread.js +146 -0
- package/dist/targets/svelte/emit.d.ts +15 -0
- package/dist/targets/svelte/emit.js +3784 -0
- package/dist/targets/svelte/handle-branches.d.ts +22 -0
- package/dist/targets/svelte/handle-branches.js +146 -0
- package/dist/targets/svelte/html-keys.d.ts +9 -0
- package/dist/targets/svelte/html-keys.js +40 -0
- package/dist/targets/svelte/markup-data/data.d.ts +51 -0
- package/dist/targets/svelte/markup-data/data.js +305 -0
- package/dist/targets/svelte/markup-data/helper.d.ts +12 -0
- package/dist/targets/svelte/markup-data/helper.js +81 -0
- package/dist/targets/svelte/markup-data/module-data.d.ts +21 -0
- package/dist/targets/svelte/markup-data/module-data.js +473 -0
- package/dist/targets/svelte/markup-data/sites.d.ts +52 -0
- package/dist/targets/svelte/markup-data/sites.js +303 -0
- package/dist/targets/svelte/motion-layout.d.ts +13 -0
- package/dist/targets/svelte/motion-layout.js +70 -0
- package/dist/targets/svelte/motion-table.d.ts +14 -0
- package/dist/targets/svelte/motion-table.js +308 -0
- package/dist/targets/svelte/motion.d.ts +46 -0
- package/dist/targets/svelte/motion.js +405 -0
- package/dist/targets/svelte/presence.d.ts +71 -0
- package/dist/targets/svelte/presence.js +318 -0
- package/dist/targets/svelte/radix/accordion.d.ts +9 -0
- package/dist/targets/svelte/radix/accordion.js +24 -0
- package/dist/targets/svelte/radix/aspect-ratio.d.ts +6 -0
- package/dist/targets/svelte/radix/aspect-ratio.js +8 -0
- package/dist/targets/svelte/radix/avatar.d.ts +6 -0
- package/dist/targets/svelte/radix/avatar.js +10 -0
- package/dist/targets/svelte/radix/checkbox.d.ts +10 -0
- package/dist/targets/svelte/radix/checkbox.js +24 -0
- package/dist/targets/svelte/radix/collapsible.d.ts +7 -0
- package/dist/targets/svelte/radix/collapsible.js +16 -0
- package/dist/targets/svelte/radix/context-menu.d.ts +8 -0
- package/dist/targets/svelte/radix/context-menu.js +49 -0
- package/dist/targets/svelte/radix/cores/alert-dialog.d.ts +17 -0
- package/dist/targets/svelte/radix/cores/alert-dialog.js +449 -0
- package/dist/targets/svelte/radix/cores/collapsible.d.ts +12 -0
- package/dist/targets/svelte/radix/cores/collapsible.js +214 -0
- package/dist/targets/svelte/radix/cores/core.d.ts +32 -0
- package/dist/targets/svelte/radix/cores/core.js +80 -0
- package/dist/targets/svelte/radix/cores/direction.d.ts +10 -0
- package/dist/targets/svelte/radix/cores/direction.js +64 -0
- package/dist/targets/svelte/radix/cores/index.d.ts +19 -0
- package/dist/targets/svelte/radix/cores/index.js +85 -0
- package/dist/targets/svelte/radix/cores/modal-layer.d.ts +11 -0
- package/dist/targets/svelte/radix/cores/modal-layer.js +244 -0
- package/dist/targets/svelte/radix/cores/presence.d.ts +12 -0
- package/dist/targets/svelte/radix/cores/presence.js +129 -0
- package/dist/targets/svelte/radix/cores/slider-logic.d.ts +10 -0
- package/dist/targets/svelte/radix/cores/slider-logic.js +287 -0
- package/dist/targets/svelte/radix/cores/slider.d.ts +13 -0
- package/dist/targets/svelte/radix/cores/slider.js +267 -0
- package/dist/targets/svelte/radix/dialog.d.ts +8 -0
- package/dist/targets/svelte/radix/dialog.js +20 -0
- package/dist/targets/svelte/radix/dropdown-menu.d.ts +9 -0
- package/dist/targets/svelte/radix/dropdown-menu.js +38 -0
- package/dist/targets/svelte/radix/emit.d.ts +12 -0
- package/dist/targets/svelte/radix/emit.js +1339 -0
- package/dist/targets/svelte/radix/hover-card.d.ts +7 -0
- package/dist/targets/svelte/radix/hover-card.js +22 -0
- package/dist/targets/svelte/radix/index.d.ts +12 -0
- package/dist/targets/svelte/radix/index.js +28 -0
- package/dist/targets/svelte/radix/label.d.ts +3 -0
- package/dist/targets/svelte/radix/label.js +5 -0
- package/dist/targets/svelte/radix/menubar.d.ts +7 -0
- package/dist/targets/svelte/radix/menubar.js +34 -0
- package/dist/targets/svelte/radix/navigation-menu.d.ts +8 -0
- package/dist/targets/svelte/radix/navigation-menu.js +25 -0
- package/dist/targets/svelte/radix/packages.d.ts +34 -0
- package/dist/targets/svelte/radix/packages.js +100 -0
- package/dist/targets/svelte/radix/part.d.ts +161 -0
- package/dist/targets/svelte/radix/part.js +85 -0
- package/dist/targets/svelte/radix/popover.d.ts +7 -0
- package/dist/targets/svelte/radix/popover.js +15 -0
- package/dist/targets/svelte/radix/progress.d.ts +11 -0
- package/dist/targets/svelte/radix/progress.js +27 -0
- package/dist/targets/svelte/radix/radio-group.d.ts +9 -0
- package/dist/targets/svelte/radix/radio-group.js +26 -0
- package/dist/targets/svelte/radix/scroll-area.d.ts +7 -0
- package/dist/targets/svelte/radix/scroll-area.js +19 -0
- package/dist/targets/svelte/radix/select.d.ts +13 -0
- package/dist/targets/svelte/radix/select.js +81 -0
- package/dist/targets/svelte/radix/separator.d.ts +3 -0
- package/dist/targets/svelte/radix/separator.js +5 -0
- package/dist/targets/svelte/radix/slider.d.ts +6 -0
- package/dist/targets/svelte/radix/slider.js +8 -0
- package/dist/targets/svelte/radix/switch.d.ts +6 -0
- package/dist/targets/svelte/radix/switch.js +10 -0
- package/dist/targets/svelte/radix/tabs.d.ts +8 -0
- package/dist/targets/svelte/radix/tabs.js +15 -0
- package/dist/targets/svelte/radix/toggle-group.d.ts +9 -0
- package/dist/targets/svelte/radix/toggle-group.js +17 -0
- package/dist/targets/svelte/radix/toggle.d.ts +6 -0
- package/dist/targets/svelte/radix/toggle.js +9 -0
- package/dist/targets/svelte/radix/tooltip.d.ts +6 -0
- package/dist/targets/svelte/radix/tooltip.js +24 -0
- package/dist/targets/svelte/strip.d.ts +2 -0
- package/dist/targets/svelte/strip.js +5 -0
- package/dist/targets/vue/emit.d.ts +15 -0
- package/dist/targets/vue/emit.js +4092 -0
- package/dist/targets/vue/events.d.ts +11 -0
- package/dist/targets/vue/events.js +13 -0
- package/dist/targets/vue/module-builders.d.ts +28 -0
- package/dist/targets/vue/module-builders.js +258 -0
- package/dist/targets/vue/motion-layout.d.ts +19 -0
- package/dist/targets/vue/motion-layout.js +79 -0
- package/dist/targets/vue/motion.d.ts +12 -0
- package/dist/targets/vue/motion.js +46 -0
- package/dist/targets/vue/radix/accordion.d.ts +3 -0
- package/dist/targets/vue/radix/accordion.js +12 -0
- package/dist/targets/vue/radix/alert-dialog.d.ts +6 -0
- package/dist/targets/vue/radix/alert-dialog.js +18 -0
- package/dist/targets/vue/radix/aspect-ratio.d.ts +6 -0
- package/dist/targets/vue/radix/aspect-ratio.js +8 -0
- package/dist/targets/vue/radix/avatar.d.ts +3 -0
- package/dist/targets/vue/radix/avatar.js +7 -0
- package/dist/targets/vue/radix/checkbox.d.ts +3 -0
- package/dist/targets/vue/radix/checkbox.js +9 -0
- package/dist/targets/vue/radix/collapsible.d.ts +7 -0
- package/dist/targets/vue/radix/collapsible.js +11 -0
- package/dist/targets/vue/radix/context-menu.d.ts +3 -0
- package/dist/targets/vue/radix/context-menu.js +30 -0
- package/dist/targets/vue/radix/dialog.d.ts +3 -0
- package/dist/targets/vue/radix/dialog.js +12 -0
- package/dist/targets/vue/radix/direction.d.ts +7 -0
- package/dist/targets/vue/radix/direction.js +9 -0
- package/dist/targets/vue/radix/dropdown-menu.d.ts +3 -0
- package/dist/targets/vue/radix/dropdown-menu.js +29 -0
- package/dist/targets/vue/radix/hover-card.d.ts +3 -0
- package/dist/targets/vue/radix/hover-card.js +11 -0
- package/dist/targets/vue/radix/index.d.ts +65 -0
- package/dist/targets/vue/radix/index.js +225 -0
- package/dist/targets/vue/radix/label.d.ts +3 -0
- package/dist/targets/vue/radix/label.js +5 -0
- package/dist/targets/vue/radix/menubar.d.ts +6 -0
- package/dist/targets/vue/radix/menubar.js +29 -0
- package/dist/targets/vue/radix/navigation-menu.d.ts +6 -0
- package/dist/targets/vue/radix/navigation-menu.js +21 -0
- package/dist/targets/vue/radix/part.d.ts +41 -0
- package/dist/targets/vue/radix/part.js +46 -0
- package/dist/targets/vue/radix/popover.d.ts +3 -0
- package/dist/targets/vue/radix/popover.js +11 -0
- package/dist/targets/vue/radix/progress.d.ts +3 -0
- package/dist/targets/vue/radix/progress.js +6 -0
- package/dist/targets/vue/radix/radio-group.d.ts +3 -0
- package/dist/targets/vue/radix/radio-group.js +10 -0
- package/dist/targets/vue/radix/scroll-area.d.ts +3 -0
- package/dist/targets/vue/radix/scroll-area.js +11 -0
- package/dist/targets/vue/radix/select.d.ts +3 -0
- package/dist/targets/vue/radix/select.js +29 -0
- package/dist/targets/vue/radix/separator.d.ts +3 -0
- package/dist/targets/vue/radix/separator.js +5 -0
- package/dist/targets/vue/radix/slider.d.ts +3 -0
- package/dist/targets/vue/radix/slider.js +13 -0
- package/dist/targets/vue/radix/switch.d.ts +3 -0
- package/dist/targets/vue/radix/switch.js +9 -0
- package/dist/targets/vue/radix/tabs.d.ts +3 -0
- package/dist/targets/vue/radix/tabs.js +12 -0
- package/dist/targets/vue/radix/toggle-group.d.ts +3 -0
- package/dist/targets/vue/radix/toggle-group.js +10 -0
- package/dist/targets/vue/radix/toggle.d.ts +3 -0
- package/dist/targets/vue/radix/toggle.js +8 -0
- package/dist/targets/vue/radix/tooltip.d.ts +3 -0
- package/dist/targets/vue/radix/tooltip.js +14 -0
- package/dist/targets/vue/render-fn/h.d.ts +52 -0
- package/dist/targets/vue/render-fn/h.js +442 -0
- package/dist/targets/vue/render-fn.d.ts +21 -0
- package/dist/targets/vue/render-fn.js +357 -0
- package/dist/targets/vue/slot.d.ts +9 -0
- package/dist/targets/vue/slot.js +57 -0
- package/dist/typecheck/host.d.ts +45 -0
- package/dist/typecheck/host.js +309 -0
- package/dist/typecheck/index.d.ts +16 -0
- package/dist/typecheck/index.js +17 -0
- package/dist/typecheck/lucide.d.ts +8 -0
- package/dist/typecheck/lucide.js +45 -0
- package/dist/typecheck/sourcemap.d.ts +9 -0
- package/dist/typecheck/sourcemap.js +54 -0
- package/dist/typecheck/svelte.d.ts +9 -0
- package/dist/typecheck/svelte.js +116 -0
- package/dist/typecheck/vue.d.ts +8 -0
- package/dist/typecheck/vue.js +78 -0
- package/dist/types.d.ts +446 -0
- package/dist/types.js +11 -0
- package/dist/utils/cleanup.d.ts +32 -0
- package/dist/utils/cleanup.js +119 -0
- package/dist/utils/errors.d.ts +7 -0
- package/dist/utils/errors.js +15 -0
- package/dist/utils/fs-safe.d.ts +14 -0
- package/dist/utils/fs-safe.js +64 -0
- package/dist/validate.d.ts +16 -0
- package/dist/validate.js +204 -0
- package/dist/verify/auto-steps.d.ts +107 -0
- package/dist/verify/auto-steps.js +471 -0
- package/dist/verify/bundle.d.ts +68 -0
- package/dist/verify/bundle.js +548 -0
- package/dist/verify/diff.d.ts +31 -0
- package/dist/verify/diff.js +133 -0
- package/dist/verify/leaks.d.ts +25 -0
- package/dist/verify/leaks.js +261 -0
- package/dist/verify/link-worker.d.ts +1 -0
- package/dist/verify/link-worker.js +27 -0
- package/dist/verify/runner.d.ts +57 -0
- package/dist/verify/runner.js +867 -0
- package/dist/verify/sandbox.d.ts +40 -0
- package/dist/verify/sandbox.js +496 -0
- package/dist/verify/steps.d.ts +42 -0
- package/dist/verify/steps.js +475 -0
- package/dist/verify/verdict.d.ts +15 -0
- package/dist/verify/verdict.js +19 -0
- package/package.json +118 -4
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { LAYER_EVENTS, portal, rekaPart } from './part.js';
|
|
2
|
+
/** @radix-ui/react-dialog → reka-ui's Dialog. */
|
|
3
|
+
export const dialog = {
|
|
4
|
+
Root: rekaPart('DialogRoot', { element: false, props: { open: 'open', defaultOpen: 'defaultOpen', modal: 'modal' }, events: { onOpenChange: 'update:open' } }),
|
|
5
|
+
Trigger: rekaPart('DialogTrigger'),
|
|
6
|
+
Portal: portal('DialogPortal'),
|
|
7
|
+
Overlay: rekaPart('DialogOverlay', { props: { forceMount: 'forceMount' } }),
|
|
8
|
+
Content: rekaPart('DialogContent', { props: { forceMount: 'forceMount' }, events: LAYER_EVENTS }),
|
|
9
|
+
Title: rekaPart('DialogTitle'),
|
|
10
|
+
Description: rekaPart('DialogDescription'),
|
|
11
|
+
Close: rekaPart('DialogClose'),
|
|
12
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type PackageMap } from './part.js';
|
|
2
|
+
/**
|
|
3
|
+
* @radix-ui/react-direction → reka-ui's ConfigProvider, whose `dir` every reka-ui part below it reads (reka's
|
|
4
|
+
* useDirection), as every Radix part below a DirectionProvider reads its `dir`. Radix's `useDirection` hook is not a
|
|
5
|
+
* part: a module that reads it keeps its Radix import, refused.
|
|
6
|
+
*/
|
|
7
|
+
export declare const direction: PackageMap;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { rekaPart } from './part.js';
|
|
2
|
+
/**
|
|
3
|
+
* @radix-ui/react-direction → reka-ui's ConfigProvider, whose `dir` every reka-ui part below it reads (reka's
|
|
4
|
+
* useDirection), as every Radix part below a DirectionProvider reads its `dir`. Radix's `useDirection` hook is not a
|
|
5
|
+
* part: a module that reads it keeps its Radix import, refused.
|
|
6
|
+
*/
|
|
7
|
+
export const direction = {
|
|
8
|
+
Provider: rekaPart('ConfigProvider', { element: false, props: { dir: 'dir' } }),
|
|
9
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { LAYER_EVENTS, POPPER_PROPS, portal, rekaPart } from './part.js';
|
|
2
|
+
/** A submenu is placed beside its trigger: Radix's SubContent takes no side or align, reka's neither. */
|
|
3
|
+
const SUB_POPPER = Object.fromEntries(Object.entries(POPPER_PROPS).filter(([key]) => key !== 'side' && key !== 'align'));
|
|
4
|
+
/** A menu's content takes no onOpenAutoFocus in Radix (the menu focuses itself); a submenu's no onCloseAutoFocus either. */
|
|
5
|
+
const MENU_EVENTS = Object.fromEntries(Object.entries(LAYER_EVENTS).filter(([key]) => key !== 'onOpenAutoFocus'));
|
|
6
|
+
const SUB_EVENTS = Object.fromEntries(Object.entries(MENU_EVENTS).filter(([key]) => key !== 'onCloseAutoFocus'));
|
|
7
|
+
/** @radix-ui/react-dropdown-menu → reka-ui's DropdownMenu. */
|
|
8
|
+
export const dropdownMenu = {
|
|
9
|
+
Root: rekaPart('DropdownMenuRoot', { element: false, props: { open: 'open', defaultOpen: 'defaultOpen', modal: 'modal', dir: 'dir' }, events: { onOpenChange: 'update:open' } }),
|
|
10
|
+
Trigger: rekaPart('DropdownMenuTrigger', { props: { disabled: 'disabled' } }),
|
|
11
|
+
Portal: portal('DropdownMenuPortal'),
|
|
12
|
+
Content: rekaPart('DropdownMenuContent', {
|
|
13
|
+
props: { forceMount: 'forceMount', loop: 'loop', ...POPPER_PROPS },
|
|
14
|
+
events: MENU_EVENTS,
|
|
15
|
+
differs: 'when the menu is opened with Enter or Space, Radix moves focus to its first item, while reka-ui focuses the menu content itself',
|
|
16
|
+
}),
|
|
17
|
+
Group: rekaPart('DropdownMenuGroup'),
|
|
18
|
+
Label: rekaPart('DropdownMenuLabel'),
|
|
19
|
+
Item: rekaPart('DropdownMenuItem', { props: { disabled: 'disabled', textValue: 'textValue' }, events: { onSelect: 'select' } }),
|
|
20
|
+
CheckboxItem: rekaPart('DropdownMenuCheckboxItem', { props: { checked: 'modelValue', disabled: 'disabled', textValue: 'textValue' }, events: { onCheckedChange: 'update:modelValue', onSelect: 'select' } }),
|
|
21
|
+
RadioGroup: rekaPart('DropdownMenuRadioGroup', { props: { value: 'modelValue' }, events: { onValueChange: 'update:modelValue' } }),
|
|
22
|
+
RadioItem: rekaPart('DropdownMenuRadioItem', { props: { value: 'value', disabled: 'disabled', textValue: 'textValue' }, events: { onSelect: 'select' } }),
|
|
23
|
+
ItemIndicator: rekaPart('DropdownMenuItemIndicator', { props: { forceMount: 'forceMount' } }),
|
|
24
|
+
Separator: rekaPart('DropdownMenuSeparator'),
|
|
25
|
+
Arrow: rekaPart('DropdownMenuArrow', { props: { width: 'width', height: 'height' } }),
|
|
26
|
+
Sub: rekaPart('DropdownMenuSub', { element: false, props: { open: 'open', defaultOpen: 'defaultOpen' }, events: { onOpenChange: 'update:open' } }),
|
|
27
|
+
SubTrigger: rekaPart('DropdownMenuSubTrigger', { props: { disabled: 'disabled', textValue: 'textValue' } }),
|
|
28
|
+
SubContent: rekaPart('DropdownMenuSubContent', { props: { forceMount: 'forceMount', loop: 'loop', ...SUB_POPPER }, events: SUB_EVENTS }),
|
|
29
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { LAYER_EVENTS, POPPER_PROPS, portal, rekaPart } from './part.js';
|
|
2
|
+
/** A hover card's content takes Radix's DismissableLayer callbacks only (it moves no focus, so no auto-focus callbacks). */
|
|
3
|
+
const CONTENT_EVENTS = Object.fromEntries(Object.entries(LAYER_EVENTS).filter(([key]) => key !== 'onOpenAutoFocus' && key !== 'onCloseAutoFocus'));
|
|
4
|
+
/** @radix-ui/react-hover-card → reka-ui's HoverCard (both open after 700 ms and close after 300 ms by default). */
|
|
5
|
+
export const hoverCard = {
|
|
6
|
+
Root: rekaPart('HoverCardRoot', { element: false, props: { open: 'open', defaultOpen: 'defaultOpen', openDelay: 'openDelay', closeDelay: 'closeDelay' }, events: { onOpenChange: 'update:open' } }),
|
|
7
|
+
Trigger: rekaPart('HoverCardTrigger'),
|
|
8
|
+
Portal: portal('HoverCardPortal'),
|
|
9
|
+
Content: rekaPart('HoverCardContent', { props: { forceMount: 'forceMount', ...POPPER_PROPS }, events: CONTENT_EVENTS }),
|
|
10
|
+
Arrow: rekaPart('HoverCardArrow', { props: { width: 'width', height: 'height' } }),
|
|
11
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type { AttrNode, ComponentIR, ElementNode } from '../../../ir/model.js';
|
|
2
|
+
import type { RadixPartMap, RadixTarget } from '../../../ir/radix.js';
|
|
3
|
+
import type { PackageMap, RekaPartMap } from './part.js';
|
|
4
|
+
/**
|
|
5
|
+
* Every Radix package Vue maps, by its kebab-case name, to reka-ui's parts. Radix's Slot is not here: picked by
|
|
6
|
+
* `asChild` it converts natively (ir/as-child, targets/vue/slot), and rendered as a tag it stays refused, since reka-ui's
|
|
7
|
+
* Slot runs a handler both set in the other order (the slot's first; Radix runs the child's first).
|
|
8
|
+
*/
|
|
9
|
+
export declare const VUE_RADIX: Readonly<Record<string, PackageMap>>;
|
|
10
|
+
/**
|
|
11
|
+
* Mapped packages whose browser proof (tests/visual/radix.test.ts) has not passed on Vue: their maps stay in VUE_RADIX
|
|
12
|
+
* (checked against the type declarations), but they are not claimed, so each is refused, with what was measured, until
|
|
13
|
+
* its proof passes.
|
|
14
|
+
*/
|
|
15
|
+
export declare const VUE_GATED: Readonly<Record<string, string>>;
|
|
16
|
+
/**
|
|
17
|
+
* The CSS variables reka-ui sets on the parts of the mapped packages, under `--reka-` where Radix sets the same values
|
|
18
|
+
* under `--radix-` (tests/unit/radix-vue-map checks each against reka-ui's code).
|
|
19
|
+
*/
|
|
20
|
+
export declare const REKA_CSS_VARIABLES: ReadonlySet<string>;
|
|
21
|
+
/** Vue's map of Radix (ir/radix): reka-ui, the Vue library modelled on Radix. */
|
|
22
|
+
export declare const vueRadix: RadixTarget;
|
|
23
|
+
/** A Radix callback prop printed as the reka-ui event it maps to (`onOpenChange` → `@update:open`). */
|
|
24
|
+
export interface VueRadixEvent {
|
|
25
|
+
/** the Vue event (`update:open`) */
|
|
26
|
+
event: string;
|
|
27
|
+
/** a name for a handler function the emitter writes (`OpenChange`) */
|
|
28
|
+
label: string;
|
|
29
|
+
handler: Extract<AttrNode, {
|
|
30
|
+
kind: 'event';
|
|
31
|
+
}>['handler'];
|
|
32
|
+
/** a type the handler names, imported from reka-ui (`SliderRootEmits`) */
|
|
33
|
+
typeImport?: string;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* The keys a part's props arrive under when a wrapper spreads its rest props onto it (`<SwitchPrimitive.Root
|
|
37
|
+
* {...props}>`): every React name the map renames, to reka's prop name or to the listener of the event it maps to
|
|
38
|
+
* (`onCheckedChange` → `onUpdate:modelValue`), printed as an object literal; '' when the map renames nothing.
|
|
39
|
+
*/
|
|
40
|
+
export declare function vueRadixRenames(map: RadixPartMap): string;
|
|
41
|
+
/** The helper `radixProps` (one per file that needs it): the spread props with Radix's names renamed as reka-ui names them. */
|
|
42
|
+
export declare const RADIX_PROPS_SOURCE: string;
|
|
43
|
+
/** Radix's own focus on a left press (RadixPartMap.pressFocus), as a listener on the reka-ui part. */
|
|
44
|
+
export declare const PRESS_FOCUS_LISTENER = "@mousedown.left=\"focusOnPress\"";
|
|
45
|
+
/** The helper `focusOnPress` (one per file that needs it): Radix focuses the pressed part itself, skipping Ctrl-clicks. */
|
|
46
|
+
export declare const PRESS_FOCUS_SOURCE: string;
|
|
47
|
+
/**
|
|
48
|
+
* The reka-ui props type a wrapper's rest props are, when React typed them as this very part's props
|
|
49
|
+
* (`{ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Trigger>`, spread onto `<TabsPrimitive.Trigger>`):
|
|
50
|
+
* `TabsTriggerProps`. Vue keeps such props in the wrapper's attrs, typed as a plain record, so a part with a required
|
|
51
|
+
* prop (`value`) would not see it; the spread is typed as what React's types already knew. Null when the rest is typed
|
|
52
|
+
* any other way.
|
|
53
|
+
*/
|
|
54
|
+
export declare function vueRadixRestType(comp: ComponentIR, el: ElementNode): string | null;
|
|
55
|
+
/**
|
|
56
|
+
* The element as the reka-ui part its Radix part maps to: the component to import, the attributes with Radix's prop
|
|
57
|
+
* names renamed (`checked` → `model-value`, `asChild` → `as-child`, `className` stays `class`, `data-*` and `aria-*`
|
|
58
|
+
* as they are) and Radix's callback props taken out as the events they map to. Null when the part is not mapped (the
|
|
59
|
+
* pipeline's claimRadix reported it and left the import to the React-library guard).
|
|
60
|
+
*/
|
|
61
|
+
export declare function vueRadixPart(el: ElementNode): {
|
|
62
|
+
map: RekaPartMap;
|
|
63
|
+
attrs: AttrNode[];
|
|
64
|
+
events: VueRadixEvent[];
|
|
65
|
+
} | null;
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
import * as t from '@babel/types';
|
|
2
|
+
import { accordion } from './accordion.js';
|
|
3
|
+
import { alertDialog } from './alert-dialog.js';
|
|
4
|
+
import { aspectRatio } from './aspect-ratio.js';
|
|
5
|
+
import { avatar } from './avatar.js';
|
|
6
|
+
import { checkbox } from './checkbox.js';
|
|
7
|
+
import { collapsible } from './collapsible.js';
|
|
8
|
+
import { contextMenu } from './context-menu.js';
|
|
9
|
+
import { dialog } from './dialog.js';
|
|
10
|
+
import { direction } from './direction.js';
|
|
11
|
+
import { dropdownMenu } from './dropdown-menu.js';
|
|
12
|
+
import { hoverCard } from './hover-card.js';
|
|
13
|
+
import { label } from './label.js';
|
|
14
|
+
import { menubar } from './menubar.js';
|
|
15
|
+
import { navigationMenu } from './navigation-menu.js';
|
|
16
|
+
import { popover } from './popover.js';
|
|
17
|
+
import { progress } from './progress.js';
|
|
18
|
+
import { radioGroup } from './radio-group.js';
|
|
19
|
+
import { scrollArea } from './scroll-area.js';
|
|
20
|
+
import { select } from './select.js';
|
|
21
|
+
import { separator } from './separator.js';
|
|
22
|
+
import { slider } from './slider.js';
|
|
23
|
+
import { switchMap } from './switch.js';
|
|
24
|
+
import { tabs } from './tabs.js';
|
|
25
|
+
import { toggle } from './toggle.js';
|
|
26
|
+
import { toggleGroup } from './toggle-group.js';
|
|
27
|
+
import { tooltip } from './tooltip.js';
|
|
28
|
+
/**
|
|
29
|
+
* Every Radix package Vue maps, by its kebab-case name, to reka-ui's parts. Radix's Slot is not here: picked by
|
|
30
|
+
* `asChild` it converts natively (ir/as-child, targets/vue/slot), and rendered as a tag it stays refused, since reka-ui's
|
|
31
|
+
* Slot runs a handler both set in the other order (the slot's first; Radix runs the child's first).
|
|
32
|
+
*/
|
|
33
|
+
export const VUE_RADIX = {
|
|
34
|
+
dialog,
|
|
35
|
+
popover,
|
|
36
|
+
'dropdown-menu': dropdownMenu,
|
|
37
|
+
tabs,
|
|
38
|
+
accordion,
|
|
39
|
+
switch: switchMap,
|
|
40
|
+
checkbox,
|
|
41
|
+
select,
|
|
42
|
+
tooltip,
|
|
43
|
+
slider,
|
|
44
|
+
progress,
|
|
45
|
+
avatar,
|
|
46
|
+
separator,
|
|
47
|
+
label,
|
|
48
|
+
'aspect-ratio': aspectRatio,
|
|
49
|
+
toggle,
|
|
50
|
+
collapsible,
|
|
51
|
+
'radio-group': radioGroup,
|
|
52
|
+
'toggle-group': toggleGroup,
|
|
53
|
+
'alert-dialog': alertDialog,
|
|
54
|
+
'hover-card': hoverCard,
|
|
55
|
+
'scroll-area': scrollArea,
|
|
56
|
+
direction,
|
|
57
|
+
'context-menu': contextMenu,
|
|
58
|
+
menubar,
|
|
59
|
+
'navigation-menu': navigationMenu,
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* Mapped packages whose browser proof (tests/visual/radix.test.ts) has not passed on Vue: their maps stay in VUE_RADIX
|
|
63
|
+
* (checked against the type declarations), but they are not claimed, so each is refused, with what was measured, until
|
|
64
|
+
* its proof passes.
|
|
65
|
+
*/
|
|
66
|
+
export const VUE_GATED = {
|
|
67
|
+
menubar: 'mapped, browser proof not passed: when a click opens a menu, Radix moves focus into the menu and reka-ui keeps it on the trigger, so ArrowRight from the open menu leaves File open in reka-ui where Radix opens Edit (0.00% from that step, with the keys held as a person holds them; 48.95% to 58.23% on the later click steps)',
|
|
68
|
+
'navigation-menu': "mapped, browser proof not passed: a click on the open trigger the pointer is over closes the menu in Radix, while reka-ui ignores a click for 300 ms after the pointer moved over the trigger, so it stays open (0.00% on that step; Enter, Escape, Tab, hover, leave and the first click matched at 100%), and reka-ui has no prop that changes this",
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* The CSS variables reka-ui sets on the parts of the mapped packages, under `--reka-` where Radix sets the same values
|
|
72
|
+
* under `--radix-` (tests/unit/radix-vue-map checks each against reka-ui's code).
|
|
73
|
+
*/
|
|
74
|
+
export const REKA_CSS_VARIABLES = new Set([
|
|
75
|
+
...['accordion', 'collapsible'].flatMap((p) => [`${p}-content-height`, `${p}-content-width`]),
|
|
76
|
+
...['context-menu', 'dropdown-menu', 'hover-card', 'menubar', 'popover', 'select', 'tooltip'].flatMap((p) => [`${p}-content-available-height`, `${p}-content-available-width`, `${p}-content-transform-origin`, `${p}-trigger-height`, `${p}-trigger-width`]),
|
|
77
|
+
'slider-thumb-transform',
|
|
78
|
+
...['corner-height', 'corner-width', 'thumb-height', 'thumb-width'].map((v) => `scroll-area-${v}`),
|
|
79
|
+
'navigation-menu-viewport-height',
|
|
80
|
+
'navigation-menu-viewport-width',
|
|
81
|
+
]);
|
|
82
|
+
/** reka-ui's part for a Radix part (undefined: none). */
|
|
83
|
+
function rekaPartOf(pkg, part) {
|
|
84
|
+
const parts = VUE_RADIX[pkg];
|
|
85
|
+
return parts && Object.hasOwn(parts, part) ? parts[part] : undefined;
|
|
86
|
+
}
|
|
87
|
+
/** Vue's map of Radix (ir/radix): reka-ui, the Vue library modelled on Radix. */
|
|
88
|
+
export const vueRadix = {
|
|
89
|
+
label: 'Vue',
|
|
90
|
+
library: 'reka-ui',
|
|
91
|
+
packages: new Set(Object.keys(VUE_RADIX).filter((pkg) => !Object.hasOwn(VUE_GATED, pkg))),
|
|
92
|
+
refusal: (pkg) => (Object.hasOwn(VUE_GATED, pkg) ? VUE_GATED[pkg] : undefined),
|
|
93
|
+
mapRadixPart: rekaPartOf,
|
|
94
|
+
cssVariable(name) {
|
|
95
|
+
const suffix = name.startsWith('--radix-') ? name.slice('--radix-'.length) : null;
|
|
96
|
+
return suffix !== null && REKA_CSS_VARIABLES.has(suffix) ? `--reka-${suffix}` : undefined;
|
|
97
|
+
},
|
|
98
|
+
};
|
|
99
|
+
/**
|
|
100
|
+
* The keys a part's props arrive under when a wrapper spreads its rest props onto it (`<SwitchPrimitive.Root
|
|
101
|
+
* {...props}>`): every React name the map renames, to reka's prop name or to the listener of the event it maps to
|
|
102
|
+
* (`onCheckedChange` → `onUpdate:modelValue`), printed as an object literal; '' when the map renames nothing.
|
|
103
|
+
*/
|
|
104
|
+
export function vueRadixRenames(map) {
|
|
105
|
+
const pairs = [];
|
|
106
|
+
for (const [react, target] of Object.entries(map.props))
|
|
107
|
+
if (typeof target === 'string' && target !== react && /^[A-Za-z]\w*$/.test(react))
|
|
108
|
+
pairs.push(`${react}: '${target}'`);
|
|
109
|
+
for (const [react, event] of Object.entries(map.events)) {
|
|
110
|
+
const listener = `on${event.charAt(0).toUpperCase()}${event.slice(1)}`;
|
|
111
|
+
if (listener !== react)
|
|
112
|
+
pairs.push(`${react}: '${listener}'`);
|
|
113
|
+
}
|
|
114
|
+
return pairs.length ? `{ ${pairs.join(', ')} }` : '';
|
|
115
|
+
}
|
|
116
|
+
/** The helper `radixProps` (one per file that needs it): the spread props with Radix's names renamed as reka-ui names them. */
|
|
117
|
+
export const RADIX_PROPS_SOURCE = [
|
|
118
|
+
"/** Props given under Radix's names, renamed as reka-ui names them (`checked` is its `modelValue`); any other key as it is. */",
|
|
119
|
+
'function radixProps(attrs: Record<string, unknown>, names: Record<string, string>): Record<string, unknown> {',
|
|
120
|
+
' const out: Record<string, unknown> = {};',
|
|
121
|
+
' for (const [key, value] of Object.entries(attrs)) out[names[key] ?? key] = value;',
|
|
122
|
+
' return out;',
|
|
123
|
+
'}',
|
|
124
|
+
].join('\n');
|
|
125
|
+
/** Radix's own focus on a left press (RadixPartMap.pressFocus), as a listener on the reka-ui part. */
|
|
126
|
+
export const PRESS_FOCUS_LISTENER = '@mousedown.left="focusOnPress"';
|
|
127
|
+
/** The helper `focusOnPress` (one per file that needs it): Radix focuses the pressed part itself, skipping Ctrl-clicks. */
|
|
128
|
+
export const PRESS_FOCUS_SOURCE = [
|
|
129
|
+
'/** A left press focuses the part itself, as Radix does (a clicked tab then shows its focus ring); Ctrl-clicks do not. */',
|
|
130
|
+
'function focusOnPress(event: MouseEvent): void {',
|
|
131
|
+
' if (!event.ctrlKey && event.currentTarget instanceof HTMLElement) event.currentTarget.focus();',
|
|
132
|
+
'}',
|
|
133
|
+
].join('\n');
|
|
134
|
+
/** `DialogPrimitive.Content` from a type query's name. */
|
|
135
|
+
function entityName(n) {
|
|
136
|
+
return t.isIdentifier(n) ? n.name : t.isTSQualifiedName(n) ? `${entityName(n.left)}.${n.right.name}` : '';
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* The reka-ui props type a wrapper's rest props are, when React typed them as this very part's props
|
|
140
|
+
* (`{ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Trigger>`, spread onto `<TabsPrimitive.Trigger>`):
|
|
141
|
+
* `TabsTriggerProps`. Vue keeps such props in the wrapper's attrs, typed as a plain record, so a part with a required
|
|
142
|
+
* prop (`value`) would not see it; the spread is typed as what React's types already knew. Null when the rest is typed
|
|
143
|
+
* any other way.
|
|
144
|
+
*/
|
|
145
|
+
export function vueRadixRestType(comp, el) {
|
|
146
|
+
const map = vueRadixPart(el)?.map;
|
|
147
|
+
if (!map || !comp.rest)
|
|
148
|
+
return null;
|
|
149
|
+
let found = false;
|
|
150
|
+
for (const type of [comp.propsType, ...comp.propsHeritage]) {
|
|
151
|
+
if (!type)
|
|
152
|
+
continue;
|
|
153
|
+
t.traverseFast(type, (n) => {
|
|
154
|
+
if (t.isTSTypeQuery(n) && !t.isTSImportType(n.exprName) && entityName(n.exprName) === el.tag)
|
|
155
|
+
found = true;
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
return found ? (map.propsType ?? `${map.name}Props`) : null;
|
|
159
|
+
}
|
|
160
|
+
/** `(value) => value !== undefined && handler(value)`: the callback with a value only (RadixPartMap.definedPayload). */
|
|
161
|
+
function definedOnly(handler, emits, event) {
|
|
162
|
+
const value = () => t.identifier('value');
|
|
163
|
+
// typed as reka's payload (`SliderRootEmits['update:modelValue'][0]`): a function the emitter moves into the script
|
|
164
|
+
// keeps its parameter's type
|
|
165
|
+
const param = value();
|
|
166
|
+
param.typeAnnotation = t.tsTypeAnnotation(t.tsIndexedAccessType(t.tsIndexedAccessType(t.tsTypeReference(t.identifier(emits)), t.tsLiteralType(t.stringLiteral(event))), t.tsLiteralType(t.numericLiteral(0))));
|
|
167
|
+
return t.arrowFunctionExpression([param], t.blockStatement([t.ifStatement(t.binaryExpression('!==', value(), t.identifier('undefined')), t.expressionStatement(t.callExpression(handler, [value()])))]));
|
|
168
|
+
}
|
|
169
|
+
/** `defaultOpen` → `default-open`: props in a Vue template, as Vue's style guide writes them. */
|
|
170
|
+
function kebab(name) {
|
|
171
|
+
return name.replace(/[A-Z]/g, (c) => `-${c.toLowerCase()}`);
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* The element as the reka-ui part its Radix part maps to: the component to import, the attributes with Radix's prop
|
|
175
|
+
* names renamed (`checked` → `model-value`, `asChild` → `as-child`, `className` stays `class`, `data-*` and `aria-*`
|
|
176
|
+
* as they are) and Radix's callback props taken out as the events they map to. Null when the part is not mapped (the
|
|
177
|
+
* pipeline's claimRadix reported it and left the import to the React-library guard).
|
|
178
|
+
*/
|
|
179
|
+
export function vueRadixPart(el) {
|
|
180
|
+
const part = el.radix;
|
|
181
|
+
const map = part ? rekaPartOf(part.pkg, part.part) : undefined;
|
|
182
|
+
if (!map)
|
|
183
|
+
return null;
|
|
184
|
+
const attrs = [];
|
|
185
|
+
const events = [];
|
|
186
|
+
const rename = (name) => {
|
|
187
|
+
if (name === 'asChild')
|
|
188
|
+
return map.asChild ?? null;
|
|
189
|
+
const target = Object.hasOwn(map.props, name) ? map.props[name] : name;
|
|
190
|
+
return typeof target === 'string' ? (target === name && !Object.hasOwn(map.props, name) ? name : kebab(target)) : null;
|
|
191
|
+
};
|
|
192
|
+
for (const a of el.attrs) {
|
|
193
|
+
if (a.kind === 'event' && Object.hasOwn(map.events, a.react)) {
|
|
194
|
+
// `update:modelValue` → `update:model-value`, as Vue's style guide writes listeners in a template
|
|
195
|
+
const event = (map.events[a.react] ?? a.react).split(':').map(kebab).join(':');
|
|
196
|
+
const guarded = map.definedPayload?.includes(a.react) ?? false;
|
|
197
|
+
const emits = `${map.name}Emits`;
|
|
198
|
+
events.push({ event, label: a.react.slice(2), handler: guarded ? definedOnly(a.handler, emits, map.events[a.react] ?? a.react) : a.handler, ...(guarded ? { typeImport: emits } : {}) });
|
|
199
|
+
continue;
|
|
200
|
+
}
|
|
201
|
+
if (a.kind === 'static' || a.kind === 'expr' || a.kind === 'bool') {
|
|
202
|
+
// Radix renders no element for this part: a data-* attribute lands nowhere in React, so it is not printed here
|
|
203
|
+
if (!map.element && /^data-/.test(a.name))
|
|
204
|
+
continue;
|
|
205
|
+
const name = rename(a.name);
|
|
206
|
+
if (name !== null)
|
|
207
|
+
attrs.push({ ...a, name });
|
|
208
|
+
continue;
|
|
209
|
+
}
|
|
210
|
+
attrs.push(a);
|
|
211
|
+
}
|
|
212
|
+
// Radix's element takes no focus where reka-ui's is tabindex="0" unless given one (RekaPartMap.noFocus): with no
|
|
213
|
+
// tabindex in the source and nothing spread that could carry one, the part is given an undefined tabindex
|
|
214
|
+
const named = (a) => (a.kind === 'static' || a.kind === 'expr' || a.kind === 'bool') && /^tab-?index$/i.test(a.name);
|
|
215
|
+
if (map.noFocus && !el.attrs.some(named)) {
|
|
216
|
+
if (!el.attrs.some((a) => a.kind === 'spread'))
|
|
217
|
+
attrs.push({ kind: 'expr', name: 'tabindex', expr: t.identifier('undefined') });
|
|
218
|
+
else {
|
|
219
|
+
// a spread may carry a tabindex, so reka-ui's own stays unless it does: said where the part is used
|
|
220
|
+
const said = `${map.name} renders tabindex="0" unless given one, where Radix's part takes no focus, and the props spread here may or may not give one, so a click inside may focus it and show a focus ring Radix does not`;
|
|
221
|
+
return { map: { ...map, differs: map.differs ? `${map.differs}; ${said}` : said }, attrs, events };
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
return { map, attrs, events };
|
|
225
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type PackageMap } from './part.js';
|
|
2
|
+
/**
|
|
3
|
+
* @radix-ui/react-menubar → reka-ui's Menubar (the open menu's value is reka's model value; its menus' items as
|
|
4
|
+
* DropdownMenu's). reka-ui's MenubarRoot renders its bar but takes no as-child, so Radix's asChild on the Root is refused.
|
|
5
|
+
*/
|
|
6
|
+
export declare const menubar: PackageMap;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { LAYER_EVENTS, POPPER_PROPS, portal, rekaPart } from './part.js';
|
|
2
|
+
/** A submenu is placed beside its trigger: Radix's SubContent takes no side or align, reka's neither. */
|
|
3
|
+
const SUB_POPPER = Object.fromEntries(Object.entries(POPPER_PROPS).filter(([key]) => key !== 'side' && key !== 'align'));
|
|
4
|
+
/** A menu's content takes no onOpenAutoFocus in Radix (the menu focuses itself); a submenu's no onCloseAutoFocus either. */
|
|
5
|
+
const MENU_EVENTS = Object.fromEntries(Object.entries(LAYER_EVENTS).filter(([key]) => key !== 'onOpenAutoFocus'));
|
|
6
|
+
const SUB_EVENTS = Object.fromEntries(Object.entries(MENU_EVENTS).filter(([key]) => key !== 'onCloseAutoFocus'));
|
|
7
|
+
/**
|
|
8
|
+
* @radix-ui/react-menubar → reka-ui's Menubar (the open menu's value is reka's model value; its menus' items as
|
|
9
|
+
* DropdownMenu's). reka-ui's MenubarRoot renders its bar but takes no as-child, so Radix's asChild on the Root is refused.
|
|
10
|
+
*/
|
|
11
|
+
export const menubar = {
|
|
12
|
+
Root: rekaPart('MenubarRoot', { props: { value: 'modelValue', defaultValue: 'defaultValue', loop: 'loop', dir: 'dir' }, events: { onValueChange: 'update:modelValue' }, noAsChild: true }),
|
|
13
|
+
Menu: rekaPart('MenubarMenu', { element: false, props: { value: 'value' } }),
|
|
14
|
+
Trigger: rekaPart('MenubarTrigger', { props: { disabled: 'disabled' } }),
|
|
15
|
+
Portal: portal('MenubarPortal'),
|
|
16
|
+
Content: rekaPart('MenubarContent', { props: { forceMount: 'forceMount', loop: 'loop', ...POPPER_PROPS }, events: MENU_EVENTS }),
|
|
17
|
+
Group: rekaPart('MenubarGroup'),
|
|
18
|
+
Label: rekaPart('MenubarLabel'),
|
|
19
|
+
Item: rekaPart('MenubarItem', { props: { disabled: 'disabled', textValue: 'textValue' }, events: { onSelect: 'select' } }),
|
|
20
|
+
CheckboxItem: rekaPart('MenubarCheckboxItem', { props: { checked: 'modelValue', disabled: 'disabled', textValue: 'textValue' }, events: { onCheckedChange: 'update:modelValue', onSelect: 'select' } }),
|
|
21
|
+
RadioGroup: rekaPart('MenubarRadioGroup', { props: { value: 'modelValue' }, events: { onValueChange: 'update:modelValue' } }),
|
|
22
|
+
RadioItem: rekaPart('MenubarRadioItem', { props: { value: 'value', disabled: 'disabled', textValue: 'textValue' }, events: { onSelect: 'select' } }),
|
|
23
|
+
ItemIndicator: rekaPart('MenubarItemIndicator', { props: { forceMount: 'forceMount' } }),
|
|
24
|
+
Separator: rekaPart('MenubarSeparator'),
|
|
25
|
+
Arrow: rekaPart('MenubarArrow', { props: { width: 'width', height: 'height' } }),
|
|
26
|
+
Sub: rekaPart('MenubarSub', { element: false, props: { open: 'open', defaultOpen: 'defaultOpen' }, events: { onOpenChange: 'update:open' } }),
|
|
27
|
+
SubTrigger: rekaPart('MenubarSubTrigger', { props: { disabled: 'disabled', textValue: 'textValue' } }),
|
|
28
|
+
SubContent: rekaPart('MenubarSubContent', { props: { forceMount: 'forceMount', loop: 'loop', ...SUB_POPPER }, events: SUB_EVENTS }),
|
|
29
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type PackageMap } from './part.js';
|
|
2
|
+
/**
|
|
3
|
+
* @radix-ui/react-navigation-menu → reka-ui's NavigationMenu (the open item's value is reka's model value). reka-ui
|
|
4
|
+
* sets the viewport's size as `--reka-navigation-menu-viewport-width` / `-height` (see index: REKA_CSS_VARIABLES).
|
|
5
|
+
*/
|
|
6
|
+
export declare const navigationMenu: PackageMap;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { LAYER_EVENTS, rekaPart } from './part.js';
|
|
2
|
+
/** A navigation menu's content is a dismissable layer that moves no focus on its own: no auto-focus callbacks. */
|
|
3
|
+
const CONTENT_EVENTS = Object.fromEntries(Object.entries(LAYER_EVENTS).filter(([key]) => key !== 'onOpenAutoFocus' && key !== 'onCloseAutoFocus'));
|
|
4
|
+
/**
|
|
5
|
+
* @radix-ui/react-navigation-menu → reka-ui's NavigationMenu (the open item's value is reka's model value). reka-ui
|
|
6
|
+
* sets the viewport's size as `--reka-navigation-menu-viewport-width` / `-height` (see index: REKA_CSS_VARIABLES).
|
|
7
|
+
*/
|
|
8
|
+
export const navigationMenu = {
|
|
9
|
+
Root: rekaPart('NavigationMenuRoot', {
|
|
10
|
+
props: { value: 'modelValue', defaultValue: 'defaultValue', dir: 'dir', orientation: 'orientation', delayDuration: 'delayDuration', skipDelayDuration: 'skipDelayDuration' },
|
|
11
|
+
events: { onValueChange: 'update:modelValue' },
|
|
12
|
+
}),
|
|
13
|
+
Sub: rekaPart('NavigationMenuSub', { props: { value: 'modelValue', defaultValue: 'defaultValue', orientation: 'orientation' }, events: { onValueChange: 'update:modelValue' } }),
|
|
14
|
+
List: rekaPart('NavigationMenuList'),
|
|
15
|
+
Item: rekaPart('NavigationMenuItem', { props: { value: 'value' } }),
|
|
16
|
+
Trigger: rekaPart('NavigationMenuTrigger', { props: { disabled: 'disabled' } }),
|
|
17
|
+
Link: rekaPart('NavigationMenuLink', { props: { active: 'active' }, events: { onSelect: 'select' } }),
|
|
18
|
+
Indicator: rekaPart('NavigationMenuIndicator', { props: { forceMount: 'forceMount' } }),
|
|
19
|
+
Content: rekaPart('NavigationMenuContent', { props: { forceMount: 'forceMount' }, events: CONTENT_EVENTS }),
|
|
20
|
+
Viewport: rekaPart('NavigationMenuViewport', { props: { forceMount: 'forceMount' } }),
|
|
21
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { RadixDrop, RadixPartMap } from '../../../ir/radix.js';
|
|
2
|
+
/** A reka-ui part. */
|
|
3
|
+
export interface RekaPartMap extends RadixPartMap {
|
|
4
|
+
/** what reka-ui's part does differently from Radix's that the map cannot make up for: said as a warning where the part is used */
|
|
5
|
+
differs?: string;
|
|
6
|
+
/** reka-ui's props type of the part where it is not `${name}Props` (AlertDialogRoot: `AlertDialogProps`) */
|
|
7
|
+
propsType?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Radix's element for this part takes no focus (no tabindex), where reka-ui's renders `tabindex="0"` unless a
|
|
10
|
+
* tabindex is given (ScrollAreaViewport), so a click inside focuses it and shows a focus ring Radix does not: the part
|
|
11
|
+
* is given `:tabindex="undefined"` when the source gives it none and spreads nothing onto it.
|
|
12
|
+
*/
|
|
13
|
+
noFocus?: boolean;
|
|
14
|
+
}
|
|
15
|
+
/** One package's parts, by Radix part name. */
|
|
16
|
+
export type PackageMap = Readonly<Record<string, RekaPartMap>>;
|
|
17
|
+
interface PartOptions {
|
|
18
|
+
props?: Record<string, string | RadixDrop>;
|
|
19
|
+
events?: Record<string, string>;
|
|
20
|
+
/** false for a part that renders no element of its own (Root, Portal, Provider) */
|
|
21
|
+
element?: boolean;
|
|
22
|
+
notes?: string[];
|
|
23
|
+
pressFocus?: boolean;
|
|
24
|
+
definedPayload?: string[];
|
|
25
|
+
differs?: string;
|
|
26
|
+
propsType?: string;
|
|
27
|
+
/** the part renders an element but reka-ui's takes no `as-child` (MenubarRoot): Radix's asChild on it is refused */
|
|
28
|
+
noAsChild?: boolean;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* A reka-ui part. Every part that renders an element takes `as-child` (reka's Primitive), as every Radix part that
|
|
32
|
+
* renders one takes `asChild`; a part without an element takes neither.
|
|
33
|
+
*/
|
|
34
|
+
export declare function rekaPart(name: string, options?: PartOptions): RekaPartMap;
|
|
35
|
+
/** Radix's DismissableLayer and FocusScope callbacks, which reka's layered contents emit under the same names. */
|
|
36
|
+
export declare const LAYER_EVENTS: Record<string, string>;
|
|
37
|
+
/** Radix's Popper placement props, which reka's floating contents take under the same names. */
|
|
38
|
+
export declare const POPPER_PROPS: Record<string, string>;
|
|
39
|
+
/** A Radix Portal: its `container` is reka's `to` (an element or a selector), `forceMount` the same. */
|
|
40
|
+
export declare function portal(name: string): RekaPartMap;
|
|
41
|
+
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A reka-ui part. Every part that renders an element takes `as-child` (reka's Primitive), as every Radix part that
|
|
3
|
+
* renders one takes `asChild`; a part without an element takes neither.
|
|
4
|
+
*/
|
|
5
|
+
export function rekaPart(name, options = {}) {
|
|
6
|
+
const element = options.element ?? true;
|
|
7
|
+
return {
|
|
8
|
+
from: 'reka-ui',
|
|
9
|
+
name,
|
|
10
|
+
props: options.props ?? {},
|
|
11
|
+
events: options.events ?? {},
|
|
12
|
+
element,
|
|
13
|
+
...(element && !options.noAsChild ? { asChild: 'as-child' } : {}),
|
|
14
|
+
...(options.notes ? { notes: options.notes } : {}),
|
|
15
|
+
...(options.pressFocus ? { pressFocus: true } : {}),
|
|
16
|
+
...(options.definedPayload ? { definedPayload: options.definedPayload } : {}),
|
|
17
|
+
...(options.differs ? { differs: options.differs } : {}),
|
|
18
|
+
...(options.propsType ? { propsType: options.propsType } : {}),
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
/** Radix's DismissableLayer and FocusScope callbacks, which reka's layered contents emit under the same names. */
|
|
22
|
+
export const LAYER_EVENTS = {
|
|
23
|
+
onEscapeKeyDown: 'escapeKeyDown',
|
|
24
|
+
onPointerDownOutside: 'pointerDownOutside',
|
|
25
|
+
onFocusOutside: 'focusOutside',
|
|
26
|
+
onInteractOutside: 'interactOutside',
|
|
27
|
+
onOpenAutoFocus: 'openAutoFocus',
|
|
28
|
+
onCloseAutoFocus: 'closeAutoFocus',
|
|
29
|
+
};
|
|
30
|
+
/** Radix's Popper placement props, which reka's floating contents take under the same names. */
|
|
31
|
+
export const POPPER_PROPS = {
|
|
32
|
+
side: 'side',
|
|
33
|
+
sideOffset: 'sideOffset',
|
|
34
|
+
align: 'align',
|
|
35
|
+
alignOffset: 'alignOffset',
|
|
36
|
+
avoidCollisions: 'avoidCollisions',
|
|
37
|
+
collisionBoundary: 'collisionBoundary',
|
|
38
|
+
collisionPadding: 'collisionPadding',
|
|
39
|
+
arrowPadding: 'arrowPadding',
|
|
40
|
+
sticky: 'sticky',
|
|
41
|
+
hideWhenDetached: 'hideWhenDetached',
|
|
42
|
+
};
|
|
43
|
+
/** A Radix Portal: its `container` is reka's `to` (an element or a selector), `forceMount` the same. */
|
|
44
|
+
export function portal(name) {
|
|
45
|
+
return rekaPart(name, { element: false, props: { container: 'to', forceMount: 'forceMount' } });
|
|
46
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { LAYER_EVENTS, POPPER_PROPS, portal, rekaPart } from './part.js';
|
|
2
|
+
/** @radix-ui/react-popover → reka-ui's Popover. */
|
|
3
|
+
export const popover = {
|
|
4
|
+
Root: rekaPart('PopoverRoot', { element: false, props: { open: 'open', defaultOpen: 'defaultOpen', modal: 'modal' }, events: { onOpenChange: 'update:open' } }),
|
|
5
|
+
Trigger: rekaPart('PopoverTrigger'),
|
|
6
|
+
Anchor: rekaPart('PopoverAnchor'),
|
|
7
|
+
Portal: portal('PopoverPortal'),
|
|
8
|
+
Content: rekaPart('PopoverContent', { props: { forceMount: 'forceMount', ...POPPER_PROPS }, events: LAYER_EVENTS }),
|
|
9
|
+
Close: rekaPart('PopoverClose'),
|
|
10
|
+
Arrow: rekaPart('PopoverArrow', { props: { width: 'width', height: 'height' } }),
|
|
11
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { rekaPart } from './part.js';
|
|
2
|
+
/** @radix-ui/react-progress → reka-ui's Progress (the value is reka's model value). */
|
|
3
|
+
export const progress = {
|
|
4
|
+
Root: rekaPart('ProgressRoot', { props: { value: 'modelValue', max: 'max', getValueLabel: 'getValueLabel' } }),
|
|
5
|
+
Indicator: rekaPart('ProgressIndicator'),
|
|
6
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { rekaPart } from './part.js';
|
|
2
|
+
/** @radix-ui/react-radio-group → reka-ui's RadioGroup (the chosen item's value is reka's model value). */
|
|
3
|
+
export const radioGroup = {
|
|
4
|
+
Root: rekaPart('RadioGroupRoot', {
|
|
5
|
+
props: { value: 'modelValue', defaultValue: 'defaultValue', disabled: 'disabled', required: 'required', name: 'name', orientation: 'orientation', dir: 'dir', loop: 'loop' },
|
|
6
|
+
events: { onValueChange: 'update:modelValue' },
|
|
7
|
+
}),
|
|
8
|
+
Item: rekaPart('RadioGroupItem', { props: { value: 'value', disabled: 'disabled', required: 'required', id: 'id' } }),
|
|
9
|
+
Indicator: rekaPart('RadioGroupIndicator', { props: { forceMount: 'forceMount' } }),
|
|
10
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { rekaPart } from './part.js';
|
|
2
|
+
/** @radix-ui/react-scroll-area → reka-ui's ScrollArea. */
|
|
3
|
+
export const scrollArea = {
|
|
4
|
+
Root: rekaPart('ScrollAreaRoot', { props: { type: 'type', dir: 'dir', scrollHideDelay: 'scrollHideDelay' } }),
|
|
5
|
+
// reka-ui's viewport is tabindex="0" unless given one; Radix's takes no focus (measured: a click inside focused it in
|
|
6
|
+
// Vue only, 98.57% on the scroll steps after)
|
|
7
|
+
Viewport: { ...rekaPart('ScrollAreaViewport', { props: { nonce: 'nonce' } }), noFocus: true },
|
|
8
|
+
Scrollbar: rekaPart('ScrollAreaScrollbar', { props: { orientation: 'orientation', forceMount: 'forceMount' } }),
|
|
9
|
+
Thumb: rekaPart('ScrollAreaThumb'),
|
|
10
|
+
Corner: rekaPart('ScrollAreaCorner'),
|
|
11
|
+
};
|