tamagui 1.98.0 → 1.98.2
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 +19 -15
- package/dist/native.js.map +2 -2
- package/dist/test.native.js +19 -15
- package/dist/test.native.js.map +2 -2
- package/package.json +54 -59
package/dist/native.js
CHANGED
|
@@ -8854,7 +8854,7 @@ var require_Theme_native = __commonJS({
|
|
|
8854
8854
|
var isRoot = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1, stateRef = arguments.length > 4 ? arguments[4] : void 0, themeManager = themeState.themeManager, isNewTheme = themeState.isNewTheme;
|
|
8855
8855
|
if (!themeManager)
|
|
8856
8856
|
throw new Error(process.env.NODE_ENV === "development" ? "\u274C No theme found, either incorrect name, potential duplicate tamagui deps, or TamaguiProvider not providing themes." : "\u274C 005");
|
|
8857
|
-
var shallow = props.shallow, forceClassName = props.forceClassName, shouldRenderChildrenWithTheme = isNewTheme || "inverse" in props || "
|
|
8857
|
+
var shallow = props.shallow, forceClassName = props.forceClassName, shouldRenderChildrenWithTheme = isNewTheme || "inverse" in props || "name" in props || stateRef.current.hasEverThemed || isRoot;
|
|
8858
8858
|
if (shouldRenderChildrenWithTheme && (stateRef.current.hasEverThemed = !0), !shouldRenderChildrenWithTheme)
|
|
8859
8859
|
return children;
|
|
8860
8860
|
var next = children;
|
|
@@ -9201,14 +9201,14 @@ var require_Slot_native = __commonJS({
|
|
|
9201
9201
|
key = sourceKeys[i], !(excluded.indexOf(key) >= 0) && (target[key] = source[key]);
|
|
9202
9202
|
return target;
|
|
9203
9203
|
}
|
|
9204
|
-
var Slot = /* @__PURE__ */ (0, import_react4.forwardRef)(function(props, forwardedRef) {
|
|
9204
|
+
var is19 = import_react4.version.startsWith("19."), Slot = /* @__PURE__ */ (0, import_react4.forwardRef)(function(props, forwardedRef) {
|
|
9205
9205
|
var children = props.children, slotProps = _object_without_properties5(props, [
|
|
9206
9206
|
"children"
|
|
9207
9207
|
]);
|
|
9208
9208
|
if (/* @__PURE__ */ (0, import_react4.isValidElement)(children)) {
|
|
9209
9209
|
var mergedProps = mergeSlotProps(children, slotProps);
|
|
9210
9210
|
return /* @__PURE__ */ (0, import_react4.cloneElement)(children, children.type.avoidForwardRef ? mergedProps : _object_spread_props8(_object_spread9({}, mergedProps), {
|
|
9211
|
-
ref: (0, import_compose_refs.composeRefs)(forwardedRef, children.ref)
|
|
9211
|
+
ref: (0, import_compose_refs.composeRefs)(forwardedRef, is19 ? children.props.ref : children.ref)
|
|
9212
9212
|
}));
|
|
9213
9213
|
}
|
|
9214
9214
|
return import_react4.Children.count(children) > 1 ? import_react4.Children.only(null) : null;
|
|
@@ -9870,14 +9870,12 @@ var require_createComponent_native = __commonJS({
|
|
|
9870
9870
|
var disableThemeProp = !1, disableTheme = disableThemeProp || isHOC;
|
|
9871
9871
|
process.env.NODE_ENV === "development" && time && time(_templateObject6()), props.themeShallow && (curStateRef.themeShallow = !0);
|
|
9872
9872
|
var themeStateProps = {
|
|
9873
|
-
name: props.theme,
|
|
9874
9873
|
componentName: componentName2,
|
|
9875
9874
|
disable: disableTheme,
|
|
9876
9875
|
shallow: curStateRef.themeShallow,
|
|
9877
|
-
inverse: props.themeInverse,
|
|
9878
9876
|
debug: debugProp
|
|
9879
9877
|
};
|
|
9880
|
-
if (typeof curStateRef.isListeningToTheme == "boolean" && (themeStateProps.shouldUpdate = function() {
|
|
9878
|
+
if ("themeInverse" in props && (themeStateProps.inverse = props.themeInverse), "name" in props && (themeStateProps.name = props.theme), typeof curStateRef.isListeningToTheme == "boolean" && (themeStateProps.shouldUpdate = function() {
|
|
9881
9879
|
return stateRef.current.isListeningToTheme;
|
|
9882
9880
|
}), themeStateProps.deopt = willBeAnimated, process.env.NODE_ENV === "development" && debugProp && debugProp !== "profile") {
|
|
9883
9881
|
var name = "".concat(componentName2 || (Component == null ? void 0 : Component.displayName) || (Component == null ? void 0 : Component.name) || "[Unnamed Component]"), type = (hasEnterStyle ? "(hasEnter)" : "") + (isAnimated ? "(animated)" : "") + (isReactNative ? "(rnw)" : "") + ((presenceState == null ? void 0 : presenceState.isPresent) === !1 ? "(EXIT)" : ""), dataIs = propsIn["data-is"] || "", banner = "".concat(internalID, " ").concat(name).concat(dataIs ? " ".concat(dataIs) : "", " ").concat(type);
|
|
@@ -26674,12 +26672,14 @@ var import_meta, createStoreImpl, createStore, init_vanilla = __esm({
|
|
|
26674
26672
|
var nextState = typeof partial == "function" ? partial(state) : partial;
|
|
26675
26673
|
if (!Object.is(nextState, state)) {
|
|
26676
26674
|
var previousState = state;
|
|
26677
|
-
state = replace ?? typeof nextState != "object" ? nextState : Object.assign({}, state, nextState), listeners.forEach(function(listener) {
|
|
26675
|
+
state = replace ?? (typeof nextState != "object" || nextState === null) ? nextState : Object.assign({}, state, nextState), listeners.forEach(function(listener) {
|
|
26678
26676
|
return listener(state, previousState);
|
|
26679
26677
|
});
|
|
26680
26678
|
}
|
|
26681
26679
|
}, getState = function() {
|
|
26682
26680
|
return state;
|
|
26681
|
+
}, getInitialState = function() {
|
|
26682
|
+
return initialState;
|
|
26683
26683
|
}, subscribe = function(listener) {
|
|
26684
26684
|
return listeners.add(listener), function() {
|
|
26685
26685
|
return listeners.delete(listener);
|
|
@@ -26689,10 +26689,11 @@ var import_meta, createStoreImpl, createStore, init_vanilla = __esm({
|
|
|
26689
26689
|
}, api = {
|
|
26690
26690
|
setState,
|
|
26691
26691
|
getState,
|
|
26692
|
+
getInitialState,
|
|
26692
26693
|
subscribe,
|
|
26693
26694
|
destroy
|
|
26694
|
-
};
|
|
26695
|
-
return
|
|
26695
|
+
}, initialState = state = createState(setState, getState, api);
|
|
26696
|
+
return api;
|
|
26696
26697
|
}, createStore = function(createState) {
|
|
26697
26698
|
return createState ? createStoreImpl(createState) : createStoreImpl;
|
|
26698
26699
|
};
|
|
@@ -26975,16 +26976,18 @@ __export(esm_exports, {
|
|
|
26975
26976
|
useStore: () => useStore
|
|
26976
26977
|
});
|
|
26977
26978
|
function useStore(api) {
|
|
26978
|
-
var selector = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] :
|
|
26979
|
+
var selector = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : identity, equalityFn = arguments.length > 2 ? arguments[2] : void 0;
|
|
26979
26980
|
process.env.NODE_ENV !== "production" && equalityFn && !didWarnAboutEqualityFn && (console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"), didWarnAboutEqualityFn = !0);
|
|
26980
|
-
var slice = useSyncExternalStoreWithSelector(api.subscribe, api.getState, api.getServerState || api.
|
|
26981
|
-
return
|
|
26981
|
+
var slice = useSyncExternalStoreWithSelector(api.subscribe, api.getState, api.getServerState || api.getInitialState, selector, equalityFn);
|
|
26982
|
+
return useDebugValue(slice), slice;
|
|
26982
26983
|
}
|
|
26983
|
-
var import_react, import_with_selector, useSyncExternalStoreWithSelector, didWarnAboutEqualityFn, createImpl, create, react, init_esm = __esm({
|
|
26984
|
+
var import_react, import_with_selector, useDebugValue, useSyncExternalStoreWithSelector, didWarnAboutEqualityFn, identity, createImpl, create, react, init_esm = __esm({
|
|
26984
26985
|
"../../node_modules/reforest/node_modules/zustand/esm/index.js"() {
|
|
26985
26986
|
init_vanilla();
|
|
26986
26987
|
init_vanilla();
|
|
26987
|
-
import_react = require("react"), import_with_selector = __toESM(require_with_selector()), useSyncExternalStoreWithSelector = import_with_selector.default.useSyncExternalStoreWithSelector, didWarnAboutEqualityFn = !1
|
|
26988
|
+
import_react = __toESM(require("react")), import_with_selector = __toESM(require_with_selector()), useDebugValue = import_react.default.useDebugValue, useSyncExternalStoreWithSelector = import_with_selector.default.useSyncExternalStoreWithSelector, didWarnAboutEqualityFn = !1, identity = function(arg) {
|
|
26989
|
+
return arg;
|
|
26990
|
+
};
|
|
26988
26991
|
createImpl = function(createState) {
|
|
26989
26992
|
process.env.NODE_ENV !== "production" && typeof createState != "function" && console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");
|
|
26990
26993
|
var api = typeof createState == "function" ? createStore(createState) : createState, useBoundStore = function(selector, equalityFn) {
|
|
@@ -34682,6 +34685,7 @@ var require_SelectTrigger_native = __commonJS({
|
|
|
34682
34685
|
componentName: TRIGGER_NAME,
|
|
34683
34686
|
unstyled,
|
|
34684
34687
|
tag: "button",
|
|
34688
|
+
type: "button",
|
|
34685
34689
|
id: itemParentContext.id
|
|
34686
34690
|
}, !unstyled && {
|
|
34687
34691
|
backgrounded: !0,
|
|
@@ -35246,7 +35250,7 @@ var require_Select_native = __commonJS({
|
|
|
35246
35250
|
});
|
|
35247
35251
|
var shouldRenderWebNative = import_constants4.isWeb && (native === !0 || native === "web" || Array.isArray(native) && native.includes("web")), setActiveIndexDebounced = (0, import_use_debounce.useDebounce)(function(index) {
|
|
35248
35252
|
setActiveIndex(function(prev) {
|
|
35249
|
-
return prev !== index
|
|
35253
|
+
return prev !== index && typeof index == "number" && activeIndexRef.current !== index ? (emitActiveIndex(index), index) : null;
|
|
35250
35254
|
});
|
|
35251
35255
|
}, 1, {}, []);
|
|
35252
35256
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AdaptProvider, {
|