@mono-lit/helper 0.0.8 → 0.0.10

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.
Files changed (161) hide show
  1. package/dist/accordion-core-DaNyPWRr.js +277 -0
  2. package/dist/alert-core-DWtHbX_-.js +134 -0
  3. package/dist/breadcrumb-list-core-Dh68T8Cf.js +747 -0
  4. package/dist/{mono-button-CLkHg3WW.js → button-core-DerXg84Q.js} +3 -276
  5. package/dist/button-dropdown-core-DKYEOyjy.js +654 -0
  6. package/dist/button-utils-D5-66M02.js +63 -0
  7. package/dist/card-utils-l80qAmrN.js +312 -0
  8. package/dist/chart-core-DV7hD3ZY.js +801 -0
  9. package/dist/checkbox-utils-DKdrhAzF.js +337 -0
  10. package/dist/chip-utils-DpRrd7Zj.js +403 -0
  11. package/dist/{data-source-controller-C6C4ej_M.js → data-source-controller-DS_JLrmS.js} +1 -1
  12. package/dist/{data-source-options-fxT5QIX4.js → data-source-options-DJUNU26C.js} +6 -6
  13. package/dist/{data-source-read-BL266IW0.js → data-source-read-uKJpRAzx.js} +2 -2
  14. package/dist/date-core-CyuSyvvG.js +734 -0
  15. package/dist/drawer-core-DbFWvNln.js +759 -0
  16. package/dist/dropdown-core-BCH1pK14.js +511 -0
  17. package/dist/dropdown-table-core-SfHUJVFq.js +1342 -0
  18. package/dist/export.js +1 -1
  19. package/dist/{field-path-BabiMrrA.js → field-path-DK2VBWHl.js} +1 -1
  20. package/dist/field-tooltip.css_raw-DVblekCl.js +5 -0
  21. package/dist/{field-validation.css_raw-Cx6SGrfP.js → field-validation.css_raw-BU7C6173.js} +1 -170
  22. package/dist/file-upload-core-Cz_dBQMx.js +624 -0
  23. package/dist/filter-builder-core-DyWjbBP7.js +381 -0
  24. package/dist/{filter-builder-B6Y2mmbM.js → filter-builder-vbqIuPhX.js} +1 -1
  25. package/dist/{filter-eval-ChDSaAUH.js → filter-eval-CqeBnMYh.js} +1 -1
  26. package/dist/{filter-odata-Bi27XUpQ.js → filter-odata-GsczYKNC.js} +1 -1
  27. package/dist/{hydration-flush-BaE9gN3C.js → hydration-flush-Volt9X7Q.js} +2 -1071
  28. package/dist/index.js +11 -11
  29. package/dist/{index.node-CLqE8F8P.js → index.node-Csy9zrr1.js} +4 -4
  30. package/dist/index.node.js +11 -11
  31. package/dist/input-utils-BglY-k0H.js +1145 -0
  32. package/dist/menu-core-DkAYuCZ2.js +831 -0
  33. package/dist/modal-core-CSBSPN_m.js +844 -0
  34. package/dist/mono-button-DVvZ03P-.js +280 -0
  35. package/dist/{mono-button.shadow-DqZMpcqY.js → mono-button.shadow-BANxMGln.js} +6 -594
  36. package/dist/{mono-data-chart-NKPdAgVq.js → mono-data-chart-ChF4J9RT.js} +6 -6
  37. package/dist/{mono-data-dropdown-DUXo_jxd.js → mono-data-dropdown-Bgj2PDfm.js} +1 -1
  38. package/dist/{mono-data-grid-Bb00QM72.js → mono-data-grid-DJkp96N-.js} +346 -51
  39. package/dist/{mono-event-BPku9HpS.js → mono-event-CAZf0F_k.js} +14 -9
  40. package/dist/{mono-form-controller-BrA10erm.js → mono-form-controller-DxZLvyg6.js} +2 -1
  41. package/dist/mono-table-checkbox-core-BKOMx8R5.js +5288 -0
  42. package/dist/nav-core-B5qU2dzn.js +225 -0
  43. package/dist/{normalize-error-D93O4q8g.js → normalize-error-BEcd1tmS.js} +2 -2
  44. package/dist/otp-core-DXg3vFLh.js +758 -0
  45. package/dist/radio-utils-Dk9Tl1jz.js +319 -0
  46. package/dist/rich-text-editor-core-Ddd_QaLn.js +1280 -0
  47. package/dist/select-utils-BgArYHk8.js +2140 -0
  48. package/dist/sidebar-core-CD6txDo3.js +583 -0
  49. package/dist/slider-core-vcWr321-.js +1014 -0
  50. package/dist/src/components/dropdown-table/dropdown-table-core.d.ts +2 -2
  51. package/dist/src/components/dropdown-table/dropdown-table-types.d.ts +1 -1
  52. package/dist/src/components/dropdown-table/index.d.ts +1 -1
  53. package/dist/src/components/dropdown-table/index.shadow.d.ts +1 -1
  54. package/dist/src/components/dropdown-table/mono-data-dropdown.d.ts +1 -1
  55. package/dist/src/components/form/form-types.d.ts +9 -3
  56. package/dist/src/components/input/input-core.d.ts +1 -1
  57. package/dist/src/components/input/input-types.d.ts +1 -1
  58. package/dist/src/components/otp/otp-core.d.ts +1 -1
  59. package/dist/src/components/select/select-core.d.ts +1 -1
  60. package/dist/src/components/select/select-types.d.ts +1 -1
  61. package/dist/src/components/slider/slider-core.d.ts +1 -1
  62. package/dist/src/components/slider/slider-types.d.ts +1 -1
  63. package/dist/src/components/table/filter-suggestion.d.ts +171 -0
  64. package/dist/src/components/table/index.d.ts +5 -4
  65. package/dist/src/components/table/index.shadow.d.ts +5 -4
  66. package/dist/src/components/table/mono-data-grid.d.ts +58 -3
  67. package/dist/src/components/table/mono-table-empty-core.d.ts +37 -0
  68. package/dist/src/components/table/mono-table-search-core.d.ts +22 -3
  69. package/dist/src/components/table/table-types.d.ts +74 -4
  70. package/dist/src/components/tag-input/tag-input-core.d.ts +1 -1
  71. package/dist/src/components/tag-input/tag-input-types.d.ts +1 -1
  72. package/dist/src/components/textarea/textarea-core.d.ts +1 -1
  73. package/dist/src/composables/mono-event.d.ts +7 -1
  74. package/dist/src/entries/index.d.ts +8 -6
  75. package/dist/src/entries/index.node.d.ts +8 -6
  76. package/dist/src/search/index.d.ts +1 -1
  77. package/dist/src/utils/group-count.d.ts +36 -0
  78. package/dist/switch-utils-CTZ4id2V.js +338 -0
  79. package/dist/tabs-core-r5-B8k_N.js +317 -0
  80. package/dist/tag-input-utils-D2JA90DQ.js +3060 -0
  81. package/dist/textarea-utils-VU1KeXm8.js +821 -0
  82. package/dist/ui/accordion.js +2 -274
  83. package/dist/ui/alert.js +2 -131
  84. package/dist/ui/breadcrumb.js +4 -745
  85. package/dist/ui/button-dropdown.js +4 -652
  86. package/dist/ui/button.js +2 -63
  87. package/dist/ui/card.js +2 -310
  88. package/dist/ui/chart.js +4 -800
  89. package/dist/ui/checkbox.js +4 -335
  90. package/dist/ui/chip.js +4 -402
  91. package/dist/ui/date.js +3 -732
  92. package/dist/ui/drawer.js +3 -757
  93. package/dist/ui/dropdown-table.js +5 -1341
  94. package/dist/ui/dropdown.js +4 -509
  95. package/dist/ui/file-upload.js +3 -622
  96. package/dist/ui/filter.js +5 -380
  97. package/dist/ui/form.js +1 -1
  98. package/dist/ui/index.css +130 -5
  99. package/dist/ui/input.js +3 -1141
  100. package/dist/ui/menu.js +4 -828
  101. package/dist/ui/modal.js +4 -843
  102. package/dist/ui/nav.js +4 -223
  103. package/dist/ui/otp.js +4 -756
  104. package/dist/ui/radio.js +4 -317
  105. package/dist/ui/rich-text-editor.js +4 -1278
  106. package/dist/ui/select.js +5 -2138
  107. package/dist/ui/shadow/accordion.js +4 -273
  108. package/dist/ui/shadow/alert.js +4 -130
  109. package/dist/ui/shadow/breadcrumb.js +5 -744
  110. package/dist/ui/shadow/button-dropdown.js +6 -652
  111. package/dist/ui/shadow/button.js +3 -63
  112. package/dist/ui/shadow/card.js +4 -309
  113. package/dist/ui/shadow/chart.js +6 -1576
  114. package/dist/ui/shadow/checkbox.js +4 -334
  115. package/dist/ui/shadow/chip.js +4 -396
  116. package/dist/ui/shadow/date.js +7 -731
  117. package/dist/ui/shadow/drawer.js +4 -756
  118. package/dist/ui/shadow/dropdown-table.js +8 -1762
  119. package/dist/ui/shadow/dropdown.js +4 -508
  120. package/dist/ui/shadow/file-upload.js +4 -620
  121. package/dist/ui/shadow/filter.js +7 -379
  122. package/dist/ui/shadow/input.js +6 -1140
  123. package/dist/ui/shadow/menu.js +5 -828
  124. package/dist/ui/shadow/modal.js +6 -1063
  125. package/dist/ui/shadow/nav.js +5 -223
  126. package/dist/ui/shadow/otp.js +6 -754
  127. package/dist/ui/shadow/radio.js +4 -316
  128. package/dist/ui/shadow/rich-text-editor.js +4 -1276
  129. package/dist/ui/shadow/select.js +6 -2136
  130. package/dist/ui/shadow/sidebar.js +5 -581
  131. package/dist/ui/shadow/slider.js +5 -1010
  132. package/dist/ui/shadow/switch.js +4 -335
  133. package/dist/ui/shadow/table.js +10 -4501
  134. package/dist/ui/shadow/tabs.js +6 -315
  135. package/dist/ui/shadow/tag-input.js +7 -3057
  136. package/dist/ui/shadow/textarea.js +6 -817
  137. package/dist/ui/sidebar.js +3 -581
  138. package/dist/ui/slider.js +4 -1012
  139. package/dist/ui/switch.js +4 -336
  140. package/dist/ui/table.js +9 -4502
  141. package/dist/ui/tabs.js +4 -315
  142. package/dist/ui/tag-input.js +5 -3058
  143. package/dist/ui/textarea.js +4 -819
  144. package/dist/vue.d.ts +3 -2
  145. package/package.json +3 -3
  146. package/dist/chip-strip-bNfLn52Z.js +0 -215
  147. package/dist/data-source-controller-Dx6IQ2CN.js +0 -243
  148. package/dist/data-source-options-BM4r4PRw.js +0 -558
  149. package/dist/data-source-read-HyBCRg1t.js +0 -242
  150. package/dist/excel-BXzr3uI1.js +0 -784
  151. package/dist/export-ixRdCS2y.js +0 -2388
  152. package/dist/field-tooltip-addon-CWCp19mJ.js +0 -702
  153. package/dist/field-tooltip.css_raw-U5UeTa2d.js +0 -269
  154. package/dist/filter-builder-C0T3pMx2.js +0 -208
  155. package/dist/form-control-core-BbiACMtL.js +0 -226
  156. package/dist/icon-ClxnYhBG.js +0 -19
  157. package/dist/import-Dc4eXC02.js +0 -612
  158. package/dist/light-slots-_no0r2Z-.js +0 -246
  159. package/dist/markdown-uGlE_OfJ.js +0 -20191
  160. package/dist/mono-data-grid-Bkr-e1-i.js +0 -4043
  161. package/dist/normalize-error-BmLbgANw.js +0 -1048
