@animus-ui/extract 0.1.7 → 0.1.9

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.
@@ -55,6 +55,15 @@ export interface EngineOptions {
55
55
  configJson?: string
56
56
  /** Group registry JSON (v1 `group_registry_json`). */
57
57
  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
+ transformSourcesJson?: string
58
67
  /** Selector aliases JSON (v1 `selector_aliases_json`). */
59
68
  selectorAliasesJson?: string
60
69
  /**
@@ -122,6 +131,13 @@ export interface NapiSystemConfig {
122
131
  * alias → `{ value, order, kind }`. Absent when the system registers none.
123
132
  */
124
133
  conditionAliases?: string
134
+ /**
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.
139
+ */
140
+ transformSources?: string
125
141
  globalStyleBlocks?: string
126
142
  keyframesBlocks?: string
127
143
  /**
@@ -24,7 +24,8 @@ export type AnalyzeProjectArgs = [
24
24
  keyframesJson: string | null,
25
25
  staticCssJson: string | null,
26
26
  conditionAliasesJson: string | null,
27
- externalDirsJson: string | null
27
+ externalDirsJson: string | null,
28
+ transformSourcesJson: string | null
28
29
  ];
29
30
  /** @internal */
30
31
  export interface AnalyzeProjectInputs {
@@ -48,6 +49,7 @@ export interface AnalyzeProjectInputs {
48
49
  /** rootDir-relative external package dirs (JSON string array) for the
49
50
  * external-token candidate walk, or null. */
50
51
  externalDirsJson: string | null;
52
+ transformSourcesJson: string | null;
51
53
  }
52
54
  /** @internal */
53
55
  export declare function buildAnalyzeProjectArgs(inputs: AnalyzeProjectInputs): AnalyzeProjectArgs;
@@ -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;CAChC,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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AAC,CAAC;IACnC,yDAAyD;IACzD,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;CACxC,GAAG,MAAM,EAAE,CAyBX;AAWD;;;;;;GAMG;AACH,wBAAgB,6BAA6B,CAAC,IAAI,EAAE;IAClD,WAAW,EAAE,kBAAkB,EAAE,GAAG,SAAS,CAAC;IAC9C,+EAA+E;IAC/E,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,wEAAwE;IACxE,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAClC,wBAAwB,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACpD,MAAM,EAAE,OAAO,GAAG,SAAS,CAAC;IAC5B,gDAAgD;IAChD,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACjC,GAAG,IAAI,CAwBP"}
@@ -12,6 +12,16 @@ export declare function findPackageRoot(absEntryPath: string): string;
12
12
  * repo path containing 'dist') must still have its sources discovered.
13
13
  */
14
14
  export declare const PACKAGE_SRC_EXCLUDES: string[];
15
+ /** True when a PACKAGE-RELATIVE path matches a package-source exclusion
16
+ * fragment (the "within the package" filter — see PACKAGE_SRC_EXCLUDES). */
17
+ export declare function isExcludedPackageRelativePath(rel: string): boolean;
18
+ /**
19
+ * THE package-source walk (guardrail G1 — one policy): shared discovery with
20
+ * no consumer patterns, then exclusion by package-relative path so fragments
21
+ * in the package's own location can't blank out its sources. Used by the
22
+ * collector, hosts' dirty-root rewalks, and watch-path classification alike.
23
+ */
24
+ export declare function walkPackageSources(packageDir: string, extensionsSet: ReadonlySet<string>): string[];
15
25
  /**
16
26
  * What one declared include specifier produced, so callers can tell a package
17
27
  * that contributed sources apart from one that silently contributed nothing.
@@ -38,6 +48,14 @@ export interface ExternalPackageOutcome {
38
48
  */
39
49
  fileCount: number;
40
50
  }
