@milaboratories/uikit 2.5.7 → 2.6.1

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.
@@ -0,0 +1,121 @@
1
+ import { MaybeRef, WatchSource } from 'vue';
2
+ /**
3
+ * Repeatedly executes an asynchronous query while tracking arguments, state transitions,
4
+ * and result freshness.
5
+ *
6
+ * @remarks
7
+ *
8
+ * ### Typical usage
9
+ *
10
+ * ```ts
11
+ * const args = ref({ id: 'item-1' });
12
+ * const { data, pause, resume, lastError } = usePollingQuery(args, fetchItem, {
13
+ * minInterval: 5_000,
14
+ * minDelay: 250,
15
+ * });
16
+ * ```
17
+ *
18
+ * The composable polls `fetchItem` while `resume()`d. Whenever the `args` ref changes the current
19
+ * request is aborted, the status becomes `'stale'`, and a new poll is scheduled after the optional
20
+ * debounce period and the configured timing constraints. Results from older requests are ignored
21
+ * through version tracking, ensuring consumers only observe the freshest payload.
22
+ *
23
+ * ### Timing behaviour
24
+ *
25
+ * - `minInterval` defines the minimum duration between the start times of consecutive polls.
26
+ * - `minDelay` (optional) enforces a minimum wait time between a poll finishing and the next poll starting.
27
+ * - After each poll completes, the next poll is scheduled `max(minInterval - elapsed, minDelay)` ms later.
28
+ * - When arguments change, the next poll still respects both constraints while also honouring the debounce.
29
+ *
30
+ * ### Abort handling
31
+ *
32
+ * Each poll receives a dedicated `AbortSignal`. The signal is aborted when pausing, disposing
33
+ * the scope, or when the arguments ref changes. Queries should surface aborts by listening to
34
+ * the signal. Aborted requests may settle later; outdated results are discarded via version checks.
35
+ *
36
+ * ### Pause, resume, and callback control
37
+ *
38
+ * - `pause()` stops future polls, clears pending timeouts, and aborts in-flight requests.
39
+ * - `resume()` is idempotent; it reactivates polling only when currently inactive.
40
+ * - The callback receives a bound `pause()` helper for conditional pausing.
41
+ *
42
+ * ### Error handling
43
+ *
44
+ * Errors bubble into `lastError`; they reset on the next successful poll or when `resume()`
45
+ * transitions from inactive to active. With `pauseOnError: true` the composable pauses automatically.
46
+ *
47
+ * ### Argument tracking
48
+ *
49
+ * - Initial state is `{ status: 'idle' }`.
50
+ * - Argument changes mark the status `'stale'` when a prior result exists; otherwise it stays `'idle'`.
51
+ * - A successful poll for the latest arguments marks the status `'synced'` and updates `value`.
52
+ *
53
+ * ### Request versioning and concurrency
54
+ *
55
+ * Each poll increments an internal version counter. Only the latest version updates shared state,
56
+ * preventing stale results from overwriting fresh data. `maxInFlightRequests` limits concurrent
57
+ * polls; values > 1 allow the next poll to begin even if aborted requests are still settling, while
58
+ * still capping total concurrency to protect upstream services.
59
+ *
60
+ * ### Debouncing
61
+ *
62
+ * Use `debounce` to accumulate rapid argument changes. The status still transitions to `'stale'`
63
+ * immediately, all running polls are aborted, and the new poll waits for the debounce window
64
+ * (and the timing constraints) before executing.
65
+ *
66
+ * ### Options
67
+ *
68
+ * - `minInterval` — required; must be positive. Zero or negative disables polling (`resume()` no-op). Accepts refs.
69
+ * - `minDelay` — optional delay after completion before the next poll may start. Accepts refs.
70
+ * - `autoStart` — start in active mode (default `true`).
71
+ * - `triggerOnResume` — run the callback immediately on `resume()` (default `false`).
72
+ * - `pauseOnError` — automatically pauses when the callback throws (default `false`).
73
+ * - `maxInFlightRequests` — maximum concurrent polls (default `1`).
74
+ * - `debounce` — debounce window for argument changes in milliseconds (default `0`).
75
+ *
76
+ * ### Returns
77
+ *
78
+ * - `data` — readonly ref of `{ status, value }`.
79
+ * - `lastError` — readonly ref of the latest error (or `null`).
80
+ * - `isActive` — readonly ref indicating active polling.
81
+ * - `inFlightCount` — readonly ref with the number of active requests.
82
+ * - `pause()` and `resume()` controls.
83
+ *
84
+ * @typeParam Args - Arguments shape passed to the polling callback.
85
+ * @typeParam Result - Result type produced by the polling callback.
86
+ */
87
+ export declare function usePollingQuery<Args, Result>(args: WatchSource<Args>, queryFn: (args: Args, options: {
88
+ signal: AbortSignal;
89
+ pause: () => void;
90
+ }) => Promise<Result>, options: {
91
+ minInterval: MaybeRef<number>;
92
+ minDelay?: MaybeRef<number | undefined>;
93
+ autoStart?: boolean;
94
+ triggerOnResume?: boolean;
95
+ pauseOnError?: boolean;
96
+ maxInFlightRequests?: number;
97
+ debounce?: number;
98
+ }): {
99
+ data: Readonly<import('vue').Ref<{
100
+ readonly status: "idle";
101
+ } | {
102
+ readonly status: "synced";
103
+ readonly value: import('vue').DeepReadonly<Result>;
104
+ } | {
105
+ readonly status: "stale";
106
+ readonly value: import('vue').DeepReadonly<Result>;
107
+ }, {
108
+ readonly status: "idle";
109
+ } | {
110
+ readonly status: "synced";
111
+ readonly value: import('vue').DeepReadonly<Result>;
112
+ } | {
113
+ readonly status: "stale";
114
+ readonly value: import('vue').DeepReadonly<Result>;
115
+ }>>;
116
+ lastError: Readonly<import('vue').Ref<Error | null, Error | null>>;
117
+ isActive: Readonly<import('vue').Ref<boolean, boolean>>;
118
+ inFlightCount: Readonly<import('vue').Ref<number, number>>;
119
+ pause: () => void;
120
+ resume: () => void;
121
+ };
@@ -0,0 +1,137 @@
1
+ import { shallowRef as ee, ref as O, onScopeDispose as te, watch as ne, readonly as M, toValue as Q } from "vue";
2
+ function ae(l) {
3
+ return l instanceof Error ? l : new Error(typeof l == "string" ? l : JSON.stringify(l));
4
+ }
5
+ function re(l, W, r) {
6
+ const a = {
7
+ minInterval: r.minInterval,
8
+ minDelay: r.minDelay ?? 0,
9
+ autoStart: r.autoStart ?? !0,
10
+ triggerOnResume: r.triggerOnResume ?? !1,
11
+ pauseOnError: r.pauseOnError ?? !1,
12
+ maxInFlightRequests: Math.max(1, r.maxInFlightRequests ?? 1),
13
+ debounce: Math.max(0, r.debounce ?? 0)
14
+ }, p = () => Math.max(0, Q(a.minInterval)), j = () => {
15
+ const e = a.minDelay === void 0 ? void 0 : Q(a.minDelay);
16
+ return Math.max(0, e ?? 0);
17
+ }, u = () => p() > 0, i = ee({ status: "idle" }), w = O(null), t = O(!1);
18
+ let E = 0, S = 0;
19
+ const h = O(0);
20
+ let c = !1, o = null, d = null, f = 0, m = 0;
21
+ const A = /* @__PURE__ */ new Map(), I = /* @__PURE__ */ new Map(), g = [];
22
+ let q, y = !1;
23
+ const z = (e) => {
24
+ q = e, y = !0;
25
+ }, G = () => {
26
+ if (i.value.status === "synced" || i.value.status === "stale") {
27
+ const { value: e } = i.value;
28
+ i.value = { status: "stale", value: e };
29
+ }
30
+ }, V = () => {
31
+ if (g.length === 0) return;
32
+ const e = g.shift();
33
+ e == null || e.resolve();
34
+ }, H = async () => {
35
+ h.value < a.maxInFlightRequests || await new Promise((e) => {
36
+ g.push({ resolve: e });
37
+ });
38
+ }, k = () => {
39
+ o !== null && (clearTimeout(o), o = null);
40
+ }, R = () => {
41
+ d !== null && (clearTimeout(d), d = null);
42
+ }, T = (e) => {
43
+ A.forEach((n, s) => {
44
+ n.signal.aborted || (I.set(s, e), n.abort());
45
+ });
46
+ }, K = (e = 0) => {
47
+ const n = Date.now(), s = Math.max(f, m), F = s > n ? s - n : 0;
48
+ return Math.max(0, e, F);
49
+ }, D = (e = 0, n = "normal") => {
50
+ if (!t.value || !u() || c) return;
51
+ const s = K(e);
52
+ o !== null && clearTimeout(o), o = setTimeout(() => {
53
+ o = null, L(n);
54
+ }, s);
55
+ }, L = async (e) => {
56
+ if (!t.value || c || !u()) return;
57
+ const n = Date.now(), s = Math.max(f, m);
58
+ if (n < s) {
59
+ D(s - n, e);
60
+ return;
61
+ }
62
+ if (!y) return;
63
+ const F = q, X = S;
64
+ if (await H(), !t.value || c || !u()) {
65
+ V();
66
+ return;
67
+ }
68
+ const b = new AbortController(), v = ++E;
69
+ A.set(v, b), h.value += 1;
70
+ const Y = p(), Z = Date.now();
71
+ f = Math.max(f, Z + Y);
72
+ let J = !1;
73
+ const _ = () => {
74
+ J || (J = !0, C());
75
+ };
76
+ try {
77
+ const x = await W(F, { signal: b.signal, pause: _ });
78
+ b.signal.aborted || v === E && X === S && (w.value = null, i.value = { status: "synced", value: x });
79
+ } catch (x) {
80
+ b.signal.aborted || (v === E && (w.value = ae(x)), a.pauseOnError && C());
81
+ } finally {
82
+ const x = j(), $ = Date.now();
83
+ m = Math.max(m, $ + x), A.delete(v), h.value = Math.max(0, h.value - 1), V();
84
+ const N = I.get(v);
85
+ N && I.delete(v), t.value && !c && N !== "args" && D();
86
+ }
87
+ }, P = (e = "external") => {
88
+ !t.value || c || !u() || D(0, e);
89
+ }, U = () => {
90
+ if (S += 1, G(), T("args"), !t.value || !u())
91
+ return;
92
+ const e = () => {
93
+ P(
94
+ "external"
95
+ /* External */
96
+ );
97
+ };
98
+ a.debounce > 0 ? (R(), d = setTimeout(() => {
99
+ d = null, e();
100
+ }, a.debounce)) : e();
101
+ }, C = () => {
102
+ t.value && (t.value = !1, k(), R(), T("pause"), f = Date.now(), m = Date.now());
103
+ }, B = () => {
104
+ if (!u() || t.value || !y) return;
105
+ t.value = !0, w.value = null;
106
+ const e = Date.now();
107
+ f = e, m = e, a.triggerOnResume ? P(
108
+ "external"
109
+ /* External */
110
+ ) : D(
111
+ p(),
112
+ "external"
113
+ /* External */
114
+ );
115
+ };
116
+ return te(() => {
117
+ c = !0, k(), R(), T("dispose"), t.value = !1, g.splice(0, g.length).forEach(({ resolve: e }) => e());
118
+ }), ne(
119
+ l,
120
+ (e) => {
121
+ const n = !y;
122
+ z(e), !n && U();
123
+ },
124
+ { flush: "sync", immediate: !0 }
125
+ ), a.autoStart && u() && B(), {
126
+ data: M(i),
127
+ lastError: M(w),
128
+ isActive: M(t),
129
+ inFlightCount: M(h),
130
+ pause: C,
131
+ resume: B
132
+ };
133
+ }
134
+ export {
135
+ re as usePollingQuery
136
+ };
137
+ //# sourceMappingURL=usePollingQuery.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePollingQuery.js","sources":["../../src/composition/usePollingQuery.ts"],"sourcesContent":["import type { MaybeRef, WatchSource } from 'vue';\nimport { onScopeDispose, readonly, ref, shallowRef, toValue, watch } from 'vue';\n\ntype AbortReason = 'args' | 'pause' | 'dispose';\n\ntype PollingData<Result> =\n | { status: 'idle' }\n | { status: 'synced'; value: Result }\n | { status: 'stale'; value: Result };\n\ninterface InternalOptions {\n minInterval: MaybeRef<number>;\n minDelay: MaybeRef<number | undefined>;\n autoStart: boolean;\n triggerOnResume: boolean;\n pauseOnError: boolean;\n maxInFlightRequests: number;\n debounce: number;\n}\n\ninterface Waiter {\n resolve: () => void;\n}\n\nconst enum ScheduleSource {\n Normal = 'normal',\n External = 'external',\n}\n\nfunction toError(error: unknown): Error {\n if (error instanceof Error) return error;\n return new Error(typeof error === 'string' ? error : JSON.stringify(error));\n}\n\n/**\n * Repeatedly executes an asynchronous query while tracking arguments, state transitions,\n * and result freshness.\n *\n * @remarks\n *\n * ### Typical usage\n *\n * ```ts\n * const args = ref({ id: 'item-1' });\n * const { data, pause, resume, lastError } = usePollingQuery(args, fetchItem, {\n * minInterval: 5_000,\n * minDelay: 250,\n * });\n * ```\n *\n * The composable polls `fetchItem` while `resume()`d. Whenever the `args` ref changes the current\n * request is aborted, the status becomes `'stale'`, and a new poll is scheduled after the optional\n * debounce period and the configured timing constraints. Results from older requests are ignored\n * through version tracking, ensuring consumers only observe the freshest payload.\n *\n * ### Timing behaviour\n *\n * - `minInterval` defines the minimum duration between the start times of consecutive polls.\n * - `minDelay` (optional) enforces a minimum wait time between a poll finishing and the next poll starting.\n * - After each poll completes, the next poll is scheduled `max(minInterval - elapsed, minDelay)` ms later.\n * - When arguments change, the next poll still respects both constraints while also honouring the debounce.\n *\n * ### Abort handling\n *\n * Each poll receives a dedicated `AbortSignal`. The signal is aborted when pausing, disposing\n * the scope, or when the arguments ref changes. Queries should surface aborts by listening to\n * the signal. Aborted requests may settle later; outdated results are discarded via version checks.\n *\n * ### Pause, resume, and callback control\n *\n * - `pause()` stops future polls, clears pending timeouts, and aborts in-flight requests.\n * - `resume()` is idempotent; it reactivates polling only when currently inactive.\n * - The callback receives a bound `pause()` helper for conditional pausing.\n *\n * ### Error handling\n *\n * Errors bubble into `lastError`; they reset on the next successful poll or when `resume()`\n * transitions from inactive to active. With `pauseOnError: true` the composable pauses automatically.\n *\n * ### Argument tracking\n *\n * - Initial state is `{ status: 'idle' }`.\n * - Argument changes mark the status `'stale'` when a prior result exists; otherwise it stays `'idle'`.\n * - A successful poll for the latest arguments marks the status `'synced'` and updates `value`.\n *\n * ### Request versioning and concurrency\n *\n * Each poll increments an internal version counter. Only the latest version updates shared state,\n * preventing stale results from overwriting fresh data. `maxInFlightRequests` limits concurrent\n * polls; values > 1 allow the next poll to begin even if aborted requests are still settling, while\n * still capping total concurrency to protect upstream services.\n *\n * ### Debouncing\n *\n * Use `debounce` to accumulate rapid argument changes. The status still transitions to `'stale'`\n * immediately, all running polls are aborted, and the new poll waits for the debounce window\n * (and the timing constraints) before executing.\n *\n * ### Options\n *\n * - `minInterval` — required; must be positive. Zero or negative disables polling (`resume()` no-op). Accepts refs.\n * - `minDelay` — optional delay after completion before the next poll may start. Accepts refs.\n * - `autoStart` — start in active mode (default `true`).\n * - `triggerOnResume` — run the callback immediately on `resume()` (default `false`).\n * - `pauseOnError` — automatically pauses when the callback throws (default `false`).\n * - `maxInFlightRequests` — maximum concurrent polls (default `1`).\n * - `debounce` — debounce window for argument changes in milliseconds (default `0`).\n *\n * ### Returns\n *\n * - `data` — readonly ref of `{ status, value }`.\n * - `lastError` — readonly ref of the latest error (or `null`).\n * - `isActive` — readonly ref indicating active polling.\n * - `inFlightCount` — readonly ref with the number of active requests.\n * - `pause()` and `resume()` controls.\n *\n * @typeParam Args - Arguments shape passed to the polling callback.\n * @typeParam Result - Result type produced by the polling callback.\n */\nexport function usePollingQuery<Args, Result>(\n args: WatchSource<Args>,\n queryFn: (args: Args, options: { signal: AbortSignal; pause: () => void }) => Promise<Result>,\n options: {\n minInterval: MaybeRef<number>;\n minDelay?: MaybeRef<number | undefined>;\n autoStart?: boolean;\n triggerOnResume?: boolean;\n pauseOnError?: boolean;\n maxInFlightRequests?: number;\n debounce?: number;\n },\n) {\n const internal: InternalOptions = {\n minInterval: options.minInterval,\n minDelay: options.minDelay ?? 0,\n autoStart: options.autoStart ?? true,\n triggerOnResume: options.triggerOnResume ?? false,\n pauseOnError: options.pauseOnError ?? false,\n maxInFlightRequests: Math.max(1, options.maxInFlightRequests ?? 1),\n debounce: Math.max(0, options.debounce ?? 0),\n };\n\n const resolveMinInterval = () => Math.max(0, toValue(internal.minInterval));\n const resolveMinDelay = () => {\n const raw = internal.minDelay === undefined ? undefined : toValue(internal.minDelay);\n return Math.max(0, raw ?? 0);\n };\n const canRun = () => resolveMinInterval() > 0;\n\n const data = shallowRef<PollingData<Result>>({ status: 'idle' });\n const lastError = ref<Error | null>(null);\n const isActive = ref(false);\n\n let latestVersion = 0;\n let argsVersion = 0;\n const inFlightCount = ref(0);\n let disposed = false;\n\n let scheduledTimeout: ReturnType<typeof setTimeout> | null = null;\n let debounceTimeout: ReturnType<typeof setTimeout> | null = null;\n\n let nextMinIntervalStart = 0;\n let nextMinDelayStart = 0;\n\n const controllers = new Map<number, AbortController>();\n const abortReasons = new Map<number, AbortReason>();\n const waiters: Waiter[] = [];\n\n let currentArgs: Args;\n let hasCurrentArgs = false;\n\n const setCurrentArgs = (value: Args) => {\n currentArgs = value;\n hasCurrentArgs = true;\n };\n\n const markStale = () => {\n if (data.value.status === 'synced' || data.value.status === 'stale') {\n const { value } = data.value;\n data.value = { status: 'stale', value };\n }\n };\n\n const scheduleWaiters = () => {\n if (waiters.length === 0) return;\n const waiter = waiters.shift();\n waiter?.resolve();\n };\n\n const waitForSlot = async () => {\n if (inFlightCount.value < internal.maxInFlightRequests) return;\n await new Promise<void>((resolve) => {\n waiters.push({ resolve });\n });\n };\n\n const clearScheduled = () => {\n if (scheduledTimeout !== null) {\n clearTimeout(scheduledTimeout);\n scheduledTimeout = null;\n }\n };\n\n const clearDebounce = () => {\n if (debounceTimeout !== null) {\n clearTimeout(debounceTimeout);\n debounceTimeout = null;\n }\n };\n\n const abortAll = (reason: AbortReason) => {\n controllers.forEach((controller, version) => {\n if (!controller.signal.aborted) {\n abortReasons.set(version, reason);\n controller.abort();\n }\n });\n };\n\n const computeDelay = (requestedDelay = 0) => {\n const now = Date.now();\n const earliest = Math.max(nextMinIntervalStart, nextMinDelayStart);\n const baseDelay = earliest > now ? earliest - now : 0;\n return Math.max(0, requestedDelay, baseDelay);\n };\n\n const queueExecution = (requestedDelay = 0, source: ScheduleSource = ScheduleSource.Normal) => {\n if (!isActive.value || !canRun() || disposed) return;\n const delay = computeDelay(requestedDelay);\n\n if (scheduledTimeout !== null) {\n clearTimeout(scheduledTimeout);\n }\n\n scheduledTimeout = setTimeout(() => {\n scheduledTimeout = null;\n void runExecution(source);\n }, delay);\n };\n\n const runExecution = async (source: ScheduleSource) => {\n if (!isActive.value || disposed || !canRun()) return;\n\n const now = Date.now();\n const earliest = Math.max(nextMinIntervalStart, nextMinDelayStart);\n if (now < earliest) {\n queueExecution(earliest - now, source);\n return;\n }\n\n if (!hasCurrentArgs) return;\n\n const argsSnapshot = currentArgs;\n const assignedArgsVersion = argsVersion;\n\n await waitForSlot();\n\n if (!isActive.value || disposed || !canRun()) {\n scheduleWaiters();\n return;\n }\n\n const controller = new AbortController();\n const version = ++latestVersion;\n\n controllers.set(version, controller);\n inFlightCount.value += 1;\n\n const minInterval = resolveMinInterval();\n const startTime = Date.now();\n nextMinIntervalStart = Math.max(nextMinIntervalStart, startTime + minInterval);\n\n let pausedByCallback = false;\n\n const pauseFromCallback = () => {\n if (pausedByCallback) return;\n pausedByCallback = true;\n pause();\n };\n\n try {\n const result = await queryFn(argsSnapshot, { signal: controller.signal, pause: pauseFromCallback });\n if (!controller.signal.aborted) {\n if (version === latestVersion && assignedArgsVersion === argsVersion) {\n lastError.value = null;\n data.value = { status: 'synced', value: result };\n }\n }\n } catch (error) {\n if (controller.signal.aborted) {\n // ignore abort errors\n } else {\n if (version === latestVersion) {\n lastError.value = toError(error);\n }\n\n if (internal.pauseOnError) {\n pause();\n }\n }\n } finally {\n const minDelay = resolveMinDelay();\n const finishTime = Date.now();\n nextMinDelayStart = Math.max(nextMinDelayStart, finishTime + minDelay);\n\n controllers.delete(version);\n inFlightCount.value = Math.max(0, inFlightCount.value - 1);\n scheduleWaiters();\n\n const reason = abortReasons.get(version);\n if (reason) {\n abortReasons.delete(version);\n }\n\n const shouldSchedule\n = isActive.value && !disposed && reason !== 'args';\n\n if (shouldSchedule) {\n queueExecution();\n }\n }\n };\n\n const triggerExecution = (source: ScheduleSource = ScheduleSource.External) => {\n if (!isActive.value || disposed || !canRun()) return;\n queueExecution(0, source);\n };\n\n const handleArgsChange = () => {\n argsVersion += 1;\n markStale();\n abortAll('args');\n\n if (!isActive.value || !canRun()) {\n return;\n }\n\n const schedule = () => {\n triggerExecution(ScheduleSource.External);\n };\n\n if (internal.debounce > 0) {\n clearDebounce();\n debounceTimeout = setTimeout(() => {\n debounceTimeout = null;\n schedule();\n }, internal.debounce);\n } else {\n schedule();\n }\n };\n\n const pause = () => {\n if (!isActive.value) return;\n isActive.value = false;\n clearScheduled();\n clearDebounce();\n abortAll('pause');\n nextMinIntervalStart = Date.now();\n nextMinDelayStart = Date.now();\n };\n\n const resume = () => {\n if (!canRun()) return;\n if (isActive.value) return;\n if (!hasCurrentArgs) return;\n isActive.value = true;\n lastError.value = null;\n\n const now = Date.now();\n nextMinIntervalStart = now;\n nextMinDelayStart = now;\n\n if (internal.triggerOnResume) {\n triggerExecution(ScheduleSource.External);\n } else {\n queueExecution(resolveMinInterval(), ScheduleSource.External);\n }\n };\n\n onScopeDispose(() => {\n disposed = true;\n clearScheduled();\n clearDebounce();\n abortAll('dispose');\n isActive.value = false;\n waiters.splice(0, waiters.length).forEach(({ resolve }) => resolve());\n });\n\n watch(\n args,\n (value) => {\n const initial = !hasCurrentArgs;\n setCurrentArgs(value);\n if (initial) {\n return;\n }\n handleArgsChange();\n },\n { flush: 'sync', immediate: true },\n );\n\n if (internal.autoStart && canRun()) {\n resume();\n }\n\n return {\n data: readonly(data),\n lastError: readonly(lastError),\n isActive: readonly(isActive),\n inFlightCount: readonly(inFlightCount),\n pause,\n resume,\n };\n}\n"],"names":["toError","error","usePollingQuery","args","queryFn","options","internal","resolveMinInterval","toValue","resolveMinDelay","raw","canRun","data","shallowRef","lastError","ref","isActive","latestVersion","argsVersion","inFlightCount","disposed","scheduledTimeout","debounceTimeout","nextMinIntervalStart","nextMinDelayStart","controllers","abortReasons","waiters","currentArgs","hasCurrentArgs","setCurrentArgs","value","markStale","scheduleWaiters","waiter","waitForSlot","resolve","clearScheduled","clearDebounce","abortAll","reason","controller","version","computeDelay","requestedDelay","now","earliest","baseDelay","queueExecution","source","delay","runExecution","argsSnapshot","assignedArgsVersion","minInterval","startTime","pausedByCallback","pauseFromCallback","pause","result","minDelay","finishTime","triggerExecution","handleArgsChange","schedule","resume","onScopeDispose","watch","initial","readonly"],"mappings":";AA6BA,SAASA,GAAQC,GAAuB;AACtC,SAAIA,aAAiB,QAAcA,IAC5B,IAAI,MAAM,OAAOA,KAAU,WAAWA,IAAQ,KAAK,UAAUA,CAAK,CAAC;AAC5E;AAuFO,SAASC,GACdC,GACAC,GACAC,GASA;AACA,QAAMC,IAA4B;AAAA,IAChC,aAAaD,EAAQ;AAAA,IACrB,UAAUA,EAAQ,YAAY;AAAA,IAC9B,WAAWA,EAAQ,aAAa;AAAA,IAChC,iBAAiBA,EAAQ,mBAAmB;AAAA,IAC5C,cAAcA,EAAQ,gBAAgB;AAAA,IACtC,qBAAqB,KAAK,IAAI,GAAGA,EAAQ,uBAAuB,CAAC;AAAA,IACjE,UAAU,KAAK,IAAI,GAAGA,EAAQ,YAAY,CAAC;AAAA,EAAA,GAGvCE,IAAqB,MAAM,KAAK,IAAI,GAAGC,EAAQF,EAAS,WAAW,CAAC,GACpEG,IAAkB,MAAM;AAC5B,UAAMC,IAAMJ,EAAS,aAAa,SAAY,SAAYE,EAAQF,EAAS,QAAQ;AACnF,WAAO,KAAK,IAAI,GAAGI,KAAO,CAAC;AAAA,EAC7B,GACMC,IAAS,MAAMJ,EAAA,IAAuB,GAEtCK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@@ -83,6 +83,7 @@ export { useEventListener } from './composition/useEventListener';
83
83
  export { useFormState } from './composition/useFormState';
