@aevantec/litevue 0.6.2 → 0.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/dist/litevue-plugins.dev.iife.js +4 -85
  2. package/dist/litevue-plugins.dev.mjs +4 -85
  3. package/dist/litevue-plugins.iife.js +1 -1
  4. package/dist/litevue-plugins.mjs +1 -1
  5. package/dist/litevue-plugins.umd.js +1 -1
  6. package/dist/litevue.dev.iife.js +2 -121
  7. package/dist/litevue.dev.mjs +2 -121
  8. package/dist/litevue.iife.js +1 -1
  9. package/dist/litevue.mjs +1 -1
  10. package/dist/litevue.umd.js +1 -1
  11. package/dist/plugins/media.dev.iife.js +2 -35
  12. package/dist/plugins/media.dev.mjs +2 -35
  13. package/dist/plugins/media.iife.js +1 -1
  14. package/dist/plugins/media.mjs +1 -1
  15. package/dist/plugins/media.umd.js +1 -1
  16. package/dist/plugins/morph.dev.iife.js +2 -42
  17. package/dist/plugins/morph.dev.mjs +2 -42
  18. package/dist/plugins/morph.iife.js +1 -1
  19. package/dist/plugins/morph.mjs +1 -1
  20. package/dist/plugins/morph.umd.js +1 -1
  21. package/dist/plugins/navigate.dev.iife.js +1 -10
  22. package/dist/plugins/navigate.dev.mjs +1 -10
  23. package/dist/plugins/persist.dev.iife.js +0 -7
  24. package/dist/plugins/persist.dev.mjs +0 -7
  25. package/dist/plugins/transition.iife.js +1 -1
  26. package/dist/plugins/transition.mjs +1 -1
  27. package/dist/plugins/transition.umd.js +1 -1
  28. package/dist/types/app.d.mts +2 -5
  29. package/dist/types/app.d.ts +2 -5
  30. package/dist/types/block.d.mts +0 -4
  31. package/dist/types/block.d.ts +0 -4
  32. package/dist/types/context.d.mts +0 -5
  33. package/dist/types/context.d.ts +0 -5
  34. package/dist/types/devtools-panel/chrome.d.mts +0 -3
  35. package/dist/types/devtools-panel/chrome.d.ts +0 -3
  36. package/dist/types/devtools-panel/menu.d.mts +0 -2
  37. package/dist/types/devtools-panel/menu.d.ts +0 -2
  38. package/dist/types/devtools-panel/plugins.d.mts +0 -4
  39. package/dist/types/devtools-panel/plugins.d.ts +0 -4
  40. package/dist/types/devtools-panel/styles.d.mts +2 -17
  41. package/dist/types/devtools-panel/styles.d.ts +2 -17
  42. package/dist/types/devtools-panel/values.d.mts +0 -25
  43. package/dist/types/devtools-panel/values.d.ts +0 -25
  44. package/dist/types/devtools.d.mts +0 -7
  45. package/dist/types/devtools.d.ts +0 -7
  46. package/dist/types/directives/on.d.mts +0 -1
  47. package/dist/types/directives/on.d.ts +0 -1
  48. package/dist/types/errors.d.mts +0 -7
  49. package/dist/types/errors.d.ts +0 -7
  50. package/dist/types/eval.d.mts +0 -3
  51. package/dist/types/eval.d.ts +0 -3
  52. package/dist/types/lazy.d.mts +0 -10
  53. package/dist/types/lazy.d.ts +0 -10
  54. package/dist/types/magics.d.mts +0 -9
  55. package/dist/types/magics.d.ts +0 -9
  56. package/dist/types/ownership.d.mts +0 -19
  57. package/dist/types/ownership.d.ts +0 -19
  58. package/dist/types/plugins/media/index.d.mts +0 -5
  59. package/dist/types/plugins/media/index.d.ts +0 -5
  60. package/dist/types/plugins/morph/index.d.mts +0 -8
  61. package/dist/types/plugins/morph/index.d.ts +0 -8
  62. package/dist/types/scheduler.d.mts +0 -5
  63. package/dist/types/scheduler.d.ts +0 -5
  64. package/dist/types/utils.d.mts +0 -5
  65. package/dist/types/utils.d.ts +0 -5
  66. package/dist/types/warn.d.mts +0 -12
  67. package/dist/types/warn.d.ts +0 -12
  68. package/package.json +1 -1
