@ixfx/components 0.15.3 → 0.15.4
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/bundle/index.d.ts +167 -13
- package/bundle/index.js +202 -164
- package/dist/ac-text.d.ts +1 -1
- package/dist/{ac-token-qEs3FsQv.d.ts → ac-token-Cq7lsYf-.d.ts} +1 -1
- package/dist/ac-token.d.ts +1 -1
- package/dist/colour-picker.d.ts +1 -1
- package/dist/crumbs.d.ts +2 -2
- package/dist/{data-grid-DmkId8bu.d.ts → data-grid-CbiubdG2.d.ts} +4 -4
- package/dist/data-grid.d.ts +2 -2
- package/dist/{detail-list-CmQqeXvp.d.ts → detail-list-ClkMV0SN.d.ts} +4 -4
- package/dist/detail-list.d.ts +3 -3
- package/dist/{flat-list-BmQBB3ZC.d.ts → flat-list-0xTZdXzh.d.ts} +3 -3
- package/dist/flat-list.d.ts +1 -1
- package/dist/{grid-list-BVsUEvgd.d.ts → grid-list-BnWJUIBC.d.ts} +3 -3
- package/dist/grid-list.d.ts +2 -2
- package/dist/{grouped-item-lister-DETte0Dh.d.ts → grouped-item-lister-Bhyo-dkH.d.ts} +1 -1
- package/dist/grouped-item-lister.d.ts +1 -1
- package/dist/{icon-CDGprSdE.d.ts → icon-DR_3rSyZ.d.ts} +1 -1
- package/dist/icons.d.ts +2 -2
- package/dist/incr-search.d.ts +1 -1
- package/dist/{index-DuhzWWTr.d.ts → index-BAuqR9El.d.ts} +28 -8
- package/dist/{index-BvoXLnBf.d.ts → index-BPTuCRGb.d.ts} +2 -2
- package/dist/{index-CoqtMSd9.d.ts → index-BUB5SICW.d.ts} +1 -1
- package/dist/{index-DN2BWctP.d.ts → index-Bz3loIAf.d.ts} +1 -1
- package/dist/{index-UvnoZUAo.d.ts → index-CJ5fshD3.d.ts} +1 -1
- package/dist/{index-DxyyVqzA.d.ts → index-cnaRPQPp.d.ts} +2 -2
- package/dist/{index-CYndvTWH.d.ts → index-garxxqgV.d.ts} +1 -1
- package/dist/index.d.ts +152 -27
- package/dist/index.js +272 -63
- package/dist/{labelled-input-base-DiTme1JO.d.ts → labelled-input-base-Dp_9KP0G.d.ts} +1 -1
- package/dist/labelled-radial-input.d.ts +2 -2
- package/dist/labelled-range-input.d.ts +1 -1
- package/dist/labelled-slider-input.d.ts +1 -1
- package/dist/list-group-header.d.ts +1 -1
- package/dist/{list-native-drag-controller-NMspr0E1.d.ts → list-native-drag-controller-O2Nruqpi.d.ts} +1 -1
- package/dist/{menu-item-bF6narIz.d.ts → menu-item-B0zqw2xp.d.ts} +1 -1
- package/dist/menu.d.ts +2 -2
- package/dist/miller.d.ts +2 -2
- package/dist/panel.d.ts +1 -1
- package/dist/{split-layout-JK3xWVX2.d.ts → split-layout-C5SYbDrq.d.ts} +1 -1
- package/dist/split-layout.d.ts +1 -1
- package/dist/{tab-list-Df371rqw.d.ts → tab-list-wC0xNz1b.d.ts} +1 -1
- package/dist/tabs.d.ts +1 -1
- package/dist/{titlebar-Tqu-VvMU.d.ts → titlebar-B5zSTZnF.d.ts} +1 -1
- package/dist/titlebar.d.ts +1 -1
- package/dist/{tree-2_TRrLAV.js → tree-D8VxvR9u.js} +44 -5
- package/dist/{tree-component-CDsYTBDi.d.ts → tree-component-C6UHO-w9.d.ts} +12 -3
- package/dist/tree.d.ts +3 -3
- package/dist/tree.js +1 -1
- package/dist/{vertical-list-ztrdFvyT.d.ts → vertical-list-B8FoU-pU.d.ts} +2 -2
- package/dist/vertical-list.d.ts +2 -2
- package/docs-user/dock.md +62 -1
- package/docs-user/index.json +2 -2
- package/docs-user/tree.md +39 -0
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as LabelledSliderInput } from "./index-
|
|
1
|
+
import { t as LabelledSliderInput } from "./index-CJ5fshD3.js";
|
|
2
2
|
export { LabelledSliderInput };
|
package/dist/{list-native-drag-controller-NMspr0E1.d.ts → list-native-drag-controller-O2Nruqpi.d.ts}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as ListDragPreviewContext, I as ListDragPreviewRenderer, L as ListDragPreviewSourceResolver, N as ListDragEntry, R as ListDragSource, z as ListNativeDragStartDetail } from "./tree-component-
|
|
1
|
+
import { F as ListDragPreviewContext, I as ListDragPreviewRenderer, L as ListDragPreviewSourceResolver, N as ListDragEntry, R as ListDragSource, z as ListNativeDragStartDetail } from "./tree-component-C6UHO-w9.js";
|
|
2
2
|
import { ReactiveController, ReactiveControllerHost } from "lit";
|
|
3
3
|
//#region src/interaction/list-native-drag-controller.d.ts
|
|
4
4
|
type ListNativeDragControllerConfig<T> = {
|
package/dist/menu.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { i as MenuContainer, n as MenuTrigger, t as MenuItem } from "./menu-item-
|
|
2
|
-
import { a as menuFromTree, c as MenuSeparator, d as MenuCheckItem, f as MenuBar, i as MenuFromTreeOptions, l as MenuSubTrigger, n as MenuRadioGroup, o as menuFromTreeToElements, r as MenuRadioItem, s as MenuHeader, u as MenuCommandController } from "./index-
|
|
1
|
+
import { i as MenuContainer, n as MenuTrigger, t as MenuItem } from "./menu-item-B0zqw2xp.js";
|
|
2
|
+
import { a as menuFromTree, c as MenuSeparator, d as MenuCheckItem, f as MenuBar, i as MenuFromTreeOptions, l as MenuSubTrigger, n as MenuRadioGroup, o as menuFromTreeToElements, r as MenuRadioItem, s as MenuHeader, u as MenuCommandController } from "./index-cnaRPQPp.js";
|
|
3
3
|
export { MenuBar, MenuCheckItem, MenuCommandController, MenuContainer, type MenuFromTreeOptions, MenuHeader, MenuItem, MenuRadioGroup, MenuRadioItem, MenuSeparator, MenuSubTrigger, MenuTrigger, menuFromTree, menuFromTreeToElements };
|
package/dist/miller.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as TreeTickleEvent, D as TreeSelectDetail, E as TreeSearchHost, O as TreeSelectEvent, a as TreeComponent, b as TreeItemClickDetail, i as TreeCollapseEvent, j as TreeDataModel, k as TreeTickleDetail, n as TreeActivateEvent, o as TreeComponentEventMap, r as TreeCollapseDetail, t as TreeActivateDetail, v as TreeExpandDetail, w as TreeNavigateOptions, x as TreeItemClickEvent, y as TreeExpandEvent } from "./tree-component-
|
|
1
|
+
import { A as TreeTickleEvent, D as TreeSelectDetail, E as TreeSearchHost, O as TreeSelectEvent, a as TreeComponent, b as TreeItemClickDetail, i as TreeCollapseEvent, j as TreeDataModel, k as TreeTickleDetail, n as TreeActivateEvent, o as TreeComponentEventMap, r as TreeCollapseDetail, t as TreeActivateDetail, v as TreeExpandDetail, w as TreeNavigateOptions, x as TreeItemClickEvent, y as TreeExpandEvent } from "./tree-component-C6UHO-w9.js";
|
|
2
2
|
import { a as TreeItem, n as TreeExclusivity, o as TreeNode, r as TreeFilterPredicate, s as TreeSelectionFilter, t as LoadChildrenCallback } from "./types-Jky6oNAp.js";
|
|
3
|
-
import { S as ListSearchController } from "./index-
|
|
3
|
+
import { S as ListSearchController } from "./index-BPTuCRGb.js";
|
|
4
4
|
import { n as TickledController } from "./tickled-controller-DodxD3eQ.js";
|
|
5
5
|
import { LitElement, PropertyValues, TemplateResult, nothing } from "lit";
|
|
6
6
|
import { CommandRegistry } from "@clinth/ui-commands";
|
package/dist/panel.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as TitlebarToggleDetail, c as TitlebarVariant, i as TitlebarOrientation, o as TitlebarToggleEvent, s as TitlebarToggleInteraction, t as TitlebarCloseEvent } from "./titlebar-
|
|
1
|
+
import { a as TitlebarToggleDetail, c as TitlebarVariant, i as TitlebarOrientation, o as TitlebarToggleEvent, s as TitlebarToggleInteraction, t as TitlebarCloseEvent } from "./titlebar-B5zSTZnF.js";
|
|
2
2
|
import { LitElement } from "lit";
|
|
3
3
|
//#region src/panel/panel.d.ts
|
|
4
4
|
/** Backwards-compatible aliases: canonical types now live in `../titlebar/titlebar.js`. */
|
|
@@ -156,7 +156,7 @@ declare class SplitLayoutElement extends LitElement {
|
|
|
156
156
|
private _onPointerUp;
|
|
157
157
|
private _emitResize;
|
|
158
158
|
private _emitChange;
|
|
159
|
-
protected render():
|
|
159
|
+
protected render(): import("lit").TemplateResult<1> | typeof nothing;
|
|
160
160
|
private _getTrackSizes;
|
|
161
161
|
private _resolveTracks;
|
|
162
162
|
private _renderGutter;
|
package/dist/split-layout.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as SplitLayoutElement } from "./split-layout-
|
|
1
|
+
import { t as SplitLayoutElement } from "./split-layout-C5SYbDrq.js";
|
|
2
2
|
export { SplitLayoutElement };
|
package/dist/tabs.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as TabListReorderDetail, i as TabListElement, n as TabListChangeEvent, o as TabListReorderEvent, r as TabListDragMode, t as TabListChangeDetail } from "./tab-list-
|
|
1
|
+
import { a as TabListReorderDetail, i as TabListElement, n as TabListChangeEvent, o as TabListReorderEvent, r as TabListDragMode, t as TabListChangeDetail } from "./tab-list-wC0xNz1b.js";
|
|
2
2
|
export { TabListChangeDetail, TabListChangeEvent, TabListDragMode, TabListElement, TabListReorderDetail, TabListReorderEvent };
|
package/dist/titlebar.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as TitlebarToggleDetail, c as TitlebarVariant, i as TitlebarOrientation, n as TitlebarElement, o as TitlebarToggleEvent, r as TitlebarElementEventMap, s as TitlebarToggleInteraction, t as TitlebarCloseEvent } from "./titlebar-
|
|
1
|
+
import { a as TitlebarToggleDetail, c as TitlebarVariant, i as TitlebarOrientation, n as TitlebarElement, o as TitlebarToggleEvent, r as TitlebarElementEventMap, s as TitlebarToggleInteraction, t as TitlebarCloseEvent } from "./titlebar-B5zSTZnF.js";
|
|
2
2
|
export { TitlebarCloseEvent, TitlebarElement, TitlebarElementEventMap, TitlebarOrientation, TitlebarToggleDetail, TitlebarToggleEvent, TitlebarToggleInteraction, TitlebarVariant };
|
|
@@ -3,7 +3,7 @@ import { n as tickledStyles, t as tickledItemStyles } from "./tickled-styles-BrA
|
|
|
3
3
|
import { t as themeFallbacks } from "./fallbacks-DQ_5OsmR.js";
|
|
4
4
|
import { n as safeCustomElement, t as __decorate } from "./decorate-VRK8rslU.js";
|
|
5
5
|
import { i as ListSearchController, n as listSearchStyles, o as registerListSearchCommands, r as LIST_SEARCH_MODES, t as createTreeListSearchAdapter } from "./incr-search-JIhwB49y.js";
|
|
6
|
-
import { i as animateListItemOut, r as animateListItemIn, t as ListNativeDragController } from "./list-native-drag-controller-CcXoS0YX.js";
|
|
6
|
+
import { i as animateListItemOut, o as prefersReducedMotion, r as animateListItemIn, t as ListNativeDragController } from "./list-native-drag-controller-CcXoS0YX.js";
|
|
7
7
|
import "./interaction-E-uMGHkJ.js";
|
|
8
8
|
import { t as collectDataResult } from "./data-provider-35TyWclX.js";
|
|
9
9
|
import { LitElement, css, html, nothing } from "lit";
|
|
@@ -1211,6 +1211,7 @@ let TreeBaseElement = class TreeBaseElement extends LitElement {
|
|
|
1211
1211
|
this.stickyHeaders = true;
|
|
1212
1212
|
this.virtualize = `auto`;
|
|
1213
1213
|
this.virtualizeThreshold = 200;
|
|
1214
|
+
this.animation = `auto`;
|
|
1214
1215
|
this.applyInternalDrop = true;
|
|
1215
1216
|
this._expandedKeys = /* @__PURE__ */ new Set();
|
|
1216
1217
|
this.#structureVersion = 0;
|
|
@@ -1650,6 +1651,12 @@ let TreeBaseElement = class TreeBaseElement extends LitElement {
|
|
|
1650
1651
|
#leaving;
|
|
1651
1652
|
#leavingAnimations;
|
|
1652
1653
|
#treeAnimReady;
|
|
1654
|
+
/**
|
|
1655
|
+
* Per-call animation override. When set (by methods like `expandAll` with `animate: false`),
|
|
1656
|
+
* it takes precedence over the `animation` property for one update cycle.
|
|
1657
|
+
* Cleared after each update.
|
|
1658
|
+
*/
|
|
1659
|
+
#animationOverride;
|
|
1653
1660
|
#dragSourceId;
|
|
1654
1661
|
#postDragSuppressTimer;
|
|
1655
1662
|
#dropState;
|
|
@@ -1901,6 +1908,11 @@ let TreeBaseElement = class TreeBaseElement extends LitElement {
|
|
|
1901
1908
|
return false;
|
|
1902
1909
|
}
|
|
1903
1910
|
#runItemAnimations() {
|
|
1911
|
+
if (!this.#shouldAnimate()) {
|
|
1912
|
+
this.#enteringKeys.clear();
|
|
1913
|
+
this.#cancelAllLeavingAnimations();
|
|
1914
|
+
this.#leaving.clear();
|
|
1915
|
+
}
|
|
1904
1916
|
if (this.#enteringKeys.size > 0) {
|
|
1905
1917
|
for (const el of this.renderRoot.querySelectorAll(`.item`)) {
|
|
1906
1918
|
const key = el.dataset.key;
|
|
@@ -1944,6 +1956,17 @@ let TreeBaseElement = class TreeBaseElement extends LitElement {
|
|
|
1944
1956
|
for (const entry of visible) this.#lastNodeByKey.set(entry.node.item.key, entry);
|
|
1945
1957
|
this.#treeAnimReady = true;
|
|
1946
1958
|
}
|
|
1959
|
+
/**
|
|
1960
|
+
* Determines whether row enter/leave animations should run for this update.
|
|
1961
|
+
* Checks the per-call `#animationOverride` first, then the `animation` property,
|
|
1962
|
+
* and finally `prefersReducedMotion()`.
|
|
1963
|
+
*/
|
|
1964
|
+
#shouldAnimate() {
|
|
1965
|
+
if (this.#animationOverride !== void 0) return this.#animationOverride;
|
|
1966
|
+
if (this.animation === `never`) return false;
|
|
1967
|
+
if (this.animation === `always`) return true;
|
|
1968
|
+
return !prefersReducedMotion();
|
|
1969
|
+
}
|
|
1947
1970
|
updated(changedProps) {
|
|
1948
1971
|
this.#rowsCache = void 0;
|
|
1949
1972
|
this.#syncVirtualObservers();
|
|
@@ -1994,6 +2017,7 @@ let TreeBaseElement = class TreeBaseElement extends LitElement {
|
|
|
1994
2017
|
if (this.#measureMetrics()) queueMicrotask(() => this.requestUpdate());
|
|
1995
2018
|
this.#repaintSearchHighlights();
|
|
1996
2019
|
} else this.#runItemAnimations();
|
|
2020
|
+
this.#animationOverride = void 0;
|
|
1997
2021
|
}
|
|
1998
2022
|
/** Highlights are painted on rendered labels, so they move with the window. */
|
|
1999
2023
|
#repaintSearchHighlights() {
|
|
@@ -2496,8 +2520,12 @@ let TreeBaseElement = class TreeBaseElement extends LitElement {
|
|
|
2496
2520
|
* have loaded to expand further. Bulk expansion ignores `exclusivity`. Fires
|
|
2497
2521
|
* one `expand` event per branch that actually opens — none for branches that
|
|
2498
2522
|
* were already expanded, including ones opened by filter auto-expansion.
|
|
2523
|
+
*
|
|
2524
|
+
* @param maxDepth - Maximum depth to expand to
|
|
2525
|
+
* @param animate - Whether to animate row enter/leave. When omitted, uses the `animation` property value.
|
|
2499
2526
|
*/
|
|
2500
|
-
expandAll(maxDepth) {
|
|
2527
|
+
expandAll(maxDepth, animate) {
|
|
2528
|
+
this.#animationOverride = animate;
|
|
2501
2529
|
this.#bulkExpand(true, maxDepth);
|
|
2502
2530
|
}
|
|
2503
2531
|
/**
|
|
@@ -2505,8 +2533,12 @@ let TreeBaseElement = class TreeBaseElement extends LitElement {
|
|
|
2505
2533
|
* branches at depth >= `maxDepth` are collapsed, leaving the tree open down
|
|
2506
2534
|
* to depth `maxDepth - 1` (`collapseAll(0)` is a full collapse). Fires one
|
|
2507
2535
|
* `collapse` event per branch that actually closes.
|
|
2536
|
+
*
|
|
2537
|
+
* @param maxDepth - Maximum depth to collapse from
|
|
2538
|
+
* @param animate - Whether to animate row enter/leave. When omitted, uses the `animation` property value.
|
|
2508
2539
|
*/
|
|
2509
|
-
collapseAll(maxDepth) {
|
|
2540
|
+
collapseAll(maxDepth, animate) {
|
|
2541
|
+
this.#animationOverride = animate;
|
|
2510
2542
|
this.#bulkExpand(false, maxDepth);
|
|
2511
2543
|
}
|
|
2512
2544
|
/** Shared bulk expand / collapse: one `_expandedKeys` write, per-node events for real changes only. */
|
|
@@ -2556,6 +2588,7 @@ let TreeBaseElement = class TreeBaseElement extends LitElement {
|
|
|
2556
2588
|
const prevSilent = this.#selectSilent;
|
|
2557
2589
|
this.#selectOrigin = `programmatic`;
|
|
2558
2590
|
this.#selectSilent = options.silent === true;
|
|
2591
|
+
if (options.animate !== void 0) this.#animationOverride = options.animate;
|
|
2559
2592
|
try {
|
|
2560
2593
|
return this.#navigateTo(keys, options.reveal ?? `edge`);
|
|
2561
2594
|
} finally {
|
|
@@ -2587,15 +2620,17 @@ let TreeBaseElement = class TreeBaseElement extends LitElement {
|
|
|
2587
2620
|
this.#scrollKeyIntoView(keys.at(-1), reveal);
|
|
2588
2621
|
return true;
|
|
2589
2622
|
}
|
|
2590
|
-
navigateToNode(predicate) {
|
|
2623
|
+
navigateToNode(predicate, animate) {
|
|
2591
2624
|
if (!this.root?.children) return false;
|
|
2625
|
+
if (animate !== void 0) this.#animationOverride = animate;
|
|
2592
2626
|
const keyPath = this.#findNodePath(this.root.children, predicate);
|
|
2593
2627
|
if (!keyPath) return false;
|
|
2594
2628
|
return this.navigateTo(keyPath);
|
|
2595
2629
|
}
|
|
2596
2630
|
/** Expand ancestors + move the cursor to `key`, without touching the selection (search "navigate" mode). */
|
|
2597
|
-
revealKey(key) {
|
|
2631
|
+
revealKey(key, animate) {
|
|
2598
2632
|
if (!this.root?.children) return false;
|
|
2633
|
+
if (animate !== void 0) this.#animationOverride = animate;
|
|
2599
2634
|
const path = this.#findNodePath(this.root.children, (n) => n.item.key === key);
|
|
2600
2635
|
if (!path) return false;
|
|
2601
2636
|
for (let i = 0; i < path.length - 1; i++) {
|
|
@@ -3542,6 +3577,10 @@ __decorate([property({
|
|
|
3542
3577
|
type: Number,
|
|
3543
3578
|
attribute: `virtualize-threshold`
|
|
3544
3579
|
})], TreeBaseElement.prototype, "virtualizeThreshold", void 0);
|
|
3580
|
+
__decorate([property({
|
|
3581
|
+
reflect: true,
|
|
3582
|
+
attribute: `animation`
|
|
3583
|
+
})], TreeBaseElement.prototype, "animation", void 0);
|
|
3545
3584
|
__decorate([property({ attribute: false })], TreeBaseElement.prototype, "dragPreviewRenderer", void 0);
|
|
3546
3585
|
__decorate([property({ attribute: false })], TreeBaseElement.prototype, "dragPreviewSource", void 0);
|
|
3547
3586
|
__decorate([property({ attribute: false })], TreeBaseElement.prototype, "canDrag", void 0);
|
|
@@ -220,6 +220,11 @@ type TreeNavigateOptions = {
|
|
|
220
220
|
reveal?: TreeRevealMode;
|
|
221
221
|
/** Suppress the `select` event this navigation would otherwise fire. */
|
|
222
222
|
silent?: boolean;
|
|
223
|
+
/**
|
|
224
|
+
* Whether to animate row enter/leave for this operation.
|
|
225
|
+
* When omitted, uses the `animation` property value (`'auto'` by default).
|
|
226
|
+
*/
|
|
227
|
+
animate?: boolean;
|
|
223
228
|
};
|
|
224
229
|
/**
|
|
225
230
|
* Fired when the selection set changes by any means (click, keyboard, programmatic).
|
|
@@ -385,18 +390,22 @@ interface TreeComponent extends EventTarget {
|
|
|
385
390
|
* Expand ancestors and select the node reached by following `keys` from the root's children.
|
|
386
391
|
* Returns `true` if the path was found and applied.
|
|
387
392
|
*/
|
|
388
|
-
navigateTo: (keys: readonly string[]) => boolean;
|
|
393
|
+
navigateTo: (keys: readonly string[], options?: TreeNavigateOptions) => boolean;
|
|
389
394
|
/**
|
|
390
395
|
* Expand ancestors and select the first node for which `predicate` returns `true`.
|
|
391
396
|
* Returns `true` if a matching node was found.
|
|
397
|
+
* @param predicate - Function to find the target node
|
|
398
|
+
* @param animate - Whether to animate row enter/leave. When omitted, uses the `animation` property value.
|
|
392
399
|
*/
|
|
393
|
-
navigateToNode: (predicate: (node: TreeNode) => boolean) => boolean;
|
|
400
|
+
navigateToNode: (predicate: (node: TreeNode) => boolean, animate?: boolean) => boolean;
|
|
394
401
|
/**
|
|
395
402
|
* Expand ancestors of the node with `key` and move the keyboard cursor to it,
|
|
396
403
|
* scrolling it into view — **without** changing the selection. Returns `true`
|
|
397
404
|
* if the node was found. Used by incremental-search "navigate" mode.
|
|
405
|
+
* @param key - Key of the node to reveal
|
|
406
|
+
* @param animate - Whether to animate row enter/leave. When omitted, uses the `animation` property value.
|
|
398
407
|
*/
|
|
399
|
-
revealKey: (key: string) => boolean;
|
|
408
|
+
revealKey: (key: string, animate?: boolean) => boolean;
|
|
400
409
|
/** Replace the selection with `nodes` (subject to `selectionFilter`). Used by incremental-search "select" mode. */
|
|
401
410
|
selectMany: (nodes: Iterable<TreeNode>) => void;
|
|
402
411
|
/**
|
package/dist/tree.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as TreeTickleEvent, D as TreeSelectDetail, M as TreeDataModelOptions, O as TreeSelectEvent, T as TreeRevealMode, _ as TreeDropTarget, b as TreeItemClickDetail, c as TreeDragContext, d as TreeDragStartEvent, g as TreeDropPosition, h as TreeDropEvent, i as TreeCollapseEvent, j as TreeDataModel, k as TreeTickleDetail, l as TreeDragEndEvent, m as TreeDropDetail, n as TreeActivateEvent, o as TreeComponentEventMap, p as TreeDropContext, r as TreeCollapseDetail, s as TreeDndMode, t as TreeActivateDetail, u as TreeDragOverEvent, v as TreeExpandDetail, w as TreeNavigateOptions, x as TreeItemClickEvent, y as TreeExpandEvent } from "./tree-component-
|
|
1
|
+
import { A as TreeTickleEvent, D as TreeSelectDetail, M as TreeDataModelOptions, O as TreeSelectEvent, T as TreeRevealMode, _ as TreeDropTarget, b as TreeItemClickDetail, c as TreeDragContext, d as TreeDragStartEvent, g as TreeDropPosition, h as TreeDropEvent, i as TreeCollapseEvent, j as TreeDataModel, k as TreeTickleDetail, l as TreeDragEndEvent, m as TreeDropDetail, n as TreeActivateEvent, o as TreeComponentEventMap, p as TreeDropContext, r as TreeCollapseDetail, s as TreeDndMode, t as TreeActivateDetail, u as TreeDragOverEvent, v as TreeExpandDetail, w as TreeNavigateOptions, x as TreeItemClickEvent, y as TreeExpandEvent } from "./tree-component-C6UHO-w9.js";
|
|
2
2
|
import { a as TreeItem, n as TreeExclusivity, o as TreeNode, r as TreeFilterPredicate, s as TreeSelectionFilter, t as LoadChildrenCallback } from "./types-Jky6oNAp.js";
|
|
3
|
-
import { a as TreeDropVisibleRow, c as TreeListElement, d as
|
|
4
|
-
export { type LoadChildrenCallback, type TreeActivateDetail, type TreeActivateEvent, TreeBaseElement, TreeBaseElementEventMap, type TreeCheckboxState, type TreeCollapseDetail, type TreeCollapseEvent, type TreeComponentEventMap, TreeConfig, TreeController, TreeControllerOptions, TreeDataModel, type TreeDataModelOptions, type TreeDndMode, type TreeDragContext, type TreeDragEndEvent, type TreeDragOverEvent, type TreeDragStartEvent, type TreeDropContext, TreeDropController, TreeDropControllerConfig, type TreeDropDetail, type TreeDropEvent, type TreeDropPosition, TreeDropResolvedDrag, TreeDropRowInfo, type TreeDropTarget, TreeDropVisibleRow, type TreeExclusivity, type TreeExpandDetail, type TreeExpandEvent, type TreeFilterPredicate, type TreeItem, type TreeItemClickDetail, type TreeItemClickEvent, TreeListElement, type TreeNavigateOptions, type TreeNode, type TreeRevealMode, type TreeSelectDetail, type TreeSelectEvent, type TreeSelectionFilter, type TreeTickleDetail, type TreeTickleEvent, TreeVirtualize };
|
|
3
|
+
import { a as TreeDropVisibleRow, c as TreeListElement, d as TreeBaseElement, f as TreeBaseElementEventMap, i as TreeDropRowInfo, l as TreeCheckboxState, m as TreeConfig, n as TreeDropControllerConfig, o as TreeController, p as TreeVirtualize, r as TreeDropResolvedDrag, s as TreeControllerOptions, t as TreeDropController, u as TreeAnimation } from "./index-BAuqR9El.js";
|
|
4
|
+
export { type LoadChildrenCallback, type TreeActivateDetail, type TreeActivateEvent, TreeAnimation, TreeBaseElement, TreeBaseElementEventMap, type TreeCheckboxState, type TreeCollapseDetail, type TreeCollapseEvent, type TreeComponentEventMap, TreeConfig, TreeController, TreeControllerOptions, TreeDataModel, type TreeDataModelOptions, type TreeDndMode, type TreeDragContext, type TreeDragEndEvent, type TreeDragOverEvent, type TreeDragStartEvent, type TreeDropContext, TreeDropController, TreeDropControllerConfig, type TreeDropDetail, type TreeDropEvent, type TreeDropPosition, TreeDropResolvedDrag, TreeDropRowInfo, type TreeDropTarget, TreeDropVisibleRow, type TreeExclusivity, type TreeExpandDetail, type TreeExpandEvent, type TreeFilterPredicate, type TreeItem, type TreeItemClickDetail, type TreeItemClickEvent, TreeListElement, type TreeNavigateOptions, type TreeNode, type TreeRevealMode, type TreeSelectDetail, type TreeSelectEvent, type TreeSelectionFilter, type TreeTickleDetail, type TreeTickleEvent, TreeVirtualize };
|
package/dist/tree.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as TreeDataModel, i as TreeDropController, n as TreeListElement, r as TreeBaseElement, t as TreeController } from "./tree-
|
|
1
|
+
import { a as TreeDataModel, i as TreeDropController, n as TreeListElement, r as TreeBaseElement, t as TreeController } from "./tree-D8VxvR9u.js";
|
|
2
2
|
export { TreeBaseElement, TreeController, TreeDataModel, TreeDropController, TreeListElement };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { B as ListNativeDragStartEvent, I as ListDragPreviewRenderer, L as ListDragPreviewSourceResolver } from "./tree-component-
|
|
1
|
+
import { B as ListNativeDragStartEvent, I as ListDragPreviewRenderer, L as ListDragPreviewSourceResolver } from "./tree-component-C6UHO-w9.js";
|
|
2
2
|
import { n as ListViewportChangeEvent } from "./list-viewport-types-BRZsLcvp.js";
|
|
3
|
-
import { S as ListSearchController } from "./index-
|
|
3
|
+
import { S as ListSearchController } from "./index-BPTuCRGb.js";
|
|
4
4
|
import { i as ListInteractionMode, l as ListSelectionMode, r as ListElementEventMap } from "./list-selection-types-PjKdhF-a.js";
|
|
5
5
|
import "./editable-label-rzXkjf1H.js";
|
|
6
6
|
import { LitElement, PropertyValues } from "lit";
|
package/dist/vertical-list.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as ListNativeDragStartEvent, F as ListDragPreviewContext, I as ListDragPreviewRenderer, N as ListDragEntry, P as ListDragPreview, R as ListDragSource, z as ListNativeDragStartDetail } from "./tree-component-
|
|
1
|
+
import { B as ListNativeDragStartEvent, F as ListDragPreviewContext, I as ListDragPreviewRenderer, N as ListDragEntry, P as ListDragPreview, R as ListDragSource, z as ListNativeDragStartDetail } from "./tree-component-C6UHO-w9.js";
|
|
2
2
|
import { n as ListViewportChangeEvent, t as ListViewportChangeDetail } from "./list-viewport-types-BRZsLcvp.js";
|
|
3
3
|
import { a as ListItemClickDetail, c as ListSelectEvent, d as ListTickleEvent, i as ListInteractionMode, l as ListSelectionMode, n as ListActivateEvent, o as ListItemClickEvent, r as ListElementEventMap, s as ListSelectDetail, t as ListActivateDetail, u as ListTickleDetail } from "./list-selection-types-PjKdhF-a.js";
|
|
4
|
-
import { a as ListContextMenuDetail, c as ListDragLeaveEvent, d as ListDropEvent, f as ListEditCancelDetail, h as ListEditCommitEvent, i as VerticalListElementEventMap, l as ListDragOverEvent, m as ListEditCommitDetail, n as CustomCheckboxOptions, o as ListContextMenuEvent, p as ListEditCancelEvent, r as VerticalListElement, s as ListDragLeaveDetail, t as AddItemOptions, u as ListDropDetail } from "./vertical-list-
|
|
4
|
+
import { a as ListContextMenuDetail, c as ListDragLeaveEvent, d as ListDropEvent, f as ListEditCancelDetail, h as ListEditCommitEvent, i as VerticalListElementEventMap, l as ListDragOverEvent, m as ListEditCommitDetail, n as CustomCheckboxOptions, o as ListContextMenuEvent, p as ListEditCancelEvent, r as VerticalListElement, s as ListDragLeaveDetail, t as AddItemOptions, u as ListDropDetail } from "./vertical-list-B8FoU-pU.js";
|
|
5
5
|
export { AddItemOptions, CustomCheckboxOptions, type ListActivateDetail, type ListActivateEvent, type ListContextMenuDetail, type ListContextMenuEvent, type ListDragEntry, type ListDragLeaveDetail, type ListDragLeaveEvent, type ListDragOverEvent, type ListDragPreview, type ListDragPreviewContext, type ListDragPreviewRenderer, type ListDragSource, type ListDropDetail, type ListDropEvent, type ListEditCancelDetail, type ListEditCancelEvent, type ListEditCommitDetail, type ListEditCommitEvent, type ListElementEventMap, type ListInteractionMode, type ListItemClickDetail, type ListItemClickEvent, type ListNativeDragStartDetail, type ListNativeDragStartEvent, type ListSelectDetail, type ListSelectEvent, type ListSelectionMode, type ListTickleDetail, type ListTickleEvent, type ListViewportChangeDetail, type ListViewportChangeEvent, VerticalListElement, VerticalListElementEventMap };
|
package/docs-user/dock.md
CHANGED
|
@@ -127,6 +127,22 @@ split resizes, and host resizes; handles are hidden during dock drags.
|
|
|
127
127
|
stored policy; `clearLeafPlacementPolicy(name)` resets. `getLeafPlacementPolicy(name)`
|
|
128
128
|
returns the resolved `{ allowKinds, denyKinds, allowEdgeSplit }`.
|
|
129
129
|
|
|
130
|
+
- Host `isolated` attribute: panels can be rearranged freely *inside* this
|
|
131
|
+
host but cannot be dragged **out** to another host. It is checked on the
|
|
132
|
+
**source** host only — it does not stop other hosts dropping panels *into*
|
|
133
|
+
an isolated host. To keep unrelated docks from exchanging panels in both
|
|
134
|
+
directions use `family` (below).
|
|
135
|
+
- Host `family` attribute (default `""`): two hosts exchange panels by drag
|
|
136
|
+
only when their families are equal. Give an inner dock its own family and
|
|
137
|
+
it neither receives outer-dock panels nor lets its own leave.
|
|
138
|
+
- Host `accepts-kinds` attribute / `acceptsKinds` property (space-separated
|
|
139
|
+
panel kinds; default unrestricted): panels arriving from **other** hosts, or
|
|
140
|
+
from another window via `queryDropTarget` / `acceptExternalPanel`, must be of
|
|
141
|
+
one of these kinds. Panels already in the host are unaffected. Combine with
|
|
142
|
+
`family` and `isolated` for a closed two-way exchange of one kind.
|
|
143
|
+
- A host whose `accepts` allows no splits (e.g. `accepts="tabs"`) treats the
|
|
144
|
+
whole leaf as the tabs drop zone, instead of leaving the edge bands inert.
|
|
145
|
+
|
|
130
146
|
A zone lights up only if every applicable rule allows it; disallowed zones
|
|
131
147
|
are inert. Content rules govern tabbing *into* a leaf (`tabs` drops,
|
|
132
148
|
`addPanel`, re-homing). Edge splits beside a leaf stay allowed **unless** that
|
|
@@ -138,11 +154,56 @@ propagated to it. Programmatic fallbacks (`addPanel` without a target,
|
|
|
138
154
|
external panels, leaf-close re-homing) use the first stack admitting the
|
|
139
155
|
panel's kind.
|
|
140
156
|
|
|
157
|
+
## Hiding the strip of a lone tab
|
|
158
|
+
|
|
159
|
+
`hide-single-tab-strip` (host attribute, `hideSingleTabStrip` property) drops
|
|
160
|
+
a leaf's tab strip while it holds exactly one panel; the strip appears when a
|
|
161
|
+
second panel arrives and goes again when one leaves. `DockStackNode.hideSingleTabStrip`
|
|
162
|
+
overrides it per stack (serialized with the layout). The leaf's outer box is
|
|
163
|
+
fixed by its split, so only the body shifts by one tab height when the strip
|
|
164
|
+
appears — the strip never reserves height while hidden.
|
|
165
|
+
|
|
166
|
+
While hidden:
|
|
167
|
+
|
|
168
|
+
- **Drops.** During a drag the host overlays a compact stand-in strip (part
|
|
169
|
+
`drop-hint`) on the leaf — only if that leaf would accept the dragged panel —
|
|
170
|
+
with a caret showing the insertion gap. It takes no layout space. Dropping on
|
|
171
|
+
it, or on the leaf centre, adds a tab; the real strip then appears.
|
|
172
|
+
- **Dragging the lone panel.** There is no tab to grab, so call
|
|
173
|
+
`host.beginPanelDrag(panelId, pointerEvent)` from your own handle's
|
|
174
|
+
`pointerdown`. It returns `false` for an unknown panel or non-primary press.
|
|
175
|
+
The drag starts after a few pixels of movement and is identical to a tab
|
|
176
|
+
drag (ghost, drop zones, `dock-panel-drag-*`, cross-host adoption,
|
|
177
|
+
tear-out). Prefer `touch-action: none` and `user-select: none` on the handle.
|
|
178
|
+
- **Toolbars.** Panel toolbars and `toolbar-<name>` slots live in the strip, so
|
|
179
|
+
they are not shown while it is hidden.
|
|
180
|
+
|
|
141
181
|
## Events
|
|
142
182
|
|
|
143
183
|
`ixfx-dock-host`: `dock-change` (`{ layout }` after structural mutations),
|
|
144
184
|
`dock-panel-added`, `dock-panel-removed`, `dock-panel-activated`,
|
|
145
|
-
`dock-panel-drag-start
|
|
185
|
+
`dock-panel-drag-start`, `dock-panel-moved`, `dock-stack-empty`,
|
|
186
|
+
`dock-tab-contextmenu`.
|
|
187
|
+
|
|
188
|
+
- `dock-panel-added` — `{ panelId, sourceHost, targetHost }`. `sourceHost` is
|
|
189
|
+
the host the panel came from (`null` when new or from another window).
|
|
190
|
+
- `dock-panel-removed` — `{ panelId, sourceHost, targetHost }`. `targetHost` is
|
|
191
|
+
the host it moved to, `null` when it is gone (closed, detached, torn out).
|
|
192
|
+
- `dock-panel-moved` — `{ panelId, sourceHost, targetHost }`, fired on the
|
|
193
|
+
target host once a cross-host drop completes. A move therefore fires
|
|
194
|
+
`removed` (source), `added` (target), then `moved` (target), and the source
|
|
195
|
+
now also emits `dock-change`.
|
|
196
|
+
- `dock-stack-empty` — `{ name, hostEmpty }` when a stack loses its last panel
|
|
197
|
+
(`name` is the container name or `null`). `hostEmpty` is true when the host
|
|
198
|
+
holds no panels at all — the cue to close an owning group. Fires before the
|
|
199
|
+
matching `dock-change`; not fired by `loadLayout()`.
|
|
200
|
+
- `dock-tab-contextmenu` — `{ panelId, clientX, clientY }`, cancelable
|
|
201
|
+
(`preventDefault()` suppresses the native menu). Visible tabs only; with a
|
|
202
|
+
hidden strip handle `contextmenu` on your own element.
|
|
203
|
+
|
|
204
|
+
All of these bubble and are composed, so a nested host's events also reach
|
|
205
|
+
outer hosts and their listeners — compare `targetHost` / `sourceHost` to the
|
|
206
|
+
host you care about. A nested host's drags are owned by the nearest host only.
|
|
146
207
|
|
|
147
208
|
Cross-window (see [Cross-window docking](#cross-window-docking-electron-etc)):
|
|
148
209
|
`dock-panel-drag-out` / `dock-panel-drag-in`
|
package/docs-user/index.json
CHANGED
package/docs-user/tree.md
CHANGED
|
@@ -153,6 +153,7 @@ These properties are present on all three components (`ixfx-tree-list`, `ixfx-mi
|
|
|
153
153
|
| `stickyHeaders` (`sticky-headers`) | `boolean` | `true` | VS Code-style sticky headers; set `sticky-headers="false"` to opt out (`ixfx-tree-list` only) |
|
|
154
154
|
| `virtualize` | `'auto' \| 'on' \| 'off'` | `'auto'` | Render only the rows near the viewport; `auto` switches on above `virtualizeThreshold` visible rows (`ixfx-tree-list` only). See [Virtualisation](#virtualisation-ixfx-tree-list) |
|
|
155
155
|
| `virtualizeThreshold` (`virtualize-threshold`) | `number` | `200` | Visible-row count above which `virtualize="auto"` windows the list |
|
|
156
|
+
| `animation` | `'auto' \| 'always' \| 'never'` | `'auto'` | Controls row enter/leave animations. `'auto'` respects `prefers-reduced-motion`; `'always'` always animates; `'never'` skips all animations. Can be overridden per-call on `expandAll`, `collapseAll`, `navigateTo`, `revealKey`, and `navigateToNode` |
|
|
156
157
|
|
|
157
158
|
### Replacing `root`
|
|
158
159
|
|
|
@@ -280,6 +281,44 @@ On by default: while scrolling vertically, the ancestors of the top-visible row
|
|
|
280
281
|
- An ancestor that is itself still visible is never duplicated in the header.
|
|
281
282
|
- Style via `--tree-sticky-bg`, `--tree-sticky-border`, `--tree-sticky-shadow`, and the `sticky-headers` / `sticky-header` parts.
|
|
282
283
|
|
|
284
|
+
### Animation control
|
|
285
|
+
|
|
286
|
+
Row enter/leave animations are controlled by the `animation` property:
|
|
287
|
+
|
|
288
|
+
| Value | Behaviour |
|
|
289
|
+
|-------|-----------|
|
|
290
|
+
| `'auto'` (default) | Animate normally, respecting `prefers-reduced-motion` and the `MAX_ANIMATED_ROWS` (50) threshold |
|
|
291
|
+
| `'always'` | Always animate, even when many rows change at once |
|
|
292
|
+
| `'never'` | Skip all row enter/leave animations |
|
|
293
|
+
|
|
294
|
+
```html
|
|
295
|
+
<ixfx-tree-list animation="never"></ixfx-tree-list>
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
**Per-call override**: Methods that change the tree structure accept an optional `animate` parameter to override the property for that single call:
|
|
299
|
+
|
|
300
|
+
```typescript
|
|
301
|
+
// Expand with animation (default)
|
|
302
|
+
tree.expandAll();
|
|
303
|
+
|
|
304
|
+
// Expand without animation
|
|
305
|
+
tree.expandAll(undefined, false);
|
|
306
|
+
|
|
307
|
+
// Collapse without animation
|
|
308
|
+
tree.collapseAll(0, false);
|
|
309
|
+
|
|
310
|
+
// Navigate with animation
|
|
311
|
+
tree.navigateTo(['root', 'child']);
|
|
312
|
+
|
|
313
|
+
// Navigate without animation
|
|
314
|
+
tree.navigateTo(['root', 'child'], { animate: false });
|
|
315
|
+
|
|
316
|
+
// Reveal without animation
|
|
317
|
+
tree.revealKey('some-key', false);
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
This is useful when populating a tree initially or when performance matters more than visual polish.
|
|
321
|
+
|
|
283
322
|
### Virtualisation (`ixfx-tree-list`)
|
|
284
323
|
|
|
285
324
|
A node with 10,000 children needs only about 25 `<li>` elements in the DOM. When
|