@animus-ui/extract 0.1.9 → 0.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (158) hide show
  1. package/README.md +48 -1
  2. package/crates/extract-v2/animus-extract-v2.darwin-arm64.node +0 -0
  3. package/crates/extract-v2/animus-extract-v2.linux-arm64-gnu.node +0 -0
  4. package/crates/extract-v2/animus-extract-v2.linux-x64-gnu.node +0 -0
  5. package/crates/extract-v2/index.d.ts +17 -98
  6. package/dist/index.cjs +78 -2101
  7. package/dist/index.mjs +2 -2026
  8. package/dist/{analyze-project-args.d.ts → pipeline/analyze-project-args.d.ts} +0 -12
  9. package/dist/pipeline/analyze-project-args.d.ts.map +1 -0
  10. package/dist/pipeline/assemble-stylesheet.d.ts +23 -0
  11. package/dist/pipeline/assemble-stylesheet.d.ts.map +1 -0
  12. package/dist/pipeline/asset-placeholders.d.ts +4 -0
  13. package/dist/pipeline/asset-placeholders.d.ts.map +1 -0
  14. package/dist/pipeline/content-hash.d.ts +2 -0
  15. package/dist/pipeline/content-hash.d.ts.map +1 -0
  16. package/dist/pipeline/core-options.d.ts +96 -0
  17. package/dist/pipeline/core-options.d.ts.map +1 -0
  18. package/dist/pipeline/correlate-external-tokens.d.ts +38 -0
  19. package/dist/pipeline/correlate-external-tokens.d.ts.map +1 -0
  20. package/dist/pipeline/discover-files.d.ts +4 -0
  21. package/dist/pipeline/discover-files.d.ts.map +1 -0
  22. package/dist/pipeline/discover-packages.d.ts +55 -0
  23. package/dist/pipeline/discover-packages.d.ts.map +1 -0
  24. package/dist/pipeline/dynamic-prop-config.d.ts +22 -0
  25. package/dist/pipeline/dynamic-prop-config.d.ts.map +1 -0
  26. package/dist/pipeline/engine-adapter.d.ts +63 -0
  27. package/dist/pipeline/engine-adapter.d.ts.map +1 -0
  28. package/dist/pipeline/engine-retirement.d.ts +3 -0
  29. package/dist/pipeline/engine-retirement.d.ts.map +1 -0
  30. package/dist/pipeline/error-diagnostics.d.ts +8 -0
  31. package/dist/pipeline/error-diagnostics.d.ts.map +1 -0
  32. package/dist/{index.d.ts → pipeline/index.d.ts} +16 -6
  33. package/dist/pipeline/index.d.ts.map +1 -0
  34. package/dist/pipeline/internal-wire.d.ts +2 -0
  35. package/dist/pipeline/internal-wire.d.ts.map +1 -0
  36. package/dist/pipeline/manifest-diagnostics.d.ts +57 -0
  37. package/dist/pipeline/manifest-diagnostics.d.ts.map +1 -0
  38. package/dist/pipeline/manifest-schema.d.ts +117 -0
  39. package/dist/pipeline/manifest-schema.d.ts.map +1 -0
  40. package/dist/pipeline/mdx-preprocessor.d.ts +25 -0
  41. package/dist/pipeline/mdx-preprocessor.d.ts.map +1 -0
  42. package/dist/pipeline/path-aliases.d.ts +15 -0
  43. package/dist/pipeline/path-aliases.d.ts.map +1 -0
  44. package/dist/{post-process-css.d.ts → pipeline/post-process-css.d.ts} +0 -8
  45. package/dist/pipeline/post-process-css.d.ts.map +1 -0
  46. package/dist/pipeline/prefix.d.ts +8 -0
  47. package/dist/pipeline/prefix.d.ts.map +1 -0
  48. package/dist/pipeline/replacement-plans.d.ts +22 -0
  49. package/dist/pipeline/replacement-plans.d.ts.map +1 -0
  50. package/dist/pipeline/resolve-asset.d.ts +11 -0
  51. package/dist/pipeline/resolve-asset.d.ts.map +1 -0
  52. package/dist/pipeline/run-analysis.d.ts +62 -0
  53. package/dist/pipeline/run-analysis.d.ts.map +1 -0
  54. package/dist/pipeline/source-corpus.d.ts +25 -0
  55. package/dist/pipeline/source-corpus.d.ts.map +1 -0
  56. package/dist/pipeline/source-identity.d.ts +63 -0
  57. package/dist/pipeline/source-identity.d.ts.map +1 -0
  58. package/dist/pipeline/source-ingestion.d.ts +168 -0
  59. package/dist/pipeline/source-ingestion.d.ts.map +1 -0
  60. package/dist/pipeline/static-css.d.ts +16 -0
  61. package/dist/pipeline/static-css.d.ts.map +1 -0
  62. package/dist/pipeline/structural-self-check.d.ts +12 -0
  63. package/dist/pipeline/structural-self-check.d.ts.map +1 -0
  64. package/dist/pipeline/svelte-source-adapter.d.ts +81 -0
  65. package/dist/pipeline/svelte-source-adapter.d.ts.map +1 -0
  66. package/dist/pipeline/system-config.d.ts +40 -0
  67. package/dist/pipeline/system-config.d.ts.map +1 -0
  68. package/dist/pipeline/system-props-module.d.ts +8 -0
  69. package/dist/pipeline/system-props-module.d.ts.map +1 -0
  70. package/dist/pipeline/timing-waterfall.d.ts +6 -0
  71. package/dist/pipeline/timing-waterfall.d.ts.map +1 -0
  72. package/dist/pipeline/tsconfig-paths.d.ts +7 -0
  73. package/dist/pipeline/tsconfig-paths.d.ts.map +1 -0
  74. package/dist/pipeline/unit-fallback.d.ts +2 -0
  75. package/dist/pipeline/unit-fallback.d.ts.map +1 -0
  76. package/dist/pipeline/utils.d.ts +3 -0
  77. package/dist/pipeline/utils.d.ts.map +1 -0
  78. package/dist/pipeline/watch-keys.d.ts +2 -0
  79. package/dist/pipeline/watch-keys.d.ts.map +1 -0
  80. package/dist/pipeline-DeEENy5C.mjs +2905 -0
  81. package/dist/pipeline-x1yBZ2UP.cjs +3386 -0
  82. package/dist/session/extraction-session.d.ts +240 -0
  83. package/dist/session/extraction-session.d.ts.map +1 -0
  84. package/dist/session/index.d.ts +10 -0
  85. package/dist/session/index.d.ts.map +1 -0
  86. package/dist/session/published-set.d.ts +52 -0
  87. package/dist/session/published-set.d.ts.map +1 -0
  88. package/dist/session/resolve-packages.d.ts +7 -0
  89. package/dist/session/resolve-packages.d.ts.map +1 -0
  90. package/dist/session/session-paths.d.ts +97 -0
  91. package/dist/session/session-paths.d.ts.map +1 -0
  92. package/dist/session/singleton.d.ts +85 -0
  93. package/dist/session/singleton.d.ts.map +1 -0
  94. package/dist/session/timing.d.ts +2 -0
  95. package/dist/session/timing.d.ts.map +1 -0
  96. package/dist/session/turbopack-orchestrator.d.ts +27 -0
  97. package/dist/session/turbopack-orchestrator.d.ts.map +1 -0
  98. package/dist/session.cjs +1999 -0
  99. package/dist/session.mjs +1955 -0
  100. package/index-v2.js +0 -9
  101. package/package.json +22 -9
  102. package/dist/analyze-project-args.d.ts.map +0 -1
  103. package/dist/assemble-stylesheet.d.ts +0 -58
  104. package/dist/assemble-stylesheet.d.ts.map +0 -1
  105. package/dist/asset-placeholders.d.ts +0 -29
  106. package/dist/asset-placeholders.d.ts.map +0 -1
  107. package/dist/content-hash.d.ts +0 -9
  108. package/dist/content-hash.d.ts.map +0 -1
  109. package/dist/correlate-external-tokens.d.ts +0 -46
  110. package/dist/correlate-external-tokens.d.ts.map +0 -1
  111. package/dist/discover-files.d.ts +0 -10
  112. package/dist/discover-files.d.ts.map +0 -1
  113. package/dist/discover-packages.d.ts +0 -192
  114. package/dist/discover-packages.d.ts.map +0 -1
  115. package/dist/dynamic-prop-config.d.ts +0 -37
  116. package/dist/dynamic-prop-config.d.ts.map +0 -1
  117. package/dist/engine-adapter.d.ts +0 -97
  118. package/dist/engine-adapter.d.ts.map +0 -1
  119. package/dist/engine-retirement.d.ts +0 -22
  120. package/dist/engine-retirement.d.ts.map +0 -1
  121. package/dist/error-diagnostics.d.ts +0 -32
  122. package/dist/error-diagnostics.d.ts.map +0 -1
  123. package/dist/external-keyframes.d.ts +0 -23
  124. package/dist/external-keyframes.d.ts.map +0 -1
  125. package/dist/index.d.ts.map +0 -1
  126. package/dist/manifest-diagnostics.d.ts +0 -62
  127. package/dist/manifest-diagnostics.d.ts.map +0 -1
  128. package/dist/mdx-preprocessor.d.ts +0 -39
  129. package/dist/mdx-preprocessor.d.ts.map +0 -1
  130. package/dist/path-aliases.d.ts +0 -34
  131. package/dist/path-aliases.d.ts.map +0 -1
  132. package/dist/post-process-css.d.ts.map +0 -1
  133. package/dist/prefix.d.ts +0 -15
  134. package/dist/prefix.d.ts.map +0 -1
  135. package/dist/replacement-plans.d.ts +0 -46
  136. package/dist/replacement-plans.d.ts.map +0 -1
  137. package/dist/resolve-asset.d.ts +0 -14
  138. package/dist/resolve-asset.d.ts.map +0 -1
  139. package/dist/run-analysis.d.ts +0 -74
  140. package/dist/run-analysis.d.ts.map +0 -1
  141. package/dist/source-identity.d.ts +0 -93
  142. package/dist/source-identity.d.ts.map +0 -1
  143. package/dist/static-css.d.ts +0 -25
  144. package/dist/static-css.d.ts.map +0 -1
  145. package/dist/system-config.d.ts +0 -57
  146. package/dist/system-config.d.ts.map +0 -1
  147. package/dist/system-props-module.d.ts +0 -22
  148. package/dist/system-props-module.d.ts.map +0 -1
  149. package/dist/timing-waterfall.d.ts +0 -17
  150. package/dist/timing-waterfall.d.ts.map +0 -1
  151. package/dist/tsconfig-paths.d.ts +0 -8
  152. package/dist/tsconfig-paths.d.ts.map +0 -1
  153. package/dist/unit-fallback.d.ts +0 -7
  154. package/dist/unit-fallback.d.ts.map +0 -1
  155. package/dist/utils.d.ts +0 -3
  156. package/dist/utils.d.ts.map +0 -1
  157. package/dist/watch-keys.d.ts +0 -12
  158. package/dist/watch-keys.d.ts.map +0 -1
