@animus-ui/vite-plugin 0.1.11 → 0.1.12
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 -0
- package/dist/build-start.d.ts +2 -6
- package/dist/build-start.d.ts.map +1 -1
- package/dist/config.d.ts +0 -5
- package/dist/config.d.ts.map +1 -1
- package/dist/constants.d.ts +4 -16
- package/dist/constants.d.ts.map +1 -1
- package/dist/context.d.ts +54 -233
- package/dist/context.d.ts.map +1 -1
- package/dist/css.d.ts +0 -6
- package/dist/css.d.ts.map +1 -1
- package/dist/hmr.d.ts +2 -19
- package/dist/hmr.d.ts.map +1 -1
- package/dist/hot-update-events.d.ts +14 -44
- package/dist/hot-update-events.d.ts.map +1 -1
- package/dist/index-html.d.ts +2 -23
- package/dist/index-html.d.ts.map +1 -1
- package/dist/index.cjs +315 -622
- package/dist/index.d.ts +25 -92
- package/dist/index.d.ts.map +1 -1
- package/dist/module-invalidation.d.ts +2 -10
- package/dist/module-invalidation.d.ts.map +1 -1
- package/dist/rediscovery.d.ts +6 -24
- package/dist/rediscovery.d.ts.map +1 -1
- package/dist/reset-coalescer.d.ts +6 -8
- package/dist/reset-coalescer.d.ts.map +1 -1
- package/dist/transform.d.ts +2 -16
- package/dist/transform.d.ts.map +1 -1
- package/dist/virtual-modules.d.ts +0 -3
- package/dist/virtual-modules.d.ts.map +1 -1
- package/package.json +7 -4
package/dist/index.d.ts
CHANGED
|
@@ -2,137 +2,70 @@ import type { StaticCssConfig } from '@animus-ui/extract/pipeline';
|
|
|
2
2
|
import type { Plugin } from 'vite';
|
|
3
3
|
export { discoverFiles } from '@animus-ui/extract/pipeline';
|
|
4
4
|
export interface AnimusExtractOptions {
|
|
5
|
-
/**
|
|
6
|
-
* Path to a module exporting a SystemInstance from `@animus-ui/system`.
|
|
7
|
-
* The module is loaded via Rust NAPI (OXC + rquickjs) at build start.
|
|
8
|
-
* It provides prop config, group registry, theme tokens, selector aliases,
|
|
9
|
-
* and global styles — everything the extraction pipeline needs.
|
|
10
|
-
*/
|
|
5
|
+
/** Path to a module exporting a SystemInstance from `@animus-ui/system`. */
|
|
11
6
|
system: string;
|
|
12
7
|
/**
|
|
13
|
-
* Module specifier
|
|
14
|
-
*
|
|
15
|
-
* The default preserves the full `@animus-ui/system` runtime. Override this
|
|
16
|
-
* only when the selected entry supplies every terminal present in the
|
|
17
|
-
* analyzed consumer (for example, the framework-neutral class-resolver
|
|
18
|
-
* entry for a consumer containing only `.asClass()` definitions).
|
|
19
|
-
*
|
|
20
|
-
* @default '@animus-ui/system'
|
|
8
|
+
* Module specifier for extracted runtime factories, default
|
|
9
|
+
* `@animus-ui/system`. An override must supply every terminal used.
|
|
21
10
|
*/
|
|
22
11
|
runtimeImport?: string;
|
|
23
12
|
/**
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
* `node_modules`, `.next`, and `.animus` are always excluded.
|
|
13
|
+
* Substrings, or globs when `*`/`?` present. Replaces the defaults `dist`,
|
|
14
|
+
* `.test.`, `.spec.`; `node_modules`, `.next`, `.animus` always apply.
|
|
27
15
|
*/
|
|
28
16
|
exclude?: string[];
|
|
29
17
|
/**
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
* extract components rendered from MDX files — `@mdx-js/mdx` must be
|
|
33
|
-
* installed as a peer for MDX files to be preprocessed; otherwise the
|
|
34
|
-
* plugin warns once at buildStart and skips them.
|
|
35
|
-
*
|
|
36
|
-
* @default ['.ts', '.tsx', '.js', '.jsx', '.mdx']
|
|
18
|
+
* Replaces the default extension list entirely. `.mdx` needs the
|
|
19
|
+
* `@mdx-js/mdx` peer, or those files warn once and are skipped.
|
|
37
20
|
*/
|
|
38
21
|
extensions?: string[];
|
|
39
|
-
/**
|
|
22
|
+
/** Extraction failures throw instead of warning. */
|
|
40
23
|
strict?: boolean;
|
|
41
24
|
/**
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
* present in variable CSS, no unresolved `__TRANSFORM__` placeholders. Prefix
|
|
45
|
-
* output with `[animus:verify]`. Failures throw when `strict: true`,
|
|
46
|
-
* otherwise warn.
|
|
25
|
+
* Run a structural self-check at the end of `buildStart`; failures throw
|
|
26
|
+
* under `strict`, otherwise warn.
|
|
47
27
|
*/
|
|
48
28
|
verify?: boolean;
|
|
49
|
-
/**
|
|
29
|
+
/** Verbose logging; also enabled by `ANIMUS_DEBUG=1`. */
|
|
50
30
|
verbose?: boolean;
|
|
51
31
|
/**
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
* Falls back to project's browserslist config, then to `defaults`.
|
|
32
|
+
* Browserslist queries for autoprefixing and syntax lowering; falls back
|
|
33
|
+
* to the project's browserslist config, then to `defaults`.
|
|
55
34
|
*/
|
|
56
35
|
targets?: string | string[];
|
|
57
|
-
/**
|
|
58
|
-
* Control CSS minification.
|
|
59
|
-
* - `true`: always minify (dev + prod)
|
|
60
|
-
* - `false`: never minify (autoprefixing still applies)
|
|
61
|
-
* - `undefined` (default): minify in prod only
|
|
62
|
-
*/
|
|
36
|
+
/** Absent minifies in production only; `false` still autoprefixes. */
|
|
63
37
|
minify?: boolean;
|
|
64
38
|
/**
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
* `config.command === 'build'`, development otherwise.
|
|
39
|
+
* Emission mode. Wins over the Vite command signal, which otherwise
|
|
40
|
+
* selects production for `build` and development elsewhere.
|
|
68
41
|
*/
|
|
69
42
|
mode?: 'development' | 'production';
|
|
70
|
-
/**
|
|
71
|
-
* Namespace prefix for CSS variables and class names, applied to the
|
|
72
|
-
* variable map/css (and theme + contextual vars) at system load.
|
|
73
|
-
*/
|
|
43
|
+
/** Namespace prefix for CSS variables and class names. */
|
|
74
44
|
prefix?: string;
|
|
75
45
|
/**
|
|
76
|
-
* Forced-emission declarations for usage the scanner cannot observe
|
|
77
|
-
*
|
|
78
|
-
* components). Declared variants/states/system-prop values and custom
|
|
79
|
-
* dynamic slots are emitted as if used; entries are labeled as forced
|
|
80
|
-
* in the extraction report. Empty/absent is a no-op.
|
|
46
|
+
* Forced-emission declarations for usage the scanner cannot observe;
|
|
47
|
+
* declared variants, states and prop values are emitted as if used.
|
|
81
48
|
*/
|
|
82
49
|
staticCss?: StaticCssConfig;
|
|
83
50
|
/**
|
|
84
|
-
* Full `@layer` declaration order
|
|
85
|
-
*
|
|
86
|
-
* interleaved around them. Names are emitted as-is.
|
|
87
|
-
*
|
|
88
|
-
* Example: `['reset', 'anm-global', 'anm-base', ..., 'anm-custom', 'overrides']`
|
|
51
|
+
* Full `@layer` declaration order; must contain every `anm-*` layer as a
|
|
52
|
+
* subsequence in its required order. Consumer layers may interleave.
|
|
89
53
|
*/
|
|
90
54
|
layers?: string[];
|
|
91
55
|
/**
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
* `engine: 'v1'` (or setting `ANIMUS_ENGINE=v1`) throws — the selection is
|
|
95
|
-
* never silently upgraded.
|
|
96
|
-
*
|
|
97
|
-
* @default 'v2'
|
|
56
|
+
* `'v2'` is the only engine. `engine: 'v1'` or `ANIMUS_ENGINE=v1` throws
|
|
57
|
+
* rather than being silently upgraded.
|
|
98
58
|
*/
|
|
99
59
|
engine?: 'v2';
|
|
100
60
|
/**
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
* When set, the plugin injects `code` verbatim as an inline
|
|
104
|
-
* `<script data-animus-bootstrap>` at the start of `<head>` in built HTML
|
|
105
|
-
* (in dev, Vite's own client script precedes it); always ahead of every
|
|
106
|
-
* stylesheet reference. When absent — or when `code` is empty — no
|
|
107
|
-
* bootstrap script is emitted and the built HTML is unchanged.
|
|
108
|
-
*
|
|
109
|
-
* The plugin performs NO generation and interprets NO appearance semantics:
|
|
110
|
-
* produce the artifact in your Vite config with `createAppearanceBootstrap`
|
|
111
|
-
* from `@animus-ui/system/bootstrap` (a build-time-only subpath) and pass the
|
|
112
|
-
* result through. The shape is declared structurally here so the plugin never
|
|
113
|
-
* imports the generator.
|
|
114
|
-
*
|
|
115
|
-
* `cspHash` is carried for the application's own `script-src` policy — the
|
|
116
|
-
* plugin does not read it. Serve it single-quoted, exactly as returned.
|
|
117
|
-
*
|
|
118
|
-
* @example
|
|
119
|
-
* ```ts
|
|
120
|
-
* import { createAppearanceBootstrap } from '@animus-ui/system/bootstrap';
|
|
121
|
-
* import { theme } from './src/ds';
|
|
122
|
-
*
|
|
123
|
-
* animusExtract({ system: './src/ds.ts', appearanceBootstrap: createAppearanceBootstrap(theme) })
|
|
124
|
-
* ```
|
|
61
|
+
* Delivery only: `code` is injected verbatim as an inline
|
|
62
|
+
* `<script data-animus-bootstrap>`; `cspHash` is for the host's own policy.
|
|
125
63
|
*/
|
|
126
64
|
appearanceBootstrap?: {
|
|
127
65
|
code: string;
|
|
128
66
|
cspHash: string;
|
|
129
67
|
};
|
|
130
68
|
}
|
|
131
|
-
/**
|
|
132
|
-
* Vite adapter for the extraction pipeline. State and pipeline operations
|
|
133
|
-
* live in PluginContext; hook bodies live in their own modules — this
|
|
134
|
-
* factory only validates options and wires Vite hooks to those functions.
|
|
135
|
-
*/
|
|
136
69
|
export declare function animusExtract(options: AnimusExtractOptions): Plugin;
|
|
137
70
|
export default animusExtract;
|
|
138
71
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAEnC,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D,MAAM,WAAW,oBAAoB;IACnC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAEnC,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D,MAAM,WAAW,oBAAoB;IACnC,4EAA4E;IAC5E,MAAM,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,oDAAoD;IACpD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,yDAAyD;IACzD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC5B,sEAAsE;IACtE,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;OAGG;IACH,IAAI,CAAC,EAAE,aAAa,GAAG,YAAY,CAAC;IACpC,0DAA0D;IAC1D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB;;;OAGG;IACH,MAAM,CAAC,EAAE,IAAI,CAAC;IACd;;;OAGG;IACH,mBAAmB,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;CACzD;AAMD,wBAAgB,aAAa,CAAC,OAAO,EAAE,oBAAoB,GAAG,MAAM,CAsFnE;eAEc,aAAa"}
|
|
@@ -1,15 +1,7 @@
|
|
|
1
1
|
import type { PluginContext } from './context';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* sets (covers query-suffixed variants), plus the absolute-path id lookup.
|
|
6
|
-
* Falls back to the mixed compat graph for hosts without environment
|
|
7
|
-
* graphs. Returns the number of nodes invalidated.
|
|
8
|
-
*
|
|
9
|
-
* Completeness here is load-bearing: the file-plan diff is the ONLY
|
|
10
|
-
* invalidation candidate source, so a node shape this enumeration misses
|
|
11
|
-
* stays stale for the life of the server (openspec: dev-transform-coherence,
|
|
12
|
-
* "Client and SSR nodes are both evicted").
|
|
3
|
+
* Completeness is load-bearing: the file-plan diff is the only invalidation
|
|
4
|
+
* candidate source, so a node shape missed here stays stale for the session.
|
|
13
5
|
*/
|
|
14
6
|
export declare function invalidateFileModules(ctx: PluginContext, relPaths: string[]): number;
|
|
15
7
|
//# sourceMappingURL=module-invalidation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module-invalidation.d.ts","sourceRoot":"","sources":["../src/module-invalidation.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE/C
|
|
1
|
+
{"version":3,"file":"module-invalidation.d.ts","sourceRoot":"","sources":["../src/module-invalidation.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE/C;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,GAAG,EAAE,aAAa,EAClB,QAAQ,EAAE,MAAM,EAAE,GACjB,MAAM,CAmCR"}
|
package/dist/rediscovery.d.ts
CHANGED
|
@@ -1,36 +1,18 @@
|
|
|
1
1
|
import type { PluginContext } from './context';
|
|
2
2
|
interface UnresolvedParentDrop {
|
|
3
|
-
/** rootDir-relative consumer file the diagnostic names. */
|
|
4
3
|
file: string;
|
|
5
|
-
/** The dropped child component binding. */
|
|
6
4
|
component: string;
|
|
7
|
-
/** The parent binding as written in the consumer. */
|
|
5
|
+
/** The parent binding as written in the consumer, not a resolved path. */
|
|
8
6
|
parent: string;
|
|
9
7
|
}
|
|
10
|
-
/** The current manifest's unresolved-parent drops, parsed from diagnostics
|
|
11
|
-
* (shared Rust-mirror matcher — the regex lives in manifest-diagnostics). */
|
|
8
|
+
/** The current manifest's unresolved-parent drops, parsed from diagnostics. */
|
|
12
9
|
export declare function unresolvedParentDrops(ctx: PluginContext): UnresolvedParentDrop[];
|
|
13
|
-
/** Files carrying an unresolved-parent drop in the
|
|
14
|
-
* derived once per manifest publication, then a set lookup. */
|
|
10
|
+
/** Files carrying an unresolved-parent drop in the current manifest. */
|
|
15
11
|
export declare function unresolvedDropFiles(ctx: PluginContext): ReadonlySet<string>;
|
|
16
12
|
/**
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* "Source-universe reconciliation precedes unresolved-parent fallbacks").
|
|
20
|
-
*
|
|
21
|
-
* Drop-triggered: runs only when the current manifest reports `chain
|
|
22
|
-
* dropped: could not resolve parent component`. One discovery walk (the
|
|
23
|
-
* same walk and policy the server start uses) folds every eligible on-disk
|
|
24
|
-
* file the cache does not know, then one re-analysis resolves the whole
|
|
25
|
-
* extension graph — dependency depth never requires iteration depth, so the
|
|
26
|
-
* loop re-enters only when a re-analysis leaves NEW drops and the previous
|
|
27
|
-
* walk actually folded something (a changed discovery domain). The
|
|
28
|
-
* iteration cap is containment, not semantics.
|
|
29
|
-
*
|
|
30
|
-
* Returns whether any re-analysis ran (callers diff plans across the WHOLE
|
|
31
|
-
* transaction, so a fold-and-reanalyze is invisible to them beyond the
|
|
32
|
-
* final manifest).
|
|
13
|
+
* Folds undiscovered on-disk files when the manifest reports an unresolved
|
|
14
|
+
* parent, then re-analyzes; the iteration cap is containment, not semantics.
|
|
33
15
|
*/
|
|
34
|
-
export declare function
|
|
16
|
+
export declare function reconcileSourceCorpus(ctx: PluginContext): Promise<boolean>;
|
|
35
17
|
export {};
|
|
36
18
|
//# sourceMappingURL=rediscovery.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rediscovery.d.ts","sourceRoot":"","sources":["../src/rediscovery.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"rediscovery.d.ts","sourceRoot":"","sources":["../src/rediscovery.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAG/C,UAAU,oBAAoB;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,0EAA0E;IAC1E,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,+EAA+E;AAC/E,wBAAgB,qBAAqB,CACnC,GAAG,EAAE,aAAa,GACjB,oBAAoB,EAAE,CAWxB;AAOD,wEAAwE;AACxE,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,aAAa,GAAG,WAAW,CAAC,MAAM,CAAC,CAa3E;AAED;;;GAGG;AACH,wBAAsB,qBAAqB,CACzC,GAAG,EAAE,aAAa,GACjB,OAAO,CAAC,OAAO,CAAC,CAqElB"}
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* flight, and exactly one follow-up when requests arrive mid-reset. A
|
|
5
|
-
* package build regenerating its dist fires one reset, not one per file.
|
|
6
|
-
*
|
|
7
|
-
* Timer functions are injected seams — `vi.mock` on node builtins silently
|
|
8
|
-
* no-ops under vite-plus-test, so tests drive a manual scheduler instead.
|
|
2
|
+
* Timer functions are injected seams: `vi.mock` on node builtins silently
|
|
3
|
+
* no-ops under vite-plus-test, so tests drive a manual scheduler.
|
|
9
4
|
*/
|
|
5
|
+
type ResetTimerHandle = ReturnType<typeof setTimeout> | number;
|
|
6
|
+
type ResetErrorHandler = <Thrown>(error: Thrown) => void;
|
|
10
7
|
export declare class ResetCoalescer {
|
|
11
8
|
private readonly run;
|
|
12
9
|
private readonly onError;
|
|
@@ -16,8 +13,9 @@ export declare class ResetCoalescer {
|
|
|
16
13
|
private timer;
|
|
17
14
|
private running;
|
|
18
15
|
private dirty;
|
|
19
|
-
constructor(run: () => void | Promise<void>, onError:
|
|
16
|
+
constructor(run: () => void | Promise<void>, onError: ResetErrorHandler, quietMs?: number, schedule?: (fn: () => void, ms: number) => ResetTimerHandle, cancel?: (timer: ResetTimerHandle) => void);
|
|
20
17
|
/** Ask for a reset; bursts within the quiescence window collapse. */
|
|
21
18
|
request(): void;
|
|
22
19
|
}
|
|
20
|
+
export {};
|
|
23
21
|
//# sourceMappingURL=reset-coalescer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reset-coalescer.d.ts","sourceRoot":"","sources":["../src/reset-coalescer.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"reset-coalescer.d.ts","sourceRoot":"","sources":["../src/reset-coalescer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,KAAK,gBAAgB,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,GAAG,MAAM,CAAC;AAE/D,KAAK,iBAAiB,GAAG,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;AAEzD,qBAAa,cAAc;IAMvB,OAAO,CAAC,QAAQ,CAAC,GAAG;IAGpB,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAIzB,OAAO,CAAC,QAAQ,CAAC,MAAM;IAdzB,OAAO,CAAC,KAAK,CAAiC;IAC9C,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,KAAK,CAAS;IAEtB,YACmB,GAAG,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,EAG/B,OAAO,EAAE,iBAAiB,EAC1B,OAAO,SAAK,EACZ,QAAQ,GAAE,CACzB,EAAE,EAAE,MAAM,IAAI,EACd,EAAE,EAAE,MAAM,KACP,gBAAiD,EACrC,MAAM,GAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,IACjC,EACnB;IAEJ,qEAAqE;IACrE,OAAO,IAAI,IAAI,CAsBd;CACF"}
|
package/dist/transform.d.ts
CHANGED
|
@@ -1,23 +1,9 @@
|
|
|
1
1
|
import type { PluginContext } from './context';
|
|
2
2
|
/**
|
|
3
|
-
* The
|
|
4
|
-
*
|
|
5
|
-
* prologue the engine hoists to byte 0 — prepending above it would demote
|
|
6
|
-
* 'use client'/'use strict' to an ordinary expression statement, silently
|
|
7
|
-
* un-marking client modules on exactly the RSC-capable hosts this delivery
|
|
8
|
-
* path serves.
|
|
3
|
+
* The import goes after the directive prologue: above it, 'use client'
|
|
4
|
+
* becomes an ordinary expression and the module loses its client marking.
|
|
9
5
|
*/
|
|
10
6
|
export declare function applyDevBridgeImport(code: string): string;
|
|
11
|
-
/**
|
|
12
|
-
* transform: replace builder chains with `createComponent()` calls using
|
|
13
|
-
* the pre-built manifest; detect files created after buildStart and fold
|
|
14
|
-
* them into the analysis.
|
|
15
|
-
*
|
|
16
|
-
* The HMR bridge is NOT injected here — `transformIndexHtml` delivers it as a
|
|
17
|
-
* `<script type="module">` per served document (openspec:
|
|
18
|
-
* dev-stylesheet-management, "HMR bridge auto-injected in dev mode"; "Transform
|
|
19
|
-
* emitter unchanged" forbids the emitter importing it).
|
|
20
|
-
*/
|
|
21
7
|
export declare function transformSource(ctx: PluginContext, code: string, id: string): Promise<{
|
|
22
8
|
code: string;
|
|
23
9
|
map: null;
|
package/dist/transform.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transform.d.ts","sourceRoot":"","sources":["../src/transform.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"transform.d.ts","sourceRoot":"","sources":["../src/transform.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE/C;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAKzD;AA4BD,wBAAsB,eAAe,CACnC,GAAG,EAAE,aAAa,EAClB,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,GACT,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,IAAI,CAAA;CAAE,GAAG,IAAI,CAAC,CA2J7C"}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import type { PluginContext } from './context';
|
|
2
|
-
/** resolveId: map virtual ids and redirect external DS package imports. */
|
|
3
2
|
export declare function resolveVirtualId(ctx: PluginContext, id: string): string | null;
|
|
4
|
-
/** load: serve the virtual stylesheet, components CSS, HMR bridge, and
|
|
5
|
-
* system-props modules from manifest-derived state. */
|
|
6
3
|
export declare function loadVirtualModule(ctx: PluginContext, id: string): string | null;
|
|
7
4
|
//# sourceMappingURL=virtual-modules.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"virtual-modules.d.ts","sourceRoot":"","sources":["../src/virtual-modules.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"virtual-modules.d.ts","sourceRoot":"","sources":["../src/virtual-modules.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAa/C,wBAAgB,gBAAgB,CAC9B,GAAG,EAAE,aAAa,EAClB,EAAE,EAAE,MAAM,GACT,MAAM,GAAG,IAAI,CAYf;AAED,wBAAgB,iBAAiB,CAC/B,GAAG,EAAE,aAAa,EAClB,EAAE,EAAE,MAAM,GACT,MAAM,GAAG,IAAI,CAoGf"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@animus-ui/vite-plugin",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.12",
|
|
4
4
|
"description": "Animus static CSS extraction Vite plugin",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"animus",
|
|
@@ -39,9 +39,12 @@
|
|
|
39
39
|
"compile": "tsc --noEmit"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@animus-ui/extract": "0.1.
|
|
43
|
-
"browserslist": "^4.
|
|
44
|
-
"lightningcss": "^1.
|
|
42
|
+
"@animus-ui/extract": "0.1.12",
|
|
43
|
+
"browserslist": "^4.28.8",
|
|
44
|
+
"lightningcss": "^1.33.0"
|
|
45
|
+
},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"@animus-ui/assertions": "0.1.12"
|
|
45
48
|
},
|
|
46
49
|
"peerDependencies": {
|
|
47
50
|
"@mdx-js/mdx": "^3.0.0",
|