@animus-ui/unplugin 0.1.11 → 0.1.14

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,85 +1,43 @@
1
- import { AnimusConfigError, ENGINE_TRANSFORM_EXTENSIONS, assertKnownOptionKeys, assertNoRetiredEngineSelection, buildPathAliasesJson, isPathWithinRoot, readTsconfigAliasPairs, resolveMode } from "@animus-ui/extract/pipeline";
2
- import { ANIMUS_CSS_MODULE_ID, ExtractionSession, SESSION_ASSETS_DIR, TURBOPACK_SYSTEM_PROPS_ID, claimExclusiveSessionOwner, collectSessionAssets, engineApi, getAnalyzedHashes, getManifestJson, getSessionArtifactDir, getSharedCss, getSharedSystemProps } from "@animus-ui/extract/session";
1
+ import { AnimusConfigError, ENGINE_TRANSFORM_EXTENSIONS, assertKnownOptionKeys, assertNoRetiredEngineSelection, buildPathAliasesJson, isEngineTransformExtension, isPathWithinRoot, readTsconfigAliasPairs, resolveMode } from "@animus-ui/extract/pipeline";
2
+ import { ANIMUS_CSS_MODULE_ID, ExtractionSession, SESSION_ASSETS_DIR, TURBOPACK_SYSTEM_PROPS_ID, collectSessionAssets, engineApi, getAnalyzedHashes, getManifestJson, getSessionArtifactDir, getSharedCss, getSharedSystemProps } from "@animus-ui/extract/session";
3
3
  import { mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
4
4
  import { dirname, join, relative, resolve } from "node:path";
5
5
  //#region src/options.ts
6
- /**
7
- * Host option intake the transform host is the fourth driver over the
8
- * shared option core (openspec: standalone-extraction-cli, D2/D9): one
9
- * schema, `assertKnownOptionKeys` at the boundary, and an explicit
10
- * emission `mode` that is plumbed — never environment-sniffed (D10).
11
- *
12
- * Unlike the Vite/Next plugin drivers, this host HONORS the core `root`
13
- * key: rollup and esbuild expose no root authority a plugin could derive,
14
- * so the host's root is the explicit option, defaulting to the process
15
- * working directory (the CLI's shape, not the plugin drivers').
16
- */
17
- /**
18
- * Validate raw options and resolve the root authority. Throws
19
- * `AnimusConfigError` (the shared config-error class) on unknown keys,
20
- * invalid `mode` values, a retired engine selection, or a missing
21
- * `system`.
22
- */
6
+ /** rollup and esbuild expose no root authority a plugin could derive, so
7
+ * `root` is the explicit option, defaulting to the working directory. */
8
+ function isOptionString(value) {
9
+ if (Object(value) === value) return false;
10
+ try {
11
+ String.prototype.valueOf.call(value);
12
+ return true;
13
+ } catch {
14
+ return false;
15
+ }
16
+ }
17
+ function hasRequiredSystem(options) {
18
+ return isOptionString(options.system) && options.system.length > 0;
19
+ }
23
20
  function resolveHostOptions(raw, cwd = process.cwd()) {
24
21
  const options = raw ?? {};
25
22
  assertNoRetiredEngineSelection(options.engine);
26
23
  assertKnownOptionKeys(options);
27
- if (typeof options.system !== "string" || options.system.length === 0) throw new AnimusConfigError("Missing required option `system` — pass `system: \"./src/ds.ts\"` to the Animus plugin.");
24
+ if (!hasRequiredSystem(options)) throw new AnimusConfigError("Missing required option `system` — pass `system: \"./src/ds.ts\"` to the Animus plugin.");
28
25
  return {
29
26
  root: options.root ? resolve(cwd, options.root) : cwd,
30
27
  options
31
28
  };
32
29
  }
33
- /**
34
- * Resolve the effective emission mode: the explicit option wins over every
35
- * bundler signal; otherwise the adapter-supplied command oracle applies;
36
- * otherwise production (the documented host default — never NODE_ENV).
37
- */
38
30
  function resolveHostMode(explicit, oracle) {
39
31
  return resolveMode(explicit, () => oracle ?? "production").mode;
40
32
  }
41
33
  //#endregion
42
34
  //#region src/core.ts
43
- /**
44
- * The Animus transform host core (openspec: standalone-extraction-cli,
45
- * D4 under D10): an unplugin factory that drives the ONE
46
- * `ExtractionSession` at buildStart inside the consumer's bundler process
47
- * and serves per-file transforms from retained engine state. No artifacts,
48
- * no lock, no staleness protocol — analysis failure IS build failure,
49
- * never a passthrough (the session's strict/policy seams carry this).
50
- *
51
- * Ported from the winning DEF-1 prototype arm
52
- * (e2e/rollup-app/prototype/animus-t0-plugin.mjs), productized per the
53
- * inc 05 packet: the emitted CSS reaches the consumer as a real asset
54
- * (NS3 — the prototype's CSS-as-string module was measurement
55
- * scaffolding), `__ANIMUS_DEV__` goes through each adapter's define
56
- * mechanism, kit-specifier redirects come from the session's discovery
57
- * output (the Turbopack alias assembly generalized), and the session
58
- * directory is cleaned on success AND failure (inc 04 rider F6).
59
- *
60
- * ORDERING CONTRACT: the host transform must run before any TS/JSX
61
- * transpilation — the engine parses raw TSX. `enforce: 'pre'` covers
62
- * webpack/rspack; rollup consumers must list this plugin before their
63
- * transpiler (see the e2e/rollup-app lane config).
64
- */
65
- /** Resolved virtual id of the stylesheet import. Deliberately
66
- * extension-free: esbuild guesses loaders from extensions, and this
67
- * module is a JS stub in every bundler — the CSS itself is delivered as
68
- * an emitted asset, never as a module (NS3). No `\0` prefix: webpack's
69
- * virtual-module bridge requires plain ids. */
35
+ /** Extension-free: esbuild picks loaders by extension. No `\0` prefix:
36
+ * webpack's virtual-module bridge requires plain ids. */
70
37
  const STYLES_VIRTUAL_ID = "animus:styles";
71
- /** Resolved virtual id of the emitted system-props runtime module. */
72
38
  const PROPS_VIRTUAL_ID = "animus:system-props";
73
- /** File name of the emitted stylesheet asset. */
74
39
  const CSS_ASSET_NAME = "animus.css";
75
- /** Files the engine transform may rewrite — derived from the ONE shared
76
- * extension set (also the Turbopack rule glob's source). */
77
- const ENGINE_TRANSFORM_RE = new RegExp(`\\.(?:${ENGINE_TRANSFORM_EXTENSIONS.join("|")})$`);
78
- /** Files the transform hook claims at all (define substitution included —
79
- * `.cjs` carries no components but may read the dev-signal token). */
80
40
  const TRANSFORM_INCLUDE_RE = new RegExp(`\\.(?:${[...ENGINE_TRANSFORM_EXTENSIONS, "cjs"].join("|")})$`);
81
- /** Bare dev-signal token, assignment-guarded like @rollup/plugin-replace's
82
- * `preventAssignment` — `__ANIMUS_DEV__ = x` is left alone. */
83
41
  const DEV_DEFINE_RE = /\b__ANIMUS_DEV__\b(?!\s*=[^=])/g;
84
42
  function createHostState() {
85
43
  return {
@@ -95,25 +53,10 @@ function createHostState() {
95
53
  sessionDir: null
96
54
  };
97
55
  }
98
- /**
99
- * The transform-claim predicate over module paths. The analysis universe
100
- * deliberately excludes node_modules (external kits ride their own
101
- * collection path), so the transform must too — the Next webpack rule's
102
- * exclude, ported: without it every dependency module in the graph is
103
- * routed through the engine, scaling build time with dependency-graph size
104
- * instead of source-file count. node_modules paths are claimed only when
105
- * they belong to an ADMITTED external package (or are a kit redirect
106
- * target) — those carry builder chains the engine must rewrite. Such files
107
- * only enter the module graph after discovery published (their specifiers
108
- * resolve through the pipeline-gated kitRedirects), so consulting captured
109
- * state here is race-free.
110
- */
111
56
  function shouldClaimTransform(filePath, state) {
112
57
  if (!filePath.includes("node_modules")) return true;
113
58
  return state.redirectTargets.has(filePath) || state.externalPackageDirs.some((dir) => isPathWithinRoot(dir, filePath));
114
59
  }
115
- /** Remove the one-shot session tree; idempotent, runs on success AND
116
- * failure paths (inc 04 rider F6). */
117
60
  function disposeSessionDir(state, removeDir = (dir) => rmSync(dir, {
118
61
  recursive: true,
119
62
  force: true
@@ -123,11 +66,6 @@ function disposeSessionDir(state, removeDir = (dir) => rmSync(dir, {
123
66
  state.sessionDir = null;
124
67
  }
125
68
  }
126
- /**
127
- * Run one pipeline attempt through the shared drive loop, recording it as
128
- * `state.pipeline` for hook joiners. A failed attempt disposes the session
129
- * directory before rethrowing — the consumer's build fails; nothing leaks.
130
- */
131
69
  async function drivePipeline(state, run, removeDir) {
132
70
  const attempt = run();
133
71
  state.pipeline = attempt;
@@ -139,82 +77,42 @@ async function drivePipeline(state, run, removeDir) {
139
77
  throw error;
140
78
  }
141
79
  }
142
- /**
143
- * Map an import id onto the host's CONSTANT resolution family: the
144
- * stylesheet id and the system-props id — the mappings that answer without
145
- * the pipeline. Kit-specifier redirects are the caller's second step (they
146
- * exist only after discovery published, behind the pipeline join).
147
- */
148
80
  function resolveAnimusId(id) {
149
81
  if (id === ANIMUS_CSS_MODULE_ID || id.endsWith(`/${ANIMUS_CSS_MODULE_ID}`)) return STYLES_VIRTUAL_ID;
150
82
  if (id === "animus:styles" || id === "animus:system-props") return id;
151
83
  if (id === TURBOPACK_SYSTEM_PROPS_ID) return PROPS_VIRTUAL_ID;
152
84
  return null;
153
85
  }
154
- /**
155
- * Substitute the bare `__ANIMUS_DEV__` token with its boolean literal —
156
- * the define mechanism for bundlers without a native one (rollup). The
157
- * token-as-initializer-conditional shape in the system runtime's is-dev
158
- * module folds under the bundler's own dead-branch elimination once the
159
- * literal lands. Returns null when the code carries no token.
160
- */
161
86
  function substituteDevDefine(code, isDev) {
162
87
  if (!code.includes("__ANIMUS_DEV__")) return null;
163
88
  return code.replace(DEV_DEFINE_RE, isDev ? "true" : "false");
164
89
  }
165
- /**
166
- * Per-file engine transform from retained state. The path handed to the
167
- * engine is the rootDir-relative posix key the analysis used — external
168
- * kit sources ride the same derivation (`../…` keys). Files outside the
169
- * analysis universe come back unchanged (`hasComponents: false`); a
170
- * transform before analysis fails loud inside the engine adapter.
171
- */
172
90
  function transformWithEngine(code, id, ctx) {
173
91
  const filename = relative(ctx.rootDir, resolve(id)).split("\\").join("/");
174
92
  const result = ctx.transformFile(code, filename, ctx.manifestJson);
175
93
  return result.hasComponents ? result.code : null;
176
94
  }
177
- /** Strip a bundler query suffix (`?worker`, webpack resource queries). */
178
95
  function moduleFilePath(id) {
179
96
  const query = id.indexOf("?");
180
97
  return query === -1 ? id : id.slice(0, query);
181
98
  }
182
99
  const PLUGIN_NAME = "animus-host";
183
- /**
184
- * The one-live-host-per-process constraint, enforced where the invariant
185
- * lives: the SESSION singleton (its slots are what concurrent hosts would
186
- * clobber). Re-exported under the host's historical name; the key sits in
187
- * `SINGLETON_GLOBAL_KEYS`, so test harness resets clear a leaked claim.
188
- */
189
- const claimProcessHost = claimExclusiveSessionOwner;
190
- /**
191
- * The unplugin factory. One factory invocation = one host = one session
192
- * per build; the singleton drive loop stays exactly-one (guardrail G1 —
193
- * the host defines no session class and no drive loop of its own).
194
- */
195
100
  const unpluginFactory = (rawOptions, meta) => {
196
101
  const { root, options } = resolveHostOptions(rawOptions);
197
102
  const state = createHostState();
198
- /** Release handle of this host's process claim, or null when not held. */
199
- let releaseHostClaim = null;
200
- /** Adapter-supplied command oracle (null = no bundler signal). */
103
+ let activeSession = null;
201
104
  let modeOracle = null;
202
105
  let esbuildOptions = null;
203
- /** Resolves once buildStart has begun hooks that can fire before the
204
- * bundler-parallel buildStart (webpack's make taps run concurrently)
205
- * wait on this, then join the pipeline itself. */
106
+ /** Hooks can fire before buildStart (webpack's make taps run
107
+ * concurrently), so joiners await this before awaiting the pipeline. */
206
108
  let signalPipelineStarted;
207
109
  const pipelineStarted = new Promise((res) => {
208
110
  signalPipelineStarted = res;
209
111
  });
210
112
  const effectiveMode = () => resolveHostMode(options.mode, modeOracle);
211
- /** The define is supplied natively where the bundler has a mechanism
212
- * (esbuild define, webpack/rspack DefinePlugin); everywhere else the
213
- * transform substitutes the token itself. */
214
113
  const needsInlineDefine = meta.framework !== "esbuild" && meta.framework !== "webpack" && meta.framework !== "rspack";
215
114
  async function startPipeline() {
216
115
  signalPipelineStarted();
217
- releaseHostClaim = claimProcessHost(`${PLUGIN_NAME}:${root}`);
218
116
  try {
219
117
  await runClaimedPipeline();
220
118
  } catch (error) {
@@ -223,8 +121,8 @@ const unpluginFactory = (rawOptions, meta) => {
223
121
  }
224
122
  }
225
123
  function releaseClaim() {
226
- releaseHostClaim?.();
227
- releaseHostClaim = null;
124
+ activeSession?.close();
125
+ activeSession = null;
228
126
  }
229
127
  async function runClaimedPipeline() {
230
128
  await drivePipeline(state, async () => {
@@ -234,10 +132,12 @@ const unpluginFactory = (rawOptions, meta) => {
234
132
  ...options,
235
133
  mode
236
134
  });
135
+ activeSession = session;
237
136
  session.driverLabel = "animus-unplugin";
238
137
  session.rootDir = root;
239
138
  session.systemPropsModuleId = TURBOPACK_SYSTEM_PROPS_ID;
240
- const builtAliases = buildPathAliasesJson(readTsconfigAliasPairs(root), root);
139
+ const aliasPairs = readTsconfigAliasPairs(root);
140
+ const builtAliases = buildPathAliasesJson(aliasPairs, root);
241
141
  if (builtAliases) session.pathAliasesJson = builtAliases.json;
242
142
  await session.runFullPipeline();
243
143
  state.sessionDir = getSessionArtifactDir();
@@ -257,10 +157,6 @@ const unpluginFactory = (rawOptions, meta) => {
257
157
  state.transformFile = engineApi().transformFile;
258
158
  });
259
159
  }
260
- /** Join the analysis: every serving hook waits for buildStart to have
261
- * begun, then for the pipeline to have published. A rejected pipeline
262
- * rejects every joiner — analysis failure is build failure, never a
263
- * passthrough. */
264
160
  async function joinPipeline() {
265
161
  await pipelineStarted;
266
162
  await state.pipeline;
@@ -278,7 +174,8 @@ const unpluginFactory = (rawOptions, meta) => {
278
174
  console.warn(`[animus] esbuild \`write: false\` build — the extracted stylesheet (${CSS_ASSET_NAME}) and its asset files were NOT produced (no in-memory output seam); use \`write: true\` or the standalone \`animus build\` CLI for in-memory pipelines`);
279
175
  return;
280
176
  }
281
- const absOut = resolve(esbuildOptions?.absWorkingDir ?? process.cwd(), outDir);
177
+ const base = esbuildOptions?.absWorkingDir ?? process.cwd();
178
+ const absOut = resolve(base, outDir);
282
179
  mkdirSync(absOut, { recursive: true });
283
180
  writeFileSync(join(absOut, CSS_ASSET_NAME), state.cssText);
284
181
  if (assets.length > 0) {
@@ -298,11 +195,8 @@ const unpluginFactory = (rawOptions, meta) => {
298
195
  source: bytes
299
196
  });
300
197
  }
301
- /** Register the analysis universe with the bundler's watcher the
302
- * session analyzes a filesystem WALK, so watch mode misses edits to
303
- * analyzed-but-unimported files (and tsconfig/system deps) without
304
- * this. esbuild has no per-plugin watch-file seam; its rebuilds rely on
305
- * the module graph alone. */
198
+ /** Analysis is a filesystem walk, so watch mode misses edits to
199
+ * analyzed-but-unimported files. esbuild has no watch-file seam. */
306
200
  function registerWatchTargets(context) {
307
201
  if (meta.framework === "esbuild") return;
308
202
  for (const path of state.watchPaths) try {
@@ -356,7 +250,7 @@ const unpluginFactory = (rawOptions, meta) => {
356
250
  await joinPipeline();
357
251
  const filePath = moduleFilePath(id);
358
252
  let output = code;
359
- if (ENGINE_TRANSFORM_RE.test(filePath)) {
253
+ if (isEngineTransformExtension(filePath)) {
360
254
  const transformFile = state.transformFile ?? engineApi().transformFile;
361
255
  const transformed = transformWithEngine(output, filePath, {
362
256
  rootDir: root,
@@ -3,83 +3,41 @@ let _animus_ui_extract_session = require("@animus-ui/extract/session");
3
3
  let node_fs = require("node:fs");
4
4
  let node_path = require("node:path");
5
5
  //#region src/options.ts
6
- /**
7
- * Host option intake the transform host is the fourth driver over the
8
- * shared option core (openspec: standalone-extraction-cli, D2/D9): one
9
- * schema, `assertKnownOptionKeys` at the boundary, and an explicit
10
- * emission `mode` that is plumbed — never environment-sniffed (D10).
11
- *
12
- * Unlike the Vite/Next plugin drivers, this host HONORS the core `root`
13
- * key: rollup and esbuild expose no root authority a plugin could derive,
14
- * so the host's root is the explicit option, defaulting to the process
15
- * working directory (the CLI's shape, not the plugin drivers').
16
- */
17
- /**
18
- * Validate raw options and resolve the root authority. Throws
19
- * `AnimusConfigError` (the shared config-error class) on unknown keys,
20
- * invalid `mode` values, a retired engine selection, or a missing
21
- * `system`.
22
- */
6
+ /** rollup and esbuild expose no root authority a plugin could derive, so
7
+ * `root` is the explicit option, defaulting to the working directory. */
8
+ function isOptionString(value) {
9
+ if (Object(value) === value) return false;
10
+ try {
11
+ String.prototype.valueOf.call(value);
12
+ return true;
13
+ } catch {
14
+ return false;
15
+ }
16
+ }
17
+ function hasRequiredSystem(options) {
18
+ return isOptionString(options.system) && options.system.length > 0;
19
+ }
23
20
  function resolveHostOptions(raw, cwd = process.cwd()) {
24
21
  const options = raw ?? {};
25
22
  (0, _animus_ui_extract_pipeline.assertNoRetiredEngineSelection)(options.engine);
26
23
  (0, _animus_ui_extract_pipeline.assertKnownOptionKeys)(options);
27
- if (typeof options.system !== "string" || options.system.length === 0) throw new _animus_ui_extract_pipeline.AnimusConfigError("Missing required option `system` — pass `system: \"./src/ds.ts\"` to the Animus plugin.");
24
+ if (!hasRequiredSystem(options)) throw new _animus_ui_extract_pipeline.AnimusConfigError("Missing required option `system` — pass `system: \"./src/ds.ts\"` to the Animus plugin.");
28
25
  return {
29
26
  root: options.root ? (0, node_path.resolve)(cwd, options.root) : cwd,
30
27
  options
31
28
  };
32
29
  }
33
- /**
34
- * Resolve the effective emission mode: the explicit option wins over every
35
- * bundler signal; otherwise the adapter-supplied command oracle applies;
36
- * otherwise production (the documented host default — never NODE_ENV).
37
- */
38
30
  function resolveHostMode(explicit, oracle) {
39
31
  return (0, _animus_ui_extract_pipeline.resolveMode)(explicit, () => oracle ?? "production").mode;
40
32
  }
41
33
  //#endregion
42
34
  //#region src/core.ts
43
- /**
44
- * The Animus transform host core (openspec: standalone-extraction-cli,
45
- * D4 under D10): an unplugin factory that drives the ONE
46
- * `ExtractionSession` at buildStart inside the consumer's bundler process
47
- * and serves per-file transforms from retained engine state. No artifacts,
48
- * no lock, no staleness protocol — analysis failure IS build failure,
49
- * never a passthrough (the session's strict/policy seams carry this).
50
- *
51
- * Ported from the winning DEF-1 prototype arm
52
- * (e2e/rollup-app/prototype/animus-t0-plugin.mjs), productized per the
53
- * inc 05 packet: the emitted CSS reaches the consumer as a real asset
54
- * (NS3 — the prototype's CSS-as-string module was measurement
55
- * scaffolding), `__ANIMUS_DEV__` goes through each adapter's define
56
- * mechanism, kit-specifier redirects come from the session's discovery
57
- * output (the Turbopack alias assembly generalized), and the session
58
- * directory is cleaned on success AND failure (inc 04 rider F6).
59
- *
60
- * ORDERING CONTRACT: the host transform must run before any TS/JSX
61
- * transpilation — the engine parses raw TSX. `enforce: 'pre'` covers
62
- * webpack/rspack; rollup consumers must list this plugin before their
63
- * transpiler (see the e2e/rollup-app lane config).
64
- */
65
- /** Resolved virtual id of the stylesheet import. Deliberately
66
- * extension-free: esbuild guesses loaders from extensions, and this
67
- * module is a JS stub in every bundler — the CSS itself is delivered as
68
- * an emitted asset, never as a module (NS3). No `\0` prefix: webpack's
69
- * virtual-module bridge requires plain ids. */
35
+ /** Extension-free: esbuild picks loaders by extension. No `\0` prefix:
36
+ * webpack's virtual-module bridge requires plain ids. */
70
37
  const STYLES_VIRTUAL_ID = "animus:styles";
71
- /** Resolved virtual id of the emitted system-props runtime module. */
72
38
  const PROPS_VIRTUAL_ID = "animus:system-props";
73
- /** File name of the emitted stylesheet asset. */
74
39
  const CSS_ASSET_NAME = "animus.css";
75
- /** Files the engine transform may rewrite — derived from the ONE shared
76
- * extension set (also the Turbopack rule glob's source). */
77
- const ENGINE_TRANSFORM_RE = new RegExp(`\\.(?:${_animus_ui_extract_pipeline.ENGINE_TRANSFORM_EXTENSIONS.join("|")})$`);
78
- /** Files the transform hook claims at all (define substitution included —
79
- * `.cjs` carries no components but may read the dev-signal token). */
80
40
  const TRANSFORM_INCLUDE_RE = new RegExp(`\\.(?:${[..._animus_ui_extract_pipeline.ENGINE_TRANSFORM_EXTENSIONS, "cjs"].join("|")})$`);
81
- /** Bare dev-signal token, assignment-guarded like @rollup/plugin-replace's
82
- * `preventAssignment` — `__ANIMUS_DEV__ = x` is left alone. */
83
41
  const DEV_DEFINE_RE = /\b__ANIMUS_DEV__\b(?!\s*=[^=])/g;
84
42
  function createHostState() {
85
43
  return {
@@ -95,25 +53,10 @@ function createHostState() {
95
53
  sessionDir: null
96
54
  };
97
55
  }
98
- /**
99
- * The transform-claim predicate over module paths. The analysis universe
100
- * deliberately excludes node_modules (external kits ride their own
101
- * collection path), so the transform must too — the Next webpack rule's
102
- * exclude, ported: without it every dependency module in the graph is
103
- * routed through the engine, scaling build time with dependency-graph size
104
- * instead of source-file count. node_modules paths are claimed only when
105
- * they belong to an ADMITTED external package (or are a kit redirect
106
- * target) — those carry builder chains the engine must rewrite. Such files
107
- * only enter the module graph after discovery published (their specifiers
108
- * resolve through the pipeline-gated kitRedirects), so consulting captured
109
- * state here is race-free.
110
- */
111
56
  function shouldClaimTransform(filePath, state) {
112
57
  if (!filePath.includes("node_modules")) return true;
113
58
  return state.redirectTargets.has(filePath) || state.externalPackageDirs.some((dir) => (0, _animus_ui_extract_pipeline.isPathWithinRoot)(dir, filePath));
114
59
  }
115
- /** Remove the one-shot session tree; idempotent, runs on success AND
116
- * failure paths (inc 04 rider F6). */
117
60
  function disposeSessionDir(state, removeDir = (dir) => (0, node_fs.rmSync)(dir, {
118
61
  recursive: true,
119
62
  force: true
@@ -123,11 +66,6 @@ function disposeSessionDir(state, removeDir = (dir) => (0, node_fs.rmSync)(dir,
123
66
  state.sessionDir = null;
124
67
  }
125
68
  }
126
- /**
127
- * Run one pipeline attempt through the shared drive loop, recording it as
128
- * `state.pipeline` for hook joiners. A failed attempt disposes the session
129
- * directory before rethrowing — the consumer's build fails; nothing leaks.
130
- */
131
69
  async function drivePipeline(state, run, removeDir) {
132
70
  const attempt = run();
133
71
  state.pipeline = attempt;
@@ -139,82 +77,42 @@ async function drivePipeline(state, run, removeDir) {
139
77
  throw error;
140
78
  }
141
79
  }
142
- /**
143
- * Map an import id onto the host's CONSTANT resolution family: the
144
- * stylesheet id and the system-props id — the mappings that answer without
145
- * the pipeline. Kit-specifier redirects are the caller's second step (they
146
- * exist only after discovery published, behind the pipeline join).
147
- */
148
80
  function resolveAnimusId(id) {
149
81
  if (id === _animus_ui_extract_session.ANIMUS_CSS_MODULE_ID || id.endsWith(`/${_animus_ui_extract_session.ANIMUS_CSS_MODULE_ID}`)) return STYLES_VIRTUAL_ID;
150
82
  if (id === "animus:styles" || id === "animus:system-props") return id;
151
83
  if (id === _animus_ui_extract_session.TURBOPACK_SYSTEM_PROPS_ID) return PROPS_VIRTUAL_ID;
152
84
  return null;
153
85
  }
154
- /**
155
- * Substitute the bare `__ANIMUS_DEV__` token with its boolean literal —
156
- * the define mechanism for bundlers without a native one (rollup). The
157
- * token-as-initializer-conditional shape in the system runtime's is-dev
158
- * module folds under the bundler's own dead-branch elimination once the
159
- * literal lands. Returns null when the code carries no token.
160
- */
161
86
  function substituteDevDefine(code, isDev) {
162
87
  if (!code.includes("__ANIMUS_DEV__")) return null;
163
88
  return code.replace(DEV_DEFINE_RE, isDev ? "true" : "false");
164
89
  }
165
- /**
166
- * Per-file engine transform from retained state. The path handed to the
167
- * engine is the rootDir-relative posix key the analysis used — external
168
- * kit sources ride the same derivation (`../…` keys). Files outside the
169
- * analysis universe come back unchanged (`hasComponents: false`); a
170
- * transform before analysis fails loud inside the engine adapter.
171
- */
172
90
  function transformWithEngine(code, id, ctx) {
173
91
  const filename = (0, node_path.relative)(ctx.rootDir, (0, node_path.resolve)(id)).split("\\").join("/");
174
92
  const result = ctx.transformFile(code, filename, ctx.manifestJson);
175
93
  return result.hasComponents ? result.code : null;
176
94
  }
177
- /** Strip a bundler query suffix (`?worker`, webpack resource queries). */
178
95
  function moduleFilePath(id) {
179
96
  const query = id.indexOf("?");
180
97
  return query === -1 ? id : id.slice(0, query);
181
98
  }
182
99
  const PLUGIN_NAME = "animus-host";
183
- /**
184
- * The one-live-host-per-process constraint, enforced where the invariant
185
- * lives: the SESSION singleton (its slots are what concurrent hosts would
186
- * clobber). Re-exported under the host's historical name; the key sits in
187
- * `SINGLETON_GLOBAL_KEYS`, so test harness resets clear a leaked claim.
188
- */
189
- const claimProcessHost = _animus_ui_extract_session.claimExclusiveSessionOwner;
190
- /**
191
- * The unplugin factory. One factory invocation = one host = one session
192
- * per build; the singleton drive loop stays exactly-one (guardrail G1 —
193
- * the host defines no session class and no drive loop of its own).
194
- */
195
100
  const unpluginFactory = (rawOptions, meta) => {
196
101
  const { root, options } = resolveHostOptions(rawOptions);
197
102
  const state = createHostState();
198
- /** Release handle of this host's process claim, or null when not held. */
199
- let releaseHostClaim = null;
200
- /** Adapter-supplied command oracle (null = no bundler signal). */
103
+ let activeSession = null;
201
104
  let modeOracle = null;
202
105
  let esbuildOptions = null;
203
- /** Resolves once buildStart has begun hooks that can fire before the
204
- * bundler-parallel buildStart (webpack's make taps run concurrently)
205
- * wait on this, then join the pipeline itself. */
106
+ /** Hooks can fire before buildStart (webpack's make taps run
107
+ * concurrently), so joiners await this before awaiting the pipeline. */
206
108
  let signalPipelineStarted;
207
109
  const pipelineStarted = new Promise((res) => {
208
110
  signalPipelineStarted = res;
209
111
  });
210
112
  const effectiveMode = () => resolveHostMode(options.mode, modeOracle);
211
- /** The define is supplied natively where the bundler has a mechanism
212
- * (esbuild define, webpack/rspack DefinePlugin); everywhere else the
213
- * transform substitutes the token itself. */
214
113
  const needsInlineDefine = meta.framework !== "esbuild" && meta.framework !== "webpack" && meta.framework !== "rspack";
215
114
  async function startPipeline() {
216
115
  signalPipelineStarted();
217
- releaseHostClaim = claimProcessHost(`${PLUGIN_NAME}:${root}`);
218
116
  try {
219
117
  await runClaimedPipeline();
220
118
  } catch (error) {
@@ -223,8 +121,8 @@ const unpluginFactory = (rawOptions, meta) => {
223
121
  }
224
122
  }
225
123
  function releaseClaim() {
226
- releaseHostClaim?.();
227
- releaseHostClaim = null;
124
+ activeSession?.close();
125
+ activeSession = null;
228
126
  }
229
127
  async function runClaimedPipeline() {
230
128
  await drivePipeline(state, async () => {
@@ -234,10 +132,12 @@ const unpluginFactory = (rawOptions, meta) => {
234
132
  ...options,
235
133
  mode
236
134
  });
135
+ activeSession = session;
237
136
  session.driverLabel = "animus-unplugin";
238
137
  session.rootDir = root;
239
138
  session.systemPropsModuleId = _animus_ui_extract_session.TURBOPACK_SYSTEM_PROPS_ID;
240
- const builtAliases = (0, _animus_ui_extract_pipeline.buildPathAliasesJson)((0, _animus_ui_extract_pipeline.readTsconfigAliasPairs)(root), root);
139
+ const aliasPairs = (0, _animus_ui_extract_pipeline.readTsconfigAliasPairs)(root);
140
+ const builtAliases = (0, _animus_ui_extract_pipeline.buildPathAliasesJson)(aliasPairs, root);
241
141
  if (builtAliases) session.pathAliasesJson = builtAliases.json;
242
142
  await session.runFullPipeline();
243
143
  state.sessionDir = (0, _animus_ui_extract_session.getSessionArtifactDir)();
@@ -257,10 +157,6 @@ const unpluginFactory = (rawOptions, meta) => {
257
157
  state.transformFile = (0, _animus_ui_extract_session.engineApi)().transformFile;
258
158
  });
259
159
  }
260
- /** Join the analysis: every serving hook waits for buildStart to have
261
- * begun, then for the pipeline to have published. A rejected pipeline
262
- * rejects every joiner — analysis failure is build failure, never a
263
- * passthrough. */
264
160
  async function joinPipeline() {
265
161
  await pipelineStarted;
266
162
  await state.pipeline;
@@ -278,7 +174,8 @@ const unpluginFactory = (rawOptions, meta) => {
278
174
  console.warn(`[animus] esbuild \`write: false\` build — the extracted stylesheet (${CSS_ASSET_NAME}) and its asset files were NOT produced (no in-memory output seam); use \`write: true\` or the standalone \`animus build\` CLI for in-memory pipelines`);
279
175
  return;
280
176
  }
281
- const absOut = (0, node_path.resolve)(esbuildOptions?.absWorkingDir ?? process.cwd(), outDir);
177
+ const base = esbuildOptions?.absWorkingDir ?? process.cwd();
178
+ const absOut = (0, node_path.resolve)(base, outDir);
282
179
  (0, node_fs.mkdirSync)(absOut, { recursive: true });
283
180
  (0, node_fs.writeFileSync)((0, node_path.join)(absOut, CSS_ASSET_NAME), state.cssText);
284
181
  if (assets.length > 0) {
@@ -298,11 +195,8 @@ const unpluginFactory = (rawOptions, meta) => {
298
195
  source: bytes
299
196
  });
300
197
  }
301
- /** Register the analysis universe with the bundler's watcher the
302
- * session analyzes a filesystem WALK, so watch mode misses edits to
303
- * analyzed-but-unimported files (and tsconfig/system deps) without
304
- * this. esbuild has no per-plugin watch-file seam; its rebuilds rely on
305
- * the module graph alone. */
198
+ /** Analysis is a filesystem walk, so watch mode misses edits to
199
+ * analyzed-but-unimported files. esbuild has no watch-file seam. */
306
200
  function registerWatchTargets(context) {
307
201
  if (meta.framework === "esbuild") return;
308
202
  for (const path of state.watchPaths) try {
@@ -356,7 +250,7 @@ const unpluginFactory = (rawOptions, meta) => {
356
250
  await joinPipeline();
357
251
  const filePath = moduleFilePath(id);
358
252
  let output = code;
359
- if (ENGINE_TRANSFORM_RE.test(filePath)) {
253
+ if ((0, _animus_ui_extract_pipeline.isEngineTransformExtension)(filePath)) {
360
254
  const transformFile = state.transformFile ?? (0, _animus_ui_extract_session.engineApi)().transformFile;
361
255
  const transformed = transformWithEngine(output, filePath, {
362
256
  rootDir: root,
package/dist/core.d.ts CHANGED
@@ -1,117 +1,32 @@
1
- /**
2
- * The Animus transform host core (openspec: standalone-extraction-cli,
3
- * D4 under D10): an unplugin factory that drives the ONE
4
- * `ExtractionSession` at buildStart inside the consumer's bundler process
5
- * and serves per-file transforms from retained engine state. No artifacts,
6
- * no lock, no staleness protocol — analysis failure IS build failure,
7
- * never a passthrough (the session's strict/policy seams carry this).
8
- *
9
- * Ported from the winning DEF-1 prototype arm
10
- * (e2e/rollup-app/prototype/animus-t0-plugin.mjs), productized per the
11
- * inc 05 packet: the emitted CSS reaches the consumer as a real asset
12
- * (NS3 — the prototype's CSS-as-string module was measurement
13
- * scaffolding), `__ANIMUS_DEV__` goes through each adapter's define
14
- * mechanism, kit-specifier redirects come from the session's discovery
15
- * output (the Turbopack alias assembly generalized), and the session
16
- * directory is cleaned on success AND failure (inc 04 rider F6).
17
- *
18
- * ORDERING CONTRACT: the host transform must run before any TS/JSX
19
- * transpilation — the engine parses raw TSX. `enforce: 'pre'` covers
20
- * webpack/rspack; rollup consumers must list this plugin before their
21
- * transpiler (see the e2e/rollup-app lane config).
22
- */
23
- import { claimExclusiveSessionOwner } from '@animus-ui/extract/session';
24
1
  import type { AnimusUnpluginOptions } from './options';
25
2
  import type { AnimusMode } from '@animus-ui/extract/pipeline';
26
3
  import type { UnpluginFactory } from 'unplugin';
27
- /** Resolved virtual id of the stylesheet import. Deliberately
28
- * extension-free: esbuild guesses loaders from extensions, and this
29
- * module is a JS stub in every bundler — the CSS itself is delivered as
30
- * an emitted asset, never as a module (NS3). No `\0` prefix: webpack's
31
- * virtual-module bridge requires plain ids. */
4
+ /** Extension-free: esbuild picks loaders by extension. No `\0` prefix:
5
+ * webpack's virtual-module bridge requires plain ids. */
32
6
  export declare const STYLES_VIRTUAL_ID = "animus:styles";
33
- /** Resolved virtual id of the emitted system-props runtime module. */
34
7
  export declare const PROPS_VIRTUAL_ID = "animus:system-props";
35
- /** File name of the emitted stylesheet asset. */
36
8
  export declare const CSS_ASSET_NAME = "animus.css";
37
- /** Mutable per-build host state (one per factory invocation). */
38
9
  export interface HostState {
39
- /** The in-flight (or settled) analysis; transforms and loads await it. */
40
10
  pipeline: Promise<void> | null;
41
- /** Resolved emission mode of the current build. */
42
11
  mode: AnimusMode | null;
43
- /** Assembled stylesheet of the published analysis ('' until published). */
44
12
  cssText: string;
45
- /** Emitted system-props runtime module source. */
46
13
  systemPropsJs: string;
47
- /** Kit specifier → absolute analyzed source entry (discovery output). */
48
14
  kitRedirects: Map<string, string>;
49
- /** Absolute analyzed entries (values of kitRedirects) — load allowlist. */
50
15
  redirectTargets: Set<string>;
51
- /** Admitted external package dirs (discovery output) — the ONLY
52
- * node_modules subtrees the transform claims. */
53
16
  externalPackageDirs: string[];
54
- /** Absolute paths of the ANALYSIS UNIVERSE — every analyzed source file
55
- * plus the system module's evaluated dependencies, asset() files, and
56
- * the tsconfig alias source. Registered with the bundler's watcher: the
57
- * session analyzes a filesystem walk, not the module graph, so an edit
58
- * to an analyzed-but-unimported file must still trigger a rebuild. */
59
17
  watchPaths: string[];
60
- /** The engine adapter's transformFile, resolved once per pipeline run —
61
- * never per module. */
62
18
  transformFile: ((source: string, path: string, manifestJson: string) => {
63
19
  code: string;
64
20
  hasComponents: boolean;
65
21
  }) | null;
66
- /** Session artifact directory awaiting cleanup, or null. */
67
22
  sessionDir: string | null;
68
23
  }
69
24
  export declare function createHostState(): HostState;
70
- /**
71
- * The transform-claim predicate over module paths. The analysis universe
72
- * deliberately excludes node_modules (external kits ride their own
73
- * collection path), so the transform must too — the Next webpack rule's
74
- * exclude, ported: without it every dependency module in the graph is
75
- * routed through the engine, scaling build time with dependency-graph size
76
- * instead of source-file count. node_modules paths are claimed only when
77
- * they belong to an ADMITTED external package (or are a kit redirect
78
- * target) — those carry builder chains the engine must rewrite. Such files
79
- * only enter the module graph after discovery published (their specifiers
80
- * resolve through the pipeline-gated kitRedirects), so consulting captured
81
- * state here is race-free.
82
- */
83
25
  export declare function shouldClaimTransform(filePath: string, state: Pick<HostState, 'externalPackageDirs' | 'redirectTargets'>): boolean;
84
- /** Remove the one-shot session tree; idempotent, runs on success AND
85
- * failure paths (inc 04 rider F6). */
86
26
  export declare function disposeSessionDir(state: HostState, removeDir?: (dir: string) => void): void;
87
- /**
88
- * Run one pipeline attempt through the shared drive loop, recording it as
89
- * `state.pipeline` for hook joiners. A failed attempt disposes the session
90
- * directory before rethrowing — the consumer's build fails; nothing leaks.
91
- */
92
27
  export declare function drivePipeline(state: HostState, run: () => Promise<void>, removeDir?: (dir: string) => void): Promise<void>;
93
- /**
94
- * Map an import id onto the host's CONSTANT resolution family: the
95
- * stylesheet id and the system-props id — the mappings that answer without
96
- * the pipeline. Kit-specifier redirects are the caller's second step (they
97
- * exist only after discovery published, behind the pipeline join).
98
- */
99
28
  export declare function resolveAnimusId(id: string): string | null;
100
- /**
101
- * Substitute the bare `__ANIMUS_DEV__` token with its boolean literal —
102
- * the define mechanism for bundlers without a native one (rollup). The
103
- * token-as-initializer-conditional shape in the system runtime's is-dev
104
- * module folds under the bundler's own dead-branch elimination once the
105
- * literal lands. Returns null when the code carries no token.
106
- */
107
29
  export declare function substituteDevDefine(code: string, isDev: boolean): string | null;
108
- /**
109
- * Per-file engine transform from retained state. The path handed to the
110
- * engine is the rootDir-relative posix key the analysis used — external
111
- * kit sources ride the same derivation (`../…` keys). Files outside the
112
- * analysis universe come back unchanged (`hasComponents: false`); a
113
- * transform before analysis fails loud inside the engine adapter.
114
- */
115
30
  export declare function transformWithEngine(code: string, id: string, ctx: {
116
31
  rootDir: string;
117
32
  manifestJson: string;
@@ -120,17 +35,5 @@ export declare function transformWithEngine(code: string, id: string, ctx: {
120
35
  hasComponents: boolean;
121
36
  };
122
37
  }): string | null;
123
- /**
124
- * The one-live-host-per-process constraint, enforced where the invariant
125
- * lives: the SESSION singleton (its slots are what concurrent hosts would
126
- * clobber). Re-exported under the host's historical name; the key sits in
127
- * `SINGLETON_GLOBAL_KEYS`, so test harness resets clear a leaked claim.
128
- */
129
- export declare const claimProcessHost: typeof claimExclusiveSessionOwner;
130
- /**
131
- * The unplugin factory. One factory invocation = one host = one session
132
- * per build; the singleton drive loop stays exactly-one (guardrail G1 —
133
- * the host defines no session class and no drive loop of its own).
134
- */
135
38
  export declare const unpluginFactory: UnpluginFactory<AnimusUnpluginOptions | undefined>;
136
39
  //# sourceMappingURL=core.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAQH,OAAO,EAEL,0BAA0B,EAW3B,MAAM,4BAA4B,CAAC;AAMpC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AACvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,KAAK,EAAwB,eAAe,EAAE,MAAM,UAAU,CAAC;AAEtE;;;;gDAIgD;AAChD,eAAO,MAAM,iBAAiB,kBAAkB,CAAC;AAEjD,sEAAsE;AACtE,eAAO,MAAM,gBAAgB,wBAAwB,CAAC;AAEtD,iDAAiD;AACjD,eAAO,MAAM,cAAc,eAAe,CAAC;AAkB3C,iEAAiE;AACjE,MAAM,WAAW,SAAS;IACxB,0EAA0E;IAC1E,QAAQ,EAAE,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAC/B,mDAAmD;IACnD,IAAI,EAAE,UAAU,GAAG,IAAI,CAAC;IACxB,2EAA2E;IAC3E,OAAO,EAAE,MAAM,CAAC;IAChB,kDAAkD;IAClD,aAAa,EAAE,MAAM,CAAC;IACtB,yEAAyE;IACzE,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAClC,2EAA2E;IAC3E,eAAe,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC7B;sDACkD;IAClD,mBAAmB,EAAE,MAAM,EAAE,CAAC;IAC9B;;;;2EAIuE;IACvE,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB;4BACwB;IACxB,aAAa,EACT,CAAC,CACC,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,MAAM,KACjB;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,OAAO,CAAA;KAAE,CAAC,GAC9C,IAAI,CAAC;IACT,4DAA4D;IAC5D,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,wBAAgB,eAAe,IAAI,SAAS,CAa3C;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,IAAI,CAAC,SAAS,EAAE,qBAAqB,GAAG,iBAAiB,CAAC,GAChE,OAAO,CAMT;AAED;uCACuC;AACvC,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,SAAS,EAChB,SAAS,GAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IACmB,GAC9C,IAAI,CAKN;AAED;;;;GAIG;AACH,wBAAsB,aAAa,CACjC,KAAK,EAAE,SAAS,EAChB,GAAG,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,EACxB,SAAS,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,GAChC,OAAO,CAAC,IAAI,CAAC,CAiBf;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAOzD;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,OAAO,GACb,MAAM,GAAG,IAAI,CAGf;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,EACV,GAAG,EAAE;IACH,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,CACb,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,MAAM,KACjB;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,OAAO,CAAA;KAAE,CAAC;CAC/C,GACA,MAAM,GAAG,IAAI,CAIf;AAsCD;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,mCAA6B,CAAC;AAE3D;;;;GAIG;AACH,eAAO,MAAM,eAAe,EAAE,eAAe,CAC3C,qBAAqB,GAAG,SAAS,CA0WlC,CAAC"}
1
+ {"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AACvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,KAAK,EAAwB,eAAe,EAAE,MAAM,UAAU,CAAC;AAEtE;0DAC0D;AAC1D,eAAO,MAAM,iBAAiB,kBAAkB,CAAC;AAEjD,eAAO,MAAM,gBAAgB,wBAAwB,CAAC;AAEtD,eAAO,MAAM,cAAc,eAAe,CAAC;AAQ3C,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAC/B,IAAI,EAAE,UAAU,GAAG,IAAI,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAClC,eAAe,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC7B,mBAAmB,EAAE,MAAM,EAAE,CAAC;IAC9B,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,aAAa,EACT,CAAC,CACC,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,MAAM,KACjB;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,OAAO,CAAA;KAAE,CAAC,GAC9C,IAAI,CAAC;IACT,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,wBAAgB,eAAe,IAAI,SAAS,CAa3C;AAED,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,IAAI,CAAC,SAAS,EAAE,qBAAqB,GAAG,iBAAiB,CAAC,GAChE,OAAO,CAMT;AAED,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,SAAS,EAChB,SAAS,GAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IACmB,GAC9C,IAAI,CAKN;AAED,wBAAsB,aAAa,CACjC,KAAK,EAAE,SAAS,EAChB,GAAG,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,EACxB,SAAS,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,GAChC,OAAO,CAAC,IAAI,CAAC,CAYf;AAED,wBAAgB,eAAe,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAOzD;AAED,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,OAAO,GACb,MAAM,GAAG,IAAI,CAGf;AAED,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,EACV,GAAG,EAAE;IACH,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,CACb,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,MAAM,KACjB;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,OAAO,CAAA;KAAE,CAAC;CAC/C,GACA,MAAM,GAAG,IAAI,CAIf;AAkCD,eAAO,MAAM,eAAe,EAAE,eAAe,CAC3C,qBAAqB,GAAG,SAAS,CAmSlC,CAAC"}
package/dist/esbuild.cjs CHANGED
@@ -2,15 +2,8 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_core = require("./core-B2NB6x1D.cjs");
5
+ const require_core = require("./core-Op4RfilE.cjs");
6
6
  //#region src/esbuild.ts
7
- /**
8
- * esbuild entry: `import animus from '@animus-ui/unplugin/esbuild'`.
9
- * The dev-signal define rides `build.initialOptions.define`; the emitted
10
- * stylesheet is written into `outdir` (or beside `outfile`).
11
- */
12
- /** Named beside default: keeps the CJS emission on the `exports.default`
13
- * interop shape (attw node16). */
14
7
  const animusEsbuild = (0, require("unplugin").createEsbuildPlugin)(require_core.unpluginFactory);
15
8
  //#endregion
16
9
  exports.animusEsbuild = animusEsbuild;
package/dist/esbuild.d.ts CHANGED
@@ -1,11 +1,4 @@
1
- /**
2
- * esbuild entry: `import animus from '@animus-ui/unplugin/esbuild'`.
3
- * The dev-signal define rides `build.initialOptions.define`; the emitted
4
- * stylesheet is written into `outdir` (or beside `outfile`).
5
- */
6
1
  export type { AnimusUnpluginOptions } from './options';
7
- /** Named beside default: keeps the CJS emission on the `exports.default`
8
- * interop shape (attw node16). */
9
2
  export declare const animusEsbuild: (options?: import("@animus-ui/extract/pipeline").AnimusCoreOptions | undefined) => import("unplugin").EsbuildPlugin;
10
3
  export default animusEsbuild;
11
4
  //# sourceMappingURL=esbuild.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"esbuild.d.ts","sourceRoot":"","sources":["../src/esbuild.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,YAAY,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAEvD;mCACmC;AACnC,eAAO,MAAM,aAAa,qHAAuC,CAAC;eAEnD,aAAa"}
1
+ {"version":3,"file":"esbuild.d.ts","sourceRoot":"","sources":["../src/esbuild.ts"],"names":[],"mappings":"AAIA,YAAY,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAEvD,eAAO,MAAM,aAAa,qHAAuC,CAAC;eAEnD,aAAa"}
package/dist/esbuild.mjs CHANGED
@@ -1,13 +1,6 @@
1
- import { t as unpluginFactory } from "./core-C3ZORO6V.mjs";
1
+ import { t as unpluginFactory } from "./core-BPadCuEs.mjs";
2
2
  import { createEsbuildPlugin } from "unplugin";
3
3
  //#region src/esbuild.ts
4
- /**
5
- * esbuild entry: `import animus from '@animus-ui/unplugin/esbuild'`.
6
- * The dev-signal define rides `build.initialOptions.define`; the emitted
7
- * stylesheet is written into `outdir` (or beside `outfile`).
8
- */
9
- /** Named beside default: keeps the CJS emission on the `exports.default`
10
- * interop shape (attw node16). */
11
4
  const animusEsbuild = createEsbuildPlugin(unpluginFactory);
12
5
  //#endregion
13
6
  export { animusEsbuild, animusEsbuild as default };
package/dist/index.cjs CHANGED
@@ -2,21 +2,8 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_core = require("./core-B2NB6x1D.cjs");
5
+ const require_core = require("./core-Op4RfilE.cjs");
6
6
  //#region src/index.ts
7
- /**
8
- * `@animus-ui/unplugin` — the Animus transform host for non-plugin
9
- * bundlers (openspec: standalone-extraction-cli, D4/D10). Per-bundler
10
- * entry points live on subpaths (`./rollup`, `./esbuild`, `./rspack`,
11
- * `./webpack`); this root exports the unplugin instance and the factory.
12
- *
13
- * UNSTABLE MODULE SURFACE: the supported consumer surface is the
14
- * per-bundler subpath entries. The factory and instance exports exist for
15
- * the repo's own lanes and tests and may change without semver ceremony
16
- * until the consumer contract ships (standalone-extraction-cli inc 07).
17
- */
18
- /** The unplugin instance: `animusUnplugin.rollup(options)`, `.esbuild(…)`,
19
- * `.webpack(…)`, `.rspack(…)`. */
20
7
  const animusUnplugin = (0, require("unplugin").createUnplugin)(require_core.unpluginFactory);
21
8
  //#endregion
22
9
  exports.animusUnplugin = animusUnplugin;
package/dist/index.d.ts CHANGED
@@ -1,19 +1,6 @@
1
- /**
2
- * `@animus-ui/unplugin` — the Animus transform host for non-plugin
3
- * bundlers (openspec: standalone-extraction-cli, D4/D10). Per-bundler
4
- * entry points live on subpaths (`./rollup`, `./esbuild`, `./rspack`,
5
- * `./webpack`); this root exports the unplugin instance and the factory.
6
- *
7
- * UNSTABLE MODULE SURFACE: the supported consumer surface is the
8
- * per-bundler subpath entries. The factory and instance exports exist for
9
- * the repo's own lanes and tests and may change without semver ceremony
10
- * until the consumer contract ships (standalone-extraction-cli inc 07).
11
- */
12
1
  import { unpluginFactory } from './core';
13
2
  export type { AnimusUnpluginOptions } from './options';
14
3
  export { unpluginFactory };
15
- /** The unplugin instance: `animusUnplugin.rollup(options)`, `.esbuild(…)`,
16
- * `.webpack(…)`, `.rspack(…)`. */
17
4
  export declare const animusUnplugin: import("unplugin").UnpluginInstance<import("@animus-ui/extract/pipeline").AnimusCoreOptions | undefined, boolean>;
18
5
  export default animusUnplugin;
19
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAEzC,YAAY,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,CAAC;AAE3B;mCACmC;AACnC,eAAO,MAAM,cAAc,mHAAkC,CAAC;eAE/C,cAAc"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAEzC,YAAY,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,CAAC;AAE3B,eAAO,MAAM,cAAc,mHAAkC,CAAC;eAE/C,cAAc"}
package/dist/index.mjs CHANGED
@@ -1,19 +1,6 @@
1
- import { t as unpluginFactory } from "./core-C3ZORO6V.mjs";
1
+ import { t as unpluginFactory } from "./core-BPadCuEs.mjs";
2
2
  import { createUnplugin } from "unplugin";
3
3
  //#region src/index.ts
4
- /**
5
- * `@animus-ui/unplugin` — the Animus transform host for non-plugin
6
- * bundlers (openspec: standalone-extraction-cli, D4/D10). Per-bundler
7
- * entry points live on subpaths (`./rollup`, `./esbuild`, `./rspack`,
8
- * `./webpack`); this root exports the unplugin instance and the factory.
9
- *
10
- * UNSTABLE MODULE SURFACE: the supported consumer surface is the
11
- * per-bundler subpath entries. The factory and instance exports exist for
12
- * the repo's own lanes and tests and may change without semver ceremony
13
- * until the consumer contract ships (standalone-extraction-cli inc 07).
14
- */
15
- /** The unplugin instance: `animusUnplugin.rollup(options)`, `.esbuild(…)`,
16
- * `.webpack(…)`, `.rspack(…)`. */
17
4
  const animusUnplugin = createUnplugin(unpluginFactory);
18
5
  //#endregion
19
6
  export { animusUnplugin, animusUnplugin as default, unpluginFactory };
package/dist/options.d.ts CHANGED
@@ -1,44 +1,11 @@
1
- /**
2
- * Host option intake the transform host is the fourth driver over the
3
- * shared option core (openspec: standalone-extraction-cli, D2/D9): one
4
- * schema, `assertKnownOptionKeys` at the boundary, and an explicit
5
- * emission `mode` that is plumbed — never environment-sniffed (D10).
6
- *
7
- * Unlike the Vite/Next plugin drivers, this host HONORS the core `root`
8
- * key: rollup and esbuild expose no root authority a plugin could derive,
9
- * so the host's root is the explicit option, defaulting to the process
10
- * working directory (the CLI's shape, not the plugin drivers').
11
- */
1
+ /** rollup and esbuild expose no root authority a plugin could derive, so
2
+ * `root` is the explicit option, defaulting to the working directory. */
12
3
  import type { AnimusCoreOptions, AnimusMode } from '@animus-ui/extract/pipeline';
13
- /**
14
- * Options for the Animus transform host. Exactly the shared driver core —
15
- * the host declares no driver-specific top-level keys.
16
- *
17
- * `mode` selects EMISSION only (minify default, the `__ANIMUS_DEV__`
18
- * define, engine devMode). When absent, the host's documented default
19
- * applies: the bundler's own command oracle where one exists (webpack and
20
- * rspack `compiler.options.mode`, rollup watch mode), else production
21
- * (esbuild exposes no signal).
22
- */
23
4
  export type AnimusUnpluginOptions = AnimusCoreOptions;
24
5
  export interface ResolvedHostOptions {
25
- /** Absolute root every relative input resolves against. */
26
6
  root: string;
27
- /** The validated core options (mode still unresolved — the adapter's
28
- * command oracle participates in that resolution). */
29
7
  options: AnimusCoreOptions;
30
8
  }
31
- /**
32
- * Validate raw options and resolve the root authority. Throws
33
- * `AnimusConfigError` (the shared config-error class) on unknown keys,
34
- * invalid `mode` values, a retired engine selection, or a missing
35
- * `system`.
36
- */
37
9
  export declare function resolveHostOptions(raw: AnimusUnpluginOptions | undefined, cwd?: string): ResolvedHostOptions;
38
- /**
39
- * Resolve the effective emission mode: the explicit option wins over every
40
- * bundler signal; otherwise the adapter-supplied command oracle applies;
41
- * otherwise production (the documented host default — never NODE_ENV).
42
- */
43
10
  export declare function resolveHostMode(explicit: AnimusMode | undefined, oracle: AnimusMode | null): AnimusMode;
44
11
  //# sourceMappingURL=options.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../src/options.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAUH,OAAO,KAAK,EACV,iBAAiB,EACjB,UAAU,EACX,MAAM,6BAA6B,CAAC;AAErC;;;;;;;;;GASG;AACH,MAAM,MAAM,qBAAqB,GAAG,iBAAiB,CAAC;AAEtD,MAAM,WAAW,mBAAmB;IAClC,2DAA2D;IAC3D,IAAI,EAAE,MAAM,CAAC;IACb;2DACuD;IACvD,OAAO,EAAE,iBAAiB,CAAC;CAC5B;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,qBAAqB,GAAG,SAAS,EACtC,GAAG,GAAE,MAAsB,GAC1B,mBAAmB,CAcrB;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,UAAU,GAAG,SAAS,EAChC,MAAM,EAAE,UAAU,GAAG,IAAI,GACxB,UAAU,CAEZ"}
1
+ {"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../src/options.ts"],"names":[],"mappings":"AAAA;0EAC0E;AAU1E,OAAO,KAAK,EACV,iBAAiB,EACjB,UAAU,EACX,MAAM,6BAA6B,CAAC;AAErC,MAAM,MAAM,qBAAqB,GAAG,iBAAiB,CAAC;AAoBtD,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,iBAAiB,CAAC;CAC5B;AAED,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,qBAAqB,GAAG,SAAS,EACtC,GAAG,GAAE,MAAsB,GAC1B,mBAAmB,CAYrB;AAED,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,UAAU,GAAG,SAAS,EAChC,MAAM,EAAE,UAAU,GAAG,IAAI,GACxB,UAAU,CAEZ"}
package/dist/rollup.cjs CHANGED
@@ -2,16 +2,8 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_core = require("./core-B2NB6x1D.cjs");
5
+ const require_core = require("./core-Op4RfilE.cjs");
6
6
  //#region src/rollup.ts
7
- /**
8
- * Rollup entry: `import animus from '@animus-ui/unplugin/rollup'`.
9
- * ORDERING: list this plugin BEFORE any TS/JSX transpiler — the engine
10
- * parses raw TSX (rollup has no enforce ordering).
11
- */
12
- /** Named beside default: keeps the CJS emission on the `exports.default`
13
- * interop shape (attw node16 — a lone default compiles to a bare
14
- * `module.exports =` that contradicts the declaration). */
15
7
  const animusRollup = (0, require("unplugin").createRollupPlugin)(require_core.unpluginFactory);
16
8
  //#endregion
17
9
  exports.animusRollup = animusRollup;
package/dist/rollup.d.ts CHANGED
@@ -1,12 +1,4 @@
1
- /**
2
- * Rollup entry: `import animus from '@animus-ui/unplugin/rollup'`.
3
- * ORDERING: list this plugin BEFORE any TS/JSX transpiler — the engine
4
- * parses raw TSX (rollup has no enforce ordering).
5
- */
6
1
  export type { AnimusUnpluginOptions } from './options';
7
- /** Named beside default: keeps the CJS emission on the `exports.default`
8
- * interop shape (attw node16 — a lone default compiles to a bare
9
- * `module.exports =` that contradicts the declaration). */
10
2
  export declare const animusRollup: (options?: import("@animus-ui/extract/pipeline").AnimusCoreOptions | undefined) => import("unplugin").RollupPlugin<any>[] | import("unplugin").RollupPlugin<any>;
11
3
  export default animusRollup;
12
4
  //# sourceMappingURL=rollup.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"rollup.d.ts","sourceRoot":"","sources":["../src/rollup.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,YAAY,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAEvD;;4DAE4D;AAC5D,eAAO,MAAM,YAAY,kKAAsC,CAAC;eAEjD,YAAY"}
1
+ {"version":3,"file":"rollup.d.ts","sourceRoot":"","sources":["../src/rollup.ts"],"names":[],"mappings":"AAIA,YAAY,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAEvD,eAAO,MAAM,YAAY,kKAAsC,CAAC;eAEjD,YAAY"}
package/dist/rollup.mjs CHANGED
@@ -1,14 +1,6 @@
1
- import { t as unpluginFactory } from "./core-C3ZORO6V.mjs";
1
+ import { t as unpluginFactory } from "./core-BPadCuEs.mjs";
2
2
  import { createRollupPlugin } from "unplugin";
3
3
  //#region src/rollup.ts
4
- /**
5
- * Rollup entry: `import animus from '@animus-ui/unplugin/rollup'`.
6
- * ORDERING: list this plugin BEFORE any TS/JSX transpiler — the engine
7
- * parses raw TSX (rollup has no enforce ordering).
8
- */
9
- /** Named beside default: keeps the CJS emission on the `exports.default`
10
- * interop shape (attw node16 — a lone default compiles to a bare
11
- * `module.exports =` that contradicts the declaration). */
12
4
  const animusRollup = createRollupPlugin(unpluginFactory);
13
5
  //#endregion
14
6
  export { animusRollup, animusRollup as default };
package/dist/rspack.cjs CHANGED
@@ -2,15 +2,8 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_core = require("./core-B2NB6x1D.cjs");
5
+ const require_core = require("./core-Op4RfilE.cjs");
6
6
  //#region src/rspack.ts
7
- /**
8
- * rspack entry: `import Animus from '@animus-ui/unplugin/rspack'`.
9
- * Mirrors the webpack wiring (DefinePlugin define, `enforce: 'pre'`
10
- * loader ordering) over rspack's webpack-compatible surface.
11
- */
12
- /** Named beside default: keeps the CJS emission on the `exports.default`
13
- * interop shape (attw node16). */
14
7
  const animusRspack = (0, require("unplugin").createRspackPlugin)(require_core.unpluginFactory);
15
8
  //#endregion
16
9
  exports.animusRspack = animusRspack;
package/dist/rspack.d.ts CHANGED
@@ -1,11 +1,4 @@
1
- /**
2
- * rspack entry: `import Animus from '@animus-ui/unplugin/rspack'`.
3
- * Mirrors the webpack wiring (DefinePlugin define, `enforce: 'pre'`
4
- * loader ordering) over rspack's webpack-compatible surface.
5
- */
6
1
  export type { AnimusUnpluginOptions } from './options';
7
- /** Named beside default: keeps the CJS emission on the `exports.default`
8
- * interop shape (attw node16). */
9
2
  export declare const animusRspack: (options?: import("@animus-ui/extract/pipeline").AnimusCoreOptions | undefined) => RspackPluginInstance;
10
3
  export default animusRspack;
11
4
  //# sourceMappingURL=rspack.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"rspack.d.ts","sourceRoot":"","sources":["../src/rspack.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,YAAY,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAEvD;mCACmC;AACnC,eAAO,MAAM,YAAY,yGAAsC,CAAC;eAEjD,YAAY"}
1
+ {"version":3,"file":"rspack.d.ts","sourceRoot":"","sources":["../src/rspack.ts"],"names":[],"mappings":"AAIA,YAAY,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAEvD,eAAO,MAAM,YAAY,yGAAsC,CAAC;eAEjD,YAAY"}
package/dist/rspack.mjs CHANGED
@@ -1,13 +1,6 @@
1
- import { t as unpluginFactory } from "./core-C3ZORO6V.mjs";
1
+ import { t as unpluginFactory } from "./core-BPadCuEs.mjs";
2
2
  import { createRspackPlugin } from "unplugin";
3
3
  //#region src/rspack.ts
4
- /**
5
- * rspack entry: `import Animus from '@animus-ui/unplugin/rspack'`.
6
- * Mirrors the webpack wiring (DefinePlugin define, `enforce: 'pre'`
7
- * loader ordering) over rspack's webpack-compatible surface.
8
- */
9
- /** Named beside default: keeps the CJS emission on the `exports.default`
10
- * interop shape (attw node16). */
11
4
  const animusRspack = createRspackPlugin(unpluginFactory);
12
5
  //#endregion
13
6
  export { animusRspack, animusRspack as default };
package/dist/webpack.cjs CHANGED
@@ -2,16 +2,8 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_core = require("./core-B2NB6x1D.cjs");
5
+ const require_core = require("./core-Op4RfilE.cjs");
6
6
  //#region src/webpack.ts
7
- /**
8
- * webpack entry: `import Animus from '@animus-ui/unplugin/webpack'`.
9
- * The dev-signal define is applied via the compiler's own DefinePlugin;
10
- * the host transform is registered `enforce: 'pre'` so it precedes
11
- * TS/JSX transpilation loaders.
12
- */
13
- /** Named beside default: keeps the CJS emission on the `exports.default`
14
- * interop shape (attw node16). */
15
7
  const animusWebpack = (0, require("unplugin").createWebpackPlugin)(require_core.unpluginFactory);
16
8
  //#endregion
17
9
  exports.animusWebpack = animusWebpack;
package/dist/webpack.d.ts CHANGED
@@ -1,12 +1,4 @@
1
- /**
2
- * webpack entry: `import Animus from '@animus-ui/unplugin/webpack'`.
3
- * The dev-signal define is applied via the compiler's own DefinePlugin;
4
- * the host transform is registered `enforce: 'pre'` so it precedes
5
- * TS/JSX transpilation loaders.
6
- */
7
1
  export type { AnimusUnpluginOptions } from './options';
8
- /** Named beside default: keeps the CJS emission on the `exports.default`
9
- * interop shape (attw node16). */
10
2
  export declare const animusWebpack: (options?: import("@animus-ui/extract/pipeline").AnimusCoreOptions | undefined) => import("unplugin").WebpackPluginInstance;
11
3
  export default animusWebpack;
12
4
  //# sourceMappingURL=webpack.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"webpack.d.ts","sourceRoot":"","sources":["../src/webpack.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,YAAY,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAEvD;mCACmC;AACnC,eAAO,MAAM,aAAa,6HAAuC,CAAC;eAEnD,aAAa"}
1
+ {"version":3,"file":"webpack.d.ts","sourceRoot":"","sources":["../src/webpack.ts"],"names":[],"mappings":"AAIA,YAAY,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAEvD,eAAO,MAAM,aAAa,6HAAuC,CAAC;eAEnD,aAAa"}
package/dist/webpack.mjs CHANGED
@@ -1,14 +1,6 @@
1
- import { t as unpluginFactory } from "./core-C3ZORO6V.mjs";
1
+ import { t as unpluginFactory } from "./core-BPadCuEs.mjs";
2
2
  import { createWebpackPlugin } from "unplugin";
3
3
  //#region src/webpack.ts
4
- /**
5
- * webpack entry: `import Animus from '@animus-ui/unplugin/webpack'`.
6
- * The dev-signal define is applied via the compiler's own DefinePlugin;
7
- * the host transform is registered `enforce: 'pre'` so it precedes
8
- * TS/JSX transpilation loaders.
9
- */
10
- /** Named beside default: keeps the CJS emission on the `exports.default`
11
- * interop shape (attw node16). */
12
4
  const animusWebpack = createWebpackPlugin(unpluginFactory);
13
5
  //#endregion
14
6
  export { animusWebpack, animusWebpack as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@animus-ui/unplugin",
3
- "version": "0.1.11",
3
+ "version": "0.1.14",
4
4
  "description": "Animus transform host for non-plugin bundlers — unplugin-based rollup/esbuild/rspack/webpack entry points over the one extraction session",
5
5
  "keywords": [
6
6
  "animus",
@@ -57,8 +57,8 @@
57
57
  "compile": "tsc --noEmit"
58
58
  },
59
59
  "dependencies": {
60
- "@animus-ui/extract": "0.1.11",
61
- "unplugin": "^2.3.10"
60
+ "@animus-ui/extract": "0.1.14",
61
+ "unplugin": "^3.3.0"
62
62
  },
63
63
  "engines": {
64
64
  "node": ">=22.12.0"