@@ -1,32 +0,0 @@
1
- /**
2
- * Build-failing escalation for `kind: "error"` manifest diagnostics
3
- * (extraction-diagnostics §Error diagnostics fail the build; design D8 of
4
- * transform-result-hardening).
5
- *
6
- * ONE policy point shared by BOTH bundler plugins: each calls
7
- * `assertNoErrorDiagnostics` at its analysis-accept seam, immediately after
8
- * a completed analysis and BEFORE any stylesheet content is served or
9
- * written. Failure content is composed here, from the diagnostics alone, so
10
- * identical input produces identical failure messages in every host —
11
- * plugin policy must not fork (precedent: pkg-collection divergences).
12
- */
13
- /** The fields of a manifest diagnostic the error gate reads — structural
14
- * (fields used only), so both the parsed-manifest entries and TS-side
15
- * `ManifestDiagnostic` values qualify. Mirrors the Rust `CssDiagnostic`
16
- * in `extract-v2/src/analyze_css.rs`. */
17
- export type CssDiagnosticLike = {
18
- file: string;
19
- component: string;
20
- kind: string;
21
- message: string;
22
- };
23
- /**
24
- * Throw when the diagnostics carry any `kind: "error"` entry — one
25
- * aggregated `Error` naming EVERY offender (component, file, message — one
26
- * line per entry, each prefixed `[animus]`). Warning-only diagnostics
27
- * (`bail`/`skip`/`warn`, any severity) never trip this gate; their routing
28
- * stays with `surfaceManifestDiagnostics`. Callers accept the manifest only
29
- * past this point, so no stylesheet from a failing analysis is published.
30
- */
31
- export declare function assertNoErrorDiagnostics(diagnostics: CssDiagnosticLike[] | undefined): void;
32
- //# sourceMappingURL=error-diagnostics.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"error-diagnostics.d.ts","sourceRoot":"","sources":["../pipeline/error-diagnostics.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH;;;0CAG0C;AAC1C,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CACtC,WAAW,EAAE,iBAAiB,EAAE,GAAG,SAAS,GAC3C,IAAI,CAsBN"}
@@ -1,23 +0,0 @@
1
- import type { ManifestDiagnostic } from './manifest-diagnostics';
2
- /** Stable codes for external keyframes discovery. */
3
- export declare const KEYFRAMES_EXTERNAL_ENTRY_FAILED = "animus.keyframes.external-entry-failed";
4
- export declare const KEYFRAMES_EXPORT_COLLISION = "animus.keyframes.export-collision";
5
- export interface ExternalKeyframesMerge {
6
- /** Consumer collections merged with every discovered external collection
7
- * (consumer wins on name collisions); `null` when nothing exists. */
8
- keyframesJson: string | null;
9
- /** Warn-severity diagnostics for failed entries and name collisions —
10
- * surfaced through the shared manifest-diagnostics policy point. */
11
- diagnostics: ManifestDiagnostic[];
12
- }
13
- /**
14
- * Merge `Keyframes` collections discovered from external package entries into
15
- * the consumer system's collections. Keyframes are the sole carve-out from
16
- * the consumer-config singular-authority rule: nothing but branded
17
- * collections is read from an entry, an entry that fails to evaluate
18
- * degrades to a coded diagnostic naming it, and a collection whose export
19
- * name collides keeps the earlier (consumer-first) collection with a coded
20
- * diagnostic instead of silently reordering names.
21
- */
22
- export declare function mergeExternalKeyframes(scan: (entryPath: string, rootDir: string) => string | null, consumerKeyframesJson: string | null | undefined, externalEntries: Iterable<string>, rootDir: string): ExternalKeyframesMerge;
23
- //# sourceMappingURL=external-keyframes.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"external-keyframes.d.ts","sourceRoot":"","sources":["../pipeline/external-keyframes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAEjE,qDAAqD;AACrD,eAAO,MAAM,+BAA+B,2CACF,CAAC;AAC3C,eAAO,MAAM,0BAA0B,sCAAsC,CAAC;AAE9E,MAAM,WAAW,sBAAsB;IACrC;0EACsE;IACtE,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B;yEACqE;IACrE,WAAW,EAAE,kBAAkB,EAAE,CAAC;CACnC;AAED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,EAC3D,qBAAqB,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAChD,eAAe,EAAE,QAAQ,CAAC,MAAM,CAAC,EACjC,OAAO,EAAE,MAAM,GACd,sBAAsB,CAoExB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../pipeline/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,yBAAyB,EACzB,uBAAuB,GACxB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,4BAA4B,EAC5B,kBAAkB,GACnB,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EACV,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACjE,YAAY,EACV,SAAS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;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC"}
@@ -1,62 +0,0 @@
1
- export type ManifestDiagnostic = {
2
- file: string;
3
- component: string;
4
- kind: string;
5
- message: string;
6
- /** Structured token path (`scale.key`) — present only on
7
- * `external-token-candidate` diagnostics (cross-source correlation). */
8
- token?: string;
9
- /** Stable diagnostic code (`animus.<namespace>.<slug>`). */
10
- code?: string;
11
- /** `"error"` fails strict builds at this policy point; `"warn"`/absent
12
- * never does. */
13
- severity?: string;
14
- };
15
- /** Stable code for selector forms with no substitutable subject.
16
- * Mirrors the Rust constant in `extract-v2/src/eval.rs`. */
17
- export declare const SELECTOR_UNSUPPORTED_SUBJECT = "animus.selector.unsupported-subject";
18
- /** True when the diagnostic reports a chain dropped for an unresolved
19
- * parent component. */
20
- export declare function isUnresolvedParentDrop(diagnostic: {
21
- message?: unknown;
22
- }): boolean;
23
- /** The parent binding named by an unresolved-parent drop, or null when the
24
- * diagnostic is not one. */
25
- export declare function unresolvedParentName(diagnostic: {
26
- message?: unknown;
27
- }): string | null;
28
- export interface DiagnosticPolicy {
29
- /** When true, error-severity diagnostics throw instead of warning. */
30
- strict?: boolean;
31
- /** System-level diagnostics (e.g. selector-alias validation) surfaced
32
- * ahead of the manifest's own, through the same policy. */
33
- prepend?: ManifestDiagnostic[];
34
- }
35
- /** True when the selector string carries at least one substitutable `&`
36
- * subject outside quoted text (mirrors the Rust `selector_subject` walk —
37
- * ancestor, leading, and repeated subjects all count; a `&` inside a
38
- * quoted attribute value does not). */
39
- export declare function hasSelectorSubject(value: string): boolean;
40
- /**
41
- * Synthesize coded diagnostics for registered selector-alias values that
42
- * look selector-shaped (`&` present) but carry no substitutable subject —
43
- * every `&` sits inside quoted text, so there is nothing to anchor the
44
- * class to. Ancestor-prefixed and repeated subjects are supported and pass
45
- * validation. The system-config boundary is where these must fail loud
46
- * (alias values never reach the evaluator's key guard).
47
- */
48
- export declare function collectSelectorAliasDiagnostics(selectorAliasesJson: string | null | undefined): ManifestDiagnostic[];
49
- /**
50
- * Surface extraction-manifest diagnostics through a plugin's warn channel.
51
- *
52
- * Single authoritative copy for both extraction plugins — and the single
53
- * strict-escalation policy point: error-severity diagnostics throw one
54
- * Error naming every offender when `policy.strict`, and print as warnings
55
- * otherwise. Surfaces `bail` (component not extracted), `skip` (component
56
- * skipped), and `warn` kinds; unknown kinds stay silent. Printed lines
57
- * include the diagnostic code when the message doesn't already carry it.
58
- */
59
- export declare function surfaceManifestDiagnostics(manifest: {
60
- diagnostics?: ManifestDiagnostic[];
61
- }, warn: (message: string) => void, policy?: DiagnosticPolicy): void;
62
- //# sourceMappingURL=manifest-diagnostics.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"manifest-diagnostics.d.ts","sourceRoot":"","sources":["../pipeline/manifest-diagnostics.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB;6EACyE;IACzE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4DAA4D;IAC5D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;sBACkB;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;6DAC6D;AAC7D,eAAO,MAAM,4BAA4B,wCACF,CAAC;AAQxC;wBACwB;AACxB,wBAAgB,sBAAsB,CAAC,UAAU,EAAE;IACjD,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,GAAG,OAAO,CAKV;AAED;6BAC6B;AAC7B,wBAAgB,oBAAoB,CAAC,UAAU,EAAE;IAC/C,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,GAAG,MAAM,GAAG,IAAI,CAGhB;AAED,MAAM,WAAW,gBAAgB;IAC/B,sEAAsE;IACtE,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;gEAC4D;IAC5D,OAAO,CAAC,EAAE,kBAAkB,EAAE,CAAC;CAChC;AAED;;;wCAGwC;AACxC,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAqBzD;AAED;;;;;;;GAOG;AACH,wBAAgB,+BAA+B,CAC7C,mBAAmB,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAC7C,kBAAkB,EAAE,CAuBtB;AAED;;;;;;;;;GASG;AACH,wBAAgB,0BAA0B,CACxC,QAAQ,EAAE;IAAE,WAAW,CAAC,EAAE,kBAAkB,EAAE,CAAA;CAAE,EAChD,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,EAC/B,MAAM,GAAE,gBAAqB,GAC5B,IAAI,CA+BN"}
@@ -1,39 +0,0 @@
1
- /**
2
- * MDX source preprocessor for the extraction pipeline.
3
- *
4
- * MDX files are first-class consumers of ds-built components but are not
5
- * directly parseable by OXC (which the scanner uses for .tsx/.jsx). This
6
- * module compiles MDX sources to scanner-consumable JSX using @mdx-js/mdx.
7
- *
8
- * @mdx-js/mdx is declared as `peerDependenciesMeta.optional` on the
9
- * plugin packages that import this module. The dynamic import with
10
- * .catch() ensures non-MDX consumers (who configure `extensions` to
11
- * exclude .mdx) never trigger the resolution — zero install-footprint
12
- * cost for them.
13
- *
14
- * The `DEFAULT_EXTENSIONS` constant is the shared source of truth for
15
- * both `@animus-ui/vite-plugin` and `@animus-ui/next-plugin`. Each plugin
16
- * imports it directly; independent redeclaration of default extensions
17
- * is considered a regression.
18
- */
19
- export declare const DEFAULT_EXTENSIONS: readonly ['.ts', '.tsx', '.js', '.jsx', '.mdx'];
20
- export type DefaultExtension = (typeof DEFAULT_EXTENSIONS)[number];
21
- export interface PreprocessMdxResult {
22
- kind: 'ok' | 'missing-dep' | 'error';
23
- /** Preprocessed JSX source. Present when kind === 'ok'. */
24
- source?: string;
25
- /** Error message. Present when kind === 'error'. */
26
- error?: string;
27
- }
28
- /**
29
- * Preprocess an MDX source string into scanner-consumable JSX.
30
- *
31
- * - Returns `{ kind: 'ok', source }` with JSX-compiled output on success.
32
- * - Returns `{ kind: 'missing-dep' }` if @mdx-js/mdx is not resolvable
33
- * (consumer needs to install it).
34
- * - Returns `{ kind: 'error', error }` on compile failure (e.g. malformed
35
- * MDX syntax). Plugins SHALL warn + skip affected files; the build
36
- * continues with remaining files.
37
- */
38
- export declare function preprocessMdx(source: string, filename: string): Promise<PreprocessMdxResult>;
39
- //# sourceMappingURL=mdx-preprocessor.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mdx-preprocessor.d.ts","sourceRoot":"","sources":["../pipeline/mdx-preprocessor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,eAAO,MAAM,kBAAkB,YAC7B,KAAK,EACL,MAAM,EACN,KAAK,EACL,MAAM,EACN,MAAM,CACE,CAAC;AAEX,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEnE,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,IAAI,GAAG,aAAa,GAAG,OAAO,CAAC;IACrC,2DAA2D;IAC3D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oDAAoD;IACpD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;GASG;AACH,wBAAsB,aAAa,CACjC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,mBAAmB,CAAC,CA4B9B"}
@@ -1,34 +0,0 @@
1
- /**
2
- * Path-alias normalization for the Rust-facing `pathAliasesJson` contract.
3
- *
4
- * This is the single authoritative encoder of the wire format
5
- * `{ aliases: [{ pattern, replacement, type }] }` consumed by
6
- * `analyzeProject` — both the Vite and Next.js plugins must build their
7
- * alias JSON through here (same convention as buildAnalyzeProjectArgs).
8
- * Each plugin only flattens its bundler's alias config into pairs.
9
- */
10
- export interface PathAliasEntry {
11
- pattern: string;
12
- replacement: string;
13
- type: 'prefix' | 'exact';
14
- }
15
- export interface PathAliasPair {
16
- pattern: string;
17
- target: string;
18
- /**
19
- * Force a classification instead of sniffing the target for a file
20
- * extension. Vite's array-form aliases are always prefix matches.
21
- */
22
- kind?: 'prefix' | 'exact';
23
- }
24
- /**
25
- * Normalize alias pairs: strip a `rootDir` prefix from targets, classify
26
- * exact (file) vs prefix (directory) matches, force trailing slashes on
27
- * prefix entries, and sort longest pattern first for correct matching
28
- * priority. Returns null when no entries survive.
29
- */
30
- export declare function buildPathAliasesJson(pairs: PathAliasPair[], rootDir: string): {
31
- json: string;
32
- count: number;
33
- } | null;
34
- //# sourceMappingURL=path-aliases.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"path-aliases.d.ts","sourceRoot":"","sources":["../pipeline/path-aliases.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;CAC3B;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,aAAa,EAAE,EACtB,OAAO,EAAE,MAAM,GACd;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAyBxC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"post-process-css.d.ts","sourceRoot":"","sources":["../pipeline/post-process-css.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,qBAAqB,EAEtB,MAAM,cAAc,CAAC;AAEtB,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAExE;;;GAGG;AACH,wBAAgB,uBAAuB,CACrC,eAAe,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,EAC9C,OAAO,EAAE,MAAM,GACd,gBAAgB,CAmBlB;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAC5B,GAAG,EAAE,MAAM,EACX,IAAI,EAAE;IACJ,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,gBAAgB,CAAC;IAC1B,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CAChC,GACA,MAAM,CAmBR"}
package/dist/prefix.d.ts DELETED
@@ -1,15 +0,0 @@
1
- /**
2
- * Apply namespace prefix to a variable map, CSS variable declarations, and theme JSON.
3
- *
4
- * Variable map: `{ "colors.ember": "--color-ember" }` -> `{ "colors.ember": "--prefix-color-ember" }`
5
- * Variable CSS: `--color-ember: #FF2800` -> `--prefix-color-ember: #FF2800`
6
- * `var(--color-ember)` -> `var(--prefix-color-ember)`
7
- * Theme JSON: `{ "colors.ember": "var(--color-ember)" }` -> `{ "colors.ember": "var(--prefix-color-ember)" }`
8
- */
9
- export declare function applyPrefix(prefix: string, variableMapJson: string, variableCss: string, themeJson?: string, contextualVarsJson?: string): {
10
- variableMapJson: string;
11
- variableCss: string;
12
- themeJson?: string;
13
- contextualVarsJson?: string;
14
- };
15
- //# sourceMappingURL=prefix.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"prefix.d.ts","sourceRoot":"","sources":["../pipeline/prefix.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,wBAAgB,WAAW,CACzB,MAAM,EAAE,MAAM,EACd,eAAe,EAAE,MAAM,EACvB,WAAW,EAAE,MAAM,EACnB,SAAS,CAAC,EAAE,MAAM,EAClB,kBAAkB,CAAC,EAAE,MAAM,GAC1B;IACD,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B,CA0CA"}
@@ -1,46 +0,0 @@
1
- /**
2
- * File-plan snapshot/diff — the invalidation candidate source shared by
3
- * every analysis path (openspec: dev-transform-coherence,
4
- * dev-served-transform-coherence). A file's plan is the keyed, ordered set
5
- * of (component id, replacement) pairs the manifest holds for it. A file
6
- * with NO entries is ABSENT from the snapshot — a distinct state from a
7
- * present entry whose replacement is empty, so raw↔extracted transitions
8
- * are plan changes like any other.
9
- *
10
- * Lives in the shared pipeline package so the Vite diff consumer and the
11
- * Next (webpack/Turbopack) epoch consumers share ONE semantic definition
12
- * (design D5, next-webpack-served-transform-coherence).
13
- */
14
- export type FilePlanSnapshot = Map<string, string>;
15
- export declare function snapshotFilePlans(manifest: any): FilePlanSnapshot;
16
- /**
17
- * Rel paths whose plan changed between two snapshots: absent→present,
18
- * present→absent, and any change to membership or replacement content.
19
- * `exclude` drops one path (the changed file itself on the edit path — its
20
- * own modules are already in the update set).
21
- */
22
- export declare function diffFilePlans(prev: FilePlanSnapshot, next: FilePlanSnapshot, opts?: {
23
- exclude?: string;
24
- }): string[];
25
- /**
26
- * Canonical replacement epoch: contentHash over the domain-prefixed, sorted
27
- * canonical serialization of a file-plan snapshot — each entry contributes
28
- * `file + '\0' + plan + '\0'` (unambiguous: neither file paths nor the
29
- * JSON plan strings contain NUL). Byte-identical plans → identical epoch;
30
- * any membership/replacement/absent↔present change moves it.
31
- *
32
- * `servedDependencyWitness` extends the epoch to content the plans cannot
33
- * see but restored modules depend on: transformed modules import the
34
- * session's served system-props artifact, so a consumer passes that
35
- * artifact's content here and an offline change to it moves the epoch —
36
- * invalidating persistent-cache snapshots that reference the old epoch
37
- * artifact. Absence and empty-string are distinct values.
38
- *
39
- * This is THE epoch definition — integrations consume this hash (or the
40
- * snapshot diff) and never define their own. Epoch values compare only for
41
- * equality (a moved value invalidates), so the serialization is free to
42
- * evolve with a domain bump: sessions running different serializations
43
- * simply disagree once and rebuild.
44
- */
45
- export declare function hashReplacementPlans(snapshot: FilePlanSnapshot, servedDependencyWitness?: string): string;
46
- //# sourceMappingURL=replacement-plans.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"replacement-plans.d.ts","sourceRoot":"","sources":["../pipeline/replacement-plans.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,gBAAgB,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAQnD,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,GAAG,GAAG,gBAAgB,CA4BjE;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EAAE,gBAAgB,EACtB,IAAI,EAAE,gBAAgB,EACtB,IAAI,CAAC,EAAE;IAAE,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,GAC1B,MAAM,EAAE,CAUV;AAYD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,gBAAgB,EAC1B,uBAAuB,CAAC,EAAE,MAAM,GAC/B,MAAM,CAYR"}
@@ -1,14 +0,0 @@
1
- /**
2
- * Map a specifier through the harvested host alias table (the same
3
- * `pathAliasesJson` wire the engine consumes — entries pre-sorted longest
4
- * pattern first by `buildPathAliasesJson`). Returns an absolute path to an
5
- * EXISTING file, or null when no alias claims the specifier.
6
- */
7
- export declare function resolveThroughPathAliases(specifier: string, rootDir: string, pathAliasesJson: string | null | undefined): string | null;
8
- /**
9
- * Resolve an asset specifier to an absolute file: host aliases, then direct
10
- * Node resolution anchored at `rootDir`, then the package-root fallback.
11
- * Returns null when nothing matches — strict gating stays at the caller.
12
- */
13
- export declare function resolveAssetFile(specifier: string, rootDir: string, pathAliasesJson?: string | null): string | null;
14
- //# sourceMappingURL=resolve-asset.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"resolve-asset.d.ts","sourceRoot":"","sources":["../pipeline/resolve-asset.ts"],"names":[],"mappings":"AA2DA;;;;;GAKG;AACH,wBAAgB,yBAAyB,CACvC,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,eAAe,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GACzC,MAAM,GAAG,IAAI,CAef;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,GAC9B,MAAM,GAAG,IAAI,CA4Cf"}
@@ -1,74 +0,0 @@
1
- import type { AnalyzeProjectInputs } from './analyze-project-args';
2
- import type { SystemConfig } from './system-config';
3
- /**
4
- * Per-bundler emitter identity: where the runtime import comes from and
5
- * which module ids the Rust emitter injects into transformed sources.
6
- * Vite uses virtual module ids; Next uses on-disk `.animus/` paths.
7
- */
8
- export interface EmitterConfig {
9
- runtimeImport: string;
10
- cssModuleId: string;
11
- systemPropsModuleId?: string;
12
- }
13
- export interface ProjectAnalysisResult {
14
- manifest: any;
15
- manifestJson: string;
16
- /** `manifest.sheets.global` — Rust-resolved global CSS. */
17
- globalCss: string;
18
- /** `manifest.css` with the shared unit fallback applied. */
19
- componentCss: string;
20
- /** The exact analyze-time inputs (already-serialized filesJson included) —
21
- * reusable for persistence without re-serializing the source corpus. */
22
- inputs: AnalyzeProjectInputs;
23
- /** Sub-phase durations (ms) for verbose timing displays. */
24
- timings: {
25
- serializeMs: number;
26
- extractMs: number;
27
- parseMs: number;
28
- };
29
- }
30
- export interface AnalysisOptions {
31
- fileEntries: Array<{
32
- path: string;
33
- source: string;
34
- hash?: string;
35
- }>;
36
- packageMap: Record<string, string>;
37
- system: SystemConfig;
38
- emitter: EmitterConfig;
39
- pathAliasesJson: string | null;
40
- /** Serialized staticCss forced-emission declarations, or null. */
41
- staticCssJson?: string | null;
42
- /** rootDir-relative external package dirs (external-token candidates). */
43
- externalDirs?: string[];
44
- devMode: boolean;
45
- /** System-level diagnostics gathered outside analysis (e.g. external
46
- * keyframes discovery) — surfaced through the single shared policy
47
- * point alongside the manifest's own. */
48
- extraDiagnostics?: import('./manifest-diagnostics').ManifestDiagnostic[];
49
- }
50
- /**
51
- * Build the named `analyzeProject` input set from analysis options. Also
52
- * the persistence shape for `.animus/analysis-inputs.json` — an isolated
53
- * process can replay the analysis from exactly this object
54
- * (spec: next-turbopack-integration).
55
- */
56
- export declare function buildAnalysisInputs(opts: AnalysisOptions): AnalyzeProjectInputs;
57
- /**
58
- * The one analysis invocation both plugins share: build the emitter
59
- * config, serialize inputs, call the NAPI `analyzeProject`, parse the
60
- * manifest, surface its diagnostics, and resolve the CSS outputs.
61
- *
62
- * Error handling stays at the call site (strict-mode throw vs warn).
63
- */
64
- export declare function runProjectAnalysis(engineApi: () => any, opts: AnalysisOptions & {
65
- warn: (message: string) => void;
66
- strict?: boolean;
67
- }): ProjectAnalysisResult;
68
- /**
69
- * Clear the engine's per-file analysis cache so stale results from a prior
70
- * build never bleed into a fresh run. Tolerates engines without the
71
- * capability (older builds) — the probe is benign.
72
- */
73
- export declare function clearEngineCache(engineApi: () => any): void;
74
- //# sourceMappingURL=run-analysis.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"run-analysis.d.ts","sourceRoot":"","sources":["../pipeline/run-analysis.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEpD;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,MAAM,WAAW,qBAAqB;IAEpC,QAAQ,EAAE,GAAG,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IACrB,2DAA2D;IAC3D,SAAS,EAAE,MAA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,0 @@
1
- import path from 'node:path';
2
- /** Platform path API (`path` / `path.win32` / `path.posix`). Structural
3
- * local alias — the packed consumers' @types/node need not export
4
- * `PlatformPath` from 'node:path' (older versions don't, which fails
5
- * their declaration type-check against this file's emitted d.ts). */
6
- type PlatformPath = typeof path.win32;
7
- /**
8
- * SourceId derivation authority + allowlist membership (openspec:
9
- * external-source-watch-ingestion, design D1/D2/D5).
10
- *
11
- * One shared derivation produces the canonical source identity consumed by
12
- * discovery, watch ingestion, ownership, deletion pruning, and diagnostics
13
- * — raw event paths are lookup INPUTS only, so event spelling (symlink
14
- * alias vs canonical, lexical vs realpath) can never fork identity.
15
- *
16
- * The containment and volume helpers are pure and path-API-injectable so
17
- * Windows semantics are unit-testable via `path.win32` on any host; runtime
18
- * callers use the ambient platform implementation.
19
- */
20
- /**
21
- * Structural containment: `target` is the root itself or a descendant of it,
22
- * decided by `relative()` shape — never by string prefixing, so `/ui` can
23
- * never claim `/ui-old`, and a cross-drive win32 target (whose relative()
24
- * result is absolute) is never contained.
25
- */
26
- export declare function isPathWithinRoot(root: string, target: string, pathApi?: PlatformPath): boolean;
27
- /**
28
- * Cross-volume gate (design D5): two paths share a platform path root
29
- * (win32 drive letter or UNC share; always true on posix). Compared
30
- * case-insensitively — win32 drive letters are case-insensitive.
31
- */
32
- export declare function sharesVolumeRoot(a: string, b: string, pathApi?: PlatformPath): boolean;
33
- /** One resolved source identity. */
34
- export interface ResolvedSourceId {
35
- /**
36
- * The rootDir-relative source key all persistent analysis state is
37
- * indexed by — kit files keep their `..`-prefixed keys. Derived from
38
- * CANONICAL paths (canonical suffix re-attached to the root's
39
- * as-registered spelling) so it always matches the key discovery
40
- * produced, whatever spelling the event carried.
41
- */
42
- sourceKey: string;
43
- /** Canonical form of the owning external root; null when the project
44
- * root itself owns the file. */
45
- owningRoot: string | null;
46
- /** Canonical path of the file relative to its owning root (equals
47
- * `sourceKey` for project-root members) — the input for package-relative
48
- * exclusion filters. */
49
- pathInRoot: string;
50
- }
51
- /**
52
- * The per-generation identity handle (design D2): canonical roots are
53
- * realpath'd once at registration, and every alias→SourceId association
54
- * observed while a file existed is recorded so DELETION resolves through
55
- * the cache — never through fresh canonicalization of a gone path.
56
- */
57
- export interface SourceIdentity {
58
- readonly rootDir: string;
59
- readonly canonicalRootDir: string;
60
- /**
61
- * Register a discovery-resolved external source root. Both the
62
- * as-registered (lexical) and canonical forms become membership
63
- * witnesses; duplicate spellings of one canonical root collapse into the
64
- * first registration. Returns the canonical form.
65
- */
66
- registerExternalRoot(root: string): string;
67
- /** Canonical forms of every registered external root (registration order). */
68
- externalRoots(): string[];
69
- /**
70
- * Resolve an EXISTING path to its source identity: canonicalize, then
71
- * re-authorize containment against the canonical form of the allowed
72
- * trees (a nested symlink escaping every allowed tree is rejected).
73
- * Records the observed spelling (and the canonical form) as deletion
74
- * aliases. Returns null for non-members and paths that cannot be
75
- * canonicalized (vanished between event and resolution).
76
- */
77
- resolveSourceId(inputPath: string): ResolvedSourceId | null;
78
- /**
79
- * Resolve a DELETED path through the recorded alias associations only —
80
- * a spelling never observed while the file existed resolves nothing.
81
- */
82
- resolveDeletedSourceId(inputPath: string): ResolvedSourceId | null;
83
- /**
84
- * The canonical external root structurally containing `inputPath`
85
- * (matched against both root forms; the path itself need not exist and
86
- * no file identity is resolved) — the watch pass's dirty-root witness
87
- * for directory-granularity reports. Null when no root contains it.
88
- */
89
- containingExternalRoot(inputPath: string): string | null;
90
- }
91
- export declare function createSourceIdentity(rootDir: string): SourceIdentity;
92
- export {};
93
- //# sourceMappingURL=source-identity.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"source-identity.d.ts","sourceRoot":"","sources":["../pipeline/source-identity.ts"],"names":[],"mappings":"AACA,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B;;;sEAGsE;AACtE,KAAK,YAAY,GAAG,OAAO,IAAI,CAAC,KAAK,CAAC;AAEtC;;;;;;;;;;;;GAYG;AAEH;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,OAAO,GAAE,YAAmB,GAC3B,OAAO,CAQT;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,OAAO,GAAE,YAAmB,GAC3B,OAAO,CAIT;AAED,oCAAoC;AACpC,MAAM,WAAW,gBAAgB;IAC/B;;;;;;OAMG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;qCACiC;IACjC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B;;6BAEyB;IACzB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC;;;;;OAKG;IACH,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3C,8EAA8E;IAC9E,aAAa,IAAI,MAAM,EAAE,CAAC;IAC1B;;;;;;;OAOG;IACH,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,gBAAgB,GAAG,IAAI,CAAC;IAC5D;;;OAGG;IACH,sBAAsB,CAAC,SAAS,EAAE,MAAM,GAAG,gBAAgB,GAAG,IAAI,CAAC;IACnE;;;;;OAKG;IACH,sBAAsB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;CAC1D;AAeD,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,cAAc,CA0GpE"}
@@ -1,25 +0,0 @@
1
- /**
2
- * Forced-emission declarations (spec: static-emission-overrides) — the
3
- * `staticCss` plugin option. Declares emission the JSX scanner may never
4
- * observe (CMS/config-driven variants, spread-hidden props, dynamically
5
- * selected components); the engine applies it as synthetic usage through
6
- * the ordinary ledger.
7
- */
8
- export interface StaticCssComponentOverride {
9
- /** `'*'` = every option of every declared variant prop; or per-prop
10
- * `'*'` / explicit option lists. */
11
- variants?: '*' | Record<string, '*' | string[]>;
12
- /** `'*'` = every declared state; or an explicit list. */
13
- states?: '*' | string[];
14
- /** Custom props whose dynamic slot must be emitted without detected
15
- * dynamic usage. */
16
- dynamicProps?: string[];
17
- }
18
- export interface StaticCssConfig {
19
- components?: Record<string, StaticCssComponentOverride>;
20
- /** System prop → value list (strings, numbers, or responsive objects). */
21
- systemProps?: Record<string, Array<string | number | Record<string, string | number>>>;
22
- }
23
- /** Serialize a staticCss option for the engine; null when absent/empty. */
24
- export declare function serializeStaticCss(config: StaticCssConfig | undefined): string | null;
25
- //# sourceMappingURL=static-css.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"static-css.d.ts","sourceRoot":"","sources":["../pipeline/static-css.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,WAAW,0BAA0B;IACzC;yCACqC;IACrC,QAAQ,CAAC,EAAE,GAAG,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,GAAG,MAAM,EAAE,CAAC,CAAC;IAChD,yDAAyD;IACzD,MAAM,CAAC,EAAE,GAAG,GAAG,MAAM,EAAE,CAAC;IACxB;yBACqB;IACrB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;CACzB;AAED,MAAM,WAAW,eAAe;IAC9B,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,0BAA0B,CAAC,CAAC;IACxD,0EAA0E;IAC1E,WAAW,CAAC,EAAE,MAAM,CAClB,MAAM,EACN,KAAK,CAAC,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC,CACzD,CAAC;CACH;AAkBD,2EAA2E;AAC3E,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,eAAe,GAAG,SAAS,GAClC,MAAM,GAAG,IAAI,CAIf"}
@@ -1,57 +0,0 @@
1
- /**
2
- * The system-derived configuration bundle every extraction run needs —
3
- * the deserialized result of the NAPI `loadSystemModule()` call, with the
4
- * optional variable-prefix transformation already applied. Field names
5
- * mirror `AnalyzeProjectInputs` so the bundle feeds `runProjectAnalysis`
6
- * without renaming.
7
- */
8
- export interface SystemConfig {
9
- propConfigJson: string;
10
- groupRegistryJson: string;
11
- scalesJson: string;
12
- variableMapJson: string;
13
- variableCss: string;
14
- contextualVarsJson: string | null;
15
- selectorAliasesJson: string | null;
16
- /** Condition alias map JSON (modern-css-surface inc 03), mirroring
17
- * `selectorAliasesJson` — `null` when the system registers none.
18
- * Optional so the plugins' pre-load `emptySystemConfig()` default need not
19
- * restate it; `loadSystemConfig` always populates it after a real load. */
20
- conditionAliasesJson?: string | null;
21
- /** `{ transformName: sourceText }` JSON captured during system evaluation.
22
- * The build-time evaluator can only be seeded from source text, and
23
- * `propConfigJson` names each prop's transform without carrying its body —
24
- * so this is the only channel by which transforms shipped inside a package
25
- * (rather than declared in a `createTransform()` call the extractor parses
26
- * out of a project file) become resolvable. Optional so the plugins'
27
- * pre-load `emptySystemConfig()` default need not restate it. */
28
- transformSourcesJson?: string | null;
29
- globalStyleBlocksJson: string | null;
30
- keyframesJson: string | null;
31
- /** Canonical absolute paths of every module the loader evaluated for this
32
- * system (sorted; entry included, runtime stubs excluded). Plugins use it
33
- * as the geological-reset membership set. Optional so pre-load
34
- * `emptySystemConfig()` defaults need not restate it. */
35
- dependencies?: string[];
36
- /** Per-module built-theme token manifests captured during evaluation
37
- * (`{ modulePath: { exportName: [token paths] } }`) — the source-token
38
- * witness for the cross-source correlation diagnostic. Null when no
39
- * evaluated module exports a built theme. */
40
- sourceThemeManifestsJson?: string | null;
41
- }
42
- /**
43
- * Load a SystemInstance via the engine's `loadSystemModule` and normalize
44
- * it into a SystemConfig. When `prefix` is set, CSS variable names in the
45
- * variable map/css (and theme + contextual vars when affected) are
46
- * namespaced via the shared `applyPrefix`.
47
- *
48
- * Error handling stays at the call site — the Vite plugin warns (or throws
49
- * in strict mode) and keeps its previous config, the Next plugin lets the
50
- * failure propagate.
51
- */
52
- export declare function loadSystemConfig(engineApi: () => any, opts: {
53
- systemPath: string;
54
- rootDir: string;
55
- prefix?: string;
56
- }): SystemConfig;
57
- //# sourceMappingURL=system-config.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"system-config.d.ts","sourceRoot":"","sources":["../pipeline/system-config.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,MAAM,WAAW,YAAY;IAC3B,cAAc,EAAE,MAAM,CAAC;IACvB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC;;;gFAG4E;IAC5E,oBAAoB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC;;;;;;sEAMkE;IAClE,oBAAoB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,qBAAqB,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B;;;8DAG0D;IAC1D,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB;;;kDAG8C;IAC9C,wBAAwB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1C;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAE9B,SAAS,EAAE,MAAM,GAAG,EACpB,IAAI,EAAE;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,GAC7D,YAAY,CAwCd"}
@@ -1,22 +0,0 @@
1
- import type { DynamicPropMeta } from './dynamic-prop-config';
2
- /**
3
- * Build the source of the runtime system-props module — served as
4
- * `virtual:animus/system-props` by the Vite plugin and written to
5
- * `.animus/system-props.js` by the Next plugin. One generator so the two
6
- * runtimes can never drift.
7
- *
8
- * Runtime transform functions for dynamic props are not yet supported
9
- * (transforms are resolved at extraction time via boa_engine in Rust), so
10
- * `transforms` defaults to an empty object literal.
11
- *
12
- * `dynamicPropConfig` entries carry the CSS property the slot class declares
13
- * — the runtime's unit-fallback decision. Their field order and omission
14
- * rules belong to buildDynamicPropConfig.
15
- */
16
- export declare function buildSystemPropsModule(opts: {
17
- systemPropMapJson: string;
18
- groupRegistryJson: string;
19
- dynamicProps: Record<string, DynamicPropMeta>;
20
- transformsSource?: string;
21
- }): string;
22
- //# sourceMappingURL=system-props-module.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"system-props-module.d.ts","sourceRoot":"","sources":["../pipeline/system-props-module.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE7D;;;;;;;;;;;;;GAaG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE;IAC3C,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IAC9C,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,GAAG,MAAM,CAQT"}
@@ -1,17 +0,0 @@
1
- /**
2
- * Rust-side timing phases as reported in `manifest.timing`, in waterfall
3
- * order, with their display labels. Mirrors the timing struct in the
4
- * extract-v2 crate — a renamed or added Rust phase is updated here once,
5
- * not per plugin.
6
- */
7
- export declare const RUST_TIMING_PHASES: ReadonlyArray<readonly [key: string, label: string]>;
8
- /**
9
- * Format the Rust timing waterfall as log lines. `indent` and `labelWidth`
10
- * let each plugin keep its established column layout; the phase table and
11
- * the `(N files, M cached)` suffix are shared.
12
- */
13
- export declare function formatRustTimingWaterfall(timing: Record<string, number>, opts: {
14
- indent: string;
15
- labelWidth: number;
16
- }): string[];
17
- //# sourceMappingURL=timing-waterfall.d.ts.map