@animus-ui/vite-plugin 0.1.18 → 0.1.19
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/build-start.d.ts.map +1 -1
- package/dist/context.d.ts +10 -1
- package/dist/context.d.ts.map +1 -1
- package/dist/index.cjs +43 -22
- package/dist/virtual-modules.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-start.d.ts","sourceRoot":"","sources":["../src/build-start.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"build-start.d.ts","sourceRoot":"","sources":["../src/build-start.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE/C;;;GAGG;AACH,wBAAsB,aAAa,CACjC,GAAG,EAAE,aAAa,EAClB,gBAAgB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,EAC/D,SAAS,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,KAAK,MAAM,GAC3D,OAAO,CAAC,IAAI,CAAC,CA+Mf"}
|
package/dist/context.d.ts
CHANGED
|
@@ -107,7 +107,6 @@ export declare class PluginContext {
|
|
|
107
107
|
* without opting in. */
|
|
108
108
|
info(msg: string): void;
|
|
109
109
|
warn(msg: string): void;
|
|
110
|
-
logTimingWaterfall(timing: Record<string, number>): void;
|
|
111
110
|
/** Load the system into `this.system`. On failure the previous config is
|
|
112
111
|
* kept; strict mode throws instead. */
|
|
113
112
|
loadSystem(): void;
|
|
@@ -149,6 +148,16 @@ export declare class PluginContext {
|
|
|
149
148
|
publishSourceIngestion(result: SourceIngestionResult): void;
|
|
150
149
|
devFsUrl(absPath: string): string;
|
|
151
150
|
assetFallback(specifier: string, message: string, cause?: unknown): void;
|
|
151
|
+
/** Every asset() specifier in the sheets the plugin emits. */
|
|
152
|
+
sheetAssetSpecifiers(): string[];
|
|
153
|
+
/** `system.variableCss` with its asset() placeholders substituted from
|
|
154
|
+
* the current asset map. Derived on every read, so it always matches
|
|
155
|
+
* `system`, however and whenever that was assigned; `system` keeps the
|
|
156
|
+
* placeholders for the next asset pass. */
|
|
157
|
+
get variableCss(): string;
|
|
158
|
+
/** Substitutes the analysis sheets in place; the theme's variable CSS is
|
|
159
|
+
* substituted on read (`variableCss`). */
|
|
160
|
+
substituteSheets(): void;
|
|
152
161
|
/** Resolves asset specifiers a system reload introduced. Node-side only —
|
|
153
162
|
* the plugin hook context is unavailable here, so results can differ. */
|
|
154
163
|
private applyAssetSubstitutions;
|
package/dist/context.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAkCA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAItD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC;AAC9C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AACpD,OAAO,KAAK,EACV,cAAc,EACd,sBAAsB,EACtB,cAAc,EAEd,eAAe,EACf,cAAc,EACd,YAAY,EACZ,qBAAqB,EACrB,YAAY,EAEb,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAoBnC;yEACyE;AACzE,wBAAgB,oBAAoB,CAAC,CAAC,EACpC,GAAG,EAAE,aAAa,EAClB,IAAI,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GACrB,OAAO,CAAC,CAAC,CAAC,CAWZ;AA8BD;sEACsE;AACtE,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAOlE;AAED;uEACuE;AACvE,wBAAgB,cA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AAI,CAQ1D;IAED,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAGhC;IAED,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,GAAG,IAAI,CAOvE;IAED,8DAA8D;IAC9D,oBAAoB,IAAI,MAAM,EAAE,CAM/B;IAED;;;gDAG4C;IAC5C,IAAI,WAAW,IAAI,MAAM,CAKxB;IAED;+CAC2C;IAC3C,gBAAgB,IAAI,IAAI,CASvB;IAED;8EAC0E;IAC1E,OAAO,CAAC,uBAAuB;IAyB/B,OAAO,CAAC,cAAc,CAA+B;IAErD,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAkBzC;IAEK,mBAAmB,IAAI,OAAO,CAAC,IAAI,CAAC,CAIzC;YAEa,4BAA4B;IAU1C,OAAO,CAAC,6BAA6B;IAcrC,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAI3C;IAED;2EACuE;IACvE,wBAAwB,IAAI,IAAI,CAS/B;IAED;;;yEAGqE;IACrE,0BAA0B,IAAI,IAAI,CAkBjC;IAED;sEACkE;IAClE,wBAAwB,IAAI,IAAI,CAW/B;IAED,6BAA6B,IAAI,IAAI,CAUpC;IAED,aAAa,IAAI,IAAI,CAyBpB;CACF"}
|
package/dist/index.cjs
CHANGED
|
@@ -85,7 +85,7 @@ async function runBuildStart(ctx, resolveSpecifier, emitAsset) {
|
|
|
85
85
|
});
|
|
86
86
|
}
|
|
87
87
|
});
|
|
88
|
-
const assetSpecifiers =
|
|
88
|
+
const assetSpecifiers = ctx.sheetAssetSpecifiers();
|
|
89
89
|
for (const specifier of assetSpecifiers) {
|
|
90
90
|
const resolvedPath = await resolveSpecifier(specifier);
|
|
91
91
|
if (!resolvedPath) {
|
|
@@ -100,12 +100,11 @@ async function runBuildStart(ctx, resolveSpecifier, emitAsset) {
|
|
|
100
100
|
}
|
|
101
101
|
else ctx.assetUrlBySpecifier.set(specifier, ctx.devFsUrl(resolvedPath));
|
|
102
102
|
}
|
|
103
|
-
ctx.
|
|
103
|
+
ctx.substituteSheets();
|
|
104
104
|
ctx.assetPassComplete = true;
|
|
105
105
|
if (ctx.storedManifest) {
|
|
106
106
|
const report = ctx.storedManifest.report;
|
|
107
107
|
ctx.log(`Extracted ${report.components_extracted}/${report.components_total} components (${Math.round(performance.now() - t0)}ms)`);
|
|
108
|
-
ctx.logTimingWaterfall(ctx.storedManifest.timing);
|
|
109
108
|
ctx.log(`Reconciliation: ${report.components_extracted} kept, ${report.variants_eliminated} variants pruned, ${report.states_eliminated} states pruned`);
|
|
110
109
|
for (const d of report.eliminated_details) if (d.kind === "component") ctx.warn(`⚠ ${d.component} eliminated: ${d.reason}`);
|
|
111
110
|
else if (d.kind === "prospective_component") ctx.warn(`⚠ ${d.component} would be eliminated in production: ${d.reason}`);
|
|
@@ -115,7 +114,7 @@ async function runBuildStart(ctx, resolveSpecifier, emitAsset) {
|
|
|
115
114
|
if (!ctx.isProd && ctx.storedSheets) {
|
|
116
115
|
const staticSize = (0, _animus_ui_extract_pipeline.assembleStylesheet)({
|
|
117
116
|
layers: ctx.options.layers,
|
|
118
|
-
variableCss: ctx.
|
|
117
|
+
variableCss: ctx.variableCss,
|
|
119
118
|
globalCss: ctx.globalCss
|
|
120
119
|
}).length;
|
|
121
120
|
const componentSize = ctx.resolvedComponentCss.length;
|
|
@@ -522,13 +521,6 @@ var PluginContext = class {
|
|
|
522
521
|
warn(msg) {
|
|
523
522
|
(this.logger ?? console).warn(`[animus] ${msg}`);
|
|
524
523
|
}
|
|
525
|
-
logTimingWaterfall(timing) {
|
|
526
|
-
if (!this.verbose) return;
|
|
527
|
-
for (const line of (0, _animus_ui_extract_pipeline.formatRustTimingWaterfall)(timing, {
|
|
528
|
-
indent: " ",
|
|
529
|
-
labelWidth: 15
|
|
530
|
-
})) this.log(line);
|
|
531
|
-
}
|
|
532
524
|
/** Load the system into `this.system`. On failure the previous config is
|
|
533
525
|
* kept; strict mode throws instead. */
|
|
534
526
|
loadSystem() {
|
|
@@ -570,6 +562,7 @@ var PluginContext = class {
|
|
|
570
562
|
externalDirs: this.externalPackageDirs.map((dir) => (0, path.relative)(this.rootDir, dir)),
|
|
571
563
|
devMode: !this.emissionProd,
|
|
572
564
|
warn: (m) => this.warn(m),
|
|
565
|
+
info: (m) => this.log(m),
|
|
573
566
|
strict: this.options.strict
|
|
574
567
|
});
|
|
575
568
|
} catch (e) {
|
|
@@ -693,17 +686,38 @@ var PluginContext = class {
|
|
|
693
686
|
this.assetUrlBySpecifier.set(specifier, specifier);
|
|
694
687
|
this.assetResolutionFailures.add(specifier);
|
|
695
688
|
}
|
|
689
|
+
/** Every asset() specifier in the sheets the plugin emits. */
|
|
690
|
+
sheetAssetSpecifiers() {
|
|
691
|
+
return (0, _animus_ui_extract_pipeline.findSheetAssetSpecifiers)({
|
|
692
|
+
variableCss: this.system.variableCss,
|
|
693
|
+
globalCss: this.globalCss,
|
|
694
|
+
componentCss: this.resolvedComponentCss
|
|
695
|
+
});
|
|
696
|
+
}
|
|
697
|
+
/** `system.variableCss` with its asset() placeholders substituted from
|
|
698
|
+
* the current asset map. Derived on every read, so it always matches
|
|
699
|
+
* `system`, however and whenever that was assigned; `system` keeps the
|
|
700
|
+
* placeholders for the next asset pass. */
|
|
701
|
+
get variableCss() {
|
|
702
|
+
return (0, _animus_ui_extract_pipeline.substituteAssetPlaceholders)(this.system.variableCss, this.assetUrlBySpecifier);
|
|
703
|
+
}
|
|
704
|
+
/** Substitutes the analysis sheets in place; the theme's variable CSS is
|
|
705
|
+
* substituted on read (`variableCss`). */
|
|
706
|
+
substituteSheets() {
|
|
707
|
+
this.globalCss = (0, _animus_ui_extract_pipeline.substituteAssetPlaceholders)(this.globalCss, this.assetUrlBySpecifier);
|
|
708
|
+
this.resolvedComponentCss = (0, _animus_ui_extract_pipeline.substituteAssetPlaceholders)(this.resolvedComponentCss, this.assetUrlBySpecifier);
|
|
709
|
+
}
|
|
696
710
|
/** Resolves asset specifiers a system reload introduced. Node-side only —
|
|
697
711
|
* the plugin hook context is unavailable here, so results can differ. */
|
|
698
712
|
applyAssetSubstitutions() {
|
|
699
|
-
if (!this.isProd && this.assetPassComplete) for (const specifier of
|
|
713
|
+
if (!this.isProd && this.assetPassComplete) for (const specifier of this.sheetAssetSpecifiers()) {
|
|
700
714
|
if (this.assetResolutionFailures.delete(specifier)) this.assetUrlBySpecifier.delete(specifier);
|
|
701
715
|
if (this.assetUrlBySpecifier.has(specifier)) continue;
|
|
702
716
|
const resolved = (0, _animus_ui_extract_pipeline.resolveAssetFile)(specifier, this.rootDir, this.pathAliasesJson);
|
|
703
717
|
if (resolved) this.assetUrlBySpecifier.set(specifier, this.devFsUrl(resolved));
|
|
704
718
|
else this.assetFallback(specifier, `[animus-extract] unresolvable asset() specifier: ${specifier}`);
|
|
705
719
|
}
|
|
706
|
-
this.
|
|
720
|
+
this.substituteSheets();
|
|
707
721
|
}
|
|
708
722
|
resetCoalescer = null;
|
|
709
723
|
requestSystemReload(trigger) {
|
|
@@ -803,7 +817,7 @@ var PluginContext = class {
|
|
|
803
817
|
runSelfVerify() {
|
|
804
818
|
const failures = (0, _animus_ui_extract_pipeline.runStructuralSelfCheck)({
|
|
805
819
|
componentCount: Object.keys(this.storedManifest?.components ?? {}).length,
|
|
806
|
-
variableCss: this.
|
|
820
|
+
variableCss: this.variableCss,
|
|
807
821
|
globalCss: this.globalCss,
|
|
808
822
|
componentCss: this.resolvedComponentCss,
|
|
809
823
|
layers: this.options.layers,
|
|
@@ -1227,7 +1241,6 @@ async function analyzeChangedFile(ctx, file, absFile, read) {
|
|
|
1227
1241
|
])].filter((defFile) => (0, path.resolve)(ctx.rootDir, defFile) !== absFile);
|
|
1228
1242
|
const hmrMs = Math.round(performance.now() - hmrStart);
|
|
1229
1243
|
ctx.log(`HMR update: ${relPath} — analysis ${analysisMs}ms, total ${hmrMs}ms${presentationOnly ? " (presentation-only)" : ""}`);
|
|
1230
|
-
ctx.logTimingWaterfall(ctx.storedManifest?.timing ?? {});
|
|
1231
1244
|
return {
|
|
1232
1245
|
kind: "analyzed",
|
|
1233
1246
|
staleDefinitionFiles,
|
|
@@ -1353,34 +1366,42 @@ function loadVirtualModule(ctx, id) {
|
|
|
1353
1366
|
targets: ctx.lcssTargets,
|
|
1354
1367
|
warnFn: (msg) => ctx.warn(msg)
|
|
1355
1368
|
};
|
|
1369
|
+
const checked = (css) => {
|
|
1370
|
+
(0, _animus_ui_extract_pipeline.reportSurvivingAssetPlaceholders)(css, {
|
|
1371
|
+
strict: ctx.options.strict,
|
|
1372
|
+
warn: (message) => ctx.warn(message),
|
|
1373
|
+
prefix: "[animus-extract]"
|
|
1374
|
+
});
|
|
1375
|
+
return css;
|
|
1376
|
+
};
|
|
1356
1377
|
if (id === RESOLVED_CSS_ID) {
|
|
1357
1378
|
if (!ctx.isProd && ctx.storedSheets) {
|
|
1358
1379
|
const { variables, body } = (0, _animus_ui_extract_pipeline.assembleStylesheet)({
|
|
1359
1380
|
layers: ctx.options.layers,
|
|
1360
|
-
variableCss: ctx.
|
|
1381
|
+
variableCss: ctx.variableCss,
|
|
1361
1382
|
globalCss: ctx.globalCss,
|
|
1362
1383
|
split: true
|
|
1363
1384
|
});
|
|
1364
|
-
return [variables, (0, _animus_ui_extract_pipeline.postProcessCss)(body, {
|
|
1385
|
+
return checked([variables, (0, _animus_ui_extract_pipeline.postProcessCss)(body, {
|
|
1365
1386
|
...lcssOpts,
|
|
1366
1387
|
minify: false
|
|
1367
|
-
})].filter(Boolean).join("\n");
|
|
1388
|
+
})].filter(Boolean).join("\n"));
|
|
1368
1389
|
}
|
|
1369
1390
|
const { variables, body } = (0, _animus_ui_extract_pipeline.assembleStylesheet)({
|
|
1370
1391
|
layers: ctx.options.layers,
|
|
1371
|
-
variableCss: ctx.
|
|
1392
|
+
variableCss: ctx.variableCss,
|
|
1372
1393
|
globalCss: ctx.globalCss,
|
|
1373
1394
|
componentCss: ctx.resolvedComponentCss,
|
|
1374
1395
|
split: true
|
|
1375
1396
|
});
|
|
1376
|
-
return [variables, (0, _animus_ui_extract_pipeline.postProcessCss)(body, lcssOpts)].filter(Boolean).join("\n");
|
|
1397
|
+
return checked([variables, (0, _animus_ui_extract_pipeline.postProcessCss)(body, lcssOpts)].filter(Boolean).join("\n"));
|
|
1377
1398
|
}
|
|
1378
1399
|
if (id === RESOLVED_COMPONENTS_ID) {
|
|
1379
1400
|
const strippedCss = (0, _animus_ui_extract_pipeline.stripLeadingLayerDeclaration)(ctx.resolvedComponentCss || "");
|
|
1380
|
-
return `export default \`${(0, _animus_ui_extract_pipeline.postProcessCss)(strippedCss, {
|
|
1401
|
+
return `export default \`${checked((0, _animus_ui_extract_pipeline.postProcessCss)(strippedCss, {
|
|
1381
1402
|
...lcssOpts,
|
|
1382
1403
|
minify: false
|
|
1383
|
-
}).replace(/\\/g, "\\\\").replace(/`/g, "\\`").replace(/\$/g, "\\$")}\`;`;
|
|
1404
|
+
})).replace(/\\/g, "\\\\").replace(/`/g, "\\`").replace(/\$/g, "\\$")}\`;`;
|
|
1384
1405
|
}
|
|
1385
1406
|
if (id === RESOLVED_BRIDGE_ID) {
|
|
1386
1407
|
const sheetHash = sheetRegistryHash(ctx);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"virtual-modules.d.ts","sourceRoot":"","sources":["../src/virtual-modules.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"virtual-modules.d.ts","sourceRoot":"","sources":["../src/virtual-modules.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAa/C,wBAAgB,gBAAgB,CAC9B,GAAG,EAAE,aAAa,EAClB,EAAE,EAAE,MAAM,GACT,MAAM,GAAG,IAAI,CAYf;AAED,wBAAgB,iBAAiB,CAC/B,GAAG,EAAE,aAAa,EAClB,EAAE,EAAE,MAAM,GACT,MAAM,GAAG,IAAI,CA+Gf"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@animus-ui/vite-plugin",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.19",
|
|
4
4
|
"description": "Animus static CSS extraction Vite plugin",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"animus",
|
|
@@ -39,12 +39,12 @@
|
|
|
39
39
|
"compile": "tsc --noEmit"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@animus-ui/extract": "0.1.
|
|
42
|
+
"@animus-ui/extract": "0.1.19",
|
|
43
43
|
"browserslist": "^4.28.8",
|
|
44
44
|
"lightningcss": "^1.33.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@animus-ui/assertions": "0.1.
|
|
47
|
+
"@animus-ui/assertions": "0.1.19"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
50
|
"@mdx-js/mdx": "^3.0.0",
|