@animus-ui/extract 0.1.8 → 0.1.11

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 (126) hide show
  1. package/README.md +1 -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 +16 -0
  6. package/dist/index.cjs +73 -2070
  7. package/dist/index.mjs +2 -1996
  8. package/dist/{analyze-project-args.d.ts → pipeline/analyze-project-args.d.ts} +3 -1
  9. package/dist/pipeline/analyze-project-args.d.ts.map +1 -0
  10. package/dist/pipeline/assemble-stylesheet.d.ts.map +1 -0
  11. package/dist/pipeline/asset-placeholders.d.ts.map +1 -0
  12. package/dist/pipeline/content-hash.d.ts.map +1 -0
  13. package/dist/pipeline/core-options.d.ts +162 -0
  14. package/dist/pipeline/core-options.d.ts.map +1 -0
  15. package/dist/pipeline/correlate-external-tokens.d.ts.map +1 -0
  16. package/dist/pipeline/discover-files.d.ts +12 -0
  17. package/dist/pipeline/discover-files.d.ts.map +1 -0
  18. package/dist/{discover-packages.d.ts → pipeline/discover-packages.d.ts} +13 -8
  19. package/dist/pipeline/discover-packages.d.ts.map +1 -0
  20. package/dist/pipeline/dynamic-prop-config.d.ts.map +1 -0
  21. package/dist/{engine-adapter.d.ts → pipeline/engine-adapter.d.ts} +3 -1
  22. package/dist/pipeline/engine-adapter.d.ts.map +1 -0
  23. package/dist/pipeline/engine-retirement.d.ts.map +1 -0
  24. package/dist/pipeline/error-diagnostics.d.ts +32 -0
  25. package/dist/pipeline/error-diagnostics.d.ts.map +1 -0
  26. package/dist/pipeline/external-keyframes.d.ts.map +1 -0
  27. package/dist/{index.d.ts → pipeline/index.d.ts} +12 -1
  28. package/dist/pipeline/index.d.ts.map +1 -0
  29. package/dist/pipeline/manifest-diagnostics.d.ts.map +1 -0
  30. package/dist/{mdx-preprocessor.d.ts → pipeline/mdx-preprocessor.d.ts} +10 -0
  31. package/dist/pipeline/mdx-preprocessor.d.ts.map +1 -0
  32. package/dist/pipeline/path-aliases.d.ts.map +1 -0
  33. package/dist/pipeline/post-process-css.d.ts.map +1 -0
  34. package/dist/pipeline/prefix.d.ts.map +1 -0
  35. package/dist/pipeline/replacement-plans.d.ts.map +1 -0
  36. package/dist/pipeline/resolve-asset.d.ts.map +1 -0
  37. package/dist/pipeline/run-analysis.d.ts.map +1 -0
  38. package/dist/pipeline/source-identity.d.ts.map +1 -0
  39. package/dist/pipeline/source-ingestion.d.ts +173 -0
  40. package/dist/pipeline/source-ingestion.d.ts.map +1 -0
  41. package/dist/pipeline/static-css.d.ts.map +1 -0
  42. package/dist/pipeline/structural-self-check.d.ts +32 -0
  43. package/dist/pipeline/structural-self-check.d.ts.map +1 -0
  44. package/dist/pipeline/svelte-source-adapter.d.ts +88 -0
  45. package/dist/pipeline/svelte-source-adapter.d.ts.map +1 -0
  46. package/dist/{system-config.d.ts → pipeline/system-config.d.ts} +8 -0
  47. package/dist/pipeline/system-config.d.ts.map +1 -0
  48. package/dist/{system-props-module.d.ts → pipeline/system-props-module.d.ts} +4 -3
  49. package/dist/pipeline/system-props-module.d.ts.map +1 -0
  50. package/dist/pipeline/timing-waterfall.d.ts.map +1 -0
  51. package/dist/pipeline/tsconfig-paths.d.ts.map +1 -0
  52. package/dist/pipeline/unit-fallback.d.ts.map +1 -0
  53. package/dist/pipeline/utils.d.ts.map +1 -0
  54. package/dist/pipeline/watch-keys.d.ts.map +1 -0
  55. package/dist/pipeline-lkbOoyAr.mjs +3228 -0
  56. package/dist/pipeline-ojNeABi0.cjs +3685 -0
  57. package/dist/session/extraction-session.d.ts +446 -0
  58. package/dist/session/extraction-session.d.ts.map +1 -0
  59. package/dist/session/index.d.ts +24 -0
  60. package/dist/session/index.d.ts.map +1 -0
  61. package/dist/session/published-set.d.ts +32 -0
  62. package/dist/session/published-set.d.ts.map +1 -0
  63. package/dist/session/resolve-packages.d.ts +8 -0
  64. package/dist/session/resolve-packages.d.ts.map +1 -0
  65. package/dist/session/session-paths.d.ts +131 -0
  66. package/dist/session/session-paths.d.ts.map +1 -0
  67. package/dist/session/singleton.d.ts +124 -0
  68. package/dist/session/singleton.d.ts.map +1 -0
  69. package/dist/session/timing.d.ts +7 -0
  70. package/dist/session/timing.d.ts.map +1 -0
  71. package/dist/session/turbopack-orchestrator.d.ts +43 -0
  72. package/dist/session/turbopack-orchestrator.d.ts.map +1 -0
  73. package/dist/session.cjs +2146 -0
  74. package/dist/session.mjs +2110 -0
  75. package/package.json +18 -6
  76. package/dist/analyze-project-args.d.ts.map +0 -1
  77. package/dist/assemble-stylesheet.d.ts.map +0 -1
  78. package/dist/asset-placeholders.d.ts.map +0 -1
  79. package/dist/content-hash.d.ts.map +0 -1
  80. package/dist/correlate-external-tokens.d.ts.map +0 -1
  81. package/dist/discover-files.d.ts +0 -10
  82. package/dist/discover-files.d.ts.map +0 -1
  83. package/dist/discover-packages.d.ts.map +0 -1
  84. package/dist/dynamic-prop-config.d.ts.map +0 -1
  85. package/dist/engine-adapter.d.ts.map +0 -1
  86. package/dist/engine-retirement.d.ts.map +0 -1
  87. package/dist/external-keyframes.d.ts.map +0 -1
  88. package/dist/index.d.ts.map +0 -1
  89. package/dist/manifest-diagnostics.d.ts.map +0 -1
  90. package/dist/mdx-preprocessor.d.ts.map +0 -1
  91. package/dist/path-aliases.d.ts.map +0 -1
  92. package/dist/post-process-css.d.ts.map +0 -1
  93. package/dist/prefix.d.ts.map +0 -1
  94. package/dist/replacement-plans.d.ts.map +0 -1
  95. package/dist/resolve-asset.d.ts.map +0 -1
  96. package/dist/run-analysis.d.ts.map +0 -1
  97. package/dist/source-identity.d.ts.map +0 -1
  98. package/dist/static-css.d.ts.map +0 -1
  99. package/dist/system-config.d.ts.map +0 -1
  100. package/dist/system-props-module.d.ts.map +0 -1
  101. package/dist/timing-waterfall.d.ts.map +0 -1
  102. package/dist/tsconfig-paths.d.ts.map +0 -1
  103. package/dist/unit-fallback.d.ts.map +0 -1
  104. package/dist/utils.d.ts.map +0 -1
  105. package/dist/watch-keys.d.ts.map +0 -1
  106. /package/dist/{assemble-stylesheet.d.ts → pipeline/assemble-stylesheet.d.ts} +0 -0
  107. /package/dist/{asset-placeholders.d.ts → pipeline/asset-placeholders.d.ts} +0 -0
  108. /package/dist/{content-hash.d.ts → pipeline/content-hash.d.ts} +0 -0
  109. /package/dist/{correlate-external-tokens.d.ts → pipeline/correlate-external-tokens.d.ts} +0 -0
  110. /package/dist/{dynamic-prop-config.d.ts → pipeline/dynamic-prop-config.d.ts} +0 -0
  111. /package/dist/{engine-retirement.d.ts → pipeline/engine-retirement.d.ts} +0 -0
  112. /package/dist/{external-keyframes.d.ts → pipeline/external-keyframes.d.ts} +0 -0
  113. /package/dist/{manifest-diagnostics.d.ts → pipeline/manifest-diagnostics.d.ts} +0 -0
  114. /package/dist/{path-aliases.d.ts → pipeline/path-aliases.d.ts} +0 -0
  115. /package/dist/{post-process-css.d.ts → pipeline/post-process-css.d.ts} +0 -0
  116. /package/dist/{prefix.d.ts → pipeline/prefix.d.ts} +0 -0
  117. /package/dist/{replacement-plans.d.ts → pipeline/replacement-plans.d.ts} +0 -0
  118. /package/dist/{resolve-asset.d.ts → pipeline/resolve-asset.d.ts} +0 -0
  119. /package/dist/{run-analysis.d.ts → pipeline/run-analysis.d.ts} +0 -0
  120. /package/dist/{source-identity.d.ts → pipeline/source-identity.d.ts} +0 -0
  121. /package/dist/{static-css.d.ts → pipeline/static-css.d.ts} +0 -0
  122. /package/dist/{timing-waterfall.d.ts → pipeline/timing-waterfall.d.ts} +0 -0
  123. /package/dist/{tsconfig-paths.d.ts → pipeline/tsconfig-paths.d.ts} +0 -0
  124. /package/dist/{unit-fallback.d.ts → pipeline/unit-fallback.d.ts} +0 -0
  125. /package/dist/{utils.d.ts → pipeline/utils.d.ts} +0 -0
  126. /package/dist/{watch-keys.d.ts → pipeline/watch-keys.d.ts} +0 -0
