@animus-ui/extract 0.1.11 → 0.1.13

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 (103) hide show
  1. package/README.md +47 -0
  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 +11 -6
  7. package/dist/index.mjs +2 -2
  8. package/dist/pipeline/analyze-project-args.d.ts +0 -12
  9. package/dist/pipeline/analyze-project-args.d.ts.map +1 -1
  10. package/dist/pipeline/assemble-stylesheet.d.ts +0 -35
  11. package/dist/pipeline/assemble-stylesheet.d.ts.map +1 -1
  12. package/dist/pipeline/asset-placeholders.d.ts +0 -25
  13. package/dist/pipeline/asset-placeholders.d.ts.map +1 -1
  14. package/dist/pipeline/content-hash.d.ts +0 -7
  15. package/dist/pipeline/content-hash.d.ts.map +1 -1
  16. package/dist/pipeline/core-options.d.ts +27 -93
  17. package/dist/pipeline/core-options.d.ts.map +1 -1
  18. package/dist/pipeline/correlate-external-tokens.d.ts +10 -18
  19. package/dist/pipeline/correlate-external-tokens.d.ts.map +1 -1
  20. package/dist/pipeline/discover-files.d.ts +1 -9
  21. package/dist/pipeline/discover-files.d.ts.map +1 -1
  22. package/dist/pipeline/discover-packages.d.ts +18 -154
  23. package/dist/pipeline/discover-packages.d.ts.map +1 -1
  24. package/dist/pipeline/dynamic-prop-config.d.ts +4 -19
  25. package/dist/pipeline/dynamic-prop-config.d.ts.map +1 -1
  26. package/dist/pipeline/engine-adapter.d.ts +16 -52
  27. package/dist/pipeline/engine-adapter.d.ts.map +1 -1
  28. package/dist/pipeline/engine-retirement.d.ts +0 -19
  29. package/dist/pipeline/engine-retirement.d.ts.map +1 -1
  30. package/dist/pipeline/error-diagnostics.d.ts +0 -24
  31. package/dist/pipeline/error-diagnostics.d.ts.map +1 -1
  32. package/dist/pipeline/index.d.ts +9 -8
  33. package/dist/pipeline/index.d.ts.map +1 -1
  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 +32 -37
  37. package/dist/pipeline/manifest-diagnostics.d.ts.map +1 -1
  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 +9 -33
  41. package/dist/pipeline/mdx-preprocessor.d.ts.map +1 -1
  42. package/dist/pipeline/path-aliases.d.ts +0 -19
  43. package/dist/pipeline/path-aliases.d.ts.map +1 -1
  44. package/dist/pipeline/post-process-css.d.ts +0 -8
  45. package/dist/pipeline/post-process-css.d.ts.map +1 -1
  46. package/dist/pipeline/prefix.d.ts +3 -10
  47. package/dist/pipeline/prefix.d.ts.map +1 -1
  48. package/dist/pipeline/replacement-plans.d.ts +10 -34
  49. package/dist/pipeline/replacement-plans.d.ts.map +1 -1
  50. package/dist/pipeline/resolve-asset.d.ts +4 -7
  51. package/dist/pipeline/resolve-asset.d.ts.map +1 -1
  52. package/dist/pipeline/run-analysis.d.ts +15 -27
  53. package/dist/pipeline/run-analysis.d.ts.map +1 -1
  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 +23 -53
  57. package/dist/pipeline/source-identity.d.ts.map +1 -1
  58. package/dist/pipeline/source-ingestion.d.ts +48 -53
  59. package/dist/pipeline/source-ingestion.d.ts.map +1 -1
  60. package/dist/pipeline/static-css.d.ts +4 -13
  61. package/dist/pipeline/static-css.d.ts.map +1 -1
  62. package/dist/pipeline/structural-self-check.d.ts +0 -20
  63. package/dist/pipeline/structural-self-check.d.ts.map +1 -1
  64. package/dist/pipeline/svelte-source-adapter.d.ts +5 -12
  65. package/dist/pipeline/svelte-source-adapter.d.ts.map +1 -1
  66. package/dist/pipeline/system-config.d.ts +15 -32
  67. package/dist/pipeline/system-config.d.ts.map +1 -1
  68. package/dist/pipeline/system-props-module.d.ts +0 -15
  69. package/dist/pipeline/system-props-module.d.ts.map +1 -1
  70. package/dist/pipeline/timing-waterfall.d.ts +0 -11
  71. package/dist/pipeline/timing-waterfall.d.ts.map +1 -1
  72. package/dist/pipeline/tsconfig-paths.d.ts +2 -3
  73. package/dist/pipeline/tsconfig-paths.d.ts.map +1 -1
  74. package/dist/pipeline/unit-fallback.d.ts +0 -5
  75. package/dist/pipeline/unit-fallback.d.ts.map +1 -1
  76. package/dist/pipeline/utils.d.ts +1 -1
  77. package/dist/pipeline/utils.d.ts.map +1 -1
  78. package/dist/pipeline/watch-keys.d.ts +0 -10
  79. package/dist/pipeline/watch-keys.d.ts.map +1 -1
  80. package/dist/{pipeline-lkbOoyAr.mjs → pipeline-DeEENy5C.mjs} +1940 -2263
  81. package/dist/{pipeline-ojNeABi0.cjs → pipeline-x1yBZ2UP.cjs} +1970 -2269
  82. package/dist/session/extraction-session.d.ts +110 -316
  83. package/dist/session/extraction-session.d.ts.map +1 -1
  84. package/dist/session/index.d.ts +6 -20
  85. package/dist/session/index.d.ts.map +1 -1
  86. package/dist/session/published-set.d.ts +45 -25
  87. package/dist/session/published-set.d.ts.map +1 -1
  88. package/dist/session/resolve-packages.d.ts +6 -7
  89. package/dist/session/resolve-packages.d.ts.map +1 -1
  90. package/dist/session/session-paths.d.ts +38 -72
  91. package/dist/session/session-paths.d.ts.map +1 -1
  92. package/dist/session/singleton.d.ts +32 -71
  93. package/dist/session/singleton.d.ts.map +1 -1
  94. package/dist/session/timing.d.ts +0 -5
  95. package/dist/session/timing.d.ts.map +1 -1
  96. package/dist/session/turbopack-orchestrator.d.ts +17 -33
  97. package/dist/session/turbopack-orchestrator.d.ts.map +1 -1
  98. package/dist/session.cjs +530 -677
  99. package/dist/session.mjs +517 -672
  100. package/index-v2.js +0 -9
  101. package/package.json +9 -8
  102. package/dist/pipeline/external-keyframes.d.ts +0 -23
  103. package/dist/pipeline/external-keyframes.d.ts.map +0 -1
