@tamagui/core 3.0.0-beta.1153.1 → 3.0.0-beta.1169.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 CHANGED
@@ -11986,7 +11986,7 @@ function prepareConfigRevision(config) {
11986
11986
  return out;
11987
11987
  },
11988
11988
  embeddedTokens: function(raw, resolve) {
11989
- return raw.replace(/\/\*[\s\S]*?\*\/|(["'])(?:\\.|(?!\1)[^\\])*\1|[$A-Za-z_][\w.$-]*(?:\/\d+)?/g, function(word, quote, offset) {
11989
+ return raw.replace(/\/\*[\s\S]*?\*\/|(["'])(?:\\.|(?!\1)[^\\])*\1|[$A-Za-z_][\w.$-]*(?:\/\d*\.?\d+)?/g, function(word, quote, offset) {
11990
11990
  var before = raw.charCodeAt(offset - 1);
11991
11991
  return quote || word[0] !== "$" && (before >= 48 && before <= 57 || before === 35 || before === 45 && raw.charCodeAt(offset - 2) === 45 || raw.charCodeAt(offset + word.length) === 40) ? word : resolve(word);
11992
11992
  });
@@ -13959,9 +13959,20 @@ var defaultOffset = {
13959
13959
  };
13960
13960
  //#endregion
13961
13961
  //#region ../web/dist/esm/helpers/normalizeColor.native.js
13962
+ var isDynamicColor = function(color) {
13963
+ return typeof color.dynamic === "object" && color.dynamic !== null;
13964
+ };
13962
13965
  var normalizeColor = function(color, opacity) {
13963
13966
  if (!color) return;
13964
- if (typeof color !== "string") return color;
13967
+ if (typeof color !== "string") {
13968
+ if (opacity === void 0 || opacity === 1 || !isDynamicColor(color)) return color;
13969
+ var dynamic = {};
13970
+ for (var key in color.dynamic) {
13971
+ var variant = normalizeColor(color.dynamic[key], opacity);
13972
+ if (typeof variant === "string") dynamic[key] = variant;
13973
+ }
13974
+ return _objectSpread2(_objectSpread2({}, color), {}, { dynamic });
13975
+ }
13965
13976
  var rgbaVal = getRgba(color);
13966
13977
  if (rgbaVal) {
13967
13978
  var colors = `${rgbaVal.r},${rgbaVal.g},${rgbaVal.b}`;
@@ -14095,7 +14106,7 @@ var getRulesForIdentifier = function(identifier) {
14095
14106
  function scanAllSheets() {
14096
14107
  var collectThemes = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false;
14097
14108
  arguments.length > 1 && arguments[1];
14098
- if (!process.env.TAMAGUI_DID_OUTPUT_CSS || collectThemes) return;
14109
+ if (process.env.TAMAGUI_RUNTIME !== "island" || collectThemes) return;
14099
14110
  }
14100
14111
  function trackInsertedStyle(id) {
14101
14112
  var next = (totalSelectorsInserted.get(id) || 0) + 1;
@@ -14116,7 +14127,7 @@ function stopAccumulatingRules() {
14116
14127
  };
14117
14128
  }
14118
14129
  function updateRules(identifier, rules) {
14119
- if (!process.env.TAMAGUI_DID_OUTPUT_CSS && trackAllRules) {
14130
+ if (process.env.TAMAGUI_RUNTIME !== "island" && trackAllRules) {
14120
14131
  allRules[identifier] = rules.join(" ");
14121
14132
  allRuleSets[identifier] = rules;
14122
14133
  }
@@ -14127,7 +14138,7 @@ function setNonce(_) {
14127
14138
  nonce = _;
14128
14139
  }
14129
14140
  function insertStyleRules(rulesToInsert) {
14130
- if (process.env.TAMAGUI_DID_OUTPUT_CSS || true) return;
14141
+ if (process.env.TAMAGUI_RUNTIME === "island" || true) return;
14131
14142
  if (!sheet$1 && document.head) {
14132
14143
  var styleTag = document.createElement("style");
14133
14144
  styleTag.id = "_tamagui-styles";
@@ -15179,7 +15190,7 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
15179
15190
  var variants = styleStaticConfig.variants;
15180
15191
  var viewProps = {};
15181
15192
  var mediaState$1 = styleProps.mediaState || mediaState;
15182
- var shouldDoClasses = !process.env.TAMAGUI_DID_OUTPUT_CSS && acceptsClassName && false;
15193
+ var shouldDoClasses = process.env.TAMAGUI_RUNTIME !== "island" && acceptsClassName && false;
15183
15194
  var rulesToInsert = void 0;
15184
15195
  var classNames = {};
15185
15196
  var hasMedia = false;
@@ -16725,7 +16736,7 @@ var isDisabled = function(props) {
16725
16736
  var useSplitStyles = function(a, b, c, d, e, f, g, h, i, j, k, l, m, n) {
16726
16737
  "use no memo";
16727
16738
  var res = getSplitStyles(a, b, c, d, e, f, g, h, i, j, k, l, m, n);
16728
- if (!process.env.TAMAGUI_DID_OUTPUT_CSS && false);
16739
+ if (process.env.TAMAGUI_RUNTIME !== "island" && false);
16729
16740
  return res;
16730
16741
  };
16731
16742
  //#endregion
@@ -17564,7 +17575,7 @@ function createComponent(staticConfig) {
17564
17575
  for (var key2 in styledContextValue) if (!(key2 in overriddenContextProps)) overriddenContextProps[key2] = styledContextValue[key2];
17565
17576
  content = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Provider, _objectSpread2(_objectSpread2({ __disableMergeDefaultValues: true }, overriddenContextProps), {}, { children: content }));
17566
17577
  }
17567
- if (!process.env.TAMAGUI_DID_OUTPUT_CSS && false);
17578
+ if (process.env.TAMAGUI_RUNTIME !== "island" && false);
17568
17579
  return content;
17569
17580
  };
17570
17581
  function notifyGroupSubscribers(groupContext, groupEmitter, pseudo) {
@@ -17754,7 +17765,7 @@ function normalizeStyle(style) {
17754
17765
  //#endregion
17755
17766
  //#region ../web/dist/esm/helpers/wrapStyleTags.native.js
17756
17767
  function getStyleTags(styles) {
17757
- if (!process.env.TAMAGUI_DID_OUTPUT_CSS && false);
17768
+ if (process.env.TAMAGUI_RUNTIME !== "island" && false);
17758
17769
  }
17759
17770
  //#endregion
17760
17771
  //#region ../web/dist/esm/createFont.native.js
@@ -2175,7 +2175,7 @@ function prepareConfigRevision(config) {
2175
2175
  return out;
2176
2176
  },
2177
2177
  embeddedTokens: function(raw, resolve) {
2178
- return raw.replace(/\/\*[\s\S]*?\*\/|(["'])(?:\\.|(?!\1)[^\\])*\1|[$A-Za-z_][\w.$-]*(?:\/\d+)?/g, function(word, quote, offset) {
2178
+ return raw.replace(/\/\*[\s\S]*?\*\/|(["'])(?:\\.|(?!\1)[^\\])*\1|[$A-Za-z_][\w.$-]*(?:\/\d*\.?\d+)?/g, function(word, quote, offset) {
2179
2179
  var before = raw.charCodeAt(offset - 1);
2180
2180
  return quote || word[0] !== "$" && (before >= 48 && before <= 57 || before === 35 || before === 45 && raw.charCodeAt(offset - 2) === 45 || raw.charCodeAt(offset + word.length) === 40) ? word : resolve(word);
2181
2181
  });
@@ -4504,9 +4504,20 @@ function rgba(colorInt) {
4504
4504
  var normalizeCSSColor = import_normalize_color.default || import_normalize_color;
4505
4505
  //#endregion
4506
4506
  //#region ../web/dist/esm/helpers/normalizeColor.native.js
4507
+ var isDynamicColor = function(color) {
4508
+ return typeof color.dynamic === "object" && color.dynamic !== null;
4509
+ };
4507
4510
  var normalizeColor = function(color, opacity) {
4508
4511
  if (!color) return;
4509
- if (typeof color !== "string") return color;
4512
+ if (typeof color !== "string") {
4513
+ if (opacity === void 0 || opacity === 1 || !isDynamicColor(color)) return color;
4514
+ var dynamic = {};
4515
+ for (var key in color.dynamic) {
4516
+ var variant = normalizeColor(color.dynamic[key], opacity);
4517
+ if (typeof variant === "string") dynamic[key] = variant;
4518
+ }
4519
+ return _objectSpread2(_objectSpread2({}, color), {}, { dynamic });
4520
+ }
4510
4521
  var rgbaVal = getRgba(color);
4511
4522
  if (rgbaVal) {
4512
4523
  var colors = `${rgbaVal.r},${rgbaVal.g},${rgbaVal.b}`;
@@ -4738,7 +4749,7 @@ var getRulesForIdentifier = function(identifier) {
4738
4749
  var sortedRules = [];
4739
4750
  var sortedRulesStale = true;
4740
4751
  var getAllRules = function() {
4741
- if (!process.env.TAMAGUI_DID_OUTPUT_CSS) {
4752
+ if (process.env.TAMAGUI_RUNTIME !== "island") {
4742
4753
  if (sortedRulesStale) {
4743
4754
  sortedRules = Object.keys(allRules).sort().map(function(key) {
4744
4755
  return allRules[key];
@@ -4752,7 +4763,7 @@ var getAllRules = function() {
4752
4763
  function scanAllSheets() {
4753
4764
  var collectThemes = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false;
4754
4765
  arguments.length > 1 && arguments[1];
4755
- if (!process.env.TAMAGUI_DID_OUTPUT_CSS || collectThemes) {
4766
+ if (process.env.TAMAGUI_RUNTIME !== "island" || collectThemes) {
4756
4767
  if (globalThis.process.env.NODE_ENV === "test") return;
4757
4768
  return;
4758
4769
  }
@@ -4776,7 +4787,7 @@ function stopAccumulatingRules() {
4776
4787
  };
4777
4788
  }
4778
4789
  function updateRules(identifier, rules) {
4779
- if (!process.env.TAMAGUI_DID_OUTPUT_CSS && trackAllRules) {
4790
+ if (process.env.TAMAGUI_RUNTIME !== "island" && trackAllRules) {
4780
4791
  allRules[identifier] = rules.join(" ");
4781
4792
  allRuleSets[identifier] = rules;
4782
4793
  sortedRulesStale = true;
@@ -4788,7 +4799,7 @@ function setNonce(_) {
4788
4799
  nonce = _;
4789
4800
  }
4790
4801
  function insertStyleRules(rulesToInsert) {
4791
- if (process.env.TAMAGUI_DID_OUTPUT_CSS || true) return;
4802
+ if (process.env.TAMAGUI_RUNTIME === "island" || true) return;
4792
4803
  if (!sheet && document.head) {
4793
4804
  var styleTag = document.createElement("style");
4794
4805
  styleTag.id = "_tamagui-styles";
@@ -5929,7 +5940,7 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
5929
5940
  var variants = styleStaticConfig.variants;
5930
5941
  var viewProps = {};
5931
5942
  var mediaState$1 = styleProps.mediaState || mediaState;
5932
- var shouldDoClasses = !process.env.TAMAGUI_DID_OUTPUT_CSS && acceptsClassName && false;
5943
+ var shouldDoClasses = process.env.TAMAGUI_RUNTIME !== "island" && acceptsClassName && false;
5933
5944
  var rulesToInsert = void 0;
5934
5945
  var classNames = {};
5935
5946
  var hasMedia = false;
@@ -7636,7 +7647,7 @@ var isDisabled = function(props) {
7636
7647
  var useSplitStyles = function(a, b, c, d, e, f, g, h, i, j, k, l, m, n) {
7637
7648
  "use no memo";
7638
7649
  var res = getSplitStyles(a, b, c, d, e, f, g, h, i, j, k, l, m, n);
7639
- if (!process.env.TAMAGUI_DID_OUTPUT_CSS && false);
7650
+ if (process.env.TAMAGUI_RUNTIME !== "island" && false);
7640
7651
  return res;
7641
7652
  };
7642
7653
  //#endregion
@@ -8663,7 +8674,7 @@ ${banner}
8663
8674
  content = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Provider, _objectSpread2(_objectSpread2({ __disableMergeDefaultValues: true }, overriddenContextProps), {}, { children: content }));
8664
8675
  }
8665
8676
  if (globalThis.process.env.NODE_ENV === "development" && time$1) time$1`context-override`;
8666
- if (!process.env.TAMAGUI_DID_OUTPUT_CSS && false);
8677
+ if (process.env.TAMAGUI_RUNTIME !== "island" && false);
8667
8678
  if (globalThis.process.env.NODE_ENV === "development" && time$1) time$1`style-tags`;
8668
8679
  if (globalThis.process.env.NODE_ENV === "development") {
8669
8680
  if (debugProp && debugProp !== "profile") {
@@ -8874,7 +8885,7 @@ function normalizeStyle(style) {
8874
8885
  //#endregion
8875
8886
  //#region ../web/dist/esm/helpers/wrapStyleTags.native.js
8876
8887
  function getStyleTags(styles) {
8877
- if (!process.env.TAMAGUI_DID_OUTPUT_CSS && false);
8888
+ if (process.env.TAMAGUI_RUNTIME !== "island" && false);
8878
8889
  }
8879
8890
  //#endregion
8880
8891
  //#region ../web/dist/esm/createFont.native.js
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/core",
3
- "version": "3.0.0-beta.1153.1",
3
+ "version": "3.0.0-beta.1169.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.1153.1",
141
- "@tamagui/constants": "3.0.0-beta.1153.1",
142
- "@tamagui/helpers": "3.0.0-beta.1153.1",
143
- "@tamagui/react-native-media-driver": "3.0.0-beta.1153.1",
144
- "@tamagui/react-native-use-pressable": "3.0.0-beta.1153.1",
145
- "@tamagui/size": "3.0.0-beta.1153.1",
146
- "@tamagui/use-element-layout": "3.0.0-beta.1153.1",
147
- "@tamagui/use-event": "3.0.0-beta.1153.1",
148
- "@tamagui/web": "3.0.0-beta.1153.1"
140
+ "@tamagui/compose-refs": "3.0.0-beta.1169.1",
141
+ "@tamagui/constants": "3.0.0-beta.1169.1",
142
+ "@tamagui/helpers": "3.0.0-beta.1169.1",
143
+ "@tamagui/react-native-media-driver": "3.0.0-beta.1169.1",
144
+ "@tamagui/react-native-use-pressable": "3.0.0-beta.1169.1",
145
+ "@tamagui/size": "3.0.0-beta.1169.1",
146
+ "@tamagui/use-element-layout": "3.0.0-beta.1169.1",
147
+ "@tamagui/use-event": "3.0.0-beta.1169.1",
148
+ "@tamagui/web": "3.0.0-beta.1169.1"
149
149
  },
150
150
  "devDependencies": {
151
- "@tamagui/build": "3.0.0-beta.1153.1",
152
- "@tamagui/native-bundle": "3.0.0-beta.1153.1",
153
- "@tamagui/react-native-web-lite": "3.0.0-beta.1153.1",
151
+ "@tamagui/build": "3.0.0-beta.1169.1",
152
+ "@tamagui/native-bundle": "3.0.0-beta.1169.1",
153
+ "@tamagui/react-native-web-lite": "3.0.0-beta.1169.1",
154
154
  "@testing-library/react": "^16.1.0",
155
155
  "csstype": "^3.0.10",
156
156
  "react": "19.2.3",