tamagui 3.0.12 → 3.0.14

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 (3) hide show
  1. package/dist/native.cjs +19 -17
  2. package/dist/test.cjs +19 -17
  3. package/package.json +67 -67
package/dist/native.cjs CHANGED
@@ -15019,8 +15019,13 @@ var init_useThemeState_native = __esmMin((() => {
15019
15019
  };
15020
15020
  themeUpdateLayers = /* @__PURE__ */ new Map();
15021
15021
  themeProviderParents = /* @__PURE__ */ new Map();
15022
- registerThemeProviderChain = function registerThemeProviderChain2(id, parentId, props) {
15023
- themeProviderParents.set(id, parentId);
15022
+ registerThemeProviderChain = function registerThemeProviderChain2(id, parentId, props, keys) {
15023
+ var scope = themeProviderParents.get(id);
15024
+ if (scope) scope.parentId = parentId;
15025
+ else themeProviderParents.set(id, {
15026
+ parentId,
15027
+ keys
15028
+ });
15024
15029
  if (props._themeUpdate) themeUpdateLayers.set(id, props._themeUpdate);
15025
15030
  else themeUpdateLayers.delete(id);
15026
15031
  };
@@ -15053,7 +15058,7 @@ var init_useThemeState_native = __esmMin((() => {
15053
15058
  };
15054
15059
  var id = (0, react$1.useId)();
15055
15060
  var propsKey = `${props.name || ""}${props.forceClassName || ""}${((_props__themeUpdate = props._themeUpdate) === null || _props__themeUpdate === void 0 ? void 0 : _props__themeUpdate.key) || ""}`;
15056
- if (cascadeOnChange) registerThemeProviderChain(id, parentId, props);
15061
+ if (cascadeOnChange) registerThemeProviderChain(id, parentId, props, keys);
15057
15062
  var r = (_ref = (0, react$1.useRef)(null)).current || (_ref.current = {
15058
15063
  id,
15059
15064
  optimizeForFirstRender,
@@ -15075,7 +15080,7 @@ var init_useThemeState_native = __esmMin((() => {
15075
15080
  states.set(r.id, r.lastSnap);
15076
15081
  r.state = r.lastSnap;
15077
15082
  }
15078
- if (cascadeOnChange && !themeProviderParents.has(r.id)) registerThemeProviderChain(r.id, r.parentId, r.props);
15083
+ if (cascadeOnChange && !themeProviderParents.has(r.id)) registerThemeProviderChain(r.id, r.parentId, r.props, r.keys);
15079
15084
  if (r.unsubscribe && r.subscribedTo !== r.parentId) {
15080
15085
  var _r_unsubscribe;
15081
15086
  (_r_unsubscribe = r.unsubscribe) === null || _r_unsubscribe === void 0 || _r_unsubscribe.call(r);
@@ -16519,13 +16524,12 @@ var init_resolveSizing_native = __esmMin((() => {
16519
16524
  //#endregion
16520
16525
  //#region ../../core/web/dist/esm/helpers/styledDynamic.native.js
16521
16526
  function getFontsForLanguage(fonts, language) {
16522
- if (fontLanguageCache.has(language)) return fontLanguageCache.get(language);
16523
16527
  var next = _objectSpread2({}, fonts);
16524
16528
  for (var name in language) {
16529
+ var _fonts_;
16525
16530
  var lang = language[name];
16526
- if (lang !== "default") next[name] = fonts[`${name}_${lang}`];
16531
+ if (lang !== "default") next[name] = (_fonts_ = fonts[`${name}_${lang}`]) !== null && _fonts_ !== void 0 ? _fonts_ : fonts[name];
16527
16532
  }
16528
- fontLanguageCache.set(language, next);
16529
16533
  return next;
16530
16534
  }
16531
16535
  function isStyledDynamic(value) {
@@ -16563,14 +16567,13 @@ function getDynamicEnv(styleState) {
16563
16567
  }
16564
16568
  };
16565
16569
  }
16566
- var fontLanguageCache, bareStyledDynamic;
16570
+ var bareStyledDynamic;
16567
16571
  var init_styledDynamic_native = __esmMin((() => {
16568
16572
  init_config_native();
16569
16573
  init_createVariable_native();
16570
16574
  init_resolveSizing_native();
16571
16575
  init_types_native();
16572
16576
  init_objectSpread2();
16573
- fontLanguageCache = /* @__PURE__ */ new WeakMap();
16574
16577
  bareStyledDynamic = { [styledDynamicSymbol]: true };
16575
16578
  }));
16576
16579
  //#endregion
@@ -17992,6 +17995,7 @@ function emitUnderCondition(state, property, value, cursor, originalValue, conte
17992
17995
  }
17993
17996
  function configuredValue(state, property, raw) {
17994
17997
  var embedded = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : false, nativeColors = arguments.length > 4 ? arguments[4] : void 0;
17998
+ var _state_context;
17995
17999
  var grammar = getConfigRevisionState(state.conf);
17996
18000
  var name = raw;
17997
18001
  var opacity;
@@ -18041,14 +18045,15 @@ function configuredValue(state, property, raw) {
18041
18045
  var lookupName = name.charCodeAt(0) === 36 ? name.slice(1) : name;
18042
18046
  var value;
18043
18047
  var fromTheme = false;
18048
+ var fonts = fontProperty && ((_state_context = state.context) === null || _state_context === void 0 ? void 0 : _state_context.language) ? getDynamicEnv(state).fonts : state.conf.fontsParsed;
18044
18049
  if (property === "fontFamily") {
18045
- var _state_conf_fontsParsed_lookupName;
18046
- value = (_state_conf_fontsParsed_lookupName = state.conf.fontsParsed[lookupName]) === null || _state_conf_fontsParsed_lookupName === void 0 ? void 0 : _state_conf_fontsParsed_lookupName.family;
18050
+ var _fonts_lookupName;
18051
+ value = (_fonts_lookupName = fonts[lookupName]) === null || _fonts_lookupName === void 0 ? void 0 : _fonts_lookupName.family;
18047
18052
  } else {
18048
18053
  var fontKey = property === "fontSize" ? "size" : property === "fontWeight" ? "weight" : property === "lineHeight" || property === "letterSpacing" ? property : "";
18049
18054
  if (fontKey) {
18050
18055
  var _font_fontKey;
18051
- var font = state.conf.fontsParsed[state.fontFamily || state.conf.defaultFontToken] || state.conf.fontsParsed[state.conf.defaultFontToken];
18056
+ var font = fonts[state.fontFamily || state.conf.defaultFontToken] || fonts[state.conf.defaultFontToken];
18052
18057
  value = font === null || font === void 0 ? void 0 : (_font_fontKey = font[fontKey]) === null || _font_fontKey === void 0 ? void 0 : _font_fontKey[lookupName];
18053
18058
  } else {
18054
18059
  var _state_conf_tokensParsed_category;
@@ -36109,18 +36114,15 @@ function useSheetScrollViewGestures(param) {
36109
36114
  vy
36110
36115
  });
36111
36116
  },
36112
- onStartShouldSetResponder: function onStartShouldSetResponder2() {
36117
+ onTouchStart: function onTouchStart2(e) {
36113
36118
  var s = state.current;
36119
+ s.lastPageY = e.nativeEvent.pageY;
36114
36120
  scrollBridge.scrollStartY = -1;
36115
36121
  s.isDraggingScrollArea = true;
36116
36122
  s.scrollEngaged = scrollBridge.y > 0;
36117
36123
  s.prevScrollY = scrollBridge.y;
36118
36124
  s.handoffOccurred = false;
36119
36125
  s.handoffDragOffset = 0;
36120
- return false;
36121
- },
36122
- onTouchStart: function onTouchStart2(e) {
36123
- state.current.lastPageY = e.nativeEvent.pageY;
36124
36126
  },
36125
36127
  onMoveShouldSetResponder: function onMoveShouldSetResponder2(e) {
36126
36128
  if (!scrollEnabled) return false;
package/dist/test.cjs CHANGED
@@ -15222,8 +15222,13 @@ var init_useThemeState_native = __esmMin((() => {
15222
15222
  };
15223
15223
  themeUpdateLayers = /* @__PURE__ */ new Map();
15224
15224
  themeProviderParents = /* @__PURE__ */ new Map();
15225
- registerThemeProviderChain = function registerThemeProviderChain2(id, parentId, props) {
15226
- themeProviderParents.set(id, parentId);
15225
+ registerThemeProviderChain = function registerThemeProviderChain2(id, parentId, props, keys) {
15226
+ var scope = themeProviderParents.get(id);
15227
+ if (scope) scope.parentId = parentId;
15228
+ else themeProviderParents.set(id, {
15229
+ parentId,
15230
+ keys
15231
+ });
15227
15232
  if (props._themeUpdate) themeUpdateLayers.set(id, props._themeUpdate);
15228
15233
  else themeUpdateLayers.delete(id);
15229
15234
  };
@@ -15256,7 +15261,7 @@ var init_useThemeState_native = __esmMin((() => {
15256
15261
  };
15257
15262
  var id = (0, react$1.useId)();
15258
15263
  var propsKey = `${props.name || ""}${props.forceClassName || ""}${((_props__themeUpdate = props._themeUpdate) === null || _props__themeUpdate === void 0 ? void 0 : _props__themeUpdate.key) || ""}`;
15259
- if (cascadeOnChange) registerThemeProviderChain(id, parentId, props);
15264
+ if (cascadeOnChange) registerThemeProviderChain(id, parentId, props, keys);
15260
15265
  var r = (_ref = (0, react$1.useRef)(null)).current || (_ref.current = {
15261
15266
  id,
15262
15267
  optimizeForFirstRender,
@@ -15278,7 +15283,7 @@ var init_useThemeState_native = __esmMin((() => {
15278
15283
  states.set(r.id, r.lastSnap);
15279
15284
  r.state = r.lastSnap;
15280
15285
  }
15281
- if (cascadeOnChange && !themeProviderParents.has(r.id)) registerThemeProviderChain(r.id, r.parentId, r.props);
15286
+ if (cascadeOnChange && !themeProviderParents.has(r.id)) registerThemeProviderChain(r.id, r.parentId, r.props, r.keys);
15282
15287
  if (r.unsubscribe && r.subscribedTo !== r.parentId) {
15283
15288
  var _r_unsubscribe;
15284
15289
  (_r_unsubscribe = r.unsubscribe) === null || _r_unsubscribe === void 0 || _r_unsubscribe.call(r);
@@ -16722,13 +16727,12 @@ var init_resolveSizing_native = __esmMin((() => {
16722
16727
  //#endregion
16723
16728
  //#region ../../core/web/dist/esm/helpers/styledDynamic.native.js
16724
16729
  function getFontsForLanguage(fonts, language) {
16725
- if (fontLanguageCache.has(language)) return fontLanguageCache.get(language);
16726
16730
  var next = _objectSpread2({}, fonts);
16727
16731
  for (var name in language) {
16732
+ var _fonts_;
16728
16733
  var lang = language[name];
16729
- if (lang !== "default") next[name] = fonts[`${name}_${lang}`];
16734
+ if (lang !== "default") next[name] = (_fonts_ = fonts[`${name}_${lang}`]) !== null && _fonts_ !== void 0 ? _fonts_ : fonts[name];
16730
16735
  }
16731
- fontLanguageCache.set(language, next);
16732
16736
  return next;
16733
16737
  }
16734
16738
  function isStyledDynamic(value) {
@@ -16766,14 +16770,13 @@ function getDynamicEnv(styleState) {
16766
16770
  }
16767
16771
  };
16768
16772
  }
16769
- var fontLanguageCache, bareStyledDynamic;
16773
+ var bareStyledDynamic;
16770
16774
  var init_styledDynamic_native = __esmMin((() => {
16771
16775
  init_config_native();
16772
16776
  init_createVariable_native();
16773
16777
  init_resolveSizing_native();
16774
16778
  init_types_native();
16775
16779
  init_objectSpread2();
16776
- fontLanguageCache = /* @__PURE__ */ new WeakMap();
16777
16780
  bareStyledDynamic = { [styledDynamicSymbol]: true };
16778
16781
  }));
16779
16782
  //#endregion
@@ -18202,6 +18205,7 @@ function emitUnderCondition(state, property, value, cursor, originalValue, conte
18202
18205
  }
18203
18206
  function configuredValue(state, property, raw) {
18204
18207
  var embedded = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : false, nativeColors = arguments.length > 4 ? arguments[4] : void 0;
18208
+ var _state_context;
18205
18209
  var grammar = getConfigRevisionState(state.conf);
18206
18210
  var name = raw;
18207
18211
  var opacity;
@@ -18251,14 +18255,15 @@ function configuredValue(state, property, raw) {
18251
18255
  var lookupName = name.charCodeAt(0) === 36 ? name.slice(1) : name;
18252
18256
  var value;
18253
18257
  var fromTheme = false;
18258
+ var fonts = fontProperty && ((_state_context = state.context) === null || _state_context === void 0 ? void 0 : _state_context.language) ? getDynamicEnv(state).fonts : state.conf.fontsParsed;
18254
18259
  if (property === "fontFamily") {
18255
- var _state_conf_fontsParsed_lookupName;
18256
- value = (_state_conf_fontsParsed_lookupName = state.conf.fontsParsed[lookupName]) === null || _state_conf_fontsParsed_lookupName === void 0 ? void 0 : _state_conf_fontsParsed_lookupName.family;
18260
+ var _fonts_lookupName;
18261
+ value = (_fonts_lookupName = fonts[lookupName]) === null || _fonts_lookupName === void 0 ? void 0 : _fonts_lookupName.family;
18257
18262
  } else {
18258
18263
  var fontKey = property === "fontSize" ? "size" : property === "fontWeight" ? "weight" : property === "lineHeight" || property === "letterSpacing" ? property : "";
18259
18264
  if (fontKey) {
18260
18265
  var _font_fontKey;
18261
- var font = state.conf.fontsParsed[state.fontFamily || state.conf.defaultFontToken] || state.conf.fontsParsed[state.conf.defaultFontToken];
18266
+ var font = fonts[state.fontFamily || state.conf.defaultFontToken] || fonts[state.conf.defaultFontToken];
18262
18267
  value = font === null || font === void 0 ? void 0 : (_font_fontKey = font[fontKey]) === null || _font_fontKey === void 0 ? void 0 : _font_fontKey[lookupName];
18263
18268
  } else {
18264
18269
  var _state_conf_tokensParsed_category;
@@ -36225,18 +36230,15 @@ function useSheetScrollViewGestures(param) {
36225
36230
  vy
36226
36231
  });
36227
36232
  },
36228
- onStartShouldSetResponder: function onStartShouldSetResponder2() {
36233
+ onTouchStart: function onTouchStart2(e) {
36229
36234
  var s = state.current;
36235
+ s.lastPageY = e.nativeEvent.pageY;
36230
36236
  scrollBridge.scrollStartY = -1;
36231
36237
  s.isDraggingScrollArea = true;
36232
36238
  s.scrollEngaged = scrollBridge.y > 0;
36233
36239
  s.prevScrollY = scrollBridge.y;
36234
36240
  s.handoffOccurred = false;
36235
36241
  s.handoffDragOffset = 0;
36236
- return false;
36237
- },
36238
- onTouchStart: function onTouchStart2(e) {
36239
- state.current.lastPageY = e.nativeEvent.pageY;
36240
36242
  },
36241
36243
  onMoveShouldSetResponder: function onMoveShouldSetResponder2(e) {
36242
36244
  if (!scrollEnabled) return false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tamagui",
3
- "version": "3.0.12",
3
+ "version": "3.0.14",
4
4
  "license": "MIT",
5
5
  "gitHead": "a49cc7ea6b93ba384e77a4880ae48ac4a5635c14",
6
6
  "description": "Style and UI for React (web and native) meet an optimizing compiler",
@@ -315,73 +315,73 @@
315
315
  "check-circular-deps": "npx madge --circular ./src/index.ts"
316
316
  },
317
317
  "dependencies": {
318
- "@tamagui/accordion": "3.0.12",
319
- "@tamagui/adapt": "3.0.12",
320
- "@tamagui/alert-dialog": "3.0.12",
321
- "@tamagui/animate": "3.0.12",
322
- "@tamagui/animate-presence": "3.0.12",
323
- "@tamagui/avatar": "3.0.12",
324
- "@tamagui/button": "3.0.12",
325
- "@tamagui/card": "3.0.12",
326
- "@tamagui/checkbox": "3.0.12",
327
- "@tamagui/collapsible": "3.0.12",
328
- "@tamagui/compose-refs": "3.0.12",
329
- "@tamagui/constants": "3.0.12",
330
- "@tamagui/context-menu": "3.0.12",
331
- "@tamagui/core": "3.0.12",
332
- "@tamagui/create-context": "3.0.12",
333
- "@tamagui/create-menu": "3.0.12",
334
- "@tamagui/dialog": "3.0.12",
335
- "@tamagui/element": "3.0.12",
336
- "@tamagui/fake-react-native": "3.0.12",
337
- "@tamagui/field": "3.0.12",
338
- "@tamagui/focusable": "3.0.12",
339
- "@tamagui/font-size": "3.0.12",
340
- "@tamagui/form": "3.0.12",
341
- "@tamagui/get-font-sized": "3.0.12",
342
- "@tamagui/get-token": "3.0.12",
343
- "@tamagui/group": "3.0.12",
344
- "@tamagui/helpers-tamagui": "3.0.12",
345
- "@tamagui/image": "3.0.12",
346
- "@tamagui/input": "3.0.12",
347
- "@tamagui/label": "3.0.12",
348
- "@tamagui/linear-gradient": "3.0.12",
349
- "@tamagui/list-item": "3.0.12",
350
- "@tamagui/menu": "3.0.12",
351
- "@tamagui/polyfill-dev": "3.0.12",
352
- "@tamagui/popover": "3.0.12",
353
- "@tamagui/popper": "3.0.12",
354
- "@tamagui/portal": "3.0.12",
355
- "@tamagui/progress": "3.0.12",
356
- "@tamagui/radio-group": "3.0.12",
357
- "@tamagui/react-native-media-driver": "3.0.12",
358
- "@tamagui/react-native-types": "3.0.12",
359
- "@tamagui/scroll-view": "3.0.12",
360
- "@tamagui/select": "3.0.12",
361
- "@tamagui/separator": "3.0.12",
362
- "@tamagui/shapes": "3.0.12",
363
- "@tamagui/sheet": "3.0.12",
364
- "@tamagui/slider": "3.0.12",
365
- "@tamagui/spacer": "3.0.12",
366
- "@tamagui/spinner": "3.0.12",
367
- "@tamagui/stacks": "3.0.12",
368
- "@tamagui/switch": "3.0.12",
369
- "@tamagui/tabs": "3.0.12",
370
- "@tamagui/text": "3.0.12",
371
- "@tamagui/theme": "3.0.12",
372
- "@tamagui/toast": "3.0.12",
373
- "@tamagui/toggle-group": "3.0.12",
374
- "@tamagui/tooltip": "3.0.12",
375
- "@tamagui/ui": "3.0.12",
376
- "@tamagui/use-controllable-state": "3.0.12",
377
- "@tamagui/use-debounce": "3.0.12",
378
- "@tamagui/use-force-update": "3.0.12",
379
- "@tamagui/use-window-dimensions": "3.0.12",
380
- "@tamagui/visually-hidden": "3.0.12",
381
- "@tamagui/z-index-stack": "3.0.12"
318
+ "@tamagui/accordion": "3.0.14",
319
+ "@tamagui/adapt": "3.0.14",
320
+ "@tamagui/alert-dialog": "3.0.14",
321
+ "@tamagui/animate": "3.0.14",
322
+ "@tamagui/animate-presence": "3.0.14",
323
+ "@tamagui/avatar": "3.0.14",
324
+ "@tamagui/button": "3.0.14",
325
+ "@tamagui/card": "3.0.14",
326
+ "@tamagui/checkbox": "3.0.14",
327
+ "@tamagui/collapsible": "3.0.14",
328
+ "@tamagui/compose-refs": "3.0.14",
329
+ "@tamagui/constants": "3.0.14",
330
+ "@tamagui/context-menu": "3.0.14",
331
+ "@tamagui/core": "3.0.14",
332
+ "@tamagui/create-context": "3.0.14",
333
+ "@tamagui/create-menu": "3.0.14",
334
+ "@tamagui/dialog": "3.0.14",
335
+ "@tamagui/element": "3.0.14",
336
+ "@tamagui/fake-react-native": "3.0.14",
337
+ "@tamagui/field": "3.0.14",
338
+ "@tamagui/focusable": "3.0.14",
339
+ "@tamagui/font-size": "3.0.14",
340
+ "@tamagui/form": "3.0.14",
341
+ "@tamagui/get-font-sized": "3.0.14",
342
+ "@tamagui/get-token": "3.0.14",
343
+ "@tamagui/group": "3.0.14",
344
+ "@tamagui/helpers-tamagui": "3.0.14",
345
+ "@tamagui/image": "3.0.14",
346
+ "@tamagui/input": "3.0.14",
347
+ "@tamagui/label": "3.0.14",
348
+ "@tamagui/linear-gradient": "3.0.14",
349
+ "@tamagui/list-item": "3.0.14",
350
+ "@tamagui/menu": "3.0.14",
351
+ "@tamagui/polyfill-dev": "3.0.14",
352
+ "@tamagui/popover": "3.0.14",
353
+ "@tamagui/popper": "3.0.14",
354
+ "@tamagui/portal": "3.0.14",
355
+ "@tamagui/progress": "3.0.14",
356
+ "@tamagui/radio-group": "3.0.14",
357
+ "@tamagui/react-native-media-driver": "3.0.14",
358
+ "@tamagui/react-native-types": "3.0.14",
359
+ "@tamagui/scroll-view": "3.0.14",
360
+ "@tamagui/select": "3.0.14",
361
+ "@tamagui/separator": "3.0.14",
362
+ "@tamagui/shapes": "3.0.14",
363
+ "@tamagui/sheet": "3.0.14",
364
+ "@tamagui/slider": "3.0.14",
365
+ "@tamagui/spacer": "3.0.14",
366
+ "@tamagui/spinner": "3.0.14",
367
+ "@tamagui/stacks": "3.0.14",
368
+ "@tamagui/switch": "3.0.14",
369
+ "@tamagui/tabs": "3.0.14",
370
+ "@tamagui/text": "3.0.14",
371
+ "@tamagui/theme": "3.0.14",
372
+ "@tamagui/toast": "3.0.14",
373
+ "@tamagui/toggle-group": "3.0.14",
374
+ "@tamagui/tooltip": "3.0.14",
375
+ "@tamagui/ui": "3.0.14",
376
+ "@tamagui/use-controllable-state": "3.0.14",
377
+ "@tamagui/use-debounce": "3.0.14",
378
+ "@tamagui/use-force-update": "3.0.14",
379
+ "@tamagui/use-window-dimensions": "3.0.14",
380
+ "@tamagui/visually-hidden": "3.0.14",
381
+ "@tamagui/z-index-stack": "3.0.14"
382
382
  },
383
383
  "devDependencies": {
384
- "@tamagui/build": "3.0.12",
384
+ "@tamagui/build": "3.0.14",
385
385
  "react": "19.2.3",
386
386
  "react-native": "0.87.1",
387
387
  "react-native-web": "~0.21.0"
@@ -400,5 +400,5 @@
400
400
  ],
401
401
  "module:jsx": "dist/jsx",
402
402
  "removeSideEffects": true,
403
- "releaseSourceCommit": "820e351095bd167c0ca898f680a242a2fda8df6f"
403
+ "releaseSourceCommit": "61a8bd09550319d14c141581a8e4bb286a9795a6"
404
404
  }