@threadlabs/looma 0.1.13 → 0.1.15
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/dist/{chunk-DQZJTDIB.js → chunk-SVINNT3E.js} +29 -27
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/looma.cjs.js +1 -1
- package/dist/cjs/ui-tree-item.cjs.entry.js +694 -0
- package/dist/cjs/ui-tree.cjs.entry.js +257 -0
- package/dist/collection/collection-manifest.json +3 -1
- package/dist/collection/components/ui-tree/ui-tree.css +11 -0
- package/dist/collection/components/ui-tree/ui-tree.js +252 -0
- package/dist/collection/components/ui-tree-item/ui-tree-item.css +213 -0
- package/dist/collection/components/ui-tree-item/ui-tree-item.js +347 -0
- package/dist/collection/utils/drag-drop.js +51 -0
- package/dist/components/index.d.ts +4 -0
- package/dist/components/index.js +1 -1
- package/dist/components/ui-tree-item.d.ts +11 -0
- package/dist/components/ui-tree-item.js +13 -0
- package/dist/components/ui-tree.d.ts +11 -0
- package/dist/components/ui-tree.js +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/looma.js +1 -1
- package/dist/esm/ui-tree-item.entry.js +692 -0
- package/dist/esm/ui-tree.entry.js +255 -0
- package/dist/index.cjs +687 -15
- package/dist/index.d.cts +17 -1
- package/dist/index.d.ts +17 -1
- package/dist/index.js +44 -3
- package/dist/looma/looma.esm.js +1 -1
- package/dist/looma/p-95368dee.entry.js +1 -0
- package/dist/looma/p-ef9ca2ed.entry.js +13 -0
- package/dist/types/components/ui-tree/ui-tree.d.ts +28 -0
- package/dist/types/components/ui-tree-item/ui-tree-item.d.ts +36 -0
- package/dist/types/components.d.ts +176 -0
- package/dist/types/utils/drag-drop.d.ts +15 -0
- package/dist/{ui-affordance-scope.entry-SWTDTGGU.js → ui-affordance-scope.entry-PFP2TDKO.js} +1 -1
- package/dist/{ui-avatar-group.entry-VUYE2XOM.js → ui-avatar-group.entry-DQDP325O.js} +1 -1
- package/dist/{ui-avatar.entry-2CKHEJTS.js → ui-avatar.entry-WYIDMOFE.js} +1 -1
- package/dist/{ui-badge.entry-4SWSD3R5.js → ui-badge.entry-VGHXPEDT.js} +1 -1
- package/dist/{ui-button.entry-SS3AS32R.js → ui-button.entry-LKPLOJ22.js} +1 -1
- package/dist/{ui-checkbox.entry-V7OYTOLW.js → ui-checkbox.entry-J74HEA22.js} +1 -1
- package/dist/{ui-context-menu.entry-UCLTQESP.js → ui-context-menu.entry-MQM2FCLI.js} +1 -1
- package/dist/{ui-dialog.entry-PXIVZF7D.js → ui-dialog.entry-DQMMDO4Z.js} +1 -1
- package/dist/{ui-disclosure.entry-ZADBPM2D.js → ui-disclosure.entry-ONF7UZDC.js} +1 -1
- package/dist/{ui-floating-action-button.entry-WNBWY36T.js → ui-floating-action-button.entry-FKTGVC5T.js} +1 -1
- package/dist/{ui-form-field.entry-RZPSWN6Y.js → ui-form-field.entry-M3ISWQNU.js} +1 -1
- package/dist/{ui-icon-button.entry-ILU7RD7M.js → ui-icon-button.entry-AWFIQUHM.js} +1 -1
- package/dist/{ui-input.entry-FEIUK4EE.js → ui-input.entry-JZ6RETMT.js} +1 -1
- package/dist/{ui-menu-item.entry-UJVECPSK.js → ui-menu-item.entry-5MFR5LFL.js} +1 -1
- package/dist/{ui-menu.entry-MTCE3F5U.js → ui-menu.entry-IOEIDATQ.js} +1 -1
- package/dist/{ui-popover.entry-OAME35VB.js → ui-popover.entry-ELCMKO6Y.js} +1 -1
- package/dist/{ui-radio-group.entry-CPFX4LVA.js → ui-radio-group.entry-RJHUPPEM.js} +1 -1
- package/dist/{ui-radio.entry-44OTRYPB.js → ui-radio.entry-3VRDPOY4.js} +1 -1
- package/dist/{ui-search-result-row.entry-ZU5SL5OP.js → ui-search-result-row.entry-J34YPAV7.js} +1 -1
- package/dist/{ui-search-shell.entry-G7HG4RKU.js → ui-search-shell.entry-IJ4UUP27.js} +1 -1
- package/dist/{ui-select.entry-NAONXMFG.js → ui-select.entry-C6YD3HQ5.js} +1 -1
- package/dist/{ui-switch.entry-SE4ZTCS2.js → ui-switch.entry-UZDF5QTI.js} +1 -1
- package/dist/{ui-tabs.entry-2YG2JE3K.js → ui-tabs.entry-YRAKWOMR.js} +1 -1
- package/dist/{ui-textarea.entry-PV3APDLY.js → ui-textarea.entry-JLDKFT3K.js} +1 -1
- package/dist/{ui-toast-region.entry-WH2OL3FR.js → ui-toast-region.entry-GC7C7KXF.js} +1 -1
- package/dist/{ui-tooltip.entry-FY563DP4.js → ui-tooltip.entry-F26XDTYX.js} +1 -1
- package/dist/{ui-top-bar.entry-LJSZXFAH.js → ui-top-bar.entry-5W5UA5KV.js} +1 -1
- package/dist/ui-tree-item.entry-3LM7IXIK.js +385 -0
- package/dist/ui-tree.entry-X4FU42A6.js +244 -0
- package/editor.css +42 -0
- package/package.json +1 -1
- package/styles.css +18 -6
- package/vue/{chunk-YN4IUYVY.js → chunk-IITL6UBR.js} +7 -1
- package/vue/editor/index.d.ts +41 -3
- package/vue/editor/index.js +273 -4
- package/vue/index.d.ts +24 -1
- package/vue/index.js +5 -1
package/dist/index.d.cts
CHANGED
|
@@ -105,4 +105,20 @@ type LoomaIconNode = IconNode;
|
|
|
105
105
|
/** Creates consistent, currentColor-driven SVG markup for framework-neutral components. */
|
|
106
106
|
declare function loomaIconMarkup(name: LoomaIconName, className?: string): string;
|
|
107
107
|
|
|
108
|
-
|
|
108
|
+
type DropPosition = 'before' | 'inside' | 'after';
|
|
109
|
+
interface HoverIntentController {
|
|
110
|
+
schedule(key: string): void;
|
|
111
|
+
cancel(): void;
|
|
112
|
+
destroy(): void;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Classify the pointer against stable edge bands. Containers reserve their
|
|
116
|
+
* middle half for containment; leaf rows split cleanly at their midpoint.
|
|
117
|
+
*/
|
|
118
|
+
declare function classifyDropPosition(rect: Pick<DOMRect, 'top' | 'bottom' | 'height'>, clientY: number, acceptsChildren: boolean): DropPosition;
|
|
119
|
+
/** Use the rendered row—not the tiny handle—as the browser drag preview. */
|
|
120
|
+
declare function setElementDragImage(dataTransfer: DataTransfer | null, element: HTMLElement): void;
|
|
121
|
+
/** A keyed, replaceable hover timer suitable for expansion and disclosure intent. */
|
|
122
|
+
declare function createHoverIntent(delay: number, onIntent: (key: string) => void): HoverIntentController;
|
|
123
|
+
|
|
124
|
+
export { DEFAULT_AFFORDANCE_NEAR_RADIUS, type DropPosition, type HoverIntentController, LOOMA_ICONS, type LoomaIconName, type LoomaIconNode, type OverlayCloseReason, type OverlayRecord, type OverlayTrigger, type Point, type ProximityCoordinator, type ProximityCoordinatorOptions, type RectLike, type ViewportRect, clampRectToViewport, classifyDropPosition, closeOverlay, createHoverIntent, createProximityCoordinator, distanceFromPointToRect, getTopOverlay, getVisualViewportRect, isTopOverlay, loomaIconMarkup, openOverlay, requestTopOverlayClose, setElementDragImage };
|
package/dist/index.d.ts
CHANGED
|
@@ -105,4 +105,20 @@ type LoomaIconNode = IconNode;
|
|
|
105
105
|
/** Creates consistent, currentColor-driven SVG markup for framework-neutral components. */
|
|
106
106
|
declare function loomaIconMarkup(name: LoomaIconName, className?: string): string;
|
|
107
107
|
|
|
108
|
-
|
|
108
|
+
type DropPosition = 'before' | 'inside' | 'after';
|
|
109
|
+
interface HoverIntentController {
|
|
110
|
+
schedule(key: string): void;
|
|
111
|
+
cancel(): void;
|
|
112
|
+
destroy(): void;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Classify the pointer against stable edge bands. Containers reserve their
|
|
116
|
+
* middle half for containment; leaf rows split cleanly at their midpoint.
|
|
117
|
+
*/
|
|
118
|
+
declare function classifyDropPosition(rect: Pick<DOMRect, 'top' | 'bottom' | 'height'>, clientY: number, acceptsChildren: boolean): DropPosition;
|
|
119
|
+
/** Use the rendered row—not the tiny handle—as the browser drag preview. */
|
|
120
|
+
declare function setElementDragImage(dataTransfer: DataTransfer | null, element: HTMLElement): void;
|
|
121
|
+
/** A keyed, replaceable hover timer suitable for expansion and disclosure intent. */
|
|
122
|
+
declare function createHoverIntent(delay: number, onIntent: (key: string) => void): HoverIntentController;
|
|
123
|
+
|
|
124
|
+
export { DEFAULT_AFFORDANCE_NEAR_RADIUS, type DropPosition, type HoverIntentController, LOOMA_ICONS, type LoomaIconName, type LoomaIconNode, type OverlayCloseReason, type OverlayRecord, type OverlayTrigger, type Point, type ProximityCoordinator, type ProximityCoordinatorOptions, type RectLike, type ViewportRect, clampRectToViewport, classifyDropPosition, closeOverlay, createHoverIntent, createProximityCoordinator, distanceFromPointToRect, getTopOverlay, getVisualViewportRect, isTopOverlay, loomaIconMarkup, openOverlay, requestTopOverlayClose, setElementDragImage };
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
bootstrapLazy
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SVINNT3E.js";
|
|
4
4
|
|
|
5
5
|
// dist/esm/app-globals-DQuL1Twl.js
|
|
6
6
|
var globalScripts = () => {
|
|
@@ -10,7 +10,7 @@ var globalScripts = () => {
|
|
|
10
10
|
var defineCustomElements = async (win, options) => {
|
|
11
11
|
if (typeof window === "undefined") return void 0;
|
|
12
12
|
await globalScripts();
|
|
13
|
-
return bootstrapLazy([["ui-context-menu", [[769, "ui-context-menu", { "open": [4], "defaultOpen": [4, "default-open"], "for": [1], "internalOpen": [32] }, null, { "open": [{ "syncFromProp": 0 }], "for": [{ "syncTarget": 0 }], "internalOpen": [{ "syncOverlay": 0 }] }]]], ["ui-affordance-scope", [[769, "ui-affordance-scope", { "nearRadius": [514, "near-radius"] }, null, { "nearRadius": [{ "connectCoordinator": 0 }] }]]], ["ui-avatar", [[513, "ui-avatar", { "src": [1], "alt": [1], "name": [1], "fallback": [1], "hasImage": [32] }, null, { "src": [{ "watchSrc": 0 }] }]]], ["ui-avatar-group", [[769, "ui-avatar-group", { "max": [2], "label": [1], "overflowCount": [32] }, null, { "max": [{ "syncOverflow": 0 }] }]]], ["ui-badge", [[769, "ui-badge", { "variant": [1], "tone": [1] }]]], ["ui-button", [[769, "ui-button", { "variant": [1], "size": [1], "disabled": [4] }, null, { "variant": [{ "syncToButton": 0 }], "size": [{ "syncToButton": 0 }], "disabled": [{ "syncToButton": 0 }] }]]], ["ui-checkbox", [[769, "ui-checkbox", { "checked": [4], "defaultChecked": [4, "default-checked"], "disabled": [4], "indeterminate": [4], "required": [4], "value": [1], "internalChecked": [32] }, null, { "checked": [{ "syncFromProp": 0 }], "internalChecked": [{ "syncToInput": 0 }], "indeterminate": [{ "syncToInput": 0 }], "disabled": [{ "syncToInput": 0 }], "required": [{ "syncToInput": 0 }] }]]], ["ui-dialog", [[769, "ui-dialog", { "open": [4], "defaultOpen": [4, "default-open"], "modal": [4], "dismissible": [4], "label": [1], "internalOpen": [32] }, null, { "open": [{ "syncFromProp": 0 }], "internalOpen": [{ "syncOpen": 0 }] }]]], ["ui-disclosure", [[769, "ui-disclosure", { "open": [4], "defaultOpen": [4, "default-open"], "disabled": [4], "internalOpen": [32], "contentId": [32] }, null, { "open": [{ "syncFromProp": 0 }], "internalOpen": [{ "syncState": 0 }] }]]], ["ui-floating-action-button", [[769, "ui-floating-action-button", { "disabled": [516], "mobileOnly": [516, "mobile-only"], "label": [1] }]]], ["ui-form-field", [[769, "ui-form-field", { "invalid": [4], "disabled": [4], "required": [4] }]]], ["ui-icon-button", [[769, "ui-icon-button", { "disabled": [516], "label": [1], "size": [513], "variant": [513], "anticipatory": [516] }]]], ["ui-input", [[769, "ui-input", { "value": [1], "defaultValue": [1, "default-value"], "disabled": [4], "invalid": [4], "readOnly": [4, "readonly"], "internalValue": [32] }, null, { "value": [{ "syncFromProp": 0 }], "internalValue": [{ "syncToInput": 0 }], "defaultValue": [{ "syncToInput": 0 }], "disabled": [{ "syncToInput": 0 }], "invalid": [{ "syncToInput": 0 }], "readOnly": [{ "syncToInput": 0 }] }]]], ["ui-menu-item", [[769, "ui-menu-item", { "disabled": [516], "value": [1] }]]], ["ui-popover", [[769, "ui-popover", { "open": [4], "defaultOpen": [4, "default-open"], "internalOpen": [32] }, null, { "open": [{ "syncFromProp": 0 }], "internalOpen": [{ "onOpenChange": 0 }] }]]], ["ui-radio", [[769, "ui-radio", { "checked": [4], "defaultChecked": [4, "default-checked"], "disabled": [4], "name": [1], "required": [4], "value": [1] }, null, { "checked": [{ "syncToInput": 0 }], "disabled": [{ "syncToInput": 0 }], "name": [{ "syncToInput": 0 }], "required": [{ "syncToInput": 0 }], "value": [{ "syncToInput": 0 }] }]]], ["ui-radio-group", [[769, "ui-radio-group", { "value": [1], "name": [1], "orientation": [1], "disabled": [4], "required": [4], "internalValue": [32] }, null, { "value": [{ "syncFromProp": 0 }], "internalValue": [{ "syncToRadios": 0 }], "name": [{ "syncToRadios": 0 }], "orientation": [{ "syncToRadios": 0 }], "disabled": [{ "syncToRadios": 0 }] }]]], ["ui-search-result-row", [[769, "ui-search-result-row", { "disabled": [516], "selected": [516], "hasLeading": [32], "hasMeta": [32], "hasExcerpt": [32], "hasTrailing": [32] }]]], ["ui-search-shell", [[769, "ui-search-shell", { "hasStatus": [32], "hasFooter": [32] }]]], ["ui-select", [[769, "ui-select", { "value": [1], "defaultValue": [1, "default-value"], "disabled": [4], "invalid": [4], "required": [4], "internalValue": [32] }, null, { "value": [{ "syncFromProp": 0 }], "internalValue": [{ "syncToSelect": 0 }], "defaultValue": [{ "syncToSelect": 0 }], "disabled": [{ "syncToSelect": 0 }], "invalid": [{ "syncToSelect": 0 }], "required": [{ "syncToSelect": 0 }] }]]], ["ui-switch", [[769, "ui-switch", { "checked": [4], "defaultChecked": [4, "default-checked"], "disabled": [4], "required": [4], "value": [1], "internalChecked": [32] }, null, { "checked": [{ "syncFromProp": 0 }] }]]], ["ui-tabs", [[769, "ui-tabs", { "value": [1], "defaultValue": [1, "default-value"], "orientation": [1], "internalValue": [32] }, null, { "value": [{ "syncFromProp": 0 }], "internalValue": [{ "syncState": 0 }], "orientation": [{ "syncState": 0 }] }]]], ["ui-textarea", [[769, "ui-textarea", { "value": [1], "defaultValue": [1, "default-value"], "disabled": [4], "invalid": [4], "readOnly": [4, "readonly"], "rows": [2], "internalValue": [32] }, null, { "value": [{ "syncFromProp": 0 }], "internalValue": [{ "syncToTextarea": 0 }], "defaultValue": [{ "syncToTextarea": 0 }], "disabled": [{ "syncToTextarea": 0 }], "invalid": [{ "syncToTextarea": 0 }], "readOnly": [{ "syncToTextarea": 0 }], "rows": [{ "syncToTextarea": 0 }] }]]], ["ui-toast-region", [[769, "ui-toast-region", { "open": [4], "internalOpen": [32] }, null, { "open": [{ "syncFromProp": 0 }] }]]], ["ui-tooltip", [[769, "ui-tooltip", { "for": [1], "open": [4], "defaultOpen": [4, "default-open"], "internalOpen": [32] }, null, { "open": [{ "syncFromProp": 0 }], "internalOpen": [{ "syncOverlay": 0 }] }]]], ["ui-top-bar", [[769, "ui-top-bar", { "hasLeading": [32], "hasSearch": [32], "hasActions": [32] }]]], ["ui-menu", [[769, "ui-menu", { "open": [4], "defaultOpen": [4, "default-open"], "internalOpen": [32] }, null, { "open": [{ "syncFromProp": 0 }] }]]]], options);
|
|
13
|
+
return bootstrapLazy([["ui-context-menu", [[769, "ui-context-menu", { "open": [4], "defaultOpen": [4, "default-open"], "for": [1], "internalOpen": [32] }, null, { "open": [{ "syncFromProp": 0 }], "for": [{ "syncTarget": 0 }], "internalOpen": [{ "syncOverlay": 0 }] }]]], ["ui-affordance-scope", [[769, "ui-affordance-scope", { "nearRadius": [514, "near-radius"] }, null, { "nearRadius": [{ "connectCoordinator": 0 }] }]]], ["ui-avatar", [[513, "ui-avatar", { "src": [1], "alt": [1], "name": [1], "fallback": [1], "hasImage": [32] }, null, { "src": [{ "watchSrc": 0 }] }]]], ["ui-avatar-group", [[769, "ui-avatar-group", { "max": [2], "label": [1], "overflowCount": [32] }, null, { "max": [{ "syncOverflow": 0 }] }]]], ["ui-badge", [[769, "ui-badge", { "variant": [1], "tone": [1] }]]], ["ui-button", [[769, "ui-button", { "variant": [1], "size": [1], "disabled": [4] }, null, { "variant": [{ "syncToButton": 0 }], "size": [{ "syncToButton": 0 }], "disabled": [{ "syncToButton": 0 }] }]]], ["ui-checkbox", [[769, "ui-checkbox", { "checked": [4], "defaultChecked": [4, "default-checked"], "disabled": [4], "indeterminate": [4], "required": [4], "value": [1], "internalChecked": [32] }, null, { "checked": [{ "syncFromProp": 0 }], "internalChecked": [{ "syncToInput": 0 }], "indeterminate": [{ "syncToInput": 0 }], "disabled": [{ "syncToInput": 0 }], "required": [{ "syncToInput": 0 }] }]]], ["ui-dialog", [[769, "ui-dialog", { "open": [4], "defaultOpen": [4, "default-open"], "modal": [4], "dismissible": [4], "label": [1], "internalOpen": [32] }, null, { "open": [{ "syncFromProp": 0 }], "internalOpen": [{ "syncOpen": 0 }] }]]], ["ui-disclosure", [[769, "ui-disclosure", { "open": [4], "defaultOpen": [4, "default-open"], "disabled": [4], "internalOpen": [32], "contentId": [32] }, null, { "open": [{ "syncFromProp": 0 }], "internalOpen": [{ "syncState": 0 }] }]]], ["ui-floating-action-button", [[769, "ui-floating-action-button", { "disabled": [516], "mobileOnly": [516, "mobile-only"], "label": [1] }]]], ["ui-form-field", [[769, "ui-form-field", { "invalid": [4], "disabled": [4], "required": [4] }]]], ["ui-icon-button", [[769, "ui-icon-button", { "disabled": [516], "label": [1], "size": [513], "variant": [513], "anticipatory": [516] }]]], ["ui-input", [[769, "ui-input", { "value": [1], "defaultValue": [1, "default-value"], "disabled": [4], "invalid": [4], "readOnly": [4, "readonly"], "internalValue": [32] }, null, { "value": [{ "syncFromProp": 0 }], "internalValue": [{ "syncToInput": 0 }], "defaultValue": [{ "syncToInput": 0 }], "disabled": [{ "syncToInput": 0 }], "invalid": [{ "syncToInput": 0 }], "readOnly": [{ "syncToInput": 0 }] }]]], ["ui-menu-item", [[769, "ui-menu-item", { "disabled": [516], "value": [1] }]]], ["ui-popover", [[769, "ui-popover", { "open": [4], "defaultOpen": [4, "default-open"], "internalOpen": [32] }, null, { "open": [{ "syncFromProp": 0 }], "internalOpen": [{ "onOpenChange": 0 }] }]]], ["ui-radio", [[769, "ui-radio", { "checked": [4], "defaultChecked": [4, "default-checked"], "disabled": [4], "name": [1], "required": [4], "value": [1] }, null, { "checked": [{ "syncToInput": 0 }], "disabled": [{ "syncToInput": 0 }], "name": [{ "syncToInput": 0 }], "required": [{ "syncToInput": 0 }], "value": [{ "syncToInput": 0 }] }]]], ["ui-radio-group", [[769, "ui-radio-group", { "value": [1], "name": [1], "orientation": [1], "disabled": [4], "required": [4], "internalValue": [32] }, null, { "value": [{ "syncFromProp": 0 }], "internalValue": [{ "syncToRadios": 0 }], "name": [{ "syncToRadios": 0 }], "orientation": [{ "syncToRadios": 0 }], "disabled": [{ "syncToRadios": 0 }] }]]], ["ui-search-result-row", [[769, "ui-search-result-row", { "disabled": [516], "selected": [516], "hasLeading": [32], "hasMeta": [32], "hasExcerpt": [32], "hasTrailing": [32] }]]], ["ui-search-shell", [[769, "ui-search-shell", { "hasStatus": [32], "hasFooter": [32] }]]], ["ui-select", [[769, "ui-select", { "value": [1], "defaultValue": [1, "default-value"], "disabled": [4], "invalid": [4], "required": [4], "internalValue": [32] }, null, { "value": [{ "syncFromProp": 0 }], "internalValue": [{ "syncToSelect": 0 }], "defaultValue": [{ "syncToSelect": 0 }], "disabled": [{ "syncToSelect": 0 }], "invalid": [{ "syncToSelect": 0 }], "required": [{ "syncToSelect": 0 }] }]]], ["ui-switch", [[769, "ui-switch", { "checked": [4], "defaultChecked": [4, "default-checked"], "disabled": [4], "required": [4], "value": [1], "internalChecked": [32] }, null, { "checked": [{ "syncFromProp": 0 }] }]]], ["ui-tabs", [[769, "ui-tabs", { "value": [1], "defaultValue": [1, "default-value"], "orientation": [1], "internalValue": [32] }, null, { "value": [{ "syncFromProp": 0 }], "internalValue": [{ "syncState": 0 }], "orientation": [{ "syncState": 0 }] }]]], ["ui-textarea", [[769, "ui-textarea", { "value": [1], "defaultValue": [1, "default-value"], "disabled": [4], "invalid": [4], "readOnly": [4, "readonly"], "rows": [2], "internalValue": [32] }, null, { "value": [{ "syncFromProp": 0 }], "internalValue": [{ "syncToTextarea": 0 }], "defaultValue": [{ "syncToTextarea": 0 }], "disabled": [{ "syncToTextarea": 0 }], "invalid": [{ "syncToTextarea": 0 }], "readOnly": [{ "syncToTextarea": 0 }], "rows": [{ "syncToTextarea": 0 }] }]]], ["ui-toast-region", [[769, "ui-toast-region", { "open": [4], "internalOpen": [32] }, null, { "open": [{ "syncFromProp": 0 }] }]]], ["ui-tooltip", [[769, "ui-tooltip", { "for": [1], "open": [4], "defaultOpen": [4, "default-open"], "internalOpen": [32] }, null, { "open": [{ "syncFromProp": 0 }], "internalOpen": [{ "syncOverlay": 0 }] }]]], ["ui-top-bar", [[769, "ui-top-bar", { "hasLeading": [32], "hasSearch": [32], "hasActions": [32] }]]], ["ui-tree", [[769, "ui-tree", { "label": [1], "hoverExpandDelay": [2, "hover-expand-delay"] }]]], ["ui-tree-item", [[769, "ui-tree-item", { "itemId": [1, "item-id"], "label": [1], "depth": [2], "container": [4], "sortable": [4], "dragType": [1, "drag-type"], "dropScope": [1, "drop-scope"], "accepts": [1], "expanded": [4], "defaultExpanded": [4, "default-expanded"], "selected": [4], "disabled": [4], "internalExpanded": [32] }, null, { "expanded": [{ "syncExpandedFromProp": 0 }] }]]], ["ui-menu", [[769, "ui-menu", { "open": [4], "defaultOpen": [4, "default-open"], "internalOpen": [32] }, null, { "open": [{ "syncFromProp": 0 }] }]]]], options);
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
// loader/index.js
|
|
@@ -345,13 +345,53 @@ function loomaIconMarkup(name, className = "looma-icon") {
|
|
|
345
345
|
].join("");
|
|
346
346
|
}
|
|
347
347
|
|
|
348
|
+
// src/utils/drag-drop.ts
|
|
349
|
+
function classifyDropPosition(rect, clientY, acceptsChildren) {
|
|
350
|
+
const progress = rect.height > 0 ? Math.min(1, Math.max(0, (clientY - rect.top) / rect.height)) : 0.5;
|
|
351
|
+
if (!acceptsChildren) return progress < 0.5 ? "before" : "after";
|
|
352
|
+
if (progress < 0.25) return "before";
|
|
353
|
+
if (progress > 0.75) return "after";
|
|
354
|
+
return "inside";
|
|
355
|
+
}
|
|
356
|
+
function setElementDragImage(dataTransfer, element) {
|
|
357
|
+
if (!dataTransfer || typeof dataTransfer.setDragImage !== "function") return;
|
|
358
|
+
const { height } = element.getBoundingClientRect();
|
|
359
|
+
dataTransfer.setDragImage(element, 16, Math.max(0, height / 2));
|
|
360
|
+
}
|
|
361
|
+
function createHoverIntent(delay, onIntent) {
|
|
362
|
+
let timer;
|
|
363
|
+
let pendingKey;
|
|
364
|
+
function cancel() {
|
|
365
|
+
if (timer) clearTimeout(timer);
|
|
366
|
+
timer = void 0;
|
|
367
|
+
pendingKey = void 0;
|
|
368
|
+
}
|
|
369
|
+
return {
|
|
370
|
+
schedule(key) {
|
|
371
|
+
if (pendingKey === key && timer) return;
|
|
372
|
+
cancel();
|
|
373
|
+
pendingKey = key;
|
|
374
|
+
timer = setTimeout(() => {
|
|
375
|
+
timer = void 0;
|
|
376
|
+
const resolvedKey = pendingKey;
|
|
377
|
+
pendingKey = void 0;
|
|
378
|
+
if (resolvedKey) onIntent(resolvedKey);
|
|
379
|
+
}, Math.max(0, delay));
|
|
380
|
+
},
|
|
381
|
+
cancel,
|
|
382
|
+
destroy: cancel
|
|
383
|
+
};
|
|
384
|
+
}
|
|
385
|
+
|
|
348
386
|
// index.ts
|
|
349
387
|
defineCustomElements();
|
|
350
388
|
export {
|
|
351
389
|
DEFAULT_AFFORDANCE_NEAR_RADIUS,
|
|
352
390
|
LOOMA_ICONS,
|
|
353
391
|
clampRectToViewport,
|
|
392
|
+
classifyDropPosition,
|
|
354
393
|
closeOverlay,
|
|
394
|
+
createHoverIntent,
|
|
355
395
|
createProximityCoordinator,
|
|
356
396
|
distanceFromPointToRect,
|
|
357
397
|
getTopOverlay,
|
|
@@ -359,5 +399,6 @@ export {
|
|
|
359
399
|
isTopOverlay,
|
|
360
400
|
loomaIconMarkup,
|
|
361
401
|
openOverlay,
|
|
362
|
-
requestTopOverlayClose
|
|
402
|
+
requestTopOverlayClose,
|
|
403
|
+
setElementDragImage
|
|
363
404
|
};
|
package/dist/looma/looma.esm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as
|
|
1
|
+
import{p as e,b as a}from"./p-CEeiinfk.js";export{s as setNonce}from"./p-CEeiinfk.js";import{g as n}from"./p-DQuL1Twl.js";(()=>{const a=import.meta.url,n={};return""!==a&&(n.resourcesUrl=new URL(".",a).href),e(n)})().then((async e=>(await n(),a([["p-2ae73d5b",[[769,"ui-context-menu",{open:[4],defaultOpen:[4,"default-open"],for:[1],internalOpen:[32]},null,{open:[{syncFromProp:0}],for:[{syncTarget:0}],internalOpen:[{syncOverlay:0}]}]]],["p-3ac2e0d4",[[769,"ui-affordance-scope",{nearRadius:[514,"near-radius"]},null,{nearRadius:[{connectCoordinator:0}]}]]],["p-1681b218",[[513,"ui-avatar",{src:[1],alt:[1],name:[1],fallback:[1],hasImage:[32]},null,{src:[{watchSrc:0}]}]]],["p-5ba9d496",[[769,"ui-avatar-group",{max:[2],label:[1],overflowCount:[32]},null,{max:[{syncOverflow:0}]}]]],["p-0584a051",[[769,"ui-badge",{variant:[1],tone:[1]}]]],["p-34417499",[[769,"ui-button",{variant:[1],size:[1],disabled:[4]},null,{variant:[{syncToButton:0}],size:[{syncToButton:0}],disabled:[{syncToButton:0}]}]]],["p-0f45c5f0",[[769,"ui-checkbox",{checked:[4],defaultChecked:[4,"default-checked"],disabled:[4],indeterminate:[4],required:[4],value:[1],internalChecked:[32]},null,{checked:[{syncFromProp:0}],internalChecked:[{syncToInput:0}],indeterminate:[{syncToInput:0}],disabled:[{syncToInput:0}],required:[{syncToInput:0}]}]]],["p-c6721aba",[[769,"ui-dialog",{open:[4],defaultOpen:[4,"default-open"],modal:[4],dismissible:[4],label:[1],internalOpen:[32]},null,{open:[{syncFromProp:0}],internalOpen:[{syncOpen:0}]}]]],["p-a9f46811",[[769,"ui-disclosure",{open:[4],defaultOpen:[4,"default-open"],disabled:[4],internalOpen:[32],contentId:[32]},null,{open:[{syncFromProp:0}],internalOpen:[{syncState:0}]}]]],["p-051f578c",[[769,"ui-floating-action-button",{disabled:[516],mobileOnly:[516,"mobile-only"],label:[1]}]]],["p-5d4713a6",[[769,"ui-form-field",{invalid:[4],disabled:[4],required:[4]}]]],["p-0198bb21",[[769,"ui-icon-button",{disabled:[516],label:[1],size:[513],variant:[513],anticipatory:[516]}]]],["p-624ba086",[[769,"ui-input",{value:[1],defaultValue:[1,"default-value"],disabled:[4],invalid:[4],readOnly:[4,"readonly"],internalValue:[32]},null,{value:[{syncFromProp:0}],internalValue:[{syncToInput:0}],defaultValue:[{syncToInput:0}],disabled:[{syncToInput:0}],invalid:[{syncToInput:0}],readOnly:[{syncToInput:0}]}]]],["p-ed5abf6d",[[769,"ui-menu-item",{disabled:[516],value:[1]}]]],["p-95cd639d",[[769,"ui-popover",{open:[4],defaultOpen:[4,"default-open"],internalOpen:[32]},null,{open:[{syncFromProp:0}],internalOpen:[{onOpenChange:0}]}]]],["p-8d5adb17",[[769,"ui-radio",{checked:[4],defaultChecked:[4,"default-checked"],disabled:[4],name:[1],required:[4],value:[1]},null,{checked:[{syncToInput:0}],disabled:[{syncToInput:0}],name:[{syncToInput:0}],required:[{syncToInput:0}],value:[{syncToInput:0}]}]]],["p-7e94d90d",[[769,"ui-radio-group",{value:[1],name:[1],orientation:[1],disabled:[4],required:[4],internalValue:[32]},null,{value:[{syncFromProp:0}],internalValue:[{syncToRadios:0}],name:[{syncToRadios:0}],orientation:[{syncToRadios:0}],disabled:[{syncToRadios:0}]}]]],["p-2ed7e241",[[769,"ui-search-result-row",{disabled:[516],selected:[516],hasLeading:[32],hasMeta:[32],hasExcerpt:[32],hasTrailing:[32]}]]],["p-d273b857",[[769,"ui-search-shell",{hasStatus:[32],hasFooter:[32]}]]],["p-a5127c7d",[[769,"ui-select",{value:[1],defaultValue:[1,"default-value"],disabled:[4],invalid:[4],required:[4],internalValue:[32]},null,{value:[{syncFromProp:0}],internalValue:[{syncToSelect:0}],defaultValue:[{syncToSelect:0}],disabled:[{syncToSelect:0}],invalid:[{syncToSelect:0}],required:[{syncToSelect:0}]}]]],["p-b7aa4488",[[769,"ui-switch",{checked:[4],defaultChecked:[4,"default-checked"],disabled:[4],required:[4],value:[1],internalChecked:[32]},null,{checked:[{syncFromProp:0}]}]]],["p-078f9fb8",[[769,"ui-tabs",{value:[1],defaultValue:[1,"default-value"],orientation:[1],internalValue:[32]},null,{value:[{syncFromProp:0}],internalValue:[{syncState:0}],orientation:[{syncState:0}]}]]],["p-4b422d40",[[769,"ui-textarea",{value:[1],defaultValue:[1,"default-value"],disabled:[4],invalid:[4],readOnly:[4,"readonly"],rows:[2],internalValue:[32]},null,{value:[{syncFromProp:0}],internalValue:[{syncToTextarea:0}],defaultValue:[{syncToTextarea:0}],disabled:[{syncToTextarea:0}],invalid:[{syncToTextarea:0}],readOnly:[{syncToTextarea:0}],rows:[{syncToTextarea:0}]}]]],["p-8c09c724",[[769,"ui-toast-region",{open:[4],internalOpen:[32]},null,{open:[{syncFromProp:0}]}]]],["p-96f73d07",[[769,"ui-tooltip",{for:[1],open:[4],defaultOpen:[4,"default-open"],internalOpen:[32]},null,{open:[{syncFromProp:0}],internalOpen:[{syncOverlay:0}]}]]],["p-a33522a2",[[769,"ui-top-bar",{hasLeading:[32],hasSearch:[32],hasActions:[32]}]]],["p-95368dee",[[769,"ui-tree",{label:[1],hoverExpandDelay:[2,"hover-expand-delay"]}]]],["p-ef9ca2ed",[[769,"ui-tree-item",{itemId:[1,"item-id"],label:[1],depth:[2],container:[4],sortable:[4],dragType:[1,"drag-type"],dropScope:[1,"drop-scope"],accepts:[1],expanded:[4],defaultExpanded:[4,"default-expanded"],selected:[4],disabled:[4],internalExpanded:[32]},null,{expanded:[{syncExpandedFromProp:0}]}]]],["p-65c25c94",[[769,"ui-menu",{open:[4],defaultOpen:[4,"default-open"],internalOpen:[32]},null,{open:[{syncFromProp:0}]}]]]],e))));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,g as e,h as i,H as s}from"./p-CEeiinfk.js";import{d as r}from"./p-JwSoedEO.js";const n=class{constructor(e){t(this,e)}get host(){return e(this)}label="Tree";hoverExpandDelay=700;source=null;target=null;position=null;hoverIntent=null;componentDidLoad(){this.hoverIntent=function(t,e){let i,s;function r(){i&&clearTimeout(i),i=void 0,s=void 0}return{schedule(n){s===n&&i||(r(),s=n,i=setTimeout((()=>{i=void 0;const t=s;s=void 0,t&&e(t)}),Math.max(0,t)))},cancel:r,destroy:r}}(this.hoverExpandDelay,this.expandTarget),this.host.addEventListener("dragstart",this.onDragStart),this.host.addEventListener("dragover",this.onDragOver),this.host.addEventListener("dragleave",this.onDragLeave),this.host.addEventListener("drop",this.onDrop),this.host.addEventListener("dragend",this.onDragEnd),this.host.addEventListener("keydown",this.onKeyDown)}disconnectedCallback(){this.hoverIntent?.destroy(),this.host.removeEventListener("dragstart",this.onDragStart),this.host.removeEventListener("dragover",this.onDragOver),this.host.removeEventListener("dragleave",this.onDragLeave),this.host.removeEventListener("drop",this.onDrop),this.host.removeEventListener("dragend",this.onDragEnd),this.host.removeEventListener("keydown",this.onKeyDown)}itemFromEvent(t){return t.composedPath().find((t=>t instanceof HTMLElement&&"ui-tree-item"===t.localName))??null}itemId(t){return t.itemId||t.getAttribute("item-id")||""}rowFor(t){return t.shadowRoot?.querySelector('[part="row"]')??null}acceptsChildren(t){return Boolean(t.container??t.hasAttribute("container"))&&!Boolean(t.disabled??t.hasAttribute("disabled"))}itemMetadata(t){return{type:t.getAttribute("data-drag-type")||t.getAttribute("drag-type")||"item",scope:t.getAttribute("data-drop-scope")||t.getAttribute("drop-scope")||"",accepts:(t.getAttribute("data-accepts")||t.getAttribute("accepts")||"").split(",").map((t=>t.trim())).filter(Boolean)}}permitsDrop(t,e,i){if(t.contains(e))return!1;const s=this.itemMetadata(t),r=this.itemMetadata(e);return"inside"===i?this.acceptsChildren(e)&&(0===r.accepts.length||r.accepts.includes(s.type)):s.type===r.type}clearTarget(){this.target?.removeAttribute("data-drop-position"),this.target=null,this.position=null,this.hoverIntent?.cancel()}finishDrag(){this.source?.removeAttribute("data-dragging"),this.source=null,this.clearTarget()}expandTarget=t=>{const e=Array.from(this.host.querySelectorAll("ui-tree-item")).find((e=>this.itemId(e)===t));e&&"false"===e.getAttribute("aria-expanded")&&e.dispatchEvent(new CustomEvent("ui-tree-auto-expand"))};onDragStart=t=>{const e=this.itemFromEvent(t);if(!e||!Boolean(e.sortable??e.hasAttribute("sortable"))||Boolean(e.disabled??e.hasAttribute("disabled")))return;if(!t.composedPath().some((t=>t instanceof HTMLElement&&"drag-handle"===t.getAttribute("part"))))return void t.preventDefault();const i=this.itemId(e),s=this.rowFor(e);i&&s?(this.source=e,e.setAttribute("data-dragging","true"),t.dataTransfer&&(t.dataTransfer.effectAllowed="move",t.dataTransfer.setData("text/plain",i)),function(t,e){if(!t||"function"!=typeof t.setDragImage)return;const{height:i}=e.getBoundingClientRect();t.setDragImage(e,16,Math.max(0,i/2))}(t.dataTransfer,s)):t.preventDefault()};onDragOver=t=>{if(!this.source)return;const e=this.itemFromEvent(t);if(!e||e===this.source)return void this.clearTarget();const i=this.rowFor(e);if(!i)return;const s=function(t,e,i){const s=t.height>0?Math.min(1,Math.max(0,(e-t.top)/t.height)):.5;return i?s<.25?"before":s>.75?"after":"inside":s<.5?"before":"after"}(i.getBoundingClientRect(),t.clientY,this.acceptsChildren(e));if(!this.permitsDrop(this.source,e,s))return t.dataTransfer&&(t.dataTransfer.dropEffect="none"),void this.clearTarget();t.preventDefault(),t.dataTransfer&&(t.dataTransfer.dropEffect="move"),this.target===e&&this.position===s||(this.clearTarget(),this.target=e,this.position=s,e.setAttribute("data-drop-position",s)),"inside"===s&&"false"===e.getAttribute("aria-expanded")?this.hoverIntent?.schedule(this.itemId(e)):this.hoverIntent?.cancel()};onDragLeave=t=>{const e=t.relatedTarget;e instanceof Node&&this.host.contains(e)||this.clearTarget()};onDrop=t=>{if(!this.source||!this.target||!this.position)return;t.preventDefault();const e=this.itemId(this.source),i=this.itemId(this.target);if(e&&i){const t=this.itemMetadata(this.source),s=this.itemMetadata(this.target);r(this.host,"reorder",{sourceId:e,targetId:i,position:this.position,sourceType:t.type,targetType:s.type,sourceScope:t.scope,targetScope:s.scope,trigger:"pointer"})}this.finishDrag()};onDragEnd=()=>{this.finishDrag()};visibleItems(){return Array.from(this.host.querySelectorAll("ui-tree-item")).filter((t=>t.getClientRects().length>0&&!t.hasAttribute("disabled")))}onKeyDown=t=>{const e=this.itemFromEvent(t);if(!e)return;const i=this.visibleItems(),s=i.indexOf(e);if(s<0)return;const r="ArrowDown"===t.key?i[s+1]:"ArrowUp"===t.key?i[s-1]:null;r&&(t.preventDefault(),r.focus())};render(){return i(s,{key:"5761d2840d2694340a4b937d46522f15f81973ac",role:"tree","aria-label":this.label||"Tree"},i("slot",{key:"08e5a7b489eed4f4eae9de6462104fd12defd336"}))}};n.style=":host{--ui-tree-indent:16px;display:block;min-inline-size:0;padding-inline-start:var(--ui-tree-gutter, 22px)}::slotted(ui-tree-item){--ui-tree-indent:inherit}";export{n as ui_tree}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import{r as a,g as t,h as e,H as i}from"./p-CEeiinfk.js";import{d as r,e as d}from"./p-JwSoedEO.js";
|
|
2
|
+
/**
|
|
3
|
+
* @license lucide v0.554.0 - ISC
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the ISC license.
|
|
6
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/const o={"align-center":[["path",{d:"M21 5H3"}],["path",{d:"M17 12H7"}],["path",{d:"M19 19H5"}]],"align-left":[["path",{d:"M21 5H3"}],["path",{d:"M15 12H3"}],["path",{d:"M17 19H3"}]],"align-right":[["path",{d:"M21 5H3"}],["path",{d:"M21 12H9"}],["path",{d:"M21 19H7"}]],bold:[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8"}]],braces:[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1"}]],"chevron-down":[["path",{d:"m6 9 6 6 6-6"}]],"chevron-left":[["path",{d:"m15 18-6-6 6-6"}]],"code-xml":[["path",{d:"m18 16 4-4-4-4"}],["path",{d:"m6 8-4 4 4 4"}],["path",{d:"m14.5 4-5 16"}]],columns:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}],["path",{d:"M9 3v18"}],["path",{d:"M15 3v18"}]],ellipsis:[["circle",{cx:"12",cy:"12",r:"1"}],["circle",{cx:"19",cy:"12",r:"1"}],["circle",{cx:"5",cy:"12",r:"1"}]],eraser:[["path",{d:"M21 21H8a2 2 0 0 1-1.42-.587l-3.994-3.999a2 2 0 0 1 0-2.828l10-10a2 2 0 0 1 2.829 0l5.999 6a2 2 0 0 1 0 2.828L12.834 21"}],["path",{d:"m5.082 11.09 8.828 8.828"}]],"grip-horizontal":[["circle",{cx:"12",cy:"9",r:"1"}],["circle",{cx:"19",cy:"9",r:"1"}],["circle",{cx:"5",cy:"9",r:"1"}],["circle",{cx:"12",cy:"15",r:"1"}],["circle",{cx:"19",cy:"15",r:"1"}],["circle",{cx:"5",cy:"15",r:"1"}]],"grip-vertical":[["circle",{cx:"9",cy:"12",r:"1"}],["circle",{cx:"9",cy:"5",r:"1"}],["circle",{cx:"9",cy:"19",r:"1"}],["circle",{cx:"15",cy:"12",r:"1"}],["circle",{cx:"15",cy:"5",r:"1"}],["circle",{cx:"15",cy:"19",r:"1"}]],"heading-1":[["path",{d:"M4 12h8"}],["path",{d:"M4 18V6"}],["path",{d:"M12 18V6"}],["path",{d:"m17 12 3-2v8"}]],"heading-2":[["path",{d:"M4 12h8"}],["path",{d:"M4 18V6"}],["path",{d:"M12 18V6"}],["path",{d:"M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1"}]],"heading-3":[["path",{d:"M4 12h8"}],["path",{d:"M4 18V6"}],["path",{d:"M12 18V6"}],["path",{d:"M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2"}],["path",{d:"M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2"}]],highlighter:[["path",{d:"m9 11-6 6v3h9l3-3"}],["path",{d:"m22 12-4.6 4.6a2 2 0 0 1-2.8 0l-5.2-5.2a2 2 0 0 1 0-2.8L14 4"}]],image:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2"}],["circle",{cx:"9",cy:"9",r:"2"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"}]],italic:[["line",{x1:"19",x2:"10",y1:"4",y2:"4"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20"}]],list:[["path",{d:"M3 5h.01"}],["path",{d:"M3 12h.01"}],["path",{d:"M3 19h.01"}],["path",{d:"M8 5h13"}],["path",{d:"M8 12h13"}],["path",{d:"M8 19h13"}]],"list-ordered":[["path",{d:"M11 5h10"}],["path",{d:"M11 12h10"}],["path",{d:"M11 19h10"}],["path",{d:"M4 4h1v5"}],["path",{d:"M4 9h2"}],["path",{d:"M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02"}]],"list-todo":[["path",{d:"M13 5h8"}],["path",{d:"M13 12h8"}],["path",{d:"M13 19h8"}],["path",{d:"m3 17 2 2 4-4"}],["rect",{x:"3",y:"4",width:"6",height:"6",rx:"1"}]],merge:[["path",{d:"m8 6 4-4 4 4"}],["path",{d:"M12 2v10.3a4 4 0 0 1-1.172 2.872L4 22"}],["path",{d:"m20 22-5-5"}]],minus:[["path",{d:"M5 12h14"}]],"paint-bucket":[["path",{d:"m19 11-8-8-8.6 8.6a2 2 0 0 0 0 2.8l5.2 5.2c.8.8 2 .8 2.8 0L19 11Z"}],["path",{d:"m5 2 5 5"}],["path",{d:"M2 13h15"}],["path",{d:"M22 20a2 2 0 1 1-4 0c0-1.6 1.7-2.4 2-4 .3 1.6 2 2.4 2 4Z"}]],"panel-bottom":[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}],["path",{d:"M3 15h18"}]],"panel-left":[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}],["path",{d:"M9 3v18"}]],"panel-right":[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}],["path",{d:"M15 3v18"}]],"panel-top":[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}],["path",{d:"M3 9h18"}]],pilcrow:[["path",{d:"M13 4v16"}],["path",{d:"M17 4v16"}],["path",{d:"M19 4H9.5a4.5 4.5 0 0 0 0 9H13"}]],plus:[["path",{d:"M5 12h14"}],["path",{d:"M12 5v14"}]],quote:[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z"}]],redo:[["path",{d:"m15 14 5-5-5-5"}],["path",{d:"M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13"}]],rows:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}],["path",{d:"M21 9H3"}],["path",{d:"M21 15H3"}]],split:[["path",{d:"M16 3h5v5"}],["path",{d:"M8 3H3v5"}],["path",{d:"M12 22v-8.3a4 4 0 0 0-1.172-2.872L3 3"}],["path",{d:"m15 9 6-6"}]],strikethrough:[["path",{d:"M16 4H9a3 3 0 0 0-2.83 4"}],["path",{d:"M14 12a4 4 0 0 1 0 8H6"}],["line",{x1:"4",x2:"20",y1:"12",y2:"12"}]],table:[["path",{d:"M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18"}]],trash:[["path",{d:"M10 11v6"}],["path",{d:"M14 11v6"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"}],["path",{d:"M3 6h18"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"}]],underline:[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20"}]],undo:[["path",{d:"M9 14 4 9l5-5"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11"}]]};
|
|
8
|
+
/**
|
|
9
|
+
* @license lucide v0.554.0 - ISC
|
|
10
|
+
*
|
|
11
|
+
* This source code is licensed under the ISC license.
|
|
12
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
13
|
+
*/function n(a){return String(a).replaceAll("&","&").replaceAll('"',""")}function s(a){const[t,e]=a;return`<${t}${function(a){return Object.entries(a).map((([a,t])=>` ${a}="${n(t)}"`)).join("")}(e)}></${t}>`}function c(a,t="looma-icon"){return[`<svg class="${n(t)}" data-looma-icon="${a}" aria-hidden="true" focusable="false"`,' viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"',' stroke-linecap="round" stroke-linejoin="round">',o[a].map(s).join(""),"</svg>"].join("")}const h=class{constructor(t){a(this,t)}get host(){return t(this)}itemId="";label="";depth=1;container=!1;sortable=!1;dragType="item";dropScope="";accepts="";expanded=!1;defaultExpanded=!1;selected=!1;disabled=!1;internalExpanded=!1;syncExpandedFromProp(){this.internalExpanded=this.expanded}componentWillLoad(){this.internalExpanded=this.expanded||this.defaultExpanded}componentDidLoad(){this.host.addEventListener("ui-tree-auto-expand",this.onAutoExpand)}disconnectedCallback(){this.host.removeEventListener("ui-tree-auto-expand",this.onAutoExpand)}setExpanded(a,t){this.container&&!this.disabled&&this.internalExpanded!==a&&(this.internalExpanded=a,r(this.host,"expand",{id:this.itemId,expanded:a,trigger:t}))}onAutoExpand=()=>{this.setExpanded(!0,"pointer")};onDisclosureClick=a=>{a.stopPropagation(),this.setExpanded(!this.internalExpanded,d(a))};onDisclosureKeydown=a=>{"ArrowRight"!==a.key&&"ArrowLeft"!==a.key||(a.preventDefault(),a.stopPropagation(),this.setExpanded("ArrowRight"===a.key,"keyboard"))};onRowClick=a=>{this.container&&!this.disabled&&(a.composedPath().some((a=>a instanceof HTMLElement&&(a.matches('a, button, input, select, textarea, [role="button"], [role="link"]')||"actions"===a.getAttribute("slot"))))||this.setExpanded(!this.internalExpanded,d(a)))};render(){const a=Math.max(1,Math.floor(this.depth)),t=`${this.internalExpanded?"Collapse":"Expand"} ${this.label||"item"}`,r=`Drag ${this.label||"item"} to reorder`;return e(i,{key:"ea8ed538aa3883c87257a25614a066965364693f",role:"treeitem","aria-level":String(a),"aria-expanded":this.container?String(this.internalExpanded):void 0,"aria-selected":String(this.selected),"aria-disabled":this.disabled?"true":void 0,"data-container":this.container?"":void 0,"data-selected":this.selected?"":void 0,"data-disabled":this.disabled?"":void 0,"data-drag-type":this.dragType||"item","data-drop-scope":this.dropScope||void 0,"data-accepts":this.accepts||void 0,tabIndex:this.disabled?-1:0,style:{"--ui-tree-item-depth":String(a-1),"margin-inline-start":a>1?"var(--ui-tree-indent, 16px)":"0px"}},e("div",{key:"740b93aa47e65d8a1cb899d4b9c966d9ad1d456f",class:"row",part:"row",onClick:this.onRowClick},this.sortable&&!this.disabled?e("button",{class:"drag-handle",part:"drag-handle",type:"button",draggable:!0,"aria-label":r,title:r},e("span",{innerHTML:c("grip-vertical")})):null,this.container?e("button",{class:"disclosure",part:"disclosure",type:"button","aria-label":t,"aria-expanded":String(this.internalExpanded),disabled:this.disabled,onClick:this.onDisclosureClick,onKeyDown:this.onDisclosureKeydown},e("span",{class:{"disclosure-icon":!0,"disclosure-icon--expanded":this.internalExpanded},innerHTML:c("chevron-down")})):e("span",{class:"disclosure-spacer","aria-hidden":"true"}),e("span",{key:"37e1b7f1cdddf623734becef465ffde83d8b86f2",class:"leading",part:"leading"},e("slot",{key:"0ab3a60c98628f009918d0d720772154912d2709",name:"leading"})),e("span",{key:"defdd343f25a0f4354110e981f3889e1d09c27ee",class:"label",part:"label"},e("slot",{key:"bde46ccacc1a620348062fc300503c4f1736316b"})),e("span",{key:"caff9ada38c41be90aeb6e331f4c54a51f31d26c",class:"actions",part:"actions"},e("slot",{key:"e11704d6871445c91eaa29c99302d8b751be69d3",name:"actions"})),e("span",{key:"7e40559d6c5ba56710bc705083ad2ede3046e0b1",class:"drop-indicator",part:"drop-indicator","aria-hidden":"true"})),this.container?e("div",{class:"children",part:"children",role:"group",hidden:!this.internalExpanded},e("slot",{name:"children"})):null)}static get watchers(){return{expanded:[{syncExpandedFromProp:0}]}}};h.style=":host{--ui-tree-indent:16px;--ui-tree-row-min-height:44px;--ui-tree-drop-color:var(--ui-accent-solid);position:relative;display:block;min-inline-size:0;margin-inline-start:calc(var(--ui-tree-item-depth, 0) * var(--ui-tree-indent))}.row{position:relative;display:grid;grid-template-columns:20px auto minmax(0, 1fr) auto;align-items:center;min-block-size:var(--ui-tree-row-min-height);min-inline-size:0;border-radius:var(--ui-radius-md);color:var(--ui-text-secondary);transition:background-color var(--ui-motion-fast) var(--ui-motion-ease), color var(--ui-motion-fast) var(--ui-motion-ease), opacity var(--ui-motion-fast) var(--ui-motion-ease), box-shadow var(--ui-motion-fast) var(--ui-motion-ease)}.row:hover,:host([data-selected]) .row,.row:focus-within{color:var(--ui-text-primary);background:var(--ui-surface-muted)}:host([data-disabled]) .row{opacity:0.55}:host([data-dragging]) .row{opacity:0.42}:host(:focus){outline:none}:host(:focus-visible) .row{box-shadow:0 0 0 2px var(--ui-focus-ring)}:host([data-drop-position='inside']) .row{background:var(--ui-accent-subtle);box-shadow:inset 0 0 0 1px var(--ui-tree-drop-color)}.disclosure,.disclosure-spacer{grid-column:1;grid-row:1;inline-size:20px;block-size:28px}.disclosure{display:grid;place-items:center;padding:0;color:var(--ui-text-muted);background:transparent;border:0;border-radius:var(--ui-radius-sm);cursor:pointer}.disclosure:hover{color:var(--ui-text-primary);background:var(--ui-surface-elevated)}.disclosure-icon{display:block;inline-size:14px;block-size:14px;transform:rotate(-90deg);transition:transform var(--ui-motion-fast) var(--ui-motion-ease)}.disclosure-icon--expanded{transform:rotate(0deg)}.disclosure-icon :is(svg),.drag-handle :is(svg){display:block;inline-size:100%;block-size:100%}.leading{display:none}.leading:has(*){display:inline-grid;place-items:center;grid-column:2;grid-row:1;inline-size:16px;block-size:16px;margin-inline-start:var(--ui-space-1)}.label{grid-column:3;grid-row:1;min-inline-size:0;padding:var(--ui-space-1) var(--ui-space-2)}.actions{grid-column:4;grid-row:1;display:inline-flex;align-items:center;min-inline-size:0}.drag-handle{position:absolute;z-index:2;inset-block-start:50%;inset-inline-start:-22px;inline-size:20px;block-size:32px;display:grid;place-items:center;padding:7px 3px;color:var(--ui-text-muted);background:var(--ui-surface-elevated);border:1px solid transparent;border-radius:var(--ui-radius-sm);cursor:grab;opacity:0;pointer-events:none;transform:translateY(-50%);transition:opacity var(--ui-motion-fast) var(--ui-motion-ease)}.row:hover .drag-handle,.drag-handle:focus-visible,:host([data-dragging]) .drag-handle{opacity:1;pointer-events:auto}.drag-handle:active{cursor:grabbing}.drop-indicator{position:absolute;z-index:3;inset-inline:1px;display:none;block-size:2px;border-radius:999px;background:var(--ui-tree-drop-color);pointer-events:none}.drop-indicator::before,.drop-indicator::after{content:'';position:absolute;inset-block-start:50%;inline-size:7px;block-size:7px;border:2px solid var(--ui-tree-drop-color);border-radius:999px;background:var(--ui-surface-elevated);transform:translateY(-50%)}.drop-indicator::before{inset-inline-start:-1px}.drop-indicator::after{inset-inline-end:-1px}:host([data-drop-position='before']) .drop-indicator{display:block;inset-block-start:-1px}:host([data-drop-position='after']) .drop-indicator{display:block;inset-block-end:-1px}.children[hidden]{display:none}@media (hover: none), (pointer: coarse){.drag-handle{display:none}}@media (prefers-reduced-motion: reduce){.row,.disclosure-icon,.drag-handle{transition:none}}";export{h as ui_tree_item}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export declare class UITree {
|
|
2
|
+
host: HTMLElement;
|
|
3
|
+
label: string;
|
|
4
|
+
hoverExpandDelay: number;
|
|
5
|
+
private source;
|
|
6
|
+
private target;
|
|
7
|
+
private position;
|
|
8
|
+
private hoverIntent;
|
|
9
|
+
componentDidLoad(): void;
|
|
10
|
+
disconnectedCallback(): void;
|
|
11
|
+
private itemFromEvent;
|
|
12
|
+
private itemId;
|
|
13
|
+
private rowFor;
|
|
14
|
+
private acceptsChildren;
|
|
15
|
+
private itemMetadata;
|
|
16
|
+
private permitsDrop;
|
|
17
|
+
private clearTarget;
|
|
18
|
+
private finishDrag;
|
|
19
|
+
private expandTarget;
|
|
20
|
+
private onDragStart;
|
|
21
|
+
private onDragOver;
|
|
22
|
+
private onDragLeave;
|
|
23
|
+
private onDrop;
|
|
24
|
+
private onDragEnd;
|
|
25
|
+
private visibleItems;
|
|
26
|
+
private onKeyDown;
|
|
27
|
+
render(): any;
|
|
28
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export declare class UITreeItem {
|
|
2
|
+
host: HTMLElement;
|
|
3
|
+
/** Stable application identifier emitted by tree interaction events. */
|
|
4
|
+
itemId: string;
|
|
5
|
+
/** Accessible name used by the disclosure and drag handle. */
|
|
6
|
+
label: string;
|
|
7
|
+
/** One-based visual and semantic nesting level. */
|
|
8
|
+
depth: number;
|
|
9
|
+
/** Whether this item accepts children and exposes disclosure behavior. */
|
|
10
|
+
container: boolean;
|
|
11
|
+
/** Whether this item participates in pointer drag and drop. */
|
|
12
|
+
sortable: boolean;
|
|
13
|
+
/** Application-defined kind used to reject incompatible sibling drops. */
|
|
14
|
+
dragType: string;
|
|
15
|
+
/** Application-defined parent/list identity included with reorder events. */
|
|
16
|
+
dropScope: string;
|
|
17
|
+
/** Comma-separated drag kinds accepted as children. Empty accepts every kind. */
|
|
18
|
+
accepts: string;
|
|
19
|
+
/** Initial controlled expansion value. */
|
|
20
|
+
expanded: boolean;
|
|
21
|
+
/** Initial uncontrolled expansion value. */
|
|
22
|
+
defaultExpanded: boolean;
|
|
23
|
+
selected: boolean;
|
|
24
|
+
disabled: boolean;
|
|
25
|
+
internalExpanded: boolean;
|
|
26
|
+
syncExpandedFromProp(): void;
|
|
27
|
+
componentWillLoad(): void;
|
|
28
|
+
componentDidLoad(): void;
|
|
29
|
+
disconnectedCallback(): void;
|
|
30
|
+
private setExpanded;
|
|
31
|
+
private onAutoExpand;
|
|
32
|
+
private onDisclosureClick;
|
|
33
|
+
private onDisclosureKeydown;
|
|
34
|
+
private onRowClick;
|
|
35
|
+
render(): any;
|
|
36
|
+
}
|
|
@@ -403,6 +403,76 @@ export namespace Components {
|
|
|
403
403
|
}
|
|
404
404
|
interface UiTopBar {
|
|
405
405
|
}
|
|
406
|
+
interface UiTree {
|
|
407
|
+
/**
|
|
408
|
+
* @default 700
|
|
409
|
+
*/
|
|
410
|
+
"hoverExpandDelay": number;
|
|
411
|
+
/**
|
|
412
|
+
* @default 'Tree'
|
|
413
|
+
*/
|
|
414
|
+
"label": string;
|
|
415
|
+
}
|
|
416
|
+
interface UiTreeItem {
|
|
417
|
+
/**
|
|
418
|
+
* Comma-separated drag kinds accepted as children. Empty accepts every kind.
|
|
419
|
+
* @default ''
|
|
420
|
+
*/
|
|
421
|
+
"accepts": string;
|
|
422
|
+
/**
|
|
423
|
+
* Whether this item accepts children and exposes disclosure behavior.
|
|
424
|
+
* @default false
|
|
425
|
+
*/
|
|
426
|
+
"container": boolean;
|
|
427
|
+
/**
|
|
428
|
+
* Initial uncontrolled expansion value.
|
|
429
|
+
* @default false
|
|
430
|
+
*/
|
|
431
|
+
"defaultExpanded": boolean;
|
|
432
|
+
/**
|
|
433
|
+
* One-based visual and semantic nesting level.
|
|
434
|
+
* @default 1
|
|
435
|
+
*/
|
|
436
|
+
"depth": number;
|
|
437
|
+
/**
|
|
438
|
+
* @default false
|
|
439
|
+
*/
|
|
440
|
+
"disabled": boolean;
|
|
441
|
+
/**
|
|
442
|
+
* Application-defined kind used to reject incompatible sibling drops.
|
|
443
|
+
* @default 'item'
|
|
444
|
+
*/
|
|
445
|
+
"dragType": string;
|
|
446
|
+
/**
|
|
447
|
+
* Application-defined parent/list identity included with reorder events.
|
|
448
|
+
* @default ''
|
|
449
|
+
*/
|
|
450
|
+
"dropScope": string;
|
|
451
|
+
/**
|
|
452
|
+
* Initial controlled expansion value.
|
|
453
|
+
* @default false
|
|
454
|
+
*/
|
|
455
|
+
"expanded": boolean;
|
|
456
|
+
/**
|
|
457
|
+
* Stable application identifier emitted by tree interaction events.
|
|
458
|
+
* @default ''
|
|
459
|
+
*/
|
|
460
|
+
"itemId": string;
|
|
461
|
+
/**
|
|
462
|
+
* Accessible name used by the disclosure and drag handle.
|
|
463
|
+
* @default ''
|
|
464
|
+
*/
|
|
465
|
+
"label": string;
|
|
466
|
+
/**
|
|
467
|
+
* @default false
|
|
468
|
+
*/
|
|
469
|
+
"selected": boolean;
|
|
470
|
+
/**
|
|
471
|
+
* Whether this item participates in pointer drag and drop.
|
|
472
|
+
* @default false
|
|
473
|
+
*/
|
|
474
|
+
"sortable": boolean;
|
|
475
|
+
}
|
|
406
476
|
}
|
|
407
477
|
declare global {
|
|
408
478
|
interface HTMLUiAffordanceScopeElement extends Components.UiAffordanceScope, HTMLStencilElement {
|
|
@@ -567,6 +637,18 @@ declare global {
|
|
|
567
637
|
prototype: HTMLUiTopBarElement;
|
|
568
638
|
new (): HTMLUiTopBarElement;
|
|
569
639
|
};
|
|
640
|
+
interface HTMLUiTreeElement extends Components.UiTree, HTMLStencilElement {
|
|
641
|
+
}
|
|
642
|
+
var HTMLUiTreeElement: {
|
|
643
|
+
prototype: HTMLUiTreeElement;
|
|
644
|
+
new (): HTMLUiTreeElement;
|
|
645
|
+
};
|
|
646
|
+
interface HTMLUiTreeItemElement extends Components.UiTreeItem, HTMLStencilElement {
|
|
647
|
+
}
|
|
648
|
+
var HTMLUiTreeItemElement: {
|
|
649
|
+
prototype: HTMLUiTreeItemElement;
|
|
650
|
+
new (): HTMLUiTreeItemElement;
|
|
651
|
+
};
|
|
570
652
|
interface HTMLElementTagNameMap {
|
|
571
653
|
"ui-affordance-scope": HTMLUiAffordanceScopeElement;
|
|
572
654
|
"ui-avatar": HTMLUiAvatarElement;
|
|
@@ -595,6 +677,8 @@ declare global {
|
|
|
595
677
|
"ui-toast-region": HTMLUiToastRegionElement;
|
|
596
678
|
"ui-tooltip": HTMLUiTooltipElement;
|
|
597
679
|
"ui-top-bar": HTMLUiTopBarElement;
|
|
680
|
+
"ui-tree": HTMLUiTreeElement;
|
|
681
|
+
"ui-tree-item": HTMLUiTreeItemElement;
|
|
598
682
|
}
|
|
599
683
|
}
|
|
600
684
|
declare namespace LocalJSX {
|
|
@@ -995,6 +1079,76 @@ declare namespace LocalJSX {
|
|
|
995
1079
|
}
|
|
996
1080
|
interface UiTopBar {
|
|
997
1081
|
}
|
|
1082
|
+
interface UiTree {
|
|
1083
|
+
/**
|
|
1084
|
+
* @default 700
|
|
1085
|
+
*/
|
|
1086
|
+
"hoverExpandDelay"?: number;
|
|
1087
|
+
/**
|
|
1088
|
+
* @default 'Tree'
|
|
1089
|
+
*/
|
|
1090
|
+
"label"?: string;
|
|
1091
|
+
}
|
|
1092
|
+
interface UiTreeItem {
|
|
1093
|
+
/**
|
|
1094
|
+
* Comma-separated drag kinds accepted as children. Empty accepts every kind.
|
|
1095
|
+
* @default ''
|
|
1096
|
+
*/
|
|
1097
|
+
"accepts"?: string;
|
|
1098
|
+
/**
|
|
1099
|
+
* Whether this item accepts children and exposes disclosure behavior.
|
|
1100
|
+
* @default false
|
|
1101
|
+
*/
|
|
1102
|
+
"container"?: boolean;
|
|
1103
|
+
/**
|
|
1104
|
+
* Initial uncontrolled expansion value.
|
|
1105
|
+
* @default false
|
|
1106
|
+
*/
|
|
1107
|
+
"defaultExpanded"?: boolean;
|
|
1108
|
+
/**
|
|
1109
|
+
* One-based visual and semantic nesting level.
|
|
1110
|
+
* @default 1
|
|
1111
|
+
*/
|
|
1112
|
+
"depth"?: number;
|
|
1113
|
+
/**
|
|
1114
|
+
* @default false
|
|
1115
|
+
*/
|
|
1116
|
+
"disabled"?: boolean;
|
|
1117
|
+
/**
|
|
1118
|
+
* Application-defined kind used to reject incompatible sibling drops.
|
|
1119
|
+
* @default 'item'
|
|
1120
|
+
*/
|
|
1121
|
+
"dragType"?: string;
|
|
1122
|
+
/**
|
|
1123
|
+
* Application-defined parent/list identity included with reorder events.
|
|
1124
|
+
* @default ''
|
|
1125
|
+
*/
|
|
1126
|
+
"dropScope"?: string;
|
|
1127
|
+
/**
|
|
1128
|
+
* Initial controlled expansion value.
|
|
1129
|
+
* @default false
|
|
1130
|
+
*/
|
|
1131
|
+
"expanded"?: boolean;
|
|
1132
|
+
/**
|
|
1133
|
+
* Stable application identifier emitted by tree interaction events.
|
|
1134
|
+
* @default ''
|
|
1135
|
+
*/
|
|
1136
|
+
"itemId"?: string;
|
|
1137
|
+
/**
|
|
1138
|
+
* Accessible name used by the disclosure and drag handle.
|
|
1139
|
+
* @default ''
|
|
1140
|
+
*/
|
|
1141
|
+
"label"?: string;
|
|
1142
|
+
/**
|
|
1143
|
+
* @default false
|
|
1144
|
+
*/
|
|
1145
|
+
"selected"?: boolean;
|
|
1146
|
+
/**
|
|
1147
|
+
* Whether this item participates in pointer drag and drop.
|
|
1148
|
+
* @default false
|
|
1149
|
+
*/
|
|
1150
|
+
"sortable"?: boolean;
|
|
1151
|
+
}
|
|
998
1152
|
|
|
999
1153
|
interface UiAffordanceScopeAttributes {
|
|
1000
1154
|
"nearRadius": number;
|
|
@@ -1133,6 +1287,24 @@ declare namespace LocalJSX {
|
|
|
1133
1287
|
"open": boolean;
|
|
1134
1288
|
"defaultOpen": boolean;
|
|
1135
1289
|
}
|
|
1290
|
+
interface UiTreeAttributes {
|
|
1291
|
+
"label": string;
|
|
1292
|
+
"hoverExpandDelay": number;
|
|
1293
|
+
}
|
|
1294
|
+
interface UiTreeItemAttributes {
|
|
1295
|
+
"itemId": string;
|
|
1296
|
+
"label": string;
|
|
1297
|
+
"depth": number;
|
|
1298
|
+
"container": boolean;
|
|
1299
|
+
"sortable": boolean;
|
|
1300
|
+
"dragType": string;
|
|
1301
|
+
"dropScope": string;
|
|
1302
|
+
"accepts": string;
|
|
1303
|
+
"expanded": boolean;
|
|
1304
|
+
"defaultExpanded": boolean;
|
|
1305
|
+
"selected": boolean;
|
|
1306
|
+
"disabled": boolean;
|
|
1307
|
+
}
|
|
1136
1308
|
|
|
1137
1309
|
interface IntrinsicElements {
|
|
1138
1310
|
"ui-affordance-scope": Omit<UiAffordanceScope, keyof UiAffordanceScopeAttributes> & { [K in keyof UiAffordanceScope & keyof UiAffordanceScopeAttributes]?: UiAffordanceScope[K] } & { [K in keyof UiAffordanceScope & keyof UiAffordanceScopeAttributes as `attr:${K}`]?: UiAffordanceScopeAttributes[K] } & { [K in keyof UiAffordanceScope & keyof UiAffordanceScopeAttributes as `prop:${K}`]?: UiAffordanceScope[K] };
|
|
@@ -1162,6 +1334,8 @@ declare namespace LocalJSX {
|
|
|
1162
1334
|
"ui-toast-region": Omit<UiToastRegion, keyof UiToastRegionAttributes> & { [K in keyof UiToastRegion & keyof UiToastRegionAttributes]?: UiToastRegion[K] } & { [K in keyof UiToastRegion & keyof UiToastRegionAttributes as `attr:${K}`]?: UiToastRegionAttributes[K] } & { [K in keyof UiToastRegion & keyof UiToastRegionAttributes as `prop:${K}`]?: UiToastRegion[K] };
|
|
1163
1335
|
"ui-tooltip": Omit<UiTooltip, keyof UiTooltipAttributes> & { [K in keyof UiTooltip & keyof UiTooltipAttributes]?: UiTooltip[K] } & { [K in keyof UiTooltip & keyof UiTooltipAttributes as `attr:${K}`]?: UiTooltipAttributes[K] } & { [K in keyof UiTooltip & keyof UiTooltipAttributes as `prop:${K}`]?: UiTooltip[K] };
|
|
1164
1336
|
"ui-top-bar": UiTopBar;
|
|
1337
|
+
"ui-tree": Omit<UiTree, keyof UiTreeAttributes> & { [K in keyof UiTree & keyof UiTreeAttributes]?: UiTree[K] } & { [K in keyof UiTree & keyof UiTreeAttributes as `attr:${K}`]?: UiTreeAttributes[K] } & { [K in keyof UiTree & keyof UiTreeAttributes as `prop:${K}`]?: UiTree[K] };
|
|
1338
|
+
"ui-tree-item": Omit<UiTreeItem, keyof UiTreeItemAttributes> & { [K in keyof UiTreeItem & keyof UiTreeItemAttributes]?: UiTreeItem[K] } & { [K in keyof UiTreeItem & keyof UiTreeItemAttributes as `attr:${K}`]?: UiTreeItemAttributes[K] } & { [K in keyof UiTreeItem & keyof UiTreeItemAttributes as `prop:${K}`]?: UiTreeItem[K] };
|
|
1165
1339
|
}
|
|
1166
1340
|
}
|
|
1167
1341
|
export { LocalJSX as JSX };
|
|
@@ -1195,6 +1369,8 @@ declare module "@stencil/core" {
|
|
|
1195
1369
|
"ui-toast-region": LocalJSX.IntrinsicElements["ui-toast-region"] & JSXBase.HTMLAttributes<HTMLUiToastRegionElement>;
|
|
1196
1370
|
"ui-tooltip": LocalJSX.IntrinsicElements["ui-tooltip"] & JSXBase.HTMLAttributes<HTMLUiTooltipElement>;
|
|
1197
1371
|
"ui-top-bar": LocalJSX.IntrinsicElements["ui-top-bar"] & JSXBase.HTMLAttributes<HTMLUiTopBarElement>;
|
|
1372
|
+
"ui-tree": LocalJSX.IntrinsicElements["ui-tree"] & JSXBase.HTMLAttributes<HTMLUiTreeElement>;
|
|
1373
|
+
"ui-tree-item": LocalJSX.IntrinsicElements["ui-tree-item"] & JSXBase.HTMLAttributes<HTMLUiTreeItemElement>;
|
|
1198
1374
|
}
|
|
1199
1375
|
}
|
|
1200
1376
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type DropPosition = 'before' | 'inside' | 'after';
|
|
2
|
+
export interface HoverIntentController {
|
|
3
|
+
schedule(key: string): void;
|
|
4
|
+
cancel(): void;
|
|
5
|
+
destroy(): void;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Classify the pointer against stable edge bands. Containers reserve their
|
|
9
|
+
* middle half for containment; leaf rows split cleanly at their midpoint.
|
|
10
|
+
*/
|
|
11
|
+
export declare function classifyDropPosition(rect: Pick<DOMRect, 'top' | 'bottom' | 'height'>, clientY: number, acceptsChildren: boolean): DropPosition;
|
|
12
|
+
/** Use the rendered row—not the tiny handle—as the browser drag preview. */
|
|
13
|
+
export declare function setElementDragImage(dataTransfer: DataTransfer | null, element: HTMLElement): void;
|
|
14
|
+
/** A keyed, replaceable hover timer suitable for expansion and disclosure intent. */
|
|
15
|
+
export declare function createHoverIntent(delay: number, onIntent: (key: string) => void): HoverIntentController;
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
getElement,
|
|
4
4
|
h,
|
|
5
5
|
registerInstance
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-SVINNT3E.js";
|
|
7
7
|
|
|
8
8
|
// dist/esm/ui-avatar-group.entry.js
|
|
9
9
|
var uiAvatarGroupCss = () => `:host{display:flex;align-items:center;flex-direction:row-reverse;gap:0}::slotted(*:not([data-ui-avatar-group-overflow])){margin-inline-end:-0.5rem;flex-shrink:0}::slotted(*:last-of-type:not([data-ui-avatar-group-overflow])){margin-inline-end:0}.overflow{margin-inline-end:-0.5rem;display:inline-flex;align-items:center;justify-content:center;inline-size:2.5rem;block-size:2.5rem;border-radius:999px;border:1px solid var(--ui-border-default);background:var(--ui-surface-muted);color:var(--ui-text-secondary);font:inherit;font-size:0.75rem;font-weight:600;flex-shrink:0}`;
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
Host,
|
|
3
3
|
h,
|
|
4
4
|
registerInstance
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-SVINNT3E.js";
|
|
6
6
|
|
|
7
7
|
// dist/esm/ui-badge.entry.js
|
|
8
8
|
var uiBadgeCss = () => `:host{display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--ui-border-default);border-radius:999px;background:var(--ui-surface-muted);color:var(--ui-text-secondary);font:inherit;font-size:0.75rem;line-height:1;padding:0.25em 0.6em;white-space:nowrap}:host([data-tone='accent']){background:var(--ui-accent-solid);border-color:var(--ui-accent-solid);color:var(--ui-text-on-accent)}:host([data-tone='danger']){background:var(--ui-danger-solid);border-color:var(--ui-danger-solid);color:var(--ui-text-on-accent)}:host([data-tone='success']){background:var(--ui-success-solid);border-color:var(--ui-success-solid);color:var(--ui-text-on-accent)}:host([data-tone='warning']){background:var(--ui-warning-solid);border-color:var(--ui-warning-solid);color:var(--ui-text-primary)}:host([data-tone='info']){background:var(--ui-info-solid);border-color:var(--ui-info-solid);color:var(--ui-text-on-accent)}:host([data-variant='subtle'][data-tone='accent']){background:var(--ui-accent-soft);border-color:var(--ui-accent-soft);color:var(--ui-accent-solid)}:host([data-variant='subtle'][data-tone='danger']){background:var(--ui-danger-soft);border-color:var(--ui-danger-soft);color:var(--ui-danger-solid)}:host([data-variant='subtle'][data-tone='success']){background:var(--ui-success-soft);border-color:var(--ui-success-soft);color:var(--ui-success-solid)}:host([data-variant='subtle'][data-tone='warning']){background:var(--ui-warning-soft);border-color:var(--ui-warning-soft);color:var(--ui-warning-solid)}:host([data-variant='subtle'][data-tone='info']){background:var(--ui-info-soft);border-color:var(--ui-info-soft);color:var(--ui-info-solid)}`;
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
getElement,
|
|
7
7
|
h,
|
|
8
8
|
registerInstance
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-SVINNT3E.js";
|
|
10
10
|
|
|
11
11
|
// dist/esm/ui-button.entry.js
|
|
12
12
|
var uiButtonCss = () => `:host{display:inline-flex;vertical-align:middle;color:var(--ui-text-primary)}:host([variant='outline'])::slotted(button),::slotted(button){appearance:none;border:1px solid var(--ui-border-default);border-radius:var(--ui-button-radius, var(--ui-radius-2));background:var(--ui-surface-default);color:inherit;font:inherit;font-weight:var(--ui-font-medium, 500);line-height:var(--ui-line-height-tight);padding:var(--ui-space-2) var(--ui-space-3);cursor:pointer;transition:background-color var(--ui-motion-fast) var(--ui-motion-ease), border-color var(--ui-motion-fast) var(--ui-motion-ease), color var(--ui-motion-fast) var(--ui-motion-ease), box-shadow var(--ui-motion-fast) var(--ui-motion-ease), transform var(--ui-motion-fast) var(--ui-motion-ease);margin:0}:host([data-size='sm'])::slotted(button){padding:var(--ui-space-1) var(--ui-space-2);font-size:0.875rem}:host([data-size='lg'])::slotted(button){padding:var(--ui-space-3) var(--ui-space-4);font-size:1rem}::slotted(button:hover:enabled){background:var(--ui-surface-muted);border-color:var(--ui-border-strong)}::slotted(button:active:enabled){background:var(--ui-surface-subtle)}:host([variant='solid'])::slotted(button){border-color:var(--ui-accent-solid);background:var(--ui-accent-solid);color:var(--ui-text-on-accent);box-shadow:var(--ui-button-solid-shadow, inset 0 1px rgb(255 255 255 / 0.16), var(--ui-shadow-xs))}:host([variant='solid'])::slotted(button:hover:enabled){background:var(--ui-accent-hover);border-color:var(--ui-accent-hover);box-shadow:var(--ui-shadow-sm);transform:translateY(-1px)}:host([variant='solid'])::slotted(button:active:enabled){background:var(--ui-accent-active);border-color:var(--ui-accent-active);box-shadow:none;transform:translateY(0)}:host([variant='destructive'])::slotted(button){border-color:var(--ui-danger-solid);background:var(--ui-danger-solid);color:var(--ui-text-on-accent);box-shadow:var(--ui-button-destructive-shadow, inset 0 1px rgb(255 255 255 / 0.14), var(--ui-shadow-xs))}:host([variant='destructive'])::slotted(button:hover:enabled){background:var(--ui-danger-hover);border-color:var(--ui-danger-hover);box-shadow:var(--ui-shadow-sm);transform:translateY(-1px)}:host([variant='destructive'])::slotted(button:active:enabled){box-shadow:none;transform:translateY(0)}:host([variant='ghost'])::slotted(button){border-color:transparent;background:transparent}:host([variant='ghost'])::slotted(button:hover:enabled){background:var(--ui-surface-muted);border-color:transparent}:host([variant='ghost'])::slotted(button:active:enabled){background:var(--ui-surface-subtle);border-color:transparent}::slotted(button:focus-visible){outline:2px solid var(--ui-focus-ring);outline-offset:2px}::slotted(button:disabled),:host([data-disabled]){opacity:0.6;cursor:not-allowed}`;
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
getElement,
|
|
8
8
|
h,
|
|
9
9
|
registerInstance
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-SVINNT3E.js";
|
|
11
11
|
|
|
12
12
|
// dist/esm/ui-checkbox.entry.js
|
|
13
13
|
var uiCheckboxCss = () => `:host{display:inline-flex;align-items:center;gap:var(--ui-space-2);color:var(--ui-text-primary)}:host([aria-disabled='true']),:host([data-disabled='true']){opacity:0.6;cursor:not-allowed}::slotted(input[type='checkbox']){accent-color:var(--ui-accent-solid);width:1.125em;height:1.125em;cursor:pointer}::slotted(input[type='checkbox']:focus-visible){outline:2px solid var(--ui-accent-solid);outline-offset:2px}`;
|