@pikacss/core 0.0.25 → 0.0.26

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
@@ -1014,6 +1014,8 @@ async function _renderPreflight({
1014
1014
  blocks = /* @__PURE__ */ new Map()
1015
1015
  }) {
1016
1016
  for (const [selector, propertiesOrDefinition] of Object.entries(preflightDefinition)) {
1017
+ if (propertiesOrDefinition == null)
1018
+ continue;
1017
1019
  const selectors2 = normalizeSelectors({
1018
1020
  selectors: await hooks.transformSelectors(engine.config.plugins, [selector]),
1019
1021
  defaultSelector: ""
@@ -1038,6 +1040,7 @@ async function _renderPreflight({
1038
1040
  }
1039
1041
  } else {
1040
1042
  currentBlockBody.children ||= /* @__PURE__ */ new Map();
1043
+ currentBlockBody.children.set(k, currentBlockBody.children.get(k) || { properties: [] });
1041
1044
  _renderPreflight({
1042
1045
  engine,
1043
1046
  preflightDefinition: v,
package/dist/index.d.cts CHANGED
@@ -358,9 +358,9 @@ interface EnginePlugin extends EnginePluginHooksOptions {
358
358
  }
359
359
  declare function defineEnginePlugin(plugin: EnginePlugin): EnginePlugin;
360
360
 
361
- interface PreflightDefinition {
362
- [selector: UnionString | ResolvedSelector]: ResolvedProperties | PreflightDefinition;
363
- }
361
+ type PreflightDefinition = {
362
+ [selector in UnionString | ResolvedSelector]?: ResolvedProperties | PreflightDefinition;
363
+ };
364
364
  type PreflightFn = (engine: Engine, isFormatted: boolean) => string | PreflightDefinition;
365
365
  /**
366
366
  * PreflightConfig can be a string or a function that returns a string.
package/dist/index.d.mts CHANGED
@@ -358,9 +358,9 @@ interface EnginePlugin extends EnginePluginHooksOptions {
358
358
  }
359
359
  declare function defineEnginePlugin(plugin: EnginePlugin): EnginePlugin;
360
360
 
361
- interface PreflightDefinition {
362
- [selector: UnionString | ResolvedSelector]: ResolvedProperties | PreflightDefinition;
363
- }
361
+ type PreflightDefinition = {
362
+ [selector in UnionString | ResolvedSelector]?: ResolvedProperties | PreflightDefinition;
363
+ };
364
364
  type PreflightFn = (engine: Engine, isFormatted: boolean) => string | PreflightDefinition;
365
365
  /**
366
366
  * PreflightConfig can be a string or a function that returns a string.
package/dist/index.d.ts CHANGED
@@ -358,9 +358,9 @@ interface EnginePlugin extends EnginePluginHooksOptions {
358
358
  }
359
359
  declare function defineEnginePlugin(plugin: EnginePlugin): EnginePlugin;
360
360
 
361
- interface PreflightDefinition {
362
- [selector: UnionString | ResolvedSelector]: ResolvedProperties | PreflightDefinition;
363
- }
361
+ type PreflightDefinition = {
362
+ [selector in UnionString | ResolvedSelector]?: ResolvedProperties | PreflightDefinition;
363
+ };
364
364
  type PreflightFn = (engine: Engine, isFormatted: boolean) => string | PreflightDefinition;
365
365
  /**
366
366
  * PreflightConfig can be a string or a function that returns a string.
package/dist/index.mjs CHANGED
@@ -1012,6 +1012,8 @@ async function _renderPreflight({
1012
1012
  blocks = /* @__PURE__ */ new Map()
1013
1013
  }) {
1014
1014
  for (const [selector, propertiesOrDefinition] of Object.entries(preflightDefinition)) {
1015
+ if (propertiesOrDefinition == null)
1016
+ continue;
1015
1017
  const selectors2 = normalizeSelectors({
1016
1018
  selectors: await hooks.transformSelectors(engine.config.plugins, [selector]),
1017
1019
  defaultSelector: ""
@@ -1036,6 +1038,7 @@ async function _renderPreflight({
1036
1038
  }
1037
1039
  } else {
1038
1040
  currentBlockBody.children ||= /* @__PURE__ */ new Map();
1041
+ currentBlockBody.children.set(k, currentBlockBody.children.get(k) || { properties: [] });
1039
1042
  _renderPreflight({
1040
1043
  engine,
1041
1044
  preflightDefinition: v,
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "0.0.25",
7
+ "version": "0.0.26",
8
8
  "author": "DevilTea <ch19980814@gmail.com>",
9
9
  "license": "MIT",
10
10
  "repository": {