css-in-js-engine-pb 0.2.2 → 0.2.4

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.
@@ -1 +1 @@
1
- {"version":3,"file":"insertWithBucket.d.ts","sourceRoot":"","sources":["../src/insertWithBucket.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAmC5C,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,WAAW,QAqDzE"}
1
+ {"version":3,"file":"insertWithBucket.d.ts","sourceRoot":"","sources":["../src/insertWithBucket.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAoC5C,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,WAAW,QAgDzE"}
@@ -14,6 +14,7 @@ const ORDER = [
14
14
  ];
15
15
  const OPTIONAL_BUCKETS = [
16
16
  StyleBucket.Base,
17
+ StyleBucket.Appearance,
17
18
  StyleBucket.Size,
18
19
  StyleBucket.Shape,
19
20
  StyleBucket.State,
@@ -47,8 +48,6 @@ export function insertRulesWithBucket(rules, bucket) {
47
48
  console.groupEnd();
48
49
  return;
49
50
  }
50
- // Don’t insert beyond unseen required buckets
51
- // (Reset + Appearance are required; Base/Size/Shape/State/Focus/User are optional via pre-seed)
52
51
  for (let i = 0; i <= targetIndex; i++) {
53
52
  if (!seenBuckets.has(ORDER[i])) {
54
53
  console.log(`⛔ blocked at ${bucketName(ORDER[i])} (not seen yet)`);
@@ -56,8 +55,6 @@ export function insertRulesWithBucket(rules, bucket) {
56
55
  return;
57
56
  }
58
57
  }
59
- // Insert buckets in order up to targetIndex.
60
- // IMPORTANT: we do NOT “flush forever”. We may insert more later.
61
58
  for (let i = 0; i <= targetIndex; i++) {
62
59
  const b = ORDER[i];
63
60
  const r = bucketRules.get(b);
@@ -0,0 +1,3 @@
1
+ import { StyleRule } from './types';
2
+ export declare function mergeStyleRules(rules: StyleRule[]): StyleRule;
3
+ //# sourceMappingURL=mergeStyleRules.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mergeStyleRules.d.ts","sourceRoot":"","sources":["../src/mergeStyleRules.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEpC,wBAAgB,eAAe,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,SAAS,CAU7D"}
@@ -0,0 +1,9 @@
1
+ export function mergeStyleRules(rules) {
2
+ const result = {};
3
+ for (const rule of rules) {
4
+ for (const key in rule) {
5
+ result[key] = rule[key];
6
+ }
7
+ }
8
+ return result;
9
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "css-in-js-engine-pb",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
4
4
  "description": "A lightweight atomic CSS-in-JS engine built on the native CSS cascade",
5
5
  "license": "MIT",
6
6
  "type": "module",