@bettercms-ai/kit 0.1.1 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -16
- package/dist/_virtual/_rolldown/runtime.js +13 -0
- package/dist/adapters/dock-values.d.ts +28 -0
- package/dist/adapters/dock-values.js +41 -0
- package/dist/adapters/dock-values.js.map +1 -0
- package/dist/adapters/icons.d.ts +15 -0
- package/dist/adapters/icons.js +27 -0
- package/dist/adapters/icons.js.map +1 -0
- package/dist/adapters/lossy.d.ts +326 -0
- package/dist/adapters/lossy.js +414 -0
- package/dist/adapters/lossy.js.map +1 -0
- package/dist/adapters/prod-types.d.ts +546 -0
- package/dist/adapters/prod-types.js +714 -0
- package/dist/adapters/prod-types.js.map +1 -0
- package/dist/adapters/schema.d.ts +154 -0
- package/dist/adapters/schema.js +3020 -0
- package/dist/adapters/schema.js.map +1 -0
- package/dist/adapters/values.d.ts +221 -0
- package/dist/adapters/values.js +623 -0
- package/dist/adapters/values.js.map +1 -0
- package/dist/brand/logo.d.ts +17 -0
- package/dist/brand/logo.js +96 -0
- package/dist/brand/logo.js.map +1 -0
- package/dist/context.d.ts +359 -0
- package/dist/context.js +217 -0
- package/dist/context.js.map +1 -0
- package/dist/controls/button.d.ts +72 -0
- package/dist/controls/button.js +578 -0
- package/dist/controls/button.js.map +1 -0
- package/dist/controls/c1.d.ts +11 -0
- package/dist/controls/c1.js +24 -0
- package/dist/controls/c1.js.map +1 -0
- package/dist/controls/c2.d.ts +10 -0
- package/dist/controls/c2.js +19 -0
- package/dist/controls/c2.js.map +1 -0
- package/dist/controls/choice.d.ts +44 -0
- package/dist/controls/choice.js +463 -0
- package/dist/controls/choice.js.map +1 -0
- package/dist/controls/code-register.d.ts +1 -0
- package/dist/controls/code-register.js +8 -0
- package/dist/controls/code-register.js.map +1 -0
- package/dist/controls/code.d.ts +42 -0
- package/dist/controls/code.js +397 -0
- package/dist/controls/code.js.map +1 -0
- package/dist/controls/color.d.ts +5 -0
- package/dist/controls/color.js +130 -0
- package/dist/controls/color.js.map +1 -0
- package/dist/controls/component-services.d.ts +156 -0
- package/dist/controls/component-services.js +7 -0
- package/dist/controls/component-services.js.map +1 -0
- package/dist/controls/date-register.d.ts +1 -0
- package/dist/controls/date-register.js +9 -0
- package/dist/controls/date-register.js.map +1 -0
- package/dist/controls/date-zone.d.ts +104 -0
- package/dist/controls/date-zone.js +278 -0
- package/dist/controls/date-zone.js.map +1 -0
- package/dist/controls/date.d.ts +7 -0
- package/dist/controls/date.js +466 -0
- package/dist/controls/date.js.map +1 -0
- package/dist/controls/form-picker-register.d.ts +1 -0
- package/dist/controls/form-picker-register.js +19 -0
- package/dist/controls/form-picker-register.js.map +1 -0
- package/dist/controls/form-picker.d.ts +43 -0
- package/dist/controls/form-picker.js +85 -0
- package/dist/controls/form-picker.js.map +1 -0
- package/dist/controls/icon-register.d.ts +1 -0
- package/dist/controls/icon-register.js +8 -0
- package/dist/controls/icon-register.js.map +1 -0
- package/dist/controls/icon.d.ts +40 -0
- package/dist/controls/icon.js +360 -0
- package/dist/controls/icon.js.map +1 -0
- package/dist/controls/index.d.ts +5 -0
- package/dist/controls/index.js +38 -0
- package/dist/controls/index.js.map +1 -0
- package/dist/controls/json-register.d.ts +1 -0
- package/dist/controls/json-register.js +8 -0
- package/dist/controls/json-register.js.map +1 -0
- package/dist/controls/json.d.ts +2 -0
- package/dist/controls/json.js +82 -0
- package/dist/controls/json.js.map +1 -0
- package/dist/controls/link.d.ts +260 -0
- package/dist/controls/link.js +1186 -0
- package/dist/controls/link.js.map +1 -0
- package/dist/controls/location-register.d.ts +1 -0
- package/dist/controls/location-register.js +8 -0
- package/dist/controls/location-register.js.map +1 -0
- package/dist/controls/location.d.ts +16 -0
- package/dist/controls/location.js +221 -0
- package/dist/controls/location.js.map +1 -0
- package/dist/controls/media-register.d.ts +1 -0
- package/dist/controls/media-register.js +12 -0
- package/dist/controls/media-register.js.map +1 -0
- package/dist/controls/media-services.d.ts +46 -0
- package/dist/controls/media-services.js +0 -0
- package/dist/controls/media.d.ts +104 -0
- package/dist/controls/media.js +1396 -0
- package/dist/controls/media.js.map +1 -0
- package/dist/controls/number.d.ts +22 -0
- package/dist/controls/number.js +196 -0
- package/dist/controls/number.js.map +1 -0
- package/dist/controls/reference-register.d.ts +1 -0
- package/dist/controls/reference-register.js +10 -0
- package/dist/controls/reference-register.js.map +1 -0
- package/dist/controls/reference-services.d.ts +58 -0
- package/dist/controls/reference-services.js +0 -0
- package/dist/controls/reference.d.ts +23 -0
- package/dist/controls/reference.js +777 -0
- package/dist/controls/reference.js.map +1 -0
- package/dist/controls/rich-text/blocks.d.ts +49 -0
- package/dist/controls/rich-text/blocks.js +1859 -0
- package/dist/controls/rich-text/blocks.js.map +1 -0
- package/dist/controls/rich-text/catalog.d.ts +101 -0
- package/dist/controls/rich-text/catalog.js +623 -0
- package/dist/controls/rich-text/catalog.js.map +1 -0
- package/dist/controls/rich-text/codec.d.ts +64 -0
- package/dist/controls/rich-text/codec.js +34 -0
- package/dist/controls/rich-text/codec.js.map +1 -0
- package/dist/controls/rich-text/component-card.d.ts +14 -0
- package/dist/controls/rich-text/component-card.js +1024 -0
- package/dist/controls/rich-text/component-card.js.map +1 -0
- package/dist/controls/rich-text/component-panel.d.ts +47 -0
- package/dist/controls/rich-text/component-panel.js +141 -0
- package/dist/controls/rich-text/component-panel.js.map +1 -0
- package/dist/controls/rich-text/control.d.ts +20 -0
- package/dist/controls/rich-text/control.js +296 -0
- package/dist/controls/rich-text/control.js.map +1 -0
- package/dist/controls/rich-text/dom.d.ts +233 -0
- package/dist/controls/rich-text/dom.js +1019 -0
- package/dist/controls/rich-text/dom.js.map +1 -0
- package/dist/controls/rich-text/editor.d.ts +57 -0
- package/dist/controls/rich-text/editor.js +1630 -0
- package/dist/controls/rich-text/editor.js.map +1 -0
- package/dist/controls/rich-text/floating.d.ts +28 -0
- package/dist/controls/rich-text/floating.js +154 -0
- package/dist/controls/rich-text/floating.js.map +1 -0
- package/dist/controls/rich-text/index.d.ts +1 -0
- package/dist/controls/rich-text/index.js +12 -0
- package/dist/controls/rich-text/index.js.map +1 -0
- package/dist/controls/rich-text/link-form.d.ts +13 -0
- package/dist/controls/rich-text/link-form.js +147 -0
- package/dist/controls/rich-text/link-form.js.map +1 -0
- package/dist/controls/rich-text/markdown.d.ts +6 -0
- package/dist/controls/rich-text/markdown.js +181 -0
- package/dist/controls/rich-text/markdown.js.map +1 -0
- package/dist/controls/rich-text/ops.d.ts +35 -0
- package/dist/controls/rich-text/ops.js +316 -0
- package/dist/controls/rich-text/ops.js.map +1 -0
- package/dist/controls/rich-text/plain.d.ts +17 -0
- package/dist/controls/rich-text/plain.js +44 -0
- package/dist/controls/rich-text/plain.js.map +1 -0
- package/dist/controls/rich-text/toolbar.d.ts +89 -0
- package/dist/controls/rich-text/toolbar.js +343 -0
- package/dist/controls/rich-text/toolbar.js.map +1 -0
- package/dist/controls/scale.d.ts +56 -0
- package/dist/controls/scale.js +563 -0
- package/dist/controls/scale.js.map +1 -0
- package/dist/controls/slot-register.d.ts +1 -0
- package/dist/controls/slot-register.js +16 -0
- package/dist/controls/slot-register.js.map +1 -0
- package/dist/controls/slot-services.d.ts +122 -0
- package/dist/controls/slot-services.js +155 -0
- package/dist/controls/slot-services.js.map +1 -0
- package/dist/controls/slot.d.ts +33 -0
- package/dist/controls/slot.js +366 -0
- package/dist/controls/slot.js.map +1 -0
- package/dist/controls/table/index.d.ts +1 -0
- package/dist/controls/table/index.js +12 -0
- package/dist/controls/table/index.js.map +1 -0
- package/dist/controls/table/prod.d.ts +21 -0
- package/dist/controls/table/prod.js +79 -0
- package/dist/controls/table/prod.js.map +1 -0
- package/dist/controls/table/refs.d.ts +50 -0
- package/dist/controls/table/refs.js +79 -0
- package/dist/controls/table/refs.js.map +1 -0
- package/dist/controls/table/stored.d.ts +15 -0
- package/dist/controls/table/stored.js +44 -0
- package/dist/controls/table/stored.js.map +1 -0
- package/dist/controls/table/table-editor.d.ts +103 -0
- package/dist/controls/table/table-editor.js +2725 -0
- package/dist/controls/table/table-editor.js.map +1 -0
- package/dist/controls/table/table-link.d.ts +24 -0
- package/dist/controls/table/table-link.js +180 -0
- package/dist/controls/table/table-link.js.map +1 -0
- package/dist/controls/table/table.d.ts +9 -0
- package/dist/controls/table/table.js +103 -0
- package/dist/controls/table/table.js.map +1 -0
- package/dist/controls/text.d.ts +17 -0
- package/dist/controls/text.js +322 -0
- package/dist/controls/text.js.map +1 -0
- package/dist/controls/unknown-value.d.ts +17 -0
- package/dist/controls/unknown-value.js +66 -0
- package/dist/controls/unknown-value.js.map +1 -0
- package/dist/core/core.d.ts +63 -0
- package/dist/core/core.js +171 -0
- package/dist/core/core.js.map +1 -0
- package/dist/core/facets.d.ts +347 -0
- package/dist/core/facets.js +334 -0
- package/dist/core/facets.js.map +1 -0
- package/dist/core/index.d.ts +3 -0
- package/dist/core/index.js +3 -0
- package/dist/engine/array.d.ts +101 -0
- package/dist/engine/array.js +906 -0
- package/dist/engine/array.js.map +1 -0
- package/dist/engine/bits.d.ts +24 -0
- package/dist/engine/bits.js +60 -0
- package/dist/engine/bits.js.map +1 -0
- package/dist/engine/breadcrumb.d.ts +45 -0
- package/dist/engine/breadcrumb.js +63 -0
- package/dist/engine/breadcrumb.js.map +1 -0
- package/dist/engine/expand.d.ts +66 -0
- package/dist/engine/expand.js +153 -0
- package/dist/engine/expand.js.map +1 -0
- package/dist/engine/field-list.d.ts +20 -0
- package/dist/engine/field-list.js +19 -0
- package/dist/engine/field-list.js.map +1 -0
- package/dist/engine/field-shell.d.ts +49 -0
- package/dist/engine/field-shell.js +988 -0
- package/dist/engine/field-shell.js.map +1 -0
- package/dist/engine/frame.d.ts +122 -0
- package/dist/engine/frame.js +601 -0
- package/dist/engine/frame.js.map +1 -0
- package/dist/engine/group-summary.d.ts +5 -0
- package/dist/engine/group-summary.js +70 -0
- package/dist/engine/group-summary.js.map +1 -0
- package/dist/engine/grouping.d.ts +238 -0
- package/dist/engine/grouping.js +996 -0
- package/dist/engine/grouping.js.map +1 -0
- package/dist/engine/item-list.d.ts +99 -0
- package/dist/engine/item-list.js +725 -0
- package/dist/engine/item-list.js.map +1 -0
- package/dist/engine/kit-field.d.ts +72 -0
- package/dist/engine/kit-field.js +558 -0
- package/dist/engine/kit-field.js.map +1 -0
- package/dist/engine/schema-form.d.ts +116 -0
- package/dist/engine/schema-form.js +462 -0
- package/dist/engine/schema-form.js.map +1 -0
- package/dist/engine/slot.d.ts +13 -0
- package/dist/engine/slot.js +216 -0
- package/dist/engine/slot.js.map +1 -0
- package/dist/index.d.ts +45 -3139
- package/dist/index.js +47 -2036
- package/dist/index.js.map +1 -0
- package/dist/kit.css +75 -0
- package/dist/lib/cn.d.ts +4 -0
- package/dist/lib/cn.js +56 -0
- package/dist/lib/cn.js.map +1 -0
- package/dist/lib/columns.d.ts +14 -0
- package/dist/lib/columns.js +30 -0
- package/dist/lib/columns.js.map +1 -0
- package/dist/lib/frames.d.ts +36 -0
- package/dist/lib/frames.js +214 -0
- package/dist/lib/frames.js.map +1 -0
- package/dist/lib/icon-image.d.ts +10 -0
- package/dist/lib/icon-image.js +8 -0
- package/dist/lib/icon-image.js.map +1 -0
- package/dist/lib/icons.d.ts +16 -0
- package/dist/lib/icons.js +173 -0
- package/dist/lib/icons.js.map +1 -0
- package/dist/lib/input-modality.d.ts +11 -0
- package/dist/lib/input-modality.js +47 -0
- package/dist/lib/input-modality.js.map +1 -0
- package/dist/lib/key-event.d.ts +11 -0
- package/dist/lib/key-event.js +16 -0
- package/dist/lib/key-event.js.map +1 -0
- package/dist/lib/path.d.ts +29 -0
- package/dist/lib/path.js +66 -0
- package/dist/lib/path.js.map +1 -0
- package/dist/lib/schema.d.ts +80 -0
- package/dist/lib/schema.js +384 -0
- package/dist/lib/schema.js.map +1 -0
- package/dist/lib/utils.d.ts +7 -0
- package/dist/lib/utils.js +37 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/lib/validate.d.ts +30 -0
- package/dist/lib/validate.js +224 -0
- package/dist/lib/validate.js.map +1 -0
- package/dist/library/analysis.d.ts +23 -0
- package/dist/library/analysis.js +160 -0
- package/dist/library/analysis.js.map +1 -0
- package/dist/library/catalog.d.ts +57 -0
- package/dist/library/catalog.js +307 -0
- package/dist/library/catalog.js.map +1 -0
- package/dist/library/coreNotes.d.ts +8 -0
- package/dist/library/coreNotes.js +111 -0
- package/dist/library/coreNotes.js.map +1 -0
- package/dist/library/coverage.d.ts +40 -0
- package/dist/library/coverage.js +59 -0
- package/dist/library/coverage.js.map +1 -0
- package/dist/library/entries/advanced.entries.d.ts +2 -0
- package/dist/library/entries/advanced.entries.js +6579 -0
- package/dist/library/entries/advanced.entries.js.map +1 -0
- package/dist/library/entries/commerce.entries.d.ts +2 -0
- package/dist/library/entries/commerce.entries.js +4140 -0
- package/dist/library/entries/commerce.entries.js.map +1 -0
- package/dist/library/entries/company.entries.d.ts +2 -0
- package/dist/library/entries/company.entries.js +2731 -0
- package/dist/library/entries/company.entries.js.map +1 -0
- package/dist/library/entries/conversion.entries.d.ts +2 -0
- package/dist/library/entries/conversion.entries.js +3707 -0
- package/dist/library/entries/conversion.entries.js.map +1 -0
- package/dist/library/entries/data.entries.d.ts +7 -0
- package/dist/library/entries/data.entries.js +4613 -0
- package/dist/library/entries/data.entries.js.map +1 -0
- package/dist/library/entries/events.entries.d.ts +2 -0
- package/dist/library/entries/events.entries.js +3428 -0
- package/dist/library/entries/events.entries.js.map +1 -0
- package/dist/library/entries/features.entries.d.ts +2 -0
- package/dist/library/entries/features.entries.js +3157 -0
- package/dist/library/entries/features.entries.js.map +1 -0
- package/dist/library/entries/heroes.entries.d.ts +2 -0
- package/dist/library/entries/heroes.entries.js +3401 -0
- package/dist/library/entries/heroes.entries.js.map +1 -0
- package/dist/library/entries/index.d.ts +3 -0
- package/dist/library/entries/index.js +35 -0
- package/dist/library/entries/index.js.map +1 -0
- package/dist/library/entries/listings.entries.d.ts +2 -0
- package/dist/library/entries/listings.entries.js +2976 -0
- package/dist/library/entries/listings.entries.js.map +1 -0
- package/dist/library/entries/longform.entries.d.ts +2 -0
- package/dist/library/entries/longform.entries.js +4227 -0
- package/dist/library/entries/longform.entries.js.map +1 -0
- package/dist/library/entries/media.entries.d.ts +2 -0
- package/dist/library/entries/media.entries.js +2781 -0
- package/dist/library/entries/media.entries.js.map +1 -0
- package/dist/library/entries/navigation.entries.d.ts +2 -0
- package/dist/library/entries/navigation.entries.js +4011 -0
- package/dist/library/entries/navigation.entries.js.map +1 -0
- package/dist/library/entries/pricing.entries.d.ts +2 -0
- package/dist/library/entries/pricing.entries.js +2383 -0
- package/dist/library/entries/pricing.entries.js.map +1 -0
- package/dist/library/entries/social-proof.entries.d.ts +2 -0
- package/dist/library/entries/social-proof.entries.js +2297 -0
- package/dist/library/entries/social-proof.entries.js.map +1 -0
- package/dist/library/examples/bento.d.ts +92 -0
- package/dist/library/examples/bento.js +201 -0
- package/dist/library/examples/bento.js.map +1 -0
- package/dist/library/examples/blocks.d.ts +14 -0
- package/dist/library/examples/blocks.js +313 -0
- package/dist/library/examples/blocks.js.map +1 -0
- package/dist/library/examples/faq.d.ts +28 -0
- package/dist/library/examples/faq.js +230 -0
- package/dist/library/examples/faq.js.map +1 -0
- package/dist/library/examples/hero.d.ts +43 -0
- package/dist/library/examples/hero.js +222 -0
- package/dist/library/examples/hero.js.map +1 -0
- package/dist/library/examples/index.d.ts +36 -0
- package/dist/library/examples/index.js +109 -0
- package/dist/library/examples/index.js.map +1 -0
- package/dist/library/examples/journalStory.d.ts +93 -0
- package/dist/library/examples/journalStory.js +338 -0
- package/dist/library/examples/journalStory.js.map +1 -0
- package/dist/library/examples/megaMenu.d.ts +134 -0
- package/dist/library/examples/megaMenu.js +442 -0
- package/dist/library/examples/megaMenu.js.map +1 -0
- package/dist/library/examples/pricing.d.ts +103 -0
- package/dist/library/examples/pricing.js +479 -0
- package/dist/library/examples/pricing.js.map +1 -0
- package/dist/library/examples/tabs.d.ts +87 -0
- package/dist/library/examples/tabs.js +180 -0
- package/dist/library/examples/tabs.js.map +1 -0
- package/dist/library/export.d.ts +42 -0
- package/dist/library/export.js +80 -0
- package/dist/library/export.js.map +1 -0
- package/dist/library/index.d.ts +13 -0
- package/dist/library/index.js +6 -0
- package/dist/library/kit-catalog.json +1510 -0
- package/dist/library/types.d.ts +42 -0
- package/dist/library/types.js +0 -0
- package/dist/schema/adapters.d.ts +28 -0
- package/dist/schema/adapters.js +492 -0
- package/dist/schema/adapters.js.map +1 -0
- package/dist/schema/help.d.ts +27 -0
- package/dist/schema/help.js +56 -0
- package/dist/schema/help.js.map +1 -0
- package/dist/schema/scale.d.ts +69 -0
- package/dist/schema/scale.js +250 -0
- package/dist/schema/scale.js.map +1 -0
- package/dist/schema/sources.d.ts +103 -0
- package/dist/schema/sources.js +65 -0
- package/dist/schema/sources.js.map +1 -0
- package/dist/schema/table.d.ts +319 -0
- package/dist/schema/table.js +1199 -0
- package/dist/schema/table.js.map +1 -0
- package/dist/schema/types.d.ts +297 -0
- package/dist/schema/types.js +14 -0
- package/dist/schema/types.js.map +1 -0
- package/dist/styles.css +2 -0
- package/dist/table/table-view.d.ts +14 -0
- package/dist/table/table-view.js +140 -0
- package/dist/table/table-view.js.map +1 -0
- package/dist/table/table.css +73 -0
- package/dist/testing/corpus.d.ts +63 -0
- package/dist/testing/corpus.js +129 -0
- package/dist/testing/corpus.js.map +1 -0
- package/dist/testing/test-form.d.ts +11 -0
- package/dist/testing/test-form.js +38 -0
- package/dist/testing/test-form.js.map +1 -0
- package/dist/theme.css +345 -0
- package/dist/theme.d.ts +20 -1504
- package/dist/theme.js +43 -4126
- package/dist/theme.js.map +1 -0
- package/dist/tokens.css +542 -0
- package/dist/types.d.ts +17 -0
- package/dist/types.js +0 -0
- package/dist/ui/action-tray.d.ts +54 -0
- package/dist/ui/action-tray.js +154 -0
- package/dist/ui/action-tray.js.map +1 -0
- package/dist/ui/autocomplete.d.ts +30 -0
- package/dist/ui/autocomplete.js +139 -0
- package/dist/ui/autocomplete.js.map +1 -0
- package/dist/ui/button.d.ts +57 -0
- package/dist/ui/button.js +201 -0
- package/dist/ui/button.js.map +1 -0
- package/dist/ui/choice-switch.d.ts +36 -0
- package/dist/ui/choice-switch.js +57 -0
- package/dist/ui/choice-switch.js.map +1 -0
- package/dist/ui/controls.d.ts +83 -0
- package/dist/ui/controls.js +331 -0
- package/dist/ui/controls.js.map +1 -0
- package/dist/ui/display.d.ts +163 -0
- package/dist/ui/display.js +455 -0
- package/dist/ui/display.js.map +1 -0
- package/dist/ui/expanded-editor-modal.d.ts +26 -0
- package/dist/ui/expanded-editor-modal.js +140 -0
- package/dist/ui/expanded-editor-modal.js.map +1 -0
- package/dist/ui/field-context.d.ts +12 -0
- package/dist/ui/field-context.js +23 -0
- package/dist/ui/field-context.js.map +1 -0
- package/dist/ui/floating-panel.d.ts +152 -0
- package/dist/ui/floating-panel.js +928 -0
- package/dist/ui/floating-panel.js.map +1 -0
- package/dist/ui/index.d.ts +16 -0
- package/dist/ui/index.js +18 -0
- package/dist/ui/input.d.ts +78 -0
- package/dist/ui/input.js +250 -0
- package/dist/ui/input.js.map +1 -0
- package/dist/ui/mode-bar.d.ts +31 -0
- package/dist/ui/mode-bar.js +65 -0
- package/dist/ui/mode-bar.js.map +1 -0
- package/dist/ui/overlay.d.ts +195 -0
- package/dist/ui/overlay.js +697 -0
- package/dist/ui/overlay.js.map +1 -0
- package/dist/ui/path-crumbs.d.ts +90 -0
- package/dist/ui/path-crumbs.js +566 -0
- package/dist/ui/path-crumbs.js.map +1 -0
- package/dist/ui/presence.d.ts +16 -0
- package/dist/ui/presence.js +65 -0
- package/dist/ui/presence.js.map +1 -0
- package/dist/ui/select.d.ts +66 -0
- package/dist/ui/select.js +407 -0
- package/dist/ui/select.js.map +1 -0
- package/dist/ui/shortcut-hint.d.ts +14 -0
- package/dist/ui/shortcut-hint.js +35 -0
- package/dist/ui/shortcut-hint.js.map +1 -0
- package/dist/ui/spinner.d.ts +24 -0
- package/dist/ui/spinner.js +42 -0
- package/dist/ui/spinner.js.map +1 -0
- package/dist/ui/split-button.d.ts +32 -0
- package/dist/ui/split-button.js +60 -0
- package/dist/ui/split-button.js.map +1 -0
- package/dist/ui/surfaces.d.ts +23 -0
- package/dist/ui/surfaces.js +26 -0
- package/dist/ui/surfaces.js.map +1 -0
- package/dist/ui/tab.d.ts +38 -0
- package/dist/ui/tab.js +87 -0
- package/dist/ui/tab.js.map +1 -0
- package/dist/ui/toast.d.ts +20 -0
- package/dist/ui/toast.js +115 -0
- package/dist/ui/toast.js.map +1 -0
- package/dist/ui/tooltip-root.d.ts +13 -0
- package/dist/ui/tooltip-root.js +77 -0
- package/dist/ui/tooltip-root.js.map +1 -0
- package/dist/ui/variants.d.ts +15 -0
- package/dist/ui/variants.js +14 -0
- package/dist/ui/variants.js.map +1 -0
- package/package.json +76 -50
- package/LICENSE +0 -21
- package/dist/_chunks-cjs/_visual-editing.js +0 -5898
- package/dist/_chunks-cjs/refractor.js +0 -22
- package/dist/_chunks-es/_visual-editing.mjs +0 -5904
- package/dist/_chunks-es/refractor.mjs +0 -25
- package/dist/_color.d.mts +0 -119
- package/dist/_color.d.ts +0 -119
- package/dist/_color.js +0 -1412
- package/dist/_color.mjs +0 -1411
- package/dist/_visual-editing.d.mts +0 -1126
- package/dist/_visual-editing.d.ts +0 -1126
- package/dist/_visual-editing.js +0 -30
- package/dist/_visual-editing.mjs +0 -30
- package/dist/index.d.mts +0 -3140
- package/dist/index.mjs +0 -2044
- package/dist/theme.d.mts +0 -1506
- package/dist/theme.mjs +0 -4126
- package/exports/_visual-editing.ts +0 -31
- package/exports/index.ts +0 -1
- package/exports/theme.ts +0 -1
- package/src/color/index.d.mts +0 -119
- package/src/color/index.mjs +0 -1411
- package/src/core/__workshop__/constants.ts +0 -293
- package/src/core/_compat.ts +0 -264
- package/src/core/components/autocomplete/__mocks__/apiStore.ts +0 -49
- package/src/core/components/autocomplete/__mocks__/countries.ts +0 -245
- package/src/core/components/autocomplete/__workshop__/async.tsx +0 -156
- package/src/core/components/autocomplete/__workshop__/constrainedHeight.tsx +0 -137
- package/src/core/components/autocomplete/__workshop__/custom.tsx +0 -89
- package/src/core/components/autocomplete/__workshop__/example.tsx +0 -79
- package/src/core/components/autocomplete/__workshop__/focusAndBlur.tsx +0 -36
- package/src/core/components/autocomplete/__workshop__/fullscreen.tsx +0 -294
- package/src/core/components/autocomplete/__workshop__/index.ts +0 -39
- package/src/core/components/autocomplete/__workshop__/types.ts +0 -4
- package/src/core/components/autocomplete/autocomplete.styles.tsx +0 -39
- package/src/core/components/autocomplete/autocomplete.tsx +0 -767
- package/src/core/components/autocomplete/autocompleteOption.tsx +0 -45
- package/src/core/components/autocomplete/autocompleteReducer.ts +0 -47
- package/src/core/components/autocomplete/constants.ts +0 -28
- package/src/core/components/autocomplete/index.ts +0 -2
- package/src/core/components/autocomplete/types.ts +0 -108
- package/src/core/components/breadcrumbs/__workshop__/example.tsx +0 -62
- package/src/core/components/breadcrumbs/__workshop__/index.ts +0 -14
- package/src/core/components/breadcrumbs/breadcrumbs.styles.ts +0 -18
- package/src/core/components/breadcrumbs/breadcrumbs.test.tsx +0 -51
- package/src/core/components/breadcrumbs/breadcrumbs.tsx +0 -133
- package/src/core/components/breadcrumbs/index.ts +0 -1
- package/src/core/components/dialog/__workshop__/activate.tsx +0 -134
- package/src/core/components/dialog/__workshop__/autoFocus.tsx +0 -29
- package/src/core/components/dialog/__workshop__/index.ts +0 -19
- package/src/core/components/dialog/__workshop__/layering.tsx +0 -41
- package/src/core/components/dialog/__workshop__/nested.tsx +0 -72
- package/src/core/components/dialog/__workshop__/onScroll.tsx +0 -39
- package/src/core/components/dialog/__workshop__/panes.tsx +0 -82
- package/src/core/components/dialog/__workshop__/position.tsx +0 -30
- package/src/core/components/dialog/__workshop__/props.tsx +0 -75
- package/src/core/components/dialog/__workshop__/provider.tsx +0 -11
- package/src/core/components/dialog/__workshop__/wrapped.tsx +0 -76
- package/src/core/components/dialog/dialog.tsx +0 -430
- package/src/core/components/dialog/dialogContext.ts +0 -20
- package/src/core/components/dialog/dialogProvider.tsx +0 -35
- package/src/core/components/dialog/index.ts +0 -4
- package/src/core/components/dialog/styles.ts +0 -77
- package/src/core/components/dialog/useDialog.ts +0 -11
- package/src/core/components/hotkeys/__workshop__/index.ts +0 -14
- package/src/core/components/hotkeys/__workshop__/plain.tsx +0 -9
- package/src/core/components/hotkeys/hotkeys.test.tsx +0 -42
- package/src/core/components/hotkeys/hotkeys.tsx +0 -66
- package/src/core/components/hotkeys/index.ts +0 -1
- package/src/core/components/index.ts +0 -9
- package/src/core/components/menu/__workshop__/asComponent.tsx +0 -45
- package/src/core/components/menu/__workshop__/avatarMenu.tsx +0 -51
- package/src/core/components/menu/__workshop__/closableMenuButton.tsx +0 -46
- package/src/core/components/menu/__workshop__/constrainedInBoundary.tsx +0 -134
- package/src/core/components/menu/__workshop__/customMenuItem.tsx +0 -45
- package/src/core/components/menu/__workshop__/customSelectedState.tsx +0 -39
- package/src/core/components/menu/__workshop__/disableFocusOnClose.tsx +0 -40
- package/src/core/components/menu/__workshop__/groups.tsx +0 -156
- package/src/core/components/menu/__workshop__/index.ts +0 -89
- package/src/core/components/menu/__workshop__/menuButton.tsx +0 -80
- package/src/core/components/menu/__workshop__/menuGroupRight.tsx +0 -58
- package/src/core/components/menu/__workshop__/nestedMenu.tsx +0 -22
- package/src/core/components/menu/__workshop__/onCloseMenuButton.tsx +0 -41
- package/src/core/components/menu/__workshop__/selectedItem.tsx +0 -69
- package/src/core/components/menu/__workshop__/shouldFocus.tsx +0 -47
- package/src/core/components/menu/__workshop__/tones.tsx +0 -25
- package/src/core/components/menu/__workshop__/withoutArrow.tsx +0 -32
- package/src/core/components/menu/helpers.ts +0 -82
- package/src/core/components/menu/index.ts +0 -5
- package/src/core/components/menu/menu.spacing.test.tsx +0 -63
- package/src/core/components/menu/menu.test.tsx +0 -125
- package/src/core/components/menu/menu.tsx +0 -178
- package/src/core/components/menu/menuButton.tsx +0 -268
- package/src/core/components/menu/menuContext.ts +0 -18
- package/src/core/components/menu/menuDivider.ts +0 -23
- package/src/core/components/menu/menuGroup.spacing.test.tsx +0 -63
- package/src/core/components/menu/menuGroup.tsx +0 -233
- package/src/core/components/menu/menuItem.spacing.test.tsx +0 -59
- package/src/core/components/menu/menuItem.tsx +0 -197
- package/src/core/components/menu/useMenu.ts +0 -21
- package/src/core/components/menu/useMenuController.ts +0 -231
- package/src/core/components/skeleton/__workshop__/delay.tsx +0 -70
- package/src/core/components/skeleton/__workshop__/index.ts +0 -11
- package/src/core/components/skeleton/__workshop__/skeleton.tsx +0 -64
- package/src/core/components/skeleton/index.ts +0 -2
- package/src/core/components/skeleton/skeleton.tsx +0 -57
- package/src/core/components/skeleton/styles.ts +0 -50
- package/src/core/components/skeleton/textSkeleton.tsx +0 -122
- package/src/core/components/tab/__workshop__/example.tsx +0 -79
- package/src/core/components/tab/__workshop__/index.ts +0 -14
- package/src/core/components/tab/index.ts +0 -3
- package/src/core/components/tab/tab.tsx +0 -101
- package/src/core/components/tab/tabList.test.tsx +0 -48
- package/src/core/components/tab/tabList.tsx +0 -70
- package/src/core/components/tab/tabPanel.tsx +0 -39
- package/src/core/components/toast/__workshop__/hook.tsx +0 -71
- package/src/core/components/toast/__workshop__/index.ts +0 -19
- package/src/core/components/toast/__workshop__/toast.tsx +0 -26
- package/src/core/components/toast/index.ts +0 -4
- package/src/core/components/toast/styles.ts +0 -77
- package/src/core/components/toast/toast.test.tsx +0 -101
- package/src/core/components/toast/toast.tsx +0 -198
- package/src/core/components/toast/toastContext.ts +0 -7
- package/src/core/components/toast/toastLayer.tsx +0 -51
- package/src/core/components/toast/toastProvider.tsx +0 -113
- package/src/core/components/toast/toastState.ts +0 -6
- package/src/core/components/toast/types.ts +0 -26
- package/src/core/components/toast/useToast.ts +0 -25
- package/src/core/components/tree/__workshop__/basic.perf.ts +0 -19
- package/src/core/components/tree/__workshop__/basic.tsx +0 -105
- package/src/core/components/tree/__workshop__/index.ts +0 -21
- package/src/core/components/tree/__workshop__/tabFromElement.tsx +0 -84
- package/src/core/components/tree/helpers.ts +0 -105
- package/src/core/components/tree/index.ts +0 -4
- package/src/core/components/tree/style.ts +0 -105
- package/src/core/components/tree/tree.test.tsx +0 -55
- package/src/core/components/tree/tree.tsx +0 -240
- package/src/core/components/tree/treeContext.ts +0 -10
- package/src/core/components/tree/treeGroup.tsx +0 -28
- package/src/core/components/tree/treeItem.test.tsx +0 -65
- package/src/core/components/tree/treeItem.tsx +0 -224
- package/src/core/components/tree/types.ts +0 -25
- package/src/core/components/tree/useTree.ts +0 -17
- package/src/core/constants.ts +0 -79
- package/src/core/helpers/animation.ts +0 -27
- package/src/core/helpers/element.ts +0 -55
- package/src/core/helpers/focus.ts +0 -100
- package/src/core/helpers/index.ts +0 -4
- package/src/core/helpers/scroll.ts +0 -15
- package/src/core/hooks/index.ts +0 -12
- package/src/core/hooks/useArrayProp.ts +0 -17
- package/src/core/hooks/useClickOutside.test.tsx +0 -482
- package/src/core/hooks/useClickOutside.ts +0 -118
- package/src/core/hooks/useClickOutsideEvent.test.tsx +0 -115
- package/src/core/hooks/useClickOutsideEvent.ts +0 -73
- package/src/core/hooks/useCustomValidity.ts +0 -13
- package/src/core/hooks/useDelayed.test.ts +0 -88
- package/src/core/hooks/useDelayedState.ts +0 -36
- package/src/core/hooks/useElementRect/__workshop__/example.tsx +0 -32
- package/src/core/hooks/useElementRect/__workshop__/index.ts +0 -14
- package/src/core/hooks/useElementRect/index.ts +0 -1
- package/src/core/hooks/useElementRect/useElementRect.ts +0 -13
- package/src/core/hooks/useElementSize.ts +0 -19
- package/src/core/hooks/useForwardedRef.ts +0 -19
- package/src/core/hooks/useGlobalKeyDown.ts +0 -24
- package/src/core/hooks/useIsomorphicEffect.ts +0 -7
- package/src/core/hooks/useMatchMedia.ts +0 -28
- package/src/core/hooks/useMediaIndex/__workshop__/index.ts +0 -14
- package/src/core/hooks/useMediaIndex/__workshop__/test.tsx +0 -14
- package/src/core/hooks/useMediaIndex/index.ts +0 -1
- package/src/core/hooks/useMediaIndex/useMediaIndex.test.tsx +0 -36
- package/src/core/hooks/useMediaIndex/useMediaIndex.ts +0 -102
- package/src/core/hooks/useMounted.ts +0 -15
- package/src/core/hooks/usePrefersDark.hydration.test.tsx +0 -56
- package/src/core/hooks/usePrefersDark.test.tsx +0 -19
- package/src/core/hooks/usePrefersDark.ts +0 -16
- package/src/core/hooks/usePrefersReducedMotion.hydration.test.tsx +0 -56
- package/src/core/hooks/usePrefersReducedMotion.test.tsx +0 -19
- package/src/core/hooks/usePrefersReducedMotion.ts +0 -16
- package/src/core/index.ts +0 -10
- package/src/core/lib/createGlobalScopedContext.ts +0 -36
- package/src/core/lib/globalScope.ts +0 -19
- package/src/core/lib/isRecord.ts +0 -3
- package/src/core/middleware/origin.ts +0 -47
- package/src/core/observers/elementSizeObserver.ts +0 -116
- package/src/core/observers/index.ts +0 -2
- package/src/core/observers/resizeObserver.ts +0 -9
- package/src/core/primitives/_selectable/index.ts +0 -1
- package/src/core/primitives/_selectable/selectable.tsx +0 -15
- package/src/core/primitives/_selectable/style.ts +0 -115
- package/src/core/primitives/avatar/__workshop__/asButton.tsx +0 -14
- package/src/core/primitives/avatar/__workshop__/index.ts +0 -29
- package/src/core/primitives/avatar/__workshop__/stack.tsx +0 -25
- package/src/core/primitives/avatar/__workshop__/withinButton.tsx +0 -63
- package/src/core/primitives/avatar/__workshop__/withinMenuItem.tsx +0 -70
- package/src/core/primitives/avatar/avatar.tsx +0 -200
- package/src/core/primitives/avatar/avatarCounter.tsx +0 -91
- package/src/core/primitives/avatar/avatarStack.tsx +0 -100
- package/src/core/primitives/avatar/index.ts +0 -4
- package/src/core/primitives/avatar/styles.ts +0 -167
- package/src/core/primitives/avatar/types.ts +0 -17
- package/src/core/primitives/badge/__workshop__/index.ts +0 -19
- package/src/core/primitives/badge/__workshop__/props.tsx +0 -30
- package/src/core/primitives/badge/__workshop__/tones.tsx +0 -21
- package/src/core/primitives/badge/badge.test.tsx +0 -16
- package/src/core/primitives/badge/badge.tsx +0 -70
- package/src/core/primitives/badge/index.ts +0 -1
- package/src/core/primitives/badge/styles.ts +0 -20
- package/src/core/primitives/badge/types.ts +0 -8
- package/src/core/primitives/box/__workshop__/asComponent.tsx +0 -31
- package/src/core/primitives/box/__workshop__/index.ts +0 -24
- package/src/core/primitives/box/__workshop__/props.tsx +0 -20
- package/src/core/primitives/box/__workshop__/responsive.tsx +0 -20
- package/src/core/primitives/box/box.test.tsx +0 -142
- package/src/core/primitives/box/box.tsx +0 -154
- package/src/core/primitives/box/index.ts +0 -1
- package/src/core/primitives/button/__workshop__/custom.tsx +0 -51
- package/src/core/primitives/button/__workshop__/customIcons.tsx +0 -30
- package/src/core/primitives/button/__workshop__/disabled.tsx +0 -74
- package/src/core/primitives/button/__workshop__/index.ts +0 -59
- package/src/core/primitives/button/__workshop__/labelUploadButton.tsx +0 -36
- package/src/core/primitives/button/__workshop__/mixedChildren.tsx +0 -12
- package/src/core/primitives/button/__workshop__/props.tsx +0 -55
- package/src/core/primitives/button/__workshop__/stacked.tsx +0 -58
- package/src/core/primitives/button/__workshop__/styled1.tsx +0 -17
- package/src/core/primitives/button/__workshop__/styled2.tsx +0 -19
- package/src/core/primitives/button/__workshop__/uploadButton.tsx +0 -28
- package/src/core/primitives/button/button.test.tsx +0 -82
- package/src/core/primitives/button/button.tsx +0 -210
- package/src/core/primitives/button/index.ts +0 -1
- package/src/core/primitives/button/styles.ts +0 -117
- package/src/core/primitives/card/__workshop__/allTones.tsx +0 -25
- package/src/core/primitives/card/__workshop__/asButton.tsx +0 -107
- package/src/core/primitives/card/__workshop__/asComponent.tsx +0 -27
- package/src/core/primitives/card/__workshop__/checkered.tsx +0 -26
- package/src/core/primitives/card/__workshop__/index.ts +0 -18
- package/src/core/primitives/card/__workshop__/interactive.tsx +0 -30
- package/src/core/primitives/card/__workshop__/listNavigation.tsx +0 -80
- package/src/core/primitives/card/__workshop__/props.tsx +0 -53
- package/src/core/primitives/card/__workshop__/selected.tsx +0 -94
- package/src/core/primitives/card/__workshop__/styled.tsx +0 -14
- package/src/core/primitives/card/card.tsx +0 -128
- package/src/core/primitives/card/index.ts +0 -2
- package/src/core/primitives/card/styles.ts +0 -147
- package/src/core/primitives/card/types.ts +0 -11
- package/src/core/primitives/checkbox/__workshop__/example.tsx +0 -25
- package/src/core/primitives/checkbox/__workshop__/index.ts +0 -13
- package/src/core/primitives/checkbox/__workshop__/props.tsx +0 -33
- package/src/core/primitives/checkbox/__workshop__/readOnly.tsx +0 -16
- package/src/core/primitives/checkbox/__workshop__/tones.tsx +0 -28
- package/src/core/primitives/checkbox/checkbox.tsx +0 -73
- package/src/core/primitives/checkbox/index.ts +0 -1
- package/src/core/primitives/checkbox/styles.ts +0 -128
- package/src/core/primitives/code/__workshop__/index.ts +0 -19
- package/src/core/primitives/code/__workshop__/opticalAlignment.tsx +0 -48
- package/src/core/primitives/code/__workshop__/props.tsx +0 -21
- package/src/core/primitives/code/code.tsx +0 -55
- package/src/core/primitives/code/index.ts +0 -1
- package/src/core/primitives/code/refractor.tsx +0 -20
- package/src/core/primitives/code/styles.ts +0 -77
- package/src/core/primitives/container/__workshop__/example.tsx +0 -20
- package/src/core/primitives/container/__workshop__/index.ts +0 -8
- package/src/core/primitives/container/container.tsx +0 -54
- package/src/core/primitives/container/index.ts +0 -2
- package/src/core/primitives/container/styles.ts +0 -23
- package/src/core/primitives/container/types.ts +0 -6
- package/src/core/primitives/flex/__workshop__/example.tsx +0 -34
- package/src/core/primitives/flex/__workshop__/gap.tsx +0 -25
- package/src/core/primitives/flex/__workshop__/index.ts +0 -11
- package/src/core/primitives/flex/flex.tsx +0 -64
- package/src/core/primitives/flex/index.ts +0 -1
- package/src/core/primitives/grid/__workshop__/index.ts +0 -10
- package/src/core/primitives/grid/__workshop__/responsive.tsx +0 -54
- package/src/core/primitives/grid/grid.test.tsx +0 -80
- package/src/core/primitives/grid/grid.tsx +0 -74
- package/src/core/primitives/grid/index.ts +0 -1
- package/src/core/primitives/heading/__workshop__/index.ts +0 -19
- package/src/core/primitives/heading/__workshop__/opticalAlignment.tsx +0 -54
- package/src/core/primitives/heading/__workshop__/plain.tsx +0 -32
- package/src/core/primitives/heading/heading.tsx +0 -88
- package/src/core/primitives/heading/index.ts +0 -1
- package/src/core/primitives/heading/styles.ts +0 -64
- package/src/core/primitives/heading/types.ts +0 -7
- package/src/core/primitives/index.ts +0 -27
- package/src/core/primitives/inline/__workshop__/index.ts +0 -8
- package/src/core/primitives/inline/__workshop__/plain.tsx +0 -27
- package/src/core/primitives/inline/index.ts +0 -1
- package/src/core/primitives/inline/inline.test.tsx +0 -51
- package/src/core/primitives/inline/inline.tsx +0 -63
- package/src/core/primitives/inline/styles.ts +0 -32
- package/src/core/primitives/inline/types.ts +0 -6
- package/src/core/primitives/kbd/__workshop__/index.ts +0 -8
- package/src/core/primitives/kbd/__workshop__/plain.tsx +0 -9
- package/src/core/primitives/kbd/index.ts +0 -1
- package/src/core/primitives/kbd/kbd.tsx +0 -69
- package/src/core/primitives/label/__workshop__/index.ts +0 -19
- package/src/core/primitives/label/__workshop__/opticalAlignment.tsx +0 -48
- package/src/core/primitives/label/__workshop__/plain.tsx +0 -24
- package/src/core/primitives/label/index.ts +0 -1
- package/src/core/primitives/label/label.tsx +0 -87
- package/src/core/primitives/label/styles.ts +0 -45
- package/src/core/primitives/popover/__workshop__/AlignedStory.tsx +0 -77
- package/src/core/primitives/popover/__workshop__/MarginsStory.tsx +0 -31
- package/src/core/primitives/popover/__workshop__/MatchReferenceWidthStory.tsx +0 -32
- package/src/core/primitives/popover/__workshop__/OpenOnMountStory.tsx +0 -11
- package/src/core/primitives/popover/__workshop__/PlainStory.tsx +0 -71
- package/src/core/primitives/popover/__workshop__/RecursiveStory.tsx +0 -71
- package/src/core/primitives/popover/__workshop__/SidePanelStory.tsx +0 -89
- package/src/core/primitives/popover/__workshop__/TestStory.tsx +0 -97
- package/src/core/primitives/popover/__workshop__/index.ts +0 -49
- package/src/core/primitives/popover/constants.ts +0 -22
- package/src/core/primitives/popover/floating-ui/size.ts +0 -99
- package/src/core/primitives/popover/helpers.ts +0 -31
- package/src/core/primitives/popover/index.ts +0 -2
- package/src/core/primitives/popover/popover.tsx +0 -511
- package/src/core/primitives/popover/popoverCard.tsx +0 -166
- package/src/core/primitives/popover/types.ts +0 -7
- package/src/core/primitives/radio/__workshop__/example.tsx +0 -63
- package/src/core/primitives/radio/__workshop__/index.ts +0 -11
- package/src/core/primitives/radio/__workshop__/plain.tsx +0 -28
- package/src/core/primitives/radio/index.ts +0 -1
- package/src/core/primitives/radio/radio.tsx +0 -51
- package/src/core/primitives/radio/styles.ts +0 -117
- package/src/core/primitives/select/__workshop__/index.ts +0 -11
- package/src/core/primitives/select/__workshop__/plain.tsx +0 -27
- package/src/core/primitives/select/__workshop__/readOnly.tsx +0 -23
- package/src/core/primitives/select/index.ts +0 -1
- package/src/core/primitives/select/select.test.tsx +0 -52
- package/src/core/primitives/select/select.tsx +0 -94
- package/src/core/primitives/select/styles.ts +0 -166
- package/src/core/primitives/spinner/__workshop__/Props.tsx +0 -15
- package/src/core/primitives/spinner/__workshop__/index.ts +0 -14
- package/src/core/primitives/spinner/index.ts +0 -1
- package/src/core/primitives/spinner/spinner.tsx +0 -46
- package/src/core/primitives/stack/__workshop__/index.ts +0 -14
- package/src/core/primitives/stack/__workshop__/plain.tsx +0 -32
- package/src/core/primitives/stack/index.ts +0 -1
- package/src/core/primitives/stack/stack.test.tsx +0 -57
- package/src/core/primitives/stack/stack.tsx +0 -57
- package/src/core/primitives/stack/styles.ts +0 -32
- package/src/core/primitives/switch/__workshop__/example.tsx +0 -23
- package/src/core/primitives/switch/__workshop__/index.ts +0 -11
- package/src/core/primitives/switch/__workshop__/props.tsx +0 -21
- package/src/core/primitives/switch/index.ts +0 -1
- package/src/core/primitives/switch/styles.ts +0 -173
- package/src/core/primitives/switch/switch.tsx +0 -68
- package/src/core/primitives/text/__workshop__/colored.tsx +0 -30
- package/src/core/primitives/text/__workshop__/example.tsx +0 -39
- package/src/core/primitives/text/__workshop__/index.ts +0 -24
- package/src/core/primitives/text/__workshop__/opticalAlignment.tsx +0 -48
- package/src/core/primitives/text/index.ts +0 -1
- package/src/core/primitives/text/styles.ts +0 -74
- package/src/core/primitives/text/text.tsx +0 -89
- package/src/core/primitives/textArea/__workshop__/index.ts +0 -14
- package/src/core/primitives/textArea/__workshop__/plain.tsx +0 -50
- package/src/core/primitives/textArea/index.ts +0 -1
- package/src/core/primitives/textArea/textArea.tsx +0 -120
- package/src/core/primitives/textInput/__workshop__/clearButton.tsx +0 -30
- package/src/core/primitives/textInput/__workshop__/customValidity.tsx +0 -17
- package/src/core/primitives/textInput/__workshop__/index.ts +0 -44
- package/src/core/primitives/textInput/__workshop__/plain.tsx +0 -98
- package/src/core/primitives/textInput/__workshop__/readOnly.tsx +0 -9
- package/src/core/primitives/textInput/__workshop__/states.tsx +0 -53
- package/src/core/primitives/textInput/__workshop__/tones.tsx +0 -277
- package/src/core/primitives/textInput/__workshop__/typed.tsx +0 -23
- package/src/core/primitives/textInput/index.ts +0 -1
- package/src/core/primitives/textInput/textInput.test.tsx +0 -48
- package/src/core/primitives/textInput/textInput.tsx +0 -395
- package/src/core/primitives/tooltip/__workshop__/customPortal.tsx +0 -102
- package/src/core/primitives/tooltip/__workshop__/index.ts +0 -29
- package/src/core/primitives/tooltip/__workshop__/overflowingBoundary.tsx +0 -74
- package/src/core/primitives/tooltip/__workshop__/props.tsx +0 -107
- package/src/core/primitives/tooltip/__workshop__/resizableBoundary.tsx +0 -86
- package/src/core/primitives/tooltip/constants.ts +0 -23
- package/src/core/primitives/tooltip/index.ts +0 -2
- package/src/core/primitives/tooltip/tooltip.test.tsx +0 -452
- package/src/core/primitives/tooltip/tooltip.tsx +0 -495
- package/src/core/primitives/tooltip/tooltipCard.tsx +0 -109
- package/src/core/primitives/tooltip/tooltipDelayGroup/index.ts +0 -4
- package/src/core/primitives/tooltip/tooltipDelayGroup/tooltipDelayGroupContext.tsx +0 -11
- package/src/core/primitives/tooltip/tooltipDelayGroup/tooltipDelayGroupProvider.tsx +0 -57
- package/src/core/primitives/tooltip/tooltipDelayGroup/types.ts +0 -10
- package/src/core/primitives/tooltip/tooltipDelayGroup/useTooltipDelayGroup.ts +0 -13
- package/src/core/primitives/types.ts +0 -179
- package/src/core/styles/border/borderStyle.ts +0 -56
- package/src/core/styles/border/index.ts +0 -2
- package/src/core/styles/border/types.ts +0 -10
- package/src/core/styles/box/boxStyle.ts +0 -69
- package/src/core/styles/box/index.ts +0 -2
- package/src/core/styles/box/types.ts +0 -11
- package/src/core/styles/card/_cardColorStyle.ts +0 -108
- package/src/core/styles/card/index.ts +0 -1
- package/src/core/styles/flex/flexItemStyle.ts +0 -27
- package/src/core/styles/flex/flexStyle.ts +0 -70
- package/src/core/styles/flex/index.ts +0 -3
- package/src/core/styles/flex/types.ts +0 -25
- package/src/core/styles/focusRing/index.ts +0 -25
- package/src/core/styles/font/codeFontStyle.ts +0 -13
- package/src/core/styles/font/headingFontStyle.ts +0 -13
- package/src/core/styles/font/index.ts +0 -6
- package/src/core/styles/font/labelFontStyle.ts +0 -13
- package/src/core/styles/font/responsiveFont.ts +0 -103
- package/src/core/styles/font/textAlignStyle.ts +0 -19
- package/src/core/styles/font/textFontStyle.ts +0 -13
- package/src/core/styles/font/types.ts +0 -35
- package/src/core/styles/grid/gridItemStyle.ts +0 -82
- package/src/core/styles/grid/gridStyle.ts +0 -108
- package/src/core/styles/grid/index.ts +0 -3
- package/src/core/styles/grid/types.ts +0 -37
- package/src/core/styles/helpers.ts +0 -72
- package/src/core/styles/index.ts +0 -5
- package/src/core/styles/input/index.ts +0 -2
- package/src/core/styles/input/responsiveInputPaddingStyle.ts +0 -78
- package/src/core/styles/input/textInputStyle.ts +0 -263
- package/src/core/styles/internal.ts +0 -12
- package/src/core/styles/margin/index.ts +0 -2
- package/src/core/styles/margin/marginStyle.ts +0 -21
- package/src/core/styles/margin/marginsStyle.test.ts +0 -33
- package/src/core/styles/margin/types.ts +0 -9
- package/src/core/styles/padding/index.ts +0 -2
- package/src/core/styles/padding/paddingStyle.test.ts +0 -33
- package/src/core/styles/padding/paddingStyle.ts +0 -21
- package/src/core/styles/padding/types.ts +0 -12
- package/src/core/styles/radius/index.ts +0 -2
- package/src/core/styles/radius/radiusStyle.ts +0 -23
- package/src/core/styles/radius/types.ts +0 -8
- package/src/core/styles/shadow/index.ts +0 -2
- package/src/core/styles/shadow/shadowStyle.ts +0 -29
- package/src/core/styles/shadow/types.ts +0 -6
- package/src/core/styles/types.ts +0 -8
- package/src/core/theme/__workshop__/build/Root.tsx +0 -367
- package/src/core/theme/__workshop__/build/helpers.ts +0 -46
- package/src/core/theme/__workshop__/build/story.tsx +0 -465
- package/src/core/theme/__workshop__/canvas.tsx +0 -352
- package/src/core/theme/__workshop__/color.tsx +0 -62
- package/src/core/theme/__workshop__/debug/story.tsx +0 -408
- package/src/core/theme/__workshop__/index.ts +0 -39
- package/src/core/theme/__workshop__/layer.tsx +0 -78
- package/src/core/theme/__workshop__/nestedProvider.tsx +0 -15
- package/src/core/theme/index.ts +0 -5
- package/src/core/theme/theme.test.tsx +0 -73
- package/src/core/theme/themeColorProvider.tsx +0 -29
- package/src/core/theme/themeContext.ts +0 -10
- package/src/core/theme/themeProvider.tsx +0 -62
- package/src/core/theme/types.ts +0 -12
- package/src/core/theme/useRootTheme.ts +0 -17
- package/src/core/theme/useTheme.ts +0 -16
- package/src/core/types/avatar.ts +0 -14
- package/src/core/types/badge.ts +0 -12
- package/src/core/types/box.ts +0 -19
- package/src/core/types/button.ts +0 -21
- package/src/core/types/card.ts +0 -6
- package/src/core/types/component.ts +0 -32
- package/src/core/types/dialog.ts +0 -4
- package/src/core/types/flex.ts +0 -30
- package/src/core/types/grid.ts +0 -14
- package/src/core/types/gridItem.ts +0 -29
- package/src/core/types/index.ts +0 -15
- package/src/core/types/placement.ts +0 -18
- package/src/core/types/popover.ts +0 -4
- package/src/core/types/radius.ts +0 -4
- package/src/core/types/selectable.ts +0 -6
- package/src/core/types/text.ts +0 -4
- package/src/core/utils/arrow/arrow.tsx +0 -123
- package/src/core/utils/arrow/cmds.ts +0 -91
- package/src/core/utils/arrow/index.ts +0 -1
- package/src/core/utils/boundaryElement/__workshop__/index.ts +0 -14
- package/src/core/utils/boundaryElement/__workshop__/plain.tsx +0 -19
- package/src/core/utils/boundaryElement/boundaryElement.test.tsx +0 -100
- package/src/core/utils/boundaryElement/boundaryElementContext.ts +0 -7
- package/src/core/utils/boundaryElement/boundaryElementProvider.tsx +0 -24
- package/src/core/utils/boundaryElement/index.ts +0 -3
- package/src/core/utils/boundaryElement/types.ts +0 -7
- package/src/core/utils/boundaryElement/useBoundaryElement.ts +0 -26
- package/src/core/utils/conditionalWrapper/conditionalWrapper.tsx +0 -21
- package/src/core/utils/conditionalWrapper/index.ts +0 -1
- package/src/core/utils/elementQuery/__workshop__/customMedia.tsx +0 -30
- package/src/core/utils/elementQuery/__workshop__/index.ts +0 -14
- package/src/core/utils/elementQuery/elementQuery.tsx +0 -53
- package/src/core/utils/elementQuery/helpers.ts +0 -27
- package/src/core/utils/elementQuery/index.ts +0 -1
- package/src/core/utils/errorBoundary.tsx +0 -48
- package/src/core/utils/getElementRef.ts +0 -26
- package/src/core/utils/index.ts +0 -9
- package/src/core/utils/layer/__workshop__/_debug.tsx +0 -17
- package/src/core/utils/layer/__workshop__/index.ts +0 -24
- package/src/core/utils/layer/__workshop__/multipleRoots.tsx +0 -49
- package/src/core/utils/layer/__workshop__/nested.tsx +0 -98
- package/src/core/utils/layer/__workshop__/responsiveZOffset.tsx +0 -13
- package/src/core/utils/layer/getLayerContext.test.ts +0 -30
- package/src/core/utils/layer/getLayerContext.ts +0 -21
- package/src/core/utils/layer/index.ts +0 -4
- package/src/core/utils/layer/layer.test.tsx +0 -108
- package/src/core/utils/layer/layer.tsx +0 -98
- package/src/core/utils/layer/layerContext.ts +0 -7
- package/src/core/utils/layer/layerProvider.tsx +0 -111
- package/src/core/utils/layer/types.ts +0 -9
- package/src/core/utils/layer/useLayer.ts +0 -26
- package/src/core/utils/portal/__workshop__/index.ts +0 -14
- package/src/core/utils/portal/__workshop__/named.tsx +0 -63
- package/src/core/utils/portal/index.ts +0 -4
- package/src/core/utils/portal/portal.test.tsx +0 -103
- package/src/core/utils/portal/portal.ts +0 -32
- package/src/core/utils/portal/portalContext.ts +0 -31
- package/src/core/utils/portal/portalProvider.tsx +0 -47
- package/src/core/utils/portal/types.ts +0 -9
- package/src/core/utils/portal/usePortal.ts +0 -25
- package/src/core/utils/spanWithTextOverflow.tsx +0 -10
- package/src/core/utils/srOnly/index.ts +0 -1
- package/src/core/utils/srOnly/srOnly.tsx +0 -36
- package/src/core/utils/virtualList/__workshop__/changingProps.tsx +0 -36
- package/src/core/utils/virtualList/__workshop__/elementScroll.tsx +0 -24
- package/src/core/utils/virtualList/__workshop__/index.ts +0 -29
- package/src/core/utils/virtualList/__workshop__/infiniteList.tsx +0 -48
- package/src/core/utils/virtualList/__workshop__/windowScrolll.tsx +0 -22
- package/src/core/utils/virtualList/index.ts +0 -1
- package/src/core/utils/virtualList/virtualList.tsx +0 -200
- package/src/theme/build/_deprecated/color/_selectable/createSelectableTones.ts +0 -76
- package/src/theme/build/_deprecated/color/_solid/createSolidTones.ts +0 -54
- package/src/theme/build/_deprecated/color/button/createButtonModes.ts +0 -22
- package/src/theme/build/_deprecated/color/button/createButtonTones.ts +0 -55
- package/src/theme/build/_deprecated/color/card/createCardStates.ts +0 -60
- package/src/theme/build/_deprecated/color/color.test.ts +0 -63
- package/src/theme/build/_deprecated/color/defaults.ts +0 -390
- package/src/theme/build/_deprecated/color/factory.ts +0 -142
- package/src/theme/build/_deprecated/color/index.ts +0 -1
- package/src/theme/build/_deprecated/color/input/createInputModes.ts +0 -81
- package/src/theme/build/_deprecated/color/muted/createMuted.ts +0 -54
- package/src/theme/build/_deprecated/color/spot/createSpot.ts +0 -20
- package/src/theme/build/buildColorTheme.test.ts +0 -183
- package/src/theme/build/buildColorTheme.ts +0 -499
- package/src/theme/build/buildTheme.test.ts +0 -87
- package/src/theme/build/buildTheme.ts +0 -36
- package/src/theme/build/colorToken/colorToken.ts +0 -19
- package/src/theme/build/colorToken/compileColorToken.ts +0 -21
- package/src/theme/build/colorToken/index.ts +0 -2
- package/src/theme/build/colorToken/types.ts +0 -6
- package/src/theme/build/index.ts +0 -3
- package/src/theme/build/lib/color-fns/blend/index.ts +0 -3
- package/src/theme/build/lib/color-fns/blend/mix.ts +0 -21
- package/src/theme/build/lib/color-fns/blend/multiply.ts +0 -18
- package/src/theme/build/lib/color-fns/blend/screen.ts +0 -18
- package/src/theme/build/lib/color-fns/color-fns.test.ts +0 -68
- package/src/theme/build/lib/color-fns/contrastRatio.ts +0 -31
- package/src/theme/build/lib/color-fns/convert.ts +0 -150
- package/src/theme/build/lib/color-fns/index.ts +0 -6
- package/src/theme/build/lib/color-fns/parse.ts +0 -60
- package/src/theme/build/lib/color-fns/rgba.ts +0 -10
- package/src/theme/build/lib/color-fns/types.ts +0 -28
- package/src/theme/build/lib/isRecord.ts +0 -3
- package/src/theme/build/lib/lazy.ts +0 -30
- package/src/theme/build/lib/utils.ts +0 -19
- package/src/theme/build/merge.ts +0 -26
- package/src/theme/build/mixThemeColor.test.ts +0 -21
- package/src/theme/build/mixThemeColor.ts +0 -53
- package/src/theme/build/renderColorTheme.ts +0 -532
- package/src/theme/build/renderColorValue.ts +0 -85
- package/src/theme/build/resolveColorTokens.ts +0 -268
- package/src/theme/build/theme.test.ts +0 -27
- package/src/theme/config/helpers.ts +0 -55
- package/src/theme/config/index.ts +0 -4
- package/src/theme/config/system.ts +0 -115
- package/src/theme/config/tokens/color/index.ts +0 -1
- package/src/theme/config/tokens/color/types.ts +0 -133
- package/src/theme/config/tokens/index.ts +0 -4
- package/src/theme/config/tokens/parseTokenKey.test.ts +0 -64
- package/src/theme/config/tokens/parseTokenKey.ts +0 -67
- package/src/theme/config/tokens/parseTokenValue.test.ts +0 -42
- package/src/theme/config/tokens/parseTokenValue.ts +0 -133
- package/src/theme/config/tokens/types.ts +0 -53
- package/src/theme/config/types.ts +0 -46
- package/src/theme/defaults/colorPalette.ts +0 -5
- package/src/theme/defaults/colorTokens.ts +0 -648
- package/src/theme/defaults/config.ts +0 -84
- package/src/theme/defaults/fonts.ts +0 -227
- package/src/theme/getScopedTheme.ts +0 -98
- package/src/theme/index.ts +0 -5
- package/src/theme/system/avatar.ts +0 -14
- package/src/theme/system/color/_constants.ts +0 -45
- package/src/theme/system/color/_helpers.ts +0 -24
- package/src/theme/system/color/_system.ts +0 -40
- package/src/theme/system/color/avatar.ts +0 -15
- package/src/theme/system/color/badge.ts +0 -16
- package/src/theme/system/color/button.ts +0 -17
- package/src/theme/system/color/color.ts +0 -34
- package/src/theme/system/color/index.ts +0 -13
- package/src/theme/system/color/input.ts +0 -25
- package/src/theme/system/color/kbd.ts +0 -8
- package/src/theme/system/color/selectable.ts +0 -12
- package/src/theme/system/color/shadow.ts +0 -7
- package/src/theme/system/color/state.ts +0 -43
- package/src/theme/system/color/syntax.ts +0 -41
- package/src/theme/system/css.ts +0 -14
- package/src/theme/system/focusRing.ts +0 -7
- package/src/theme/system/font.ts +0 -52
- package/src/theme/system/index.ts +0 -11
- package/src/theme/system/input.ts +0 -33
- package/src/theme/system/layer.ts +0 -8
- package/src/theme/system/shadow.ts +0 -19
- package/src/theme/system/styles.ts +0 -13
- package/src/theme/system/theme.ts +0 -138
- package/src/theme/system/v0/avatar.ts +0 -10
- package/src/theme/system/v0/color/_generic.ts +0 -35
- package/src/theme/system/v0/color/_system.ts +0 -17
- package/src/theme/system/v0/color/base.ts +0 -21
- package/src/theme/system/v0/color/button.ts +0 -42
- package/src/theme/system/v0/color/card.ts +0 -19
- package/src/theme/system/v0/color/color.ts +0 -40
- package/src/theme/system/v0/color/index.ts +0 -11
- package/src/theme/system/v0/color/input.ts +0 -34
- package/src/theme/system/v0/color/muted.ts +0 -26
- package/src/theme/system/v0/color/selectable.ts +0 -31
- package/src/theme/system/v0/color/solid.ts +0 -26
- package/src/theme/system/v0/color/spot.ts +0 -13
- package/src/theme/system/v0/index.ts +0 -3
- package/src/theme/system/v0/input.ts +0 -23
- package/src/theme/versioning/getTheme_v2.ts +0 -57
- package/src/theme/versioning/index.ts +0 -5
- package/src/theme/versioning/is_v0.ts +0 -6
- package/src/theme/versioning/is_v2.ts +0 -6
- package/src/theme/versioning/themeColor_v0_v2.ts +0 -243
- package/src/theme/versioning/themeColor_v2_v2_9.ts +0 -49
- package/src/theme/versioning/v0_v2.ts +0 -94
- package/src/theme/versioning/v2_v0.ts +0 -135
|
@@ -0,0 +1,623 @@
|
|
|
1
|
+
import { cn } from "../../lib/cn.js";
|
|
2
|
+
import { PopoverContent } from "../../ui/overlay.js";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { IconArrowLeft, IconBlockquote, IconChevronRight, IconComponents, IconFileText, IconH1, IconH2, IconH3, IconH4, IconH5, IconH6, IconInfoCircle, IconLayoutNavbarCollapse, IconList, IconListDetails, IconListNumbers, IconPhoto, IconPilcrow, IconQuote, IconSearch, IconSeparatorHorizontal, IconTable, IconTerminal2, IconVideo } from "@tabler/icons-react";
|
|
6
|
+
//#region src/controls/rich-text/catalog.tsx
|
|
7
|
+
/**
|
|
8
|
+
* RICH TEXT · the block catalogue shared by the toolbar Insert menu, the gutter "+" and the "/" slash menu (V2 HEAD
|
|
9
|
+
* controls/rich-text/catalog.tsx, CPO D55).
|
|
10
|
+
*
|
|
11
|
+
* browse Text · Media · Data, grouped, then one quiet "More components N" row that opens the components the
|
|
12
|
+
* field may embed (V2 HEAD catalog.tsx MORE), with its own search and a way back ("All blocks")
|
|
13
|
+
* search every block and every embeddable component in one list: recently used first among the strong matches,
|
|
14
|
+
* then by match (label, aliases, then description)
|
|
15
|
+
* no match "No match."
|
|
16
|
+
*
|
|
17
|
+
* Only the blocks the field accepts are offered (`features`, from the host's codec: each block is offered only where
|
|
18
|
+
* the field's stored shape has a place for it). Not in this catalogue, and why:
|
|
19
|
+
* Footnote, Gallery, Embed, Columns, Checklist, Button, Table of contents, Related posts, Author bio
|
|
20
|
+
* production's rich text has no stored block for them (a checklist renders as a bulleted list; production's embed
|
|
21
|
+
* frames the raw link, which providers refuse, so Video is the one media link offered). A stored embed (an
|
|
22
|
+
* imported `<iframe>`, whose address is already the provider's frame) opens and is edited as V2's Embed block.
|
|
23
|
+
*
|
|
24
|
+
* Components come from the host (KitServices.useInsertableComponents: the project's components, narrowed to the ones
|
|
25
|
+
* the field's config accepts), handed in through CatalogComponentsProvider. Without that service none is offered.
|
|
26
|
+
* Deviation from V2: the library has no inline / page-section placement, so every component sits in one
|
|
27
|
+
* "Components" group (V2: "Article" and "Page sections"), and no live preview flyout is drawn beside a row.
|
|
28
|
+
*/
|
|
29
|
+
var i = (I) => /* @__PURE__ */ jsx(I, { stroke: 1.5 });
|
|
30
|
+
var rows = (list) => list.map(([id, label, description, icon, aliases]) => ({
|
|
31
|
+
key: id,
|
|
32
|
+
id,
|
|
33
|
+
label,
|
|
34
|
+
description,
|
|
35
|
+
icon,
|
|
36
|
+
aliases
|
|
37
|
+
}));
|
|
38
|
+
var TEXT = rows([
|
|
39
|
+
[
|
|
40
|
+
"p",
|
|
41
|
+
"Text",
|
|
42
|
+
"Plain body text",
|
|
43
|
+
i(IconPilcrow),
|
|
44
|
+
["paragraph", "body"]
|
|
45
|
+
],
|
|
46
|
+
[
|
|
47
|
+
"h2",
|
|
48
|
+
"Heading 2",
|
|
49
|
+
"Section heading",
|
|
50
|
+
i(IconH2),
|
|
51
|
+
["title", "subtitle"]
|
|
52
|
+
],
|
|
53
|
+
[
|
|
54
|
+
"h3",
|
|
55
|
+
"Heading 3",
|
|
56
|
+
"Subsection heading",
|
|
57
|
+
i(IconH3)
|
|
58
|
+
],
|
|
59
|
+
[
|
|
60
|
+
"h4",
|
|
61
|
+
"Heading 4",
|
|
62
|
+
"Minor heading",
|
|
63
|
+
i(IconH4)
|
|
64
|
+
],
|
|
65
|
+
[
|
|
66
|
+
"quote",
|
|
67
|
+
"Quote",
|
|
68
|
+
"A quoted passage",
|
|
69
|
+
i(IconBlockquote),
|
|
70
|
+
["blockquote"]
|
|
71
|
+
],
|
|
72
|
+
[
|
|
73
|
+
"pullquote",
|
|
74
|
+
"Pull quote",
|
|
75
|
+
"A highlighted line with who said it",
|
|
76
|
+
i(IconQuote),
|
|
77
|
+
[
|
|
78
|
+
"pq",
|
|
79
|
+
"testimonial",
|
|
80
|
+
"attribution"
|
|
81
|
+
]
|
|
82
|
+
],
|
|
83
|
+
[
|
|
84
|
+
"ul",
|
|
85
|
+
"List",
|
|
86
|
+
"Bulleted list",
|
|
87
|
+
i(IconList),
|
|
88
|
+
[
|
|
89
|
+
"bullets",
|
|
90
|
+
"bulleted list",
|
|
91
|
+
"unordered"
|
|
92
|
+
]
|
|
93
|
+
],
|
|
94
|
+
[
|
|
95
|
+
"ol",
|
|
96
|
+
"Numbered list",
|
|
97
|
+
"Ordered steps",
|
|
98
|
+
i(IconListNumbers),
|
|
99
|
+
["ordered", "steps"]
|
|
100
|
+
],
|
|
101
|
+
[
|
|
102
|
+
"toggle",
|
|
103
|
+
"Toggle",
|
|
104
|
+
"Collapsible title and body",
|
|
105
|
+
i(IconLayoutNavbarCollapse),
|
|
106
|
+
[
|
|
107
|
+
"accordion",
|
|
108
|
+
"details",
|
|
109
|
+
"collapse"
|
|
110
|
+
]
|
|
111
|
+
],
|
|
112
|
+
[
|
|
113
|
+
"callout",
|
|
114
|
+
"Callout",
|
|
115
|
+
"A highlighted note with a tone",
|
|
116
|
+
i(IconInfoCircle),
|
|
117
|
+
[
|
|
118
|
+
"note",
|
|
119
|
+
"tip",
|
|
120
|
+
"warning",
|
|
121
|
+
"aside"
|
|
122
|
+
]
|
|
123
|
+
],
|
|
124
|
+
[
|
|
125
|
+
"takeaways",
|
|
126
|
+
"Key takeaways",
|
|
127
|
+
"The story in a few points",
|
|
128
|
+
i(IconListDetails),
|
|
129
|
+
[
|
|
130
|
+
"summary",
|
|
131
|
+
"tldr",
|
|
132
|
+
"tl;dr",
|
|
133
|
+
"highlights"
|
|
134
|
+
]
|
|
135
|
+
],
|
|
136
|
+
[
|
|
137
|
+
"hr",
|
|
138
|
+
"Divider",
|
|
139
|
+
"A line between parts",
|
|
140
|
+
i(IconSeparatorHorizontal),
|
|
141
|
+
[
|
|
142
|
+
"line",
|
|
143
|
+
"separator",
|
|
144
|
+
"rule"
|
|
145
|
+
]
|
|
146
|
+
],
|
|
147
|
+
[
|
|
148
|
+
"code",
|
|
149
|
+
"Code",
|
|
150
|
+
"Monospaced snippet",
|
|
151
|
+
i(IconTerminal2),
|
|
152
|
+
[
|
|
153
|
+
"code block",
|
|
154
|
+
"snippet",
|
|
155
|
+
"pre"
|
|
156
|
+
]
|
|
157
|
+
]
|
|
158
|
+
]);
|
|
159
|
+
var MEDIA = rows([
|
|
160
|
+
[
|
|
161
|
+
"image",
|
|
162
|
+
"Image",
|
|
163
|
+
"Image with alt text and caption",
|
|
164
|
+
i(IconPhoto),
|
|
165
|
+
[
|
|
166
|
+
"img",
|
|
167
|
+
"picture",
|
|
168
|
+
"photo"
|
|
169
|
+
]
|
|
170
|
+
],
|
|
171
|
+
[
|
|
172
|
+
"video",
|
|
173
|
+
"Video",
|
|
174
|
+
"A YouTube, Vimeo or video file link",
|
|
175
|
+
i(IconVideo),
|
|
176
|
+
[
|
|
177
|
+
"mp4",
|
|
178
|
+
"youtube",
|
|
179
|
+
"yt",
|
|
180
|
+
"vimeo",
|
|
181
|
+
"clip",
|
|
182
|
+
"movie"
|
|
183
|
+
]
|
|
184
|
+
],
|
|
185
|
+
[
|
|
186
|
+
"file",
|
|
187
|
+
"File",
|
|
188
|
+
"A downloadable PDF or file",
|
|
189
|
+
i(IconFileText),
|
|
190
|
+
[
|
|
191
|
+
"pdf",
|
|
192
|
+
"download",
|
|
193
|
+
"attachment"
|
|
194
|
+
]
|
|
195
|
+
]
|
|
196
|
+
]);
|
|
197
|
+
var DATA = rows([[
|
|
198
|
+
"table",
|
|
199
|
+
"Table",
|
|
200
|
+
"Rows and columns",
|
|
201
|
+
i(IconTable),
|
|
202
|
+
[
|
|
203
|
+
"grid",
|
|
204
|
+
"data",
|
|
205
|
+
"comparison",
|
|
206
|
+
"spreadsheet"
|
|
207
|
+
]
|
|
208
|
+
]]);
|
|
209
|
+
/** Found by search, not listed: rare in a body (H1 is the page title). */
|
|
210
|
+
var SEARCH_ONLY = rows([
|
|
211
|
+
[
|
|
212
|
+
"h1",
|
|
213
|
+
"Heading 1",
|
|
214
|
+
"Largest heading",
|
|
215
|
+
i(IconH1)
|
|
216
|
+
],
|
|
217
|
+
[
|
|
218
|
+
"h5",
|
|
219
|
+
"Heading 5",
|
|
220
|
+
"Smallest heading",
|
|
221
|
+
i(IconH5)
|
|
222
|
+
],
|
|
223
|
+
[
|
|
224
|
+
"h6",
|
|
225
|
+
"Heading 6",
|
|
226
|
+
"Eyebrow heading",
|
|
227
|
+
i(IconH6)
|
|
228
|
+
]
|
|
229
|
+
]);
|
|
230
|
+
/** The feature a block needs (Text needs none). */
|
|
231
|
+
var NEEDS = {
|
|
232
|
+
p: null,
|
|
233
|
+
h1: "h1",
|
|
234
|
+
h2: "h2",
|
|
235
|
+
h3: "h3",
|
|
236
|
+
h4: "h4",
|
|
237
|
+
h5: "h5",
|
|
238
|
+
h6: "h6",
|
|
239
|
+
quote: "blockquote",
|
|
240
|
+
ul: "ul",
|
|
241
|
+
ol: "ol",
|
|
242
|
+
code: "pre",
|
|
243
|
+
hr: "hr",
|
|
244
|
+
image: "image",
|
|
245
|
+
pullquote: "pullquote",
|
|
246
|
+
takeaways: "takeaways",
|
|
247
|
+
callout: "callout",
|
|
248
|
+
toggle: "toggle",
|
|
249
|
+
video: "video",
|
|
250
|
+
file: "file",
|
|
251
|
+
table: "table"
|
|
252
|
+
};
|
|
253
|
+
var MORE = {
|
|
254
|
+
key: "more",
|
|
255
|
+
kind: "folder",
|
|
256
|
+
label: "More blocks",
|
|
257
|
+
description: "Shared across your site",
|
|
258
|
+
icon: i(IconComponents)
|
|
259
|
+
};
|
|
260
|
+
var BACK = {
|
|
261
|
+
key: "back",
|
|
262
|
+
kind: "back",
|
|
263
|
+
label: "All blocks",
|
|
264
|
+
description: "",
|
|
265
|
+
icon: i(IconArrowLeft)
|
|
266
|
+
};
|
|
267
|
+
var componentRow = (c) => ({
|
|
268
|
+
key: `c:${c.id}`,
|
|
269
|
+
kind: "component",
|
|
270
|
+
component: c,
|
|
271
|
+
label: c.name,
|
|
272
|
+
description: c.description || "Shared across your site",
|
|
273
|
+
icon: i(IconComponents)
|
|
274
|
+
});
|
|
275
|
+
var ComponentsContext = React.createContext(null);
|
|
276
|
+
var CatalogComponentsProvider = ComponentsContext.Provider;
|
|
277
|
+
/** The components this field may embed (a component card's Swap component). */
|
|
278
|
+
var useCatalogComponents = () => React.useContext(ComponentsContext);
|
|
279
|
+
var blockAllowed = (id, allows) => {
|
|
280
|
+
const need = NEEDS[id];
|
|
281
|
+
return !need || allows(need);
|
|
282
|
+
};
|
|
283
|
+
var RECENTS_KEY = "kit-rt-insert-recents";
|
|
284
|
+
var recents = (() => {
|
|
285
|
+
try {
|
|
286
|
+
const v = JSON.parse(globalThis.localStorage?.getItem(RECENTS_KEY) ?? "[]");
|
|
287
|
+
return Array.isArray(v) ? v.filter((x) => typeof x === "string") : [];
|
|
288
|
+
} catch {
|
|
289
|
+
return [];
|
|
290
|
+
}
|
|
291
|
+
})();
|
|
292
|
+
var recentSubs = /* @__PURE__ */ new Set();
|
|
293
|
+
/** Remember a pick so search ranks it first next time. */
|
|
294
|
+
function noteRecent(it) {
|
|
295
|
+
recents = [it.key, ...recents.filter((k) => k !== it.key)].slice(0, 12);
|
|
296
|
+
try {
|
|
297
|
+
globalThis.localStorage?.setItem(RECENTS_KEY, JSON.stringify(recents));
|
|
298
|
+
} catch {}
|
|
299
|
+
recentSubs.forEach((s) => s());
|
|
300
|
+
}
|
|
301
|
+
function useRecents() {
|
|
302
|
+
return React.useSyncExternalStore((cb) => {
|
|
303
|
+
recentSubs.add(cb);
|
|
304
|
+
return () => recentSubs.delete(cb);
|
|
305
|
+
}, () => recents, () => recents);
|
|
306
|
+
}
|
|
307
|
+
/** 5 exact (label, id or alias) · 4 label or alias starts with it · 3 a word of the label starts with it · 2 inside the
|
|
308
|
+
* label · 1 the description. */
|
|
309
|
+
var score = (q, it) => {
|
|
310
|
+
const l = it.label.toLowerCase();
|
|
311
|
+
const al = it.aliases ?? [];
|
|
312
|
+
if (l === q || it.id === q || al.includes(q)) return 5;
|
|
313
|
+
if (l.startsWith(q) || al.some((a) => a.startsWith(q))) return 4;
|
|
314
|
+
if (l.split(/[\s-]+/).some((w) => w.startsWith(q))) return 3;
|
|
315
|
+
if (l.includes(q)) return 2;
|
|
316
|
+
return it.description.toLowerCase().includes(q) ? 1 : 0;
|
|
317
|
+
};
|
|
318
|
+
/** Ranked by recently used among the strong matches, then by match, then catalogue order. */
|
|
319
|
+
var rank = (q, list, recent) => list.map((it, i) => {
|
|
320
|
+
const s = score(q, it);
|
|
321
|
+
const r = recent.indexOf(it.key);
|
|
322
|
+
return {
|
|
323
|
+
it,
|
|
324
|
+
s,
|
|
325
|
+
strong: s >= 3 ? 1 : 0,
|
|
326
|
+
r: s >= 3 && r >= 0 ? r : 999,
|
|
327
|
+
i
|
|
328
|
+
};
|
|
329
|
+
}).filter((x) => x.s > 0).sort((a, b) => b.strong - a.strong || a.r - b.r || b.s - a.s || a.i - b.i).map((x) => x.it);
|
|
330
|
+
/** `folder`: the More components view (its way back first, then the components, searched by `query`). */
|
|
331
|
+
function useCatalog(query, allows, folder = false, own) {
|
|
332
|
+
const recent = useRecents();
|
|
333
|
+
const provided = React.useContext(ComponentsContext);
|
|
334
|
+
const lib = own === void 0 ? provided : own;
|
|
335
|
+
return React.useMemo(() => {
|
|
336
|
+
const q = query.trim().toLowerCase().replace(/^\//, "");
|
|
337
|
+
const keep = (list) => list.filter((it) => !it.id || blockAllowed(it.id, allows));
|
|
338
|
+
const comps = (lib?.components ?? []).map(componentRow);
|
|
339
|
+
let sections;
|
|
340
|
+
let noMatch = false;
|
|
341
|
+
let emptyText = "No match.";
|
|
342
|
+
if (folder) {
|
|
343
|
+
const found = q ? rank(q, comps, recent) : comps;
|
|
344
|
+
noMatch = !!q && !!comps.length && !found.length;
|
|
345
|
+
if (!comps.length) emptyText = lib?.error ?? (lib?.loading ? "Loading blocks…" : "This field takes no blocks.");
|
|
346
|
+
sections = [{
|
|
347
|
+
title: null,
|
|
348
|
+
items: [BACK]
|
|
349
|
+
}, {
|
|
350
|
+
title: "Blocks",
|
|
351
|
+
items: found
|
|
352
|
+
}];
|
|
353
|
+
} else if (q) {
|
|
354
|
+
const found = rank(q, [
|
|
355
|
+
...keep(TEXT),
|
|
356
|
+
...keep(MEDIA),
|
|
357
|
+
...keep(DATA),
|
|
358
|
+
...keep(SEARCH_ONLY),
|
|
359
|
+
...comps
|
|
360
|
+
], recent);
|
|
361
|
+
noMatch = !found.length;
|
|
362
|
+
sections = [{
|
|
363
|
+
title: null,
|
|
364
|
+
items: found
|
|
365
|
+
}];
|
|
366
|
+
} else sections = [
|
|
367
|
+
{
|
|
368
|
+
title: "Text",
|
|
369
|
+
items: keep(TEXT)
|
|
370
|
+
},
|
|
371
|
+
{
|
|
372
|
+
title: "Media",
|
|
373
|
+
items: keep(MEDIA)
|
|
374
|
+
},
|
|
375
|
+
{
|
|
376
|
+
title: "Data",
|
|
377
|
+
items: keep(DATA)
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
title: null,
|
|
381
|
+
items: lib && (comps.length || lib.loading || lib.error) ? [{
|
|
382
|
+
...MORE,
|
|
383
|
+
...comps.length ? { count: comps.length } : {}
|
|
384
|
+
}] : []
|
|
385
|
+
}
|
|
386
|
+
];
|
|
387
|
+
sections = sections.filter((s) => s.items.length);
|
|
388
|
+
const flat = sections.flatMap((s) => s.items);
|
|
389
|
+
const empty = !flat.some((it) => it.kind !== "back");
|
|
390
|
+
return {
|
|
391
|
+
sections,
|
|
392
|
+
flat,
|
|
393
|
+
empty,
|
|
394
|
+
noMatch,
|
|
395
|
+
emptyText
|
|
396
|
+
};
|
|
397
|
+
}, [
|
|
398
|
+
query,
|
|
399
|
+
allows,
|
|
400
|
+
recent,
|
|
401
|
+
lib,
|
|
402
|
+
folder
|
|
403
|
+
]);
|
|
404
|
+
}
|
|
405
|
+
function CatalogList({ sections, flat, active, onHover, onPick, empty, emptyText = "No match.", noMatch, detail, listId, className }) {
|
|
406
|
+
const box = React.useRef(null);
|
|
407
|
+
React.useEffect(() => {
|
|
408
|
+
const b = box.current;
|
|
409
|
+
const row = b?.querySelector(`[data-idx="${active}"]`);
|
|
410
|
+
if (!b || !row) return;
|
|
411
|
+
if (row.offsetTop < b.scrollTop) b.scrollTop = row.offsetTop - 6;
|
|
412
|
+
else if (row.offsetTop + row.offsetHeight > b.scrollTop + b.clientHeight) b.scrollTop = row.offsetTop + row.offsetHeight - b.clientHeight + 6;
|
|
413
|
+
}, [active]);
|
|
414
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
415
|
+
ref: box,
|
|
416
|
+
id: listId,
|
|
417
|
+
role: "listbox",
|
|
418
|
+
"aria-label": "Blocks",
|
|
419
|
+
className: cn("relative max-h-[320px] overflow-y-auto p-1.5", className),
|
|
420
|
+
children: [
|
|
421
|
+
noMatch ? /* @__PURE__ */ jsx("div", {
|
|
422
|
+
className: "px-2 pb-1 pt-1.5 text-kit-sm text-kit-fg-3",
|
|
423
|
+
children: "No match."
|
|
424
|
+
}) : null,
|
|
425
|
+
sections.map((s, si) => /* @__PURE__ */ jsxs("div", {
|
|
426
|
+
role: "group",
|
|
427
|
+
"aria-label": s.title ?? void 0,
|
|
428
|
+
className: cn(!s.title && si > 0 && s.items[0]?.kind === "folder" && "mt-1.5 border-t border-kit-line-subtle pt-1.5"),
|
|
429
|
+
children: [s.title ? /* @__PURE__ */ jsx("div", {
|
|
430
|
+
className: "px-2 pb-0.5 pt-2 text-kit-2xs font-medium text-kit-fg-3",
|
|
431
|
+
children: s.title
|
|
432
|
+
}) : null, s.items.map((it) => {
|
|
433
|
+
const idx = flat.indexOf(it);
|
|
434
|
+
const on = idx === active;
|
|
435
|
+
const desc = detail && it.kind !== "back" && it.kind !== "folder" ? it.description : "";
|
|
436
|
+
return /* @__PURE__ */ jsxs("button", {
|
|
437
|
+
type: "button",
|
|
438
|
+
role: "option",
|
|
439
|
+
"aria-selected": on,
|
|
440
|
+
"aria-description": !desc && it.description ? it.description : void 0,
|
|
441
|
+
"data-idx": idx,
|
|
442
|
+
id: `${listId}-${idx}`,
|
|
443
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
444
|
+
onMouseMove: () => !on && onHover(idx),
|
|
445
|
+
onClick: () => onPick(it),
|
|
446
|
+
className: cn("flex w-full items-center gap-2 rounded-kit-md px-2 text-left transition-colors motion-reduce:transition-none", desc ? "py-1.5" : "h-8", it.kind === "back" ? "text-kit-fg-2" : "text-kit-fg", on && "bg-kit-hover text-kit-fg"),
|
|
447
|
+
children: [
|
|
448
|
+
/* @__PURE__ */ jsx("span", {
|
|
449
|
+
className: cn("flex shrink-0 items-center justify-center text-kit-fg-2 [&_svg]:size-4", desc ? "size-7 rounded-kit-md border border-kit-line bg-kit-control-bg" : "size-5"),
|
|
450
|
+
children: it.icon
|
|
451
|
+
}),
|
|
452
|
+
/* @__PURE__ */ jsxs("span", {
|
|
453
|
+
className: "min-w-0 flex-1",
|
|
454
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
455
|
+
className: "block truncate text-kit-sm",
|
|
456
|
+
children: it.label
|
|
457
|
+
}), desc ? /* @__PURE__ */ jsx("span", {
|
|
458
|
+
className: "block truncate text-kit-xs text-kit-fg-3",
|
|
459
|
+
children: desc
|
|
460
|
+
}) : null]
|
|
461
|
+
}),
|
|
462
|
+
it.count != null ? /* @__PURE__ */ jsx("span", {
|
|
463
|
+
className: "text-kit-2xs tabular-nums text-kit-fg-3",
|
|
464
|
+
children: it.count
|
|
465
|
+
}) : null,
|
|
466
|
+
it.kind === "folder" ? /* @__PURE__ */ jsx(IconChevronRight, {
|
|
467
|
+
className: "size-3.5 shrink-0 text-kit-fg-3",
|
|
468
|
+
stroke: 1.5,
|
|
469
|
+
"aria-hidden": true
|
|
470
|
+
}) : null
|
|
471
|
+
]
|
|
472
|
+
}, it.key);
|
|
473
|
+
})]
|
|
474
|
+
}, s.title ?? `s${si}`)),
|
|
475
|
+
empty ? /* @__PURE__ */ jsx("div", {
|
|
476
|
+
className: "px-2 py-6 text-center text-kit-sm text-kit-fg-3",
|
|
477
|
+
children: emptyText
|
|
478
|
+
}) : null
|
|
479
|
+
]
|
|
480
|
+
});
|
|
481
|
+
}
|
|
482
|
+
var Footer = () => /* @__PURE__ */ jsx("div", {
|
|
483
|
+
"data-hint": "shortcuts",
|
|
484
|
+
className: "flex h-7 shrink-0 items-center border-t border-kit-line px-3 text-kit-2xs text-kit-fg-3",
|
|
485
|
+
children: /* @__PURE__ */ jsxs("span", { children: [/* @__PURE__ */ jsx("kbd", {
|
|
486
|
+
className: "font-kit-sans",
|
|
487
|
+
children: "↵"
|
|
488
|
+
}), " select · type to search"] })
|
|
489
|
+
});
|
|
490
|
+
/** Shared keyboard model: ↑↓ wrap, Home/End, Enter / Tab, → into More components. Returns true when handled. */
|
|
491
|
+
function catalogKey(e, flat, active, setActive, pick, homeEnd = true) {
|
|
492
|
+
const n = flat.length;
|
|
493
|
+
if (!n) return false;
|
|
494
|
+
if (e.key === "ArrowDown") return setActive((active + 1) % n), true;
|
|
495
|
+
if (e.key === "ArrowUp") return setActive((active - 1 + n) % n), true;
|
|
496
|
+
if (homeEnd && e.key === "Home") return setActive(0), true;
|
|
497
|
+
if (homeEnd && e.key === "End") return setActive(n - 1), true;
|
|
498
|
+
if (e.key === "ArrowRight" && flat[active]?.kind === "folder") return pick(flat[active]), true;
|
|
499
|
+
if (e.key === "Enter" || e.key === "Tab") {
|
|
500
|
+
const it = flat[active];
|
|
501
|
+
if (it) pick(it);
|
|
502
|
+
return true;
|
|
503
|
+
}
|
|
504
|
+
return false;
|
|
505
|
+
}
|
|
506
|
+
function InsertMenuContent({ onInsert, allows, keepFocusOnClose, align = "start", side = "bottom" }) {
|
|
507
|
+
const [q, setQ] = React.useState("");
|
|
508
|
+
const [active, setActive] = React.useState(0);
|
|
509
|
+
const input = React.useRef(null);
|
|
510
|
+
const listId = React.useId();
|
|
511
|
+
const [folder, setFolder] = React.useState(false);
|
|
512
|
+
const { sections, flat, empty, emptyText, noMatch } = useCatalog(q, allows, folder);
|
|
513
|
+
React.useEffect(() => setActive(folder && flat.length > 1 ? 1 : 0), [q, folder]);
|
|
514
|
+
const leave = () => {
|
|
515
|
+
setFolder(false);
|
|
516
|
+
setQ("");
|
|
517
|
+
input.current?.focus();
|
|
518
|
+
};
|
|
519
|
+
const pick = (it) => {
|
|
520
|
+
if (it.kind === "folder") {
|
|
521
|
+
setFolder(true);
|
|
522
|
+
setQ("");
|
|
523
|
+
input.current?.focus();
|
|
524
|
+
} else if (it.kind === "back") leave();
|
|
525
|
+
else onInsert(it);
|
|
526
|
+
};
|
|
527
|
+
return /* @__PURE__ */ jsxs(PopoverContent, {
|
|
528
|
+
side,
|
|
529
|
+
align,
|
|
530
|
+
className: "flex max-h-[420px] w-[320px] flex-col overflow-hidden p-0",
|
|
531
|
+
initialFocus: input,
|
|
532
|
+
finalFocus: keepFocusOnClose ? () => !keepFocusOnClose() : void 0,
|
|
533
|
+
onKeyDownCapture: (e) => {
|
|
534
|
+
if (!folder || e.key !== "Escape") return;
|
|
535
|
+
e.preventDefault();
|
|
536
|
+
e.stopPropagation();
|
|
537
|
+
leave();
|
|
538
|
+
},
|
|
539
|
+
children: [
|
|
540
|
+
/* @__PURE__ */ jsxs("div", {
|
|
541
|
+
className: "flex h-10 shrink-0 items-center gap-2 border-b border-kit-line px-3",
|
|
542
|
+
children: [/* @__PURE__ */ jsx(IconSearch, {
|
|
543
|
+
className: "size-4 shrink-0 text-kit-fg-3",
|
|
544
|
+
stroke: 1.5,
|
|
545
|
+
"aria-hidden": true
|
|
546
|
+
}), /* @__PURE__ */ jsx("input", {
|
|
547
|
+
ref: input,
|
|
548
|
+
value: q,
|
|
549
|
+
onChange: (e) => setQ(e.target.value),
|
|
550
|
+
onKeyDown: (e) => {
|
|
551
|
+
if (folder && e.key === "Backspace" && !q) {
|
|
552
|
+
e.preventDefault();
|
|
553
|
+
e.stopPropagation();
|
|
554
|
+
leave();
|
|
555
|
+
} else if (catalogKey(e, flat, active, setActive, pick, !q)) e.preventDefault();
|
|
556
|
+
},
|
|
557
|
+
role: "combobox",
|
|
558
|
+
"aria-expanded": true,
|
|
559
|
+
"aria-controls": listId,
|
|
560
|
+
"aria-activedescendant": flat.length ? `${listId}-${active}` : void 0,
|
|
561
|
+
"aria-label": folder ? "Search blocks" : "Search or pick a block",
|
|
562
|
+
placeholder: folder ? "Search blocks" : "Search or pick a block",
|
|
563
|
+
className: "h-full min-w-0 flex-1 bg-transparent text-kit-sm text-kit-fg outline-none placeholder:text-kit-fg-3 focus-visible:shadow-none"
|
|
564
|
+
})]
|
|
565
|
+
}),
|
|
566
|
+
/* @__PURE__ */ jsx(CatalogList, {
|
|
567
|
+
sections,
|
|
568
|
+
flat,
|
|
569
|
+
active,
|
|
570
|
+
onHover: setActive,
|
|
571
|
+
onPick: pick,
|
|
572
|
+
empty,
|
|
573
|
+
emptyText,
|
|
574
|
+
noMatch,
|
|
575
|
+
detail: !!q || folder,
|
|
576
|
+
listId,
|
|
577
|
+
className: "min-h-0 flex-1"
|
|
578
|
+
}),
|
|
579
|
+
/* @__PURE__ */ jsx(Footer, {})
|
|
580
|
+
]
|
|
581
|
+
});
|
|
582
|
+
}
|
|
583
|
+
function SlashMenuPanel({ query, folder = false, active, setActive, onPick, allows, maxHeight }) {
|
|
584
|
+
const listId = React.useId();
|
|
585
|
+
const { sections, flat, empty, emptyText, noMatch } = useCatalog(query, allows, folder);
|
|
586
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
587
|
+
"data-kit-scope": "",
|
|
588
|
+
className: "glass-strong flex w-[320px] flex-col overflow-hidden rounded-kit-xl border border-kit-line",
|
|
589
|
+
style: maxHeight ? { maxHeight } : void 0,
|
|
590
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
591
|
+
children: [
|
|
592
|
+
/* @__PURE__ */ jsxs("div", {
|
|
593
|
+
className: "flex h-8 shrink-0 items-center gap-2 border-b border-kit-line px-3 text-kit-sm",
|
|
594
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
595
|
+
className: cn("flex-1 truncate", query ? "text-kit-fg" : "text-kit-fg-3"),
|
|
596
|
+
children: query ? `${folder ? "More blocks · " : ""}/${query}` : folder ? "More blocks" : "Type to search"
|
|
597
|
+
}), /* @__PURE__ */ jsx("kbd", {
|
|
598
|
+
"data-hint": "shortcuts",
|
|
599
|
+
className: "font-kit-sans text-kit-2xs text-kit-fg-3",
|
|
600
|
+
children: "esc"
|
|
601
|
+
})]
|
|
602
|
+
}),
|
|
603
|
+
/* @__PURE__ */ jsx(CatalogList, {
|
|
604
|
+
sections,
|
|
605
|
+
flat,
|
|
606
|
+
active,
|
|
607
|
+
onHover: setActive,
|
|
608
|
+
onPick,
|
|
609
|
+
empty,
|
|
610
|
+
emptyText,
|
|
611
|
+
noMatch,
|
|
612
|
+
detail: !!query || folder,
|
|
613
|
+
listId,
|
|
614
|
+
className: "max-h-[300px] min-h-0 flex-1"
|
|
615
|
+
}),
|
|
616
|
+
/* @__PURE__ */ jsx(Footer, {})
|
|
617
|
+
]
|
|
618
|
+
});
|
|
619
|
+
}
|
|
620
|
+
//#endregion
|
|
621
|
+
export { CatalogComponentsProvider, CatalogList, InsertMenuContent, SlashMenuPanel, blockAllowed, catalogKey, noteRecent, useCatalog, useCatalogComponents };
|
|
622
|
+
|
|
623
|
+
//# sourceMappingURL=catalog.js.map
|