@animus-ui/next-plugin 0.1.1-beta.2 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/README.md +83 -4
  2. package/dist/chunk-y_GBKt04.mjs +5 -0
  3. package/dist/extraction-session.d.ts +138 -0
  4. package/dist/extraction-session.d.ts.map +1 -0
  5. package/dist/index.cjs +762 -541
  6. package/dist/index.mjs +762 -540
  7. package/dist/loader-core-CbaYNhBu.cjs +71 -0
  8. package/dist/loader-core-D6Tm_b8F.mjs +66 -0
  9. package/dist/loader-core.d.ts +26 -0
  10. package/dist/loader-core.d.ts.map +1 -0
  11. package/dist/loader.cjs +12 -43
  12. package/dist/loader.d.ts +5 -9
  13. package/dist/loader.d.ts.map +1 -1
  14. package/dist/loader.mjs +12 -43
  15. package/dist/plugin.d.ts +24 -42
  16. package/dist/plugin.d.ts.map +1 -1
  17. package/dist/resolve-packages.d.ts +8 -0
  18. package/dist/resolve-packages.d.ts.map +1 -0
  19. package/dist/singleton-BKALu7Mk.mjs +108 -0
  20. package/dist/{singleton-CttvA4Rg.cjs → singleton-DH7yeWZa.cjs} +29 -60
  21. package/dist/singleton.d.ts +1 -8
  22. package/dist/singleton.d.ts.map +1 -1
  23. package/dist/timing.d.ts +7 -0
  24. package/dist/timing.d.ts.map +1 -0
  25. package/dist/turbopack-config.d.ts +55 -0
  26. package/dist/turbopack-config.d.ts.map +1 -0
  27. package/dist/turbopack-loader.cjs +90 -0
  28. package/dist/turbopack-loader.d.ts +16 -0
  29. package/dist/turbopack-loader.d.ts.map +1 -0
  30. package/dist/turbopack-loader.mjs +91 -0
  31. package/dist/turbopack-orchestrator.d.ts +31 -0
  32. package/dist/turbopack-orchestrator.d.ts.map +1 -0
  33. package/dist/types.d.ts +67 -10
  34. package/dist/types.d.ts.map +1 -1
  35. package/dist/with-animus.d.ts +1 -1
  36. package/dist/with-animus.d.ts.map +1 -1
  37. package/package.json +5 -5
  38. package/dist/analyze-project-args.d.ts +0 -33
  39. package/dist/analyze-project-args.d.ts.map +0 -1
  40. package/dist/manifest-diagnostics.d.ts +0 -10
  41. package/dist/manifest-diagnostics.d.ts.map +0 -1
  42. package/dist/singleton-CmwFBCJ5.mjs +0 -136
@@ -1,3 +1,4 @@
1
+ let _animus_ui_extract_pipeline = require("@animus-ui/extract/pipeline");
1
2
  //#region src/singleton.ts
2
3
  /**
3
4
  * Module-scope singleton for sharing analysis state between the webpack plugin and loader.
@@ -61,72 +62,46 @@ function getSharedEngine() {
61
62
  * mirrors the untyped `require` the call sites previously used — the NAPI
62
63
  * module's own .d.ts is the authoritative surface. */
63
64
  function requireEngine() {
64
- return getSharedEngine() === "v2" ? require("@animus-ui/extract/engine-v2") : require("@animus-ui/extract");
65
+ return require("@animus-ui/extract");
65
66
  }
66
67
  const V2_ENGINE_KEY = "__animus_v2_engine__";
67
68
  /**
68
69
  * Engine-agnostic API over both engines (extract-v2-spine row 13). The
69
- * v2 leg adapts the v1 function surface onto a stateful ExtractEngine;
70
- * the INSTANCE lives on globalThis for the same reason the manifest
71
- * does — the ESM plugin and the CJS webpack loader must see one engine.
72
- * (The next-plugin is already process-singleton by design: manifest,
73
- * css, and system props share the same globalThis keys.)
70
+ * v2 leg adapts the v1 function surface onto a stateful ExtractEngine
71
+ * (hoisted to `createV2EngineApi` in @animus-ui/extract/pipeline — the
72
+ * single authoritative copy shared with vite-plugin). The engine INSTANCE,
73
+ * its analyze-time sources, and the one-shot drift flag all live on
74
+ * globalThis for the same reason the manifest does — the ESM plugin and the
75
+ * CJS webpack loader must see one engine (and one drift warning) across the
76
+ * double-load. (The next-plugin is already process-singleton by design:
77
+ * manifest, css, and system props share the same globalThis keys.)
74
78
  * loadSystemModule is exported by both bindings from one engine-neutral
75
79
  * Rust crate, so the default path no longer loads the v1 binary.
76
80
  */
77
81
  const V2_SENT_SOURCES_KEY = "__animus_v2_sent_sources__";
