@tamagui/core 3.0.0-beta.1133.1 → 3.0.0-beta.1141.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/native.cjs +65 -29
- package/dist/test.native.cjs +65 -29
- package/package.json +13 -13
package/dist/native.cjs
CHANGED
|
@@ -15057,8 +15057,21 @@ function contributeProp(pass, keyOg, valOg) {
|
|
|
15057
15057
|
}
|
|
15058
15058
|
var styleOriginals = shouldTrackStyleTokenProvenance ? styleOriginalValues.get(style) : void 0;
|
|
15059
15059
|
for (var key1 in style) {
|
|
15060
|
-
|
|
15061
|
-
|
|
15060
|
+
var value1 = style[key1];
|
|
15061
|
+
if (value1 == null) continue;
|
|
15062
|
+
var inline = !styleState.styleProps.stylePieceEntries;
|
|
15063
|
+
if (inline) {
|
|
15064
|
+
if (typeof value1 === "string") {
|
|
15065
|
+
var [segments] = getConfigRevisionState(conf).parseFlatValue(value1);
|
|
15066
|
+
for (var index2 = 4; index2 < segments.length; index2 += 5) if (!(segments[index2] & 1)) {
|
|
15067
|
+
inline = false;
|
|
15068
|
+
break;
|
|
15069
|
+
}
|
|
15070
|
+
} else if (value1 && typeof value1 === "object" && !Array.isArray(value1) && !isVariable(value1) && classifyConditionalObject(value1, styleState) !== 0) inline = false;
|
|
15071
|
+
}
|
|
15072
|
+
styleState.flatInlineStyleProp = inline;
|
|
15073
|
+
contributeValue(styleState, key1, value1, styleOriginals === null || styleOriginals === void 0 ? void 0 : styleOriginals[key1]);
|
|
15074
|
+
styleState.flatInlineStyleProp = false;
|
|
15062
15075
|
}
|
|
15063
15076
|
}
|
|
15064
15077
|
pass[passSourceLayer] = layerBeforeStyle;
|
|
@@ -15134,7 +15147,7 @@ function contributeProp(pass, keyOg, valOg) {
|
|
|
15134
15147
|
if (valInit === "unset") {
|
|
15135
15148
|
var expanded = expandStyle(keyInit, valInit, conf.settings.styleCompat || "web");
|
|
15136
15149
|
clearDirectStyle(styleState, keyInit);
|
|
15137
|
-
if (expanded) for (var
|
|
15150
|
+
if (expanded) for (var index3 = 0; index3 < expanded.length; index3++) clearDirectStyle(styleState, expanded[index3][0]);
|
|
15138
15151
|
} else contributeValue(styleState, keyInit, valInit, originalOg, !isHostStyleKey);
|
|
15139
15152
|
return;
|
|
15140
15153
|
}
|
|
@@ -15466,7 +15479,10 @@ function writeCapturedStyleRecord(slots, slot, source, sourceLayer) {
|
|
|
15466
15479
|
for (var index = 0; index < list.length; index++) {
|
|
15467
15480
|
var entry = list[index];
|
|
15468
15481
|
var entryFlags = entry[7] & 31;
|
|
15469
|
-
if ((entryFlags & (recordInline | recordCSS)) !== (flags & (recordInline | recordCSS)))
|
|
15482
|
+
if ((entryFlags & (recordInline | recordCSS)) !== (flags & (recordInline | recordCSS))) {
|
|
15483
|
+
if (sourceLayer === sourceLayerStyle && entry[7] >> 5 === sourceLayerStyle && entry[0] === source[0] && !condition && !entry[2]) list.splice(index--, 1);
|
|
15484
|
+
continue;
|
|
15485
|
+
}
|
|
15470
15486
|
if (entry[0] !== source[0]) continue;
|
|
15471
15487
|
if (flags & recordDefault) {
|
|
15472
15488
|
if (!(entryFlags & recordDefault) && (!entry[2] || entry[3] === identity)) return;
|
|
@@ -15574,27 +15590,39 @@ var recordDefault = 8;
|
|
|
15574
15590
|
var recordCSS = 16;
|
|
15575
15591
|
function writeStyleRecord(state, property, value, cursor, original, flags) {
|
|
15576
15592
|
var conditionOverride = arguments.length > 6 && arguments[6] !== void 0 ? arguments[6] : -1;
|
|
15577
|
-
var
|
|
15593
|
+
var _direct_flatPass;
|
|
15578
15594
|
var _direct;
|
|
15579
15595
|
var condition = conditionOverride !== -1 ? conditionOverride : cursor ? cursor[conditionValue] : 0;
|
|
15580
15596
|
var identity = cursor ? cursor[conditionKey] : "";
|
|
15581
|
-
var
|
|
15582
|
-
var
|
|
15597
|
+
var direct = state;
|
|
15598
|
+
var slots = (_direct = direct).flatSlots || (_direct.flatSlots = /* @__PURE__ */ new Map());
|
|
15599
|
+
var sourceLayer = ((_direct_flatPass = direct.flatPass) === null || _direct_flatPass === void 0 ? void 0 : _direct_flatPass[passSourceLayer]) || 0;
|
|
15600
|
+
if (direct.flatInlineStyleProp) flags |= recordInline;
|
|
15601
|
+
var cssSlot = property.startsWith("transition") ? "transition" : property;
|
|
15602
|
+
var slot = flags & recordInline && cssSlot !== property ? property : cssSlot;
|
|
15583
15603
|
var list = slots.get(slot);
|
|
15584
15604
|
if (!list) slots.set(slot, list = []);
|
|
15585
|
-
|
|
15586
|
-
var
|
|
15587
|
-
var
|
|
15588
|
-
|
|
15589
|
-
|
|
15605
|
+
if (sourceLayer === sourceLayerStyle && !condition) {
|
|
15606
|
+
var other = slot === cssSlot ? list : slots.get(flags & recordInline ? cssSlot : property);
|
|
15607
|
+
if (other) for (var index = 0; index < other.length; index++) {
|
|
15608
|
+
var entry = other[index];
|
|
15609
|
+
var entryFlags = entry[7];
|
|
15610
|
+
if (entry[0] === property && !entry[2] && entryFlags >> 5 === sourceLayerStyle && (entryFlags & (recordInline | recordCSS)) !== (flags & (recordInline | recordCSS))) other.splice(index--, 1);
|
|
15611
|
+
}
|
|
15612
|
+
}
|
|
15613
|
+
for (var index1 = 0; index1 < list.length; index1++) {
|
|
15614
|
+
var entry1 = list[index1];
|
|
15615
|
+
var entryFlags1 = entry1[7];
|
|
15616
|
+
if ((entryFlags1 & (recordInline | recordCSS)) !== (flags & (recordInline | recordCSS))) continue;
|
|
15617
|
+
if (entry1[0] !== property) continue;
|
|
15590
15618
|
if (flags & recordDefault) {
|
|
15591
|
-
if (!(
|
|
15592
|
-
} else if (
|
|
15593
|
-
list.splice(
|
|
15619
|
+
if (!(entryFlags1 & recordDefault) && (!entry1[2] || entry1[3] === identity)) return;
|
|
15620
|
+
} else if (entryFlags1 & recordDefault && (!condition || entry1[3] === identity)) {
|
|
15621
|
+
list.splice(index1--, 1);
|
|
15594
15622
|
continue;
|
|
15595
15623
|
}
|
|
15596
|
-
if (
|
|
15597
|
-
list.splice(
|
|
15624
|
+
if (entry1[3] === identity) {
|
|
15625
|
+
list.splice(index1, 1);
|
|
15598
15626
|
break;
|
|
15599
15627
|
}
|
|
15600
15628
|
}
|
|
@@ -15606,7 +15634,7 @@ function writeStyleRecord(state, property, value, cursor, original, flags) {
|
|
|
15606
15634
|
cursor ? cursor[conditionSelector] : "",
|
|
15607
15635
|
cursor ? cursor[conditionWrappers] : void 0,
|
|
15608
15636
|
original,
|
|
15609
|
-
flags |
|
|
15637
|
+
flags | sourceLayer << 5
|
|
15610
15638
|
]);
|
|
15611
15639
|
}
|
|
15612
15640
|
function streamWriteInline(state, property, value, cursor, original) {
|
|
@@ -15763,7 +15791,7 @@ var valueCacheEntries = 0;
|
|
|
15763
15791
|
var valueCacheRoot = {};
|
|
15764
15792
|
var parsedSlices = /* @__PURE__ */ new WeakMap();
|
|
15765
15793
|
function configuredValue(state, property, raw) {
|
|
15766
|
-
var embedded = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : false;
|
|
15794
|
+
var embedded = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : false, nativeColors = arguments.length > 4 ? arguments[4] : void 0;
|
|
15767
15795
|
var grammar = getConfigRevisionState(state.conf);
|
|
15768
15796
|
var name = raw;
|
|
15769
15797
|
var opacity;
|
|
@@ -15783,7 +15811,7 @@ function configuredValue(state, property, raw) {
|
|
|
15783
15811
|
var fontProperty = property.startsWith("font") || property === "lineHeight" || property === "letterSpacing";
|
|
15784
15812
|
var resolveValues = state.styleProps.resolveValues;
|
|
15785
15813
|
var byRaw;
|
|
15786
|
-
if (!fontProperty) {
|
|
15814
|
+
if (!fontProperty && !nativeColors) {
|
|
15787
15815
|
var _maps;
|
|
15788
15816
|
var revision = grammar.revision;
|
|
15789
15817
|
if (state.conf !== valueCacheConf || revision !== valueCacheRevision) {
|
|
@@ -15847,20 +15875,25 @@ function configuredValue(state, property, raw) {
|
|
|
15847
15875
|
}
|
|
15848
15876
|
var out = raw;
|
|
15849
15877
|
if (isVariable(value)) {
|
|
15850
|
-
out = resolveValues === "except-theme" && fromTheme ? `${THEME_REF_PREFIX}${lookupName}${opacity !== void 0 ? `/${opacity}` : ""}` : resolveVariableValue(property, value, resolveValues);
|
|
15878
|
+
out = resolveValues === "except-theme" && fromTheme ? `${THEME_REF_PREFIX}${lookupName}${opacity !== void 0 ? `/${opacity}` : ""}` : resolveVariableValue(nativeColors ? "color" : property, value, resolveValues);
|
|
15851
15879
|
if (opacity !== void 0) {
|
|
15852
15880
|
var _normalizeColor;
|
|
15853
15881
|
out = (_normalizeColor = normalizeColor(out, opacity / 100)) !== null && _normalizeColor !== void 0 ? _normalizeColor : out;
|
|
15854
15882
|
}
|
|
15855
15883
|
}
|
|
15884
|
+
if (nativeColors && out && typeof out === "object") {
|
|
15885
|
+
var reference = `__tamagui_native_color_${nativeColors.size}`;
|
|
15886
|
+
nativeColors.set(reference, out);
|
|
15887
|
+
out = reference;
|
|
15888
|
+
}
|
|
15856
15889
|
if (embedded && out === raw) {
|
|
15857
15890
|
var usedSafeArea = state.flatUsesSafeArea;
|
|
15858
15891
|
out = grammar.embeddedTokens(raw, function(word) {
|
|
15859
|
-
return configuredValue(state, property, word);
|
|
15892
|
+
return configuredValue(state, property, word, false, nativeColors);
|
|
15860
15893
|
});
|
|
15861
15894
|
if (!usedSafeArea && state.flatUsesSafeArea) return out;
|
|
15862
15895
|
}
|
|
15863
|
-
if (!fontProperty && !fromTheme) if (valueCacheEntries > 8192) {
|
|
15896
|
+
if (!fontProperty && !fromTheme && !nativeColors) if (valueCacheEntries > 8192) {
|
|
15864
15897
|
valueCaches = /* @__PURE__ */ new WeakMap();
|
|
15865
15898
|
valueCacheEntries = 0;
|
|
15866
15899
|
} else {
|
|
@@ -15990,8 +16023,8 @@ function emitTextDecoration(state, raw, cursor, originalValue, contextOnly) {
|
|
|
15990
16023
|
function emitResolved(state, property, raw, cursor, originalValue, contextOnly) {
|
|
15991
16024
|
emitProperty(state, property, resolveValue(state, property, raw), cursor, originalValue, contextOnly);
|
|
15992
16025
|
}
|
|
15993
|
-
function resolveValue(state, property, raw) {
|
|
15994
|
-
var value = typeof raw === "string" ? configuredValue(state, property, raw, true) : raw;
|
|
16026
|
+
function resolveValue(state, property, raw, nativeColors) {
|
|
16027
|
+
var value = typeof raw === "string" ? configuredValue(state, property, raw, true, nativeColors) : raw;
|
|
15995
16028
|
if (typeof value === "string" && value !== "" && true) value = resolveNumericValue(value);
|
|
15996
16029
|
return value;
|
|
15997
16030
|
}
|
|
@@ -16048,9 +16081,10 @@ function emitValue(state, property, raw, cursor, originalValue, contextOnly) {
|
|
|
16048
16081
|
emitProperty(state, property, value2, cursor, originalValue, contextOnly);
|
|
16049
16082
|
return;
|
|
16050
16083
|
}
|
|
16051
|
-
var
|
|
16084
|
+
var nativeColors = typeof raw === "string" && (property === "backgroundImage" || property === "boxShadow" || property === "textShadow") ? /* @__PURE__ */ new Map() : void 0;
|
|
16085
|
+
var value3 = resolveValue(state, property, raw, nativeColors);
|
|
16052
16086
|
if (typeof value3 === "string" && (property === "backgroundImage" || property === "boxShadow" || property === "textShadow")) {
|
|
16053
|
-
var parsed = parseNativeStyle(property, value3);
|
|
16087
|
+
var parsed = parseNativeStyle(property, value3, nativeColors);
|
|
16054
16088
|
if (parsed) {
|
|
16055
16089
|
if (property === "textShadow") {
|
|
16056
16090
|
var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = void 0;
|
|
@@ -16228,18 +16262,20 @@ function contributeValue(state, property, value, originalValue) {
|
|
|
16228
16262
|
function clearDirectStyle(state, property) {
|
|
16229
16263
|
var _direct_flatAtomics;
|
|
16230
16264
|
var direct = state;
|
|
16265
|
+
if (direct.flatDynamicColors) delete direct.flatDynamicColors[property];
|
|
16231
16266
|
var propertyKind = getConfigRevisionState(state.conf).propertyKind(property);
|
|
16232
16267
|
var atomicKey = property.startsWith("transition") ? "transition" : propertyKind > 0 && propertyKind < 5 ? "boxShadow" : propertyKind === 6 ? "textShadow" : propertyKind === 5 ? "transform" : property;
|
|
16233
16268
|
var slot = atomicKey;
|
|
16234
16269
|
(_direct_flatAtomics = direct.flatAtomics) === null || _direct_flatAtomics === void 0 || _direct_flatAtomics.delete(slot);
|
|
16235
16270
|
if (direct.flatSlots) {
|
|
16236
|
-
if (slot !== atomicKey) {
|
|
16271
|
+
if (slot !== atomicKey || atomicKey === "flex") {
|
|
16237
16272
|
var entries = direct.flatSlots.get(slot);
|
|
16238
16273
|
if (entries) {
|
|
16239
16274
|
for (var index = entries.length; index--;) if (entries[index][0] === atomicKey) entries.splice(index, 1);
|
|
16275
|
+
if (!entries.length) direct.flatSlots.delete(slot);
|
|
16240
16276
|
}
|
|
16241
16277
|
}
|
|
16242
|
-
direct.flatSlots.delete(atomicKey);
|
|
16278
|
+
if (atomicKey !== "flex") direct.flatSlots.delete(atomicKey);
|
|
16243
16279
|
}
|
|
16244
16280
|
if (atomicKey === "transform") state.transformAccumulator = void 0;
|
|
16245
16281
|
if (state.style) delete state.style[atomicKey];
|
package/dist/test.native.cjs
CHANGED
|
@@ -5762,8 +5762,21 @@ function contributeProp(pass, keyOg, valOg) {
|
|
|
5762
5762
|
}
|
|
5763
5763
|
var styleOriginals = shouldTrackStyleTokenProvenance ? styleOriginalValues.get(style) : void 0;
|
|
5764
5764
|
for (var key1 in style) {
|
|
5765
|
-
|
|
5766
|
-
|
|
5765
|
+
var value1 = style[key1];
|
|
5766
|
+
if (value1 == null) continue;
|
|
5767
|
+
var inline = !styleState.styleProps.stylePieceEntries;
|
|
5768
|
+
if (inline) {
|
|
5769
|
+
if (typeof value1 === "string") {
|
|
5770
|
+
var [segments] = getConfigRevisionState(conf).parseFlatValue(value1);
|
|
5771
|
+
for (var index2 = 4; index2 < segments.length; index2 += 5) if (!(segments[index2] & 1)) {
|
|
5772
|
+
inline = false;
|
|
5773
|
+
break;
|
|
5774
|
+
}
|
|
5775
|
+
} else if (value1 && typeof value1 === "object" && !Array.isArray(value1) && !isVariable(value1) && classifyConditionalObject(value1, styleState) !== 0) inline = false;
|
|
5776
|
+
}
|
|
5777
|
+
styleState.flatInlineStyleProp = inline;
|
|
5778
|
+
contributeValue(styleState, key1, value1, styleOriginals === null || styleOriginals === void 0 ? void 0 : styleOriginals[key1]);
|
|
5779
|
+
styleState.flatInlineStyleProp = false;
|
|
5767
5780
|
}
|
|
5768
5781
|
}
|
|
5769
5782
|
pass[passSourceLayer] = layerBeforeStyle;
|
|
@@ -5872,7 +5885,7 @@ function contributeProp(pass, keyOg, valOg) {
|
|
|
5872
5885
|
if (valInit === "unset") {
|
|
5873
5886
|
var expanded = expandStyle(keyInit, valInit, conf.settings.styleCompat || "web");
|
|
5874
5887
|
clearDirectStyle(styleState, keyInit);
|
|
5875
|
-
if (expanded) for (var
|
|
5888
|
+
if (expanded) for (var index3 = 0; index3 < expanded.length; index3++) clearDirectStyle(styleState, expanded[index3][0]);
|
|
5876
5889
|
} else contributeValue(styleState, keyInit, valInit, originalOg, !isHostStyleKey);
|
|
5877
5890
|
return;
|
|
5878
5891
|
}
|
|
@@ -6254,7 +6267,10 @@ function writeCapturedStyleRecord(slots, slot, source, sourceLayer) {
|
|
|
6254
6267
|
for (var index = 0; index < list.length; index++) {
|
|
6255
6268
|
var entry = list[index];
|
|
6256
6269
|
var entryFlags = entry[7] & 31;
|
|
6257
|
-
if ((entryFlags & (recordInline | recordCSS)) !== (flags & (recordInline | recordCSS)))
|
|
6270
|
+
if ((entryFlags & (recordInline | recordCSS)) !== (flags & (recordInline | recordCSS))) {
|
|
6271
|
+
if (sourceLayer === sourceLayerStyle && entry[7] >> 5 === sourceLayerStyle && entry[0] === source[0] && !condition && !entry[2]) list.splice(index--, 1);
|
|
6272
|
+
continue;
|
|
6273
|
+
}
|
|
6258
6274
|
if (entry[0] !== source[0]) continue;
|
|
6259
6275
|
if (flags & recordDefault) {
|
|
6260
6276
|
if (!(entryFlags & recordDefault) && (!entry[2] || entry[3] === identity)) return;
|
|
@@ -6362,27 +6378,39 @@ var recordDefault = 8;
|
|
|
6362
6378
|
var recordCSS = 16;
|
|
6363
6379
|
function writeStyleRecord(state, property, value, cursor, original, flags) {
|
|
6364
6380
|
var conditionOverride = arguments.length > 6 && arguments[6] !== void 0 ? arguments[6] : -1;
|
|
6365
|
-
var
|
|
6381
|
+
var _direct_flatPass;
|
|
6366
6382
|
var _direct;
|
|
6367
6383
|
var condition = conditionOverride !== -1 ? conditionOverride : cursor ? cursor[conditionValue] : 0;
|
|
6368
6384
|
var identity = cursor ? cursor[conditionKey] : "";
|
|
6369
|
-
var
|
|
6370
|
-
var
|
|
6385
|
+
var direct = state;
|
|
6386
|
+
var slots = (_direct = direct).flatSlots || (_direct.flatSlots = /* @__PURE__ */ new Map());
|
|
6387
|
+
var sourceLayer = ((_direct_flatPass = direct.flatPass) === null || _direct_flatPass === void 0 ? void 0 : _direct_flatPass[passSourceLayer]) || 0;
|
|
6388
|
+
if (direct.flatInlineStyleProp) flags |= recordInline;
|
|
6389
|
+
var cssSlot = property.startsWith("transition") ? "transition" : property;
|
|
6390
|
+
var slot = flags & recordInline && cssSlot !== property ? property : cssSlot;
|
|
6371
6391
|
var list = slots.get(slot);
|
|
6372
6392
|
if (!list) slots.set(slot, list = []);
|
|
6373
|
-
|
|
6374
|
-
var
|
|
6375
|
-
var
|
|
6376
|
-
|
|
6377
|
-
|
|
6393
|
+
if (sourceLayer === sourceLayerStyle && !condition) {
|
|
6394
|
+
var other = slot === cssSlot ? list : slots.get(flags & recordInline ? cssSlot : property);
|
|
6395
|
+
if (other) for (var index = 0; index < other.length; index++) {
|
|
6396
|
+
var entry = other[index];
|
|
6397
|
+
var entryFlags = entry[7];
|
|
6398
|
+
if (entry[0] === property && !entry[2] && entryFlags >> 5 === sourceLayerStyle && (entryFlags & (recordInline | recordCSS)) !== (flags & (recordInline | recordCSS))) other.splice(index--, 1);
|
|
6399
|
+
}
|
|
6400
|
+
}
|
|
6401
|
+
for (var index1 = 0; index1 < list.length; index1++) {
|
|
6402
|
+
var entry1 = list[index1];
|
|
6403
|
+
var entryFlags1 = entry1[7];
|
|
6404
|
+
if ((entryFlags1 & (recordInline | recordCSS)) !== (flags & (recordInline | recordCSS))) continue;
|
|
6405
|
+
if (entry1[0] !== property) continue;
|
|
6378
6406
|
if (flags & recordDefault) {
|
|
6379
|
-
if (!(
|
|
6380
|
-
} else if (
|
|
6381
|
-
list.splice(
|
|
6407
|
+
if (!(entryFlags1 & recordDefault) && (!entry1[2] || entry1[3] === identity)) return;
|
|
6408
|
+
} else if (entryFlags1 & recordDefault && (!condition || entry1[3] === identity)) {
|
|
6409
|
+
list.splice(index1--, 1);
|
|
6382
6410
|
continue;
|
|
6383
6411
|
}
|
|
6384
|
-
if (
|
|
6385
|
-
list.splice(
|
|
6412
|
+
if (entry1[3] === identity) {
|
|
6413
|
+
list.splice(index1, 1);
|
|
6386
6414
|
break;
|
|
6387
6415
|
}
|
|
6388
6416
|
}
|
|
@@ -6394,7 +6422,7 @@ function writeStyleRecord(state, property, value, cursor, original, flags) {
|
|
|
6394
6422
|
cursor ? cursor[conditionSelector] : "",
|
|
6395
6423
|
cursor ? cursor[conditionWrappers] : void 0,
|
|
6396
6424
|
original,
|
|
6397
|
-
flags |
|
|
6425
|
+
flags | sourceLayer << 5
|
|
6398
6426
|
]);
|
|
6399
6427
|
}
|
|
6400
6428
|
function streamWriteInline(state, property, value, cursor, original) {
|
|
@@ -6569,7 +6597,7 @@ var cssWideColorKeywords = /* @__PURE__ */ new Set([
|
|
|
6569
6597
|
"transparent"
|
|
6570
6598
|
]);
|
|
6571
6599
|
function configuredValue(state, property, raw) {
|
|
6572
|
-
var embedded = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : false;
|
|
6600
|
+
var embedded = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : false, nativeColors = arguments.length > 4 ? arguments[4] : void 0;
|
|
6573
6601
|
var grammar = getConfigRevisionState(state.conf);
|
|
6574
6602
|
var name = raw;
|
|
6575
6603
|
var opacity;
|
|
@@ -6589,7 +6617,7 @@ function configuredValue(state, property, raw) {
|
|
|
6589
6617
|
var fontProperty = property.startsWith("font") || property === "lineHeight" || property === "letterSpacing";
|
|
6590
6618
|
var resolveValues = state.styleProps.resolveValues;
|
|
6591
6619
|
var byRaw;
|
|
6592
|
-
if (!fontProperty) {
|
|
6620
|
+
if (!fontProperty && !nativeColors) {
|
|
6593
6621
|
var _maps;
|
|
6594
6622
|
var revision = grammar.revision;
|
|
6595
6623
|
if (state.conf !== valueCacheConf || revision !== valueCacheRevision) {
|
|
@@ -6730,20 +6758,25 @@ function configuredValue(state, property, raw) {
|
|
|
6730
6758
|
}
|
|
6731
6759
|
var out = raw;
|
|
6732
6760
|
if (isVariable(value)) {
|
|
6733
|
-
out = resolveValues === "except-theme" && fromTheme ? `${THEME_REF_PREFIX}${lookupName}${opacity !== void 0 ? `/${opacity}` : ""}` : resolveVariableValue(property, value, resolveValues);
|
|
6761
|
+
out = resolveValues === "except-theme" && fromTheme ? `${THEME_REF_PREFIX}${lookupName}${opacity !== void 0 ? `/${opacity}` : ""}` : resolveVariableValue(nativeColors ? "color" : property, value, resolveValues);
|
|
6734
6762
|
if (opacity !== void 0) {
|
|
6735
6763
|
var _normalizeColor;
|
|
6736
6764
|
out = (_normalizeColor = normalizeColor(out, opacity / 100)) !== null && _normalizeColor !== void 0 ? _normalizeColor : out;
|
|
6737
6765
|
}
|
|
6738
6766
|
}
|
|
6767
|
+
if (nativeColors && out && typeof out === "object") {
|
|
6768
|
+
var reference = `__tamagui_native_color_${nativeColors.size}`;
|
|
6769
|
+
nativeColors.set(reference, out);
|
|
6770
|
+
out = reference;
|
|
6771
|
+
}
|
|
6739
6772
|
if (embedded && out === raw) {
|
|
6740
6773
|
var usedSafeArea = state.flatUsesSafeArea;
|
|
6741
6774
|
out = grammar.embeddedTokens(raw, function(word) {
|
|
6742
|
-
return configuredValue(state, property, word);
|
|
6775
|
+
return configuredValue(state, property, word, false, nativeColors);
|
|
6743
6776
|
});
|
|
6744
6777
|
if (!usedSafeArea && state.flatUsesSafeArea) return out;
|
|
6745
6778
|
}
|
|
6746
|
-
if (!fontProperty && !fromTheme) if (valueCacheEntries > 8192) {
|
|
6779
|
+
if (!fontProperty && !fromTheme && !nativeColors) if (valueCacheEntries > 8192) {
|
|
6747
6780
|
valueCaches = /* @__PURE__ */ new WeakMap();
|
|
6748
6781
|
valueCacheEntries = 0;
|
|
6749
6782
|
} else {
|
|
@@ -6876,8 +6909,8 @@ function emitTextDecoration(state, raw, cursor, originalValue, contextOnly) {
|
|
|
6876
6909
|
function emitResolved(state, property, raw, cursor, originalValue, contextOnly) {
|
|
6877
6910
|
emitProperty(state, property, resolveValue(state, property, raw), cursor, originalValue, contextOnly);
|
|
6878
6911
|
}
|
|
6879
|
-
function resolveValue(state, property, raw) {
|
|
6880
|
-
var value = typeof raw === "string" ? configuredValue(state, property, raw, true) : raw;
|
|
6912
|
+
function resolveValue(state, property, raw, nativeColors) {
|
|
6913
|
+
var value = typeof raw === "string" ? configuredValue(state, property, raw, true, nativeColors) : raw;
|
|
6881
6914
|
if (typeof value === "string" && value !== "" && true) value = resolveNumericValue(value);
|
|
6882
6915
|
return value;
|
|
6883
6916
|
}
|
|
@@ -6936,9 +6969,10 @@ function emitValue(state, property, raw, cursor, originalValue, contextOnly) {
|
|
|
6936
6969
|
emitProperty(state, property, value2, cursor, originalValue, contextOnly);
|
|
6937
6970
|
return;
|
|
6938
6971
|
}
|
|
6939
|
-
var
|
|
6972
|
+
var nativeColors = typeof raw === "string" && (property === "backgroundImage" || property === "boxShadow" || property === "textShadow") ? /* @__PURE__ */ new Map() : void 0;
|
|
6973
|
+
var value3 = resolveValue(state, property, raw, nativeColors);
|
|
6940
6974
|
if (typeof value3 === "string" && (property === "backgroundImage" || property === "boxShadow" || property === "textShadow")) {
|
|
6941
|
-
var parsed = parseNativeStyle(property, value3);
|
|
6975
|
+
var parsed = parseNativeStyle(property, value3, nativeColors);
|
|
6942
6976
|
if (parsed) {
|
|
6943
6977
|
if (property === "textShadow") {
|
|
6944
6978
|
var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = void 0;
|
|
@@ -7138,18 +7172,20 @@ function contributeValue(state, property, value, originalValue) {
|
|
|
7138
7172
|
function clearDirectStyle(state, property) {
|
|
7139
7173
|
var _direct_flatAtomics;
|
|
7140
7174
|
var direct = state;
|
|
7175
|
+
if (direct.flatDynamicColors) delete direct.flatDynamicColors[property];
|
|
7141
7176
|
var propertyKind = getConfigRevisionState(state.conf).propertyKind(property);
|
|
7142
7177
|
var atomicKey = property.startsWith("transition") ? "transition" : propertyKind > 0 && propertyKind < 5 ? "boxShadow" : propertyKind === 6 ? "textShadow" : propertyKind === 5 ? "transform" : property;
|
|
7143
7178
|
var slot = atomicKey;
|
|
7144
7179
|
(_direct_flatAtomics = direct.flatAtomics) === null || _direct_flatAtomics === void 0 || _direct_flatAtomics.delete(slot);
|
|
7145
7180
|
if (direct.flatSlots) {
|
|
7146
|
-
if (slot !== atomicKey) {
|
|
7181
|
+
if (slot !== atomicKey || atomicKey === "flex") {
|
|
7147
7182
|
var entries = direct.flatSlots.get(slot);
|
|
7148
7183
|
if (entries) {
|
|
7149
7184
|
for (var index = entries.length; index--;) if (entries[index][0] === atomicKey) entries.splice(index, 1);
|
|
7185
|
+
if (!entries.length) direct.flatSlots.delete(slot);
|
|
7150
7186
|
}
|
|
7151
7187
|
}
|
|
7152
|
-
direct.flatSlots.delete(atomicKey);
|
|
7188
|
+
if (atomicKey !== "flex") direct.flatSlots.delete(atomicKey);
|
|
7153
7189
|
}
|
|
7154
7190
|
if (atomicKey === "transform") state.transformAccumulator = void 0;
|
|
7155
7191
|
if (state.style) delete state.style[atomicKey];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/core",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.1141.1",
|
|
4
4
|
"gitHead": "a49cc7ea6b93ba384e77a4880ae48ac4a5635c14",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -137,20 +137,20 @@
|
|
|
137
137
|
"clean:build": "tamagui-build clean:build"
|
|
138
138
|
},
|
|
139
139
|
"dependencies": {
|
|
140
|
-
"@tamagui/compose-refs": "3.0.0-beta.
|
|
141
|
-
"@tamagui/constants": "3.0.0-beta.
|
|
142
|
-
"@tamagui/helpers": "3.0.0-beta.
|
|
143
|
-
"@tamagui/react-native-media-driver": "3.0.0-beta.
|
|
144
|
-
"@tamagui/react-native-use-pressable": "3.0.0-beta.
|
|
145
|
-
"@tamagui/size": "3.0.0-beta.
|
|
146
|
-
"@tamagui/use-element-layout": "3.0.0-beta.
|
|
147
|
-
"@tamagui/use-event": "3.0.0-beta.
|
|
148
|
-
"@tamagui/web": "3.0.0-beta.
|
|
140
|
+
"@tamagui/compose-refs": "3.0.0-beta.1141.1",
|
|
141
|
+
"@tamagui/constants": "3.0.0-beta.1141.1",
|
|
142
|
+
"@tamagui/helpers": "3.0.0-beta.1141.1",
|
|
143
|
+
"@tamagui/react-native-media-driver": "3.0.0-beta.1141.1",
|
|
144
|
+
"@tamagui/react-native-use-pressable": "3.0.0-beta.1141.1",
|
|
145
|
+
"@tamagui/size": "3.0.0-beta.1141.1",
|
|
146
|
+
"@tamagui/use-element-layout": "3.0.0-beta.1141.1",
|
|
147
|
+
"@tamagui/use-event": "3.0.0-beta.1141.1",
|
|
148
|
+
"@tamagui/web": "3.0.0-beta.1141.1"
|
|
149
149
|
},
|
|
150
150
|
"devDependencies": {
|
|
151
|
-
"@tamagui/build": "3.0.0-beta.
|
|
152
|
-
"@tamagui/native-bundle": "3.0.0-beta.
|
|
153
|
-
"@tamagui/react-native-web-lite": "3.0.0-beta.
|
|
151
|
+
"@tamagui/build": "3.0.0-beta.1141.1",
|
|
152
|
+
"@tamagui/native-bundle": "3.0.0-beta.1141.1",
|
|
153
|
+
"@tamagui/react-native-web-lite": "3.0.0-beta.1141.1",
|
|
154
154
|
"@testing-library/react": "^16.1.0",
|
|
155
155
|
"csstype": "^3.0.10",
|
|
156
156
|
"react": "19.2.3",
|