@animus-ui/next-plugin 0.1.0-next.61 → 0.1.0-next.62

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 CHANGED
@@ -20,6 +20,7 @@ var AnimusWebpackPlugin = class {
20
20
  selectorOrderJson = null;
21
21
  globalCss = "";
22
22
  globalStyleBlocksJson = null;
23
+ keyframesBlocksJson = null;
23
24
  pathAliasesJson = null;
24
25
  fileCache = /* @__PURE__ */ new Map();
25
26
  lastCssHash = null;
@@ -317,7 +318,7 @@ var AnimusWebpackPlugin = class {
317
318
  const packageMapJson = JSON.stringify(packageMap);
318
319
  bt.jsonSerialize = this.elapsed(t);
319
320
  t = this.now();
320
- const manifestJson = analyzeProject(fileEntriesJson, this.themeJson, this.variableMapJson, this.contextualVarsJson || null, this.configJson, this.groupRegistryJson, packageMapJson, false, emitterConfig, this.selectorAliasesJson, this.selectorOrderJson, this.globalStyleBlocksJson, this.pathAliasesJson);
321
+ const manifestJson = analyzeProject(fileEntriesJson, this.themeJson, this.variableMapJson, this.contextualVarsJson || null, this.configJson, this.groupRegistryJson, packageMapJson, false, emitterConfig, this.selectorAliasesJson, this.selectorOrderJson, this.globalStyleBlocksJson, this.pathAliasesJson, this.keyframesBlocksJson);
321
322
  bt.rustExtract = this.elapsed(t);
322
323
  t = this.now();
323
324
  const manifest = JSON.parse(manifestJson);
@@ -327,12 +328,18 @@ var AnimusWebpackPlugin = class {
327
328
  this.globalCss = manifest?.sheets?.global || "";
328
329
  let componentCss = manifest?.css || "";
329
330
  componentCss = (0, _animus_ui_extract_pipeline.applyUnitFallback)(componentCss);
330
- const fullCss = (0, _animus_ui_extract_pipeline.assembleStylesheet)({
331
+ const { declaration, variables, body } = (0, _animus_ui_extract_pipeline.assembleStylesheet)({
331
332
  layers: this.options.layers,
332
333
  variableCss: this.variableCss,
333
334
  globalCss: this.globalCss,
334
- componentCss
335
+ componentCss,
336
+ split: true
335
337
  });
338
+ const fullCss = [
339
+ declaration,
340
+ variables,
341
+ body
342
+ ].filter(Boolean).join("\n");
336
343
  require_singleton.setSharedCss(fullCss);
337
344
  const cssHash = (0, crypto.createHash)("md5").update(fullCss).digest("hex");
338
345
  if (cssHash !== this.lastCssHash) {
@@ -379,6 +386,7 @@ var AnimusWebpackPlugin = class {
379
386
  if (prefixed.contextualVarsJson) this.contextualVarsJson = prefixed.contextualVarsJson;
380
387
  }
381
388
  this.globalStyleBlocksJson = config.globalStyleBlocks || null;
389
+ this.keyframesBlocksJson = config.keyframesBlocks || null;
382
390
  }
383
391
  discoverFiles(dir, rootDir, excludePatterns) {
384
392
  const results = [];
@@ -489,7 +497,7 @@ var AnimusWebpackPlugin = class {
489
497
  const fileEntriesJson = JSON.stringify(fileEntries);
490
498
  bt.jsonSerialize = this.elapsed(t);
491
499
  t = this.now();
492
- const manifestJson = analyzeProject(fileEntriesJson, this.themeJson, this.variableMapJson, this.contextualVarsJson || null, this.configJson, this.groupRegistryJson, packageMapJson, true, emitterConfig, this.selectorAliasesJson, this.selectorOrderJson, this.globalStyleBlocksJson, this.pathAliasesJson);
500
+ const manifestJson = analyzeProject(fileEntriesJson, this.themeJson, this.variableMapJson, this.contextualVarsJson || null, this.configJson, this.groupRegistryJson, packageMapJson, true, emitterConfig, this.selectorAliasesJson, this.selectorOrderJson, this.globalStyleBlocksJson, this.pathAliasesJson, this.keyframesBlocksJson);
493
501
  bt.rustExtract = this.elapsed(t);
494
502
  t = this.now();
495
503
  const manifest = JSON.parse(manifestJson);
@@ -497,12 +505,18 @@ var AnimusWebpackPlugin = class {
497
505
  this.globalCss = manifest?.sheets?.global || "";
498
506
  let componentCss = manifest?.css || "";
499
507
  componentCss = (0, _animus_ui_extract_pipeline.applyUnitFallback)(componentCss);
500
- const fullCss = (0, _animus_ui_extract_pipeline.assembleStylesheet)({
508
+ const { declaration: hmrDecl, variables: hmrVars, body: hmrBody } = (0, _animus_ui_extract_pipeline.assembleStylesheet)({
501
509
  layers: this.options.layers,
502
510
  variableCss: this.variableCss,
503
511
  globalCss: this.globalCss,
504
- componentCss
512
+ componentCss,
513
+ split: true
505
514
  });
515
+ const fullCss = [
516
+ hmrDecl,
517
+ hmrVars,
518
+ hmrBody
519
+ ].filter(Boolean).join("\n");
506
520
  require_singleton.setSharedCss(fullCss);
507
521
  const cssHash = (0, crypto.createHash)("md5").update(fullCss).digest("hex");
508
522
  if (cssHash !== this.lastCssHash) {
package/dist/index.mjs CHANGED
@@ -19,6 +19,7 @@ var AnimusWebpackPlugin = class {
19
19
  selectorOrderJson = null;
20
20
  globalCss = "";
21
21
  globalStyleBlocksJson = null;
22
+ keyframesBlocksJson = null;
22
23
  pathAliasesJson = null;
23
24
  fileCache = /* @__PURE__ */ new Map();
24
25
  lastCssHash = null;
@@ -316,7 +317,7 @@ var AnimusWebpackPlugin = class {
316
317
  const packageMapJson = JSON.stringify(packageMap);
317
318
  bt.jsonSerialize = this.elapsed(t);
318
319
  t = this.now();
319
- const manifestJson = analyzeProject(fileEntriesJson, this.themeJson, this.variableMapJson, this.contextualVarsJson || null, this.configJson, this.groupRegistryJson, packageMapJson, false, emitterConfig, this.selectorAliasesJson, this.selectorOrderJson, this.globalStyleBlocksJson, this.pathAliasesJson);
320
+ const manifestJson = analyzeProject(fileEntriesJson, this.themeJson, this.variableMapJson, this.contextualVarsJson || null, this.configJson, this.groupRegistryJson, packageMapJson, false, emitterConfig, this.selectorAliasesJson, this.selectorOrderJson, this.globalStyleBlocksJson, this.pathAliasesJson, this.keyframesBlocksJson);
320
321
  bt.rustExtract = this.elapsed(t);
321
322
  t = this.now();
322
323
  const manifest = JSON.parse(manifestJson);
@@ -326,12 +327,18 @@ var AnimusWebpackPlugin = class {
326
327
  this.globalCss = manifest?.sheets?.global || "";
327
328
  let componentCss = manifest?.css || "";
328
329
  componentCss = applyUnitFallback(componentCss);
329
- const fullCss = assembleStylesheet({
330
+ const { declaration, variables, body } = assembleStylesheet({
330
331
  layers: this.options.layers,
331
332
  variableCss: this.variableCss,
332
333
  globalCss: this.globalCss,
333
- componentCss
334
+ componentCss,
335
+ split: true
334
336
  });
337
+ const fullCss = [
338
+ declaration,
339
+ variables,
340
+ body
341
+ ].filter(Boolean).join("\n");
335
342
  setSharedCss(fullCss);
336
343
  const cssHash = createHash("md5").update(fullCss).digest("hex");
337
344
  if (cssHash !== this.lastCssHash) {
@@ -378,6 +385,7 @@ var AnimusWebpackPlugin = class {
378
385
  if (prefixed.contextualVarsJson) this.contextualVarsJson = prefixed.contextualVarsJson;
379
386
  }
380
387
  this.globalStyleBlocksJson = config.globalStyleBlocks || null;
388
+ this.keyframesBlocksJson = config.keyframesBlocks || null;
381
389
  }
382
390
  discoverFiles(dir, rootDir, excludePatterns) {
383
391
  const results = [];
@@ -488,7 +496,7 @@ var AnimusWebpackPlugin = class {
488
496
  const fileEntriesJson = JSON.stringify(fileEntries);
489
497
  bt.jsonSerialize = this.elapsed(t);
490
498
  t = this.now();
491
- const manifestJson = analyzeProject(fileEntriesJson, this.themeJson, this.variableMapJson, this.contextualVarsJson || null, this.configJson, this.groupRegistryJson, packageMapJson, true, emitterConfig, this.selectorAliasesJson, this.selectorOrderJson, this.globalStyleBlocksJson, this.pathAliasesJson);
499
+ const manifestJson = analyzeProject(fileEntriesJson, this.themeJson, this.variableMapJson, this.contextualVarsJson || null, this.configJson, this.groupRegistryJson, packageMapJson, true, emitterConfig, this.selectorAliasesJson, this.selectorOrderJson, this.globalStyleBlocksJson, this.pathAliasesJson, this.keyframesBlocksJson);
492
500
  bt.rustExtract = this.elapsed(t);
493
501
  t = this.now();
494
502
  const manifest = JSON.parse(manifestJson);
@@ -496,12 +504,18 @@ var AnimusWebpackPlugin = class {
496
504
  this.globalCss = manifest?.sheets?.global || "";
497
505
  let componentCss = manifest?.css || "";
498
506
  componentCss = applyUnitFallback(componentCss);
499
- const fullCss = assembleStylesheet({
507
+ const { declaration: hmrDecl, variables: hmrVars, body: hmrBody } = assembleStylesheet({
500
508
  layers: this.options.layers,
501
509
  variableCss: this.variableCss,
502
510
  globalCss: this.globalCss,
503
- componentCss
511
+ componentCss,
512
+ split: true
504
513
  });
514
+ const fullCss = [
515
+ hmrDecl,
516
+ hmrVars,
517
+ hmrBody
518
+ ].filter(Boolean).join("\n");
505
519
  setSharedCss(fullCss);
506
520
  const cssHash = createHash("md5").update(fullCss).digest("hex");
507
521
  if (cssHash !== this.lastCssHash) {
package/dist/plugin.d.ts CHANGED
@@ -58,6 +58,7 @@ export declare class AnimusWebpackPlugin {
58
58
  private selectorOrderJson;
59
59
  private globalCss;
60
60
  private globalStyleBlocksJson;
61
+ private keyframesBlocksJson;
61
62
  private pathAliasesJson;
62
63
  private fileCache;
63
64
  private lastCssHash;
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AA+BA,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,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,KAAK,IAAI,KAChD,IAAI,CAAC;SACX,CAAC;KACH,CAAC;IACF,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG;QAAE,MAAM,EAAE,aAAa,CAAA;KAAE,GAAG,SAAS,CAAC;IAC9D,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,aAAa,GAAG,IAAI,CAAC;CAC3D,CAAC;AAEF,KAAK,QAAQ,GAAG;IACd,KAAK,EAAE;QACL,GAAG,EAAE;YACH,UAA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AAC,aAAa;IAyCrB,OAAO,CAAC,qBAAqB;IAmD7B;;OAEG;IACH,WAAW,IAAI,IAAI;IAUnB;;;OAGG;IACH,OAAO,CAAC,yBAAyB;IAejC;;;OAGG;YACW,sBAAsB;IAkIpC,iDAAiD;IACjD,YAAY,IAAI,GAAG,CAAC,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAI7D,oCAAoC;IACpC,UAAU,IAAI,iBAAiB;IAI/B;mFAC+E;IAC/E,sBAAsB,IAAI,MAAM,EAAE;IAMlC;mFAC+E;IAC/E,wBAAwB,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC;CAKhD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@animus-ui/next-plugin",
3
- "version": "0.1.0-next.61",
3
+ "version": "0.1.0-next.62",
4
4
  "description": "Animus static CSS extraction for Next.js (webpack)",
5
5
  "author": "codecaaron <airrobb@gmail.com>",
6
6
  "license": "MIT",
@@ -53,6 +53,6 @@
53
53
  "webpack": ">=5.0.0"
54
54
  },
55
55
  "dependencies": {
56
- "@animus-ui/extract": "0.1.0-next.61"
56
+ "@animus-ui/extract": "0.1.0-next.62"
57
57
  }
58
58
  }