@@ -0,0 +1,173 @@
1
+ import { type PreprocessMdxResult } from './mdx-preprocessor';
2
+ import { adaptSvelteSource, type SvelteAdapterDiagnostic } from './svelte-source-adapter';
3
+ export interface RawSourceEntry {
4
+ path: string;
5
+ source: string;
6
+ /** Optional precomputed hash of the raw original source. */
7
+ hash?: string;
8
+ }
9
+ export interface OriginalSourceEntry {
10
+ path: string;
11
+ source: string;
12
+ /** Hash of the raw original source, never a generated projection. */
13
+ hash: string;
14
+ }
15
+ export interface AnalysisSourceEntry {
16
+ path: string;
17
+ source: string;
18
+ /** Hash of this parser-ready entry. */
19
+ hash: string;
20
+ }
21
+ export interface SourceEntryOwnership {
22
+ originalPath: string;
23
+ originalHash: string;
24
+ analysisPaths: string[];
25
+ }
26
+ export interface ExtractImportFact {
27
+ local: string;
28
+ imported: string;
29
+ source: string;
30
+ }
31
+ export interface ExtractExportFact {
32
+ exported: string;
33
+ local: string | null;
34
+ source: string | null;
35
+ original: string | null;
36
+ }
37
+ export interface ExtractChainFact {
38
+ descriptor: {
39
+ binding: string;
40
+ terminal: string;
41
+ extractable: boolean;
42
+ };
43
+ fatalError: string | null;
44
+ }
45
+ export interface ExtractFileFacts {
46
+ path: string;
47
+ chains: ExtractChainFact[];
48
+ imports: ExtractImportFact[];
49
+ exports: ExtractExportFact[];
50
+ parseDiagnostics: string[];
51
+ [key: string]: unknown;
52
+ }
53
+ export interface ExtractFactsResult {
54
+ files: Record<string, ExtractFileFacts>;
55
+ parseCount: number;
56
+ }
57
+ export interface NativeSourceDiagnostic {
58
+ code: 'SOURCE_NATIVE_PARSE_ERROR';
59
+ message: string;
60
+ originalPath: string;
61
+ analysisPath: string;
62
+ }
63
+ /**
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.
72
+ */
73
+ export declare function isAdvisorySourceDiagnostic(diagnostic: SourceIngestionDiagnostic): boolean;
74
+ export interface SourceParserDiagnostic {
75
+ code: 'SOURCE_MDX_DEPENDENCY_MISSING' | 'SOURCE_MDX_PARSE_ERROR' | 'SOURCE_SVELTE_DEPENDENCY_MISSING';
76
+ message: string;
77
+ originalPath: string;
78
+ }
79
+ export interface AnalysisPathCollisionDiagnostic {
80
+ code: 'SOURCE_ANALYSIS_PATH_COLLISION';
81
+ message: string;
82
+ originalPath: string;
83
+ analysisPath: string;
84
+ conflictingOriginalPath: string;
85
+ }
86
+ export interface ResolverIdentityCollisionDiagnostic {
87
+ code: 'SOURCE_RESOLVER_IDENTITY_COLLISION';
88
+ message: string;
89
+ originalPath: string;
90
+ canonicalPath: string;
91
+ conflictingOriginalPath: string;
92
+ }
93
+ export type SourceIngestionDiagnostic = NativeSourceDiagnostic | SourceParserDiagnostic | AnalysisPathCollisionDiagnostic | ResolverIdentityCollisionDiagnostic | SvelteAdapterDiagnostic;
94
+ export interface SourceIngestionResult {
95
+ /** Raw inputs keyed and hashed by their original source identity. */
96
+ originalEntries: OriginalSourceEntry[];
97
+ /** Parser-ready entries sent to analysis; Svelte itself is never a target. */
98
+ analysisEntries: AnalysisSourceEntry[];
99
+ /** Atomic original-to-generated ownership, including zero-entry owners. */
100
+ ownership: Record<string, SourceEntryOwnership>;
101
+ diagnostics: SourceIngestionDiagnostic[];
102
+ }
103
+ export interface CachedFileFacts {
104
+ /** Hash of the analysis entry the facts were extracted from. */
105
+ hash: string;
106
+ facts: ExtractFileFacts;
107
+ }
108
+ export interface SourceIngestionOptions {
109
+ /** Typed pass-through to the native `extractFacts(filesJson)` surface. */
110
+ 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
+ */
118
+ factsCache?: Map<string, CachedFileFacts>;
119
+ /** Test seams; production callers use the dynamically loaded defaults. */
120
+ preprocessMdx?: (source: string, filename: string) => Promise<PreprocessMdxResult>;
121
+ adaptSvelte?: typeof adaptSvelteSource;
122
+ }
123
+ /**
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.
131
+ */
132
+ export declare function ingestSourceEntries(rawEntries: readonly RawSourceEntry[], options: SourceIngestionOptions): Promise<SourceIngestionResult>;
133
+ /**
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.
140
+ */
141
+ export declare function withoutInvalidOriginals(result: SourceIngestionResult, invalidOriginals: ReadonlySet<string>): SourceIngestionResult;
142
+ 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
+ engineApi(): {
146
+ extractFacts?: (filesJson: string) => string;
147
+ };
148
+ /** Host log prefix, e.g. `[animus-extract]` / `[animus-next]`. */
149
+ prefix: string;
150
+ strict(): boolean;
151
+ warn(message: string): void;
152
+ }
153
+ export interface SourceIngestor {
154
+ /** Prepare one raw-source corpus through the shared adaptation boundary. */
155
+ 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. */
160
+ 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. */
163
+ markPublished(result: SourceIngestionResult): void;
164
+ }
165
+ /**
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`).
171
+ */
172
+ export declare function createSourceIngestor(host: SourceIngestorHost): SourceIngestor;
173
+ //# sourceMappingURL=source-ingestion.d.ts.map
@@ -0,0 +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,WAA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zC;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"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Structural self-check over an emitted extraction result — the affirmative
3
+ * post-condition against silent-empty output (openspec:
4
+ * standalone-extraction-cli, "Silent-empty success is impossible").
5
+ *
6
+ * One shared implementation for every driver: the Vite plugin's `verify`
7
+ * option and the standalone CLI (default-on) both call this; the caller
8
+ * owns the failure POLICY (warn vs throw vs exit code), never the checks.
9
+ */
10
+ import type { ExternalPackageOutcome } from './discover-packages';
11
+ export interface StructuralCheckInput {
12
+ /** Number of components in the manifest. */
13
+ componentCount: number;
14
+ /** The theme's variable CSS (`:root` block expected). */
15
+ variableCss: string;
16
+ /** Global CSS (may be empty). */
17
+ globalCss: string;
18
+ /** Resolved component CSS (post transform substitution). */
19
+ componentCss: string;
20
+ /** Consumer `layers` option, when configured. */
21
+ layers?: string[];
22
+ /** An already-assembled full sheet — when provided, the ordering and
23
+ * placeholder checks run on it directly instead of re-assembling from
24
+ * the pieces (the CLI holds only the final sheet). */
25
+ assembledCss?: string;
26
+ /** Per-specifier discovery outcomes from the last collection. */
27
+ externalOutcomes?: readonly ExternalPackageOutcome[];
28
+ }
29
+ /** Run every structural check; returns human-readable failure lines
30
+ * (empty = pass). */
31
+ export declare function runStructuralSelfCheck(input: StructuralCheckInput): string[];
32
+ //# sourceMappingURL=structural-self-check.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"structural-self-check.d.ts","sourceRoot":"","sources":["../../pipeline/structural-self-check.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAElE,MAAM,WAAW,oBAAoB;IACnC,4CAA4C;IAC5C,cAAc,EAAE,MAAM,CAAC;IACvB,yDAAyD;IACzD,WAAW,EAAE,MAAM,CAAC;IACpB,iCAAiC;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,4DAA4D;IAC5D,YAAY,EAAE,MAAM,CAAC;IACrB,iDAAiD;IACjD,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB;;2DAEuD;IACvD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iEAAiE;IACjE,gBAAgB,CAAC,EAAE,SAAS,sBAAsB,EAAE,CAAC;CACtD;AAED;sBACsB;AACtB,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,oBAAoB,GAAG,MAAM,EAAE,CAmE5E"}
@@ -0,0 +1,88 @@
1
+ export type SvelteScriptScope = 'module' | 'instance';
2
+ export interface SourceSpan {
3
+ /** Inclusive UTF-8 byte offset. */
4
+ start: number;
5
+ /** Exclusive UTF-8 byte offset. */
6
+ end: number;
7
+ }
8
+ export interface SourcePosition {
9
+ /** One-based line number, matching Svelte compiler locations. */
10
+ line: number;
11
+ /** Zero-based UTF-16 column, matching Svelte compiler locations. */
12
+ column: number;
13
+ }
14
+ export interface SourceLocation {
15
+ start: SourcePosition;
16
+ end: SourcePosition;
17
+ }
18
+ export interface SvelteSourceOrigin {
19
+ path: string;
20
+ hash: string;
21
+ }
22
+ export type SvelteOriginMappingKind = 'resolver' | 'attribute' | 'value';
23
+ export interface SvelteOriginMapping {
24
+ kind: SvelteOriginMappingKind;
25
+ generated: SourceSpan;
26
+ original: SourceSpan;
27
+ }
28
+ export interface SvelteVirtualEntry {
29
+ scope: SvelteScriptScope;
30
+ /** Parser-only identity. Original source identity remains authoritative. */
31
+ path: string;
32
+ source: string;
33
+ mappings: SvelteOriginMapping[];
34
+ }
35
+ export interface SvelteAdapterDiagnostic {
36
+ code: 'SVELTE_PARSE_ERROR' | 'SVELTE_ATTRS_IMPORT_UNSUPPORTED' | 'SVELTE_ATTRS_SCOPE_UNSUPPORTED' | 'SVELTE_ATTRS_CALLEE_UNSUPPORTED' | 'SVELTE_ATTRS_TEMPLATE_UNSUPPORTED' | 'SVELTE_ATTRS_ARGUMENT_UNRESOLVED' | 'SVELTE_ATTRS_COMPUTED_KEY' | 'SVELTE_ATTRS_SPREAD_UNRESOLVED' | 'SVELTE_ATTRS_PROPERTY_UNSUPPORTED' | 'SVELTE_ATTRS_VALUE_UNSUPPORTED';
37
+ message: string;
38
+ originalPath: string;
39
+ /** Present only when the parser supplied an exact original-source node. */
40
+ span?: SourceSpan;
41
+ /** Structured original-source location for every exact diagnostic span. */
42
+ location?: SourceLocation;
43
+ }
44
+ export type SvelteResolverImportKind = 'named' | 'string-named' | 'named-default' | 'default' | 'namespace';
45
+ export type SvelteResolverAccess = {
46
+ kind: 'direct';
47
+ importKind: SvelteResolverImportKind;
48
+ } | {
49
+ kind: 'namespace-member';
50
+ importKind: 'namespace';
51
+ };
52
+ export interface SvelteResolverAttributionRequest {
53
+ source: string;
54
+ imported: string;
55
+ local: string;
56
+ access: SvelteResolverAccess;
57
+ }
58
+ export type SvelteResolverAttribution = 'resolver' | 'unsupported-resolver-form' | 'other';
59
+ export interface AdaptSvelteSourceOptions {
60
+ /** Classify an import access using caller-owned extraction metadata. */
61
+ attributeResolver(request: SvelteResolverAttributionRequest): SvelteResolverAttribution;
62
+ }
63
+ export type AdaptSvelteSourceResult = {
64
+ kind: 'ok';
65
+ original: SvelteSourceOrigin;
66
+ entries: SvelteVirtualEntry[];
67
+ } | {
68
+ kind: 'missing-dep';
69
+ original: SvelteSourceOrigin;
70
+ dependency: 'svelte/compiler';
71
+ } | {
72
+ kind: 'error';
73
+ original: SvelteSourceOrigin;
74
+ diagnostics: SvelteAdapterDiagnostic[];
75
+ };
76
+ /**
77
+ * Project native Svelte script scopes into parser-only TSX witnesses.
78
+ *
79
+ * This adapter parses source, never compiler-generated runtime JavaScript.
80
+ * Module and instance scripts project separately (module bindings are in
81
+ * scope for the instance script, per Svelte semantics) and contribute only
82
+ * witnessed named imports plus synthetic JSX attributes for direct resolver
83
+ * `.attrs()` and callable-string calls. Caller-owned metadata attributes
84
+ * candidate imports; unsupported call shapes — including resolver calls
85
+ * written in the template fragment — fail the whole source closed.
86
+ */
87
+ export declare function adaptSvelteSource(source: string, originalPath: string, options: AdaptSvelteSourceOptions): Promise<AdaptSvelteSourceResult>;
88
+ //# sourceMappingURL=svelte-source-adapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"svelte-source-adapter.d.ts","sourceRoot":"","sources":["../../pipeline/svelte-source-adapter.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,UAAU,CAAC;AAEtD,MAAM,WAAW,UAAU;IACzB,mCAAmC;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,mCAAmC;IACnC,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,cAAc;IAC7B,iEAAiE;IACjE,IAAI,EAAE,MAAM,CAAC;IACb,oEAAoE;IACpE,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,cAAc,CAAC;IACtB,GAAG,EAAE,cAAc,CAAC;CACrB;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CA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C;AAEZ,MAAM,WAAW,wBAAwB;IACvC,wEAAwE;IACxE,iBAAiB,CACf,OAAO,EAAE,gCAAgC,GACxC,yBAAyB,CAAC;CAC9B;AAED,MAAM,MAAM,uBAAuB,GAC/B;IACE,IAAI,EAAE,IAAI,CAAC;IACX,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,OAAO,EAAE,kBAAkB,EAAE,CAAC;CAC/B,GACD;IACE,IAAI,EAAE,aAAa,CAAC;IACpB,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,UAAU,EAAE,iBAAiB,CAAC;CAC/B,GACD;IACE,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,WAAW,EAAE,uBAAuB,EAAE,CAAC;CACxC,CAAC;AAu1BN;;;;;;;;;;GAUG;AACH,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,wBAAwB,GAChC,OAAO,CAAC,uBAAuB,CAAC,CAkHlC"}
@@ -18,6 +18,14 @@ export interface SystemConfig {
18
18
  * Optional so the plugins' pre-load `emptySystemConfig()` default need not
19
19
  * restate it; `loadSystemConfig` always populates it after a real load. */
20
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;
21
29
  globalStyleBlocksJson: string | null;
22
30
  keyframesJson: string | null;
23
31
  /** Canonical absolute paths of every module the loader evaluated for this
@@ -0,0 +1 @@
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,9 +1,10 @@
1
1
  import type { DynamicPropMeta } from './dynamic-prop-config';
2
2
  /**
3
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.
4
+ * `virtual:animus/system-props` by the Vite plugin and written as the
5
+ * session-scoped `system-props.js` artifact by the extraction session
6
+ * (`@animus-ui/extract/session`). One generator so the runtimes can never
7
+ * drift.
7
8
  *
8
9
  * Runtime transform functions for dynamic props are not yet supported
9
10
  * (transforms are resolved at extraction time via boa_engine in Rust), so
@@ -0,0 +1 @@
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;;;;;;;;;;;;;;GAcG;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"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timing-waterfall.d.ts","sourceRoot":"","sources":["../../pipeline/timing-waterfall.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,EAAE,aAAa,CAC5C,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,CAatC,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC9B,IAAI,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,GAC3C,MAAM,EAAE,CAcV"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tsconfig-paths.d.ts","sourceRoot":"","sources":["../../pipeline/tsconfig-paths.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAmKpD;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,aAAa,EAAE,CAiDvE"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unit-fallback.d.ts","sourceRoot":"","sources":["../../pipeline/unit-fallback.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CA2CrD"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../pipeline/utils.ts"],"names":[],"mappings":"AAAA,0DAA0D;AAC1D,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEhD"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"watch-keys.d.ts","sourceRoot":"","sources":["../../pipeline/watch-keys.ts"],"names":[],"mappings":"AAGA;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAInD"}