@tamagui/web 3.0.0-beta.745.1 → 3.0.0-beta.752.1

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.
Files changed (55) hide show
  1. package/dist/cjs/helpers/directStyle.cjs +7 -3
  2. package/dist/cjs/helpers/directStyle.native.cjs +7 -3
  3. package/dist/cjs/helpers/directStyle.native.js +7 -3
  4. package/dist/cjs/helpers/directStyle.native.js.map +1 -1
  5. package/dist/cjs/helpers/getCSSStylesAtomic.cjs +6 -7
  6. package/dist/cjs/helpers/getSplitStyles.cjs +106 -10
  7. package/dist/cjs/helpers/getSplitStyles.native.cjs +168 -10
  8. package/dist/cjs/helpers/getSplitStyles.native.js +168 -10
  9. package/dist/cjs/helpers/getSplitStyles.native.js.map +1 -1
  10. package/dist/cjs/helpers/propMapper.cjs +32 -6
  11. package/dist/cjs/helpers/propMapper.native.cjs +45 -6
  12. package/dist/cjs/helpers/propMapper.native.js +45 -6
  13. package/dist/cjs/helpers/propMapper.native.js.map +1 -1
  14. package/dist/cjs/hooks/useComponentState.cjs +6 -4
  15. package/dist/cjs/hooks/useComponentState.native.cjs +6 -4
  16. package/dist/cjs/hooks/useComponentState.native.js +6 -4
  17. package/dist/cjs/hooks/useComponentState.native.js.map +1 -1
  18. package/dist/esm/helpers/directStyle.mjs +7 -4
  19. package/dist/esm/helpers/directStyle.mjs.map +1 -1
  20. package/dist/esm/helpers/directStyle.native.js +7 -4
  21. package/dist/esm/helpers/directStyle.native.js.map +1 -1
  22. package/dist/esm/helpers/getCSSStylesAtomic.mjs +6 -7
  23. package/dist/esm/helpers/getCSSStylesAtomic.mjs.map +1 -1
  24. package/dist/esm/helpers/getSplitStyles.mjs +107 -11
  25. package/dist/esm/helpers/getSplitStyles.mjs.map +1 -1
  26. package/dist/esm/helpers/getSplitStyles.native.js +169 -11
  27. package/dist/esm/helpers/getSplitStyles.native.js.map +1 -1
  28. package/dist/esm/helpers/propMapper.mjs +33 -7
  29. package/dist/esm/helpers/propMapper.mjs.map +1 -1
  30. package/dist/esm/helpers/propMapper.native.js +46 -7
  31. package/dist/esm/helpers/propMapper.native.js.map +1 -1
  32. package/dist/esm/hooks/useComponentState.mjs +6 -4
  33. package/dist/esm/hooks/useComponentState.mjs.map +1 -1
  34. package/dist/esm/hooks/useComponentState.native.js +6 -4
  35. package/dist/esm/hooks/useComponentState.native.js.map +1 -1
  36. package/package.json +15 -15
  37. package/src/helpers/directStyle.ts +10 -4
  38. package/src/helpers/getCSSStylesAtomic.ts +16 -10
  39. package/src/helpers/getSplitStyles.tsx +183 -17
  40. package/src/helpers/propMapper.ts +64 -13
  41. package/src/hooks/useComponentState.ts +15 -4
  42. package/src/styled.tsx +4 -0
  43. package/src/types.tsx +13 -2
  44. package/types/dom/html.d.ts +49 -49
  45. package/types/dom/html.native.d.ts +46 -46
  46. package/types/helpers/directStyle.d.ts +1 -0
  47. package/types/helpers/directStyle.d.ts.map +1 -1
  48. package/types/helpers/getCSSStylesAtomic.d.ts.map +1 -1
  49. package/types/helpers/getSplitStyles.d.ts.map +1 -1
  50. package/types/helpers/propMapper.d.ts +2 -2
  51. package/types/helpers/propMapper.d.ts.map +1 -1
  52. package/types/hooks/useComponentState.d.ts.map +1 -1
  53. package/types/styled.d.ts.map +1 -1
  54. package/types/types.d.ts +4 -1
  55. package/types/types.d.ts.map +1 -1
@@ -28,6 +28,7 @@ __export(directStyle_exports, {
28
28
  directStyleSignature: () => directStyleSignature,
29
29
  flushDirectStyles: () => flushDirectStyles,
30
30
  getDirectDynamicThemeAccess: () => getDirectDynamicThemeAccess,
31
+ isConditionalStyleObject: () => isConditionalStyleObject,
31
32
  platformMatches: () => platformMatches,
32
33
  resolveClauseChain: () => resolveClauseChain
33
34
  });