84
84
  export { useHover } from './composition/useHover';
85
85
  export { useInterval } from './composition/useInterval';
86
+ export { usePollingQuery } from './composition/usePollingQuery';
86
87
  export { useLocalStorage } from './composition/useLocalStorage';
87
88
  export { useMouse } from './composition/useMouse';
88
89
  export { useMouseCapture } from './composition/useMouseCapture';
package/dist/index.js CHANGED
@@ -16,13 +16,13 @@ import { allCssVariables as e } from "./demo-site-data/all-css-variables.js";
16
16
  import { default as M } from "./layout/PlBlockPage/PlBlockPage.vue.js";
17
17
  import { usePlBlockPageTitleTeleportTarget as L } from "./layout/PlBlockPage/usePlBlockPageTitleTeleportTarget.js";
18
18
  import { default as v } from "./layout/PlContainer/PlContainer.vue.js";
19
- import { default as F } from "./layout/PlGrid/PlGrid.vue.js";
20
- import { default as y } from "./layout/PlRow/PlRow.vue.js";
19
+ import { default as E } from "./layout/PlGrid/PlGrid.vue.js";
20
+ import { default as O } from "./layout/PlRow/PlRow.vue.js";
21
21
  import { default as G } from "./layout/PlSpacer/PlSpacer.vue.js";
