@animus-ui/extract 0.1.11 → 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 (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
@@ -1 +1 @@
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"}
1
+ {"version":3,"file":"post-process-css.d.ts","sourceRoot":"","sources":["../../pipeline/post-process-css.ts"],"names":[],"mappings":"AACA,OAAO,EACL,qBAAqB,EAEtB,MAAM,cAAc,CAAC;AAEtB,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAExE,wBAAgB,uBAAuB,CACrC,eAAe,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,EAC9C,OAAO,EAAE,MAAM,GACd,gBAAgB,CAkBlB;AAED,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,CAiBR"}
@@ -1,15 +1,8 @@
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): {
1
+ export interface PrefixedSystemArtifacts {
10
2
  variableMapJson: string;
11
3
  variableCss: string;
12
4
  themeJson?: string;
13
5
  contextualVarsJson?: string;
14
- };
6
+ }
7
+ export declare function applyPrefix(prefix: string, variableMapJson: string, variableCss: string, themeJson?: string, contextualVarsJson?: string): PrefixedSystemArtifacts;
15
8
  //# sourceMappingURL=prefix.d.ts.map
@@ -1 +1 @@
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
+ {"version":3,"file":"prefix.d.ts","sourceRoot":"","sources":["../../pipeline/prefix.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,uBAAuB;IACtC,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,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,uBAAuB,CAqCzB"}
@@ -1,46 +1,22 @@
1
+ import type { ProjectManifest } from './manifest-schema';
1
2
  /**
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).
3
+ * A file's plan: the ordered (component id, replacement) pairs the manifest
4
+ * holds for it. A file with no entries is ABSENT, never an empty entry.
13
5
  */
14
6
  export type FilePlanSnapshot = Map<string, string>;
15
- export declare function snapshotFilePlans(manifest: any): FilePlanSnapshot;
7
+ /** `null` (a context before its first analysis) snapshots to the empty plan
8
+ * set — the same state as an empty universe. */
9
+ export declare function snapshotFilePlans(manifest: Pick<ProjectManifest, 'components'> | null): FilePlanSnapshot;
16
10
  /**
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).
11
+ * Paths whose plan changed: absent↔present, membership, or content.
12
+ * `exclude` drops one path whose own modules are already being updated.
21
13
  */
22
14
  export declare function diffFilePlans(prev: FilePlanSnapshot, next: FilePlanSnapshot, opts?: {
23
15
  exclude?: string;
24
16
  }): string[];
25
17
  /**
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.
18
+ * THE replacement epoch: integrations consume this hash, never their own.
19
+ * `servedDependencyWitness` folds in content the plans cannot see.
44
20
  */
45
21
  export declare function hashReplacementPlans(snapshot: FilePlanSnapshot, servedDependencyWitness?: string): string;
46
22
  //# sourceMappingURL=replacement-plans.d.ts.map
@@ -1 +1 @@
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
+ {"version":3,"file":"replacement-plans.d.ts","sourceRoot":"","sources":["../../pipeline/replacement-plans.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAMnD;iDACiD;AACjD,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,IAAI,CAAC,eAAe,EAAE,YAAY,CAAC,GAAG,IAAI,GACnD,gBAAgB,CAmBlB;AAED;;;GAGG;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;AAUD;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,gBAAgB,EAC1B,uBAAuB,CAAC,EAAE,MAAM,GAC/B,MAAM,CAYR"}
@@ -1,14 +1,11 @@
1
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.
2
+ * Map a specifier through the host alias table, whose entries arrive sorted
3
+ * longest-pattern-first. Returns an absolute path to an EXISTING file.
6
4
  */
7
5
  export declare function resolveThroughPathAliases(specifier: string, rootDir: string, pathAliasesJson: string | null | undefined): string | null;
8
6
  /**
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.
7
+ * Resolve an asset specifier: host aliases, then Node resolution anchored at
8
+ * `rootDir`, then the package root. Strict gating stays at the caller.
12
9
  */
13
10
  export declare function resolveAssetFile(specifier: string, rootDir: string, pathAliasesJson?: string | null): string | null;
14
11
  //# sourceMappingURL=resolve-asset.d.ts.map
@@ -1 +1 @@
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
+ {"version":3,"file":"resolve-asset.d.ts","sourceRoot":"","sources":["../../pipeline/resolve-asset.ts"],"names":[],"mappings":"AAuDA;;;GAGG;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;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,GAC9B,MAAM,GAAG,IAAI,CA0Cf"}
@@ -1,9 +1,9 @@
1
1
  import type { AnalyzeProjectInputs } from './analyze-project-args';
2
+ import type { ProjectManifest } from './manifest-schema';
2
3
  import type { SystemConfig } from './system-config';
3
4
  /**
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.
5
+ * Per-bundler emitter identity: the module ids the engine injects into
6
+ * transformed sources (Vite virtual ids; Next on-disk `.animus/` paths).
7
7
  */
8
8
  export interface EmitterConfig {
9
9
  runtimeImport: string;
@@ -11,16 +11,13 @@ export interface EmitterConfig {
11
11
  systemPropsModuleId?: string;
12
12
  }
13
13
  export interface ProjectAnalysisResult {
14
- manifest: any;
14
+ manifest: ProjectManifest;
15
15
  manifestJson: string;
16
- /** `manifest.sheets.global` — Rust-resolved global CSS. */
17
16
  globalCss: string;
18
- /** `manifest.css` with the shared unit fallback applied. */
19
17
  componentCss: string;
20
- /** The exact analyze-time inputs (already-serialized filesJson included) —
21
- * reusable for persistence without re-serializing the source corpus. */
18
+ /** The exact analyze-time inputs (serialized `filesJson` included) —
19
+ * persistable without re-serializing the source corpus. */
22
20
  inputs: AnalyzeProjectInputs;
23
- /** Sub-phase durations (ms) for verbose timing displays. */
24
21
  timings: {
25
22
  serializeMs: number;
26
23
  extractMs: number;
@@ -37,38 +34,29 @@ export interface AnalysisOptions {
37
34
  system: SystemConfig;
38
35
  emitter: EmitterConfig;
39
36
  pathAliasesJson: string | null;
40
- /** Serialized staticCss forced-emission declarations, or null. */
37
+ /** Serialized `staticCss` forced-emission declarations. */
41
38
  staticCssJson?: string | null;
42
39
  /** rootDir-relative external package dirs (external-token candidates). */
43
40
  externalDirs?: string[];
44
41
  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. */
42
+ /** Diagnostics gathered outside analysis, surfaced through the same
43
+ * policy point as the manifest's own. */
48
44
  extraDiagnostics?: import('./manifest-diagnostics').ManifestDiagnostic[];
49
45
  }
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
- */
46
+ /** The named `analyzeProject` input set, and the persistence shape an
47
+ * isolated process replays the analysis from. */
56
48
  export declare function buildAnalysisInputs(opts: AnalysisOptions): AnalyzeProjectInputs;
57
49
  /**
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).
50
+ * The one analysis invocation both plugins share. Error handling stays at
51
+ * the call site (strict-mode throw vs warn).
63
52
  */
64
53
  export declare function runProjectAnalysis(engineApi: () => any, opts: AnalysisOptions & {
65
54
  warn: (message: string) => void;
66
55
  strict?: boolean;
67
56
  }): ProjectAnalysisResult;
68
57
  /**
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.
58
+ * Clear the engine's per-file analysis cache so stale results never bleed
59
+ * into a fresh run. Engines without the capability are tolerated.
72
60
  */
73
61
  export declare function clearEngineCache(engineApi: () => any): void;
74
62
  //# sourceMappingURL=run-analysis.d.ts.map
@@ -1 +1 @@
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,MAAM,CAAC;IAClB,4DAA4D;IAC5D,YAAY,EAAE,MAAM,CAAC;IACrB;6EACyE;IACzE,MAAM,EAAE,oBAAoB,CAAC;IAC7B,4DAA4D;IAC5D,OAAO,EAAE;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;CACtE;AAED,MAA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AAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,GAC5E,qBAAqB,CAkCvB;AAED;;;GAGG;AAEH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,GAAG,IAAI,CAO3D"}
@@ -0,0 +1,25 @@
1
+ import { type ExternalFileOwners, type RawSourceEntry, type SourceEntryOwnership, type SourceIngestionResult, type SourceIngestor, type SourceIngestorHost } from './source-ingestion';
2
+ type CachedSourceEntry = {
3
+ hash: string;
4
+ source: string;
5
+ };
6
+ export interface SourceCorpusCache {
7
+ /** rootDir-relative original path → entry. */
8
+ fileCache: ReadonlyMap<string, CachedSourceEntry>;
9
+ /** rootDir-relative external file → owning specifier; absence means "not
10
+ * external". */
11
+ externalFileOwners: Readonly<ExternalFileOwners>;
12
+ }
13
+ export interface PublishedSourceCorpus {
14
+ readonly analysisEntries: ReadonlyMap<string, CachedSourceEntry>;
15
+ /** Original path → the analysis entries it owns (zero-entry owners kept). */
16
+ readonly ownership: Readonly<Record<string, SourceEntryOwnership>>;
17
+ }
18
+ export interface SourceCorpus {
19
+ prepare(input: readonly RawSourceEntry[] | SourceCorpusCache): Promise<SourceIngestionResult>;
20
+ publish(accepted: SourceIngestionResult): void;
21
+ readonly published: PublishedSourceCorpus;
22
+ }
23
+ export declare function createSourceCorpus(host: SourceIngestorHost, ingestor?: SourceIngestor): SourceCorpus;
24
+ export {};
25
+ //# sourceMappingURL=source-corpus.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"source-corpus.d.ts","sourceRoot":"","sources":["../../pipeline/source-corpus.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACxB,MAAM,oBAAoB,CAAC;AAE5B,KAAK,iBAAiB,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAE1D,MAAM,WAAW,iBAAiB;IAChC,8CAA8C;IAC9C,SAAS,EAAE,WAAW,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;IAClD;qBACiB;IACjB,kBAAkB,EAAE,QAAQ,CAAC,kBAAkB,CAAC,CAAC;CAClD;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,eAAe,EAAE,WAAW,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;IACjE,6EAA6E;IAC7E,QAAQ,CAAC,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC,CAAC;CACpE;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,CACL,KAAK,EAAE,SAAS,cAAc,EAAE,GAAG,iBAAiB,GACnD,OAAO,CAAC,qBAAqB,CAAC,CAAC;IAClC,OAAO,CAAC,QAAQ,EAAE,qBAAqB,GAAG,IAAI,CAAC;IAC/C,QAAQ,CAAC,SAAS,EAAE,qBAAqB,CAAC;CAC3C;AAgBD,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,kBAAkB,EACxB,QAAQ,GAAE,cAA2C,GACpD,YAAY,CA+Bd"}
@@ -1,90 +1,60 @@
1
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). */
2
+ /** Structural alias, not `node:path`'s own `PlatformPath`: some @types/node
3
+ * versions do not export that name and fail consumers' type-check. */
6
4
  type PlatformPath = typeof path.win32;
7
5
  /**
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.
6
+ * One derivation of source identity for discovery, watch ingestion, ownership
7
+ * and deletion: event paths are lookup INPUTS only and never fork identity.
19
8
  */
20
9
  /**
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.
10
+ * True when `target` is `root` or a descendant, decided by `relative()`
11
+ * shape: string prefixing would let `/ui` claim `/ui-old`.
25
12
  */
26
13
  export declare function isPathWithinRoot(root: string, target: string, pathApi?: PlatformPath): boolean;
27
14
  /**
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.
15
+ * True when two paths share a platform root (win32 drive letter or UNC
16
+ * share; always true on posix). Drive letters compare case-insensitively.
31
17
  */
32
18
  export declare function sharesVolumeRoot(a: string, b: string, pathApi?: PlatformPath): boolean;
33
- /** One resolved source identity. */
34
19
  export interface ResolvedSourceId {
35
20
  /**
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.
21
+ * rootDir-relative key all persistent analysis state is indexed by; kit
22
+ * files keep `..`-prefixed keys. Canonical, so event spelling never forks it.
41
23
  */
42
24
  sourceKey: string;
43
- /** Canonical form of the owning external root; null when the project
44
- * root itself owns the file. */
25
+ /** Canonical owning external root; null when the project root owns it. */
45
26
  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. */
27
+ /** Path relative to the owning root (equals `sourceKey` for project-root
28
+ * members) — the input for package-relative exclusion filters. */
49
29
  pathInRoot: string;
50
30
  }
51
31
  /**
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.
32
+ * Per-generation identity handle: alias associations observed while a file
33
+ * existed are recorded, so deletion never canonicalizes a gone path.
56
34
  */
57
35
  export interface SourceIdentity {
58
36
  readonly rootDir: string;
59
37
  readonly canonicalRootDir: string;
60
38
  /**
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.
39
+ * Register an external source root; duplicate spellings of one canonical
40
+ * root collapse into the first registration. Returns the canonical form.
65
41
  */
66
42
  registerExternalRoot(root: string): string;
67
43
  /** Canonical forms of every registered external root (registration order). */
68
44
  externalRoots(): string[];
69
45
  /**
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).
46
+ * Resolve an EXISTING path: canonicalize, then re-authorize containment so
47
+ * a symlink escaping every allowed tree is rejected. Records the aliases.
76
48
  */
77
49
  resolveSourceId(inputPath: string): ResolvedSourceId | null;
78
50
  /**
79
- * Resolve a DELETED path through the recorded alias associations only —
80
- * a spelling never observed while the file existed resolves nothing.
51
+ * Resolve a DELETED path through recorded aliases only: a spelling never
52
+ * observed while the file existed resolves nothing.
81
53
  */
82
54
  resolveDeletedSourceId(inputPath: string): ResolvedSourceId | null;
83
55
  /**
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.
56
+ * The canonical external root containing `inputPath` — the path need not
57
+ * exist and no file identity is resolved. Null when no root contains it.
88
58
  */
89
59
  containingExternalRoot(inputPath: string): string | null;
90
60
  }
@@ -1 +1 @@
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;IAC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E,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;CAC1D;AAeD,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,cAAc,CAwGpE"}
@@ -3,19 +3,31 @@ import { adaptSvelteSource, type SvelteAdapterDiagnostic } from './svelte-source
3
3
  export interface RawSourceEntry {
4
4
  path: string;
5
5
  source: string;
6
- /** Optional precomputed hash of the raw original source. */
7
6
  hash?: string;
8
7
  }
8
+ type FilesJsonValue = null | boolean | number | string | FilesJsonValue[] | {
9
+ [key: string]: FilesJsonValue;
10
+ };
11
+ /**
12
+ * The index signature is load-bearing: a caller that re-serializes this corpus
13
+ * after editing it must not strip fields a newer writer added.
14
+ */
15
+ export type SerializedSourceEntry = RawSourceEntry & {
16
+ [key: string]: FilesJsonValue;
17
+ };
18
+ /**
19
+ * Throws on a payload that is not a corpus: an empty corpus is
20
+ * indistinguishable from "no files" and would publish an empty stylesheet.
21
+ */
22
+ export declare function parseFilesJson(filesJson: string, context: string): SerializedSourceEntry[];
9
23
  export interface OriginalSourceEntry {
10
24
  path: string;
11
25
  source: string;
12
- /** Hash of the raw original source, never a generated projection. */
13
26
  hash: string;
14
27
  }
15
28
  export interface AnalysisSourceEntry {
16
29
  path: string;
17
30
  source: string;
18
- /** Hash of this parser-ready entry. */
19
31
  hash: string;
20
32
  }
21
33
  export interface SourceEntryOwnership {
@@ -42,13 +54,16 @@ export interface ExtractChainFact {
42
54
  };
43
55
  fatalError: string | null;
44
56
  }
57
+ /**
58
+ * A partial transcription of the engine's per-file facts wire: `statics`,
59
+ * `usage`, `compose`, and `transforms` exist on it and are added when read.
60
+ */
45
61
  export interface ExtractFileFacts {
46
62
  path: string;
47
63
  chains: ExtractChainFact[];
48
64
  imports: ExtractImportFact[];
49
65
  exports: ExtractExportFact[];
50
66
  parseDiagnostics: string[];
51
- [key: string]: unknown;
52
67
  }
53
68
  export interface ExtractFactsResult {
54
69
  files: Record<string, ExtractFileFacts>;
@@ -61,14 +76,8 @@ export interface NativeSourceDiagnostic {
61
76
  analysisPath: string;
62
77
  }
63
78
  /**
64
- * Advisory diagnostics surface as warnings in EVERY mode and never
65
- * quarantine their file. OXC reports recovered parse diagnostics for
66
- * sources the consumer's own toolchain may accept (`.js` now parses
67
- * JSX-enabled, so genuinely malformed code is the remaining producer),
68
- * and the engine still analyzes whatever the recovered AST carries —
69
- * failing the build for that would make extraction stricter than the
70
- * host bundler, which surfaces its own error for the same file. Everything
71
- * else stays fatal: strict throws, non-strict warns and quarantines.
79
+ * Advisory diagnostics warn in every mode and never quarantine their file:
80
+ * OXC recovers parse errors the host bundler itself accepts. All else is fatal.
72
81
  */
73
82
  export declare function isAdvisorySourceDiagnostic(diagnostic: SourceIngestionDiagnostic): boolean;
74
83
  export interface SourceParserDiagnostic {
@@ -92,82 +101,68 @@ export interface ResolverIdentityCollisionDiagnostic {
92
101
  }
93
102
  export type SourceIngestionDiagnostic = NativeSourceDiagnostic | SourceParserDiagnostic | AnalysisPathCollisionDiagnostic | ResolverIdentityCollisionDiagnostic | SvelteAdapterDiagnostic;
94
103
  export interface SourceIngestionResult {
95
- /** Raw inputs keyed and hashed by their original source identity. */
96
104
  originalEntries: OriginalSourceEntry[];
97
- /** Parser-ready entries sent to analysis; Svelte itself is never a target. */
105
+ /** Parser-ready entries sent to analysis; a `.svelte` path is never one. */
98
106
  analysisEntries: AnalysisSourceEntry[];
99
- /** Atomic original-to-generated ownership, including zero-entry owners. */
107
+ /** Ownership per original, including originals with zero analysis paths. */
100
108
  ownership: Record<string, SourceEntryOwnership>;
101
109
  diagnostics: SourceIngestionDiagnostic[];
102
110
  }
103
111
  export interface CachedFileFacts {
104
- /** Hash of the analysis entry the facts were extracted from. */
105
112
  hash: string;
106
113
  facts: ExtractFileFacts;
107
114
  }
108
115
  export interface SourceIngestionOptions {
109
- /** Typed pass-through to the native `extractFacts(filesJson)` surface. */
110
116
  extractFacts(filesJson: string): string;
111
- /**
112
- * Host-owned per-file facts memo: an incremental corpus pass re-extracts
113
- * only entries whose (path, hash) pair changed and evicts paths absent
114
- * from the current corpus. Without it every pass re-parses the whole
115
- * corpus through the native boundary — a per-keystroke tax on the HMR
116
- * and watch paths that both hosts route through here.
117
- */
117
+ /** Host-owned memo reused across passes; without it every pass re-parses
118
+ * the whole corpus through the native boundary. */
118
119
  factsCache?: Map<string, CachedFileFacts>;
119
- /** Test seams; production callers use the dynamically loaded defaults. */
120
+ /** Test seams; production callers use the module defaults. */
120
121
  preprocessMdx?: (source: string, filename: string) => Promise<PreprocessMdxResult>;
121
122
  adaptSvelte?: typeof adaptSvelteSource;
122
123
  }
123
124
  /**
124
- * Convert raw source identities into parser-ready analysis entries once.
125
- *
126
- * Native and MDX entries establish the resolver-export index through the
127
- * native fact collector before any Svelte projection. Svelte calls are then
128
- * attributed by exact relative import/export identity and parsed once. Bare
129
- * package and configured-alias sources deliberately remain `other`; callers
130
- * must not guess those identities.
125
+ * Native and MDX entries must establish the resolver index before any Svelte
126
+ * projection; bare-package and aliased sources stay unattributed by design.
131
127
  */
132
128
  export declare function ingestSourceEntries(rawEntries: readonly RawSourceEntry[], options: SourceIngestionOptions): Promise<SourceIngestionResult>;
133
129
  /**
134
- * The per-file quarantine: drop every original a diagnostic named — and the
135
- * analysis children it owns — so one invalid source never aborts the rest
136
- * of the corpus. Shared by buildStart AND every incremental path in both
137
- * hosts; asymmetry here is how a permanently-diagnosable file (an `.mdx`
138
- * with the optional peer absent, an unsupported `.svelte` shape) froze all
139
- * re-analysis for the life of the dev server.
130
+ * Drops each named original and the analysis children it owns. Every corpus
131
+ * path applies it — skipping it on incremental passes freezes re-analysis.
140
132
  */
141
133
  export declare function withoutInvalidOriginals(result: SourceIngestionResult, invalidOriginals: ReadonlySet<string>): SourceIngestionResult;
134
+ /** rootDir-relative source path → the external package specifier owning it.
135
+ * Absence of a key means "not external"; every reader branches on that. */
136
+ export interface ExternalFileOwners {
137
+ [sourcePath: string]: string;
138
+ }
139
+ /**
140
+ * Diagnostics name ANALYSIS paths while ownership is recorded for originals,
141
+ * so projection is required; the result REPLACES the caller's owner map.
142
+ */
143
+ export declare function projectExternalFileOwners(result: SourceIngestionResult, rawOwners: Readonly<ExternalFileOwners>): ExternalFileOwners;
142
144
  export interface SourceIngestorHost {
143
- /** Engine access at call time; `extractFacts` stays optional on the shared
144
- * EngineApi for test doubles — the capability guard lives HERE, once. */
145
145
  engineApi(): {
146
146
  extractFacts?: (filesJson: string) => string;
147
147
  };
148
- /** Host log prefix, e.g. `[animus-extract]` / `[animus-next]`. */
148
+ /** Host log prefix, e.g. `[animus-extract]`. */
149
149
  prefix: string;
150
150
  strict(): boolean;
151
151
  warn(message: string): void;
152
152
  }
153
153
  export interface SourceIngestor {
154
- /** Prepare one raw-source corpus through the shared adaptation boundary. */
155
154
  ingest(entries: readonly RawSourceEntry[]): Promise<SourceIngestionResult>;
156
- /** Surface adapter diagnostics under ONE strict/warn/quarantine policy:
157
- * advisory diagnostics warn in every mode and never quarantine; fatal
158
- * diagnostics throw under strict, else warn once per (original, message)
159
- * and join the returned quarantine set. */
155
+ /** Returns originals to quarantine. Fatal diagnostics throw under strict,
156
+ * else warn once per (original, message); advisory ones never quarantine. */
160
157
  surfaceDiagnostics(diagnostics: readonly SourceIngestionDiagnostic[]): Set<string>;
161
- /** Reset the warn dedupe for originals that published clean, so a future
162
- * regression re-warns. Call from the host's publish step. */
158
+ /** Clears the warn dedupe for the result's originals so a later regression
159
+ * re-warns; hosts call it from their publish step. */
163
160
  markPublished(result: SourceIngestionResult): void;
164
161
  }
165
162
  /**
166
- * The one source-ingestion policy point shared by every host (vite-plugin,
167
- * next-plugin, cli, unplugin). Hosts hold exactly their prefix, strict flag,
168
- * and warn sink; the capability guard, facts memo, and warn-dedupe lifecycle
169
- * live here so the plugins cannot fork (precedent: pkg-collection
170
- * divergences; see also `enforceExternalTokenContracts`).
163
+ * One ingestion policy point for every host: a host supplies only a prefix, a
164
+ * strict flag, and a warn sink; policy and per-host memos stay here.
171
165
  */
172
166
  export declare function createSourceIngestor(host: SourceIngestorHost): SourceIngestor;
167
+ export {};
173
168
  //# sourceMappingURL=source-ingestion.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"source-ingestion.d.ts","sourceRoot":"","sources":["../../pipeline/source-ingestion.ts"],"names":[],"mappings":"AAGA,OAAO,EAAiB,KAAK,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC7E,OAAO,EACL,iBAAiB,EAEjB,KAAK,uBAAuB,EAG7B,MAAM,yBAAyB,CAAC;AAEjC,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,4DAA4D;IAC5D,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,qEAAqE;IACrE,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,uCAAuC;IACvC,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,oBAAoB;IACnC,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAED,MAAM,WAAW,gBAAgB;IAC/B,UAAU,EAAE;QACV,OAAO,EAAE,MAAM,CAAC;QAChB,Q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C,CAAC;IAC3E;kFAC8E;IAC9E,kBAAkB,CAChB,WAAW,EAAE,SAAS,yBAAyB,EAAE,GAChD,GAAG,CAAC,MAAM,CAAC,CAAC;IACf;2DACuD;IACvD,aAAa,CAAC,MAAM,EAAE,qBAAqB,GAAG,IAAI,CAAC;CACpD;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,kBAAkB,GAAG,cAAc,CAiD7E"}
@@ -1,25 +1,16 @@
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
- */
1
+ /** The `staticCss` option declares emission the JSX scanner cannot observe
2
+ * (config-driven variants, spread props); the engine applies it as usage. */
8
3
  export interface StaticCssComponentOverride {
9
- /** `'*'` = every option of every declared variant prop; or per-prop
10
- * `'*'` / explicit option lists. */
4
+ /** `'*'` = every option of every declared variant prop; per-prop `'*'` or
5
+ * an explicit option list otherwise. */
11
6
  variants?: '*' | Record<string, '*' | string[]>;
12
7
  /** `'*'` = every declared state; or an explicit list. */
13
8
  states?: '*' | string[];
14
- /** Custom props whose dynamic slot must be emitted without detected
15
- * dynamic usage. */
16
9
  dynamicProps?: string[];
17
10
  }
18
11
  export interface StaticCssConfig {
19
12
  components?: Record<string, StaticCssComponentOverride>;
20
- /** System prop → value list (strings, numbers, or responsive objects). */
21
13
  systemProps?: Record<string, Array<string | number | Record<string, string | number>>>;
22
14
  }
23
- /** Serialize a staticCss option for the engine; null when absent/empty. */
24
15
  export declare function serializeStaticCss(config: StaticCssConfig | undefined): string | null;
25
16
  //# sourceMappingURL=static-css.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"static-css.d.ts","sourceRoot":"","sources":["../../pipeline/static-css.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,WAAW,0BAA0B;IACzC;yCAC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