@@ -1,7 +1,3 @@
1
- /**
2
- * One route for every runtime error. The diagnostic prose is DEV-only; the
3
- * routing and `onError` handlers ship, since that is where monitoring hooks in.
4
- */
5
1
  export type ErrorPhase =
6
2
  /** evaluating a directive's expression, or a text interpolation */
7
3
  'expression'
@@ -27,10 +23,7 @@ export interface ErrorInfo {
27
23
  scope?: Record<string, any>;
28
24
  }
29
25
  export type ErrorHandler = (err: unknown, info: ErrorInfo) => void;
30
- /** A short, recognisable rendering of the element — not its whole subtree. */
31
26
  export declare const describeEl: (el?: Node) => string | undefined;
32
- /** Registered by `app.onError()`. Shared across apps, like the store registry. */
33
27
  export declare const addErrorHandler: (fn: ErrorHandler) => () => void;
34
- /** Test seam — drops every registered handler. */
35
28
  export declare const clearErrorHandlers: () => undefined;
36
29
  export declare const handleError: (err: unknown, info: ErrorInfo) => void;
@@ -1,7 +1,3 @@
1
- /**
2
- * One route for every runtime error. The diagnostic prose is DEV-only; the
3
- * routing and `onError` handlers ship, since that is where monitoring hooks in.
4
- */
5
1
  export type ErrorPhase =
6
2
  /** evaluating a directive's expression, or a text interpolation */
7
3
  'expression'
@@ -27,10 +23,7 @@ export interface ErrorInfo {
27
23
  scope?: Record<string, any>;
28
24
  }
29
25
  export type ErrorHandler = (err: unknown, info: ErrorInfo) => void;
30
- /** A short, recognisable rendering of the element — not its whole subtree. */
31
26
  export declare const describeEl: (el?: Node) => string | undefined;
32
- /** Registered by `app.onError()`. Shared across apps, like the store registry. */
33
27
  export declare const addErrorHandler: (fn: ErrorHandler) => () => void;
34
- /** Test seam — drops every registered handler. */
35
28
  export declare const clearErrorHandlers: () => undefined;
36
29
  export declare const handleError: (err: unknown, info: ErrorInfo) => void;
@@ -1,10 +1,7 @@
1
1
  import { type ErrorInfo } from './errors.mjs';
2
2
  export declare const EVAL_CACHE_LIMIT = 1000;
3
- /** For tests: how many compiled expressions are held. */
4
3
  export declare const evalCacheSize: () => number;
5
- /** Where the expression came from, so a failure can name its directive and element. */
6
4
  export type EvalMeta = Pick<ErrorInfo, 'source' | 'el'> & {
7
- /** Shown instead of the compiled text: `{{ total }}`, not `$s( total )`. */
8
5
  expression?: string;
9
6
  };
10
7
  export declare const evaluate: (scope: any, exp: string, el?: Node, meta?: EvalMeta) => any;
@@ -1,10 +1,7 @@
1
1
  import { type ErrorInfo } from './errors';
2
2
  export declare const EVAL_CACHE_LIMIT = 1000;
3
- /** For tests: how many compiled expressions are held. */
4
3
  export declare const evalCacheSize: () => number;
5
- /** Where the expression came from, so a failure can name its directive and element. */
6
4
  export type EvalMeta = Pick<ErrorInfo, 'source' | 'el'> & {
7
- /** Shown instead of the compiled text: `{{ total }}`, not `$s( total )`. */
8
5
  expression?: string;
9
6
  };
10
7
  export declare const evaluate: (scope: any, exp: string, el?: Node, meta?: EvalMeta) => any;