22
22
  import { default as V } from "./components/PlErrorBoundary/PlErrorBoundary.vue.js";
23
23
  import { default as N } from "./components/PlAccordion/PlAccordion.vue.js";
24
24
  import { default as H } from "./components/PlAccordion/PlAccordionSection.vue.js";
25
- import { default as Q } from "./components/PlAlert/PlAlert.vue.js";
25
+ import { default as q } from "./components/PlAlert/PlAlert.vue.js";
26
26
  import { default as j } from "./components/PlAutocomplete/PlAutocomplete.vue.js";
27
27
  import { default as K } from "./components/PlAutocompleteMulti/PlAutocompleteMulti.vue.js";
28
28
  import { default as Y } from "./components/PlBtnAccent/PlBtnAccent.vue.js";
@@ -43,13 +43,13 @@ import { default as Be } from "./components/PlDropdownLine/PlDropdownLine.vue.js
43
43
  import { default as Me } from "./components/PlDropdownMulti/PlDropdownMulti.vue.js";
44
44
  import { default as Le } from "./components/PlDropdownMultiRef/PlDropdownMultiRef.vue.js";
45
45
  import { default as ve } from "./components/PlDropdownRef/PlDropdownRef.vue.js";
46
- import { default as Fe } from "./components/PlEditableTitle/PlEditableTitle.vue.js";
47
- import { default as ye } from "./components/PlElementList/PlElementList.vue.js";
46
+ import { default as Ee } from "./components/PlEditableTitle/PlEditableTitle.vue.js";
47
+ import { default as Oe } from "./components/PlElementList/PlElementList.vue.js";
48
48
  import { default as Ge } from "./components/PlLoaderCircular/PlLoaderCircular.vue.js";
