voodoojs 0.11.2 → 0.12.2
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 +1 -1
- package/dist/{chunk-IGZSDZKU.js → chunk-7AKBELZA.js} +4 -4
- package/dist/{chunk-V3O3WOZH.js → chunk-AVXQPDQH.js} +4 -4
- package/dist/{chunk-AH2VXDZD.js → chunk-K2U3O36M.js} +193 -20
- package/dist/{chunk-IS3DR2KY.js → chunk-MEE2ZAKJ.js} +3 -3
- package/dist/{chunk-DJJB35SR.js → chunk-NVANUFWZ.js} +6 -6
- package/dist/{chunk-H2ZUEQWV.js → chunk-OWCQV42D.js} +112 -20
- package/dist/{chunk-KQYSJHZR.js → chunk-RTZEIVNA.js} +5 -5
- package/dist/{chunk-NFDXVIII.js → chunk-RXOLGHSU.js} +3 -3
- package/dist/{chunk-WJP3YGUI.js → chunk-S4BXAGAW.js} +4 -4
- package/dist/{chunk-DCE5WIGA.js → chunk-UGLD36KV.js} +5 -5
- package/dist/{chunk-UV5PMS7P.js → chunk-YV4I45SK.js} +4 -4
- package/dist/essential.cjs +297 -28
- package/dist/essential.d.cts +1 -1
- package/dist/essential.d.ts +1 -1
- package/dist/essential.js +10 -10
- package/dist/gpu.cjs +1 -1
- package/dist/gpu.js +10 -10
- package/dist/http.cjs +1 -1
- package/dist/http.js +5 -5
- package/dist/index.cjs +325 -34
- package/dist/index.d.cts +88 -4
- package/dist/index.d.ts +88 -4
- package/dist/index.js +38 -24
- package/dist/{query-DiQAS73Q.d.cts → query-D_BGQw8m.d.cts} +12 -1
- package/dist/{query-Cf-7iibE.d.ts → query-Dl6Urlwd.d.ts} +12 -1
- package/dist/reactivity.cjs +1 -1
- package/dist/reactivity.js +2 -2
- package/dist/socket.cjs +29 -2
- package/dist/socket.js +9 -9
- package/dist/style-GWGXWHB4.js +5 -0
- package/dist/utils.cjs +1 -1
- package/dist/utils.js +2 -2
- package/dist/voodoo.core.js +277 -27
- package/dist/voodoo.core.min.js +17 -17
- package/dist/voodoo.full.js +325 -36
- package/dist/voodoo.full.min.js +59 -55
- package/dist/voodoo.js +305 -30
- package/dist/voodoo.min.js +29 -25
- package/package.json +1 -1
- package/dist/style-4X62SABN.js +0 -5
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { S as Scope, c as core, V as VoodooCollection } from './query-
|
|
2
|
-
export { A as App, a as AppOptions, C as ComponentDefinition, D as DirectiveBinding, b as DirectiveHooks, P as PRIORITY, R as Resource, d as ResourceOptions, e as VoodooConfig, f as VoodooPlugin, g as VoodooRuntimeError, h as VoodooSyntaxError, i as addCleanup, j as allStores, k as allowedGlobals, l as cache, m as clearParseCache, n as config, o as cookie, p as createApp, q as createResource, r as defineComponent, s as defineDirective, t as destroy, u as documentReady, v as ensureTokens, w as enter, x as evaluate, y as fadeIn, z as fadeOut, B as findScope, E as fromHtml, F as getScope, G as
|
|
1
|
+
import { S as Scope, c as core, V as VoodooCollection } from './query-D_BGQw8m.cjs';
|
|
2
|
+
export { A as App, a as AppOptions, C as ComponentDefinition, D as DirectiveBinding, b as DirectiveHooks, P as PRIORITY, R as Resource, d as ResourceOptions, e as VoodooConfig, f as VoodooPlugin, g as VoodooRuntimeError, h as VoodooSyntaxError, i as addCleanup, j as allStores, k as allowedGlobals, l as cache, m as clearParseCache, n as config, o as cookie, p as createApp, q as createResource, r as defineComponent, s as defineDirective, t as destroy, u as documentReady, v as ensureTokens, w as enter, x as evaluate, y as fadeIn, z as fadeOut, B as findScope, E as fromHtml, F as getScope, G as hook, H as hooks, I as injectStyle, J as instances, K as leave, L as magic, M as magics, N as mountComponent, O as parse, Q as query, T as ready, U as refresh, W as removeStore, q as resource, X as rootScope, Y as session, Z as slideDown, _ as slideUp, $ as start, a0 as storage, a1 as store, a2 as storeNames, a3 as stringify, a4 as theme, a5 as toast, a6 as tokenize, a7 as url, a8 as viewTransition, a9 as walk, aa as whenElement, ab as whenReady } from './query-D_BGQw8m.cjs';
|
|
3
|
+
import { Ref } from './reactivity.cjs';
|
|
3
4
|
export { EffectScope, computed, effect, effectScope, flushSync, isReactive, markRaw, nextTick, reactive, ref, shallowRef, stop, toRaw, unref, watch, watchEffect } from './reactivity.cjs';
|
|
4
5
|
export { HttpError, HttpMethod, HttpResponse, RequestConfig, http, request } from './http.cjs';
|
|
5
6
|
export { R as RoomOptions, a as RoomState, S as SocketMessage, b as SocketOptions, c as SocketRoom, d as SocketState, e as SocketTransport, V as VoodooSocket, f as createSocket, s as socket, g as socketSupported } from './index-DTllqUtj.cjs';
|
|
@@ -171,7 +172,16 @@ declare const sound: {
|
|
|
171
172
|
unmute(): void;
|
|
172
173
|
/** Toggles between muted and unmuted, and returns the new state. */
|
|
173
174
|
toggle(): boolean;
|
|
174
|
-
/**
|
|
175
|
+
/**
|
|
176
|
+
* `true` when muted.
|
|
177
|
+
*
|
|
178
|
+
* Reads a revision ref first, so that an expression asking whether sound is
|
|
179
|
+
* muted actually re-runs when it changes. The state lives in a module
|
|
180
|
+
* variable and in localStorage, both invisible to the Proxy, so
|
|
181
|
+
* `v-show="$sound.muted"` used to render once and then never move: a page had
|
|
182
|
+
* no way to show whether it was muted, which made the mute button look like
|
|
183
|
+
* it did nothing at all.
|
|
184
|
+
*/
|
|
175
185
|
readonly muted: boolean;
|
|
176
186
|
/** Names of all available effects. */
|
|
177
187
|
readonly names: string[];
|
|
@@ -481,6 +491,80 @@ declare const charts: {
|
|
|
481
491
|
colors: string[];
|
|
482
492
|
};
|
|
483
493
|
|
|
494
|
+
/**
|
|
495
|
+
* @module hooks
|
|
496
|
+
*
|
|
497
|
+
* React-style hooks, reachable by bare name inside any expression.
|
|
498
|
+
*
|
|
499
|
+
* These are a thin surface over primitives the library already had — `effect`,
|
|
500
|
+
* `computed`, `ref` and `store`. The value is not new machinery, it is that
|
|
501
|
+
* someone arriving from React can write what they already know and have it mean
|
|
502
|
+
* the right thing here.
|
|
503
|
+
*
|
|
504
|
+
* Two differences from React are deliberate, and both are improvements rather
|
|
505
|
+
* than gaps:
|
|
506
|
+
*
|
|
507
|
+
* 1. `deps` is optional everywhere. Voodoo tracks reads through a Proxy, so a
|
|
508
|
+
* hook with no dependency array re-runs exactly when something it actually
|
|
509
|
+
* read changes. The array is there for when you want to narrow that, not
|
|
510
|
+
* because the library cannot work it out.
|
|
511
|
+
*
|
|
512
|
+
* 2. There is no rule against calling a hook in a branch. Slots are keyed per
|
|
513
|
+
* scope in call order within one evaluation, and `v-data` and `v-init` each
|
|
514
|
+
* evaluate once per scope, so the order is stable without a rule asking you
|
|
515
|
+
* to keep it stable.
|
|
516
|
+
*
|
|
517
|
+
* `useState` and `useMemo` return refs, and `reactive()` unwraps refs on read,
|
|
518
|
+
* so inside `v-data` they read as plain values with no `.value` anywhere.
|
|
519
|
+
* `useRef` deliberately does not: it returns a raw `{ current }` box that no
|
|
520
|
+
* effect subscribes to, which is the whole point of it.
|
|
521
|
+
*/
|
|
522
|
+
|
|
523
|
+
/**
|
|
524
|
+
* A value that survives re-evaluation and re-renders whatever reads it.
|
|
525
|
+
*
|
|
526
|
+
* Returns a ref. Written into `v-data` it reads and assigns as a plain value,
|
|
527
|
+
* because reactive objects unwrap refs, so `count++` works with no `.value`.
|
|
528
|
+
*/
|
|
529
|
+
declare function useState<T>(scope: Scope, initial: T): Ref<T>;
|
|
530
|
+
/**
|
|
531
|
+
* Runs a side effect, and re-runs it when what it depends on changes.
|
|
532
|
+
*
|
|
533
|
+
* With no dependency array it tracks its own reads and re-runs when any of them
|
|
534
|
+
* change. With `[]` it runs once. With `[a, b]` it re-runs only when one of
|
|
535
|
+
* those differs from last time. Returning a function from `fn` registers
|
|
536
|
+
* cleanup, called before the next run and again when the element is removed.
|
|
537
|
+
*/
|
|
538
|
+
declare function useEffect(scope: Scope, fn: () => void | (() => void), deps?: unknown): void;
|
|
539
|
+
/**
|
|
540
|
+
* Caches a computation.
|
|
541
|
+
*
|
|
542
|
+
* With no dependency array it becomes a `computed`: lazy, cached, and
|
|
543
|
+
* recomputed only when something it read actually changed. With an array it
|
|
544
|
+
* recomputes when that array changes. Returns a ref, so inside `v-data` it
|
|
545
|
+
* reads as the value itself.
|
|
546
|
+
*/
|
|
547
|
+
declare function useMemo<T>(scope: Scope, fn: () => T, deps?: unknown): Ref<T>;
|
|
548
|
+
/**
|
|
549
|
+
* A box that survives re-evaluation and that nothing subscribes to.
|
|
550
|
+
*
|
|
551
|
+
* Use it for a DOM element, a timer id, or a previous value — anything you want
|
|
552
|
+
* to keep without the page reacting when it changes. Deliberately not a ref, so
|
|
553
|
+
* reading `.current` inside an effect does not make that effect depend on it.
|
|
554
|
+
*/
|
|
555
|
+
declare function useRef<T>(scope: Scope, initial: T): {
|
|
556
|
+
current: T;
|
|
557
|
+
};
|
|
558
|
+
/**
|
|
559
|
+
* Shared state, reachable from any component without threading it through the
|
|
560
|
+
* markup by hand.
|
|
561
|
+
*
|
|
562
|
+
* Backed by the store registry, so `useContext('user')` and `$store.user` are
|
|
563
|
+
* the same object. Passing a second argument creates the store on first use.
|
|
564
|
+
*/
|
|
565
|
+
declare function useContext<T extends Record<string, any>>(name: string, initial?: T): T;
|
|
566
|
+
declare function installHooks(): void;
|
|
567
|
+
|
|
484
568
|
/**
|
|
485
569
|
* @module runtime/magics
|
|
486
570
|
*
|
|
@@ -1714,4 +1798,4 @@ interface Voodoo extends Omit<typeof core, never> {
|
|
|
1714
1798
|
}
|
|
1715
1799
|
declare const V: Voodoo;
|
|
1716
1800
|
|
|
1717
|
-
export { Scope, V, type Voodoo, VoodooCollection, activateJsx, alert, animate, applyMask, applyRegions, charts, clearErrors, clipboard, confirm, V as default, devtoolsBus, devtoolsWidget, dialog, disableXray, easings, enableXray, extractJsx, getLocale, hotkey, i18n, inView, isDevtoolsWidgetMounted, isXrayEnabled, jsx, mask, masks, modal, motionPresets, mountDevtoolsWidget, navigate, network, palette, prompt, readDeclarationBlock, registerMask, renderChart, route, router, screen, scrollProgress, serializeForm, setLocale, showFormErrors, sound, efeitos as soundEffects, spring, stagger, t, unmask, unmountDevtoolsWidget, validate, validator, xray };
|
|
1801
|
+
export { Scope, V, type Voodoo, VoodooCollection, activateJsx, alert, animate, applyMask, applyRegions, charts, clearErrors, clipboard, confirm, V as default, devtoolsBus, devtoolsWidget, dialog, disableXray, easings, enableXray, extractJsx, getLocale, hotkey, i18n, inView, installHooks, isDevtoolsWidgetMounted, isXrayEnabled, jsx, mask, masks, modal, motionPresets, mountDevtoolsWidget, navigate, network, palette, prompt, readDeclarationBlock, registerMask, renderChart, route, router, screen, scrollProgress, serializeForm, setLocale, showFormErrors, sound, efeitos as soundEffects, spring, stagger, t, unmask, unmountDevtoolsWidget, useContext, useEffect, useMemo, useRef, useState, validate, validator, xray };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { S as Scope, c as core, V as VoodooCollection } from './query-
|
|
2
|
-
export { A as App, a as AppOptions, C as ComponentDefinition, D as DirectiveBinding, b as DirectiveHooks, P as PRIORITY, R as Resource, d as ResourceOptions, e as VoodooConfig, f as VoodooPlugin, g as VoodooRuntimeError, h as VoodooSyntaxError, i as addCleanup, j as allStores, k as allowedGlobals, l as cache, m as clearParseCache, n as config, o as cookie, p as createApp, q as createResource, r as defineComponent, s as defineDirective, t as destroy, u as documentReady, v as ensureTokens, w as enter, x as evaluate, y as fadeIn, z as fadeOut, B as findScope, E as fromHtml, F as getScope, G as
|
|
1
|
+
import { S as Scope, c as core, V as VoodooCollection } from './query-Dl6Urlwd.js';
|
|
2
|
+
export { A as App, a as AppOptions, C as ComponentDefinition, D as DirectiveBinding, b as DirectiveHooks, P as PRIORITY, R as Resource, d as ResourceOptions, e as VoodooConfig, f as VoodooPlugin, g as VoodooRuntimeError, h as VoodooSyntaxError, i as addCleanup, j as allStores, k as allowedGlobals, l as cache, m as clearParseCache, n as config, o as cookie, p as createApp, q as createResource, r as defineComponent, s as defineDirective, t as destroy, u as documentReady, v as ensureTokens, w as enter, x as evaluate, y as fadeIn, z as fadeOut, B as findScope, E as fromHtml, F as getScope, G as hook, H as hooks, I as injectStyle, J as instances, K as leave, L as magic, M as magics, N as mountComponent, O as parse, Q as query, T as ready, U as refresh, W as removeStore, q as resource, X as rootScope, Y as session, Z as slideDown, _ as slideUp, $ as start, a0 as storage, a1 as store, a2 as storeNames, a3 as stringify, a4 as theme, a5 as toast, a6 as tokenize, a7 as url, a8 as viewTransition, a9 as walk, aa as whenElement, ab as whenReady } from './query-Dl6Urlwd.js';
|
|
3
|
+
import { Ref } from './reactivity.js';
|
|
3
4
|
export { EffectScope, computed, effect, effectScope, flushSync, isReactive, markRaw, nextTick, reactive, ref, shallowRef, stop, toRaw, unref, watch, watchEffect } from './reactivity.js';
|
|
4
5
|
export { HttpError, HttpMethod, HttpResponse, RequestConfig, http, request } from './http.js';
|
|
5
6
|
export { R as RoomOptions, a as RoomState, S as SocketMessage, b as SocketOptions, c as SocketRoom, d as SocketState, e as SocketTransport, V as VoodooSocket, f as createSocket, s as socket, g as socketSupported } from './index-DTllqUtj.js';
|
|
@@ -171,7 +172,16 @@ declare const sound: {
|
|
|
171
172
|
unmute(): void;
|
|
172
173
|
/** Toggles between muted and unmuted, and returns the new state. */
|
|
173
174
|
toggle(): boolean;
|
|
174
|
-
/**
|
|
175
|
+
/**
|
|
176
|
+
* `true` when muted.
|
|
177
|
+
*
|
|
178
|
+
* Reads a revision ref first, so that an expression asking whether sound is
|
|
179
|
+
* muted actually re-runs when it changes. The state lives in a module
|
|
180
|
+
* variable and in localStorage, both invisible to the Proxy, so
|
|
181
|
+
* `v-show="$sound.muted"` used to render once and then never move: a page had
|
|
182
|
+
* no way to show whether it was muted, which made the mute button look like
|
|
183
|
+
* it did nothing at all.
|
|
184
|
+
*/
|
|
175
185
|
readonly muted: boolean;
|
|
176
186
|
/** Names of all available effects. */
|
|
177
187
|
readonly names: string[];
|
|
@@ -481,6 +491,80 @@ declare const charts: {
|
|
|
481
491
|
colors: string[];
|
|
482
492
|
};
|
|
483
493
|
|
|
494
|
+
/**
|
|
495
|
+
* @module hooks
|
|
496
|
+
*
|
|
497
|
+
* React-style hooks, reachable by bare name inside any expression.
|
|
498
|
+
*
|
|
499
|
+
* These are a thin surface over primitives the library already had — `effect`,
|
|
500
|
+
* `computed`, `ref` and `store`. The value is not new machinery, it is that
|
|
501
|
+
* someone arriving from React can write what they already know and have it mean
|
|
502
|
+
* the right thing here.
|
|
503
|
+
*
|
|
504
|
+
* Two differences from React are deliberate, and both are improvements rather
|
|
505
|
+
* than gaps:
|
|
506
|
+
*
|
|
507
|
+
* 1. `deps` is optional everywhere. Voodoo tracks reads through a Proxy, so a
|
|
508
|
+
* hook with no dependency array re-runs exactly when something it actually
|
|
509
|
+
* read changes. The array is there for when you want to narrow that, not
|
|
510
|
+
* because the library cannot work it out.
|
|
511
|
+
*
|
|
512
|
+
* 2. There is no rule against calling a hook in a branch. Slots are keyed per
|
|
513
|
+
* scope in call order within one evaluation, and `v-data` and `v-init` each
|
|
514
|
+
* evaluate once per scope, so the order is stable without a rule asking you
|
|
515
|
+
* to keep it stable.
|
|
516
|
+
*
|
|
517
|
+
* `useState` and `useMemo` return refs, and `reactive()` unwraps refs on read,
|
|
518
|
+
* so inside `v-data` they read as plain values with no `.value` anywhere.
|
|
519
|
+
* `useRef` deliberately does not: it returns a raw `{ current }` box that no
|
|
520
|
+
* effect subscribes to, which is the whole point of it.
|
|
521
|
+
*/
|
|
522
|
+
|
|
523
|
+
/**
|
|
524
|
+
* A value that survives re-evaluation and re-renders whatever reads it.
|
|
525
|
+
*
|
|
526
|
+
* Returns a ref. Written into `v-data` it reads and assigns as a plain value,
|
|
527
|
+
* because reactive objects unwrap refs, so `count++` works with no `.value`.
|
|
528
|
+
*/
|
|
529
|
+
declare function useState<T>(scope: Scope, initial: T): Ref<T>;
|
|
530
|
+
/**
|
|
531
|
+
* Runs a side effect, and re-runs it when what it depends on changes.
|
|
532
|
+
*
|
|
533
|
+
* With no dependency array it tracks its own reads and re-runs when any of them
|
|
534
|
+
* change. With `[]` it runs once. With `[a, b]` it re-runs only when one of
|
|
535
|
+
* those differs from last time. Returning a function from `fn` registers
|
|
536
|
+
* cleanup, called before the next run and again when the element is removed.
|
|
537
|
+
*/
|
|
538
|
+
declare function useEffect(scope: Scope, fn: () => void | (() => void), deps?: unknown): void;
|
|
539
|
+
/**
|
|
540
|
+
* Caches a computation.
|
|
541
|
+
*
|
|
542
|
+
* With no dependency array it becomes a `computed`: lazy, cached, and
|
|
543
|
+
* recomputed only when something it read actually changed. With an array it
|
|
544
|
+
* recomputes when that array changes. Returns a ref, so inside `v-data` it
|
|
545
|
+
* reads as the value itself.
|
|
546
|
+
*/
|
|
547
|
+
declare function useMemo<T>(scope: Scope, fn: () => T, deps?: unknown): Ref<T>;
|
|
548
|
+
/**
|
|
549
|
+
* A box that survives re-evaluation and that nothing subscribes to.
|
|
550
|
+
*
|
|
551
|
+
* Use it for a DOM element, a timer id, or a previous value — anything you want
|
|
552
|
+
* to keep without the page reacting when it changes. Deliberately not a ref, so
|
|
553
|
+
* reading `.current` inside an effect does not make that effect depend on it.
|
|
554
|
+
*/
|
|
555
|
+
declare function useRef<T>(scope: Scope, initial: T): {
|
|
556
|
+
current: T;
|
|
557
|
+
};
|
|
558
|
+
/**
|
|
559
|
+
* Shared state, reachable from any component without threading it through the
|
|
560
|
+
* markup by hand.
|
|
561
|
+
*
|
|
562
|
+
* Backed by the store registry, so `useContext('user')` and `$store.user` are
|
|
563
|
+
* the same object. Passing a second argument creates the store on first use.
|
|
564
|
+
*/
|
|
565
|
+
declare function useContext<T extends Record<string, any>>(name: string, initial?: T): T;
|
|
566
|
+
declare function installHooks(): void;
|
|
567
|
+
|
|
484
568
|
/**
|
|
485
569
|
* @module runtime/magics
|
|
486
570
|
*
|
|
@@ -1714,4 +1798,4 @@ interface Voodoo extends Omit<typeof core, never> {
|
|
|
1714
1798
|
}
|
|
1715
1799
|
declare const V: Voodoo;
|
|
1716
1800
|
|
|
1717
|
-
export { Scope, V, type Voodoo, VoodooCollection, activateJsx, alert, animate, applyMask, applyRegions, charts, clearErrors, clipboard, confirm, V as default, devtoolsBus, devtoolsWidget, dialog, disableXray, easings, enableXray, extractJsx, getLocale, hotkey, i18n, inView, isDevtoolsWidgetMounted, isXrayEnabled, jsx, mask, masks, modal, motionPresets, mountDevtoolsWidget, navigate, network, palette, prompt, readDeclarationBlock, registerMask, renderChart, route, router, screen, scrollProgress, serializeForm, setLocale, showFormErrors, sound, efeitos as soundEffects, spring, stagger, t, unmask, unmountDevtoolsWidget, validate, validator, xray };
|
|
1801
|
+
export { Scope, V, type Voodoo, VoodooCollection, activateJsx, alert, animate, applyMask, applyRegions, charts, clearErrors, clipboard, confirm, V as default, devtoolsBus, devtoolsWidget, dialog, disableXray, easings, enableXray, extractJsx, getLocale, hotkey, i18n, inView, installHooks, isDevtoolsWidgetMounted, isXrayEnabled, jsx, mask, masks, modal, motionPresets, mountDevtoolsWidget, navigate, network, palette, prompt, readDeclarationBlock, registerMask, renderChart, route, router, screen, scrollProgress, serializeForm, setLocale, showFormErrors, sound, efeitos as soundEffects, spring, stagger, t, unmask, unmountDevtoolsWidget, useContext, useEffect, useMemo, useRef, useState, validate, validator, xray };
|
package/dist/index.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { core, sound, hotkey, palette, registerMask, unmask, applyMask, masks, mask, clearErrors, showFieldError, showFormErrors, messages, serializeForm, validate, validator, dialog, prompt, confirm, alert, modal, VoodooCollection, fromHtml, ready2, query, viewTransition, defineComponent, storage, ensurePalette, instances, storeNames, allStores } from './chunk-
|
|
2
|
-
export { VoodooCollection, alert, allStores, applyMask, cache, clearErrors, clipboard, confirm, cookie, createApp, createResource, defineComponent, dialog, ready as documentReady, enter, fadeIn, fadeOut, fromHtml, hotkey, instances, leave, mask, masks, modal, mountComponent, network, palette, prompt, query, ready2 as ready, registerMask, removeStore, createResource as resource, screen, serializeForm, session, showFormErrors, slideDown, slideUp, sound, efeitos as soundEffects, storage, store, storeNames, theme, toast, unmask, url, validate, validator, viewTransition, whenElement, whenReady } from './chunk-
|
|
3
|
-
export { gpu, reflectWgsl } from './chunk-
|
|
4
|
-
import { http } from './chunk-
|
|
5
|
-
export { HttpError, http, request } from './chunk-
|
|
6
|
-
import { devtoolsBus } from './chunk-
|
|
7
|
-
export { createSocket, devtoolsBus, socket, socketSupported } from './chunk-
|
|
8
|
-
import { magic, markSkipChildren, onStart, rootScope, findScope, destroy, readAttr, evaluate, parse, Scope, getScope, walk, unwrap, addCleanup, hadDirectives, collectDirectives, getEffectScopes, evaluateIn } from './chunk-
|
|
9
|
-
export { Scope, VoodooRuntimeError, VoodooSyntaxError, addCleanup, allowedGlobals, clearParseCache, destroy, evaluate, findScope, getScope, magic, magics, parse, refresh, rootScope, start, stringify, tokenize, walk } from './chunk-
|
|
10
|
-
import { reactive, warn, handleError, effect, queuePostFlush, nextTick } from './chunk-
|
|
11
|
-
export { EffectScope, computed, effect, effectScope, flushSync, isReactive, markRaw, nextTick, reactive, ref, shallowRef, stop, toRaw, unref, watch, watchEffect } from './chunk-
|
|
12
|
-
import { warnAlias } from './chunk-
|
|
13
|
-
import { parseDuration, formatNumber, formatCurrency, formatDate, relativeTime, device, setFormatDefaults, uid, merge, escapeHtml, truncate, get, titleCase } from './chunk-
|
|
14
|
-
export { capitalize, chunk, clone, debounce, device, escapeHtml, formatCurrency, formatDate, formatFileSize, formatNumber, formatPercent, get, groupBy, isBrowser, matchesMedia, memoize, merge, once, parseDuration, random, relativeTime, sample, set, setFormatDefaults, sleep, slugify, sortBy, stripTags, throttle, titleCase, truncate, uid, unique, uuid } from './chunk-
|
|
15
|
-
import { ensureTokens, injectStyle } from './chunk-
|
|
16
|
-
export { ensureTokens, injectStyle } from './chunk-
|
|
17
|
-
import { defineDirective, PRIORITY, config } from './chunk-
|
|
18
|
-
export { PRIORITY, config, defineDirective } from './chunk-
|
|
19
|
-
import './chunk-
|
|
1
|
+
import { core, sound, hotkey, palette, registerMask, unmask, applyMask, masks, mask, clearErrors, showFieldError, showFormErrors, messages, serializeForm, validate, validator, dialog, prompt, confirm, alert, modal, VoodooCollection, fromHtml, ready2, query, viewTransition, defineComponent, storage, ensurePalette, instances, storeNames, allStores } from './chunk-K2U3O36M.js';
|
|
2
|
+
export { VoodooCollection, alert, allStores, applyMask, cache, clearErrors, clipboard, confirm, cookie, createApp, createResource, defineComponent, dialog, ready as documentReady, enter, fadeIn, fadeOut, fromHtml, hotkey, installHooks, instances, leave, mask, masks, modal, mountComponent, network, palette, prompt, query, ready2 as ready, registerMask, removeStore, createResource as resource, screen, serializeForm, session, showFormErrors, slideDown, slideUp, sound, efeitos as soundEffects, storage, store, storeNames, theme, toast, unmask, url, useContext, useEffect, useMemo, useRef, useState, validate, validator, viewTransition, whenElement, whenReady } from './chunk-K2U3O36M.js';
|
|
3
|
+
export { gpu, reflectWgsl } from './chunk-RTZEIVNA.js';
|
|
4
|
+
import { http } from './chunk-NVANUFWZ.js';
|
|
5
|
+
export { HttpError, http, request } from './chunk-NVANUFWZ.js';
|
|
6
|
+
import { devtoolsBus } from './chunk-UGLD36KV.js';
|
|
7
|
+
export { createSocket, devtoolsBus, socket, socketSupported } from './chunk-UGLD36KV.js';
|
|
8
|
+
import { magic, markSkipChildren, onStart, rootScope, findScope, destroy, readAttr, evaluate, parse, Scope, getScope, walk, unwrap, addCleanup, hadDirectives, collectDirectives, getEffectScopes, evaluateIn } from './chunk-OWCQV42D.js';
|
|
9
|
+
export { Scope, VoodooRuntimeError, VoodooSyntaxError, addCleanup, allowedGlobals, clearParseCache, destroy, evaluate, findScope, getScope, hook, hooks, magic, magics, parse, refresh, rootScope, start, stringify, tokenize, walk } from './chunk-OWCQV42D.js';
|
|
10
|
+
import { reactive, warn, handleError, effect, queuePostFlush, nextTick } from './chunk-S4BXAGAW.js';
|
|
11
|
+
export { EffectScope, computed, effect, effectScope, flushSync, isReactive, markRaw, nextTick, reactive, ref, shallowRef, stop, toRaw, unref, watch, watchEffect } from './chunk-S4BXAGAW.js';
|
|
12
|
+
import { warnAlias } from './chunk-YV4I45SK.js';
|
|
13
|
+
import { parseDuration, formatNumber, formatCurrency, formatDate, relativeTime, device, setFormatDefaults, uid, merge, escapeHtml, truncate, get, titleCase } from './chunk-7AKBELZA.js';
|
|
14
|
+
export { capitalize, chunk, clone, debounce, device, escapeHtml, formatCurrency, formatDate, formatFileSize, formatNumber, formatPercent, get, groupBy, isBrowser, matchesMedia, memoize, merge, once, parseDuration, random, relativeTime, sample, set, setFormatDefaults, sleep, slugify, sortBy, stripTags, throttle, titleCase, truncate, uid, unique, uuid } from './chunk-7AKBELZA.js';
|
|
15
|
+
import { ensureTokens, injectStyle } from './chunk-AVXQPDQH.js';
|
|
16
|
+
export { ensureTokens, injectStyle } from './chunk-AVXQPDQH.js';
|
|
17
|
+
import { defineDirective, PRIORITY, config } from './chunk-RXOLGHSU.js';
|
|
18
|
+
export { PRIORITY, config, defineDirective } from './chunk-RXOLGHSU.js';
|
|
19
|
+
import './chunk-MEE2ZAKJ.js';
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
|
-
* Voodoo.js v0.
|
|
22
|
+
* Voodoo.js v0.12.2
|
|
23
23
|
* JavaScript feels like magic.
|
|
24
24
|
* (c) 2026 Voodoo.js contributors. MIT License.
|
|
25
25
|
*/
|
|
@@ -4704,8 +4704,22 @@ register("v-table", {
|
|
|
4704
4704
|
}
|
|
4705
4705
|
},
|
|
4706
4706
|
methods: {
|
|
4707
|
-
|
|
4708
|
-
|
|
4707
|
+
/**
|
|
4708
|
+
* A row may be an object keyed by column, or a positional array.
|
|
4709
|
+
*
|
|
4710
|
+
* Only the object form was ever read. The documentation's own example on
|
|
4711
|
+
* the components page passes `[['Ada', 'Engineer']]` against columns
|
|
4712
|
+
* `['Name', 'Role']`, and looking `'Name'` up on an array finds nothing, so
|
|
4713
|
+
* every cell rendered empty while the header row and the row count both
|
|
4714
|
+
* looked perfectly right — which is a hard failure to even notice, let
|
|
4715
|
+
* alone diagnose.
|
|
4716
|
+
*
|
|
4717
|
+
* The index comes from the template rather than `cols.indexOf(column)`,
|
|
4718
|
+
* because `cols` is a computed and identity is not guaranteed to survive a
|
|
4719
|
+
* recomputation.
|
|
4720
|
+
*/
|
|
4721
|
+
cell(row, column, index) {
|
|
4722
|
+
const value = Array.isArray(row) && typeof index === "number" ? row[index] : get(row, column.key);
|
|
4709
4723
|
if (value === null || value === void 0) return "";
|
|
4710
4724
|
return String(value);
|
|
4711
4725
|
},
|
|
@@ -4753,8 +4767,8 @@ register("v-table", {
|
|
|
4753
4767
|
</thead>
|
|
4754
4768
|
<tbody>
|
|
4755
4769
|
<tr v-for="(row, index) in sorted" :key="index">
|
|
4756
|
-
<td v-for="column in cols" :key="column.key" :style="alignStyle(column)"
|
|
4757
|
-
v-text="cell(row, column)"></td>
|
|
4770
|
+
<td v-for="(column, ci) in cols" :key="column.key" :style="alignStyle(column)"
|
|
4771
|
+
v-text="cell(row, column, ci)"></td>
|
|
4758
4772
|
</tr>
|
|
4759
4773
|
<tr v-if="!sorted.length">
|
|
4760
4774
|
<td class="v-table-empty" :colspan="cols.length || 1" v-text="empty"></td>
|
|
@@ -241,6 +241,17 @@ type MagicGetter = (scope: Scope) => unknown;
|
|
|
241
241
|
declare const magics: Map<string, MagicGetter>;
|
|
242
242
|
/** Register a magic variable available in any expression. */
|
|
243
243
|
declare function magic(name: string, getter: MagicGetter): void;
|
|
244
|
+
/**
|
|
245
|
+
* Registry of helpers reached by a bare name, with no `$` in front.
|
|
246
|
+
*
|
|
247
|
+
* Kept apart from `magics` because that one prefixes `$` onto anything missing
|
|
248
|
+
* it, which is the right default for `$store` and the wrong one for `useEffect`.
|
|
249
|
+
* Data in scope still wins: `lookup` walks the scope chain first, so a variable
|
|
250
|
+
* of your own named `useMemo` shadows the hook rather than colliding with it.
|
|
251
|
+
*/
|
|
252
|
+
declare const hooks: Map<string, MagicGetter>;
|
|
253
|
+
/** Register a helper callable by bare name inside any expression. */
|
|
254
|
+
declare function hook(name: string, getter: MagicGetter): void;
|
|
244
255
|
/**
|
|
245
256
|
* Fields are `declare`d and assigned in the constructor, not initialised at the
|
|
246
257
|
* declaration.
|
|
@@ -1643,4 +1654,4 @@ declare function ready(fn?: ReadyCallback): Promise<void>;
|
|
|
1643
1654
|
/** Creates elements from an HTML string without inserting them in the document. */
|
|
1644
1655
|
declare function fromHtml(html: string): VoodooCollection;
|
|
1645
1656
|
|
|
1646
|
-
export {
|
|
1657
|
+
export { start as $, type App as A, findScope as B, type ComponentDefinition as C, type DirectiveBinding as D, fromHtml as E, getScope as F, hook as G, hooks as H, injectStyle as I, instances as J, leave as K, magic as L, magics as M, mountComponent as N, parse as O, PRIORITY as P, query as Q, type Resource as R, Scope as S, ready as T, refresh as U, VoodooCollection as V, removeStore as W, rootScope as X, session as Y, slideDown as Z, slideUp as _, type AppOptions as a, storage as a0, store as a1, storeNames as a2, stringify as a3, theme as a4, toast as a5, tokenize as a6, url as a7, viewTransition as a8, walk as a9, whenElement as aa, whenReady as ab, type DirectiveHooks as b, core as c, type ResourceOptions as d, type VoodooConfig as e, type VoodooPlugin as f, VoodooRuntimeError as g, VoodooSyntaxError as h, addCleanup as i, allStores as j, allowedGlobals as k, cache as l, clearParseCache as m, config as n, cookie as o, createApp as p, createResource as q, defineComponent as r, defineDirective as s, destroy as t, ready$1 as u, ensureTokens as v, enter as w, evaluate as x, fadeIn as y, fadeOut as z };
|
|
@@ -241,6 +241,17 @@ type MagicGetter = (scope: Scope) => unknown;
|
|
|
241
241
|
declare const magics: Map<string, MagicGetter>;
|
|
242
242
|
/** Register a magic variable available in any expression. */
|
|
243
243
|
declare function magic(name: string, getter: MagicGetter): void;
|
|
244
|
+
/**
|
|
245
|
+
* Registry of helpers reached by a bare name, with no `$` in front.
|
|
246
|
+
*
|
|
247
|
+
* Kept apart from `magics` because that one prefixes `$` onto anything missing
|
|
248
|
+
* it, which is the right default for `$store` and the wrong one for `useEffect`.
|
|
249
|
+
* Data in scope still wins: `lookup` walks the scope chain first, so a variable
|
|
250
|
+
* of your own named `useMemo` shadows the hook rather than colliding with it.
|
|
251
|
+
*/
|
|
252
|
+
declare const hooks: Map<string, MagicGetter>;
|
|
253
|
+
/** Register a helper callable by bare name inside any expression. */
|
|
254
|
+
declare function hook(name: string, getter: MagicGetter): void;
|
|
244
255
|
/**
|
|
245
256
|
* Fields are `declare`d and assigned in the constructor, not initialised at the
|
|
246
257
|
* declaration.
|
|
@@ -1643,4 +1654,4 @@ declare function ready(fn?: ReadyCallback): Promise<void>;
|
|
|
1643
1654
|
/** Creates elements from an HTML string without inserting them in the document. */
|
|
1644
1655
|
declare function fromHtml(html: string): VoodooCollection;
|
|
1645
1656
|
|
|
1646
|
-
export {
|
|
1657
|
+
export { start as $, type App as A, findScope as B, type ComponentDefinition as C, type DirectiveBinding as D, fromHtml as E, getScope as F, hook as G, hooks as H, injectStyle as I, instances as J, leave as K, magic as L, magics as M, mountComponent as N, parse as O, PRIORITY as P, query as Q, type Resource as R, Scope as S, ready as T, refresh as U, VoodooCollection as V, removeStore as W, rootScope as X, session as Y, slideDown as Z, slideUp as _, type AppOptions as a, storage as a0, store as a1, storeNames as a2, stringify as a3, theme as a4, toast as a5, tokenize as a6, url as a7, viewTransition as a8, walk as a9, whenElement as aa, whenReady as ab, type DirectiveHooks as b, core as c, type ResourceOptions as d, type VoodooConfig as e, type VoodooPlugin as f, VoodooRuntimeError as g, VoodooSyntaxError as h, addCleanup as i, allStores as j, allowedGlobals as k, cache as l, clearParseCache as m, config as n, cookie as o, createApp as p, createResource as q, defineComponent as r, defineDirective as s, destroy as t, ready$1 as u, ensureTokens as v, enter as w, evaluate as x, fadeIn as y, fadeOut as z };
|
package/dist/reactivity.cjs
CHANGED
package/dist/reactivity.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { EffectScope, ITERATE_KEY, ReactiveEffect, TriggerType, computed, effect, effectScope, enableTracking, flushSync, getActiveEffect, getActiveScope, handleError, hasChanged, isReactive, isRef, markRaw, nextTick, pauseTracking, queueJob, queuePostFlush, reactive, ref, resetTracking, setErrorHandler, shallowRef, stop, toRaw, track, trigger, unref, warn, watch, watchEffect } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
export { EffectScope, ITERATE_KEY, ReactiveEffect, TriggerType, computed, effect, effectScope, enableTracking, flushSync, getActiveEffect, getActiveScope, handleError, hasChanged, isReactive, isRef, markRaw, nextTick, pauseTracking, queueJob, queuePostFlush, reactive, ref, resetTracking, setErrorHandler, shallowRef, stop, toRaw, track, trigger, unref, warn, watch, watchEffect } from './chunk-S4BXAGAW.js';
|
|
2
|
+
import './chunk-MEE2ZAKJ.js';
|
|
3
3
|
//# sourceMappingURL=reactivity.js.map
|
|
4
4
|
//# sourceMappingURL=reactivity.js.map
|
package/dist/socket.cjs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
* Voodoo.js v0.
|
|
6
|
+
* Voodoo.js v0.12.2
|
|
7
7
|
* JavaScript feels like magic.
|
|
8
8
|
* (c) 2026 Voodoo.js contributors. MIT License.
|
|
9
9
|
*/
|
|
@@ -383,6 +383,23 @@ var DELIBERATELY_WITHHELD = /* @__PURE__ */ new Set([
|
|
|
383
383
|
"SharedWorker",
|
|
384
384
|
"ServiceWorker"
|
|
385
385
|
]);
|
|
386
|
+
function guardedTimer(name) {
|
|
387
|
+
return function(handler, timeout, ...rest) {
|
|
388
|
+
if (typeof handler !== "function") {
|
|
389
|
+
throw new VoodooRuntimeError(
|
|
390
|
+
`${name} needs a function. Passing a string would compile it, which this library never does.`
|
|
391
|
+
);
|
|
392
|
+
}
|
|
393
|
+
const timer = globalThis[name];
|
|
394
|
+
return timer(handler, timeout, ...rest);
|
|
395
|
+
};
|
|
396
|
+
}
|
|
397
|
+
function forwardGlobal(name) {
|
|
398
|
+
return function(...args) {
|
|
399
|
+
const fn = globalThis[name];
|
|
400
|
+
return fn(...args);
|
|
401
|
+
};
|
|
402
|
+
}
|
|
386
403
|
var allowedGlobals = {
|
|
387
404
|
Math,
|
|
388
405
|
JSON,
|
|
@@ -401,7 +418,17 @@ var allowedGlobals = {
|
|
|
401
418
|
isFinite,
|
|
402
419
|
encodeURIComponent,
|
|
403
420
|
decodeURIComponent,
|
|
404
|
-
console
|
|
421
|
+
console,
|
|
422
|
+
...typeof setTimeout !== "undefined" ? {
|
|
423
|
+
setTimeout: guardedTimer("setTimeout"),
|
|
424
|
+
setInterval: guardedTimer("setInterval"),
|
|
425
|
+
clearTimeout: forwardGlobal("clearTimeout"),
|
|
426
|
+
clearInterval: forwardGlobal("clearInterval")
|
|
427
|
+
} : {},
|
|
428
|
+
...typeof requestAnimationFrame !== "undefined" ? {
|
|
429
|
+
requestAnimationFrame: forwardGlobal("requestAnimationFrame"),
|
|
430
|
+
cancelAnimationFrame: forwardGlobal("cancelAnimationFrame")
|
|
431
|
+
} : {}
|
|
405
432
|
};
|
|
406
433
|
var VoodooRuntimeError = class extends Error {
|
|
407
434
|
constructor(message, expression) {
|
package/dist/socket.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { socketSupported, createSocket, socket } from './chunk-
|
|
2
|
-
export { ENGINE, SIO, createSocket, decodeEngine, decodeSocketIo, encodeSocketIo, engineURL, resolveSocketURL, socket, socketSupported } from './chunk-
|
|
3
|
-
import { evaluateIn, readAttr } from './chunk-
|
|
4
|
-
import { reactive } from './chunk-
|
|
5
|
-
import { warnAlias } from './chunk-
|
|
6
|
-
import { parseDuration } from './chunk-
|
|
7
|
-
import { defineDirective, PRIORITY, config } from './chunk-
|
|
8
|
-
import './chunk-
|
|
1
|
+
import { socketSupported, createSocket, socket } from './chunk-UGLD36KV.js';
|
|
2
|
+
export { ENGINE, SIO, createSocket, decodeEngine, decodeSocketIo, encodeSocketIo, engineURL, resolveSocketURL, socket, socketSupported } from './chunk-UGLD36KV.js';
|
|
3
|
+
import { evaluateIn, readAttr } from './chunk-OWCQV42D.js';
|
|
4
|
+
import { reactive } from './chunk-S4BXAGAW.js';
|
|
5
|
+
import { warnAlias } from './chunk-YV4I45SK.js';
|
|
6
|
+
import { parseDuration } from './chunk-7AKBELZA.js';
|
|
7
|
+
import { defineDirective, PRIORITY, config } from './chunk-RXOLGHSU.js';
|
|
8
|
+
import './chunk-MEE2ZAKJ.js';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
-
* Voodoo.js v0.
|
|
11
|
+
* Voodoo.js v0.12.2
|
|
12
12
|
* JavaScript feels like magic.
|
|
13
13
|
* (c) 2026 Voodoo.js contributors. MIT License.
|
|
14
14
|
*/
|
package/dist/utils.cjs
CHANGED
package/dist/utils.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { capitalize, chunk, clone, debounce, device, escapeHtml, formatCurrency, formatDate, formatFileSize, formatNumber, formatPercent, get, groupBy, isBrowser, matchesMedia, memoize, merge, once, parseDuration, random, relativeTime, sample, set, setFormatDefaults, sleep, slugify, sortBy, stripTags, throttle, titleCase, truncate, uid, unique, uuid } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
export { capitalize, chunk, clone, debounce, device, escapeHtml, formatCurrency, formatDate, formatFileSize, formatNumber, formatPercent, get, groupBy, isBrowser, matchesMedia, memoize, merge, once, parseDuration, random, relativeTime, sample, set, setFormatDefaults, sleep, slugify, sortBy, stripTags, throttle, titleCase, truncate, uid, unique, uuid } from './chunk-7AKBELZA.js';
|
|
2
|
+
import './chunk-MEE2ZAKJ.js';
|
|
3
3
|
//# sourceMappingURL=utils.js.map
|
|
4
4
|
//# sourceMappingURL=utils.js.map
|