@tamagui/core 3.0.6 → 3.0.7

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
@@ -14989,14 +14989,25 @@ function queueNativeViewState(entry) {
14989
14989
  pending = [];
14990
14990
  queueMicrotask(function() {
14991
14991
  var entries = pending;
14992
+ var dropped = superseded;
14992
14993
  pending = null;
14994
+ superseded = null;
14995
+ if (dropped) entries = entries.filter(function(queued, index) {
14996
+ var _dropped_get;
14997
+ return index >= ((_dropped_get = dropped.get(queued.id)) !== null && _dropped_get !== void 0 ? _dropped_get : 0);
14998
+ });
14999
+ if (!entries.length) return;
14993
15000
  engine === null || engine === void 0 || engine.applyViewStates(entries);
14994
15001
  flushListener === null || flushListener === void 0 || flushListener(entries);
14995
15002
  });
14996
15003
  }
14997
15004
  pending.push(entry);
14998
15005
  }
14999
- var nativeTextInputColorProps, nativeOutlineProps, nativeIntrinsicSizeProps, engine, scopeStates, mappingKeys, compiledMappings, scopeMappings, nextTableId, pendingHosts, pendingStates, maxPendingHosts, idleFlushQueued, pending, flushListener;
15006
+ function supersedeNativeViewStates(id) {
15007
+ if (!pending) return;
15008
+ (superseded || (superseded = /* @__PURE__ */ new Map())).set(id, pending.length);
15009
+ }
15010
+ var nativeTextInputColorProps, nativeOutlineProps, nativeIntrinsicSizeProps, engine, scopeStates, mappingKeys, compiledMappings, scopeMappings, nextTableId, pendingHosts, pendingStates, maxPendingHosts, idleFlushQueued, pending, flushListener, superseded;
15000
15011
  var init_nativeStyleEngine_native = __esmMin((() => {
15001
15012
  init_createVariable_native();
15002
15013
  init_objectSpread2();
@@ -15032,6 +15043,7 @@ var init_nativeStyleEngine_native = __esmMin((() => {
15032
15043
  idleFlushQueued = false;
15033
15044
  pending = null;
15034
15045
  flushListener = null;
15046
+ superseded = null;
15035
15047
  }));
15036
15048
  //#endregion
15037
15049
  //#region ../web/dist/esm/setupHooks.native.js
@@ -19230,6 +19242,7 @@ function createComponent(staticConfig) {
19230
19242
  var nativeEngine = getNativeStyleEngine();
19231
19243
  var canNativeUpdate = !!nativeEngine && !isPassthrough && !isHOC && !willBeAnimated && !groupName && !props.disableNativeStyle;
19232
19244
  stateRef.current.nativePushedStates = canNativeUpdate ? /* @__PURE__ */ new Set() : void 0;
19245
+ if (stateRef.current.nativeLink) supersedeNativeViewStates(stateRef.current.nativeLink.id);
19233
19246
  stateRef.current.nativeThemeState = void 0;
19234
19247
  stateRef.current.nativeActiveState = canNativeUpdate ? themeState === null || themeState === void 0 ? void 0 : themeState.name : void 0;
19235
19248
  var pushViewState = canNativeUpdate ? function(stateName, style2) {
@@ -4044,19 +4044,31 @@ function updateNativeStyleLink(ref, host) {
4044
4044
  ref.nativePushedKeys = void 0;
4045
4045
  if (host && engine && ref.nativeStyleUpdate) ref.nativeLink = engine.link(host, {});
4046
4046
  }
4047
+ var superseded = null;
4047
4048
  function queueNativeViewState(entry) {
4048
4049
  if (!engine) return;
4049
4050
  if (!pending) {
4050
4051
  pending = [];
4051
4052
  queueMicrotask(function() {
4052
4053
  var entries = pending;
4054
+ var dropped = superseded;
4053
4055
  pending = null;
4056
+ superseded = null;
4057
+ if (dropped) entries = entries.filter(function(queued, index) {
4058
+ var _dropped_get;
4059
+ return index >= ((_dropped_get = dropped.get(queued.id)) !== null && _dropped_get !== void 0 ? _dropped_get : 0);
4060
+ });
4061
+ if (!entries.length) return;
4054
4062
  engine === null || engine === void 0 || engine.applyViewStates(entries);
4055
4063
  flushListener === null || flushListener === void 0 || flushListener(entries);
4056
4064
  });
4057
4065
  }
4058
4066
  pending.push(entry);
4059
4067
  }
4068
+ function supersedeNativeViewStates(id) {
4069
+ if (!pending) return;
4070
+ (superseded || (superseded = /* @__PURE__ */ new Map())).set(id, pending.length);
4071
+ }
4060
4072
  //#endregion
4061
4073
  //#region ../web/dist/esm/setupHooks.native.js
4062
4074
  var hooks = {};
@@ -8846,6 +8858,7 @@ ${banner}
8846
8858
  var nativeEngine = getNativeStyleEngine();
8847
8859
  var canNativeUpdate = !!nativeEngine && !isPassthrough && !isHOC && !willBeAnimated && !groupName && !props.disableNativeStyle;
8848
8860
  stateRef.current.nativePushedStates = canNativeUpdate ? /* @__PURE__ */ new Set() : void 0;
8861
+ if (stateRef.current.nativeLink) supersedeNativeViewStates(stateRef.current.nativeLink.id);
8849
8862
  stateRef.current.nativeThemeState = void 0;
8850
8863
  stateRef.current.nativeActiveState = canNativeUpdate ? themeState === null || themeState === void 0 ? void 0 : themeState.name : void 0;
8851
8864
  var pushViewState = canNativeUpdate ? function(stateName, style2) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/core",
3
- "version": "3.0.6",
3
+ "version": "3.0.7",
4
4
  "gitHead": "a49cc7ea6b93ba384e77a4880ae48ac4a5635c14",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -137,19 +137,19 @@
137
137
  "clean:build": "tamagui-build clean:build"
138
138
  },
139
139
  "dependencies": {
140
- "@tamagui/compose-refs": "3.0.6",
141
- "@tamagui/constants": "3.0.6",
142
- "@tamagui/helpers": "3.0.6",
143
- "@tamagui/react-native-media-driver": "3.0.6",
144
- "@tamagui/react-native-use-pressable": "3.0.6",
145
- "@tamagui/use-element-layout": "3.0.6",
146
- "@tamagui/use-event": "3.0.6",
147
- "@tamagui/web": "3.0.6"
140
+ "@tamagui/compose-refs": "3.0.7",
141
+ "@tamagui/constants": "3.0.7",
142
+ "@tamagui/helpers": "3.0.7",
143
+ "@tamagui/react-native-media-driver": "3.0.7",
144
+ "@tamagui/react-native-use-pressable": "3.0.7",
145
+ "@tamagui/use-element-layout": "3.0.7",
146
+ "@tamagui/use-event": "3.0.7",
147
+ "@tamagui/web": "3.0.7"
148
148
  },
149
149
  "devDependencies": {
150
- "@tamagui/build": "3.0.6",
151
- "@tamagui/native-bundle": "3.0.6",
152
- "@tamagui/react-native-web-lite": "3.0.6",
150
+ "@tamagui/build": "3.0.7",
151
+ "@tamagui/native-bundle": "3.0.7",
152
+ "@tamagui/react-native-web-lite": "3.0.7",
153
153
  "@testing-library/react": "^16.1.0",
154
154
  "csstype": "^3.0.10",
155
155
  "react": "19.2.3",
@@ -164,5 +164,5 @@
164
164
  "./dist/cjs": "./dist/esm/index.native.js",
165
165
  "./theme-update": "./dist/esm/theme-update.native.js"
166
166
  },
167
- "releaseSourceCommit": "ee01c1a5d113f9d0f4e9e26c35154165ce25add6"
167
+ "releaseSourceCommit": "96f8bc1f222af0381729a2e2202370aa4a9808ef"
168
168
  }