@threadlabs/looma 0.4.0 → 0.5.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 +43 -12
- package/components/shared/editor.js +69 -0
- package/components/shared/input-modality.js +20 -0
- package/components/shared/overlay.js +281 -0
- package/components/shared/trigger.js +17 -0
- package/components/ui-affordance-scope/ui-affordance-scope.html +22 -0
- package/components/ui-affordance-scope/ui-affordance-scope.js +76 -0
- package/components/ui-avatar/ui-avatar.html +59 -0
- package/components/ui-avatar/ui-avatar.js +47 -0
- package/components/ui-avatar-group/ui-avatar-group.html +62 -0
- package/components/ui-avatar-group/ui-avatar-group.js +27 -0
- package/components/ui-badge/ui-badge.html +94 -0
- package/components/ui-button/ui-button.html +198 -0
- package/components/ui-callout/ui-callout.html +104 -0
- package/components/ui-checkbox/ui-checkbox.html +107 -0
- package/components/ui-checkbox/ui-checkbox.js +24 -0
- package/components/ui-cluster/ui-cluster.html +49 -0
- package/components/ui-combobox/ui-combobox.html +377 -0
- package/components/ui-combobox/ui-combobox.js +432 -0
- package/components/ui-container/ui-container.html +39 -0
- package/components/ui-context-menu/ui-context-menu.html +75 -0
- package/components/ui-context-menu/ui-context-menu.js +143 -0
- package/components/ui-dialog/ui-dialog.html +178 -0
- package/components/ui-dialog/ui-dialog.js +105 -0
- package/components/ui-disclosure/ui-disclosure.html +109 -0
- package/components/ui-disclosure/ui-disclosure.js +28 -0
- package/components/ui-editable/ui-editable.html +163 -0
- package/components/ui-editable/ui-editable.js +113 -0
- package/components/ui-editor-insert-table-grid/ui-editor-insert-table-grid.html +97 -0
- package/components/ui-editor-insert-table-grid/ui-editor-insert-table-grid.js +71 -0
- package/components/ui-editor-mention-menu/ui-editor-mention-menu.html +157 -0
- package/components/ui-editor-mention-menu/ui-editor-mention-menu.js +50 -0
- package/components/ui-editor-slash-menu/ui-editor-slash-menu.html +197 -0
- package/components/ui-editor-slash-menu/ui-editor-slash-menu.js +44 -0
- package/components/ui-editor-table-context-menu/ui-editor-table-context-menu.html +164 -0
- package/components/ui-editor-table-context-menu/ui-editor-table-context-menu.js +75 -0
- package/components/ui-editor-table-overlay/ui-editor-table-overlay.html +422 -0
- package/components/ui-editor-table-overlay/ui-editor-table-overlay.js +119 -0
- package/components/ui-editor-table-toolbar/ui-editor-table-toolbar.html +271 -0
- package/components/ui-editor-table-toolbar/ui-editor-table-toolbar.js +54 -0
- package/components/ui-editor-toolbar/ui-editor-toolbar.html +110 -0
- package/components/ui-floating-action-button/ui-floating-action-button.html +83 -0
- package/components/ui-form-field/ui-form-field.html +45 -0
- package/components/ui-form-field/ui-form-field.js +71 -0
- package/components/ui-grid/ui-grid.html +46 -0
- package/components/ui-icon/ui-icon.html +34 -0
- package/components/ui-icon/ui-icon.js +8 -0
- package/components/ui-icon-button/ui-icon-button.html +167 -0
- package/components/ui-icon-button/ui-icon-button.js +7 -0
- package/components/ui-input/ui-input.html +81 -0
- package/components/ui-input/ui-input.js +7 -0
- package/components/ui-menu/ui-menu.html +87 -0
- package/components/ui-menu/ui-menu.js +114 -0
- package/components/ui-menu-item/ui-menu-item.html +37 -0
- package/components/ui-popover/ui-popover.html +85 -0
- package/components/ui-popover/ui-popover.js +70 -0
- package/components/ui-radio/ui-radio.html +57 -0
- package/components/ui-radio/ui-radio.js +25 -0
- package/components/ui-radio-group/ui-radio-group.html +51 -0
- package/components/ui-radio-group/ui-radio-group.js +42 -0
- package/components/ui-reel/ui-reel.html +67 -0
- package/components/ui-search-result-row/ui-search-result-row.html +101 -0
- package/components/ui-search-shell/ui-search-shell.html +142 -0
- package/components/ui-search-shell/ui-search-shell.js +60 -0
- package/components/ui-select/ui-select.html +87 -0
- package/components/ui-select/ui-select.js +16 -0
- package/components/ui-separator/ui-separator.html +22 -0
- package/components/ui-sidebar/ui-sidebar.html +183 -0
- package/components/ui-sidebar/ui-sidebar.js +178 -0
- package/components/ui-stack/ui-stack.html +59 -0
- package/components/ui-switch/ui-switch.html +95 -0
- package/components/ui-switch/ui-switch.js +24 -0
- package/components/ui-switcher/ui-switcher.html +65 -0
- package/components/ui-tabs/ui-tabs.html +134 -0
- package/components/ui-tabs/ui-tabs.js +81 -0
- package/components/ui-textarea/ui-textarea.html +80 -0
- package/components/ui-textarea/ui-textarea.js +7 -0
- package/components/ui-toast-region/ui-toast-region.html +127 -0
- package/components/ui-toast-region/ui-toast-region.js +119 -0
- package/components/ui-tooltip/ui-tooltip.html +122 -0
- package/components/ui-tooltip/ui-tooltip.js +134 -0
- package/components/ui-top-bar/ui-top-bar.html +53 -0
- package/components/ui-tree/ui-tree.html +29 -0
- package/components/ui-tree/ui-tree.js +250 -0
- package/components/ui-tree-item/ui-tree-item.html +326 -0
- package/components/ui-tree-item/ui-tree-item.js +94 -0
- package/dist/index.d.ts +4 -414
- package/dist/index.js +55 -657
- package/editor/chunks/extensions.js +7267 -0
- package/editor/chunks/table-backgrounds.js +51 -0
- package/editor/chunks/ui.js +92 -0
- package/editor/extensions/callout.d.ts +20 -0
- package/editor/extensions/index.d.ts +12 -441
- package/editor/extensions/index.js +3 -64
- package/editor/extensions/list-behavior.d.ts +7 -0
- package/editor/extensions/mention.d.ts +35 -0
- package/editor/extensions/preset.d.ts +42 -0
- package/editor/extensions/slash-command.d.ts +80 -0
- package/editor/extensions/smart-paste.d.ts +13 -0
- package/editor/extensions/table-commands.d.ts +114 -0
- package/editor/extensions/table-formatting.d.ts +60 -0
- package/editor/icons.d.ts +55 -0
- package/editor/index.d.ts +8 -6
- package/editor/index.js +96 -71
- package/editor/insert-table-grid.d.ts +7 -0
- package/editor/mention-contract.d.ts +78 -0
- package/editor/mention-menu.d.ts +9 -0
- package/editor/slash-menu.d.ts +29 -0
- package/editor/table-backgrounds.d.ts +43 -0
- package/editor/table-context-menu.d.ts +12 -0
- package/editor/table-overlay.d.ts +79 -0
- package/editor/ui.d.ts +10 -50
- package/editor/ui.js +3 -14
- package/editor/viewport.d.ts +15 -0
- package/package.json +84 -60
- package/styles/ui-affordance-scope.css +19 -0
- package/styles/ui-avatar-group.css +56 -0
- package/styles/ui-avatar.css +47 -0
- package/styles/ui-badge.css +91 -0
- package/styles/ui-button.css +206 -0
- package/styles/ui-callout.css +76 -0
- package/styles/ui-checkbox.css +98 -0
- package/styles/ui-cluster.css +46 -0
- package/styles/ui-combobox.css +213 -0
- package/styles/ui-container.css +36 -0
- package/styles/ui-context-menu.css +68 -0
- package/styles/ui-dialog.css +160 -0
- package/styles/ui-disclosure.css +95 -0
- package/styles/ui-editable.css +139 -0
- package/styles/ui-editor-insert-table-grid.css +65 -0
- package/styles/ui-editor-mention-menu.css +121 -0
- package/styles/ui-editor-slash-menu.css +179 -0
- package/styles/ui-editor-table-context-menu.css +118 -0
- package/styles/ui-editor-table-overlay.css +318 -0
- package/styles/ui-editor-table-toolbar.css +191 -0
- package/styles/ui-editor-toolbar.css +115 -0
- package/styles/ui-floating-action-button.css +82 -0
- package/styles/ui-form-field.css +36 -0
- package/styles/ui-grid.css +43 -0
- package/styles/ui-icon-button.css +169 -0
- package/styles/ui-icon.css +23 -0
- package/styles/ui-input.css +82 -0
- package/styles/ui-menu-item.css +34 -0
- package/styles/ui-menu.css +80 -0
- package/styles/ui-popover.css +76 -0
- package/styles/ui-radio-group.css +38 -0
- package/styles/ui-radio.css +46 -0
- package/styles/ui-reel.css +63 -0
- package/styles/ui-search-result-row.css +92 -0
- package/styles/ui-search-shell.css +128 -0
- package/styles/ui-select.css +86 -0
- package/styles/ui-separator.css +16 -0
- package/styles/ui-sidebar.css +166 -0
- package/styles/ui-stack.css +55 -0
- package/styles/ui-switch.css +88 -0
- package/styles/ui-switcher.css +61 -0
- package/styles/ui-tabs.css +114 -0
- package/styles/ui-textarea.css +77 -0
- package/styles/ui-toast-region.css +103 -0
- package/styles/ui-tooltip.css +113 -0
- package/styles/ui-top-bar.css +51 -0
- package/styles/ui-tree-item.css +267 -0
- package/styles/ui-tree.css +16 -0
- package/vanilla/UiAffordanceScope.d.ts +14 -0
- package/vanilla/UiAffordanceScope.js +30 -0
- package/vanilla/UiAvatar.d.ts +17 -0
- package/vanilla/UiAvatar.js +41 -0
- package/vanilla/UiAvatarGroup.d.ts +15 -0
- package/vanilla/UiAvatarGroup.js +40 -0
- package/vanilla/UiBadge.d.ts +15 -0
- package/vanilla/UiBadge.js +30 -0
- package/vanilla/UiButton.d.ts +16 -0
- package/vanilla/UiButton.js +32 -0
- package/vanilla/UiCallout.d.ts +14 -0
- package/vanilla/UiCallout.js +124 -0
- package/vanilla/UiCheckbox.d.ts +19 -0
- package/vanilla/UiCheckbox.js +47 -0
- package/vanilla/UiCluster.d.ts +15 -0
- package/vanilla/UiCluster.js +30 -0
- package/vanilla/UiCombobox.d.ts +42 -0
- package/vanilla/UiCombobox.js +194 -0
- package/vanilla/UiContainer.d.ts +15 -0
- package/vanilla/UiContainer.js +30 -0
- package/vanilla/UiContextMenu.d.ts +18 -0
- package/vanilla/UiContextMenu.js +35 -0
- package/vanilla/UiDialog.d.ts +19 -0
- package/vanilla/UiDialog.js +53 -0
- package/vanilla/UiDisclosure.d.ts +18 -0
- package/vanilla/UiDisclosure.js +49 -0
- package/vanilla/UiEditable.d.ts +22 -0
- package/vanilla/UiEditable.js +59 -0
- package/vanilla/UiEditorInsertTableGrid.d.ts +18 -0
- package/vanilla/UiEditorInsertTableGrid.js +46 -0
- package/vanilla/UiEditorMentionMenu.d.ts +21 -0
- package/vanilla/UiEditorMentionMenu.js +63 -0
- package/vanilla/UiEditorSlashMenu.d.ts +20 -0
- package/vanilla/UiEditorSlashMenu.js +74 -0
- package/vanilla/UiEditorTableContextMenu.d.ts +17 -0
- package/vanilla/UiEditorTableContextMenu.js +69 -0
- package/vanilla/UiEditorTableOverlay.d.ts +16 -0
- package/vanilla/UiEditorTableOverlay.js +113 -0
- package/vanilla/UiEditorTableToolbar.d.ts +18 -0
- package/vanilla/UiEditorTableToolbar.js +121 -0
- package/vanilla/UiEditorToolbar.d.ts +14 -0
- package/vanilla/UiEditorToolbar.js +30 -0
- package/vanilla/UiFloatingActionButton.d.ts +16 -0
- package/vanilla/UiFloatingActionButton.js +35 -0
- package/vanilla/UiFormField.d.ts +16 -0
- package/vanilla/UiFormField.js +54 -0
- package/vanilla/UiGrid.d.ts +15 -0
- package/vanilla/UiGrid.js +30 -0
- package/vanilla/UiIcon.d.ts +14 -0
- package/vanilla/UiIcon.js +40 -0
- package/vanilla/UiIconButton.d.ts +19 -0
- package/vanilla/UiIconButton.js +37 -0
- package/vanilla/UiInput.d.ts +18 -0
- package/vanilla/UiInput.js +37 -0
- package/vanilla/UiMenu.d.ts +19 -0
- package/vanilla/UiMenu.js +35 -0
- package/vanilla/UiMenuItem.d.ts +15 -0
- package/vanilla/UiMenuItem.js +43 -0
- package/vanilla/UiPopover.d.ts +18 -0
- package/vanilla/UiPopover.js +33 -0
- package/vanilla/UiRadio.d.ts +19 -0
- package/vanilla/UiRadio.js +48 -0
- package/vanilla/UiRadioGroup.d.ts +21 -0
- package/vanilla/UiRadioGroup.js +35 -0
- package/vanilla/UiReel.d.ts +16 -0
- package/vanilla/UiReel.js +34 -0
- package/vanilla/UiSearchResultRow.d.ts +15 -0
- package/vanilla/UiSearchResultRow.js +82 -0
- package/vanilla/UiSearchShell.d.ts +18 -0
- package/vanilla/UiSearchShell.js +74 -0
- package/vanilla/UiSelect.d.ts +18 -0
- package/vanilla/UiSelect.js +42 -0
- package/vanilla/UiSeparator.d.ts +14 -0
- package/vanilla/UiSeparator.js +28 -0
- package/vanilla/UiSidebar.d.ts +24 -0
- package/vanilla/UiSidebar.js +47 -0
- package/vanilla/UiStack.d.ts +16 -0
- package/vanilla/UiStack.js +32 -0
- package/vanilla/UiSwitch.d.ts +18 -0
- package/vanilla/UiSwitch.js +46 -0
- package/vanilla/UiSwitcher.d.ts +16 -0
- package/vanilla/UiSwitcher.js +32 -0
- package/vanilla/UiTabs.d.ts +18 -0
- package/vanilla/UiTabs.js +47 -0
- package/vanilla/UiTextarea.d.ts +19 -0
- package/vanilla/UiTextarea.js +40 -0
- package/vanilla/UiToastRegion.d.ts +20 -0
- package/vanilla/UiToastRegion.js +58 -0
- package/vanilla/UiTooltip.d.ts +21 -0
- package/vanilla/UiTooltip.js +34 -0
- package/vanilla/UiTopBar.d.ts +13 -0
- package/vanilla/UiTopBar.js +59 -0
- package/vanilla/UiTree.d.ts +18 -0
- package/vanilla/UiTree.js +31 -0
- package/vanilla/UiTreeItem.d.ts +26 -0
- package/vanilla/UiTreeItem.js +164 -0
- package/vanilla/index.js +48 -0
- package/vue/UiAffordanceScope.d.ts +18 -0
- package/vue/UiAffordanceScope.js +2 -0
- package/vue/UiAffordanceScope.vue +118 -0
- package/vue/UiAvatar.d.ts +23 -0
- package/vue/UiAvatar.js +2 -0
- package/vue/UiAvatar.vue +152 -0
- package/vue/UiAvatarGroup.d.ts +20 -0
- package/vue/UiAvatarGroup.js +2 -0
- package/vue/UiAvatarGroup.vue +167 -0
- package/vue/UiBadge.d.ts +20 -0
- package/vue/UiBadge.js +2 -0
- package/vue/UiBadge.vue +123 -0
- package/vue/UiButton.d.ts +22 -0
- package/vue/UiButton.js +2 -0
- package/vue/UiButton.vue +229 -0
- package/vue/UiCallout.d.ts +18 -0
- package/vue/UiCallout.js +2 -0
- package/vue/UiCallout.vue +104 -0
- package/vue/UiCheckbox.d.ts +38 -0
- package/vue/UiCheckbox.js +2 -0
- package/vue/UiCheckbox.vue +216 -0
- package/vue/UiCluster.d.ts +17 -0
- package/vue/UiCluster.js +2 -0
- package/vue/UiCluster.vue +75 -0
- package/vue/UiCombobox.d.ts +255 -0
- package/vue/UiCombobox.js +2 -0
- package/vue/UiCombobox.vue +466 -0
- package/vue/UiContainer.d.ts +17 -0
- package/vue/UiContainer.js +2 -0
- package/vue/UiContainer.vue +65 -0
- package/vue/UiContextMenu.d.ts +50 -0
- package/vue/UiContextMenu.js +2 -0
- package/vue/UiContextMenu.vue +166 -0
- package/vue/UiDialog.d.ts +39 -0
- package/vue/UiDialog.js +2 -0
- package/vue/UiDialog.vue +273 -0
- package/vue/UiDisclosure.d.ts +44 -0
- package/vue/UiDisclosure.js +2 -0
- package/vue/UiDisclosure.vue +211 -0
- package/vue/UiEditable.d.ts +48 -0
- package/vue/UiEditable.js +2 -0
- package/vue/UiEditable.vue +267 -0
- package/vue/UiEditorInsertTableGrid.d.ts +26 -0
- package/vue/UiEditorInsertTableGrid.js +2 -0
- package/vue/UiEditorInsertTableGrid.vue +210 -0
- package/vue/UiEditorMentionMenu.d.ts +44 -0
- package/vue/UiEditorMentionMenu.js +2 -0
- package/vue/UiEditorMentionMenu.vue +284 -0
- package/vue/UiEditorSlashMenu.d.ts +41 -0
- package/vue/UiEditorSlashMenu.js +2 -0
- package/vue/UiEditorSlashMenu.vue +306 -0
- package/vue/UiEditorTableContextMenu.d.ts +19 -0
- package/vue/UiEditorTableContextMenu.js +2 -0
- package/vue/UiEditorTableContextMenu.vue +252 -0
- package/vue/UiEditorTableOverlay.d.ts +66 -0
- package/vue/UiEditorTableOverlay.js +2 -0
- package/vue/UiEditorTableOverlay.vue +455 -0
- package/vue/UiEditorTableToolbar.d.ts +21 -0
- package/vue/UiEditorTableToolbar.js +2 -0
- package/vue/UiEditorTableToolbar.vue +339 -0
- package/vue/UiEditorToolbar.d.ts +18 -0
- package/vue/UiEditorToolbar.js +2 -0
- package/vue/UiEditorToolbar.vue +138 -0
- package/vue/UiFloatingActionButton.d.ts +22 -0
- package/vue/UiFloatingActionButton.js +2 -0
- package/vue/UiFloatingActionButton.vue +116 -0
- package/vue/UiFormField.d.ts +28 -0
- package/vue/UiFormField.js +2 -0
- package/vue/UiFormField.vue +124 -0
- package/vue/UiGrid.d.ts +17 -0
- package/vue/UiGrid.js +2 -0
- package/vue/UiGrid.vue +72 -0
- package/vue/UiIcon.d.ts +8 -0
- package/vue/UiIcon.js +2 -0
- package/vue/UiIcon.vue +135 -0
- package/vue/UiIconButton.d.ts +27 -0
- package/vue/UiIconButton.js +2 -0
- package/vue/UiIconButton.vue +268 -0
- package/vue/UiInput.d.ts +20 -0
- package/vue/UiInput.js +2 -0
- package/vue/UiInput.vue +177 -0
- package/vue/UiMenu.d.ts +52 -0
- package/vue/UiMenu.js +2 -0
- package/vue/UiMenu.vue +194 -0
- package/vue/UiMenuItem.d.ts +20 -0
- package/vue/UiMenuItem.js +2 -0
- package/vue/UiMenuItem.vue +55 -0
- package/vue/UiPopover.d.ts +44 -0
- package/vue/UiPopover.js +2 -0
- package/vue/UiPopover.vue +188 -0
- package/vue/UiRadio.d.ts +38 -0
- package/vue/UiRadio.js +2 -0
- package/vue/UiRadio.vue +166 -0
- package/vue/UiRadioGroup.d.ts +50 -0
- package/vue/UiRadioGroup.js +2 -0
- package/vue/UiRadioGroup.vue +161 -0
- package/vue/UiReel.d.ts +18 -0
- package/vue/UiReel.js +2 -0
- package/vue/UiReel.vue +93 -0
- package/vue/UiSearchResultRow.d.ts +28 -0
- package/vue/UiSearchResultRow.js +2 -0
- package/vue/UiSearchResultRow.vue +124 -0
- package/vue/UiSearchShell.d.ts +42 -0
- package/vue/UiSearchShell.js +2 -0
- package/vue/UiSearchShell.vue +233 -0
- package/vue/UiSelect.d.ts +30 -0
- package/vue/UiSelect.js +2 -0
- package/vue/UiSelect.vue +183 -0
- package/vue/UiSeparator.d.ts +8 -0
- package/vue/UiSeparator.js +2 -0
- package/vue/UiSeparator.vue +38 -0
- package/vue/UiSidebar.d.ts +54 -0
- package/vue/UiSidebar.js +2 -0
- package/vue/UiSidebar.vue +288 -0
- package/vue/UiStack.d.ts +18 -0
- package/vue/UiStack.js +2 -0
- package/vue/UiStack.vue +85 -0
- package/vue/UiSwitch.d.ts +36 -0
- package/vue/UiSwitch.js +2 -0
- package/vue/UiSwitch.vue +203 -0
- package/vue/UiSwitcher.d.ts +18 -0
- package/vue/UiSwitcher.js +2 -0
- package/vue/UiSwitcher.vue +91 -0
- package/vue/UiTabs.d.ts +36 -0
- package/vue/UiTabs.js +2 -0
- package/vue/UiTabs.vue +269 -0
- package/vue/UiTextarea.d.ts +22 -0
- package/vue/UiTextarea.js +2 -0
- package/vue/UiTextarea.vue +177 -0
- package/vue/UiToastRegion.d.ts +48 -0
- package/vue/UiToastRegion.js +2 -0
- package/vue/UiToastRegion.vue +256 -0
- package/vue/UiTooltip.d.ts +50 -0
- package/vue/UiTooltip.js +2 -0
- package/vue/UiTooltip.vue +230 -0
- package/vue/UiTopBar.d.ts +19 -0
- package/vue/UiTopBar.js +2 -0
- package/vue/UiTopBar.vue +56 -0
- package/vue/UiTree.d.ts +62 -0
- package/vue/UiTree.js +2 -0
- package/vue/UiTree.vue +117 -0
- package/vue/UiTreeItem.d.ts +56 -0
- package/vue/UiTreeItem.js +2 -0
- package/vue/UiTreeItem.vue +418 -0
- package/vue/chunks/UiAffordanceScope.js +112 -0
- package/vue/chunks/UiAvatar.js +144 -0
- package/vue/chunks/UiAvatarGroup.js +142 -0
- package/vue/chunks/UiBadge.js +33 -0
- package/vue/chunks/UiButton.js +47 -0
- package/vue/chunks/UiCallout.js +117 -0
- package/vue/chunks/UiCheckbox.js +167 -0
- package/vue/chunks/UiCluster.js +33 -0
- package/vue/chunks/UiCombobox.js +684 -0
- package/vue/chunks/UiContainer.js +33 -0
- package/vue/chunks/UiContextMenu.js +153 -0
- package/vue/chunks/UiDialog.js +162 -0
- package/vue/chunks/UiDisclosure.js +185 -0
- package/vue/chunks/UiEditable.js +223 -0
- package/vue/chunks/UiEditorInsertTableGrid.js +221 -0
- package/vue/chunks/UiEditorMentionMenu.js +245 -0
- package/vue/chunks/UiEditorSlashMenu.js +210 -0
- package/vue/chunks/UiEditorTableContextMenu.js +201 -0
- package/vue/chunks/UiEditorTableOverlay.js +301 -0
- package/vue/chunks/UiEditorTableToolbar.js +299 -0
- package/vue/chunks/UiEditorToolbar.js +37 -0
- package/vue/chunks/UiFloatingActionButton.js +56 -0
- package/vue/chunks/UiFormField.js +113 -0
- package/vue/chunks/UiGrid.js +33 -0
- package/vue/chunks/UiIcon.js +170 -0
- package/vue/chunks/UiIconButton.js +141 -0
- package/vue/chunks/UiInput.js +136 -0
- package/vue/chunks/UiMenu.js +163 -0
- package/vue/chunks/UiMenuItem.js +37 -0
- package/vue/chunks/UiPopover.js +149 -0
- package/vue/chunks/UiRadio.js +164 -0
- package/vue/chunks/UiRadioGroup.js +160 -0
- package/vue/chunks/UiReel.js +42 -0
- package/vue/chunks/UiSearchResultRow.js +63 -0
- package/vue/chunks/UiSearchShell.js +152 -0
- package/vue/chunks/UiSelect.js +134 -0
- package/vue/chunks/UiSeparator.js +24 -0
- package/vue/chunks/UiSidebar.js +180 -0
- package/vue/chunks/UiStack.js +38 -0
- package/vue/chunks/UiSwitch.js +162 -0
- package/vue/chunks/UiSwitcher.js +38 -0
- package/vue/chunks/UiTabs.js +210 -0
- package/vue/chunks/UiTextarea.js +139 -0
- package/vue/chunks/UiToastRegion.js +227 -0
- package/vue/chunks/UiTooltip.js +163 -0
- package/vue/chunks/UiTopBar.js +25 -0
- package/vue/chunks/UiTree.js +140 -0
- package/vue/chunks/UiTreeItem.js +315 -0
- package/vue/chunks/_plugin-vue_export-helper.js +8 -0
- package/vue/components.css +4405 -0
- package/vue/editor/LoomaEditor.d.ts +171 -0
- package/vue/editor/image-delivery.d.ts +61 -0
- package/vue/editor/index.d.ts +4 -386
- package/vue/editor/index.js +995 -1134
- package/vue/editor/primitives.d.ts +23 -0
- package/vue/index.d.ts +48 -604
- package/vue/index.js +49 -86
- package/dist/chunk-MLKGABMK.js +0 -9
- package/dist/chunk-RWLYVQY6.js +0 -5719
- package/dist/chunk-XDNZIKNI.js +0 -2721
- package/dist/declarative-generated.cjs +0 -149
- package/dist/declarative-generated.d.cts +0 -16
- package/dist/declarative-generated.d.ts +0 -16
- package/dist/declarative-generated.js +0 -124
- package/dist/declarative.cjs +0 -2750
- package/dist/declarative.d.cts +0 -101
- package/dist/declarative.d.ts +0 -101
- package/dist/declarative.js +0 -15
- package/dist/index.cjs +0 -9077
- package/dist/index.d.cts +0 -414
- package/dist/loader.cjs +0 -8442
- package/dist/loader.d.cts +0 -4
- package/dist/loader.d.ts +0 -4
- package/dist/loader.js +0 -16
- package/editor/chunk-EUIH3TBV.js +0 -6826
- package/editor/chunk-JK53ENSG.js +0 -29
- package/editor/chunk-U36XNFJN.js +0 -2592
- package/editor/table-overlay-DZFGHQDt.d.ts +0 -138
- package/editor.css +0 -1592
- package/layout/index.cjs +0 -356
- package/layout/index.d.cts +0 -18
- package/layout/index.d.ts +0 -18
- package/layout/index.js +0 -341
- package/layout.css +0 -191
- package/styles.css +0 -940
- package/vue/chunk-OX3EACZ7.js +0 -4369
package/layout/index.cjs
DELETED
|
@@ -1,356 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/declarative-index.ts
|
|
21
|
-
var declarative_index_exports = {};
|
|
22
|
-
module.exports = __toCommonJS(declarative_index_exports);
|
|
23
|
-
var import_declarative = require("@threadlabs/looma/core/declarative");
|
|
24
|
-
|
|
25
|
-
// src/declarative/components/controllers/ui-reel.js
|
|
26
|
-
var ui_reel_exports = {};
|
|
27
|
-
__export(ui_reel_exports, {
|
|
28
|
-
default: () => controller
|
|
29
|
-
});
|
|
30
|
-
function controller(host) {
|
|
31
|
-
const element = host.element;
|
|
32
|
-
if (!element.hasAttribute("role")) element.setAttribute("role", "region");
|
|
33
|
-
if (!element.hasAttribute("tabindex")) element.setAttribute("tabindex", "0");
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
// src/declarative/components/controllers/ui-separator.js
|
|
37
|
-
var ui_separator_exports = {};
|
|
38
|
-
__export(ui_separator_exports, {
|
|
39
|
-
default: () => controller2
|
|
40
|
-
});
|
|
41
|
-
function controller2(host) {
|
|
42
|
-
const element = host.element;
|
|
43
|
-
const sync = () => {
|
|
44
|
-
if (!element.hasAttribute("role")) element.setAttribute("role", "separator");
|
|
45
|
-
if (element.getAttribute("role") === "separator") {
|
|
46
|
-
element.setAttribute("aria-orientation", host.state.orientation === "vertical" ? "vertical" : "horizontal");
|
|
47
|
-
} else {
|
|
48
|
-
element.removeAttribute("aria-orientation");
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
const stop = host.effect(sync);
|
|
52
|
-
const observer = new MutationObserver(sync);
|
|
53
|
-
observer.observe(element, { attributes: true, attributeFilter: ["role"] });
|
|
54
|
-
sync();
|
|
55
|
-
return () => {
|
|
56
|
-
stop();
|
|
57
|
-
observer.disconnect();
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
// src/declarative/components/controllers/ui-sidebar.js
|
|
62
|
-
var ui_sidebar_exports = {};
|
|
63
|
-
__export(ui_sidebar_exports, {
|
|
64
|
-
default: () => controller3
|
|
65
|
-
});
|
|
66
|
-
var BREAKPOINTS = { sm: "40rem", md: "48rem", lg: "64rem" };
|
|
67
|
-
function positive(value, fallback) {
|
|
68
|
-
const number = Number(value);
|
|
69
|
-
return Number.isFinite(number) && number > 0 ? number : fallback;
|
|
70
|
-
}
|
|
71
|
-
function controller3(host) {
|
|
72
|
-
const element = host.element;
|
|
73
|
-
const document = element.ownerDocument;
|
|
74
|
-
const view = document.defaultView;
|
|
75
|
-
let resizeHandle;
|
|
76
|
-
let pointerAbort;
|
|
77
|
-
let media;
|
|
78
|
-
let lastCollapsed = Boolean(host.state.collapsed);
|
|
79
|
-
let lastWidth = Number(host.state.width) || 0;
|
|
80
|
-
host.state.internalCollapsed = lastCollapsed;
|
|
81
|
-
host.state.drawer = false;
|
|
82
|
-
const bounds = () => {
|
|
83
|
-
const min = positive(host.state.minWidth, 200);
|
|
84
|
-
return { min, max: Math.max(min, positive(host.state.maxWidth, 480)), step: positive(host.state.resizeStep, 16) };
|
|
85
|
-
};
|
|
86
|
-
const currentWidth = () => element.getBoundingClientRect().width || 280;
|
|
87
|
-
const setWidth = (value, trigger = "programmatic") => {
|
|
88
|
-
const { min, max } = bounds();
|
|
89
|
-
const width = Math.round(Math.max(min, Math.min(max, value)));
|
|
90
|
-
const previous = Number.parseFloat(element.style.getPropertyValue("--_sidebar-width"));
|
|
91
|
-
element.style.setProperty("--_sidebar-width", `${width}px`);
|
|
92
|
-
resizeHandle?.setAttribute("aria-valuemin", String(min));
|
|
93
|
-
resizeHandle?.setAttribute("aria-valuemax", String(max));
|
|
94
|
-
resizeHandle?.setAttribute("aria-valuenow", String(width));
|
|
95
|
-
if (previous !== width) host.dispatch("resize", { width, trigger });
|
|
96
|
-
};
|
|
97
|
-
const onKeydown = (event) => {
|
|
98
|
-
const { min, max, step } = bounds();
|
|
99
|
-
let next = null;
|
|
100
|
-
if (event.key === "Home") next = min;
|
|
101
|
-
if (event.key === "End") next = max;
|
|
102
|
-
if (event.key === "ArrowLeft" || event.key === "ArrowRight") {
|
|
103
|
-
const delta = event.key === "ArrowRight" ? step : -step;
|
|
104
|
-
next = currentWidth() + (host.state.side === "end" ? -delta : delta);
|
|
105
|
-
}
|
|
106
|
-
if (next === null) return;
|
|
107
|
-
event.preventDefault();
|
|
108
|
-
setWidth(next, "keyboard");
|
|
109
|
-
};
|
|
110
|
-
const onPointerdown = (event) => {
|
|
111
|
-
if (event.button !== 0 || pointerAbort) return;
|
|
112
|
-
event.preventDefault();
|
|
113
|
-
const startX = event.clientX;
|
|
114
|
-
const startWidth = currentWidth();
|
|
115
|
-
const multiplier = host.state.side === "end" ? -1 : 1;
|
|
116
|
-
pointerAbort = new AbortController();
|
|
117
|
-
const signal = pointerAbort.signal;
|
|
118
|
-
const finish = () => {
|
|
119
|
-
pointerAbort?.abort();
|
|
120
|
-
pointerAbort = void 0;
|
|
121
|
-
};
|
|
122
|
-
view.addEventListener("pointermove", (move) => {
|
|
123
|
-
setWidth(startWidth + (move.clientX - startX) * multiplier, "pointer");
|
|
124
|
-
}, { signal });
|
|
125
|
-
view.addEventListener("pointerup", finish, { once: true, signal });
|
|
126
|
-
view.addEventListener("pointercancel", finish, { once: true, signal });
|
|
127
|
-
};
|
|
128
|
-
const removeHandle = () => {
|
|
129
|
-
pointerAbort?.abort();
|
|
130
|
-
pointerAbort = void 0;
|
|
131
|
-
resizeHandle?.remove();
|
|
132
|
-
resizeHandle = void 0;
|
|
133
|
-
};
|
|
134
|
-
const syncHandle = () => {
|
|
135
|
-
if (!host.state.resizable || host.state.drawer || host.state.internalCollapsed) {
|
|
136
|
-
removeHandle();
|
|
137
|
-
return;
|
|
138
|
-
}
|
|
139
|
-
if (!resizeHandle) {
|
|
140
|
-
resizeHandle = document.createElement("div");
|
|
141
|
-
resizeHandle.setAttribute("data-ui-sidebar-resizer", "");
|
|
142
|
-
resizeHandle.setAttribute("data-ui-affordance", "resize");
|
|
143
|
-
resizeHandle.setAttribute("role", "separator");
|
|
144
|
-
resizeHandle.setAttribute("aria-orientation", "vertical");
|
|
145
|
-
resizeHandle.setAttribute("tabindex", "0");
|
|
146
|
-
const guide = document.createElement("span");
|
|
147
|
-
guide.setAttribute("data-ui-guide", "");
|
|
148
|
-
guide.setAttribute("aria-hidden", "true");
|
|
149
|
-
resizeHandle.append(guide);
|
|
150
|
-
resizeHandle.addEventListener("keydown", onKeydown);
|
|
151
|
-
resizeHandle.addEventListener("pointerdown", onPointerdown);
|
|
152
|
-
resizeHandle.addEventListener("dblclick", () => {
|
|
153
|
-
element.style.removeProperty("--_sidebar-width");
|
|
154
|
-
setWidth(currentWidth(), "pointer");
|
|
155
|
-
});
|
|
156
|
-
element.append(resizeHandle);
|
|
157
|
-
}
|
|
158
|
-
resizeHandle.setAttribute("aria-label", String(host.state.resizeLabel || "Resize sidebar"));
|
|
159
|
-
const { min, max } = bounds();
|
|
160
|
-
resizeHandle.setAttribute("aria-valuemin", String(min));
|
|
161
|
-
resizeHandle.setAttribute("aria-valuemax", String(max));
|
|
162
|
-
resizeHandle.setAttribute("aria-valuenow", String(Math.round(currentWidth())));
|
|
163
|
-
};
|
|
164
|
-
const applyMode = () => {
|
|
165
|
-
const drawer = media?.matches ?? false;
|
|
166
|
-
if (drawer === host.state.drawer) return;
|
|
167
|
-
host.state.drawer = drawer;
|
|
168
|
-
if (drawer) {
|
|
169
|
-
element.setAttribute("popover", "auto");
|
|
170
|
-
} else {
|
|
171
|
-
if (element.matches(":popover-open")) element.hidePopover();
|
|
172
|
-
element.removeAttribute("popover");
|
|
173
|
-
}
|
|
174
|
-
syncHandle();
|
|
175
|
-
};
|
|
176
|
-
const watchBreakpoint = () => {
|
|
177
|
-
media?.removeEventListener("change", applyMode);
|
|
178
|
-
if (typeof view.matchMedia !== "function") return;
|
|
179
|
-
const width = BREAKPOINTS[host.state.breakpoint] ?? BREAKPOINTS.md;
|
|
180
|
-
media = view.matchMedia(`(width < ${width})`);
|
|
181
|
-
media.addEventListener("change", applyMode);
|
|
182
|
-
applyMode();
|
|
183
|
-
};
|
|
184
|
-
const toggle = (trigger) => {
|
|
185
|
-
if (host.state.drawer) {
|
|
186
|
-
element.togglePopover();
|
|
187
|
-
return;
|
|
188
|
-
}
|
|
189
|
-
host.state.internalCollapsed = !host.state.internalCollapsed;
|
|
190
|
-
syncHandle();
|
|
191
|
-
host.dispatch("toggle", { open: !host.state.internalCollapsed, mode: "docked", trigger });
|
|
192
|
-
};
|
|
193
|
-
const triggerOf = (source) => source?.matches?.(":focus-visible") ? "keyboard" : "pointer";
|
|
194
|
-
const onCommand = (event) => {
|
|
195
|
-
if (event.command !== "--toggle") return;
|
|
196
|
-
toggle(triggerOf(event.source));
|
|
197
|
-
};
|
|
198
|
-
const invokerCommands = typeof view.HTMLButtonElement?.prototype === "object" && "commandForElement" in view.HTMLButtonElement.prototype;
|
|
199
|
-
const onDocumentClick = (event) => {
|
|
200
|
-
const invoker = event.target.closest?.("[commandfor][command='--toggle']");
|
|
201
|
-
if (!invoker || !element.id || invoker.getAttribute("commandfor") !== element.id) return;
|
|
202
|
-
toggle(triggerOf(invoker));
|
|
203
|
-
};
|
|
204
|
-
const onPopoverToggle = (event) => {
|
|
205
|
-
if (!host.state.drawer) return;
|
|
206
|
-
host.dispatch("toggle", { open: event.newState === "open", mode: "drawer", trigger: "programmatic" });
|
|
207
|
-
};
|
|
208
|
-
const apply = () => {
|
|
209
|
-
const collapsed = Boolean(host.state.collapsed);
|
|
210
|
-
if (collapsed !== lastCollapsed) {
|
|
211
|
-
lastCollapsed = collapsed;
|
|
212
|
-
host.state.internalCollapsed = collapsed;
|
|
213
|
-
}
|
|
214
|
-
const width = Number(host.state.width) || 0;
|
|
215
|
-
if (width !== lastWidth) {
|
|
216
|
-
lastWidth = width;
|
|
217
|
-
if (width > 0) setWidth(width);
|
|
218
|
-
else element.style.removeProperty("--_sidebar-width");
|
|
219
|
-
}
|
|
220
|
-
syncHandle();
|
|
221
|
-
};
|
|
222
|
-
element.addEventListener("command", onCommand);
|
|
223
|
-
element.addEventListener("toggle", onPopoverToggle);
|
|
224
|
-
if (!invokerCommands) document.addEventListener("click", onDocumentClick);
|
|
225
|
-
if (lastWidth > 0) setWidth(lastWidth);
|
|
226
|
-
watchBreakpoint();
|
|
227
|
-
let lastBreakpoint = host.state.breakpoint;
|
|
228
|
-
const stop = host.effect(() => {
|
|
229
|
-
if (host.state.breakpoint !== lastBreakpoint) {
|
|
230
|
-
lastBreakpoint = host.state.breakpoint;
|
|
231
|
-
watchBreakpoint();
|
|
232
|
-
}
|
|
233
|
-
apply();
|
|
234
|
-
});
|
|
235
|
-
apply();
|
|
236
|
-
return () => {
|
|
237
|
-
stop();
|
|
238
|
-
removeHandle();
|
|
239
|
-
media?.removeEventListener("change", applyMode);
|
|
240
|
-
element.removeEventListener("command", onCommand);
|
|
241
|
-
element.removeEventListener("toggle", onPopoverToggle);
|
|
242
|
-
document.removeEventListener("click", onDocumentClick);
|
|
243
|
-
};
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
// src/declarative/registry.js
|
|
247
|
-
var records = [
|
|
248
|
-
{ tag: "ui-cluster", source: '<template component="ui-cluster" status="early" summary="Wrapping row of items with consistent gaps, for tags, buttons, and other content that flows onto new lines.">\n <defs>\n <prop name="gap" type="xs | s | m | l | xl">gap token.</prop>\n <prop name="align" type="start | center | end | stretch">align token.</prop>\n </defs>\n <div><slot></slot></div>\n</template>\n', controller: void 0 },
|
|
249
|
-
{ tag: "ui-container", source: '<template component="ui-container" status="early" summary="Looma ui-container layout primitive.">\n <defs>\n <prop name="measure" type="narrow | wide">measure token.</prop>\n <prop name="gutters" type="s | m | l">gutters token.</prop>\n </defs>\n <div><slot></slot></div>\n</template>\n', controller: void 0 },
|
|
250
|
-
{ tag: "ui-grid", source: '<template component="ui-grid" status="early" summary="Looma ui-grid layout primitive.">\n <defs>\n <prop name="gap" type="xs | s | m | l | xl">gap token.</prop>\n <prop name="min" type="sm | md | lg">min token.</prop>\n </defs>\n <div><slot></slot></div>\n</template>\n', controller: void 0 },
|
|
251
|
-
{ tag: "ui-reel", source: '<template component="ui-reel" status="early" summary="Looma ui-reel layout primitive." controller="./controllers/ui-reel.js">\n <defs>\n <prop name="gap" type="xs | s | m | l | xl">gap token.</prop>\n <prop name="itemWidth" type="sm | md | lg">itemWidth token.</prop>\n <prop name="snap" type="start | center">snap token.</prop>\n </defs>\n <div><slot></slot></div>\n</template>\n', controller: ui_reel_exports },
|
|
252
|
-
{ tag: "ui-separator", source: '<template component="ui-separator" status="early" summary="Looma ui-separator layout primitive." controller="./controllers/ui-separator.js">\n <defs>\n <prop name="orientation" type="horizontal | vertical" default="horizontal">orientation token.</prop>\n </defs>\n <div><slot></slot></div>\n</template>\n', controller: ui_separator_exports },
|
|
253
|
-
{ tag: "ui-sidebar", source: `<template component="ui-sidebar" status="early" summary="An application sidebar panel: resizable and collapsible when docked, an off-canvas drawer on narrow screens." controller="./controllers/ui-sidebar.js">
|
|
254
|
-
<defs>
|
|
255
|
-
<prop name="side" type="start | end" default="start">The edge the sidebar sits on. The page places it beside its main content.</prop>
|
|
256
|
-
<prop name="width" type="number" default="0">Docked width in pixels. 0 uses --ui-sidebar-width (280px by default); dragging the handle updates it.</prop>
|
|
257
|
-
<prop name="minWidth" type="number" default="200">The narrowest width the resize handle allows, in pixels.</prop>
|
|
258
|
-
<prop name="maxWidth" type="number" default="480">The widest width the resize handle allows, in pixels.</prop>
|
|
259
|
-
<prop name="resizable" type="boolean" default="false">Adds a resize handle on the inner edge (drag, or arrow keys, Home, and End).</prop>
|
|
260
|
-
<prop name="resizeStep" type="number" default="16">Arrow-key resize step in pixels.</prop>
|
|
261
|
-
<prop name="resizeLabel" type="string" default="Resize sidebar">Accessible name of the resize handle.</prop>
|
|
262
|
-
<prop name="collapsed" type="boolean" default="false">Whether the docked sidebar is collapsed.</prop>
|
|
263
|
-
<prop name="breakpoint" type="sm | md | lg" default="md">Below this viewport width (40rem, 48rem, 64rem) the sidebar becomes an off-canvas drawer, closed until toggled.</prop>
|
|
264
|
-
<state name="internalCollapsed" :value="false"></state>
|
|
265
|
-
<state name="drawer" :value="false"></state>
|
|
266
|
-
<event name="resize" type="object({ width: number, trigger: keyboard | pointer | programmatic })"></event>
|
|
267
|
-
<event name="toggle" type="object({ open: boolean, mode: docked | drawer, trigger: keyboard | pointer | programmatic })"></event>
|
|
268
|
-
</defs>
|
|
269
|
-
<aside :data-state-collapsed="internalCollapsed" :data-state-drawer="drawer"><div class="sidebar__content"><slot></slot></div></aside>
|
|
270
|
-
<style>:scope {
|
|
271
|
-
--_sidebar-default-width: 280px;
|
|
272
|
-
position: relative;
|
|
273
|
-
box-sizing: border-box;
|
|
274
|
-
display: flex;
|
|
275
|
-
flex-direction: column;
|
|
276
|
-
flex: none;
|
|
277
|
-
inline-size: var(--_sidebar-width, var(--ui-sidebar-width, var(--_sidebar-default-width)));
|
|
278
|
-
max-inline-size: 100%;
|
|
279
|
-
min-block-size: 0;
|
|
280
|
-
background: var(--ui-sidebar-surface, var(--ui-surface-default));
|
|
281
|
-
border-inline-end: 1px solid var(--ui-sidebar-border, var(--ui-border-default));
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
:scope[data-side='end'] {
|
|
285
|
-
border-inline-end: 0;
|
|
286
|
-
border-inline-start: 1px solid var(--ui-sidebar-border, var(--ui-border-default));
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
.sidebar__content {
|
|
290
|
-
flex: 1;
|
|
291
|
-
min-block-size: 0;
|
|
292
|
-
overflow: auto;
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
/* Collapsed while docked. */
|
|
296
|
-
:scope:is([data-state-collapsed=''], [data-state-collapsed='true']):not([popover]) {
|
|
297
|
-
display: none;
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
/* Drawer: a popover in the top layer, sliding in from its edge. Closed popovers are hidden by the UA. */
|
|
301
|
-
:scope[popover] {
|
|
302
|
-
position: fixed;
|
|
303
|
-
inset-block: 0;
|
|
304
|
-
inset-inline-start: 0;
|
|
305
|
-
inset-inline-end: auto;
|
|
306
|
-
margin: 0;
|
|
307
|
-
padding: 0;
|
|
308
|
-
inline-size: min(var(--_sidebar-width, var(--ui-sidebar-width, var(--_sidebar-default-width))), 85vw);
|
|
309
|
-
max-block-size: none;
|
|
310
|
-
block-size: 100dvh;
|
|
311
|
-
border-block: 0;
|
|
312
|
-
box-shadow: var(--ui-elevation-overlay, var(--ui-shadow-lg));
|
|
313
|
-
transform: translateX(0);
|
|
314
|
-
transition:
|
|
315
|
-
transform var(--ui-motion-base, 0.2s) var(--ui-motion-ease-out, ease-out),
|
|
316
|
-
display var(--ui-motion-base, 0.2s) allow-discrete,
|
|
317
|
-
overlay var(--ui-motion-base, 0.2s) allow-discrete;
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
/* The author display above would otherwise override the UA rule that hides a closed popover. */
|
|
321
|
-
:scope[popover]:not(:popover-open) {
|
|
322
|
-
display: none;
|
|
323
|
-
transform: translateX(-100%);
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
:scope[popover][data-side='end'] {
|
|
327
|
-
inset-inline-start: auto;
|
|
328
|
-
inset-inline-end: 0;
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
:scope[popover][data-side='end']:not(:popover-open) {
|
|
332
|
-
transform: translateX(100%);
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
@starting-style {
|
|
336
|
-
:scope[popover]:popover-open { transform: translateX(-100%); }
|
|
337
|
-
:scope[popover][data-side='end']:popover-open { transform: translateX(100%); }
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
:scope[popover]::backdrop {
|
|
341
|
-
background: var(--ui-sidebar-backdrop, rgb(0 0 0 / 0.32));
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
@media (prefers-reduced-motion: reduce) {
|
|
345
|
-
:scope[popover] { transition: none; }
|
|
346
|
-
}
|
|
347
|
-
</style>
|
|
348
|
-
</template>
|
|
349
|
-
`, controller: ui_sidebar_exports },
|
|
350
|
-
{ tag: "ui-stack", source: '<template component="ui-stack" status="early" summary="Looma ui-stack layout primitive.">\n <defs>\n <prop name="gap" type="xs | s | m | l | xl">gap token.</prop>\n <prop name="align" type="start | center | end | stretch">align token.</prop>\n <prop name="justify" type="start | center | end | between">justify token.</prop>\n </defs>\n <div><slot></slot></div>\n</template>\n', controller: void 0 },
|
|
351
|
-
{ tag: "ui-switcher", source: '<template component="ui-switcher" status="early" summary="Looma ui-switcher layout primitive.">\n <defs>\n <prop name="gap" type="xs | s | m | l | xl">gap token.</prop>\n <prop name="threshold" type="xs | sm | md | lg">threshold token.</prop>\n <prop name="align" type="start | center | end | stretch">align token.</prop>\n </defs>\n <div><slot></slot></div>\n</template>\n', controller: void 0 }
|
|
352
|
-
];
|
|
353
|
-
var styles = '/*\n * Keep the box model outside `@layer components`: these are composition\n * guarantees for authored light-DOM children, not themeable component styles.\n */\n:where([data-component-root~="ui-stack"], [data-component-root~="ui-cluster"], [data-component-root~="ui-grid"], [data-component-root~="ui-container"], [data-component-root~="ui-switcher"], [data-component-root~="ui-sidebar"], [data-component-root~="ui-reel"], [data-component-root~="ui-separator"]),\n:where([data-component-root~="ui-stack"], [data-component-root~="ui-cluster"], [data-component-root~="ui-grid"], [data-component-root~="ui-container"], [data-component-root~="ui-switcher"], [data-component-root~="ui-sidebar"], [data-component-root~="ui-reel"], [data-component-root~="ui-separator"]) *,\n:where([data-component-root~="ui-stack"], [data-component-root~="ui-cluster"], [data-component-root~="ui-grid"], [data-component-root~="ui-container"], [data-component-root~="ui-switcher"], [data-component-root~="ui-sidebar"], [data-component-root~="ui-reel"], [data-component-root~="ui-separator"]) *::before,\n:where([data-component-root~="ui-stack"], [data-component-root~="ui-cluster"], [data-component-root~="ui-grid"], [data-component-root~="ui-container"], [data-component-root~="ui-switcher"], [data-component-root~="ui-sidebar"], [data-component-root~="ui-reel"], [data-component-root~="ui-separator"]) *::after {\n box-sizing: border-box;\n}\n\n:where([data-component-root~="ui-stack"], [data-component-root~="ui-cluster"], [data-component-root~="ui-grid"], [data-component-root~="ui-container"], [data-component-root~="ui-switcher"], [data-component-root~="ui-sidebar"], [data-component-root~="ui-reel"], [data-component-root~="ui-separator"]) {\n /* `revert-layer` exposes `@layer components`; `revert` would skip the author layer entirely. */\n all: revert-layer;\n box-sizing: border-box;\n font-family: var(--ui-font-family-sans);\n font-size: var(--ui-font-size-md);\n line-height: var(--ui-line-height-md);\n color: var(--ui-text-primary);\n}\n\n:where([data-component-root~="ui-stack"], [data-component-root~="ui-cluster"], [data-component-root~="ui-grid"], [data-component-root~="ui-container"], [data-component-root~="ui-switcher"], [data-component-root~="ui-sidebar"], [data-component-root~="ui-reel"], [data-component-root~="ui-separator"])[data-ui-inherit-typography] {\n /* Consumers opt into surrounding prose styles; isolated component defaults remain the safe default. */\n font-family: inherit;\n font-size: inherit;\n line-height: inherit;\n font-weight: inherit;\n color: inherit;\n direction: inherit;\n writing-mode: inherit;\n text-orientation: inherit;\n text-rendering: inherit;\n font-feature-settings: inherit;\n font-variation-settings: inherit;\n}\n\n@layer components {\n :where([data-component-root~="ui-stack"], [data-component-root~="ui-cluster"], [data-component-root~="ui-grid"], [data-component-root~="ui-container"], [data-component-root~="ui-switcher"], [data-component-root~="ui-sidebar"], [data-component-root~="ui-reel"], [data-component-root~="ui-separator"]) {\n min-inline-size: 0;\n max-inline-size: 100%;\n margin: 0;\n }\n\n [data-component-root~="ui-stack"] {\n --ui-layout-gap: var(--ui-space-4, 1rem);\n --ui-layout-align: stretch;\n --ui-layout-justify: flex-start;\n display: flex;\n flex-direction: column;\n gap: var(--ui-layout-gap);\n align-items: var(--ui-layout-align);\n justify-content: var(--ui-layout-justify);\n }\n\n [data-component-root~="ui-stack"][data-gap="xs"] { --ui-layout-gap: var(--ui-space-2, 0.5rem); }\n [data-component-root~="ui-stack"][data-gap="s"] { --ui-layout-gap: var(--ui-space-3, 0.75rem); }\n [data-component-root~="ui-stack"][data-gap="m"] { --ui-layout-gap: var(--ui-space-4, 1rem); }\n [data-component-root~="ui-stack"][data-gap="l"] { --ui-layout-gap: var(--ui-space-5, 1.5rem); }\n [data-component-root~="ui-stack"][data-gap="xl"] { --ui-layout-gap: var(--ui-space-6, 2rem); }\n [data-component-root~="ui-stack"][data-align="start"] { --ui-layout-align: flex-start; }\n [data-component-root~="ui-stack"][data-align="center"] { --ui-layout-align: center; }\n [data-component-root~="ui-stack"][data-align="end"] { --ui-layout-align: flex-end; }\n [data-component-root~="ui-stack"][data-justify="center"] { --ui-layout-justify: center; }\n [data-component-root~="ui-stack"][data-justify="end"] { --ui-layout-justify: flex-end; }\n [data-component-root~="ui-stack"][data-justify="between"] { --ui-layout-justify: space-between; }\n\n [data-component-root~="ui-cluster"] {\n --ui-layout-gap: var(--ui-space-3, 0.75rem);\n --ui-layout-align: center;\n display: flex;\n flex-wrap: wrap;\n align-items: var(--ui-layout-align);\n gap: var(--ui-layout-gap);\n }\n\n [data-component-root~="ui-cluster"][data-gap="xs"] { --ui-layout-gap: var(--ui-space-2, 0.5rem); }\n [data-component-root~="ui-cluster"][data-gap="s"] { --ui-layout-gap: var(--ui-space-3, 0.75rem); }\n [data-component-root~="ui-cluster"][data-gap="m"] { --ui-layout-gap: var(--ui-space-4, 1rem); }\n [data-component-root~="ui-cluster"][data-gap="l"] { --ui-layout-gap: var(--ui-space-5, 1.5rem); }\n [data-component-root~="ui-cluster"][data-gap="xl"] { --ui-layout-gap: var(--ui-space-6, 2rem); }\n [data-component-root~="ui-cluster"][data-align="start"] { --ui-layout-align: flex-start; }\n [data-component-root~="ui-cluster"][data-align="center"] { --ui-layout-align: center; }\n [data-component-root~="ui-cluster"][data-align="end"] { --ui-layout-align: flex-end; }\n [data-component-root~="ui-cluster"][data-align="stretch"] { --ui-layout-align: stretch; }\n\n [data-component-root~="ui-grid"] {\n --ui-grid-gap: var(--ui-space-4, 1rem);\n --ui-grid-min: 12rem;\n display: grid;\n gap: var(--ui-grid-gap);\n grid-template-columns: repeat(auto-fit, minmax(min(var(--ui-grid-min), 100%), 1fr));\n }\n\n [data-component-root~="ui-grid"][data-gap="xs"] { --ui-grid-gap: var(--ui-space-2, 0.5rem); }\n [data-component-root~="ui-grid"][data-gap="s"] { --ui-grid-gap: var(--ui-space-3, 0.75rem); }\n [data-component-root~="ui-grid"][data-gap="m"] { --ui-grid-gap: var(--ui-space-4, 1rem); }\n [data-component-root~="ui-grid"][data-gap="l"] { --ui-grid-gap: var(--ui-space-5, 1.5rem); }\n [data-component-root~="ui-grid"][data-min="sm"] { --ui-grid-min: 12rem; }\n [data-component-root~="ui-grid"][data-min="md"] { --ui-grid-min: 16rem; }\n [data-component-root~="ui-grid"][data-min="lg"] { --ui-grid-min: 20rem; }\n\n [data-component-root~="ui-container"] {\n --ui-container-measure: 65ch;\n --ui-container-gutters: var(--ui-space-4, 1rem);\n display: block;\n inline-size: 100%;\n max-inline-size: var(--ui-container-measure);\n margin-inline: auto;\n padding-inline: var(--ui-container-gutters);\n }\n\n [data-component-root~="ui-container"][data-measure="narrow"] { --ui-container-measure: 45ch; }\n [data-component-root~="ui-container"][data-measure="wide"] { --ui-container-measure: 80ch; }\n [data-component-root~="ui-container"][data-gutters="s"] { --ui-container-gutters: var(--ui-space-3, 0.75rem); }\n [data-component-root~="ui-container"][data-gutters="m"] { --ui-container-gutters: var(--ui-space-4, 1rem); }\n [data-component-root~="ui-container"][data-gutters="l"] { --ui-container-gutters: var(--ui-space-5, 1.5rem); }\n\n [data-component-root~="ui-switcher"] {\n --ui-switcher-gap: var(--ui-space-4, 1rem);\n --ui-switcher-threshold: 30rem;\n --ui-switcher-align: stretch;\n display: flex;\n flex-wrap: wrap;\n gap: var(--ui-switcher-gap);\n align-items: var(--ui-switcher-align);\n }\n\n [data-component-root~="ui-switcher"] > * {\n min-inline-size: 0;\n flex-grow: 1;\n /* The large multiplier makes the basis flip as a group at the intrinsic threshold. */\n flex-basis: calc((var(--ui-switcher-threshold) - 100%) * 999);\n }\n\n [data-component-root~="ui-switcher"][data-gap="xs"] { --ui-switcher-gap: var(--ui-space-2, 0.5rem); }\n [data-component-root~="ui-switcher"][data-gap="s"] { --ui-switcher-gap: var(--ui-space-3, 0.75rem); }\n [data-component-root~="ui-switcher"][data-gap="m"] { --ui-switcher-gap: var(--ui-space-4, 1rem); }\n [data-component-root~="ui-switcher"][data-gap="l"] { --ui-switcher-gap: var(--ui-space-5, 1.5rem); }\n [data-component-root~="ui-switcher"][data-threshold="xs"] { --ui-switcher-threshold: 20rem; }\n [data-component-root~="ui-switcher"][data-threshold="sm"] { --ui-switcher-threshold: 30rem; }\n [data-component-root~="ui-switcher"][data-threshold="md"] { --ui-switcher-threshold: 45rem; }\n [data-component-root~="ui-switcher"][data-threshold="lg"] { --ui-switcher-threshold: 60rem; }\n [data-component-root~="ui-switcher"][data-align="start"] { --ui-switcher-align: flex-start; }\n [data-component-root~="ui-switcher"][data-align="center"] { --ui-switcher-align: center; }\n [data-component-root~="ui-switcher"][data-align="end"] { --ui-switcher-align: flex-end; }\n [data-component-root~="ui-sidebar"] > [data-ui-sidebar-resizer] {\n position: absolute;\n z-index: 1;\n inset-block: 0;\n /* On the panel\'s inner edge: the end edge of a start sidebar. */\n inset-inline-end: 0;\n inline-size: 8px;\n min-inline-size: 8px;\n transform: translateX(50%);\n cursor: col-resize;\n touch-action: none;\n outline: none;\n }\n [data-component-root~="ui-sidebar"][data-side="end"] > [data-ui-sidebar-resizer] {\n inset-inline-end: auto;\n inset-inline-start: 0;\n transform: translateX(-50%);\n }\n [data-component-root~="ui-sidebar"] > [data-ui-sidebar-resizer]::after {\n content: "";\n position: absolute;\n inset-block: 0;\n inset-inline-start: 3px;\n inline-size: 2px;\n background: color-mix(in srgb, var(--ui-affordance-guide-color, var(--ui-border-strong)) 45%, transparent);\n opacity: var(--ui-affordance-guide-opacity, 0.42);\n transition:\n background-color var(--ui-affordance-motion, var(--ui-motion-fast, 120ms)) var(--ui-motion-ease, ease),\n opacity var(--ui-affordance-motion, var(--ui-motion-fast, 120ms)) var(--ui-motion-ease, ease);\n }\n [data-component-root~="ui-sidebar"] > [data-ui-sidebar-resizer] > [data-ui-guide] {\n position: absolute;\n inset-block-start: 50%;\n inset-inline-start: 50%;\n inline-size: 6px;\n block-size: 22px;\n border: 1px solid var(--ui-border-strong, #c8c8c4);\n border-radius: var(--ui-radius-round, 999px);\n background: var(--ui-surface-elevated, #fff);\n opacity: 0;\n transform: translate(-50%, -50%);\n transition: opacity var(--ui-affordance-motion, var(--ui-motion-fast, 120ms)) var(--ui-motion-ease, ease);\n pointer-events: none;\n }\n [data-component-root~="ui-sidebar"] > [data-ui-sidebar-resizer]:hover::after,\n [data-component-root~="ui-sidebar"] > [data-ui-sidebar-resizer]:focus-visible::after {\n background: var(--ui-affordance-direct-color, var(--ui-accent-solid, var(--ui-color-focus, Highlight)));\n opacity: 1;\n }\n [data-component-root~="ui-sidebar"] > [data-ui-sidebar-resizer]:is(:hover, :focus-visible) > [data-ui-guide] {\n opacity: 1;\n }\n\n [data-component-root~="ui-reel"] {\n --ui-reel-gap: var(--ui-space-4, 1rem);\n --ui-reel-item-width: auto;\n display: flex;\n inline-size: 100%;\n gap: var(--ui-reel-gap);\n overflow-x: auto;\n overflow-y: hidden;\n overscroll-behavior-inline: contain;\n -webkit-overflow-scrolling: touch;\n }\n\n [data-component-root~="ui-reel"] > * {\n min-inline-size: 0;\n flex: 0 0 var(--ui-reel-item-width);\n }\n [data-component-root~="ui-reel"][data-gap="xs"] { --ui-reel-gap: var(--ui-space-2, 0.5rem); }\n [data-component-root~="ui-reel"][data-gap="s"] { --ui-reel-gap: var(--ui-space-3, 0.75rem); }\n [data-component-root~="ui-reel"][data-gap="m"] { --ui-reel-gap: var(--ui-space-4, 1rem); }\n [data-component-root~="ui-reel"][data-gap="l"] { --ui-reel-gap: var(--ui-space-5, 1.5rem); }\n [data-component-root~="ui-reel"][data-item-width="sm"] { --ui-reel-item-width: 12rem; }\n [data-component-root~="ui-reel"][data-item-width="md"] { --ui-reel-item-width: 16rem; }\n [data-component-root~="ui-reel"][data-item-width="lg"] { --ui-reel-item-width: 20rem; }\n [data-component-root~="ui-reel"][data-snap="start"],\n [data-component-root~="ui-reel"][data-snap="center"] { scroll-snap-type: inline mandatory; }\n [data-component-root~="ui-reel"][data-snap="start"] > * { scroll-snap-align: start; }\n [data-component-root~="ui-reel"][data-snap="center"] > * { scroll-snap-align: center; }\n\n [data-component-root~="ui-separator"] {\n --ui-separator-color: var(--ui-border-default, #d0d5dd);\n --ui-separator-space: var(--ui-space-4, 1rem);\n display: block;\n margin: 0;\n border: 0;\n border-block-start: 1px solid var(--ui-separator-color);\n padding: 0;\n }\n\n [data-component-root~="ui-separator"][data-orientation="vertical"] {\n inline-size: 1px;\n block-size: 100%;\n border-block-start: 0;\n border-inline-start: 1px solid var(--ui-separator-color);\n }\n}\n';
|
|
354
|
-
|
|
355
|
-
// src/declarative-index.ts
|
|
356
|
-
(0, import_declarative.registerLoomaPackage)("layout", records, styles);
|
package/layout/index.d.cts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Origin of a sidebar width transition.
|
|
3
|
-
* The trigger is stable across native HTML and framework adapters, allowing an
|
|
4
|
-
* application to persist or announce user changes without treating initial
|
|
5
|
-
* programmatic synchronization as input.
|
|
6
|
-
*/
|
|
7
|
-
type SidebarResizeTrigger = "keyboard" | "pointer" | "programmatic";
|
|
8
|
-
/**
|
|
9
|
-
* Effective, clamped sidebar width after a transition.
|
|
10
|
-
* Consumers should use this value rather than remeasure during the event; it is
|
|
11
|
-
* already normalized against the component's min/max contract.
|
|
12
|
-
*/
|
|
13
|
-
interface SidebarResizeDetail {
|
|
14
|
-
width: number;
|
|
15
|
-
trigger: SidebarResizeTrigger;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export type { SidebarResizeDetail, SidebarResizeTrigger };
|
package/layout/index.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Origin of a sidebar width transition.
|
|
3
|
-
* The trigger is stable across native HTML and framework adapters, allowing an
|
|
4
|
-
* application to persist or announce user changes without treating initial
|
|
5
|
-
* programmatic synchronization as input.
|
|
6
|
-
*/
|
|
7
|
-
type SidebarResizeTrigger = "keyboard" | "pointer" | "programmatic";
|
|
8
|
-
/**
|
|
9
|
-
* Effective, clamped sidebar width after a transition.
|
|
10
|
-
* Consumers should use this value rather than remeasure during the event; it is
|
|
11
|
-
* already normalized against the component's min/max contract.
|
|
12
|
-
*/
|
|
13
|
-
interface SidebarResizeDetail {
|
|
14
|
-
width: number;
|
|
15
|
-
trigger: SidebarResizeTrigger;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export type { SidebarResizeDetail, SidebarResizeTrigger };
|