@@ -1,1074 +1,5 @@
1
- import { html, isServer } from "lit";
1
+ import { isServer } from "lit";
2
2
 
3
- //#region src/composables/mono-skeleton.ts
4
- /**
5
- * "Is there a DOM to render into?" — deliberately NOT lit's `isServer`. That flag is a
6
- * build-time constant of lit's node entry, so it is `true` wherever Node's export
7
- * conditions pick that build — including a jsdom test run, where this feature must work.
8
- * On a real server (`@lit-labs/ssr` + its dom shim) there is a `customElements` but no
9
- * `document`, which is exactly the distinction that matters here.
10
- */
11
- const hasDom$1 = typeof document !== "undefined" && typeof customElements !== "undefined";
12
- /**
13
- * ONE store per realm, on `globalThis` (same reasoning as `mono-ui.ts`): the light and
14
- * shadow builds are separate bundles and a pnpm peer fork can install two copies of the
15
- * package, yet all of them must agree on "active" and on the defaults.
16
- */
17
- const STATE_KEY$1 = Symbol.for("mono-helper.skeleton");
18
- const state$2 = globalThis[STATE_KEY$1] ??= {
19
- active: false,
20
- disabled: false,
21
- ssr: null,
22
- ssrSniffed: null,
23
- defaults: {},
24
- watching: false,
25
- createdBeforeActive: 0,
26
- createdBeforeActiveTags: [],
27
- warnedLate: false,
28
- waiting: /* @__PURE__ */ new Set(),
29
- holders: /* @__PURE__ */ new Set()
30
- };
31
- const PHANTOM_TAG$1 = "phantom-ui";
32
- const DEFAULT_MAX_WAIT$1 = 15e3;
33
- /** Per-element slots the Cores can read without depending on the mixin's class shape. */
34
- const TAG_DEFAULT$1 = Symbol.for("mono-helper.skeleton.tagDefault");
35
- const PENDING_ACTIVE$1 = Symbol.for("mono-helper.skeleton.active");
36
- const PENDING_GRACE$1 = Symbol.for("mono-helper.skeleton.grace");
37
- const PENDING_PHANTOM$1 = Symbol.for("mono-helper.skeleton.phantom");
38
- /** Where `applyMonoUIDefaults` parks a tag's `pending` default (not assigned to the prop). */
39
- const MONO_PENDING_TAG_DEFAULT = TAG_DEFAULT$1;
40
- function isActive$1() {
41
- return state$2.active && !state$2.disabled;
42
- }
43
- /**
44
- * Start following the registry. Idempotent; a no-op on the server. Called by the mono
45
- * `customElement` decorator, so the watcher exists before any element constructs.
46
- */
47
- function watchSkeletonActivation() {
48
- if (!hasDom$1 || state$2.watching) return;
49
- state$2.watching = true;
50
- const activate = () => {
51
- state$2.active = true;
52
- if (state$2.createdBeforeActive > 0 && !state$2.warnedLate) {
53
- state$2.warnedLate = true;
54
- const tags = state$2.createdBeforeActiveTags.slice(0, 5).join(", ");
55
- console.warn(`[mono-skeleton] phantom-ui was defined after ${state$2.createdBeforeActive} mono element(s) had rendered (${tags}); their first paint had no skeleton. Load "@aejkatappaja/phantom-ui" before the app mounts (main.ts import, or let @mono-lit/helper/nuxt do it).`);
56
- }
57
- };
58
- if (customElements.get(PHANTOM_TAG$1)) {
59
- activate();
60
- return;
61
- }
62
- customElements.whenDefined(PHANTOM_TAG$1).then(activate, () => {});
63
- }
64
- /**
65
- * Is this an SSR app? The explicit flag (`createMonoUI({ skeleton: { ssr } })`, which the
66
- * Nuxt module sets from `nuxt.options.ssr`) wins; otherwise the Nuxt payload marker is
67
- * sniffed once (`<script id="__NUXT_DATA__" data-ssr="true">`).
68
- */
69
- function isMonoSsrApp() {
70
- if (state$2.ssr !== null) return state$2.ssr;
71
- if (state$2.ssrSniffed === null) state$2.ssrSniffed = hasDom$1 && document.getElementById("__NUXT_DATA__")?.getAttribute("data-ssr") === "true";
72
- return state$2.ssrSniffed;
73
- }
74
- const PHANTOM_KEYS = [
75
- "animation",
76
- "mode",
77
- "shimmerDirection",
78
- "shimmerColor",
79
- "backgroundColor",
80
- "duration",
81
- "stagger",
82
- "reveal",
83
- "count",
84
- "countGap",
85
- "fallbackRadius",
86
- "loadingLabel",
87
- "pierceShadow",
88
- "debug"
89
- ];
90
- const kebab = (name) => name.replace(/[A-Z]/g, (m) => `-${m.toLowerCase()}`);
91
- function isPendingObject(value) {
92
- return !!value && typeof value === "object";
93
- }
94
- /** The boolean a `pending` value carries (`undefined` = auto). */
95
- function activeOf$1(value) {
96
- if (typeof value === "boolean") return value;
97
- if (isPendingObject(value)) return typeof value.active === "boolean" ? value.active : void 0;
98
- }
99
- /** Only the phantom options of a value (an object), as a plain record. */
100
- function phantomOf$1(value) {
101
- const out = {};
102
- if (!isPendingObject(value)) return out;
103
- for (const key of PHANTOM_KEYS) {
104
- const v = value[key];
105
- if (v !== void 0) out[key] = v;
106
- }
107
- return out;
108
- }
109
- function shallowEqual(a, b) {
110
- const ka = Object.keys(a);
111
- const kb = Object.keys(b);
112
- if (ka.length !== kb.length) return false;
113
- for (const k of ka) if (a[k] !== b[k]) return false;
114
- return true;
115
- }
116
- /** `hasChanged` for the property: booleans by value, objects shallowly. */
117
- function pendingChanged(next, prev) {
118
- if (isPendingObject(next) && isPendingObject(prev)) return !shallowEqual(next, prev);
119
- return next !== prev;
120
- }
121
- /**
122
- * The attribute converter. The attribute form is boolean-only: `pending`,
123
- * `pending="true"` → true; `pending="false"` → false; absent or `pending="auto"` → auto.
124
- * A real boolean is accepted too (what a server renderer hands over).
125
- */
126
- const pendingConverter = {
127
- fromAttribute(value) {
128
- if (value === null || value === void 0) return void 0;
129
- if (typeof value === "boolean") return value;
130
- const s = String(value).trim().toLowerCase();
131
- if (s === "auto") return void 0;
132
- return s === "" || s === "true";
133
- },
134
- toAttribute() {
135
- return null;
136
- }
137
- };
138
- /**
139
- * Register the `pending` property on a registered element class. Called by the mono
140
- * `customElement` decorator BEFORE `customElements.define`, so the attribute lands in
141
- * Lit's attribute map when `observedAttributes` is read.
142
- */
143
- function registerPendingProperty(cls) {
144
- cls.createProperty("pending", {
145
- attribute: "pending",
146
- reflect: false,
147
- converter: pendingConverter,
148
- hasChanged: pendingChanged
149
- });
150
- }
151
- /** Whether `pending` currently resolves to true for `el` (set before each render). */
152
- function monoPendingActive(el) {
153
- return !!el[PENDING_ACTIVE$1];
154
- }
155
- /**
156
- * True once one macrotask has passed since the element first resolved pending — lets a
157
- * `'data'` Core say "no controller / source after one tick → nothing to wait for" without
158
- * releasing before a binding made in the consumer's `onMounted`.
159
- */
160
- function monoPendingGrace(el) {
161
- return !!el[PENDING_GRACE$1];
162
- }
163
- /**
164
- * The phantom options resolved for `el` while pending (element object over tag default
165
- * over global default), camelCase keys. Empty while not pending. For `'custom'` Cores
166
- * that render their own `<phantom-ui>` and want a value in the template (e.g. `count`).
167
- */
168
- function monoPhantomOptions(el) {
169
- return el[PENDING_PHANTOM$1] ?? {};
170
- }
171
- /**
172
- * Apply the resolved phantom options to a `<phantom-ui>` element as attributes (used by
173
- * the mixin for its wrapper, and by `'custom'` Cores for the phantom they render).
174
- * Diffed against what was last applied to that element, so unchanged values cost nothing.
175
- */
176
- function monoApplyPhantomOptions(el, target) {
177
- if (!target) return;
178
- const next = el[PENDING_PHANTOM$1] ?? {};
179
- const store = target;
180
- const prev = store[PENDING_PHANTOM$1] ?? {};
181
- if (shallowEqual(next, prev)) return;
182
- for (const key of /* @__PURE__ */ new Set([...Object.keys(prev), ...Object.keys(next)])) {
183
- const value = next[key];
184
- const attr = kebab(key);
185
- if (value === void 0 || value === null || value === false) target.removeAttribute(attr);
186
- else if (value === true) target.setAttribute(attr, "");
187
- else target.setAttribute(attr, String(value));
188
- }
189
- store[PENDING_PHANTOM$1] = { ...next };
190
- }
191
- /** @internal */
192
- const monoSkeletonInternals = {
193
- hasDom: hasDom$1,
194
- isActive: isActive$1,
195
- state: state$2,
196
- slots: {
197
- TAG_DEFAULT: TAG_DEFAULT$1,
198
- PENDING_ACTIVE: PENDING_ACTIVE$1,
199
- PENDING_GRACE: PENDING_GRACE$1,
200
- PENDING_PHANTOM: PENDING_PHANTOM$1
201
- },
202
- activeOf: activeOf$1,
203
- phantomOf: phantomOf$1,
204
- PHANTOM_TAG: PHANTOM_TAG$1,
205
- DEFAULT_MAX_WAIT: DEFAULT_MAX_WAIT$1
206
- };
207
- /** The `<phantom-ui>` wrapper the skeleton mixin renders around an element's content. */
208
- function isMonoSkeletonWrapper(node) {
209
- return !!node && node.nodeType === 1 && node.localName === PHANTOM_TAG$1 && node.hasAttribute("mono-skeleton");
210
- }
211
- /** `Array.from(host.childNodes)` minus the skeleton wrapper. */
212
- function monoHostChildNodes(host) {
213
- return Array.from(host.childNodes).filter((n) => !isMonoSkeletonWrapper(n));
214
- }
215
- /** `Array.from(host.children)` minus the skeleton wrapper. */
216
- function monoHostChildren(host) {
217
- return Array.from(host.children).filter((n) => !isMonoSkeletonWrapper(n));
218
- }
219
-
220
- //#endregion
221
- //#region src/composables/css-size.ts
222
- /**
223
- * Normalize a sizing prop to a CSS length string.
224
- * - `number` (or numeric string) → `${n}px`
225
- * - any other non-empty string → passed through verbatim (`"12rem"`, `"80%"`, …)
226
- * - `null` / `undefined` / `''` → `undefined` (treated as "not set")
227
- */
228
- function toCssSize(value) {
229
- if (value === null || value === void 0) return void 0;
230
- if (typeof value === "number") return Number.isFinite(value) ? `${value}px` : void 0;
231
- const trimmed = String(value).trim();
232
- if (trimmed === "") return void 0;
233
- if (/^-?\d+(\.\d+)?$/.test(trimmed)) return `${trimmed}px`;
234
- return trimmed;
235
- }
236
- /**
237
- * Build a Lit `styleMap` object from the six sizing props, normalizing each via
238
- * `toCssSize` and omitting the ones that aren't set.
239
- */
240
- function buildSizeStyle(src) {
241
- const style = {};
242
- const width = toCssSize(src.width);
243
- const height = toCssSize(src.height);
244
- const minWidth = toCssSize(src.minWidth);
245
- const maxWidth = toCssSize(src.maxWidth);
246
- const minHeight = toCssSize(src.minHeight);
247
- const maxHeight = toCssSize(src.maxHeight);
248
- if (width) style.width = width;
249
- if (height) style.height = height;
250
- if (minWidth) style["min-width"] = minWidth;
251
- if (maxWidth) style["max-width"] = maxWidth;
252
- if (minHeight) style["min-height"] = minHeight;
253
- if (maxHeight) style["max-height"] = maxHeight;
254
- return style;
255
- }
256
-
257
- //#endregion
258
- //#region src/components/table/column-autosize.ts
259
- /**
260
- * Content-sized columns — what `mono-table-th`'s `width="auto"` drives.
261
- *
262
- * Under `mono-table-fixed` (`table-layout: fixed`) CSS cannot do this: an `auto` column takes
263
- * the WHOLE surplus instead of fitting its content, and `min-width` / `max-width` on a cell are
264
- * ignored by the table algorithm. So the column is measured here and handed a concrete px width,
265
- * clamped to `minWidth` / `maxWidth`, written to its `<col>` (which wins under fixed layout) and
266
- * to the header cell.
267
- *
268
- * Text is measured with a canvas, not read back from the cell: reading the cell's own width would
269
- * return the width last written, and a column could then never shrink. Measuring text also keeps
270
- * the pass free of layout reads, so re-running it on every change is cheap.
271
- *
272
- * What is measured: the header (caption + its icons), every body cell and every FOOTER cell of
273
- * the column. The footer matters — a `<mono-table-summary>` total covers the whole set, so a
274
- * virtual-scroll window that only shows small figures still sizes for the largest one.
275
- *
276
- * Cell content is treated as one line (what a money column is). An editor (`<input>`, including
277
- * the one inside `mono-input`) counts with its value and its own padding / border.
278
- */
279
- /** The text measurer — swappable so tests can run where there is no canvas (jsdom). */
280
- const autosizeEnv = { measure: defaultMeasure };
281
- let ctx;
282
- function defaultMeasure(text, font) {
283
- if (ctx === void 0) ctx = document.createElement("canvas").getContext("2d");
284
- if (!ctx) return text.length * 8;
285
- ctx.font = font;
286
- return ctx.measureText(text).width;
287
- }
288
- /**
289
- * A canvas `font` string for a computed style — always built from the longhands.
290
- *
291
- * NOT `style.font`: the shorthand serialises to `''` whenever a longhand it cannot express is set,
292
- * and `font-variant-numeric: tabular-nums` (every `mono-table-summary`) is one. The old fallback then
293
- * put `fontVariant` (`tabular-nums`) into the string, canvas rejected it, kept its default
294
- * `10px sans-serif`, and a footer total measured far too narrow — the largest figure ellipsed.
295
- * Only `small-caps` is a variant canvas takes; tabular figures are handled in `measureStyled`.
296
- */
297
- function fontOf(style) {
298
- const caps = style.fontVariantCaps === "small-caps" ? "small-caps" : "";
299
- return [
300
- style.fontStyle,
301
- caps,
302
- style.fontWeight,
303
- style.fontSize,
304
- style.fontFamily
305
- ].filter(Boolean).join(" ");
306
- }
307
- const px = (v) => parseFloat(v) || 0;
308
- /** The widest digit in `font` — a tabular figure's advance, which canvas cannot be asked for. */
309
- const digitWidths = /* @__PURE__ */ new Map();
310
- function maxDigit(font) {
311
- let w = digitWidths.get(font);
312
- if (w === void 0) {
313
- w = Math.max(..."0123456789".split("").map((d) => autosizeEnv.measure(d, font)));
314
- digitWidths.set(font, w);
315
- }
316
- return w;
317
- }
318
- /**
319
- * `text` as the element renders it: its `text-transform`, its `letter-spacing` (canvas ignores
320
- * both) and its `font-variant-numeric: tabular-nums` (every digit at the widest digit's advance —
321
- * a safe upper bound; tabular figures are wider than the proportional ones canvas measures).
322
- */
323
- function measureStyled(text, style) {
324
- const font = fontOf(style);
325
- if (style.textTransform === "uppercase") text = text.toUpperCase();
326
- else if (style.textTransform === "lowercase") text = text.toLowerCase();
327
- let width;
328
- if (/tabular-nums/.test(style.fontVariantNumeric ?? "")) {
329
- const digits = text.replace(/\D/g, "").length;
330
- width = autosizeEnv.measure(text.replace(/\d/g, ""), font) + digits * maxDigit(font);
331
- } else width = autosizeEnv.measure(text, font);
332
- return width + px(style.letterSpacing) * text.length;
333
- }
334
- /** Horizontal padding + border of an element's box. */
335
- function boxX(style) {
336
- return px(style.paddingLeft) + px(style.paddingRight) + px(style.borderLeftWidth) + px(style.borderRightWidth);
337
- }
338
- /**
339
- * A size prop as px: a number / bare numeric string / `px` → px, `rem` → × the root font size,
340
- * `em` → × `el`'s font size. Anything else (`%`, `auto`, a var) → `undefined`: not a bound.
341
- */
342
- function cssLengthToPx(value, el) {
343
- if (value == null) return void 0;
344
- if (typeof value === "number") return Number.isFinite(value) ? value : void 0;
345
- const m = /^\s*(-?\d+(?:\.\d+)?)\s*(px|rem|em)?\s*$/i.exec(value);
346
- if (!m) return void 0;
347
- const n = parseFloat(m[1]);
348
- const unit = (m[2] ?? "px").toLowerCase();
349
- if (unit === "px") return n;
350
- const ref = unit === "rem" ? document.documentElement : el ?? document.documentElement;
351
- return n * (px(getComputedStyle(ref).fontSize) || 16);
352
- }
353
- /** `w` clamped to `[min, max]`; an unset bound does not clamp. `min` wins over a smaller `max`. */
354
- function clampWidth(w, min, max) {
355
- if (max != null) w = Math.min(w, max);
356
- if (min != null) w = Math.max(w, min);
357
- return w;
358
- }
359
- /**
360
- * The grid column a header cell STARTS at — a walk over its section's rows honouring `rowspan`
361
- * and `colspan`, so a leaf header under a band row (`<th colspan>` above it) maps to its real
362
- * column. `cellIndex` alone would count only the cells of its own row.
363
- */
364
- function headerColumnIndex(cell) {
365
- const section = cell.parentElement?.parentElement;
366
- if (!section) return cell.cellIndex;
367
- const taken = [];
368
- const rows = Array.from(section.children).filter((r) => r.tagName === "TR");
369
- for (let r = 0; r < rows.length; r++) {
370
- taken[r] ??= [];
371
- let c = 0;
372
- for (const cur of Array.from(rows[r].cells)) {
373
- while (taken[r][c]) c++;
374
- if (cur === cell) return c;
375
- for (let dr = 0; dr < Math.max(1, cur.rowSpan); dr++) {
376
- const row = taken[r + dr] ??= [];
377
- for (let dc = 0; dc < Math.max(1, cur.colSpan); dc++) row[c + dc] = true;
378
- }
379
- c += Math.max(1, cur.colSpan);
380
- }
381
- }
382
- return cell.cellIndex;
383
- }
384
- /** The single-column cell of `row` at grid column `col` — a spanning cell (a spacer row) is none. */
385
- function cellAt(row, col) {
386
- let c = 0;
387
- for (const cell of Array.from(row.cells)) {
388
- const span = Math.max(1, cell.colSpan);
389
- if (c === col) return span === 1 ? cell : void 0;
390
- if (c > col) return void 0;
391
- c += span;
392
- }
393
- }
394
- /** The `<col>` at grid column `col`, honouring `<col span>`. */
395
- function colAt(table, col) {
396
- let c = 0;
397
- for (const group of Array.from(table.children).filter((e) => e.tagName === "COLGROUP")) {
398
- const cols = Array.from(group.children).filter((e) => e.tagName === "COL");
399
- for (const el of cols) {
400
- const span = Math.max(1, el.span || 1);
401
- if (col < c + span) return span === 1 ? el : void 0;
402
- c += span;
403
- }
404
- }
405
- }
406
- /** An element hidden by `v-show` / `hidden` — its text does not show, so it does not count. */
407
- function isHidden(el) {
408
- return el.hidden === true || el.style?.display === "none";
409
- }
410
- /** The one-line width a cell's content needs, padding included. */
411
- function contentWidth(cell) {
412
- let width = 0;
413
- const walk = (node) => {
414
- for (const child of Array.from(node.childNodes)) if (child.nodeType === Node.TEXT_NODE) {
415
- const text = (child.textContent ?? "").replace(/\s+/g, " ");
416
- if (!text.trim()) continue;
417
- const parent = child.parentElement ?? node.host ?? cell;
418
- width += measureStyled(text, getComputedStyle(parent));
419
- } else if (child.nodeType === Node.ELEMENT_NODE) {
420
- const el = child;
421
- if (isHidden(el)) continue;
422
- if (el.tagName === "INPUT" || el.tagName === "TEXTAREA") {
423
- const input = el;
424
- const style = getComputedStyle(input);
425
- width += measureStyled(input.value || input.placeholder || "", style) + boxX(style);
426
- continue;
427
- }
428
- if (el.tagName === "SVG" || el.tagName === "svg") {
429
- width += el.getBoundingClientRect?.().width || 0;
430
- continue;
431
- }
432
- walk(el.shadowRoot ?? el);
433
- }
434
- };
435
- walk(cell);
436
- return width + boxX(getComputedStyle(cell));
437
- }
438
- /** The header cell's need: the caption text plus whatever icons sit beside it. */
439
- function headerWidth(cell, host) {
440
- const label = host.querySelector("[data-mono-slot=\"label\"]");
441
- const text = (label?.textContent ?? host.textContent ?? "").replace(/\s+/g, " ").trim();
442
- let width = text ? measureStyled(text, getComputedStyle(label ?? host)) : 0;
443
- for (const icon of Array.from(host.querySelectorAll(".mono-th-filter-ind, .mono-table-sort-btn:not(.label-trigger), .mono-th-required"))) {
444
- const w = icon.getBoundingClientRect?.().width || 0;
445
- width += w ? w + 4 : 0;
446
- }
447
- return width + boxX(getComputedStyle(cell));
448
- }
449
- /**
450
- * One auto-sized column, owned by its `mono-table-th`. `schedule()` coalesces every trigger (a
451
- * controller notify, a body mutation, typing in an editor) into one measurement per frame.
452
- */
453
- var ColumnAutoSize = class ColumnAutoSize {
454
- constructor(host) {
455
- this.host = host;
456
- this.growOnly = false;
457
- this._floor = 0;
458
- this._raf = 0;
459
- this._onInput = (e) => {
460
- const t = e.target;
461
- if (t && this._table && !this._table.tHead?.contains(t)) this.schedule();
462
- };
463
- this._onFonts = () => {
464
- digitWidths.clear();
465
- this.schedule();
466
- };
467
- }
468
- static {
469
- this._queued = /* @__PURE__ */ new Set();
470
- }
471
- static {
472
- this._frame = 0;
473
- }
474
- static _flush() {
475
- ColumnAutoSize._frame = 0;
476
- const batch = [...ColumnAutoSize._queued];
477
- ColumnAutoSize._queued.clear();
478
- const writes = batch.map((s) => {
479
- s._raf = 0;
480
- return s._measure();
481
- });
482
- for (const write of writes) write?.();
483
- }
484
- schedule() {
485
- if (this._raf) return;
486
- this._raf = 1;
487
- ColumnAutoSize._queued.add(this);
488
- ColumnAutoSize._frame ||= requestAnimationFrame(() => ColumnAutoSize._flush());
489
- }
490
- /** Forget the grow-only floor (new rows) and re-measure. */
491
- resetFloor() {
492
- if (!this._floor) return;
493
- this._floor = 0;
494
- this.schedule();
495
- }
496
- /** Stop watching, and hand the column back to whatever width it is given next. */
497
- stop(clear = false) {
498
- ColumnAutoSize._queued.delete(this);
499
- this._raf = 0;
500
- this._unwatch();
501
- if (clear && this._wrote) {
502
- if (this._wrote.col) this._wrote.col.style.width = "";
503
- this._wrote.cell.style.width = "";
504
- }
505
- this._wrote = void 0;
506
- }
507
- _watch(table) {
508
- if (this._table === table) return;
509
- this._unwatch();
510
- this._table = table;
511
- this._observer = new MutationObserver((records) => {
512
- const head = table.tHead;
513
- if (records.some((r) => !head?.contains(r.target))) this.schedule();
514
- });
515
- this._observer.observe(table, {
516
- childList: true,
517
- characterData: true,
518
- subtree: true
519
- });
520
- table.addEventListener("input", this._onInput, true);
521
- document.fonts?.addEventListener?.("loadingdone", this._onFonts);
522
- }
523
- _unwatch() {
524
- this._observer?.disconnect();
525
- this._observer = void 0;
526
- this._table?.removeEventListener("input", this._onInput, true);
527
- document.fonts?.removeEventListener?.("loadingdone", this._onFonts);
528
- this._table = void 0;
529
- }
530
- /** Measure now (reads only); returns the write to apply after every sizer has measured. */
531
- _measure() {
532
- const cell = this.host.closest("th, td");
533
- const table = cell?.closest("table");
534
- if (!cell || !table || !this.host.isConnected) return null;
535
- this._watch(table);
536
- const index = headerColumnIndex(cell);
537
- let width = headerWidth(cell, this.host);
538
- const sections = [...Array.from(table.tBodies), ...table.tFoot ? [table.tFoot] : []];
539
- for (const section of sections) for (const row of Array.from(section.rows)) {
540
- const target = cellAt(row, index);
541
- if (target) width = Math.max(width, contentWidth(target));
542
- }
543
- width = Math.ceil(clampWidth(width + 1, this.min, this.max));
544
- if (this.growOnly) width = this._floor = Math.max(width, this._floor);
545
- else this._floor = 0;
546
- const value = `${width}px`;
547
- const col = colAt(table, index);
548
- return () => {
549
- if (cell.style.width !== value) cell.style.width = value;
550
- if (col && col.style.width !== value) col.style.width = value;
551
- this._wrote = {
552
- col,
553
- cell
554
- };
555
- };
556
- }
557
- };
558
-
559
- //#endregion
560
- //#region src/composables/mono-size-attrs.ts
561
- const ATTRS = [
562
- "mono-width",
563
- "mono-min-width",
564
- "mono-max-width"
565
- ];
566
- const SELECTOR = ATTRS.map((a) => `[${a}]`).join(", ");
567
- /** Auto-sized cells and their sizers — a cell that loses `auto` or the document gets stopped. */
568
- const sizers = /* @__PURE__ */ new Map();
569
- let observer = null;
570
- const isCell = (el) => el.tagName === "TH" || el.tagName === "TD";
571
- /** Apply the three attributes to one element. Re-run whenever one of them changes. */
572
- function applyMonoSizeAttributes(el) {
573
- const width = el.getAttribute("mono-width")?.trim() ?? "";
574
- const min = el.getAttribute("mono-min-width")?.trim() ?? "";
575
- const max = el.getAttribute("mono-max-width")?.trim() ?? "";
576
- const auto = width.toLowerCase() === "auto";
577
- el.style.minWidth = min ? toCssSize(min) ?? "" : "";
578
- el.style.maxWidth = max ? toCssSize(max) ?? "" : "";
579
- if (!isCell(el)) {
580
- el.style.width = auto ? "fit-content" : width ? toCssSize(width) ?? "" : "";
581
- return;
582
- }
583
- let sizer = sizers.get(el);
584
- if (!auto) {
585
- if (sizer) {
586
- sizer.stop(true);
587
- sizers.delete(el);
588
- }
589
- el.style.width = width ? toCssSize(width) ?? "" : "";
590
- return;
591
- }
592
- if (!sizer) sizers.set(el, sizer = new ColumnAutoSize(el));
593
- sizer.min = cssLengthToPx(min || null, el);
594
- sizer.max = cssLengthToPx(max || null, el);
595
- sizer.schedule();
596
- }
597
- /** Stop the sizers of cells that left the document. */
598
- function sweep() {
599
- for (const [el, sizer] of sizers) {
600
- if (el.isConnected) continue;
601
- sizer.stop();
602
- sizers.delete(el);
603
- }
604
- }
605
- function scan(root) {
606
- if (root instanceof HTMLElement && root.matches(SELECTOR)) applyMonoSizeAttributes(root);
607
- for (const el of Array.from(root.querySelectorAll(SELECTOR))) applyMonoSizeAttributes(el);
608
- }
609
- /**
610
- * Turn the attributes on for the whole document — idempotent, so every caller may call it.
611
- * Returns a stop function (tests; an app never needs it).
612
- */
613
- function startMonoSizeAttributes() {
614
- if (typeof document === "undefined" || typeof MutationObserver === "undefined") return () => {};
615
- if (!observer) {
616
- observer = new MutationObserver((records) => {
617
- let removed = false;
618
- for (const r of records) {
619
- if (r.type === "attributes") {
620
- applyMonoSizeAttributes(r.target);
621
- continue;
622
- }
623
- for (const node of Array.from(r.addedNodes)) if (node.nodeType === 1 && node.isConnected) scan(node);
624
- if (r.removedNodes.length) removed = true;
625
- }
626
- if (removed && sizers.size) sweep();
627
- });
628
- observer.observe(document.documentElement, {
629
- subtree: true,
630
- childList: true,
631
- attributes: true,
632
- attributeFilter: [...ATTRS]
633
- });
634
- scan(document);
635
- }
636
- return stopMonoSizeAttributes;
637
- }
638
- function stopMonoSizeAttributes() {
639
- observer?.disconnect();
640
- observer = null;
641
- for (const sizer of sizers.values()) sizer.stop();
642
- sizers.clear();
643
- }
644
-
645
- //#endregion
646
- //#region src/composables/mono-ui.ts
647
- const STATE_KEY = Symbol.for("mono-helper.ui");
648
- const state$1 = globalThis[STATE_KEY] ??= {
649
- store: null,
650
- createdTotal: 0,
651
- createdTags: [],
652
- createdBeforeConfig: 0,
653
- createdBeforeConfigTags: [],
654
- warned: /* @__PURE__ */ new Set()
655
- };
656
- const SHADOW_PREFIX = "mono-shadow-";
657
- function warnOnce(key, message) {
658
- if (state$1.warned.has(key)) return;
659
- state$1.warned.add(key);
660
- console.warn(`[mono-ui] ${message}`);
661
- }
662
- const camel = (name) => name.replace(/-([a-z0-9])/g, (_m, c) => c.toUpperCase());
663
- /** Arrays and plain objects are copied per element, so one element cannot mutate the shared config. */
664
- function fresh(value) {
665
- if (Array.isArray(value)) return [...value];
666
- if (value && typeof value === "object" && Object.getPrototypeOf(value) === Object.prototype) return { ...value };
667
- return value;
668
- }
669
- /**
670
- * Apply the configured defaults to a freshly constructed element. Called by the
671
- * mono `customElement` decorator at the end of construction — not public API.
672
- * @internal
673
- */
674
- function applyMonoUIDefaults(el, tag) {
675
- state$1.createdTotal++;
676
- if (!state$1.createdTags.includes(tag)) state$1.createdTags.push(tag);
677
- if (!state$1.store) return;
678
- const base = tag.startsWith(SHADOW_PREFIX) ? `mono-${tag.slice(12)}` : tag;
679
- const props = {
680
- ...state$1.store[base] ?? {},
681
- ...base !== tag ? state$1.store[tag] ?? {} : {}
682
- };
683
- for (const [key, value] of Object.entries(props)) {
684
- if (value === void 0) continue;
685
- const prop = camel(key);
686
- if (prop === "pending") {
687
- el[MONO_PENDING_TAG_DEFAULT] = fresh(value);
688
- continue;
689
- }
690
- if (!(prop in el)) {
691
- warnOnce(`prop:${base}:${prop}`, `<${base}> has no prop "${key}". Ignored.`);
692
- continue;
693
- }
694
- el[prop] = fresh(value);
695
- }
696
- }
697
-
698
- //#endregion
699
- //#region src/composables/mono-pending.ts
700
- const { hasDom, isActive, state, activeOf, phantomOf, PHANTOM_TAG, DEFAULT_MAX_WAIT } = monoSkeletonInternals;
701
- const { TAG_DEFAULT, PENDING_ACTIVE, PENDING_GRACE, PENDING_PHANTOM } = monoSkeletonInternals.slots;
702
- /**
703
- * Applied to every registered element class by the mono `customElement` decorator.
704
- * The property itself is registered separately (`registerPendingProperty`) so it lands in
705
- * Lit's attribute map before `customElements.define`.
706
- */
707
- function withMonoPending(superClass, tag) {
708
- class WithMonoPending extends superClass {
709
- constructor(...args) {
710
- super(...args);
711
- this._monoWrap = false;
712
- this._monoCssOnly = false;
713
- this._monoSeenInactive = false;
714
- this._monoReleased = false;
715
- this._monoHadShadowRoot = false;
716
- this._monoPageChecked = false;
717
- if (hasDom) this._monoHadShadowRoot = !!this.shadowRoot;
718
- }
719
- get _monoStatics() {
720
- return this.constructor;
721
- }
722
- get _monoIsShadow() {
723
- return this.renderRoot !== this;
724
- }
725
- willUpdate(changed) {
726
- super.willUpdate?.(changed);
727
- if (!hasDom) return;
728
- this._monoResolve();
729
- }
730
- /** Resolve `pending` → the per-element slots the render / the Cores read. */
731
- _monoResolve() {
732
- const self = this;
733
- const own = self.pending;
734
- const tagDefault = self[TAG_DEFAULT];
735
- const explicit = activeOf(own) ?? activeOf(tagDefault);
736
- const statics = this._monoStatics;
737
- this._monoCssOnly = statics.monoPendingDraw === "css";
738
- let loading = false;
739
- if (explicit !== void 0) loading = explicit;
740
- else if (isActive()) loading = this._monoAuto(statics);
741
- if (!isActive() && !this._monoSeenInactive && !this.hasUpdated) {
742
- this._monoSeenInactive = true;
743
- state.createdBeforeActive++;
744
- if (!state.createdBeforeActiveTags.includes(tag)) state.createdBeforeActiveTags.push(tag);
745
- }
746
- this._monoWrap = loading && isActive() && !this._monoCssOnly && statics.monoPendingMode !== "custom" && (!this._monoIsShadow || this.hasUpdated || !this._monoHadShadowRoot);
747
- self[PENDING_ACTIVE] = loading;
748
- self[PENDING_PHANTOM] = loading ? {
749
- ...phantomOf(state.defaults),
750
- ...phantomOf(tagDefault),
751
- ...phantomOf(own)
752
- } : {};
753
- }
754
- /**
755
- * Mirror the resolved state onto the HOST as the CSS-only attributes (`mono-pending`,
756
- * `mono-pending-animation`, `mono-pending-mode` — skeleton.css): the element paints as a
757
- * block the instant it exists, with no script involved. `mono-pending-covered` marks that
758
- * phantom-ui is defined and will draw the measured blocks instead, so the CSS paint steps
759
- * aside (both at once would hide phantom's wrapper under the block).
760
- */
761
- _monoReflect() {
762
- const self = this;
763
- const host = this;
764
- if (!self[PENDING_ACTIVE]) {
765
- for (const a of [
766
- "mono-pending",
767
- "mono-pending-animation",
768
- "mono-pending-mode",
769
- "mono-pending-covered"
770
- ]) if (host.hasAttribute(a)) host.removeAttribute(a);
771
- return;
772
- }
773
- const opts = self[PENDING_PHANTOM] ?? {};
774
- if (!host.hasAttribute("mono-pending")) host.setAttribute("mono-pending", "");
775
- for (const [attr, key] of [["mono-pending-animation", "animation"], ["mono-pending-mode", "mode"]]) {
776
- const v = opts[key];
777
- if (v == null || v === "") {
778
- if (host.hasAttribute(attr)) host.removeAttribute(attr);
779
- } else if (host.getAttribute(attr) !== String(v)) host.setAttribute(attr, String(v));
780
- }
781
- host.toggleAttribute("mono-pending-covered", this._monoWrap);
782
- }
783
- /** The automatic rule — see the header of ./mono-skeleton.ts. */
784
- _monoAuto(statics) {
785
- if (this._monoIsShadow) return false;
786
- if (statics.monoPendingAuto === "never") return false;
787
- if (!isMonoSsrApp()) return false;
788
- if (this._monoReleased) return false;
789
- const self = this;
790
- if (statics.monoPendingAuto === "data") {
791
- if (self._monoPendingReady?.() ?? true) {
792
- this._monoRelease();
793
- return false;
794
- }
795
- state.waiting.add(this);
796
- this._monoStartTimers(true);
797
- return true;
798
- }
799
- if (state.waiting.size === 0 && this._monoPageChecked) {
800
- this._monoRelease();
801
- return false;
802
- }
803
- if (!this._monoPageChecked) {
804
- this._monoPageChecked = true;
805
- queueMicrotask(() => {
806
- if (state.waiting.size === 0) this._monoReleaseHeld();
807
- });
808
- }
809
- state.holders.add(this);
810
- this._monoStartTimers(false);
811
- return true;
812
- }
813
- /** Done waiting (from inside an update): leave the page-wide sets, release the held. */
814
- _monoRelease() {
815
- this._monoReleased = true;
816
- this._monoClearTimers();
817
- state.holders.delete(this);
818
- if (state.waiting.delete(this) && state.waiting.size === 0) for (const holder of Array.from(state.holders)) holder._monoReleaseHeld();
819
- }
820
- /**
821
- * Release a page-held element from OUTSIDE an update, without scheduling one for the
822
- * CSS-only draw (the attribute flip below is the whole release). A held element that
823
- * DREW through phantom was wrapped, so its release is a normal re-render instead —
824
- * `_monoWrap` decides, and both paths land on the same idle DOM.
825
- */
826
- _monoReleaseHeld() {
827
- if (this._monoReleased) return;
828
- this._monoReleased = true;
829
- this._monoClearTimers();
830
- state.holders.delete(this);
831
- const self = this;
832
- self[PENDING_ACTIVE] = false;
833
- self[PENDING_PHANTOM] = {};
834
- this._monoCssOnly = false;
835
- if (this._monoWrap) this.requestUpdate();
836
- else this._monoReflect();
837
- }
838
- /** `grace`: data-driven elements re-check once after a macrotask (see `monoPendingGrace`). */
839
- _monoStartTimers(grace) {
840
- const self = this;
841
- if (grace && !self[PENDING_GRACE] && !this._monoGraceTimer) this._monoGraceTimer = setTimeout(() => {
842
- this._monoGraceTimer = void 0;
843
- self[PENDING_GRACE] = true;
844
- this.requestUpdate();
845
- }, 0);
846
- const maxWait = state.defaults.maxWait ?? DEFAULT_MAX_WAIT;
847
- if (maxWait > 0 && !this._monoMaxWaitTimer) this._monoMaxWaitTimer = setTimeout(() => {
848
- this._monoMaxWaitTimer = void 0;
849
- if (state.holders.has(this)) {
850
- this._monoReleaseHeld();
851
- return;
852
- }
853
- this._monoReleased = true;
854
- this.requestUpdate();
855
- }, maxWait);
856
- }
857
- _monoClearTimers() {
858
- if (this._monoGraceTimer) clearTimeout(this._monoGraceTimer);
859
- if (this._monoMaxWaitTimer) clearTimeout(this._monoMaxWaitTimer);
860
- this._monoGraceTimer = void 0;
861
- this._monoMaxWaitTimer = void 0;
862
- }
863
- disconnectedCallback() {
864
- this._monoClearTimers();
865
- const self = this;
866
- self[PENDING_ACTIVE] = false;
867
- this._monoReflect();
868
- state.holders.delete(this);
869
- if (state.waiting.delete(this) && state.waiting.size === 0) for (const holder of Array.from(state.holders)) holder._monoReleaseHeld();
870
- super.disconnectedCallback();
871
- }
872
- render() {
873
- const inner = super.render();
874
- if (!this._monoWrap) return inner;
875
- return html`<phantom-ui mono-skeleton ?loading=${monoPendingActive(this)}>${inner}</phantom-ui>`;
876
- }
877
- updated(changed) {
878
- super.updated(changed);
879
- if (!hasDom) return;
880
- this._monoReflect();
881
- if (this._monoWrap) monoApplyPhantomOptions(this, this._monoWrapper());
882
- }
883
- /** The wrapper this mixin rendered (a direct child of the render root). */
884
- _monoWrapper() {
885
- const root = this.renderRoot;
886
- for (const child of Array.from(root.children)) if (child.localName === PHANTOM_TAG && child.hasAttribute("mono-skeleton")) return child;
887
- return null;
888
- }
889
- }
890
- return WithMonoPending;
891
- }
892
-
893
- //#endregion
894
- //#region src/composables/mono-element.ts
895
- /** Wrap `cls` so each instance gets the `createMonoUI` defaults at the end of construction, and `pending`. */
896
- function withMonoUI(tag, cls) {
897
- const Base = withMonoPending(cls, tag);
898
- const Mono = class extends Base {
899
- constructor(...args) {
900
- super(...args);
901
- applyMonoUIDefaults(this, tag);
902
- }
903
- };
904
- Object.defineProperty(Mono, "name", { value: cls.name });
905
- registerPendingProperty(Mono);
906
- watchSkeletonActivation();
907
- return Mono;
908
- }
909
- /** Register `cls` as `tag` with the app-wide defaults applied. Returns the registered class. */
910
- function defineMonoElement(tag, cls) {
911
- const existing = customElements.get(tag);
912
- if (existing) return existing;
913
- const Mono = withMonoUI(tag, cls);
914
- customElements.define(tag, Mono);
915
- return Mono;
916
- }
917
- /**
918
- * Drop-in for Lit's `@customElement(tag)`: registers the class (wrapped so
919
- * `createMonoUI` defaults apply and `pending` exists) and replaces the class binding with it.
920
- */
921
- function customElement(tag) {
922
- return (cls) => {
923
- const Mono = withMonoUI(tag, cls);
924
- customElements.define(tag, Mono);
925
- return Mono;
926
- };
927
- }
928
-
929
- //#endregion
930
- //#region src/composables/hybird-prop.ts
931
- function toKebabCase(value) {
932
- return value.replace(/[A-Z]/g, (match) => `-${match.toLowerCase()}`);
933
- }
934
- function toLowerCaseProp(value) {
935
- return value.toLowerCase();
936
- }
937
- function defineHybridPropAliases(target, props) {
938
- for (const prop of props) {
939
- const kebabProp = toKebabCase(prop);
940
- const lowerProp = toLowerCaseProp(prop);
941
- defineAlias(target, kebabProp, prop);
942
- if (lowerProp !== prop && lowerProp !== kebabProp) defineAlias(target, lowerProp, prop);
943
- }
944
- }
945
- /**
946
- * Register a cross-name alias for a controller-binding prop — e.g.
947
- * `defineHybridPropAlias(el, 'controlTable', 'dataGrid')` makes `controlTable`,
948
- * `control-table` and `controltable` all read/write the canonical reactive
949
- * `dataGrid` property (so `.controlTable = …` still triggers Lit's update
950
- * cycle). Used to rename the controller props without a breaking change: the
951
- * new `control-*` spellings land here while the old `data-*` ones keep working.
952
- */
953
- function defineHybridPropAlias(target, aliasCamel, realProp) {
954
- const kebab = toKebabCase(aliasCamel);
955
- const lower = toLowerCaseProp(aliasCamel);
956
- defineAlias(target, aliasCamel, realProp);
957
- defineAlias(target, kebab, realProp);
958
- if (lower !== aliasCamel && lower !== kebab) defineAlias(target, lower, realProp);
959
- }
960
- function defineAlias(target, alias, realProp) {
961
- if (Object.prototype.hasOwnProperty.call(target, alias)) return;
962
- Object.defineProperty(target, alias, {
963
- get() {
964
- return this[realProp];
965
- },
966
- set(value) {
967
- this[realProp] = value;
968
- },
969
- configurable: true,
970
- enumerable: false
971
- });
972
- }
973
- /**
974
- * Lit `hasChanged` for an array prop.
975
- *
976
- * **Load-bearing**, for exactly the reason `rateLimitHasChanged` is (see
977
- * `composables/rate-limit.ts`): `:items="[...]"` in a template allocates a NEW array
978
- * on every parent re-render. Under Lit's default `!==` the element sees a change
979
- * each time, so anything gated on `changed.has('items')` — resetting an
980
- * infinite-scroll page, invalidating a search memo, rebuilding a cache — runs on
981
- * renders where nothing about the data actually moved.
982
- *
983
- * Element-wise identity rather than a deep compare: rows are normally stable objects
984
- * owned by a store, so this catches the re-created-wrapper case cheaply. If the
985
- * consumer also rebuilds each row object the arrays are reported as different, which
986
- * is the safe direction.
987
- *
988
- * **Why this needs no "repair" step, unlike `mono-button-dropdown`.** That element
989
- * compares entries by CONTENT and deliberately ignores function fields, so it reports
990
- * "same" for entries that really were rebuilt — leaving cached listener state pointing
991
- * at the previous array (hence `_retargetItemParts()`). `arrayHasChanged` says "same"
992
- * only when the array holds literally the same objects in the same order, so nothing
993
- * item-related can have moved and there is nothing to retarget. Reach for the deeper
994
- * compare only where the callbacks are resolved late, and prove it.
995
- *
996
- * **Do NOT add this (or any `hasChanged`) to these — they hang real work off the
997
- * update cycle, so suppressing an update silently drops it:**
998
- * - `chart-core.ts` — `updated()` IS the chart pipeline; its last step `_applyData()`
999
- * is the only place chart.js is redrawn. A skipped update freezes the canvas.
1000
- * - `date-core.ts` — `updated()` drives `_rebuild()` / `_applyModelValue()`, so
1001
- * flatpickr would be stranded on stale config.
1002
- * - every `mono-table-*` element — `table-controller-core.ts` overrides `update()` to
1003
- * pull each element's slice of `monoDataGrid({ props })`.
1004
- * - every `monoForm`-bound control and `filter-builder-core.ts` — same `update()` hook
1005
- * (`form-control-core.ts`), used for form binding and visibility.
1006
- *
1007
- * Surveyed 2026-08-17 across all 26 component directories; the guarded props are
1008
- * `select`/`tag-input` `items`, `tag-input` `modelValue`/`value`, `menu` +
1009
- * `mono-menu-list` `items`, `tabs` `items`, both `breadcrumb` `items`, and
1010
- * `file-upload` `modelValue`.
1011
- */
1012
- function arrayHasChanged(value, old) {
1013
- if (value === old) return false;
1014
- if (!Array.isArray(value) || !Array.isArray(old)) return true;
1015
- if (value.length !== old.length) return true;
1016
- for (let i = 0; i < value.length; i++) if (value[i] !== old[i]) return true;
1017
- return false;
1018
- }
1019
- const booleanStringConverter = {
1020
- fromAttribute(value) {
1021
- if (value === null || value === void 0) return false;
1022
- if (typeof value === "boolean") return value;
1023
- const normalized = String(value).toLowerCase().trim();
1024
- return normalized === "" || normalized === "true";
1025
- },
1026
- toAttribute(value) {
1027
- return value ? "" : null;
1028
- }
1029
- };
1030
- const numberStringConverter = {
1031
- fromAttribute(value) {
1032
- if (value === null || value === "") return 0;
1033
- const parsed = Number(value);
1034
- return Number.isFinite(parsed) ? parsed : 0;
1035
- },
1036
- toAttribute(value) {
1037
- if (value === void 0 || value === null) return null;
1038
- return String(value);
1039
- }
1040
- };
1041
- /**
1042
- * Like {@link numberStringConverter}, but an absent/blank attribute stays
1043
- * `undefined` instead of collapsing to `0`.
1044
- *
1045
- * Needed wherever 0 is a meaningful value AND "not set" has to mean "fall back to
1046
- * whatever the component computes" — e.g. `mono-modal` / `mono-drawer`'s `z-index`,
1047
- * where 0 is a legal stacking level and unset means "let the popup stack decide".
1048
- * Using the plain number converter there would pin every dialog to `z-index: 0`.
1049
- */
1050
- const optionalNumberConverter = {
1051
- fromAttribute(value) {
1052
- if (value === null || value === "") return void 0;
1053
- const parsed = Number(value);
1054
- return Number.isFinite(parsed) ? parsed : void 0;
1055
- },
1056
- toAttribute(value) {
1057
- if (value === void 0 || value === null) return null;
1058
- return String(value);
1059
- }
1060
- };
1061
-
1062
- //#endregion
1063
- //#region \0@oxc-project+runtime@0.154.0/helpers/esm/decorate.js
1064
- function __decorate(decorators, target, key, desc) {
1065
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1066
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
1067
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
1068
- return c > 3 && r && Object.defineProperty(target, key, r), r;
1069
- }
1070
-
1071
- //#endregion
1072
3
  //#region \0raw:C:\Users\VCT-DEV\Desktop\libs\packages\helper\src\data\theme\scrollbar.css?raw.js