51
+ /**
52
+ * Resolve an absolute-path specifier (a relative `includes` entry already
53
+ * resolved against the system file) without a bundler: the path itself when it
54
+ * is a file, otherwise the extension and directory-index candidates built from
55
+ * the caller's extension set. Used only as a fallback — a bundler resolver that
56
+ * answers first still wins, since it also knows aliases and `.js`→`.ts` mapping.
57
+ */
58
+ export declare function resolveAbsolutePathSpecifier(absSpecifier: string, extensionsSet: ReadonlySet<string>): string | null;
41
59
  export interface CollectedExternalPackages {
42
60
  /** New file entries (rootDir-relative, preprocessed) for the analysis set. */
43
61
  entries: Array<{
@@ -48,10 +66,26 @@ export interface CollectedExternalPackages {
48
66
  packageMap: Record<string, string>;
49
67
  /** specifier → absolute src/index.ts path, only for packages with one. */
50
68
  sourceEntries: Map<string, string>;
69
+ /** specifier → absolute entry to scan for branded `Keyframes` collections —
70
+ * one per admitted specifier, whatever the package's shape: the redirected
71
+ * source entry when src/ serves it, the resolved (dist) entry otherwise.
72
+ * Keyed separately from `sourceEntries` because that map doubles as the
73
+ * hosts' module-resolution redirect and stays src-only by contract. */
74
+ keyframesScanEntries: Map<string, string>;
51
75
  /** Absolute directories for bundler loader allowlisting (src/ or dist entry dir). */
52
76
  packageDirs: string[];
53
- /** Absolute package dir → owning specifier (cross-source correlation). */
54
- dirOwners: Record<string, string>;
77
+ /** Absolute package dir → EVERY declared specifier that claimed it, in
78
+ * declaration order (set-valued ownership — openspec:
79
+ * external-source-watch-ingestion, design D2). The first-wins
80
+ * single-value view correlation consumers key on derives via
81
+ * `firstOwners`. */
82
+ dirOwnerSets: Record<string, string[]>;
83
+ /** Absolute package dir → the EXACT extension list its collection walk
84
+ * used (dist-only dirs widen with the entry's own extension, e.g.
85
+ * `.mjs`). Hosts that rewalk or re-classify paths under a dir must use
86
+ * this same list — recomputing from the project default silently drops
87
+ * every file the widened walk admitted. */
88
+ dirExtensions: Record<string, string[]>;
55
89
  /** rootDir-relative file path → owning specifier, for files THIS collection
56
90
  * pushed (first-contributing specifier wins; files the caller's own set
57
91
  * already supplied stay unattributed — they are consumer-owned). */
@@ -95,7 +129,27 @@ export declare function collectExternalPackageSources(opts: {
95
129
  } | null>;
96
130
  /** Called when a discovered file cannot be read; the file is skipped. */
97
131
  onUnreadable: (relPath: string, error: unknown) => void;
132
+ /**
133
+ * Called once per specifier immediately after its package dir is derived
134
+ * and BEFORE that package's sources are walked (openspec:
135
+ * external-source-watch-ingestion, design D4 — a host can open its
136
+ * watcher with no blind gap between scan and watch).
137
+ */
138
+ onPackageResolved?: (specifier: string, packageDir: string) => void;
98
139
  }): Promise<CollectedExternalPackages>;
140
+ /** First-declared specifier per package dir — the single-value ownership
141
+ * view correlation consumers key on, derived from `dirOwnerSets`. */
142
+ export declare function firstOwners(dirOwnerSets: Record<string, string[]>): Record<string, string>;
143
+ /**
144
+ * Excise a set of rejected specifiers from a collection result ATOMICALLY
145
+ * (openspec: external-source-watch-ingestion, design D5): the returned copy
146
+ * carries no entries, package-map targets, source entries, package dirs, or
147
+ * ownership for the rejected packages — a package dir is removed only when
148
+ * EVERY specifier that claimed it is rejected (a dir-level rejection, such
149
+ * as the cross-volume gate, always rejects them together). Outcome records
150
+ * are reporting inputs, not membership, and pass through untouched.
151
+ */
152
+ export declare function excludeCollectedPackages(collected: CollectedExternalPackages, rejectedSpecifiers: ReadonlySet<string>, rootDir: string): CollectedExternalPackages;
99
153
  /**
100
154
  * Extract external DS package names from inheritance declarations in the
101
155
  * system file.
@@ -1 +1 @@
1
- {"version":3,"file":"discover-packages.d.ts","sourceRoot":"","sources":["../pipeline/discover-packages.ts"],"names":[],"mappings":"AAKA;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAS5D;AAED;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,UAKhC,CAAC;AAWF;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACrC,yEAAyE;IACzE,SAAS,EAAE,MAAM,CAAC;IAClB;;;;;;;OAOG;IACH,OAAO,EAAE,UA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,EACd,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,KACZ,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC,CAAC;IACzD,yEAAyE;IACzE,YAAY,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACxD;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;CACrE,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAmNrC;AAED;sEACsE;AACtE,wBAAgB,WAAW,CACzB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,GACrC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAMxB;AAED;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,yBAAyB,EACpC,kBAAkB,EAAE,WAAW,CAAC,MAAM,CAAC,EACvC,OAAO,EAAE,MAAM,GACd,yBAAyB,CA4D3B;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH;;;;;GAKG;AACH,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,sBAAsB,EAAE,GACjC,MAAM,GAAG,IAAI,CAMf;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,sBAAsB,EAAE,GACjC,MAAM,GAAG,IAAI,CAMf;AAED,wBAAgB,yBAAyB,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,EAAE,CAoN1E"}
@@ -42,7 +42,7 @@ export interface EngineApi {
42
42
  loadSystemModule: (...args: unknown[]) => any;
43
43
  /** Keyframes-only scan of an external package entry. */
44
44
  scanKeyframesExports: (entryPath: string, rootDir: string) => string | null;
45
- analyzeProject: (filesJson: string, scalesJson: string, variableMapJson: string, contextualVarsJson: string | null, propConfigJson: string, groupRegistryJson: string, packageResolutionJson: string, devMode: boolean, emitterConfigJson: string | null, selectorAliasesJson: string | null, selectorOrderJson: string | null, globalStyleBlocksJson: string | null, pathAliasesJson: string | null, keyframesJson: string | null, staticCssJson: string | null, conditionAliasesJson: string | null, externalDirsJson: string | null) => string;
45
+ analyzeProject: (filesJson: string, scalesJson: string, variableMapJson: string, contextualVarsJson: string | null, propConfigJson: string, groupRegistryJson: string, packageResolutionJson: string, devMode: boolean, emitterConfigJson: string | null, selectorAliasesJson: string | null, selectorOrderJson: string | null, globalStyleBlocksJson: string | null, pathAliasesJson: string | null, keyframesJson: string | null, staticCssJson: string | null, conditionAliasesJson: string | null, externalDirsJson: string | null, transformSourcesJson: string | null) => string;
46
46
  transformFile: (source: string, path: string, manifest: string) => TransformFileResult;
47
47
  clearAnalysisCache: () => void;
48
48
  }
@@ -1 +1 @@
1
- {"version":3,"file":"engine-adapter.d.ts","sourceRoot":"","sources":["../pipeline/engine-adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,iFAAiF;AACjF,MAAM,WAAW,eAAe;IAC9B,OAAO,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC;IACnC,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IACpC,UAAU,IAAI,IAAI,CAAC;CACpB;AAED,6DAA6D;AAC7D,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,OAAO,CAAC;CACxB;AAED;;;;;GAKG;AACH,MAAM,WAAW,SAAS;IAIxB,gBAAgB,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,GAAG,CAAC;IAC9C,wDAAwD;IACxD,oBAAoB,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAC;IAC5E,cAAc,EAAE,CACd,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,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C;IAC1B;;;;gBAIY;IACZ,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC;;;+CAG2C;IAC3C,kBAAkB,CAAC,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAAC;CACnD;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,mBAAmB,GAAG,MAAM,SAAS,CAwH5E"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Build-failing escalation for `kind: "error"` manifest diagnostics
3
+ * (extraction-diagnostics §Error diagnostics fail the build; design D8 of
4
+ * transform-result-hardening).
5
+ *
6
+ * ONE policy point shared by BOTH bundler plugins: each calls
7
+ * `assertNoErrorDiagnostics` at its analysis-accept seam, immediately after
8
+ * a completed analysis and BEFORE any stylesheet content is served or
9
+ * written. Failure content is composed here, from the diagnostics alone, so
10
+ * identical input produces identical failure messages in every host —
11
+ * plugin policy must not fork (precedent: pkg-collection divergences).
12
+ */
13
+ /** The fields of a manifest diagnostic the error gate reads — structural
14
+ * (fields used only), so both the parsed-manifest entries and TS-side
15
+ * `ManifestDiagnostic` values qualify. Mirrors the Rust `CssDiagnostic`
16
+ * in `extract-v2/src/analyze_css.rs`. */
17
+ export type CssDiagnosticLike = {
18
+ file: string;
19
+ component: string;
20
+ kind: string;
21
+ message: string;
22
+ };
23
+ /**
24
+ * Throw when the diagnostics carry any `kind: "error"` entry — one
25
+ * aggregated `Error` naming EVERY offender (component, file, message — one
26
+ * line per entry, each prefixed `[animus]`). Warning-only diagnostics
27
+ * (`bail`/`skip`/`warn`, any severity) never trip this gate; their routing
28
+ * stays with `surfaceManifestDiagnostics`. Callers accept the manifest only
29
+ * past this point, so no stylesheet from a failing analysis is published.
30
+ */
31
+ export declare function assertNoErrorDiagnostics(diagnostics: CssDiagnosticLike[] | undefined): void;
32
+ //# sourceMappingURL=error-diagnostics.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error-diagnostics.d.ts","sourceRoot":"","sources":["../pipeline/error-diagnostics.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH;;;0CAG0C;AAC1C,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CACtC,WAAW,EAAE,iBAAiB,EAAE,GAAG,SAAS,GAC3C,IAAI,CAsBN"}