49
49
  import { default as Ve } from "./components/PlLogView/PlLogView.vue.js";
50
50
  import { default as Ne } from "./components/PlNumberField/PlNumberField.vue.js";
51
51
  import { default as He } from "./components/PlProgressBar/PlProgressBar.vue.js";
52
- import { default as Qe } from "./components/PlProgressCell/PlProgressCell.vue.js";
52
+ import { default as qe } from "./components/PlProgressCell/PlProgressCell.vue.js";
53
53
  import { default as je } from "./components/PlSearchField/PlSearchField.vue.js";
54
54
  import { default as Ke } from "./components/PlSectionSeparator/PlSectionSeparator.vue.js";
55
55
  import { default as Ye } from "./components/PlSlideModal/PlPureSlideModal.vue.js";
@@ -68,13 +68,13 @@ import { default as To } from "./components/PlSidebar/PlSidebarGroup.vue.js";
68
68
  import { default as wo } from "./components/PlSidebar/PlSidebarItem.vue.js";
69
69
  import { default as Do, default as Mo } from "./components/PlIcon16/PlIcon16.vue.js";
70
70
  import { default as Lo, default as Io } from "./components/PlIcon24/PlIcon24.vue.js";
71
- import { default as Eo } from "./components/PlSvg/PlSvg.vue.js";
72
- import { default as Oo } from "./components/PlChartHistogram/PlChartHistogram.vue.js";
71
+ import { default as yo } from "./components/PlSvg/PlSvg.vue.js";
72
+ import { default as Fo } from "./components/PlChartHistogram/PlChartHistogram.vue.js";
73
73
  import { default as Ao } from "./components/PlChartStackedBar/PlChartStackedBar.vue.js";
