@ixfx/components 0.17.1 → 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 +143 -8
- package/bundle/index.js +205 -204
- 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-OCdjuhng.d.ts → grid-list-Crv-hFJL.d.ts} +9 -3
- package/dist/{grid-list-D2hinM64.js → grid-list-DYU_z2K9.js} +3 -2
- package/dist/grid-list.d.ts +2 -2
- 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 +5 -0
- package/docs-user/index.json +2 -2
- package/docs-user/notifier.md +28 -0
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -9,28 +9,28 @@ import { TitlebarElement } from "./titlebar.js";
|
|
|
9
9
|
import { n as buttonStyles, t as ButtonElement } from "./button-BOX1dfyd.js";
|
|
10
10
|
import { t as prominenceStyles } from "./prominence-BOOQVWF-.js";
|
|
11
11
|
import { t as IxfxIconElement } from "./icon-DvTQuylG.js";
|
|
12
|
-
import "./menu-item-
|
|
12
|
+
import "./menu-item-D0zy1yax.js";
|
|
13
13
|
import { Checkbox } from "./checkbox.js";
|
|
14
|
-
import { t as CheckedSelect } from "./checked-select-
|
|
14
|
+
import { t as CheckedSelect } from "./checked-select-DsQ-o9lI.js";
|
|
15
15
|
import { i as ICON_CLOSE, n as ICON_CHECK, r as ICON_CHEVRON_DOWN, t as ICON_CARET_RIGHT } from "./defaults-_6ELsqLb.js";
|
|
16
16
|
import { n as ColourPicker, t as ColourPickerPopup } from "./colour-picker-D8g-bTSF.js";
|
|
17
17
|
import { t as DataController } from "./data-controller-q-rXRMzJ.js";
|
|
18
18
|
import { t as collectDataResult } from "./data-provider-C6ZNAcaT.js";
|
|
19
19
|
import { a as toGroupKey, i as resolveGroupKey, n as defaultGroupLabel, o as toggleInSet, r as partitionByGroup, t as EMPTY_GROUP_LABEL } from "./grouping-kENdqzSV.js";
|
|
20
|
-
import { a as listItemFadeKeyframes, c as captionForEntry, i as animateListItemOut, l as createDefaultListDragPreview, n as LIST_ITEM_MOTION_MS, o as prefersReducedMotion, r as animateListItemIn, s as startListItemOutAnimation, t as ListNativeDragController } from "./list-native-drag-controller-
|
|
20
|
+
import { a as listItemFadeKeyframes, c as captionForEntry, i as animateListItemOut, l as createDefaultListDragPreview, n as LIST_ITEM_MOTION_MS, o as prefersReducedMotion, r as animateListItemIn, s as startListItemOutAnimation, t as ListNativeDragController } from "./list-native-drag-controller-Brk30s5d.js";
|
|
21
21
|
import { i as ListDragSelectController, n as gestureOf, r as isMultiMode, t as ListSelectionController } from "./list-selection-controller-Dkh3m3hX.js";
|
|
22
22
|
import { a as capKeys, c as keysAsFlags, d as partitionKeys, f as withoutFlag, i as capFlags, l as keysToArray, n as EMPTY_KEYS, o as flagsFromRecord, r as MAX_PENDING_KEYS, s as flagsToRecord, t as EMPTY_FLAGS, u as partitionFlags } from "./pending-Afl4LT64.js";
|
|
23
23
|
import { i as sameKeySet, n as applyPartialAttributes, r as isPartialKey, t as PARTIAL_DESCRIPTION } from "./partial-keys-D4l_ede_.js";
|
|
24
24
|
import { n as createScrollHoverGuard, t as SCROLL_HOVER_SUPPRESS_ATTR } from "./scroll-hover-guard-BGAjtyXT.js";
|
|
25
|
-
import { a as TreeDataModel, c as pruneDraggedDescendants, i as TreeDropController, n as TreeListElement, o as applyTreeDrop, r as TreeBaseElement, s as dropTargetFor, t as TreeController } from "./tree-
|
|
26
|
-
import { t as CrumbNavigationElement } from "./crumb-navigation-
|
|
25
|
+
import { a as TreeDataModel, c as pruneDraggedDescendants, i as TreeDropController, n as TreeListElement, o as applyTreeDrop, r as TreeBaseElement, s as dropTargetFor, t as TreeController } from "./tree-1CSNgw72.js";
|
|
26
|
+
import { t as CrumbNavigationElement } from "./crumb-navigation-09YFje6W.js";
|
|
27
27
|
import { t as popupSurfaceStyles } from "./popup-D8IxN1Eq.js";
|
|
28
28
|
import { t as scrollFadeStyles } from "./scroll-fade-DH8OXSqL.js";
|
|
29
29
|
import { DataDisplayComponent } from "./data-display.js";
|
|
30
|
-
import { t as DataGridElement } from "./data-grid-
|
|
31
|
-
import "./interaction-
|
|
30
|
+
import { t as DataGridElement } from "./data-grid-BGmJbMCb.js";
|
|
31
|
+
import "./interaction-BEcBIY0d.js";
|
|
32
32
|
import { DateInputElement, formatDateInput, parseDateInput } from "./date-input.js";
|
|
33
|
-
import { t as DetailListElement } from "./detail-list-
|
|
33
|
+
import { t as DetailListElement } from "./detail-list-CrHASoAx.js";
|
|
34
34
|
import { t as createDragGhost } from "./drag-ghost-DNWu_RyN.js";
|
|
35
35
|
import { a as distribute, c as preserveRestoreWeights, d as toSnapshot, f as walk, i as buildModel, l as resolveTracks, n as SplitPanelElement, o as findPanelNode, r as applySnapshot, s as normalise, t as SplitLayoutElement, u as setPanelRestoreWeight } from "./split-layout-BMN_s6d7.js";
|
|
36
36
|
import { t as TabListElement } from "./tab-list-CFJy3hVm.js";
|
|
@@ -38,9 +38,9 @@ import { EditableLabel } from "./editable-label.js";
|
|
|
38
38
|
import { n as EditableNumber, t as LabelledSliderInput } from "./labelled-slider-input-CfRKd5kC.js";
|
|
39
39
|
import { FlatListElement } from "./flat-list.js";
|
|
40
40
|
import { n as formStyles, r as adoptLightDomStyles, t as FormElement } from "./form-Cxx2sO8_.js";
|
|
41
|
-
import { t as GridListElement } from "./grid-list-
|
|
41
|
+
import { t as GridListElement } from "./grid-list-DYU_z2K9.js";
|
|
42
42
|
import { GroupedItemListerElement } from "./grouped-item-lister.js";
|
|
43
|
-
import { t as VerticalListElement } from "./vertical-list-
|
|
43
|
+
import { t as VerticalListElement } from "./vertical-list-BNCRA_zy.js";
|
|
44
44
|
import { t as IxfxHexEditorElement } from "./hex-editor-DephDhuu.js";
|
|
45
45
|
import { a as LIST_SEARCH_COMMAND_IDS, c as createElementListSearchAdapter, f as createDataListSearchAdapter, g as createFuzzySearch, h as createAcCompletionProvider, i as ListSearchController, l as KeyedElementIndex, m as createIncrSearch, n as listSearchStyles, o as registerListSearchCommands, p as IncrSearchTreeController, r as LIST_SEARCH_MODES, s as createElementIncrSearch, t as createTreeListSearchAdapter, u as keyForElement } from "./incr-search-C5114RxZ.js";
|
|
46
46
|
import { t as TickledController } from "./tickled-controller-BVhGKzjZ.js";
|
|
@@ -51,11 +51,11 @@ import { LabelledRadialInput } from "./labelled-radial-input.js";
|
|
|
51
51
|
import { LabelledRangeInput } from "./labelled-range-input.js";
|
|
52
52
|
import { LedElement } from "./led.js";
|
|
53
53
|
import { ListGroupHeaderElement } from "./list-group-header.js";
|
|
54
|
-
import { a as menuFromTreeToElements, t as menu_exports } from "./menu-
|
|
55
|
-
import { n as MillerListElement, r as MillerBaseElement, t as MillerTreeController } from "./miller-
|
|
54
|
+
import { a as menuFromTreeToElements, t as menu_exports } from "./menu-B6NFqEtm.js";
|
|
55
|
+
import { n as MillerListElement, r as MillerBaseElement, t as MillerTreeController } from "./miller-B0qbnWwe.js";
|
|
56
56
|
import { a as iconBus, c as setIconFont, i as hasIcon, l as svgToDataUri, n as getIconEntry, o as registerFontIcon, r as getIconFont, s as registerIcon, t as getIcon } from "./registry-DcF0fO7l.js";
|
|
57
57
|
import { NarrowedTextElement } from "./narrowed-text.js";
|
|
58
|
-
import { $ as forceState, A as marqueeStyle, At as outDegreeOf, B as NODE_SHAPES, C as zoomAt, Ct as edgeId, D as MARQUEE_THRESHOLD_PX, Dt as inDegreeOf, E as NodeDragController, Et as hasWire, F as findSnapTarget, Ft as toEdges, G as resizeRect, H as shapeSpec, I as proximityFactor, It as toNodeGraph, J as blinkPeriodSeconds, K as GraphPortElement, L as settled, M as rectFromPoints, Mt as portId, N as rectsIntersect, Nt as removeNode, O as MarqueeController, Ot as incomingEdge, P as wantsMarquee, Pt as removeWire, Q as forcePositions, R as smoothStep, S as screenToFlow, St as cycleBlockedNodes, T as DRAG_THRESHOLD_PX, Tt as fromEdges, U as RESIZE_HANDLES, V as isNodeShape, W as isResizeHandle, X as forceMovement, Y as DEFAULT_FORCE_OPTIONS, Z as forcePin, _ as clampZoom, _t as normaliseConnection, a as selectionAfterNodePress, at as edgeShape, b as flowToScreen, bt as addWire, c as collapsedOffset, ct as polylinePath, d as sanitizeFlowSpeed, dt as EASY_CONNECT_MARGIN, et as forceStep, f as withEntry, ft as inEasyConnectZone, g as boundsOf, gt as findValidWire, h as isEditableTarget, ht as canConnect, i as selectionAfterEdgeClick, it as edgePath, j as nodesInRect, jt as parsePortId, k as combineSelection, kt as incomingEdges, l as measureNode, lt as polylineShape, m as PanZoomController, mt as removeNodes, n as renderWires, nt as defaultSide, o as findProximityConnection, ot as extendFromSide, p as withWireFlow, pt as pickStartPort, q as MAX_BLINK_HZ, r as WireDragController, rt as edgeMidpoint, s as rectGap, st as polylineMidpoint, t as NodeGraphElement, tt as EDGE_CORNER_RADIUS, u as MAX_FLOW_SPEED, ut as stepPoints, v as fitBounds, vt as resolveConnection, w as nodeGraphStyles, wt as ensurePort, x as panBy, xt as connectContext, y as fitRects, yt as typesCompatible, z as GraphNodeElement } from "./node-graph-
|
|
58
|
+
import { $ as forceState, A as marqueeStyle, At as outDegreeOf, B as NODE_SHAPES, C as zoomAt, Ct as edgeId, D as MARQUEE_THRESHOLD_PX, Dt as inDegreeOf, E as NodeDragController, Et as hasWire, F as findSnapTarget, Ft as toEdges, G as resizeRect, H as shapeSpec, I as proximityFactor, It as toNodeGraph, J as blinkPeriodSeconds, K as GraphPortElement, L as settled, M as rectFromPoints, Mt as portId, N as rectsIntersect, Nt as removeNode, O as MarqueeController, Ot as incomingEdge, P as wantsMarquee, Pt as removeWire, Q as forcePositions, R as smoothStep, S as screenToFlow, St as cycleBlockedNodes, T as DRAG_THRESHOLD_PX, Tt as fromEdges, U as RESIZE_HANDLES, V as isNodeShape, W as isResizeHandle, X as forceMovement, Y as DEFAULT_FORCE_OPTIONS, Z as forcePin, _ as clampZoom, _t as normaliseConnection, a as selectionAfterNodePress, at as edgeShape, b as flowToScreen, bt as addWire, c as collapsedOffset, ct as polylinePath, d as sanitizeFlowSpeed, dt as EASY_CONNECT_MARGIN, et as forceStep, f as withEntry, ft as inEasyConnectZone, g as boundsOf, gt as findValidWire, h as isEditableTarget, ht as canConnect, i as selectionAfterEdgeClick, it as edgePath, j as nodesInRect, jt as parsePortId, k as combineSelection, kt as incomingEdges, l as measureNode, lt as polylineShape, m as PanZoomController, mt as removeNodes, n as renderWires, nt as defaultSide, o as findProximityConnection, ot as extendFromSide, p as withWireFlow, pt as pickStartPort, q as MAX_BLINK_HZ, r as WireDragController, rt as edgeMidpoint, s as rectGap, st as polylineMidpoint, t as NodeGraphElement, tt as EDGE_CORNER_RADIUS, u as MAX_FLOW_SPEED, ut as stepPoints, v as fitBounds, vt as resolveConnection, w as nodeGraphStyles, wt as ensurePort, x as panBy, xt as connectContext, y as fitRects, yt as typesCompatible, z as GraphNodeElement } from "./node-graph-D9iovxQp.js";
|
|
59
59
|
import { NotificationPillElement } from "./notifier.js";
|
|
60
60
|
import { t as PanTextElement } from "./pan-text-DrJYKQKN.js";
|
|
61
61
|
import { PanelElement } from "./panel.js";
|
|
@@ -1538,6 +1538,11 @@ var CrumbPathController = class {
|
|
|
1538
1538
|
};
|
|
1539
1539
|
// src/crumbs/crumb-path.ts
|
|
1540
1540
|
const INVALID_ANCHOR_CHARS_RE = /[^\w-]/g;
|
|
1541
|
+
/**
|
|
1542
|
+
* Internal delimiter for cumulative-path keys (`data-cumulative`, sibling
|
|
1543
|
+
* cache). Deliberately not the display `separator`, so a label may contain it.
|
|
1544
|
+
*/
|
|
1545
|
+
const KEY_SEP = `\u001F`;
|
|
1541
1546
|
let CrumbPathElement = class CrumbPathElement extends LitElement {
|
|
1542
1547
|
constructor(..._args) {
|
|
1543
1548
|
super(..._args);
|
|
@@ -1559,6 +1564,7 @@ let CrumbPathElement = class CrumbPathElement extends LitElement {
|
|
|
1559
1564
|
this._hintSegments = null;
|
|
1560
1565
|
this.#uid = Math.random().toString(36).slice(2, 8);
|
|
1561
1566
|
this.#clickSuppressUntil = 0;
|
|
1567
|
+
this.#hintValues = [];
|
|
1562
1568
|
this.#onPopoverToggle = (e) => {
|
|
1563
1569
|
if (e.newState === `closed` && this._openIdx !== null) {
|
|
1564
1570
|
this._openIdx = null;
|
|
@@ -1614,8 +1620,10 @@ let CrumbPathElement = class CrumbPathElement extends LitElement {
|
|
|
1614
1620
|
#uid;
|
|
1615
1621
|
/** Clicks within this window after a drag are ignored (post-drag click-through guard). */
|
|
1616
1622
|
#clickSuppressUntil;
|
|
1623
|
+
/** Values parallel to `_hintSegments`, recorded in structured mode. */
|
|
1624
|
+
#hintValues;
|
|
1617
1625
|
#anchorName(cumPath) {
|
|
1618
|
-
return `--cp-${this.#uid}-${cumPath.replaceAll(this.separator, `-`).replaceAll(` `, `-`).replace(INVALID_ANCHOR_CHARS_RE, `-`)}`;
|
|
1626
|
+
return `--cp-${this.#uid}-${cumPath.replaceAll(KEY_SEP, `-`).replaceAll(this.separator, `-`).replaceAll(` `, `-`).replace(INVALID_ANCHOR_CHARS_RE, `-`)}`;
|
|
1619
1627
|
}
|
|
1620
1628
|
#closeDropdown() {
|
|
1621
1629
|
if (this._openIdx !== null) {
|
|
@@ -1660,7 +1668,41 @@ let CrumbPathElement = class CrumbPathElement extends LitElement {
|
|
|
1660
1668
|
this.#pendingIndex = void 0;
|
|
1661
1669
|
}
|
|
1662
1670
|
}
|
|
1671
|
+
willUpdate(changed) {
|
|
1672
|
+
if (changed.has(`segments`) && this.segments !== void 0) {
|
|
1673
|
+
const text = this.segments.map((seg) => seg.label).join(this.separator);
|
|
1674
|
+
if (text !== this.path) this.path = text;
|
|
1675
|
+
}
|
|
1676
|
+
}
|
|
1677
|
+
/** Structured segments, or the text path parsed into value-less segments. */
|
|
1678
|
+
getSegments() {
|
|
1679
|
+
return this.segments ? this.segments.map((seg) => ({ ...seg })) : this.#getSegments().map((label) => ({ label }));
|
|
1680
|
+
}
|
|
1681
|
+
/**
|
|
1682
|
+
* Apply a new relative path. In structured mode also rebuilds `segments`,
|
|
1683
|
+
* reusing existing/hinted values where the label at that index is unchanged
|
|
1684
|
+
* and taking `tailValue` for the final segment.
|
|
1685
|
+
*/
|
|
1686
|
+
#assignPath(labels, hadLeading, tailValue) {
|
|
1687
|
+
const joined = labels.join(this.separator);
|
|
1688
|
+
if (this.segments === void 0) {
|
|
1689
|
+
this.path = hadLeading ? this.separator + joined : joined;
|
|
1690
|
+
return joined;
|
|
1691
|
+
}
|
|
1692
|
+
const previous = this.segments;
|
|
1693
|
+
this.segments = labels.map((label, i) => {
|
|
1694
|
+
let value = previous[i]?.label === label ? previous[i].value : this.#hintValues[i];
|
|
1695
|
+
if (i === labels.length - 1 && tailValue !== void 0) value = tailValue;
|
|
1696
|
+
return value === void 0 ? { label } : {
|
|
1697
|
+
label,
|
|
1698
|
+
value
|
|
1699
|
+
};
|
|
1700
|
+
});
|
|
1701
|
+
this.path = joined;
|
|
1702
|
+
return joined;
|
|
1703
|
+
}
|
|
1663
1704
|
#getSegments() {
|
|
1705
|
+
if (this.segments) return this.segments.map((seg) => seg.label);
|
|
1664
1706
|
const fullPath = this.path;
|
|
1665
1707
|
if (this.pathRoot.length > 0 && fullPath.startsWith(this.pathRoot)) return fullPath.slice(this.pathRoot.length).split(this.separator).filter((p) => p.length > 0);
|
|
1666
1708
|
return this.path.split(this.separator).filter((p) => p.length > 0);
|
|
@@ -1672,8 +1714,8 @@ let CrumbPathElement = class CrumbPathElement extends LitElement {
|
|
|
1672
1714
|
#getCumulativePath(index, isRoot) {
|
|
1673
1715
|
const segments = this.#getSegments();
|
|
1674
1716
|
const rootSegments = this.#getRootSegments();
|
|
1675
|
-
if (isRoot) return rootSegments.slice(0, index + 1).join(
|
|
1676
|
-
return [...rootSegments, ...segments.slice(0, index + 1)].join(
|
|
1717
|
+
if (isRoot) return rootSegments.slice(0, index + 1).join(KEY_SEP);
|
|
1718
|
+
return [...rootSegments, ...segments.slice(0, index + 1)].join(KEY_SEP);
|
|
1677
1719
|
}
|
|
1678
1720
|
#resolveFullPathSegments(index, isRoot) {
|
|
1679
1721
|
const rootSegments = this.#getRootSegments();
|
|
@@ -1703,21 +1745,28 @@ let CrumbPathElement = class CrumbPathElement extends LitElement {
|
|
|
1703
1745
|
#recordHintOnShorten(oldSegments, newSegments) {
|
|
1704
1746
|
if (!this.hintPrevious) return;
|
|
1705
1747
|
const hint = this._hintSegments;
|
|
1706
|
-
if (!(hint !== null && this.#isSegmentPrefix(newSegments, hint)))
|
|
1748
|
+
if (!(hint !== null && this.#isSegmentPrefix(newSegments, hint))) {
|
|
1749
|
+
this._hintSegments = oldSegments;
|
|
1750
|
+
this.#hintValues = this.segments?.map((seg) => seg.value) ?? [];
|
|
1751
|
+
}
|
|
1707
1752
|
}
|
|
1708
1753
|
#resolveSegmentIcon(fullPathSegments, index) {
|
|
1709
1754
|
const direct = this.segmentIconLookup?.(fullPathSegments, index);
|
|
1710
1755
|
if (typeof direct === `string` && direct.length > 0) return direct;
|
|
1711
1756
|
const label = fullPathSegments[index];
|
|
1712
1757
|
if (label === void 0) return;
|
|
1713
|
-
const parentKey = fullPathSegments.slice(0, index).join(
|
|
1758
|
+
const parentKey = fullPathSegments.slice(0, index).join(KEY_SEP);
|
|
1714
1759
|
return (this._cachedSiblings.get(parentKey)?.find((s) => s.label === label))?.icon;
|
|
1715
1760
|
}
|
|
1716
1761
|
setPath(newPath) {
|
|
1717
1762
|
this.#cleanupPending();
|
|
1718
1763
|
if (this.pathRoot.length > 0 && !newPath.startsWith(this.pathRoot)) newPath = this.pathRoot;
|
|
1719
|
-
if (newPath === this.path) return;
|
|
1720
|
-
this.
|
|
1764
|
+
if (newPath === this.path && this.segments === void 0) return;
|
|
1765
|
+
if (this.segments !== void 0) {
|
|
1766
|
+
const labels = newPath.split(this.separator).filter((p) => p.length > 0);
|
|
1767
|
+
if (labels.join(this.separator) === this.path) return;
|
|
1768
|
+
this.#assignPath(labels, false);
|
|
1769
|
+
} else this.path = newPath;
|
|
1721
1770
|
this._cachedSiblings = /* @__PURE__ */ new Map();
|
|
1722
1771
|
this._openIdx = null;
|
|
1723
1772
|
this._leafSegmentIndex = null;
|
|
@@ -1732,6 +1781,10 @@ let CrumbPathElement = class CrumbPathElement extends LitElement {
|
|
|
1732
1781
|
getPath() {
|
|
1733
1782
|
return this.path;
|
|
1734
1783
|
}
|
|
1784
|
+
/** `{ segments }` event-detail fragment in structured mode, else nothing. */
|
|
1785
|
+
#segmentsDetail() {
|
|
1786
|
+
return this.segments ? { segments: this.getSegments() } : {};
|
|
1787
|
+
}
|
|
1735
1788
|
#onCaretClick(index, event) {
|
|
1736
1789
|
event.preventDefault();
|
|
1737
1790
|
event.stopPropagation();
|
|
@@ -1745,7 +1798,7 @@ let CrumbPathElement = class CrumbPathElement extends LitElement {
|
|
|
1745
1798
|
this._dropdownActiveIndex = -1;
|
|
1746
1799
|
const segments = this.#getSegments();
|
|
1747
1800
|
const rootSegments = this.#getRootSegments();
|
|
1748
|
-
const pathSegments = cumPath ? cumPath.split(
|
|
1801
|
+
const pathSegments = cumPath ? cumPath.split(KEY_SEP).filter((p) => p.length > 0) : index === -1 ? rootSegments : segments.slice(0, index + 1);
|
|
1749
1802
|
const cacheKey = cumPath ?? String(index);
|
|
1750
1803
|
if (!this._cachedSiblings.has(cacheKey) && this.siblingLookup) {
|
|
1751
1804
|
this.#cleanupPending();
|
|
@@ -1915,8 +1968,7 @@ let CrumbPathElement = class CrumbPathElement extends LitElement {
|
|
|
1915
1968
|
const truncatedSegments = segments.slice(0, index + 1);
|
|
1916
1969
|
this.#recordHintOnShorten(segments, truncatedSegments);
|
|
1917
1970
|
const hadLeading = this.path.startsWith(this.separator);
|
|
1918
|
-
const newPath = truncatedSegments
|
|
1919
|
-
this.path = hadLeading ? this.separator + newPath : newPath;
|
|
1971
|
+
const newPath = this.#assignPath(truncatedSegments, hadLeading);
|
|
1920
1972
|
this._cachedSiblings = /* @__PURE__ */ new Map();
|
|
1921
1973
|
this._leafSegmentIndex = null;
|
|
1922
1974
|
const parentPath = truncatedSegments.slice(0, -1).join(this.separator);
|
|
@@ -1925,7 +1977,8 @@ let CrumbPathElement = class CrumbPathElement extends LitElement {
|
|
|
1925
1977
|
index,
|
|
1926
1978
|
label: truncatedSegments[index],
|
|
1927
1979
|
parentPath,
|
|
1928
|
-
fullPath: newPath
|
|
1980
|
+
fullPath: newPath,
|
|
1981
|
+
...this.#segmentsDetail()
|
|
1929
1982
|
},
|
|
1930
1983
|
bubbles: true,
|
|
1931
1984
|
composed: true
|
|
@@ -1940,8 +1993,7 @@ let CrumbPathElement = class CrumbPathElement extends LitElement {
|
|
|
1940
1993
|
if (!hint) return;
|
|
1941
1994
|
const truncatedSegments = hint.slice(0, hintIndex + 1);
|
|
1942
1995
|
const hadLeading = this.path.startsWith(this.separator);
|
|
1943
|
-
const newPath = truncatedSegments
|
|
1944
|
-
this.path = hadLeading ? this.separator + newPath : newPath;
|
|
1996
|
+
const newPath = this.#assignPath(truncatedSegments, hadLeading);
|
|
1945
1997
|
this._cachedSiblings = /* @__PURE__ */ new Map();
|
|
1946
1998
|
this._leafSegmentIndex = null;
|
|
1947
1999
|
const parentPath = truncatedSegments.slice(0, -1).join(this.separator);
|
|
@@ -1950,7 +2002,8 @@ let CrumbPathElement = class CrumbPathElement extends LitElement {
|
|
|
1950
2002
|
index: hintIndex,
|
|
1951
2003
|
label: truncatedSegments[hintIndex],
|
|
1952
2004
|
parentPath,
|
|
1953
|
-
fullPath: newPath
|
|
2005
|
+
fullPath: newPath,
|
|
2006
|
+
...this.#segmentsDetail()
|
|
1954
2007
|
},
|
|
1955
2008
|
bubbles: true,
|
|
1956
2009
|
composed: true
|
|
@@ -1962,7 +2015,7 @@ let CrumbPathElement = class CrumbPathElement extends LitElement {
|
|
|
1962
2015
|
const segments = this.#getSegments();
|
|
1963
2016
|
const rootSegments = this.#getRootSegments();
|
|
1964
2017
|
let newSegments;
|
|
1965
|
-
if (cumPath) newSegments = [...cumPath.split(
|
|
2018
|
+
if (cumPath) newSegments = [...cumPath.split(KEY_SEP).filter((p) => p.length > 0), segment.label];
|
|
1966
2019
|
else if (this.pathRoot.length > 0 && index < rootSegments.length) newSegments = [...rootSegments.slice(0, index + 1), segment.label];
|
|
1967
2020
|
else newSegments = [
|
|
1968
2021
|
...rootSegments,
|
|
@@ -1970,8 +2023,7 @@ let CrumbPathElement = class CrumbPathElement extends LitElement {
|
|
|
1970
2023
|
segment.label
|
|
1971
2024
|
];
|
|
1972
2025
|
const hadLeading = this.path.startsWith(this.separator);
|
|
1973
|
-
const newPath = newSegments.
|
|
1974
|
-
this.path = hadLeading ? this.separator + newPath : newPath;
|
|
2026
|
+
const newPath = this.#assignPath(newSegments, hadLeading, segment.value);
|
|
1975
2027
|
this._cachedSiblings = /* @__PURE__ */ new Map();
|
|
1976
2028
|
const leafIndex = segment.isLeaf ? newSegments.length - 1 : null;
|
|
1977
2029
|
this._leafSegmentIndex = leafIndex;
|
|
@@ -1982,7 +2034,8 @@ let CrumbPathElement = class CrumbPathElement extends LitElement {
|
|
|
1982
2034
|
index,
|
|
1983
2035
|
label: segment.label,
|
|
1984
2036
|
parentPath,
|
|
1985
|
-
fullPath: newPath
|
|
2037
|
+
fullPath: newPath,
|
|
2038
|
+
...this.#segmentsDetail()
|
|
1986
2039
|
},
|
|
1987
2040
|
bubbles: true,
|
|
1988
2041
|
composed: true
|
|
@@ -2147,7 +2200,7 @@ let CrumbPathElement = class CrumbPathElement extends LitElement {
|
|
|
2147
2200
|
#onAcChange(e) {
|
|
2148
2201
|
e.stopPropagation();
|
|
2149
2202
|
const newPath = e.detail.value;
|
|
2150
|
-
this
|
|
2203
|
+
this.#applyEditedText(newPath);
|
|
2151
2204
|
this._cachedSiblings = /* @__PURE__ */ new Map();
|
|
2152
2205
|
this._leafSegmentIndex = newPath.endsWith(this.separator) ? null : newPath.split(this.separator).filter((p) => p.length > 0).length - 1;
|
|
2153
2206
|
this._editing = false;
|
|
@@ -2161,7 +2214,7 @@ let CrumbPathElement = class CrumbPathElement extends LitElement {
|
|
|
2161
2214
|
if (!this._editingCancelled) {
|
|
2162
2215
|
const newPath = (this.shadowRoot?.querySelector(`ixfx-ac-text`))?.value ?? this.path;
|
|
2163
2216
|
if (newPath !== this.path) {
|
|
2164
|
-
this
|
|
2217
|
+
this.#applyEditedText(newPath);
|
|
2165
2218
|
this._cachedSiblings = /* @__PURE__ */ new Map();
|
|
2166
2219
|
this._leafSegmentIndex = newPath.endsWith(this.separator) ? null : newPath.split(this.separator).filter((p) => p.length > 0).length - 1;
|
|
2167
2220
|
this.#dispatchChangeEvent(newPath);
|
|
@@ -2171,15 +2224,24 @@ let CrumbPathElement = class CrumbPathElement extends LitElement {
|
|
|
2171
2224
|
this._editStartIndex = null;
|
|
2172
2225
|
}
|
|
2173
2226
|
}
|
|
2227
|
+
/** Edited text is split on the separator; in structured mode this rebuilds `segments`. */
|
|
2228
|
+
#applyEditedText(text) {
|
|
2229
|
+
if (this.segments === void 0) {
|
|
2230
|
+
this.path = text;
|
|
2231
|
+
return;
|
|
2232
|
+
}
|
|
2233
|
+
this.#assignPath(text.split(this.separator).filter((p) => p.length > 0), false);
|
|
2234
|
+
}
|
|
2174
2235
|
#dispatchChangeEvent(newPath) {
|
|
2175
|
-
const segments = newPath.split(this.separator).filter((p) => p.length > 0);
|
|
2236
|
+
const segments = this.segments ? this.segments.map((seg) => seg.label) : newPath.split(this.separator).filter((p) => p.length > 0);
|
|
2176
2237
|
const label = segments.at(-1) ?? ``;
|
|
2177
2238
|
const parentPath = segments.slice(0, -1).join(this.separator);
|
|
2178
2239
|
this.dispatchEvent(new CustomEvent(`change`, {
|
|
2179
2240
|
detail: {
|
|
2180
2241
|
label,
|
|
2181
2242
|
parentPath,
|
|
2182
|
-
fullPath: newPath
|
|
2243
|
+
fullPath: newPath,
|
|
2244
|
+
...this.#segmentsDetail()
|
|
2183
2245
|
},
|
|
2184
2246
|
bubbles: true,
|
|
2185
2247
|
composed: true
|
|
@@ -2450,6 +2512,7 @@ let CrumbPathElement = class CrumbPathElement extends LitElement {
|
|
|
2450
2512
|
}
|
|
2451
2513
|
};
|
|
2452
2514
|
__decorate([property({ type: String })], CrumbPathElement.prototype, "path", void 0);
|
|
2515
|
+
__decorate([property({ attribute: false })], CrumbPathElement.prototype, "segments", void 0);
|
|
2453
2516
|
__decorate([property({ type: String })], CrumbPathElement.prototype, "separator", void 0);
|
|
2454
2517
|
__decorate([property({
|
|
2455
2518
|
type: String,
|
|
@@ -12276,58 +12339,104 @@ function createPillRenderer(options = {}) {
|
|
|
12276
12339
|
};
|
|
12277
12340
|
}
|
|
12278
12341
|
// src/notifier/manager.ts
|
|
12279
|
-
const
|
|
12280
|
-
|
|
12281
|
-
|
|
12282
|
-
|
|
12283
|
-
|
|
12284
|
-
|
|
12285
|
-
|
|
12286
|
-
|
|
12287
|
-
|
|
12288
|
-
|
|
12289
|
-
|
|
12290
|
-
|
|
12291
|
-
|
|
12292
|
-
|
|
12293
|
-
|
|
12294
|
-
|
|
12295
|
-
|
|
12296
|
-
|
|
12297
|
-
|
|
12298
|
-
}
|
|
12299
|
-
|
|
12300
|
-
|
|
12301
|
-
|
|
12302
|
-
|
|
12303
|
-
|
|
12304
|
-
|
|
12305
|
-
|
|
12342
|
+
const DEFAULT_HISTORY_LIMIT = 100;
|
|
12343
|
+
function createNotificationManager(initial = {}) {
|
|
12344
|
+
const options = {
|
|
12345
|
+
renderer: void 0,
|
|
12346
|
+
timeout: 4e3,
|
|
12347
|
+
timeoutError: 8e3,
|
|
12348
|
+
queue: true,
|
|
12349
|
+
queueSize: 3,
|
|
12350
|
+
tapBehaviour: `dismiss`,
|
|
12351
|
+
tapHandlerDefault: void 0,
|
|
12352
|
+
historyLimit: DEFAULT_HISTORY_LIMIT
|
|
12353
|
+
};
|
|
12354
|
+
/** Rank-ordered, index 0 = oldest/first (next to be evicted or timed out). Length never exceeds queueSize (or 1 when queuing is disabled). */
|
|
12355
|
+
const visible = [];
|
|
12356
|
+
const history = [];
|
|
12357
|
+
const listeners = /* @__PURE__ */ new Set();
|
|
12358
|
+
let renderer = null;
|
|
12359
|
+
let defaultRenderer = null;
|
|
12360
|
+
function getDefaultRenderer() {
|
|
12361
|
+
defaultRenderer ??= createPillRenderer({ position: `top-right` });
|
|
12362
|
+
return defaultRenderer;
|
|
12363
|
+
}
|
|
12364
|
+
function getRenderer() {
|
|
12365
|
+
return renderer ?? getDefaultRenderer();
|
|
12366
|
+
}
|
|
12367
|
+
function syncRenderer() {
|
|
12368
|
+
getRenderer().setNotifications([...visible], options.queueSize);
|
|
12369
|
+
}
|
|
12370
|
+
function emitHistory() {
|
|
12371
|
+
if (listeners.size === 0) return;
|
|
12372
|
+
const snapshot = getHistory();
|
|
12373
|
+
for (const listener of [...listeners]) try {
|
|
12374
|
+
listener(snapshot);
|
|
12375
|
+
} catch (err) {
|
|
12376
|
+
console.error(`Notification history listener failed:`, err);
|
|
12377
|
+
}
|
|
12306
12378
|
}
|
|
12307
|
-
|
|
12308
|
-
|
|
12309
|
-
|
|
12310
|
-
|
|
12311
|
-
|
|
12312
|
-
|
|
12313
|
-
|
|
12314
|
-
|
|
12315
|
-
|
|
12316
|
-
|
|
12317
|
-
|
|
12318
|
-
}
|
|
12319
|
-
|
|
12320
|
-
|
|
12321
|
-
|
|
12322
|
-
|
|
12323
|
-
|
|
12324
|
-
|
|
12379
|
+
function getHistory() {
|
|
12380
|
+
return history.map((entry) => ({ ...entry }));
|
|
12381
|
+
}
|
|
12382
|
+
function historyEntry(id) {
|
|
12383
|
+
return history.find((entry) => entry.id === id);
|
|
12384
|
+
}
|
|
12385
|
+
function markDismissed(id) {
|
|
12386
|
+
const entry = historyEntry(id);
|
|
12387
|
+
if (entry && entry.dismissedAt === void 0) {
|
|
12388
|
+
entry.dismissedAt = Date.now();
|
|
12389
|
+
emitHistory();
|
|
12390
|
+
}
|
|
12391
|
+
}
|
|
12392
|
+
function clearTimer(managed) {
|
|
12393
|
+
if (managed.timer !== null) {
|
|
12394
|
+
clearTimeout(managed.timer);
|
|
12395
|
+
managed.timer = null;
|
|
12396
|
+
}
|
|
12397
|
+
}
|
|
12398
|
+
/** Remove from the visible queue (timer + history bookkeeping), without rendering. */
|
|
12399
|
+
function evict(managed) {
|
|
12400
|
+
clearTimer(managed);
|
|
12401
|
+
markDismissed(managed.id);
|
|
12402
|
+
}
|
|
12403
|
+
/**
|
|
12404
|
+
* A message shown alone takes the full timeout. A message that joined a
|
|
12405
|
+
* non-empty queue at arrival time is permanently "wasQueued" and gets
|
|
12406
|
+
* 1/queueSize of the timeout once it reaches the front. The timer for a
|
|
12407
|
+
* given message is only ever started once - when it first becomes front.
|
|
12408
|
+
*/
|
|
12409
|
+
function startTimer(managed) {
|
|
12410
|
+
const base = managed.type === `error` ? options.timeoutError : options.timeout;
|
|
12411
|
+
const duration = managed.wasQueued ? base / options.queueSize : base;
|
|
12412
|
+
managed.timer = window.setTimeout(dismiss, duration, managed.id);
|
|
12413
|
+
}
|
|
12414
|
+
function ensureFrontTimer() {
|
|
12415
|
+
const front = visible[0];
|
|
12416
|
+
if (front && front.timer === null) startTimer(front);
|
|
12417
|
+
}
|
|
12418
|
+
function dismiss(id) {
|
|
12419
|
+
const idx = visible.findIndex((m) => m.id === id);
|
|
12420
|
+
if (idx === -1) return;
|
|
12421
|
+
evict(visible.splice(idx, 1)[0]);
|
|
12422
|
+
ensureFrontTimer();
|
|
12423
|
+
syncRenderer();
|
|
12424
|
+
}
|
|
12425
|
+
function markRead(id) {
|
|
12426
|
+
const entry = historyEntry(id);
|
|
12427
|
+
if (entry && !entry.read) {
|
|
12428
|
+
entry.read = true;
|
|
12429
|
+
emitHistory();
|
|
12430
|
+
}
|
|
12431
|
+
}
|
|
12432
|
+
function configure(opts) {
|
|
12325
12433
|
if (opts.renderer !== void 0) {
|
|
12326
12434
|
renderer?.detach?.();
|
|
12327
12435
|
renderer = opts.renderer;
|
|
12328
12436
|
renderer.attach({ onTap(id) {
|
|
12329
12437
|
const notification = visible.find((n) => n.id === id);
|
|
12330
12438
|
if (!notification) return;
|
|
12439
|
+
markRead(id);
|
|
12331
12440
|
if (notification.onTap) notification.onTap(id);
|
|
12332
12441
|
else options.tapHandlerDefault?.(notification);
|
|
12333
12442
|
if (options.tapBehaviour === `dismiss`) dismiss(id);
|
|
@@ -12339,14 +12448,21 @@ const NotificationManager = {
|
|
|
12339
12448
|
if (opts.queue !== void 0) options.queue = opts.queue;
|
|
12340
12449
|
if (opts.queueSize !== void 0) {
|
|
12341
12450
|
options.queueSize = Math.max(1, opts.queueSize);
|
|
12342
|
-
while (visible.length > options.queueSize)
|
|
12451
|
+
while (visible.length > options.queueSize) evict(visible.shift());
|
|
12343
12452
|
ensureFrontTimer();
|
|
12344
12453
|
syncRenderer();
|
|
12345
12454
|
}
|
|
12346
12455
|
if (opts.tapBehaviour !== void 0) options.tapBehaviour = opts.tapBehaviour;
|
|
12347
12456
|
if (opts.tapHandlerDefault !== void 0) options.tapHandlerDefault = opts.tapHandlerDefault;
|
|
12348
|
-
|
|
12349
|
-
|
|
12457
|
+
if (opts.historyLimit !== void 0) {
|
|
12458
|
+
options.historyLimit = Math.max(0, Math.floor(opts.historyLimit));
|
|
12459
|
+
if (history.length > options.historyLimit) {
|
|
12460
|
+
history.splice(0, history.length - options.historyLimit);
|
|
12461
|
+
emitHistory();
|
|
12462
|
+
}
|
|
12463
|
+
}
|
|
12464
|
+
}
|
|
12465
|
+
function notify(content) {
|
|
12350
12466
|
const id = crypto.randomUUID();
|
|
12351
12467
|
const now = Date.now();
|
|
12352
12468
|
const icon = content.icon ?? (content.type === `error` ? `error` : void 0);
|
|
@@ -12360,44 +12476,114 @@ const NotificationManager = {
|
|
|
12360
12476
|
wasQueued: false
|
|
12361
12477
|
};
|
|
12362
12478
|
if (options.queue) {
|
|
12363
|
-
if (visible.length >= options.queueSize)
|
|
12479
|
+
if (visible.length >= options.queueSize) evict(visible.shift());
|
|
12364
12480
|
managed.wasQueued = visible.length > 0;
|
|
12365
12481
|
visible.push(managed);
|
|
12366
12482
|
} else {
|
|
12367
|
-
while (visible.length > 0)
|
|
12483
|
+
while (visible.length > 0) evict(visible.pop());
|
|
12368
12484
|
visible.push(managed);
|
|
12369
12485
|
}
|
|
12486
|
+
if (options.historyLimit > 0) {
|
|
12487
|
+
const { timer: _timer, wasQueued: _wasQueued, ...record } = managed;
|
|
12488
|
+
history.push({
|
|
12489
|
+
...record,
|
|
12490
|
+
read: false
|
|
12491
|
+
});
|
|
12492
|
+
if (history.length > options.historyLimit) history.splice(0, history.length - options.historyLimit);
|
|
12493
|
+
emitHistory();
|
|
12494
|
+
}
|
|
12370
12495
|
ensureFrontTimer();
|
|
12371
12496
|
syncRenderer();
|
|
12372
12497
|
return id;
|
|
12373
|
-
}
|
|
12374
|
-
update(id, content) {
|
|
12498
|
+
}
|
|
12499
|
+
function update(id, content) {
|
|
12375
12500
|
const managed = visible.find((n) => n.id === id);
|
|
12376
|
-
if (
|
|
12377
|
-
|
|
12378
|
-
|
|
12379
|
-
|
|
12380
|
-
|
|
12381
|
-
|
|
12501
|
+
if (managed) {
|
|
12502
|
+
Object.assign(managed, content);
|
|
12503
|
+
managed.updatedAt = Date.now();
|
|
12504
|
+
if (visible[0] === managed) {
|
|
12505
|
+
clearTimer(managed);
|
|
12506
|
+
startTimer(managed);
|
|
12507
|
+
}
|
|
12508
|
+
syncRenderer();
|
|
12509
|
+
}
|
|
12510
|
+
const entry = historyEntry(id);
|
|
12511
|
+
if (entry) {
|
|
12512
|
+
Object.assign(entry, content);
|
|
12513
|
+
entry.updatedAt = Date.now();
|
|
12514
|
+
emitHistory();
|
|
12382
12515
|
}
|
|
12516
|
+
}
|
|
12517
|
+
function dismissAll() {
|
|
12518
|
+
for (const m of visible) evict(m);
|
|
12519
|
+
visible.length = 0;
|
|
12383
12520
|
syncRenderer();
|
|
12521
|
+
}
|
|
12522
|
+
function markAllRead() {
|
|
12523
|
+
let changed = false;
|
|
12524
|
+
for (const entry of history) if (!entry.read) {
|
|
12525
|
+
entry.read = true;
|
|
12526
|
+
changed = true;
|
|
12527
|
+
}
|
|
12528
|
+
if (changed) emitHistory();
|
|
12529
|
+
}
|
|
12530
|
+
function clearHistory() {
|
|
12531
|
+
if (history.length === 0) return;
|
|
12532
|
+
history.length = 0;
|
|
12533
|
+
emitHistory();
|
|
12534
|
+
}
|
|
12535
|
+
function destroy() {
|
|
12536
|
+
dismissAll();
|
|
12537
|
+
history.length = 0;
|
|
12538
|
+
listeners.clear();
|
|
12539
|
+
renderer?.detach?.();
|
|
12540
|
+
renderer = null;
|
|
12541
|
+
}
|
|
12542
|
+
configure(initial);
|
|
12543
|
+
return {
|
|
12544
|
+
configure,
|
|
12545
|
+
notify,
|
|
12546
|
+
update,
|
|
12547
|
+
dismiss,
|
|
12548
|
+
dismissAll,
|
|
12549
|
+
getHistory,
|
|
12550
|
+
get unreadCount() {
|
|
12551
|
+
return history.reduce((n, entry) => entry.read ? n : n + 1, 0);
|
|
12552
|
+
},
|
|
12553
|
+
markRead,
|
|
12554
|
+
markAllRead,
|
|
12555
|
+
clearHistory,
|
|
12556
|
+
subscribe(listener) {
|
|
12557
|
+
listeners.add(listener);
|
|
12558
|
+
return () => listeners.delete(listener);
|
|
12559
|
+
},
|
|
12560
|
+
destroy
|
|
12561
|
+
};
|
|
12562
|
+
}
|
|
12563
|
+
const scopes = /* @__PURE__ */ new Map();
|
|
12564
|
+
const defaultManager = createNotificationManager();
|
|
12565
|
+
/**
|
|
12566
|
+
* The default, app-wide manager. Also a registry of named, independent
|
|
12567
|
+
* scopes: `NotificationManager.scope('lister-1', { renderer })`.
|
|
12568
|
+
*/
|
|
12569
|
+
const NotificationManager = {
|
|
12570
|
+
...defaultManager,
|
|
12571
|
+
get unreadCount() {
|
|
12572
|
+
return defaultManager.unreadCount;
|
|
12384
12573
|
},
|
|
12385
|
-
|
|
12386
|
-
|
|
12574
|
+
scope(name, opts) {
|
|
12575
|
+
let instance = scopes.get(name);
|
|
12576
|
+
if (!instance) {
|
|
12577
|
+
instance = createNotificationManager(opts);
|
|
12578
|
+
scopes.set(name, instance);
|
|
12579
|
+
}
|
|
12580
|
+
return instance;
|
|
12387
12581
|
},
|
|
12388
|
-
|
|
12389
|
-
|
|
12390
|
-
|
|
12391
|
-
syncRenderer();
|
|
12582
|
+
releaseScope(name) {
|
|
12583
|
+
scopes.get(name)?.destroy();
|
|
12584
|
+
scopes.delete(name);
|
|
12392
12585
|
}
|
|
12393
12586
|
};
|
|
12394
|
-
function dismiss(id) {
|
|
12395
|
-
const idx = visible.findIndex((m) => m.id === id);
|
|
12396
|
-
if (idx === -1) return;
|
|
12397
|
-
clearTimer(visible.splice(idx, 1)[0]);
|
|
12398
|
-
ensureFrontTimer();
|
|
12399
|
-
syncRenderer();
|
|
12400
|
-
}
|
|
12401
12587
|
// src/panel/panel-group.ts
|
|
12402
12588
|
/** Pointer movement threshold (px) before a press becomes a drag. */
|
|
12403
12589
|
const DRAG_THRESHOLD_PX$2 = 5;
|
|
@@ -17807,4 +17993,4 @@ function monitorIndeterminate(targetElOrQuery, watchedElsOrQueries) {
|
|
|
17807
17993
|
function init() {
|
|
17808
17994
|
console.log(`Init`);
|
|
17809
17995
|
}
|
|
17810
|
-
export { AGE_UNITS, AcTextElement, AcTokenElement, BottomDrawerElement, ButtonElement, Checkbox, CheckedSelect, ColourPicker, ColourPickerPopup, CrumbNavigationElement, CrumbPathController, CrumbPathElement, DEFAULT_FORCE_OPTIONS, DEFAULT_SIBLING_SPACING, DRAG_THRESHOLD_PX, DataController, DataDisplayComponent, DataGridElement, DataTableElement, DateInputElement, DetailListElement, DockHostElement, DockPanelElement, EASY_CONNECT_MARGIN, EDGE_CORNER_RADIUS, EMPTY_FLAGS, EMPTY_GROUP_LABEL, EMPTY_KEYS, EditableLabel, EditableNumber, FlatListElement, FormElement, FormGroupElement, FormOptionsElement, FormPartElement, FormRowElement, GraphNodeElement, GraphPortElement, GridListElement, GroupedItemListerElement, HyperbolicTreeListElement, ICON_CARET_RIGHT, ICON_CHECK, ICON_CHEVRON_DOWN, ICON_CLOSE, IcicleTreeListElement, IncrSearchTreeController as IncrSearchMillerController, IncrSearchTreeController, IxfxHexEditorElement, IxfxIconElement, IxfxTimelineElement, KeyedElementIndex, LIST_ITEM_MOTION_MS, LIST_SEARCH_COMMAND_IDS, LIST_SEARCH_MODES, LabelledRadialInput, LabelledRangeInput, LabelledSliderInput, LedElement, ListDragSelectController, ListGroupHeaderElement, ListNativeDragController, ListSearchController, ListSelectionController, MARQUEE_THRESHOLD_PX, MAX_BLINK_HZ, MAX_FLOW_SPEED, MAX_PENDING_KEYS, MarqueeController, menu_exports as Menu, MillerBaseElement, MillerListElement, MillerTreeController, MulticolListElement, NODE_SHAPES, NarrowedTextElement, NodeDragController, NodeGraphElement, NotificationManager, NotificationPillElement, PARTIAL_DESCRIPTION, PanTextElement, PanZoomController, PanelElement, PanelGroupElement, PlotDataSeries, PlotHistogram, PlotMultiAxis, PlotSingleAxis, PlotXyAxis, PolarPad, RESIZE_HANDLES, RadialInputElement, RadioGroup, RangeElement, RangeInput, RangeMultiElement, RatingElement, SCROLL_HOVER_SUPPRESS_ATTR, SIZE_UNITS, SUNBURST_PATH_SEPARATOR, SelectHorizElement, ShapefillValueElement, SliderInputElement, SlidingNumberElement, SnackbarElement, SnapContainer, SplitButton, SplitLayoutElement, SplitPanelElement, SunburstTreeListElement, SwipeElement, TabController, TabListElement, TabListItemElement, TabPanelElement, TabPanelsElement, TextShimmerElement, TickledController, TimelineController, TimelineTrackTabElement, TitlebarElement, ToolbarElement, ToolbarGroupElement, TooltipElement, TransitoryLabelElement, TreeBaseElement, TreeController, TreeDataModel, TreeDropController, TreeKeyboardNavController, TreeListElement, TreemapListElement, TwoSplitLayoutElement, UnitInputElement, VIEW_STATE_CHANGE, VIEW_STATE_VERSION, VerticalListElement, ViewStateController, WireDragController, XyPad, addPanelToStack, addWire, anchorFromRow, animateListItemIn, animateListItemOut, applyAgeModification, applyHighlights, applyIsometry, applyPartialAttributes, applySnapshot, applyTreeDrop, attachTimelineInteractions, bestUnit, bindViewState, blinkPeriodSeconds, bottomDrawerCommandId, boundsOf, buildHighlightTargets, buildModel, canConnect, capFlags, capKeys, captionForEntry, captureElementScroll, clampToDisk, clampZoom, clearHighlights, collapsedOffset, collectContainerNames, collectDataResult, collectPanelIds, collectStackPaths, combineSelection, composeIsometry, computeCanonicalPositions, computeColour, computeHyperbolicLayout, computeIcicleLayout, computeLeafGeoms, computeSunburstLayout, computeTreemapLayout, connectContext, createAcCompletionProvider, createDataListSearchAdapter, createDefaultListDragPreview, createElementIncrSearch, createElementListSearchAdapter, createEmptyLayout, createEmptyStack, createFuzzySearch, createIncrSearch, createPillRenderer, createScrollHoverGuard, createSplit, createStack, createTreeListAdapter, createTreeListSearchAdapter, createValueResolver, createVerticalListAdapter, cycleBlockedNodes, decomposeViewIsometry, defaultGroupLabel, defaultSide, defaultSunburstValueAccessor, distribute, dropTargetFor, edgeId, edgeMidpoint, edgePath, edgeShape, ensurePort, euclideanRadiusForHyperbolicDistance, extendFromSide, extractStack, findEmptiedStacks, findHyperbolicIdOf, findHyperbolicKeyPath, findHyperbolicNode, findHyperbolicPath, findHyperbolicPathById, findIcicleKeyPath, findIcicleNode, findIciclePath, findNode, findPanelNode, findParentOf, findProximityConnection, findSnapTarget, findStackOf, findStackPathByName, findSunburstId, findSunburstNodeById, findTreemapNode, findTreemapPath, findValidWire, fitBounds, fitRects, flagsFromRecord, flagsToRecord, flowToScreen, forceMovement, forcePin, forcePositions, forceState, forceStep, formatDateInput, fromEdges, geodesicInterpolate, geodesicPath, geodesicSegment, gestureOf, getActiveDragPanelId, getIcon, getIconEntry, getIconFont, getLeafNeighbours, hasIcon, hasWire, hyperbolicBranchId, hyperbolicChildIds, hyperbolicDistanceForEuclideanRadius, hyperbolicIdDepth, hyperbolicRelativeFrame, iconBus, identityIsometry, inDegreeOf, inEasyConnectZone, incomingEdge, incomingEdges, init, insertBeside, invertIsometry, isDragging, isEditableTarget, isHyperbolicDescendantId, isMultiMode, isNodeShape, isPartialKey, isResizeHandle, isSplit, isStack, isSunburstAncestorId, isViewStateful, keyForElement, keysAsFlags, keysToArray, listItemFadeKeyframes, listSearchStyles, marqueeStyle, measureNode, mobiusAdd, mobiusFromOrigin, mobiusToOrigin, monitorIndeterminate, moveLeafNodeToEdge, moveLeafStep, nodeGraphStyles, nodesInRect, norm, normalise, normaliseConnection, normaliseValue, normalize, onUserScrollIntent, outDegreeOf, panBy, panelGapIndex, parseColourScaleAttr, parseDateInput, parseLayout, parsePortId, partitionByGroup, partitionFlags, partitionKeys, pickStartPort, poincareDistance, pointerOverAnyHost, polylineMidpoint, polylinePath, polylineShape, portId, prefersReducedMotion, preserveRestoreWeights, proximityFactor, pruneDraggedDescendants, readBaseColour, rectFromPoints, rectGap, rectsIntersect, registerFontIcon, registerIcon, registerListSearchCommands, removeNode, removeNodes, removePanelFromStack, removeWire, renderWires, resizeRect, resolveConnection, resolveCssVars, resolveGrid, resolveGroupKey, resolveIcicleKeyPath, resolveLeafPath, resolveTracks, restoreElementScroll, rotationIsometry, sameKeySet, sanitizeFlowSpeed, screenToFlow, scrollToOffset, selectionAfterEdgeClick, selectionAfterNodePress, serializeLayout, setActive, setIconFont, setPanelRestoreWeight, settled, shapeSpec, smoothStep, snapshotNonEmptyStacks, startListItemOutAnimation, stepPoints, sunburstChildId, sunburstHasChildren, sunburstIdToPath, sunburstParentId, sunburstPathToId, svgToDataUri, swapLeaves, tickledItemStyles, tickledStyles, timelineStyles, toBase, toEdges, toGroupKey, toNodeGraph, toSnapshot, toggleInSet, toolbarGapIndex, translationFromOrigin, typesCompatible, viewIsometry, walk, wantsMarquee, withEntry, withWireFlow, withoutFlag, wrapRoot, zoomAt };
|
|
17996
|
+
export { AGE_UNITS, AcTextElement, AcTokenElement, BottomDrawerElement, ButtonElement, Checkbox, CheckedSelect, ColourPicker, ColourPickerPopup, CrumbNavigationElement, CrumbPathController, CrumbPathElement, DEFAULT_FORCE_OPTIONS, DEFAULT_SIBLING_SPACING, DRAG_THRESHOLD_PX, DataController, DataDisplayComponent, DataGridElement, DataTableElement, DateInputElement, DetailListElement, DockHostElement, DockPanelElement, EASY_CONNECT_MARGIN, EDGE_CORNER_RADIUS, EMPTY_FLAGS, EMPTY_GROUP_LABEL, EMPTY_KEYS, EditableLabel, EditableNumber, FlatListElement, FormElement, FormGroupElement, FormOptionsElement, FormPartElement, FormRowElement, GraphNodeElement, GraphPortElement, GridListElement, GroupedItemListerElement, HyperbolicTreeListElement, ICON_CARET_RIGHT, ICON_CHECK, ICON_CHEVRON_DOWN, ICON_CLOSE, IcicleTreeListElement, IncrSearchTreeController as IncrSearchMillerController, IncrSearchTreeController, IxfxHexEditorElement, IxfxIconElement, IxfxTimelineElement, KeyedElementIndex, LIST_ITEM_MOTION_MS, LIST_SEARCH_COMMAND_IDS, LIST_SEARCH_MODES, LabelledRadialInput, LabelledRangeInput, LabelledSliderInput, LedElement, ListDragSelectController, ListGroupHeaderElement, ListNativeDragController, ListSearchController, ListSelectionController, MARQUEE_THRESHOLD_PX, MAX_BLINK_HZ, MAX_FLOW_SPEED, MAX_PENDING_KEYS, MarqueeController, menu_exports as Menu, MillerBaseElement, MillerListElement, MillerTreeController, MulticolListElement, NODE_SHAPES, NarrowedTextElement, NodeDragController, NodeGraphElement, NotificationManager, NotificationPillElement, PARTIAL_DESCRIPTION, PanTextElement, PanZoomController, PanelElement, PanelGroupElement, PlotDataSeries, PlotHistogram, PlotMultiAxis, PlotSingleAxis, PlotXyAxis, PolarPad, RESIZE_HANDLES, RadialInputElement, RadioGroup, RangeElement, RangeInput, RangeMultiElement, RatingElement, SCROLL_HOVER_SUPPRESS_ATTR, SIZE_UNITS, SUNBURST_PATH_SEPARATOR, SelectHorizElement, ShapefillValueElement, SliderInputElement, SlidingNumberElement, SnackbarElement, SnapContainer, SplitButton, SplitLayoutElement, SplitPanelElement, SunburstTreeListElement, SwipeElement, TabController, TabListElement, TabListItemElement, TabPanelElement, TabPanelsElement, TextShimmerElement, TickledController, TimelineController, TimelineTrackTabElement, TitlebarElement, ToolbarElement, ToolbarGroupElement, TooltipElement, TransitoryLabelElement, TreeBaseElement, TreeController, TreeDataModel, TreeDropController, TreeKeyboardNavController, TreeListElement, TreemapListElement, TwoSplitLayoutElement, UnitInputElement, VIEW_STATE_CHANGE, VIEW_STATE_VERSION, VerticalListElement, ViewStateController, WireDragController, XyPad, addPanelToStack, addWire, anchorFromRow, animateListItemIn, animateListItemOut, applyAgeModification, applyHighlights, applyIsometry, applyPartialAttributes, applySnapshot, applyTreeDrop, attachTimelineInteractions, bestUnit, bindViewState, blinkPeriodSeconds, bottomDrawerCommandId, boundsOf, buildHighlightTargets, buildModel, canConnect, capFlags, capKeys, captionForEntry, captureElementScroll, clampToDisk, clampZoom, clearHighlights, collapsedOffset, collectContainerNames, collectDataResult, collectPanelIds, collectStackPaths, combineSelection, composeIsometry, computeCanonicalPositions, computeColour, computeHyperbolicLayout, computeIcicleLayout, computeLeafGeoms, computeSunburstLayout, computeTreemapLayout, connectContext, createAcCompletionProvider, createDataListSearchAdapter, createDefaultListDragPreview, createElementIncrSearch, createElementListSearchAdapter, createEmptyLayout, createEmptyStack, createFuzzySearch, createIncrSearch, createNotificationManager, createPillRenderer, createScrollHoverGuard, createSplit, createStack, createTreeListAdapter, createTreeListSearchAdapter, createValueResolver, createVerticalListAdapter, cycleBlockedNodes, decomposeViewIsometry, defaultGroupLabel, defaultSide, defaultSunburstValueAccessor, distribute, dropTargetFor, edgeId, edgeMidpoint, edgePath, edgeShape, ensurePort, euclideanRadiusForHyperbolicDistance, extendFromSide, extractStack, findEmptiedStacks, findHyperbolicIdOf, findHyperbolicKeyPath, findHyperbolicNode, findHyperbolicPath, findHyperbolicPathById, findIcicleKeyPath, findIcicleNode, findIciclePath, findNode, findPanelNode, findParentOf, findProximityConnection, findSnapTarget, findStackOf, findStackPathByName, findSunburstId, findSunburstNodeById, findTreemapNode, findTreemapPath, findValidWire, fitBounds, fitRects, flagsFromRecord, flagsToRecord, flowToScreen, forceMovement, forcePin, forcePositions, forceState, forceStep, formatDateInput, fromEdges, geodesicInterpolate, geodesicPath, geodesicSegment, gestureOf, getActiveDragPanelId, getIcon, getIconEntry, getIconFont, getLeafNeighbours, hasIcon, hasWire, hyperbolicBranchId, hyperbolicChildIds, hyperbolicDistanceForEuclideanRadius, hyperbolicIdDepth, hyperbolicRelativeFrame, iconBus, identityIsometry, inDegreeOf, inEasyConnectZone, incomingEdge, incomingEdges, init, insertBeside, invertIsometry, isDragging, isEditableTarget, isHyperbolicDescendantId, isMultiMode, isNodeShape, isPartialKey, isResizeHandle, isSplit, isStack, isSunburstAncestorId, isViewStateful, keyForElement, keysAsFlags, keysToArray, listItemFadeKeyframes, listSearchStyles, marqueeStyle, measureNode, mobiusAdd, mobiusFromOrigin, mobiusToOrigin, monitorIndeterminate, moveLeafNodeToEdge, moveLeafStep, nodeGraphStyles, nodesInRect, norm, normalise, normaliseConnection, normaliseValue, normalize, onUserScrollIntent, outDegreeOf, panBy, panelGapIndex, parseColourScaleAttr, parseDateInput, parseLayout, parsePortId, partitionByGroup, partitionFlags, partitionKeys, pickStartPort, poincareDistance, pointerOverAnyHost, polylineMidpoint, polylinePath, polylineShape, portId, prefersReducedMotion, preserveRestoreWeights, proximityFactor, pruneDraggedDescendants, readBaseColour, rectFromPoints, rectGap, rectsIntersect, registerFontIcon, registerIcon, registerListSearchCommands, removeNode, removeNodes, removePanelFromStack, removeWire, renderWires, resizeRect, resolveConnection, resolveCssVars, resolveGrid, resolveGroupKey, resolveIcicleKeyPath, resolveLeafPath, resolveTracks, restoreElementScroll, rotationIsometry, sameKeySet, sanitizeFlowSpeed, screenToFlow, scrollToOffset, selectionAfterEdgeClick, selectionAfterNodePress, serializeLayout, setActive, setIconFont, setPanelRestoreWeight, settled, shapeSpec, smoothStep, snapshotNonEmptyStacks, startListItemOutAnimation, stepPoints, sunburstChildId, sunburstHasChildren, sunburstIdToPath, sunburstParentId, sunburstPathToId, svgToDataUri, swapLeaves, tickledItemStyles, tickledStyles, timelineStyles, toBase, toEdges, toGroupKey, toNodeGraph, toSnapshot, toggleInSet, toolbarGapIndex, translationFromOrigin, typesCompatible, viewIsometry, walk, wantsMarquee, withEntry, withWireFlow, withoutFlag, wrapRoot, zoomAt };
|