@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.
- package/crates/extract-v2/animus-extract-v2.darwin-arm64.node +0 -0
- package/crates/extract-v2/animus-extract-v2.linux-arm64-gnu.node +0 -0
- package/crates/extract-v2/animus-extract-v2.linux-x64-gnu.node +0 -0
- package/crates/extract-v2/index.d.ts +16 -0
- package/dist/analyze-project-args.d.ts +3 -1
- package/dist/analyze-project-args.d.ts.map +1 -1
- package/dist/correlate-external-tokens.d.ts.map +1 -1
- package/dist/discover-packages.d.ts +56 -2
- package/dist/discover-packages.d.ts.map +1 -1
- package/dist/engine-adapter.d.ts +1 -1
- package/dist/engine-adapter.d.ts.map +1 -1
- package/dist/error-diagnostics.d.ts +32 -0
- package/dist/error-diagnostics.d.ts.map +1 -0
- package/dist/index.cjs +368 -25
- package/dist/index.d.ts +8 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +350 -22
- package/dist/manifest-diagnostics.d.ts +10 -0
- package/dist/manifest-diagnostics.d.ts.map +1 -1
- package/dist/replacement-plans.d.ts +46 -0
- package/dist/replacement-plans.d.ts.map +1 -0
- package/dist/run-analysis.d.ts.map +1 -1
- package/dist/source-identity.d.ts +93 -0
- package/dist/source-identity.d.ts.map +1 -0
- package/dist/system-config.d.ts +8 -0
- package/dist/system-config.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
/** Platform path API (`path` / `path.win32` / `path.posix`). Structural
|
|
3
|
+
* local alias — the packed consumers' @types/node need not export
|
|
4
|
+
* `PlatformPath` from 'node:path' (older versions don't, which fails
|
|
5
|
+
* their declaration type-check against this file's emitted d.ts). */
|
|
6
|
+
type PlatformPath = typeof path.win32;
|
|
7
|
+
/**
|
|
8
|
+
* SourceId derivation authority + allowlist membership (openspec:
|
|
9
|
+
* external-source-watch-ingestion, design D1/D2/D5).
|
|
10
|
+
*
|
|
11
|
+
* One shared derivation produces the canonical source identity consumed by
|
|
12
|
+
* discovery, watch ingestion, ownership, deletion pruning, and diagnostics
|
|
13
|
+
* — raw event paths are lookup INPUTS only, so event spelling (symlink
|
|
14
|
+
* alias vs canonical, lexical vs realpath) can never fork identity.
|
|
15
|
+
*
|
|
16
|
+
* The containment and volume helpers are pure and path-API-injectable so
|
|
17
|
+
* Windows semantics are unit-testable via `path.win32` on any host; runtime
|
|
18
|
+
* callers use the ambient platform implementation.
|
|
19
|
+
*/
|
|
20
|
+
/**
|
|
21
|
+
* Structural containment: `target` is the root itself or a descendant of it,
|
|
22
|
+
* decided by `relative()` shape — never by string prefixing, so `/ui` can
|
|
23
|
+
* never claim `/ui-old`, and a cross-drive win32 target (whose relative()
|
|
24
|
+
* result is absolute) is never contained.
|
|
25
|
+
*/
|
|
26
|
+
export declare function isPathWithinRoot(root: string, target: string, pathApi?: PlatformPath): boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Cross-volume gate (design D5): two paths share a platform path root
|
|
29
|
+
* (win32 drive letter or UNC share; always true on posix). Compared
|
|
30
|
+
* case-insensitively — win32 drive letters are case-insensitive.
|
|
31
|
+
*/
|
|
32
|
+
export declare function sharesVolumeRoot(a: string, b: string, pathApi?: PlatformPath): boolean;
|
|
33
|
+
/** One resolved source identity. */
|
|
34
|
+
export interface ResolvedSourceId {
|
|
35
|
+
/**
|
|
36
|
+
* The rootDir-relative source key all persistent analysis state is
|
|
37
|
+
* indexed by — kit files keep their `..`-prefixed keys. Derived from
|
|
38
|
+
* CANONICAL paths (canonical suffix re-attached to the root's
|
|
39
|
+
* as-registered spelling) so it always matches the key discovery
|
|
40
|
+
* produced, whatever spelling the event carried.
|
|
41
|
+
*/
|
|
42
|
+
sourceKey: string;
|
|
43
|
+
/** Canonical form of the owning external root; null when the project
|
|
44
|
+
* root itself owns the file. */
|
|
45
|
+
owningRoot: string | null;
|
|
46
|
+
/** Canonical path of the file relative to its owning root (equals
|
|
47
|
+
* `sourceKey` for project-root members) — the input for package-relative
|
|
48
|
+
* exclusion filters. */
|
|
49
|
+
pathInRoot: string;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* The per-generation identity handle (design D2): canonical roots are
|
|
53
|
+
* realpath'd once at registration, and every alias→SourceId association
|
|
54
|
+
* observed while a file existed is recorded so DELETION resolves through
|
|
55
|
+
* the cache — never through fresh canonicalization of a gone path.
|
|
56
|
+
*/
|
|
57
|
+
export interface SourceIdentity {
|
|
58
|
+
readonly rootDir: string;
|
|
59
|
+
readonly canonicalRootDir: string;
|
|
60
|
+
/**
|
|
61
|
+
* Register a discovery-resolved external source root. Both the
|
|
62
|
+
* as-registered (lexical) and canonical forms become membership
|
|
63
|
+
* witnesses; duplicate spellings of one canonical root collapse into the
|
|
64
|
+
* first registration. Returns the canonical form.
|
|
65
|
+
*/
|
|
66
|
+
registerExternalRoot(root: string): string;
|
|
67
|
+
/** Canonical forms of every registered external root (registration order). */
|
|
68
|
+
externalRoots(): string[];
|
|
69
|
+
/**
|
|
70
|
+
* Resolve an EXISTING path to its source identity: canonicalize, then
|
|
71
|
+
* re-authorize containment against the canonical form of the allowed
|
|
72
|
+
* trees (a nested symlink escaping every allowed tree is rejected).
|
|
73
|
+
* Records the observed spelling (and the canonical form) as deletion
|
|
74
|
+
* aliases. Returns null for non-members and paths that cannot be
|
|
75
|
+
* canonicalized (vanished between event and resolution).
|
|
76
|
+
*/
|
|
77
|
+
resolveSourceId(inputPath: string): ResolvedSourceId | null;
|
|
78
|
+
/**
|
|
79
|
+
* Resolve a DELETED path through the recorded alias associations only —
|
|
80
|
+
* a spelling never observed while the file existed resolves nothing.
|
|
81
|
+
*/
|
|
82
|
+
resolveDeletedSourceId(inputPath: string): ResolvedSourceId | null;
|
|
83
|
+
/**
|
|
84
|
+
* The canonical external root structurally containing `inputPath`
|
|
85
|
+
* (matched against both root forms; the path itself need not exist and
|
|
86
|
+
* no file identity is resolved) — the watch pass's dirty-root witness
|
|
87
|
+
* for directory-granularity reports. Null when no root contains it.
|
|
88
|
+
*/
|
|
89
|
+
containingExternalRoot(inputPath: string): string | null;
|
|
90
|
+
}
|
|
91
|
+
export declare function createSourceIdentity(rootDir: string): SourceIdentity;
|
|
92
|
+
export {};
|
|
93
|
+
//# sourceMappingURL=source-identity.d.ts.map
|
|
@@ -0,0 +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;IACH,sBAAsB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;CAC1D;AAeD,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,cAAc,CA0GpE"}
|
package/dist/system-config.d.ts
CHANGED
|
@@ -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
|
|
@@ -1 +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,EAA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AG,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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@animus-ui/extract",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
4
4
|
"description": "Animus static CSS extraction pipeline (Rust/NAPI)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"animus",
|
|
@@ -51,12 +51,12 @@
|
|
|
51
51
|
"build:v2:debug": "cd crates/extract-v2 && bunx napi build --platform"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@animus-ui/properties": "0.1.
|
|
54
|
+
"@animus-ui/properties": "0.1.9",
|
|
55
55
|
"browserslist": "^4.24.0",
|
|
56
56
|
"lightningcss": "^1.29.0"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@animus-ui/system": "0.1.
|
|
59
|
+
"@animus-ui/system": "0.1.9",
|
|
60
60
|
"@mdx-js/mdx": "3.1.1",
|
|
61
61
|
"@napi-rs/cli": "^3.7.3"
|
|
62
62
|
},
|