@tamagui/web 3.0.0-beta.653.1 → 3.0.0-beta.655.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 (31) hide show
  1. package/dist/cjs/helpers/directStyle.cjs +2 -1
  2. package/dist/cjs/helpers/directStyle.native.cjs +3 -2
  3. package/dist/cjs/helpers/directStyle.native.js +3 -2
  4. package/dist/cjs/helpers/directStyle.native.js.map +1 -1
  5. package/dist/cjs/helpers/getSplitStyles.cjs +0 -12
  6. package/dist/cjs/helpers/getSplitStyles.native.cjs +35 -35
  7. package/dist/cjs/helpers/getSplitStyles.native.js +35 -35
  8. package/dist/cjs/helpers/getSplitStyles.native.js.map +1 -1
  9. package/dist/cjs/helpers/registerCSSVariable.cjs +7 -15
  10. package/dist/cjs/helpers/registerCSSVariable.native.cjs +7 -15
  11. package/dist/cjs/helpers/registerCSSVariable.native.js +7 -15
  12. package/dist/cjs/helpers/registerCSSVariable.native.js.map +1 -1
  13. package/dist/esm/helpers/directStyle.mjs +3 -2
  14. package/dist/esm/helpers/directStyle.mjs.map +1 -1
  15. package/dist/esm/helpers/directStyle.native.js +4 -3
  16. package/dist/esm/helpers/directStyle.native.js.map +1 -1
  17. package/dist/esm/helpers/getSplitStyles.mjs +3 -15
  18. package/dist/esm/helpers/getSplitStyles.mjs.map +1 -1
  19. package/dist/esm/helpers/getSplitStyles.native.js +35 -35
  20. package/dist/esm/helpers/getSplitStyles.native.js.map +1 -1
  21. package/dist/esm/helpers/registerCSSVariable.mjs +7 -15
  22. package/dist/esm/helpers/registerCSSVariable.mjs.map +1 -1
  23. package/dist/esm/helpers/registerCSSVariable.native.js +7 -15
  24. package/dist/esm/helpers/registerCSSVariable.native.js.map +1 -1
  25. package/package.json +15 -15
  26. package/src/helpers/directStyle.ts +12 -4
  27. package/src/helpers/getSplitStyles.tsx +1 -38
  28. package/src/helpers/registerCSSVariable.ts +7 -29
  29. package/types/helpers/directStyle.d.ts.map +1 -1
  30. package/types/helpers/getSplitStyles.d.ts.map +1 -1
  31. package/types/helpers/registerCSSVariable.d.ts.map +1 -1
@@ -201,9 +201,9 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
201
201
  };