@@ -1,15 +1,5 @@
1
1
  import type { Context } from './context.mjs';
2
- /**
3
- * `v-scope.visible` / `.idle` / `.interaction`: defer a region's walk, so
4
- * nothing inside is bound until the trigger. The author still wrote
5
- * `v-scope`; only the moment of initialisation moves.
6
- */
7
2
  export type LazyMode = 'visible' | 'idle' | 'interaction';
8
3
  export declare const LAZY_MODES: LazyMode[];
9
- /** Selector matching every scope root, deferred or not. */
10
4
  export declare const SCOPE_SELECTOR: string;
11
- /**
12
- * Returns true if `el` was deferred. The walk must not descend into it:
13
- * walking consumes directives, so it could not be walked again later.
14
- */
15
5
  export declare const deferScope: (el: Element, ctx: Context, walk: (node: Node, ctx: Context, once: boolean) => unknown, once: boolean) => boolean;
@@ -1,15 +1,5 @@
1
1
  import type { Context } from './context';
2
- /**
3
- * `v-scope.visible` / `.idle` / `.interaction`: defer a region's walk, so
4
- * nothing inside is bound until the trigger. The author still wrote
5
- * `v-scope`; only the moment of initialisation moves.
6
- */
7
2
  export type LazyMode = 'visible' | 'idle' | 'interaction';
8
3
  export declare const LAZY_MODES: LazyMode[];
9
- /** Selector matching every scope root, deferred or not. */
10
4
  export declare const SCOPE_SELECTOR: string;
11
- /**
12
- * Returns true if `el` was deferred. The walk must not descend into it:
13
- * walking consumes directives, so it could not be walked again later.
14
- */
15
5
  export declare const deferScope: (el: Element, ctx: Context, walk: (node: Node, ctx: Context, once: boolean) => unknown, once: boolean) => boolean;
@@ -1,14 +1,5 @@
1
1
  import type { Context } from './context.mjs';
2
- /**
3
- * $id('name') — unique ids for accessibility attributes. Stable within a scope
4
- * so label/input pairs match, unique across scopes.
5
- */
6
2
  export declare const createId: () => (name?: string) => string;
7
- /**
8
- * $watch(source, callback, { immediate }) — watches a dot-path string or getter
9
- * and calls back with (value, oldValue). Returns a stop function; it also stops
10
- * when the owning scope unmounts.
11
- */
12
3
  export declare const createWatch: (ctx: Context) => (source: string | (() => any), cb: (value: any, oldValue: any) => void, options?: {
13
4
  immediate?: boolean;
14
5
  }) => () => void;
@@ -1,14 +1,5 @@
1
1
  import type { Context } from './context';
2
- /**
3
- * $id('name') — unique ids for accessibility attributes. Stable within a scope
4
- * so label/input pairs match, unique across scopes.
5
- */
6
2
  export declare const createId: () => (name?: string) => string;
7
- /**
8
- * $watch(source, callback, { immediate }) — watches a dot-path string or getter
9
- * and calls back with (value, oldValue). Returns a stop function; it also stops
10
- * when the owning scope unmounts.
11
- */
12
3
  export declare const createWatch: (ctx: Context) => (source: string | (() => any), cb: (value: any, oldValue: any) => void, options?: {
13
4
  immediate?: boolean;
14
5
  }) => () => void;
@@ -1,25 +1,6 @@
1
- /**
2
- * Per-node disposal.
3
- *
4
- * A Context spans one `v-scope` to the next — the right boundary for
5
- * `app.unmount(el)`, too coarse for a node removed on its own. Morph detaches
6
- * nodes directly, leaving their effects live. Tracking what each node acquired
7
- * lets a detached subtree be disposed without a Context per node.
8
- */
9
1
  type Disposer = () => void;
10
2
  export declare const setOwner: (node: Node | undefined) => Node | undefined;
