nish-ui 3.0.0 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -8
- package/dist/chart.d.ts +8 -3
- package/dist/chart.js +4 -419
- package/dist/elements-all.js +70 -69
- package/dist/elements-charts.d.ts +8 -2
- package/dist/elements-charts.js +23 -23
- package/dist/elements-data.d.ts +7 -1
- package/dist/elements-data.js +5 -5
- package/dist/elements-forms.d.ts +7 -1
- package/dist/elements-forms.js +20 -19
- package/dist/elements.d.ts +7 -1
- package/dist/elements.js +4 -4
- package/dist/esm/chart-values.js +2 -1
- package/dist/esm/combobox-filter.js +6 -5
- package/dist/esm/command-filter.js +32 -0
- package/dist/esm/components/accordion.js +2 -1
- package/dist/esm/components/app-shell.js +1 -1
- package/dist/esm/components/avatar.js +2 -2
- package/dist/esm/components/breadcrumbs.js +1 -1
- package/dist/esm/components/calendar-base.js +1 -1
- package/dist/esm/components/canvas/legend.js +4 -4
- package/dist/esm/components/canvas/system-canvas.js +24 -1
- package/dist/esm/components/carousel.js +21 -3
- package/dist/esm/components/charts.js +21 -13
- package/dist/esm/components/combobox.js +3 -3
- package/dist/esm/components/command.js +5 -5
- package/dist/esm/components/data-classes.js +23 -8
- package/dist/esm/components/data.js +1 -5
- package/dist/esm/components/date-picker.js +1 -0
- package/dist/esm/components/date-range-picker.js +1 -0
- package/dist/esm/components/display.js +7 -7
- package/dist/esm/components/feedback.js +1 -1
- package/dist/esm/components/file-dropzone.js +44 -2
- package/dist/esm/components/filters.js +3 -1
- package/dist/esm/components/flow.js +16 -15
- package/dist/esm/components/forms-classes.js +1 -1
- package/dist/esm/components/forms.js +30 -6
- package/dist/esm/components/hooks.js +20 -17
- package/dist/esm/components/inbox.js +13 -8
- package/dist/esm/components/layout-vars.js +10 -7
- package/dist/esm/components/menu.js +11 -4
- package/dist/esm/components/multi-select.js +9 -6
- package/dist/esm/components/nav-classes.js +9 -0
- package/dist/esm/components/nav.js +2 -1
- package/dist/esm/components/overlay-core.js +31 -10
- package/dist/esm/components/overlay-dialog.js +17 -2
- package/dist/esm/components/pagination.js +4 -1
- package/dist/esm/components/popover.js +15 -9
- package/dist/esm/components/primitives-classes.js +4 -4
- package/dist/esm/components/primitives.js +2 -2
- package/dist/esm/components/progress.js +2 -0
- package/dist/esm/components/radio-group.js +1 -1
- package/dist/esm/components/resource-classes.js +41 -19
- package/dist/esm/components/resource.js +8 -6
- package/dist/esm/components/settings.js +9 -3
- package/dist/esm/components/slider.js +1 -0
- package/dist/esm/components/strings.js +9 -1
- package/dist/esm/components/tabs.js +3 -2
- package/dist/esm/components/tag-input.js +15 -7
- package/dist/esm/components/time-field-classes.js +5 -2
- package/dist/esm/components/time-field.js +15 -7
- package/dist/esm/components/toast-store.js +16 -4
- package/dist/esm/components/tooltip.js +1 -1
- package/dist/esm/components/url-state.js +3 -1
- package/dist/esm/components/virtual-table.js +8 -2
- package/dist/esm/components/virtual.js +16 -2
- package/dist/esm/format.js +41 -16
- package/dist/esm/runtime.js +9 -2
- package/dist/esm/server/inbox/client.js +1 -1
- package/dist/esm/split-layout.js +2 -1
- package/dist/esm/theme.js +66 -6
- package/dist/format.js +50 -19
- package/dist/inbox-client.d.ts +5 -1
- package/dist/inbox-client.js +1 -2
- package/dist/index.d.ts +39 -11
- package/dist/nish-components.css +52 -3
- package/dist/nish-components.min.css +1 -1
- package/dist/node/th-check.js +12 -3
- package/dist/server/hono.d.ts +2 -2
- package/dist/server/hono.js +111 -8
- package/dist/server/index.d.ts +20 -12
- package/dist/server/index.js +136 -32
- package/dist/{spa-BLlMc0eI.d.ts → spa-BfRDo38r.d.ts} +35 -6
- package/dist/split-layout.js +2 -2
- package/dist/system-canvas.d.ts +0 -4
- package/dist/theme.d.ts +20 -2
- package/dist/theme.global.js +75 -10
- package/dist/theme.js +75 -9
- package/package.json +1 -1
package/dist/system-canvas.d.ts
CHANGED
|
@@ -96,10 +96,6 @@ interface SystemCanvasProps extends Omit<ComponentPropsWithoutRef<'div'>, 'onSel
|
|
|
96
96
|
className?: string;
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
/** A pannable, zoomable graph-paper canvas of grouped nodes joined by edges. Nodes with
|
|
100
|
-
* `active` pulse in their group's hue, edges into them flow, and `heat` leaves a fading
|
|
101
|
-
* glow behind. Drag or scroll to pan, ctrl+scroll or pinch to zoom, arrow keys, `+`, `-`
|
|
102
|
-
* and `0` from the keyboard. */
|
|
103
99
|
declare function SystemCanvas({ groups, edges, columns, bands, layout: layoutMode, edgeKinds, follow, onFollowChange, minimap, selected, onSelect, height, label: labelProp, labels: labelOverrides, className, style, ref: forwardedRef, ...rest }: SystemCanvasProps): react.JSX.Element;
|
|
104
100
|
|
|
105
101
|
interface CanvasLayout {
|
package/dist/theme.d.ts
CHANGED
|
@@ -213,6 +213,20 @@ interface NishStrings {
|
|
|
213
213
|
offlineBadge: string;
|
|
214
214
|
/** FlowSteps: group label. */
|
|
215
215
|
progress: string;
|
|
216
|
+
/** AgentNode: spoken state word. */
|
|
217
|
+
agentQueued: string;
|
|
218
|
+
/** AgentNode: spoken state word. */
|
|
219
|
+
agentRunning: string;
|
|
220
|
+
/** AgentNode: spoken state word. */
|
|
221
|
+
agentDone: string;
|
|
222
|
+
/** AgentNode: spoken state word. */
|
|
223
|
+
agentFailed: string;
|
|
224
|
+
/** FlowSteps: hidden text appended to a finished step. */
|
|
225
|
+
stepDone: string;
|
|
226
|
+
/** FlowSteps: hidden text appended to a failed step. */
|
|
227
|
+
stepFailed: string;
|
|
228
|
+
/** ResponsiveTable: label of the sort-direction button, from the current direction. */
|
|
229
|
+
sortToggle: (dir: 'asc' | 'desc' | null) => string;
|
|
216
230
|
/** WorkflowBoard: group label. */
|
|
217
231
|
workflow: string;
|
|
218
232
|
/** ActivityFeed: group label. */
|
|
@@ -283,6 +297,8 @@ interface NishStrings {
|
|
|
283
297
|
breadcrumbs: string;
|
|
284
298
|
/** TagInput: remove button aria label. */
|
|
285
299
|
removeTag: (tag: string) => string;
|
|
300
|
+
/** TagInput: shown when a tag is refused because the limit is reached. */
|
|
301
|
+
maxTags: (max: number) => string;
|
|
286
302
|
/** FileDropzone: drop area text. */
|
|
287
303
|
dropzoneLabel: string;
|
|
288
304
|
/** FileDropzone: browse button. */
|
|
@@ -470,8 +486,10 @@ interface MountScrollspyOptions {
|
|
|
470
486
|
* has passed the offset, the first one at the top of the page), is scrolled into view
|
|
471
487
|
* inside the nav, and the nav gets `data-at-start` / `data-at-end` for its edge fades.
|
|
472
488
|
* Publishes the nav's height as `--nish-sticky-extra` so `.nish-scroll-target` clears it.
|
|
473
|
-
* Returns a function that removes everything. */
|
|
474
|
-
declare function mountScrollspy(nav: HTMLElement, o?: MountScrollspyOptions): () => void
|
|
489
|
+
* Returns a function that removes everything; its `lock(id)` keeps that section's link current until the user scrolls. */
|
|
490
|
+
declare function mountScrollspy(nav: HTMLElement, o?: MountScrollspyOptions): (() => void) & {
|
|
491
|
+
lock: (id: string) => void;
|
|
492
|
+
};
|
|
475
493
|
/** Persist a checklist: the `input[type=checkbox]` inside each `li[data-id]` of `list` is
|
|
476
494
|
* saved to localStorage under `list.dataset.store` (a JSON array of checked ids) and
|
|
477
495
|
* restored now. Updates the `.nish-checklist-progress` element before the list (or the
|
package/dist/theme.global.js
CHANGED
|
@@ -314,17 +314,23 @@ var nishTheme = (() => {
|
|
|
314
314
|
var DEFAULT_THEME = "dark";
|
|
315
315
|
|
|
316
316
|
// src/runtime.ts
|
|
317
|
-
var version = true ? "3.
|
|
317
|
+
var version = true ? "3.2.0" : "dev";
|
|
318
318
|
var KEY = /* @__PURE__ */ Symbol.for("nish-ui.runtime.v1");
|
|
319
319
|
function runtime() {
|
|
320
320
|
var _a;
|
|
321
321
|
const g = globalThis;
|
|
322
322
|
return (_a = g[KEY]) != null ? _a : g[KEY] = { versions: /* @__PURE__ */ new Set(), slots: {} };
|
|
323
323
|
}
|
|
324
|
+
function isDevelopment() {
|
|
325
|
+
try {
|
|
326
|
+
return process.env.NODE_ENV !== "production";
|
|
327
|
+
} catch (e) {
|
|
328
|
+
return false;
|
|
329
|
+
}
|
|
330
|
+
}
|
|
324
331
|
function register(rt) {
|
|
325
|
-
var _a, _b;
|
|
326
332
|
rt.versions.add(version);
|
|
327
|
-
if (rt.versions.size > 1 && !rt.warned && (
|
|
333
|
+
if (rt.versions.size > 1 && !rt.warned && isDevelopment()) {
|
|
328
334
|
rt.warned = true;
|
|
329
335
|
console.warn(
|
|
330
336
|
`nish-ui: two versions are loaded on this page (${[...rt.versions].join(", ")}). Overlays, toasts and theme state are shared, but mixing versions is unsupported.`
|
|
@@ -1033,7 +1039,8 @@ var nishTheme = (() => {
|
|
|
1033
1039
|
};
|
|
1034
1040
|
}
|
|
1035
1041
|
function mountScrollspy(nav, o = {}) {
|
|
1036
|
-
|
|
1042
|
+
const noop = Object.assign(() => void 0, { lock: (_id) => void 0 });
|
|
1043
|
+
if (typeof document === "undefined") return noop;
|
|
1037
1044
|
const links = Array.from(nav.querySelectorAll('a[href^="#"]')).filter((a) => a.hash.length > 1);
|
|
1038
1045
|
const target = (a) => {
|
|
1039
1046
|
try {
|
|
@@ -1044,13 +1051,16 @@ var nishTheme = (() => {
|
|
|
1044
1051
|
};
|
|
1045
1052
|
const unheight = o.height === false ? () => void 0 : mountHeightVar(nav, "--nish-sticky-extra");
|
|
1046
1053
|
let current = null;
|
|
1054
|
+
let locked = null;
|
|
1055
|
+
let unlockListeners = null;
|
|
1047
1056
|
const edges = () => {
|
|
1048
1057
|
const max = nav.scrollWidth - nav.clientWidth;
|
|
1049
|
-
|
|
1050
|
-
nav.dataset.
|
|
1058
|
+
const left = getComputedStyle(nav).direction === "rtl" ? nav.scrollLeft + max : nav.scrollLeft;
|
|
1059
|
+
nav.dataset.atStart = String(left <= 1);
|
|
1060
|
+
nav.dataset.atEnd = String(max <= 1 || left >= max - 1);
|
|
1051
1061
|
};
|
|
1052
1062
|
const reveal = (a) => {
|
|
1053
|
-
const left = a.
|
|
1063
|
+
const left = a.getBoundingClientRect().left - nav.getBoundingClientRect().left + nav.scrollLeft - nav.clientLeft;
|
|
1054
1064
|
const view = nav.clientWidth;
|
|
1055
1065
|
if (left < nav.scrollLeft + 24) nav.scrollLeft = Math.max(0, left - 24);
|
|
1056
1066
|
else if (left + a.offsetWidth > nav.scrollLeft + view - 24) nav.scrollLeft = left + a.offsetWidth - view + 24;
|
|
@@ -1077,7 +1087,61 @@ var nishTheme = (() => {
|
|
|
1077
1087
|
if (window.innerHeight + window.scrollY >= de.scrollHeight - 2) {
|
|
1078
1088
|
for (const a of links) if (target(a)) found = a;
|
|
1079
1089
|
}
|
|
1080
|
-
activate(found);
|
|
1090
|
+
activate(locked != null ? locked : found);
|
|
1091
|
+
};
|
|
1092
|
+
const unlock = () => {
|
|
1093
|
+
unlockListeners == null ? void 0 : unlockListeners();
|
|
1094
|
+
unlockListeners = null;
|
|
1095
|
+
locked = null;
|
|
1096
|
+
};
|
|
1097
|
+
const lock = (id) => {
|
|
1098
|
+
const a = links.find((l) => {
|
|
1099
|
+
try {
|
|
1100
|
+
return decodeURIComponent(l.hash.slice(1)) === id;
|
|
1101
|
+
} catch (e) {
|
|
1102
|
+
return false;
|
|
1103
|
+
}
|
|
1104
|
+
});
|
|
1105
|
+
if (!a) return;
|
|
1106
|
+
unlock();
|
|
1107
|
+
locked = a;
|
|
1108
|
+
activate(a);
|
|
1109
|
+
const release = () => {
|
|
1110
|
+
unlock();
|
|
1111
|
+
schedule();
|
|
1112
|
+
};
|
|
1113
|
+
const onKey = (e) => {
|
|
1114
|
+
if (["ArrowUp", "ArrowDown", "PageUp", "PageDown", "Home", "End", " "].includes(e.key)) release();
|
|
1115
|
+
};
|
|
1116
|
+
let settled = false;
|
|
1117
|
+
const settle = () => {
|
|
1118
|
+
settled = true;
|
|
1119
|
+
};
|
|
1120
|
+
let t = setTimeout(settle, 400);
|
|
1121
|
+
const onScroll = () => {
|
|
1122
|
+
if (settled) release();
|
|
1123
|
+
else {
|
|
1124
|
+
clearTimeout(t);
|
|
1125
|
+
t = setTimeout(settle, 200);
|
|
1126
|
+
}
|
|
1127
|
+
};
|
|
1128
|
+
const onScrollEnd = () => {
|
|
1129
|
+
clearTimeout(t);
|
|
1130
|
+
t = setTimeout(settle, 50);
|
|
1131
|
+
};
|
|
1132
|
+
window.addEventListener("wheel", release, { passive: true });
|
|
1133
|
+
window.addEventListener("touchstart", release, { passive: true });
|
|
1134
|
+
window.addEventListener("keydown", onKey);
|
|
1135
|
+
window.addEventListener("scroll", onScroll, { passive: true });
|
|
1136
|
+
window.addEventListener("scrollend", onScrollEnd);
|
|
1137
|
+
unlockListeners = () => {
|
|
1138
|
+
clearTimeout(t);
|
|
1139
|
+
window.removeEventListener("wheel", release);
|
|
1140
|
+
window.removeEventListener("touchstart", release);
|
|
1141
|
+
window.removeEventListener("keydown", onKey);
|
|
1142
|
+
window.removeEventListener("scroll", onScroll);
|
|
1143
|
+
window.removeEventListener("scrollend", onScrollEnd);
|
|
1144
|
+
};
|
|
1081
1145
|
};
|
|
1082
1146
|
let frame = 0;
|
|
1083
1147
|
const schedule = () => {
|
|
@@ -1105,7 +1169,8 @@ var nishTheme = (() => {
|
|
|
1105
1169
|
});
|
|
1106
1170
|
ro.observe(nav);
|
|
1107
1171
|
}
|
|
1108
|
-
|
|
1172
|
+
const stop = () => {
|
|
1173
|
+
unlock();
|
|
1109
1174
|
if (frame) cancelAnimationFrame(frame);
|
|
1110
1175
|
window.removeEventListener("scroll", schedule);
|
|
1111
1176
|
window.removeEventListener("resize", schedule);
|
|
@@ -1117,6 +1182,7 @@ var nishTheme = (() => {
|
|
|
1117
1182
|
delete nav.dataset.atStart;
|
|
1118
1183
|
delete nav.dataset.atEnd;
|
|
1119
1184
|
};
|
|
1185
|
+
return Object.assign(stop, { lock });
|
|
1120
1186
|
}
|
|
1121
1187
|
function mountChecklist(list) {
|
|
1122
1188
|
var _a, _b, _c;
|
|
@@ -1170,4 +1236,3 @@ var nishTheme = (() => {
|
|
|
1170
1236
|
}
|
|
1171
1237
|
return __toCommonJS(theme_global_exports);
|
|
1172
1238
|
})();
|
|
1173
|
-
//# sourceMappingURL=theme.global.js.map
|
package/dist/theme.js
CHANGED
|
@@ -264,15 +264,22 @@ var THEMES = /* @__PURE__ */ Object.fromEntries(
|
|
|
264
264
|
var DEFAULT_THEME = "dark";
|
|
265
265
|
|
|
266
266
|
// src/runtime.ts
|
|
267
|
-
var version = true ? "3.
|
|
267
|
+
var version = true ? "3.2.0" : "dev";
|
|
268
268
|
var KEY = /* @__PURE__ */ Symbol.for("nish-ui.runtime.v1");
|
|
269
269
|
function runtime() {
|
|
270
270
|
const g = globalThis;
|
|
271
271
|
return g[KEY] ??= { versions: /* @__PURE__ */ new Set(), slots: {} };
|
|
272
272
|
}
|
|
273
|
+
function isDevelopment() {
|
|
274
|
+
try {
|
|
275
|
+
return process.env.NODE_ENV !== "production";
|
|
276
|
+
} catch {
|
|
277
|
+
return false;
|
|
278
|
+
}
|
|
279
|
+
}
|
|
273
280
|
function register(rt) {
|
|
274
281
|
rt.versions.add(version);
|
|
275
|
-
if (rt.versions.size > 1 && !rt.warned &&
|
|
282
|
+
if (rt.versions.size > 1 && !rt.warned && isDevelopment()) {
|
|
276
283
|
rt.warned = true;
|
|
277
284
|
console.warn(
|
|
278
285
|
`nish-ui: two versions are loaded on this page (${[...rt.versions].join(", ")}). Overlays, toasts and theme state are shared, but mixing versions is unsupported.`
|
|
@@ -981,7 +988,8 @@ function mountStuck(el, onChange) {
|
|
|
981
988
|
};
|
|
982
989
|
}
|
|
983
990
|
function mountScrollspy(nav, o = {}) {
|
|
984
|
-
|
|
991
|
+
const noop = Object.assign(() => void 0, { lock: (_id) => void 0 });
|
|
992
|
+
if (typeof document === "undefined") return noop;
|
|
985
993
|
const links = Array.from(nav.querySelectorAll('a[href^="#"]')).filter((a) => a.hash.length > 1);
|
|
986
994
|
const target = (a) => {
|
|
987
995
|
try {
|
|
@@ -992,13 +1000,16 @@ function mountScrollspy(nav, o = {}) {
|
|
|
992
1000
|
};
|
|
993
1001
|
const unheight = o.height === false ? () => void 0 : mountHeightVar(nav, "--nish-sticky-extra");
|
|
994
1002
|
let current = null;
|
|
1003
|
+
let locked = null;
|
|
1004
|
+
let unlockListeners = null;
|
|
995
1005
|
const edges = () => {
|
|
996
1006
|
const max = nav.scrollWidth - nav.clientWidth;
|
|
997
|
-
|
|
998
|
-
nav.dataset.
|
|
1007
|
+
const left = getComputedStyle(nav).direction === "rtl" ? nav.scrollLeft + max : nav.scrollLeft;
|
|
1008
|
+
nav.dataset.atStart = String(left <= 1);
|
|
1009
|
+
nav.dataset.atEnd = String(max <= 1 || left >= max - 1);
|
|
999
1010
|
};
|
|
1000
1011
|
const reveal = (a) => {
|
|
1001
|
-
const left = a.
|
|
1012
|
+
const left = a.getBoundingClientRect().left - nav.getBoundingClientRect().left + nav.scrollLeft - nav.clientLeft;
|
|
1002
1013
|
const view = nav.clientWidth;
|
|
1003
1014
|
if (left < nav.scrollLeft + 24) nav.scrollLeft = Math.max(0, left - 24);
|
|
1004
1015
|
else if (left + a.offsetWidth > nav.scrollLeft + view - 24) nav.scrollLeft = left + a.offsetWidth - view + 24;
|
|
@@ -1024,7 +1035,61 @@ function mountScrollspy(nav, o = {}) {
|
|
|
1024
1035
|
if (window.innerHeight + window.scrollY >= de.scrollHeight - 2) {
|
|
1025
1036
|
for (const a of links) if (target(a)) found = a;
|
|
1026
1037
|
}
|
|
1027
|
-
activate(found);
|
|
1038
|
+
activate(locked ?? found);
|
|
1039
|
+
};
|
|
1040
|
+
const unlock = () => {
|
|
1041
|
+
unlockListeners?.();
|
|
1042
|
+
unlockListeners = null;
|
|
1043
|
+
locked = null;
|
|
1044
|
+
};
|
|
1045
|
+
const lock = (id) => {
|
|
1046
|
+
const a = links.find((l) => {
|
|
1047
|
+
try {
|
|
1048
|
+
return decodeURIComponent(l.hash.slice(1)) === id;
|
|
1049
|
+
} catch {
|
|
1050
|
+
return false;
|
|
1051
|
+
}
|
|
1052
|
+
});
|
|
1053
|
+
if (!a) return;
|
|
1054
|
+
unlock();
|
|
1055
|
+
locked = a;
|
|
1056
|
+
activate(a);
|
|
1057
|
+
const release = () => {
|
|
1058
|
+
unlock();
|
|
1059
|
+
schedule();
|
|
1060
|
+
};
|
|
1061
|
+
const onKey = (e) => {
|
|
1062
|
+
if (["ArrowUp", "ArrowDown", "PageUp", "PageDown", "Home", "End", " "].includes(e.key)) release();
|
|
1063
|
+
};
|
|
1064
|
+
let settled = false;
|
|
1065
|
+
const settle = () => {
|
|
1066
|
+
settled = true;
|
|
1067
|
+
};
|
|
1068
|
+
let t = setTimeout(settle, 400);
|
|
1069
|
+
const onScroll = () => {
|
|
1070
|
+
if (settled) release();
|
|
1071
|
+
else {
|
|
1072
|
+
clearTimeout(t);
|
|
1073
|
+
t = setTimeout(settle, 200);
|
|
1074
|
+
}
|
|
1075
|
+
};
|
|
1076
|
+
const onScrollEnd = () => {
|
|
1077
|
+
clearTimeout(t);
|
|
1078
|
+
t = setTimeout(settle, 50);
|
|
1079
|
+
};
|
|
1080
|
+
window.addEventListener("wheel", release, { passive: true });
|
|
1081
|
+
window.addEventListener("touchstart", release, { passive: true });
|
|
1082
|
+
window.addEventListener("keydown", onKey);
|
|
1083
|
+
window.addEventListener("scroll", onScroll, { passive: true });
|
|
1084
|
+
window.addEventListener("scrollend", onScrollEnd);
|
|
1085
|
+
unlockListeners = () => {
|
|
1086
|
+
clearTimeout(t);
|
|
1087
|
+
window.removeEventListener("wheel", release);
|
|
1088
|
+
window.removeEventListener("touchstart", release);
|
|
1089
|
+
window.removeEventListener("keydown", onKey);
|
|
1090
|
+
window.removeEventListener("scroll", onScroll);
|
|
1091
|
+
window.removeEventListener("scrollend", onScrollEnd);
|
|
1092
|
+
};
|
|
1028
1093
|
};
|
|
1029
1094
|
let frame = 0;
|
|
1030
1095
|
const schedule = () => {
|
|
@@ -1052,7 +1117,8 @@ function mountScrollspy(nav, o = {}) {
|
|
|
1052
1117
|
});
|
|
1053
1118
|
ro.observe(nav);
|
|
1054
1119
|
}
|
|
1055
|
-
|
|
1120
|
+
const stop = () => {
|
|
1121
|
+
unlock();
|
|
1056
1122
|
if (frame) cancelAnimationFrame(frame);
|
|
1057
1123
|
window.removeEventListener("scroll", schedule);
|
|
1058
1124
|
window.removeEventListener("resize", schedule);
|
|
@@ -1064,6 +1130,7 @@ function mountScrollspy(nav, o = {}) {
|
|
|
1064
1130
|
delete nav.dataset.atStart;
|
|
1065
1131
|
delete nav.dataset.atEnd;
|
|
1066
1132
|
};
|
|
1133
|
+
return Object.assign(stop, { lock });
|
|
1067
1134
|
}
|
|
1068
1135
|
function mountChecklist(list) {
|
|
1069
1136
|
if (typeof document === "undefined") return () => void 0;
|
|
@@ -1135,4 +1202,3 @@ export {
|
|
|
1135
1202
|
setThemeChoice,
|
|
1136
1203
|
showToast
|
|
1137
1204
|
};
|
|
1138
|
-
//# sourceMappingURL=theme.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nish-ui",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"description": "Design tokens, seven themes, flash-free theme switching and accessible React 19 components for Tailwind 4, plain CSS and static HTML. Live docs: https://design.nish.software",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Nishant Arora",
|