@animus-ui/next-plugin 0.1.5 → 0.1.7
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/dist/extraction-session.d.ts +3 -1
- package/dist/extraction-session.d.ts.map +1 -1
- package/dist/index.cjs +12 -2
- package/dist/index.mjs +13 -3
- package/package.json +2 -2
|
@@ -55,6 +55,8 @@ export declare class ExtractionSession {
|
|
|
55
55
|
private readonly options;
|
|
56
56
|
private readonly staticCssJson;
|
|
57
57
|
private system;
|
|
58
|
+
/** Discovery-time keyframes diagnostics awaiting the shared surfacing pass. */
|
|
59
|
+
private externalKeyframesDiagnostics;
|
|
58
60
|
/** Full package-resolution map from the last full pipeline — replayed by
|
|
59
61
|
* incremental passes (sourceEntries alone omits dist-resolved packages). */
|
|
60
62
|
private lastPackageMap;
|
|
@@ -101,7 +103,7 @@ export declare class ExtractionSession {
|
|
|
101
103
|
resetForHmr(): void;
|
|
102
104
|
/**
|
|
103
105
|
* Build file entries from cache: every cached file rides with full source.
|
|
104
|
-
* The v2 engine has NO Rust-side cache (extract-v2-spine
|
|
106
|
+
* The v2 engine has NO Rust-side cache (arch-extract-v2-spine: uncached
|
|
105
107
|
* re-analysis beats a cache-hit path), so it must always receive full sources
|
|
106
108
|
* (openspec: retire-extract-v1 removed the v1 empty-source cache contract).
|
|
107
109
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extraction-session.d.ts","sourceRoot":"","sources":["../src/extraction-session.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"extraction-session.d.ts","sourceRoot":"","sources":["../src/extraction-session.ts"],"names":[],"mappings":"AAkDA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAQjD;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,uBAAuB,CAAC;AAczD,qEAAqE;AACrE,MAAM,WAAW,YAAY;IAC3B,aAAa,CAAC,EAAE,WAAW,CAAC,MAAM,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,IAAI,OAAO,CAMrB;IAED,OAAO,CAAC,GAAG;IAMX,OAAO,CAAC,IAAI;IAKZ,OAAO,CAAC,GAAG;IAGX,OAAO,CAAC,OAAO;IAIf;iFAC6E;IAC7E,OAAO,CAAC,iBAAiB;IAezB;;;;OAIG;IACG,iBAAiB,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CA8J5D;IAED;;;;;;;;;OASG;YACW,kBAAkB;IA2B1B,eAAe,IAAI,OAAO,CAAC,IAAI,CAAC,CAiMrC;IAED;;OAEG;IACH,WAAW,IAAI,IAAI,CAOlB;IAED;;;;;OAKG;IACH,OAAO,CAAC,yBAAyB;IAQjC;;;OAGG;YACW,sBAAsB;IAmBpC;;;;;;;;;;;;;;;;;OAiBG;YACW,cAAc;IA4K5B;;;;sBAIkB;IAClB,OAAO,CAAC,gBAAgB;IAUxB;;;;4EAIwE;IACxE,OAAO,CAAC,eAAe;IAUvB;;;;;;;;;OASG;IACH,OAAO,CAAC,yBAAyB;IA2EjC,OAAO,CAAC,oBAAoB;IAK5B;;;;;OAKG;IACH,OAAO,CAAC,qBAAqB;CA0B9B;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,WAAW,CAAC,MAAM,CAAC,GAC5B,IAAI,CAgBN"}
|
package/dist/index.cjs
CHANGED
|
@@ -148,6 +148,8 @@ var ExtractionSession = class {
|
|
|
148
148
|
options;
|
|
149
149
|
staticCssJson;
|
|
150
150
|
system = null;
|
|
151
|
+
/** Discovery-time keyframes diagnostics awaiting the shared surfacing pass. */
|
|
152
|
+
externalKeyframesDiagnostics = [];
|
|
151
153
|
/** Full package-resolution map from the last full pipeline — replayed by
|
|
152
154
|
* incremental passes (sourceEntries alone omits dist-resolved packages). */
|
|
153
155
|
lastPackageMap = {};
|
|
@@ -420,6 +422,12 @@ var ExtractionSession = class {
|
|
|
420
422
|
this.externalPackageDirs = collected.packageDirs;
|
|
421
423
|
require_singleton.setSharedExternalDirs(collected.packageDirs);
|
|
422
424
|
require_singleton.setSharedExternalEntries(collected.sourceEntries);
|
|
425
|
+
if (this.system && collected.sourceEntries.size > 0) {
|
|
426
|
+
const api = require_singleton.engineApi();
|
|
427
|
+
const merge = (0, _animus_ui_extract_pipeline.mergeExternalKeyframes)((entry, root) => api.scanKeyframesExports(entry, root), this.system.keyframesJson, collected.sourceEntries.values(), this.rootDir);
|
|
428
|
+
this.system.keyframesJson = merge.keyframesJson;
|
|
429
|
+
this.externalKeyframesDiagnostics = merge.diagnostics;
|
|
430
|
+
}
|
|
423
431
|
bt.packageResolve = this.elapsed(t);
|
|
424
432
|
await this.analyzeAndEmit(fileEntries, packageMap, false, bt, pipelineStart);
|
|
425
433
|
}
|
|
@@ -436,7 +444,7 @@ var ExtractionSession = class {
|
|
|
436
444
|
}
|
|
437
445
|
/**
|
|
438
446
|
* Build file entries from cache: every cached file rides with full source.
|
|
439
|
-
* The v2 engine has NO Rust-side cache (extract-v2-spine
|
|
447
|
+
* The v2 engine has NO Rust-side cache (arch-extract-v2-spine: uncached
|
|
440
448
|
* re-analysis beats a cache-hit path), so it must always receive full sources
|
|
441
449
|
* (openspec: retire-extract-v1 removed the v1 empty-source cache contract).
|
|
442
450
|
*/
|
|
@@ -491,7 +499,9 @@ var ExtractionSession = class {
|
|
|
491
499
|
staticCssJson: this.staticCssJson,
|
|
492
500
|
externalDirs: this.externalPackageDirs.map((dir) => (0, path.relative)(this.rootDir, dir)),
|
|
493
501
|
devMode,
|
|
494
|
-
warn: (message) => this.warn(message)
|
|
502
|
+
warn: (message) => this.warn(message),
|
|
503
|
+
strict: this.options.strict,
|
|
504
|
+
extraDiagnostics: this.externalKeyframesDiagnostics
|
|
495
505
|
});
|
|
496
506
|
(0, _animus_ui_extract_pipeline.enforceExternalTokenContracts)({
|
|
497
507
|
diagnostics: result.manifest?.diagnostics,
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __require } from "./chunk-y_GBKt04.mjs";
|
|
2
2
|
import { a as getSharedExternalDirs, c as setAnalysisPromise, d as setSharedEngine, f as setSharedExternalDirs, i as getSharedCss, l as setManifestJson, m as setSharedSystemProps, n as getAnalysisPromise, o as getSharedExternalEntries, p as setSharedExternalEntries, s as resetAnalysisPromise, t as engineApi, u as setSharedCss } from "./singleton-BKALu7Mk.mjs";
|
|
3
|
-
import { DEFAULT_EXTENSIONS, assembleStylesheet, assertNoRetiredEngineSelection, buildPathAliasesJson, buildSystemPropsModule, clearEngineCache, collectExternalPackageSources, contentHash, discoverFiles, enforceExternalTokenContracts, extractSystemFilePackages, findAssetSpecifiers, findPackageRoot, formatRustTimingWaterfall, loadSystemConfig, postProcessCss, preprocessMdx, readTsconfigAliasPairs, resolveAssetFile, resolveLightningTargets, runProjectAnalysis, serializeStaticCss, staleDistIncludesMessage, substituteAssetPlaceholders, toWatchKeys, unresolvableIncludesMessage } from "@animus-ui/extract/pipeline";
|
|
3
|
+
import { DEFAULT_EXTENSIONS, assembleStylesheet, assertNoRetiredEngineSelection, buildPathAliasesJson, buildSystemPropsModule, clearEngineCache, collectExternalPackageSources, contentHash, discoverFiles, enforceExternalTokenContracts, extractSystemFilePackages, findAssetSpecifiers, findPackageRoot, formatRustTimingWaterfall, loadSystemConfig, mergeExternalKeyframes, postProcessCss, preprocessMdx, readTsconfigAliasPairs, resolveAssetFile, resolveLightningTargets, runProjectAnalysis, serializeStaticCss, staleDistIncludesMessage, substituteAssetPlaceholders, toWatchKeys, unresolvableIncludesMessage } from "@animus-ui/extract/pipeline";
|
|
4
4
|
import { existsSync, mkdirSync, readFileSync, readdirSync, renameSync, statSync, unlinkSync, watch, writeFileSync } from "fs";
|
|
5
5
|
import { basename, dirname, extname, join, relative, resolve, sep } from "path";
|
|
6
6
|
import { fileURLToPath } from "url";
|
|
@@ -148,6 +148,8 @@ var ExtractionSession = class {
|
|
|
148
148
|
options;
|
|
149
149
|
staticCssJson;
|
|
150
150
|
system = null;
|
|
151
|
+
/** Discovery-time keyframes diagnostics awaiting the shared surfacing pass. */
|
|
152
|
+
externalKeyframesDiagnostics = [];
|
|
151
153
|
/** Full package-resolution map from the last full pipeline — replayed by
|
|
152
154
|
* incremental passes (sourceEntries alone omits dist-resolved packages). */
|
|
153
155
|
lastPackageMap = {};
|
|
@@ -420,6 +422,12 @@ var ExtractionSession = class {
|
|
|
420
422
|
this.externalPackageDirs = collected.packageDirs;
|
|
421
423
|
setSharedExternalDirs(collected.packageDirs);
|
|
422
424
|
setSharedExternalEntries(collected.sourceEntries);
|
|
425
|
+
if (this.system && collected.sourceEntries.size > 0) {
|
|
426
|
+
const api = engineApi();
|
|
427
|
+
const merge = mergeExternalKeyframes((entry, root) => api.scanKeyframesExports(entry, root), this.system.keyframesJson, collected.sourceEntries.values(), this.rootDir);
|
|
428
|
+
this.system.keyframesJson = merge.keyframesJson;
|
|
429
|
+
this.externalKeyframesDiagnostics = merge.diagnostics;
|
|
430
|
+
}
|
|
423
431
|
bt.packageResolve = this.elapsed(t);
|
|
424
432
|
await this.analyzeAndEmit(fileEntries, packageMap, false, bt, pipelineStart);
|
|
425
433
|
}
|
|
@@ -436,7 +444,7 @@ var ExtractionSession = class {
|
|
|
436
444
|
}
|
|
437
445
|
/**
|
|
438
446
|
* Build file entries from cache: every cached file rides with full source.
|
|
439
|
-
* The v2 engine has NO Rust-side cache (extract-v2-spine
|
|
447
|
+
* The v2 engine has NO Rust-side cache (arch-extract-v2-spine: uncached
|
|
440
448
|
* re-analysis beats a cache-hit path), so it must always receive full sources
|
|
441
449
|
* (openspec: retire-extract-v1 removed the v1 empty-source cache contract).
|
|
442
450
|
*/
|
|
@@ -491,7 +499,9 @@ var ExtractionSession = class {
|
|
|
491
499
|
staticCssJson: this.staticCssJson,
|
|
492
500
|
externalDirs: this.externalPackageDirs.map((dir) => relative(this.rootDir, dir)),
|
|
493
501
|
devMode,
|
|
494
|
-
warn: (message) => this.warn(message)
|
|
502
|
+
warn: (message) => this.warn(message),
|
|
503
|
+
strict: this.options.strict,
|
|
504
|
+
extraDiagnostics: this.externalKeyframesDiagnostics
|
|
495
505
|
});
|
|
496
506
|
enforceExternalTokenContracts({
|
|
497
507
|
diagnostics: result.manifest?.diagnostics,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@animus-ui/next-plugin",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"description": "Animus static CSS extraction for Next.js (webpack)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"animus",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"compile": "tsc --noEmit"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@animus-ui/extract": "0.1.
|
|
43
|
+
"@animus-ui/extract": "0.1.7"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"@mdx-js/mdx": "^3.0.0",
|