74
74
  import { default as Ro } from "./components/PlChartStackedBar/PlChartStackedBarCompact.vue.js";
75
75
  import { default as zo } from "./components/PlRadio/PlRadio.vue.js";
76
76
  import { default as Uo } from "./components/PlRadio/PlRadioGroup.vue.js";
77
- import { categoricalColors as qo, magma as Qo, palettes as Wo, viridis as jo } from "./colors/palette.js";
77
+ import { categoricalColors as Qo, magma as qo, palettes as Wo, viridis as jo } from "./colors/palette.js";
78
78
  import { Color as Ko } from "./colors/color.js";
79
79
  import { Gradient as Yo, interpolateColor as Zo, normalizeGradient as _o } from "./colors/gradient.js";
80
80
  import { useClickOutside as er } from "./composition/useClickOutside.js";
@@ -85,28 +85,29 @@ import { useEventListener as pr } from "./composition/useEventListener.js";
85
85
  import { useFormState as dr } from "./composition/useFormState.js";
86
86
  import { useHover as xr } from "./composition/useHover.js";
87
87
  import { useInterval as nr } from "./composition/useInterval.js";
88
- import { useLocalStorage as cr } from "./composition/useLocalStorage.js";
89
- import { useMouse as gr } from "./composition/useMouse.js";
90
- import { useMouseCapture as hr } from "./composition/useMouseCapture.js";
91
- import { useElementPosition as br } from "./composition/usePosition.js";
92
- import { useQuery as Br } from "./composition/useQuery.js";
93
- import { useResizeObserver as Mr } from "./composition/useResizeObserver.js";
94
- import { useScroll as Lr } from "./composition/useScroll.js";
95
- import { useSortable as vr } from "./composition/useSortable.js";
96
- import { useSortable2 as Fr } from "./composition/useSortable2.js";
97
- import { useTheme as yr } from "./composition/useTheme.js";
98
- import { computedCached as Gr } from "./composition/computedCached.js";
99
- import { filterUiMetadata as Vr, getFilterUiMetadata as zr, getFilterUiTypeOptions as Nr } from "./composition/filters/metadata.js";
100
- import { useWatchFetch as Hr } from "./composition/useWatchFetch.js";
101
- import { watchCached as Qr } from "./composition/watchCached.js";
102
- import { default as jr } from "./utils/DropdownOverlay/DropdownOverlay.vue.js";
103
- import { default as Kr } from "./utils/PlCloseModalBtn.vue.js";
104
- import { useLabelNotch as Yr } from "./utils/useLabelNotch.js";
105
- import { icons16 as _r } from "./generated/icons-16.js";
106
- import { icons24 as et } from "./generated/icons-24.js";
107
- import { detectOutside as rt, eventListener as tt, getElementScrollPosition as at, isElementVisible as lt, scrollIntoView as ft } from "./helpers/dom.js";
108
- import { animate as pt, animateInfinite as mt, call as dt, delay as ut, listToOptions as xt, makeEaseInOut as it, makeEaseOut as nt, normalizeListOptions as Pt, randomInt as ct, randomString as St, requestTick as gt, throttle as Ct, timeout as ht } from "./helpers/utils.js";
109
- import { downloadContent as bt } from "./helpers/downloadContent.js";
88
+ import { usePollingQuery as cr } from "./composition/usePollingQuery.js";
89
+ import { useLocalStorage as gr } from "./composition/useLocalStorage.js";
90
+ import { useMouse as hr } from "./composition/useMouse.js";
91
+ import { useMouseCapture as br } from "./composition/useMouseCapture.js";
92
+ import { useElementPosition as Br } from "./composition/usePosition.js";
93
+ import { useQuery as Mr } from "./composition/useQuery.js";
94
+ import { useResizeObserver as Lr } from "./composition/useResizeObserver.js";
95
+ import { useScroll as vr } from "./composition/useScroll.js";
96
+ import { useSortable as Er } from "./composition/useSortable.js";
97
+ import { useSortable2 as Or } from "./composition/useSortable2.js";
98
+ import { useTheme as Gr } from "./composition/useTheme.js";
99
+ import { computedCached as Vr } from "./composition/computedCached.js";
100
+ import { filterUiMetadata as Nr, getFilterUiMetadata as Ur, getFilterUiTypeOptions as Hr } from "./composition/filters/metadata.js";
101
+ import { useWatchFetch as qr } from "./composition/useWatchFetch.js";
102
+ import { watchCached as jr } from "./composition/watchCached.js";
103
+ import { default as Kr } from "./utils/DropdownOverlay/DropdownOverlay.vue.js";
104
+ import { default as Yr } from "./utils/PlCloseModalBtn.vue.js";
105
+ import { useLabelNotch as _r } from "./utils/useLabelNotch.js";
106
+ import { icons16 as et } from "./generated/icons-16.js";
107
+ import { icons24 as rt } from "./generated/icons-24.js";
108
+ import { detectOutside as at, eventListener as lt, getElementScrollPosition as ft, isElementVisible as st, scrollIntoView as pt } from "./helpers/dom.js";
109
+ import { animate as dt, animateInfinite as ut, call as xt, delay as it, listToOptions as nt, makeEaseInOut as Pt, makeEaseOut as ct, normalizeListOptions as St, randomInt as gt, randomString as Ct, requestTick as ht, throttle as Tt, timeout as bt } from "./helpers/utils.js";
110
+ import { downloadContent as Bt } from "./helpers/downloadContent.js";
110
111
  const l = { allCssVariables: e() };