@@ -508,7 +509,7 @@ function directAtomic(state, property, value, condition, conditionKey, condition
508
509
  const existing = atomics[atomicKey];
509
510
  const contribution = directStyleSignature(property, value, conditionKey);
510
511
  const signature = existing ? existing.signature + contribution : contribution;
511
- const next = (0, import_getCSSStylesAtomic.getCSSStyleAtomic)(property, value, conditionSelector, conditionWrappers, signature, true, atomicKey, condition ? 1 + (Math.floor(condition / 256) >>> 23 & 7) + (Math.floor(condition / 256) >>> 26) * 6 - (condition >>> 5 & 7) : void 0);
512
+ const next = (0, import_getCSSStylesAtomic.getCSSStyleAtomic)(property, value, conditionSelector, conditionWrappers, signature, 2, atomicKey, condition ? 1 + (Math.floor(condition / 256) >>> 23 & 7) + (Math.floor(condition / 256) >>> 26) * 6 - (condition >>> 5 & 7) : void 0);
512
513
  if (!next) return;
513
514
  const identifier = next[import_helpers.StyleObjectIdentifier];
514
515
  const nextRules = next[import_helpers.StyleObjectRules];
@@ -529,7 +530,8 @@ function directAtomic(state, property, value, condition, conditionKey, condition
529
530
  atomics[atomicKey] = atomic;
530
531
  } else {
531
532
  const previousIdentifier = existing.styleObject[import_helpers.StyleObjectIdentifier];
532
- const rules = existing.styleObject[import_helpers.StyleObjectRules];
533
+ const rules = existing.styleObject[import_helpers.StyleObjectRules].slice();
534
+ existing.styleObject[import_helpers.StyleObjectRules] = rules;
533
535
  if (!condition && !isDefault && existing.conditions) for (const key in existing.conditions) {
534
536
  const entry = existing.conditions[key];
535
537
  if (!entry.default) continue;
@@ -603,7 +605,9 @@ function flushDirectStyles(state, clear = false) {
603
605
  const styleObject = atomics[property].styleObject;
604
606
  const identifier = styleObject[import_helpers.StyleObjectIdentifier];
605
607
  if ((0, import_insertStyleRule.shouldInsertStyleRules)(identifier)) {
606
- (0, import_insertStyleRule.updateRules)(identifier, styleObject[import_helpers.StyleObjectRules]);
608
+ const rules = styleObject[import_helpers.StyleObjectRules].slice();
609
+ styleObject[import_helpers.StyleObjectRules] = rules;
610
+ (0, import_insertStyleRule.updateRules)(identifier, rules);
607
611
  state.flatRulesToInsert[identifier] = styleObject;
608
612
  }
609
613
  }
@@ -30,6 +30,7 @@ __export(directStyle_exports, {
30
30
  directStyleSignature: () => directStyleSignature,
31
31
  flushDirectStyles: () => flushDirectStyles,
32
32
  getDirectDynamicThemeAccess: () => getDirectDynamicThemeAccess,
33
+ isConditionalStyleObject: () => isConditionalStyleObject,
33
34
  platformMatches: () => platformMatches,
34
35
  resolveClauseChain: () => resolveClauseChain
35
36
  });
@@ -540,7 +541,7 @@ function directAtomic(state, property, value, condition, conditionKey, condition
540
541
  var existing = atomics[atomicKey];
541
542
  var contribution = directStyleSignature(property, value, conditionKey);
542
543
  var signature = existing ? existing.signature + contribution : contribution;
543
- var next = (0, import_getCSSStylesAtomic.getCSSStyleAtomic)(property, value, conditionSelector, conditionWrappers, signature, true, atomicKey, condition ? 1 + (Math.floor(condition / 256) >>> 23 & 7) + (Math.floor(condition / 256) >>> 26) * 6 - (condition >>> 5 & 7) : void 0);
544
+ var next = (0, import_getCSSStylesAtomic.getCSSStyleAtomic)(property, value, conditionSelector, conditionWrappers, signature, 2, atomicKey, condition ? 1 + (Math.floor(condition / 256) >>> 23 & 7) + (Math.floor(condition / 256) >>> 26) * 6 - (condition >>> 5 & 7) : void 0);
544
545
  if (!next) return;
545
546
  var identifier = next[import_helpers.StyleObjectIdentifier];
546
547
  var nextRules = next[import_helpers.StyleObjectRules];
@@ -561,7 +562,8 @@ function directAtomic(state, property, value, condition, conditionKey, condition
561
562
  atomics[atomicKey] = atomic;
562
563
  } else {
563
564
  var previousIdentifier = existing.styleObject[import_helpers.StyleObjectIdentifier];
564
- var rules = existing.styleObject[import_helpers.StyleObjectRules];
565
+ var rules = existing.styleObject[import_helpers.StyleObjectRules].slice();
566
+ existing.styleObject[import_helpers.StyleObjectRules] = rules;
565
567
  if (!condition && !isDefault && existing.conditions) for (var key in existing.conditions) {
566
568
  var entry = existing.conditions[key];
567
569
  if (!entry.default) continue;
@@ -639,7 +641,9 @@ function flushDirectStyles(state) {
639
641
  var styleObject = atomics[property].styleObject;
640
642
  var identifier = styleObject[import_helpers.StyleObjectIdentifier];
641
643
  if ((0, import_insertStyleRule.shouldInsertStyleRules)(identifier)) {
642
- (0, import_insertStyleRule.updateRules)(identifier, styleObject[import_helpers.StyleObjectRules]);
644
+ var rules = styleObject[import_helpers.StyleObjectRules].slice();
645
+ styleObject[import_helpers.StyleObjectRules] = rules;
646
+ (0, import_insertStyleRule.updateRules)(identifier, rules);
643
647
  state.flatRulesToInsert[identifier] = styleObject;
644
648
  }
645
649
  }
@@ -30,6 +30,7 @@ __export(directStyle_exports, {
30
30
  directStyleSignature: () => directStyleSignature,
31
31
  flushDirectStyles: () => flushDirectStyles,
32
32
  getDirectDynamicThemeAccess: () => getDirectDynamicThemeAccess,
33
+ isConditionalStyleObject: () => isConditionalStyleObject,
33
34
  platformMatches: () => platformMatches,
34
35
  resolveClauseChain: () => resolveClauseChain
35
36
  });
@@ -540,7 +541,7 @@ function directAtomic(state, property, value, condition, conditionKey, condition
540
541
  var existing = atomics[atomicKey];
541
542
  var contribution = directStyleSignature(property, value, conditionKey);
542
543
  var signature = existing ? existing.signature + contribution : contribution;
543
- var next = (0, import_getCSSStylesAtomic.getCSSStyleAtomic)(property, value, conditionSelector, conditionWrappers, signature, true, atomicKey, condition ? 1 + (Math.floor(condition / 256) >>> 23 & 7) + (Math.floor(condition / 256) >>> 26) * 6 - (condition >>> 5 & 7) : void 0);
544
+ var next = (0, import_getCSSStylesAtomic.getCSSStyleAtomic)(property, value, conditionSelector, conditionWrappers, signature, 2, atomicKey, condition ? 1 + (Math.floor(condition / 256) >>> 23 & 7) + (Math.floor(condition / 256) >>> 26) * 6 - (condition >>> 5 & 7) : void 0);
544
545
  if (!next) return;
545
546
  var identifier = next[import_helpers.StyleObjectIdentifier];
546
547
  var nextRules = next[import_helpers.StyleObjectRules];
@@ -561,7 +562,8 @@ function directAtomic(state, property, value, condition, conditionKey, condition
561
562
  atomics[atomicKey] = atomic;
562
563
  } else {
563
564
  var previousIdentifier = existing.styleObject[import_helpers.StyleObjectIdentifier];
564
- var rules = existing.styleObject[import_helpers.StyleObjectRules];
565
+ var rules = existing.styleObject[import_helpers.StyleObjectRules].slice();
566
+ existing.styleObject[import_helpers.StyleObjectRules] = rules;
565
567
  if (!condition && !isDefault && existing.conditions) for (var key in existing.conditions) {
566
568
  var entry = existing.conditions[key];
567
569
  if (!entry.default) continue;
@@ -639,7 +641,9 @@ function flushDirectStyles(state) {
639
641
  var styleObject = atomics[property].styleObject;
640
642
  var identifier = styleObject[import_helpers.StyleObjectIdentifier];
641
643
  if ((0, import_insertStyleRule.shouldInsertStyleRules)(identifier)) {
642
- (0, import_insertStyleRule.updateRules)(identifier, styleObject[import_helpers.StyleObjectRules]);
644
+ var rules = styleObject[import_helpers.StyleObjectRules].slice();
645
+ styleObject[import_helpers.StyleObjectRules] = rules;
646
+ (0, import_insertStyleRule.updateRules)(identifier, rules);
643
647
  state.flatRulesToInsert[identifier] = styleObject;
644
648
  }
645
649
  }