202
202
  if (process.env.IS_STATIC === "is_static") {
203
203
  var { fallbackProps } = styleProps;
204
- if (fallbackProps) styleState.props = new Proxy(props, { get(_, key9, val2) {
205
- if (!Reflect.has(props, key9)) return Reflect.get(fallbackProps, key9);
206
- return Reflect.get(props, key9);
204
+ if (fallbackProps) styleState.props = new Proxy(props, { get(_, key8, val2) {
205
+ if (!Reflect.has(props, key8)) return Reflect.get(fallbackProps, key8);
206
+ return Reflect.get(props, key8);
207
207
  } });
208
208
  }
209
209
  if (process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`style-state`;
@@ -243,7 +243,7 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
243
243
  var style2 = isArray ? styleProp[index] : styleProp;
244
244
  if (!style2) continue;
245
245
  if (style2["$$css"]) {
246
- for (var key9 in style2) (0, import_directStyle.clearDirectStyle)(styleState, key9);
246
+ for (var key8 in style2) (0, import_directStyle.clearDirectStyle)(styleState, key8);
247
247
  Object.assign(styleState.classNames, style2);
248
248
  continue;
249
249
  }
@@ -396,58 +396,58 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
396
396
  (0, import_directStyle.contributeStyleValue)(styleState, keyInit, valInit, mergeStyle);
397
397
  return;
398
398
  }
399
- (0, import_propMapper.propMapper)(keyInit, valInit, styleState, disablePropMap, function(key9, val2, originalVal, conditionSource) {
399
+ (0, import_propMapper.propMapper)(keyInit, valInit, styleState, disablePropMap, function(key8, val2, originalVal, conditionSource) {
400
400
  var _parentStaticConfig_variants;
401
- var isStyledContextProp = styledContext && key9 in styledContext;
402
- if (key9 === "className") {
401
+ var isStyledContextProp = styledContext && key8 in styledContext;
402
+ if (key8 === "className") {
403
403
  if (typeof val2 === "string" && val2) className = `${className} ${val2}`.trim();
404
404
  return;
405
405
  }
406
406
  if (!isHOC && disablePropMap && !isStyledContextProp) {
407
- if (key9 in import_helpers.stylePropsAll && !isValidStyleKey(key9, validStyles, accept)) {
408
- if (process.env.NODE_ENV === "development") console.warn(`[tamagui] "${key9}" is a text style prop and this component is not text \u2014 it would render on neither platform. Use a Text-based component, or html.* for raw web elements.`);
407
+ if (key8 in import_helpers.stylePropsAll && !isValidStyleKey(key8, validStyles, accept)) {
408
+ if (process.env.NODE_ENV === "development") console.warn(`[tamagui] "${key8}" is a text style prop and this component is not text \u2014 it would render on neither platform. Use a Text-based component, or html.* for raw web elements.`);
409
409
  return;
410
410
  }
411
- viewProps[key9] = val2;
411
+ viewProps[key8] = val2;
412
412
  return;
413
413
  }
414
414
  if (process.env.NODE_ENV === "development" && debug === "verbose") {
415
- console.groupCollapsed(" 💠 expanded", keyInit, "=>", key9);
415
+ console.groupCollapsed(" 💠 expanded", keyInit, "=>", key8);
416
416
  (0, import_log.log)(val2);
417
417
  console.groupEnd();
418
418
  }
419
419
  if (val2 == null) return;
420
- if (accept && key9 in accept) {
421
- viewProps[key9] = val2;
420
+ if (accept && key8 in accept) {
421
+ viewProps[key8] = val2;
422
422
  return;
423
423
  }
424
- var isHostStyleKey = !isHOC && isValidStyleKey(key9, validStyles, accept) || import_constants.isAndroid && key9 === "elevation";
424
+ var isHostStyleKey = !isHOC && isValidStyleKey(key8, validStyles, accept) || import_constants.isAndroid && key8 === "elevation";
425
425
  var isContextProgramKey = !isHOC && Boolean(isStyledContextProp);
426
426
  if (conditionSource !== void 0) {
427
- if (isHostStyleKey || isContextProgramKey) (0, import_directStyle.contributeVariantClauseValue)(styleState, key9, val2, conditionSource, mergeStyle, originalVal, !isHostStyleKey);
427
+ if (isHostStyleKey || isContextProgramKey) (0, import_directStyle.contributeVariantClauseValue)(styleState, key8, val2, conditionSource, mergeStyle, originalVal, !isHostStyleKey);
428
428
  else if (isHOC) {
429
- var appended = (0, import_propMapper.appendFlatClause)(viewProps[key9], conditionSource, val2);
430
- if (appended !== void 0) viewProps[key9] = appended;
431
- else if (process.env.NODE_ENV === "development") console.warn(`[tamagui] conditional variant value for "${key9}" is not string-representable; dropping the clause`);
432
- } else if (process.env.NODE_ENV === "development") console.warn(`[tamagui] "${key9}" is not a valid style on this component; the conditional variant value is dropped.`);
429
+ var appended = (0, import_propMapper.appendFlatClause)(viewProps[key8], conditionSource, val2);
430
+ if (appended !== void 0) viewProps[key8] = appended;
431
+ else if (process.env.NODE_ENV === "development") console.warn(`[tamagui] conditional variant value for "${key8}" is not string-representable; dropping the clause`);
432
+ } else if (process.env.NODE_ENV === "development") console.warn(`[tamagui] "${key8}" is not a valid style on this component; the conditional variant value is dropped.`);
433
433
  return;
434
434
  }
435
435
  if (isHostStyleKey || isContextProgramKey) {
436
- (0, import_directStyle.contributeStyleValue)(styleState, key9, val2, mergeStyle, originalVal, !isHostStyleKey);
436
+ (0, import_directStyle.contributeStyleValue)(styleState, key8, val2, mergeStyle, originalVal, !isHostStyleKey);
437
437
  return;
438
438
  }
439
- isVariant = variants && key9 in variants;
440
- if (inlineProps === null || inlineProps === void 0 ? void 0 : inlineProps.has(key9)) {
439
+ isVariant = variants && key8 in variants;
440
+ if (inlineProps === null || inlineProps === void 0 ? void 0 : inlineProps.has(key8)) {
441
441
  var _props_key;
442
- viewProps[key9] = (_props_key = props[key9]) !== null && _props_key !== void 0 ? _props_key : val2;
442
+ viewProps[key8] = (_props_key = props[key8]) !== null && _props_key !== void 0 ? _props_key : val2;
443
443
  }
444
444
  if (isHOC && Boolean(parentStaticConfig === null || parentStaticConfig === void 0 ? void 0 : (_parentStaticConfig_variants = parentStaticConfig.variants) === null || _parentStaticConfig_variants === void 0 ? void 0 : _parentStaticConfig_variants[keyInit])) {
445
- passDownProp(viewProps, key9, val2);
445
+ passDownProp(viewProps, key8, val2);
446
446
  if (process.env.NODE_ENV === "development" && debug === "verbose") {
447
- console.groupCollapsed(` - passing down prop ${key9}`);
447
+ console.groupCollapsed(` - passing down prop ${key8}`);
448
448
  (0, import_log.log)({
449
449
  val: val2,
450
- after: { ...viewProps[key9] }
450
+ after: { ...viewProps[key8] }
451
451
  });
452
452
  console.groupEnd();
453
453
  }
@@ -455,11 +455,11 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
455
455
  }
456
456
  if (!isVariant) {
457
457
  if (isStyledContextProp) return;
458
- if (key9 in import_helpers.stylePropsAll && !isValidStyleKey(key9, validStyles, accept)) {
459
- if (process.env.NODE_ENV === "development") console.warn(`[tamagui] "${key9}" is a text style prop and this component is not text \u2014 it would render on neither platform. Use a Text-based component, or html.* for raw web elements.`);
458
+ if (key8 in import_helpers.stylePropsAll && !isValidStyleKey(key8, validStyles, accept)) {
459
+ if (process.env.NODE_ENV === "development") console.warn(`[tamagui] "${key8}" is a text style prop and this component is not text \u2014 it would render on neither platform. Use a Text-based component, or html.* for raw web elements.`);
460
460
  return;
461
461
  }
462
- viewProps[key9] = val2;
462
+ viewProps[key8] = val2;
463
463
  }
464
464
  });
465
465
  if (process.env.NODE_ENV === "development" && debug === "verbose") {
@@ -587,9 +587,9 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
587
587
  if (shouldTrackStyleTokenProvenance && styleState.style && styleState.tokenProvenance) {
588
588
  var provenance = {};
589
589
  var hasProvenance = false;
590
- for (var key6 in styleState.tokenProvenance) {
591
- provenance[key6] = {
592
- token: styleState.tokenProvenance[key6],
590
+ for (var key5 in styleState.tokenProvenance) {
591
+ provenance[key5] = {
592
+ token: styleState.tokenProvenance[key5],
593
593
  theme: themeName
594
594
  };
595
595
  hasProvenance = true;
@@ -618,8 +618,8 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
618
618
  var _iteratorNormalCompletion4 = true, _didIteratorError4 = false, _iteratorError4 = void 0;
619
619
  try {
620
620
  for (var _iterator4 = keys[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) {
621
- var key9 = _step4.value;
622
- out.add(key9 === "--t-x" || key9 === "--t-y" ? "translate" : key9 === "--t-scale-x" || key9 === "--t-scale-y" ? "scale" : key9);
621
+ var key8 = _step4.value;
622
+ out.add(key8 === "--t-x" || key8 === "--t-y" ? "translate" : key8 === "--t-scale-x" || key8 === "--t-scale-y" ? "scale" : key8);
623
623
  }
624
624
  } catch (err) {
625
625
  _didIteratorError4 = true;
@@ -659,7 +659,7 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
659
659
  rulesToInsert,
660
660
  parentSplitStyles
661
661
  };
662
- for (var key8 in logs) (0, import_log.log)(key8, logs[key8]);
662
+ for (var key7 in logs) (0, import_log.log)(key7, logs[key7]);
663
663
  } catch (e) {}
664
664
  console.groupEnd();
665
665
  }
@@ -201,9 +201,9 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
201
201
  };
202
202
  if (process.env.IS_STATIC === "is_static") {
203
203
  var { fallbackProps } = styleProps;
204
- if (fallbackProps) styleState.props = new Proxy(props, { get(_, key9, val2) {
205
- if (!Reflect.has(props, key9)) return Reflect.get(fallbackProps, key9);
206
- return Reflect.get(props, key9);
204
+ if (fallbackProps) styleState.props = new Proxy(props, { get(_, key8, val2) {
205
+ if (!Reflect.has(props, key8)) return Reflect.get(fallbackProps, key8);
206
+ return Reflect.get(props, key8);
207
207
  } });
208
208
  }
209
209
  if (process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`style-state`;
@@ -243,7 +243,7 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
243
243
  var style2 = isArray ? styleProp[index] : styleProp;
244
244
  if (!style2) continue;
245
245
  if (style2["$$css"]) {
246
- for (var key9 in style2) (0, import_directStyle.clearDirectStyle)(styleState, key9);
246
+ for (var key8 in style2) (0, import_directStyle.clearDirectStyle)(styleState, key8);
247
247
  Object.assign(styleState.classNames, style2);
248
248
  continue;
249
249
  }
@@ -396,58 +396,58 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
396
396
  (0, import_directStyle.contributeStyleValue)(styleState, keyInit, valInit, mergeStyle);
397
397
  return;
398
398
  }
399
- (0, import_propMapper.propMapper)(keyInit, valInit, styleState, disablePropMap, function(key9, val2, originalVal, conditionSource) {
399
+ (0, import_propMapper.propMapper)(keyInit, valInit, styleState, disablePropMap, function(key8, val2, originalVal, conditionSource) {
400
400
  var _parentStaticConfig_variants;
401
- var isStyledContextProp = styledContext && key9 in styledContext;
402
- if (key9 === "className") {
401
+ var isStyledContextProp = styledContext && key8 in styledContext;
402
+ if (key8 === "className") {
403
403
  if (typeof val2 === "string" && val2) className = `${className} ${val2}`.trim();
404
404
  return;
405
405
  }
406
406
  if (!isHOC && disablePropMap && !isStyledContextProp) {
407
- if (key9 in import_helpers.stylePropsAll && !isValidStyleKey(key9, validStyles, accept)) {
408
- if (process.env.NODE_ENV === "development") console.warn(`[tamagui] "${key9}" is a text style prop and this component is not text \u2014 it would render on neither platform. Use a Text-based component, or html.* for raw web elements.`);
407
+ if (key8 in import_helpers.stylePropsAll && !isValidStyleKey(key8, validStyles, accept)) {
408
+ if (process.env.NODE_ENV === "development") console.warn(`[tamagui] "${key8}" is a text style prop and this component is not text \u2014 it would render on neither platform. Use a Text-based component, or html.* for raw web elements.`);
409
409
  return;
410
410
  }
411
- viewProps[key9] = val2;
411
+ viewProps[key8] = val2;
412
412
  return;
413
413
  }
414
414
  if (process.env.NODE_ENV === "development" && debug === "verbose") {
415
- console.groupCollapsed(" 💠 expanded", keyInit, "=>", key9);
415
+ console.groupCollapsed(" 💠 expanded", keyInit, "=>", key8);
416
416
  (0, import_log.log)(val2);
417
417
  console.groupEnd();
418
418
  }
419
419
  if (val2 == null) return;
420
- if (accept && key9 in accept) {
421
- viewProps[key9] = val2;
420
+ if (accept && key8 in accept) {
421
+ viewProps[key8] = val2;
422
422
  return;
423
423
  }
424
- var isHostStyleKey = !isHOC && isValidStyleKey(key9, validStyles, accept) || import_constants.isAndroid && key9 === "elevation";
424
+ var isHostStyleKey = !isHOC && isValidStyleKey(key8, validStyles, accept) || import_constants.isAndroid && key8 === "elevation";
425
425
  var isContextProgramKey = !isHOC && Boolean(isStyledContextProp);
426
426
  if (conditionSource !== void 0) {
427
- if (isHostStyleKey || isContextProgramKey) (0, import_directStyle.contributeVariantClauseValue)(styleState, key9, val2, conditionSource, mergeStyle, originalVal, !isHostStyleKey);
427
+ if (isHostStyleKey || isContextProgramKey) (0, import_directStyle.contributeVariantClauseValue)(styleState, key8, val2, conditionSource, mergeStyle, originalVal, !isHostStyleKey);
428
428
  else if (isHOC) {
429
- var appended = (0, import_propMapper.appendFlatClause)(viewProps[key9], conditionSource, val2);
430
- if (appended !== void 0) viewProps[key9] = appended;
431
- else if (process.env.NODE_ENV === "development") console.warn(`[tamagui] conditional variant value for "${key9}" is not string-representable; dropping the clause`);
432
- } else if (process.env.NODE_ENV === "development") console.warn(`[tamagui] "${key9}" is not a valid style on this component; the conditional variant value is dropped.`);
429
+ var appended = (0, import_propMapper.appendFlatClause)(viewProps[key8], conditionSource, val2);
430
+ if (appended !== void 0) viewProps[key8] = appended;
431
+ else if (process.env.NODE_ENV === "development") console.warn(`[tamagui] conditional variant value for "${key8}" is not string-representable; dropping the clause`);
432
+ } else if (process.env.NODE_ENV === "development") console.warn(`[tamagui] "${key8}" is not a valid style on this component; the conditional variant value is dropped.`);
433
433
  return;
434
434
  }
435
435
  if (isHostStyleKey || isContextProgramKey) {
436
- (0, import_directStyle.contributeStyleValue)(styleState, key9, val2, mergeStyle, originalVal, !isHostStyleKey);
436
+ (0, import_directStyle.contributeStyleValue)(styleState, key8, val2, mergeStyle, originalVal, !isHostStyleKey);
437
437
  return;
438
438
  }
439
- isVariant = variants && key9 in variants;
440
- if (inlineProps === null || inlineProps === void 0 ? void 0 : inlineProps.has(key9)) {
439
+ isVariant = variants && key8 in variants;
440
+ if (inlineProps === null || inlineProps === void 0 ? void 0 : inlineProps.has(key8)) {
441
441
  var _props_key;
442
- viewProps[key9] = (_props_key = props[key9]) !== null && _props_key !== void 0 ? _props_key : val2;
442
+ viewProps[key8] = (_props_key = props[key8]) !== null && _props_key !== void 0 ? _props_key : val2;
443
443
  }
444
444
  if (isHOC && Boolean(parentStaticConfig === null || parentStaticConfig === void 0 ? void 0 : (_parentStaticConfig_variants = parentStaticConfig.variants) === null || _parentStaticConfig_variants === void 0 ? void 0 : _parentStaticConfig_variants[keyInit])) {
445
- passDownProp(viewProps, key9, val2);
445
+ passDownProp(viewProps, key8, val2);
446
446
  if (process.env.NODE_ENV === "development" && debug === "verbose") {
447
- console.groupCollapsed(` - passing down prop ${key9}`);
447
+ console.groupCollapsed(` - passing down prop ${key8}`);
448
448
  (0, import_log.log)({
449
449
  val: val2,
450
- after: { ...viewProps[key9] }
450
+ after: { ...viewProps[key8] }
451
451
  });
452
452
  console.groupEnd();
453
453
  }
@@ -455,11 +455,11 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
455
455
  }
456
456
  if (!isVariant) {
457
457
  if (isStyledContextProp) return;
458
- if (key9 in import_helpers.stylePropsAll && !isValidStyleKey(key9, validStyles, accept)) {
459
- if (process.env.NODE_ENV === "development") console.warn(`[tamagui] "${key9}" is a text style prop and this component is not text \u2014 it would render on neither platform. Use a Text-based component, or html.* for raw web elements.`);
458
+ if (key8 in import_helpers.stylePropsAll && !isValidStyleKey(key8, validStyles, accept)) {
459
+ if (process.env.NODE_ENV === "development") console.warn(`[tamagui] "${key8}" is a text style prop and this component is not text \u2014 it would render on neither platform. Use a Text-based component, or html.* for raw web elements.`);
460
460
  return;
461
461
  }
462
- viewProps[key9] = val2;
462
+ viewProps[key8] = val2;
463
463
  }
464
464
  });
465
465
  if (process.env.NODE_ENV === "development" && debug === "verbose") {
@@ -587,9 +587,9 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
587
587
  if (shouldTrackStyleTokenProvenance && styleState.style && styleState.tokenProvenance) {
588
588
  var provenance = {};
589
589
  var hasProvenance = false;
590
- for (var key6 in styleState.tokenProvenance) {
591
- provenance[key6] = {
592
- token: styleState.tokenProvenance[key6],
590
+ for (var key5 in styleState.tokenProvenance) {
591
+ provenance[key5] = {
592
+ token: styleState.tokenProvenance[key5],
593
593
  theme: themeName
594
594
  };
595
595
  hasProvenance = true;
@@ -618,8 +618,8 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
618
618
  var _iteratorNormalCompletion4 = true, _didIteratorError4 = false, _iteratorError4 = void 0;
619
619
  try {
620
620
  for (var _iterator4 = keys[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) {
621
- var key9 = _step4.value;
622
- out.add(key9 === "--t-x" || key9 === "--t-y" ? "translate" : key9 === "--t-scale-x" || key9 === "--t-scale-y" ? "scale" : key9);
621
+ var key8 = _step4.value;
622
+ out.add(key8 === "--t-x" || key8 === "--t-y" ? "translate" : key8 === "--t-scale-x" || key8 === "--t-scale-y" ? "scale" : key8);
623
623
  }
624
624
  } catch (err) {
625
625
  _didIteratorError4 = true;
@@ -659,7 +659,7 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
659
659
  rulesToInsert,
660
660
  parentSplitStyles
661
661
  };
662
- for (var key8 in logs) (0, import_log.log)(key8, logs[key8]);
662
+ for (var key7 in logs) (0, import_log.log)(key7, logs[key7]);
663
663
  } catch (e) {}
664
664
  console.groupEnd();
665
665
  }