@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.
- package/dist/cjs/helpers/directStyle.cjs +7 -3
- package/dist/cjs/helpers/directStyle.native.cjs +7 -3
- package/dist/cjs/helpers/directStyle.native.js +7 -3
- package/dist/cjs/helpers/directStyle.native.js.map +1 -1
- package/dist/cjs/helpers/getCSSStylesAtomic.cjs +6 -7
- package/dist/cjs/helpers/getSplitStyles.cjs +106 -10
- package/dist/cjs/helpers/getSplitStyles.native.cjs +168 -10
- package/dist/cjs/helpers/getSplitStyles.native.js +168 -10
- package/dist/cjs/helpers/getSplitStyles.native.js.map +1 -1
- package/dist/cjs/helpers/propMapper.cjs +32 -6
- package/dist/cjs/helpers/propMapper.native.cjs +45 -6
- package/dist/cjs/helpers/propMapper.native.js +45 -6
- package/dist/cjs/helpers/propMapper.native.js.map +1 -1
- package/dist/cjs/hooks/useComponentState.cjs +6 -4
- package/dist/cjs/hooks/useComponentState.native.cjs +6 -4
- package/dist/cjs/hooks/useComponentState.native.js +6 -4
- package/dist/cjs/hooks/useComponentState.native.js.map +1 -1
- package/dist/esm/helpers/directStyle.mjs +7 -4
- package/dist/esm/helpers/directStyle.mjs.map +1 -1
- package/dist/esm/helpers/directStyle.native.js +7 -4
- package/dist/esm/helpers/directStyle.native.js.map +1 -1
- package/dist/esm/helpers/getCSSStylesAtomic.mjs +6 -7
- package/dist/esm/helpers/getCSSStylesAtomic.mjs.map +1 -1
- package/dist/esm/helpers/getSplitStyles.mjs +107 -11
- package/dist/esm/helpers/getSplitStyles.mjs.map +1 -1
- package/dist/esm/helpers/getSplitStyles.native.js +169 -11
- package/dist/esm/helpers/getSplitStyles.native.js.map +1 -1
- package/dist/esm/helpers/propMapper.mjs +33 -7
- package/dist/esm/helpers/propMapper.mjs.map +1 -1
- package/dist/esm/helpers/propMapper.native.js +46 -7
- package/dist/esm/helpers/propMapper.native.js.map +1 -1
- package/dist/esm/hooks/useComponentState.mjs +6 -4
- package/dist/esm/hooks/useComponentState.mjs.map +1 -1
- package/dist/esm/hooks/useComponentState.native.js +6 -4
- package/dist/esm/hooks/useComponentState.native.js.map +1 -1
- package/package.json +15 -15
- package/src/helpers/directStyle.ts +10 -4
- package/src/helpers/getCSSStylesAtomic.ts +16 -10
- package/src/helpers/getSplitStyles.tsx +183 -17
- package/src/helpers/propMapper.ts +64 -13
- package/src/hooks/useComponentState.ts +15 -4
- package/src/styled.tsx +4 -0
- package/src/types.tsx +13 -2
- package/types/dom/html.d.ts +49 -49
- package/types/dom/html.native.d.ts +46 -46
- package/types/helpers/directStyle.d.ts +1 -0
- package/types/helpers/directStyle.d.ts.map +1 -1
- package/types/helpers/getCSSStylesAtomic.d.ts.map +1 -1
- package/types/helpers/getSplitStyles.d.ts.map +1 -1
- package/types/helpers/propMapper.d.ts +2 -2
- package/types/helpers/propMapper.d.ts.map +1 -1
- package/types/hooks/useComponentState.d.ts.map +1 -1
- package/types/styled.d.ts.map +1 -1
- package/types/types.d.ts +4 -1
- 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,
|
|
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
|
-
|
|
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,
|
|
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
|
-
|
|
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,
|
|
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
|
-
|
|
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
|
}
|