@bettercms-ai/kit 0.1.1 → 2.0.0-next.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 +7 -0
- package/dist/controls/form-picker-register.js +15 -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 +6 -0
- package/dist/controls/slot-register.js +13 -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 +58 -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 +80 -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 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["/**\n * @bettercms-ai/kit entry point (in-app: \"@/kit\"). Importing it loads kit.css, whose tokens apply only\n * inside [data-kit-scope].\n *\n * scale.ts, table.ts and lib/utils.ts each export their own `formatNumber`, so they are not re-exported\n * here: import them by path (\"@/kit/schema/scale\", \"@/kit/schema/table\", \"@/kit/lib/utils\").\n */\nimport \"./kit.css\";\nimport { registerKitControls } from \"./controls\";\n\nexport * from \"./schema/types\";\nexport * from \"./schema/sources\";\nexport * from \"./schema/help\";\nexport * from \"./schema/adapters\";\nexport { cn } from \"./lib/cn\";\nexport * from \"./ui\";\n\n/* the form engine, its runtime contexts, and the V2 ↔ prod schema and value adapters */\nexport * from \"./context\";\nexport type { ControlProps } from \"./types\";\nexport * from \"./engine/schema-form\";\nexport * from \"./engine/kit-field\";\nexport * from \"./engine/field-shell\";\nexport * from \"./engine/bits\";\nexport * from \"./engine/group-summary\";\n/* layout (grouping.tsx's FieldList takes `renderField`; the engine's FieldList is field-list's, drawing KitField) */\nexport {\n RHYTHM, useRhythm, InsetScope, useInsetDepth, useGroupStatus, Appear, AnimatedFields, FieldSection, FieldInset, FieldUnit, FieldUnitRow,\n isBreakpointName, BreakpointGroup, arrangeFields, defaultGroup, GroupTabs, FieldsetSection, isShort,\n type GroupStatus, type RenderField, type GroupTabItem, type FieldSectionProps,\n} from \"./engine/grouping\";\nexport * from \"./engine/field-list\";\nexport * from \"./engine/array\";\nexport * from \"./engine/item-list\";\nexport * from \"./engine/slot\";\nexport {\n FrameSlotsProvider, useFrameSlots, FrameView, frameContext, FrameHeader, HistoryView, parentOfField, parentTitleOf, frameDirection,\n useFrameNavigation, FrameStage, type FrameFieldListProps, type FrameSlots,\n} from \"./engine/frame\";\nexport * from \"./engine/breadcrumb\";\nexport { resolveFrames, rootFrame, isDrillable, type Frame } from \"./lib/frames\";\nexport * from \"./adapters/schema\";\nexport * from \"./adapters/values\";\n/* the prod model's names (Fieldset, OpenMode, ScaleUnit, SelectOption) collide with the kit's own, so they live under `prod` */\nexport * as prod from \"./adapters/prod-types\";\nexport type { LossyFeature } from \"./adapters/lossy\";\n\n/* controls: each register file adds its types to the engine's dispatch tables (one import per lane file) */\nimport \"./controls/date-register\";\nimport \"./controls/icon-register\";\nimport \"./controls/code-register\";\nimport \"./controls/json-register\";\nimport \"./controls/location-register\";\nimport \"./controls/media-register\";\nimport \"./controls/reference-register\";\nimport \"./controls/form-picker-register\";\nimport \"./controls/slot-register\";\nimport \"./controls/rich-text\";\nimport \"./controls/table\";\n/* the ported controls: registered once here, so any host that loads the kit draws them instead of its legacy control.\n Their helpers keep short names (str, toNum…), so they live under `controls`. */\nexport * as controls from \"./controls\";\nexport { registerKitControls };\nregisterKitControls();\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+DA,oBAAoB"}
|
package/dist/kit.css
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @bettercms-ai/kit keyframes. Nothing else lives here.
|
|
3
|
+
*
|
|
4
|
+
* The V2 Block Kit tokens (every --kit-* role, light and dark) are declared once, in src/index.css's light
|
|
5
|
+
* and dark token blocks, where the dashboard's legacy role names alias them: one token home for the whole
|
|
6
|
+
* app. The kit's utility names (bg-kit-surface, text-kit-fg-3, rounded-kit-md, ...) are registered there
|
|
7
|
+
* too, by an "@theme inline reference" block. [data-kit-scope] is a marker: its V2 element defaults (body
|
|
8
|
+
* text, borders, headings, code mono) sit in index.css's base layer.
|
|
9
|
+
*
|
|
10
|
+
* Keyframe names are global, so each carries the kit- prefix. This sheet runs no Tailwind pass (a second
|
|
11
|
+
* utilities pass would re-emit .hidden and friends after the main sheet). Import it only from the kit entry
|
|
12
|
+
* point (src/kit/index.ts). src/kit/__tests__/kit-token-home.test.ts holds this file to keyframes only.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
@keyframes kit-fade-in {
|
|
16
|
+
from { opacity: 0; }
|
|
17
|
+
to { opacity: 1; }
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
@keyframes kit-pop-in {
|
|
21
|
+
from { opacity: 0; transform: translateY(4px) scale(0.98); }
|
|
22
|
+
to { opacity: 1; transform: none; }
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/* V2 slide-up (mobile flow modal sheet) */
|
|
26
|
+
@keyframes kit-slide-up {
|
|
27
|
+
from { opacity: 0; transform: translateY(8px); }
|
|
28
|
+
to { opacity: 1; transform: none; }
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/* V2 image editor enter (image-editor.tsx: opacity 0, y 8 → rest) */
|
|
32
|
+
@keyframes kit-rise-in {
|
|
33
|
+
from { opacity: 0; transform: translateY(8px); }
|
|
34
|
+
to { opacity: 1; transform: none; }
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/* V2 sheet-in-r / sheet-in-l (index.css), run by SheetContent on open */
|
|
38
|
+
@keyframes kit-sheet-in-r {
|
|
39
|
+
from { transform: translateX(24px); opacity: 0; }
|
|
40
|
+
to { transform: none; opacity: 1; }
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/* V2 floating inspector exit (editor.tsx inspector-float: x 16, opacity 0). Reduced motion is handled where it is
|
|
44
|
+
applied (FloatingInspector: skipped in JS, plus motion-reduce:animate-none). */
|
|
45
|
+
@keyframes kit-sheet-out-r {
|
|
46
|
+
from { transform: none; opacity: 1; }
|
|
47
|
+
to { transform: translateX(16px); opacity: 0; }
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@keyframes kit-sheet-in-l {
|
|
51
|
+
from { transform: translateX(-24px); opacity: 0; }
|
|
52
|
+
to { transform: none; opacity: 1; }
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/* V2 TabletSheet (editor.tsx:491-513): the bottom sheet rises from y 100%, run by SheetContent side="bottom" */
|
|
56
|
+
@keyframes kit-sheet-in-b {
|
|
57
|
+
from { transform: translateY(100%); }
|
|
58
|
+
to { transform: none; }
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
@keyframes kit-shimmer {
|
|
62
|
+
from { background-position: -400px 0; }
|
|
63
|
+
to { background-position: 400px 0; }
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/* V2 shimmer-text (index.css:945): a 200%-wide text gradient sweeping right to left, looping seamlessly */
|
|
67
|
+
@keyframes kit-shimmer-text {
|
|
68
|
+
from { background-position: 200% 0; }
|
|
69
|
+
to { background-position: -200% 0; }
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
@keyframes kit-pulse-dot {
|
|
73
|
+
0%, 100% { opacity: 1; transform: scale(1); }
|
|
74
|
+
50% { opacity: 0.45; transform: scale(0.85); }
|
|
75
|
+
}
|
package/dist/lib/cn.d.ts
ADDED
package/dist/lib/cn.js
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { clsx } from "clsx";
|
|
2
|
+
import { extendTailwindMerge, twMerge } from "tailwind-merge";
|
|
3
|
+
//#region src/lib/cn.ts
|
|
4
|
+
/** Merge Tailwind classes; our custom text sizes (2xs..3xl) are registered so twMerge
|
|
5
|
+
* doesn't confuse `text-sm` (size) with `text-fg-2` (color). */
|
|
6
|
+
var merge = extendTailwindMerge({ extend: { classGroups: {
|
|
7
|
+
"font-size": [{ text: [
|
|
8
|
+
"2xs",
|
|
9
|
+
"xs",
|
|
10
|
+
"sm",
|
|
11
|
+
"base",
|
|
12
|
+
"md",
|
|
13
|
+
"lg",
|
|
14
|
+
"xl",
|
|
15
|
+
"2xl",
|
|
16
|
+
"3xl",
|
|
17
|
+
"kit-2xs",
|
|
18
|
+
"kit-xs",
|
|
19
|
+
"kit-sm",
|
|
20
|
+
"kit-base",
|
|
21
|
+
"kit-md",
|
|
22
|
+
"kit-lg",
|
|
23
|
+
"kit-xl",
|
|
24
|
+
"kit-2xl",
|
|
25
|
+
"kit-3xl"
|
|
26
|
+
] }],
|
|
27
|
+
shadow: [{ shadow: [
|
|
28
|
+
"kit-xs",
|
|
29
|
+
"kit-sm",
|
|
30
|
+
"kit-md",
|
|
31
|
+
"kit-lg",
|
|
32
|
+
"kit-xl",
|
|
33
|
+
"kit-canvas-frame",
|
|
34
|
+
"kit-device",
|
|
35
|
+
"kit-field",
|
|
36
|
+
"kit-ring-field",
|
|
37
|
+
"kit-button-primary",
|
|
38
|
+
"kit-sheet-r",
|
|
39
|
+
"kit-sheet-b"
|
|
40
|
+
] }],
|
|
41
|
+
rounded: [{ rounded: [
|
|
42
|
+
"kit-xs",
|
|
43
|
+
"kit-sm",
|
|
44
|
+
"kit-md",
|
|
45
|
+
"kit-lg",
|
|
46
|
+
"kit-xl",
|
|
47
|
+
"kit-2xl"
|
|
48
|
+
] }]
|
|
49
|
+
} } });
|
|
50
|
+
function cn(...inputs) {
|
|
51
|
+
return merge(clsx(inputs));
|
|
52
|
+
}
|
|
53
|
+
//#endregion
|
|
54
|
+
export { cn, twMerge };
|
|
55
|
+
|
|
56
|
+
//# sourceMappingURL=cn.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cn.js","names":[],"sources":["../../src/lib/cn.ts"],"sourcesContent":["import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\n/** Merge Tailwind classes; our custom text sizes (2xs..3xl) are registered so twMerge\n * doesn't confuse `text-sm` (size) with `text-fg-2` (color). */\nimport { extendTailwindMerge } from \"tailwind-merge\";\nconst merge = extendTailwindMerge({\n extend: {\n classGroups: {\n \"font-size\": [{ text: [\"2xs\", \"xs\", \"sm\", \"base\", \"md\", \"lg\", \"xl\", \"2xl\", \"3xl\", \"kit-2xs\", \"kit-xs\", \"kit-sm\", \"kit-base\", \"kit-md\", \"kit-lg\", \"kit-xl\", \"kit-2xl\", \"kit-3xl\"] }],\n // Kit shadow and radius tokens (src/kit/kit.css @theme, namespaced \"kit-\"). Without this twMerge reads\n // `shadow-kit-md` as a shadow COLOUR and keeps it next to `shadow-none`, so a variant could no longer\n // override the base shadow; `rounded-kit-md` would not conflict with `rounded-none` either.\n shadow: [{ shadow: [\"kit-xs\", \"kit-sm\", \"kit-md\", \"kit-lg\", \"kit-xl\", \"kit-canvas-frame\", \"kit-device\", \"kit-field\", \"kit-ring-field\", \"kit-button-primary\", \"kit-sheet-r\", \"kit-sheet-b\"] }],\n rounded: [{ rounded: [\"kit-xs\", \"kit-sm\", \"kit-md\", \"kit-lg\", \"kit-xl\", \"kit-2xl\"] }],\n },\n },\n});\nexport function cn(...inputs: ClassValue[]) {\n return merge(clsx(inputs));\n}\nexport { twMerge };\n"],"mappings":";;;;;AAMA,IAAM,QAAQ,oBAAoB,EAChC,QAAQ,EACN,aAAa;CACX,aAAa,CAAC,EAAE,MAAM;EAAC;EAAO;EAAM;EAAM;EAAQ;EAAM;EAAM;EAAM;EAAO;EAAO;EAAW;EAAU;EAAU;EAAY;EAAU;EAAU;EAAU;EAAW;CAAS,EAAE,CAAC;CAIlL,QAAQ,CAAC,EAAE,QAAQ;EAAC;EAAU;EAAU;EAAU;EAAU;EAAU;EAAoB;EAAc;EAAa;EAAkB;EAAsB;EAAe;CAAa,EAAE,CAAC;CAC5L,SAAS,CAAC,EAAE,SAAS;EAAC;EAAU;EAAU;EAAU;EAAU;EAAU;CAAS,EAAE,CAAC;AACtF,EACF,EACF,CAAC;AACD,SAAgB,GAAG,GAAG,QAAsB;CAC1C,OAAO,MAAM,KAAK,MAAM,CAAC;AAC3B"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* COLUMNS (CPO D63; V2 HEAD c896beb kit/lib/columns.ts) — the one rule for putting fields side by side, shared by every
|
|
3
|
+
* host (sections, insets, array rows). Pure, no React.
|
|
4
|
+
*
|
|
5
|
+
* A field may sit in a column only when its value is genuinely short. The layout also needs room: `FieldRun` turns two-up
|
|
6
|
+
* only when the form is at least 420px wide (a container query), so the 300 to 380px inspector is always one column.
|
|
7
|
+
*/
|
|
8
|
+
import type { FieldSchema } from "../schema/types";
|
|
9
|
+
/** Text longer than this never sits in a column. */
|
|
10
|
+
export declare const SHORT_TEXT_MAX = 24;
|
|
11
|
+
/** Long text, rich text, lists, media, links, references, buttons, tables and objects are always full width. */
|
|
12
|
+
export declare function isColumnField(f: FieldSchema): boolean;
|
|
13
|
+
/** Pairs neighbouring column fields; a column field with no short neighbour spans the full row. true = half width. */
|
|
14
|
+
export declare function columnSpans(fields: FieldSchema[]): boolean[];
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
//#region src/lib/columns.ts
|
|
2
|
+
/** Text longer than this never sits in a column. */
|
|
3
|
+
var SHORT_TEXT_MAX = 24;
|
|
4
|
+
/** Long text, rich text, lists, media, links, references, buttons, tables and objects are always full width. */
|
|
5
|
+
function isColumnField(f) {
|
|
6
|
+
switch (f.type) {
|
|
7
|
+
case "number": return !f.scale && f.layout !== "slider";
|
|
8
|
+
case "boolean":
|
|
9
|
+
case "date":
|
|
10
|
+
case "color":
|
|
11
|
+
case "icon":
|
|
12
|
+
case "rating": return true;
|
|
13
|
+
case "select": return f.layout !== "cards" && f.layout !== "radio";
|
|
14
|
+
case "string": return (f.validation?.max ?? Infinity) <= 24;
|
|
15
|
+
default: return false;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
/** Pairs neighbouring column fields; a column field with no short neighbour spans the full row. true = half width. */
|
|
19
|
+
function columnSpans(fields) {
|
|
20
|
+
const out = fields.map(() => false);
|
|
21
|
+
for (let i = 0; i < fields.length - 1; i++) if (isColumnField(fields[i]) && isColumnField(fields[i + 1])) {
|
|
22
|
+
out[i] = out[i + 1] = true;
|
|
23
|
+
i++;
|
|
24
|
+
}
|
|
25
|
+
return out;
|
|
26
|
+
}
|
|
27
|
+
//#endregion
|
|
28
|
+
export { SHORT_TEXT_MAX, columnSpans, isColumnField };
|
|
29
|
+
|
|
30
|
+
//# sourceMappingURL=columns.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"columns.js","names":[],"sources":["../../src/lib/columns.ts"],"sourcesContent":["/**\n * COLUMNS (CPO D63; V2 HEAD c896beb kit/lib/columns.ts) — the one rule for putting fields side by side, shared by every\n * host (sections, insets, array rows). Pure, no React.\n *\n * A field may sit in a column only when its value is genuinely short. The layout also needs room: `FieldRun` turns two-up\n * only when the form is at least 420px wide (a container query), so the 300 to 380px inspector is always one column.\n */\nimport type { FieldSchema } from \"../schema/types\";\n\n/** Text longer than this never sits in a column. */\nexport const SHORT_TEXT_MAX = 24;\n\n/** Long text, rich text, lists, media, links, references, buttons, tables and objects are always full width. */\nexport function isColumnField(f: FieldSchema): boolean {\n switch (f.type) {\n case \"number\":\n return !f.scale && f.layout !== \"slider\"; // a scale needs the full row (D41)\n case \"boolean\": case \"date\": case \"color\": case \"icon\": case \"rating\":\n return true;\n case \"select\":\n return f.layout !== \"cards\" && f.layout !== \"radio\";\n case \"string\":\n return (f.validation?.max ?? Infinity) <= SHORT_TEXT_MAX;\n default:\n return false;\n }\n}\n/** Pairs neighbouring column fields; a column field with no short neighbour spans the full row. true = half width. */\nexport function columnSpans(fields: FieldSchema[]): boolean[] {\n const out = fields.map(() => false);\n for (let i = 0; i < fields.length - 1; i++) {\n if (isColumnField(fields[i]) && isColumnField(fields[i + 1])) {\n out[i] = out[i + 1] = true;\n i++;\n }\n }\n return out;\n}\n"],"mappings":";;AAUA,IAAa,iBAAiB;;AAG9B,SAAgB,cAAc,GAAyB;CACrD,QAAQ,EAAE,MAAV;EACE,KAAK,UACH,OAAO,CAAC,EAAE,SAAS,EAAE,WAAW;EAClC,KAAK;EAAW,KAAK;EAAQ,KAAK;EAAS,KAAK;EAAQ,KAAK,UAC3D,OAAO;EACT,KAAK,UACH,OAAO,EAAE,WAAW,WAAW,EAAE,WAAW;EAC9C,KAAK,UACH,QAAQ,EAAE,YAAY,OAAO,aAAA;EAC/B,SACE,OAAO;CACX;AACF;;AAEA,SAAgB,YAAY,QAAkC;CAC5D,MAAM,MAAM,OAAO,UAAU,KAAK;CAClC,KAAK,IAAI,IAAI,GAAG,IAAI,OAAO,SAAS,GAAG,KACrC,IAAI,cAAc,OAAO,EAAE,KAAK,cAAc,OAAO,IAAI,EAAE,GAAG;EAC5D,IAAI,KAAK,IAAI,IAAI,KAAK;EACtB;CACF;CAEF,OAAO;AACT"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NAVIGATION MODEL — a path resolves to a STACK OF FRAMES (one per breadcrumb). The last frame is what the
|
|
3
|
+
* panel shows. Drillable nodes: object fields (drill mode), array items, slot children (blocks), button fields
|
|
4
|
+
* (the one button screen) and "@history" (a field's versions as a stacked panel).
|
|
5
|
+
*/
|
|
6
|
+
import { type Crumb, type FieldGroup, type FieldPath, type FieldSchema, type Fieldset, type TypeSchema } from "../schema/types";
|
|
7
|
+
export interface Frame {
|
|
8
|
+
path: FieldPath;
|
|
9
|
+
kind: Crumb["kind"];
|
|
10
|
+
title: string;
|
|
11
|
+
icon?: string;
|
|
12
|
+
fields: FieldSchema[];
|
|
13
|
+
fieldsets?: Fieldset[];
|
|
14
|
+
groups?: FieldGroup[];
|
|
15
|
+
/** the field that owns this frame (object / array / slot / button / history target) */
|
|
16
|
+
field?: FieldSchema;
|
|
17
|
+
/** array items and slot children */
|
|
18
|
+
item?: {
|
|
19
|
+
arrayPath: FieldPath;
|
|
20
|
+
index: number;
|
|
21
|
+
count: number;
|
|
22
|
+
itemSchema?: FieldSchema;
|
|
23
|
+
block?: TypeSchema;
|
|
24
|
+
slotField?: FieldSchema;
|
|
25
|
+
/** the title of sibling `i` (table rows and columns, whose items have no schema to preview) */
|
|
26
|
+
titleAt?: (i: number) => string;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
export declare function rootFrame(schema: TypeSchema): Frame;
|
|
30
|
+
/** Resolve `path` into frames. Stops at the first segment that doesn't resolve (returns the valid prefix). */
|
|
31
|
+
export declare function resolveFrames(schema: TypeSchema, value: unknown, path: FieldPath, resolveSchema?: (t: string) => TypeSchema | undefined): {
|
|
32
|
+
frames: Frame[];
|
|
33
|
+
path: FieldPath;
|
|
34
|
+
};
|
|
35
|
+
/** Can this field be opened as its own frame (drill target)? */
|
|
36
|
+
export declare const isDrillable: (f: FieldSchema) => boolean;
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
import { cellText, isTableValue, normalizeTable } from "../schema/table.js";
|
|
2
|
+
import { getIn, isObj } from "./path.js";
|
|
3
|
+
import { isPrimitive, itemSchemaFor, previewOf } from "./schema.js";
|
|
4
|
+
import { HISTORY_SEGMENT } from "../schema/types.js";
|
|
5
|
+
//#region src/lib/frames.ts
|
|
6
|
+
/**
|
|
7
|
+
* NAVIGATION MODEL — a path resolves to a STACK OF FRAMES (one per breadcrumb). The last frame is what the
|
|
8
|
+
* panel shows. Drillable nodes: object fields (drill mode), array items, slot children (blocks), button fields
|
|
9
|
+
* (the one button screen) and "@history" (a field's versions as a stacked panel).
|
|
10
|
+
*/
|
|
11
|
+
function rootFrame(schema) {
|
|
12
|
+
return {
|
|
13
|
+
path: [],
|
|
14
|
+
kind: "root",
|
|
15
|
+
title: schema.title,
|
|
16
|
+
icon: schema.icon,
|
|
17
|
+
fields: schema.fields,
|
|
18
|
+
fieldsets: schema.fieldsets,
|
|
19
|
+
groups: schema.groups
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
/** Resolve `path` into frames. Stops at the first segment that doesn't resolve (returns the valid prefix). */
|
|
23
|
+
function resolveFrames(schema, value, path, resolveSchema) {
|
|
24
|
+
const frames = [rootFrame(schema)];
|
|
25
|
+
let fields = schema.fields;
|
|
26
|
+
let i = 0;
|
|
27
|
+
while (i < path.length) {
|
|
28
|
+
const seg = path[i];
|
|
29
|
+
if (typeof seg !== "string") break;
|
|
30
|
+
const f = fields.find((x) => x.name === seg);
|
|
31
|
+
if (!f) break;
|
|
32
|
+
const here = path.slice(0, i + 1);
|
|
33
|
+
if (path[i + 1] === "@history") {
|
|
34
|
+
frames.push({
|
|
35
|
+
path: [...here, HISTORY_SEGMENT],
|
|
36
|
+
kind: "history",
|
|
37
|
+
title: "History",
|
|
38
|
+
icon: "clock",
|
|
39
|
+
fields: [f],
|
|
40
|
+
field: f
|
|
41
|
+
});
|
|
42
|
+
i += 2;
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
45
|
+
if (f.type === "object" && f.fields) {
|
|
46
|
+
frames.push({
|
|
47
|
+
path: here,
|
|
48
|
+
kind: "object",
|
|
49
|
+
title: f.title,
|
|
50
|
+
icon: f.icon,
|
|
51
|
+
fields: f.fields,
|
|
52
|
+
field: f
|
|
53
|
+
});
|
|
54
|
+
fields = f.fields;
|
|
55
|
+
i += 1;
|
|
56
|
+
continue;
|
|
57
|
+
}
|
|
58
|
+
if (f.type === "button") {
|
|
59
|
+
frames.push({
|
|
60
|
+
path: here,
|
|
61
|
+
kind: "button",
|
|
62
|
+
title: f.title,
|
|
63
|
+
icon: "click",
|
|
64
|
+
fields: [f],
|
|
65
|
+
field: f
|
|
66
|
+
});
|
|
67
|
+
i += 1;
|
|
68
|
+
if (path[i] === "@history") {
|
|
69
|
+
frames.push({
|
|
70
|
+
path: [...here, HISTORY_SEGMENT],
|
|
71
|
+
kind: "history",
|
|
72
|
+
title: "History",
|
|
73
|
+
icon: "clock",
|
|
74
|
+
fields: [f],
|
|
75
|
+
field: f
|
|
76
|
+
});
|
|
77
|
+
i += 1;
|
|
78
|
+
}
|
|
79
|
+
break;
|
|
80
|
+
}
|
|
81
|
+
if (f.type === "table" && (path[i + 1] === "rows" || path[i + 1] === "columns") && typeof path[i + 2] === "number") {
|
|
82
|
+
const raw = getIn(value, here);
|
|
83
|
+
if (!isTableValue(raw)) break;
|
|
84
|
+
const t = normalizeTable(raw);
|
|
85
|
+
const idx = path[i + 2];
|
|
86
|
+
const arrayPath = [...here, path[i + 1]];
|
|
87
|
+
if (path[i + 1] === "rows") {
|
|
88
|
+
const row = t.rows[idx];
|
|
89
|
+
if (!row) break;
|
|
90
|
+
const group = row.group && !row.footer ? t.rowGroups?.find((g) => g._key === row.group) : void 0;
|
|
91
|
+
if (group) frames.push({
|
|
92
|
+
path: here,
|
|
93
|
+
kind: "tableGroup",
|
|
94
|
+
title: group.label || "Untitled group",
|
|
95
|
+
icon: "folder",
|
|
96
|
+
fields: [],
|
|
97
|
+
field: f
|
|
98
|
+
});
|
|
99
|
+
const first = t.columns[0];
|
|
100
|
+
const titleAt = (j) => {
|
|
101
|
+
const r = t.rows[j];
|
|
102
|
+
return r && first && cellText(first, r, r.cells[first._key]) || "Untitled row";
|
|
103
|
+
};
|
|
104
|
+
frames.push({
|
|
105
|
+
path: [...arrayPath, idx],
|
|
106
|
+
kind: "tableRow",
|
|
107
|
+
title: titleAt(idx),
|
|
108
|
+
icon: "list",
|
|
109
|
+
fields: [],
|
|
110
|
+
field: f,
|
|
111
|
+
item: {
|
|
112
|
+
arrayPath,
|
|
113
|
+
index: idx,
|
|
114
|
+
count: t.rows.length,
|
|
115
|
+
itemSchema: {
|
|
116
|
+
name: "row",
|
|
117
|
+
title: "Row",
|
|
118
|
+
type: "object"
|
|
119
|
+
},
|
|
120
|
+
titleAt
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
} else {
|
|
124
|
+
if (!t.columns[idx]) break;
|
|
125
|
+
const titleAt = (j) => t.columns[j]?.label || "Untitled column";
|
|
126
|
+
frames.push({
|
|
127
|
+
path: [...arrayPath, idx],
|
|
128
|
+
kind: "tableColumn",
|
|
129
|
+
title: titleAt(idx),
|
|
130
|
+
icon: "layout-columns",
|
|
131
|
+
fields: [],
|
|
132
|
+
field: f,
|
|
133
|
+
item: {
|
|
134
|
+
arrayPath,
|
|
135
|
+
index: idx,
|
|
136
|
+
count: t.columns.length,
|
|
137
|
+
itemSchema: {
|
|
138
|
+
name: "column",
|
|
139
|
+
title: "Column",
|
|
140
|
+
type: "object"
|
|
141
|
+
},
|
|
142
|
+
titleAt
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
i += 3;
|
|
147
|
+
break;
|
|
148
|
+
}
|
|
149
|
+
if ((f.type === "array" || f.type === "slot") && typeof path[i + 1] === "number") {
|
|
150
|
+
const idx = path[i + 1];
|
|
151
|
+
const list = getIn(value, here);
|
|
152
|
+
const items = Array.isArray(list) ? list : [];
|
|
153
|
+
const item = items[idx];
|
|
154
|
+
if (item === void 0) break;
|
|
155
|
+
const itemPath = [...here, idx];
|
|
156
|
+
if (f.type === "array") {
|
|
157
|
+
const s = itemSchemaFor(f, item);
|
|
158
|
+
if (!s || isPrimitive(s.type) || !s.fields) break;
|
|
159
|
+
const pv = previewOf(s, item, idx);
|
|
160
|
+
frames.push({
|
|
161
|
+
path: itemPath,
|
|
162
|
+
kind: "item",
|
|
163
|
+
title: pv.title,
|
|
164
|
+
icon: s.icon ?? f.icon,
|
|
165
|
+
fields: s.fields,
|
|
166
|
+
field: f,
|
|
167
|
+
item: {
|
|
168
|
+
arrayPath: here,
|
|
169
|
+
index: idx,
|
|
170
|
+
count: items.length,
|
|
171
|
+
itemSchema: s
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
fields = s.fields;
|
|
175
|
+
} else {
|
|
176
|
+
const type = isObj(item) && typeof item._type === "string" ? item._type : "";
|
|
177
|
+
const block = resolveSchema?.(type);
|
|
178
|
+
if (!block) break;
|
|
179
|
+
const pv = previewOf(block, item, idx, block.title);
|
|
180
|
+
frames.push({
|
|
181
|
+
path: itemPath,
|
|
182
|
+
kind: "block",
|
|
183
|
+
title: pv.empty ? block.title : pv.title,
|
|
184
|
+
icon: block.icon,
|
|
185
|
+
fields: block.fields,
|
|
186
|
+
fieldsets: block.fieldsets,
|
|
187
|
+
groups: block.groups,
|
|
188
|
+
field: f,
|
|
189
|
+
item: {
|
|
190
|
+
arrayPath: here,
|
|
191
|
+
index: idx,
|
|
192
|
+
count: items.length,
|
|
193
|
+
block,
|
|
194
|
+
slotField: f
|
|
195
|
+
}
|
|
196
|
+
});
|
|
197
|
+
fields = block.fields;
|
|
198
|
+
}
|
|
199
|
+
i += 2;
|
|
200
|
+
continue;
|
|
201
|
+
}
|
|
202
|
+
break;
|
|
203
|
+
}
|
|
204
|
+
return {
|
|
205
|
+
frames,
|
|
206
|
+
path: frames.length > 1 ? frames[frames.length - 1].path : []
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
/** Can this field be opened as its own frame (drill target)? */
|
|
210
|
+
var isDrillable = (f) => f.type === "object" || f.type === "button";
|
|
211
|
+
//#endregion
|
|
212
|
+
export { isDrillable, resolveFrames, rootFrame };
|
|
213
|
+
|
|
214
|
+
//# sourceMappingURL=frames.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frames.js","names":[],"sources":["../../src/lib/frames.ts"],"sourcesContent":["/**\n * NAVIGATION MODEL — a path resolves to a STACK OF FRAMES (one per breadcrumb). The last frame is what the\n * panel shows. Drillable nodes: object fields (drill mode), array items, slot children (blocks), button fields\n * (the one button screen) and \"@history\" (a field's versions as a stacked panel).\n */\nimport { HISTORY_SEGMENT, type Crumb, type FieldGroup, type FieldPath, type FieldSchema, type Fieldset, type TypeSchema } from \"../schema/types\";\nimport { cellText, isTableValue, normalizeTable } from \"../schema/table\";\nimport { getIn, isObj } from \"./path\";\nimport { isPrimitive, itemSchemaFor, previewOf } from \"./schema\";\n\nexport interface Frame {\n path: FieldPath;\n kind: Crumb[\"kind\"];\n title: string;\n icon?: string;\n fields: FieldSchema[];\n fieldsets?: Fieldset[];\n groups?: FieldGroup[];\n /** the field that owns this frame (object / array / slot / button / history target) */\n field?: FieldSchema;\n /** array items and slot children */\n item?: {\n arrayPath: FieldPath;\n index: number;\n count: number;\n itemSchema?: FieldSchema;\n block?: TypeSchema;\n slotField?: FieldSchema;\n /** the title of sibling `i` (table rows and columns, whose items have no schema to preview) */\n titleAt?: (i: number) => string;\n };\n}\n\nexport function rootFrame(schema: TypeSchema): Frame {\n return { path: [], kind: \"root\", title: schema.title, icon: schema.icon, fields: schema.fields, fieldsets: schema.fieldsets, groups: schema.groups };\n}\n\n/** Resolve `path` into frames. Stops at the first segment that doesn't resolve (returns the valid prefix). */\nexport function resolveFrames(\n schema: TypeSchema,\n value: unknown,\n path: FieldPath,\n resolveSchema?: (t: string) => TypeSchema | undefined,\n): { frames: Frame[]; path: FieldPath } {\n const frames: Frame[] = [rootFrame(schema)];\n let fields = schema.fields;\n let i = 0;\n while (i < path.length) {\n const seg = path[i];\n if (typeof seg !== \"string\") break;\n const f = fields.find((x) => x.name === seg);\n if (!f) break;\n const here = path.slice(0, i + 1);\n if (path[i + 1] === HISTORY_SEGMENT) {\n frames.push({ path: [...here, HISTORY_SEGMENT], kind: \"history\", title: \"History\", icon: \"clock\", fields: [f], field: f });\n i += 2;\n break;\n }\n if (f.type === \"object\" && f.fields) {\n frames.push({ path: here, kind: \"object\", title: f.title, icon: f.icon, fields: f.fields, field: f });\n fields = f.fields;\n i += 1;\n continue;\n }\n if (f.type === \"button\") {\n frames.push({ path: here, kind: \"button\", title: f.title, icon: \"click\", fields: [f], field: f });\n i += 1;\n // a button screen is a leaf, except for its own history\n if (path[i] === HISTORY_SEGMENT) {\n frames.push({ path: [...here, HISTORY_SEGMENT], kind: \"history\", title: \"History\", icon: \"clock\", fields: [f], field: f });\n i += 1;\n }\n break;\n }\n /* D50: a table's rows and columns drill like array items. A row inside a row group gets the group as a crumb\n (its path is the table field, which resolves back to the frame that shows the table). */\n if (f.type === \"table\" && (path[i + 1] === \"rows\" || path[i + 1] === \"columns\") && typeof path[i + 2] === \"number\") {\n const raw = getIn(value, here);\n if (!isTableValue(raw)) break;\n const t = normalizeTable(raw);\n const idx = path[i + 2] as number;\n const arrayPath = [...here, path[i + 1]];\n if (path[i + 1] === \"rows\") {\n const row = t.rows[idx];\n if (!row) break;\n const group = row.group && !row.footer ? t.rowGroups?.find((g) => g._key === row.group) : undefined;\n if (group) frames.push({ path: here, kind: \"tableGroup\", title: group.label || \"Untitled group\", icon: \"folder\", fields: [], field: f });\n const first = t.columns[0];\n const titleAt = (j: number) => {\n const r = t.rows[j];\n return (r && first && cellText(first, r, r.cells[first._key])) || \"Untitled row\";\n };\n frames.push({\n path: [...arrayPath, idx], kind: \"tableRow\", title: titleAt(idx), icon: \"list\", fields: [], field: f,\n item: { arrayPath, index: idx, count: t.rows.length, itemSchema: { name: \"row\", title: \"Row\", type: \"object\" }, titleAt },\n });\n } else {\n const col = t.columns[idx];\n if (!col) break;\n const titleAt = (j: number) => t.columns[j]?.label || \"Untitled column\";\n frames.push({\n path: [...arrayPath, idx], kind: \"tableColumn\", title: titleAt(idx), icon: \"layout-columns\", fields: [], field: f,\n item: { arrayPath, index: idx, count: t.columns.length, itemSchema: { name: \"column\", title: \"Column\", type: \"object\" }, titleAt },\n });\n }\n i += 3;\n break;\n }\n if ((f.type === \"array\" || f.type === \"slot\") && typeof path[i + 1] === \"number\") {\n const idx = path[i + 1] as number;\n const list = getIn(value, here);\n const items = Array.isArray(list) ? list : [];\n const item = items[idx];\n if (item === undefined) break;\n const itemPath = [...here, idx];\n if (f.type === \"array\") {\n const s = itemSchemaFor(f, item);\n if (!s || isPrimitive(s.type) || !s.fields) break;\n const pv = previewOf(s, item, idx);\n frames.push({\n path: itemPath, kind: \"item\", title: pv.title, icon: s.icon ?? f.icon, fields: s.fields, field: f,\n item: { arrayPath: here, index: idx, count: items.length, itemSchema: s },\n });\n fields = s.fields;\n } else {\n const type = isObj(item) && typeof item._type === \"string\" ? item._type : \"\";\n const block = resolveSchema?.(type);\n if (!block) break;\n const pv = previewOf(block, item, idx, block.title);\n frames.push({\n path: itemPath, kind: \"block\", title: pv.empty ? block.title : pv.title, icon: block.icon, fields: block.fields,\n fieldsets: block.fieldsets, groups: block.groups, field: f,\n item: { arrayPath: here, index: idx, count: items.length, block, slotField: f },\n });\n fields = block.fields;\n }\n i += 2;\n continue;\n }\n break;\n }\n return { frames, path: frames.length > 1 ? frames[frames.length - 1].path : [] };\n}\n\n/** Can this field be opened as its own frame (drill target)? */\nexport const isDrillable = (f: FieldSchema) => f.type === \"object\" || f.type === \"button\";\n"],"mappings":";;;;;;;;;;AAiCA,SAAgB,UAAU,QAA2B;CACnD,OAAO;EAAE,MAAM,CAAC;EAAG,MAAM;EAAQ,OAAO,OAAO;EAAO,MAAM,OAAO;EAAM,QAAQ,OAAO;EAAQ,WAAW,OAAO;EAAW,QAAQ,OAAO;CAAO;AACrJ;;AAGA,SAAgB,cACd,QACA,OACA,MACA,eACsC;CACtC,MAAM,SAAkB,CAAC,UAAU,MAAM,CAAC;CAC1C,IAAI,SAAS,OAAO;CACpB,IAAI,IAAI;CACR,OAAO,IAAI,KAAK,QAAQ;EACtB,MAAM,MAAM,KAAK;EACjB,IAAI,OAAO,QAAQ,UAAU;EAC7B,MAAM,IAAI,OAAO,MAAM,MAAM,EAAE,SAAS,GAAG;EAC3C,IAAI,CAAC,GAAG;EACR,MAAM,OAAO,KAAK,MAAM,GAAG,IAAI,CAAC;EAChC,IAAI,KAAK,IAAI,OAAA,YAAwB;GACnC,OAAO,KAAK;IAAE,MAAM,CAAC,GAAG,MAAM,eAAe;IAAG,MAAM;IAAW,OAAO;IAAW,MAAM;IAAS,QAAQ,CAAC,CAAC;IAAG,OAAO;GAAE,CAAC;GACzH,KAAK;GACL;EACF;EACA,IAAI,EAAE,SAAS,YAAY,EAAE,QAAQ;GACnC,OAAO,KAAK;IAAE,MAAM;IAAM,MAAM;IAAU,OAAO,EAAE;IAAO,MAAM,EAAE;IAAM,QAAQ,EAAE;IAAQ,OAAO;GAAE,CAAC;GACpG,SAAS,EAAE;GACX,KAAK;GACL;EACF;EACA,IAAI,EAAE,SAAS,UAAU;GACvB,OAAO,KAAK;IAAE,MAAM;IAAM,MAAM;IAAU,OAAO,EAAE;IAAO,MAAM;IAAS,QAAQ,CAAC,CAAC;IAAG,OAAO;GAAE,CAAC;GAChG,KAAK;GAEL,IAAI,KAAK,OAAA,YAAwB;IAC/B,OAAO,KAAK;KAAE,MAAM,CAAC,GAAG,MAAM,eAAe;KAAG,MAAM;KAAW,OAAO;KAAW,MAAM;KAAS,QAAQ,CAAC,CAAC;KAAG,OAAO;IAAE,CAAC;IACzH,KAAK;GACP;GACA;EACF;EAGA,IAAI,EAAE,SAAS,YAAY,KAAK,IAAI,OAAO,UAAU,KAAK,IAAI,OAAO,cAAc,OAAO,KAAK,IAAI,OAAO,UAAU;GAClH,MAAM,MAAM,MAAM,OAAO,IAAI;GAC7B,IAAI,CAAC,aAAa,GAAG,GAAG;GACxB,MAAM,IAAI,eAAe,GAAG;GAC5B,MAAM,MAAM,KAAK,IAAI;GACrB,MAAM,YAAY,CAAC,GAAG,MAAM,KAAK,IAAI,EAAE;GACvC,IAAI,KAAK,IAAI,OAAO,QAAQ;IAC1B,MAAM,MAAM,EAAE,KAAK;IACnB,IAAI,CAAC,KAAK;IACV,MAAM,QAAQ,IAAI,SAAS,CAAC,IAAI,SAAS,EAAE,WAAW,MAAM,MAAM,EAAE,SAAS,IAAI,KAAK,IAAI,KAAA;IAC1F,IAAI,OAAO,OAAO,KAAK;KAAE,MAAM;KAAM,MAAM;KAAc,OAAO,MAAM,SAAS;KAAkB,MAAM;KAAU,QAAQ,CAAC;KAAG,OAAO;IAAE,CAAC;IACvI,MAAM,QAAQ,EAAE,QAAQ;IACxB,MAAM,WAAW,MAAc;KAC7B,MAAM,IAAI,EAAE,KAAK;KACjB,OAAQ,KAAK,SAAS,SAAS,OAAO,GAAG,EAAE,MAAM,MAAM,KAAK,KAAM;IACpE;IACA,OAAO,KAAK;KACV,MAAM,CAAC,GAAG,WAAW,GAAG;KAAG,MAAM;KAAY,OAAO,QAAQ,GAAG;KAAG,MAAM;KAAQ,QAAQ,CAAC;KAAG,OAAO;KACnG,MAAM;MAAE;MAAW,OAAO;MAAK,OAAO,EAAE,KAAK;MAAQ,YAAY;OAAE,MAAM;OAAO,OAAO;OAAO,MAAM;MAAS;MAAG;KAAQ;IAC1H,CAAC;GACH,OAAO;IAEL,IAAI,CADQ,EAAE,QAAQ,MACZ;IACV,MAAM,WAAW,MAAc,EAAE,QAAQ,EAAE,EAAE,SAAS;IACtD,OAAO,KAAK;KACV,MAAM,CAAC,GAAG,WAAW,GAAG;KAAG,MAAM;KAAe,OAAO,QAAQ,GAAG;KAAG,MAAM;KAAkB,QAAQ,CAAC;KAAG,OAAO;KAChH,MAAM;MAAE;MAAW,OAAO;MAAK,OAAO,EAAE,QAAQ;MAAQ,YAAY;OAAE,MAAM;OAAU,OAAO;OAAU,MAAM;MAAS;MAAG;KAAQ;IACnI,CAAC;GACH;GACA,KAAK;GACL;EACF;EACA,KAAK,EAAE,SAAS,WAAW,EAAE,SAAS,WAAW,OAAO,KAAK,IAAI,OAAO,UAAU;GAChF,MAAM,MAAM,KAAK,IAAI;GACrB,MAAM,OAAO,MAAM,OAAO,IAAI;GAC9B,MAAM,QAAQ,MAAM,QAAQ,IAAI,IAAI,OAAO,CAAC;GAC5C,MAAM,OAAO,MAAM;GACnB,IAAI,SAAS,KAAA,GAAW;GACxB,MAAM,WAAW,CAAC,GAAG,MAAM,GAAG;GAC9B,IAAI,EAAE,SAAS,SAAS;IACtB,MAAM,IAAI,cAAc,GAAG,IAAI;IAC/B,IAAI,CAAC,KAAK,YAAY,EAAE,IAAI,KAAK,CAAC,EAAE,QAAQ;IAC5C,MAAM,KAAK,UAAU,GAAG,MAAM,GAAG;IACjC,OAAO,KAAK;KACV,MAAM;KAAU,MAAM;KAAQ,OAAO,GAAG;KAAO,MAAM,EAAE,QAAQ,EAAE;KAAM,QAAQ,EAAE;KAAQ,OAAO;KAChG,MAAM;MAAE,WAAW;MAAM,OAAO;MAAK,OAAO,MAAM;MAAQ,YAAY;KAAE;IAC1E,CAAC;IACD,SAAS,EAAE;GACb,OAAO;IACL,MAAM,OAAO,MAAM,IAAI,KAAK,OAAO,KAAK,UAAU,WAAW,KAAK,QAAQ;IAC1E,MAAM,QAAQ,gBAAgB,IAAI;IAClC,IAAI,CAAC,OAAO;IACZ,MAAM,KAAK,UAAU,OAAO,MAAM,KAAK,MAAM,KAAK;IAClD,OAAO,KAAK;KACV,MAAM;KAAU,MAAM;KAAS,OAAO,GAAG,QAAQ,MAAM,QAAQ,GAAG;KAAO,MAAM,MAAM;KAAM,QAAQ,MAAM;KACzG,WAAW,MAAM;KAAW,QAAQ,MAAM;KAAQ,OAAO;KACzD,MAAM;MAAE,WAAW;MAAM,OAAO;MAAK,OAAO,MAAM;MAAQ;MAAO,WAAW;KAAE;IAChF,CAAC;IACD,SAAS,MAAM;GACjB;GACA,KAAK;GACL;EACF;EACA;CACF;CACA,OAAO;EAAE;EAAQ,MAAM,OAAO,SAAS,IAAI,OAAO,OAAO,SAAS,EAAE,CAAC,OAAO,CAAC;CAAE;AACjF;;AAGA,IAAa,eAAe,MAAmB,EAAE,SAAS,YAAY,EAAE,SAAS"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Is this image field an ICON? The image control draws one 32px row for it instead of a picture card, the field shell
|
|
3
|
+
* gives it no second label, and the field lists gather two or more into one "Icons" group. One rule for all three, so
|
|
4
|
+
* they never disagree.
|
|
5
|
+
*
|
|
6
|
+
* Only `svgOnly`, which the schema adapter sets from the import's `media: "icon"` stamp (and nothing else sets). An SVG
|
|
7
|
+
* alone is not an icon: a site's SVG logo keeps its picture, alt text and details.
|
|
8
|
+
*/
|
|
9
|
+
import type { FieldSchema } from "../schema/types";
|
|
10
|
+
export declare function isIconImage(field: FieldSchema, _value?: unknown): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icon-image.js","names":[],"sources":["../../src/lib/icon-image.ts"],"sourcesContent":["/**\n * Is this image field an ICON? The image control draws one 32px row for it instead of a picture card, the field shell\n * gives it no second label, and the field lists gather two or more into one \"Icons\" group. One rule for all three, so\n * they never disagree.\n *\n * Only `svgOnly`, which the schema adapter sets from the import's `media: \"icon\"` stamp (and nothing else sets). An SVG\n * alone is not an icon: a site's SVG logo keeps its picture, alt text and details.\n */\nimport type { FieldSchema } from \"../schema/types\";\n\nexport function isIconImage(field: FieldSchema, _value?: unknown): boolean {\n return field.type === \"image\" && field.svgOnly === true;\n}\n"],"mappings":";AAUA,SAAgB,YAAY,OAAoB,QAA2B;CACzE,OAAO,MAAM,SAAS,WAAW,MAAM,YAAY;AACrD"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Icon names in schemas are kebab-case Tabler names ("help-circle", "layout-grid"). Catalog data still
|
|
3
|
+
* carries lucide-style names ("CircleHelp", "LayoutGrid"); `kitIcon()` resolves both.
|
|
4
|
+
* The curated set doubles as the icon picker's library (explicit imports keep the bundle small).
|
|
5
|
+
*/
|
|
6
|
+
import { type Icon } from "@tabler/icons-react";
|
|
7
|
+
export declare const KIT_ICONS: Record<string, Icon>;
|
|
8
|
+
export declare function iconKey(name?: string): string | undefined;
|
|
9
|
+
/** Render a schema icon by name. Falls back to `fallback` (default: a neutral square). */
|
|
10
|
+
export declare function KitIcon({ name, className, fallback }: {
|
|
11
|
+
name?: string;
|
|
12
|
+
className?: string;
|
|
13
|
+
fallback?: string;
|
|
14
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
/** Human label for an icon key: "help-circle" → "Help circle". */
|
|
16
|
+
export declare const iconLabel: (k: string) => string;
|