78
- let v2DriftWarned = false;
79
- function engineApi() {
80
- if (getSharedEngine() !== "v2") return requireEngine();
81
- const native = requireEngine();
82
- return {
83
- loadSystemModule: (...args) => native.loadSystemModule(...args),
84
- analyzeProject: (filesJson, themeJson, variableMapJson, contextualVarsJson, configJson, groupRegistryJson, packageResolutionJson, devMode, emitterConfigJson, selectorAliasesJson, _selectorOrderJson, globalStyleBlocksJson, pathAliasesJson, keyframesJson) => {
85
- const sent = /* @__PURE__ */ new Map();
86
- for (const entry of JSON.parse(filesJson)) sent.set(entry.path, entry.source);
87
- globalThis[V2_SENT_SOURCES_KEY] = sent;
88
- const emitterConfig = emitterConfigJson ? JSON.parse(emitterConfigJson) : {};
89
- globalThis[V2_ENGINE_KEY] = null;
90
- const engine = new native.ExtractEngine({
91
- runtimeImport: emitterConfig.runtime_import ?? void 0,
92
- cssModuleId: emitterConfig.css_module_id ?? void 0,
93
- systemPropsModuleId: emitterConfig.system_props_module_id ?? void 0,
94
- themeJson,
95
- variableMapJson,
96
- contextualVarsJson: contextualVarsJson ?? void 0,
97
- configJson,
98
- groupRegistryJson,
99
- selectorAliasesJson: selectorAliasesJson ?? void 0,
100
- globalStyleBlocksJson: globalStyleBlocksJson ?? void 0,
101
- keyframesJson: keyframesJson ?? void 0,
102
- packageResolutionJson: packageResolutionJson ?? void 0,
103
- pathAliasesJson: pathAliasesJson ?? void 0,
104
- devMode
105
- });
82
+ const V2_DRIFT_WARNED_KEY = "__animus_v2_drift_warned__";
83
+ const v2EngineApi = (0, _animus_ui_extract_pipeline.createV2EngineApi)({
84
+ label: "animus-next",
85
+ isV2: () => getSharedEngine() === "v2",
86
+ loadNativeEngine: requireEngine,
87
+ passThroughUnknownPaths: true,
88
+ store: {
89
+ getEngine: () => globalThis[V2_ENGINE_KEY],
90
+ setEngine: (engine) => {
106
91
  globalThis[V2_ENGINE_KEY] = engine;
107
- return engine.analyze(filesJson);
108
92
  },
109
- transformFile: (source, path, _manifest) => {
110
- const engine = globalThis[V2_ENGINE_KEY];
111
- if (!engine) throw new Error("[animus-next] v2 transform before analyze — engine instance not initialized");
112
- const sentMap = globalThis[V2_SENT_SOURCES_KEY];
113
- if (sentMap && !sentMap.has(path)) return {
114
- code: source,
115
- hasComponents: false
116
- };
117
- const sent = sentMap?.get(path);
118
- if (sent !== void 0 && sent !== source && !v2DriftWarned) {
119
- v2DriftWarned = true;
120
- console.warn(`[animus-next] v2: transform-time source for ${path} differs from analyze-time source — an upstream transform may be reverted`);
121
- }
122
- return JSON.parse(engine.transformFile(path));
93
+ getSentSources: () => globalThis[V2_SENT_SOURCES_KEY] ?? null,
94
+ setSentSources: (sources) => {
95
+ globalThis[V2_SENT_SOURCES_KEY] = sources;
123
96
  },
124
- clearAnalysisCache: () => {
125
- const engine = globalThis[V2_ENGINE_KEY];
126
- if (engine) engine.clearCache();
127
- globalThis[V2_ENGINE_KEY] = null;
97
+ getDriftWarned: () => Boolean(globalThis[V2_DRIFT_WARNED_KEY]),
98
+ setDriftWarned: (value) => {
99
+ globalThis[V2_DRIFT_WARNED_KEY] = value;
128
100
  }
129
- };
101
+ }
102
+ });
103
+ function engineApi() {
104
+ return v2EngineApi();
130
105
  }
131
106
  //#endregion
132
107
  Object.defineProperty(exports, "engineApi", {
@@ -153,12 +128,6 @@ Object.defineProperty(exports, "getSharedCss", {
153
128
  return getSharedCss;
154
129
  }
155
130
  });
156
- Object.defineProperty(exports, "getSharedEngine", {
157
- enumerable: true,
158
- get: function() {
159
- return getSharedEngine;
160
- }
161
- });
162
131
  Object.defineProperty(exports, "getSharedExternalDirs", {
163
132
  enumerable: true,
164
133
  get: function() {
@@ -1,10 +1,3 @@
1
- /**
2
- * Module-scope singleton for sharing analysis state between the webpack plugin and loader.
3
- *
4
- * Uses globalThis to survive the ESM/CJS module boundary: the plugin is loaded via ESM
5
- * (next.config.ts import) while the loader is loaded by webpack via require(). Without
6
- * globalThis, each module system gets its own singleton instance.
7
- */
8
1
  export declare function getManifestJson(): string | null;
9
2
  export declare function setManifestJson(json: string): void;
10
3
  export declare function getAnalysisPromise(): Promise<void> | null;
@@ -17,7 +10,7 @@ export declare function getSharedExternalDirs(): string[];
17
10
  export declare function setSharedExternalDirs(dirs: string[]): void;
18
11
  export declare function getSharedExternalEntries(): Map<string, string>;
19
12
  export declare function setSharedExternalEntries(entries: Map<string, string>): void;
20
- export type AnimusEngine = 'v1' | 'v2';
13
+ export type AnimusEngine = 'v2';
21
14
  /** Engine selection travels through the singleton so non-owning compiler
22
15
  * instances and the webpack loader honor the same choice as the owner. */
23
16
  export declare function setSharedEngine(engine: AnimusEngine): void;
@@ -1 +1 @@
1
- {"version":3,"file":"singleton.d.ts","sourceRoot":"","sources":["../src/singleton.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AASH,wBAAgB,eAAe,IAAI,MAAM,GAAG,IAAI,CAE/C;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAElD;AAED,wBAAgB,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAIzD;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAE/D;AAED,wBAAgB,oBAAoB,IAAI,IAAI,CAE3C;AAED,wBAAgB,YAAY,IAAI,MAAM,CAIrC;AAED,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAE9C;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAE1D;AAED,wBAAgB,qBAAqB,IAAI,MAAM,EAAE,CAMhD;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI,CAE1D;AAED,wBAAgB,wBAAwB,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAM9D;AAED,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAG3E;AAID,MAAM,MAAM,YAAY,GAAG,IAAI,GAAG,IAAI,CAAC;AAEvC;2EAC2E;AAC3E,wBAAgB,eAAe,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAE1D;AAED,wBAAgB,eAAe,IAAI,YAAY,CAQ9C;AAED;;uDAEuD;AAEvD,wBAAgB,aAAa,IAAI,GAAG,CAOnC;AAiBD,wBAAgB,SAAS,IAAI,GAAG,CAmG/B"}
1
+ {"version":3,"file":"singleton.d.ts","sourceRoot":"","sources":["../src/singleton.ts"],"names":[],"mappings":"AAkBA,wBAAgB,eAAe,IAAI,MAAM,GAAG,IAAI,CAE/C;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAElD;AAED,wBAAgB,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAIzD;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAE/D;AAED,wBAAgB,oBAAoB,IAAI,IAAI,CAE3C;AAED,wBAAgB,YAAY,IAAI,MAAM,CAIrC;AAED,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAE9C;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAE1D;AAED,wBAAgB,qBAAqB,IAAI,MAAM,EAAE,CAMhD;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI,CAE1D;AAED,wBAAgB,wBAAwB,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAM9D;AAED,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAG3E;AAID,MAAM,MAAM,YAAY,GAAG,IAAI,CAAC;AAEhC;2EAC2E;AAC3E,wBAAgB,eAAe,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAE1D;AAED,wBAAgB,eAAe,IAAI,YAAY,CAQ9C;AAED;;uDAEuD;AAEvD,wBAAgB,aAAa,IAAI,GAAG,CAInC;AAoDD,wBAAgB,SAAS,IAAI,GAAG,CAE/B"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Verbose build-timing waterfall: JS phases, analysis sub-phases, and the
3
+ * shared Rust phase table. `ANIMUS_TIMING_JSON=1` additionally dumps a
4
+ * machine-readable merged record.
5
+ */
6
+ export declare function logBuildTimings(bt: Record<string, number>, rustTiming: Record<string, number> | undefined, log: (msg: string) => void, verbose: boolean): void;
7
+ //# sourceMappingURL=timing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timing.d.ts","sourceRoot":"","sources":["../src/timing.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,wBAAgB,eAAe,CAC7B,EAAE,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC1B,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,EAC9C,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,EAC1B,OAAO,EAAE,OAAO,GACf,IAAI,CAkDN"}
@@ -0,0 +1,55 @@
1
+ import type { AnimusNextOptions } from './types';
2
+ /**
3
+ * Turbopack config fragment generation (spec: next-turbopack-integration).
4
+ * Everything emitted here MUST be JSON-serializable — Turbopack forwards
5
+ * loader options across process boundaries and rejects live values.
6
+ */
7
+ export type TurbopackMode = 'off' | 'auto' | 'on';
8
+ export interface TurbopackRule {
9
+ loaders: Array<{
10
+ loader: string;
11
+ options: Record<string, unknown>;
12
+ }>;
13
+ }
14
+ export interface TurbopackConfigFragment {
15
+ rules: Record<string, TurbopackRule>;
16
+ resolveAlias: Record<string, string>;
17
+ }
18
+ /** The single glob the Animus loader registers under. `.mjs` is included
19
+ * for webpack parity: an external package without `src/` is ingested via
20
+ * its resolved dist entry (often `dist/index.mjs`) and must still reach
21
+ * the loader — manifest lookup remains the file-level gate. */
22
+ export declare const ANIMUS_TURBOPACK_RULE_GLOB = "*.{ts,tsx,js,jsx,mjs}";
23
+ /** Virtual system-props id emitted into transformed sources under Turbopack
24
+ * (absolute-path imports are rejected there); resolveAlias maps it to the
25
+ * on-disk artifact. */
26
+ export declare const TURBOPACK_SYSTEM_PROPS_ID = "virtual:animus/system-props";
27
+ /**
28
+ * Resolve whether Turbopack wiring is active for this process. Default is
29
+ * `'auto'`: active exactly when the TURBOPACK environment variable is set
30
+ * (Next sets it for every Turbopack dev/build). The stable `turbopack`
31
+ * option wins over the deprecated `unstable_turbopack` alias.
32
+ */
33
+ export declare function resolveTurbopackMode(options: AnimusNextOptions, env?: Record<string, string | undefined>): boolean;
34
+ /**
35
+ * Build the `turbopack` config fragment: one glob-keyed loader rule
36
+ * (file-level allowlisting lives in the loader via manifest lookup — Next 15
37
+ * rules have no condition algebra) plus resolve aliases for the virtual
38
+ * system-props id, the emitter's stylesheet id, and each collected external
39
+ * package specifier redirected to its source entry.
40
+ */
41
+ export declare function buildTurbopackConfig(args: {
42
+ rootDir: string;
43
+ loaderPath: string;
44
+ options: AnimusNextOptions;
45
+ externalSourceEntries: ReadonlyMap<string, string>;
46
+ }): TurbopackConfigFragment;
47
+ /**
48
+ * Locate the Turbopack loader module: built dist first, source fallback for
49
+ * in-repo development. CJS preferred — Turbopack's loader-runner follows
50
+ * the webpack loader contract (`module.exports = fn`), and the .cjs build
51
+ * is loadable by every runner version; ESM default-export acceptance is
52
+ * not guaranteed.
53
+ */
54
+ export declare function resolveTurbopackLoaderPath(pluginDir: string): string;
55
+ //# sourceMappingURL=turbopack-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"turbopack-config.d.ts","sourceRoot":"","sources":["../src/turbopack-config.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjD;;;;GAIG;AAEH,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,MAAM,GAAG,IAAI,CAAC;AAElD,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,KAAK,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,CAAC,CAAC;CACtE;AAED,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IACrC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACtC;AAED;;;gEAGgE;AAChE,eAAO,MAAM,0BAA0B,0BAA0B,CAAC;AAElE;;wBAEwB;AACxB,eAAO,MAAM,yBAAyB,gCAAgC,CAAC;AAEvE;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,iBAAiB,EAC1B,GAAG,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAe,GACpD,OAAO,CAMT;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE;IACzC,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,iBAAiB,CAAC;IAC3B,qBAAqB,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACpD,GAAG,uBAAuB,CA8B1B;AAED;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAMpE"}
@@ -0,0 +1,90 @@
1
+ const require_loader_core = require("./loader-core-CbaYNhBu.cjs");
2
+ let _animus_ui_extract_pipeline = require("@animus-ui/extract/pipeline");
3
+ let fs = require("fs");
4
+ let path = require("path");
5
+ //#region src/turbopack-loader.ts
6
+ let engine = null;
7
+ let sentSources = null;
8
+ let driftWarned = false;
9
+ let hydratedKey = null;
10
+ let hydratedManifestJson = null;
11
+ let hydrateFailedWarned = false;
12
+ const engineModuleId = "@animus-ui/extract";
13
+ const engineApi = (0, _animus_ui_extract_pipeline.createV2EngineApi)({
14
+ label: "animus-next-turbopack",
15
+ isV2: () => true,
16
+ loadNativeEngine: () => require(engineModuleId),
17
+ passThroughUnknownPaths: true,
18
+ store: {
19
+ getEngine: () => engine,
20
+ setEngine: (next) => {
21
+ engine = next;
22
+ },
23
+ getSentSources: () => sentSources,
24
+ setSentSources: (sources) => {
25
+ sentSources = sources;
26
+ },
27
+ getDriftWarned: () => driftWarned,
28
+ setDriftWarned: (value) => {
29
+ driftWarned = value;
30
+ }
31
+ }
32
+ });
33
+ /**
34
+ * Hydrate this worker's engine from the `.animus/` artifact pair — the v2
35
+ * engine serves transforms only from analyze-retained state, so a fresh
36
+ * worker replays the persisted analysis inputs once (and again whenever
37
+ * either artifact changes; keyed by mtime+size of both). The persisted
38
+ * manifest is a hard prerequisite (spec: next-turbopack-integration /
39
+ * Stateless per-file transformation — absent or unreadable
40
+ * `.animus/manifest.json` means passthrough, even when analysis inputs
41
+ * exist). Returns the manifest JSON, or null (caller passes through).
42
+ */
43
+ function hydrate(rootDir) {
44
+ const inputsPath = (0, path.join)(rootDir, ".animus", "analysis-inputs.json");
45
+ const manifestPath = (0, path.join)(rootDir, ".animus", "manifest.json");
46
+ let inputsStat;
47
+ let manifestStat;
48
+ try {
49
+ inputsStat = (0, fs.statSync)(inputsPath, { bigint: true });
50
+ manifestStat = (0, fs.statSync)(manifestPath, { bigint: true });
51
+ } catch {
52
+ return null;
53
+ }
54
+ const key = `${inputsPath}:${inputsStat.mtimeNs}:${inputsStat.size}:${manifestStat.mtimeNs}:${manifestStat.size}`;
55
+ if (key === hydratedKey && hydratedManifestJson !== null) return hydratedManifestJson;
56
+ try {
57
+ JSON.parse((0, fs.readFileSync)(manifestPath, "utf-8"));
58
+ const inputs = JSON.parse((0, fs.readFileSync)(inputsPath, "utf-8"));
59
+ const { analyzeProject } = engineApi();
60
+ hydratedManifestJson = analyzeProject(...(0, _animus_ui_extract_pipeline.buildAnalyzeProjectArgs)(inputs));
61
+ hydratedKey = key;
62
+ return hydratedManifestJson;
63
+ } catch (e) {
64
+ if (!hydrateFailedWarned) {
65
+ hydrateFailedWarned = true;
66
+ console.warn(`[animus-extract] Turbopack worker hydration failed (${String(e)}); sources pass through untransformed`);
67
+ }
68
+ return null;
69
+ }
70
+ }
71
+ /**
72
+ * Turbopack loader for Animus source transformation. Derives everything
73
+ * from the incoming source, its JSON-serializable options, and the
74
+ * `.animus/` disk artifacts written by the out-of-band orchestrator.
75
+ */
76
+ function animusTurbopackLoader(source) {
77
+ const opts = this.getOptions?.() ?? {};
78
+ const rootDir = opts.rootDir ?? this.rootContext;
79
+ const manifestJson = hydrate(rootDir);
80
+ if (!manifestJson) return source;
81
+ return require_loader_core.transformWithManifest({
82
+ source,
83
+ filename: (0, path.relative)(rootDir, this.resourcePath),
84
+ manifestJson,
85
+ engineApi,
86
+ opts
87
+ });
88
+ }
89
+ //#endregion
90
+ module.exports = animusTurbopackLoader;
@@ -0,0 +1,16 @@
1
+ import type { LoaderPolicyOptions } from './loader-core';
2
+ type LoaderContext = {
3
+ resourcePath: string;
4
+ rootContext: string;
5
+ getOptions: () => LoaderPolicyOptions & {
6
+ rootDir?: string;
7
+ };
8
+ };
9
+ /**
10
+ * Turbopack loader for Animus source transformation. Derives everything
11
+ * from the incoming source, its JSON-serializable options, and the
12
+ * `.animus/` disk artifacts written by the out-of-band orchestrator.
13
+ */
14
+ export default function animusTurbopackLoader(this: LoaderContext, source: string): string;
15
+ export {};
16
+ //# sourceMappingURL=turbopack-loader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"turbopack-loader.d.ts","sourceRoot":"","sources":["../src/turbopack-loader.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAMzD,KAAK,aAAa,GAAG;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,mBAAmB,GAAG;QAAE,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC9D,CAAC;AAgGF;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAC3C,IAAI,EAAE,aAAa,EACnB,MAAM,EAAE,MAAM,GACb,MAAM,CAeR"}
@@ -0,0 +1,91 @@
1
+ import { t as __require } from "./chunk-y_GBKt04.mjs";
2
+ import { t as transformWithManifest } from "./loader-core-D6Tm_b8F.mjs";
3
+ import { buildAnalyzeProjectArgs, createV2EngineApi } from "@animus-ui/extract/pipeline";
4
+ import { readFileSync, statSync } from "fs";
5
+ import { join, relative } from "path";
6
+ //#region src/turbopack-loader.ts
7
+ let engine = null;
8
+ let sentSources = null;
9
+ let driftWarned = false;
10
+ let hydratedKey = null;
11
+ let hydratedManifestJson = null;
12
+ let hydrateFailedWarned = false;
13
+ const engineModuleId = "@animus-ui/extract";
14
+ const engineApi = createV2EngineApi({
15
+ label: "animus-next-turbopack",
16
+ isV2: () => true,
17
+ loadNativeEngine: () => __require(engineModuleId),
18
+ passThroughUnknownPaths: true,
19
+ store: {
20
+ getEngine: () => engine,
21
+ setEngine: (next) => {
22
+ engine = next;
23
+ },
24
+ getSentSources: () => sentSources,
25
+ setSentSources: (sources) => {
26
+ sentSources = sources;
27
+ },
28
+ getDriftWarned: () => driftWarned,
29
+ setDriftWarned: (value) => {
30
+ driftWarned = value;
31
+ }
32
+ }
33
+ });
34
+ /**
35
+ * Hydrate this worker's engine from the `.animus/` artifact pair — the v2
36
+ * engine serves transforms only from analyze-retained state, so a fresh
37
+ * worker replays the persisted analysis inputs once (and again whenever
38
+ * either artifact changes; keyed by mtime+size of both). The persisted
39
+ * manifest is a hard prerequisite (spec: next-turbopack-integration /
40
+ * Stateless per-file transformation — absent or unreadable
41
+ * `.animus/manifest.json` means passthrough, even when analysis inputs
42
+ * exist). Returns the manifest JSON, or null (caller passes through).
43
+ */
44
+ function hydrate(rootDir) {
45
+ const inputsPath = join(rootDir, ".animus", "analysis-inputs.json");
46
+ const manifestPath = join(rootDir, ".animus", "manifest.json");
47
+ let inputsStat;
48
+ let manifestStat;
49
+ try {
50
+ inputsStat = statSync(inputsPath, { bigint: true });
51
+ manifestStat = statSync(manifestPath, { bigint: true });
52
+ } catch {
53
+ return null;
54
+ }
55
+ const key = `${inputsPath}:${inputsStat.mtimeNs}:${inputsStat.size}:${manifestStat.mtimeNs}:${manifestStat.size}`;
56
+ if (key === hydratedKey && hydratedManifestJson !== null) return hydratedManifestJson;
57
+ try {
58
+ JSON.parse(readFileSync(manifestPath, "utf-8"));
59
+ const inputs = JSON.parse(readFileSync(inputsPath, "utf-8"));
60
+ const { analyzeProject } = engineApi();
61
+ hydratedManifestJson = analyzeProject(...buildAnalyzeProjectArgs(inputs));
62
+ hydratedKey = key;
63
+ return hydratedManifestJson;
64
+ } catch (e) {
65
+ if (!hydrateFailedWarned) {
66
+ hydrateFailedWarned = true;
67
+ console.warn(`[animus-extract] Turbopack worker hydration failed (${String(e)}); sources pass through untransformed`);
68
+ }
69
+ return null;
70
+ }
71
+ }
72
+ /**
73
+ * Turbopack loader for Animus source transformation. Derives everything
74
+ * from the incoming source, its JSON-serializable options, and the
75
+ * `.animus/` disk artifacts written by the out-of-band orchestrator.
76
+ */
77
+ function animusTurbopackLoader(source) {
78
+ const opts = this.getOptions?.() ?? {};
79
+ const rootDir = opts.rootDir ?? this.rootContext;
80
+ const manifestJson = hydrate(rootDir);
81
+ if (!manifestJson) return source;
82
+ return transformWithManifest({
83
+ source,
84
+ filename: relative(rootDir, this.resourcePath),
85
+ manifestJson,
86
+ engineApi,
87
+ opts
88
+ });
89
+ }
90
+ //#endregion
91
+ export { animusTurbopackLoader as default };
@@ -0,0 +1,31 @@
1
+ import { watch } from 'fs';
2
+ import type { ExtractionSession } from './extraction-session';
3
+ /**
4
+ * Out-of-band pipeline orchestration for Turbopack (spec:
5
+ * next-turbopack-integration). Turbopack exposes no compiler hooks, so the
6
+ * pipeline runs during next.config resolution and, in dev, from a
7
+ * filesystem watcher — the bundler only ever sees the `.animus/` disk
8
+ * artifacts.
9
+ */
10
+ /** Run the full pipeline with the Turbopack emitter identity: hydration
11
+ * artifacts persisted, and the virtual system-props id (Turbopack rejects
12
+ * the webpack path's absolute-path imports). */
13
+ export declare function runTurbopackPipeline(session: ExtractionSession): Promise<void>;
14
+ /**
15
+ * Start the dev watcher: fs.watch per eligible top-level directory (plus a
16
+ * non-recursive watch on the root itself), debounced into
17
+ * existence-partitioned modified/removed sets feeding
18
+ * `session.handleWatchUpdate` (serialized — updates never overlap).
19
+ * Generated and vendored trees (`.animus`, `.next`, node_modules) are never
20
+ * registered with the OS — recursive registration of those trees exhausts
21
+ * inotify/kqueue descriptors (EMFILE/ENOSPC) on large projects.
22
+ * Idempotent per project root; unref'd so it never holds the process open.
23
+ * Asynchronous FSWatcher errors degrade to no-watch with a warning instead
24
+ * of crashing the dev server. Returns a close handle, or null when this
25
+ * root is already watched or the platform lacks recursive fs.watch (Linux
26
+ * before Node 20 — degrades to no-watch with a warning).
27
+ */
28
+ export declare function startTurbopackWatcher(session: ExtractionSession, rootDir: string, debounceMs?: number, watchFn?: typeof watch): {
29
+ close(): void;
30
+ } | null;
31
+ //# sourceMappingURL=turbopack-orchestrator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"turbopack-orchestrator.d.ts","sourceRoot":"","sources":["../src/turbopack-orchestrator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqC,KAAK,EAAE,MAAM,IAAI,CAAC;AAK9D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE9D;;;;;;GAMG;AAEH;;iDAEiD;AACjD,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,iBAAiB,GACzB,OAAO,CAAC,IAAI,CAAC,CAIf;AAMD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,iBAAiB,EAC1B,OAAO,EAAE,MAAM,EACf,UAAU,SAAK,EAGf,OAAO,GAAE,OAAO,KAAa,GAC5B;IAAE,KAAK,IAAI,IAAI,CAAA;CAAE,GAAG,IAAI,CA0G1B"}
package/dist/types.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import type { StaticCssConfig } from '@animus-ui/extract/pipeline';
1
2
  export interface AnimusNextOptions {
2
3
  /** Path to a module exporting a SystemInstance from `@animus-ui/system`. */
3
4
  system: string;
@@ -15,26 +16,82 @@ export interface AnimusNextOptions {
15
16
  extensions?: string[];
16
17
  /** When true, extraction failures throw instead of warning. */
17
18
  strict?: boolean;
19
+ /**
20
+ * Project-root-relative path of the single file that receives the
21
+ * `import '.animus/styles.css'` injection (the stylesheet import is
22
+ * stripped from every other file to prevent per-chunk CSS duplication).
23
+ * Set this when your root entry doesn't match the default detection of
24
+ * `app/layout.*` / `pages/_app.*`, optionally under `src/` — e.g. a
25
+ * nested App Router root layout like `'src/app/[locale]/layout.tsx'`.
26
+ */
27
+ cssImportTarget?: string;
18
28
  /** Enable verbose logging. */
19
29
  verbose?: boolean;
20
30
  /** Namespace prefix for CSS variables and class names. */
21
31
  prefix?: string;
22
32
  /**
23
- * Extraction engine selection. `'v2'` (default) is the production
24
- * engine — parity-proven against v1 with 8× fewer parses and no cache
25
- * machinery. `'v1'` remains selectable and functional as the escape
26
- * hatch until v1 retires. Propagated to every compiler instance,
27
- * including non-owning ones.
33
+ * Forced-emission declarations for usage the scanner cannot observe
34
+ * (CMS-driven variants, spread-hidden props, dynamically selected
35
+ * components). Declared variants/states/system-prop values and custom
36
+ * dynamic slots are emitted as if used; entries are labeled as forced
37
+ * in the extraction report. Empty/absent is a no-op.
38
+ */
39
+ staticCss?: StaticCssConfig;
40
+ /**
41
+ * Browser targets for CSS autoprefixing and syntax lowering.
42
+ * Accepts a browserslist query string or array of queries.
43
+ * Falls back to project's browserslist config, then to `defaults`.
44
+ */
45
+ targets?: string | string[];
46
+ /**
47
+ * Control CSS minification of the emitted stylesheet.
48
+ * - `true`: always minify (dev + prod)
49
+ * - `false`: never minify (autoprefixing still applies)
50
+ * - `undefined` (default): minify in production (`NODE_ENV === 'production'`)
51
+ */
52
+ minify?: boolean;
53
+ /**
54
+ * Extraction engine selection. `'v2'` is the only engine and the default,
55
+ * propagated to every compiler instance (including non-owning ones). The v1
56
+ * engine was retired (openspec: retire-extract-v1); configuring
57
+ * `engine: 'v1'` (or setting `ANIMUS_ENGINE=v1`) throws — the selection is
58
+ * never silently upgraded.
28
59
  *
29
60
  * @default 'v2'
30
61
  */
31
- engine?: 'v1' | 'v2';
62
+ engine?: 'v2';
63
+ /**
64
+ * Turbopack integration mode.
65
+ *
66
+ * - `'auto'` (default): activate whenever the process runs under
67
+ * Turbopack (Next sets the `TURBOPACK` environment variable for every
68
+ * Turbopack dev/build). Zero-config support for Next 16 defaults and
69
+ * `next dev --turbopack` on Next 15.
70
+ * - `'on'`: always generate Turbopack wiring.
71
+ * - `'off'`: webpack-only; no Turbopack keys are generated.
72
+ *
73
+ * When active, extraction runs during next.config resolution (the wrapped
74
+ * config resolves asynchronously — Next awaits it), a dev watcher re-runs
75
+ * analysis on source changes, and per-file transforms run in a stateless
76
+ * loader fed by `.animus/` disk artifacts.
77
+ */
78
+ turbopack?: {
79
+ mode?: 'auto' | 'on' | 'off';
80
+ };
81
+ /**
82
+ * @deprecated Use `turbopack` — same shape. Honored for one release
83
+ * cycle with a one-time warning; `turbopack` wins when both are set.
84
+ */
85
+ unstable_turbopack?: {
86
+ mode?: 'off' | 'auto' | 'on';
87
+ };
32
88
  /**
33
- * Full `@layer` declaration order. Must include all 7 Animus layers
34
- * (`global`, `base`, `variants`, `compounds`, `states`, `system`, `custom`)
35
- * as a subsequence. Consumer layers may be interleaved.
89
+ * Full `@layer` declaration order. Must include all 7 Animus `anm-*`
90
+ * layers (`anm-global`, `anm-base`, `anm-variants`, `anm-compounds`,
91
+ * `anm-states`, `anm-system`, `anm-custom`) as a subsequence. Consumer
92
+ * layers may be interleaved. Names are emitted as-is.
36
93
  *
37
- * @example ['reset', 'global', 'base', 'variants', 'compounds', 'states', 'system', 'custom', 'overrides']
94
+ * @example ['reset', 'anm-global', 'anm-base', 'anm-variants', 'anm-compounds', 'anm-states', 'anm-system', 'anm-custom', 'overrides']
38
95
  */
39
96
  layers?: string[];
40
97
  }
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAChC,4EAA4E;IAC5E,MAAM,EAAE,MAAM,CAAC;IACf,8CAA8C;IAC9C,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB;;;;;;;;OAQG;IACH,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,+DAA+D;IAC/D,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,8BAA8B;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,0DAA0D;IAC1D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;;;;;OAQG;IACH,MAAM,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACrB;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAEnE,MAAM,WAAW,iBAAiB;IAChC,4EAA4E;IAC5E,MAAM,EAAE,MAAM,CAAC;IACf,8CAA8C;IAC9C,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB;;;;;;;;OAQG;IACH,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,+DAA+D;IAC/D,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;;;;;OAOG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,8BAA8B;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,0DAA0D;IAC1D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC5B;;;;;OAKG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;;;;;;OAQG;IACH,MAAM,CAAC,EAAE,IAAI,CAAC;IACd;;;;;;;;;;;;;;OAcG;IACH,SAAS,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,KAAK,CAAA;KAAE,CAAC;IAC7C;;;OAGG;IACH,kBAAkB,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC;IACtD;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB"}
@@ -28,6 +28,6 @@ type NextConfig = Record<string, unknown> & {
28
28
  * export default withAnimus({ system: './src/ds.ts' })({});
29
29
  * ```
30
30
  */
31
- export declare function withAnimus(options: AnimusNextOptions): (nextConfig: NextConfig) => NextConfig;
31
+ export declare function withAnimus(options: AnimusNextOptions): (nextConfig: NextConfig) => NextConfig | Promise<NextConfig>;
32
32
  export {};
33
33
  //# sourceMappingURL=with-animus.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"with-animus.d.ts","sourceRoot":"","sources":["../src/with-animus.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAKjD,KAAK,aAAa,GAAG;IACnB,OAAO,CAAC,EAAE,OAAO,EAAE,CAAC;IACpB,OAAO,CAAC,EAAE;QACR,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;KAChC,CAAC;IACF,MAAM,CAAC,EAAE;QACP,KAAK,CAAC,EAAE,KAAK,CAAC;YACZ,IAAI,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC;YAC5C,OAAO,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC;YAC/C,OAAO,CAAC,EAAE,MAAM,CAAC;YACjB,GAAG,CAAC,EAAE,KAAK,CAAC;gBAAE,MAAM,EAAE,MAAM,CAAC;gBAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;aAAE,CAAC,CAAC;SACpE,CAAC,CAAC;KACJ,CAAC;CACH,CAAC;AAEF,KAAK,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IAC1C,OAAO,CAAC,EAAE,CACR,MAAM,EAAE,aAAa,EACrB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC7B,aAAa,CAAC;CACpB,CAAC;AAIF;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CACxB,OAAO,EAAE,iBAAiB,GACzB,CAAC,UAAU,EAAE,UAAU,KAAK,UAAU,CAgLxC"}
1
+ {"version":3,"file":"with-animus.d.ts","sourceRoot":"","sources":["../src/with-animus.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAKjD,KAAK,aAAa,GAAG;IACnB,OAAO,CAAC,EAAE,OAAO,EAAE,CAAC;IACpB,OAAO,CAAC,EAAE;QACR,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;KAChC,CAAC;IACF,MAAM,CAAC,EAAE;QACP,KAAK,CAAC,EAAE,KAAK,CAAC;YACZ,IAAI,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC;YAC5C,OAAO,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC;YAC/C,OAAO,CAAC,EAAE,MAAM,CAAC;YACjB,GAAG,CAAC,EAAE,KAAK,CAAC;gBAAE,MAAM,EAAE,MAAM,CAAC;gBAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;aAAE,CAAC,CAAC;SACpE,CAAC,CAAC;KACJ,CAAC;CACH,CAAC;AAEF,KAAK,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IAC1C,OAAO,CAAC,EAAE,CACR,MAAM,EAAE,aAAa,EACrB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC7B,aAAa,CAAC;CACpB,CAAC;AAKF;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CACxB,OAAO,EAAE,iBAAiB,GACzB,CAAC,UAAU,EAAE,UAAU,KAAK,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,CAgM9D"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@animus-ui/next-plugin",
3
- "version": "0.1.1-beta.2",
3
+ "version": "0.1.2",
4
4
  "description": "Animus static CSS extraction for Next.js (webpack)",
5
5
  "keywords": [
6
6
  "animus",
@@ -36,15 +36,15 @@
36
36
  },
37
37
  "scripts": {
38
38
  "build": "bun run build:ts",
39
- "build:ts": "tsdown && tsgo -p tsconfig.build.json",
40
- "compile": "tsgo --noEmit"
39
+ "build:ts": "tsdown && tsc -p tsconfig.build.json",
40
+ "compile": "tsc --noEmit"
41
41
  },
42
42
  "dependencies": {
43
- "@animus-ui/extract": "0.1.1-beta.2"
43
+ "@animus-ui/extract": "0.1.2"
44
44
  },
45
45
  "peerDependencies": {
46
46
  "@mdx-js/mdx": "^3.0.0",
47
- "next": ">=15 <16",
47
+ "next": ">=15 <17",
48
48
  "webpack": ">=5 <6"
49
49
  },
50
50
  "peerDependenciesMeta": {
@@ -1,33 +0,0 @@
1
- export type AnalyzeProjectArgs = [
2
- filesJson: string,
3
- scalesJson: string,
4
- variableMapJson: string,
5
- contextualVarsJson: string | null,
6
- propConfigJson: string,
7
- groupRegistryJson: string,
8
- packageResolutionJson: string,
9
- devMode: boolean,
10
- emitterConfigJson: string | null,
11
- selectorAliasesJson: string | null,
12
- selectorOrderJson: null,
13
- globalStyleBlocksJson: string | null,
14
- pathAliasesJson: string | null,
15
- keyframesJson: string | null
16
- ];
17
- export interface AnalyzeProjectInputs {
18
- filesJson: string;
19
- scalesJson: string;
20
- variableMapJson: string;
21
- contextualVarsJson: string | null;
22
- propConfigJson: string;
23
- groupRegistryJson: string;
24
- packageResolutionJson: string;
25
- emitterConfigJson: string | null;
26
- selectorAliasesJson: string | null;
27
- globalStyleBlocksJson: string | null;
28
- pathAliasesJson: string | null;
29
- keyframesJson: string | null;
30
- }
31
- export declare function buildProductionAnalyzeProjectArgs(inputs: AnalyzeProjectInputs): AnalyzeProjectArgs;
32
- export declare function buildHmrAnalyzeProjectArgs(inputs: AnalyzeProjectInputs): AnalyzeProjectArgs;
33
- //# sourceMappingURL=analyze-project-args.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"analyze-project-args.d.ts","sourceRoot":"","sources":["../src/analyze-project-args.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAAG;IAC/B,SAAS,EAAE,MAAM;IACjB,UAAU,EAAE,MAAM;IAClB,eAAe,EAAE,MAAM;IACvB,kBAAkB,EAAE,MAAM,GAAG,IAAI;IACjC,cAAc,EAAE,MAAM;IACtB,iBAAiB,EAAE,MAAM;IACzB,qBAAqB,EAAE,MAAM;IAC7B,OAAO,EAAE,OAAO;IAChB,iBAAiB,EAAE,MAAM,GAAG,IAAI;IAChC,mBAAmB,EAAE,MAAM,GAAG,IAAI;IAClC,iBAAiB,EAAE,IAAI;IACvB,qBAAqB,EAAE,MAAM,GAAG,IAAI;IACpC,eAAe,EAAE,MAAM,GAAG,IAAI;IAC9B,aAAa,EAAE,MAAM,GAAG,IAAI;CAC7B,CAAC;AAEF,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,cAAc,EAAE,MAAM,CAAC;IACvB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,qBAAqB,EAAE,MAAM,CAAC;IAC9B,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,qBAAqB,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B;AAwBD,wBAAgB,iCAAiC,CAC/C,MAAM,EAAE,oBAAoB,GAC3B,kBAAkB,CAEpB;AAED,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,oBAAoB,GAC3B,kBAAkB,CAEpB"}