@threadlabs/looma 0.51.5 → 0.52.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 +4 -4
- package/components/shared/overlay.js +7 -2
- package/components/ui-breadcrumb-item/ui-breadcrumb-item.html +1 -0
- package/components/ui-calendar/ui-calendar.js +11 -7
- package/components/ui-card/ui-card.html +7 -0
- package/components/ui-date-field/ui-date-field.js +0 -5
- package/components/ui-disclosure/ui-disclosure.js +19 -4
- package/components/ui-editor-link-form/ui-editor-link-form.js +5 -0
- package/components/ui-editor-mention-menu-item/ui-editor-mention-menu-item.html +2 -3
- package/components/ui-editor-table-context-menu/ui-editor-table-context-menu.html +10 -1
- package/components/ui-file-input/ui-file-input.js +0 -2
- package/components/ui-status-message/ui-status-message.html +1 -0
- package/components/ui-tabs/ui-tabs.html +1 -0
- package/components/ui-tooltip/ui-tooltip.html +11 -32
- package/dist/index.js +14 -8
- package/docs/catalog.json +592 -131
- package/editor/components.css +530 -551
- package/editor/index.js +72 -47
- package/package.json +30 -35
- package/styles/ui-action-bar.css +8 -8
- package/styles/ui-affordance-scope.css +10 -10
- package/styles/ui-avatar-group.css +11 -11
- package/styles/ui-avatar.css +14 -14
- package/styles/ui-badge.css +67 -67
- package/styles/ui-breadcrumb-item.css +10 -10
- package/styles/ui-breadcrumbs.css +8 -8
- package/styles/ui-button.css +99 -99
- package/styles/ui-calendar.css +1 -1
- package/styles/ui-callout.css +14 -14
- package/styles/ui-card-group.css +11 -11
- package/styles/ui-card.css +40 -35
- package/styles/ui-checkbox.css +28 -28
- package/styles/ui-cluster.css +30 -30
- package/styles/ui-color-picker.css +16 -16
- package/styles/ui-combobox.css +50 -50
- package/styles/ui-compact-content.css +1 -1
- package/styles/ui-compact-editor.css +1 -1
- package/styles/ui-compact-mark.css +1 -1
- package/styles/ui-compact-node.css +1 -1
- package/styles/ui-container.css +14 -14
- package/styles/ui-context-menu.css +8 -8
- package/styles/ui-cover.css +9 -9
- package/styles/ui-curve-editor.css +9 -9
- package/styles/ui-cycle-button.css +10 -10
- package/styles/ui-date-field.css +1 -1
- package/styles/ui-date-picker.css +1 -1
- package/styles/ui-date-range-picker.css +1 -1
- package/styles/ui-description-item.css +8 -8
- package/styles/ui-description-list.css +18 -18
- package/styles/ui-dialog.css +37 -37
- package/styles/ui-disclosure.css +26 -26
- package/styles/ui-editable.css +13 -13
- package/styles/ui-editor-block-actions.css +1 -1
- package/styles/ui-editor-chip-editor.css +1 -1
- package/styles/ui-editor-code-language.css +1 -1
- package/styles/ui-editor-footnote-editor.css +1 -1
- package/styles/ui-editor-formatting-tools.css +1 -1
- package/styles/ui-editor-image-toolbar.css +1 -1
- package/styles/ui-editor-insert-table-grid.css +9 -9
- package/styles/ui-editor-link-card.css +1 -1
- package/styles/ui-editor-link-form.css +1 -1
- package/styles/ui-editor-mention-menu-item.css +13 -15
- package/styles/ui-editor-mention-menu.css +12 -12
- package/styles/ui-editor-slash-menu-group.css +7 -7
- package/styles/ui-editor-slash-menu-item.css +12 -12
- package/styles/ui-editor-slash-menu.css +13 -13
- package/styles/ui-editor-surface.css +8 -8
- package/styles/ui-editor-table-context-menu.css +19 -15
- package/styles/ui-editor-table-overlay.css +15 -15
- package/styles/ui-editor-table-toolbar.css +19 -19
- package/styles/ui-editor-toolbar.css +16 -16
- package/styles/ui-editor.css +1 -1
- package/styles/ui-file-input.css +1 -1
- package/styles/ui-floating-action-button.css +14 -14
- package/styles/ui-form-field.css +9 -9
- package/styles/ui-grid.css +19 -19
- package/styles/ui-icon-button.css +73 -73
- package/styles/ui-icon.css +11 -11
- package/styles/ui-image.css +23 -23
- package/styles/ui-input-group.css +26 -26
- package/styles/ui-input.css +23 -23
- package/styles/ui-light-editor.css +15 -15
- package/styles/ui-list-item.css +25 -25
- package/styles/ui-list.css +16 -16
- package/styles/ui-listbox.css +22 -22
- package/styles/ui-menu-group.css +7 -7
- package/styles/ui-menu-item.css +20 -20
- package/styles/ui-menu.css +20 -20
- package/styles/ui-meter.css +32 -32
- package/styles/ui-nav-item.css +18 -18
- package/styles/ui-number-input.css +12 -12
- package/styles/ui-page-header.css +10 -10
- package/styles/ui-pagination.css +1 -1
- package/styles/ui-popover.css +17 -17
- package/styles/ui-radio-group.css +10 -10
- package/styles/ui-radio.css +25 -25
- package/styles/ui-reel.css +21 -21
- package/styles/ui-scroll-area.css +20 -20
- package/styles/ui-search-result-row.css +16 -16
- package/styles/ui-search-shell.css +10 -10
- package/styles/ui-section.css +18 -18
- package/styles/ui-select.css +22 -22
- package/styles/ui-separator.css +12 -12
- package/styles/ui-sidebar.css +26 -26
- package/styles/ui-site-header.css +65 -65
- package/styles/ui-skeleton.css +18 -18
- package/styles/ui-slider.css +11 -11
- package/styles/ui-spinner.css +9 -9
- package/styles/ui-stack.css +22 -22
- package/styles/ui-status-message.css +12 -12
- package/styles/ui-swatch.css +14 -14
- package/styles/ui-switch.css +23 -23
- package/styles/ui-switcher.css +20 -20
- package/styles/ui-table.css +12 -12
- package/styles/ui-tabs.css +18 -17
- package/styles/ui-text.css +40 -40
- package/styles/ui-textarea.css +21 -21
- package/styles/ui-time-field.css +1 -1
- package/styles/ui-time-picker.css +1 -1
- package/styles/ui-toast-region.css +29 -29
- package/styles/ui-toast.css +19 -19
- package/styles/ui-tooltip.css +37 -58
- package/styles/ui-top-bar.css +8 -8
- package/styles/ui-tree-item.css +112 -112
- package/styles/ui-tree.css +11 -11
- package/vanilla/UiActionBar.d.ts +1 -1
- package/vanilla/UiActionBar.js +2 -2
- package/vanilla/UiAffordanceScope.d.ts +1 -1
- package/vanilla/UiAffordanceScope.js +2 -2
- package/vanilla/UiAvatar.d.ts +1 -1
- package/vanilla/UiAvatar.js +2 -2
- package/vanilla/UiAvatarGroup.d.ts +1 -1
- package/vanilla/UiAvatarGroup.js +2 -2
- package/vanilla/UiBadge.d.ts +1 -1
- package/vanilla/UiBadge.js +2 -2
- package/vanilla/UiBreadcrumbItem.d.ts +1 -1
- package/vanilla/UiBreadcrumbItem.js +2 -2
- package/vanilla/UiBreadcrumbs.d.ts +1 -1
- package/vanilla/UiBreadcrumbs.js +2 -2
- package/vanilla/UiButton.d.ts +1 -1
- package/vanilla/UiButton.js +5 -5
- package/vanilla/UiCalendar.d.ts +1 -1
- package/vanilla/UiCalendar.js +10 -10
- package/vanilla/UiCallout.d.ts +1 -1
- package/vanilla/UiCallout.js +2 -2
- package/vanilla/UiCard.d.ts +2 -1
- package/vanilla/UiCard.js +18 -18
- package/vanilla/UiCardGroup.d.ts +1 -1
- package/vanilla/UiCardGroup.js +2 -2
- package/vanilla/UiCheckbox.d.ts +1 -1
- package/vanilla/UiCheckbox.js +2 -2
- package/vanilla/UiCluster.d.ts +1 -1
- package/vanilla/UiCluster.js +2 -2
- package/vanilla/UiColorPicker.d.ts +1 -1
- package/vanilla/UiColorPicker.js +2 -2
- package/vanilla/UiCombobox.d.ts +1 -1
- package/vanilla/UiCombobox.js +8 -8
- package/vanilla/UiCompactContent.d.ts +1 -1
- package/vanilla/UiCompactContent.js +4 -4
- package/vanilla/UiCompactEditor.d.ts +1 -1
- package/vanilla/UiCompactEditor.js +2 -2
- package/vanilla/UiCompactMark.d.ts +1 -1
- package/vanilla/UiCompactMark.js +5 -5
- package/vanilla/UiCompactNode.d.ts +1 -1
- package/vanilla/UiCompactNode.js +8 -8
- package/vanilla/UiContainer.d.ts +1 -1
- package/vanilla/UiContainer.js +2 -2
- package/vanilla/UiContextMenu.d.ts +1 -1
- package/vanilla/UiContextMenu.js +2 -2
- package/vanilla/UiCover.d.ts +1 -1
- package/vanilla/UiCover.js +2 -2
- package/vanilla/UiCurveEditor.d.ts +1 -1
- package/vanilla/UiCurveEditor.js +2 -2
- package/vanilla/UiCycleButton.d.ts +1 -1
- package/vanilla/UiCycleButton.js +2 -2
- package/vanilla/UiDateField.d.ts +1 -1
- package/vanilla/UiDateField.js +2 -2
- package/vanilla/UiDatePicker.d.ts +1 -1
- package/vanilla/UiDatePicker.js +2 -2
- package/vanilla/UiDateRangePicker.d.ts +1 -1
- package/vanilla/UiDateRangePicker.js +4 -4
- package/vanilla/UiDescriptionItem.d.ts +1 -1
- package/vanilla/UiDescriptionItem.js +2 -2
- package/vanilla/UiDescriptionList.d.ts +1 -1
- package/vanilla/UiDescriptionList.js +2 -2
- package/vanilla/UiDialog.d.ts +1 -1
- package/vanilla/UiDialog.js +2 -2
- package/vanilla/UiDisclosure.d.ts +1 -1
- package/vanilla/UiDisclosure.js +2 -2
- package/vanilla/UiEditable.d.ts +1 -1
- package/vanilla/UiEditable.js +2 -2
- package/vanilla/UiEditor.d.ts +1 -1
- package/vanilla/UiEditor.js +6 -6
- package/vanilla/UiEditorBlockActions.d.ts +1 -1
- package/vanilla/UiEditorBlockActions.js +2 -2
- package/vanilla/UiEditorChipEditor.d.ts +1 -1
- package/vanilla/UiEditorChipEditor.js +2 -2
- package/vanilla/UiEditorCodeLanguage.d.ts +1 -1
- package/vanilla/UiEditorCodeLanguage.js +4 -4
- package/vanilla/UiEditorFootnoteEditor.d.ts +1 -1
- package/vanilla/UiEditorFootnoteEditor.js +2 -2
- package/vanilla/UiEditorFormattingTools.d.ts +1 -1
- package/vanilla/UiEditorFormattingTools.js +4 -4
- package/vanilla/UiEditorImageToolbar.d.ts +1 -1
- package/vanilla/UiEditorImageToolbar.js +2 -2
- package/vanilla/UiEditorInsertTableGrid.d.ts +1 -1
- package/vanilla/UiEditorInsertTableGrid.js +4 -4
- package/vanilla/UiEditorLinkCard.d.ts +1 -1
- package/vanilla/UiEditorLinkCard.js +2 -2
- package/vanilla/UiEditorLinkForm.d.ts +1 -1
- package/vanilla/UiEditorLinkForm.js +4 -4
- package/vanilla/UiEditorMentionMenu.d.ts +1 -1
- package/vanilla/UiEditorMentionMenu.js +4 -4
- package/vanilla/UiEditorMentionMenuItem.d.ts +1 -1
- package/vanilla/UiEditorMentionMenuItem.js +2 -2
- package/vanilla/UiEditorSlashMenu.d.ts +1 -1
- package/vanilla/UiEditorSlashMenu.js +4 -4
- package/vanilla/UiEditorSlashMenuGroup.d.ts +1 -1
- package/vanilla/UiEditorSlashMenuGroup.js +2 -2
- package/vanilla/UiEditorSlashMenuItem.d.ts +1 -1
- package/vanilla/UiEditorSlashMenuItem.js +2 -2
- package/vanilla/UiEditorSurface.d.ts +1 -1
- package/vanilla/UiEditorSurface.js +2 -2
- package/vanilla/UiEditorTableContextMenu.d.ts +1 -1
- package/vanilla/UiEditorTableContextMenu.js +7 -6
- package/vanilla/UiEditorTableOverlay.d.ts +1 -1
- package/vanilla/UiEditorTableOverlay.js +5 -5
- package/vanilla/UiEditorTableToolbar.d.ts +1 -1
- package/vanilla/UiEditorTableToolbar.js +8 -8
- package/vanilla/UiEditorToolbar.d.ts +1 -1
- package/vanilla/UiEditorToolbar.js +2 -2
- package/vanilla/UiFileInput.d.ts +1 -1
- package/vanilla/UiFileInput.js +4 -4
- package/vanilla/UiFloatingActionButton.d.ts +1 -1
- package/vanilla/UiFloatingActionButton.js +2 -2
- package/vanilla/UiFormField.d.ts +1 -1
- package/vanilla/UiFormField.js +2 -2
- package/vanilla/UiGrid.d.ts +1 -1
- package/vanilla/UiGrid.js +4 -4
- package/vanilla/UiIcon.d.ts +1 -1
- package/vanilla/UiIcon.js +4 -4
- package/vanilla/UiIconButton.d.ts +1 -1
- package/vanilla/UiIconButton.js +2 -2
- package/vanilla/UiImage.d.ts +1 -1
- package/vanilla/UiImage.js +2 -2
- package/vanilla/UiInput.d.ts +1 -1
- package/vanilla/UiInput.js +2 -2
- package/vanilla/UiInputGroup.d.ts +1 -1
- package/vanilla/UiInputGroup.js +2 -2
- package/vanilla/UiLightEditor.d.ts +1 -1
- package/vanilla/UiLightEditor.js +2 -2
- package/vanilla/UiList.d.ts +1 -1
- package/vanilla/UiList.js +3 -3
- package/vanilla/UiListItem.d.ts +1 -1
- package/vanilla/UiListItem.js +2 -2
- package/vanilla/UiListbox.d.ts +1 -1
- package/vanilla/UiListbox.js +5 -5
- package/vanilla/UiMenu.d.ts +1 -1
- package/vanilla/UiMenu.js +2 -2
- package/vanilla/UiMenuGroup.d.ts +1 -1
- package/vanilla/UiMenuGroup.js +2 -2
- package/vanilla/UiMenuItem.d.ts +1 -1
- package/vanilla/UiMenuItem.js +3 -3
- package/vanilla/UiMeter.d.ts +1 -1
- package/vanilla/UiMeter.js +4 -4
- package/vanilla/UiNavItem.d.ts +1 -1
- package/vanilla/UiNavItem.js +3 -3
- package/vanilla/UiNumberInput.d.ts +1 -1
- package/vanilla/UiNumberInput.js +2 -2
- package/vanilla/UiPageHeader.d.ts +1 -1
- package/vanilla/UiPageHeader.js +2 -2
- package/vanilla/UiPagination.d.ts +1 -1
- package/vanilla/UiPagination.js +4 -4
- package/vanilla/UiPopover.d.ts +1 -1
- package/vanilla/UiPopover.js +2 -2
- package/vanilla/UiRadio.d.ts +1 -1
- package/vanilla/UiRadio.js +2 -2
- package/vanilla/UiRadioGroup.d.ts +1 -1
- package/vanilla/UiRadioGroup.js +2 -2
- package/vanilla/UiReel.d.ts +1 -1
- package/vanilla/UiReel.js +2 -2
- package/vanilla/UiScrollArea.d.ts +1 -1
- package/vanilla/UiScrollArea.js +2 -2
- package/vanilla/UiSearchResultRow.d.ts +1 -1
- package/vanilla/UiSearchResultRow.js +2 -2
- package/vanilla/UiSearchShell.d.ts +1 -1
- package/vanilla/UiSearchShell.js +2 -2
- package/vanilla/UiSection.d.ts +1 -1
- package/vanilla/UiSection.js +3 -3
- package/vanilla/UiSelect.d.ts +1 -1
- package/vanilla/UiSelect.js +2 -2
- package/vanilla/UiSeparator.d.ts +1 -1
- package/vanilla/UiSeparator.js +2 -2
- package/vanilla/UiSidebar.d.ts +1 -1
- package/vanilla/UiSidebar.js +2 -2
- package/vanilla/UiSiteHeader.d.ts +1 -1
- package/vanilla/UiSiteHeader.js +2 -2
- package/vanilla/UiSkeleton.d.ts +1 -1
- package/vanilla/UiSkeleton.js +2 -2
- package/vanilla/UiSlider.d.ts +1 -1
- package/vanilla/UiSlider.js +2 -2
- package/vanilla/UiSpinner.d.ts +1 -1
- package/vanilla/UiSpinner.js +2 -2
- package/vanilla/UiStack.d.ts +1 -1
- package/vanilla/UiStack.js +2 -2
- package/vanilla/UiStatusMessage.d.ts +1 -1
- package/vanilla/UiStatusMessage.js +2 -2
- package/vanilla/UiSwatch.d.ts +1 -1
- package/vanilla/UiSwatch.js +2 -2
- package/vanilla/UiSwitch.d.ts +1 -1
- package/vanilla/UiSwitch.js +2 -2
- package/vanilla/UiSwitcher.d.ts +1 -1
- package/vanilla/UiSwitcher.js +2 -2
- package/vanilla/UiTable.d.ts +1 -1
- package/vanilla/UiTable.js +2 -2
- package/vanilla/UiTabs.d.ts +1 -1
- package/vanilla/UiTabs.js +4 -4
- package/vanilla/UiText.d.ts +1 -1
- package/vanilla/UiText.js +13 -13
- package/vanilla/UiTextarea.d.ts +1 -1
- package/vanilla/UiTextarea.js +2 -2
- package/vanilla/UiTimeField.d.ts +1 -1
- package/vanilla/UiTimeField.js +2 -2
- package/vanilla/UiTimePicker.d.ts +1 -1
- package/vanilla/UiTimePicker.js +6 -6
- package/vanilla/UiToast.d.ts +1 -1
- package/vanilla/UiToast.js +2 -2
- package/vanilla/UiToastRegion.d.ts +1 -1
- package/vanilla/UiToastRegion.js +4 -4
- package/vanilla/UiTooltip.d.ts +1 -1
- package/vanilla/UiTooltip.js +2 -2
- package/vanilla/UiTopBar.d.ts +1 -1
- package/vanilla/UiTopBar.js +2 -2
- package/vanilla/UiTree.d.ts +1 -1
- package/vanilla/UiTree.js +2 -2
- package/vanilla/UiTreeItem.d.ts +1 -1
- package/vanilla/UiTreeItem.js +2 -2
- package/bin/looma-docs.mjs +0 -3
- package/docs/README.md +0 -323
- package/docs/card.html +0 -79
- package/docs/card.js +0 -18
- package/docs/catalog-view.js +0 -24
- package/docs/catalog-view.mjs +0 -13
- package/docs/catalog.mjs +0 -131
- package/docs/cli.mjs +0 -26
- package/docs/commands.mjs +0 -94
- package/docs/customizer-render.mjs +0 -157
- package/docs/customizer.js +0 -494
- package/docs/documentation.css +0 -14
- package/docs/example-invocations.mjs +0 -63
- package/docs/fonts.mjs +0 -73
- package/docs/framework-examples.d.mts +0 -9
- package/docs/framework-examples.mjs +0 -195
- package/docs/index.d.ts +0 -59
- package/docs/index.mjs +0 -4
- package/docs/local-server.mjs +0 -65
- package/docs/navigation.mjs +0 -26
- package/docs/palette.mjs +0 -68
- package/docs/pastoral.svg +0 -54
- package/docs/portrait.svg +0 -15
- package/docs/reference.html +0 -1
- package/docs/reference.js +0 -36
- package/docs/render.mjs +0 -97
- package/docs/site.mjs +0 -237
- package/docs/store.mjs +0 -92
- package/docs/theme-session.mjs +0 -72
- package/docs/theme.mjs +0 -669
- package/docs/value-editors.mjs +0 -37
- package/docs/workspace.mjs +0 -32
package/editor/index.js
CHANGED
|
@@ -631,6 +631,7 @@ function createViewportSurface$1(surface, options = {}) {
|
|
|
631
631
|
let sizeObserver = null;
|
|
632
632
|
let frame = null;
|
|
633
633
|
const position = () => {
|
|
634
|
+
if (frame !== null) owner.cancelAnimationFrame(frame);
|
|
634
635
|
frame = null;
|
|
635
636
|
if (stop) {
|
|
636
637
|
if (options.materialRole) updateSurfaceMaterial$1(surface, options.materialRole);
|
|
@@ -682,7 +683,7 @@ function createViewportSurface$1(surface, options = {}) {
|
|
|
682
683
|
stop ??= observeOverlayViewport$1(surface.ownerDocument, position);
|
|
683
684
|
options.position?.();
|
|
684
685
|
if (!sizeObserver && owner.ResizeObserver) {
|
|
685
|
-
sizeObserver = new owner.ResizeObserver(
|
|
686
|
+
sizeObserver = new owner.ResizeObserver(position);
|
|
686
687
|
sizeObserver.observe(surface);
|
|
687
688
|
}
|
|
688
689
|
},
|
|
@@ -729,7 +730,10 @@ function createAnchoredSurface$1(surface, options = {}) {
|
|
|
729
730
|
width: 0,
|
|
730
731
|
height: 0
|
|
731
732
|
} : anchorRect();
|
|
732
|
-
if (!rect)
|
|
733
|
+
if (!rect) {
|
|
734
|
+
if (!lastAnchorRect) hide$1(surface);
|
|
735
|
+
return;
|
|
736
|
+
}
|
|
733
737
|
if (!point && typeof anchor !== "function" && (anchor.isConnected === false || rect.width === 0 && rect.height === 0 || anchor instanceof owner.Element && owner.getComputedStyle(anchor).visibility !== "visible")) {
|
|
734
738
|
if (lastAnchorRect) positionAnchoredSurface$1(surface, lastAnchorRect, {
|
|
735
739
|
placement,
|
|
@@ -2152,7 +2156,7 @@ function createSelectionSurface(options) {
|
|
|
2152
2156
|
gap: 10,
|
|
2153
2157
|
viewportGap: 5,
|
|
2154
2158
|
boundary: options.boundary,
|
|
2155
|
-
maxWidth: options.maxWidth,
|
|
2159
|
+
maxWidth: options.maxWidth ?? (() => Math.max(0, (document.defaultView?.visualViewport?.width ?? document.documentElement.clientWidth) - 10)),
|
|
2156
2160
|
bare: true
|
|
2157
2161
|
});
|
|
2158
2162
|
const host = element.parentElement;
|
|
@@ -2250,6 +2254,7 @@ function createSelectionSurface(options) {
|
|
|
2250
2254
|
view.dom.addEventListener("dragstart", onDragStart);
|
|
2251
2255
|
editor.on("focus", onFocus);
|
|
2252
2256
|
editor.on("blur", onBlur);
|
|
2257
|
+
update(view);
|
|
2253
2258
|
return {
|
|
2254
2259
|
update,
|
|
2255
2260
|
destroy() {
|
|
@@ -3048,28 +3053,28 @@ function createUiButton(options = {}, html) {
|
|
|
3048
3053
|
if (value === null || value === void 0 || value === false) continue;
|
|
3049
3054
|
element.setAttribute(name, value === true ? "" : String(value));
|
|
3050
3055
|
}
|
|
3051
|
-
element.setAttribute("
|
|
3056
|
+
element.setAttribute("component", "ui-button");
|
|
3052
3057
|
} else if (a === 1) {
|
|
3053
3058
|
element = document.createElement("button");
|
|
3054
3059
|
for (const [name, value] of Object.entries(attributes)) {
|
|
3055
3060
|
if (value === null || value === void 0 || value === false) continue;
|
|
3056
3061
|
element.setAttribute(name, value === true ? "" : String(value));
|
|
3057
3062
|
}
|
|
3058
|
-
element.setAttribute("
|
|
3063
|
+
element.setAttribute("component", "ui-button");
|
|
3059
3064
|
} else if (a === 2) {
|
|
3060
3065
|
element = document.createElement("a");
|
|
3061
3066
|
for (const [name, value] of Object.entries(attributes)) {
|
|
3062
3067
|
if (value === null || value === void 0 || value === false) continue;
|
|
3063
3068
|
element.setAttribute(name, value === true ? "" : String(value));
|
|
3064
3069
|
}
|
|
3065
|
-
element.setAttribute("
|
|
3070
|
+
element.setAttribute("component", "ui-button");
|
|
3066
3071
|
} else {
|
|
3067
3072
|
element = document.createElement("button");
|
|
3068
3073
|
for (const [name, value] of Object.entries(attributes)) {
|
|
3069
3074
|
if (value === null || value === void 0 || value === false) continue;
|
|
3070
3075
|
element.setAttribute(name, value === true ? "" : String(value));
|
|
3071
3076
|
}
|
|
3072
|
-
element.setAttribute("
|
|
3077
|
+
element.setAttribute("component", "ui-button");
|
|
3073
3078
|
}
|
|
3074
3079
|
B = acceptProps(element, D$18, S$18.n, v, componentProps, Q$3[a], html);
|
|
3075
3080
|
const m1 = (d) => {
|
|
@@ -4276,6 +4281,7 @@ function createViewportSurface(surface, options = {}) {
|
|
|
4276
4281
|
let sizeObserver = null;
|
|
4277
4282
|
let frame = null;
|
|
4278
4283
|
const position = () => {
|
|
4284
|
+
if (frame !== null) owner.cancelAnimationFrame(frame);
|
|
4279
4285
|
frame = null;
|
|
4280
4286
|
if (stop) {
|
|
4281
4287
|
if (options.materialRole) updateSurfaceMaterial(surface, options.materialRole);
|
|
@@ -4327,7 +4333,7 @@ function createViewportSurface(surface, options = {}) {
|
|
|
4327
4333
|
stop ??= observeOverlayViewport(surface.ownerDocument, position);
|
|
4328
4334
|
options.position?.();
|
|
4329
4335
|
if (!sizeObserver && owner.ResizeObserver) {
|
|
4330
|
-
sizeObserver = new owner.ResizeObserver(
|
|
4336
|
+
sizeObserver = new owner.ResizeObserver(position);
|
|
4331
4337
|
sizeObserver.observe(surface);
|
|
4332
4338
|
}
|
|
4333
4339
|
},
|
|
@@ -4374,7 +4380,10 @@ function createAnchoredSurface(surface, options = {}) {
|
|
|
4374
4380
|
width: 0,
|
|
4375
4381
|
height: 0
|
|
4376
4382
|
} : anchorRect();
|
|
4377
|
-
if (!rect)
|
|
4383
|
+
if (!rect) {
|
|
4384
|
+
if (!lastAnchorRect) hide(surface);
|
|
4385
|
+
return;
|
|
4386
|
+
}
|
|
4378
4387
|
if (!point && typeof anchor !== "function" && (anchor.isConnected === false || rect.width === 0 && rect.height === 0 || anchor instanceof owner.Element && owner.getComputedStyle(anchor).visibility !== "visible")) {
|
|
4379
4388
|
if (lastAnchorRect) positionAnchoredSurface(surface, lastAnchorRect, {
|
|
4380
4389
|
placement,
|
|
@@ -4660,7 +4669,7 @@ function createUiAffordanceScope(options = {}, html) {
|
|
|
4660
4669
|
if (value === null || value === void 0 || value === false) continue;
|
|
4661
4670
|
element.setAttribute(name, value === true ? "" : String(value));
|
|
4662
4671
|
}
|
|
4663
|
-
element.setAttribute("
|
|
4672
|
+
element.setAttribute("component", "ui-affordance-scope");
|
|
4664
4673
|
element.append((P0$15 ??= buildTemplate(T0$15)).cloneNode(true));
|
|
4665
4674
|
const v = [
|
|
4666
4675
|
false,
|
|
@@ -4985,7 +4994,7 @@ function createUiCluster(options = {}, html) {
|
|
|
4985
4994
|
if (value === null || value === void 0 || value === false) continue;
|
|
4986
4995
|
element.setAttribute(name, value === true ? "" : String(value));
|
|
4987
4996
|
}
|
|
4988
|
-
element.setAttribute("
|
|
4997
|
+
element.setAttribute("component", "ui-cluster");
|
|
4989
4998
|
element.append((P0$14 ??= buildTemplate(T0$14)).cloneNode(true));
|
|
4990
4999
|
const v = [
|
|
4991
5000
|
0,
|
|
@@ -5328,7 +5337,7 @@ function createUiFormField(options = {}, html) {
|
|
|
5328
5337
|
if (value === null || value === void 0 || value === false) continue;
|
|
5329
5338
|
element.setAttribute(name, value === true ? "" : String(value));
|
|
5330
5339
|
}
|
|
5331
|
-
element.setAttribute("
|
|
5340
|
+
element.setAttribute("component", "ui-form-field");
|
|
5332
5341
|
element.append((P0$13 ??= buildTemplate(T0$13)).cloneNode(true));
|
|
5333
5342
|
const v = [
|
|
5334
5343
|
null,
|
|
@@ -5509,7 +5518,7 @@ var P2$9;
|
|
|
5509
5518
|
var P3$5;
|
|
5510
5519
|
var P4$4;
|
|
5511
5520
|
var P5$3;
|
|
5512
|
-
var
|
|
5521
|
+
var emptyDirty = /* @__PURE__ */ new Map();
|
|
5513
5522
|
var S$14 = {
|
|
5514
5523
|
n: ["shapes"],
|
|
5515
5524
|
t: ["?"],
|
|
@@ -5561,7 +5570,7 @@ function createUiIcon(options = {}, html) {
|
|
|
5561
5570
|
element.setAttribute(name, value === true ? "" : String(value));
|
|
5562
5571
|
}
|
|
5563
5572
|
if (!element.hasAttribute("aria-hidden")) element.setAttribute("aria-hidden", "true");
|
|
5564
|
-
element.setAttribute("
|
|
5573
|
+
element.setAttribute("component", "ui-icon");
|
|
5565
5574
|
element.append((P0$12 ??= buildTemplate(T0$12)).cloneNode(true));
|
|
5566
5575
|
const v = [
|
|
5567
5576
|
void 0,
|
|
@@ -6889,7 +6898,7 @@ function createUiIcon(options = {}, html) {
|
|
|
6889
6898
|
e3: t3.nextSibling,
|
|
6890
6899
|
b3: void 0
|
|
6891
6900
|
};
|
|
6892
|
-
p1(r, -1,
|
|
6901
|
+
p1(r, -1, emptyDirty);
|
|
6893
6902
|
return r;
|
|
6894
6903
|
};
|
|
6895
6904
|
const p1 = (r, c, d) => {
|
|
@@ -7261,7 +7270,7 @@ function createUiIconButton(options = {}, html) {
|
|
|
7261
7270
|
element.setAttribute(name, value === true ? "" : String(value));
|
|
7262
7271
|
}
|
|
7263
7272
|
if (!element.hasAttribute("type")) element.setAttribute("type", "button");
|
|
7264
|
-
element.setAttribute("
|
|
7273
|
+
element.setAttribute("component", "ui-icon-button");
|
|
7265
7274
|
element.append((P0$11 ??= buildTemplate(T0$11)).cloneNode(true));
|
|
7266
7275
|
const v = [
|
|
7267
7276
|
void 0,
|
|
@@ -7589,7 +7598,7 @@ function createUiList(options = {}, html) {
|
|
|
7589
7598
|
if (value === null || value === void 0 || value === false) continue;
|
|
7590
7599
|
element.setAttribute(name, value === true ? "" : String(value));
|
|
7591
7600
|
}
|
|
7592
|
-
element.setAttribute("
|
|
7601
|
+
element.setAttribute("component", "ui-list");
|
|
7593
7602
|
} else {
|
|
7594
7603
|
element = document.createElement("ul");
|
|
7595
7604
|
for (const [name, value] of Object.entries(attributes)) {
|
|
@@ -7597,7 +7606,7 @@ function createUiList(options = {}, html) {
|
|
|
7597
7606
|
element.setAttribute(name, value === true ? "" : String(value));
|
|
7598
7607
|
}
|
|
7599
7608
|
if (!element.hasAttribute("role")) element.setAttribute("role", "list");
|
|
7600
|
-
element.setAttribute("
|
|
7609
|
+
element.setAttribute("component", "ui-list");
|
|
7601
7610
|
}
|
|
7602
7611
|
B = acceptProps(element, D$12, S$12.n, v, componentProps, Q$2[a], html);
|
|
7603
7612
|
const m1 = (d) => {
|
|
@@ -8217,7 +8226,7 @@ function createUiMenu(options = {}, html) {
|
|
|
8217
8226
|
}
|
|
8218
8227
|
if (!element.hasAttribute("role")) element.setAttribute("role", "menu");
|
|
8219
8228
|
if (!element.hasAttribute("aria-orientation")) element.setAttribute("aria-orientation", "vertical");
|
|
8220
|
-
element.setAttribute("
|
|
8229
|
+
element.setAttribute("component", "ui-menu");
|
|
8221
8230
|
element.append((P0$9 ??= buildTemplate(T0$9)).cloneNode(true));
|
|
8222
8231
|
const v = [
|
|
8223
8232
|
false,
|
|
@@ -8609,7 +8618,7 @@ function createUiMenuItem(options = {}, html) {
|
|
|
8609
8618
|
}
|
|
8610
8619
|
if (!element.hasAttribute("role")) element.setAttribute("role", "menuitem");
|
|
8611
8620
|
if (!element.hasAttribute("tabindex")) element.setAttribute("tabindex", "-1");
|
|
8612
|
-
element.setAttribute("
|
|
8621
|
+
element.setAttribute("component", "ui-menu-item");
|
|
8613
8622
|
} else {
|
|
8614
8623
|
element = document.createElement("div");
|
|
8615
8624
|
for (const [name, value] of Object.entries(attributes)) {
|
|
@@ -8617,7 +8626,7 @@ function createUiMenuItem(options = {}, html) {
|
|
|
8617
8626
|
element.setAttribute(name, value === true ? "" : String(value));
|
|
8618
8627
|
}
|
|
8619
8628
|
if (!element.hasAttribute("tabindex")) element.setAttribute("tabindex", "-1");
|
|
8620
|
-
element.setAttribute("
|
|
8629
|
+
element.setAttribute("component", "ui-menu-item");
|
|
8621
8630
|
}
|
|
8622
8631
|
B = acceptProps(element, D$10, S$10.n, v, componentProps, Q$1[a], html);
|
|
8623
8632
|
const m1 = (d) => {
|
|
@@ -9182,7 +9191,7 @@ function createUiPopover(options = {}, html) {
|
|
|
9182
9191
|
if (value === null || value === void 0 || value === false) continue;
|
|
9183
9192
|
element.setAttribute(name, value === true ? "" : String(value));
|
|
9184
9193
|
}
|
|
9185
|
-
element.setAttribute("
|
|
9194
|
+
element.setAttribute("component", "ui-popover");
|
|
9186
9195
|
element.append((P0$7 ??= buildTemplate(T0$7)).cloneNode(true));
|
|
9187
9196
|
const v = [
|
|
9188
9197
|
false,
|
|
@@ -9335,7 +9344,7 @@ function createUiStack(options = {}, html) {
|
|
|
9335
9344
|
if (value === null || value === void 0 || value === false) continue;
|
|
9336
9345
|
element.setAttribute(name, value === true ? "" : String(value));
|
|
9337
9346
|
}
|
|
9338
|
-
element.setAttribute("
|
|
9347
|
+
element.setAttribute("component", "ui-stack");
|
|
9339
9348
|
element.append((P0$6 ??= buildTemplate(T0$6)).cloneNode(true));
|
|
9340
9349
|
const v = [
|
|
9341
9350
|
null,
|
|
@@ -9947,84 +9956,84 @@ function createUiText(options = {}, html) {
|
|
|
9947
9956
|
if (value === null || value === void 0 || value === false) continue;
|
|
9948
9957
|
element.setAttribute(name, value === true ? "" : String(value));
|
|
9949
9958
|
}
|
|
9950
|
-
element.setAttribute("
|
|
9959
|
+
element.setAttribute("component", "ui-text");
|
|
9951
9960
|
} else if (a === 1) {
|
|
9952
9961
|
element = document.createElement("div");
|
|
9953
9962
|
for (const [name, value] of Object.entries(attributes)) {
|
|
9954
9963
|
if (value === null || value === void 0 || value === false) continue;
|
|
9955
9964
|
element.setAttribute(name, value === true ? "" : String(value));
|
|
9956
9965
|
}
|
|
9957
|
-
element.setAttribute("
|
|
9966
|
+
element.setAttribute("component", "ui-text");
|
|
9958
9967
|
} else if (a === 2) {
|
|
9959
9968
|
element = document.createElement("small");
|
|
9960
9969
|
for (const [name, value] of Object.entries(attributes)) {
|
|
9961
9970
|
if (value === null || value === void 0 || value === false) continue;
|
|
9962
9971
|
element.setAttribute(name, value === true ? "" : String(value));
|
|
9963
9972
|
}
|
|
9964
|
-
element.setAttribute("
|
|
9973
|
+
element.setAttribute("component", "ui-text");
|
|
9965
9974
|
} else if (a === 3) {
|
|
9966
9975
|
element = document.createElement("strong");
|
|
9967
9976
|
for (const [name, value] of Object.entries(attributes)) {
|
|
9968
9977
|
if (value === null || value === void 0 || value === false) continue;
|
|
9969
9978
|
element.setAttribute(name, value === true ? "" : String(value));
|
|
9970
9979
|
}
|
|
9971
|
-
element.setAttribute("
|
|
9980
|
+
element.setAttribute("component", "ui-text");
|
|
9972
9981
|
} else if (a === 4) {
|
|
9973
9982
|
element = document.createElement("label");
|
|
9974
9983
|
for (const [name, value] of Object.entries(attributes)) {
|
|
9975
9984
|
if (value === null || value === void 0 || value === false) continue;
|
|
9976
9985
|
element.setAttribute(name, value === true ? "" : String(value));
|
|
9977
9986
|
}
|
|
9978
|
-
element.setAttribute("
|
|
9987
|
+
element.setAttribute("component", "ui-text");
|
|
9979
9988
|
} else if (a === 5) {
|
|
9980
9989
|
element = document.createElement("h1");
|
|
9981
9990
|
for (const [name, value] of Object.entries(attributes)) {
|
|
9982
9991
|
if (value === null || value === void 0 || value === false) continue;
|
|
9983
9992
|
element.setAttribute(name, value === true ? "" : String(value));
|
|
9984
9993
|
}
|
|
9985
|
-
element.setAttribute("
|
|
9994
|
+
element.setAttribute("component", "ui-text");
|
|
9986
9995
|
} else if (a === 6) {
|
|
9987
9996
|
element = document.createElement("h2");
|
|
9988
9997
|
for (const [name, value] of Object.entries(attributes)) {
|
|
9989
9998
|
if (value === null || value === void 0 || value === false) continue;
|
|
9990
9999
|
element.setAttribute(name, value === true ? "" : String(value));
|
|
9991
10000
|
}
|
|
9992
|
-
element.setAttribute("
|
|
10001
|
+
element.setAttribute("component", "ui-text");
|
|
9993
10002
|
} else if (a === 7) {
|
|
9994
10003
|
element = document.createElement("h3");
|
|
9995
10004
|
for (const [name, value] of Object.entries(attributes)) {
|
|
9996
10005
|
if (value === null || value === void 0 || value === false) continue;
|
|
9997
10006
|
element.setAttribute(name, value === true ? "" : String(value));
|
|
9998
10007
|
}
|
|
9999
|
-
element.setAttribute("
|
|
10008
|
+
element.setAttribute("component", "ui-text");
|
|
10000
10009
|
} else if (a === 8) {
|
|
10001
10010
|
element = document.createElement("h4");
|
|
10002
10011
|
for (const [name, value] of Object.entries(attributes)) {
|
|
10003
10012
|
if (value === null || value === void 0 || value === false) continue;
|
|
10004
10013
|
element.setAttribute(name, value === true ? "" : String(value));
|
|
10005
10014
|
}
|
|
10006
|
-
element.setAttribute("
|
|
10015
|
+
element.setAttribute("component", "ui-text");
|
|
10007
10016
|
} else if (a === 9) {
|
|
10008
10017
|
element = document.createElement("h5");
|
|
10009
10018
|
for (const [name, value] of Object.entries(attributes)) {
|
|
10010
10019
|
if (value === null || value === void 0 || value === false) continue;
|
|
10011
10020
|
element.setAttribute(name, value === true ? "" : String(value));
|
|
10012
10021
|
}
|
|
10013
|
-
element.setAttribute("
|
|
10022
|
+
element.setAttribute("component", "ui-text");
|
|
10014
10023
|
} else if (a === 10) {
|
|
10015
10024
|
element = document.createElement("h6");
|
|
10016
10025
|
for (const [name, value] of Object.entries(attributes)) {
|
|
10017
10026
|
if (value === null || value === void 0 || value === false) continue;
|
|
10018
10027
|
element.setAttribute(name, value === true ? "" : String(value));
|
|
10019
10028
|
}
|
|
10020
|
-
element.setAttribute("
|
|
10029
|
+
element.setAttribute("component", "ui-text");
|
|
10021
10030
|
} else {
|
|
10022
10031
|
element = document.createElement("p");
|
|
10023
10032
|
for (const [name, value] of Object.entries(attributes)) {
|
|
10024
10033
|
if (value === null || value === void 0 || value === false) continue;
|
|
10025
10034
|
element.setAttribute(name, value === true ? "" : String(value));
|
|
10026
10035
|
}
|
|
10027
|
-
element.setAttribute("
|
|
10036
|
+
element.setAttribute("component", "ui-text");
|
|
10028
10037
|
}
|
|
10029
10038
|
B = acceptProps(element, D$7, S$7.n, v, componentProps, Q[a], html);
|
|
10030
10039
|
const m1 = (d) => {
|
|
@@ -11221,7 +11230,7 @@ function createUiTooltip(options = {}, html) {
|
|
|
11221
11230
|
element.setAttribute(name, value === true ? "" : String(value));
|
|
11222
11231
|
}
|
|
11223
11232
|
if (!element.hasAttribute("role")) element.setAttribute("role", "tooltip");
|
|
11224
|
-
element.setAttribute("
|
|
11233
|
+
element.setAttribute("component", "ui-tooltip");
|
|
11225
11234
|
element.append((P0$4 ??= buildTemplate(T0$4)).cloneNode(true));
|
|
11226
11235
|
const v = [
|
|
11227
11236
|
false,
|
|
@@ -11878,7 +11887,7 @@ function createUiCheckbox(options = {}, html) {
|
|
|
11878
11887
|
if (value === null || value === void 0 || value === false) continue;
|
|
11879
11888
|
element.setAttribute(name, value === true ? "" : String(value));
|
|
11880
11889
|
}
|
|
11881
|
-
element.setAttribute("
|
|
11890
|
+
element.setAttribute("component", "ui-checkbox");
|
|
11882
11891
|
element.append((P0$3 ??= buildTemplate(T0$3)).cloneNode(true));
|
|
11883
11892
|
const v = [
|
|
11884
11893
|
false,
|
|
@@ -12056,9 +12065,16 @@ function ensureOpen(members) {
|
|
|
12056
12065
|
pendingGroups.add(members);
|
|
12057
12066
|
queueMicrotask(() => {
|
|
12058
12067
|
pendingGroups.delete(members);
|
|
12059
|
-
const current = [...members]
|
|
12060
|
-
|
|
12061
|
-
|
|
12068
|
+
const current = [...members].sort((a, b) => {
|
|
12069
|
+
const position = a.element.compareDocumentPosition(b.element);
|
|
12070
|
+
if (position & a.element.DOCUMENT_POSITION_DISCONNECTED) return 0;
|
|
12071
|
+
return position & a.element.DOCUMENT_POSITION_FOLLOWING ? -1 : position & a.element.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
|
|
12072
|
+
});
|
|
12073
|
+
if (!current.some((member) => member.required()) || current.some((member) => member.isOpen() && !member.automatic)) return;
|
|
12074
|
+
const candidate = current.find((member) => !member.disabled()) || current[0];
|
|
12075
|
+
if (candidate?.isOpen()) return;
|
|
12076
|
+
for (const member of current) if (member.isOpen()) member.close("programmatic", "programmatic");
|
|
12077
|
+
candidate?.open(true);
|
|
12062
12078
|
});
|
|
12063
12079
|
}
|
|
12064
12080
|
function leaveGroup(document, name, member) {
|
|
@@ -12112,11 +12128,14 @@ function connect$2(host) {
|
|
|
12112
12128
|
});
|
|
12113
12129
|
};
|
|
12114
12130
|
const member = {
|
|
12131
|
+
element: host.element,
|
|
12132
|
+
automatic: false,
|
|
12115
12133
|
isOpen: () => Boolean(host.state.internalOpen),
|
|
12116
12134
|
required: () => Boolean(host.props.requiredOpen.value),
|
|
12117
12135
|
disabled: () => Boolean(host.props.disabled.value),
|
|
12118
|
-
open() {
|
|
12136
|
+
open(automatic = false) {
|
|
12119
12137
|
if (disposed || host.state.internalOpen) return;
|
|
12138
|
+
member.automatic = automatic;
|
|
12120
12139
|
animateFillTakeover();
|
|
12121
12140
|
host.state.internalOpen = true;
|
|
12122
12141
|
syncGroup("programmatic", "programmatic");
|
|
@@ -12128,6 +12147,7 @@ function connect$2(host) {
|
|
|
12128
12147
|
},
|
|
12129
12148
|
close(reason, how) {
|
|
12130
12149
|
if (!host.state.internalOpen) return;
|
|
12150
|
+
member.automatic = false;
|
|
12131
12151
|
animateFillTakeover();
|
|
12132
12152
|
host.state.internalOpen = false;
|
|
12133
12153
|
host.dispatch("close", {
|
|
@@ -12156,6 +12176,7 @@ function connect$2(host) {
|
|
|
12156
12176
|
};
|
|
12157
12177
|
const stop = host.effect(() => {
|
|
12158
12178
|
if (host.props.open.value !== external) {
|
|
12179
|
+
member.automatic = false;
|
|
12159
12180
|
external = host.props.open.value;
|
|
12160
12181
|
if (external || mayClose()) {
|
|
12161
12182
|
animateFillTakeover();
|
|
@@ -12171,6 +12192,7 @@ function connect$2(host) {
|
|
|
12171
12192
|
});
|
|
12172
12193
|
const onClick = () => {
|
|
12173
12194
|
if (host.props.disabled.value) return;
|
|
12195
|
+
member.automatic = false;
|
|
12174
12196
|
const open = !host.state.internalOpen;
|
|
12175
12197
|
if (!open && !mayClose()) return;
|
|
12176
12198
|
const how = trigger();
|
|
@@ -12185,6 +12207,7 @@ function connect$2(host) {
|
|
|
12185
12207
|
};
|
|
12186
12208
|
const onBeforematch = () => queueMicrotask(() => {
|
|
12187
12209
|
if (disposed || host.state.internalOpen) return;
|
|
12210
|
+
member.automatic = false;
|
|
12188
12211
|
animateFillTakeover();
|
|
12189
12212
|
host.state.internalOpen = true;
|
|
12190
12213
|
syncGroup("programmatic", "programmatic");
|
|
@@ -12463,7 +12486,7 @@ function createUiDisclosure(options = {}, html) {
|
|
|
12463
12486
|
if (value === null || value === void 0 || value === false) continue;
|
|
12464
12487
|
element.setAttribute(name, value === true ? "" : String(value));
|
|
12465
12488
|
}
|
|
12466
|
-
element.setAttribute("
|
|
12489
|
+
element.setAttribute("component", "ui-disclosure");
|
|
12467
12490
|
element.append((P0$2 ??= buildTemplate(T0$2)).cloneNode(true));
|
|
12468
12491
|
const v = [
|
|
12469
12492
|
false,
|
|
@@ -13207,7 +13230,7 @@ function createUiInput(options = {}, html) {
|
|
|
13207
13230
|
if (value === null || value === void 0 || value === false) continue;
|
|
13208
13231
|
element.setAttribute(name, value === true ? "" : String(value));
|
|
13209
13232
|
}
|
|
13210
|
-
element.setAttribute("
|
|
13233
|
+
element.setAttribute("component", "ui-input");
|
|
13211
13234
|
const v = [
|
|
13212
13235
|
null,
|
|
13213
13236
|
null,
|
|
@@ -13419,6 +13442,7 @@ var expandNodeView = ({ editor, node, getPos }) => {
|
|
|
13419
13442
|
children: ["Initially expanded"]
|
|
13420
13443
|
});
|
|
13421
13444
|
initiallyExpanded.addEventListener("change", (event) => {
|
|
13445
|
+
if (event.target !== initiallyExpanded || !(event instanceof CustomEvent)) return;
|
|
13422
13446
|
draft.open = event.detail.checked;
|
|
13423
13447
|
componentRegistry.update(initiallyExpanded, { checked: draft.open });
|
|
13424
13448
|
});
|
|
@@ -13601,7 +13625,7 @@ function createUiSeparator(options = {}, html) {
|
|
|
13601
13625
|
if (value === null || value === void 0 || value === false) continue;
|
|
13602
13626
|
element.setAttribute(name, value === true ? "" : String(value));
|
|
13603
13627
|
}
|
|
13604
|
-
element.setAttribute("
|
|
13628
|
+
element.setAttribute("component", "ui-separator");
|
|
13605
13629
|
const v = [
|
|
13606
13630
|
null,
|
|
13607
13631
|
null,
|
|
@@ -13951,7 +13975,7 @@ function createUiCallout(options = {}, html) {
|
|
|
13951
13975
|
element.setAttribute(name, value === true ? "" : String(value));
|
|
13952
13976
|
}
|
|
13953
13977
|
if (!element.hasAttribute("role")) element.setAttribute("role", "note");
|
|
13954
|
-
element.setAttribute("
|
|
13978
|
+
element.setAttribute("component", "ui-callout");
|
|
13955
13979
|
element.append((P0$1 ??= buildTemplate(T0$1)).cloneNode(true));
|
|
13956
13980
|
const v = [null, null];
|
|
13957
13981
|
const B = acceptProps(element, D$1, S$1.n, v, componentProps, [], html);
|
|
@@ -14502,7 +14526,7 @@ function createUiImage(options = {}, html) {
|
|
|
14502
14526
|
if (value === null || value === void 0 || value === false) continue;
|
|
14503
14527
|
element.setAttribute(name, value === true ? "" : String(value));
|
|
14504
14528
|
}
|
|
14505
|
-
element.setAttribute("
|
|
14529
|
+
element.setAttribute("component", "ui-image");
|
|
14506
14530
|
element.append((P0 ??= buildTemplate(T0)).cloneNode(true));
|
|
14507
14531
|
const v = [
|
|
14508
14532
|
null,
|
|
@@ -14936,7 +14960,7 @@ function createDocumentEditorSession(props, options) {
|
|
|
14936
14960
|
if (!chipEditing?.open(position)) return;
|
|
14937
14961
|
uiState.root?.querySelector(`#${chipAnchorId}`)?.removeAttribute("id");
|
|
14938
14962
|
chipEditing.element.id = chipAnchorId;
|
|
14939
|
-
|
|
14963
|
+
if (elementRef("chipPopover")?.matches(":popover-open")) focusPart(uiState.chipEditorRoot);
|
|
14940
14964
|
};
|
|
14941
14965
|
const openFootnoteSurface = (position, surface) => {
|
|
14942
14966
|
if (!footnoteEditing?.open(position)) return;
|
|
@@ -16420,6 +16444,7 @@ function createDocumentEditorSession(props, options) {
|
|
|
16420
16444
|
});
|
|
16421
16445
|
listen(options.root, "toggle", (event) => {
|
|
16422
16446
|
if (event.newState !== "open") return;
|
|
16447
|
+
if (event.target === elementRef("chipPopover") && chipEditing?.state.open) focusPart(uiState.chipEditorRoot);
|
|
16423
16448
|
if (event.target === elementRef("footnoteActions") && uiState.footnoteSurface === "actions") elementRef("footnoteGo")?.focus();
|
|
16424
16449
|
if (event.target === elementRef("footnotePopover") && uiState.footnoteSurface === "editor") focusFootnoteField();
|
|
16425
16450
|
}, true);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@threadlabs/looma",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.52.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "HTML Next UI components, native DOM support and design tokens.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -64,12 +64,6 @@
|
|
|
64
64
|
},
|
|
65
65
|
"./theme-system.css": "./theme-system.css",
|
|
66
66
|
"./docs/catalog.json": "./docs/catalog.json",
|
|
67
|
-
"./docs/*": "./docs/*",
|
|
68
|
-
"./docs": {
|
|
69
|
-
"types": "./docs/index.d.ts",
|
|
70
|
-
"import": "./docs/index.mjs",
|
|
71
|
-
"default": "./docs/index.mjs"
|
|
72
|
-
},
|
|
73
67
|
"./editor/compact": {
|
|
74
68
|
"types": "./editor/compact.d.ts",
|
|
75
69
|
"import": "./editor/compact.js",
|
|
@@ -80,7 +74,8 @@
|
|
|
80
74
|
"types": "./components/shared/input-modality.d.ts",
|
|
81
75
|
"import": "./components/shared/input-modality.js",
|
|
82
76
|
"default": "./components/shared/input-modality.js"
|
|
83
|
-
}
|
|
77
|
+
},
|
|
78
|
+
"./docs/examples/*": "./docs/examples/*"
|
|
84
79
|
},
|
|
85
80
|
"files": [
|
|
86
81
|
"dist/",
|
|
@@ -93,8 +88,7 @@
|
|
|
93
88
|
"README.md",
|
|
94
89
|
"LICENSE",
|
|
95
90
|
"EXPRESSIVE-MARKDOWN.md",
|
|
96
|
-
"docs/"
|
|
97
|
-
"bin/"
|
|
91
|
+
"docs/"
|
|
98
92
|
],
|
|
99
93
|
"sideEffects": [
|
|
100
94
|
"./dist/index.js",
|
|
@@ -102,21 +96,17 @@
|
|
|
102
96
|
"**/*.css"
|
|
103
97
|
],
|
|
104
98
|
"dependencies": {
|
|
105
|
-
"@nextwebwg/html-next": ">=1.0.0-alpha.
|
|
99
|
+
"@nextwebwg/html-next": ">=1.0.0-alpha.82",
|
|
106
100
|
"@js-temporal/polyfill": "^0.5.1",
|
|
107
101
|
"dompurify": "3.4.15",
|
|
108
102
|
"expressmark": ">=0.5.1",
|
|
109
103
|
"highlight.js": "11.11.2",
|
|
110
104
|
"lowlight": "^3.3.0",
|
|
111
|
-
"lucide": "~0.554.0"
|
|
112
|
-
"parse5": "^8.0.1"
|
|
105
|
+
"lucide": "~0.554.0"
|
|
113
106
|
},
|
|
114
107
|
"peerDependencies": {
|
|
115
|
-
"@threadlabs/markupkit": ">=0.4.3",
|
|
116
108
|
"@tiptap/core": ">=2 <3",
|
|
117
|
-
"@tiptap/pm": ">=2 <3"
|
|
118
|
-
"markupress": ">=0.14.6",
|
|
119
|
-
"vite": ">=7.2.7 <9"
|
|
109
|
+
"@tiptap/pm": ">=2 <3"
|
|
120
110
|
},
|
|
121
111
|
"peerDependenciesMeta": {
|
|
122
112
|
"@tiptap/core": {
|
|
@@ -124,19 +114,18 @@
|
|
|
124
114
|
},
|
|
125
115
|
"@tiptap/pm": {
|
|
126
116
|
"optional": true
|
|
127
|
-
},
|
|
128
|
-
"markupress": {
|
|
129
|
-
"optional": true
|
|
130
|
-
},
|
|
131
|
-
"@threadlabs/markupkit": {
|
|
132
|
-
"optional": true
|
|
133
|
-
},
|
|
134
|
-
"vite": {
|
|
135
|
-
"optional": true
|
|
136
117
|
}
|
|
137
118
|
},
|
|
138
119
|
"devDependencies": {
|
|
139
|
-
"@
|
|
120
|
+
"@angular/common": "21.2.24",
|
|
121
|
+
"@angular/compiler": "21.2.24",
|
|
122
|
+
"@angular/compiler-cli": "21.2.24",
|
|
123
|
+
"@angular/core": "21.2.24",
|
|
124
|
+
"@angular/platform-browser": "21.2.24",
|
|
125
|
+
"@angular/platform-server": "21.2.24",
|
|
126
|
+
"@nextwebwg/html-next-unplugin": ">=1.0.0-alpha.82",
|
|
127
|
+
"@preact/preset-vite": "^2.10.6",
|
|
128
|
+
"@sveltejs/vite-plugin-svelte": "^7.3.1",
|
|
140
129
|
"@tiptap/core": "^2.11.5",
|
|
141
130
|
"@tiptap/extension-blockquote": "^2.11.5",
|
|
142
131
|
"@tiptap/extension-bold": "^2.11.5",
|
|
@@ -171,29 +160,35 @@
|
|
|
171
160
|
"@tiptap/extension-underline": "^2.11.5",
|
|
172
161
|
"@tiptap/pm": "^2.11.5",
|
|
173
162
|
"@tiptap/suggestion": "^2.11.5",
|
|
163
|
+
"@types/react": "^19.2.0",
|
|
164
|
+
"@types/react-dom": "^19.2.0",
|
|
165
|
+
"@vitejs/plugin-react": "^6.1.2",
|
|
174
166
|
"@vitejs/plugin-vue": "^6.0.9",
|
|
175
|
-
"@vitest/browser": "
|
|
167
|
+
"@vitest/browser-playwright": "^5.0.4",
|
|
176
168
|
"axe-core": "^4.10.3",
|
|
177
169
|
"jsdom": "^27.0.0",
|
|
178
170
|
"playwright": "~1.60.0",
|
|
171
|
+
"preact": "^11.1.0",
|
|
172
|
+
"preact-render-to-string": "^6.8.2",
|
|
173
|
+
"react": "^19.3.0",
|
|
174
|
+
"react-dom": "^19.3.0",
|
|
175
|
+
"rxjs": "^7.8.2",
|
|
176
|
+
"svelte": "^5.57.1",
|
|
179
177
|
"typescript": "~5.9.3",
|
|
180
178
|
"vite": "^8.3.0",
|
|
181
|
-
"vitest": "^
|
|
179
|
+
"vitest": "^5.0.4",
|
|
182
180
|
"vue": "^3.5.43",
|
|
183
181
|
"vue-tsc": "^3.3.11",
|
|
184
|
-
"
|
|
182
|
+
"parse5": "^8.0.1"
|
|
185
183
|
},
|
|
186
184
|
"engines": {
|
|
187
185
|
"node": ">=22.22.2 <23 || >=24.15 <25"
|
|
188
186
|
},
|
|
189
|
-
"bin": {
|
|
190
|
-
"looma-docs": "./bin/looma-docs.mjs"
|
|
191
|
-
},
|
|
192
187
|
"scripts": {
|
|
193
188
|
"build": "node build.mjs",
|
|
194
189
|
"lint": "tsc -p tsconfig.json --noEmit",
|
|
195
190
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
196
|
-
"test": "vitest run",
|
|
197
|
-
"test:browser": "
|
|
191
|
+
"test": "vitest run --project unit",
|
|
192
|
+
"test:browser": "node tests/run-browser.mjs"
|
|
198
193
|
}
|
|
199
194
|
}
|
package/styles/ui-action-bar.css
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
/* Generated by HTML Next 1.0.0-alpha.
|
|
1
|
+
/* Generated by HTML Next 1.0.0-alpha.82. Do not edit. */
|
|
2
2
|
@supports (-moz-appearance: none) {
|
|
3
|
-
:where([data-component], [data-slotted]) { --html-next-scope-owner: boundary; }
|
|
4
|
-
:where([data-slotted]:not([data-component])) { --html-next-scope-owner: projected !important; }
|
|
3
|
+
:where(:is([component]:not(template), [data-component]:not([component])), [data-slotted]) { --html-next-scope-owner: boundary; }
|
|
4
|
+
:where([data-slotted]:not(:is([component]:not(template), [data-component]:not([component])))) { --html-next-scope-owner: projected !important; }
|
|
5
5
|
}
|
|
6
6
|
@supports (-moz-appearance: none) {
|
|
7
|
-
[data-component~="ui-action-bar"] { --html-next-scope-owner: "ui-action-bar" !important; }
|
|
7
|
+
:is([component~="ui-action-bar"]:not(template), [data-component~="ui-action-bar"]:not([component])) { --html-next-scope-owner: "ui-action-bar" !important; }
|
|
8
8
|
}
|
|
9
|
-
@scope ([data-component~="ui-action-bar"]) to ([data-component], [data-slotted]) {
|
|
9
|
+
@scope (:is([component~="ui-action-bar"]:not(template), [data-component~="ui-action-bar"]:not([component]))) to (:is([component]:not(template), [data-component]:not([component])), [data-slotted]) {
|
|
10
10
|
/* The action row of a form or dialog. Tertiary actions (Back, Cancel, Discard) sit at the start
|
|
11
11
|
edge; secondary actions (Save as draft, Preview) sit just before the primary one, which ends the
|
|
12
12
|
row. The bar arranges its actions and leaves their look to them. */
|
|
13
|
-
:scope:where([data-component~="ui-action-bar"]) {
|
|
13
|
+
:scope:where(:is([component~="ui-action-bar"]:not(template), [data-component~="ui-action-bar"]:not([component]))) {
|
|
14
14
|
/* Resolve shared part values at the component root. */
|
|
15
15
|
--_ui-action-bar-gap: var(--ui-action-bar-gap);
|
|
16
16
|
|
|
@@ -66,11 +66,11 @@
|
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
/* A component that sets its display still honours the hidden attribute on its root. */
|
|
69
|
-
:scope:where([data-component~="ui-action-bar"])[hidden] {
|
|
69
|
+
:scope:where(:is([component~="ui-action-bar"]:not(template), [data-component~="ui-action-bar"]:not([component])))[hidden] {
|
|
70
70
|
display: none !important;
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
-
@scope ([data-component~="ui-action-bar"]) to ([data-component]) {
|
|
73
|
+
@scope (:is([component~="ui-action-bar"]:not(template), [data-component~="ui-action-bar"]:not([component]))) to (:is([component]:not(template), [data-component]:not([component]))) {
|
|
74
74
|
/* The action row of a form or dialog. Tertiary actions (Back, Cancel, Discard) sit at the start
|
|
75
75
|
edge; secondary actions (Save as draft, Preview) sit just before the primary one, which ends the
|
|
76
76
|
row. The bar arranges its actions and leaves their look to them. */
|