@ixfx/components 0.17.0 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/index.d.ts +193 -8
- package/bundle/index.js +153 -152
- package/dist/{checked-select-BmwqpgGr.js → checked-select-DsQ-o9lI.js} +1 -1
- package/dist/checked-select.js +1 -1
- package/dist/{crumb-navigation-D7dAC0H-.js → crumb-navigation-09YFje6W.js} +2 -2
- package/dist/{crumb-navigation-Tm4fnsvN.d.ts → crumb-navigation-DOfOS7li.d.ts} +1 -1
- package/dist/crumbs.d.ts +1 -1
- package/dist/crumbs.js +1 -1
- package/dist/{data-grid-BcO3SMac.js → data-grid-BGmJbMCb.js} +4 -3
- package/dist/{data-grid-vasJtjFP.d.ts → data-grid-BQWmVYg0.d.ts} +8 -2
- package/dist/data-grid.d.ts +2 -2
- package/dist/data-grid.js +1 -1
- package/dist/{detail-list-E9WdMVbE.d.ts → detail-list-CfjoIl2N.d.ts} +9 -3
- package/dist/{detail-list-vPVwE1CP.js → detail-list-CrHASoAx.js} +2 -1
- package/dist/detail-list.d.ts +3 -3
- package/dist/detail-list.js +1 -1
- package/dist/{flat-list-CfutGqKY.d.ts → flat-list-C2z81bK6.d.ts} +5 -3
- package/dist/flat-list.d.ts +1 -1
- package/dist/flat-list.js +4 -2
- package/dist/{grid-list-Dg8hIiKO.d.ts → grid-list-Crv-hFJL.d.ts} +60 -4
- package/dist/{grid-list-BHo9TBxX.js → grid-list-DYU_z2K9.js} +258 -19
- package/dist/grid-list.d.ts +3 -3
- package/dist/grid-list.js +1 -1
- package/dist/incr-search.d.ts +1 -1
- package/dist/{index-CzhYJJsx.d.ts → index-BE0hk8xS.d.ts} +2 -2
- package/dist/{index-88ra6YHP.d.ts → index-BymYKGY-.d.ts} +3 -3
- package/dist/{index-CRLTVAyt.d.ts → index-Db5VGFR1.d.ts} +1 -1
- package/dist/index.d.ts +82 -20
- package/dist/index.js +293 -107
- package/dist/{interaction-8Kbbf6xN.js → interaction-BEcBIY0d.js} +1 -1
- package/dist/{list-native-drag-controller-ByftBooJ.js → list-native-drag-controller-Brk30s5d.js} +3 -0
- package/dist/{list-native-drag-controller-CgXKdmjr.d.ts → list-native-drag-controller-Cs-Tmtaa.d.ts} +1 -1
- package/dist/{menu-C3DhTjHx.js → menu-B6NFqEtm.js} +3 -3
- package/dist/{menu-item-BSxhlWnW.js → menu-item-D0zy1yax.js} +2 -2
- package/dist/menu.js +2 -2
- package/dist/{miller-DqDEaXqT.js → miller-B0qbnWwe.js} +1 -1
- package/dist/miller.d.ts +2 -2
- package/dist/miller.js +1 -1
- package/dist/narrowed-text.js +1 -1
- package/dist/{node-graph-DqEGv5QR.js → node-graph-D9iovxQp.js} +1 -1
- package/dist/node-graph.js +1 -1
- package/dist/{notification-pill-BiHEJk-o.d.ts → notification-pill-BJonE_wo.d.ts} +14 -1
- package/dist/notifier.d.ts +1 -1
- package/dist/select-horiz.js +1 -1
- package/dist/sunburst-tree.d.ts +1 -1
- package/dist/{sunbursttree-list-CsrmVSB8.d.ts → sunbursttree-list-XF7gBKod.d.ts} +2 -2
- package/dist/{tree-BP5fxvEX.js → tree-1CSNgw72.js} +2 -2
- package/dist/{tree-component-DNuzfo6R.d.ts → tree-component-BE7OEIiH.d.ts} +7 -1
- package/dist/tree.d.ts +2 -2
- package/dist/tree.js +1 -1
- package/dist/{vertical-list-B9z1lbjM.js → vertical-list-BNCRA_zy.js} +2 -1
- package/dist/{vertical-list-BzeXehBt.d.ts → vertical-list-Dyc5azxv.d.ts} +8 -2
- package/dist/vertical-list.d.ts +2 -2
- package/dist/vertical-list.js +1 -1
- package/docs-user/grid-list.md +70 -0
- package/docs-user/index.json +2 -2
- package/docs-user/notifier.md +28 -0
- package/package.json +3 -3
package/dist/{list-native-drag-controller-ByftBooJ.js → list-native-drag-controller-Brk30s5d.js}
RENAMED
|
@@ -780,6 +780,9 @@ var ListNativeDragController = class {
|
|
|
780
780
|
try {
|
|
781
781
|
this.#config.writeDataTransfer?.(event.dataTransfer, detail);
|
|
782
782
|
} catch {}
|
|
783
|
+
try {
|
|
784
|
+
this.#host.writeDataTransfer?.(event.dataTransfer, detail);
|
|
785
|
+
} catch {}
|
|
783
786
|
}
|
|
784
787
|
const hotspot = preview.hotspot ?? {
|
|
785
788
|
x: 16,
|
package/dist/{list-native-drag-controller-CgXKdmjr.d.ts → list-native-drag-controller-Cs-Tmtaa.d.ts}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as
|
|
1
|
+
import { B as ListDragSource, F as ListDragEntry, L as ListDragPreviewContext, R as ListDragPreviewRenderer, V as ListNativeDragStartDetail, z as ListDragPreviewSourceResolver } from "./tree-component-BE7OEIiH.js";
|
|
2
2
|
import { ReactiveController, ReactiveControllerHost } from "lit";
|
|
3
3
|
type ListNativeDragControllerConfig<T> = {
|
|
4
4
|
readonly source: ListDragSource;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D3KUYPsf.js";
|
|
2
2
|
import { t as tickledItemStyles } from "./tickled-styles-pnieYweS.js";
|
|
3
3
|
import { n as safeCustomElement, t as __decorate } from "./decorate-Dxs8sFX8.js";
|
|
4
|
-
import { n as MenuTrigger, r as MenuContainer, t as MenuItem } from "./menu-item-
|
|
5
|
-
import "./interaction-
|
|
4
|
+
import { n as MenuTrigger, r as MenuContainer, t as MenuItem } from "./menu-item-D0zy1yax.js";
|
|
5
|
+
import "./interaction-BEcBIY0d.js";
|
|
6
6
|
import { t as themeFallbacks } from "./fallbacks-BPjjBoED.js";
|
|
7
7
|
import "./icon-DvTQuylG.js";
|
|
8
8
|
import { LitElement, css, html, nothing } from "lit";
|
|
@@ -128,7 +128,7 @@ let MenuCheckItem = class MenuCheckItem extends LitElement {
|
|
|
128
128
|
}
|
|
129
129
|
_resolvedLabel() {
|
|
130
130
|
if (this.label) return this.label;
|
|
131
|
-
if (this.registry && this.command) return this.registry.
|
|
131
|
+
if (this.registry && this.command) return this.registry.getLabel(this.command, void 0) ?? ``;
|
|
132
132
|
return ``;
|
|
133
133
|
}
|
|
134
134
|
_resolvedIcon() {
|
|
@@ -4,7 +4,7 @@ import { t as themeFallbacks } from "./fallbacks-BPjjBoED.js";
|
|
|
4
4
|
import { t as popupSurfaceStyles } from "./popup-D8IxN1Eq.js";
|
|
5
5
|
import { n as safeCustomElement, t as __decorate } from "./decorate-Dxs8sFX8.js";
|
|
6
6
|
import "./icon-DvTQuylG.js";
|
|
7
|
-
import "./interaction-
|
|
7
|
+
import "./interaction-BEcBIY0d.js";
|
|
8
8
|
import { t as scrollFadeStyles } from "./scroll-fade-DH8OXSqL.js";
|
|
9
9
|
import { LitElement, css, html } from "lit";
|
|
10
10
|
import { property, query, state } from "lit/decorators.js";
|
|
@@ -793,7 +793,7 @@ let MenuItem = class MenuItem extends LitElement {
|
|
|
793
793
|
}
|
|
794
794
|
_resolvedLabel() {
|
|
795
795
|
if (this.label) return this.label;
|
|
796
|
-
if (this.registry && this.command) return this.registry.
|
|
796
|
+
if (this.registry && this.command) return this.registry.getLabel(this.command, void 0) ?? ``;
|
|
797
797
|
return ``;
|
|
798
798
|
}
|
|
799
799
|
_resolvedIcon() {
|
package/dist/menu.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as MenuTrigger, r as MenuContainer, t as MenuItem } from "./menu-item-
|
|
2
|
-
import { a as menuFromTreeToElements, c as MenuSubTrigger, d as MenuBar, i as menuFromTree, l as MenuCommandController, n as MenuRadioGroup, o as MenuHeader, r as MenuRadioItem, s as MenuSeparator, u as MenuCheckItem } from "./menu-
|
|
1
|
+
import { n as MenuTrigger, r as MenuContainer, t as MenuItem } from "./menu-item-D0zy1yax.js";
|
|
2
|
+
import { a as menuFromTreeToElements, c as MenuSubTrigger, d as MenuBar, i as menuFromTree, l as MenuCommandController, n as MenuRadioGroup, o as MenuHeader, r as MenuRadioItem, s as MenuSeparator, u as MenuCheckItem } from "./menu-B6NFqEtm.js";
|
|
3
3
|
export { MenuBar, MenuCheckItem, MenuCommandController, MenuContainer, MenuHeader, MenuItem, MenuRadioGroup, MenuRadioItem, MenuSeparator, MenuSubTrigger, MenuTrigger, menuFromTree, menuFromTreeToElements };
|
|
@@ -8,7 +8,7 @@ import { t as themeFallbacks } from "./fallbacks-BPjjBoED.js";
|
|
|
8
8
|
import { n as safeCustomElement, t as __decorate } from "./decorate-Dxs8sFX8.js";
|
|
9
9
|
import { n as appearanceColor, t as appearanceAbsent } from "./item-appearance-FRO3TRFI.js";
|
|
10
10
|
import { a as restoreElementScroll, i as onUserScrollIntent, o as scrollToOffset, r as captureElementScroll, t as ViewStateController } from "./view-state-controller-DiPAPiA7.js";
|
|
11
|
-
import "./interaction-
|
|
11
|
+
import "./interaction-BEcBIY0d.js";
|
|
12
12
|
import { LitElement, css, html, nothing } from "lit";
|
|
13
13
|
import { property, state } from "lit/decorators.js";
|
|
14
14
|
import { createCommandRegistry } from "@clinth/ui-commands";
|
package/dist/miller.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as TreeTickleDetail, O as TreeSelectDetail, b as TreeItemClickDetail, i as TreeCollapseEvent, j as TreeTickleEvent, k as TreeSelectEvent, n as TreeActivateEvent, r as TreeCollapseDetail, t as TreeActivateDetail, v as TreeExpandDetail, x as TreeItemClickEvent, y as TreeExpandEvent } from "./tree-component-
|
|
1
|
+
import { A as TreeTickleDetail, O as TreeSelectDetail, b as TreeItemClickDetail, i as TreeCollapseEvent, j as TreeTickleEvent, k as TreeSelectEvent, n as TreeActivateEvent, r as TreeCollapseDetail, t as TreeActivateDetail, v as TreeExpandDetail, x as TreeItemClickEvent, y as TreeExpandEvent } from "./tree-component-BE7OEIiH.js";
|
|
2
2
|
import { a as TreeItem, o as TreeNode } from "./types-6hpXRKt7.js";
|
|
3
|
-
import { _ as MillerRebaseEvent, a as MillerBaseElementEventMap, c as MillerHeaderClickEvent, d as MillerItemDblClickDetail, f as MillerItemDblClickEvent, g as MillerRebaseDetail, h as MillerItemState, i as MillerBaseElement, l as MillerHeaderRightClickDetail, m as MillerItemRightClickEvent, n as MillerTreeControllerOptions, o as MillerListViewState, p as MillerItemRightClickDetail, r as MillerListElement, s as MillerHeaderClickDetail, t as MillerTreeController, u as MillerHeaderRightClickEvent, v as MillerSelectionMode } from "./index-
|
|
3
|
+
import { _ as MillerRebaseEvent, a as MillerBaseElementEventMap, c as MillerHeaderClickEvent, d as MillerItemDblClickDetail, f as MillerItemDblClickEvent, g as MillerRebaseDetail, h as MillerItemState, i as MillerBaseElement, l as MillerHeaderRightClickDetail, m as MillerItemRightClickEvent, n as MillerTreeControllerOptions, o as MillerListViewState, p as MillerItemRightClickDetail, r as MillerListElement, s as MillerHeaderClickDetail, t as MillerTreeController, u as MillerHeaderRightClickEvent, v as MillerSelectionMode } from "./index-BE0hk8xS.js";
|
|
4
4
|
export { type TreeActivateDetail as MillerActivateDetail, type TreeActivateEvent as MillerActivateEvent, MillerBaseElement, MillerBaseElementEventMap, type TreeCollapseDetail as MillerCollapseDetail, type TreeCollapseEvent as MillerCollapseEvent, type TreeExpandDetail as MillerExpandDetail, type TreeExpandEvent as MillerExpandEvent, MillerHeaderClickDetail, MillerHeaderClickEvent, MillerHeaderRightClickDetail, MillerHeaderRightClickEvent, type TreeItem as MillerItem, type TreeItemClickDetail as MillerItemClickDetail, type TreeItemClickEvent as MillerItemClickEvent, MillerItemDblClickDetail, MillerItemDblClickEvent, MillerItemRightClickDetail, MillerItemRightClickEvent, MillerItemState, MillerListElement, type MillerListViewState, type TreeNode as MillerNode, MillerRebaseDetail, MillerRebaseEvent, type TreeSelectDetail as MillerSelectDetail, type TreeSelectEvent as MillerSelectEvent, MillerSelectionMode, type TreeTickleDetail as MillerTickleDetail, type TreeTickleEvent as MillerTickleEvent, MillerTreeController, MillerTreeControllerOptions };
|
package/dist/miller.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { r as MillerBaseElement, n as MillerListElement, t as MillerTreeController } from "./miller-
|
|
1
|
+
export { r as MillerBaseElement, n as MillerListElement, t as MillerTreeController } from "./miller-B0qbnWwe.js";
|
package/dist/narrowed-text.js
CHANGED
|
@@ -2,7 +2,7 @@ import { n as buildHighlightTargets, r as clearHighlights, t as applyHighlights
|
|
|
2
2
|
import { t as TickledController } from "./tickled-controller-BVhGKzjZ.js";
|
|
3
3
|
import { n as tickledStyles, t as tickledItemStyles } from "./tickled-styles-pnieYweS.js";
|
|
4
4
|
import { m as createIncrSearch } from "./incr-search-C5114RxZ.js";
|
|
5
|
-
import "./interaction-
|
|
5
|
+
import "./interaction-BEcBIY0d.js";
|
|
6
6
|
import { t as themeFallbacks } from "./fallbacks-BPjjBoED.js";
|
|
7
7
|
import { n as safeCustomElement, t as __decorate } from "./decorate-Dxs8sFX8.js";
|
|
8
8
|
import { LitElement, css, html, nothing } from "lit";
|
|
@@ -2,7 +2,7 @@ import { n as safeCustomElement, t as __decorate } from "./decorate-Dxs8sFX8.js"
|
|
|
2
2
|
import { t as themeFallbacks } from "./fallbacks-BPjjBoED.js";
|
|
3
3
|
import { t as handleStyles } from "./handle-BVUWv97X.js";
|
|
4
4
|
import "./icon-DvTQuylG.js";
|
|
5
|
-
import "./menu-item-
|
|
5
|
+
import "./menu-item-D0zy1yax.js";
|
|
6
6
|
import { t as ViewStateController } from "./view-state-controller-DiPAPiA7.js";
|
|
7
7
|
import { LitElement, css, html, nothing, svg } from "lit";
|
|
8
8
|
import { property, state } from "lit/decorators.js";
|
package/dist/node-graph.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Y as DEFAULT_FORCE_OPTIONS, T as DRAG_THRESHOLD_PX, dt as EASY_CONNECT_MARGIN, tt as EDGE_CORNER_RADIUS, z as GraphNodeElement, K as GraphPortElement, D as MARQUEE_THRESHOLD_PX, q as MAX_BLINK_HZ, u as MAX_FLOW_SPEED, O as MarqueeController, B as NODE_SHAPES, E as NodeDragController, t as NodeGraphElement, m as PanZoomController, U as RESIZE_HANDLES, r as WireDragController, bt as addWire, J as blinkPeriodSeconds, g as boundsOf, ht as canConnect, _ as clampZoom, c as collapsedOffset, k as combineSelection, xt as connectContext, St as cycleBlockedNodes, nt as defaultSide, Ct as edgeId, rt as edgeMidpoint, it as edgePath, at as edgeShape, wt as ensurePort, ot as extendFromSide, o as findProximityConnection, F as findSnapTarget, gt as findValidWire, v as fitBounds, y as fitRects, b as flowToScreen, X as forceMovement, Z as forcePin, Q as forcePositions, $ as forceState, et as forceStep, Tt as fromEdges, Et as hasWire, Dt as inDegreeOf, ft as inEasyConnectZone, Ot as incomingEdge, kt as incomingEdges, h as isEditableTarget, V as isNodeShape, W as isResizeHandle, A as marqueeStyle, l as measureNode, w as nodeGraphStyles, j as nodesInRect, _t as normaliseConnection, At as outDegreeOf, x as panBy, jt as parsePortId, pt as pickStartPort, st as polylineMidpoint, ct as polylinePath, lt as polylineShape, Mt as portId, I as proximityFactor, M as rectFromPoints, s as rectGap, N as rectsIntersect, Nt as removeNode, mt as removeNodes, Pt as removeWire, n as renderWires, G as resizeRect, vt as resolveConnection, d as sanitizeFlowSpeed, S as screenToFlow, i as selectionAfterEdgeClick, a as selectionAfterNodePress, L as settled, H as shapeSpec, R as smoothStep, ut as stepPoints, Ft as toEdges, It as toNodeGraph, yt as typesCompatible, P as wantsMarquee, f as withEntry, p as withWireFlow, C as zoomAt } from "./node-graph-
|
|
1
|
+
export { Y as DEFAULT_FORCE_OPTIONS, T as DRAG_THRESHOLD_PX, dt as EASY_CONNECT_MARGIN, tt as EDGE_CORNER_RADIUS, z as GraphNodeElement, K as GraphPortElement, D as MARQUEE_THRESHOLD_PX, q as MAX_BLINK_HZ, u as MAX_FLOW_SPEED, O as MarqueeController, B as NODE_SHAPES, E as NodeDragController, t as NodeGraphElement, m as PanZoomController, U as RESIZE_HANDLES, r as WireDragController, bt as addWire, J as blinkPeriodSeconds, g as boundsOf, ht as canConnect, _ as clampZoom, c as collapsedOffset, k as combineSelection, xt as connectContext, St as cycleBlockedNodes, nt as defaultSide, Ct as edgeId, rt as edgeMidpoint, it as edgePath, at as edgeShape, wt as ensurePort, ot as extendFromSide, o as findProximityConnection, F as findSnapTarget, gt as findValidWire, v as fitBounds, y as fitRects, b as flowToScreen, X as forceMovement, Z as forcePin, Q as forcePositions, $ as forceState, et as forceStep, Tt as fromEdges, Et as hasWire, Dt as inDegreeOf, ft as inEasyConnectZone, Ot as incomingEdge, kt as incomingEdges, h as isEditableTarget, V as isNodeShape, W as isResizeHandle, A as marqueeStyle, l as measureNode, w as nodeGraphStyles, j as nodesInRect, _t as normaliseConnection, At as outDegreeOf, x as panBy, jt as parsePortId, pt as pickStartPort, st as polylineMidpoint, ct as polylinePath, lt as polylineShape, Mt as portId, I as proximityFactor, M as rectFromPoints, s as rectGap, N as rectsIntersect, Nt as removeNode, mt as removeNodes, Pt as removeWire, n as renderWires, G as resizeRect, vt as resolveConnection, d as sanitizeFlowSpeed, S as screenToFlow, i as selectionAfterEdgeClick, a as selectionAfterNodePress, L as settled, H as shapeSpec, R as smoothStep, ut as stepPoints, Ft as toEdges, It as toNodeGraph, yt as typesCompatible, P as wantsMarquee, f as withEntry, p as withWireFlow, C as zoomAt } from "./node-graph-D9iovxQp.js";
|
|
@@ -35,6 +35,19 @@ type NotifierOptions = {
|
|
|
35
35
|
tapBehaviour?: `none` | `dismiss`;
|
|
36
36
|
tapHandlerDefault?: (notification: Notification) => void;
|
|
37
37
|
};
|
|
38
|
+
/** A notification as remembered by a manager's history. */
|
|
39
|
+
type NotificationHistoryEntry = Notification & {
|
|
40
|
+
/** `true` once read: via `markRead`/`markAllRead`, or when the user taps the toast. */
|
|
41
|
+
readonly read: boolean;
|
|
42
|
+
/** Set once the toast is no longer visible (timed out, evicted, tapped away or dismissed). */
|
|
43
|
+
readonly dismissedAt?: number;
|
|
44
|
+
};
|
|
45
|
+
type NotificationHistoryListener = (history: readonly NotificationHistoryEntry[]) => void;
|
|
46
|
+
/** Options for `createNotificationManager` / `NotificationManager.scope`. */
|
|
47
|
+
type NotificationManagerOptions = NotifierOptions & {
|
|
48
|
+
/** Max history entries kept per manager (oldest dropped first). Default 100. */
|
|
49
|
+
historyLimit?: number;
|
|
50
|
+
};
|
|
38
51
|
type PillTapDetail = {
|
|
39
52
|
readonly id: string;
|
|
40
53
|
};
|
|
@@ -60,4 +73,4 @@ declare global {
|
|
|
60
73
|
interface NotificationPillElement {
|
|
61
74
|
addEventListener: (<K extends keyof NotificationPillElementEventMap>(type: K, listener: (this: NotificationPillElement, event: NotificationPillElementEventMap[K]) => void, options?: boolean | AddEventListenerOptions) => void) & ((type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions) => void);
|
|
62
75
|
}
|
|
63
|
-
export { Notification as a,
|
|
76
|
+
export { Notification as a, NotificationHistoryListener as c, NotificationRendererHooks as d, NotificationType as f, PillTapEvent as i, NotificationManagerOptions as l, NotificationPillElementEventMap as n, NotificationContent as o, NotifierOptions as p, PillTapDetail as r, NotificationHistoryEntry as s, NotificationPillElement as t, NotificationRenderer as u };
|
package/dist/notifier.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as PillTapEvent, n as NotificationPillElementEventMap, r as PillTapDetail, t as NotificationPillElement } from "./notification-pill-
|
|
1
|
+
import { i as PillTapEvent, n as NotificationPillElementEventMap, r as PillTapDetail, t as NotificationPillElement } from "./notification-pill-BJonE_wo.js";
|
|
2
2
|
export { NotificationPillElement, NotificationPillElementEventMap, PillTapDetail, PillTapEvent };
|
package/dist/select-horiz.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as TickledController } from "./tickled-controller-BVhGKzjZ.js";
|
|
2
2
|
import { n as tickledStyles, t as tickledItemStyles } from "./tickled-styles-pnieYweS.js";
|
|
3
|
-
import "./interaction-
|
|
3
|
+
import "./interaction-BEcBIY0d.js";
|
|
4
4
|
import { t as WheelNudgeMixin } from "./wheel-nudge-DgJzrL28.js";
|
|
5
5
|
import { t as themeFallbacks } from "./fallbacks-BPjjBoED.js";
|
|
6
6
|
import { t as scrollFadeStyles } from "./scroll-fade-DH8OXSqL.js";
|
package/dist/sunburst-tree.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as SunburstViewState, i as SunburstZoomEvent, n as SunburstTreeListElementEventMap, r as SunburstZoomDetail, t as SunburstTreeListElement } from "./sunbursttree-list-
|
|
1
|
+
import { a as SunburstViewState, i as SunburstZoomEvent, n as SunburstTreeListElementEventMap, r as SunburstZoomDetail, t as SunburstTreeListElement } from "./sunbursttree-list-XF7gBKod.js";
|
|
2
2
|
export { SunburstTreeListElement, SunburstTreeListElementEventMap, type SunburstViewState, SunburstZoomDetail, SunburstZoomEvent };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { C as TreeItemDblClickEvent, E as TreeSearchHost, M as TreeDataModel, a as TreeComponent, i as TreeCollapseEvent, j as TreeTickleEvent, k as TreeSelectEvent, n as TreeActivateEvent, o as TreeComponentEventMap, x as TreeItemClickEvent, y as TreeExpandEvent } from "./tree-component-
|
|
1
|
+
import { C as TreeItemDblClickEvent, E as TreeSearchHost, M as TreeDataModel, a as TreeComponent, i as TreeCollapseEvent, j as TreeTickleEvent, k as TreeSelectEvent, n as TreeActivateEvent, o as TreeComponentEventMap, x as TreeItemClickEvent, y as TreeExpandEvent } from "./tree-component-BE7OEIiH.js";
|
|
2
2
|
import { a as TreeItem, n as TreeExclusivity, o as TreeNode, r as TreeFilterPredicate, s as TreeSelectionFilter, t as LoadChildrenCallback } from "./types-6hpXRKt7.js";
|
|
3
3
|
import { a as ViewStateBase, t as GetViewStateOptions } from "./types-16GC5k1z.js";
|
|
4
4
|
import "./index-Cdcek1Oj.js";
|
|
5
|
-
import { S as ListSearchController } from "./index-
|
|
5
|
+
import { S as ListSearchController } from "./index-Db5VGFR1.js";
|
|
6
6
|
import { LitElement, PropertyValues } from "lit";
|
|
7
7
|
import { CommandRegistry } from "@clinth/ui-commands";
|
|
8
8
|
/**
|
|
@@ -3,11 +3,11 @@ import { n as tickledStyles, t as tickledItemStyles } from "./tickled-styles-pni
|
|
|
3
3
|
import { t as themeFallbacks } from "./fallbacks-BPjjBoED.js";
|
|
4
4
|
import { n as safeCustomElement, t as __decorate } from "./decorate-Dxs8sFX8.js";
|
|
5
5
|
import { i as ListSearchController, n as listSearchStyles, o as registerListSearchCommands, r as LIST_SEARCH_MODES, t as createTreeListSearchAdapter } from "./incr-search-C5114RxZ.js";
|
|
6
|
-
import { i as animateListItemOut, o as prefersReducedMotion, r as animateListItemIn, t as ListNativeDragController } from "./list-native-drag-controller-
|
|
6
|
+
import { i as animateListItemOut, o as prefersReducedMotion, r as animateListItemIn, t as ListNativeDragController } from "./list-native-drag-controller-Brk30s5d.js";
|
|
7
7
|
import { a as capKeys, c as keysAsFlags, f as withoutFlag, i as capFlags, l as keysToArray, n as EMPTY_KEYS, o as flagsFromRecord, s as flagsToRecord, t as EMPTY_FLAGS } from "./pending-Afl4LT64.js";
|
|
8
8
|
import { i as sameKeySet, r as isPartialKey, t as PARTIAL_DESCRIPTION } from "./partial-keys-D4l_ede_.js";
|
|
9
9
|
import { n as createScrollHoverGuard } from "./scroll-hover-guard-BGAjtyXT.js";
|
|
10
|
-
import "./interaction-
|
|
10
|
+
import "./interaction-BEcBIY0d.js";
|
|
11
11
|
import { t as collectDataResult } from "./data-provider-C6ZNAcaT.js";
|
|
12
12
|
import { n as anchorFromRow, o as scrollToOffset, t as ViewStateController } from "./view-state-controller-DiPAPiA7.js";
|
|
13
13
|
import { i as reconcileSelection, r as reconcileExpansion } from "./tree-DUc-iQcg.js";
|
|
@@ -42,6 +42,12 @@ interface ListDragPreview {
|
|
|
42
42
|
readonly canvas?: HTMLCanvasElement;
|
|
43
43
|
readonly dispose?: () => void;
|
|
44
44
|
}
|
|
45
|
+
/**
|
|
46
|
+
* Writes an application payload onto the drag's `DataTransfer` at `dragstart`.
|
|
47
|
+
* Every list component exposes this as a public `writeDataTransfer` property;
|
|
48
|
+
* `ListNativeDragController` invokes it after any built-in payload writer.
|
|
49
|
+
*/
|
|
50
|
+
type ListDragDataTransferWriter<T> = (dataTransfer: DataTransfer, detail: ListNativeDragStartDetail<T>) => void;
|
|
45
51
|
type ListDragPreviewRenderer<T> = (context: ListDragPreviewContext<T>) => ListDragPreview;
|
|
46
52
|
type ListDragPreviewSourceResolver<T> = (entry: ListDragEntry<T>) => CanvasImageSource | undefined;
|
|
47
53
|
interface ListNativeDragStartDetail<T = unknown> {
|
|
@@ -435,4 +441,4 @@ interface TreeSearchHost extends TreeComponent {
|
|
|
435
441
|
readonly shadowRoot: ShadowRoot | null;
|
|
436
442
|
readonly updateComplete: Promise<boolean>;
|
|
437
443
|
}
|
|
438
|
-
export { TreeTickleDetail as A,
|
|
444
|
+
export { TreeTickleDetail as A, ListDragSource as B, TreeItemDblClickEvent as C, TreeSelectAllOptions as D, TreeSearchHost as E, ListDragEntry as F, ListNativeDragStartEvent as H, ListDragPreview as I, ListDragPreviewContext as L, TreeDataModel as M, TreeDataModelOptions as N, TreeSelectDetail as O, ListDragDataTransferWriter as P, ListDragPreviewRenderer as R, TreeItemDblClickDetail as S, TreeRevealMode as T, ListNativeDragStartDetail as V, TreeDropTarget as _, TreeComponent as a, TreeItemClickDetail as b, TreeDragContext as c, TreeDragStartEvent as d, TreeDropApplyContext as f, TreeDropPosition as g, TreeDropEvent as h, TreeCollapseEvent as i, TreeTickleEvent as j, TreeSelectEvent as k, TreeDragEndEvent as l, TreeDropDetail as m, TreeActivateEvent as n, TreeComponentEventMap as o, TreeDropContext as p, TreeCollapseDetail as r, TreeDndMode as s, TreeActivateDetail as t, TreeDragOverEvent as u, TreeExpandDetail as v, TreeNavigateOptions as w, TreeItemClickEvent as x, TreeExpandEvent as y, ListDragPreviewSourceResolver as z };
|
package/dist/tree.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as TreeTickleDetail, M as TreeDataModel, N as TreeDataModelOptions, O as TreeSelectDetail, 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 TreeTickleEvent, k as TreeSelectEvent, 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 TreeTickleDetail, M as TreeDataModel, N as TreeDataModelOptions, O as TreeSelectDetail, 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 TreeTickleEvent, k as TreeSelectEvent, 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-BE7OEIiH.js";
|
|
2
2
|
import { a as TreeItem, n as TreeExclusivity, o as TreeNode, r as TreeFilterPredicate, s as TreeSelectionFilter, t as LoadChildrenCallback } from "./types-6hpXRKt7.js";
|
|
3
|
-
import { a as TreeDropVisibleRow, c as TreeListElement, d as TreeBaseElement, f as TreeBaseElementEventMap, h as TreeConfig, i as TreeDropRowInfo, l as TreeCheckboxState, m as TreeListViewState, n as TreeDropControllerConfig, o as TreeController, p as TreeVirtualize, r as TreeDropResolvedDrag, s as TreeControllerOptions, t as TreeDropController, u as TreeAnimation } from "./index-
|
|
3
|
+
import { a as TreeDropVisibleRow, c as TreeListElement, d as TreeBaseElement, f as TreeBaseElementEventMap, h as TreeConfig, i as TreeDropRowInfo, l as TreeCheckboxState, m as TreeListViewState, n as TreeDropControllerConfig, o as TreeController, p as TreeVirtualize, r as TreeDropResolvedDrag, s as TreeControllerOptions, t as TreeDropController, u as TreeAnimation } from "./index-BymYKGY-.js";
|
|
4
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 TreeListViewState, type TreeNavigateOptions, type TreeNode, type TreeRevealMode, type TreeSelectDetail, type TreeSelectEvent, type TreeSelectionFilter, type TreeTickleDetail, type TreeTickleEvent, TreeVirtualize };
|
package/dist/tree.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { r as TreeBaseElement, t as TreeController, a as TreeDataModel, i as TreeDropController, n as TreeListElement } from "./tree-
|
|
1
|
+
export { r as TreeBaseElement, t as TreeController, a as TreeDataModel, i as TreeDropController, n as TreeListElement } from "./tree-1CSNgw72.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as appearanceColor, t as appearanceAbsent } from "./item-appearance-FRO3TRFI.js";
|
|
2
2
|
import { c as createElementListSearchAdapter, d as keysOfElements, i as ListSearchController, n as listSearchStyles, o as registerListSearchCommands, r as LIST_SEARCH_MODES, u as keyForElement } from "./incr-search-C5114RxZ.js";
|
|
3
3
|
import { i as ListDragSelectController, n as gestureOf, t as ListSelectionController } from "./list-selection-controller-Dkh3m3hX.js";
|
|
4
|
-
import { i as animateListItemOut, r as animateListItemIn, t as ListNativeDragController } from "./list-native-drag-controller-
|
|
4
|
+
import { i as animateListItemOut, r as animateListItemIn, t as ListNativeDragController } from "./list-native-drag-controller-Brk30s5d.js";
|
|
5
5
|
import { i as sameKeySet, n as applyPartialAttributes, r as isPartialKey } from "./partial-keys-D4l_ede_.js";
|
|
6
6
|
import { t as TickledController } from "./tickled-controller-BVhGKzjZ.js";
|
|
7
7
|
import { l as keysToArray } from "./pending-Afl4LT64.js";
|
|
@@ -1995,6 +1995,7 @@ __decorate([property({
|
|
|
1995
1995
|
reflect: true
|
|
1996
1996
|
})], VerticalListElement.prototype, "itemsDraggable", void 0);
|
|
1997
1997
|
__decorate([property({ attribute: false })], VerticalListElement.prototype, "dragPreviewRenderer", void 0);
|
|
1998
|
+
__decorate([property({ attribute: false })], VerticalListElement.prototype, "writeDataTransfer", void 0);
|
|
1998
1999
|
__decorate([property({ attribute: false })], VerticalListElement.prototype, "dragPreviewSource", void 0);
|
|
1999
2000
|
__decorate([property({ attribute: false })], VerticalListElement.prototype, "items", void 0);
|
|
2000
2001
|
__decorate([property({
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { H as ListNativeDragStartEvent, P as ListDragDataTransferWriter, R as ListDragPreviewRenderer, z as ListDragPreviewSourceResolver } from "./tree-component-BE7OEIiH.js";
|
|
2
2
|
import { a as ViewStateBase, t as GetViewStateOptions } from "./types-16GC5k1z.js";
|
|
3
3
|
import { h as ListSelectionMode, i as ListInteractionMode, r as ListElementEventMap } from "./list-selection-types-CKTt7Rrw.js";
|
|
4
4
|
import { n as ListViewportChangeEvent } from "./list-viewport-types-BJ8c6qur.js";
|
|
5
5
|
import "./index-Cdcek1Oj.js";
|
|
6
|
-
import { S as ListSearchController } from "./index-
|
|
6
|
+
import { S as ListSearchController } from "./index-Db5VGFR1.js";
|
|
7
7
|
import "./editable-label-CiHCDlhC.js";
|
|
8
8
|
import { LitElement, PropertyValues } from "lit";
|
|
9
9
|
import { CommandId, CommandRegistry } from "@clinth/ui-commands";
|
|
@@ -113,6 +113,12 @@ declare class VerticalListElement extends LitElement {
|
|
|
113
113
|
* built-in HTML+canvas preview.
|
|
114
114
|
*/
|
|
115
115
|
dragPreviewRenderer: ListDragPreviewRenderer<Element> | undefined;
|
|
116
|
+
/**
|
|
117
|
+
* Write an application payload onto the drag's `DataTransfer` (e.g. a custom
|
|
118
|
+
* MIME type). Called once per drag, synchronously inside `dragstart`, after a
|
|
119
|
+
* non-cancelled `list-native-drag-start`.
|
|
120
|
+
*/
|
|
121
|
+
writeDataTransfer: ListDragDataTransferWriter<Element> | undefined;
|
|
116
122
|
dragPreviewSource: ListDragPreviewSourceResolver<Element> | undefined;
|
|
117
123
|
/**
|
|
118
124
|
* Object/adapter item mode (mirrors `ixfx-detail-list`). When set, the list
|
package/dist/vertical-list.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as
|
|
1
|
+
import { B as ListDragSource, F as ListDragEntry, H as ListNativeDragStartEvent, I as ListDragPreview, L as ListDragPreviewContext, R as ListDragPreviewRenderer, V as ListNativeDragStartDetail } from "./tree-component-BE7OEIiH.js";
|
|
2
2
|
import { n as ListViewportChangeEvent, t as ListViewportChangeDetail } from "./list-viewport-types-BJ8c6qur.js";
|
|
3
3
|
import { _ as ListTickleEvent, a as ListItemClickDetail, c as ListSelectDetail, g as ListTickleDetail, h as ListSelectionMode, i as ListInteractionMode, l as ListSelectEvent, n as ListActivateEvent, o as ListItemClickEvent, r as ListElementEventMap, t as ListActivateDetail } from "./list-selection-types-CKTt7Rrw.js";
|
|
4
|
-
import { a as VerticalListViewState, c as ListDragLeaveDetail, d as ListDropDetail, f as ListDropEvent, g as ListEditCommitEvent, h as ListEditCommitDetail, i as VerticalListElementEventMap, l as ListDragLeaveEvent, m as ListEditCancelEvent, n as CustomCheckboxOptions, o as ListContextMenuDetail, p as ListEditCancelDetail, r as VerticalListElement, s as ListContextMenuEvent, t as AddItemOptions, u as ListDragOverEvent } from "./vertical-list-
|
|
4
|
+
import { a as VerticalListViewState, c as ListDragLeaveDetail, d as ListDropDetail, f as ListDropEvent, g as ListEditCommitEvent, h as ListEditCommitDetail, i as VerticalListElementEventMap, l as ListDragLeaveEvent, m as ListEditCancelEvent, n as CustomCheckboxOptions, o as ListContextMenuDetail, p as ListEditCancelDetail, r as VerticalListElement, s as ListContextMenuEvent, t as AddItemOptions, u as ListDragOverEvent } from "./vertical-list-Dyc5azxv.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, type VerticalListViewState };
|
package/dist/vertical-list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as VerticalListElement } from "./vertical-list-
|
|
1
|
+
export { t as VerticalListElement } from "./vertical-list-BNCRA_zy.js";
|
package/docs-user/grid-list.md
CHANGED
|
@@ -278,6 +278,11 @@ Set `items-draggable` to make selectable cells draggable out of the grid. On
|
|
|
278
278
|
for native hosts.
|
|
279
279
|
- Assign `dragPreviewRenderer` for a custom synchronous preview returning
|
|
280
280
|
`{ element, hotspot?, canvas?, dispose? }`.
|
|
281
|
+
- Assign `writeDataTransfer(dataTransfer, detail)` to put your own payload on
|
|
282
|
+
the drag (e.g. a custom MIME type). It is a public property on every list
|
|
283
|
+
(`ixfx-grid-list`, `ixfx-vertical-list`, `ixfx-detail-list`, `ixfx-data-grid`,
|
|
284
|
+
and forwarded by `ixfx-flat-list`), run synchronously in `dragstart` after a
|
|
285
|
+
non-cancelled `list-native-drag-start`.
|
|
281
286
|
- `preventDefault()` on the event cancels the browser drag, but the sync
|
|
282
287
|
listener still sees `preview` (incl. `canvas`) — what lets an Electron host
|
|
283
288
|
rasterize it during the synchronous turn.
|
|
@@ -412,6 +417,8 @@ Parts: `part="icon"` and `part="badge"` on the wrappers this adds.
|
|
|
412
417
|
| `setItems(items)` | Replace the collection. Selection / cursor keep any key still present; vanished keys are deselected silently and held pending (see [View state](#view-state)). |
|
|
413
418
|
| `appendItems(items)` | Add to the end. Scroll, selection and cursor untouched; no reflow animation. |
|
|
414
419
|
| `updateItem(key, item)` | Replace one item. A visible cell re-renders in place; an offscreen one updates when scrolled in. |
|
|
420
|
+
| `updateItems(entries)` | Replace many items at once — the batched form of `updateItem`. See [Batched updates](#batched-updates). |
|
|
421
|
+
| `refreshItem(key)` | Re-render one cell **without** changing `items`. See [Refreshing a cell](#refreshing-a-cell). |
|
|
415
422
|
| `removeItems(keys)` | Remove items. Removed keys drop out of selection / cursor silently and are held pending. |
|
|
416
423
|
| `clearItems()` | Drop everything. Resets selection / cursor and emits one empty `list-select`; the keys are held pending, so re-adding them restores the selection. |
|
|
417
424
|
|
|
@@ -424,6 +431,49 @@ key-based. Data-mode events carry the data value as `detail.item` and
|
|
|
424
431
|
Duplicate keys are warned about once; the first occurrence wins for key-based
|
|
425
432
|
operations.
|
|
426
433
|
|
|
434
|
+
#### Batched updates
|
|
435
|
+
|
|
436
|
+
`updateItems(entries)` applies many replacements with **one** array copy and
|
|
437
|
+
**one** source rebuild:
|
|
438
|
+
|
|
439
|
+
```typescript
|
|
440
|
+
grid.updateItems([
|
|
441
|
+
{ key: 'a', item: { ...fileA, name: 'Renamed' } },
|
|
442
|
+
{ key: 'b', item: { ...fileB, thumb: newThumb } },
|
|
443
|
+
]);
|
|
444
|
+
|
|
445
|
+
// A Map works too:
|
|
446
|
+
grid.updateItems(new Map([['a', newA], ['b', newB]]));
|
|
447
|
+
```
|
|
448
|
+
|
|
449
|
+
It has the same semantics as the equivalent run of `updateItem` calls: unknown
|
|
450
|
+
keys are ignored, selection / cursor / scroll are untouched, and an entry whose
|
|
451
|
+
`item` is the identical object already at that key is skipped. If nothing
|
|
452
|
+
changes, `items` keeps its identity and nothing is emitted.
|
|
453
|
+
|
|
454
|
+
**Use `updateItems` rather than a loop of `updateItem`s** when you have more
|
|
455
|
+
than one row to change. A loop pays one array copy per call, so changing n rows
|
|
456
|
+
costs n copies; the batched form pays one. On a 20k-item collection, replacing
|
|
457
|
+
500 rows measured ~22 ms as a loop versus ~0.7 ms as one batch (happy-dom).
|
|
458
|
+
|
|
459
|
+
#### Refreshing a cell
|
|
460
|
+
|
|
461
|
+
`updateItem(key, item)` with the **same object** that is already at `key` is a
|
|
462
|
+
no-op — the array is not copied and nothing is emitted. That is the right
|
|
463
|
+
behaviour when you only want to push the *data* through.
|
|
464
|
+
|
|
465
|
+
If instead you want to redraw a cell whose data is unchanged — because the
|
|
466
|
+
adapter renders something that lives outside the item, such as a thumbnail that
|
|
467
|
+
just finished loading — use `refreshItem(key)`:
|
|
468
|
+
|
|
469
|
+
```typescript
|
|
470
|
+
grid.refreshItem('a'); // re-renders the cell for 'a'; `items` is untouched
|
|
471
|
+
```
|
|
472
|
+
|
|
473
|
+
The adapter's `render` is called again for that cell, so it picks up the new
|
|
474
|
+
state. The `items` array keeps its identity, so nothing is copied and the
|
|
475
|
+
collection is not rebuilt.
|
|
476
|
+
|
|
427
477
|
---
|
|
428
478
|
|
|
429
479
|
## Grouping
|
|
@@ -608,6 +658,26 @@ Inserting is O(items): one `appendItems` costs ~5 ms at 5k items and ~21 ms at
|
|
|
608
658
|
50k (the source and search index are rebuilt, and `items` is copied); the
|
|
609
659
|
element-mode equivalents are ~8 ms at 2k and ~16 ms at 10k.
|
|
610
660
|
|
|
661
|
+
### Mutation API
|
|
662
|
+
|
|
663
|
+
`src/grid-list/grid-list.perf.test.ts` guards the data-mode mutation API with
|
|
664
|
+
**work counters** — how many times the adapter's `key` is called per mutation.
|
|
665
|
+
That number must not scale with the item count. Run it with:
|
|
666
|
+
|
|
667
|
+
```sh
|
|
668
|
+
pnpm test:perf # all perf suites, verbose
|
|
669
|
+
PERF_REPORT=1 pnpm vitest run src/grid-list/grid-list.perf.test.ts
|
|
670
|
+
```
|
|
671
|
+
|
|
672
|
+
The mutation paths keep a key → raw index map, so a lookup is O(1) rather than
|
|
673
|
+
an O(n) scan of the array:
|
|
674
|
+
|
|
675
|
+
- `updateItem(key, item)` — one lookup and one array copy. Passing the
|
|
676
|
+
identical object is a no-op (no copy, no emit).
|
|
677
|
+
- `updateItems(entries)` — many replacements, one copy, one rebuild.
|
|
678
|
+
- `appendItems(items)` — the appended items are added to the map; the existing
|
|
679
|
+
ones are not re-scanned.
|
|
680
|
+
|
|
611
681
|
Things that keep the per-frame paths flat, and that the benchmark guards:
|
|
612
682
|
|
|
613
683
|
- **Cell recycling.** Cells are keyed by a stable cell id, not the item key, so
|
package/docs-user/index.json
CHANGED
package/docs-user/notifier.md
CHANGED
|
@@ -67,6 +67,34 @@ NotificationManager.configure({
|
|
|
67
67
|
|
|
68
68
|
---
|
|
69
69
|
|
|
70
|
+
## Scoped managers, history and unread
|
|
71
|
+
|
|
72
|
+
`NotificationManager` is the default, app-wide instance. Every instance has its own queue, timers, renderer and options, so toasts can sit beside the component they concern:
|
|
73
|
+
|
|
74
|
+
```typescript
|
|
75
|
+
import { createNotificationManager, NotificationManager } from '../src/index.js';
|
|
76
|
+
|
|
77
|
+
const lister = NotificationManager.scope('lister-1', { renderer: myAnchoredRenderer }); // get-or-create by name
|
|
78
|
+
// or, unregistered: const lister = createNotificationManager({ renderer: myAnchoredRenderer });
|
|
79
|
+
lister.notify({ type: 'info', message: 'Moved 3 items' });
|
|
80
|
+
NotificationManager.releaseScope('lister-1'); // on unmount: dismiss, detach, forget
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Each instance also keeps a bounded history (`historyLimit`, default 100; `0` disables):
|
|
84
|
+
|
|
85
|
+
| API | Description |
|
|
86
|
+
|---|---|
|
|
87
|
+
| `getHistory()` | Snapshot of `{ ...Notification, read, dismissedAt? }`, oldest first; includes toasts no longer visible |
|
|
88
|
+
| `unreadCount` | Entries not yet read — drive a bell indicator |
|
|
89
|
+
| `markRead(id)` / `markAllRead()` | Mark read. Tapping a toast also marks it read |
|
|
90
|
+
| `clearHistory()` | Drop history |
|
|
91
|
+
| `subscribe(listener)` | Called with the history on every change; returns an unsubscribe function |
|
|
92
|
+
| `destroy()` | Dismiss all, drop history/listeners, detach renderer |
|
|
93
|
+
|
|
94
|
+
Scoped instances with no `renderer` fall back to the default top-right pill renderer, which is viewport-anchored — give anchored scopes a custom renderer.
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
70
98
|
## Queueing model
|
|
71
99
|
|
|
72
100
|
- **`queue: false`** — a message is always shown alone, for the full `timeout`/`timeoutError`. A new `notify()` call immediately replaces whatever is showing.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ixfx/components",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.18.0",
|
|
5
5
|
"packageManager": "pnpm@10.0.0",
|
|
6
6
|
"description": "Web components for ixfx — Lit-based UI toolkit",
|
|
7
7
|
"author": "Clint Heyer",
|
|
@@ -268,7 +268,7 @@
|
|
|
268
268
|
}
|
|
269
269
|
},
|
|
270
270
|
"dependencies": {
|
|
271
|
-
"@clinth/ui-commands": "1.
|
|
271
|
+
"@clinth/ui-commands": "1.2.0",
|
|
272
272
|
"@clinth/vcanvas": "0.0.6",
|
|
273
273
|
"@ixfx/arrays": "0.56.21",
|
|
274
274
|
"@ixfx/collections": "0.56.21",
|
|
@@ -290,7 +290,7 @@
|
|
|
290
290
|
"eslint-plugin-format": "2.0.1",
|
|
291
291
|
"globals": "17.14.0",
|
|
292
292
|
"happy-dom": "^21.0.4",
|
|
293
|
-
"knip": "6.
|
|
293
|
+
"knip": "6.45.0",
|
|
294
294
|
"libavoid-js": "0.5.0-beta.5",
|
|
295
295
|
"lit": "3.3.3",
|
|
296
296
|
"tsdown": "0.23.7",
|