@bettercms-ai/kit 0.1.1 → 2.0.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/README.md +22 -16
- package/dist/_virtual/_rolldown/runtime.js +13 -0
- package/dist/adapters/dock-values.d.ts +28 -0
- package/dist/adapters/dock-values.js +41 -0
- package/dist/adapters/dock-values.js.map +1 -0
- package/dist/adapters/icons.d.ts +15 -0
- package/dist/adapters/icons.js +27 -0
- package/dist/adapters/icons.js.map +1 -0
- package/dist/adapters/lossy.d.ts +326 -0
- package/dist/adapters/lossy.js +414 -0
- package/dist/adapters/lossy.js.map +1 -0
- package/dist/adapters/prod-types.d.ts +546 -0
- package/dist/adapters/prod-types.js +714 -0
- package/dist/adapters/prod-types.js.map +1 -0
- package/dist/adapters/schema.d.ts +154 -0
- package/dist/adapters/schema.js +3020 -0
- package/dist/adapters/schema.js.map +1 -0
- package/dist/adapters/values.d.ts +221 -0
- package/dist/adapters/values.js +623 -0
- package/dist/adapters/values.js.map +1 -0
- package/dist/brand/logo.d.ts +17 -0
- package/dist/brand/logo.js +96 -0
- package/dist/brand/logo.js.map +1 -0
- package/dist/context.d.ts +359 -0
- package/dist/context.js +217 -0
- package/dist/context.js.map +1 -0
- package/dist/controls/button.d.ts +72 -0
- package/dist/controls/button.js +578 -0
- package/dist/controls/button.js.map +1 -0
- package/dist/controls/c1.d.ts +11 -0
- package/dist/controls/c1.js +24 -0
- package/dist/controls/c1.js.map +1 -0
- package/dist/controls/c2.d.ts +10 -0
- package/dist/controls/c2.js +19 -0
- package/dist/controls/c2.js.map +1 -0
- package/dist/controls/choice.d.ts +44 -0
- package/dist/controls/choice.js +463 -0
- package/dist/controls/choice.js.map +1 -0
- package/dist/controls/code-register.d.ts +1 -0
- package/dist/controls/code-register.js +8 -0
- package/dist/controls/code-register.js.map +1 -0
- package/dist/controls/code.d.ts +42 -0
- package/dist/controls/code.js +397 -0
- package/dist/controls/code.js.map +1 -0
- package/dist/controls/color.d.ts +5 -0
- package/dist/controls/color.js +130 -0
- package/dist/controls/color.js.map +1 -0
- package/dist/controls/component-services.d.ts +156 -0
- package/dist/controls/component-services.js +7 -0
- package/dist/controls/component-services.js.map +1 -0
- package/dist/controls/date-register.d.ts +1 -0
- package/dist/controls/date-register.js +9 -0
- package/dist/controls/date-register.js.map +1 -0
- package/dist/controls/date-zone.d.ts +104 -0
- package/dist/controls/date-zone.js +278 -0
- package/dist/controls/date-zone.js.map +1 -0
- package/dist/controls/date.d.ts +7 -0
- package/dist/controls/date.js +466 -0
- package/dist/controls/date.js.map +1 -0
- package/dist/controls/form-picker-register.d.ts +1 -0
- package/dist/controls/form-picker-register.js +19 -0
- package/dist/controls/form-picker-register.js.map +1 -0
- package/dist/controls/form-picker.d.ts +43 -0
- package/dist/controls/form-picker.js +85 -0
- package/dist/controls/form-picker.js.map +1 -0
- package/dist/controls/icon-register.d.ts +1 -0
- package/dist/controls/icon-register.js +8 -0
- package/dist/controls/icon-register.js.map +1 -0
- package/dist/controls/icon.d.ts +40 -0
- package/dist/controls/icon.js +360 -0
- package/dist/controls/icon.js.map +1 -0
- package/dist/controls/index.d.ts +5 -0
- package/dist/controls/index.js +38 -0
- package/dist/controls/index.js.map +1 -0
- package/dist/controls/json-register.d.ts +1 -0
- package/dist/controls/json-register.js +8 -0
- package/dist/controls/json-register.js.map +1 -0
- package/dist/controls/json.d.ts +2 -0
- package/dist/controls/json.js +82 -0
- package/dist/controls/json.js.map +1 -0
- package/dist/controls/link.d.ts +260 -0
- package/dist/controls/link.js +1186 -0
- package/dist/controls/link.js.map +1 -0
- package/dist/controls/location-register.d.ts +1 -0
- package/dist/controls/location-register.js +8 -0
- package/dist/controls/location-register.js.map +1 -0
- package/dist/controls/location.d.ts +16 -0
- package/dist/controls/location.js +221 -0
- package/dist/controls/location.js.map +1 -0
- package/dist/controls/media-register.d.ts +1 -0
- package/dist/controls/media-register.js +12 -0
- package/dist/controls/media-register.js.map +1 -0
- package/dist/controls/media-services.d.ts +46 -0
- package/dist/controls/media-services.js +0 -0
- package/dist/controls/media.d.ts +104 -0
- package/dist/controls/media.js +1396 -0
- package/dist/controls/media.js.map +1 -0
- package/dist/controls/number.d.ts +22 -0
- package/dist/controls/number.js +196 -0
- package/dist/controls/number.js.map +1 -0
- package/dist/controls/reference-register.d.ts +1 -0
- package/dist/controls/reference-register.js +10 -0
- package/dist/controls/reference-register.js.map +1 -0
- package/dist/controls/reference-services.d.ts +58 -0
- package/dist/controls/reference-services.js +0 -0
- package/dist/controls/reference.d.ts +23 -0
- package/dist/controls/reference.js +777 -0
- package/dist/controls/reference.js.map +1 -0
- package/dist/controls/rich-text/blocks.d.ts +49 -0
- package/dist/controls/rich-text/blocks.js +1859 -0
- package/dist/controls/rich-text/blocks.js.map +1 -0
- package/dist/controls/rich-text/catalog.d.ts +101 -0
- package/dist/controls/rich-text/catalog.js +623 -0
- package/dist/controls/rich-text/catalog.js.map +1 -0
- package/dist/controls/rich-text/codec.d.ts +64 -0
- package/dist/controls/rich-text/codec.js +34 -0
- package/dist/controls/rich-text/codec.js.map +1 -0
- package/dist/controls/rich-text/component-card.d.ts +14 -0
- package/dist/controls/rich-text/component-card.js +1024 -0
- package/dist/controls/rich-text/component-card.js.map +1 -0
- package/dist/controls/rich-text/component-panel.d.ts +47 -0
- package/dist/controls/rich-text/component-panel.js +141 -0
- package/dist/controls/rich-text/component-panel.js.map +1 -0
- package/dist/controls/rich-text/control.d.ts +20 -0
- package/dist/controls/rich-text/control.js +296 -0
- package/dist/controls/rich-text/control.js.map +1 -0
- package/dist/controls/rich-text/dom.d.ts +233 -0
- package/dist/controls/rich-text/dom.js +1019 -0
- package/dist/controls/rich-text/dom.js.map +1 -0
- package/dist/controls/rich-text/editor.d.ts +57 -0
- package/dist/controls/rich-text/editor.js +1630 -0
- package/dist/controls/rich-text/editor.js.map +1 -0
- package/dist/controls/rich-text/floating.d.ts +28 -0
- package/dist/controls/rich-text/floating.js +154 -0
- package/dist/controls/rich-text/floating.js.map +1 -0
- package/dist/controls/rich-text/index.d.ts +1 -0
- package/dist/controls/rich-text/index.js +12 -0
- package/dist/controls/rich-text/index.js.map +1 -0
- package/dist/controls/rich-text/link-form.d.ts +13 -0
- package/dist/controls/rich-text/link-form.js +147 -0
- package/dist/controls/rich-text/link-form.js.map +1 -0
- package/dist/controls/rich-text/markdown.d.ts +6 -0
- package/dist/controls/rich-text/markdown.js +181 -0
- package/dist/controls/rich-text/markdown.js.map +1 -0
- package/dist/controls/rich-text/ops.d.ts +35 -0
- package/dist/controls/rich-text/ops.js +316 -0
- package/dist/controls/rich-text/ops.js.map +1 -0
- package/dist/controls/rich-text/plain.d.ts +17 -0
- package/dist/controls/rich-text/plain.js +44 -0
- package/dist/controls/rich-text/plain.js.map +1 -0
- package/dist/controls/rich-text/toolbar.d.ts +89 -0
- package/dist/controls/rich-text/toolbar.js +343 -0
- package/dist/controls/rich-text/toolbar.js.map +1 -0
- package/dist/controls/scale.d.ts +56 -0
- package/dist/controls/scale.js +563 -0
- package/dist/controls/scale.js.map +1 -0
- package/dist/controls/slot-register.d.ts +1 -0
- package/dist/controls/slot-register.js +16 -0
- package/dist/controls/slot-register.js.map +1 -0
- package/dist/controls/slot-services.d.ts +122 -0
- package/dist/controls/slot-services.js +155 -0
- package/dist/controls/slot-services.js.map +1 -0
- package/dist/controls/slot.d.ts +33 -0
- package/dist/controls/slot.js +366 -0
- package/dist/controls/slot.js.map +1 -0
- package/dist/controls/table/index.d.ts +1 -0
- package/dist/controls/table/index.js +12 -0
- package/dist/controls/table/index.js.map +1 -0
- package/dist/controls/table/prod.d.ts +21 -0
- package/dist/controls/table/prod.js +79 -0
- package/dist/controls/table/prod.js.map +1 -0
- package/dist/controls/table/refs.d.ts +50 -0
- package/dist/controls/table/refs.js +79 -0
- package/dist/controls/table/refs.js.map +1 -0
- package/dist/controls/table/stored.d.ts +15 -0
- package/dist/controls/table/stored.js +44 -0
- package/dist/controls/table/stored.js.map +1 -0
- package/dist/controls/table/table-editor.d.ts +103 -0
- package/dist/controls/table/table-editor.js +2725 -0
- package/dist/controls/table/table-editor.js.map +1 -0
- package/dist/controls/table/table-link.d.ts +24 -0
- package/dist/controls/table/table-link.js +180 -0
- package/dist/controls/table/table-link.js.map +1 -0
- package/dist/controls/table/table.d.ts +9 -0
- package/dist/controls/table/table.js +103 -0
- package/dist/controls/table/table.js.map +1 -0
- package/dist/controls/text.d.ts +17 -0
- package/dist/controls/text.js +322 -0
- package/dist/controls/text.js.map +1 -0
- package/dist/controls/unknown-value.d.ts +17 -0
- package/dist/controls/unknown-value.js +66 -0
- package/dist/controls/unknown-value.js.map +1 -0
- package/dist/core/core.d.ts +63 -0
- package/dist/core/core.js +171 -0
- package/dist/core/core.js.map +1 -0
- package/dist/core/facets.d.ts +347 -0
- package/dist/core/facets.js +334 -0
- package/dist/core/facets.js.map +1 -0
- package/dist/core/index.d.ts +3 -0
- package/dist/core/index.js +3 -0
- package/dist/engine/array.d.ts +101 -0
- package/dist/engine/array.js +906 -0
- package/dist/engine/array.js.map +1 -0
- package/dist/engine/bits.d.ts +24 -0
- package/dist/engine/bits.js +60 -0
- package/dist/engine/bits.js.map +1 -0
- package/dist/engine/breadcrumb.d.ts +45 -0
- package/dist/engine/breadcrumb.js +63 -0
- package/dist/engine/breadcrumb.js.map +1 -0
- package/dist/engine/expand.d.ts +66 -0
- package/dist/engine/expand.js +153 -0
- package/dist/engine/expand.js.map +1 -0
- package/dist/engine/field-list.d.ts +20 -0
- package/dist/engine/field-list.js +19 -0
- package/dist/engine/field-list.js.map +1 -0
- package/dist/engine/field-shell.d.ts +49 -0
- package/dist/engine/field-shell.js +988 -0
- package/dist/engine/field-shell.js.map +1 -0
- package/dist/engine/frame.d.ts +122 -0
- package/dist/engine/frame.js +601 -0
- package/dist/engine/frame.js.map +1 -0
- package/dist/engine/group-summary.d.ts +5 -0
- package/dist/engine/group-summary.js +70 -0
- package/dist/engine/group-summary.js.map +1 -0
- package/dist/engine/grouping.d.ts +238 -0
- package/dist/engine/grouping.js +996 -0
- package/dist/engine/grouping.js.map +1 -0
- package/dist/engine/item-list.d.ts +99 -0
- package/dist/engine/item-list.js +725 -0
- package/dist/engine/item-list.js.map +1 -0
- package/dist/engine/kit-field.d.ts +72 -0
- package/dist/engine/kit-field.js +558 -0
- package/dist/engine/kit-field.js.map +1 -0
- package/dist/engine/schema-form.d.ts +116 -0
- package/dist/engine/schema-form.js +462 -0
- package/dist/engine/schema-form.js.map +1 -0
- package/dist/engine/slot.d.ts +13 -0
- package/dist/engine/slot.js +216 -0
- package/dist/engine/slot.js.map +1 -0
- package/dist/index.d.ts +45 -3139
- package/dist/index.js +47 -2036
- package/dist/index.js.map +1 -0
- package/dist/kit.css +75 -0
- package/dist/lib/cn.d.ts +4 -0
- package/dist/lib/cn.js +56 -0
- package/dist/lib/cn.js.map +1 -0
- package/dist/lib/columns.d.ts +14 -0
- package/dist/lib/columns.js +30 -0
- package/dist/lib/columns.js.map +1 -0
- package/dist/lib/frames.d.ts +36 -0
- package/dist/lib/frames.js +214 -0
- package/dist/lib/frames.js.map +1 -0
- package/dist/lib/icon-image.d.ts +10 -0
- package/dist/lib/icon-image.js +8 -0
- package/dist/lib/icon-image.js.map +1 -0
- package/dist/lib/icons.d.ts +16 -0
- package/dist/lib/icons.js +173 -0
- package/dist/lib/icons.js.map +1 -0
- package/dist/lib/input-modality.d.ts +11 -0
- package/dist/lib/input-modality.js +47 -0
- package/dist/lib/input-modality.js.map +1 -0
- package/dist/lib/key-event.d.ts +11 -0
- package/dist/lib/key-event.js +16 -0
- package/dist/lib/key-event.js.map +1 -0
- package/dist/lib/path.d.ts +29 -0
- package/dist/lib/path.js +66 -0
- package/dist/lib/path.js.map +1 -0
- package/dist/lib/schema.d.ts +80 -0
- package/dist/lib/schema.js +384 -0
- package/dist/lib/schema.js.map +1 -0
- package/dist/lib/utils.d.ts +7 -0
- package/dist/lib/utils.js +37 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/lib/validate.d.ts +30 -0
- package/dist/lib/validate.js +224 -0
- package/dist/lib/validate.js.map +1 -0
- package/dist/library/analysis.d.ts +23 -0
- package/dist/library/analysis.js +160 -0
- package/dist/library/analysis.js.map +1 -0
- package/dist/library/catalog.d.ts +57 -0
- package/dist/library/catalog.js +307 -0
- package/dist/library/catalog.js.map +1 -0
- package/dist/library/coreNotes.d.ts +8 -0
- package/dist/library/coreNotes.js +111 -0
- package/dist/library/coreNotes.js.map +1 -0
- package/dist/library/coverage.d.ts +40 -0
- package/dist/library/coverage.js +59 -0
- package/dist/library/coverage.js.map +1 -0
- package/dist/library/entries/advanced.entries.d.ts +2 -0
- package/dist/library/entries/advanced.entries.js +6579 -0
- package/dist/library/entries/advanced.entries.js.map +1 -0
- package/dist/library/entries/commerce.entries.d.ts +2 -0
- package/dist/library/entries/commerce.entries.js +4140 -0
- package/dist/library/entries/commerce.entries.js.map +1 -0
- package/dist/library/entries/company.entries.d.ts +2 -0
- package/dist/library/entries/company.entries.js +2731 -0
- package/dist/library/entries/company.entries.js.map +1 -0
- package/dist/library/entries/conversion.entries.d.ts +2 -0
- package/dist/library/entries/conversion.entries.js +3707 -0
- package/dist/library/entries/conversion.entries.js.map +1 -0
- package/dist/library/entries/data.entries.d.ts +7 -0
- package/dist/library/entries/data.entries.js +4613 -0
- package/dist/library/entries/data.entries.js.map +1 -0
- package/dist/library/entries/events.entries.d.ts +2 -0
- package/dist/library/entries/events.entries.js +3428 -0
- package/dist/library/entries/events.entries.js.map +1 -0
- package/dist/library/entries/features.entries.d.ts +2 -0
- package/dist/library/entries/features.entries.js +3157 -0
- package/dist/library/entries/features.entries.js.map +1 -0
- package/dist/library/entries/heroes.entries.d.ts +2 -0
- package/dist/library/entries/heroes.entries.js +3401 -0
- package/dist/library/entries/heroes.entries.js.map +1 -0
- package/dist/library/entries/index.d.ts +3 -0
- package/dist/library/entries/index.js +35 -0
- package/dist/library/entries/index.js.map +1 -0
- package/dist/library/entries/listings.entries.d.ts +2 -0
- package/dist/library/entries/listings.entries.js +2976 -0
- package/dist/library/entries/listings.entries.js.map +1 -0
- package/dist/library/entries/longform.entries.d.ts +2 -0
- package/dist/library/entries/longform.entries.js +4227 -0
- package/dist/library/entries/longform.entries.js.map +1 -0
- package/dist/library/entries/media.entries.d.ts +2 -0
- package/dist/library/entries/media.entries.js +2781 -0
- package/dist/library/entries/media.entries.js.map +1 -0
- package/dist/library/entries/navigation.entries.d.ts +2 -0
- package/dist/library/entries/navigation.entries.js +4011 -0
- package/dist/library/entries/navigation.entries.js.map +1 -0
- package/dist/library/entries/pricing.entries.d.ts +2 -0
- package/dist/library/entries/pricing.entries.js +2383 -0
- package/dist/library/entries/pricing.entries.js.map +1 -0
- package/dist/library/entries/social-proof.entries.d.ts +2 -0
- package/dist/library/entries/social-proof.entries.js +2297 -0
- package/dist/library/entries/social-proof.entries.js.map +1 -0
- package/dist/library/examples/bento.d.ts +92 -0
- package/dist/library/examples/bento.js +201 -0
- package/dist/library/examples/bento.js.map +1 -0
- package/dist/library/examples/blocks.d.ts +14 -0
- package/dist/library/examples/blocks.js +313 -0
- package/dist/library/examples/blocks.js.map +1 -0
- package/dist/library/examples/faq.d.ts +28 -0
- package/dist/library/examples/faq.js +230 -0
- package/dist/library/examples/faq.js.map +1 -0
- package/dist/library/examples/hero.d.ts +43 -0
- package/dist/library/examples/hero.js +222 -0
- package/dist/library/examples/hero.js.map +1 -0
- package/dist/library/examples/index.d.ts +36 -0
- package/dist/library/examples/index.js +109 -0
- package/dist/library/examples/index.js.map +1 -0
- package/dist/library/examples/journalStory.d.ts +93 -0
- package/dist/library/examples/journalStory.js +338 -0
- package/dist/library/examples/journalStory.js.map +1 -0
- package/dist/library/examples/megaMenu.d.ts +134 -0
- package/dist/library/examples/megaMenu.js +442 -0
- package/dist/library/examples/megaMenu.js.map +1 -0
- package/dist/library/examples/pricing.d.ts +103 -0
- package/dist/library/examples/pricing.js +479 -0
- package/dist/library/examples/pricing.js.map +1 -0
- package/dist/library/examples/tabs.d.ts +87 -0
- package/dist/library/examples/tabs.js +180 -0
- package/dist/library/examples/tabs.js.map +1 -0
- package/dist/library/export.d.ts +42 -0
- package/dist/library/export.js +80 -0
- package/dist/library/export.js.map +1 -0
- package/dist/library/index.d.ts +13 -0
- package/dist/library/index.js +6 -0
- package/dist/library/kit-catalog.json +1510 -0
- package/dist/library/types.d.ts +42 -0
- package/dist/library/types.js +0 -0
- package/dist/schema/adapters.d.ts +28 -0
- package/dist/schema/adapters.js +492 -0
- package/dist/schema/adapters.js.map +1 -0
- package/dist/schema/help.d.ts +27 -0
- package/dist/schema/help.js +56 -0
- package/dist/schema/help.js.map +1 -0
- package/dist/schema/scale.d.ts +69 -0
- package/dist/schema/scale.js +250 -0
- package/dist/schema/scale.js.map +1 -0
- package/dist/schema/sources.d.ts +103 -0
- package/dist/schema/sources.js +65 -0
- package/dist/schema/sources.js.map +1 -0
- package/dist/schema/table.d.ts +319 -0
- package/dist/schema/table.js +1199 -0
- package/dist/schema/table.js.map +1 -0
- package/dist/schema/types.d.ts +297 -0
- package/dist/schema/types.js +14 -0
- package/dist/schema/types.js.map +1 -0
- package/dist/styles.css +2 -0
- package/dist/table/table-view.d.ts +14 -0
- package/dist/table/table-view.js +140 -0
- package/dist/table/table-view.js.map +1 -0
- package/dist/table/table.css +73 -0
- package/dist/testing/corpus.d.ts +63 -0
- package/dist/testing/corpus.js +129 -0
- package/dist/testing/corpus.js.map +1 -0
- package/dist/testing/test-form.d.ts +11 -0
- package/dist/testing/test-form.js +38 -0
- package/dist/testing/test-form.js.map +1 -0
- package/dist/theme.css +345 -0
- package/dist/theme.d.ts +20 -1504
- package/dist/theme.js +43 -4126
- package/dist/theme.js.map +1 -0
- package/dist/tokens.css +542 -0
- package/dist/types.d.ts +17 -0
- package/dist/types.js +0 -0
- package/dist/ui/action-tray.d.ts +54 -0
- package/dist/ui/action-tray.js +154 -0
- package/dist/ui/action-tray.js.map +1 -0
- package/dist/ui/autocomplete.d.ts +30 -0
- package/dist/ui/autocomplete.js +139 -0
- package/dist/ui/autocomplete.js.map +1 -0
- package/dist/ui/button.d.ts +57 -0
- package/dist/ui/button.js +201 -0
- package/dist/ui/button.js.map +1 -0
- package/dist/ui/choice-switch.d.ts +36 -0
- package/dist/ui/choice-switch.js +57 -0
- package/dist/ui/choice-switch.js.map +1 -0
- package/dist/ui/controls.d.ts +83 -0
- package/dist/ui/controls.js +331 -0
- package/dist/ui/controls.js.map +1 -0
- package/dist/ui/display.d.ts +163 -0
- package/dist/ui/display.js +455 -0
- package/dist/ui/display.js.map +1 -0
- package/dist/ui/expanded-editor-modal.d.ts +26 -0
- package/dist/ui/expanded-editor-modal.js +140 -0
- package/dist/ui/expanded-editor-modal.js.map +1 -0
- package/dist/ui/field-context.d.ts +12 -0
- package/dist/ui/field-context.js +23 -0
- package/dist/ui/field-context.js.map +1 -0
- package/dist/ui/floating-panel.d.ts +152 -0
- package/dist/ui/floating-panel.js +928 -0
- package/dist/ui/floating-panel.js.map +1 -0
- package/dist/ui/index.d.ts +16 -0
- package/dist/ui/index.js +18 -0
- package/dist/ui/input.d.ts +78 -0
- package/dist/ui/input.js +250 -0
- package/dist/ui/input.js.map +1 -0
- package/dist/ui/mode-bar.d.ts +31 -0
- package/dist/ui/mode-bar.js +65 -0
- package/dist/ui/mode-bar.js.map +1 -0
- package/dist/ui/overlay.d.ts +195 -0
- package/dist/ui/overlay.js +697 -0
- package/dist/ui/overlay.js.map +1 -0
- package/dist/ui/path-crumbs.d.ts +90 -0
- package/dist/ui/path-crumbs.js +566 -0
- package/dist/ui/path-crumbs.js.map +1 -0
- package/dist/ui/presence.d.ts +16 -0
- package/dist/ui/presence.js +65 -0
- package/dist/ui/presence.js.map +1 -0
- package/dist/ui/select.d.ts +66 -0
- package/dist/ui/select.js +407 -0
- package/dist/ui/select.js.map +1 -0
- package/dist/ui/shortcut-hint.d.ts +14 -0
- package/dist/ui/shortcut-hint.js +35 -0
- package/dist/ui/shortcut-hint.js.map +1 -0
- package/dist/ui/spinner.d.ts +24 -0
- package/dist/ui/spinner.js +42 -0
- package/dist/ui/spinner.js.map +1 -0
- package/dist/ui/split-button.d.ts +32 -0
- package/dist/ui/split-button.js +60 -0
- package/dist/ui/split-button.js.map +1 -0
- package/dist/ui/surfaces.d.ts +23 -0
- package/dist/ui/surfaces.js +26 -0
- package/dist/ui/surfaces.js.map +1 -0
- package/dist/ui/tab.d.ts +38 -0
- package/dist/ui/tab.js +87 -0
- package/dist/ui/tab.js.map +1 -0
- package/dist/ui/toast.d.ts +20 -0
- package/dist/ui/toast.js +115 -0
- package/dist/ui/toast.js.map +1 -0
- package/dist/ui/tooltip-root.d.ts +13 -0
- package/dist/ui/tooltip-root.js +77 -0
- package/dist/ui/tooltip-root.js.map +1 -0
- package/dist/ui/variants.d.ts +15 -0
- package/dist/ui/variants.js +14 -0
- package/dist/ui/variants.js.map +1 -0
- package/package.json +76 -50
- package/LICENSE +0 -21
- package/dist/_chunks-cjs/_visual-editing.js +0 -5898
- package/dist/_chunks-cjs/refractor.js +0 -22
- package/dist/_chunks-es/_visual-editing.mjs +0 -5904
- package/dist/_chunks-es/refractor.mjs +0 -25
- package/dist/_color.d.mts +0 -119
- package/dist/_color.d.ts +0 -119
- package/dist/_color.js +0 -1412
- package/dist/_color.mjs +0 -1411
- package/dist/_visual-editing.d.mts +0 -1126
- package/dist/_visual-editing.d.ts +0 -1126
- package/dist/_visual-editing.js +0 -30
- package/dist/_visual-editing.mjs +0 -30
- package/dist/index.d.mts +0 -3140
- package/dist/index.mjs +0 -2044
- package/dist/theme.d.mts +0 -1506
- package/dist/theme.mjs +0 -4126
- package/exports/_visual-editing.ts +0 -31
- package/exports/index.ts +0 -1
- package/exports/theme.ts +0 -1
- package/src/color/index.d.mts +0 -119
- package/src/color/index.mjs +0 -1411
- package/src/core/__workshop__/constants.ts +0 -293
- package/src/core/_compat.ts +0 -264
- package/src/core/components/autocomplete/__mocks__/apiStore.ts +0 -49
- package/src/core/components/autocomplete/__mocks__/countries.ts +0 -245
- package/src/core/components/autocomplete/__workshop__/async.tsx +0 -156
- package/src/core/components/autocomplete/__workshop__/constrainedHeight.tsx +0 -137
- package/src/core/components/autocomplete/__workshop__/custom.tsx +0 -89
- package/src/core/components/autocomplete/__workshop__/example.tsx +0 -79
- package/src/core/components/autocomplete/__workshop__/focusAndBlur.tsx +0 -36
- package/src/core/components/autocomplete/__workshop__/fullscreen.tsx +0 -294
- package/src/core/components/autocomplete/__workshop__/index.ts +0 -39
- package/src/core/components/autocomplete/__workshop__/types.ts +0 -4
- package/src/core/components/autocomplete/autocomplete.styles.tsx +0 -39
- package/src/core/components/autocomplete/autocomplete.tsx +0 -767
- package/src/core/components/autocomplete/autocompleteOption.tsx +0 -45
- package/src/core/components/autocomplete/autocompleteReducer.ts +0 -47
- package/src/core/components/autocomplete/constants.ts +0 -28
- package/src/core/components/autocomplete/index.ts +0 -2
- package/src/core/components/autocomplete/types.ts +0 -108
- package/src/core/components/breadcrumbs/__workshop__/example.tsx +0 -62
- package/src/core/components/breadcrumbs/__workshop__/index.ts +0 -14
- package/src/core/components/breadcrumbs/breadcrumbs.styles.ts +0 -18
- package/src/core/components/breadcrumbs/breadcrumbs.test.tsx +0 -51
- package/src/core/components/breadcrumbs/breadcrumbs.tsx +0 -133
- package/src/core/components/breadcrumbs/index.ts +0 -1
- package/src/core/components/dialog/__workshop__/activate.tsx +0 -134
- package/src/core/components/dialog/__workshop__/autoFocus.tsx +0 -29
- package/src/core/components/dialog/__workshop__/index.ts +0 -19
- package/src/core/components/dialog/__workshop__/layering.tsx +0 -41
- package/src/core/components/dialog/__workshop__/nested.tsx +0 -72
- package/src/core/components/dialog/__workshop__/onScroll.tsx +0 -39
- package/src/core/components/dialog/__workshop__/panes.tsx +0 -82
- package/src/core/components/dialog/__workshop__/position.tsx +0 -30
- package/src/core/components/dialog/__workshop__/props.tsx +0 -75
- package/src/core/components/dialog/__workshop__/provider.tsx +0 -11
- package/src/core/components/dialog/__workshop__/wrapped.tsx +0 -76
- package/src/core/components/dialog/dialog.tsx +0 -430
- package/src/core/components/dialog/dialogContext.ts +0 -20
- package/src/core/components/dialog/dialogProvider.tsx +0 -35
- package/src/core/components/dialog/index.ts +0 -4
- package/src/core/components/dialog/styles.ts +0 -77
- package/src/core/components/dialog/useDialog.ts +0 -11
- package/src/core/components/hotkeys/__workshop__/index.ts +0 -14
- package/src/core/components/hotkeys/__workshop__/plain.tsx +0 -9
- package/src/core/components/hotkeys/hotkeys.test.tsx +0 -42
- package/src/core/components/hotkeys/hotkeys.tsx +0 -66
- package/src/core/components/hotkeys/index.ts +0 -1
- package/src/core/components/index.ts +0 -9
- package/src/core/components/menu/__workshop__/asComponent.tsx +0 -45
- package/src/core/components/menu/__workshop__/avatarMenu.tsx +0 -51
- package/src/core/components/menu/__workshop__/closableMenuButton.tsx +0 -46
- package/src/core/components/menu/__workshop__/constrainedInBoundary.tsx +0 -134
- package/src/core/components/menu/__workshop__/customMenuItem.tsx +0 -45
- package/src/core/components/menu/__workshop__/customSelectedState.tsx +0 -39
- package/src/core/components/menu/__workshop__/disableFocusOnClose.tsx +0 -40
- package/src/core/components/menu/__workshop__/groups.tsx +0 -156
- package/src/core/components/menu/__workshop__/index.ts +0 -89
- package/src/core/components/menu/__workshop__/menuButton.tsx +0 -80
- package/src/core/components/menu/__workshop__/menuGroupRight.tsx +0 -58
- package/src/core/components/menu/__workshop__/nestedMenu.tsx +0 -22
- package/src/core/components/menu/__workshop__/onCloseMenuButton.tsx +0 -41
- package/src/core/components/menu/__workshop__/selectedItem.tsx +0 -69
- package/src/core/components/menu/__workshop__/shouldFocus.tsx +0 -47
- package/src/core/components/menu/__workshop__/tones.tsx +0 -25
- package/src/core/components/menu/__workshop__/withoutArrow.tsx +0 -32
- package/src/core/components/menu/helpers.ts +0 -82
- package/src/core/components/menu/index.ts +0 -5
- package/src/core/components/menu/menu.spacing.test.tsx +0 -63
- package/src/core/components/menu/menu.test.tsx +0 -125
- package/src/core/components/menu/menu.tsx +0 -178
- package/src/core/components/menu/menuButton.tsx +0 -268
- package/src/core/components/menu/menuContext.ts +0 -18
- package/src/core/components/menu/menuDivider.ts +0 -23
- package/src/core/components/menu/menuGroup.spacing.test.tsx +0 -63
- package/src/core/components/menu/menuGroup.tsx +0 -233
- package/src/core/components/menu/menuItem.spacing.test.tsx +0 -59
- package/src/core/components/menu/menuItem.tsx +0 -197
- package/src/core/components/menu/useMenu.ts +0 -21
- package/src/core/components/menu/useMenuController.ts +0 -231
- package/src/core/components/skeleton/__workshop__/delay.tsx +0 -70
- package/src/core/components/skeleton/__workshop__/index.ts +0 -11
- package/src/core/components/skeleton/__workshop__/skeleton.tsx +0 -64
- package/src/core/components/skeleton/index.ts +0 -2
- package/src/core/components/skeleton/skeleton.tsx +0 -57
- package/src/core/components/skeleton/styles.ts +0 -50
- package/src/core/components/skeleton/textSkeleton.tsx +0 -122
- package/src/core/components/tab/__workshop__/example.tsx +0 -79
- package/src/core/components/tab/__workshop__/index.ts +0 -14
- package/src/core/components/tab/index.ts +0 -3
- package/src/core/components/tab/tab.tsx +0 -101
- package/src/core/components/tab/tabList.test.tsx +0 -48
- package/src/core/components/tab/tabList.tsx +0 -70
- package/src/core/components/tab/tabPanel.tsx +0 -39
- package/src/core/components/toast/__workshop__/hook.tsx +0 -71
- package/src/core/components/toast/__workshop__/index.ts +0 -19
- package/src/core/components/toast/__workshop__/toast.tsx +0 -26
- package/src/core/components/toast/index.ts +0 -4
- package/src/core/components/toast/styles.ts +0 -77
- package/src/core/components/toast/toast.test.tsx +0 -101
- package/src/core/components/toast/toast.tsx +0 -198
- package/src/core/components/toast/toastContext.ts +0 -7
- package/src/core/components/toast/toastLayer.tsx +0 -51
- package/src/core/components/toast/toastProvider.tsx +0 -113
- package/src/core/components/toast/toastState.ts +0 -6
- package/src/core/components/toast/types.ts +0 -26
- package/src/core/components/toast/useToast.ts +0 -25
- package/src/core/components/tree/__workshop__/basic.perf.ts +0 -19
- package/src/core/components/tree/__workshop__/basic.tsx +0 -105
- package/src/core/components/tree/__workshop__/index.ts +0 -21
- package/src/core/components/tree/__workshop__/tabFromElement.tsx +0 -84
- package/src/core/components/tree/helpers.ts +0 -105
- package/src/core/components/tree/index.ts +0 -4
- package/src/core/components/tree/style.ts +0 -105
- package/src/core/components/tree/tree.test.tsx +0 -55
- package/src/core/components/tree/tree.tsx +0 -240
- package/src/core/components/tree/treeContext.ts +0 -10
- package/src/core/components/tree/treeGroup.tsx +0 -28
- package/src/core/components/tree/treeItem.test.tsx +0 -65
- package/src/core/components/tree/treeItem.tsx +0 -224
- package/src/core/components/tree/types.ts +0 -25
- package/src/core/components/tree/useTree.ts +0 -17
- package/src/core/constants.ts +0 -79
- package/src/core/helpers/animation.ts +0 -27
- package/src/core/helpers/element.ts +0 -55
- package/src/core/helpers/focus.ts +0 -100
- package/src/core/helpers/index.ts +0 -4
- package/src/core/helpers/scroll.ts +0 -15
- package/src/core/hooks/index.ts +0 -12
- package/src/core/hooks/useArrayProp.ts +0 -17
- package/src/core/hooks/useClickOutside.test.tsx +0 -482
- package/src/core/hooks/useClickOutside.ts +0 -118
- package/src/core/hooks/useClickOutsideEvent.test.tsx +0 -115
- package/src/core/hooks/useClickOutsideEvent.ts +0 -73
- package/src/core/hooks/useCustomValidity.ts +0 -13
- package/src/core/hooks/useDelayed.test.ts +0 -88
- package/src/core/hooks/useDelayedState.ts +0 -36
- package/src/core/hooks/useElementRect/__workshop__/example.tsx +0 -32
- package/src/core/hooks/useElementRect/__workshop__/index.ts +0 -14
- package/src/core/hooks/useElementRect/index.ts +0 -1
- package/src/core/hooks/useElementRect/useElementRect.ts +0 -13
- package/src/core/hooks/useElementSize.ts +0 -19
- package/src/core/hooks/useForwardedRef.ts +0 -19
- package/src/core/hooks/useGlobalKeyDown.ts +0 -24
- package/src/core/hooks/useIsomorphicEffect.ts +0 -7
- package/src/core/hooks/useMatchMedia.ts +0 -28
- package/src/core/hooks/useMediaIndex/__workshop__/index.ts +0 -14
- package/src/core/hooks/useMediaIndex/__workshop__/test.tsx +0 -14
- package/src/core/hooks/useMediaIndex/index.ts +0 -1
- package/src/core/hooks/useMediaIndex/useMediaIndex.test.tsx +0 -36
- package/src/core/hooks/useMediaIndex/useMediaIndex.ts +0 -102
- package/src/core/hooks/useMounted.ts +0 -15
- package/src/core/hooks/usePrefersDark.hydration.test.tsx +0 -56
- package/src/core/hooks/usePrefersDark.test.tsx +0 -19
- package/src/core/hooks/usePrefersDark.ts +0 -16
- package/src/core/hooks/usePrefersReducedMotion.hydration.test.tsx +0 -56
- package/src/core/hooks/usePrefersReducedMotion.test.tsx +0 -19
- package/src/core/hooks/usePrefersReducedMotion.ts +0 -16
- package/src/core/index.ts +0 -10
- package/src/core/lib/createGlobalScopedContext.ts +0 -36
- package/src/core/lib/globalScope.ts +0 -19
- package/src/core/lib/isRecord.ts +0 -3
- package/src/core/middleware/origin.ts +0 -47
- package/src/core/observers/elementSizeObserver.ts +0 -116
- package/src/core/observers/index.ts +0 -2
- package/src/core/observers/resizeObserver.ts +0 -9
- package/src/core/primitives/_selectable/index.ts +0 -1
- package/src/core/primitives/_selectable/selectable.tsx +0 -15
- package/src/core/primitives/_selectable/style.ts +0 -115
- package/src/core/primitives/avatar/__workshop__/asButton.tsx +0 -14
- package/src/core/primitives/avatar/__workshop__/index.ts +0 -29
- package/src/core/primitives/avatar/__workshop__/stack.tsx +0 -25
- package/src/core/primitives/avatar/__workshop__/withinButton.tsx +0 -63
- package/src/core/primitives/avatar/__workshop__/withinMenuItem.tsx +0 -70
- package/src/core/primitives/avatar/avatar.tsx +0 -200
- package/src/core/primitives/avatar/avatarCounter.tsx +0 -91
- package/src/core/primitives/avatar/avatarStack.tsx +0 -100
- package/src/core/primitives/avatar/index.ts +0 -4
- package/src/core/primitives/avatar/styles.ts +0 -167
- package/src/core/primitives/avatar/types.ts +0 -17
- package/src/core/primitives/badge/__workshop__/index.ts +0 -19
- package/src/core/primitives/badge/__workshop__/props.tsx +0 -30
- package/src/core/primitives/badge/__workshop__/tones.tsx +0 -21
- package/src/core/primitives/badge/badge.test.tsx +0 -16
- package/src/core/primitives/badge/badge.tsx +0 -70
- package/src/core/primitives/badge/index.ts +0 -1
- package/src/core/primitives/badge/styles.ts +0 -20
- package/src/core/primitives/badge/types.ts +0 -8
- package/src/core/primitives/box/__workshop__/asComponent.tsx +0 -31
- package/src/core/primitives/box/__workshop__/index.ts +0 -24
- package/src/core/primitives/box/__workshop__/props.tsx +0 -20
- package/src/core/primitives/box/__workshop__/responsive.tsx +0 -20
- package/src/core/primitives/box/box.test.tsx +0 -142
- package/src/core/primitives/box/box.tsx +0 -154
- package/src/core/primitives/box/index.ts +0 -1
- package/src/core/primitives/button/__workshop__/custom.tsx +0 -51
- package/src/core/primitives/button/__workshop__/customIcons.tsx +0 -30
- package/src/core/primitives/button/__workshop__/disabled.tsx +0 -74
- package/src/core/primitives/button/__workshop__/index.ts +0 -59
- package/src/core/primitives/button/__workshop__/labelUploadButton.tsx +0 -36
- package/src/core/primitives/button/__workshop__/mixedChildren.tsx +0 -12
- package/src/core/primitives/button/__workshop__/props.tsx +0 -55
- package/src/core/primitives/button/__workshop__/stacked.tsx +0 -58
- package/src/core/primitives/button/__workshop__/styled1.tsx +0 -17
- package/src/core/primitives/button/__workshop__/styled2.tsx +0 -19
- package/src/core/primitives/button/__workshop__/uploadButton.tsx +0 -28
- package/src/core/primitives/button/button.test.tsx +0 -82
- package/src/core/primitives/button/button.tsx +0 -210
- package/src/core/primitives/button/index.ts +0 -1
- package/src/core/primitives/button/styles.ts +0 -117
- package/src/core/primitives/card/__workshop__/allTones.tsx +0 -25
- package/src/core/primitives/card/__workshop__/asButton.tsx +0 -107
- package/src/core/primitives/card/__workshop__/asComponent.tsx +0 -27
- package/src/core/primitives/card/__workshop__/checkered.tsx +0 -26
- package/src/core/primitives/card/__workshop__/index.ts +0 -18
- package/src/core/primitives/card/__workshop__/interactive.tsx +0 -30
- package/src/core/primitives/card/__workshop__/listNavigation.tsx +0 -80
- package/src/core/primitives/card/__workshop__/props.tsx +0 -53
- package/src/core/primitives/card/__workshop__/selected.tsx +0 -94
- package/src/core/primitives/card/__workshop__/styled.tsx +0 -14
- package/src/core/primitives/card/card.tsx +0 -128
- package/src/core/primitives/card/index.ts +0 -2
- package/src/core/primitives/card/styles.ts +0 -147
- package/src/core/primitives/card/types.ts +0 -11
- package/src/core/primitives/checkbox/__workshop__/example.tsx +0 -25
- package/src/core/primitives/checkbox/__workshop__/index.ts +0 -13
- package/src/core/primitives/checkbox/__workshop__/props.tsx +0 -33
- package/src/core/primitives/checkbox/__workshop__/readOnly.tsx +0 -16
- package/src/core/primitives/checkbox/__workshop__/tones.tsx +0 -28
- package/src/core/primitives/checkbox/checkbox.tsx +0 -73
- package/src/core/primitives/checkbox/index.ts +0 -1
- package/src/core/primitives/checkbox/styles.ts +0 -128
- package/src/core/primitives/code/__workshop__/index.ts +0 -19
- package/src/core/primitives/code/__workshop__/opticalAlignment.tsx +0 -48
- package/src/core/primitives/code/__workshop__/props.tsx +0 -21
- package/src/core/primitives/code/code.tsx +0 -55
- package/src/core/primitives/code/index.ts +0 -1
- package/src/core/primitives/code/refractor.tsx +0 -20
- package/src/core/primitives/code/styles.ts +0 -77
- package/src/core/primitives/container/__workshop__/example.tsx +0 -20
- package/src/core/primitives/container/__workshop__/index.ts +0 -8
- package/src/core/primitives/container/container.tsx +0 -54
- package/src/core/primitives/container/index.ts +0 -2
- package/src/core/primitives/container/styles.ts +0 -23
- package/src/core/primitives/container/types.ts +0 -6
- package/src/core/primitives/flex/__workshop__/example.tsx +0 -34
- package/src/core/primitives/flex/__workshop__/gap.tsx +0 -25
- package/src/core/primitives/flex/__workshop__/index.ts +0 -11
- package/src/core/primitives/flex/flex.tsx +0 -64
- package/src/core/primitives/flex/index.ts +0 -1
- package/src/core/primitives/grid/__workshop__/index.ts +0 -10
- package/src/core/primitives/grid/__workshop__/responsive.tsx +0 -54
- package/src/core/primitives/grid/grid.test.tsx +0 -80
- package/src/core/primitives/grid/grid.tsx +0 -74
- package/src/core/primitives/grid/index.ts +0 -1
- package/src/core/primitives/heading/__workshop__/index.ts +0 -19
- package/src/core/primitives/heading/__workshop__/opticalAlignment.tsx +0 -54
- package/src/core/primitives/heading/__workshop__/plain.tsx +0 -32
- package/src/core/primitives/heading/heading.tsx +0 -88
- package/src/core/primitives/heading/index.ts +0 -1
- package/src/core/primitives/heading/styles.ts +0 -64
- package/src/core/primitives/heading/types.ts +0 -7
- package/src/core/primitives/index.ts +0 -27
- package/src/core/primitives/inline/__workshop__/index.ts +0 -8
- package/src/core/primitives/inline/__workshop__/plain.tsx +0 -27
- package/src/core/primitives/inline/index.ts +0 -1
- package/src/core/primitives/inline/inline.test.tsx +0 -51
- package/src/core/primitives/inline/inline.tsx +0 -63
- package/src/core/primitives/inline/styles.ts +0 -32
- package/src/core/primitives/inline/types.ts +0 -6
- package/src/core/primitives/kbd/__workshop__/index.ts +0 -8
- package/src/core/primitives/kbd/__workshop__/plain.tsx +0 -9
- package/src/core/primitives/kbd/index.ts +0 -1
- package/src/core/primitives/kbd/kbd.tsx +0 -69
- package/src/core/primitives/label/__workshop__/index.ts +0 -19
- package/src/core/primitives/label/__workshop__/opticalAlignment.tsx +0 -48
- package/src/core/primitives/label/__workshop__/plain.tsx +0 -24
- package/src/core/primitives/label/index.ts +0 -1
- package/src/core/primitives/label/label.tsx +0 -87
- package/src/core/primitives/label/styles.ts +0 -45
- package/src/core/primitives/popover/__workshop__/AlignedStory.tsx +0 -77
- package/src/core/primitives/popover/__workshop__/MarginsStory.tsx +0 -31
- package/src/core/primitives/popover/__workshop__/MatchReferenceWidthStory.tsx +0 -32
- package/src/core/primitives/popover/__workshop__/OpenOnMountStory.tsx +0 -11
- package/src/core/primitives/popover/__workshop__/PlainStory.tsx +0 -71
- package/src/core/primitives/popover/__workshop__/RecursiveStory.tsx +0 -71
- package/src/core/primitives/popover/__workshop__/SidePanelStory.tsx +0 -89
- package/src/core/primitives/popover/__workshop__/TestStory.tsx +0 -97
- package/src/core/primitives/popover/__workshop__/index.ts +0 -49
- package/src/core/primitives/popover/constants.ts +0 -22
- package/src/core/primitives/popover/floating-ui/size.ts +0 -99
- package/src/core/primitives/popover/helpers.ts +0 -31
- package/src/core/primitives/popover/index.ts +0 -2
- package/src/core/primitives/popover/popover.tsx +0 -511
- package/src/core/primitives/popover/popoverCard.tsx +0 -166
- package/src/core/primitives/popover/types.ts +0 -7
- package/src/core/primitives/radio/__workshop__/example.tsx +0 -63
- package/src/core/primitives/radio/__workshop__/index.ts +0 -11
- package/src/core/primitives/radio/__workshop__/plain.tsx +0 -28
- package/src/core/primitives/radio/index.ts +0 -1
- package/src/core/primitives/radio/radio.tsx +0 -51
- package/src/core/primitives/radio/styles.ts +0 -117
- package/src/core/primitives/select/__workshop__/index.ts +0 -11
- package/src/core/primitives/select/__workshop__/plain.tsx +0 -27
- package/src/core/primitives/select/__workshop__/readOnly.tsx +0 -23
- package/src/core/primitives/select/index.ts +0 -1
- package/src/core/primitives/select/select.test.tsx +0 -52
- package/src/core/primitives/select/select.tsx +0 -94
- package/src/core/primitives/select/styles.ts +0 -166
- package/src/core/primitives/spinner/__workshop__/Props.tsx +0 -15
- package/src/core/primitives/spinner/__workshop__/index.ts +0 -14
- package/src/core/primitives/spinner/index.ts +0 -1
- package/src/core/primitives/spinner/spinner.tsx +0 -46
- package/src/core/primitives/stack/__workshop__/index.ts +0 -14
- package/src/core/primitives/stack/__workshop__/plain.tsx +0 -32
- package/src/core/primitives/stack/index.ts +0 -1
- package/src/core/primitives/stack/stack.test.tsx +0 -57
- package/src/core/primitives/stack/stack.tsx +0 -57
- package/src/core/primitives/stack/styles.ts +0 -32
- package/src/core/primitives/switch/__workshop__/example.tsx +0 -23
- package/src/core/primitives/switch/__workshop__/index.ts +0 -11
- package/src/core/primitives/switch/__workshop__/props.tsx +0 -21
- package/src/core/primitives/switch/index.ts +0 -1
- package/src/core/primitives/switch/styles.ts +0 -173
- package/src/core/primitives/switch/switch.tsx +0 -68
- package/src/core/primitives/text/__workshop__/colored.tsx +0 -30
- package/src/core/primitives/text/__workshop__/example.tsx +0 -39
- package/src/core/primitives/text/__workshop__/index.ts +0 -24
- package/src/core/primitives/text/__workshop__/opticalAlignment.tsx +0 -48
- package/src/core/primitives/text/index.ts +0 -1
- package/src/core/primitives/text/styles.ts +0 -74
- package/src/core/primitives/text/text.tsx +0 -89
- package/src/core/primitives/textArea/__workshop__/index.ts +0 -14
- package/src/core/primitives/textArea/__workshop__/plain.tsx +0 -50
- package/src/core/primitives/textArea/index.ts +0 -1
- package/src/core/primitives/textArea/textArea.tsx +0 -120
- package/src/core/primitives/textInput/__workshop__/clearButton.tsx +0 -30
- package/src/core/primitives/textInput/__workshop__/customValidity.tsx +0 -17
- package/src/core/primitives/textInput/__workshop__/index.ts +0 -44
- package/src/core/primitives/textInput/__workshop__/plain.tsx +0 -98
- package/src/core/primitives/textInput/__workshop__/readOnly.tsx +0 -9
- package/src/core/primitives/textInput/__workshop__/states.tsx +0 -53
- package/src/core/primitives/textInput/__workshop__/tones.tsx +0 -277
- package/src/core/primitives/textInput/__workshop__/typed.tsx +0 -23
- package/src/core/primitives/textInput/index.ts +0 -1
- package/src/core/primitives/textInput/textInput.test.tsx +0 -48
- package/src/core/primitives/textInput/textInput.tsx +0 -395
- package/src/core/primitives/tooltip/__workshop__/customPortal.tsx +0 -102
- package/src/core/primitives/tooltip/__workshop__/index.ts +0 -29
- package/src/core/primitives/tooltip/__workshop__/overflowingBoundary.tsx +0 -74
- package/src/core/primitives/tooltip/__workshop__/props.tsx +0 -107
- package/src/core/primitives/tooltip/__workshop__/resizableBoundary.tsx +0 -86
- package/src/core/primitives/tooltip/constants.ts +0 -23
- package/src/core/primitives/tooltip/index.ts +0 -2
- package/src/core/primitives/tooltip/tooltip.test.tsx +0 -452
- package/src/core/primitives/tooltip/tooltip.tsx +0 -495
- package/src/core/primitives/tooltip/tooltipCard.tsx +0 -109
- package/src/core/primitives/tooltip/tooltipDelayGroup/index.ts +0 -4
- package/src/core/primitives/tooltip/tooltipDelayGroup/tooltipDelayGroupContext.tsx +0 -11
- package/src/core/primitives/tooltip/tooltipDelayGroup/tooltipDelayGroupProvider.tsx +0 -57
- package/src/core/primitives/tooltip/tooltipDelayGroup/types.ts +0 -10
- package/src/core/primitives/tooltip/tooltipDelayGroup/useTooltipDelayGroup.ts +0 -13
- package/src/core/primitives/types.ts +0 -179
- package/src/core/styles/border/borderStyle.ts +0 -56
- package/src/core/styles/border/index.ts +0 -2
- package/src/core/styles/border/types.ts +0 -10
- package/src/core/styles/box/boxStyle.ts +0 -69
- package/src/core/styles/box/index.ts +0 -2
- package/src/core/styles/box/types.ts +0 -11
- package/src/core/styles/card/_cardColorStyle.ts +0 -108
- package/src/core/styles/card/index.ts +0 -1
- package/src/core/styles/flex/flexItemStyle.ts +0 -27
- package/src/core/styles/flex/flexStyle.ts +0 -70
- package/src/core/styles/flex/index.ts +0 -3
- package/src/core/styles/flex/types.ts +0 -25
- package/src/core/styles/focusRing/index.ts +0 -25
- package/src/core/styles/font/codeFontStyle.ts +0 -13
- package/src/core/styles/font/headingFontStyle.ts +0 -13
- package/src/core/styles/font/index.ts +0 -6
- package/src/core/styles/font/labelFontStyle.ts +0 -13
- package/src/core/styles/font/responsiveFont.ts +0 -103
- package/src/core/styles/font/textAlignStyle.ts +0 -19
- package/src/core/styles/font/textFontStyle.ts +0 -13
- package/src/core/styles/font/types.ts +0 -35
- package/src/core/styles/grid/gridItemStyle.ts +0 -82
- package/src/core/styles/grid/gridStyle.ts +0 -108
- package/src/core/styles/grid/index.ts +0 -3
- package/src/core/styles/grid/types.ts +0 -37
- package/src/core/styles/helpers.ts +0 -72
- package/src/core/styles/index.ts +0 -5
- package/src/core/styles/input/index.ts +0 -2
- package/src/core/styles/input/responsiveInputPaddingStyle.ts +0 -78
- package/src/core/styles/input/textInputStyle.ts +0 -263
- package/src/core/styles/internal.ts +0 -12
- package/src/core/styles/margin/index.ts +0 -2
- package/src/core/styles/margin/marginStyle.ts +0 -21
- package/src/core/styles/margin/marginsStyle.test.ts +0 -33
- package/src/core/styles/margin/types.ts +0 -9
- package/src/core/styles/padding/index.ts +0 -2
- package/src/core/styles/padding/paddingStyle.test.ts +0 -33
- package/src/core/styles/padding/paddingStyle.ts +0 -21
- package/src/core/styles/padding/types.ts +0 -12
- package/src/core/styles/radius/index.ts +0 -2
- package/src/core/styles/radius/radiusStyle.ts +0 -23
- package/src/core/styles/radius/types.ts +0 -8
- package/src/core/styles/shadow/index.ts +0 -2
- package/src/core/styles/shadow/shadowStyle.ts +0 -29
- package/src/core/styles/shadow/types.ts +0 -6
- package/src/core/styles/types.ts +0 -8
- package/src/core/theme/__workshop__/build/Root.tsx +0 -367
- package/src/core/theme/__workshop__/build/helpers.ts +0 -46
- package/src/core/theme/__workshop__/build/story.tsx +0 -465
- package/src/core/theme/__workshop__/canvas.tsx +0 -352
- package/src/core/theme/__workshop__/color.tsx +0 -62
- package/src/core/theme/__workshop__/debug/story.tsx +0 -408
- package/src/core/theme/__workshop__/index.ts +0 -39
- package/src/core/theme/__workshop__/layer.tsx +0 -78
- package/src/core/theme/__workshop__/nestedProvider.tsx +0 -15
- package/src/core/theme/index.ts +0 -5
- package/src/core/theme/theme.test.tsx +0 -73
- package/src/core/theme/themeColorProvider.tsx +0 -29
- package/src/core/theme/themeContext.ts +0 -10
- package/src/core/theme/themeProvider.tsx +0 -62
- package/src/core/theme/types.ts +0 -12
- package/src/core/theme/useRootTheme.ts +0 -17
- package/src/core/theme/useTheme.ts +0 -16
- package/src/core/types/avatar.ts +0 -14
- package/src/core/types/badge.ts +0 -12
- package/src/core/types/box.ts +0 -19
- package/src/core/types/button.ts +0 -21
- package/src/core/types/card.ts +0 -6
- package/src/core/types/component.ts +0 -32
- package/src/core/types/dialog.ts +0 -4
- package/src/core/types/flex.ts +0 -30
- package/src/core/types/grid.ts +0 -14
- package/src/core/types/gridItem.ts +0 -29
- package/src/core/types/index.ts +0 -15
- package/src/core/types/placement.ts +0 -18
- package/src/core/types/popover.ts +0 -4
- package/src/core/types/radius.ts +0 -4
- package/src/core/types/selectable.ts +0 -6
- package/src/core/types/text.ts +0 -4
- package/src/core/utils/arrow/arrow.tsx +0 -123
- package/src/core/utils/arrow/cmds.ts +0 -91
- package/src/core/utils/arrow/index.ts +0 -1
- package/src/core/utils/boundaryElement/__workshop__/index.ts +0 -14
- package/src/core/utils/boundaryElement/__workshop__/plain.tsx +0 -19
- package/src/core/utils/boundaryElement/boundaryElement.test.tsx +0 -100
- package/src/core/utils/boundaryElement/boundaryElementContext.ts +0 -7
- package/src/core/utils/boundaryElement/boundaryElementProvider.tsx +0 -24
- package/src/core/utils/boundaryElement/index.ts +0 -3
- package/src/core/utils/boundaryElement/types.ts +0 -7
- package/src/core/utils/boundaryElement/useBoundaryElement.ts +0 -26
- package/src/core/utils/conditionalWrapper/conditionalWrapper.tsx +0 -21
- package/src/core/utils/conditionalWrapper/index.ts +0 -1
- package/src/core/utils/elementQuery/__workshop__/customMedia.tsx +0 -30
- package/src/core/utils/elementQuery/__workshop__/index.ts +0 -14
- package/src/core/utils/elementQuery/elementQuery.tsx +0 -53
- package/src/core/utils/elementQuery/helpers.ts +0 -27
- package/src/core/utils/elementQuery/index.ts +0 -1
- package/src/core/utils/errorBoundary.tsx +0 -48
- package/src/core/utils/getElementRef.ts +0 -26
- package/src/core/utils/index.ts +0 -9
- package/src/core/utils/layer/__workshop__/_debug.tsx +0 -17
- package/src/core/utils/layer/__workshop__/index.ts +0 -24
- package/src/core/utils/layer/__workshop__/multipleRoots.tsx +0 -49
- package/src/core/utils/layer/__workshop__/nested.tsx +0 -98
- package/src/core/utils/layer/__workshop__/responsiveZOffset.tsx +0 -13
- package/src/core/utils/layer/getLayerContext.test.ts +0 -30
- package/src/core/utils/layer/getLayerContext.ts +0 -21
- package/src/core/utils/layer/index.ts +0 -4
- package/src/core/utils/layer/layer.test.tsx +0 -108
- package/src/core/utils/layer/layer.tsx +0 -98
- package/src/core/utils/layer/layerContext.ts +0 -7
- package/src/core/utils/layer/layerProvider.tsx +0 -111
- package/src/core/utils/layer/types.ts +0 -9
- package/src/core/utils/layer/useLayer.ts +0 -26
- package/src/core/utils/portal/__workshop__/index.ts +0 -14
- package/src/core/utils/portal/__workshop__/named.tsx +0 -63
- package/src/core/utils/portal/index.ts +0 -4
- package/src/core/utils/portal/portal.test.tsx +0 -103
- package/src/core/utils/portal/portal.ts +0 -32
- package/src/core/utils/portal/portalContext.ts +0 -31
- package/src/core/utils/portal/portalProvider.tsx +0 -47
- package/src/core/utils/portal/types.ts +0 -9
- package/src/core/utils/portal/usePortal.ts +0 -25
- package/src/core/utils/spanWithTextOverflow.tsx +0 -10
- package/src/core/utils/srOnly/index.ts +0 -1
- package/src/core/utils/srOnly/srOnly.tsx +0 -36
- package/src/core/utils/virtualList/__workshop__/changingProps.tsx +0 -36
- package/src/core/utils/virtualList/__workshop__/elementScroll.tsx +0 -24
- package/src/core/utils/virtualList/__workshop__/index.ts +0 -29
- package/src/core/utils/virtualList/__workshop__/infiniteList.tsx +0 -48
- package/src/core/utils/virtualList/__workshop__/windowScrolll.tsx +0 -22
- package/src/core/utils/virtualList/index.ts +0 -1
- package/src/core/utils/virtualList/virtualList.tsx +0 -200
- package/src/theme/build/_deprecated/color/_selectable/createSelectableTones.ts +0 -76
- package/src/theme/build/_deprecated/color/_solid/createSolidTones.ts +0 -54
- package/src/theme/build/_deprecated/color/button/createButtonModes.ts +0 -22
- package/src/theme/build/_deprecated/color/button/createButtonTones.ts +0 -55
- package/src/theme/build/_deprecated/color/card/createCardStates.ts +0 -60
- package/src/theme/build/_deprecated/color/color.test.ts +0 -63
- package/src/theme/build/_deprecated/color/defaults.ts +0 -390
- package/src/theme/build/_deprecated/color/factory.ts +0 -142
- package/src/theme/build/_deprecated/color/index.ts +0 -1
- package/src/theme/build/_deprecated/color/input/createInputModes.ts +0 -81
- package/src/theme/build/_deprecated/color/muted/createMuted.ts +0 -54
- package/src/theme/build/_deprecated/color/spot/createSpot.ts +0 -20
- package/src/theme/build/buildColorTheme.test.ts +0 -183
- package/src/theme/build/buildColorTheme.ts +0 -499
- package/src/theme/build/buildTheme.test.ts +0 -87
- package/src/theme/build/buildTheme.ts +0 -36
- package/src/theme/build/colorToken/colorToken.ts +0 -19
- package/src/theme/build/colorToken/compileColorToken.ts +0 -21
- package/src/theme/build/colorToken/index.ts +0 -2
- package/src/theme/build/colorToken/types.ts +0 -6
- package/src/theme/build/index.ts +0 -3
- package/src/theme/build/lib/color-fns/blend/index.ts +0 -3
- package/src/theme/build/lib/color-fns/blend/mix.ts +0 -21
- package/src/theme/build/lib/color-fns/blend/multiply.ts +0 -18
- package/src/theme/build/lib/color-fns/blend/screen.ts +0 -18
- package/src/theme/build/lib/color-fns/color-fns.test.ts +0 -68
- package/src/theme/build/lib/color-fns/contrastRatio.ts +0 -31
- package/src/theme/build/lib/color-fns/convert.ts +0 -150
- package/src/theme/build/lib/color-fns/index.ts +0 -6
- package/src/theme/build/lib/color-fns/parse.ts +0 -60
- package/src/theme/build/lib/color-fns/rgba.ts +0 -10
- package/src/theme/build/lib/color-fns/types.ts +0 -28
- package/src/theme/build/lib/isRecord.ts +0 -3
- package/src/theme/build/lib/lazy.ts +0 -30
- package/src/theme/build/lib/utils.ts +0 -19
- package/src/theme/build/merge.ts +0 -26
- package/src/theme/build/mixThemeColor.test.ts +0 -21
- package/src/theme/build/mixThemeColor.ts +0 -53
- package/src/theme/build/renderColorTheme.ts +0 -532
- package/src/theme/build/renderColorValue.ts +0 -85
- package/src/theme/build/resolveColorTokens.ts +0 -268
- package/src/theme/build/theme.test.ts +0 -27
- package/src/theme/config/helpers.ts +0 -55
- package/src/theme/config/index.ts +0 -4
- package/src/theme/config/system.ts +0 -115
- package/src/theme/config/tokens/color/index.ts +0 -1
- package/src/theme/config/tokens/color/types.ts +0 -133
- package/src/theme/config/tokens/index.ts +0 -4
- package/src/theme/config/tokens/parseTokenKey.test.ts +0 -64
- package/src/theme/config/tokens/parseTokenKey.ts +0 -67
- package/src/theme/config/tokens/parseTokenValue.test.ts +0 -42
- package/src/theme/config/tokens/parseTokenValue.ts +0 -133
- package/src/theme/config/tokens/types.ts +0 -53
- package/src/theme/config/types.ts +0 -46
- package/src/theme/defaults/colorPalette.ts +0 -5
- package/src/theme/defaults/colorTokens.ts +0 -648
- package/src/theme/defaults/config.ts +0 -84
- package/src/theme/defaults/fonts.ts +0 -227
- package/src/theme/getScopedTheme.ts +0 -98
- package/src/theme/index.ts +0 -5
- package/src/theme/system/avatar.ts +0 -14
- package/src/theme/system/color/_constants.ts +0 -45
- package/src/theme/system/color/_helpers.ts +0 -24
- package/src/theme/system/color/_system.ts +0 -40
- package/src/theme/system/color/avatar.ts +0 -15
- package/src/theme/system/color/badge.ts +0 -16
- package/src/theme/system/color/button.ts +0 -17
- package/src/theme/system/color/color.ts +0 -34
- package/src/theme/system/color/index.ts +0 -13
- package/src/theme/system/color/input.ts +0 -25
- package/src/theme/system/color/kbd.ts +0 -8
- package/src/theme/system/color/selectable.ts +0 -12
- package/src/theme/system/color/shadow.ts +0 -7
- package/src/theme/system/color/state.ts +0 -43
- package/src/theme/system/color/syntax.ts +0 -41
- package/src/theme/system/css.ts +0 -14
- package/src/theme/system/focusRing.ts +0 -7
- package/src/theme/system/font.ts +0 -52
- package/src/theme/system/index.ts +0 -11
- package/src/theme/system/input.ts +0 -33
- package/src/theme/system/layer.ts +0 -8
- package/src/theme/system/shadow.ts +0 -19
- package/src/theme/system/styles.ts +0 -13
- package/src/theme/system/theme.ts +0 -138
- package/src/theme/system/v0/avatar.ts +0 -10
- package/src/theme/system/v0/color/_generic.ts +0 -35
- package/src/theme/system/v0/color/_system.ts +0 -17
- package/src/theme/system/v0/color/base.ts +0 -21
- package/src/theme/system/v0/color/button.ts +0 -42
- package/src/theme/system/v0/color/card.ts +0 -19
- package/src/theme/system/v0/color/color.ts +0 -40
- package/src/theme/system/v0/color/index.ts +0 -11
- package/src/theme/system/v0/color/input.ts +0 -34
- package/src/theme/system/v0/color/muted.ts +0 -26
- package/src/theme/system/v0/color/selectable.ts +0 -31
- package/src/theme/system/v0/color/solid.ts +0 -26
- package/src/theme/system/v0/color/spot.ts +0 -13
- package/src/theme/system/v0/index.ts +0 -3
- package/src/theme/system/v0/input.ts +0 -23
- package/src/theme/versioning/getTheme_v2.ts +0 -57
- package/src/theme/versioning/index.ts +0 -5
- package/src/theme/versioning/is_v0.ts +0 -6
- package/src/theme/versioning/is_v2.ts +0 -6
- package/src/theme/versioning/themeColor_v0_v2.ts +0 -243
- package/src/theme/versioning/themeColor_v2_v2_9.ts +0 -49
- package/src/theme/versioning/v0_v2.ts +0 -94
- package/src/theme/versioning/v2_v0.ts +0 -135
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { IconAdjustments, IconAlertTriangle, IconAppWindow, IconArrowRight, IconArrowUpRight, IconAward, IconBadge, IconBolt, IconBook, IconBookmark, IconBox, IconBrandInstagram, IconBrandYoutube, IconBriefcase, IconBuildingStore, IconBulb, IconCalendar, IconCamera, IconCampfire, IconCards, IconCategory, IconChartBar, IconChartPie, IconCheck, IconChefHat, IconCircleCheck, IconClick, IconClipboardList, IconClock, IconCloud, IconCode, IconColumns2, IconColumns3, IconCompass, IconCreditCard, IconCurrencyDollar, IconCursorText, IconDeviceMobile, IconDiamond, IconDownload, IconFeather, IconFile, IconFileText, IconFilter, IconFlag, IconFlame, IconFolder, IconForms, IconGift, IconGlobe, IconHeart, IconHelpCircle, IconHome, IconInfoCircle, IconKey, IconLayoutBottombar, IconLayoutCards, IconLayoutColumns, IconLayoutDashboard, IconLayoutGrid, IconLayoutList, IconLayoutNavbar, IconLayoutSidebar, IconLeaf, IconLibraryPhoto, IconLink, IconList, IconListDetails, IconLock, IconMail, IconMap, IconMapPin, IconMenu2, IconMessage, IconMessage2, IconMoon, IconMountain, IconMovie, IconNews, IconPackage, IconPalette, IconPhoto, IconPlayerPlay, IconPlug, IconPresentation, IconPuzzle, IconQuote, IconRecycle, IconRocket, IconRuler, IconSearch, IconSection, IconSeo, IconSettings, IconShieldCheck, IconShoppingBag, IconShoppingCart, IconSparkles, IconSpeakerphone, IconSquareRoundedPlus, IconStack2, IconStar, IconSun, IconTable, IconTag, IconTags, IconTarget, IconTemplate, IconTent, IconToggleLeft, IconTool, IconTools, IconTruck, IconTypography, IconUser, IconUsers, IconUsersGroup, IconVideo, IconWorld } from "@tabler/icons-react";
|
|
3
|
+
//#region src/lib/icons.tsx
|
|
4
|
+
/**
|
|
5
|
+
* Icon names in schemas are kebab-case Tabler names ("help-circle", "layout-grid"). Catalog data still
|
|
6
|
+
* carries lucide-style names ("CircleHelp", "LayoutGrid"); `kitIcon()` resolves both.
|
|
7
|
+
* The curated set doubles as the icon picker's library (explicit imports keep the bundle small).
|
|
8
|
+
*/
|
|
9
|
+
var KIT_ICONS = {
|
|
10
|
+
"alert-triangle": IconAlertTriangle,
|
|
11
|
+
"app-window": IconAppWindow,
|
|
12
|
+
"arrow-right": IconArrowRight,
|
|
13
|
+
"arrow-up-right": IconArrowUpRight,
|
|
14
|
+
award: IconAward,
|
|
15
|
+
badge: IconBadge,
|
|
16
|
+
bolt: IconBolt,
|
|
17
|
+
book: IconBook,
|
|
18
|
+
bookmark: IconBookmark,
|
|
19
|
+
box: IconBox,
|
|
20
|
+
instagram: IconBrandInstagram,
|
|
21
|
+
briefcase: IconBriefcase,
|
|
22
|
+
store: IconBuildingStore,
|
|
23
|
+
bulb: IconBulb,
|
|
24
|
+
calendar: IconCalendar,
|
|
25
|
+
camera: IconCamera,
|
|
26
|
+
campfire: IconCampfire,
|
|
27
|
+
cards: IconCards,
|
|
28
|
+
"chart-bar": IconChartBar,
|
|
29
|
+
"chart-pie": IconChartPie,
|
|
30
|
+
check: IconCheck,
|
|
31
|
+
"chef-hat": IconChefHat,
|
|
32
|
+
"circle-check": IconCircleCheck,
|
|
33
|
+
click: IconClick,
|
|
34
|
+
clock: IconClock,
|
|
35
|
+
cloud: IconCloud,
|
|
36
|
+
code: IconCode,
|
|
37
|
+
"columns-2": IconColumns2,
|
|
38
|
+
"columns-3": IconColumns3,
|
|
39
|
+
compass: IconCompass,
|
|
40
|
+
"credit-card": IconCreditCard,
|
|
41
|
+
"currency-dollar": IconCurrencyDollar,
|
|
42
|
+
"device-mobile": IconDeviceMobile,
|
|
43
|
+
diamond: IconDiamond,
|
|
44
|
+
download: IconDownload,
|
|
45
|
+
feather: IconFeather,
|
|
46
|
+
file: IconFile,
|
|
47
|
+
"file-text": IconFileText,
|
|
48
|
+
filter: IconFilter,
|
|
49
|
+
flag: IconFlag,
|
|
50
|
+
flame: IconFlame,
|
|
51
|
+
forms: IconForms,
|
|
52
|
+
gift: IconGift,
|
|
53
|
+
globe: IconGlobe,
|
|
54
|
+
heart: IconHeart,
|
|
55
|
+
"help-circle": IconHelpCircle,
|
|
56
|
+
home: IconHome,
|
|
57
|
+
"info-circle": IconInfoCircle,
|
|
58
|
+
key: IconKey,
|
|
59
|
+
"layout-bottombar": IconLayoutBottombar,
|
|
60
|
+
"layout-cards": IconLayoutCards,
|
|
61
|
+
"layout-grid": IconLayoutGrid,
|
|
62
|
+
"layout-navbar": IconLayoutNavbar,
|
|
63
|
+
"layout-sidebar": IconLayoutSidebar,
|
|
64
|
+
"layout-list": IconLayoutList,
|
|
65
|
+
leaf: IconLeaf,
|
|
66
|
+
"library-photo": IconLibraryPhoto,
|
|
67
|
+
link: IconLink,
|
|
68
|
+
list: IconList,
|
|
69
|
+
"list-details": IconListDetails,
|
|
70
|
+
lock: IconLock,
|
|
71
|
+
mail: IconMail,
|
|
72
|
+
map: IconMap,
|
|
73
|
+
"map-pin": IconMapPin,
|
|
74
|
+
menu: IconMenu2,
|
|
75
|
+
message: IconMessage,
|
|
76
|
+
"message-2": IconMessage2,
|
|
77
|
+
moon: IconMoon,
|
|
78
|
+
mountain: IconMountain,
|
|
79
|
+
movie: IconMovie,
|
|
80
|
+
news: IconNews,
|
|
81
|
+
package: IconPackage,
|
|
82
|
+
palette: IconPalette,
|
|
83
|
+
photo: IconPhoto,
|
|
84
|
+
"player-play": IconPlayerPlay,
|
|
85
|
+
plug: IconPlug,
|
|
86
|
+
presentation: IconPresentation,
|
|
87
|
+
puzzle: IconPuzzle,
|
|
88
|
+
quote: IconQuote,
|
|
89
|
+
recycle: IconRecycle,
|
|
90
|
+
rocket: IconRocket,
|
|
91
|
+
ruler: IconRuler,
|
|
92
|
+
search: IconSearch,
|
|
93
|
+
seo: IconSeo,
|
|
94
|
+
settings: IconSettings,
|
|
95
|
+
"shield-check": IconShieldCheck,
|
|
96
|
+
"shopping-bag": IconShoppingBag,
|
|
97
|
+
"shopping-cart": IconShoppingCart,
|
|
98
|
+
sparkles: IconSparkles,
|
|
99
|
+
speakerphone: IconSpeakerphone,
|
|
100
|
+
stack: IconStack2,
|
|
101
|
+
star: IconStar,
|
|
102
|
+
sun: IconSun,
|
|
103
|
+
table: IconTable,
|
|
104
|
+
tag: IconTag,
|
|
105
|
+
tags: IconTags,
|
|
106
|
+
target: IconTarget,
|
|
107
|
+
template: IconTemplate,
|
|
108
|
+
tent: IconTent,
|
|
109
|
+
tool: IconTool,
|
|
110
|
+
tools: IconTools,
|
|
111
|
+
truck: IconTruck,
|
|
112
|
+
typography: IconTypography,
|
|
113
|
+
user: IconUser,
|
|
114
|
+
users: IconUsers,
|
|
115
|
+
"users-group": IconUsersGroup,
|
|
116
|
+
video: IconVideo,
|
|
117
|
+
world: IconWorld,
|
|
118
|
+
"square-plus": IconSquareRoundedPlus,
|
|
119
|
+
"layout-dashboard": IconLayoutDashboard,
|
|
120
|
+
adjustments: IconAdjustments,
|
|
121
|
+
"layout-columns": IconLayoutColumns,
|
|
122
|
+
section: IconSection,
|
|
123
|
+
category: IconCategory,
|
|
124
|
+
toggle: IconToggleLeft,
|
|
125
|
+
"cursor-text": IconCursorText,
|
|
126
|
+
youtube: IconBrandYoutube,
|
|
127
|
+
folder: IconFolder,
|
|
128
|
+
"clipboard-list": IconClipboardList
|
|
129
|
+
};
|
|
130
|
+
/** lucide-style names used by seed/catalog data → our kebab keys. */
|
|
131
|
+
var ALIASES = {
|
|
132
|
+
"circle-help": "help-circle",
|
|
133
|
+
megaphone: "speakerphone",
|
|
134
|
+
"panel-top": "layout-navbar",
|
|
135
|
+
"panel-bottom": "layout-bottombar",
|
|
136
|
+
"layout-template": "template",
|
|
137
|
+
"bar-chart-3": "chart-bar",
|
|
138
|
+
"badge-dollar-sign": "currency-dollar",
|
|
139
|
+
newspaper: "news",
|
|
140
|
+
"mouse-pointer-click": "click",
|
|
141
|
+
images: "library-photo",
|
|
142
|
+
"message-square-text": "message-2",
|
|
143
|
+
type: "typography",
|
|
144
|
+
"shield-check": "shield-check",
|
|
145
|
+
"shopping-bag": "shopping-bag",
|
|
146
|
+
"columns-2": "columns-2",
|
|
147
|
+
"layout-grid": "layout-grid",
|
|
148
|
+
"help-circle": "help-circle",
|
|
149
|
+
sparkle: "sparkles"
|
|
150
|
+
};
|
|
151
|
+
var kebab = (s) => s.replace(/^Icon/, "").replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/([A-Z])([A-Z][a-z])/g, "$1-$2").replace(/[_\s]+/g, "-").toLowerCase();
|
|
152
|
+
function iconKey(name) {
|
|
153
|
+
if (!name) return void 0;
|
|
154
|
+
const k = kebab(name);
|
|
155
|
+
if (KIT_ICONS[k]) return k;
|
|
156
|
+
const a = ALIASES[k];
|
|
157
|
+
return a && KIT_ICONS[a] ? a : void 0;
|
|
158
|
+
}
|
|
159
|
+
/** Render a schema icon by name. Falls back to `fallback` (default: a neutral square). */
|
|
160
|
+
function KitIcon({ name, className, fallback = "box" }) {
|
|
161
|
+
const I = KIT_ICONS[iconKey(name) ?? fallback] ?? IconBox;
|
|
162
|
+
return /* @__PURE__ */ jsx(I, {
|
|
163
|
+
className,
|
|
164
|
+
stroke: 1.5,
|
|
165
|
+
"aria-hidden": true
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
/** Human label for an icon key: "help-circle" → "Help circle". */
|
|
169
|
+
var iconLabel = (k) => (k.charAt(0).toUpperCase() + k.slice(1)).replace(/-/g, " ");
|
|
170
|
+
//#endregion
|
|
171
|
+
export { KIT_ICONS, KitIcon, iconKey, iconLabel };
|
|
172
|
+
|
|
173
|
+
//# sourceMappingURL=icons.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icons.js","names":[],"sources":["../../src/lib/icons.tsx"],"sourcesContent":["/**\n * Icon names in schemas are kebab-case Tabler names (\"help-circle\", \"layout-grid\"). Catalog data still\n * carries lucide-style names (\"CircleHelp\", \"LayoutGrid\"); `kitIcon()` resolves both.\n * The curated set doubles as the icon picker's library (explicit imports keep the bundle small).\n */\nimport {\n IconAlertTriangle, IconAppWindow, IconArrowRight, IconArrowUpRight, IconAward, IconBadge, IconBolt, IconBook, IconBookmark,\n IconBox, IconBrandInstagram, IconBriefcase, IconBuildingStore, IconBulb, IconCalendar, IconCamera, IconCampfire, IconCards,\n IconChartBar, IconChartPie, IconCheck, IconChefHat, IconCircleCheck, IconClick, IconClock, IconCloud, IconCode, IconColumns2,\n IconColumns3, IconCompass, IconCreditCard, IconCurrencyDollar, IconDeviceMobile, IconDiamond, IconDownload, IconFeather,\n IconFile, IconFileText, IconFilter, IconFlag, IconFlame, IconForms, IconGift, IconGlobe, IconHeart, IconHelpCircle, IconHome,\n IconInfoCircle, IconKey, IconLayoutBottombar, IconLayoutCards, IconLayoutGrid, IconLayoutNavbar, IconLayoutSidebar,\n IconLayoutList, IconLeaf, IconLibraryPhoto, IconLink, IconList, IconListDetails, IconLock, IconMail, IconMap, IconMapPin,\n IconMenu2, IconMessage, IconMessage2, IconMoon, IconMountain, IconMovie, IconNews, IconPackage, IconPalette, IconPhoto,\n IconPlayerPlay, IconPlug, IconPresentation, IconPuzzle, IconQuote, IconRecycle, IconRocket, IconRuler, IconSearch, IconSeo,\n IconSettings, IconShieldCheck, IconShoppingBag, IconShoppingCart, IconSparkles, IconSpeakerphone, IconStack2, IconStar,\n IconSun, IconTable, IconTag, IconTags, IconTarget, IconTemplate, IconTent, IconTool, IconTools, IconTruck, IconTypography,\n IconUser, IconUsers, IconUsersGroup, IconVideo, IconWorld, IconSquareRoundedPlus, IconLayoutDashboard, IconAdjustments,\n IconLayoutColumns, IconSection, IconCategory, IconToggleLeft, IconCursorText, IconBrandYoutube, IconFolder, IconClipboardList,\n type Icon,\n} from \"@tabler/icons-react\";\n\nexport const KIT_ICONS: Record<string, Icon> = {\n \"alert-triangle\": IconAlertTriangle, \"app-window\": IconAppWindow, \"arrow-right\": IconArrowRight, \"arrow-up-right\": IconArrowUpRight,\n award: IconAward, badge: IconBadge, bolt: IconBolt, book: IconBook, bookmark: IconBookmark, box: IconBox, instagram: IconBrandInstagram,\n briefcase: IconBriefcase, store: IconBuildingStore, bulb: IconBulb, calendar: IconCalendar, camera: IconCamera, campfire: IconCampfire,\n cards: IconCards, \"chart-bar\": IconChartBar, \"chart-pie\": IconChartPie, check: IconCheck, \"chef-hat\": IconChefHat,\n \"circle-check\": IconCircleCheck, click: IconClick, clock: IconClock, cloud: IconCloud, code: IconCode, \"columns-2\": IconColumns2,\n \"columns-3\": IconColumns3, compass: IconCompass, \"credit-card\": IconCreditCard, \"currency-dollar\": IconCurrencyDollar,\n \"device-mobile\": IconDeviceMobile, diamond: IconDiamond, download: IconDownload, feather: IconFeather, file: IconFile,\n \"file-text\": IconFileText, filter: IconFilter, flag: IconFlag, flame: IconFlame, forms: IconForms, gift: IconGift, globe: IconGlobe,\n heart: IconHeart, \"help-circle\": IconHelpCircle, home: IconHome, \"info-circle\": IconInfoCircle, key: IconKey,\n \"layout-bottombar\": IconLayoutBottombar, \"layout-cards\": IconLayoutCards, \"layout-grid\": IconLayoutGrid, \"layout-navbar\": IconLayoutNavbar,\n \"layout-sidebar\": IconLayoutSidebar, \"layout-list\": IconLayoutList, leaf: IconLeaf, \"library-photo\": IconLibraryPhoto, link: IconLink,\n list: IconList, \"list-details\": IconListDetails, lock: IconLock, mail: IconMail, map: IconMap, \"map-pin\": IconMapPin, menu: IconMenu2,\n message: IconMessage, \"message-2\": IconMessage2, moon: IconMoon, mountain: IconMountain, movie: IconMovie, news: IconNews,\n package: IconPackage, palette: IconPalette, photo: IconPhoto, \"player-play\": IconPlayerPlay, plug: IconPlug, presentation: IconPresentation,\n puzzle: IconPuzzle, quote: IconQuote, recycle: IconRecycle, rocket: IconRocket, ruler: IconRuler, search: IconSearch, seo: IconSeo,\n settings: IconSettings, \"shield-check\": IconShieldCheck, \"shopping-bag\": IconShoppingBag, \"shopping-cart\": IconShoppingCart,\n sparkles: IconSparkles, speakerphone: IconSpeakerphone, stack: IconStack2, star: IconStar, sun: IconSun, table: IconTable, tag: IconTag,\n tags: IconTags, target: IconTarget, template: IconTemplate, tent: IconTent, tool: IconTool, tools: IconTools, truck: IconTruck,\n typography: IconTypography, user: IconUser, users: IconUsers, \"users-group\": IconUsersGroup, video: IconVideo, world: IconWorld,\n \"square-plus\": IconSquareRoundedPlus, \"layout-dashboard\": IconLayoutDashboard, adjustments: IconAdjustments,\n \"layout-columns\": IconLayoutColumns, section: IconSection, category: IconCategory, toggle: IconToggleLeft, \"cursor-text\": IconCursorText,\n youtube: IconBrandYoutube, folder: IconFolder, \"clipboard-list\": IconClipboardList,\n};\n\n/** lucide-style names used by seed/catalog data → our kebab keys. */\nconst ALIASES: Record<string, string> = {\n \"circle-help\": \"help-circle\", megaphone: \"speakerphone\", \"panel-top\": \"layout-navbar\", \"panel-bottom\": \"layout-bottombar\",\n \"layout-template\": \"template\", \"bar-chart-3\": \"chart-bar\", \"badge-dollar-sign\": \"currency-dollar\", newspaper: \"news\",\n \"mouse-pointer-click\": \"click\", images: \"library-photo\", \"message-square-text\": \"message-2\", type: \"typography\",\n \"shield-check\": \"shield-check\", \"shopping-bag\": \"shopping-bag\", \"columns-2\": \"columns-2\", \"layout-grid\": \"layout-grid\",\n \"help-circle\": \"help-circle\", sparkle: \"sparkles\",\n};\n\nconst kebab = (s: string) =>\n s.replace(/^Icon/, \"\").replace(/([a-z0-9])([A-Z])/g, \"$1-$2\").replace(/([A-Z])([A-Z][a-z])/g, \"$1-$2\").replace(/[_\\s]+/g, \"-\").toLowerCase();\n\nexport function iconKey(name?: string): string | undefined {\n if (!name) return undefined;\n const k = kebab(name);\n if (KIT_ICONS[k]) return k;\n const a = ALIASES[k];\n return a && KIT_ICONS[a] ? a : undefined;\n}\n\n/** Render a schema icon by name. Falls back to `fallback` (default: a neutral square). */\nexport function KitIcon({ name, className, fallback = \"box\" }: { name?: string; className?: string; fallback?: string }) {\n const I = KIT_ICONS[iconKey(name) ?? fallback] ?? IconBox;\n return <I className={className} stroke={1.5} aria-hidden />;\n}\n\n/** Human label for an icon key: \"help-circle\" → \"Help circle\". */\nexport const iconLabel = (k: string) => (k.charAt(0).toUpperCase() + k.slice(1)).replace(/-/g, \" \");\n"],"mappings":";;;;;;;;AAsBA,IAAa,YAAkC;CAC7C,kBAAkB;CAAmB,cAAc;CAAe,eAAe;CAAgB,kBAAkB;CACnH,OAAO;CAAW,OAAO;CAAW,MAAM;CAAU,MAAM;CAAU,UAAU;CAAc,KAAK;CAAS,WAAW;CACrH,WAAW;CAAe,OAAO;CAAmB,MAAM;CAAU,UAAU;CAAc,QAAQ;CAAY,UAAU;CAC1H,OAAO;CAAW,aAAa;CAAc,aAAa;CAAc,OAAO;CAAW,YAAY;CACtG,gBAAgB;CAAiB,OAAO;CAAW,OAAO;CAAW,OAAO;CAAW,MAAM;CAAU,aAAa;CACpH,aAAa;CAAc,SAAS;CAAa,eAAe;CAAgB,mBAAmB;CACnG,iBAAiB;CAAkB,SAAS;CAAa,UAAU;CAAc,SAAS;CAAa,MAAM;CAC7G,aAAa;CAAc,QAAQ;CAAY,MAAM;CAAU,OAAO;CAAW,OAAO;CAAW,MAAM;CAAU,OAAO;CAC1H,OAAO;CAAW,eAAe;CAAgB,MAAM;CAAU,eAAe;CAAgB,KAAK;CACrG,oBAAoB;CAAqB,gBAAgB;CAAiB,eAAe;CAAgB,iBAAiB;CAC1H,kBAAkB;CAAmB,eAAe;CAAgB,MAAM;CAAU,iBAAiB;CAAkB,MAAM;CAC7H,MAAM;CAAU,gBAAgB;CAAiB,MAAM;CAAU,MAAM;CAAU,KAAK;CAAS,WAAW;CAAY,MAAM;CAC5H,SAAS;CAAa,aAAa;CAAc,MAAM;CAAU,UAAU;CAAc,OAAO;CAAW,MAAM;CACjH,SAAS;CAAa,SAAS;CAAa,OAAO;CAAW,eAAe;CAAgB,MAAM;CAAU,cAAc;CAC3H,QAAQ;CAAY,OAAO;CAAW,SAAS;CAAa,QAAQ;CAAY,OAAO;CAAW,QAAQ;CAAY,KAAK;CAC3H,UAAU;CAAc,gBAAgB;CAAiB,gBAAgB;CAAiB,iBAAiB;CAC3G,UAAU;CAAc,cAAc;CAAkB,OAAO;CAAY,MAAM;CAAU,KAAK;CAAS,OAAO;CAAW,KAAK;CAChI,MAAM;CAAU,QAAQ;CAAY,UAAU;CAAc,MAAM;CAAU,MAAM;CAAU,OAAO;CAAW,OAAO;CACrH,YAAY;CAAgB,MAAM;CAAU,OAAO;CAAW,eAAe;CAAgB,OAAO;CAAW,OAAO;CACtH,eAAe;CAAuB,oBAAoB;CAAqB,aAAa;CAC5F,kBAAkB;CAAmB,SAAS;CAAa,UAAU;CAAc,QAAQ;CAAgB,eAAe;CAC1H,SAAS;CAAkB,QAAQ;CAAY,kBAAkB;AACnE;;AAGA,IAAM,UAAkC;CACtC,eAAe;CAAe,WAAW;CAAgB,aAAa;CAAiB,gBAAgB;CACvG,mBAAmB;CAAY,eAAe;CAAa,qBAAqB;CAAmB,WAAW;CAC9G,uBAAuB;CAAS,QAAQ;CAAiB,uBAAuB;CAAa,MAAM;CACnG,gBAAgB;CAAgB,gBAAgB;CAAgB,aAAa;CAAa,eAAe;CACzG,eAAe;CAAe,SAAS;AACzC;AAEA,IAAM,SAAS,MACb,EAAE,QAAQ,SAAS,EAAE,CAAC,CAAC,QAAQ,sBAAsB,OAAO,CAAC,CAAC,QAAQ,wBAAwB,OAAO,CAAC,CAAC,QAAQ,WAAW,GAAG,CAAC,CAAC,YAAY;AAE7I,SAAgB,QAAQ,MAAmC;CACzD,IAAI,CAAC,MAAM,OAAO,KAAA;CAClB,MAAM,IAAI,MAAM,IAAI;CACpB,IAAI,UAAU,IAAI,OAAO;CACzB,MAAM,IAAI,QAAQ;CAClB,OAAO,KAAK,UAAU,KAAK,IAAI,KAAA;AACjC;;AAGA,SAAgB,QAAQ,EAAE,MAAM,WAAW,WAAW,SAAmE;CACvH,MAAM,IAAI,UAAU,QAAQ,IAAI,KAAK,aAAa;CAClD,OAAO,oBAAC,GAAD;EAAc;EAAW,QAAQ;EAAK,eAAA;CAAa,CAAA;AAC5D;;AAGA,IAAa,aAAa,OAAe,EAAE,OAAO,CAAC,CAAC,CAAC,YAAY,IAAI,EAAE,MAAM,CAAC,EAAA,CAAG,QAAQ,MAAM,GAAG"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Keyboard-only focus rings (D29, founder rule "never a dark box after a mouse click", DESIGN.md 3.7).
|
|
3
|
+
*
|
|
4
|
+
* `:focus-visible` alone isn't enough: Base UI returns focus to a trigger programmatically when a menu or popover
|
|
5
|
+
* closes, and Chrome/Safari can paint the ring there even though the user only ever used the mouse. We record the
|
|
6
|
+
* last input modality on <html data-input-modality> and the stylesheet suppresses rings while it is "pointer".
|
|
7
|
+
*/
|
|
8
|
+
export declare const NAV_KEYS: ReadonlySet<string>;
|
|
9
|
+
export type InputModality = "pointer" | "keyboard";
|
|
10
|
+
/** Starts tracking; returns a function that stops it. Safe to call during SSR (no-op). */
|
|
11
|
+
export declare function trackInputModality(): () => void;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
//#region src/lib/input-modality.ts
|
|
2
|
+
/**
|
|
3
|
+
* Keyboard-only focus rings (D29, founder rule "never a dark box after a mouse click", DESIGN.md 3.7).
|
|
4
|
+
*
|
|
5
|
+
* `:focus-visible` alone isn't enough: Base UI returns focus to a trigger programmatically when a menu or popover
|
|
6
|
+
* closes, and Chrome/Safari can paint the ring there even though the user only ever used the mouse. We record the
|
|
7
|
+
* last input modality on <html data-input-modality> and the stylesheet suppresses rings while it is "pointer".
|
|
8
|
+
*/
|
|
9
|
+
var NAV_KEYS = /* @__PURE__ */ new Set([
|
|
10
|
+
"Tab",
|
|
11
|
+
"ArrowUp",
|
|
12
|
+
"ArrowDown",
|
|
13
|
+
"ArrowLeft",
|
|
14
|
+
"ArrowRight",
|
|
15
|
+
"Enter",
|
|
16
|
+
" ",
|
|
17
|
+
"Escape",
|
|
18
|
+
"Home",
|
|
19
|
+
"End",
|
|
20
|
+
"PageUp",
|
|
21
|
+
"PageDown",
|
|
22
|
+
"F6"
|
|
23
|
+
]);
|
|
24
|
+
/** Starts tracking; returns a function that stops it. Safe to call during SSR (no-op). */
|
|
25
|
+
function trackInputModality() {
|
|
26
|
+
if (typeof document === "undefined") return () => {};
|
|
27
|
+
const root = document.documentElement;
|
|
28
|
+
const set = (m) => {
|
|
29
|
+
if (root.dataset.inputModality !== m) root.dataset.inputModality = m;
|
|
30
|
+
};
|
|
31
|
+
set("pointer");
|
|
32
|
+
const onPointer = () => set("pointer");
|
|
33
|
+
const onKey = (e) => {
|
|
34
|
+
if (e.metaKey || e.ctrlKey || e.altKey) return;
|
|
35
|
+
if (NAV_KEYS.has(e.key)) set("keyboard");
|
|
36
|
+
};
|
|
37
|
+
window.addEventListener("pointerdown", onPointer, true);
|
|
38
|
+
window.addEventListener("keydown", onKey, true);
|
|
39
|
+
return () => {
|
|
40
|
+
window.removeEventListener("pointerdown", onPointer, true);
|
|
41
|
+
window.removeEventListener("keydown", onKey, true);
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
//#endregion
|
|
45
|
+
export { NAV_KEYS, trackInputModality };
|
|
46
|
+
|
|
47
|
+
//# sourceMappingURL=input-modality.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-modality.js","names":[],"sources":["../../src/lib/input-modality.ts"],"sourcesContent":["/**\n * Keyboard-only focus rings (D29, founder rule \"never a dark box after a mouse click\", DESIGN.md 3.7).\n *\n * `:focus-visible` alone isn't enough: Base UI returns focus to a trigger programmatically when a menu or popover\n * closes, and Chrome/Safari can paint the ring there even though the user only ever used the mouse. We record the\n * last input modality on <html data-input-modality> and the stylesheet suppresses rings while it is \"pointer\".\n */\nexport const NAV_KEYS: ReadonlySet<string> = new Set([\n \"Tab\",\n \"ArrowUp\",\n \"ArrowDown\",\n \"ArrowLeft\",\n \"ArrowRight\",\n \"Enter\",\n \" \",\n \"Escape\",\n \"Home\",\n \"End\",\n \"PageUp\",\n \"PageDown\",\n \"F6\",\n]);\n\nexport type InputModality = \"pointer\" | \"keyboard\";\n\n/** Starts tracking; returns a function that stops it. Safe to call during SSR (no-op). */\nexport function trackInputModality(): () => void {\n if (typeof document === \"undefined\") return () => {};\n const root = document.documentElement;\n const set = (m: InputModality) => {\n if (root.dataset.inputModality !== m) root.dataset.inputModality = m;\n };\n set(\"pointer\");\n const onPointer = () => set(\"pointer\");\n const onKey = (e: KeyboardEvent) => {\n if (e.metaKey || e.ctrlKey || e.altKey) return;\n if (NAV_KEYS.has(e.key)) set(\"keyboard\");\n };\n window.addEventListener(\"pointerdown\", onPointer, true);\n window.addEventListener(\"keydown\", onKey, true);\n return () => {\n window.removeEventListener(\"pointerdown\", onPointer, true);\n window.removeEventListener(\"keydown\", onKey, true);\n };\n}\n"],"mappings":";;;;;;;;AAOA,IAAa,2BAAgC,IAAI,IAAI;CACnD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC;;AAKD,SAAgB,qBAAiC;CAC/C,IAAI,OAAO,aAAa,aAAa,aAAa,CAAC;CACnD,MAAM,OAAO,SAAS;CACtB,MAAM,OAAO,MAAqB;EAChC,IAAI,KAAK,QAAQ,kBAAkB,GAAG,KAAK,QAAQ,gBAAgB;CACrE;CACA,IAAI,SAAS;CACb,MAAM,kBAAkB,IAAI,SAAS;CACrC,MAAM,SAAS,MAAqB;EAClC,IAAI,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ;EACxC,IAAI,SAAS,IAAI,EAAE,GAAG,GAAG,IAAI,UAAU;CACzC;CACA,OAAO,iBAAiB,eAAe,WAAW,IAAI;CACtD,OAAO,iBAAiB,WAAW,OAAO,IAAI;CAC9C,aAAa;EACX,OAAO,oBAAoB,eAAe,WAAW,IAAI;EACzD,OAAO,oBAAoB,WAAW,OAAO,IAAI;CACnD;AACF"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The lower-cased key of a keyboard event, or `null` when the event carries none.
|
|
3
|
+
*
|
|
4
|
+
* The kit's copy of `src/lib/keyEvent.ts` (the kit imports only itself). Chrome's autofill, password
|
|
5
|
+
* managers, some IME compositions and extension-made events dispatch `keydown` with no `key`, and
|
|
6
|
+
* `e.key.toLowerCase()` threw a TypeError on each of them. A handler reads the key through this and
|
|
7
|
+
* treats `null` as "not my shortcut".
|
|
8
|
+
*/
|
|
9
|
+
export declare function eventKey(event: {
|
|
10
|
+
key?: unknown;
|
|
11
|
+
}): string | null;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
//#region src/lib/key-event.ts
|
|
2
|
+
/**
|
|
3
|
+
* The lower-cased key of a keyboard event, or `null` when the event carries none.
|
|
4
|
+
*
|
|
5
|
+
* The kit's copy of `src/lib/keyEvent.ts` (the kit imports only itself). Chrome's autofill, password
|
|
6
|
+
* managers, some IME compositions and extension-made events dispatch `keydown` with no `key`, and
|
|
7
|
+
* `e.key.toLowerCase()` threw a TypeError on each of them. A handler reads the key through this and
|
|
8
|
+
* treats `null` as "not my shortcut".
|
|
9
|
+
*/
|
|
10
|
+
function eventKey(event) {
|
|
11
|
+
return typeof event.key === "string" ? event.key.toLowerCase() : null;
|
|
12
|
+
}
|
|
13
|
+
//#endregion
|
|
14
|
+
export { eventKey };
|
|
15
|
+
|
|
16
|
+
//# sourceMappingURL=key-event.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"key-event.js","names":[],"sources":["../../src/lib/key-event.ts"],"sourcesContent":["/**\n * The lower-cased key of a keyboard event, or `null` when the event carries none.\n *\n * The kit's copy of `src/lib/keyEvent.ts` (the kit imports only itself). Chrome's autofill, password\n * managers, some IME compositions and extension-made events dispatch `keydown` with no `key`, and\n * `e.key.toLowerCase()` threw a TypeError on each of them. A handler reads the key through this and\n * treats `null` as \"not my shortcut\".\n */\nexport function eventKey(event: { key?: unknown }): string | null {\n return typeof event.key === \"string\" ? event.key.toLowerCase() : null;\n}\n"],"mappings":";;;;;;;;;AAQA,SAAgB,SAAS,OAAyC;CAChE,OAAO,OAAO,MAAM,QAAQ,WAAW,MAAM,IAAI,YAAY,IAAI;AACnE"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Immutable path helpers. A path addresses any value inside a document/block:
|
|
3
|
+
* ["items", 1, "answer"] · ["tabs", 0, "content", 2, "heading"] · ["title", "@history"]
|
|
4
|
+
* Writes share structure (only the spine is copied), so callers can diff top-level keys by identity.
|
|
5
|
+
*/
|
|
6
|
+
import type { FieldPath } from "../schema/types";
|
|
7
|
+
type Obj = Record<string, unknown>;
|
|
8
|
+
export declare const isObj: (v: unknown) => v is Obj;
|
|
9
|
+
export declare function getIn(root: unknown, path: FieldPath): unknown;
|
|
10
|
+
export declare function setIn<T>(root: T, path: FieldPath, value: unknown): T;
|
|
11
|
+
/** "items.1.answer" — stable string key for maps (issues, presence, comments, history). */
|
|
12
|
+
export declare const pathKey: (p: FieldPath) => string;
|
|
13
|
+
/**
|
|
14
|
+
* The key of a frame (AnimatePresence key, `data-frame-body`, scroll memory, crumb key): "root" for the root frame,
|
|
15
|
+
* else the path key. V2 used `pathKey(p) || "root"`, which collides when a root field is itself named `root`; that one
|
|
16
|
+
* case gets ".root", which no field path can produce (kit deviation, identical output for every other path).
|
|
17
|
+
*/
|
|
18
|
+
export declare const frameKeyOf: (p: FieldPath) => string;
|
|
19
|
+
export declare const pathEq: (a: FieldPath, b: FieldPath) => boolean;
|
|
20
|
+
/** `prefix` is an ancestor of (or equal to) `p`. */
|
|
21
|
+
export declare const isPrefix: (prefix: FieldPath, p: FieldPath) => boolean;
|
|
22
|
+
export declare const keyStartsWith: (key: string, prefix: string) => boolean;
|
|
23
|
+
export declare const same: (a: unknown, b: unknown) => boolean;
|
|
24
|
+
export declare const newKey: () => string;
|
|
25
|
+
/** Give every object item a `_key` (stable identity for drag and layout animation). Returns the same array when nothing changed. */
|
|
26
|
+
export declare function ensureKeys<T>(items: T[]): T[];
|
|
27
|
+
/** A stable React/dnd id for an item (objects use `_key`, primitives their index). */
|
|
28
|
+
export declare const itemId: (it: unknown, i: number) => string;
|
|
29
|
+
export {};
|
package/dist/lib/path.js
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
//#region src/lib/path.ts
|
|
2
|
+
var isObj = (v) => !!v && typeof v === "object" && !Array.isArray(v);
|
|
3
|
+
function getIn(root, path) {
|
|
4
|
+
let cur = root;
|
|
5
|
+
for (const seg of path) {
|
|
6
|
+
if (cur == null) return void 0;
|
|
7
|
+
if (typeof seg === "number") cur = Array.isArray(cur) ? cur[seg] : void 0;
|
|
8
|
+
else cur = isObj(cur) ? cur[seg] : void 0;
|
|
9
|
+
}
|
|
10
|
+
return cur;
|
|
11
|
+
}
|
|
12
|
+
function setIn(root, path, value) {
|
|
13
|
+
if (path.length === 0) return value;
|
|
14
|
+
const [head, ...rest] = path;
|
|
15
|
+
if (typeof head === "number") {
|
|
16
|
+
const arr = Array.isArray(root) ? root.slice() : [];
|
|
17
|
+
arr[head] = setIn(arr[head], rest, value);
|
|
18
|
+
return arr;
|
|
19
|
+
}
|
|
20
|
+
const obj = isObj(root) ? { ...root } : {};
|
|
21
|
+
obj[head] = setIn(obj[head], rest, value);
|
|
22
|
+
return obj;
|
|
23
|
+
}
|
|
24
|
+
/** "items.1.answer" — stable string key for maps (issues, presence, comments, history). */
|
|
25
|
+
var pathKey = (p) => p.join(".");
|
|
26
|
+
/**
|
|
27
|
+
* The key of a frame (AnimatePresence key, `data-frame-body`, scroll memory, crumb key): "root" for the root frame,
|
|
28
|
+
* else the path key. V2 used `pathKey(p) || "root"`, which collides when a root field is itself named `root`; that one
|
|
29
|
+
* case gets ".root", which no field path can produce (kit deviation, identical output for every other path).
|
|
30
|
+
*/
|
|
31
|
+
var frameKeyOf = (p) => p.length === 0 ? "root" : p.length === 1 && p[0] === "root" ? ".root" : pathKey(p);
|
|
32
|
+
var pathEq = (a, b) => a.length === b.length && a.every((s, i) => s === b[i]);
|
|
33
|
+
/** `prefix` is an ancestor of (or equal to) `p`. */
|
|
34
|
+
var isPrefix = (prefix, p) => prefix.length <= p.length && prefix.every((s, i) => s === p[i]);
|
|
35
|
+
var keyStartsWith = (key, prefix) => prefix === "" || key === prefix || key.startsWith(`${prefix}.`);
|
|
36
|
+
var same = (a, b) => {
|
|
37
|
+
if (a === b) return true;
|
|
38
|
+
try {
|
|
39
|
+
return JSON.stringify(a ?? null) === JSON.stringify(b ?? null);
|
|
40
|
+
} catch {
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
var seq = 0;
|
|
45
|
+
var newKey = () => `k${Date.now().toString(36).slice(-4)}${(seq++).toString(36)}${Math.random().toString(36).slice(2, 5)}`;
|
|
46
|
+
/** Give every object item a `_key` (stable identity for drag and layout animation). Returns the same array when nothing changed. */
|
|
47
|
+
function ensureKeys(items) {
|
|
48
|
+
let changed = false;
|
|
49
|
+
const out = items.map((it) => {
|
|
50
|
+
if (isObj(it) && typeof it._key !== "string") {
|
|
51
|
+
changed = true;
|
|
52
|
+
return {
|
|
53
|
+
_key: newKey(),
|
|
54
|
+
...it
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
return it;
|
|
58
|
+
});
|
|
59
|
+
return changed ? out : items;
|
|
60
|
+
}
|
|
61
|
+
/** A stable React/dnd id for an item (objects use `_key`, primitives their index). */
|
|
62
|
+
var itemId = (it, i) => isObj(it) && typeof it._key === "string" ? it._key : `i${i}`;
|
|
63
|
+
//#endregion
|
|
64
|
+
export { ensureKeys, frameKeyOf, getIn, isObj, isPrefix, itemId, keyStartsWith, newKey, pathEq, pathKey, same, setIn };
|
|
65
|
+
|
|
66
|
+
//# sourceMappingURL=path.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path.js","names":[],"sources":["../../src/lib/path.ts"],"sourcesContent":["/**\n * Immutable path helpers. A path addresses any value inside a document/block:\n * [\"items\", 1, \"answer\"] · [\"tabs\", 0, \"content\", 2, \"heading\"] · [\"title\", \"@history\"]\n * Writes share structure (only the spine is copied), so callers can diff top-level keys by identity.\n */\nimport type { FieldPath } from \"../schema/types\";\n\ntype Obj = Record<string, unknown>;\n\nexport const isObj = (v: unknown): v is Obj => !!v && typeof v === \"object\" && !Array.isArray(v);\n\nexport function getIn(root: unknown, path: FieldPath): unknown {\n let cur: unknown = root;\n for (const seg of path) {\n if (cur == null) return undefined;\n if (typeof seg === \"number\") cur = Array.isArray(cur) ? cur[seg] : undefined;\n else cur = isObj(cur) ? cur[seg] : undefined;\n }\n return cur;\n}\n\nexport function setIn<T>(root: T, path: FieldPath, value: unknown): T {\n if (path.length === 0) return value as T;\n const [head, ...rest] = path;\n if (typeof head === \"number\") {\n const arr = Array.isArray(root) ? root.slice() : [];\n arr[head] = setIn(arr[head], rest, value);\n return arr as unknown as T;\n }\n const obj: Obj = isObj(root) ? { ...root } : {};\n obj[head] = setIn(obj[head], rest, value);\n return obj as T;\n}\n\n/** \"items.1.answer\" — stable string key for maps (issues, presence, comments, history). */\nexport const pathKey = (p: FieldPath) => p.join(\".\");\n/**\n * The key of a frame (AnimatePresence key, `data-frame-body`, scroll memory, crumb key): \"root\" for the root frame,\n * else the path key. V2 used `pathKey(p) || \"root\"`, which collides when a root field is itself named `root`; that one\n * case gets \".root\", which no field path can produce (kit deviation, identical output for every other path).\n */\nexport const frameKeyOf = (p: FieldPath) => (p.length === 0 ? \"root\" : p.length === 1 && p[0] === \"root\" ? \".root\" : pathKey(p));\nexport const pathEq = (a: FieldPath, b: FieldPath) => a.length === b.length && a.every((s, i) => s === b[i]);\n/** `prefix` is an ancestor of (or equal to) `p`. */\nexport const isPrefix = (prefix: FieldPath, p: FieldPath) => prefix.length <= p.length && prefix.every((s, i) => s === p[i]);\nexport const keyStartsWith = (key: string, prefix: string) => prefix === \"\" || key === prefix || key.startsWith(`${prefix}.`);\n\nexport const same = (a: unknown, b: unknown) => {\n if (a === b) return true;\n try {\n return JSON.stringify(a ?? null) === JSON.stringify(b ?? null);\n } catch {\n return false;\n }\n};\n\nlet seq = 0;\nexport const newKey = () => `k${Date.now().toString(36).slice(-4)}${(seq++).toString(36)}${Math.random().toString(36).slice(2, 5)}`;\n\n/** Give every object item a `_key` (stable identity for drag and layout animation). Returns the same array when nothing changed. */\nexport function ensureKeys<T>(items: T[]): T[] {\n let changed = false;\n const out = items.map((it) => {\n if (isObj(it) && typeof it._key !== \"string\") {\n changed = true;\n return { _key: newKey(), ...it } as T;\n }\n return it;\n });\n return changed ? out : items;\n}\n\n/** A stable React/dnd id for an item (objects use `_key`, primitives their index). */\nexport const itemId = (it: unknown, i: number) => (isObj(it) && typeof it._key === \"string\" ? it._key : `i${i}`);\n"],"mappings":";AASA,IAAa,SAAS,MAAyB,CAAC,CAAC,KAAK,OAAO,MAAM,YAAY,CAAC,MAAM,QAAQ,CAAC;AAE/F,SAAgB,MAAM,MAAe,MAA0B;CAC7D,IAAI,MAAe;CACnB,KAAK,MAAM,OAAO,MAAM;EACtB,IAAI,OAAO,MAAM,OAAO,KAAA;EACxB,IAAI,OAAO,QAAQ,UAAU,MAAM,MAAM,QAAQ,GAAG,IAAI,IAAI,OAAO,KAAA;OAC9D,MAAM,MAAM,GAAG,IAAI,IAAI,OAAO,KAAA;CACrC;CACA,OAAO;AACT;AAEA,SAAgB,MAAS,MAAS,MAAiB,OAAmB;CACpE,IAAI,KAAK,WAAW,GAAG,OAAO;CAC9B,MAAM,CAAC,MAAM,GAAG,QAAQ;CACxB,IAAI,OAAO,SAAS,UAAU;EAC5B,MAAM,MAAM,MAAM,QAAQ,IAAI,IAAI,KAAK,MAAM,IAAI,CAAC;EAClD,IAAI,QAAQ,MAAM,IAAI,OAAO,MAAM,KAAK;EACxC,OAAO;CACT;CACA,MAAM,MAAW,MAAM,IAAI,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC;CAC9C,IAAI,QAAQ,MAAM,IAAI,OAAO,MAAM,KAAK;CACxC,OAAO;AACT;;AAGA,IAAa,WAAW,MAAiB,EAAE,KAAK,GAAG;;;;;;AAMnD,IAAa,cAAc,MAAkB,EAAE,WAAW,IAAI,SAAS,EAAE,WAAW,KAAK,EAAE,OAAO,SAAS,UAAU,QAAQ,CAAC;AAC9H,IAAa,UAAU,GAAc,MAAiB,EAAE,WAAW,EAAE,UAAU,EAAE,OAAO,GAAG,MAAM,MAAM,EAAE,EAAE;;AAE3G,IAAa,YAAY,QAAmB,MAAiB,OAAO,UAAU,EAAE,UAAU,OAAO,OAAO,GAAG,MAAM,MAAM,EAAE,EAAE;AAC3H,IAAa,iBAAiB,KAAa,WAAmB,WAAW,MAAM,QAAQ,UAAU,IAAI,WAAW,GAAG,OAAO,EAAE;AAE5H,IAAa,QAAQ,GAAY,MAAe;CAC9C,IAAI,MAAM,GAAG,OAAO;CACpB,IAAI;EACF,OAAO,KAAK,UAAU,KAAK,IAAI,MAAM,KAAK,UAAU,KAAK,IAAI;CAC/D,QAAQ;EACN,OAAO;CACT;AACF;AAEA,IAAI,MAAM;AACV,IAAa,eAAe,IAAI,KAAK,IAAI,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,KAAK,MAAA,CAAO,SAAS,EAAE,IAAI,KAAK,OAAO,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC;;AAGhI,SAAgB,WAAc,OAAiB;CAC7C,IAAI,UAAU;CACd,MAAM,MAAM,MAAM,KAAK,OAAO;EAC5B,IAAI,MAAM,EAAE,KAAK,OAAO,GAAG,SAAS,UAAU;GAC5C,UAAU;GACV,OAAO;IAAE,MAAM,OAAO;IAAG,GAAG;GAAG;EACjC;EACA,OAAO;CACT,CAAC;CACD,OAAO,UAAU,MAAM;AACzB;;AAGA,IAAa,UAAU,IAAa,MAAe,MAAM,EAAE,KAAK,OAAO,GAAG,SAAS,WAAW,GAAG,OAAO,IAAI"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Schema helpers — pure functions the engine uses to decide HOW a field is edited and WHAT a row shows.
|
|
3
|
+
*/
|
|
4
|
+
import type { FieldSchema, OpenMode, SchemaType, TypeSchema } from "../schema/types";
|
|
5
|
+
export declare const isPrimitive: (t: SchemaType) => boolean;
|
|
6
|
+
/** Types whose value is plain text (counters, AI rewrite, copy/paste as text). */
|
|
7
|
+
export declare const isTextual: (t: SchemaType) => t is "string" | "text" | "richtext" | "slug" | "email" | "url";
|
|
8
|
+
export declare const itemSchemas: (f: FieldSchema) => FieldSchema[];
|
|
9
|
+
export declare const slotAllow: (f: FieldSchema) => string[] | undefined;
|
|
10
|
+
export declare const itemSchemaFor: (f: FieldSchema, item: unknown) => FieldSchema | undefined;
|
|
11
|
+
/** An array whose single item type is a primitive (tags, gallery, references, list of strings). */
|
|
12
|
+
export declare const primitiveItem: (f: FieldSchema) => FieldSchema | undefined;
|
|
13
|
+
export declare const isSmallObject: (fields?: FieldSchema[]) => boolean;
|
|
14
|
+
/** How an object field / array item opens (CPO D8: inline for ≤3 primitives, else drill). */
|
|
15
|
+
export declare function objectOpenMode(f: FieldSchema): OpenMode;
|
|
16
|
+
/**
|
|
17
|
+
* CPO D43 — one rule for rows: an item of ≤3 simple fields (text, number, switch, select, colour, icon, url, email,
|
|
18
|
+
* date, rating, slug) EXPANDS inline under its row; anything bigger, nested or rich DRILLS into its own frame.
|
|
19
|
+
* `openMode` on the array still wins (developer override). Several item types → drill (they rarely share a shape).
|
|
20
|
+
*/
|
|
21
|
+
export declare function itemOpenMode(arrayField: FieldSchema): OpenMode;
|
|
22
|
+
export declare function emptyFor(f: FieldSchema): unknown;
|
|
23
|
+
export declare const initialFor: (f: FieldSchema) => unknown;
|
|
24
|
+
export declare function objectInitial(fields: FieldSchema[]): Record<string, unknown>;
|
|
25
|
+
/** A new array item for `itemSchema` (stamped with `_key` and, when the array allows several types, `_type`). */
|
|
26
|
+
export declare function newItem(arrayField: FieldSchema, itemSchema: FieldSchema): unknown;
|
|
27
|
+
export declare function newBlock(block: TypeSchema, settings?: FieldSchema[]): Record<string, unknown>;
|
|
28
|
+
export declare function structuredCloneSafe<T>(v: T): T;
|
|
29
|
+
/**
|
|
30
|
+
* What a condition can read beyond the fields beside it (V2 kit lib/schema.ts CondCtx): the object that holds them
|
|
31
|
+
* (`parent`), the top of the component or CMS item (`root`) and its variant. Callers that don't pass it get the sibling
|
|
32
|
+
* rules only; a `_variant` rule that can't be read then counts as met (the field shows), never as a silent hide.
|
|
33
|
+
*/
|
|
34
|
+
export interface CondCtx {
|
|
35
|
+
parent?: unknown;
|
|
36
|
+
root?: unknown;
|
|
37
|
+
/** the component's variant id, its first variant when the value has none */
|
|
38
|
+
variant?: string;
|
|
39
|
+
}
|
|
40
|
+
/** The condition context for fields under `basePath` of a form (the nearest slot child is the component's root). V2 condCtx. */
|
|
41
|
+
export declare function condCtx(form: {
|
|
42
|
+
schema: TypeSchema;
|
|
43
|
+
getAt: (p: (string | number)[]) => unknown;
|
|
44
|
+
resolveSchema?: (t: string) => TypeSchema | undefined;
|
|
45
|
+
}, basePath: (string | number)[]): CondCtx;
|
|
46
|
+
/** `hidden: true` hides; a Condition SHOWS the field only while its rules hold (types.ts contract). A rule it can't read
|
|
47
|
+
* here (a `_variant` or scoped rule with no context) holds, so the field shows. V2 isHidden. */
|
|
48
|
+
export declare function isHidden(f: FieldSchema, parent: unknown, ctx?: CondCtx): boolean;
|
|
49
|
+
/**
|
|
50
|
+
* A value as one line of text. Stored rich text reads as its words in every shape production keeps: an html string,
|
|
51
|
+
* Portable Text blocks, the component props envelope `{ content: { version, content: blocks }, html }`, and the field
|
|
52
|
+
* envelope `{ format, value: blocks, html }`.
|
|
53
|
+
*
|
|
54
|
+
* 🔴 An html string's words are DECODED: a row titled by `<p>Advisors & specialists</p>` read "Advisors &
|
|
55
|
+
* specialists" in the dock (marby-astro QA, 2026-10-22).
|
|
56
|
+
*/
|
|
57
|
+
export declare const plainText: (v: unknown) => string;
|
|
58
|
+
export declare function isEmptyValue(v: unknown): boolean;
|
|
59
|
+
export declare const imageUrl: (v: unknown) => string | undefined;
|
|
60
|
+
/** Singular noun for an array's items: itemNoun → item title → field title minus "s". */
|
|
61
|
+
export declare function itemNoun(f: FieldSchema): string;
|
|
62
|
+
export interface Preview {
|
|
63
|
+
title: string;
|
|
64
|
+
subtitle?: string;
|
|
65
|
+
media?: string;
|
|
66
|
+
icon?: string;
|
|
67
|
+
empty: boolean;
|
|
68
|
+
}
|
|
69
|
+
export declare function previewOf(itemSchema: FieldSchema | TypeSchema | undefined, item: unknown, index: number, fallbackTitle?: string): Preview;
|
|
70
|
+
/**
|
|
71
|
+
* How one slot child reads as a row (SlotField): its block's preview (the block's title while it has no text), the
|
|
72
|
+
* variant chip its `_variant` names, and the line under it (block title · settings, else description, else "Block i of n").
|
|
73
|
+
*/
|
|
74
|
+
export declare function slotRowOf(block: TypeSchema | undefined, item: unknown, index: number, count: number, slotSettings?: FieldSchema[]): {
|
|
75
|
+
preview: Preview;
|
|
76
|
+
chip?: string;
|
|
77
|
+
extra: string;
|
|
78
|
+
};
|
|
79
|
+
/** "Cast iron · 4 items" — one-line summary of an object for collapsed rows and fieldset headers. */
|
|
80
|
+
export declare function summarize(fields: FieldSchema[], v: unknown, max?: number): string;
|