@animus-ui/vite-plugin 0.1.4 → 0.1.5

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.
@@ -1,9 +1,31 @@
1
+ /**
2
+ * The namespace every virtual module this plugin owns lives under. Exported so
3
+ * the `transform` guard that keeps those modules out of source-file handling
4
+ * matches on the same string the ids are built from — a rename of the
5
+ * namespace cannot leave the guard behind.
6
+ */
7
+ export declare const VIRTUAL_PREFIX = "virtual:animus/";
1
8
  export declare const VIRTUAL_CSS_ID = "virtual:animus/styles.css";
2
9
  export declare const RESOLVED_CSS_ID = "\0virtual:animus/styles.css";
3
10
  export declare const VIRTUAL_COMPONENTS_ID = "virtual:animus/components.js";
4
11
  export declare const RESOLVED_COMPONENTS_ID = "\0virtual:animus/components.js";
5
12
  export declare const VIRTUAL_BRIDGE_ID = "virtual:animus/hmr-bridge.js";
6
13
  export declare const RESOLVED_BRIDGE_ID = "\0virtual:animus/hmr-bridge.js";
14
+ /**
15
+ * Browser-addressable URL for the bridge, used as the `src` of the dev
16
+ * `<script type="module">` (see index-html.ts). THE explanation of the `/@id/`
17
+ * convention lives here; everything else points at it.
18
+ *
19
+ * Vite reserves `/@id/` for module ids that are not file paths. Its transform
20
+ * middleware normalizes such a URL before serving it (`unwrapId`): strip the
21
+ * prefix, then decode the `__x00__` placeholder back to a NUL byte. The
22
+ * UNPREFIXED specifier is what travels here — `resolveVirtualId` is the hook
23
+ * that answers it, and it answers with the `\0` form. (Vite's own `wrapId`
24
+ * encodes an already-`\0`-prefixed id as `__x00__`; that form resolves too, but
25
+ * it leans on the placeholder convention rather than on this plugin's own
26
+ * `resolveId` contract.)
27
+ */
28
+ export declare const BRIDGE_SCRIPT_SRC = "/@id/virtual:animus/hmr-bridge.js";
7
29
  export declare const VIRTUAL_SYSTEM_PROPS_ID = "virtual:animus/system-props";
8
30
  export declare const RESOLVED_SYSTEM_PROPS_ID = "\0virtual:animus/system-props";