package/README.md CHANGED
@@ -31,6 +31,53 @@ const manifest = engine.analyze(fileEntriesJson);
31
31
  const { code, hasComponents } = JSON.parse(engine.transformFile(path));
32
32
  ```
33
33
 
34
+ ### Source corpus
35
+
36
+ Every driver (the Vite plugin, the extraction session behind the Next
37
+ plugin, the CLI, and unplugin) analyzes one source corpus, owned by
38
+ `createSourceCorpus` in `@animus-ui/extract/pipeline` (`prepare` →
39
+ analyze → `publish`; `published` is the parser-ready projection of the last
40
+ successful pass — see the module's own doc comments for the contract).
41
+
42
+ The Vite plugin and the extraction session are two drivers, not one driver
43
+ holding a copy of the other: the session publishes artifacts to disk for
44
+ cross-process readers, the Vite context answers virtual modules from memory.
45
+ The raw file cache stays with each driver: the Vite context mutates its
46
+ cache incrementally under its analysis lock, the session rebinds its cache
47
+ wholesale on publish. The ingestion policy point (`createSourceIngestor`) is
48
+ not exported from the pipeline barrel; its one production call site is
49
+ inside the corpus, asserted by `tests/source-corpus.test.ts`.
50
+
51
+ ## Driver and host obligations
52
+
53
+ Obligations a driver or host carries that no exported type expresses.
54
+
55
+ ### Hosts and sessions
56
+
57
+ - `onExternalRootResolved` fires for each admitted root during collection, before that root is walked, so a watching host can open its handle with no blind gap between scan and watch. `onExternalRootsCommitted` fires once after a successful publication with the complete admitted root set; a failed pipeline never fires it, so the host rolls back whatever it opened.
58
+ - Every host projects ownership at the same point — after ingestion and before the analysis result is enforced — so that two hosts cannot raise different diagnostics for the same external package. An original that leaves the corpus takes its projected children with it, so no owner outlives the file it described.
59
+ - Integrations consume the published replacement epoch rather than deriving their own; pass the served system-props artifact's content as `servedDependencyWitness` so an offline change to that artifact moves the epoch and invalidates persistent-cache snapshots referencing the old one. Absence and an empty string are distinct witness values.
60
+
61
+ ### Ingestion
62
+
63
+ - A payload that is not a corpus throws, naming the refusing reader, because an empty corpus is indistinguishable from "no files" and would publish an empty stylesheet. Callers with their own documented failure channel translate the throw into it; none may swallow it.
64
+ - Keyframes collections are keyed by export name, and a `name.property` reference resolves against whatever local name binds that collection. The binding may arrive either through a cross-file import or through an export in the same file.
65
+
66
+ ### Options
67
+
68
+ - The `exclude` dialect — globs versus substrings, and the structural exclusions that always apply and cannot be re-admitted — is defined in the [standalone extraction contract](https://github.com/codecaaron/animus/blob/main/docs/standalone-extraction.md#changed-plugin-behavior-release-notes-callout), which every driver shares.
69
+
70
+ ### Assets
71
+
72
+ - Asset copies are content-addressed and never overwritten, so a revised asset leaves its previous revision in `assets/` until pruning removes it. Choose `staleAssetPruning: 'full-pipeline'` when the driver serves the directory in place (an already-loaded page still requests the old url) and `'every-cycle'` when it republishes the whole directory each cycle.
73
+ - Asset urls are emitted relative to the session's `styles.css`, which sits beside `assets/`, so the host's own CSS pipeline applies its publicPath and output hashing to them. A specifier that cannot be substituted warns and is emitted literally, and fails the build in strict mode.
74
+
75
+ ### Engine
76
+
77
+ - `transformSourcesJson` is the only channel for transforms that ship inside an installed package: `configJson` names each prop's transform but cannot carry its body, and the extractor's other seed is `createTransform()` calls parsed out of project files. Without it, props using a package-shipped transform emit the raw value.
78
+ - In dev mode the manifest reports what reconciliation would have eliminated instead of eliminating it, as `report.eliminated_details` entries carrying `kind: "prospective_component"`. That turns a JSX-scanner blind spot into an authoring-time diagnostic rather than missing CSS in a production build.
79
+ - `build:extract-v2` checks rustc against `rust-toolchain.toml` before building the shipped binary; `build:v2:debug` skips the check on purpose because it builds a developer-profile binary.
80
+
34
81
  ## License
35
82
 
36
83
  MIT
@@ -2,116 +2,46 @@
2
2
  /* eslint-disable */
3
3
  export declare class ExtractEngine {
4
4
  constructor(options?: EngineOptions | undefined | null)
5
- /**
6
- * Parse-once fact extraction over the file set; facts and sources are
7
- * RETAINED on the handle for subsequent per-file calls. Returns the
8
- * fact manifest (files + parseCount) as JSON.
9
- */
10
5
  analyze(fileEntriesJson: string): string
11
- /** Reset all retained build state. */
12
6
  clearCache(): void
13
7
  get parseCount(): number
14
- /**
15
- * Per-file transformation from retained source + facts (no-config
16
- * subset: variants/compounds/states; system/custom payloads need the
17
- * row-07 config inputs and FAIL LOUD). Returns {code, hasComponents}
18
- * JSON. Import decisions come from surviving chain/payload metadata;
19
- * consumed-import stripping and directive handling are the ported v1
20
- * semantics.
21
- */
22
8
  transformFile(path: string): string
23
9
  }
24
10
 
25
11
  /**
26
- * Chain discovery over a file set: parse once per file (parallel), walk
27
- * every stored AST, return owned facts. The v2 spine's first real surface;
28
- * consumed by the parity comparison tooling.
12
+ * Chain discovery over a file set: one parse per file, then one walk per
13
+ * stored AST.
29
14
  */
30
15
  export declare function discoverChains(fileEntriesJson: string): string
31
16
 
32
- /**
33
- * Engine options (row 07 Task 07.3 — replaces the RF-53 hardcodes).
34
- * All fields optional; absent = v1 defaults.
35
- */
36
17
  export interface EngineOptions {
37
- /** Class-identity prefix (v1 default "animus"). */
38
18
  prefix?: string
39
- /** Runtime import source (v1 default "@animus-ui/system"). */
40
19
  runtimeImport?: string
41
- /** CSS virtual module id (v1 default "virtual:animus/styles.css"). */
42
20
  cssModuleId?: string
43
- /**
44
- * System-props virtual module id (v1 EmitterConfig default
45
- * "virtual:animus/system-props").
46
- */
47
21
  systemPropsModuleId?: string
48
- /** Flat theme scales JSON (v1 analyzeProject `theme_json`). */
49
22
  themeJson?: string
50
- /** Token-alias variable map JSON (v1 `variable_map_json`). */
51
23
  variableMapJson?: string
52
- /** Contextual vars JSON (v1 `contextual_vars_json`). */
53
24
  contextualVarsJson?: string
54
- /** Prop config map JSON (v1 `config_json`). */
55
25
  configJson?: string
56
- /** Group registry JSON (v1 `group_registry_json`). */
57
26
  groupRegistryJson?: string
58
- /**
59
- * Transform source texts (`{ transformName: sourceText }` JSON) from the
60
- * system evaluation. `config_json` names each prop's transform but cannot
61
- * carry its body, and the extractor's other seed is `createTransform()`
62
- * calls parsed out of project files — so without this, transforms shipped
63
- * inside a package are unresolvable at build time and their props fall
64
- * back to the raw value.
65
- */
66
27
  transformSourcesJson?: string
67
- /** Selector aliases JSON (v1 `selector_aliases_json`). */
68
28
  selectorAliasesJson?: string
69
- /**
70
- * Condition aliases JSON (the `conditionAliases` manifest field):
71
- * `{ "_motionReduce": { "value": "@media …", "order": 500, "kind":
72
- * "media" } }`. Absent = no registrations.
73
- */
74
29
  conditionAliasesJson?: string
75
- /** Global style blocks JSON (v1 `global_style_blocks_json`). */
76
30
  globalStyleBlocksJson?: string
77
- /**
78
- * Keyframes blocks JSON (v1 `keyframes_blocks_json` — feeds BOTH the
79
- * global sheet and the static keyframes registry, v1 Phase 2a).
80
- */
81
31
  keyframesJson?: string
82
- /** Package resolution JSON (v1 `package_resolution_json`). */
83
32
  packageResolutionJson?: string
84
- /** Path aliases JSON (`{aliases: [...]}` wrapper, v1 shape). */
85
33
  pathAliasesJson?: string
86
- /**
87
- * Forced-emission declarations (spec: static-emission-overrides) —
88
- * the serialized `staticCss` plugin option.
89
- */
90
34
  staticCssJson?: string
91
- /**
92
- * rootDir-relative directory prefixes of discovered external packages
93
- * (JSON string array). Files under these dirs get the external-token
94
- * candidate walk (extraction-diagnostics: cross-source correlation);
95
- * absent = no candidates recorded.
96
- */
97
35
  externalDirsJson?: string
98
- /** v1 `dev_mode`: retain all components (skip reconciliation pruning). */
99
36
  devMode?: boolean
100
37
  }
101
38
 
102
- /**
103
- * Build/probe identity: proves the v2 binary loads and its oxc linkage
104
- * parses. Consumed by the dual-build verification and the parity harness
105
- * engine registry.
106
- */
39
+ /** Probe identity: proves the binary loads and its oxc linkage parses. */
107
40
  export declare function engineVersion(): string
108
41
 
109
42
  /**
110
- * Full per-file fact extraction: chains + eagerly evaluated
111
- * stages + statics + raw usage facts + compose families — one parse per
112
- * file. The store (and every AST) is dropped when this call returns; the
113
- * invariant is that no program() read happens after
114
- * cross-file facts resolve.
43
+ * Full per-file fact extraction, one parse per file. The store and its
44
+ * ASTs drop on return: no `program()` read survives cross-file resolve.
115
45
  */
116
46
  export declare function extractFacts(fileEntriesJson: string): string
117
47
 
@@ -128,40 +58,29 @@ export interface NapiSystemConfig {
128
58
  selectorOrder?: string
129
59
  /**
130
60
  * Condition alias map JSON (the `conditionAliases` manifest field):
131
- * alias → `{ value, order, kind }`. Absent when the system registers none.
61
+ * alias → `{ value, order, kind }`. Absent when none are registered.
132
62
  */
133
63
  conditionAliases?: string
134
64
  /**
135
- * Transform source texts (`{ transformName: sourceText }` JSON) captured
136
- * during system evaluation — the only channel by which transforms shipped
137
- * inside a package reach the build-time evaluator. Absent against a system
138
- * built by an older @animus-ui/system.
65
+ * Transform source texts (`{ transformName: sourceText }` JSON): the
66
+ * only channel by which transforms shipped in a package reach evaluation.
139
67
  */
140
68
  transformSources?: string
141
69
  globalStyleBlocks?: string
142
70
  keyframesBlocks?: string
143
71
  /**
144
- * Canonical absolute paths of every module evaluated for the system
145
- * (sorted; entry included, runtime stubs excluded). The plugins use this
146
- * as the geological-reset membership set.
72
+ * Vocabulary witnesses as a JSON array of coded entries; hosts surface
73
+ * each as a diagnostic keyed by its `code`. Absent when there are none.
74
+ */
75
+ vocabularyWitnesses?: string
76
+ /**
77
+ * Canonical absolute paths of every module evaluated for the system,
78
+ * sorted; the entry is included, runtime stubs are not.
147
79
  */
148
80
  dependencies: Array<string>
149
81
  /**
150
- * Per-module built-theme token manifests captured during evaluation
151
- * (`{ modulePath: { exportName: [token paths] } }`) — the source-token
152
- * witness for the cross-source correlation diagnostic. Absent when no
153
- * evaluated module exports a built theme.
82
+ * Per-module built-theme token manifests, shaped
83
+ * `{ modulePath: { exportName: [token paths] } }`. Absent when none exist.
154
84
  */
155
85
  sourceThemeManifests?: string
156
86
  }
157
-
158
- /**
159
- * Scan one module entry for named `Keyframes` collection exports — the
160
- * keyframes-only carve-out for external package entries. The
161
- * entry evaluates through the same loader pipeline as a system module, but
162
- * nothing except `__brand === 'Keyframes'` exports is read from it; the
163
- * consumer's configured system remains the singular config authority.
164
- * Returns the `{ exportName: { keyName: { name, frames } } }` JSON, or None
165
- * when the entry exports no collections.
166
- */
167
- export declare function scanKeyframesExports(entryPath: string, rootDir: string): string | null
package/dist/index.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_pipeline = require("./pipeline-ojNeABi0.cjs");
2
+ const require_pipeline = require("./pipeline-x1yBZ2UP.cjs");
3
3
  exports.ANIMUS_LAYERS = require_pipeline.ANIMUS_LAYERS;
4
4
  exports.AnimusConfigError = require_pipeline.AnimusConfigError;
5
5
  exports.CORE_OPTION_KEYS = require_pipeline.CORE_OPTION_KEYS;
@@ -7,11 +7,11 @@ exports.DEFAULT_EXCLUDE = require_pipeline.DEFAULT_EXCLUDE;
7
7
  exports.DEFAULT_EXTENSIONS = require_pipeline.DEFAULT_EXTENSIONS;
8
8
  exports.DRIVER_NAMESPACES = require_pipeline.DRIVER_NAMESPACES;
9
9
  exports.ENGINE_TRANSFORM_EXTENSIONS = require_pipeline.ENGINE_TRANSFORM_EXTENSIONS;
10
- exports.KEYFRAMES_EXPORT_COLLISION = require_pipeline.KEYFRAMES_EXPORT_COLLISION;
11
- exports.KEYFRAMES_EXTERNAL_ENTRY_FAILED = require_pipeline.KEYFRAMES_EXTERNAL_ENTRY_FAILED;
12
10
  exports.REPLACEABLE_DEFAULT_EXCLUDE = require_pipeline.REPLACEABLE_DEFAULT_EXCLUDE;
13
11
  exports.RETIRED_ENGINE_MESSAGE = require_pipeline.RETIRED_ENGINE_MESSAGE;
14
12
  exports.STRUCTURAL_EXCLUDE = require_pipeline.STRUCTURAL_EXCLUDE;
13
+ exports.VOCABULARY_COLLISION = require_pipeline.VOCABULARY_COLLISION;
14
+ exports.VOCABULARY_LEGACY_VERB = require_pipeline.VOCABULARY_LEGACY_VERB;
15
15
  exports.adaptSvelteSource = require_pipeline.adaptSvelteSource;
16
16
  exports.applyPrefix = require_pipeline.applyPrefix;
17
17
  exports.applyUnitFallback = require_pipeline.applyUnitFallback;
@@ -27,10 +27,11 @@ exports.buildSystemPropsModule = require_pipeline.buildSystemPropsModule;
27
27
  exports.camelToKebab = require_pipeline.camelToKebab;
28
28
  exports.clearEngineCache = require_pipeline.clearEngineCache;
29
29
  exports.collectExternalPackageSources = require_pipeline.collectExternalPackageSources;
30
+ exports.compareDiscoveryOrder = require_pipeline.compareDiscoveryOrder;
30
31
  exports.contentHash = require_pipeline.contentHash;
31
32
  exports.createExcludeMatcher = require_pipeline.createExcludeMatcher;
33
+ exports.createSourceCorpus = require_pipeline.createSourceCorpus;
32
34
  exports.createSourceIdentity = require_pipeline.createSourceIdentity;
33
- exports.createSourceIngestor = require_pipeline.createSourceIngestor;
34
35
  exports.createV2EngineApi = require_pipeline.createV2EngineApi;
35
36
  exports.diffFilePlans = require_pipeline.diffFilePlans;
36
37
  exports.discoverFiles = require_pipeline.discoverFiles;
@@ -44,13 +45,15 @@ exports.formatRustTimingWaterfall = require_pipeline.formatRustTimingWaterfall;
44
45
  exports.hashReplacementPlans = require_pipeline.hashReplacementPlans;
45
46
  exports.ingestSourceEntries = require_pipeline.ingestSourceEntries;
46
47
  exports.isAdvisorySourceDiagnostic = require_pipeline.isAdvisorySourceDiagnostic;
48
+ exports.isEngineTransformExtension = require_pipeline.isEngineTransformExtension;
47
49
  exports.isExcludedPackageRelativePath = require_pipeline.isExcludedPackageRelativePath;
48
50
  exports.isPathWithinRoot = require_pipeline.isPathWithinRoot;
49
51
  exports.isUnresolvedParentDrop = require_pipeline.isUnresolvedParentDrop;
50
52
  exports.loadSystemConfig = require_pipeline.loadSystemConfig;
51
- exports.mergeExternalKeyframes = require_pipeline.mergeExternalKeyframes;
53
+ exports.parseFilesJson = require_pipeline.parseFilesJson;
52
54
  exports.postProcessCss = require_pipeline.postProcessCss;
53
55
  exports.preprocessMdx = require_pipeline.preprocessMdx;
56
+ exports.projectExternalFileOwners = require_pipeline.projectExternalFileOwners;
54
57
  exports.readTsconfigAliasPairs = require_pipeline.readTsconfigAliasPairs;
55
58
  exports.resolveAbsolutePathSpecifier = require_pipeline.resolveAbsolutePathSpecifier;
56
59
  exports.resolveAssetFile = require_pipeline.resolveAssetFile;
@@ -62,13 +65,15 @@ exports.runStructuralSelfCheck = require_pipeline.runStructuralSelfCheck;
62
65
  exports.serializeStaticCss = require_pipeline.serializeStaticCss;
63
66
  exports.sharesVolumeRoot = require_pipeline.sharesVolumeRoot;
64
67
  exports.snapshotFilePlans = require_pipeline.snapshotFilePlans;
68
+ exports.stableStringify = require_pipeline.stableStringify;
65
69
  exports.staleDistIncludesMessage = require_pipeline.staleDistIncludesMessage;
66
70
  exports.stripLeadingLayerDeclaration = require_pipeline.stripLeadingLayerDeclaration;
67
71
  exports.substituteAssetPlaceholders = require_pipeline.substituteAssetPlaceholders;
68
72
  exports.surfaceManifestDiagnostics = require_pipeline.surfaceManifestDiagnostics;
69
73
  exports.toWatchKeys = require_pipeline.toWatchKeys;
74
+ exports.unreadableSourceDiagnostic = require_pipeline.unreadableSourceDiagnostic;
70
75
  exports.unresolvableIncludesMessage = require_pipeline.unresolvableIncludesMessage;
71
76
  exports.unresolvedParentName = require_pipeline.unresolvedParentName;
72
77
  exports.validateLayerOrder = require_pipeline.validateLayerOrder;
78
+ exports.vocabularyWitnessDiagnostics = require_pipeline.vocabularyWitnessDiagnostics;
73
79
  exports.walkPackageSources = require_pipeline.walkPackageSources;
74
- exports.withoutInvalidOriginals = require_pipeline.withoutInvalidOriginals;
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { $ as CORE_OPTION_KEYS, A as createSourceIngestor, B as extractSystemFilePackages, C as resolveLightningTargets, D as resolveThroughPathAliases, E as resolveAssetFile, F as ENGINE_TRANSFORM_EXTENSIONS, G as staleDistIncludesMessage, H as firstOwners, I as preprocessMdx, J as createSourceIdentity, K as unresolvableIncludesMessage, L as adaptSvelteSource, M as isAdvisorySourceDiagnostic, N as withoutInvalidOriginals, O as findAssetSpecifiers, P as DEFAULT_EXTENSIONS, Q as AnimusConfigError, R as collectExternalPackageSources, S as postProcessCss, T as enforceExternalTokenContracts, U as isExcludedPackageRelativePath, V as findPackageRoot, W as resolveAbsolutePathSpecifier, X as sharesVolumeRoot, Y as isPathWithinRoot, Z as discoverFiles, _ as runProjectAnalysis, _t as stripLeadingLayerDeclaration, a as snapshotFilePlans, at as createExcludeMatcher, b as surfaceManifestDiagnostics, c as formatRustTimingWaterfall, ct as KEYFRAMES_EXTERNAL_ENTRY_FAILED, d as runStructuralSelfCheck, dt as RETIRED_ENGINE_MESSAGE, et as DEFAULT_EXCLUDE, f as loadSystemConfig, ft as assertNoRetiredEngineSelection, g as clearEngineCache, gt as assembleStylesheet, h as buildAnalysisInputs, ht as ANIMUS_LAYERS, i as hashReplacementPlans, it as assertKnownOptionKeys, j as ingestSourceEntries, k as substituteAssetPlaceholders, l as buildSystemPropsModule, lt as mergeExternalKeyframes, m as serializeStaticCss, mt as buildAnalyzeProjectArgs, n as camelToKebab, nt as REPLACEABLE_DEFAULT_EXCLUDE, o as assertNoErrorDiagnostics, ot as resolveMode, p as applyPrefix, pt as createV2EngineApi, q as walkPackageSources, r as diffFilePlans, rt as STRUCTURAL_EXCLUDE, s as readTsconfigAliasPairs, st as KEYFRAMES_EXPORT_COLLISION, t as toWatchKeys, tt as DRIVER_NAMESPACES, u as buildDynamicPropConfig, ut as contentHash, v as applyUnitFallback, vt as validateLayerOrder, w as buildPathAliasesJson, x as unresolvedParentName, y as isUnresolvedParentDrop, z as excludeCollectedPackages } from "./pipeline-lkbOoyAr.mjs";
2
- export { ANIMUS_LAYERS, AnimusConfigError, CORE_OPTION_KEYS, DEFAULT_EXCLUDE, DEFAULT_EXTENSIONS, DRIVER_NAMESPACES, ENGINE_TRANSFORM_EXTENSIONS, KEYFRAMES_EXPORT_COLLISION, KEYFRAMES_EXTERNAL_ENTRY_FAILED, REPLACEABLE_DEFAULT_EXCLUDE, RETIRED_ENGINE_MESSAGE, STRUCTURAL_EXCLUDE, adaptSvelteSource, applyPrefix, applyUnitFallback, assembleStylesheet, assertKnownOptionKeys, assertNoErrorDiagnostics, assertNoRetiredEngineSelection, buildAnalysisInputs, buildAnalyzeProjectArgs, buildDynamicPropConfig, buildPathAliasesJson, buildSystemPropsModule, camelToKebab, clearEngineCache, collectExternalPackageSources, contentHash, createExcludeMatcher, createSourceIdentity, createSourceIngestor, createV2EngineApi, diffFilePlans, discoverFiles, enforceExternalTokenContracts, excludeCollectedPackages, extractSystemFilePackages, findAssetSpecifiers, findPackageRoot, firstOwners, formatRustTimingWaterfall, hashReplacementPlans, ingestSourceEntries, isAdvisorySourceDiagnostic, isExcludedPackageRelativePath, isPathWithinRoot, isUnresolvedParentDrop, loadSystemConfig, mergeExternalKeyframes, postProcessCss, preprocessMdx, readTsconfigAliasPairs, resolveAbsolutePathSpecifier, resolveAssetFile, resolveLightningTargets, resolveMode, resolveThroughPathAliases, runProjectAnalysis, runStructuralSelfCheck, serializeStaticCss, sharesVolumeRoot, snapshotFilePlans, staleDistIncludesMessage, stripLeadingLayerDeclaration, substituteAssetPlaceholders, surfaceManifestDiagnostics, toWatchKeys, unresolvableIncludesMessage, unresolvedParentName, validateLayerOrder, walkPackageSources, withoutInvalidOriginals };
1
+ import { $ as DEFAULT_EXCLUDE, A as enforceExternalTokenContracts, B as firstOwners, C as surfaceManifestDiagnostics, Ct as validateLayerOrder, D as postProcessCss, E as vocabularyWitnessDiagnostics, F as createSourceCorpus, G as walkPackageSources, H as resolveAbsolutePathSpecifier, I as collectExternalPackageSources, J as sharesVolumeRoot, K as createSourceIdentity, L as excludeCollectedPackages, M as resolveThroughPathAliases, N as findAssetSpecifiers, O as resolveLightningTargets, P as substituteAssetPlaceholders, Q as CORE_OPTION_KEYS, R as extractSystemFilePackages, S as isUnresolvedParentDrop, St as stripLeadingLayerDeclaration, T as unresolvedParentName, U as staleDistIncludesMessage, V as isExcludedPackageRelativePath, W as unresolvableIncludesMessage, X as discoverFiles, Y as compareDiscoveryOrder, Z as AnimusConfigError, _ as clearEngineCache, _t as preprocessMdx, a as assertNoErrorDiagnostics, at as resolveMode, b as VOCABULARY_COLLISION, bt as ANIMUS_LAYERS, c as buildSystemPropsModule, ct as createV2EngineApi, d as loadSystemConfig, dt as parseFilesJson, et as DRIVER_NAMESPACES, f as applyPrefix, ft as projectExternalFileOwners, g as buildAnalysisInputs, gt as isEngineTransformExtension, h as stableStringify, ht as ENGINE_TRANSFORM_EXTENSIONS, i as snapshotFilePlans, it as createExcludeMatcher, j as resolveAssetFile, k as buildPathAliasesJson, l as buildDynamicPropConfig, lt as ingestSourceEntries, m as camelToKebab, mt as DEFAULT_EXTENSIONS, n as diffFilePlans, nt as STRUCTURAL_EXCLUDE, o as readTsconfigAliasPairs, ot as RETIRED_ENGINE_MESSAGE, p as serializeStaticCss, pt as adaptSvelteSource, q as isPathWithinRoot, r as hashReplacementPlans, rt as assertKnownOptionKeys, s as formatRustTimingWaterfall, st as assertNoRetiredEngineSelection, t as toWatchKeys, tt as REPLACEABLE_DEFAULT_EXCLUDE, u as runStructuralSelfCheck, ut as isAdvisorySourceDiagnostic, v as runProjectAnalysis, vt as contentHash, w as unreadableSourceDiagnostic, x as VOCABULARY_LEGACY_VERB, xt as assembleStylesheet, y as applyUnitFallback, yt as buildAnalyzeProjectArgs, z as findPackageRoot } from "./pipeline-DeEENy5C.mjs";
2
+ export { ANIMUS_LAYERS, AnimusConfigError, CORE_OPTION_KEYS, DEFAULT_EXCLUDE, DEFAULT_EXTENSIONS, DRIVER_NAMESPACES, ENGINE_TRANSFORM_EXTENSIONS, REPLACEABLE_DEFAULT_EXCLUDE, RETIRED_ENGINE_MESSAGE, STRUCTURAL_EXCLUDE, VOCABULARY_COLLISION, VOCABULARY_LEGACY_VERB, adaptSvelteSource, applyPrefix, applyUnitFallback, assembleStylesheet, assertKnownOptionKeys, assertNoErrorDiagnostics, assertNoRetiredEngineSelection, buildAnalysisInputs, buildAnalyzeProjectArgs, buildDynamicPropConfig, buildPathAliasesJson, buildSystemPropsModule, camelToKebab, clearEngineCache, collectExternalPackageSources, compareDiscoveryOrder, contentHash, createExcludeMatcher, createSourceCorpus, createSourceIdentity, createV2EngineApi, diffFilePlans, discoverFiles, enforceExternalTokenContracts, excludeCollectedPackages, extractSystemFilePackages, findAssetSpecifiers, findPackageRoot, firstOwners, formatRustTimingWaterfall, hashReplacementPlans, ingestSourceEntries, isAdvisorySourceDiagnostic, isEngineTransformExtension, isExcludedPackageRelativePath, isPathWithinRoot, isUnresolvedParentDrop, loadSystemConfig, parseFilesJson, postProcessCss, preprocessMdx, projectExternalFileOwners, readTsconfigAliasPairs, resolveAbsolutePathSpecifier, resolveAssetFile, resolveLightningTargets, resolveMode, resolveThroughPathAliases, runProjectAnalysis, runStructuralSelfCheck, serializeStaticCss, sharesVolumeRoot, snapshotFilePlans, stableStringify, staleDistIncludesMessage, stripLeadingLayerDeclaration, substituteAssetPlaceholders, surfaceManifestDiagnostics, toWatchKeys, unreadableSourceDiagnostic, unresolvableIncludesMessage, unresolvedParentName, validateLayerOrder, vocabularyWitnessDiagnostics, walkPackageSources };
@@ -1,11 +1,3 @@
1
- /**
2
- * The positional argument tuple for the NAPI `analyzeProject` call.
3
- *
4
- * This is the single authoritative copy of the 17-slot contract consumed by
5
- * both extraction plugins (vite-plugin and next-plugin). The slot order is
6
- * mirrored by the Rust NAPI surface — changing it requires a coordinated
7
- * Rust-side update.
8
- */
9
1
  /** @internal */
10
2
  export type AnalyzeProjectArgs = [
11
3
  filesJson: string,
@@ -42,12 +34,8 @@ export interface AnalyzeProjectInputs {
42
34
  globalStyleBlocksJson: string | null;
43
35
  pathAliasesJson: string | null;
44
36
  keyframesJson: string | null;
45
- /** Forced-emission declarations (spec: static-emission-overrides). */
46
37
  staticCssJson: string | null;
47
- /** Condition alias map JSON (modern-css-surface inc 03), or null. */
48
38
  conditionAliasesJson: string | null;
49
- /** rootDir-relative external package dirs (JSON string array) for the
50
- * external-token candidate walk, or null. */
51
39
  externalDirsJson: string | null;
52
40
  transformSourcesJson: string | null;
53
41
  }
@@ -1 +1 @@
1
- {"version":3,"file":"analyze-project-args.d.ts","sourceRoot":"","sources":["../../pipeline/analyze-project-args.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,gBAAgB;AAChB,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;IAC5B,aAAa,EAAE,MAAM,GAAG,IAAI;IAG5B,oBAAoB,EAAE,MAAM,GAAG,IAAI;IAInC,gBAAgB,EAAE,MAAM,GAAG,IAAI;IAG/B,oBAAoB,EAAE,MAAM,GAAG,IAAI;CACpC,CAAC;AAEF,gBAAgB;AAChB,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,OAAO,EAAE,OAAO,CAAC;IACjB,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;IAC7B,sEAAsE;IACtE,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,qEAAqE;IACrE,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC;kDAC8C;IAC9C,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;CACrC;AAED,gBAAgB;AAChB,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,oBAAoB,GAC3B,kBAAkB,CAqBpB"}
1
+ {"version":3,"file":"analyze-project-args.d.ts","sourceRoot":"","sources":["../../pipeline/analyze-project-args.ts"],"names":[],"mappings":"AAAA,gBAAgB;AAChB,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;IAC5B,aAAa,EAAE,MAAM,GAAG,IAAI;IAC5B,oBAAoB,EAAE,MAAM,GAAG,IAAI;IACnC,gBAAgB,EAAE,MAAM,GAAG,IAAI;IAC/B,oBAAoB,EAAE,MAAM,GAAG,IAAI;CACpC,CAAC;AAEF,gBAAgB;AAChB,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,OAAO,EAAE,OAAO,CAAC;IACjB,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;IAC7B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;CACrC;AAED,gBAAgB;AAChB,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,oBAAoB,GAC3B,kBAAkB,CAqBpB"}
@@ -1,20 +1,5 @@
1
- /**
2
- * The 7 Animus cascade layers. Always prefixed with `anm-` to avoid
3
- * collision with other frameworks' layer names (e.g., Tailwind's `base`).
4
- */
5
1
  export declare const ANIMUS_LAYERS: readonly ['anm-global', 'anm-base', 'anm-variants', 'anm-compounds', 'anm-states', 'anm-system', 'anm-custom'];
6
- /**
7
- * Validate that a consumer `layers` array contains all 7 Animus layers
8
- * in the correct relative order. Consumer layers may be interleaved.
9
- *
10
- * @throws Error with descriptive message on violation
11
- */
12
2
  export declare function validateLayerOrder(layers: string[]): void;
13
- /**
14
- * Strip a leading `@layer ...;` declaration line from CSS if present.
15
- * The Rust crate embeds this in prod-mode output; we strip it so the
16
- * shared assembler controls placement.
17
- */
18
3
  export declare function stripLeadingLayerDeclaration(css: string): string;
19
4
  export interface AssembleStylesheetParts {
20
5
  declaration: string;
@@ -22,32 +7,12 @@ export interface AssembleStylesheetParts {
22
7
  body: string;
23
8
  }
24
9
  export interface AssembleStylesheetOptions {
25
- /**
26
- * Custom layer order. Must contain all 7 Animus `anm-*` layers as a subsequence.
27
- * Example: `['reset', 'anm-global', 'anm-base', ..., 'anm-custom', 'overrides']`
28
- * Names are emitted as-is — this is the actual `@layer` declaration.
29
- */
30
10
  layers?: string[];
31
- /** Variable CSS: `:root { --color-*: ... }` + color mode selectors */
32
11
  variableCss?: string;
33
- /** Global CSS: `@layer anm-global { reset + global styles }` */
34
12
  globalCss?: string;
35
- /** Component CSS from the Rust crate (may contain embedded @layer declaration) */
36
13
  componentCss?: string;
37
- /** When true, return structured `{ declaration, variables, body }` instead of a single string. */
38
14
  split?: boolean;
39
15
  }
40
- /**
41
- * Assemble the final stylesheet in canonical order:
42
- *
43
- * 1. `@layer` declaration (cascade ordering)
44
- * 2. Emitted variables (`:root`, color mode selectors)
45
- * 3. `@layer anm-global { ... }` (reset + global styles)
46
- * 4. `@layer anm-base/variants/compounds/states/system/custom { ... }` (components)
47
- *
48
- * This is the single source of truth for stylesheet assembly.
49
- * Both Vite and Next.js plugins must use this function.
50
- */
51
16
  export declare function assembleStylesheet(options: AssembleStylesheetOptions & {
52
17
  split: true;
53
18
  }): AssembleStylesheetParts;
@@ -1 +1 @@
1
- {"version":3,"file":"assemble-stylesheet.d.ts","sourceRoot":"","sources":["../../pipeline/assemble-stylesheet.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,aAAa,YACxB,YAAY,EACZ,UAAU,EACV,cAAc,EACd,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,YAAY,CACJ,CAAC;AAiBX;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,CA2BzD;AAED;;;;GAIG;AACH,wBAAgB,4BAA4B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAGhE;AAED,MAAM,WAAW,uBAAuB;IACtC,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,yBAAyB;IACxC;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,sEAAsE;IACtE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gEAAgE;IAChE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kFAAkF;IAClF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kGAAkG;IAClG,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,yBAAyB,GAAG;IAAE,KAAK,EAAE,IAAI,CAAA;CAAE,GACnD,uBAAuB,CAAC;AAC3B,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,yBAAyB,GAAG;IAAE,KAAK,CAAC,EAAE,KAAK,CAAA;CAAE,GACrD,MAAM,CAAC;AACV,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,yBAAyB,GACjC,MAAM,GAAG,uBAAuB,CAAC"}
1
+ {"version":3,"file":"assemble-stylesheet.d.ts","sourceRoot":"","sources":["../../pipeline/assemble-stylesheet.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,YACxB,YAAY,EACZ,UAAU,EACV,cAAc,EACd,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,YAAY,CACJ,CAAC;AAUX,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,CA2BzD;AAED,wBAAgB,4BAA4B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEhE;AAED,MAAM,WAAW,uBAAuB;IACtC,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,yBAAyB;IACxC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,yBAAyB,GAAG;IAAE,KAAK,EAAE,IAAI,CAAA;CAAE,GACnD,uBAAuB,CAAC;AAC3B,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,yBAAyB,GAAG;IAAE,KAAK,CAAC,EAAE,KAAK,CAAA;CAAE,GACrD,MAAM,CAAC;AACV,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,yBAAyB,GACjC,MAAM,GAAG,uBAAuB,CAAC"}
@@ -1,29 +1,4 @@
1
- /**
2
- * Host-side handling of `asset()` placeholders (global-styles-system):
3
- * `animus-asset:<specifier>` markers ride through the sandbox and the
4
- * emitter byte-exact; each HOST plugin substitutes them with its bundler's
5
- * resolved asset URL after extraction. This module owns the shared scanning
6
- * and replacement mechanics — resolution and strict gating stay at the
7
- * plugin call sites.
8
- */
9
- /** Mirrors the producer-side constant in `@animus-ui/system`'s `asset.ts`
10
- * (extract must not take a runtime dependency on system); the pairing is
11
- * pinned by a contract test in `tests/asset-placeholders.test.ts`. */
12
1
  export declare const ASSET_PLACEHOLDER_PREFIX = "animus-asset:";
13
- /** Unique asset specifiers referenced by placeholders, in appearance order. */
14
2
  export declare function findAssetSpecifiers(css: string): string[];
15
- /**
16
- * Replace each specifier's placeholder with its substitution. Specifiers
17
- * absent from the map keep their placeholder — the caller decides whether
18
- * that is a strict failure or a warn-and-emit-literally. A substitution may
19
- * itself be a bundler marker (e.g. Vite's `__VITE_ASSET__<ref>__`) that the
20
- * host's own asset pipeline resolves to a hashed file name later.
21
- *
22
- * Each replacement is anchored to a following delimiter (quote, `)`,
23
- * whitespace, or end of input) so a specifier that textually prefixes a
24
- * longer one can never clobber the longer placeholder; longest-first
25
- * ordering additionally lets the longer of two mapped specifiers claim its
26
- * occurrences before the shorter runs.
27
- */
28
3
  export declare function substituteAssetPlaceholders(css: string, urlBySpecifier: ReadonlyMap<string, string>): string;
29
4
  //# sourceMappingURL=asset-placeholders.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"asset-placeholders.d.ts","sourceRoot":"","sources":["../../pipeline/asset-placeholders.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;uEAEuE;AACvE,eAAO,MAAM,wBAAwB,kBAAkB,CAAC;AAkBxD,+EAA+E;AAC/E,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAkBzD;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,2BAA2B,CACzC,GAAG,EAAE,MAAM,EACX,cAAc,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,GAC1C,MAAM,CAgBR"}
1
+ {"version":3,"file":"asset-placeholders.d.ts","sourceRoot":"","sources":["../../pipeline/asset-placeholders.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,wBAAwB,kBAAkB,CAAC;AAWxD,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAczD;AAED,wBAAgB,2BAA2B,CACzC,GAAG,EAAE,MAAM,EACX,cAAc,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,GAC1C,MAAM,CAgBR"}
@@ -1,9 +1,2 @@
1
- /**
2
- * MD5 content hash used for file-change detection (HMR diffing) by both
3
- * extraction plugins, and for content-addressing copied asset bytes. The
4
- * algorithm/encoding is a cross-plugin contract: cache keys written by one
5
- * build path must compare equal in the next. Accepts a Buffer directly so
6
- * binary sources hash without an intermediate string copy.
7
- */
8
1
  export declare function contentHash(source: string | Buffer): string;
9
2
  //# sourceMappingURL=content-hash.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"content-hash.d.ts","sourceRoot":"","sources":["../../pipeline/content-hash.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAE3D"}
1
+ {"version":3,"file":"content-hash.d.ts","sourceRoot":"","sources":["../../pipeline/content-hash.ts"],"names":[],"mappings":"AAEA,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAE3D"}