11
- /**
12
- * Registers a disposer against `node`, defaulting to the node being walked.
13
- * Pass `node` explicitly for a directive that outlives its element: `v-if` and
14
- * `v-for` detach the template and render from an anchor, so they must own to
15
- * the anchor.
16
- */
17
3
  export declare const own: (dispose: Disposer, node?: Node | undefined) => void;
18
- /** Withdraws a disposer from `node`, for an owner that removes it itself. */
19
4
  export declare const disown: (dispose: Disposer, node: Node) => void;
20
- /**
21
- * Disposes `node` and its subtree. Safe on an unowned node, and idempotent —
22
- * the record is dropped as it runs.
23
- */
24
5
  export declare const disposeSubtree: (node: Node) => void;
25
6
  export {};
@@ -1,25 +1,6 @@
1
- /**
2
- * Per-node disposal.
3
- *
4
- * A Context spans one `v-scope` to the next — the right boundary for
5
- * `app.unmount(el)`, too coarse for a node removed on its own. Morph detaches
6
- * nodes directly, leaving their effects live. Tracking what each node acquired
7
- * lets a detached subtree be disposed without a Context per node.
8
- */
9
1
  type Disposer = () => void;
10
2
  export declare const setOwner: (node: Node | undefined) => Node | undefined;
11
- /**
12
- * Registers a disposer against `node`, defaulting to the node being walked.
13
- * Pass `node` explicitly for a directive that outlives its element: `v-if` and
14
- * `v-for` detach the template and render from an anchor, so they must own to
15
- * the anchor.
16
- */
17
3
  export declare const own: (dispose: Disposer, node?: Node | undefined) => void;
18
- /** Withdraws a disposer from `node`, for an owner that removes it itself. */
19
4
  export declare const disown: (dispose: Disposer, node: Node) => void;
20
- /**
21
- * Disposes `node` and its subtree. Safe on an unowned node, and idempotent —
22
- * the record is dropped as it runs.
23
- */
24
5
  export declare const disposeSubtree: (node: Node) => void;
25
6
  export {};
@@ -1,9 +1,4 @@
1
1
  import type { Plugin } from '../../app.mjs';
2
- /**
3
- * Viewport-driven behaviour for the cases CSS cannot serve: values handed to
4
- * JavaScript, structural branches, skipping expensive init on small screens.
5
- * Appearance still belongs in a stylesheet, which applies before first paint.
6
- */
7
2
  export type Breakpoints = Record<string, number>;
