tamagui 1.109.6 → 1.109.8
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.js +194 -200
- package/dist/native.js.map +2 -2
- package/dist/test.native.js +129 -120
- package/dist/test.native.js.map +2 -2
- package/package.json +54 -54
package/dist/native.js
CHANGED
|
@@ -1109,8 +1109,8 @@ var require_concatClassName_native = __commonJS({
|
|
|
1109
1109
|
});
|
|
1110
1110
|
module2.exports = __toCommonJS2(concatClassName_exports);
|
|
1111
1111
|
function concatClassName(_cn) {
|
|
1112
|
-
for (var
|
|
1113
|
-
var
|
|
1112
|
+
for (var args = arguments, usedPrefixes = [], final = "", len = args.length, propObjects = null, x = len; x >= 0; x--) {
|
|
1113
|
+
var _loop = function(i2) {
|
|
1114
1114
|
var name = names[i2];
|
|
1115
1115
|
if (!name || name === " ") return "continue";
|
|
1116
1116
|
if (name[0] !== "_") return final = name + " " + final, "continue";
|
|
@@ -1129,11 +1129,15 @@ var require_concatClassName_native = __commonJS({
|
|
|
1129
1129
|
return res;
|
|
1130
1130
|
})) return "continue";
|
|
1131
1131
|
final = name + " " + final;
|
|
1132
|
-
}, cns = args[
|
|
1133
|
-
if (
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1132
|
+
}, cns = args[x];
|
|
1133
|
+
if (cns) {
|
|
1134
|
+
if (!Array.isArray(cns) && typeof cns != "string") {
|
|
1135
|
+
propObjects = propObjects || [], propObjects.push(cns);
|
|
1136
|
+
continue;
|
|
1137
|
+
}
|
|
1138
|
+
for (var names = Array.isArray(cns) ? cns : cns.split(" "), numNames = names.length, i = numNames - 1; i >= 0; i--) _loop(i);
|
|
1139
|
+
}
|
|
1140
|
+
}
|
|
1137
1141
|
return final;
|
|
1138
1142
|
}
|
|
1139
1143
|
var pseudoInvert = {
|
|
@@ -7323,7 +7327,7 @@ var require_getVariantExtras_native = __commonJS({
|
|
|
7323
7327
|
return (0, import_createVariable.getVariableValue)(styleState.fontFamily || styleState.curProps.fontFamily) || props.fontFamily || (0, import_createVariable.getVariableValue)(styleState.conf.defaultFont);
|
|
7324
7328
|
},
|
|
7325
7329
|
get font() {
|
|
7326
|
-
return fonts[this.fontFamily] || (props.fontFamily
|
|
7330
|
+
return fonts[this.fontFamily] || (!props.fontFamily || props.fontFamily[0] === "$" ? fonts[styleState.conf.defaultFont] : void 0);
|
|
7327
7331
|
},
|
|
7328
7332
|
// TODO do this in splitstlye
|
|
7329
7333
|
// we avoid passing in default props for media queries because that would confuse things like SizableText.size:
|
|
@@ -8162,34 +8166,69 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
8162
8166
|
return validStyleProps[key] || ((_staticConfig_accept = staticConfig.accept) === null || _staticConfig_accept === void 0 ? void 0 : _staticConfig_accept[key]);
|
|
8163
8167
|
}
|
|
8164
8168
|
var getSplitStyles = function(props, staticConfig, theme, themeName, componentState, styleProps, parentSplitStyles, context, elementType, debug, skipThemeTokenResolution) {
|
|
8165
|
-
|
|
8166
|
-
|
|
8169
|
+
conf = conf || (0, import_config.getConfig)(), import_constants4.isWeb && styleProps.isAnimated && conf.animations.isReactNative && !styleProps.noNormalize && (styleProps.noNormalize = "values");
|
|
8170
|
+
var shorthands = conf.shorthands, isHOC = staticConfig.isHOC, isText = staticConfig.isText, isInput = staticConfig.isInput, variants = staticConfig.variants, isReactNative = staticConfig.isReactNative, inlineProps = staticConfig.inlineProps, inlineWhenUnflattened = staticConfig.inlineWhenUnflattened, parentStaticConfig = staticConfig.parentStaticConfig, acceptsClassName = staticConfig.acceptsClassName, viewProps = {}, mediaState3 = styleProps.mediaState || import_useMedia.mediaState, usedKeys = {}, shouldDoClasses = acceptsClassName && import_constants4.isWeb && !styleProps.noClassNames, rulesToInsert = void 0, classNames = {}, transforms = {}, pseudos = null, space = props.space, hasMedia = !1, dynamicThemeAccess, pseudoGroups, mediaGroups, className = props.className || "", mediaStylesSeen = 0, curPropsState, styleState = {
|
|
8171
|
+
// this should go away, right now we're doing really crazy cumulative props,
|
|
8172
|
+
// as variants are resolved basically we go back and merge the results onto
|
|
8173
|
+
// the curProps, so that each following variant function recieves the current
|
|
8174
|
+
// "styles" with variants expanded. powerful, but i think too fancy
|
|
8175
|
+
// there's some part of the ui kit that depends on it we'd have to find and fix
|
|
8176
|
+
get curProps() {
|
|
8177
|
+
return curPropsState || (curPropsState = {}), curPropsState;
|
|
8178
|
+
},
|
|
8179
|
+
classNames,
|
|
8180
|
+
conf,
|
|
8181
|
+
props,
|
|
8182
|
+
styleProps,
|
|
8183
|
+
componentState,
|
|
8184
|
+
staticConfig,
|
|
8185
|
+
style: null,
|
|
8186
|
+
theme,
|
|
8187
|
+
usedKeys,
|
|
8188
|
+
viewProps,
|
|
8189
|
+
context,
|
|
8190
|
+
debug,
|
|
8191
|
+
skipThemeTokenResolution
|
|
8192
|
+
};
|
|
8193
|
+
process.env.NODE_ENV === "development" && debug && debug !== "profile" && import_constants4.isClient && (consoleGroupCollapsed("getSplitStyles (collapsed)"), (0, import_log.log)({
|
|
8194
|
+
props,
|
|
8195
|
+
staticConfig,
|
|
8196
|
+
shouldDoClasses,
|
|
8197
|
+
styleProps,
|
|
8198
|
+
rulesToInsert,
|
|
8199
|
+
componentState,
|
|
8200
|
+
styleState,
|
|
8201
|
+
theme: _object_spread9({}, theme)
|
|
8202
|
+
}), console.groupEnd());
|
|
8203
|
+
var asChild = props.asChild, accept = staticConfig.accept, noSkip = styleProps.noSkip, disableExpandShorthands = styleProps.disableExpandShorthands, noExpand = styleProps.noExpand, webContainerType = conf.settings.webContainerType, parentVariants = parentStaticConfig == null ? void 0 : parentStaticConfig.variants;
|
|
8204
|
+
for (var keyOg in props) {
|
|
8205
|
+
var _loop = function(i2) {
|
|
8167
8206
|
var _parentStaticConfig_variants;
|
|
8168
8207
|
if (expanded) {
|
|
8169
|
-
var _expanded_i = _sliced_to_array(expanded[
|
|
8170
|
-
|
|
8208
|
+
var _expanded_i = _sliced_to_array(expanded[i2], 2), k = _expanded_i[0], v = _expanded_i[1];
|
|
8209
|
+
key = k, val = v;
|
|
8171
8210
|
}
|
|
8172
|
-
if (
|
|
8173
|
-
if (isPseudo =
|
|
8211
|
+
if (val == null || key in usedKeys) return "continue";
|
|
8212
|
+
if (isPseudo = key in import_helpers.validPseudoKeys, isMedia = !isPseudo && !isValidStyleKeyInit && (0, import_useMedia.isMediaKey)(key), isMediaOrPseudo1 = !!(isMedia || isPseudo), isVariant = variants && key in variants, inlineProps != null && inlineProps.has(key) || process.env.IS_STATIC === "is_static" && inlineWhenUnflattened != null && inlineWhenUnflattened.has(key)) {
|
|
8174
8213
|
var _props_key;
|
|
8175
|
-
viewProps[
|
|
8214
|
+
viewProps[key] = (_props_key = props[key]) !== null && _props_key !== void 0 ? _props_key : val;
|
|
8176
8215
|
}
|
|
8177
8216
|
var shouldPassThrough2 = styleProps.noExpand && isPseudo || isHOC && (isMediaOrPseudo1 || (parentStaticConfig == null || (_parentStaticConfig_variants = parentStaticConfig.variants) === null || _parentStaticConfig_variants === void 0 ? void 0 : _parentStaticConfig_variants[keyInit]));
|
|
8178
|
-
if (shouldPassThrough2) return passDownProp(viewProps,
|
|
8179
|
-
val
|
|
8180
|
-
after: _object_spread9({}, viewProps[
|
|
8217
|
+
if (shouldPassThrough2) return passDownProp(viewProps, key, val, isMediaOrPseudo1), process.env.NODE_ENV === "development" && debug === "verbose" && (consoleGroupCollapsed(" - passing down prop ".concat(key)), (0, import_log.log)({
|
|
8218
|
+
val,
|
|
8219
|
+
after: _object_spread9({}, viewProps[key])
|
|
8181
8220
|
}), console.groupEnd()), "continue";
|
|
8182
8221
|
if (isPseudo) {
|
|
8183
|
-
if (!
|
|
8184
|
-
var pseudoStyleObject = getSubStyle(styleState,
|
|
8222
|
+
if (!val) return "continue";
|
|
8223
|
+
var pseudoStyleObject = getSubStyle(styleState, key, val, styleProps.noClassNames), descriptor = import_pseudoDescriptors.pseudoDescriptors[key], isEnter = key === "enterStyle", isExit = key === "exitStyle";
|
|
8185
8224
|
if (!descriptor) return "continue";
|
|
8186
8225
|
if (!shouldDoClasses || process.env.IS_STATIC === "is_static") {
|
|
8187
8226
|
var _pseudos, _key;
|
|
8188
|
-
if (pseudos || (pseudos = {}), (_pseudos = pseudos)[_key =
|
|
8227
|
+
if (pseudos || (pseudos = {}), (_pseudos = pseudos)[_key = key] || (_pseudos[_key] = {}), process.env.IS_STATIC === "is_static") return Object.assign(pseudos[key], pseudoStyleObject), "continue";
|
|
8189
8228
|
}
|
|
8190
8229
|
if (shouldDoClasses && !isExit) {
|
|
8191
8230
|
var pseudoStyles = (0, import_getStylesAtomic.getStyleAtomic)(pseudoStyleObject, descriptor);
|
|
8192
|
-
process.env.NODE_ENV === "development" && debug === "verbose" && (consoleGroupCollapsed("pseudo (classes)",
|
|
8231
|
+
process.env.NODE_ENV === "development" && debug === "verbose" && (consoleGroupCollapsed("pseudo (classes)", key), (0, import_log.log)({
|
|
8193
8232
|
pseudoStyleObject,
|
|
8194
8233
|
pseudoStyles
|
|
8195
8234
|
}), console.groupEnd());
|
|
@@ -8211,7 +8250,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
8211
8250
|
}
|
|
8212
8251
|
if (!shouldDoClasses || isExit || isEnter) {
|
|
8213
8252
|
var descriptorKey = descriptor.stateKey || descriptor.name, isDisabled = componentState[descriptorKey] === !1;
|
|
8214
|
-
isExit && (isDisabled = !styleProps.isExiting), isEnter && componentState.unmounted === !1 && (isDisabled = !0), process.env.NODE_ENV === "development" && debug === "verbose" && (consoleGroupCollapsed("pseudo",
|
|
8253
|
+
isExit && (isDisabled = !styleProps.isExiting), isEnter && componentState.unmounted === !1 && (isDisabled = !0), process.env.NODE_ENV === "development" && debug === "verbose" && (consoleGroupCollapsed("pseudo", key, {
|
|
8215
8254
|
isDisabled
|
|
8216
8255
|
}), (0, import_log.log)({
|
|
8217
8256
|
pseudoStyleObject,
|
|
@@ -8227,7 +8266,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
8227
8266
|
var curImportance = usedKeys[pkey] || 0, shouldMerge = importance >= curImportance;
|
|
8228
8267
|
if (shouldMerge) {
|
|
8229
8268
|
var _pseudos1, _key1;
|
|
8230
|
-
pseudos || (pseudos = {}), (_pseudos1 = pseudos)[_key1 =
|
|
8269
|
+
pseudos || (pseudos = {}), (_pseudos1 = pseudos)[_key1 = key] || (_pseudos1[_key1] = {}), pseudos[key][pkey] = val12, mergeStyle(styleState, pkey, val12);
|
|
8231
8270
|
}
|
|
8232
8271
|
process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(" subKey", pkey, shouldMerge, {
|
|
8233
8272
|
importance,
|
|
@@ -8237,7 +8276,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
8237
8276
|
});
|
|
8238
8277
|
}
|
|
8239
8278
|
}
|
|
8240
|
-
if (!isDisabled) for (var key12 in
|
|
8279
|
+
if (!isDisabled) for (var key12 in val) {
|
|
8241
8280
|
var k1 = shorthands[key12] || key12;
|
|
8242
8281
|
usedKeys[k1] = Math.max(importance, usedKeys[k1] || 0);
|
|
8243
8282
|
}
|
|
@@ -8245,22 +8284,22 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
8245
8284
|
return "continue";
|
|
8246
8285
|
}
|
|
8247
8286
|
if (isMedia) {
|
|
8248
|
-
if (!
|
|
8249
|
-
var hasSpace =
|
|
8250
|
-
if (hasMedia || (hasMedia = !0), (hasSpace || !shouldDoClasses || styleProps.willBeAnimated) && (((typeof hasMedia > "u" ? "undefined" : _type_of3(hasMedia)) > "u" ? "undefined" : _type_of1(hasMedia)) !== "object" && (hasMedia = {}), hasMedia[mediaKeyShort] = !0), isMedia === "platform" && !(0, import_isActivePlatform.isActivePlatform)(
|
|
8251
|
-
if (process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(" \u{1F4FA} ".concat(
|
|
8252
|
-
key
|
|
8253
|
-
val
|
|
8287
|
+
if (!val) return "continue";
|
|
8288
|
+
var hasSpace = val.space, mediaKeyShort = key.slice(1);
|
|
8289
|
+
if (hasMedia || (hasMedia = !0), (hasSpace || !shouldDoClasses || styleProps.willBeAnimated) && (((typeof hasMedia > "u" ? "undefined" : _type_of3(hasMedia)) > "u" ? "undefined" : _type_of1(hasMedia)) !== "object" && (hasMedia = {}), hasMedia[mediaKeyShort] = !0), isMedia === "platform" && !(0, import_isActivePlatform.isActivePlatform)(key)) return "continue";
|
|
8290
|
+
if (process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(" \u{1F4FA} ".concat(key), {
|
|
8291
|
+
key,
|
|
8292
|
+
val,
|
|
8254
8293
|
props,
|
|
8255
8294
|
shouldDoClasses,
|
|
8256
8295
|
acceptsClassName,
|
|
8257
8296
|
componentState,
|
|
8258
8297
|
mediaState: mediaState3
|
|
8259
8298
|
}), shouldDoClasses) {
|
|
8260
|
-
var mediaStyle = getSubStyle(styleState,
|
|
8299
|
+
var mediaStyle = getSubStyle(styleState, key, val, !1);
|
|
8261
8300
|
if (hasSpace && (delete mediaStyle.space, mediaState3[mediaKeyShort])) {
|
|
8262
8301
|
var importance1 = (0, import_useMedia.getMediaImportanceIfMoreImportant)(mediaKeyShort, "space", usedKeys, !0);
|
|
8263
|
-
importance1 && (space =
|
|
8302
|
+
importance1 && (space = val.space, usedKeys.space = importance1, process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)("Found more important space for current media ".concat(mediaKeyShort, ": ").concat(val, " (importance: ").concat(importance1, ")")));
|
|
8264
8303
|
}
|
|
8265
8304
|
var mediaStyles = (0, import_getStylesAtomic.getStylesAtomic)(mediaStyle), priority = mediaStylesSeen;
|
|
8266
8305
|
mediaStylesSeen += 1;
|
|
@@ -8295,7 +8334,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
8295
8334
|
if (!mediaState3[mediaKeyShort]) return process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(" \u{1F4FA} \u274C DISABLED ".concat(mediaKeyShort)), "continue";
|
|
8296
8335
|
process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(" \u{1F4FA} \u2705 ENABLED ".concat(mediaKeyShort));
|
|
8297
8336
|
}
|
|
8298
|
-
var mediaStyle1 = getSubStyle(styleState,
|
|
8337
|
+
var mediaStyle1 = getSubStyle(styleState, key, val, !0), importanceBump = 0;
|
|
8299
8338
|
if (isThemeMedia) {
|
|
8300
8339
|
dynamicThemeAccess = !0;
|
|
8301
8340
|
var mediaThemeName = mediaKeyShort.slice(6);
|
|
@@ -8337,148 +8376,124 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
8337
8376
|
}
|
|
8338
8377
|
return "continue";
|
|
8339
8378
|
}
|
|
8340
|
-
if (
|
|
8379
|
+
if (key === "pointerEvents") return viewProps[key] = val, "continue";
|
|
8341
8380
|
if (
|
|
8342
8381
|
// is HOC we can just pass through the styles as props
|
|
8343
8382
|
// this fixes issues where style prop got merged with wrong priority
|
|
8344
|
-
!isHOC && (isValidStyleKey(
|
|
8345
|
-
) return mergeStyle(styleState,
|
|
8346
|
-
isVariant || (viewProps[
|
|
8347
|
-
}, keyInit =
|
|
8383
|
+
!isHOC && (isValidStyleKey(key, staticConfig) || import_constants4.isAndroid && key === "elevation")
|
|
8384
|
+
) return mergeStyle(styleState, key, val), "continue";
|
|
8385
|
+
isVariant || (viewProps[key] = val);
|
|
8386
|
+
}, keyInit = keyOg, valInit = props[keyInit];
|
|
8348
8387
|
if (accept) {
|
|
8349
8388
|
var accepted = accept[keyInit];
|
|
8350
|
-
if ((accepted === "style" || accepted === "textStyle") && valInit && ((typeof valInit > "u" ? "undefined" : _type_of3(valInit)) > "u" ? "undefined" : _type_of1(valInit)) === "object")
|
|
8351
|
-
|
|
8352
|
-
|
|
8353
|
-
|
|
8354
|
-
if (keyInit === "group" && !1) var identifier2, containerType, containerCSS;
|
|
8355
|
-
return "continue";
|
|
8389
|
+
if ((accepted === "style" || accepted === "textStyle") && valInit && ((typeof valInit > "u" ? "undefined" : _type_of3(valInit)) > "u" ? "undefined" : _type_of1(valInit)) === "object") {
|
|
8390
|
+
viewProps[keyInit] = getSubStyle(styleState, keyInit, valInit, styleProps.noClassNames);
|
|
8391
|
+
continue;
|
|
8392
|
+
}
|
|
8356
8393
|
}
|
|
8357
|
-
|
|
8358
|
-
|
|
8359
|
-
|
|
8360
|
-
|
|
8361
|
-
|
|
8362
|
-
|
|
8363
|
-
if (
|
|
8364
|
-
|
|
8365
|
-
|
|
8366
|
-
|
|
8367
|
-
|
|
8368
|
-
|
|
8369
|
-
|
|
8370
|
-
|
|
8371
|
-
|
|
8372
|
-
|
|
8373
|
-
|
|
8374
|
-
|
|
8375
|
-
|
|
8376
|
-
|
|
8377
|
-
|
|
8378
|
-
|
|
8379
|
-
|
|
8380
|
-
|
|
8381
|
-
|
|
8382
|
-
isVariant
|
|
8383
|
-
|
|
8384
|
-
|
|
8385
|
-
|
|
8386
|
-
|
|
8387
|
-
variant: variants == null ? void 0 : variants[keyInit],
|
|
8388
|
-
isVariant,
|
|
8389
|
-
isHOCShouldPassThrough,
|
|
8390
|
-
curProps: _object_spread9({}, styleState.curProps),
|
|
8391
|
-
parentStaticConfig
|
|
8392
|
-
})), shouldPassThrough && (passDownProp(viewProps, keyInit, valInit, isMediaOrPseudo1), !isVariant) || !noSkip && keyInit in import_skipProps.skipProps) return process.env.NODE_ENV === "development" && debug === "verbose" && console.groupEnd(), "continue";
|
|
8393
|
-
(isText || isInput) && valInit && (keyInit === "fontFamily" || keyInit === shorthands.fontFamily) && valInit in conf.fontsParsed && (styleState.fontFamily = valInit);
|
|
8394
|
-
var avoidPropMap = isMediaOrPseudo1 || !isVariant && !isValidStyleKeyInit, expanded = avoidPropMap ? null : (0, import_propMapper.propMapper)(keyInit, valInit, styleState);
|
|
8395
|
-
if (!avoidPropMap) {
|
|
8396
|
-
if (!expanded) return "continue";
|
|
8397
|
-
var next = (0, import_propMapper.getPropMappedFontFamily)(expanded);
|
|
8398
|
-
next && (styleState.fontFamily = next);
|
|
8399
|
-
}
|
|
8400
|
-
if (process.env.NODE_ENV === "development" && debug === "verbose") {
|
|
8401
|
-
consoleGroupCollapsed(" \u{1F4A0} expanded", keyInit, valInit);
|
|
8402
|
-
try {
|
|
8403
|
-
!import_constants4.isServer && import_isDevTools.isDevTools && ((0, import_log.log)({
|
|
8404
|
-
expanded,
|
|
8405
|
-
styleProps,
|
|
8406
|
-
componentState,
|
|
8394
|
+
if (process.env.NODE_ENV === "development" && debug === "verbose" && console.groupEnd(), disableExpandShorthands || keyInit in shorthands && (keyInit = shorthands[keyInit]), keyInit !== "className" && !(keyInit in usedKeys)) {
|
|
8395
|
+
if (keyInit in import_skipProps.skipProps && !noSkip && !isHOC) {
|
|
8396
|
+
if (keyInit === "group" && !1) var identifier, containerType, containerCSS;
|
|
8397
|
+
continue;
|
|
8398
|
+
}
|
|
8399
|
+
var valInitType = (typeof valInit > "u" ? "undefined" : _type_of3(valInit)) > "u" ? "undefined" : _type_of1(valInit), isValidStyleKeyInit = isValidStyleKey(keyInit, staticConfig);
|
|
8400
|
+
if (0) {
|
|
8401
|
+
var isValidClassName, isMediaOrPseudo;
|
|
8402
|
+
if ((isValidClassName || isMediaOrPseudo) && !shouldDoClasses) var _styleState;
|
|
8403
|
+
}
|
|
8404
|
+
if (!isValidStyleKeyInit) {
|
|
8405
|
+
if (!import_constants4.isAndroid && keyInit === "elevationAndroid") continue;
|
|
8406
|
+
if (keyInit === "userSelect") keyInit = "selectable", valInit = valInit !== "none";
|
|
8407
|
+
else if (keyInit.startsWith("data-")) continue;
|
|
8408
|
+
}
|
|
8409
|
+
if (keyInit === "dataSet") {
|
|
8410
|
+
for (var keyInit1 in valInit) viewProps["data-".concat(hyphenate(keyInit1))] = valInit[keyInit1];
|
|
8411
|
+
continue;
|
|
8412
|
+
}
|
|
8413
|
+
if (0) var didUseKeyInit;
|
|
8414
|
+
var isShorthand = keyInit in shorthands, isVariant = !isValidStyleKeyInit && variants && keyInit in variants, isStyleLikeKey = isShorthand || isValidStyleKeyInit || isVariant, isPseudo = keyInit in import_helpers.validPseudoKeys, isMedia = !isStyleLikeKey && !isPseudo && (0, import_useMedia.isMediaKey)(keyInit), isMediaOrPseudo1 = !!(isMedia || isPseudo);
|
|
8415
|
+
if (isMediaOrPseudo1 && keyInit.startsWith("$group-")) {
|
|
8416
|
+
var name = keyInit.split("-")[1];
|
|
8417
|
+
context != null && context.groups.subscribe && !(context != null && context.groups.state[name]) && (keyInit = keyInit.replace("$group-", "$group-true-"));
|
|
8418
|
+
}
|
|
8419
|
+
var isStyleProp = isValidStyleKeyInit || isMediaOrPseudo1 || isVariant && !noExpand || isShorthand;
|
|
8420
|
+
if (!(isStyleProp && (asChild === "except-style" || asChild === "except-style-web"))) {
|
|
8421
|
+
var shouldPassProp = !isStyleProp || // is in parent variants
|
|
8422
|
+
isHOC && parentVariants && keyInit in parentVariants || (inlineProps == null ? void 0 : inlineProps.has(keyInit)), parentVariant = parentVariants == null ? void 0 : parentVariants[keyInit], isHOCShouldPassThrough = !!(isHOC && (isShorthand || isValidStyleKeyInit || isMediaOrPseudo1 || parentVariant || keyInit in import_skipProps.skipProps)), shouldPassThrough = shouldPassProp || isHOCShouldPassThrough;
|
|
8423
|
+
if (process.env.NODE_ENV === "development" && debug === "verbose" && (console.groupEnd(), console.groupEnd(), consoleGroupCollapsed(" \u{1F511} ".concat(keyOg).concat(keyInit !== keyOg ? " (shorthand for ".concat(keyInit, ")") : "", " ").concat(shouldPassThrough ? "(pass)" : "")), (0, import_log.log)({
|
|
8407
8424
|
isVariant,
|
|
8425
|
+
valInit,
|
|
8426
|
+
shouldPassProp
|
|
8427
|
+
}), import_constants4.isClient && (0, import_log.log)({
|
|
8428
|
+
variants,
|
|
8408
8429
|
variant: variants == null ? void 0 : variants[keyInit],
|
|
8409
|
-
|
|
8430
|
+
isVariant,
|
|
8410
8431
|
isHOCShouldPassThrough,
|
|
8411
|
-
|
|
8412
|
-
|
|
8413
|
-
}), (
|
|
8432
|
+
curProps: _object_spread9({}, styleState.curProps),
|
|
8433
|
+
parentStaticConfig
|
|
8434
|
+
})), shouldPassThrough && (passDownProp(viewProps, keyInit, valInit, isMediaOrPseudo1), !isVariant)) {
|
|
8435
|
+
process.env.NODE_ENV === "development" && debug === "verbose" && console.groupEnd();
|
|
8436
|
+
continue;
|
|
8437
|
+
}
|
|
8438
|
+
if (!noSkip && keyInit in import_skipProps.skipProps) {
|
|
8439
|
+
process.env.NODE_ENV === "development" && debug === "verbose" && console.groupEnd();
|
|
8440
|
+
continue;
|
|
8441
|
+
}
|
|
8442
|
+
(isText || isInput) && valInit && (keyInit === "fontFamily" || keyInit === shorthands.fontFamily) && valInit in conf.fontsParsed && (styleState.fontFamily = valInit);
|
|
8443
|
+
var avoidPropMap = isMediaOrPseudo1 || !isVariant && !isValidStyleKeyInit, expanded = avoidPropMap ? null : (0, import_propMapper.propMapper)(keyInit, valInit, styleState);
|
|
8444
|
+
if (!avoidPropMap) {
|
|
8445
|
+
if (!expanded) continue;
|
|
8446
|
+
var next = (0, import_propMapper.getPropMappedFontFamily)(expanded);
|
|
8447
|
+
next && (styleState.fontFamily = next);
|
|
8448
|
+
}
|
|
8449
|
+
if (process.env.NODE_ENV === "development" && debug === "verbose") {
|
|
8450
|
+
consoleGroupCollapsed(" \u{1F4A0} expanded", keyInit, valInit);
|
|
8451
|
+
try {
|
|
8452
|
+
!import_constants4.isServer && import_isDevTools.isDevTools && ((0, import_log.log)({
|
|
8453
|
+
expanded,
|
|
8454
|
+
styleProps,
|
|
8455
|
+
componentState,
|
|
8456
|
+
isVariant,
|
|
8457
|
+
variant: variants == null ? void 0 : variants[keyInit],
|
|
8458
|
+
shouldPassProp,
|
|
8459
|
+
isHOCShouldPassThrough,
|
|
8460
|
+
usedKeys: _object_spread9({}, usedKeys),
|
|
8461
|
+
curProps: _object_spread9({}, styleState.curProps)
|
|
8462
|
+
}), (0, import_log.log)("expanded", expanded, `
|
|
8414
8463
|
usedKeys`, _object_spread9({}, usedKeys), `
|
|
8415
8464
|
current`, _object_spread9({}, styleState.style)));
|
|
8416
|
-
|
|
8417
|
-
|
|
8418
|
-
|
|
8419
|
-
|
|
8420
|
-
|
|
8421
|
-
|
|
8422
|
-
|
|
8423
|
-
|
|
8424
|
-
|
|
8465
|
+
} catch {
|
|
8466
|
+
}
|
|
8467
|
+
console.groupEnd();
|
|
8468
|
+
}
|
|
8469
|
+
for (var key = keyInit, val = valInit, max2 = expanded ? expanded.length : 1, i = 0; i < max2; i++) _loop(i);
|
|
8470
|
+
if (process.env.NODE_ENV === "development" && debug === "verbose") {
|
|
8471
|
+
try {
|
|
8472
|
+
(0, import_log.log)(" \u2714\uFE0F expand complete", keyInit), (0, import_log.log)("style", _object_spread9({}, styleState.style)), (0, import_log.log)("transforms", _object_spread9({}, transforms)), (0, import_log.log)("viewProps", _object_spread9({}, viewProps));
|
|
8473
|
+
} catch {
|
|
8474
|
+
}
|
|
8475
|
+
console.groupEnd();
|
|
8476
|
+
}
|
|
8425
8477
|
}
|
|
8426
|
-
console.groupEnd();
|
|
8427
8478
|
}
|
|
8428
|
-
}
|
|
8429
|
-
conf = conf || (0, import_config.getConfig)(), import_constants4.isWeb && styleProps.isAnimated && conf.animations.isReactNative && !styleProps.noNormalize && (styleProps.noNormalize = "values");
|
|
8430
|
-
var shorthands = conf.shorthands, isHOC = staticConfig.isHOC, isText = staticConfig.isText, isInput = staticConfig.isInput, variants = staticConfig.variants, isReactNative = staticConfig.isReactNative, inlineProps = staticConfig.inlineProps, inlineWhenUnflattened = staticConfig.inlineWhenUnflattened, parentStaticConfig = staticConfig.parentStaticConfig, acceptsClassName = staticConfig.acceptsClassName, viewProps = {}, mediaState3 = styleProps.mediaState || import_useMedia.mediaState, usedKeys = {}, shouldDoClasses = acceptsClassName && import_constants4.isWeb && !styleProps.noClassNames, rulesToInsert = void 0, classNames = {}, transforms = {}, pseudos = null, space = props.space, hasMedia = !1, dynamicThemeAccess, pseudoGroups, mediaGroups, className = props.className || "", mediaStylesSeen = 0, curPropsState, styleState = {
|
|
8431
|
-
// this should go away, right now we're doing really crazy cumulative props,
|
|
8432
|
-
// as variants are resolved basically we go back and merge the results onto
|
|
8433
|
-
// the curProps, so that each following variant function recieves the current
|
|
8434
|
-
// "styles" with variants expanded. powerful, but i think too fancy
|
|
8435
|
-
// there's some part of the ui kit that depends on it we'd have to find and fix
|
|
8436
|
-
get curProps() {
|
|
8437
|
-
return curPropsState || (curPropsState = {}), curPropsState;
|
|
8438
|
-
},
|
|
8439
|
-
classNames,
|
|
8440
|
-
conf,
|
|
8441
|
-
props,
|
|
8442
|
-
styleProps,
|
|
8443
|
-
componentState,
|
|
8444
|
-
staticConfig,
|
|
8445
|
-
style: null,
|
|
8446
|
-
theme,
|
|
8447
|
-
usedKeys,
|
|
8448
|
-
viewProps,
|
|
8449
|
-
context,
|
|
8450
|
-
debug,
|
|
8451
|
-
skipThemeTokenResolution
|
|
8452
|
-
};
|
|
8453
|
-
process.env.NODE_ENV === "development" && debug && debug !== "profile" && import_constants4.isClient && (consoleGroupCollapsed("getSplitStyles (collapsed)"), (0, import_log.log)({
|
|
8454
|
-
props,
|
|
8455
|
-
staticConfig,
|
|
8456
|
-
shouldDoClasses,
|
|
8457
|
-
styleProps,
|
|
8458
|
-
rulesToInsert,
|
|
8459
|
-
componentState,
|
|
8460
|
-
styleState,
|
|
8461
|
-
theme: _object_spread9({}, theme)
|
|
8462
|
-
}), console.groupEnd());
|
|
8463
|
-
var asChild = props.asChild, accept = staticConfig.accept, noSkip = styleProps.noSkip, disableExpandShorthands = styleProps.disableExpandShorthands, noExpand = styleProps.noExpand, webContainerType = conf.settings.webContainerType, parentVariants = parentStaticConfig == null ? void 0 : parentStaticConfig.variants;
|
|
8464
|
-
for (var keyOg in props) _loop(keyOg);
|
|
8479
|
+
}
|
|
8465
8480
|
var avoidNormalize = styleProps.noNormalize === !1;
|
|
8466
8481
|
if (!avoidNormalize) {
|
|
8467
8482
|
if (styleState.style && ((0, import_expandStyles.fixStyles)(styleState.style), import_constants4.isWeb && !isReactNative && (0, import_getStylesAtomic.styleToCSS)(styleState.style)), styleState.flatTransforms) {
|
|
8468
|
-
var
|
|
8469
|
-
(
|
|
8483
|
+
var _styleState1;
|
|
8484
|
+
(_styleState1 = styleState).style || (_styleState1.style = {}), Object.entries(styleState.flatTransforms).sort(function(param, param1) {
|
|
8470
8485
|
var _param = _sliced_to_array(param, 1), a = _param[0], _param1 = _sliced_to_array(param1, 1), b = _param1[0];
|
|
8471
8486
|
return a.localeCompare(b);
|
|
8472
8487
|
}).forEach(function(param) {
|
|
8473
|
-
var _param = _sliced_to_array(param, 2),
|
|
8474
|
-
mergeTransform(styleState.style,
|
|
8488
|
+
var _param = _sliced_to_array(param, 2), key5 = _param[0], val3 = _param[1];
|
|
8489
|
+
mergeTransform(styleState.style, key5, val3, !0);
|
|
8475
8490
|
});
|
|
8476
8491
|
}
|
|
8477
8492
|
if (parentSplitStyles) {
|
|
8478
|
-
if (0) for (var
|
|
8479
|
-
if (!shouldDoClasses) for (var
|
|
8480
|
-
var
|
|
8481
|
-
|
|
8493
|
+
if (0) for (var key1 in parentSplitStyles.classNames) var val1;
|
|
8494
|
+
if (!shouldDoClasses) for (var key2 in parentSplitStyles.style) {
|
|
8495
|
+
var _styleState2;
|
|
8496
|
+
key2 in classNames || styleState.style && key2 in styleState.style || ((_styleState2 = styleState).style || (_styleState2.style = {}), styleState.style[key2] = parentSplitStyles.style[key2]);
|
|
8482
8497
|
}
|
|
8483
8498
|
}
|
|
8484
8499
|
}
|
|
@@ -8489,7 +8504,7 @@ current`, _object_spread9({}, styleState.style)));
|
|
|
8489
8504
|
if (!styleState.style.$$css) {
|
|
8490
8505
|
var atomic, _iteratorNormalCompletion, _didIteratorError, _iteratorError;
|
|
8491
8506
|
try {
|
|
8492
|
-
for (var _iterator, _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) var atomicStyle, _props_animateOnly, _atomicStyle,
|
|
8507
|
+
for (var _iterator, _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) var atomicStyle, _props_animateOnly, _atomicStyle, key3, value, identifier1, isAnimatedAndAnimateOnly, nonAnimatedAnimateOnly;
|
|
8493
8508
|
} catch (err) {
|
|
8494
8509
|
} finally {
|
|
8495
8510
|
try {
|
|
@@ -8498,8 +8513,8 @@ current`, _object_spread9({}, styleState.style)));
|
|
|
8498
8513
|
}
|
|
8499
8514
|
}
|
|
8500
8515
|
if (transforms) for (var namespace in transforms) {
|
|
8501
|
-
var _transforms_namespace, hash,
|
|
8502
|
-
if (import_constants4.isClient && !insertedTransforms[
|
|
8516
|
+
var _transforms_namespace, hash, val2, identifier2;
|
|
8517
|
+
if (import_constants4.isClient && !insertedTransforms[identifier2]) var rule;
|
|
8503
8518
|
}
|
|
8504
8519
|
}
|
|
8505
8520
|
if (isReactNative) {
|
|
@@ -8508,12 +8523,12 @@ current`, _object_spread9({}, styleState.style)));
|
|
|
8508
8523
|
}
|
|
8509
8524
|
var styleProp = props.style;
|
|
8510
8525
|
if (styleProp) if (isHOC) viewProps.style = normalizeStyle(styleProp);
|
|
8511
|
-
else for (var isArray = Array.isArray(styleProp), len = isArray ? styleProp.length : 1,
|
|
8512
|
-
var style = isArray ? styleProp[
|
|
8526
|
+
else for (var isArray = Array.isArray(styleProp), len = isArray ? styleProp.length : 1, i1 = 0; i1 < len; i1++) {
|
|
8527
|
+
var style = isArray ? styleProp[i1] : styleProp;
|
|
8513
8528
|
if (style) if (style.$$css) Object.assign(styleState.classNames, style);
|
|
8514
8529
|
else {
|
|
8515
|
-
var
|
|
8516
|
-
(
|
|
8530
|
+
var _styleState3;
|
|
8531
|
+
(_styleState3 = styleState).style || (_styleState3.style = {}), Object.assign(styleState.style, normalizeStyle(style));
|
|
8517
8532
|
}
|
|
8518
8533
|
}
|
|
8519
8534
|
var style1 = styleState.style;
|
|
@@ -8545,7 +8560,7 @@ current`, _object_spread9({}, styleState.style)));
|
|
|
8545
8560
|
if (!styleProps.noMergeStyle && !(styleProps.isAnimated && !conf.animations.supportsCSSVars && isReactNative) && isReactNative) {
|
|
8546
8561
|
var cnStyles, _iteratorNormalCompletion1, _didIteratorError1, _iteratorError1;
|
|
8547
8562
|
try {
|
|
8548
|
-
for (var _iterator1, _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = !0) var
|
|
8563
|
+
for (var _iterator1, _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = !0) var name1;
|
|
8549
8564
|
} catch (err) {
|
|
8550
8565
|
} finally {
|
|
8551
8566
|
try {
|
|
@@ -8566,7 +8581,7 @@ current`, _object_spread9({}, styleState.style)));
|
|
|
8566
8581
|
rulesToInsert,
|
|
8567
8582
|
parentSplitStyles
|
|
8568
8583
|
});
|
|
8569
|
-
for (var
|
|
8584
|
+
for (var key4 in logs) (0, import_log.log)(key4, logs[key4]);
|
|
8570
8585
|
} catch {
|
|
8571
8586
|
}
|
|
8572
8587
|
console.groupEnd();
|
|
@@ -17224,50 +17239,29 @@ var require_index_native21 = __commonJS({
|
|
|
17224
17239
|
});
|
|
17225
17240
|
module2.exports = __toCommonJS2(src_exports2);
|
|
17226
17241
|
var import_core12 = require_index_native16();
|
|
17227
|
-
function _define_property9(obj, key, value) {
|
|
17228
|
-
return key in obj ? Object.defineProperty(obj, key, {
|
|
17229
|
-
value,
|
|
17230
|
-
enumerable: !0,
|
|
17231
|
-
configurable: !0,
|
|
17232
|
-
writable: !0
|
|
17233
|
-
}) : obj[key] = value, obj;
|
|
17234
|
-
}
|
|
17235
|
-
function _object_spread9(target) {
|
|
17236
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
17237
|
-
var source = arguments[i] != null ? arguments[i] : {}, ownKeys8 = Object.keys(source);
|
|
17238
|
-
typeof Object.getOwnPropertySymbols == "function" && (ownKeys8 = ownKeys8.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
17239
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
17240
|
-
}))), ownKeys8.forEach(function(key) {
|
|
17241
|
-
_define_property9(target, key, source[key]);
|
|
17242
|
-
});
|
|
17243
|
-
}
|
|
17244
|
-
return target;
|
|
17245
|
-
}
|
|
17246
17242
|
function _type_of1(obj) {
|
|
17247
17243
|
"@swc/helpers - typeof";
|
|
17248
17244
|
return obj && typeof Symbol < "u" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
17249
17245
|
}
|
|
17250
17246
|
var getFontSized2 = function() {
|
|
17251
17247
|
var sizeTokenIn = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "$true", _ref = arguments.length > 1 ? arguments[1] : void 0, font = _ref.font, fontFamily = _ref.fontFamily, props = _ref.props, _font_lineHeight, _font_weight, _font_letterSpacing, _font_transform, _font_style, _font_color;
|
|
17252
|
-
if (
|
|
17253
|
-
|
|
17254
|
-
|
|
17248
|
+
if (font) {
|
|
17249
|
+
var sizeToken = sizeTokenIn === "$true" ? getDefaultSizeToken(font) : sizeTokenIn, fontSize = font.size[sizeToken], lineHeight = (_font_lineHeight = font.lineHeight) === null || _font_lineHeight === void 0 ? void 0 : _font_lineHeight[sizeToken], fontWeight = (_font_weight = font.weight) === null || _font_weight === void 0 ? void 0 : _font_weight[sizeToken], letterSpacing = (_font_letterSpacing = font.letterSpacing) === null || _font_letterSpacing === void 0 ? void 0 : _font_letterSpacing[sizeToken], textTransform = (_font_transform = font.transform) === null || _font_transform === void 0 ? void 0 : _font_transform[sizeToken], _props_fontStyle, fontStyle = (_props_fontStyle = props.fontStyle) !== null && _props_fontStyle !== void 0 ? _props_fontStyle : (_font_style = font.style) === null || _font_style === void 0 ? void 0 : _font_style[sizeToken], _props_color, color = (_props_color = props.color) !== null && _props_color !== void 0 ? _props_color : (_font_color = font.color) === null || _font_color === void 0 ? void 0 : _font_color[sizeToken], style = {
|
|
17250
|
+
color,
|
|
17251
|
+
fontStyle,
|
|
17252
|
+
textTransform,
|
|
17253
|
+
fontFamily,
|
|
17254
|
+
fontWeight,
|
|
17255
|
+
letterSpacing,
|
|
17256
|
+
fontSize,
|
|
17257
|
+
lineHeight
|
|
17258
|
+
};
|
|
17259
|
+
return process.env.NODE_ENV === "development" && props.debug && props.debug === "verbose" && (console.groupCollapsed(" \u{1F539} getFontSized", sizeTokenIn, sizeToken), console.info({
|
|
17260
|
+
style,
|
|
17261
|
+
props,
|
|
17262
|
+
font
|
|
17263
|
+
}), console.groupEnd()), style;
|
|
17255
17264
|
}
|
|
17256
|
-
var sizeToken = sizeTokenIn === "$true" ? getDefaultSizeToken(font) : sizeTokenIn, fontSize = font.size[sizeToken], lineHeight = (_font_lineHeight = font.lineHeight) === null || _font_lineHeight === void 0 ? void 0 : _font_lineHeight[sizeToken], fontWeight = (_font_weight = font.weight) === null || _font_weight === void 0 ? void 0 : _font_weight[sizeToken], letterSpacing = (_font_letterSpacing = font.letterSpacing) === null || _font_letterSpacing === void 0 ? void 0 : _font_letterSpacing[sizeToken], textTransform = (_font_transform = font.transform) === null || _font_transform === void 0 ? void 0 : _font_transform[sizeToken], _props_fontStyle, fontStyle = (_props_fontStyle = props.fontStyle) !== null && _props_fontStyle !== void 0 ? _props_fontStyle : (_font_style = font.style) === null || _font_style === void 0 ? void 0 : _font_style[sizeToken], _props_color, color = (_props_color = props.color) !== null && _props_color !== void 0 ? _props_color : (_font_color = font.color) === null || _font_color === void 0 ? void 0 : _font_color[sizeToken], style = {
|
|
17257
|
-
color,
|
|
17258
|
-
fontStyle,
|
|
17259
|
-
textTransform,
|
|
17260
|
-
fontFamily,
|
|
17261
|
-
fontWeight,
|
|
17262
|
-
letterSpacing,
|
|
17263
|
-
fontSize,
|
|
17264
|
-
lineHeight
|
|
17265
|
-
};
|
|
17266
|
-
return process.env.NODE_ENV === "development" && props.debug && props.debug === "verbose" && (console.groupCollapsed(" \u{1F539} getFontSized", sizeTokenIn, sizeToken), console.info({
|
|
17267
|
-
style,
|
|
17268
|
-
props,
|
|
17269
|
-
font
|
|
17270
|
-
}), console.groupEnd()), style;
|
|
17271
17265
|
}, cache = /* @__PURE__ */ new WeakMap();
|
|
17272
17266
|
function getDefaultSizeToken(font) {
|
|
17273
17267
|
if (((typeof font > "u" ? "undefined" : _type_of3(font)) > "u" ? "undefined" : _type_of1(font)) === "object" && cache.has(font)) return cache.get(font);
|