@kerfjs/ui 5.0.0-beta.125 → 5.0.0-beta.126
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/ai/application-ui-diagnostic-ids-v1.json +1 -0
- package/ai/component-catalog.json +77 -6
- package/ai/component-catalog.schema.json +14 -1
- package/ai/component-composition.json +27 -6
- package/ai/component-props.json +245 -40
- package/ai/components/combobox.md +1 -1
- package/ai/components/surface-scaffold.md +19 -5
- package/ai/components/tab-bar.md +2 -0
- package/ai/components/toolbar.md +1 -0
- package/ai/public-api-signatures-v1.md +246 -295
- package/ai/skill.md +10 -4
- package/ai/view-document.schema.json +55 -2
- package/ai/webawesome-jsx-signatures-v1.md +1 -1
- package/analyzer/cli.mjs +60 -24
- package/analyzer/index.mjs +331 -58
- package/catalog-projection-cli.mjs +86 -50
- package/dist/anchored-surface.js +2 -1
- package/dist/browser/editor.js +11 -8
- package/dist/catalog-resources.d.ts +1 -1
- package/dist/catalog.d.ts +1 -1
- package/dist/catalog.js +6 -6
- package/dist/{chunk-VX3YF2UD.js → chunk-3K5V3ZSD.js} +3 -3
- package/dist/{chunk-VX3YF2UD.js.map → chunk-3K5V3ZSD.js.map} +1 -1
- package/dist/chunk-3SCGTP5O.js +682 -0
- package/dist/chunk-3SCGTP5O.js.map +1 -0
- package/dist/{chunk-NHQOX7T4.js → chunk-3ZKUXWAV.js} +4 -4
- package/dist/chunk-3ZKUXWAV.js.map +1 -0
- package/dist/{chunk-ADMWT7FX.js → chunk-3ZWYGGEC.js} +136 -8
- package/dist/chunk-3ZWYGGEC.js.map +1 -0
- package/dist/{chunk-KLR3DCHH.js → chunk-4L5ZIKDZ.js} +1 -1
- package/dist/chunk-4L5ZIKDZ.js.map +1 -0
- package/dist/{chunk-2E7S5C4D.js → chunk-4UWLHKNU.js} +5 -5
- package/dist/chunk-4UWLHKNU.js.map +1 -0
- package/dist/{chunk-EXGDKG7B.js → chunk-5A2DN3LR.js} +5 -5
- package/dist/chunk-5A2DN3LR.js.map +1 -0
- package/dist/{chunk-DJ65XFVN.js → chunk-63TJH2RF.js} +4 -4
- package/dist/chunk-63TJH2RF.js.map +1 -0
- package/dist/{chunk-Q2CLQ3IJ.js → chunk-6PHG2DMG.js} +1 -1
- package/dist/chunk-6PHG2DMG.js.map +1 -0
- package/dist/{chunk-SPI6VMIY.js → chunk-6T7AX365.js} +4 -4
- package/dist/chunk-6T7AX365.js.map +1 -0
- package/dist/{chunk-GVII4JSD.js → chunk-6V6UHPJD.js} +4 -4
- package/dist/chunk-6V6UHPJD.js.map +1 -0
- package/dist/{chunk-2LM3PYHA.js → chunk-C2TY5DJC.js} +11 -8
- package/dist/chunk-C2TY5DJC.js.map +1 -0
- package/dist/{chunk-3WYREXW4.js → chunk-COMEWURO.js} +8 -6
- package/dist/chunk-COMEWURO.js.map +1 -0
- package/dist/{chunk-VPDSPD76.js → chunk-DB64I3DB.js} +4 -3
- package/dist/chunk-DB64I3DB.js.map +1 -0
- package/dist/{chunk-SBCXWGNP.js → chunk-DBCDYBZP.js} +2 -2
- package/dist/{chunk-SBCXWGNP.js.map → chunk-DBCDYBZP.js.map} +1 -1
- package/dist/{chunk-CNM6ZWP2.js → chunk-DJWBXEF4.js} +4 -2
- package/dist/chunk-DJWBXEF4.js.map +1 -0
- package/dist/{chunk-SVUJIVMR.js → chunk-E2MTHHLS.js} +3 -3
- package/dist/{chunk-SVUJIVMR.js.map → chunk-E2MTHHLS.js.map} +1 -1
- package/dist/{chunk-JG4ONAOI.js → chunk-EI55KWHP.js} +2 -2
- package/dist/chunk-EI55KWHP.js.map +1 -0
- package/dist/{chunk-MVKHSAKE.js → chunk-GE2BQXB3.js} +41 -4
- package/dist/chunk-GE2BQXB3.js.map +1 -0
- package/dist/{chunk-KELWWCMX.js → chunk-I2K4OQKB.js} +4 -4
- package/dist/chunk-I2K4OQKB.js.map +1 -0
- package/dist/chunk-IFDTSVE6.js +9 -0
- package/dist/chunk-IFDTSVE6.js.map +1 -0
- package/dist/{chunk-TPLVC5BE.js → chunk-IR32NI2O.js} +336 -247
- package/dist/chunk-IR32NI2O.js.map +1 -0
- package/dist/{chunk-ZKKO4MHC.js → chunk-JYKP7TBZ.js} +4 -2
- package/dist/chunk-JYKP7TBZ.js.map +1 -0
- package/dist/{chunk-6OT7FOSA.js → chunk-K3C35KGR.js} +4 -4
- package/dist/chunk-K3C35KGR.js.map +1 -0
- package/dist/{chunk-4RECPEHI.js → chunk-KBS3GP6S.js} +4 -3
- package/dist/chunk-KBS3GP6S.js.map +1 -0
- package/dist/{chunk-YHRJNKD5.js → chunk-KS7EXW4P.js} +6 -4
- package/dist/chunk-KS7EXW4P.js.map +1 -0
- package/dist/{chunk-V6N3YLTM.js → chunk-LTOTL5AS.js} +3 -3
- package/dist/chunk-LTOTL5AS.js.map +1 -0
- package/dist/chunk-M64TAGZY.js +590 -0
- package/dist/chunk-M64TAGZY.js.map +1 -0
- package/dist/{chunk-JZZVWTUB.js → chunk-MMOQR426.js} +2 -2
- package/dist/chunk-MMOQR426.js.map +1 -0
- package/dist/{chunk-SJBMKA4X.js → chunk-OHT2AXER.js} +11 -10
- package/dist/chunk-OHT2AXER.js.map +1 -0
- package/dist/{chunk-TTFW6E6C.js → chunk-OZKBIPXU.js} +2 -2
- package/dist/chunk-OZKBIPXU.js.map +1 -0
- package/dist/{chunk-Q2SLOMN6.js → chunk-RHMY45DK.js} +4 -4
- package/dist/chunk-RHMY45DK.js.map +1 -0
- package/dist/{chunk-BZXA5SSA.js → chunk-S7QB5KMM.js} +2 -2
- package/dist/{chunk-BZXA5SSA.js.map → chunk-S7QB5KMM.js.map} +1 -1
- package/dist/{chunk-HDXUHLTQ.js → chunk-SHECA2N4.js} +8 -2
- package/dist/chunk-SHECA2N4.js.map +1 -0
- package/dist/{chunk-R6FIXYAE.js → chunk-SJEPM5ZU.js} +2 -2
- package/dist/{chunk-R6FIXYAE.js.map → chunk-SJEPM5ZU.js.map} +1 -1
- package/dist/{chunk-FJMABKKV.js → chunk-UQ4FRQ6M.js} +35 -17
- package/dist/chunk-UQ4FRQ6M.js.map +1 -0
- package/dist/{chunk-S4ZGTDSG.js → chunk-UU37OR3D.js} +2 -2
- package/dist/chunk-UU37OR3D.js.map +1 -0
- package/dist/{chunk-SWXWLSUD.js → chunk-WEQNPYVA.js} +1 -1
- package/dist/{chunk-SWXWLSUD.js.map → chunk-WEQNPYVA.js.map} +1 -1
- package/dist/{chunk-5SFHBYEY.js → chunk-WUVHP3UC.js} +97 -24
- package/dist/chunk-WUVHP3UC.js.map +1 -0
- package/dist/{chunk-3S3WXAZ5.js → chunk-X43QQWVC.js} +3 -2
- package/dist/chunk-X43QQWVC.js.map +1 -0
- package/dist/{chunk-Z3T24FX3.js → chunk-YE6KCAIN.js} +3 -2
- package/dist/chunk-YE6KCAIN.js.map +1 -0
- package/dist/{chunk-BCO673YW.js → chunk-Z3BT2SZE.js} +3 -3
- package/dist/chunk-Z3BT2SZE.js.map +1 -0
- package/dist/{chunk-KQZIC5CA.js → chunk-ZC4KSRAF.js} +7 -7
- package/dist/chunk-ZC4KSRAF.js.map +1 -0
- package/dist/collapsible-panel.d.ts +2 -2
- package/dist/collapsible-panel.js +2 -2
- package/dist/collapsible-panel.js.map +1 -1
- package/dist/column-explorer.d.ts +2 -2
- package/dist/column-explorer.js +2 -2
- package/dist/column-explorer.js.map +1 -1
- package/dist/dialog-surface-controller-BeKZ3e8Z.d.ts +251 -0
- package/dist/editor-frame.d.ts +1 -1
- package/dist/editor-frame.js +1 -1
- package/dist/editor.d.ts +38 -20
- package/dist/editor.js +10855 -6979
- package/dist/editor.js.map +1 -1
- package/dist/file-picker.js +1 -1
- package/dist/help-tags-register.js +2 -1
- package/dist/help-tags-register.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +24 -23
- package/dist/list-action-row.d.ts +1 -1
- package/dist/list-action-row.js +1 -1
- package/dist/list-detail-dialog.d.ts +7 -7
- package/dist/list-detail-dialog.js +6 -5
- package/dist/list-detail-dialog.js.map +1 -1
- package/dist/list-header.d.ts +1 -1
- package/dist/list-header.js +1 -1
- package/dist/list-item.d.ts +1 -1
- package/dist/list-item.js +1 -1
- package/dist/message-composer.js +1 -1
- package/dist/nav-stack.d.ts +6 -6
- package/dist/nav-stack.js +1 -1
- package/dist/popup-menu-register.js +1 -7
- package/dist/popup-menu-register.js.map +1 -1
- package/dist/popup-menu.d.ts +2 -2
- package/dist/popup-menu.js +1 -1
- package/dist/resizable-region.js +1 -1
- package/dist/segmented-control.d.ts +1 -1
- package/dist/segmented-control.js +1 -1
- package/dist/select-register.js +17 -23
- package/dist/select-register.js.map +1 -1
- package/dist/split-view.d.ts +6 -6
- package/dist/split-view.js +1 -1
- package/dist/styles/collapsible-panel.css +34 -25
- package/dist/styles/components/actions/popup-menu/popup-menu.css +4 -4
- package/dist/styles/components/actions/toolbar/toolbar.css +34 -1
- package/dist/styles/components/actions/toolbar-control-group/toolbar-control-group.css +1 -1
- package/dist/styles/components/forms/segmented-control/segmented-control.css +1 -1
- package/dist/styles/components/layout/collapsible-panel/collapsible-panel.css +34 -25
- package/dist/styles/components/layout/split-view/split-view.css +19 -33
- package/dist/styles/components/navigation/nav-stack/nav-stack.css +15 -19
- package/dist/styles/components/navigation/tab-navigator/tab-navigator.css +30 -29
- package/dist/styles/components/surfaces/editor-frame/editor-frame.css +2 -2
- package/dist/styles/components/surfaces/surface-scaffold/surface-scaffold.css +259 -4
- package/dist/styles/editor/editor.css +55 -0
- package/dist/styles/editor-frame.css +2 -2
- package/dist/styles/nav-stack.css +15 -19
- package/dist/styles/popup-menu.css +4 -4
- package/dist/styles/segmented-control.css +1 -1
- package/dist/styles/split-view.css +19 -33
- package/dist/styles/surface-scaffold.css +259 -4
- package/dist/styles/tab-navigator.css +30 -29
- package/dist/styles/toolbar-control-group.css +1 -1
- package/dist/styles/toolbar.css +34 -1
- package/dist/styles/webawesome.css +4 -5
- package/dist/surface-scaffold-register.js +2 -1
- package/dist/surface-scaffold-register.js.map +1 -1
- package/dist/surface-scaffold.d.ts +153 -246
- package/dist/surface-scaffold.js +3 -2
- package/dist/toolbar-control-group.d.ts +2 -2
- package/dist/toolbar-control-group.js +1 -1
- package/dist/toolbar.d.ts +6 -1
- package/dist/toolbar.js +1 -1
- package/dist/tree-list.d.ts +2 -2
- package/dist/tree-list.js +1 -1
- package/dist/wire-catalog.d.ts +1 -1
- package/dist/wire-catalog.js +3 -2
- package/dist/wire-catalog.js.map +1 -1
- package/dist/wire-checkboxes.js +2 -1
- package/dist/wire-choice-chips.js +2 -1
- package/dist/wire-color-fields.js +2 -1
- package/dist/wire-color-pickers.js +2 -1
- package/dist/wire-comboboxes.d.ts +2 -0
- package/dist/wire-comboboxes.js +2 -1
- package/dist/wire-content-items.js +2 -1
- package/dist/wire-corner-status.js +2 -1
- package/dist/wire-nav-stack.js +2 -1
- package/dist/wire-overlay-sheets.js +2 -1
- package/dist/wire-paged-views.js +2 -2
- package/dist/wire-paged-views.js.map +1 -1
- package/dist/wire-resizable-regions.js +2 -1
- package/dist/wire-scroll-dividers.js +1 -1
- package/dist/wire-search-fields.js +2 -1
- package/dist/wire-sidebar.js +2 -1
- package/dist/wire-tab-bars.d.ts +41 -2
- package/dist/wire-tab-bars.js +1 -1
- package/dist/wire-tab-navigator.js +2 -1
- package/dist/wire-tag-fields.js +2 -1
- package/dist/wire-workbench.js +2 -1
- package/dist/workbench-dialog.d.ts +7 -7
- package/dist/workbench-dialog.js +5 -4
- package/dist/workbench-dialog.js.map +1 -1
- package/dist/workbench.d.ts +1 -1
- package/dist/workbench.js +1 -1
- package/docs/accessibility.md +3 -6
- package/docs/component-contract.md +47 -7
- package/docs/component-selection.md +90 -80
- package/docs/design/templates.md +5 -4
- package/docs/editor-frame.md +1 -1
- package/docs/editor-host.md +15 -2
- package/docs/overlay-tooltip.md +1 -1
- package/docs/recipes.md +1 -1
- package/docs/surface-scaffold.md +63 -2
- package/docs/ui-analyzer.md +42 -0
- package/docs/ui-doctor.md +45 -1
- package/docs/ui-evaluator.md +35 -0
- package/docs/ux-demo.md +1 -1
- package/docs/view.md +295 -0
- package/docs/webawesome-theme.md +16 -0
- package/doctor/cli.mjs +36 -31
- package/doctor/index.mjs +349 -162
- package/evaluator/cli.mjs +36 -30
- package/llms.txt +17 -4
- package/package.json +3 -1
- package/props/cli.mjs +47 -21
- package/scripts/lib/cli-args.mjs +98 -0
- package/ux-demo/recipes/compact-toolbar.tsx +1 -1
- package/ux-demo/recipes/loading-inspector.tsx +1 -1
- package/view/catalog.mjs +229 -0
- package/view/child-kind.mjs +22 -0
- package/view/cli.mjs +142 -119
- package/view/contract.mjs +84 -11
- package/view/css-grammar.mjs +93 -0
- package/view/generate.d.mts +16 -0
- package/view/generate.mjs +122 -43
- package/view/index.d.mts +80 -14
- package/view/index.mjs +5 -9
- package/view/interpret.mjs +104 -36
- package/view/types.mjs +161 -0
- package/view/validate-move.mjs +66 -30
- package/view/validate.mjs +420 -654
- package/vite-editor.d.mts +16 -1
- package/vite-editor.mjs +74 -4
- package/dist/chunk-2E7S5C4D.js.map +0 -1
- package/dist/chunk-2LM3PYHA.js.map +0 -1
- package/dist/chunk-3S3WXAZ5.js.map +0 -1
- package/dist/chunk-3WYREXW4.js.map +0 -1
- package/dist/chunk-4RECPEHI.js.map +0 -1
- package/dist/chunk-5SFHBYEY.js.map +0 -1
- package/dist/chunk-6OT7FOSA.js.map +0 -1
- package/dist/chunk-ADMWT7FX.js.map +0 -1
- package/dist/chunk-BCO673YW.js.map +0 -1
- package/dist/chunk-CNM6ZWP2.js.map +0 -1
- package/dist/chunk-DJ65XFVN.js.map +0 -1
- package/dist/chunk-EXGDKG7B.js.map +0 -1
- package/dist/chunk-FJMABKKV.js.map +0 -1
- package/dist/chunk-GVII4JSD.js.map +0 -1
- package/dist/chunk-HDXUHLTQ.js.map +0 -1
- package/dist/chunk-JG4ONAOI.js.map +0 -1
- package/dist/chunk-JZZVWTUB.js.map +0 -1
- package/dist/chunk-KELWWCMX.js.map +0 -1
- package/dist/chunk-KLR3DCHH.js.map +0 -1
- package/dist/chunk-KQZIC5CA.js.map +0 -1
- package/dist/chunk-LD6A6PYB.js +0 -268
- package/dist/chunk-LD6A6PYB.js.map +0 -1
- package/dist/chunk-MVKHSAKE.js.map +0 -1
- package/dist/chunk-NHQOX7T4.js.map +0 -1
- package/dist/chunk-Q2CLQ3IJ.js.map +0 -1
- package/dist/chunk-Q2SLOMN6.js.map +0 -1
- package/dist/chunk-S4ZGTDSG.js.map +0 -1
- package/dist/chunk-SJBMKA4X.js.map +0 -1
- package/dist/chunk-SPI6VMIY.js.map +0 -1
- package/dist/chunk-TPLVC5BE.js.map +0 -1
- package/dist/chunk-TTFW6E6C.js.map +0 -1
- package/dist/chunk-V6N3YLTM.js.map +0 -1
- package/dist/chunk-VNT4MXR5.js +0 -548
- package/dist/chunk-VNT4MXR5.js.map +0 -1
- package/dist/chunk-VPDSPD76.js.map +0 -1
- package/dist/chunk-YHRJNKD5.js.map +0 -1
- package/dist/chunk-Z3T24FX3.js.map +0 -1
- package/dist/chunk-ZKKO4MHC.js.map +0 -1
- package/dist/{nav-stack-DwxpXxqJ.d.ts → nav-stack-vQ3ieerq.d.ts} +3 -3
package/dist/chunk-VNT4MXR5.js
DELETED
|
@@ -1,548 +0,0 @@
|
|
|
1
|
-
// src/wiring/wire-scroll-dividers.ts
|
|
2
|
-
var EDGES = ["t", "r", "b", "l"];
|
|
3
|
-
var FACING = { t: "b", r: "l", b: "t", l: "r" };
|
|
4
|
-
var TARGET_EDGES = {
|
|
5
|
-
t: "top",
|
|
6
|
-
r: "right",
|
|
7
|
-
b: "bottom",
|
|
8
|
-
l: "left"
|
|
9
|
-
};
|
|
10
|
-
var SCROLL_OVERFLOW = "data-scroll-overflow";
|
|
11
|
-
var SCROLL_DIVIDER = "data-scroll-divider";
|
|
12
|
-
var HEADER_OVERLAY = "data-header-overlay";
|
|
13
|
-
var CLEARANCE_BLOCK_START = "--kui-scroll-clearance-block-start";
|
|
14
|
-
var SCROLLBAR_INLINE_SIZE = "--kui-pane-scrollbar-inline-size";
|
|
15
|
-
var OVERLAY_PANE = '.kui-pane[data-header-presentation="overlay"]:not([data-chrome-placement="auto"])';
|
|
16
|
-
var THRESHOLD = 1;
|
|
17
|
-
var SCROLL_EDGE_PROGRESS = "--kui-scroll-edge-progress";
|
|
18
|
-
var SCROLL_EDGE_DISTANCE = "data-scroll-edge-distance";
|
|
19
|
-
var DEFAULT_SCROLL_EDGE_DISTANCE = 60;
|
|
20
|
-
var quoted = (value) => `"${value.replaceAll("\\", "\\\\").replaceAll('"', '\\"')}"`;
|
|
21
|
-
function within(root, selector) {
|
|
22
|
-
const found = [...root.querySelectorAll(selector)];
|
|
23
|
-
if (root.nodeType === 1 && root.matches(selector))
|
|
24
|
-
found.unshift(root);
|
|
25
|
-
return found;
|
|
26
|
-
}
|
|
27
|
-
var directChild = (parent, selector) => [...parent.children].find(
|
|
28
|
-
(child) => child.matches(selector)
|
|
29
|
-
);
|
|
30
|
-
var PANE_CHROME = {
|
|
31
|
-
t: ".kui-pane__header, .kui-pane__toolbar",
|
|
32
|
-
b: ".kui-pane__footer"
|
|
33
|
-
};
|
|
34
|
-
var NAV_STACK_CHROME = {
|
|
35
|
-
t: ".kui-nav-stack__chrome:not([data-nav-chrome-copy])",
|
|
36
|
-
b: ".kui-nav-stack__bottom:not([data-nav-chrome-copy])"
|
|
37
|
-
};
|
|
38
|
-
function activeView(stack) {
|
|
39
|
-
const viewport = directChild(stack, ".kui-nav-stack__viewport");
|
|
40
|
-
if (!viewport) return void 0;
|
|
41
|
-
return [...viewport.children].filter(
|
|
42
|
-
(child) => child.matches(
|
|
43
|
-
'.kui-nav-stack__view[data-nav-active="true"]:not([data-nav-exiting="true"])'
|
|
44
|
-
)
|
|
45
|
-
).at(-1);
|
|
46
|
-
}
|
|
47
|
-
function activeScene(scaffold) {
|
|
48
|
-
const scenes = directChild(scaffold, ".kui-tab-scaffold__scenes");
|
|
49
|
-
return scenes ? directChild(scenes, '.kui-tab-scaffold__scene[data-active="true"]') : void 0;
|
|
50
|
-
}
|
|
51
|
-
function regionScrollers(region, edge) {
|
|
52
|
-
const found = [];
|
|
53
|
-
let current = region;
|
|
54
|
-
while (current) {
|
|
55
|
-
found.push(current);
|
|
56
|
-
if (current.children.length !== 1) break;
|
|
57
|
-
const child = current.children[0];
|
|
58
|
-
if (child.matches(".kui-pane")) {
|
|
59
|
-
current = directChild(child, PANE_CHROME[edge]) ? void 0 : directChild(child, ".kui-pane__content");
|
|
60
|
-
if (current) found.push(current);
|
|
61
|
-
break;
|
|
62
|
-
}
|
|
63
|
-
if (child.matches(".kui-nav-stack"))
|
|
64
|
-
current = directChild(child, NAV_STACK_CHROME[edge]) ? void 0 : activeView(child);
|
|
65
|
-
else if (child.matches(".kui-tab-scaffold") && edge === "t")
|
|
66
|
-
current = activeScene(child);
|
|
67
|
-
else current = void 0;
|
|
68
|
-
}
|
|
69
|
-
return found;
|
|
70
|
-
}
|
|
71
|
-
var sides = (edges) => EDGES.filter((edge) => edges.has(edge)).join("");
|
|
72
|
-
function measure(scroller) {
|
|
73
|
-
const edges = /* @__PURE__ */ new Set();
|
|
74
|
-
const maxY = scroller.scrollHeight - scroller.clientHeight;
|
|
75
|
-
if (maxY > THRESHOLD) {
|
|
76
|
-
if (scroller.scrollTop > THRESHOLD) edges.add("t");
|
|
77
|
-
if (maxY - scroller.scrollTop > THRESHOLD) edges.add("b");
|
|
78
|
-
}
|
|
79
|
-
const maxX = scroller.scrollWidth - scroller.clientWidth;
|
|
80
|
-
if (maxX > THRESHOLD) {
|
|
81
|
-
const view = scroller.ownerDocument.defaultView;
|
|
82
|
-
const rtl = view?.getComputedStyle(scroller).direction === "rtl";
|
|
83
|
-
const left = rtl ? maxX + scroller.scrollLeft : scroller.scrollLeft;
|
|
84
|
-
if (left > THRESHOLD) edges.add("l");
|
|
85
|
-
if (maxX - left > THRESHOLD) edges.add("r");
|
|
86
|
-
}
|
|
87
|
-
return sides(edges);
|
|
88
|
-
}
|
|
89
|
-
var CONTROLLERS = /* @__PURE__ */ new WeakMap();
|
|
90
|
-
function write(element, name, value) {
|
|
91
|
-
if (element.getAttribute(name) === (value || null)) return;
|
|
92
|
-
if (name === SCROLL_OVERFLOW) {
|
|
93
|
-
if (value) element.setAttribute(SCROLL_OVERFLOW, value);
|
|
94
|
-
else element.removeAttribute(SCROLL_OVERFLOW);
|
|
95
|
-
} else if (value) element.setAttribute(SCROLL_DIVIDER, value);
|
|
96
|
-
else element.removeAttribute(SCROLL_DIVIDER);
|
|
97
|
-
}
|
|
98
|
-
function wireScrollDividers(root, { targets = [] } = {}) {
|
|
99
|
-
const ownerDocument = root.nodeType === 9 ? root : root.ownerDocument;
|
|
100
|
-
let register = CONTROLLERS.get(ownerDocument);
|
|
101
|
-
if (!register) {
|
|
102
|
-
register = createController(ownerDocument);
|
|
103
|
-
CONTROLLERS.set(ownerDocument, register);
|
|
104
|
-
}
|
|
105
|
-
return register({ root, targets });
|
|
106
|
-
}
|
|
107
|
-
var STRUCTURAL_CLASSES = [
|
|
108
|
-
"kui-pane",
|
|
109
|
-
"kui-pane__content",
|
|
110
|
-
"kui-pane__header",
|
|
111
|
-
"kui-pane__toolbar",
|
|
112
|
-
"kui-pane__footer",
|
|
113
|
-
"kui-nav-stack",
|
|
114
|
-
"kui-nav-stack__viewport",
|
|
115
|
-
"kui-nav-stack__view",
|
|
116
|
-
"kui-nav-stack__chrome",
|
|
117
|
-
"kui-nav-stack__bottom",
|
|
118
|
-
"kui-tab-scaffold",
|
|
119
|
-
"kui-tab-scaffold__scenes",
|
|
120
|
-
"kui-tab-scaffold__scene",
|
|
121
|
-
"kui-tab-scaffold__bar"
|
|
122
|
-
];
|
|
123
|
-
var SCROLL_STRIP = "[data-kui-tab-list], [data-kui-scroll-strip]";
|
|
124
|
-
var STRUCTURAL_SELECTOR = [
|
|
125
|
-
...STRUCTURAL_CLASSES.map((name) => `.${name}`),
|
|
126
|
-
SCROLL_STRIP
|
|
127
|
-
].join(", ");
|
|
128
|
-
var hasStructuralClass = (value) => !!value && value.split(/\s+/).some((token) => STRUCTURAL_CLASSES.includes(token));
|
|
129
|
-
function createController(ownerDocument) {
|
|
130
|
-
const view = ownerDocument.defaultView;
|
|
131
|
-
let disposed = false;
|
|
132
|
-
const registrations = /* @__PURE__ */ new Set();
|
|
133
|
-
const listenedRoots = /* @__PURE__ */ new Set();
|
|
134
|
-
let pairings = [];
|
|
135
|
-
const overflow = /* @__PURE__ */ new Map();
|
|
136
|
-
const written = /* @__PURE__ */ new Map();
|
|
137
|
-
const faded = /* @__PURE__ */ new Set();
|
|
138
|
-
let overlays = /* @__PURE__ */ new Map();
|
|
139
|
-
const headerSizes = /* @__PURE__ */ new Map();
|
|
140
|
-
const scrollbarSizes = /* @__PURE__ */ new Map();
|
|
141
|
-
const published = /* @__PURE__ */ new Set();
|
|
142
|
-
const byId = (root, id) => {
|
|
143
|
-
if (!id) return void 0;
|
|
144
|
-
const [match] = within(root, `[id=${quoted(id)}]`);
|
|
145
|
-
return match;
|
|
146
|
-
};
|
|
147
|
-
const collect = () => {
|
|
148
|
-
const found = [];
|
|
149
|
-
for (const { root, targets } of registrations) {
|
|
150
|
-
for (const pane of within(root, ".kui-pane")) {
|
|
151
|
-
const scroller = directChild(pane, ".kui-pane__content");
|
|
152
|
-
const header = directChild(pane, PANE_CHROME.t);
|
|
153
|
-
const footer = directChild(pane, PANE_CHROME.b);
|
|
154
|
-
if (scroller && (header || footer))
|
|
155
|
-
found.push({ scroller, chrome: { t: header, b: footer } });
|
|
156
|
-
}
|
|
157
|
-
const pairRegion = (region, edge, chrome) => {
|
|
158
|
-
if (!region || !chrome) return;
|
|
159
|
-
for (const scroller of regionScrollers(region, edge))
|
|
160
|
-
found.push({ scroller, chrome: { [edge]: chrome } });
|
|
161
|
-
};
|
|
162
|
-
for (const stack of within(root, ".kui-nav-stack")) {
|
|
163
|
-
const view2 = activeView(stack);
|
|
164
|
-
for (const edge of ["t", "b"])
|
|
165
|
-
pairRegion(view2, edge, directChild(stack, NAV_STACK_CHROME[edge]));
|
|
166
|
-
}
|
|
167
|
-
for (const scaffold of within(root, ".kui-tab-scaffold"))
|
|
168
|
-
pairRegion(
|
|
169
|
-
activeScene(scaffold),
|
|
170
|
-
"b",
|
|
171
|
-
directChild(scaffold, ".kui-tab-scaffold__bar")
|
|
172
|
-
);
|
|
173
|
-
for (const strip of within(root, SCROLL_STRIP))
|
|
174
|
-
found.push({ scroller: strip, chrome: {} });
|
|
175
|
-
for (const target of targets) {
|
|
176
|
-
const scroller = byId(root, target.scroller);
|
|
177
|
-
if (!scroller) continue;
|
|
178
|
-
const chrome = {};
|
|
179
|
-
for (const edge of EDGES)
|
|
180
|
-
chrome[edge] = byId(root, target[TARGET_EDGES[edge]]);
|
|
181
|
-
found.push({ scroller, chrome });
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
return found;
|
|
185
|
-
};
|
|
186
|
-
const collectOverlays = () => {
|
|
187
|
-
const found = /* @__PURE__ */ new Map();
|
|
188
|
-
for (const { root } of registrations)
|
|
189
|
-
for (const pane of within(root, OVERLAY_PANE)) {
|
|
190
|
-
const header = directChild(pane, PANE_CHROME.t);
|
|
191
|
-
if (header) found.set(header, pane);
|
|
192
|
-
}
|
|
193
|
-
return found;
|
|
194
|
-
};
|
|
195
|
-
const measureScrollbars = () => {
|
|
196
|
-
let changed = false;
|
|
197
|
-
for (const [header, pane] of overlays) {
|
|
198
|
-
const scroller = directChild(pane, ".kui-pane__content");
|
|
199
|
-
let size = 0;
|
|
200
|
-
if (scroller) {
|
|
201
|
-
const style = scroller.ownerDocument.defaultView.getComputedStyle(scroller);
|
|
202
|
-
size = Math.max(
|
|
203
|
-
0,
|
|
204
|
-
scroller.offsetWidth - scroller.clientWidth - (Number.parseFloat(style.borderLeftWidth) || 0) - (Number.parseFloat(style.borderRightWidth) || 0)
|
|
205
|
-
);
|
|
206
|
-
}
|
|
207
|
-
if (scrollbarSizes.get(header) === size) continue;
|
|
208
|
-
scrollbarSizes.set(header, size);
|
|
209
|
-
changed = true;
|
|
210
|
-
}
|
|
211
|
-
return changed;
|
|
212
|
-
};
|
|
213
|
-
const overlayObserver = view?.MutationObserver ? new view.MutationObserver(() => {
|
|
214
|
-
if (!disposed) publish();
|
|
215
|
-
}) : void 0;
|
|
216
|
-
const publish = () => {
|
|
217
|
-
const current = /* @__PURE__ */ new Map();
|
|
218
|
-
for (const [header, pane] of overlays) {
|
|
219
|
-
const size = headerSizes.get(header);
|
|
220
|
-
const scrollbar = scrollbarSizes.get(header);
|
|
221
|
-
if (size !== void 0)
|
|
222
|
-
current.set(pane, [`${size}px`, scrollbar ? `${scrollbar}px` : ""]);
|
|
223
|
-
}
|
|
224
|
-
overlayObserver?.disconnect();
|
|
225
|
-
for (const pane of published)
|
|
226
|
-
if (!current.has(pane)) {
|
|
227
|
-
pane.style.removeProperty(CLEARANCE_BLOCK_START);
|
|
228
|
-
pane.style.removeProperty(SCROLLBAR_INLINE_SIZE);
|
|
229
|
-
if (!pane.getAttribute("style")) pane.removeAttribute("style");
|
|
230
|
-
pane.removeAttribute(HEADER_OVERLAY);
|
|
231
|
-
}
|
|
232
|
-
published.clear();
|
|
233
|
-
for (const [pane, [value, scrollbar]] of current) {
|
|
234
|
-
if (pane.style.getPropertyValue(CLEARANCE_BLOCK_START) !== value)
|
|
235
|
-
pane.style.setProperty(CLEARANCE_BLOCK_START, value);
|
|
236
|
-
if (pane.style.getPropertyValue(SCROLLBAR_INLINE_SIZE) !== scrollbar) {
|
|
237
|
-
if (scrollbar) pane.style.setProperty(SCROLLBAR_INLINE_SIZE, scrollbar);
|
|
238
|
-
else pane.style.removeProperty(SCROLLBAR_INLINE_SIZE);
|
|
239
|
-
}
|
|
240
|
-
if (pane.getAttribute(HEADER_OVERLAY) !== "measured")
|
|
241
|
-
pane.setAttribute(HEADER_OVERLAY, "measured");
|
|
242
|
-
published.add(pane);
|
|
243
|
-
overlayObserver?.observe(pane, {
|
|
244
|
-
attributes: true,
|
|
245
|
-
attributeFilter: ["style", HEADER_OVERLAY]
|
|
246
|
-
});
|
|
247
|
-
}
|
|
248
|
-
};
|
|
249
|
-
const fadeEdges = (only) => {
|
|
250
|
-
const current = /* @__PURE__ */ new Set();
|
|
251
|
-
for (const { scroller, chrome } of pairings)
|
|
252
|
-
for (const edge of ["t", "b"]) {
|
|
253
|
-
const element = chrome[edge];
|
|
254
|
-
const owner = element?.parentElement;
|
|
255
|
-
if (!element || !owner?.hasAttribute("data-scroll-edge")) continue;
|
|
256
|
-
current.add(element);
|
|
257
|
-
if (only && scroller !== only) continue;
|
|
258
|
-
const distance = Number(owner.getAttribute(SCROLL_EDGE_DISTANCE)) || DEFAULT_SCROLL_EDGE_DISTANCE;
|
|
259
|
-
const travelled = edge === "t" ? scroller.scrollTop : scroller.scrollHeight - scroller.clientHeight - scroller.scrollTop;
|
|
260
|
-
const value = String(
|
|
261
|
-
Math.round(Math.min(1, Math.max(0, travelled / distance)) * 1e3) / 1e3
|
|
262
|
-
);
|
|
263
|
-
if (element.style.getPropertyValue(SCROLL_EDGE_PROGRESS) !== value)
|
|
264
|
-
element.style.setProperty(SCROLL_EDGE_PROGRESS, value);
|
|
265
|
-
}
|
|
266
|
-
if (only) return;
|
|
267
|
-
for (const element of faded)
|
|
268
|
-
if (!current.has(element)) {
|
|
269
|
-
element.style.removeProperty(SCROLL_EDGE_PROGRESS);
|
|
270
|
-
if (!element.getAttribute("style")) element.removeAttribute("style");
|
|
271
|
-
}
|
|
272
|
-
faded.clear();
|
|
273
|
-
for (const element of current) faded.add(element);
|
|
274
|
-
};
|
|
275
|
-
const apply = () => {
|
|
276
|
-
const current = /* @__PURE__ */ new Map();
|
|
277
|
-
const dividers = /* @__PURE__ */ new Map();
|
|
278
|
-
for (const { scroller, chrome } of pairings) {
|
|
279
|
-
const edges = overflow.get(scroller);
|
|
280
|
-
(current.get(scroller) ?? current.set(scroller, /* @__PURE__ */ new Map()).get(scroller)).set(SCROLL_OVERFLOW, edges);
|
|
281
|
-
for (const edge of EDGES) {
|
|
282
|
-
const element = chrome[edge];
|
|
283
|
-
if (!element) continue;
|
|
284
|
-
const shown = dividers.get(element) ?? /* @__PURE__ */ new Set();
|
|
285
|
-
dividers.set(element, shown);
|
|
286
|
-
if (edges.includes(edge)) shown.add(FACING[edge]);
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
for (const [element, shown] of dividers)
|
|
290
|
-
(current.get(element) ?? current.set(element, /* @__PURE__ */ new Map()).get(element)).set(SCROLL_DIVIDER, sides(shown));
|
|
291
|
-
for (const [element, values] of written)
|
|
292
|
-
for (const name of values.keys())
|
|
293
|
-
if (!current.get(element)?.has(name)) write(element, name, "");
|
|
294
|
-
written.clear();
|
|
295
|
-
for (const [element, values] of current) {
|
|
296
|
-
written.set(element, values);
|
|
297
|
-
for (const [name, value] of values) write(element, name, value);
|
|
298
|
-
}
|
|
299
|
-
fadeEdges();
|
|
300
|
-
};
|
|
301
|
-
const observed = /* @__PURE__ */ new Map();
|
|
302
|
-
let probe;
|
|
303
|
-
let probePending = false;
|
|
304
|
-
const resizeObserver = view?.ResizeObserver ? new view.ResizeObserver((entries) => {
|
|
305
|
-
if (disposed) return;
|
|
306
|
-
const scrollers = new Set(pairings.map(({ scroller }) => scroller));
|
|
307
|
-
let headerResized = false;
|
|
308
|
-
let scrollersResized = false;
|
|
309
|
-
for (const entry of entries) {
|
|
310
|
-
const { target } = entry;
|
|
311
|
-
if (overlays.has(target)) {
|
|
312
|
-
headerSizes.set(
|
|
313
|
-
target,
|
|
314
|
-
entry.borderBoxSize?.[0]?.blockSize ?? target.getBoundingClientRect().height
|
|
315
|
-
);
|
|
316
|
-
headerResized = true;
|
|
317
|
-
continue;
|
|
318
|
-
}
|
|
319
|
-
scrollersResized = true;
|
|
320
|
-
if (target === probe) {
|
|
321
|
-
probePending = false;
|
|
322
|
-
for (const scroller2 of overflow.keys())
|
|
323
|
-
overflow.set(scroller2, measure(scroller2));
|
|
324
|
-
continue;
|
|
325
|
-
}
|
|
326
|
-
const scroller = scrollers.has(target) ? target : target.parentElement;
|
|
327
|
-
if (scroller && scrollers.has(scroller))
|
|
328
|
-
overflow.set(scroller, measure(scroller));
|
|
329
|
-
}
|
|
330
|
-
if (scrollersResized && measureScrollbars()) headerResized = true;
|
|
331
|
-
apply();
|
|
332
|
-
if (headerResized) publish();
|
|
333
|
-
}) : void 0;
|
|
334
|
-
const observeSizes = () => {
|
|
335
|
-
if (!resizeObserver) return;
|
|
336
|
-
const wanted = /* @__PURE__ */ new Map();
|
|
337
|
-
for (const { scroller } of pairings) {
|
|
338
|
-
wanted.set(scroller, false);
|
|
339
|
-
for (const child of scroller.children) wanted.set(child, false);
|
|
340
|
-
}
|
|
341
|
-
for (const header of overlays.keys()) wanted.set(header, true);
|
|
342
|
-
for (const element of observed.keys())
|
|
343
|
-
if (!wanted.has(element)) {
|
|
344
|
-
resizeObserver.unobserve(element);
|
|
345
|
-
observed.delete(element);
|
|
346
|
-
}
|
|
347
|
-
for (const [element, borderBox] of wanted)
|
|
348
|
-
if (observed.get(element) !== borderBox) {
|
|
349
|
-
resizeObserver.observe(
|
|
350
|
-
element,
|
|
351
|
-
borderBox ? { box: "border-box" } : void 0
|
|
352
|
-
);
|
|
353
|
-
observed.set(element, borderBox);
|
|
354
|
-
}
|
|
355
|
-
};
|
|
356
|
-
const refresh = (afterLayout = false) => {
|
|
357
|
-
const deferred = afterLayout && resizeObserver !== void 0;
|
|
358
|
-
const previous = deferred ? new Map(overflow) : void 0;
|
|
359
|
-
pairings = collect();
|
|
360
|
-
overflow.clear();
|
|
361
|
-
for (const { scroller } of pairings)
|
|
362
|
-
overflow.set(
|
|
363
|
-
scroller,
|
|
364
|
-
previous ? previous.get(scroller) ?? "" : measure(scroller)
|
|
365
|
-
);
|
|
366
|
-
overlays = collectOverlays();
|
|
367
|
-
for (const sizes of [headerSizes, scrollbarSizes])
|
|
368
|
-
for (const header of sizes.keys())
|
|
369
|
-
if (!overlays.has(header)) sizes.delete(header);
|
|
370
|
-
if (!deferred) {
|
|
371
|
-
for (const header of overlays.keys())
|
|
372
|
-
if (!headerSizes.has(header))
|
|
373
|
-
headerSizes.set(header, header.getBoundingClientRect().height);
|
|
374
|
-
}
|
|
375
|
-
if (!deferred) measureScrollbars();
|
|
376
|
-
observeSizes();
|
|
377
|
-
apply();
|
|
378
|
-
publish();
|
|
379
|
-
if (deferred) scheduleRemeasure();
|
|
380
|
-
};
|
|
381
|
-
const remeasure = () => {
|
|
382
|
-
let changed = false;
|
|
383
|
-
for (const scroller of overflow.keys()) {
|
|
384
|
-
const edges = measure(scroller);
|
|
385
|
-
if (edges === overflow.get(scroller)) continue;
|
|
386
|
-
overflow.set(scroller, edges);
|
|
387
|
-
changed = true;
|
|
388
|
-
}
|
|
389
|
-
if (changed) apply();
|
|
390
|
-
if (measureScrollbars()) publish();
|
|
391
|
-
};
|
|
392
|
-
let remeasureFrame;
|
|
393
|
-
const scheduleRemeasure = () => {
|
|
394
|
-
if (resizeObserver) {
|
|
395
|
-
if (probePending) return;
|
|
396
|
-
probePending = true;
|
|
397
|
-
if (!probe) {
|
|
398
|
-
probe = ownerDocument.createElement("div");
|
|
399
|
-
probe.setAttribute("aria-hidden", "true");
|
|
400
|
-
probe.style.cssText = "position:fixed;top:0;left:0;width:0;height:0;overflow:hidden;visibility:hidden;pointer-events:none;contain:strict";
|
|
401
|
-
resizeObserver.observe(probe);
|
|
402
|
-
}
|
|
403
|
-
if (!probe.isConnected) ownerDocument.documentElement.append(probe);
|
|
404
|
-
probe.style.width = probe.style.width === "1px" ? "0px" : "1px";
|
|
405
|
-
return;
|
|
406
|
-
}
|
|
407
|
-
if (remeasureFrame !== void 0 || !view?.requestAnimationFrame) return;
|
|
408
|
-
remeasureFrame = view.requestAnimationFrame(() => {
|
|
409
|
-
remeasureFrame = void 0;
|
|
410
|
-
remeasure();
|
|
411
|
-
});
|
|
412
|
-
};
|
|
413
|
-
const onScroll = (event) => {
|
|
414
|
-
const scroller = event.target;
|
|
415
|
-
if (!overflow.has(scroller)) return;
|
|
416
|
-
fadeEdges(scroller);
|
|
417
|
-
const edges = measure(scroller);
|
|
418
|
-
if (edges === overflow.get(scroller)) return;
|
|
419
|
-
overflow.set(scroller, edges);
|
|
420
|
-
apply();
|
|
421
|
-
};
|
|
422
|
-
const mutationObserver = view?.MutationObserver ? new view.MutationObserver((records) => {
|
|
423
|
-
if (disposed) return;
|
|
424
|
-
const ids = targetIds();
|
|
425
|
-
const selector = [
|
|
426
|
-
STRUCTURAL_SELECTOR,
|
|
427
|
-
...[...ids].map((id) => `[id=${quoted(id)}]`)
|
|
428
|
-
].join(", ");
|
|
429
|
-
if (records.some((record) => changesPairings(record, ids, selector)))
|
|
430
|
-
refresh(true);
|
|
431
|
-
else {
|
|
432
|
-
if (records.some(
|
|
433
|
-
({ attributeName }) => attributeName === SCROLL_OVERFLOW || attributeName === SCROLL_DIVIDER
|
|
434
|
-
))
|
|
435
|
-
apply();
|
|
436
|
-
if (records.some(
|
|
437
|
-
({ attributeName }) => attributeName !== SCROLL_OVERFLOW && attributeName !== SCROLL_DIVIDER
|
|
438
|
-
))
|
|
439
|
-
scheduleRemeasure();
|
|
440
|
-
}
|
|
441
|
-
}) : void 0;
|
|
442
|
-
const targetIds = () => {
|
|
443
|
-
const ids = /* @__PURE__ */ new Set();
|
|
444
|
-
for (const { targets } of registrations)
|
|
445
|
-
for (const target of targets) {
|
|
446
|
-
ids.add(target.scroller);
|
|
447
|
-
for (const edge of EDGES) {
|
|
448
|
-
const id = target[TARGET_EDGES[edge]];
|
|
449
|
-
if (id) ids.add(id);
|
|
450
|
-
}
|
|
451
|
-
}
|
|
452
|
-
return ids;
|
|
453
|
-
};
|
|
454
|
-
const holds = (node, selector) => node.nodeType === 1 && (node.matches(selector) || !!node.querySelector(selector));
|
|
455
|
-
const changesPairings = ({
|
|
456
|
-
type,
|
|
457
|
-
target,
|
|
458
|
-
attributeName,
|
|
459
|
-
oldValue,
|
|
460
|
-
addedNodes,
|
|
461
|
-
removedNodes
|
|
462
|
-
}, ids, selector) => {
|
|
463
|
-
if (type === "attributes" && (attributeName === SCROLL_OVERFLOW || attributeName === SCROLL_DIVIDER))
|
|
464
|
-
return false;
|
|
465
|
-
if (target.nodeType === 1 && target.matches(selector))
|
|
466
|
-
return true;
|
|
467
|
-
if (type === "attributes")
|
|
468
|
-
return attributeName === "class" ? hasStructuralClass(oldValue) : attributeName === "id" && oldValue !== null && ids.has(oldValue);
|
|
469
|
-
for (const node of [...addedNodes, ...removedNodes])
|
|
470
|
-
if (holds(node, selector)) return true;
|
|
471
|
-
return false;
|
|
472
|
-
};
|
|
473
|
-
const syncRoots = () => {
|
|
474
|
-
const roots = new Set([...registrations].map(({ root }) => root));
|
|
475
|
-
for (const root of listenedRoots)
|
|
476
|
-
if (!roots.has(root)) {
|
|
477
|
-
root.removeEventListener("scroll", onScroll, { capture: true });
|
|
478
|
-
listenedRoots.delete(root);
|
|
479
|
-
}
|
|
480
|
-
for (const root of roots)
|
|
481
|
-
if (!listenedRoots.has(root)) {
|
|
482
|
-
root.addEventListener("scroll", onScroll, {
|
|
483
|
-
capture: true,
|
|
484
|
-
passive: true
|
|
485
|
-
});
|
|
486
|
-
listenedRoots.add(root);
|
|
487
|
-
}
|
|
488
|
-
mutationObserver?.disconnect();
|
|
489
|
-
for (const root of roots)
|
|
490
|
-
mutationObserver?.observe(root, {
|
|
491
|
-
subtree: true,
|
|
492
|
-
childList: true,
|
|
493
|
-
attributes: true,
|
|
494
|
-
// Old values tell a class or id that stopped being structural.
|
|
495
|
-
attributeOldValue: true,
|
|
496
|
-
// The shown NavStack view and TabNavigator scene change by attribute,
|
|
497
|
-
// and a Pane's header presentation by its attributes.
|
|
498
|
-
attributeFilter: [
|
|
499
|
-
"data-header-presentation",
|
|
500
|
-
"data-chrome-placement",
|
|
501
|
-
SCROLL_OVERFLOW,
|
|
502
|
-
SCROLL_DIVIDER,
|
|
503
|
-
"id",
|
|
504
|
-
"class",
|
|
505
|
-
"data-nav-active",
|
|
506
|
-
"data-nav-exiting",
|
|
507
|
-
"data-active"
|
|
508
|
-
]
|
|
509
|
-
});
|
|
510
|
-
};
|
|
511
|
-
return (registration) => {
|
|
512
|
-
registrations.add(registration);
|
|
513
|
-
syncRoots();
|
|
514
|
-
refresh();
|
|
515
|
-
return () => {
|
|
516
|
-
if (!registrations.delete(registration)) return;
|
|
517
|
-
syncRoots();
|
|
518
|
-
if (registrations.size) refresh();
|
|
519
|
-
else {
|
|
520
|
-
disposed = true;
|
|
521
|
-
if (remeasureFrame !== void 0)
|
|
522
|
-
view?.cancelAnimationFrame(remeasureFrame);
|
|
523
|
-
remeasureFrame = void 0;
|
|
524
|
-
resizeObserver?.disconnect();
|
|
525
|
-
probe?.remove();
|
|
526
|
-
probe = void 0;
|
|
527
|
-
probePending = false;
|
|
528
|
-
for (const [element, values] of written)
|
|
529
|
-
for (const name of values.keys()) write(element, name, "");
|
|
530
|
-
written.clear();
|
|
531
|
-
overlays.clear();
|
|
532
|
-
headerSizes.clear();
|
|
533
|
-
scrollbarSizes.clear();
|
|
534
|
-
publish();
|
|
535
|
-
overlayObserver?.disconnect();
|
|
536
|
-
overflow.clear();
|
|
537
|
-
observed.clear();
|
|
538
|
-
pairings = [];
|
|
539
|
-
fadeEdges();
|
|
540
|
-
CONTROLLERS.delete(ownerDocument);
|
|
541
|
-
}
|
|
542
|
-
};
|
|
543
|
-
};
|
|
544
|
-
}
|
|
545
|
-
|
|
546
|
-
export { wireScrollDividers };
|
|
547
|
-
|
|
548
|
-
//# sourceMappingURL=chunk-VNT4MXR5.js.map
|