8
3
  export interface MediaOptions {
9
4
  /** Replaces the default scale wholesale rather than merging into it. */
@@ -1,9 +1,4 @@
1
1
  import type { Plugin } from '../../app';
2
- /**
3
- * Viewport-driven behaviour for the cases CSS cannot serve: values handed to
4
- * JavaScript, structural branches, skipping expensive init on small screens.
5
- * Appearance still belongs in a stylesheet, which applies before first paint.
6
- */
7
2
  export type Breakpoints = Record<string, number>;
8
3
  export interface MediaOptions {
9
4
  /** Replaces the default scale wholesale rather than merging into it. */
@@ -1,12 +1,4 @@
1
1
  import type { Plugin } from '../../app.mjs';
2
- /**
3
- * Update a live region in place from new HTML, instead of replacing it.
4
- *
5
- * Replacing markup destroys every element in the region — and with it every
6
- * scope, its state, and the browser state riding on those nodes: focus, caret,
7
- * selection, scroll, media playback, `<details open>`. Morphing patches only
8
- * the differences, so unchanged elements are never touched.
9
- */
10
2
  export interface MorphOptions {
11
3
  /**
12
4
  * Identity used to match children across the update. Defaults to `id`,
@@ -1,12 +1,4 @@
1
1
  import type { Plugin } from '../../app';
2
- /**
3
- * Update a live region in place from new HTML, instead of replacing it.
4
- *
5
- * Replacing markup destroys every element in the region — and with it every
6
- * scope, its state, and the browser state riding on those nodes: focus, caret,
7
- * selection, scroll, media playback, `<details open>`. Morphing patches only
8
- * the differences, so unchanged elements are never touched.
9
- */
10
2
  export interface MorphOptions {
11
3
  /**
12
4
  * Identity used to match children across the update. Defaults to `id`,
@@ -1,13 +1,8 @@
1
1
  import { type ReactiveEffectRunner } from '@vue/reactivity';
2
- /** Stops an effect and remembers that it is stopped. Use instead of `stop`. */
3
2
  export declare const stopEffect: (runner: ReactiveEffectRunner) => void;
4
3
  export type Job = Function & {
5
4
  i?: number;
6
5
  };
7
6
  export declare const nextTick: (fn?: () => void) => Promise<void>;
8
- /**
9
- * Stamps a job with its creation order, which the flush runs in. An effect
10
- * stamped as it is created sorts before the children its first run creates.
11
- */
12
7
  export declare const stampJob: <T extends Job>(job: T) => T;
13
8
  export declare const queueJob: (job: Job) => void;
@@ -1,13 +1,8 @@
1
1
  import { type ReactiveEffectRunner } from '@vue/reactivity';
2
- /** Stops an effect and remembers that it is stopped. Use instead of `stop`. */
3
2
  export declare const stopEffect: (runner: ReactiveEffectRunner) => void;
4
3
  export type Job = Function & {
5
4
  i?: number;
6
5
  };
7
6
  export declare const nextTick: (fn?: () => void) => Promise<void>;
8
- /**
9
- * Stamps a job with its creation order, which the flush runs in. An effect
10
- * stamped as it is created sorts before the children its first run creates.
11
- */
12
7
  export declare const stampJob: <T extends Job>(job: T) => T;
13
8
  export declare const queueJob: (job: Job) => void;
@@ -1,7 +1,2 @@
1
1
  export declare const checkAttr: (el: Element, name: string) => string | null;
2
- /**
3
- * Adds a listener and returns a remover. Callers are expected to use it:
4
- * `app.unmount(el)` leaves elements in the document, so a listener left behind
5
- * would keep driving markup meant to be inert.
6
- */
7
2
  export declare const listen: (el: Element, event: string, handler: any, options?: any) => () => void;
@@ -1,7 +1,2 @@
1
1
  export declare const checkAttr: (el: Element, name: string) => string | null;
2
- /**
3
- * Adds a listener and returns a remover. Callers are expected to use it:
4
- * `app.unmount(el)` leaves elements in the document, so a listener left behind
5
- * would keep driving markup meant to be inert.
6
- */
7
2
  export declare const listen: (el: Element, event: string, handler: any, options?: any) => () => void;
@@ -1,14 +1,2 @@
1
- /**
2
- * Development warnings.
3
- *
4
- * Every call site is guarded by `import.meta.env.DEV`; the production build
5
- * replaces that constant and terser drops the branch, so neither these
6
- * functions nor their strings ship. Messages are therefore free to be wordy —
7
- * say what to do instead.
8
- */
9
1
  export declare const warn: (msg: string) => void;
10
- /**
11
- * Warns once per `key`. Most callers are effects, which re-run on every
12
- * relevant change — one mistake would otherwise print on every keystroke.
13
- */
14
2
  export declare const warnOnce: (key: string, msg: string) => void;
@@ -1,14 +1,2 @@
1
- /**
2
- * Development warnings.
3
- *
4
- * Every call site is guarded by `import.meta.env.DEV`; the production build
5
- * replaces that constant and terser drops the branch, so neither these
6
- * functions nor their strings ship. Messages are therefore free to be wordy —
7
- * say what to do instead.
8
- */
9
1
  export declare const warn: (msg: string) => void;
10
- /**
11
- * Warns once per `key`. Most callers are effects, which re-run on every
12
- * relevant change — one mistake would otherwise print on every keystroke.
13
- */
14
2
  export declare const warnOnce: (key: string, msg: string) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aevantec/litevue",
3
- "version": "0.6.2",
3
+ "version": "0.6.3",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },