@animus-ui/next-plugin 0.1.0-next.63 → 0.1.0
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/index.cjs +55 -18
- package/dist/index.mjs +55 -18
- package/dist/loader.cjs +1 -1
- package/dist/loader.d.ts.map +1 -1
- package/dist/loader.mjs +1 -1
- package/dist/plugin.d.ts +0 -4
- package/dist/plugin.d.ts.map +1 -1
- package/dist/singleton.d.ts +0 -1
- package/dist/singleton.d.ts.map +1 -1
- package/dist/types.d.ts +10 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/with-animus.d.ts.map +1 -1
- package/package.json +31 -25
package/dist/index.cjs
CHANGED
|
@@ -3,8 +3,8 @@ const require_singleton = require("./singleton-Cyu9XArN.cjs");
|
|
|
3
3
|
let fs = require("fs");
|
|
4
4
|
let path = require("path");
|
|
5
5
|
let url = require("url");
|
|
6
|
-
let crypto = require("crypto");
|
|
7
6
|
let _animus_ui_extract_pipeline = require("@animus-ui/extract/pipeline");
|
|
7
|
+
let crypto = require("crypto");
|
|
8
8
|
//#region src/plugin.ts
|
|
9
9
|
const PLUGIN_NAME = "AnimusWebpackPlugin";
|
|
10
10
|
var AnimusWebpackPlugin = class {
|
|
@@ -197,12 +197,20 @@ var AnimusWebpackPlugin = class {
|
|
|
197
197
|
".next",
|
|
198
198
|
".animus"
|
|
199
199
|
];
|
|
200
|
-
const
|
|
200
|
+
const extensionsSet = new Set(this.options.extensions ?? _animus_ui_extract_pipeline.DEFAULT_EXTENSIONS);
|
|
201
|
+
const shouldHandleMdx = extensionsSet.has(".mdx");
|
|
202
|
+
const files = this.discoverFiles(rootDir, rootDir, excludePatterns, extensionsSet);
|
|
201
203
|
const changedPaths = [];
|
|
202
204
|
for (const filePath of files) {
|
|
203
|
-
|
|
205
|
+
let relPath = (0, path.relative)(rootDir, filePath);
|
|
206
|
+
let source = (0, fs.readFileSync)(filePath, "utf-8");
|
|
207
|
+
if (shouldHandleMdx && (0, path.extname)(filePath) === ".mdx") {
|
|
208
|
+
const result = await (0, _animus_ui_extract_pipeline.preprocessMdx)(source, relPath);
|
|
209
|
+
if (result.kind !== "ok") continue;
|
|
210
|
+
source = result.source;
|
|
211
|
+
relPath = relPath + ".tsx";
|
|
212
|
+
}
|
|
204
213
|
const cached = this.fileCache.get(relPath);
|
|
205
|
-
const source = (0, fs.readFileSync)(filePath, "utf-8");
|
|
206
214
|
const hash = (0, crypto.createHash)("md5").update(source).digest("hex");
|
|
207
215
|
if (!cached || cached.hash !== hash) {
|
|
208
216
|
changedPaths.push(relPath);
|
|
@@ -241,13 +249,32 @@ var AnimusWebpackPlugin = class {
|
|
|
241
249
|
".next",
|
|
242
250
|
".animus"
|
|
243
251
|
];
|
|
244
|
-
const
|
|
252
|
+
const extensionsSet = new Set(this.options.extensions ?? _animus_ui_extract_pipeline.DEFAULT_EXTENSIONS);
|
|
253
|
+
const shouldHandleMdx = extensionsSet.has(".mdx");
|
|
254
|
+
let mdxMissingDepWarned = false;
|
|
255
|
+
const files = this.discoverFiles(rootDir, rootDir, excludePatterns, extensionsSet);
|
|
245
256
|
bt.fileDiscovery = this.elapsed(t);
|
|
246
257
|
t = this.now();
|
|
247
258
|
const fileEntries = [];
|
|
248
259
|
for (const filePath of files) {
|
|
249
|
-
|
|
250
|
-
|
|
260
|
+
let source = (0, fs.readFileSync)(filePath, "utf-8");
|
|
261
|
+
let relPath = (0, path.relative)(rootDir, filePath);
|
|
262
|
+
if (shouldHandleMdx && (0, path.extname)(filePath) === ".mdx") {
|
|
263
|
+
const result = await (0, _animus_ui_extract_pipeline.preprocessMdx)(source, relPath);
|
|
264
|
+
if (result.kind === "missing-dep") {
|
|
265
|
+
if (!mdxMissingDepWarned) {
|
|
266
|
+
console.warn("[animus] ⚠ .mdx in extensions but @mdx-js/mdx not installed; MDX files skipped");
|
|
267
|
+
mdxMissingDepWarned = true;
|
|
268
|
+
}
|
|
269
|
+
continue;
|
|
270
|
+
}
|
|
271
|
+
if (result.kind === "error") {
|
|
272
|
+
console.warn(`[animus] ⚠ MDX preprocessing failed for ${relPath}: ${result.error}`);
|
|
273
|
+
continue;
|
|
274
|
+
}
|
|
275
|
+
source = result.source;
|
|
276
|
+
relPath = relPath + ".tsx";
|
|
277
|
+
}
|
|
251
278
|
const hash = (0, crypto.createHash)("md5").update(source).digest("hex");
|
|
252
279
|
this.fileCache.set(relPath, {
|
|
253
280
|
hash,
|
|
@@ -283,11 +310,27 @@ var AnimusWebpackPlugin = class {
|
|
|
283
310
|
packageMap[specifier] = (0, path.relative)(rootDir, srcEntry);
|
|
284
311
|
this.externalSourceEntries.set(specifier, srcEntry);
|
|
285
312
|
}
|
|
286
|
-
const pkgFiles = this.discoverFiles(srcDir, rootDir, excludePatternsForPkgs);
|
|
313
|
+
const pkgFiles = this.discoverFiles(srcDir, rootDir, excludePatternsForPkgs, extensionsSet);
|
|
287
314
|
for (const pkgFile of pkgFiles) {
|
|
288
|
-
|
|
315
|
+
let pkgRelPath = (0, path.relative)(rootDir, pkgFile);
|
|
289
316
|
if (!fileEntries.some((e) => e.path === pkgRelPath)) try {
|
|
290
|
-
|
|
317
|
+
let pkgSource = (0, fs.readFileSync)(pkgFile, "utf-8");
|
|
318
|
+
if (shouldHandleMdx && (0, path.extname)(pkgFile) === ".mdx") {
|
|
319
|
+
const result = await (0, _animus_ui_extract_pipeline.preprocessMdx)(pkgSource, pkgRelPath);
|
|
320
|
+
if (result.kind === "missing-dep") {
|
|
321
|
+
if (!mdxMissingDepWarned) {
|
|
322
|
+
console.warn("[animus] ⚠ .mdx in extensions but @mdx-js/mdx not installed; MDX files skipped");
|
|
323
|
+
mdxMissingDepWarned = true;
|
|
324
|
+
}
|
|
325
|
+
continue;
|
|
326
|
+
}
|
|
327
|
+
if (result.kind === "error") {
|
|
328
|
+
console.warn(`[animus] ⚠ MDX preprocessing failed for ${pkgRelPath}: ${result.error}`);
|
|
329
|
+
continue;
|
|
330
|
+
}
|
|
331
|
+
pkgSource = result.source;
|
|
332
|
+
pkgRelPath = pkgRelPath + ".tsx";
|
|
333
|
+
}
|
|
291
334
|
const pkgHash = (0, crypto.createHash)("md5").update(pkgSource).digest("hex");
|
|
292
335
|
this.fileCache.set(pkgRelPath, {
|
|
293
336
|
hash: pkgHash,
|
|
@@ -388,14 +431,8 @@ var AnimusWebpackPlugin = class {
|
|
|
388
431
|
this.globalStyleBlocksJson = config.globalStyleBlocks || null;
|
|
389
432
|
this.keyframesBlocksJson = config.keyframesBlocks || null;
|
|
390
433
|
}
|
|
391
|
-
discoverFiles(dir, rootDir, excludePatterns) {
|
|
434
|
+
discoverFiles(dir, rootDir, excludePatterns, extensionsSet) {
|
|
392
435
|
const results = [];
|
|
393
|
-
const extensions = new Set([
|
|
394
|
-
".ts",
|
|
395
|
-
".tsx",
|
|
396
|
-
".js",
|
|
397
|
-
".jsx"
|
|
398
|
-
]);
|
|
399
436
|
const walk = (currentDir) => {
|
|
400
437
|
let entries;
|
|
401
438
|
try {
|
|
@@ -414,7 +451,7 @@ var AnimusWebpackPlugin = class {
|
|
|
414
451
|
continue;
|
|
415
452
|
}
|
|
416
453
|
if (stat.isDirectory()) walk(fullPath);
|
|
417
|
-
else if (
|
|
454
|
+
else if (extensionsSet.has((0, path.extname)(entry))) results.push(fullPath);
|
|
418
455
|
}
|
|
419
456
|
};
|
|
420
457
|
walk(dir);
|
package/dist/index.mjs
CHANGED
|
@@ -2,8 +2,8 @@ import { a as getSharedExternalEntries, c as setManifestJson, d as setSharedExte
|
|
|
2
2
|
import { existsSync, mkdirSync, readFileSync, readdirSync, statSync, writeFileSync } from "fs";
|
|
3
3
|
import { dirname, extname, join, relative, resolve, sep } from "path";
|
|
4
4
|
import { fileURLToPath } from "url";
|
|
5
|
+
import { DEFAULT_EXTENSIONS, applyPrefix, applyUnitFallback, assembleStylesheet, extractSystemFilePackages, preprocessMdx } from "@animus-ui/extract/pipeline";
|
|
5
6
|
import { createHash } from "crypto";
|
|
6
|
-
import { applyPrefix, applyUnitFallback, assembleStylesheet, extractSystemFilePackages } from "@animus-ui/extract/pipeline";
|
|
7
7
|
//#region src/plugin.ts
|
|
8
8
|
const PLUGIN_NAME = "AnimusWebpackPlugin";
|
|
9
9
|
var AnimusWebpackPlugin = class {
|
|
@@ -196,12 +196,20 @@ var AnimusWebpackPlugin = class {
|
|
|
196
196
|
".next",
|
|
197
197
|
".animus"
|
|
198
198
|
];
|
|
199
|
-
const
|
|
199
|
+
const extensionsSet = new Set(this.options.extensions ?? DEFAULT_EXTENSIONS);
|
|
200
|
+
const shouldHandleMdx = extensionsSet.has(".mdx");
|
|
201
|
+
const files = this.discoverFiles(rootDir, rootDir, excludePatterns, extensionsSet);
|
|
200
202
|
const changedPaths = [];
|
|
201
203
|
for (const filePath of files) {
|
|
202
|
-
|
|
204
|
+
let relPath = relative(rootDir, filePath);
|
|
205
|
+
let source = readFileSync(filePath, "utf-8");
|
|
206
|
+
if (shouldHandleMdx && extname(filePath) === ".mdx") {
|
|
207
|
+
const result = await preprocessMdx(source, relPath);
|
|
208
|
+
if (result.kind !== "ok") continue;
|
|
209
|
+
source = result.source;
|
|
210
|
+
relPath = relPath + ".tsx";
|
|
211
|
+
}
|
|
203
212
|
const cached = this.fileCache.get(relPath);
|
|
204
|
-
const source = readFileSync(filePath, "utf-8");
|
|
205
213
|
const hash = createHash("md5").update(source).digest("hex");
|
|
206
214
|
if (!cached || cached.hash !== hash) {
|
|
207
215
|
changedPaths.push(relPath);
|
|
@@ -240,13 +248,32 @@ var AnimusWebpackPlugin = class {
|
|
|
240
248
|
".next",
|
|
241
249
|
".animus"
|
|
242
250
|
];
|
|
243
|
-
const
|
|
251
|
+
const extensionsSet = new Set(this.options.extensions ?? DEFAULT_EXTENSIONS);
|
|
252
|
+
const shouldHandleMdx = extensionsSet.has(".mdx");
|
|
253
|
+
let mdxMissingDepWarned = false;
|
|
254
|
+
const files = this.discoverFiles(rootDir, rootDir, excludePatterns, extensionsSet);
|
|
244
255
|
bt.fileDiscovery = this.elapsed(t);
|
|
245
256
|
t = this.now();
|
|
246
257
|
const fileEntries = [];
|
|
247
258
|
for (const filePath of files) {
|
|
248
|
-
|
|
249
|
-
|
|
259
|
+
let source = readFileSync(filePath, "utf-8");
|
|
260
|
+
let relPath = relative(rootDir, filePath);
|
|
261
|
+
if (shouldHandleMdx && extname(filePath) === ".mdx") {
|
|
262
|
+
const result = await preprocessMdx(source, relPath);
|
|
263
|
+
if (result.kind === "missing-dep") {
|
|
264
|
+
if (!mdxMissingDepWarned) {
|
|
265
|
+
console.warn("[animus] ⚠ .mdx in extensions but @mdx-js/mdx not installed; MDX files skipped");
|
|
266
|
+
mdxMissingDepWarned = true;
|
|
267
|
+
}
|
|
268
|
+
continue;
|
|
269
|
+
}
|
|
270
|
+
if (result.kind === "error") {
|
|
271
|
+
console.warn(`[animus] ⚠ MDX preprocessing failed for ${relPath}: ${result.error}`);
|
|
272
|
+
continue;
|
|
273
|
+
}
|
|
274
|
+
source = result.source;
|
|
275
|
+
relPath = relPath + ".tsx";
|
|
276
|
+
}
|
|
250
277
|
const hash = createHash("md5").update(source).digest("hex");
|
|
251
278
|
this.fileCache.set(relPath, {
|
|
252
279
|
hash,
|
|
@@ -282,11 +309,27 @@ var AnimusWebpackPlugin = class {
|
|
|
282
309
|
packageMap[specifier] = relative(rootDir, srcEntry);
|
|
283
310
|
this.externalSourceEntries.set(specifier, srcEntry);
|
|
284
311
|
}
|
|
285
|
-
const pkgFiles = this.discoverFiles(srcDir, rootDir, excludePatternsForPkgs);
|
|
312
|
+
const pkgFiles = this.discoverFiles(srcDir, rootDir, excludePatternsForPkgs, extensionsSet);
|
|
286
313
|
for (const pkgFile of pkgFiles) {
|
|
287
|
-
|
|
314
|
+
let pkgRelPath = relative(rootDir, pkgFile);
|
|
288
315
|
if (!fileEntries.some((e) => e.path === pkgRelPath)) try {
|
|
289
|
-
|
|
316
|
+
let pkgSource = readFileSync(pkgFile, "utf-8");
|
|
317
|
+
if (shouldHandleMdx && extname(pkgFile) === ".mdx") {
|
|
318
|
+
const result = await preprocessMdx(pkgSource, pkgRelPath);
|
|
319
|
+
if (result.kind === "missing-dep") {
|
|
320
|
+
if (!mdxMissingDepWarned) {
|
|
321
|
+
console.warn("[animus] ⚠ .mdx in extensions but @mdx-js/mdx not installed; MDX files skipped");
|
|
322
|
+
mdxMissingDepWarned = true;
|
|
323
|
+
}
|
|
324
|
+
continue;
|
|
325
|
+
}
|
|
326
|
+
if (result.kind === "error") {
|
|
327
|
+
console.warn(`[animus] ⚠ MDX preprocessing failed for ${pkgRelPath}: ${result.error}`);
|
|
328
|
+
continue;
|
|
329
|
+
}
|
|
330
|
+
pkgSource = result.source;
|
|
331
|
+
pkgRelPath = pkgRelPath + ".tsx";
|
|
332
|
+
}
|
|
290
333
|
const pkgHash = createHash("md5").update(pkgSource).digest("hex");
|
|
291
334
|
this.fileCache.set(pkgRelPath, {
|
|
292
335
|
hash: pkgHash,
|
|
@@ -387,14 +430,8 @@ var AnimusWebpackPlugin = class {
|
|
|
387
430
|
this.globalStyleBlocksJson = config.globalStyleBlocks || null;
|
|
388
431
|
this.keyframesBlocksJson = config.keyframesBlocks || null;
|
|
389
432
|
}
|
|
390
|
-
discoverFiles(dir, rootDir, excludePatterns) {
|
|
433
|
+
discoverFiles(dir, rootDir, excludePatterns, extensionsSet) {
|
|
391
434
|
const results = [];
|
|
392
|
-
const extensions = new Set([
|
|
393
|
-
".ts",
|
|
394
|
-
".tsx",
|
|
395
|
-
".js",
|
|
396
|
-
".jsx"
|
|
397
|
-
]);
|
|
398
435
|
const walk = (currentDir) => {
|
|
399
436
|
let entries;
|
|
400
437
|
try {
|
|
@@ -413,7 +450,7 @@ var AnimusWebpackPlugin = class {
|
|
|
413
450
|
continue;
|
|
414
451
|
}
|
|
415
452
|
if (stat.isDirectory()) walk(fullPath);
|
|
416
|
-
else if (
|
|
453
|
+
else if (extensionsSet.has(extname(entry))) results.push(fullPath);
|
|
417
454
|
}
|
|
418
455
|
};
|
|
419
456
|
walk(dir);
|
package/dist/loader.cjs
CHANGED
|
@@ -46,7 +46,7 @@ function animusLoader(source) {
|
|
|
46
46
|
return code;
|
|
47
47
|
} catch (e) {
|
|
48
48
|
const msg = e instanceof Error ? e.message : String(e);
|
|
49
|
-
if ((this.getOptions?.() ?? {}).strict) throw new Error(`[animus-extract] Transform failed for ${filename}: ${msg}
|
|
49
|
+
if ((this.getOptions?.() ?? {}).strict) throw new Error(`[animus-extract] Transform failed for ${filename}: ${msg}`, { cause: e });
|
|
50
50
|
console.warn(`[animus-extract] Transform failed for ${filename}:`, msg);
|
|
51
51
|
return source;
|
|
52
52
|
}
|
package/dist/loader.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../src/loader.ts"],"names":[],"mappings":"AAIA,KAAK,aAAa,GAAG;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM;QAAE,MAAM,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;CACxC,CAAC;AAuBF;;;;;;;;;GASG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,IAAI,EAAE,aAAa,EACnB,MAAM,EAAE,MAAM,GACb,MAAM,
|
|
1
|
+
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../src/loader.ts"],"names":[],"mappings":"AAIA,KAAK,aAAa,GAAG;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM;QAAE,MAAM,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;CACxC,CAAC;AAuBF;;;;;;;;;GASG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,IAAI,EAAE,aAAa,EACnB,MAAM,EAAE,MAAM,GACb,MAAM,CA0CR"}
|
package/dist/loader.mjs
CHANGED
|
@@ -46,7 +46,7 @@ function animusLoader(source) {
|
|
|
46
46
|
return code;
|
|
47
47
|
} catch (e) {
|
|
48
48
|
const msg = e instanceof Error ? e.message : String(e);
|
|
49
|
-
if ((this.getOptions?.() ?? {}).strict) throw new Error(`[animus-extract] Transform failed for ${filename}: ${msg}
|
|
49
|
+
if ((this.getOptions?.() ?? {}).strict) throw new Error(`[animus-extract] Transform failed for ${filename}: ${msg}`, { cause: e });
|
|
50
50
|
console.warn(`[animus-extract] Transform failed for ${filename}:`, msg);
|
|
51
51
|
return source;
|
|
52
52
|
}
|
package/dist/plugin.d.ts
CHANGED
|
@@ -89,10 +89,6 @@ export declare class AnimusWebpackPlugin {
|
|
|
89
89
|
* empty source + hash for unchanged (Rust cache-hit path skips these).
|
|
90
90
|
*/
|
|
91
91
|
private buildFileEntriesFromCache;
|
|
92
|
-
/**
|
|
93
|
-
* Run incremental pipeline with cache-aware file entries.
|
|
94
|
-
* Reuses system config from the last full pipeline run.
|
|
95
|
-
*/
|
|
96
92
|
private runIncrementalPipeline;
|
|
97
93
|
/** Expose file cache for HMR change detection */
|
|
98
94
|
getFileCache(): Map<string, {
|
package/dist/plugin.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAiCA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjD,KAAK,aAAa,GAAG;IACnB,MAAM,IAAI,MAAM,GAAG,MAAM,CAAC;IAC1B,IAAI,IAAI,MAAM,CAAC;CAChB,CAAC;AAEF,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE;QACL,aAAa,EAAE;YACb,GAAG,EAAE,CACH,OAAO,EAAE;gBAAE,IAAI,EAAE,MAAM,CAAC;gBAAC,KAAK,EAAE,MAAM,CAAA;aAAE,EACxC,EAAE,EAAE,CAAC,MAAM,EAAE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AM,EAAE,MAAM,CAAA;KAAE,CAAC,CAE5D;IAED,oCAAoC;IACpC,UAAU,IAAI,iBAAiB,CAE9B;IAED;mFAC+E;IAC/E,sBAAsB,IAAI,MAAM,EAAE,CAIjC;IAED;mFAC+E;IAC/E,wBAAwB,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAI9C;CACF"}
|
package/dist/singleton.d.ts
CHANGED
|
@@ -12,7 +12,6 @@ export declare function setAnalysisPromise(promise: Promise<void>): void;
|
|
|
12
12
|
export declare function resetAnalysisPromise(): void;
|
|
13
13
|
export declare function getSharedCss(): string;
|
|
14
14
|
export declare function setSharedCss(css: string): void;
|
|
15
|
-
export declare function getSharedSystemProps(): string;
|
|
16
15
|
export declare function setSharedSystemProps(content: string): void;
|
|
17
16
|
export declare function getSharedExternalDirs(): string[];
|
|
18
17
|
export declare function setSharedExternalDirs(dirs: string[]): void;
|
package/dist/singleton.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"singleton.d.ts","sourceRoot":"","sources":["../src/singleton.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AASH,wBAAgB,eAAe,IAAI,MAAM,GAAG,IAAI,CAE/C;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAElD;AAED,wBAAgB,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAIzD;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAE/D;AAED,wBAAgB,oBAAoB,IAAI,IAAI,CAE3C;AAED,wBAAgB,YAAY,IAAI,MAAM,CAIrC;AAED,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAE9C;AAED,wBAAgB,oBAAoB,
|
|
1
|
+
{"version":3,"file":"singleton.d.ts","sourceRoot":"","sources":["../src/singleton.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AASH,wBAAgB,eAAe,IAAI,MAAM,GAAG,IAAI,CAE/C;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAElD;AAED,wBAAgB,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAIzD;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAE/D;AAED,wBAAgB,oBAAoB,IAAI,IAAI,CAE3C;AAED,wBAAgB,YAAY,IAAI,MAAM,CAIrC;AAED,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAE9C;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAE1D;AAED,wBAAgB,qBAAqB,IAAI,MAAM,EAAE,CAMhD;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI,CAE1D;AAED,wBAAgB,wBAAwB,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAM9D;AAED,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAG3E"}
|
package/dist/types.d.ts
CHANGED
|
@@ -3,6 +3,16 @@ export interface AnimusNextOptions {
|
|
|
3
3
|
system: string;
|
|
4
4
|
/** Glob patterns to exclude from analysis. */
|
|
5
5
|
exclude?: string[];
|
|
6
|
+
/**
|
|
7
|
+
* File extensions to scan for component definitions and JSX usages.
|
|
8
|
+
* Replaces the default list entirely (not additive). Include `.mdx` to
|
|
9
|
+
* extract components rendered from MDX files — `@mdx-js/mdx` must be
|
|
10
|
+
* installed as a peer for MDX files to be preprocessed; otherwise the
|
|
11
|
+
* plugin warns once at buildStart and skips them.
|
|
12
|
+
*
|
|
13
|
+
* @default ['.ts', '.tsx', '.js', '.jsx', '.mdx']
|
|
14
|
+
*/
|
|
15
|
+
extensions?: string[];
|
|
6
16
|
/** When true, extraction failures throw instead of warning. */
|
|
7
17
|
strict?: boolean;
|
|
8
18
|
/** Enable verbose logging. */
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAChC,4EAA4E;IAC5E,MAAM,EAAE,MAAM,CAAC;IACf,8CAA8C;IAC9C,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,+DAA+D;IAC/D,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,8BAA8B;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,0DAA0D;IAC1D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAChC,4EAA4E;IAC5E,MAAM,EAAE,MAAM,CAAC;IACf,8CAA8C;IAC9C,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB;;;;;;;;OAQG;IACH,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,+DAA+D;IAC/D,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,8BAA8B;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,0DAA0D;IAC1D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"with-animus.d.ts","sourceRoot":"","sources":["../src/with-animus.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"with-animus.d.ts","sourceRoot":"","sources":["../src/with-animus.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAKjD,KAAK,aAAa,GAAG;IACnB,OAAO,CAAC,EAAE,OAAO,EAAE,CAAC;IACpB,OAAO,CAAC,EAAE;QACR,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;KAChC,CAAC;IACF,MAAM,CAAC,EAAE;QACP,KAAK,CAAC,EAAE,KAAK,CAAC;YACZ,IAAI,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC;YAC5C,OAAO,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC;YAC/C,OAAO,CAAC,EAAE,MAAM,CAAC;YACjB,GAAG,CAAC,EAAE,KAAK,CAAC;gBAAE,MAAM,EAAE,MAAM,CAAC;gBAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;aAAE,CAAC,CAAC;SACpE,CAAC,CAAC;KACJ,CAAC;CACH,CAAC;AAEF,KAAK,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IAC1C,OAAO,CAAC,EAAE,CACR,MAAM,EAAE,aAAa,EACrB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC7B,aAAa,CAAC;CACpB,CAAC;AAIF;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CACxB,OAAO,EAAE,iBAAiB,GACzB,CAAC,UAAU,EAAE,UAAU,KAAK,UAAU,CA+KxC"}
|
package/package.json
CHANGED
|
@@ -1,9 +1,28 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@animus-ui/next-plugin",
|
|
3
|
-
"version": "0.1.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"description": "Animus static CSS extraction for Next.js (webpack)",
|
|
5
|
-
"
|
|
5
|
+
"keywords": [
|
|
6
|
+
"animus",
|
|
7
|
+
"css",
|
|
8
|
+
"css-in-js",
|
|
9
|
+
"next",
|
|
10
|
+
"nextjs",
|
|
11
|
+
"styled",
|
|
12
|
+
"webpack",
|
|
13
|
+
"zero-runtime"
|
|
14
|
+
],
|
|
15
|
+
"homepage": "https://github.com/codecaaron/animus/tree/main/packages/next-plugin#readme",
|
|
6
16
|
"license": "MIT",
|
|
17
|
+
"author": "codecaaron <airrobb@gmail.com>",
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "git+https://github.com/codecaaron/animus",
|
|
21
|
+
"directory": "packages/next-plugin"
|
|
22
|
+
},
|
|
23
|
+
"files": [
|
|
24
|
+
"dist"
|
|
25
|
+
],
|
|
7
26
|
"main": "./dist/index.cjs",
|
|
8
27
|
"module": "./dist/index.mjs",
|
|
9
28
|
"types": "./dist/index.d.ts",
|
|
@@ -21,38 +40,25 @@
|
|
|
21
40
|
"default": "./dist/loader.cjs"
|
|
22
41
|
}
|
|
23
42
|
},
|
|
24
|
-
"files": [
|
|
25
|
-
"dist"
|
|
26
|
-
],
|
|
27
43
|
"publishConfig": {
|
|
28
44
|
"access": "public"
|
|
29
45
|
},
|
|
30
|
-
"homepage": "https://github.com/codecaaron/animus/tree/main/packages/next-plugin#readme",
|
|
31
|
-
"repository": {
|
|
32
|
-
"type": "git",
|
|
33
|
-
"url": "git+https://github.com/codecaaron/animus",
|
|
34
|
-
"directory": "packages/next-plugin"
|
|
35
|
-
},
|
|
36
|
-
"keywords": [
|
|
37
|
-
"next",
|
|
38
|
-
"nextjs",
|
|
39
|
-
"webpack",
|
|
40
|
-
"css",
|
|
41
|
-
"css-in-js",
|
|
42
|
-
"zero-runtime",
|
|
43
|
-
"styled",
|
|
44
|
-
"animus"
|
|
45
|
-
],
|
|
46
46
|
"scripts": {
|
|
47
47
|
"build": "bun run build:ts",
|
|
48
|
-
"build:ts": "tsdown &&
|
|
49
|
-
"compile": "
|
|
48
|
+
"build:ts": "tsdown && tsgo -p tsconfig.build.json",
|
|
49
|
+
"compile": "tsgo --noEmit"
|
|
50
|
+
},
|
|
51
|
+
"dependencies": {
|
|
52
|
+
"@animus-ui/extract": "0.1.0"
|
|
50
53
|
},
|
|
51
54
|
"peerDependencies": {
|
|
55
|
+
"@mdx-js/mdx": "^3.0.0",
|
|
52
56
|
"next": ">=14.0.0",
|
|
53
57
|
"webpack": ">=5.0.0"
|
|
54
58
|
},
|
|
55
|
-
"
|
|
56
|
-
"@
|
|
59
|
+
"peerDependenciesMeta": {
|
|
60
|
+
"@mdx-js/mdx": {
|
|
61
|
+
"optional": true
|
|
62
|
+
}
|
|
57
63
|
}
|
|
58
64
|
}
|