1073
4
  var scrollbar_css_raw_default = "/* ───────────────────────────────────────────────────────────────────────────\r\n The mono scrollbar — ONE design, defined once, used by every scroll surface.\r\n\r\n An 8px fully-rounded pill thumb on a transparent track. Before this file the\r\n five components that styled a scrollbar each hand-rolled their own: widths of\r\n 4 / 6 / 8px, radii of `99px` and `9999px`, and four different colour sources —\r\n while eleven other scroll containers (the main table scroller included) had no\r\n rule at all and fell back to the browser's own bar.\r\n\r\n ── Two engines, two lanes, and why they must NOT be mixed ─────────────────\r\n This is the trap that made the previous attempt a no-op: **Chrome ignores\r\n every `::-webkit-scrollbar` rule as soon as `scrollbar-width` or\r\n `scrollbar-color` is set on the same element.** Measured in Chrome 134 —\r\n a scroller with `::-webkit-scrollbar { width: 14px }` reserves 14px, and the\r\n same scroller with `scrollbar-width: thin` added reserves 11px, Chrome's own\r\n thin bar. So declaring both \"for cross-browser safety\" silently throws away\r\n the custom design and hands Chrome its default scrollbar back.\r\n\r\n Hence the split: the standard properties are fenced behind `@supports` tests\r\n that only a non-WebKit engine passes, so Chrome/Safari see the webkit lane\r\n alone and Firefox sees the standard lane alone. Two guards rather than one\r\n because each covers the other's uncertainty: `selector(::-webkit-scrollbar)`\r\n is the semantically correct test (verified false-in-Firefox by construction —\r\n Firefox implements no such pseudo-element), and `-moz-appearance` is a plain\r\n Firefox sniff. Both are verified INERT in Chrome (`CSS.supports` returns\r\n false for `-moz-appearance`, true for the selector test), so Chrome cannot\r\n accidentally enter the standard lane through either door.\r\n\r\n Firefox exposes no numeric width — `thin` is all it has — so the 8px rail and\r\n the pill radius are WebKit-only by nature, not by choice.\r\n\r\n ── Colour: `currentColor`, so every theme is right for free ───────────────\r\n The thumb is a low-alpha mix of the container's OWN text colour. A scroll\r\n container inherits `color` from the panel it sits in, so the thumb comes out\r\n dark on a white modal and pale on ONE's navy sidebar with no colour named\r\n anywhere and no per-component override. This replaces four bespoke sources,\r\n three of which mixed toward `white` (assuming a light panel) and one of which\r\n derived from the accent — which on a panel painted in that same accent\r\n dissolves into it. A new theme, flavor or `color` preset is correct for free.\r\n\r\n ── The token chain ───────────────────────────────────────────────────────\r\n Standard three-tier resolvers. Two rules govern where they may be written:\r\n\r\n 1. The resolvers are declared on the SCROLL CONTAINERS, never on `:root`. A\r\n `var()` substitutes on the element that declares it, so a resolver at\r\n `:root` could never see a `-preset` a flavor sets on `<body>` — the same\r\n trap `sidebar.css` documents for `.mono-sidebar-panel`. Declaring them on\r\n the container is also what puts `currentColor` in the right place.\r\n 2. The public `--mono-scrollbar-*` vars are NOT declared anywhere. Declaring\r\n one would mean it is always set, and a flavor's `-preset` could then never\r\n win. The defaults live only as the innermost fallback below.\r\n\r\n Order stays: default < flavor `-preset` < a consumer's public `--mono-*`.\r\n No flavor overrides these today — one scrollbar across every theme is the\r\n point — but the `-preset` slots exist for a flavor that wants its own rail.\r\n\r\n ── Adding a scroll container ─────────────────────────────────────────────\r\n Add its selector to the list below. `theme-parity.spec.mjs` fails the build\r\n for any `overflow: auto|scroll` in `src/components/**` that is missing here,\r\n and for any component CSS that styles a scrollbar itself.\r\n ─────────────────────────────────────────────────────────────────────────── */\r\n\r\n.mono-scrollbar,\r\n:where([mono-sidebar]) :where([mono-panel]) > [mono-body],\r\n.mono-drawer-body,\r\n:where([mono-drawer] > [mono-panel]) > [mono-body],\r\n.mono-modal-body,\r\n:where([mono-modal] > [mono-panel-wrap] > [mono-panel]) > [mono-body],\r\n.mono-select-dropdown-body,\r\n\r\n[mono-select] [mono-dropdown-body],\r\n.mono-tag-input-dropdown,\r\n[mono-tag-input] > [mono-dropdown],\r\n:where([mono-dropdown]) > [mono-panel],\r\n:where([mono-button-dropdown]) > [mono-panel],\r\n.mono-tag-input-more-panel,\r\n[mono-tag-input] > [mono-more-panel],\r\n.mono-textarea-field,\r\n[mono-table-scroll],\r\n[mono-search-more-panel],\r\n[mono-search-filter],\r\n[mono-search-panel],\r\n[mono-th-filter-list],\r\n[mono-dropdown-table] [mono-dd-more],\r\n[mono-dropdown-table] [mono-dd-region=\"body\"],\r\n[mono-filter-builder] > [mono-filter-group] {\r\n --_mono-scrollbar-size: var(--mono-scrollbar-size, var(--_mono-scrollbar-size-preset, 8px));\r\n --_mono-scrollbar-radius: var(--mono-scrollbar-radius, var(--_mono-scrollbar-radius-preset, 999px));\r\n --_mono-scrollbar-track: var(--mono-scrollbar-track, var(--_mono-scrollbar-track-preset, transparent));\r\n --_mono-scrollbar-thumb: var(\r\n --mono-scrollbar-thumb,\r\n var(--_mono-scrollbar-thumb-preset, color-mix(in srgb, currentColor 22%, transparent))\r\n );\r\n --_mono-scrollbar-thumb-hover: var(\r\n --mono-scrollbar-thumb-hover,\r\n var(--_mono-scrollbar-thumb-hover-preset, color-mix(in srgb, currentColor 38%, transparent))\r\n );\r\n}\r\n\r\n/* ── Firefox lane. Inert in Chrome/Safari — see the header: setting either of\r\n these there would disable the webkit lane below and restore Chrome's own\r\n scrollbar. Duplicated across two guards rather than comma-joined because\r\n `@supports` conditions cannot be combined with a selector list. ───────── */\r\n@supports not selector(::-webkit-scrollbar) {\r\n .mono-scrollbar,\r\n :where([mono-sidebar]) :where([mono-panel]) > [mono-body],\r\n .mono-drawer-body,\r\n :where([mono-drawer] > [mono-panel]) > [mono-body],\r\n .mono-modal-body,\r\n :where([mono-modal] > [mono-panel-wrap] > [mono-panel]) > [mono-body],\r\n .mono-select-dropdown-body,\r\n\r\n [mono-select] [mono-dropdown-body],\r\n .mono-tag-input-dropdown,\r\n [mono-tag-input] > [mono-dropdown],\r\n :where([mono-dropdown]) > [mono-panel],\r\n :where([mono-button-dropdown]) > [mono-panel],\r\n .mono-tag-input-more-panel,\r\n [mono-tag-input] > [mono-more-panel],\r\n .mono-textarea-field,\r\n [mono-table-scroll],\r\n [mono-search-more-panel],\r\n [mono-search-filter],\r\n [mono-search-panel],\r\n [mono-th-filter-list],\r\n [mono-dropdown-table] [mono-dd-more],\r\n [mono-dropdown-table] [mono-dd-region=\"body\"],\r\n [mono-filter-builder] > [mono-filter-group] {\r\n scrollbar-width: thin;\r\n scrollbar-color: var(--_mono-scrollbar-thumb) var(--_mono-scrollbar-track);\r\n }\r\n}\r\n\r\n@supports (-moz-appearance: none) {\r\n .mono-scrollbar,\r\n :where([mono-sidebar]) :where([mono-panel]) > [mono-body],\r\n .mono-drawer-body,\r\n :where([mono-drawer] > [mono-panel]) > [mono-body],\r\n .mono-modal-body,\r\n :where([mono-modal] > [mono-panel-wrap] > [mono-panel]) > [mono-body],\r\n .mono-select-dropdown-body,\r\n\r\n [mono-select] [mono-dropdown-body],\r\n .mono-tag-input-dropdown,\r\n [mono-tag-input] > [mono-dropdown],\r\n :where([mono-dropdown]) > [mono-panel],\r\n :where([mono-button-dropdown]) > [mono-panel],\r\n .mono-tag-input-more-panel,\r\n [mono-tag-input] > [mono-more-panel],\r\n .mono-textarea-field,\r\n [mono-table-scroll],\r\n [mono-search-more-panel],\r\n [mono-search-filter],\r\n [mono-search-panel],\r\n [mono-th-filter-list],\r\n [mono-dropdown-table] [mono-dd-more],\r\n [mono-dropdown-table] [mono-dd-region=\"body\"],\r\n [mono-filter-builder] > [mono-filter-group] {\r\n scrollbar-width: thin;\r\n scrollbar-color: var(--_mono-scrollbar-thumb) var(--_mono-scrollbar-track);\r\n }\r\n}\r\n\r\n/* ── WebKit / Blink lane: the actual design. ──────────────────────────────── */\r\n\r\n.mono-scrollbar::-webkit-scrollbar,\r\n:where([mono-sidebar]) :where([mono-panel]) > [mono-body]::-webkit-scrollbar,\r\n.mono-drawer-body::-webkit-scrollbar,\r\n:where([mono-drawer] > [mono-panel]) > [mono-body]::-webkit-scrollbar,\r\n.mono-modal-body::-webkit-scrollbar,\r\n:where([mono-modal] > [mono-panel-wrap] > [mono-panel]) > [mono-body]::-webkit-scrollbar,\r\n.mono-select-dropdown-body::-webkit-scrollbar,\r\n\r\n[mono-select] [mono-dropdown-body]::-webkit-scrollbar,\r\n.mono-tag-input-dropdown::-webkit-scrollbar,\r\n[mono-tag-input] > [mono-dropdown]::-webkit-scrollbar,\r\n:where([mono-dropdown]) > [mono-panel]::-webkit-scrollbar,\r\n:where([mono-button-dropdown]) > [mono-panel]::-webkit-scrollbar,\r\n.mono-tag-input-more-panel::-webkit-scrollbar,\r\n[mono-tag-input] > [mono-more-panel]::-webkit-scrollbar,\r\n.mono-textarea-field::-webkit-scrollbar,\r\n[mono-table-scroll]::-webkit-scrollbar,\r\n[mono-search-more-panel]::-webkit-scrollbar,\r\n[mono-search-filter]::-webkit-scrollbar,\r\n[mono-search-panel]::-webkit-scrollbar,\r\n[mono-th-filter-list]::-webkit-scrollbar,\r\n[mono-dropdown-table] [mono-dd-more]::-webkit-scrollbar,\r\n[mono-dropdown-table] [mono-dd-region=\"body\"]::-webkit-scrollbar,\r\n[mono-filter-builder] > [mono-filter-group]::-webkit-scrollbar {\r\n width: var(--_mono-scrollbar-size);\r\n height: var(--_mono-scrollbar-size);\r\n}\r\n\r\n.mono-scrollbar::-webkit-scrollbar-track,\r\n:where([mono-sidebar]) :where([mono-panel]) > [mono-body]::-webkit-scrollbar-track,\r\n.mono-drawer-body::-webkit-scrollbar-track,\r\n:where([mono-drawer] > [mono-panel]) > [mono-body]::-webkit-scrollbar-track,\r\n.mono-modal-body::-webkit-scrollbar-track,\r\n:where([mono-modal] > [mono-panel-wrap] > [mono-panel]) > [mono-body]::-webkit-scrollbar-track,\r\n.mono-select-dropdown-body::-webkit-scrollbar-track,\r\n\r\n[mono-select] [mono-dropdown-body]::-webkit-scrollbar-track,\r\n.mono-tag-input-dropdown::-webkit-scrollbar-track,\r\n[mono-tag-input] > [mono-dropdown]::-webkit-scrollbar-track,\r\n:where([mono-dropdown]) > [mono-panel]::-webkit-scrollbar-track,\r\n:where([mono-button-dropdown]) > [mono-panel]::-webkit-scrollbar-track,\r\n.mono-tag-input-more-panel::-webkit-scrollbar-track,\r\n[mono-tag-input] > [mono-more-panel]::-webkit-scrollbar-track,\r\n.mono-textarea-field::-webkit-scrollbar-track,\r\n[mono-table-scroll]::-webkit-scrollbar-track,\r\n[mono-search-more-panel]::-webkit-scrollbar-track,\r\n[mono-search-filter]::-webkit-scrollbar-track,\r\n[mono-search-panel]::-webkit-scrollbar-track,\r\n[mono-th-filter-list]::-webkit-scrollbar-track,\r\n[mono-dropdown-table] [mono-dd-more]::-webkit-scrollbar-track,\r\n[mono-dropdown-table] [mono-dd-region=\"body\"]::-webkit-scrollbar-track,\r\n[mono-filter-builder] > [mono-filter-group]::-webkit-scrollbar-track {\r\n background: var(--_mono-scrollbar-track);\r\n}\r\n\r\n.mono-scrollbar::-webkit-scrollbar-thumb,\r\n:where([mono-sidebar]) :where([mono-panel]) > [mono-body]::-webkit-scrollbar-thumb,\r\n.mono-drawer-body::-webkit-scrollbar-thumb,\r\n:where([mono-drawer] > [mono-panel]) > [mono-body]::-webkit-scrollbar-thumb,\r\n.mono-modal-body::-webkit-scrollbar-thumb,\r\n:where([mono-modal] > [mono-panel-wrap] > [mono-panel]) > [mono-body]::-webkit-scrollbar-thumb,\r\n.mono-select-dropdown-body::-webkit-scrollbar-thumb,\r\n\r\n[mono-select] [mono-dropdown-body]::-webkit-scrollbar-thumb,\r\n.mono-tag-input-dropdown::-webkit-scrollbar-thumb,\r\n[mono-tag-input] > [mono-dropdown]::-webkit-scrollbar-thumb,\r\n:where([mono-dropdown]) > [mono-panel]::-webkit-scrollbar-thumb,\r\n:where([mono-button-dropdown]) > [mono-panel]::-webkit-scrollbar-thumb,\r\n.mono-tag-input-more-panel::-webkit-scrollbar-thumb,\r\n[mono-tag-input] > [mono-more-panel]::-webkit-scrollbar-thumb,\r\n.mono-textarea-field::-webkit-scrollbar-thumb,\r\n[mono-table-scroll]::-webkit-scrollbar-thumb,\r\n[mono-search-more-panel]::-webkit-scrollbar-thumb,\r\n[mono-search-filter]::-webkit-scrollbar-thumb,\r\n[mono-search-panel]::-webkit-scrollbar-thumb,\r\n[mono-th-filter-list]::-webkit-scrollbar-thumb,\r\n[mono-dropdown-table] [mono-dd-more]::-webkit-scrollbar-thumb,\r\n[mono-dropdown-table] [mono-dd-region=\"body\"]::-webkit-scrollbar-thumb,\r\n[mono-filter-builder] > [mono-filter-group]::-webkit-scrollbar-thumb {\r\n background: var(--_mono-scrollbar-thumb);\r\n border-radius: var(--_mono-scrollbar-radius);\r\n}\r\n\r\n.mono-scrollbar::-webkit-scrollbar-thumb:hover,\r\n:where([mono-sidebar]) :where([mono-panel]) > [mono-body]::-webkit-scrollbar-thumb:hover,\r\n.mono-drawer-body::-webkit-scrollbar-thumb:hover,\r\n:where([mono-drawer] > [mono-panel]) > [mono-body]::-webkit-scrollbar-thumb:hover,\r\n.mono-modal-body::-webkit-scrollbar-thumb:hover,\r\n:where([mono-modal] > [mono-panel-wrap] > [mono-panel]) > [mono-body]::-webkit-scrollbar-thumb:hover,\r\n.mono-select-dropdown-body::-webkit-scrollbar-thumb:hover,\r\n\r\n[mono-select] [mono-dropdown-body]::-webkit-scrollbar-thumb:hover,\r\n.mono-tag-input-dropdown::-webkit-scrollbar-thumb:hover,\r\n[mono-tag-input] > [mono-dropdown]::-webkit-scrollbar-thumb:hover,\r\n:where([mono-dropdown]) > [mono-panel]::-webkit-scrollbar-thumb:hover,\r\n:where([mono-button-dropdown]) > [mono-panel]::-webkit-scrollbar-thumb:hover,\r\n.mono-tag-input-more-panel::-webkit-scrollbar-thumb:hover,\r\n[mono-tag-input] > [mono-more-panel]::-webkit-scrollbar-thumb:hover,\r\n.mono-textarea-field::-webkit-scrollbar-thumb:hover,\r\n[mono-table-scroll]::-webkit-scrollbar-thumb:hover,\r\n[mono-search-more-panel]::-webkit-scrollbar-thumb:hover,\r\n[mono-search-filter]::-webkit-scrollbar-thumb:hover,\r\n[mono-search-panel]::-webkit-scrollbar-thumb:hover,\r\n[mono-th-filter-list]::-webkit-scrollbar-thumb:hover,\r\n[mono-dropdown-table] [mono-dd-more]::-webkit-scrollbar-thumb:hover,\r\n[mono-dropdown-table] [mono-dd-region=\"body\"]::-webkit-scrollbar-thumb:hover,\r\n[mono-filter-builder] > [mono-filter-group]::-webkit-scrollbar-thumb:hover {\r\n background: var(--_mono-scrollbar-thumb-hover);\r\n}\r\n\r\n/* Chrome draws stepper arrows on a custom scrollbar in some configurations, and\r\n the corner square where two bars meet takes the UA's own grey. Both are part\r\n of \"do not look like the browser's scrollbar\". */\r\n.mono-scrollbar::-webkit-scrollbar-button,\r\n:where([mono-sidebar]) :where([mono-panel]) > [mono-body]::-webkit-scrollbar-button,\r\n.mono-drawer-body::-webkit-scrollbar-button,\r\n:where([mono-drawer] > [mono-panel]) > [mono-body]::-webkit-scrollbar-button,\r\n.mono-modal-body::-webkit-scrollbar-button,\r\n:where([mono-modal] > [mono-panel-wrap] > [mono-panel]) > [mono-body]::-webkit-scrollbar-button,\r\n.mono-select-dropdown-body::-webkit-scrollbar-button,\r\n\r\n[mono-select] [mono-dropdown-body]::-webkit-scrollbar-button,\r\n.mono-tag-input-dropdown::-webkit-scrollbar-button,\r\n[mono-tag-input] > [mono-dropdown]::-webkit-scrollbar-button,\r\n:where([mono-dropdown]) > [mono-panel]::-webkit-scrollbar-button,\r\n:where([mono-button-dropdown]) > [mono-panel]::-webkit-scrollbar-button,\r\n.mono-tag-input-more-panel::-webkit-scrollbar-button,\r\n[mono-tag-input] > [mono-more-panel]::-webkit-scrollbar-button,\r\n.mono-textarea-field::-webkit-scrollbar-button,\r\n[mono-table-scroll]::-webkit-scrollbar-button,\r\n[mono-search-more-panel]::-webkit-scrollbar-button,\r\n[mono-search-filter]::-webkit-scrollbar-button,\r\n[mono-search-panel]::-webkit-scrollbar-button,\r\n[mono-th-filter-list]::-webkit-scrollbar-button,\r\n[mono-dropdown-table] [mono-dd-more]::-webkit-scrollbar-button,\r\n[mono-dropdown-table] [mono-dd-region=\"body\"]::-webkit-scrollbar-button,\r\n[mono-filter-builder] > [mono-filter-group]::-webkit-scrollbar-button {\r\n display: none;\r\n}\r\n\r\n.mono-scrollbar::-webkit-scrollbar-corner,\r\n:where([mono-sidebar]) :where([mono-panel]) > [mono-body]::-webkit-scrollbar-corner,\r\n.mono-drawer-body::-webkit-scrollbar-corner,\r\n:where([mono-drawer] > [mono-panel]) > [mono-body]::-webkit-scrollbar-corner,\r\n.mono-modal-body::-webkit-scrollbar-corner,\r\n:where([mono-modal] > [mono-panel-wrap] > [mono-panel]) > [mono-body]::-webkit-scrollbar-corner,\r\n.mono-select-dropdown-body::-webkit-scrollbar-corner,\r\n\r\n[mono-select] [mono-dropdown-body]::-webkit-scrollbar-corner,\r\n.mono-tag-input-dropdown::-webkit-scrollbar-corner,\r\n[mono-tag-input] > [mono-dropdown]::-webkit-scrollbar-corner,\r\n:where([mono-dropdown]) > [mono-panel]::-webkit-scrollbar-corner,\r\n:where([mono-button-dropdown]) > [mono-panel]::-webkit-scrollbar-corner,\r\n.mono-tag-input-more-panel::-webkit-scrollbar-corner,\r\n[mono-tag-input] > [mono-more-panel]::-webkit-scrollbar-corner,\r\n.mono-textarea-field::-webkit-scrollbar-corner,\r\n[mono-table-scroll]::-webkit-scrollbar-corner,\r\n[mono-search-more-panel]::-webkit-scrollbar-corner,\r\n[mono-search-filter]::-webkit-scrollbar-corner,\r\n[mono-search-panel]::-webkit-scrollbar-corner,\r\n[mono-th-filter-list]::-webkit-scrollbar-corner,\r\n[mono-dropdown-table] [mono-dd-more]::-webkit-scrollbar-corner,\r\n[mono-dropdown-table] [mono-dd-region=\"body\"]::-webkit-scrollbar-corner,\r\n[mono-filter-builder] > [mono-filter-group]::-webkit-scrollbar-corner {\r\n background: var(--_mono-scrollbar-track);\r\n}\r\n";
1074
5
 
@@ -1458,4 +389,4 @@ function flushSsrHydration(el, options = {}) {
1458
389
  }
1459
390
 
1460
391
  //#endregion
1461
- export { monoPendingGrace as C, monoPendingActive as S, buildSizeStyle as _, __decorate as a, monoHostChildNodes as b, defineHybridPropAlias as c, optionalNumberConverter as d, customElement as f, cssLengthToPx as g, ColumnAutoSize as h, withShadowUtilityStyles as i, defineHybridPropAliases as l, startMonoSizeAttributes as m, adoptIconStyles as n, arrayHasChanged as o, defineMonoElement as p, toShadowCss as r, booleanStringConverter as s, flushSsrHydration as t, numberStringConverter as u, toCssSize as v, monoPhantomOptions as w, monoHostChildren as x, monoApplyPhantomOptions as y };
392
+ export { withShadowUtilityStyles as i, adoptIconStyles as n, toShadowCss as r, flushSsrHydration as t };