9
31
  export declare const DEFAULT_EXCLUDE: string[];
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,8BAA8B,CAAC;AAC1D,eAAO,MAAM,eAAe,gCAAgC,CAAC;AAE7D,eAAO,MAAM,qBAAqB,iCAAiC,CAAC;AACpE,eAAO,MAAM,sBAAsB,mCAAmC,CAAC;AAEvE,eAAO,MAAM,iBAAiB,iCAAiC,CAAC;AAChE,eAAO,MAAM,kBAAkB,mCAAmC,CAAC;AAEnE,eAAO,MAAM,uBAAuB,gCAAgC,CAAC;AACrE,eAAO,MAAM,wBAAwB,kCAAkC,CAAC;AAExE,eAAO,MAAM,eAAe,UAA+C,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,cAAc,oBAAoB,CAAC;AAEhD,eAAO,MAAM,cAAc,8BAAgC,CAAC;AAC5D,eAAO,MAAM,eAAe,gCAAwB,CAAC;AAErD,eAAO,MAAM,qBAAqB,iCAAmC,CAAC;AACtE,eAAO,MAAM,sBAAsB,mCAA+B,CAAC;AAEnE,eAAO,MAAM,iBAAiB,iCAAmC,CAAC;AAClE,eAAO,MAAM,kBAAkB,mCAA2B,CAAC;AAE3D;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,iBAAiB,sCAA8B,CAAC;AAE7D,eAAO,MAAM,uBAAuB,gCAAkC,CAAC;AACvE,eAAO,MAAM,wBAAwB,kCAAiC,CAAC;AAEvE,eAAO,MAAM,eAAe,UAA+C,CAAC"}
package/dist/context.d.ts CHANGED
@@ -33,6 +33,45 @@ export declare function buildFileEntriesFromCache(cache: Map<string, {
33
33
  source: string;
34
34
  hash: string;
35
35
  }>;
36
+ /**
37
+ * The exact source `virtual:animus/system-props` serves for the current state.
38
+ * One definition, so the served bytes and the change decision below can never
39
+ * be computed from different inputs.
40
+ *
41
+ * A real context carries the module already generated (`systemPropsModuleMemo`,
42
+ * refreshed wherever the four inputs move), so serving it and deciding whether
43
+ * it changed are both reads. Contexts that publish those inputs by hand — the
44
+ * behavioral test doubles — carry no memo and generate here instead.
45
+ */
46
+ export declare function systemPropsModuleSource(ctx: PluginContext): string;
47
+ /**
48
+ * Run project analysis and report whether the served system-props module
49
+ * CHANGED.
50
+ *
51
+ * The module is imported by every module that renders a system prop, so
52
+ * re-delivering it pushes an update through all of them; every analysis
53
+ * republishes its inputs whether or not they moved, so a new analysis is not
54
+ * itself an admissible trigger (openspec: vite-extraction-plugin, "System prop
55
+ * map HMR invalidation").
56
+ *
57
+ * The comparison is over the GENERATED MODULE, not over the prop map alone.
58
+ * The map is one of four inputs, and they move independently: widening a
59
+ * component's `.system({ ... })` opt-in adds a `dynamicPropConfig` entry while
60
+ * minting no new utility class, so a map-only comparison reports "unchanged"
61
+ * and the client is left with a config missing the new prop — permanently,
62
+ * since Vite keeps serving the module's cached transform result across full
63
+ * page reloads. Comparing the artifact itself needs no argument about which
64
+ * inputs are volatile this month.
65
+ *
66
+ * A free function rather than a method: the comparison must run for real
67
+ * against any context the caller holds, including the behavioral test doubles
68
+ * that stand in for the engine.
69
+ */
70
+ export declare function runAnalysisTrackingSystemProps(ctx: PluginContext, fileEntries: Array<{
71
+ path: string;
72
+ source: string;
73
+ hash?: string;
74
+ }>): boolean;
36
75
  /**
37
76
  * Drop a deleted (or renamed-away) file from the dev file cache so its
38
77
  * last-known source stops riding along as a ghost entry on every later
@@ -84,6 +123,7 @@ export declare class PluginContext {
84
123
  storedSystemPropMapJson: string;
85
124
  storedDynamicPropsJson: string;
86
125
  storedTransformsSource: string;
126
+ systemPropsModuleMemo: string | null;
87
127
  fileCache: Map<string, {
88
128
  hash: string;
89
129
  source: string;
@@ -100,7 +140,6 @@ export declare class PluginContext {
100
140
  externalSourceEntries: Map<string, string>;
101
141
  externalPackageOutcomes: ExternalPackageOutcome[];
102
142
  devServer: any;
103
- bridgeInjected: boolean;
104
143
  resolvedSystemPath: string | null;
105
144
  systemDependencyKeys: Set<string>;
106
145
  systemDependencyPaths: string[];
@@ -111,6 +150,13 @@ export declare class PluginContext {
111
150
  readonly engineApi: () => any;
112
151
  constructor(options: AnimusExtractOptions, engineApiOverride?: () => any);
113
152
  log(msg: string): void;
153
+ /**
154
+ * Standard-level information — emitted whether or not `verbose` is on.
155
+ * Reserved for events a developer must see without opting in, e.g. a file
156
+ * created after buildStart being folded into the analysis (openspec:
157
+ * hmr-new-file-detection, "New file detection logging").
158
+ */
159
+ info(msg: string): void;
114
160
  warn(msg: string): void;
115
161
  logTimingWaterfall(timing: Record<string, number>): void;
116
162
  /**
@@ -197,6 +243,13 @@ export declare class PluginContext {
197
243
  * `getModuleById` searches the client AND ssr environment graphs and its
198
244
  * `invalidateModule` invalidates both instances behind the returned node,
199
245
  * which is exactly the reach this path wants. It stays the seam here.
246
+ *
247
+ * Both modules are invalidated unconditionally, and deliberately so: the
248
+ * appearance or disappearance of a whole component file is not the
249
+ * steady-state edit the change-gated path governs, and a client reload does
250
+ * NOT rescue a module that was never invalidated — Vite keeps serving its
251
+ * cached transform result across reloads (openspec: hmr-new-file-detection,
252
+ * "CSS invalidation after new file analysis").
200
253
  */
201
254
  invalidateExtractedModules(): void;
202
255
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAyBA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAGtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC;AAC9C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AACpD,OAAO,KAAK,EACV,sBAAsB,EACtB,YAAY,EAEb,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAEnC;;;;GAIG;AACH,MAAM,WAAW,SAAS;IACxB,WAAW,EAAE,MAAM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C,OAAO,EAAE,MAAM,GAAG,MAAM,CAGhC;IAED;;;;OAIG;IACH,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,GAAG,IAAI,CAOvE;IAED;;;;;;;;OAQG;IACH,OAAO,CAAC,uBAAuB;IA6B/B,OAAO,CAAC,cAAc,CAA+B;IAErD;;;;OAIG;IACH,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAO5C;IAED;;;;;;;OAOG;IACH,OAAO,CAAC,qBAAqB;IAU7B;;;;;OAKG;IACH,sBAAsB,IAAI,IAAI,CA4B7B;IAED;;;;;OAKG;IACH,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAI3C;IAED;;;;;;;OAOG;IACH,wBAAwB,IAAI,IAAI,CAe/B;IAED;;;;;;;;;;;;;;;;;;;OAmBG;IACH,0BAA0B,IAAI,IAAI,CAkBjC;IAED;;;;;;;;;OASG;IACH,wBAAwB,IAAI,IAAI,CAW/B;IAED;;;;;;;OAOG;IACH,6BAA6B,IAAI,IAAI,CAUpC;IAED,aAAa,IAAI,IAAI,CAiEpB;CACF"}
package/dist/hmr.d.ts CHANGED
@@ -19,5 +19,5 @@ import type { DevEnvironment, EnvironmentModuleNode, HotUpdateOptions } from 'vi
19
19
  * graph, so system dependencies registered through `watcher.add` outside the
20
20
  * root still reach the reset branch, with an empty `modules` list.
21
21
  */
22
- export declare function handleHotUpdate(ctx: PluginContext, environment: DevEnvironment, { type, file, timestamp, modules }: HotUpdateOptions): Promise<EnvironmentModuleNode[] | void>;
22
+ export declare function handleHotUpdate(ctx: PluginContext, environment: DevEnvironment, { type, file, timestamp, modules, read }: HotUpdateOptions): Promise<EnvironmentModuleNode[] | void>;
23
23
  //# sourceMappingURL=hmr.d.ts.map
package/dist/hmr.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"hmr.d.ts","sourceRoot":"","sources":["../src/hmr.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE/C,OAAO,KAAK,EACV,cAAc,EACd,qBAAqB,EACrB,gBAAgB,EACjB,MAAM,MAAM,CAAC;AAEd;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,eAAe,CACnC,GAAG,EAAE,aAAa,EAClB,WAAW,EAAE,cAAc,EAC3B,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE,gBAAgB,GACnD,OAAO,CAAC,qBAAqB,EAAE,GAAG,IAAI,CAAC,CAgEzC"}
1
+ {"version":3,"file":"hmr.d.ts","sourceRoot":"","sources":["../src/hmr.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE/C,OAAO,KAAK,EACV,cAAc,EACd,qBAAqB,EACrB,gBAAgB,EACjB,MAAM,MAAM,CAAC;AAEd;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,eAAe,CACnC,GAAG,EAAE,aAAa,EAClB,WAAW,EAAE,cAAc,EAC3B,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,gBAAgB,GACzD,OAAO,CAAC,qBAAqB,EAAE,GAAG,IAAI,CAAC,CAmEzC"}
@@ -9,7 +9,10 @@
9
9
  * - `analyzed` — re-analysis ran; every environment invalidates the affected
10
10
  * modules in its own graph. `staleDefinitionFiles` are rootDir-relative
11
11
  * definition files whose component replacement changed (the changed file
12
- * itself is never listed).
12
+ * itself is never listed). `systemPropsChanged` reports whether the served
13
+ * system-props module moved (see `runAnalysisTrackingSystemProps` in
14
+ * context.ts) — only the owning dispatch holds the before/after values, so
15
+ * it travels with the decision rather than being re-derived per environment.
13
16
  */
14
17
  export type HotUpdateResult = {
15
18
  kind: 'ignored';
@@ -18,6 +21,7 @@ export type HotUpdateResult = {
18
21
  } | {
19
22
  kind: 'analyzed';
20
23
  staleDefinitionFiles: string[];
24
+ systemPropsChanged: boolean;
21
25
  };
22
26
  /**
23
27
  * Once-per-file-event coordination across the `hotUpdate` dispatches.
@@ -1 +1 @@
1
- {"version":3,"file":"hot-update-events.d.ts","sourceRoot":"","sources":["../src/hot-update-events.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,eAAe,GACvB;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,GACnB;IAAE,IAAI,EAAE,WAAW,CAAA;CAAE,GACrB;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,oBAAoB,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC;AAEzD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,qBAAa,eAAe;IAGd,OAAO,CAAC,QAAQ,CAAC,YAAY;IAFzC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAsC;IAE9D,YAA6B,YAAY,SAAK,EAAI;IAElD,0EAA0E;IAC1E,KAAK,CAAC,eAAe,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAUvE;IAED,wEAAwE;IACxE,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,GAAG,IAAI,CAErE;IAED,0EAA0E;IAC1E,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,eAAe,CAEzD;CACF"}
1
+ {"version":3,"file":"hot-update-events.d.ts","sourceRoot":"","sources":["../src/hot-update-events.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,eAAe,GACvB;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,GACnB;IAAE,IAAI,EAAE,WAAW,CAAA;CAAE,GACrB;IACE,IAAI,EAAE,UAAU,CAAC;IACjB,oBAAoB,EAAE,MAAM,EAAE,CAAC;IAC/B,kBAAkB,EAAE,OAAO,CAAC;CAC7B,CAAC;AAEN;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,qBAAa,eAAe;IAGd,OAAO,CAAC,QAAQ,CAAC,YAAY;IAFzC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAsC;IAE9D,YAA6B,YAAY,SAAK,EAAI;IAElD,0EAA0E;IAC1E,KAAK,CAAC,eAAe,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAUvE;IAED,wEAAwE;IACxE,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,GAAG,IAAI,CAErE;IAED,0EAA0E;IAC1E,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,eAAe,CAEzD;CACF"}
@@ -3,16 +3,18 @@ import type { HtmlTagDescriptor } from 'vite';
3
3
  /**
4
4
  * transformIndexHtml: build the head-prepend tag set.
5
5
  *
6
- * Two independent tags, both delivery-only:
6
+ * Three independent tags, all delivery-only:
7
7
  * - the appearance bootstrap script, when the host build passed a
8
8
  * pre-generated artifact via `appearanceBootstrap` (absent otherwise);
9
- * - the `@layer` declaration style, when `buildStart` computed one.
9
+ * - the `@layer` declaration style, when `buildStart` computed one;
10
+ * - the HMR bridge module script, in dev only.
10
11
  *
11
- * Both branches are guarded on non-empty CONTENT, not on mere presence: an
12
- * artifact whose `code` is empty is a caller defect, and emitting
12
+ * The two build-time branches are guarded on non-empty CONTENT, not on mere
13
+ * presence: an artifact whose `code` is empty is a caller defect, and emitting
13
14
  * `<script data-animus-bootstrap></script>` for it would break the
14
15
  * unconfigured-parity contract in spirit (a tag that does nothing) while
15
- * hiding the defect. Symmetric with `layerDeclaration`.
16
+ * hiding the defect. Symmetric with `layerDeclaration`. The bridge has no
17
+ * content of its own — it is a `src` reference — so its only guard is the mode.
16
18
  *
17
19
  * Ordering: every descriptor rides the same `head-prepend` bucket, which Vite
18
20
  * serializes in array order (`serializeTags`) and splices in immediately after
@@ -20,8 +22,8 @@ import type { HtmlTagDescriptor } from 'vite';
20
22
  * before the layer declaration and — since built stylesheet links are appended
21
23
  * at `</head>` — before any stylesheet reference.
22
24
  *
23
- * When neither input is set the array is empty, so an unconfigured build emits
24
- * no tag, attribute, or whitespace of its own.
25
+ * With neither build-time input set, a production build emits no tag,
26
+ * attribute, or whitespace of its own.
25
27
  */
26
28
  export declare function buildIndexHtmlTags(ctx: PluginContext): HtmlTagDescriptor[];
27
29
  //# sourceMappingURL=index-html.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-html.d.ts","sourceRoot":"","sources":["../src/index-html.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAE9C;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,aAAa,GAAG,iBAAiB,EAAE,CAuB1E"}
1
+ {"version":3,"file":"index-html.d.ts","sourceRoot":"","sources":["../src/index-html.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAE9C;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,aAAa,GAAG,iBAAiB,EAAE,CAyD1E"}
package/dist/index.cjs CHANGED
@@ -7,13 +7,36 @@ let fs = require("fs");
7
7
  let path = require("path");
8
8
  let crypto = require("crypto");
9
9
  //#region src/constants.ts
10
- const VIRTUAL_CSS_ID = "virtual:animus/styles.css";
11
- const RESOLVED_CSS_ID = "\0virtual:animus/styles.css";
12
- const VIRTUAL_COMPONENTS_ID = "virtual:animus/components.js";
13
- const RESOLVED_COMPONENTS_ID = "\0virtual:animus/components.js";
14
- const VIRTUAL_BRIDGE_ID = "virtual:animus/hmr-bridge.js";
15
- const RESOLVED_BRIDGE_ID = "\0virtual:animus/hmr-bridge.js";
16
- const RESOLVED_SYSTEM_PROPS_ID = "\0virtual:animus/system-props";
10
+ /**
11
+ * The namespace every virtual module this plugin owns lives under. Exported so
12
+ * the `transform` guard that keeps those modules out of source-file handling
13
+ * matches on the same string the ids are built from — a rename of the
14
+ * namespace cannot leave the guard behind.
15
+ */
16
+ const VIRTUAL_PREFIX = "virtual:animus/";
17
+ const VIRTUAL_CSS_ID = `${VIRTUAL_PREFIX}styles.css`;
18
+ const RESOLVED_CSS_ID = `\0${VIRTUAL_CSS_ID}`;
19
+ const VIRTUAL_COMPONENTS_ID = `${VIRTUAL_PREFIX}components.js`;
20
+ const RESOLVED_COMPONENTS_ID = `\0${VIRTUAL_COMPONENTS_ID}`;
21
+ const VIRTUAL_BRIDGE_ID = `${VIRTUAL_PREFIX}hmr-bridge.js`;
22
+ const RESOLVED_BRIDGE_ID = `\0${VIRTUAL_BRIDGE_ID}`;
23
+ /**
24
+ * Browser-addressable URL for the bridge, used as the `src` of the dev
25
+ * `<script type="module">` (see index-html.ts). THE explanation of the `/@id/`
26
+ * convention lives here; everything else points at it.
27
+ *
28
+ * Vite reserves `/@id/` for module ids that are not file paths. Its transform
29
+ * middleware normalizes such a URL before serving it (`unwrapId`): strip the
30
+ * prefix, then decode the `__x00__` placeholder back to a NUL byte. The
31
+ * UNPREFIXED specifier is what travels here — `resolveVirtualId` is the hook
32
+ * that answers it, and it answers with the `\0` form. (Vite's own `wrapId`
33
+ * encodes an already-`\0`-prefixed id as `__x00__`; that form resolves too, but
34
+ * it leans on the placeholder convention rather than on this plugin's own
35
+ * `resolveId` contract.)
36
+ */
37
+ const BRIDGE_SCRIPT_SRC = `/@id/${VIRTUAL_BRIDGE_ID}`;
38
+ const VIRTUAL_SYSTEM_PROPS_ID = `${VIRTUAL_PREFIX}system-props`;
39
+ const RESOLVED_SYSTEM_PROPS_ID = `\0${VIRTUAL_SYSTEM_PROPS_ID}`;
17
40
  const DEFAULT_EXCLUDE = [
18
41
  "node_modules",
19
42
  "dist",
@@ -349,6 +372,56 @@ function buildFileEntriesFromCache(cache, changedPath) {
349
372
  });
350
373
  return entries;
351
374
  }
375
+ /** Generate the module from the four inputs the context currently holds. */
376
+ function generateSystemPropsModule(ctx) {
377
+ return (0, _animus_ui_extract_pipeline.buildSystemPropsModule)({
378
+ systemPropMapJson: ctx.storedSystemPropMapJson,
379
+ groupRegistryJson: ctx.system.groupRegistryJson,
380
+ dynamicProps: JSON.parse(ctx.storedDynamicPropsJson),
381
+ transformsSource: ctx.storedTransformsSource
382
+ });
383
+ }
384
+ /**
385
+ * The exact source `virtual:animus/system-props` serves for the current state.
386
+ * One definition, so the served bytes and the change decision below can never
387
+ * be computed from different inputs.
388
+ *
389
+ * A real context carries the module already generated (`systemPropsModuleMemo`,
390
+ * refreshed wherever the four inputs move), so serving it and deciding whether
391
+ * it changed are both reads. Contexts that publish those inputs by hand — the
392
+ * behavioral test doubles — carry no memo and generate here instead.
393
+ */
394
+ function systemPropsModuleSource(ctx) {
395
+ return ctx.systemPropsModuleMemo ??= generateSystemPropsModule(ctx);
396
+ }
397
+ /**
398
+ * Run project analysis and report whether the served system-props module
399
+ * CHANGED.
400
+ *
401
+ * The module is imported by every module that renders a system prop, so
402
+ * re-delivering it pushes an update through all of them; every analysis
403
+ * republishes its inputs whether or not they moved, so a new analysis is not
404
+ * itself an admissible trigger (openspec: vite-extraction-plugin, "System prop
405
+ * map HMR invalidation").
406
+ *
407
+ * The comparison is over the GENERATED MODULE, not over the prop map alone.
408
+ * The map is one of four inputs, and they move independently: widening a
409
+ * component's `.system({ ... })` opt-in adds a `dynamicPropConfig` entry while
410
+ * minting no new utility class, so a map-only comparison reports "unchanged"
411
+ * and the client is left with a config missing the new prop — permanently,
412
+ * since Vite keeps serving the module's cached transform result across full
413
+ * page reloads. Comparing the artifact itself needs no argument about which
414
+ * inputs are volatile this month.
415
+ *
416
+ * A free function rather than a method: the comparison must run for real
417
+ * against any context the caller holds, including the behavioral test doubles
418
+ * that stand in for the engine.
419
+ */
420
+ function runAnalysisTrackingSystemProps(ctx, fileEntries) {
421
+ const before = systemPropsModuleSource(ctx);
422
+ ctx.runAnalysis(fileEntries);
423
+ return systemPropsModuleSource(ctx) !== before;
424
+ }
352
425
  /**
353
426
  * Drop a deleted (or renamed-away) file from the dev file cache so its
354
427
  * last-known source stops riding along as a ghost entry on every later
@@ -395,6 +468,7 @@ var PluginContext = class {
395
468
  storedSystemPropMapJson = "{}";
396
469
  storedDynamicPropsJson = "{}";
397
470
  storedTransformsSource = "{}";
471
+ systemPropsModuleMemo = null;
398
472
  fileCache = /* @__PURE__ */ new Map();
399
473
  hotUpdateEvents = new HotUpdateEvents();
400
474
  packageMap = {};
@@ -408,7 +482,6 @@ var PluginContext = class {
408
482
  externalSourceEntries = /* @__PURE__ */ new Map();
409
483
  externalPackageOutcomes = [];
410
484
  devServer;
411
- bridgeInjected = false;
412
485
  resolvedSystemPath = null;
413
486
  systemDependencyKeys = /* @__PURE__ */ new Set();
414
487
  systemDependencyPaths = [];
@@ -456,6 +529,15 @@ var PluginContext = class {
456
529
  log(msg) {
457
530
  if (this.verbose) (this.logger ?? console).info(`[animus] ${msg}`);
458
531
  }
532
+ /**
533
+ * Standard-level information — emitted whether or not `verbose` is on.
534
+ * Reserved for events a developer must see without opting in, e.g. a file
535
+ * created after buildStart being folded into the analysis (openspec:
536
+ * hmr-new-file-detection, "New file detection logging").
537
+ */
538
+ info(msg) {
539
+ (this.logger ?? console).info(`[animus] ${msg}`);
540
+ }
459
541
  warn(msg) {
460
542
  (this.logger ?? console).warn(`[animus] ${msg}`);
461
543
  }
@@ -491,6 +573,7 @@ var PluginContext = class {
491
573
  if (this.options.strict) throw new Error(`[animus-extract] Failed to load system from ${this.resolvedSystemPath}: ${e}`, { cause: e });
492
574
  console.warn(`[animus-extract] Failed to load system from ${this.resolvedSystemPath}:`, e);
493
575
  }
576
+ this.systemPropsModuleMemo = generateSystemPropsModule(this);
494
577
  }
495
578
  /**
496
579
  * Run project analysis via the shared `runProjectAnalysis` and update
@@ -516,7 +599,6 @@ var PluginContext = class {
516
599
  this.storedManifestJson = result.manifestJson;
517
600
  this.storedSystemPropMapJson = JSON.stringify(result.manifest?.system_prop_map ?? {});
518
601
  this.storedDynamicPropsJson = JSON.stringify(result.manifest?.dynamic_props ?? {});
519
- this.bridgeInjected = false;
520
602
  const newFragments = result.manifest?.component_fragments;
521
603
  if (newFragments && typeof newFragments === "object") {
522
604
  this.fragmentCache.clear();
@@ -531,6 +613,7 @@ var PluginContext = class {
531
613
  console.warn("[animus-extract] analyzeProject failed:", e);
532
614
  return;
533
615
  }
616
+ this.systemPropsModuleMemo = generateSystemPropsModule(this);
534
617
  this.applyAssetSubstitutions();
535
618
  this.enforceExternalTokenContracts();
536
619
  }
@@ -665,6 +748,13 @@ var PluginContext = class {
665
748
  * `getModuleById` searches the client AND ssr environment graphs and its
666
749
  * `invalidateModule` invalidates both instances behind the returned node,
667
750
  * which is exactly the reach this path wants. It stays the seam here.
751
+ *
752
+ * Both modules are invalidated unconditionally, and deliberately so: the
753
+ * appearance or disappearance of a whole component file is not the
754
+ * steady-state edit the change-gated path governs, and a client reload does
755
+ * NOT rescue a module that was never invalidated — Vite keeps serving its
756
+ * cached transform result across reloads (openspec: hmr-new-file-detection,
757
+ * "CSS invalidation after new file analysis").
668
758
  */
669
759
  invalidateExtractedModules() {
670
760
  const server = this.devServer;
@@ -761,13 +851,16 @@ var PluginContext = class {
761
851
  * graph, so system dependencies registered through `watcher.add` outside the
762
852
  * root still reach the reset branch, with an empty `modules` list.
763
853
  */
764
- async function handleHotUpdate(ctx, environment, { type, file, timestamp, modules }) {
854
+ async function handleHotUpdate(ctx, environment, { type, file, timestamp, modules, read }) {
765
855
  if (ctx.isProd) return;
766
856
  const ownsEvent = ctx.hotUpdateEvents.claim(environment.name, file, timestamp);
767
857
  const absFile = (0, path.resolve)(file);
768
858
  ctx.log(`hotUpdate ${type} ${(0, path.relative)(ctx.rootDir, absFile)} env=${environment.name} owns=${ownsEvent}`);
769
859
  if (ctx.isSystemDependency(absFile)) {
770
- if (ownsEvent) ctx.requestGeologicalReset((0, path.relative)(ctx.rootDir, absFile));
860
+ if (ownsEvent) {
861
+ await reconcileSourceEntry(ctx, absFile, type, read);
862
+ ctx.requestGeologicalReset((0, path.relative)(ctx.rootDir, absFile));
863
+ }
771
864
  return [];
772
865
  }
773
866
  if (type === "create") return;
@@ -775,18 +868,69 @@ async function handleHotUpdate(ctx, environment, { type, file, timestamp, module
775
868
  if (ownsEvent) pruneDeletedFile(ctx, absFile);
776
869
  return;
777
870
  }
778
- if (ownsEvent) ctx.hotUpdateEvents.record(file, timestamp, await analyzeChangedFile(ctx, file, absFile));
871
+ if (ownsEvent) ctx.hotUpdateEvents.record(file, timestamp, await analyzeChangedFile(ctx, file, absFile, read));
779
872
  const result = ctx.hotUpdateEvents.resultOf(file, timestamp);
780
873
  if (result.kind === "ignored") return;
781
874
  if (result.kind === "unchanged") return [];
782
- return invalidateStaleModules(ctx, environment, modules, result.staleDefinitionFiles);
875
+ return invalidateStaleModules(ctx, environment, modules, result);
876
+ }
877
+ /**
878
+ * The changed file's text.
879
+ *
880
+ * Editors save atomically — truncate, then rewrite — so a watcher event can
881
+ * arrive while the path is momentarily EMPTY. Vite's `read()` helper retries on
882
+ * empty content for exactly that reason; reading the path directly at the same
883
+ * moment yields `''`, and since the corrective content produces no second
884
+ * event, that empty source would be cached permanently.
885
+ *
886
+ * Vite always supplies `read`, so the direct read is NOT a fallback for Vite:
887
+ * it exists for hosts that drive this hook without one. The dev-lane's adapter
888
+ * contract is deliberately bundler-neutral, and a second runtime satisfying it
889
+ * must not be forced to fabricate a helper to get correct behavior.
890
+ */
891
+ async function readChangedSource(absFile, read) {
892
+ return read ? await read() : (0, fs.readFileSync)(absFile, "utf-8");
893
+ }
894
+ /**
895
+ * Reconcile the `fileCache` entry of a file that is BOTH a system dependency
896
+ * and a discovered component source, since the dependency branch is terminal —
897
+ * neither the edit path's cache write nor `pruneDeletedFile` runs for it.
898
+ *
899
+ * An edit refreshes the entry: `performGeologicalReset` rebuilds its
900
+ * full-source analysis from this cache, so a stale entry would be re-analyzed
901
+ * on every later reset. A delete prunes it, exactly as the ordinary delete path
902
+ * would (openspec: hmr-new-file-detection, "Watcher deletion pruning") — a
903
+ * surviving entry is a ghost source no watcher event can ever name again.
904
+ *
905
+ * Dependency-only files have no entry: `pruneFileCache` no-ops for them, and
906
+ * the edit path must not create one — the cache is the component-source set,
907
+ * and a phantom entry would feed the engine a file it never discovered.
908
+ */
909
+ async function reconcileSourceEntry(ctx, absFile, type, read) {
910
+ if (type === "delete") {
911
+ pruneFileCache(ctx.fileCache, ctx.rootDir, absFile);
912
+ return;
913
+ }
914
+ const relPath = (0, path.relative)(ctx.rootDir, absFile);
915
+ if (!ctx.fileCache.has(relPath)) return;
916
+ let source;
917
+ try {
918
+ source = await readChangedSource(absFile, read);
919
+ } catch {
920
+ ctx.warn(`could not re-read ${relPath} after a system-dependency edit — geological resets will analyze its pre-edit text until a later edit is read successfully`);
921
+ return;
922
+ }
923
+ ctx.fileCache.set(relPath, {
924
+ hash: (0, _animus_ui_extract_pipeline.contentHash)(source),
925
+ source
926
+ });
783
927
  }
784
928
  /**
785
929
  * The once-per-event analysis half: gate the file, diff its content hash,
786
930
  * refresh the cache, and re-run project analysis. The returned result is what
787
931
  * the remaining environments act on.
788
932
  */
789
- async function analyzeChangedFile(ctx, file, absFile) {
933
+ async function analyzeChangedFile(ctx, file, absFile, read) {
790
934
  const ext = (0, path.extname)(file);
791
935
  if (!ctx.extensionsSet.has(ext)) return { kind: "ignored" };
792
936
  const excludePatterns = ctx.options.exclude ?? DEFAULT_EXCLUDE;
@@ -794,7 +938,7 @@ async function analyzeChangedFile(ctx, file, absFile) {
794
938
  const relPath = (0, path.relative)(ctx.rootDir, absFile);
795
939
  let source;
796
940
  try {
797
- source = (0, fs.readFileSync)(absFile, "utf-8");
941
+ source = await readChangedSource(absFile, read);
798
942
  } catch {
799
943
  return { kind: "ignored" };
800
944
  }
@@ -840,8 +984,7 @@ async function analyzeChangedFile(ctx, file, absFile) {
840
984
  }
841
985
  if (ctx.verbose && invalidatedIds.size > directComponentIds.length) ctx.log(`HMR: ${directComponentIds.length} direct + ${invalidatedIds.size - directComponentIds.length} transitive components invalidated`);
842
986
  const analysisStart = performance.now();
843
- const fileEntries = buildFileEntriesFromCache(ctx.fileCache, relPath);
844
- ctx.runAnalysis(fileEntries);
987
+ const systemPropsChanged = runAnalysisTrackingSystemProps(ctx, buildFileEntriesFromCache(ctx.fileCache, relPath));
845
988
  const analysisMs = Math.round(performance.now() - analysisStart);
846
989
  const staleDefinitionFiles = [];
847
990
  if (ctx.storedManifest?.components) {
@@ -857,7 +1000,8 @@ async function analyzeChangedFile(ctx, file, absFile) {
857
1000
  ctx.logTimingWaterfall(ctx.storedManifest?.timing ?? {});
858
1001
  return {
859
1002
  kind: "analyzed",
860
- staleDefinitionFiles
1003
+ staleDefinitionFiles,
1004
+ systemPropsChanged
861
1005
  };
862
1006
  }
863
1007
  /**
@@ -880,17 +1024,19 @@ function pruneDeletedFile(ctx, absFile) {
880
1024
  * (virtual:animus/styles.css) is NOT invalidated here — it only changes on a
881
1025
  * geological reset (vars/globals are stable during dev).
882
1026
  */
883
- function invalidateStaleModules(ctx, environment, modules, staleDefinitionFiles) {
1027
+ function invalidateStaleModules(ctx, environment, modules, analyzed) {
884
1028
  const graph = environment.moduleGraph;
885
1029
  const modulesToUpdate = [...modules];
886
- for (const moduleId of [RESOLVED_COMPONENTS_ID, RESOLVED_SYSTEM_PROPS_ID]) {
1030
+ const moduleIds = [RESOLVED_COMPONENTS_ID];
1031
+ if (analyzed.systemPropsChanged) moduleIds.push(RESOLVED_SYSTEM_PROPS_ID);
1032
+ for (const moduleId of moduleIds) {
887
1033
  const mod = graph.getModuleById(moduleId);
888
1034
  if (mod) {
889
1035
  graph.invalidateModule(mod);
890
1036
  modulesToUpdate.push(mod);
891
1037
  }
892
1038
  }
893
- for (const defFile of staleDefinitionFiles) {
1039
+ for (const defFile of analyzed.staleDefinitionFiles) {
894
1040
  const absDefPath = (0, path.resolve)(ctx.rootDir, defFile);
895
1041
  const defModule = graph.getModuleById(absDefPath) ?? graph.getModulesByFile(absDefPath)?.values().next().value;
896
1042
  if (defModule) {
@@ -910,16 +1056,18 @@ function invalidateStaleModules(ctx, environment, modules, staleDefinitionFiles)
910
1056
  /**
911
1057
  * transformIndexHtml: build the head-prepend tag set.
912
1058
  *
913
- * Two independent tags, both delivery-only:
1059
+ * Three independent tags, all delivery-only:
914
1060
  * - the appearance bootstrap script, when the host build passed a
915
1061
  * pre-generated artifact via `appearanceBootstrap` (absent otherwise);
916
- * - the `@layer` declaration style, when `buildStart` computed one.
1062
+ * - the `@layer` declaration style, when `buildStart` computed one;
1063
+ * - the HMR bridge module script, in dev only.
917
1064
  *
918
- * Both branches are guarded on non-empty CONTENT, not on mere presence: an
919
- * artifact whose `code` is empty is a caller defect, and emitting
1065
+ * The two build-time branches are guarded on non-empty CONTENT, not on mere
1066
+ * presence: an artifact whose `code` is empty is a caller defect, and emitting
920
1067
  * `<script data-animus-bootstrap><\/script>` for it would break the
921
1068
  * unconfigured-parity contract in spirit (a tag that does nothing) while
922
- * hiding the defect. Symmetric with `layerDeclaration`.
1069
+ * hiding the defect. Symmetric with `layerDeclaration`. The bridge has no
1070
+ * content of its own — it is a `src` reference — so its only guard is the mode.
923
1071
  *
924
1072
  * Ordering: every descriptor rides the same `head-prepend` bucket, which Vite
925
1073
  * serializes in array order (`serializeTags`) and splices in immediately after
@@ -927,8 +1075,8 @@ function invalidateStaleModules(ctx, environment, modules, staleDefinitionFiles)
927
1075
  * before the layer declaration and — since built stylesheet links are appended
928
1076
  * at `</head>` — before any stylesheet reference.
929
1077
  *
930
- * When neither input is set the array is empty, so an unconfigured build emits
931
- * no tag, attribute, or whitespace of its own.
1078
+ * With neither build-time input set, a production build emits no tag,
1079
+ * attribute, or whitespace of its own.
932
1080
  */
933
1081
  function buildIndexHtmlTags(ctx) {
934
1082
  const tags = [];
@@ -945,23 +1093,39 @@ function buildIndexHtmlTags(ctx) {
945
1093
  children: ctx.layerDeclaration,
946
1094
  injectTo: "head-prepend"
947
1095
  });
1096
+ if (!ctx.isProd) tags.push({
1097
+ tag: "script",
1098
+ attrs: {
1099
+ type: "module",
1100
+ src: BRIDGE_SCRIPT_SRC,
1101
+ "data-animus-bridge": ""
1102
+ },
1103
+ injectTo: "head-prepend"
1104
+ });
948
1105
  return tags;
949
1106
  }
950
1107
  //#endregion
951
1108
  //#region src/transform.ts
952
1109
  /**
953
1110
  * transform: replace builder chains with `createComponent()` calls using
954
- * the pre-built manifest; inject the HMR bridge import once in dev; detect
955
- * files created after buildStart and fold them into the analysis.
1111
+ * the pre-built manifest; detect files created after buildStart and fold
1112
+ * them into the analysis.
1113
+ *
1114
+ * The HMR bridge is NOT injected here — `transformIndexHtml` delivers it as a
1115
+ * `<script type="module">` per served document (openspec:
1116
+ * dev-stylesheet-management, "HMR bridge auto-injected in dev mode"; "Transform
1117
+ * emitter unchanged" forbids the emitter importing it).
956
1118
  */
957
1119
  function transformSource(ctx, code, id) {
958
1120
  if (!ctx.storedManifest) return null;
1121
+ if (id.startsWith("\0") || id.startsWith("virtual:animus/")) return null;
959
1122
  const isExternalPkg = ctx.externalPackageDirs.some((dir) => id.startsWith(dir + path.sep) || id === dir);
1123
+ const relativePath = (0, path.relative)(ctx.rootDir, id);
960
1124
  if (!isExternalPkg) {
961
1125
  if (!/\.[jt]sx?$/.test(id)) return null;
962
1126
  if (id.includes("node_modules")) return null;
1127
+ if (relativePath.startsWith("..") || (0, path.isAbsolute)(relativePath)) return null;
963
1128
  }
964
- const relativePath = (0, path.relative)(ctx.rootDir, id);
965
1129
  if (!ctx.storedManifest.files?.[relativePath]?.length) {
966
1130
  if (!ctx.isProd && !ctx.fileCache.has(relativePath)) {
967
1131
  if (isExternalPkg) {
@@ -976,8 +1140,8 @@ function transformSource(ctx, code, id) {
976
1140
  const fileEntries = buildFileEntriesFromCache(ctx.fileCache, relativePath);
977
1141
  ctx.runAnalysis(fileEntries);
978
1142
  const compCount = ctx.storedManifest.files?.[relativePath]?.length ?? 0;
979
- ctx.log(`New file detected: ${relativePath} — ${compCount ? `${compCount} components extracted` : "no components"}`);
980
- if (compCount) ctx.invalidateExtractedModules();
1143
+ ctx.info(`New file detected: ${relativePath} — ${compCount ? `${compCount} components extracted` : "no components"}`);
1144
+ ctx.invalidateExtractedModules();
981
1145
  }
982
1146
  if (!ctx.storedManifest.files?.[relativePath]?.length) return null;
983
1147
  }
@@ -985,18 +1149,17 @@ function transformSource(ctx, code, id) {
985
1149
  const { transformFile } = ctx.engineApi();
986
1150
  const result = transformFile(code, relativePath, ctx.storedManifestJson);
987
1151
  if (!result.hasComponents) return null;
988
- let transformedCode = result.code;
989
- if (!ctx.isProd && !ctx.bridgeInjected && ctx.storedSheets) {
990
- transformedCode = `import '${VIRTUAL_BRIDGE_ID}';\n${transformedCode}`;
991
- ctx.bridgeInjected = true;
992
- ctx.log("HMR bridge injected via transform");
993
- }
994
1152
  if (ctx.verbose) {
995
1153
  const compCount = ctx.storedManifest.files?.[relativePath]?.length ?? 0;
996
1154
  ctx.log(`transform ${relativePath}: ${compCount} components`);
997
1155
  }
1156
+ let outputCode = result.code;
1157
+ if (!ctx.isProd) {
1158
+ const prologue = /^(?:(['"])use [a-z -]+\1;?\r?\n)*/.exec(result.code)?.[0] ?? "";
1159
+ outputCode = prologue + `import '${VIRTUAL_BRIDGE_ID}';\n` + result.code.slice(prologue.length);
1160
+ }
998
1161
  return {
999
- code: transformedCode,
1162
+ code: outputCode,
1000
1163
  map: null
1001
1164
  };
1002
1165
  } catch (e) {
@@ -1009,10 +1172,10 @@ function transformSource(ctx, code, id) {
1009
1172
  //#region src/virtual-modules.ts
1010
1173
  /** resolveId: map virtual ids and redirect external DS package imports. */
1011
1174
  function resolveVirtualId(ctx, id) {
1012
- if (id === "virtual:animus/styles.css") return RESOLVED_CSS_ID;
1013
- if (id === "virtual:animus/components.js") return RESOLVED_COMPONENTS_ID;
1014
- if (id === "virtual:animus/hmr-bridge.js") return RESOLVED_BRIDGE_ID;
1015
- if (id === "virtual:animus/system-props") return RESOLVED_SYSTEM_PROPS_ID;
1175
+ if (id === VIRTUAL_CSS_ID) return RESOLVED_CSS_ID;
1176
+ if (id === VIRTUAL_COMPONENTS_ID) return RESOLVED_COMPONENTS_ID;
1177
+ if (id === VIRTUAL_BRIDGE_ID) return RESOLVED_BRIDGE_ID;
1178
+ if (id === VIRTUAL_SYSTEM_PROPS_ID) return RESOLVED_SYSTEM_PROPS_ID;
1016
1179
  const srcEntry = ctx.externalSourceEntries.get(id);
1017
1180
  if (srcEntry) return srcEntry;
1018
1181
  return null;
@@ -1025,7 +1188,7 @@ function loadVirtualModule(ctx, id) {
1025
1188
  targets: ctx.lcssTargets,
1026
1189
  warnFn: (msg) => ctx.warn(msg)
1027
1190
  };
1028
- if (id === "\0virtual:animus/styles.css") {
1191
+ if (id === RESOLVED_CSS_ID) {
1029
1192
  if (!ctx.isProd && ctx.storedSheets) {
1030
1193
  const { variables, body } = (0, _animus_ui_extract_pipeline.assembleStylesheet)({
1031
1194
  layers: ctx.options.layers,
@@ -1047,36 +1210,44 @@ function loadVirtualModule(ctx, id) {
1047
1210
  });
1048
1211
  return [variables, (0, _animus_ui_extract_pipeline.postProcessCss)(body, lcssOpts)].filter(Boolean).join("\n");
1049
1212
  }
1050
- if (id === "\0virtual:animus/components.js") return `export default \`${(0, _animus_ui_extract_pipeline.postProcessCss)((0, _animus_ui_extract_pipeline.stripLeadingLayerDeclaration)(ctx.resolvedComponentCss || ""), {
1213
+ if (id === RESOLVED_COMPONENTS_ID) return `export default \`${(0, _animus_ui_extract_pipeline.postProcessCss)((0, _animus_ui_extract_pipeline.stripLeadingLayerDeclaration)(ctx.resolvedComponentCss || ""), {
1051
1214
  ...lcssOpts,
1052
1215
  minify: false
1053
1216
  }).replace(/\\/g, "\\\\").replace(/`/g, "\\`").replace(/\$/g, "\\$")}\`;`;
1054
- if (id === "\0virtual:animus/hmr-bridge.js") return `
1217
+ if (id === RESOLVED_BRIDGE_ID) return `
1055
1218
  import css from '${VIRTUAL_COMPONENTS_ID}';
1056
1219
 
1057
1220
  const GLOBAL_KEY = '__animus_sheet_${(0, crypto.createHash)("md5").update(ctx.options.system).digest("hex").slice(0, 8)}__';
1058
1221
  let sheet = globalThis[GLOBAL_KEY] || null;
1059
1222
 
1060
- if (typeof CSSStyleSheet !== 'undefined' && 'adoptedStyleSheets' in document) {
1061
- if (!sheet) {
1062
- sheet = new CSSStyleSheet();
1063
- globalThis[GLOBAL_KEY] = sheet;
1064
- document.adoptedStyleSheets = [...document.adoptedStyleSheets, sheet];
1065
- }
1066
- sheet.replaceSync(css);
1067
- } else {
1068
- // Fallback: inject or update <style> tag
1069
- let el = document.querySelector('style[data-animus-components]');
1070
- if (!el) {
1071
- el = document.createElement('style');
1072
- el.setAttribute('data-animus-components', '');
1073
- document.head.appendChild(el);
1223
+ // Server evaluation is a no-op: SSR hosts reach this module through the
1224
+ // bridge import prepended to transformed component modules, and only the
1225
+ // browser pass owns a document.
1226
+ if (typeof document !== 'undefined') {
1227
+ if (typeof CSSStyleSheet !== 'undefined' && 'adoptedStyleSheets' in document) {
1228
+ if (!sheet) {
1229
+ sheet = new CSSStyleSheet();
1230
+ globalThis[GLOBAL_KEY] = sheet;
1231
+ document.adoptedStyleSheets = [...document.adoptedStyleSheets, sheet];
1232
+ }
1233
+ sheet.replaceSync(css);
1234
+ } else {
1235
+ // Fallback: inject or update <style> tag
1236
+ let el = document.querySelector('style[data-animus-components]');
1237
+ if (!el) {
1238
+ el = document.createElement('style');
1239
+ el.setAttribute('data-animus-components', '');
1240
+ document.head.appendChild(el);
1241
+ }
1242
+ el.textContent = css;
1074
1243
  }
1075
- el.textContent = css;
1076
1244
  }
1077
1245
 
1078
1246
  if (import.meta.hot) {
1079
1247
  import.meta.hot.accept('${VIRTUAL_COMPONENTS_ID}', (newModule) => {
1248
+ // The server module runner has a hot channel too; only the browser
1249
+ // pass owns a document to update.
1250
+ if (typeof document === 'undefined') return;
1080
1251
  if (sheet) {
1081
1252
  sheet.replaceSync(newModule.default);
1082
1253
  } else {
@@ -1086,12 +1257,7 @@ if (import.meta.hot) {
1086
1257
  });
1087
1258
  }
1088
1259
  `;
1089
- if (id === "\0virtual:animus/system-props") return (0, _animus_ui_extract_pipeline.buildSystemPropsModule)({
1090
- systemPropMapJson: ctx.storedSystemPropMapJson,
1091
- groupRegistryJson: ctx.system.groupRegistryJson,
1092
- dynamicProps: JSON.parse(ctx.storedDynamicPropsJson),
1093
- transformsSource: ctx.storedTransformsSource
1094
- });
1260
+ if (id === RESOLVED_SYSTEM_PROPS_ID) return systemPropsModuleSource(ctx);
1095
1261
  return null;
1096
1262
  }
1097
1263
  //#endregion
@@ -1107,6 +1273,9 @@ function animusExtract(options) {
1107
1273
  return {
1108
1274
  name: "animus-extract",
1109
1275
  enforce: "pre",
1276
+ config(_config, env) {
1277
+ return { define: { __ANIMUS_DEV__: env.command !== "build" } };
1278
+ },
1110
1279
  configureServer(server) {
1111
1280
  ctx.devServer = server;
1112
1281
  ctx.registerSystemWatchPaths();
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAUA,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;;;;;OAKG;IACH,MAAM,EAAE,MAAM,CAAC;IACf,gCAAgC;IAChC,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB;;;;;;;;OAQG;IAC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,CAAC;IACjB;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,2EAA2E;IAC3E,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC5B;;;;;OAKG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,IAAI,CAAC;IACd;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,mBAAmB,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;CACzD;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,oBAAoB,GAAG,MAAM,CA0EnE;eAEc,aAAa"}
@@ -1,8 +1,13 @@
1
1
  import type { PluginContext } from './context';
2
2
  /**
3
3
  * transform: replace builder chains with `createComponent()` calls using
4
- * the pre-built manifest; inject the HMR bridge import once in dev; detect
5
- * files created after buildStart and fold them into the analysis.
4
+ * the pre-built manifest; detect files created after buildStart and fold
5
+ * them into the analysis.
6
+ *
7
+ * The HMR bridge is NOT injected here — `transformIndexHtml` delivers it as a
8
+ * `<script type="module">` per served document (openspec:
9
+ * dev-stylesheet-management, "HMR bridge auto-injected in dev mode"; "Transform
10
+ * emitter unchanged" forbids the emitter importing it).
6
11
  */
7
12
  export declare function transformSource(ctx: PluginContext, code: string, id: string): {
8
13
  code: string;
@@ -1 +1 @@
1
- {"version":3,"file":"transform.d.ts","sourceRoot":"","sources":["../src/transform.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE/C;;;;GAIG;AACH,wBAAgB,eAAe,CAC7B,GAAG,EAAE,aAAa,EAClB,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,GACT;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,IAAI,CAAA;CAAE,GAAG,IAAI,CAuFpC"}
1
+ {"version":3,"file":"transform.d.ts","sourceRoot":"","sources":["../src/transform.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE/C;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAC7B,GAAG,EAAE,aAAa,EAClB,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,GACT;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,IAAI,CAAA;CAAE,GAAG,IAAI,CA0HpC"}
@@ -1 +1 @@
1
- {"version":3,"file":"virtual-modules.d.ts","sourceRoot":"","sources":["../src/virtual-modules.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE/C,2EAA2E;AAC3E,wBAAgB,gBAAgB,CAC9B,GAAG,EAAE,aAAa,EAClB,EAAE,EAAE,MAAM,GACT,MAAM,GAAG,IAAI,CAYf;AAED;wDACwD;AACxD,wBAAgB,iBAAiB,CAC/B,GAAG,EAAE,aAAa,EAClB,EAAE,EAAE,MAAM,GACT,MAAM,GAAG,IAAI,CAyGf"}
1
+ {"version":3,"file":"virtual-modules.d.ts","sourceRoot":"","sources":["../src/virtual-modules.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE/C,2EAA2E;AAC3E,wBAAgB,gBAAgB,CAC9B,GAAG,EAAE,aAAa,EAClB,EAAE,EAAE,MAAM,GACT,MAAM,GAAG,IAAI,CAYf;AAED;wDACwD;AACxD,wBAAgB,iBAAiB,CAC/B,GAAG,EAAE,aAAa,EAClB,EAAE,EAAE,MAAM,GACT,MAAM,GAAG,IAAI,CA8Gf"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@animus-ui/vite-plugin",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "Animus static CSS extraction Vite plugin",
5
5
  "keywords": [
6
6
  "animus",
@@ -39,7 +39,7 @@
39
39
  "compile": "tsc --noEmit"
40
40
  },
41
41
  "dependencies": {
42
- "@animus-ui/extract": "0.1.4",
42
+ "@animus-ui/extract": "0.1.5",
43
43
  "browserslist": "^4.24.0",
44
44
  "lightningcss": "^1.29.0"
45
45
  },