111
112
  export {
112
113
  Ko as Color,
@@ -114,12 +115,12 @@ export {
114
115
  r as DataTable,
115
116
  l as DemoData,
116
117
  d as DropdownListItem,
117
- jr as DropdownOverlay,
118
+ Kr as DropdownOverlay,
118
119
  Yo as Gradient,
119
120
  g as LongText,
120
121
  N as PlAccordion,
121
122
  H as PlAccordionSection,
122
- Q as PlAlert,
123
+ q as PlAlert,
123
124
  j as PlAutocomplete,
124
125
  K as PlAutocompleteMulti,
125
126
  M as PlBlockPage,
@@ -131,13 +132,13 @@ export {
131
132
  fe as PlBtnPrimary,
132
133
  pe as PlBtnSecondary,
133
134
  de as PlBtnSplit,
134
- Oo as PlChartHistogram,
135
+ Fo as PlChartHistogram,
135
136
  Ao as PlChartStackedBar,
136
137
  Ro as PlChartStackedBarCompact,
137
138
  xe as PlCheckbox,
138
139
  ne as PlCheckboxGroup,
139
140
  ce as PlChip,
140
- Kr as PlCloseModalBtn,
141
+ Yr as PlCloseModalBtn,
141
142
  v as PlContainer,
142
143
  ge as PlDialogModal,
143
144
  he as PlDropdown,
@@ -146,12 +147,12 @@ export {
146
147
  Me as PlDropdownMulti,
147
148
  Le as PlDropdownMultiRef,
148
149
  ve as PlDropdownRef,
149
- Fe as PlEditableTitle,
150
- ye as PlElementList,
150
+ Ee as PlEditableTitle,
151
+ Oe as PlElementList,
151
152
  V as PlErrorBoundary,
152
153
  Po as PlFileDialog,
153
154
  So as PlFileInput,
154
- F as PlGrid,
155
+ E as PlGrid,
155
156
  Do as PlIcon16,
156
157
  Lo as PlIcon24,
157
158
  Ge as PlLoaderCircular,
@@ -161,11 +162,11 @@ export {
161
162
  Co as PlNotificationAlert,
162
163
  Ne as PlNumberField,
163
164
  He as PlProgressBar,
164
- Qe as PlProgressCell,
165
+ qe as PlProgressCell,
165
166
  Ye as PlPureSlideModal,
166
167
  zo as PlRadio,
167
168
  Uo as PlRadioGroup,
168
- y as PlRow,
169
+ O as PlRow,
169
170
  je as PlSearchField,
170
171
  Ke as PlSectionSeparator,
171
172
  To as PlSidebarGroup,
@@ -174,7 +175,7 @@ export {
174
175
  G as PlSpacer,
175
176
  eo as PlSplash,
176
177
  ro as PlStatusTag,
177
- Eo as PlSvg,
178
+ yo as PlSvg,
178
179
  ao as PlTabs,
179
180
  fo as PlTextArea,
180
181
  po as PlTextField,
@@ -185,37 +186,37 @@ export {
185
186
  b as SliderRange,
186
187
  B as SliderRangeTriple,
187
188
  p as ThemeSwitcher,
188
- pt as animate,
189
- mt as animateInfinite,
190
- dt as call,
191
- qo as categoricalColors,
192
- Gr as computedCached,
193
- ut as delay,
194
- rt as detectOutside,
195
- bt as downloadContent,
196
- tt as eventListener,
197
- Vr as filterUiMetadata,
198
- at as getElementScrollPosition,
199
- zr as getFilterUiMetadata,
200
- Nr as getFilterUiTypeOptions,
201
- _r as icons16,
202
- et as icons24,
189
+ dt as animate,
190
+ ut as animateInfinite,
191
+ xt as call,
192
+ Qo as categoricalColors,
193
+ Vr as computedCached,
194
+ it as delay,
195
+ at as detectOutside,
196
+ Bt as downloadContent,
197
+ lt as eventListener,
198
+ Nr as filterUiMetadata,
199
+ ft as getElementScrollPosition,
200
+ Ur as getFilterUiMetadata,
201
+ Hr as getFilterUiTypeOptions,
202
+ et as icons16,
203
+ rt as icons24,
203
204
  Zo as interpolateColor,
204
- lt as isElementVisible,
205
- xt as listToOptions,
206
- Qo as magma,
207
- it as makeEaseInOut,
208
- nt as makeEaseOut,
205
+ st as isElementVisible,
206
+ nt as listToOptions,
207
+ qo as magma,
208
+ Pt as makeEaseInOut,
209
+ ct as makeEaseOut,
209
210
  _o as normalizeGradient,
210
- Pt as normalizeListOptions,
211
+ St as normalizeListOptions,
211
212
  Wo as palettes,
212
- ct as randomInt,
213
- St as randomString,
214
- gt as requestTick,
215
- ft as scrollIntoView,
213
+ gt as randomInt,
214
+ Ct as randomString,
215
+ ht as requestTick,
216
+ pt as scrollIntoView,
216
217
  c as showContextMenu,
217
- Ct as throttle,
218
- ht as timeout,
218
+ Tt as throttle,
219
+ bt as timeout,
219
220
  er as useClickOutside,
220
221
  rr as useComponentProp,
221
222
  ar as useConfirm,
@@ -224,20 +225,21 @@ export {
224
225
  dr as useFormState,
225
226
  xr as useHover,
226
227
  nr as useInterval,
227
- Yr as useLabelNotch,
228
- cr as useLocalStorage,
229
- gr as useMouse,
230
- hr as useMouseCapture,
228
+ _r as useLabelNotch,
229
+ gr as useLocalStorage,
230
+ hr as useMouse,
231
+ br as useMouseCapture,
231
232
  L as usePlBlockPageTitleTeleportTarget,
232
- br as usePosition,
233
- Br as useQuery,
234
- Mr as useResizeObserver,
235
- Lr as useScroll,
236
- vr as useSortable,
237
- Fr as useSortable2,
238
- yr as useTheme,
239
- Hr as useWatchFetch,
233
+ cr as usePollingQuery,
234
+ Br as usePosition,
235
+ Mr as useQuery,
236
+ Lr as useResizeObserver,
237
+ vr as useScroll,
238
+ Er as useSortable,
239
+ Or as useSortable2,
240
+ Gr as useTheme,
241
+ qr as useWatchFetch,
240
242
  jo as viridis,
241
- Qr as watchCached
243
+ jr as watchCached
242
244
  };
243
245
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["import './assets/ui.scss';\n\n// @TODO review\nimport * as DataTable from './components/DataTable';\nimport ThemeSwitcher from './components/ThemeSwitcher.vue';\n// @TODO review (may be private)\nimport DropdownListItem from './components/DropdownListItem.vue';\n\n// @TODO review\nimport ContextProvider from './components/ContextProvider.vue';\nimport Slider from './components/Slider.vue';\nimport { showContextMenu } from './components/contextMenu';\n// for new version\nimport LongText from './components/LongText.vue';\nimport Scrollable from './components/Scrollable.vue';\nimport SliderRange from './components/SliderRange.vue';\nimport SliderRangeTriple from './components/SliderRangeTriple.vue';\n\nimport { allCssVariables } from './demo-site-data/all-css-variables.ts';\n\n/**\n * Layout components\n */\n\nexport * from './layout/PlBlockPage';\nexport * from './layout/PlContainer';\nexport * from './layout/PlGrid';\nexport * from './layout/PlRow';\nexport * from './layout/PlSpacer';\n\n/**\n * Components\n */\nexport * from './components/PlErrorBoundary';\n// export * from './components/PlErrorAlert'; // @TODO discuss if we should export it\nexport * from './components/PlAccordion';\nexport * from './components/PlAlert';\nexport * from './components/PlAutocomplete';\nexport * from './components/PlAutocompleteMulti';\nexport * from './components/PlBtnAccent';\nexport * from './components/PlBtnDanger';\nexport * from './components/PlBtnGhost';\nexport * from './components/PlBtnGroup';\nexport * from './components/PlBtnLink';\nexport * from './components/PlBtnPrimary';\nexport * from './components/PlBtnSecondary';\nexport * from './components/PlBtnSplit';\nexport * from './components/PlCheckbox';\nexport * from './components/PlCheckboxGroup';\nexport * from './components/PlChip';\nexport * from './components/PlDialogModal';\nexport * from './components/PlDropdown';\nexport * from './components/PlDropdownLegacy';\nexport * from './components/PlDropdownLine';\nexport * from './components/PlDropdownMulti';\nexport * from './components/PlDropdownMultiRef';\nexport * from './components/PlDropdownRef';\nexport * from './components/PlEditableTitle';\nexport * from './components/PlElementList';\nexport * from './components/PlLoaderCircular';\nexport * from './components/PlLogView';\nexport * from './components/PlNumberField';\nexport * from './components/PlProgressBar';\nexport * from './components/PlProgressCell';\nexport * from './components/PlSearchField';\nexport * from './components/PlSectionSeparator';\nexport * from './components/PlSlideModal';\nexport * from './components/PlSplash';\nexport * from './components/PlStatusTag';\nexport * from './components/PlTabs';\nexport * from './components/PlTextArea';\nexport * from './components/PlTextField';\nexport * from './components/PlToggleSwitch';\nexport * from './components/PlTooltip';\n\nexport * from './components/PlFileDialog';\nexport * from './components/PlFileInput';\nexport * from './components/PlNotificationAlert';\n\nexport * from './components/PlSidebar';\n\nexport * from './components/PlIcon16';\nexport * from './components/PlIcon24';\nexport * from './components/PlMaskIcon16';\nexport * from './components/PlMaskIcon24';\nexport * from './components/PlSvg';\n\nexport * from './components/PlChartHistogram';\nexport * from './components/PlChartStackedBar';\n\nexport * from './components/PlRadio';\n\nexport * from './colors';\n\n/**\n * Usables\n */\nexport { useClickOutside } from './composition/useClickOutside';\nexport { useComponentProp } from './composition/useComponentProp';\nexport { useConfirm } from './composition/useConfirm';\nexport { useDraggable } from './composition/useDraggable';\nexport { useEventListener } from './composition/useEventListener';\nexport { useFormState } from './composition/useFormState';\nexport { useHover } from './composition/useHover';\nexport { useInterval } from './composition/useInterval';\nexport { useLocalStorage } from './composition/useLocalStorage';\nexport { useMouse } from './composition/useMouse';\nexport { useMouseCapture } from './composition/useMouseCapture';\nexport { useElementPosition as usePosition } from './composition/usePosition';\nexport { useQuery } from './composition/useQuery.ts';\nexport { useResizeObserver } from './composition/useResizeObserver';\nexport { useScroll } from './composition/useScroll';\nexport { useSortable } from './composition/useSortable';\nexport { useSortable2 } from './composition/useSortable2';\nexport { useTheme } from './composition/useTheme';\n\nexport * from './composition/computedCached';\nexport * from './composition/filters';\nexport * from './composition/useWatchFetch';\nexport * from './composition/watchCached';\n\n/**\n * Utils/Partials\n */\n\nexport * from './utils/DropdownOverlay';\nexport { default as PlCloseModalBtn } from './utils/PlCloseModalBtn.vue';\n\n/**\n * Technical\n * @TODO move it from here maybe\n */\nexport { useLabelNotch } from './utils/useLabelNotch.ts';\n\nexport type * from './types';\n\nexport { icons16, icons24 } from './types';\n\nexport * from './helpers/dom';\n\nexport * from './helpers/utils';\n\n/**\n * @TODO review\n */\nexport { ContextProvider, DataTable, DropdownListItem, Slider, ThemeSwitcher };\n\n// Helpers\nexport { showContextMenu };\n\n// move to new version pl-uikit\nexport { LongText, Scrollable, SliderRange, SliderRangeTriple };\n\n// @todo\nconst DemoData = { allCssVariables: allCssVariables() };\nexport { DemoData };\n"],"names":["DemoData","allCssVariables"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0JA,MAAMA,IAAW,EAAE,iBAAiBC,EAAA,EAAgB;"}
1
+ {"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["import './assets/ui.scss';\n\n// @TODO review\nimport * as DataTable from './components/DataTable';\nimport ThemeSwitcher from './components/ThemeSwitcher.vue';\n// @TODO review (may be private)\nimport DropdownListItem from './components/DropdownListItem.vue';\n\n// @TODO review\nimport ContextProvider from './components/ContextProvider.vue';\nimport Slider from './components/Slider.vue';\nimport { showContextMenu } from './components/contextMenu';\n// for new version\nimport LongText from './components/LongText.vue';\nimport Scrollable from './components/Scrollable.vue';\nimport SliderRange from './components/SliderRange.vue';\nimport SliderRangeTriple from './components/SliderRangeTriple.vue';\n\nimport { allCssVariables } from './demo-site-data/all-css-variables.ts';\n\n/**\n * Layout components\n */\n\nexport * from './layout/PlBlockPage';\nexport * from './layout/PlContainer';\nexport * from './layout/PlGrid';\nexport * from './layout/PlRow';\nexport * from './layout/PlSpacer';\n\n/**\n * Components\n */\nexport * from './components/PlErrorBoundary';\n// export * from './components/PlErrorAlert'; // @TODO discuss if we should export it\nexport * from './components/PlAccordion';\nexport * from './components/PlAlert';\nexport * from './components/PlAutocomplete';\nexport * from './components/PlAutocompleteMulti';\nexport * from './components/PlBtnAccent';\nexport * from './components/PlBtnDanger';\nexport * from './components/PlBtnGhost';\nexport * from './components/PlBtnGroup';\nexport * from './components/PlBtnLink';\nexport * from './components/PlBtnPrimary';\nexport * from './components/PlBtnSecondary';\nexport * from './components/PlBtnSplit';\nexport * from './components/PlCheckbox';\nexport * from './components/PlCheckboxGroup';\nexport * from './components/PlChip';\nexport * from './components/PlDialogModal';\nexport * from './components/PlDropdown';\nexport * from './components/PlDropdownLegacy';\nexport * from './components/PlDropdownLine';\nexport * from './components/PlDropdownMulti';\nexport * from './components/PlDropdownMultiRef';\nexport * from './components/PlDropdownRef';\nexport * from './components/PlEditableTitle';\nexport * from './components/PlElementList';\nexport * from './components/PlLoaderCircular';\nexport * from './components/PlLogView';\nexport * from './components/PlNumberField';\nexport * from './components/PlProgressBar';\nexport * from './components/PlProgressCell';\nexport * from './components/PlSearchField';\nexport * from './components/PlSectionSeparator';\nexport * from './components/PlSlideModal';\nexport * from './components/PlSplash';\nexport * from './components/PlStatusTag';\nexport * from './components/PlTabs';\nexport * from './components/PlTextArea';\nexport * from './components/PlTextField';\nexport * from './components/PlToggleSwitch';\nexport * from './components/PlTooltip';\n\nexport * from './components/PlFileDialog';\nexport * from './components/PlFileInput';\nexport * from './components/PlNotificationAlert';\n\nexport * from './components/PlSidebar';\n\nexport * from './components/PlIcon16';\nexport * from './components/PlIcon24';\nexport * from './components/PlMaskIcon16';\nexport * from './components/PlMaskIcon24';\nexport * from './components/PlSvg';\n\nexport * from './components/PlChartHistogram';\nexport * from './components/PlChartStackedBar';\n\nexport * from './components/PlRadio';\n\nexport * from './colors';\n\n/**\n * Usables\n */\nexport { useClickOutside } from './composition/useClickOutside';\nexport { useComponentProp } from './composition/useComponentProp';\nexport { useConfirm } from './composition/useConfirm';\nexport { useDraggable } from './composition/useDraggable';\nexport { useEventListener } from './composition/useEventListener';\nexport { useFormState } from './composition/useFormState';\nexport { useHover } from './composition/useHover';\nexport { useInterval } from './composition/useInterval';\nexport { usePollingQuery } from './composition/usePollingQuery';\nexport { useLocalStorage } from './composition/useLocalStorage';\nexport { useMouse } from './composition/useMouse';\nexport { useMouseCapture } from './composition/useMouseCapture';\nexport { useElementPosition as usePosition } from './composition/usePosition';\nexport { useQuery } from './composition/useQuery.ts';\nexport { useResizeObserver } from './composition/useResizeObserver';\nexport { useScroll } from './composition/useScroll';\nexport { useSortable } from './composition/useSortable';\nexport { useSortable2 } from './composition/useSortable2';\nexport { useTheme } from './composition/useTheme';\n\nexport * from './composition/computedCached';\nexport * from './composition/filters';\nexport * from './composition/useWatchFetch';\nexport * from './composition/watchCached';\n\n/**\n * Utils/Partials\n */\n\nexport * from './utils/DropdownOverlay';\nexport { default as PlCloseModalBtn } from './utils/PlCloseModalBtn.vue';\n\n/**\n * Technical\n * @TODO move it from here maybe\n */\nexport { useLabelNotch } from './utils/useLabelNotch.ts';\n\nexport type * from './types';\n\nexport { icons16, icons24 } from './types';\n\nexport * from './helpers/dom';\n\nexport * from './helpers/utils';\n\n/**\n * @TODO review\n */\nexport { ContextProvider, DataTable, DropdownListItem, Slider, ThemeSwitcher };\n\n// Helpers\nexport { showContextMenu };\n\n// move to new version pl-uikit\nexport { LongText, Scrollable, SliderRange, SliderRangeTriple };\n\n// @todo\nconst DemoData = { allCssVariables: allCssVariables() };\nexport { DemoData };\n"],"names":["DemoData","allCssVariables"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2JA,MAAMA,IAAW,EAAE,iBAAiBC,EAAA,EAAgB;"}