@plumeria/core 0.15.5 → 0.15.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/index.js CHANGED
@@ -105,8 +105,18 @@ function props(...objects) {
105
105
  if (typeof require_css.globalPromise_1 === "undefined") require_css.initPromise_1();
106
106
  require_css.resolvePromise_1(uniqueStyleSheets.join(""));
107
107
  if (zss_engine.isTestingDevelopment && !zss_engine.isServer) {
108
- injectedStyleSheets.clear();
109
- for (const { hash, sheet } of [...orderedEntries, ...rightmostEntries]) if (uniqueStyleSheets.includes(sheet) && !(0, zss_engine.isHashInStyleSheets)(hash)) (0, zss_engine.injectClientCSS)(hash, sheet);
108
+ const normalStyles = [];
109
+ const queryStyles = [];
110
+ for (const { hash, sheet } of [...orderedEntries, ...rightmostEntries]) if (uniqueStyleSheets.includes(sheet) && !(0, zss_engine.isHashInStyleSheets)(hash)) if (sheet.includes("@media") || sheet.includes("@container")) queryStyles.push({
111
+ hash,
112
+ sheet
113
+ });
114
+ else normalStyles.push({
115
+ hash,
116
+ sheet
117
+ });
118
+ for (const { hash, sheet } of normalStyles.reverse()) (0, zss_engine.injectClientCSS)(hash, sheet);
119
+ for (const { hash, sheet } of queryStyles) (0, zss_engine.injectClientQuery)(hash, sheet);
110
120
  }
111
121
  return classList.join(" ");
112
122
  }
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { globalPromise_1, globalPromise_2, initPromise_1, initPromise_2, resolvePromise_1, resolvePromise_2 } from "./css.mjs";
2
- import { camelToKebabCase, genBase36Hash, injectClientCSS, injectClientGlobalCSS, isHashInStyleSheets, isServer, isTestingDevelopment, processAtomicProps, splitAtomicAndNested, transpile } from "zss-engine";
2
+ import { camelToKebabCase, genBase36Hash, injectClientCSS, injectClientGlobalCSS, injectClientQuery, isHashInStyleSheets, isServer, isTestingDevelopment, processAtomicProps, splitAtomicAndNested, transpile } from "zss-engine";
3
3
 
4
4
  const styleAtomMap = new WeakMap();
5
5
  function create(object) {
@@ -104,8 +104,18 @@ function props(...objects) {
104
104
  if (typeof globalPromise_1 === "undefined") initPromise_1();
105
105
  resolvePromise_1(uniqueStyleSheets.join(""));
106
106
  if (isTestingDevelopment && !isServer) {
107
- injectedStyleSheets.clear();
108
- for (const { hash, sheet } of [...orderedEntries, ...rightmostEntries]) if (uniqueStyleSheets.includes(sheet) && !isHashInStyleSheets(hash)) injectClientCSS(hash, sheet);
107
+ const normalStyles = [];
108
+ const queryStyles = [];
109
+ for (const { hash, sheet } of [...orderedEntries, ...rightmostEntries]) if (uniqueStyleSheets.includes(sheet) && !isHashInStyleSheets(hash)) if (sheet.includes("@media") || sheet.includes("@container")) queryStyles.push({
110
+ hash,
111
+ sheet
112
+ });
113
+ else normalStyles.push({
114
+ hash,
115
+ sheet
116
+ });
117
+ for (const { hash, sheet } of normalStyles.reverse()) injectClientCSS(hash, sheet);
118
+ for (const { hash, sheet } of queryStyles) injectClientQuery(hash, sheet);
109
119
  }
110
120
  return classList.join(" ");
111
121
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plumeria/core",
3
- "version": "0.15.5",
3
+ "version": "0.15.7",
4
4
  "description": "A library for scalable and optimized styling",
5
5
  "repository": {
6
6
  "type": "git",
@@ -31,7 +31,7 @@
31
31
  "stylesheet.css"
32
32
  ],
33
33
  "dependencies": {
34
- "zss-engine": "0.2.77"
34
+ "zss-engine": "0.2.80"
35
35
  },
36
36
  "publishConfig": {
37
37
  "access": "public"