Socket
Socket
Sign inDemoInstall

@tamagui/web

Package Overview
Dependencies
Maintainers
0
Versions
741
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tamagui/web - npm Package Compare versions

Comparing version 1.107.0 to 1.108.0-1722728147390

dist/cjs/helpers/isActivePlatform.js

16

dist/cjs/_withStableStyle.js

@@ -0,5 +1,6 @@

var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {

@@ -14,3 +15,10 @@ for (var name in all)

};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
mod
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var withStableStyle_exports = {};

@@ -21,4 +29,4 @@ __export(withStableStyle_exports, {

module.exports = __toCommonJS(withStableStyle_exports);
var import_react = require("react"), import_useTheme = require("./hooks/useTheme"), import_jsx_runtime = require("react/jsx-runtime");
const _withStableStyle = (Component, styleProvider) => (0, import_react.forwardRef)((props, ref) => {
var import_react = __toESM(require("react")), import_useTheme = require("./hooks/useTheme"), import_jsx_runtime = require("react/jsx-runtime");
const _withStableStyle = (Component, styleProvider) => import_react.default.forwardRef((props, ref) => {
const { _expressions = [], ...rest } = props, theme = (0, import_useTheme.useTheme)();

@@ -25,0 +33,0 @@ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Component, { ref, style: styleProvider(theme, _expressions), ...rest });

"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {

@@ -15,3 +16,10 @@ for (var name in all)

};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
mod
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var withStableStyle_exports = {};

@@ -22,3 +30,3 @@ __export(withStableStyle_exports, {

module.exports = __toCommonJS(withStableStyle_exports);
var import_jsx_runtime = require("react/jsx-runtime"), import_react = require("react"), import_useTheme = require("./hooks/useTheme");
var import_jsx_runtime = require("react/jsx-runtime"), import_react = __toESM(require("react")), import_useTheme = require("./hooks/useTheme");
function _define_property(obj, key, value) {

@@ -61,3 +69,3 @@ return key in obj ? Object.defineProperty(obj, key, {

var _withStableStyle = function(Component, styleProvider) {
return /* @__PURE__ */ (0, import_react.forwardRef)(function(props, ref) {
return /* @__PURE__ */ import_react.default.forwardRef(function(props, ref) {
var _props__expressions = props._expressions, _expressions = _props__expressions === void 0 ? [] : _props__expressions, rest = _object_without_properties(props, [

@@ -64,0 +72,0 @@ "_expressions"

@@ -35,3 +35,3 @@ var __create = Object.create;

module.exports = __toCommonJS(createComponent_exports);
var import_compose_refs = require("@tamagui/compose-refs"), import_constants = require("@tamagui/constants"), import_helpers = require("@tamagui/helpers"), import_react = __toESM(require("react")), import_config = require("./config"), import_constants2 = require("./constants/constants"), import_isDevTools = require("./constants/isDevTools"), import_ComponentContext = require("./contexts/ComponentContext"), import_createVariable = require("./createVariable"), import_defaultComponentState = require("./defaultComponentState"), import_createShallowSetState = require("./helpers/createShallowSetState"), import_getSplitStyles = require("./helpers/getSplitStyles"), import_isObj = require("./helpers/isObj"), import_log = require("./helpers/log"), import_mergeProps = require("./helpers/mergeProps"), import_setElementProps = require("./helpers/setElementProps"), import_themeable = require("./helpers/themeable"), import_useDidHydrateOnce = require("./hooks/useDidHydrateOnce"), import_useMedia = require("./hooks/useMedia"), import_useTheme = require("./hooks/useTheme"), import_setupHooks = require("./setupHooks"), import_Slot = require("./views/Slot"), import_Theme = require("./views/Theme"), import_ThemeDebug = require("./views/ThemeDebug"), import_jsx_runtime = require("react/jsx-runtime");
var import_react = __toESM(require("react")), import_compose_refs = require("@tamagui/compose-refs"), import_constants = require("@tamagui/constants"), import_helpers = require("@tamagui/helpers"), import_config = require("./config"), import_constants2 = require("./constants/constants"), import_isDevTools = require("./constants/isDevTools"), import_ComponentContext = require("./contexts/ComponentContext"), import_createVariable = require("./createVariable"), import_defaultComponentState = require("./defaultComponentState"), import_createShallowSetState = require("./helpers/createShallowSetState"), import_getSplitStyles = require("./helpers/getSplitStyles"), import_isObj = require("./helpers/isObj"), import_log = require("./helpers/log"), import_mergeProps = require("./helpers/mergeProps"), import_setElementProps = require("./helpers/setElementProps"), import_themeable = require("./helpers/themeable"), import_useDidHydrateOnce = require("./hooks/useDidHydrateOnce"), import_useMedia = require("./hooks/useMedia"), import_useTheme = require("./hooks/useTheme"), import_setupHooks = require("./setupHooks"), import_Slot = require("./views/Slot"), import_Theme = require("./views/Theme"), import_ThemeDebug = require("./views/ThemeDebug"), import_jsx_runtime = require("react/jsx-runtime");
let tamaguiConfig, time, debugKeyListeners, startVisualizer;

@@ -72,3 +72,3 @@ const componentSetStates = /* @__PURE__ */ new Set();

const useComponentState = (props, { animationDriver, groups }, staticConfig, config) => {
const useAnimations = animationDriver?.useAnimations, stateRef = (0, import_react.useRef)(
const useAnimations = animationDriver?.useAnimations, stateRef = import_react.default.useRef(
void 0

@@ -90,3 +90,3 @@ );

disabled != null && (initialState.disabled = disabled);
const states = (0, import_react.useState)(initialState), state = props.forceStyle ? { ...states[0], [props.forceStyle]: !0 } : states[0], setState = states[1], isHydrated = state.unmounted === !1 || state.unmounted === "should-enter";
const states = import_react.default.useState(initialState), state = props.forceStyle ? { ...states[0], [props.forceStyle]: !0 } : states[0], setState = states[1], isHydrated = state.unmounted === !1 || state.unmounted === "should-enter";
let isAnimated = willBeAnimated;

@@ -191,10 +191,10 @@ import_constants.isWeb && hasRNAnimation && !staticConfig.isHOC && state.unmounted === !0 && (isAnimated = !1, curStateRef.willHydrate = !0), disabled !== state.disabled && (state.disabled = disabled, disabled && Object.assign(state, import_defaultComponentState.defaultComponentStateMounted), setState({ ...state }));

});
const component = (0, import_react.forwardRef)((propsIn, forwardedRef) => {
const internalID = process.env.NODE_ENV === "development" ? (0, import_react.useId)() : "";
const component = import_react.default.forwardRef((propsIn, forwardedRef) => {
const internalID = process.env.NODE_ENV === "development" ? import_react.default.useId() : "";
process.env.NODE_ENV === "development" && startVisualizer && (startVisualizer(), startVisualizer = void 0), process.env.NODE_ENV === "test" && propsIn["data-test-renders"] && (propsIn["data-test-renders"].current ??= 0, propsIn["data-test-renders"].current += 1);
const componentContext = (0, import_react.useContext)(import_ComponentContext.ComponentContext);
const componentContext = import_react.default.useContext(import_ComponentContext.ComponentContext);
let styledContextProps, overriddenContextProps, contextValue;
const { context, isReactNative } = staticConfig;
if (context) {
contextValue = (0, import_react.useContext)(context);
contextValue = import_react.default.useContext(context);
const { inverseShorthands } = (0, import_config.getConfig)();

@@ -213,3 +213,3 @@ for (const key in context.props) {

const debugProp = props.debug, componentName2 = props.componentName || staticConfig.componentName;
process.env.NODE_ENV === "development" && import_constants.isClient && (0, import_react.useEffect)(() => {
process.env.NODE_ENV === "development" && import_constants.isClient && import_react.default.useEffect(() => {
let overlay = null;

@@ -385,3 +385,3 @@ const debugVisualizerHandler = (show = !1) => {

import_setElementProps.setElementProps
)), viewProps.ref = curStateRef.composedRef, process.env.NODE_ENV === "development" && !isReactNative && !isText && import_constants.isWeb && !isHOC && import_react.Children.toArray(props.children).forEach((item) => {
)), viewProps.ref = curStateRef.composedRef, process.env.NODE_ENV === "development" && !isReactNative && !isText && import_constants.isWeb && !isHOC && import_react.default.Children.toArray(props.children).forEach((item) => {
typeof item == "string" && item !== `

@@ -395,3 +395,3 @@ ` && console.error(

debugProp && (console.groupCollapsed("Rendered style >"), console.warn(getComputedStyle(stateRef.current.host)), console.groupEnd());
}), (0, import_react.useEffect)(() => {
}), import_react.default.useEffect(() => {
if (disabled)

@@ -517,6 +517,6 @@ return;

staticConfig
)), useChildrenResult ? content = useChildrenResult : content = (0, import_react.createElement)(elementType, viewProps, content);
)), useChildrenResult ? content = useChildrenResult : content = import_react.default.createElement(elementType, viewProps, content);
const ResetPresence = config?.animations?.ResetPresence;
ResetPresence && willBeAnimated && (hasEnterStyle || presenceState) && content && typeof content != "string" && (content = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ResetPresence, { children: content })), process.env.NODE_ENV === "development" && time && time`create-element`;
const groupState = curStateRef.group, subGroupContext = (0, import_react.useMemo)(() => {
const groupState = curStateRef.group, subGroupContext = import_react.default.useMemo(() => {
if (!(!groupState || !groupName))

@@ -627,3 +627,3 @@ return groupState.listeners.clear(), {

let res = component;
(process.env.TAMAGUI_FORCE_MEMO || staticConfig.memo) && (res = (0, import_react.memo)(res)), res.staticConfig = staticConfig;
(process.env.TAMAGUI_FORCE_MEMO || staticConfig.memo) && (res = import_react.default.memo(res)), res.staticConfig = staticConfig;
function extendStyledConfig(extended) {

@@ -642,5 +642,5 @@ return {

function styleable(Component2, options) {
let out = Component2.render?.length === 2 ? Component2 : (0, import_react.forwardRef)(Component2);
let out = Component2.render?.length === 2 ? Component2 : import_react.default.forwardRef(Component2);
const extendedConfig = extendStyledConfig(options?.staticConfig);
return out = options?.disableTheme ? out : (0, import_themeable.themeable)(out, extendedConfig), process.env.TAMAGUI_MEMOIZE_STYLEABLE && (out = (0, import_react.memo)(out)), out.staticConfig = extendedConfig, out.styleable = styleable, out;
return out = options?.disableTheme ? out : (0, import_themeable.themeable)(out, extendedConfig), process.env.TAMAGUI_MEMOIZE_STYLEABLE && (out = import_react.default.memo(out)), out.staticConfig = extendedConfig, out.styleable = styleable, out;
}

@@ -713,3 +713,3 @@ return res.extractable = extractable, res.styleable = styleable, res;

return children;
const childrenList = areChildrenArray ? children : import_react.Children.toArray(children);
const childrenList = areChildrenArray ? children : import_react.default.Children.toArray(children);
if (childrenList.length <= 1 && !isZStack && !childrenList[0]?.type?.shouldForwardSpace)

@@ -726,3 +726,3 @@ return children;

})), isEmpty || !child || child.key && !isZStack ? final.push(child) : final.push(
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.Fragment, { children: isZStack ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AbsoluteFill, { children: child }) : child }, `${index}0t`)
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.default.Fragment, { children: isZStack ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AbsoluteFill, { children: child }) : child }, `${index}0t`)
), isUnspaced(child) && index === 0 || isZStack) continue;

@@ -737,3 +737,3 @@ const next = childrenList[index + 1];

})
), final.push(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.Fragment, { children: separator }, `${index}03t`)), hasSpace && final.push(
), final.push(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.default.Fragment, { children: separator }, `${index}03t`)), hasSpace && final.push(
createSpacer({

@@ -740,0 +740,0 @@ key: `_${index}01t`,

@@ -36,3 +36,3 @@ "use strict";

module.exports = __toCommonJS(createComponent_exports);
var import_jsx_runtime = require("react/jsx-runtime"), import_compose_refs = require("@tamagui/compose-refs"), import_constants = require("@tamagui/constants"), import_helpers = require("@tamagui/helpers"), import_react = __toESM(require("react")), import_config = require("./config"), import_constants2 = require("./constants/constants"), import_isDevTools = require("./constants/isDevTools"), import_ComponentContext = require("./contexts/ComponentContext"), import_createVariable = require("./createVariable"), import_defaultComponentState = require("./defaultComponentState"), import_createShallowSetState = require("./helpers/createShallowSetState"), import_getSplitStyles = require("./helpers/getSplitStyles"), import_isObj = require("./helpers/isObj"), import_log = require("./helpers/log"), import_mergeProps = require("./helpers/mergeProps"), import_setElementProps = require("./helpers/setElementProps"), import_themeable = require("./helpers/themeable"), import_useDidHydrateOnce = require("./hooks/useDidHydrateOnce"), import_useMedia = require("./hooks/useMedia"), import_useTheme = require("./hooks/useTheme"), import_setupHooks = require("./setupHooks"), import_Slot = require("./views/Slot"), import_Theme = require("./views/Theme"), import_ThemeDebug = require("./views/ThemeDebug");
var import_jsx_runtime = require("react/jsx-runtime"), import_react = __toESM(require("react")), import_compose_refs = require("@tamagui/compose-refs"), import_constants = require("@tamagui/constants"), import_helpers = require("@tamagui/helpers"), import_config = require("./config"), import_constants2 = require("./constants/constants"), import_isDevTools = require("./constants/isDevTools"), import_ComponentContext = require("./contexts/ComponentContext"), import_createVariable = require("./createVariable"), import_defaultComponentState = require("./defaultComponentState"), import_createShallowSetState = require("./helpers/createShallowSetState"), import_getSplitStyles = require("./helpers/getSplitStyles"), import_isObj = require("./helpers/isObj"), import_log = require("./helpers/log"), import_mergeProps = require("./helpers/mergeProps"), import_setElementProps = require("./helpers/setElementProps"), import_themeable = require("./helpers/themeable"), import_useDidHydrateOnce = require("./hooks/useDidHydrateOnce"), import_useMedia = require("./hooks/useMedia"), import_useTheme = require("./hooks/useTheme"), import_setupHooks = require("./setupHooks"), import_Slot = require("./views/Slot"), import_Theme = require("./views/Theme"), import_ThemeDebug = require("./views/ThemeDebug");
function _array_like_to_array(arr, len) {

@@ -368,3 +368,3 @@ (len == null || len > arr.length) && (len = arr.length);

var useComponentState = function(props, param, staticConfig, config) {
var animationDriver = param.animationDriver, groups = param.groups, _animationDriver_usePresence, useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, stateRef = (0, import_react.useRef)(void 0);
var animationDriver = param.animationDriver, groups = param.groups, _animationDriver_usePresence, useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, stateRef = import_react.default.useRef(void 0);
stateRef.current || (stateRef.current = {});

@@ -387,3 +387,3 @@ var hasAnimationProp = !!("animation" in props || props.style && hasAnimatedStyleValue(props.style)), supportsCSSVars = animationDriver == null ? void 0 : animationDriver.supportsCSSVars, curStateRef = stateRef.current, willBeAnimatedClient = function() {

disabled != null && (initialState.disabled = disabled);
var states = (0, import_react.useState)(initialState), state = props.forceStyle ? _object_spread_props(_object_spread({}, states[0]), _define_property({}, props.forceStyle, !0)) : states[0], setState = states[1], isHydrated = state.unmounted === !1 || state.unmounted === "should-enter", isAnimated = willBeAnimated;
var states = import_react.default.useState(initialState), state = props.forceStyle ? _object_spread_props(_object_spread({}, states[0]), _define_property({}, props.forceStyle, !0)) : states[0], setState = states[1], isHydrated = state.unmounted === !1 || state.unmounted === "should-enter", isAnimated = willBeAnimated;
import_constants.isWeb && hasRNAnimation && !staticConfig.isHOC && state.unmounted === !0 && (isAnimated = !1, curStateRef.willHydrate = !0), disabled !== state.disabled && (state.disabled = disabled, disabled && Object.assign(state, import_defaultComponentState.defaultComponentStateMounted), setState(_object_spread({}, state)));

@@ -478,4 +478,4 @@ var setStateShallow = (0, import_createShallowSetState.createShallowSetState)(setState, disabled, !1, props.debug);

});
var component = /* @__PURE__ */ (0, import_react.forwardRef)(function(propsIn, forwardedRef) {
var _themeState_state, _hooks_usePropsTransform, _hooks_useEvents, _config_animations, internalID = process.env.NODE_ENV === "development" ? (0, import_react.useId)() : "";
var component = /* @__PURE__ */ import_react.default.forwardRef(function(propsIn, forwardedRef) {
var _themeState_state, _hooks_usePropsTransform, _hooks_useEvents, _config_animations, internalID = process.env.NODE_ENV === "development" ? import_react.default.useId() : "";
if (process.env.NODE_ENV === "development" && startVisualizer && (startVisualizer(), startVisualizer = void 0), !hasSetupBaseViews) {

@@ -491,5 +491,5 @@ var _hooks_getBaseViews;

}
var componentContext = (0, import_react.useContext)(import_ComponentContext.ComponentContext), styledContextProps, overriddenContextProps, contextValue, context = staticConfig.context, isReactNative = staticConfig.isReactNative;
var componentContext = import_react.default.useContext(import_ComponentContext.ComponentContext), styledContextProps, overriddenContextProps, contextValue, context = staticConfig.context, isReactNative = staticConfig.isReactNative;
if (context) {
contextValue = (0, import_react.useContext)(context);
contextValue = import_react.default.useContext(context);
var inverseShorthands = (0, import_config.getConfig)().inverseShorthands;

@@ -510,3 +510,3 @@ for (var key in context.props) {

var debugProp = props.debug, componentName2 = props.componentName || staticConfig.componentName;
if (process.env.NODE_ENV === "development" && import_constants.isClient && (0, import_react.useEffect)(function() {
if (process.env.NODE_ENV === "development" && import_constants.isClient && import_react.default.useEffect(function() {
var overlay = null, debugVisualizerHandler = function() {

@@ -658,3 +658,3 @@ var show = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, node = curStateRef.host;

return stateRef.current.host = x;
}, forwardedRef, import_setElementProps.setElementProps)), viewProps.ref = curStateRef.composedRef, process.env.NODE_ENV === "development" && !isReactNative && !isText && import_constants.isWeb && !isHOC && import_react.Children.toArray(props.children).forEach(function(item) {
}, forwardedRef, import_setElementProps.setElementProps)), viewProps.ref = curStateRef.composedRef, process.env.NODE_ENV === "development" && !isReactNative && !isText && import_constants.isWeb && !isHOC && import_react.default.Children.toArray(props.children).forEach(function(item) {
typeof item == "string" && item !== `

@@ -671,3 +671,3 @@ ` && console.error("Unexpected text node: ".concat(item, ". A text node cannot be a child of a <View>."));

debugProp && (console.groupCollapsed("Rendered style >"), console.warn(getComputedStyle(stateRef.current.host)), console.groupEnd());
}), (0, import_react.useEffect)(function() {
}), import_react.default.useEffect(function() {
if (!disabled) {

@@ -800,3 +800,3 @@ if (state.unmounted === !0 && hasEnterStyle) {

var useChildrenResult;
import_setupHooks.hooks.useChildren && (useChildrenResult = import_setupHooks.hooks.useChildren(elementType, content, viewProps, events, staticConfig)), useChildrenResult ? content = useChildrenResult : content = /* @__PURE__ */ (0, import_react.createElement)(elementType, viewProps, content);
import_setupHooks.hooks.useChildren && (useChildrenResult = import_setupHooks.hooks.useChildren(elementType, content, viewProps, events, staticConfig)), useChildrenResult ? content = useChildrenResult : content = /* @__PURE__ */ import_react.default.createElement(elementType, viewProps, content);
var ResetPresence = config == null || (_config_animations = config.animations) === null || _config_animations === void 0 ? void 0 : _config_animations.ResetPresence;

@@ -806,3 +806,3 @@ ResetPresence && willBeAnimated && (hasEnterStyle || presenceState) && content && typeof content != "string" && (content = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ResetPresence, {

})), process.env.NODE_ENV === "development" && time && time(_templateObject18());
var groupState = curStateRef.group, subGroupContext = (0, import_react.useMemo)(function() {
var groupState = curStateRef.group, subGroupContext = import_react.default.useMemo(function() {
var _splitStyles_style, _splitStyles_style1;

@@ -902,3 +902,3 @@ if (!(!groupState || !groupName))

var res = component;
(process.env.TAMAGUI_FORCE_MEMO || staticConfig.memo) && (res = /* @__PURE__ */ (0, import_react.memo)(res)), res.staticConfig = staticConfig;
(process.env.TAMAGUI_FORCE_MEMO || staticConfig.memo) && (res = /* @__PURE__ */ import_react.default.memo(res)), res.staticConfig = staticConfig;
function extendStyledConfig(extended) {

@@ -915,4 +915,4 @@ return _object_spread_props(_object_spread({}, staticConfig, extended), {

function styleable(Component2, options) {
var _Component_render, isForwardedRefAlready = ((_Component_render = Component2.render) === null || _Component_render === void 0 ? void 0 : _Component_render.length) === 2, out = isForwardedRefAlready ? Component2 : /* @__PURE__ */ (0, import_react.forwardRef)(Component2), extendedConfig = extendStyledConfig(options == null ? void 0 : options.staticConfig);
return out = options != null && options.disableTheme ? out : (0, import_themeable.themeable)(out, extendedConfig), process.env.TAMAGUI_MEMOIZE_STYLEABLE && (out = /* @__PURE__ */ (0, import_react.memo)(out)), out.staticConfig = extendedConfig, out.styleable = styleable, out;
var _Component_render, isForwardedRefAlready = ((_Component_render = Component2.render) === null || _Component_render === void 0 ? void 0 : _Component_render.length) === 2, out = isForwardedRefAlready ? Component2 : /* @__PURE__ */ import_react.default.forwardRef(Component2), extendedConfig = extendStyledConfig(options == null ? void 0 : options.staticConfig);
return out = options != null && options.disableTheme ? out : (0, import_themeable.themeable)(out, extendedConfig), process.env.TAMAGUI_MEMOIZE_STYLEABLE && (out = /* @__PURE__ */ import_react.default.memo(out)), out.staticConfig = extendedConfig, out.styleable = styleable, out;
}

@@ -972,3 +972,3 @@ return res.extractable = extractable, res.styleable = styleable, res;

return children;
var childrenList = areChildrenArray ? children : import_react.Children.toArray(children), len = childrenList.length;
var childrenList = areChildrenArray ? children : import_react.default.Children.toArray(children), len = childrenList.length;
if (len <= 1 && !isZStack && !(!((_childrenList_ = childrenList[0]) === null || _childrenList_ === void 0 || (_childrenList__type = _childrenList_.type) === null || _childrenList__type === void 0) && _childrenList__type.shouldForwardSpace))

@@ -985,3 +985,3 @@ return children;

key: child.key
})), isEmpty || !child || child.key && !isZStack ? final.push(child) : final.push(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.Fragment, {
})), isEmpty || !child || child.key && !isZStack ? final.push(child) : final.push(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.default.Fragment, {
children: isZStack ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AbsoluteFill, {

@@ -997,3 +997,3 @@ children: child

spaceFlex
})), final.push(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.Fragment, {
})), final.push(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.default.Fragment, {
children: separator

@@ -1000,0 +1000,0 @@ }, "".concat(index, "03t"))), hasSpace && final.push(createSpacer({

@@ -26,4 +26,12 @@ var __defProp = Object.defineProperty;

press: "active"
}, specifities = new Array(5).fill(0).map((_, i) => new Array(i).fill(":root").join("")), createMediaStyle = (styleObject, mediaKeyIn, mediaQueries, type, negate, priority) => {
const [property, _value, identifier, _pseudo, rules] = styleObject, conf = (0, import_config.getConfig)(), enableMediaPropOrder = conf.settings.mediaPropOrder, isTheme = type === "theme", isPlatform = type === "platform", isGroup = type === "group", isNonWindowMedia = isTheme || isPlatform || isGroup, negKey = negate ? "0" : "", ogPrefix = identifier.slice(0, identifier.indexOf("-") + 1), id = `${ogPrefix}${MEDIA_SEP}${mediaKeyIn.replace("-", "")}${negKey}${MEDIA_SEP}`;
}, specifities = new Array(5).fill(0).map((_, i) => new Array(i).fill(":root").join(""));
function getThemeOrGroupSelector(name, styleInner, isGroup, groupParts, isTheme = !1, precedenceImportancePrefix = "") {
const selectorStart = styleInner.indexOf(":root"), selectorEnd = styleInner.lastIndexOf("{"), selector = styleInner.slice(selectorStart, selectorEnd), precedenceSpace = (0, import_config.getSetting)("themeClassNameOnRoot") && isTheme ? "" : " ", pseudoSelectorName = groupParts.pseudo ? groupPseudoToPseudoCSSMap[groupParts.pseudo] || groupParts.pseudo : void 0, pseudoSelector = pseudoSelectorName ? `:${pseudoSelectorName}` : "", presedencePrefix = `:root${precedenceImportancePrefix}${precedenceSpace}`, mediaSelector = `.t_${isGroup ? "group_" : ""}${name}${pseudoSelector}`;
return [
selector,
`${presedencePrefix}${mediaSelector} ${selector.replace(":root", "")}`
];
}
const createMediaStyle = (styleObject, mediaKeyIn, mediaQueries, type, negate, priority) => {
const [property, , identifier, , rules] = styleObject, enableMediaPropOrder = (0, import_config.getSetting)("mediaPropOrder"), isTheme = type === "theme", isPlatform = type === "platform", isGroup = type === "group", isNonWindowMedia = isTheme || isPlatform || isGroup, negKey = negate ? "0" : "", ogPrefix = identifier.slice(0, identifier.indexOf("-") + 1), id = `${ogPrefix}${MEDIA_SEP}${mediaKeyIn.replace("-", "")}${negKey}${MEDIA_SEP}`;
let styleRule = "", groupPriority = "", groupMediaKey, containerName, nextIdentifier = identifier.replace(ogPrefix, id), styleInner = rules.map((rule) => rule.replace(identifier, nextIdentifier)).join(";"), isHover = !1;

@@ -34,9 +42,13 @@ if (isNonWindowMedia) {

const { name, media, pseudo } = (0, import_getGroupPropParts.getGroupPropParts)(mediaKeyIn);
groupMediaKey = media, isGroup && (containerName = name);
const groupClassName = (isGroup ? "group_" : "") + name, selectorStart = styleInner.indexOf(":root"), selectorEnd = styleInner.lastIndexOf("{"), selector = styleInner.slice(selectorStart, selectorEnd), precedenceSpace = (0, import_config.getSetting)("themeClassNameOnRoot") && isTheme ? "" : " ", pseudoSelectorName = pseudo ? groupPseudoToPseudoCSSMap[pseudo] || pseudo : void 0;
pseudo === "press" && (specificity += 2), pseudo === "hover" && (isHover = !0);
const pseudoSelector = pseudoSelectorName ? `:${pseudoSelectorName}` : "", presedencePrefix = `:root${specifities[specificity]}${precedenceSpace}`, mediaSelector = `.t_${groupClassName}${pseudoSelector}`, nextSelector = `${presedencePrefix}${mediaSelector} ${selector.replace(
":root",
""
)}`;
groupMediaKey = media;
const groupParts = (0, import_getGroupPropParts.getGroupPropParts)(mediaKeyIn);
isGroup && (containerName = name), pseudo === "press" && (specificity += 2), pseudo === "hover" && (isHover = !0);
const [selector, nextSelector] = getThemeOrGroupSelector(
name,
styleInner,
isGroup,
groupParts,
isTheme,
specifities[specificity]
);
styleRule = styleInner.replace(selector, nextSelector);

@@ -62,3 +74,3 @@ } else

), prefix = groupMediaKey ? `@container ${containerName}` : "@media";
groupMediaKey && (styleInner = styleRule), styleInner.includes(prefix) ? styleRule = styleInner.replace("{", ` and ${mediaQuery} {`).replace("and screen and", "and") : styleRule = `${prefix} ${mediaQuery}{${precedenceImportancePrefix}${styleInner}}`, groupMediaKey && (styleRule = `@supports (contain: ${conf.settings.webContainerType || "inline-size"}) {${styleRule}}`);
groupMediaKey && (styleInner = styleRule), styleInner.includes(prefix) ? styleRule = styleInner.replace("{", ` and ${mediaQuery} {`).replace("and screen and", "and") : styleRule = `${prefix} ${mediaQuery}{${precedenceImportancePrefix}${styleInner}}`, groupMediaKey && (styleRule = `@supports (contain: ${(0, import_config.getSetting)("webContainerType") || "inline-size"}) {${styleRule}}`);
}

@@ -65,0 +77,0 @@ return isHover && (styleRule = `@media (hover:hover){${styleRule}}`), [property, void 0, nextIdentifier, void 0, [styleRule]];

@@ -68,4 +68,12 @@ "use strict";

return new Array(i).fill(":root").join("");
}), createMediaStyle = function(styleObject, mediaKeyIn, mediaQueries, type, negate, priority) {
var _styleObject = _sliced_to_array(styleObject, 5), property = _styleObject[0], _value = _styleObject[1], identifier = _styleObject[2], _pseudo = _styleObject[3], rules = _styleObject[4], conf = (0, import_config.getConfig)(), enableMediaPropOrder = conf.settings.mediaPropOrder, isTheme = type === "theme", isPlatform = type === "platform", isGroup = type === "group", isNonWindowMedia = isTheme || isPlatform || isGroup, negKey = negate ? "0" : "", ogPrefix = identifier.slice(0, identifier.indexOf("-") + 1), id = "".concat(ogPrefix).concat(MEDIA_SEP).concat(mediaKeyIn.replace("-", "")).concat(negKey).concat(MEDIA_SEP), styleRule = "", groupPriority = "", groupMediaKey, containerName, nextIdentifier = identifier.replace(ogPrefix, id), styleInner = rules.map(function(rule) {
});
function getThemeOrGroupSelector(name, styleInner, isGroup, groupParts) {
var isTheme = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !1, precedenceImportancePrefix = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : "", selectorStart = styleInner.indexOf(":root"), selectorEnd = styleInner.lastIndexOf("{"), selector = styleInner.slice(selectorStart, selectorEnd), precedenceSpace = (0, import_config.getSetting)("themeClassNameOnRoot") && isTheme ? "" : " ", pseudoSelectorName = groupParts.pseudo ? groupPseudoToPseudoCSSMap[groupParts.pseudo] || groupParts.pseudo : void 0, pseudoSelector = pseudoSelectorName ? ":".concat(pseudoSelectorName) : "", presedencePrefix = ":root".concat(precedenceImportancePrefix).concat(precedenceSpace), mediaSelector = ".t_".concat(isGroup ? "group_" : "").concat(name).concat(pseudoSelector);
return [
selector,
"".concat(presedencePrefix).concat(mediaSelector, " ").concat(selector.replace(":root", ""))
];
}
var createMediaStyle = function(styleObject, mediaKeyIn, mediaQueries, type, negate, priority) {
var _styleObject = _sliced_to_array(styleObject, 5), property = _styleObject[0], identifier = _styleObject[2], rules = _styleObject[4], enableMediaPropOrder = (0, import_config.getSetting)("mediaPropOrder"), isTheme = type === "theme", isPlatform = type === "platform", isGroup = type === "group", isNonWindowMedia = isTheme || isPlatform || isGroup, negKey = negate ? "0" : "", ogPrefix = identifier.slice(0, identifier.indexOf("-") + 1), id = "".concat(ogPrefix).concat(MEDIA_SEP).concat(mediaKeyIn.replace("-", "")).concat(negKey).concat(MEDIA_SEP), styleRule = "", groupPriority = "", groupMediaKey, containerName, nextIdentifier = identifier.replace(ogPrefix, id), styleInner = rules.map(function(rule) {
return rule.replace(identifier, nextIdentifier);

@@ -77,6 +85,6 @@ }).join(";"), isHover = !1;

var _getGroupPropParts = (0, import_getGroupPropParts.getGroupPropParts)(mediaKeyIn), name = _getGroupPropParts.name, media = _getGroupPropParts.media, pseudo = _getGroupPropParts.pseudo;
groupMediaKey = media, isGroup && (containerName = name);
var groupClassName = (isGroup ? "group_" : "") + name, selectorStart = styleInner.indexOf(":root"), selectorEnd = styleInner.lastIndexOf("{"), selector = styleInner.slice(selectorStart, selectorEnd), precedenceSpace = (0, import_config.getSetting)("themeClassNameOnRoot") && isTheme ? "" : " ", pseudoSelectorName = pseudo ? groupPseudoToPseudoCSSMap[pseudo] || pseudo : void 0;
pseudo === "press" && (specificity += 2), pseudo === "hover" && (isHover = !0);
var pseudoSelector = pseudoSelectorName ? ":".concat(pseudoSelectorName) : "", presedencePrefix = ":root".concat(specifities[specificity]).concat(precedenceSpace), mediaSelector = ".t_".concat(groupClassName).concat(pseudoSelector), nextSelector = "".concat(presedencePrefix).concat(mediaSelector, " ").concat(selector.replace(":root", ""));
groupMediaKey = media;
var groupParts = (0, import_getGroupPropParts.getGroupPropParts)(mediaKeyIn);
isGroup && (containerName = name), pseudo === "press" && (specificity += 2), pseudo === "hover" && (isHover = !0);
var _getThemeOrGroupSelector = _sliced_to_array(getThemeOrGroupSelector(name, styleInner, isGroup, groupParts, isTheme, specifities[specificity]), 2), selector = _getThemeOrGroupSelector[0], nextSelector = _getThemeOrGroupSelector[1];
styleRule = styleInner.replace(selector, nextSelector);

@@ -101,3 +109,3 @@ } else

}
var mediaKey = groupMediaKey || mediaKeyIn, mediaSelector1 = selectors[mediaKey], screenStr = negate ? "not all and " : "", mediaQuery = "".concat(screenStr).concat(mediaSelector1), precedenceImportancePrefix = groupMediaKey ? groupPriority : enableMediaPropOrder && priority ? (
var mediaKey = groupMediaKey || mediaKeyIn, mediaSelector = selectors[mediaKey], screenStr = negate ? "not all and " : "", mediaQuery = "".concat(screenStr).concat(mediaSelector), precedenceImportancePrefix = groupMediaKey ? groupPriority : enableMediaPropOrder && priority ? (
// this new array should be cached

@@ -109,3 +117,3 @@ specifities[priority]

), prefix = groupMediaKey ? "@container ".concat(containerName) : "@media";
groupMediaKey && (styleInner = styleRule), styleInner.includes(prefix) ? styleRule = styleInner.replace("{", " and ".concat(mediaQuery, " {")).replace("and screen and", "and") : styleRule = "".concat(prefix, " ").concat(mediaQuery, "{").concat(precedenceImportancePrefix).concat(styleInner, "}"), groupMediaKey && (styleRule = "@supports (contain: ".concat(conf.settings.webContainerType || "inline-size", ") {").concat(styleRule, "}"));
groupMediaKey && (styleInner = styleRule), styleInner.includes(prefix) ? styleRule = styleInner.replace("{", " and ".concat(mediaQuery, " {")).replace("and screen and", "and") : styleRule = "".concat(prefix, " ").concat(mediaQuery, "{").concat(precedenceImportancePrefix).concat(styleInner, "}"), groupMediaKey && (styleRule = "@supports (contain: ".concat((0, import_config.getSetting)("webContainerType") || "inline-size", ") {").concat(styleRule, "}"));
}

@@ -112,0 +120,0 @@ return isHover && (styleRule = "@media (hover:hover){".concat(styleRule, "}")), [

@@ -0,5 +1,6 @@

var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {

@@ -14,3 +15,10 @@ for (var name in all)

};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
mod
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var createStyledContext_exports = {};

@@ -21,5 +29,5 @@ __export(createStyledContext_exports, {

module.exports = __toCommonJS(createStyledContext_exports);
var import_react = require("react"), import_objectIdentityKey = require("./objectIdentityKey"), import_jsx_runtime = require("react/jsx-runtime");
var import_react = __toESM(require("react")), import_objectIdentityKey = require("./objectIdentityKey"), import_jsx_runtime = require("react/jsx-runtime");
function createStyledContext(defaultValues) {
const OGContext = (0, import_react.createContext)(defaultValues), OGProvider = OGContext.Provider, Context = OGContext, scopedContexts = /* @__PURE__ */ new Map(), Provider = ({
const OGContext = import_react.default.createContext(defaultValues), OGProvider = OGContext.Provider, Context = OGContext, scopedContexts = /* @__PURE__ */ new Map(), Provider = ({
children,

@@ -29,3 +37,3 @@ scope,

}) => {
const next = (0, import_react.useMemo)(() => ({
const next = import_react.default.useMemo(() => ({
// this ! is a workaround for ts error

@@ -38,3 +46,3 @@ ...defaultValues,

let ScopedContext = scopedContexts.get(scope);
ScopedContext || (ScopedContext = (0, import_react.createContext)(defaultValues), scopedContexts.set(scope, ScopedContext)), Provider2 = ScopedContext.Provider;
ScopedContext || (ScopedContext = import_react.default.createContext(defaultValues), scopedContexts.set(scope, ScopedContext)), Provider2 = ScopedContext.Provider;
}

@@ -44,3 +52,3 @@ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Provider2, { value: next, children });

const context = scope ? scopedContexts.get(scope) : OGContext;
return (0, import_react.useContext)(context);
return import_react.default.useContext(context);
};

@@ -47,0 +55,0 @@ return Context.Provider = Provider, Context.props = defaultValues, Context.context = OGContext, Context.useStyledContext = useStyledContext, Context;

"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {

@@ -15,3 +16,10 @@ for (var name in all)

};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
mod
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var createStyledContext_exports = {};

@@ -22,3 +30,3 @@ __export(createStyledContext_exports, {

module.exports = __toCommonJS(createStyledContext_exports);
var import_jsx_runtime = require("react/jsx-runtime"), import_react = require("react"), import_objectIdentityKey = require("./objectIdentityKey");
var import_jsx_runtime = require("react/jsx-runtime"), import_react = __toESM(require("react")), import_objectIdentityKey = require("./objectIdentityKey");
function _define_property(obj, key, value) {

@@ -61,7 +69,7 @@ return key in obj ? Object.defineProperty(obj, key, {

function createStyledContext(defaultValues) {
var OGContext = /* @__PURE__ */ (0, import_react.createContext)(defaultValues), OGProvider = OGContext.Provider, Context = OGContext, scopedContexts = /* @__PURE__ */ new Map(), Provider = function(_param) {
var OGContext = /* @__PURE__ */ import_react.default.createContext(defaultValues), OGProvider = OGContext.Provider, Context = OGContext, scopedContexts = /* @__PURE__ */ new Map(), Provider = function(_param) {
var children = _param.children, scope = _param.scope, values = _object_without_properties(_param, [
"children",
"scope"
]), next = (0, import_react.useMemo)(function() {
]), next = import_react.default.useMemo(function() {
return _object_spread(

@@ -78,3 +86,3 @@ {},

var ScopedContext = scopedContexts.get(scope);
ScopedContext || (ScopedContext = /* @__PURE__ */ (0, import_react.createContext)(defaultValues), scopedContexts.set(scope, ScopedContext)), Provider2 = ScopedContext.Provider;
ScopedContext || (ScopedContext = /* @__PURE__ */ import_react.default.createContext(defaultValues), scopedContexts.set(scope, ScopedContext)), Provider2 = ScopedContext.Provider;
}

@@ -87,3 +95,3 @@ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Provider2, {

var context = scope ? scopedContexts.get(scope) : OGContext;
return (0, import_react.useContext)(context);
return import_react.default.useContext(context);
};

@@ -90,0 +98,0 @@ return Context.Provider = Provider, Context.props = defaultValues, Context.context = OGContext, Context.useStyledContext = useStyledContext, Context;

@@ -0,5 +1,6 @@

var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {

@@ -14,3 +15,10 @@ for (var name in all)

};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
mod
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var getSplitStyles_exports = {};

@@ -24,3 +32,3 @@ __export(getSplitStyles_exports, {

module.exports = __toCommonJS(getSplitStyles_exports);
var import_constants = require("@tamagui/constants"), import_helpers = require("@tamagui/helpers"), import_react = require("react"), import_config = require("../config"), import_accessibilityDirectMap = require("../constants/accessibilityDirectMap"), import_constants2 = require("../constants/constants"), import_isDevTools = require("../constants/isDevTools"), import_useMedia = require("../hooks/useMedia"), import_createMediaStyle = require("./createMediaStyle"), import_expandStyles = require("./expandStyles"), import_getGroupPropParts = require("./getGroupPropParts"), import_getStylesAtomic = require("./getStylesAtomic"), import_insertStyleRule = require("./insertStyleRule"), import_log = require("./log"), import_normalizeValueWithProperty = require("./normalizeValueWithProperty"), import_propMapper = require("./propMapper"), import_pseudoDescriptors = require("./pseudoDescriptors"), import_skipProps = require("./skipProps"), import_transformsToString = require("./transformsToString");
var import_react = __toESM(require("react")), import_constants = require("@tamagui/constants"), import_helpers = require("@tamagui/helpers"), import_config = require("../config"), import_accessibilityDirectMap = require("../constants/accessibilityDirectMap"), import_constants2 = require("../constants/constants"), import_isDevTools = require("../constants/isDevTools"), import_useMedia = require("../hooks/useMedia"), import_createMediaStyle = require("./createMediaStyle"), import_expandStyles = require("./expandStyles"), import_getGroupPropParts = require("./getGroupPropParts"), import_getStylesAtomic = require("./getStylesAtomic"), import_insertStyleRule = require("./insertStyleRule"), import_log = require("./log"), import_normalizeValueWithProperty = require("./normalizeValueWithProperty"), import_propMapper = require("./propMapper"), import_pseudoDescriptors = require("./pseudoDescriptors"), import_skipProps = require("./skipProps"), import_transformsToString = require("./transformsToString"), import_isActivePlatform = require("./isActivePlatform");
const consoleGroupCollapsed = import_constants.isWeb ? console.groupCollapsed : console.info;

@@ -313,11 +321,4 @@ let conf;

const hasSpace = val.space, mediaKeyShort = key.slice(1);
if (hasMedia ||= !0, (hasSpace || !shouldDoClasses || styleProps.willBeAnimated) && (typeof hasMedia != "object" && (hasMedia = {}), hasMedia[mediaKeyShort] = !0), isMedia === "platform") {
const platform = key.slice(10);
if (
// supports web, ios, android
platform !== import_constants.currentPlatform && // supports web, native
platform !== "web"
)
continue;
}
if (hasMedia ||= !0, (hasSpace || !shouldDoClasses || styleProps.willBeAnimated) && (typeof hasMedia != "object" && (hasMedia = {}), hasMedia[mediaKeyShort] = !0), isMedia === "platform" && !(0, import_isActivePlatform.isActivePlatform)(key))
continue;
if (process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(` \u{1F4FA} ${key}`, {

@@ -347,2 +348,5 @@ key,

for (const style of mediaStyles) {
const property = style[0];
if (property[0] === "$" && property.startsWith("$platform") && !(0, import_isActivePlatform.isActivePlatform)(property))
continue;
const out = (0, import_createMediaStyle.createMediaStyle)(

@@ -368,2 +372,14 @@ style,

} else {
let mergeMediaStyle = function(key2, val2) {
styleState.style ||= {}, mergeMediaByImportance(
styleState,
mediaKeyShort,
key2,
val2,
usedKeys,
mediaState[mediaKeyShort],
importanceBump,
debug
) && key2 === "fontFamily" && (styleState.fontFamily = mediaStyle.fontFamily);
};
const isThemeMedia = isMedia === "theme", isGroupMedia = isMedia === "group";

@@ -421,12 +437,9 @@ if (!isThemeMedia && !(isMedia === "platform") && !isGroupMedia) {

}
styleState.style ||= {}, mergeMediaByImportance(
styleState,
mediaKeyShort,
subKey,
mediaStyle[subKey],
usedKeys,
mediaState[mediaKeyShort],
importanceBump,
debug
) && key === "fontFamily" && (styleState.fontFamily = mediaStyle.fontFamily);
if (subKey[0] === "$") {
if (!(0, import_isActivePlatform.isActivePlatform)(subKey))
continue;
for (const subSubKey in mediaStyle[subKey])
mergeMediaStyle(subSubKey, mediaStyle[subKey][subSubKey]);
} else
mergeMediaStyle(subKey, mediaStyle[subKey]);
}

@@ -607,3 +620,3 @@ }

return styleProps.noNormalize || (0, import_expandStyles.fixStyles)(styleOut), styleOut;
}, useInsertEffectCompat = import_constants.isWeb ? import_react.useInsertionEffect || import_constants.useIsomorphicLayoutEffect : () => {
}, useInsertEffectCompat = import_constants.isWeb ? import_react.default.useInsertionEffect || import_constants.useIsomorphicLayoutEffect : () => {
}, useSplitStyles = (a, b, c, d, e, f, g, h, i, j) => {

@@ -610,0 +623,0 @@ conf = conf || (0, import_config.getConfig)();

"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {

@@ -15,3 +16,10 @@ for (var name in all)

};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
mod
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var getSplitStyles_exports = {};

@@ -25,3 +33,3 @@ __export(getSplitStyles_exports, {

module.exports = __toCommonJS(getSplitStyles_exports);
var import_constants = require("@tamagui/constants"), import_helpers = require("@tamagui/helpers"), import_react = require("react"), import_config = require("../config"), import_accessibilityDirectMap = require("../constants/accessibilityDirectMap"), import_constants2 = require("../constants/constants"), import_isDevTools = require("../constants/isDevTools"), import_useMedia = require("../hooks/useMedia"), import_createMediaStyle = require("./createMediaStyle"), import_expandStyles = require("./expandStyles"), import_getGroupPropParts = require("./getGroupPropParts"), import_getStylesAtomic = require("./getStylesAtomic"), import_insertStyleRule = require("./insertStyleRule"), import_log = require("./log"), import_normalizeValueWithProperty = require("./normalizeValueWithProperty"), import_propMapper = require("./propMapper"), import_pseudoDescriptors = require("./pseudoDescriptors"), import_skipProps = require("./skipProps"), import_transformsToString = require("./transformsToString");
var import_react = __toESM(require("react")), import_constants = require("@tamagui/constants"), import_helpers = require("@tamagui/helpers"), import_config = require("../config"), import_accessibilityDirectMap = require("../constants/accessibilityDirectMap"), import_constants2 = require("../constants/constants"), import_isDevTools = require("../constants/isDevTools"), import_useMedia = require("../hooks/useMedia"), import_createMediaStyle = require("./createMediaStyle"), import_expandStyles = require("./expandStyles"), import_getGroupPropParts = require("./getGroupPropParts"), import_getStylesAtomic = require("./getStylesAtomic"), import_insertStyleRule = require("./insertStyleRule"), import_log = require("./log"), import_normalizeValueWithProperty = require("./normalizeValueWithProperty"), import_propMapper = require("./propMapper"), import_pseudoDescriptors = require("./pseudoDescriptors"), import_skipProps = require("./skipProps"), import_transformsToString = require("./transformsToString"), import_isActivePlatform = require("./isActivePlatform");
function _array_like_to_array(arr, len) {

@@ -112,2 +120,294 @@ (len == null || len > arr.length) && (len = arr.length);

var getSplitStyles = function(props, staticConfig, theme, themeName, componentState, styleProps, parentSplitStyles, context, elementType, debug, skipThemeTokenResolution) {
var _loop = function(keyOg2) {
var _loop2 = function(i3) {
var _parentStaticConfig_variants;
if (expanded) {
var _expanded_i = _sliced_to_array(expanded[i3], 2), k = _expanded_i[0], v = _expanded_i[1];
key4 = k, val2 = v;
}
if (val2 == null || key4 in usedKeys) return "continue";
if (isPseudo = key4 in import_helpers.validPseudoKeys, isMedia = !isPseudo && !isValidStyleKeyInit && (0, import_useMedia.isMediaKey)(key4), isMediaOrPseudo1 = !!(isMedia || isPseudo), isVariant = variants && key4 in variants, inlineProps != null && inlineProps.has(key4) || process.env.IS_STATIC === "is_static" && (inlineWhenUnflattened != null && inlineWhenUnflattened.has(key4))) {
var _props_key;
viewProps[key4] = (_props_key = props[key4]) !== null && _props_key !== void 0 ? _props_key : val2;
}
var shouldPassThrough2 = styleProps.noExpand && isPseudo || isHOC && (isMediaOrPseudo1 || (parentStaticConfig == null || (_parentStaticConfig_variants = parentStaticConfig.variants) === null || _parentStaticConfig_variants === void 0 ? void 0 : _parentStaticConfig_variants[keyInit]));
if (shouldPassThrough2)
return passDownProp(viewProps, key4, val2, isMediaOrPseudo1), process.env.NODE_ENV === "development" && debug === "verbose" && (consoleGroupCollapsed(" - passing down prop ".concat(key4)), (0, import_log.log)({
val: val2,
after: _object_spread({}, viewProps[key4])
}), console.groupEnd()), "continue";
if (isPseudo) {
if (!val2) return "continue";
var pseudoStyleObject = getSubStyle(styleState, key4, val2, styleProps.noClassNames), descriptor = import_pseudoDescriptors.pseudoDescriptors[key4], isEnter = key4 === "enterStyle", isExit = key4 === "exitStyle";
if (!descriptor)
return "continue";
if (!shouldDoClasses || process.env.IS_STATIC === "is_static") {
var _pseudos, _key;
if (pseudos || (pseudos = {}), (_pseudos = pseudos)[_key = key4] || (_pseudos[_key] = {}), process.env.IS_STATIC === "is_static")
return Object.assign(pseudos[key4], pseudoStyleObject), "continue";
}
if (shouldDoClasses && !isExit) {
var pseudoStyles = (0, import_getStylesAtomic.getStyleAtomic)(pseudoStyleObject, descriptor);
process.env.NODE_ENV === "development" && debug === "verbose" && (consoleGroupCollapsed("pseudo (classes)", key4), (0, import_log.log)({
pseudoStyleObject,
pseudoStyles
}), console.groupEnd());
var _iteratorNormalCompletion2 = !0, _didIteratorError2 = !1, _iteratorError2 = void 0;
try {
for (var _iterator2 = pseudoStyles[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = !0) {
var psuedoStyle = _step2.value, fullKey = "".concat(psuedoStyle[import_helpers.StyleObjectProperty]).concat(PROP_SPLIT).concat(descriptor.name);
fullKey in usedKeys || (addStyleToInsertRules(rulesToInsert, psuedoStyle), mergeClassName(transforms, classNames, fullKey, psuedoStyle[import_helpers.StyleObjectIdentifier], isMediaOrPseudo1, !0));
}
} catch (err) {
_didIteratorError2 = !0, _iteratorError2 = err;
} finally {
try {
!_iteratorNormalCompletion2 && _iterator2.return != null && _iterator2.return();
} finally {
if (_didIteratorError2)
throw _iteratorError2;
}
}
}
if (!shouldDoClasses || isExit || isEnter) {
var descriptorKey = descriptor.stateKey || descriptor.name, isDisabled = componentState[descriptorKey] === !1;
isExit && (isDisabled = !styleProps.isExiting), isEnter && componentState.unmounted === !1 && (isDisabled = !0), process.env.NODE_ENV === "development" && debug === "verbose" && (consoleGroupCollapsed("pseudo", key4, {
isDisabled
}), (0, import_log.log)({
pseudoStyleObject,
isDisabled,
descriptor,
componentState
}), console.groupEnd());
var importance = descriptor.priority;
for (var pkey in pseudoStyleObject) {
var val12 = pseudoStyleObject[pkey];
if (isDisabled)
applyDefaultStyle(pkey, styleState);
else {
var curImportance = usedKeys[pkey] || 0, shouldMerge = importance >= curImportance;
if (shouldMerge) {
var _pseudos1, _key1;
pseudos || (pseudos = {}), (_pseudos1 = pseudos)[_key1 = key4] || (_pseudos1[_key1] = {}), pseudos[key4][pkey] = val12, mergeStyle(styleState, pkey, val12);
}
process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(" subKey", pkey, shouldMerge, {
importance,
curImportance,
pkey,
val: val12
});
}
}
if (!isDisabled)
for (var key12 in val2) {
var k1 = shorthands[key12] || key12;
usedKeys[k1] = Math.max(importance, usedKeys[k1] || 0);
}
}
return "continue";
}
if (isMedia) {
if (!val2) return "continue";
var hasSpace = val2.space, mediaKeyShort = key4.slice(1);
if (hasMedia || (hasMedia = !0), (hasSpace || !shouldDoClasses || styleProps.willBeAnimated) && ((typeof hasMedia > "u" ? "undefined" : _type_of(hasMedia)) !== "object" && (hasMedia = {}), hasMedia[mediaKeyShort] = !0), isMedia === "platform" && !(0, import_isActivePlatform.isActivePlatform)(key4))
return "continue";
if (process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(" \u{1F4FA} ".concat(key4), {
key: key4,
val: val2,
props,
shouldDoClasses,
acceptsClassName,
componentState,
mediaState
}), shouldDoClasses) {
var mediaStyle = getSubStyle(styleState, key4, val2, !1);
if (hasSpace && (delete mediaStyle.space, mediaState[mediaKeyShort])) {
var importance1 = (0, import_useMedia.getMediaImportanceIfMoreImportant)(mediaKeyShort, "space", usedKeys, !0);
importance1 && (space = val2.space, usedKeys.space = importance1, process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)("Found more important space for current media ".concat(mediaKeyShort, ": ").concat(val2, " (importance: ").concat(importance1, ")")));
}
var mediaStyles = (0, import_getStylesAtomic.getStylesAtomic)(mediaStyle), priority = mediaStylesSeen;
mediaStylesSeen += 1;
var _iteratorNormalCompletion12 = !0, _didIteratorError12 = !1, _iteratorError12 = void 0;
try {
for (var _iterator12 = mediaStyles[Symbol.iterator](), _step12; !(_iteratorNormalCompletion12 = (_step12 = _iterator12.next()).done); _iteratorNormalCompletion12 = !0) {
var style3 = _step12.value, property = style3[0];
if (!(property[0] === "$" && property.startsWith("$platform") && !(0, import_isActivePlatform.isActivePlatform)(property))) {
var out = (0, import_createMediaStyle.createMediaStyle)(style3, mediaKeyShort, import_useMedia.mediaQueryConfig, isMedia, !1, priority);
process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)("\u{1F4FA} media style:", out);
var fullKey1 = "".concat(style3[import_helpers.StyleObjectProperty]).concat(PROP_SPLIT).concat(mediaKeyShort).concat(style3[import_helpers.StyleObjectPseudo] || "");
fullKey1 in usedKeys || (addStyleToInsertRules(rulesToInsert, out), mergeClassName(transforms, classNames, fullKey1, out[import_helpers.StyleObjectIdentifier], !0, !0));
}
}
} catch (err) {
_didIteratorError12 = !0, _iteratorError12 = err;
} finally {
try {
!_iteratorNormalCompletion12 && _iterator12.return != null && _iterator12.return();
} finally {
if (_didIteratorError12)
throw _iteratorError12;
}
}
} else {
var mergeMediaStyle = function(key5, val3) {
var _styleState4;
(_styleState4 = styleState).style || (_styleState4.style = {});
var didMerge = mergeMediaByImportance(styleState, mediaKeyShort, key5, val3, usedKeys, mediaState[mediaKeyShort], importanceBump, debug);
didMerge && key5 === "fontFamily" && (styleState.fontFamily = mediaStyle1.fontFamily);
}, isThemeMedia = isMedia === "theme", isGroupMedia = isMedia === "group", isPlatformMedia = isMedia === "platform";
if (!isThemeMedia && !isPlatformMedia && !isGroupMedia) {
if (!mediaState[mediaKeyShort])
return process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(" \u{1F4FA} \u274C DISABLED ".concat(mediaKeyShort)), "continue";
process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(" \u{1F4FA} \u2705 ENABLED ".concat(mediaKeyShort));
}
var mediaStyle1 = getSubStyle(styleState, key4, val2, !0), importanceBump = 0;
if (isThemeMedia) {
dynamicThemeAccess = !0;
var mediaThemeName = mediaKeyShort.slice(6);
if (!(themeName === mediaThemeName || themeName.startsWith(mediaThemeName)))
return "continue";
} else if (isGroupMedia) {
var _componentState_group, groupInfo = (0, import_getGroupPropParts.getGroupPropParts)(mediaKeyShort), groupName = groupInfo.name, groupContext = context == null ? void 0 : context.groups.state[groupName];
if (!groupContext)
return process.env.NODE_ENV === "development" && debug && (0, import_log.log)("No parent with group prop, skipping styles: ".concat(groupName)), "continue";
var groupPseudoKey = groupInfo.pseudo, groupMediaKey = groupInfo.media, componentGroupState = (_componentState_group = componentState.group) === null || _componentState_group === void 0 ? void 0 : _componentState_group[groupName];
if (groupMediaKey) {
mediaGroups || (mediaGroups = /* @__PURE__ */ new Set()), mediaGroups.add(groupMediaKey);
var mediaState1 = componentGroupState == null ? void 0 : componentGroupState.media, isActive = mediaState1 == null ? void 0 : mediaState1[groupMediaKey];
if (!mediaState1 && groupContext.layout && (isActive = (0, import_useMedia.mediaKeyMatch)(groupMediaKey, groupContext.layout)), process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(" \u{1F3D8}\uFE0F GROUP media ".concat(groupMediaKey, " active? ").concat(isActive)), !isActive) {
for (var pkey1 in mediaStyle1)
applyDefaultStyle(pkey1, styleState);
return "continue";
}
importanceBump = 2;
}
if (groupPseudoKey) {
pseudoGroups || (pseudoGroups = /* @__PURE__ */ new Set()), pseudoGroups.add(groupName);
var componentGroupPseudoState = (componentGroupState || // fallback to context initially
context.groups.state[groupName]).pseudo, isActive1 = componentGroupPseudoState == null ? void 0 : componentGroupPseudoState[groupPseudoKey], priority1 = import_pseudoDescriptors.pseudoPriorities[groupPseudoKey];
if (process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(" \u{1F3D8}\uFE0F GROUP pseudo ".concat(groupMediaKey, " active? ").concat(isActive1, ", priority ").concat(priority1)), !isActive1) {
for (var pkey2 in mediaStyle1)
applyDefaultStyle(pkey2, styleState);
return "continue";
}
importanceBump = priority1;
}
}
for (var subKey in mediaStyle1) {
if (subKey === "space") {
space = valInit.space;
continue;
}
if (subKey[0] === "$") {
if (!(0, import_isActivePlatform.isActivePlatform)(subKey))
continue;
for (var subSubKey in mediaStyle1[subKey])
mergeMediaStyle(subSubKey, mediaStyle1[subKey][subSubKey]);
} else
mergeMediaStyle(subKey, mediaStyle1[subKey]);
}
}
return "continue";
}
if (key4 === "pointerEvents")
return viewProps[key4] = val2, "continue";
if (
// is HOC we can just pass through the styles as props
// this fixes issues where style prop got merged with wrong priority
!isHOC && (isValidStyleKey(key4, staticConfig) || import_constants.isAndroid && key4 === "elevation")
)
return mergeStyle(styleState, key4, val2), "continue";
isVariant || (viewProps[key4] = val2);
}, keyInit = keyOg2, valInit = props[keyInit];
if (accept) {
var accepted = accept[keyInit];
if ((accepted === "style" || accepted === "textStyle") && valInit && (typeof valInit > "u" ? "undefined" : _type_of(valInit)) === "object")
return viewProps[keyInit] = getSubStyle(styleState, keyInit, valInit, styleProps.noClassNames), "continue";
}
if (process.env.NODE_ENV === "development" && debug === "verbose" && console.groupEnd(), disableExpandShorthands || keyInit in shorthands && (keyInit = shorthands[keyInit]), keyInit === "className" || keyInit in usedKeys) return "continue";
if (keyInit in import_skipProps.skipProps && !noSkip && !isHOC) {
if (keyInit === "group" && 0)
var identifier2, containerType, containerCSS;
return "continue";
}
var valInitType = typeof valInit > "u" ? "undefined" : _type_of(valInit), isValidStyleKeyInit = isValidStyleKey(keyInit, staticConfig);
if (0 && isValidStyleKeyInit && valInitType === "string" && valInit[0] === "_") {
var isValidClassName, isMediaOrPseudo;
if ((isValidClassName || isMediaOrPseudo) && !shouldDoClasses)
var _styleState3;
}
if (!isValidStyleKeyInit) {
if (!import_constants.isAndroid && keyInit === "elevationAndroid")
return "continue";
if (keyInit === "userSelect")
keyInit = "selectable", valInit = valInit !== "none";
else if (keyInit.startsWith("data-"))
return "continue";
}
if (keyInit === "dataSet") {
for (var keyInit1 in valInit)
viewProps["data-".concat(hyphenate(keyInit1))] = valInit[keyInit1];
return "continue";
}
if (0 && !noExpand)
var didUseKeyInit;
var isShorthand = keyInit in shorthands, isVariant = !isValidStyleKeyInit && variants && keyInit in variants, isStyleLikeKey = isShorthand || isValidStyleKeyInit || isVariant, isPseudo = keyInit in import_helpers.validPseudoKeys, isMedia = !isStyleLikeKey && !isPseudo && (0, import_useMedia.isMediaKey)(keyInit), isMediaOrPseudo1 = !!(isMedia || isPseudo);
if (isMediaOrPseudo1 && keyInit.startsWith("$group-")) {
var name2 = keyInit.split("-")[1];
context != null && context.groups.subscribe && !(context != null && context.groups.state[name2]) && (keyInit = keyInit.replace("$group-", "$group-true-"));
}
var isStyleProp = isValidStyleKeyInit || isMediaOrPseudo1 || isVariant && !noExpand || isShorthand;
if (isStyleProp && (asChild === "except-style" || asChild === "except-style-web"))
return "continue";
var shouldPassProp = !isStyleProp || // is in parent variants
isHOC && parentVariants && keyInit in parentVariants || (inlineProps == null ? void 0 : inlineProps.has(keyInit)), parentVariant = parentVariants == null ? void 0 : parentVariants[keyInit], isHOCShouldPassThrough = !!(isHOC && (isShorthand || isValidStyleKeyInit || isMediaOrPseudo1 || parentVariant || keyInit in import_skipProps.skipProps)), shouldPassThrough = shouldPassProp || isHOCShouldPassThrough;
if (process.env.NODE_ENV === "development" && debug === "verbose" && (console.groupEnd(), console.groupEnd(), consoleGroupCollapsed(" \u{1F511} ".concat(keyOg2).concat(keyInit !== keyOg2 ? " (shorthand for ".concat(keyInit, ")") : "", " ").concat(shouldPassThrough ? "(pass)" : "")), (0, import_log.log)({
isVariant,
valInit,
shouldPassProp
}), import_constants.isClient && (0, import_log.log)({
variants,
variant: variants == null ? void 0 : variants[keyInit],
isVariant,
isHOCShouldPassThrough,
curProps: _object_spread({}, styleState.curProps),
parentStaticConfig
})), shouldPassThrough && (passDownProp(viewProps, keyInit, valInit, isMediaOrPseudo1), !isVariant) || !noSkip && keyInit in import_skipProps.skipProps)
return process.env.NODE_ENV === "development" && debug === "verbose" && console.groupEnd(), "continue";
(isText || isInput) && valInit && (keyInit === "fontFamily" || keyInit === shorthands.fontFamily) && valInit in conf.fontsParsed && (styleState.fontFamily = valInit);
var avoidPropMap = isMediaOrPseudo1 || !isVariant && !isValidStyleKeyInit, expanded = avoidPropMap ? null : (0, import_propMapper.propMapper)(keyInit, valInit, styleState);
if (!avoidPropMap) {
if (!expanded) return "continue";
var next = (0, import_propMapper.getPropMappedFontFamily)(expanded);
next && (styleState.fontFamily = next);
}
if (process.env.NODE_ENV === "development" && debug === "verbose") {
consoleGroupCollapsed(" \u{1F4A0} expanded", keyInit, valInit);
try {
!import_constants.isServer && import_isDevTools.isDevTools && ((0, import_log.log)({
expanded,
styleProps,
componentState,
isVariant,
variant: variants == null ? void 0 : variants[keyInit],
shouldPassProp,
isHOCShouldPassThrough,
usedKeys: _object_spread({}, usedKeys),
curProps: _object_spread({}, styleState.curProps)
}), (0, import_log.log)("expanded", expanded, `
usedKeys`, _object_spread({}, usedKeys), `
current`, _object_spread({}, styleState.style)));
} catch {
}
console.groupEnd();
}
for (var key4 = keyInit, val2 = valInit, max = expanded ? expanded.length : 1, i2 = 0; i2 < max; i2++) _loop2(i2);
if (process.env.NODE_ENV === "development" && debug === "verbose") {
try {
(0, import_log.log)(" \u2714\uFE0F expand complete", keyInit), (0, import_log.log)("style", _object_spread({}, styleState.style)), (0, import_log.log)("transforms", _object_spread({}, transforms)), (0, import_log.log)("viewProps", _object_spread({}, viewProps));
} catch {
}
console.groupEnd();
}
};
conf = conf || (0, import_config.getConfig)(), import_constants.isWeb && styleProps.isAnimated && conf.animations.isReactNative && !styleProps.noNormalize && (styleProps.noNormalize = "values");

@@ -148,322 +448,13 @@ var shorthands = conf.shorthands, isHOC = staticConfig.isHOC, isText = staticConfig.isText, isInput = staticConfig.isInput, variants = staticConfig.variants, isReactNative = staticConfig.isReactNative, inlineProps = staticConfig.inlineProps, inlineWhenUnflattened = staticConfig.inlineWhenUnflattened, parentStaticConfig = staticConfig.parentStaticConfig, acceptsClassName = staticConfig.acceptsClassName, viewProps = {}, mediaState = styleProps.mediaState || import_useMedia.mediaState, usedKeys = {}, shouldDoClasses = acceptsClassName && import_constants.isWeb && !styleProps.noClassNames, rulesToInsert = void 0, classNames = {}, transforms = {}, pseudos = null, space = props.space, hasMedia = !1, dynamicThemeAccess, pseudoGroups, mediaGroups, className = props.className || "", mediaStylesSeen = 0, curPropsState, styleState = {

var asChild = props.asChild, accept = staticConfig.accept, noSkip = styleProps.noSkip, disableExpandShorthands = styleProps.disableExpandShorthands, noExpand = styleProps.noExpand, webContainerType = conf.settings.webContainerType, parentVariants = parentStaticConfig == null ? void 0 : parentStaticConfig.variants;
for (var keyOg in props) {
var keyInit = keyOg, valInit = props[keyInit];
if (accept) {
var accepted = accept[keyInit];
if ((accepted === "style" || accepted === "textStyle") && valInit && (typeof valInit > "u" ? "undefined" : _type_of(valInit)) === "object") {
viewProps[keyInit] = getSubStyle(styleState, keyInit, valInit, styleProps.noClassNames);
continue;
}
}
if (process.env.NODE_ENV === "development" && debug === "verbose" && console.groupEnd(), disableExpandShorthands || keyInit in shorthands && (keyInit = shorthands[keyInit]), keyInit !== "className" && !(keyInit in usedKeys)) {
if (keyInit in import_skipProps.skipProps && !noSkip && !isHOC) {
if (keyInit === "group" && 0)
var identifier, containerType, containerCSS;
continue;
}
var valInitType = typeof valInit > "u" ? "undefined" : _type_of(valInit), isValidStyleKeyInit = isValidStyleKey(keyInit, staticConfig);
if (0 && isValidStyleKeyInit && valInitType === "string" && valInit[0] === "_") {
var isValidClassName, isMediaOrPseudo;
if ((isValidClassName || isMediaOrPseudo) && !shouldDoClasses)
var _styleState;
}
if (!isValidStyleKeyInit) {
if (!import_constants.isAndroid && keyInit === "elevationAndroid")
continue;
if (keyInit === "userSelect")
keyInit = "selectable", valInit = valInit !== "none";
else if (keyInit.startsWith("data-"))
continue;
}
if (keyInit === "dataSet") {
for (var keyInit1 in valInit)
viewProps["data-".concat(hyphenate(keyInit1))] = valInit[keyInit1];
continue;
}
if (0 && !noExpand)
var didUseKeyInit;
var isShorthand = keyInit in shorthands, isVariant = !isValidStyleKeyInit && variants && keyInit in variants, isStyleLikeKey = isShorthand || isValidStyleKeyInit || isVariant, isPseudo = keyInit in import_helpers.validPseudoKeys, isMedia = !isStyleLikeKey && !isPseudo && (0, import_useMedia.isMediaKey)(keyInit), isMediaOrPseudo1 = !!(isMedia || isPseudo);
if (isMediaOrPseudo1 && keyInit.startsWith("$group-")) {
var name = keyInit.split("-")[1];
context != null && context.groups.subscribe && !(context != null && context.groups.state[name]) && (keyInit = keyInit.replace("$group-", "$group-true-"));
}
var isStyleProp = isValidStyleKeyInit || isMediaOrPseudo1 || isVariant && !noExpand || isShorthand;
if (!(isStyleProp && (asChild === "except-style" || asChild === "except-style-web"))) {
var shouldPassProp = !isStyleProp || // is in parent variants
isHOC && parentVariants && keyInit in parentVariants || (inlineProps == null ? void 0 : inlineProps.has(keyInit)), parentVariant = parentVariants == null ? void 0 : parentVariants[keyInit], isHOCShouldPassThrough = !!(isHOC && (isShorthand || isValidStyleKeyInit || isMediaOrPseudo1 || parentVariant || keyInit in import_skipProps.skipProps)), shouldPassThrough = shouldPassProp || isHOCShouldPassThrough;
if (process.env.NODE_ENV === "development" && debug === "verbose" && (console.groupEnd(), console.groupEnd(), consoleGroupCollapsed(" \u{1F511} ".concat(keyOg).concat(keyInit !== keyOg ? " (shorthand for ".concat(keyInit, ")") : "", " ").concat(shouldPassThrough ? "(pass)" : "")), (0, import_log.log)({
isVariant,
valInit,
shouldPassProp
}), import_constants.isClient && (0, import_log.log)({
variants,
variant: variants == null ? void 0 : variants[keyInit],
isVariant,
isHOCShouldPassThrough,
curProps: _object_spread({}, styleState.curProps),
parentStaticConfig
})), shouldPassThrough && (passDownProp(viewProps, keyInit, valInit, isMediaOrPseudo1), !isVariant)) {
process.env.NODE_ENV === "development" && debug === "verbose" && console.groupEnd();
continue;
}
if (!noSkip && keyInit in import_skipProps.skipProps) {
process.env.NODE_ENV === "development" && debug === "verbose" && console.groupEnd();
continue;
}
(isText || isInput) && valInit && (keyInit === "fontFamily" || keyInit === shorthands.fontFamily) && valInit in conf.fontsParsed && (styleState.fontFamily = valInit);
var avoidPropMap = isMediaOrPseudo1 || !isVariant && !isValidStyleKeyInit, expanded = avoidPropMap ? null : (0, import_propMapper.propMapper)(keyInit, valInit, styleState);
if (!avoidPropMap) {
if (!expanded) continue;
var next = (0, import_propMapper.getPropMappedFontFamily)(expanded);
next && (styleState.fontFamily = next);
}
if (process.env.NODE_ENV === "development" && debug === "verbose") {
consoleGroupCollapsed(" \u{1F4A0} expanded", keyInit, valInit);
try {
!import_constants.isServer && import_isDevTools.isDevTools && ((0, import_log.log)({
expanded,
styleProps,
componentState,
isVariant,
variant: variants == null ? void 0 : variants[keyInit],
shouldPassProp,
isHOCShouldPassThrough,
usedKeys: _object_spread({}, usedKeys),
curProps: _object_spread({}, styleState.curProps)
}), (0, import_log.log)("expanded", expanded, `
usedKeys`, _object_spread({}, usedKeys), `
current`, _object_spread({}, styleState.style)));
} catch {
}
console.groupEnd();
}
for (var key = keyInit, val = valInit, max = expanded ? expanded.length : 1, i = 0; i < max; i++) {
var _parentStaticConfig_variants;
if (expanded) {
var _expanded_i = _sliced_to_array(expanded[i], 2), k = _expanded_i[0], v = _expanded_i[1];
key = k, val = v;
}
if (val != null && !(key in usedKeys)) {
if (isPseudo = key in import_helpers.validPseudoKeys, isMedia = !isPseudo && !isValidStyleKeyInit && (0, import_useMedia.isMediaKey)(key), isMediaOrPseudo1 = !!(isMedia || isPseudo), isVariant = variants && key in variants, inlineProps != null && inlineProps.has(key) || process.env.IS_STATIC === "is_static" && (inlineWhenUnflattened != null && inlineWhenUnflattened.has(key))) {
var _props_key;
viewProps[key] = (_props_key = props[key]) !== null && _props_key !== void 0 ? _props_key : val;
}
var shouldPassThrough1 = styleProps.noExpand && isPseudo || isHOC && (isMediaOrPseudo1 || (parentStaticConfig == null || (_parentStaticConfig_variants = parentStaticConfig.variants) === null || _parentStaticConfig_variants === void 0 ? void 0 : _parentStaticConfig_variants[keyInit]));
if (shouldPassThrough1) {
passDownProp(viewProps, key, val, isMediaOrPseudo1), process.env.NODE_ENV === "development" && debug === "verbose" && (consoleGroupCollapsed(" - passing down prop ".concat(key)), (0, import_log.log)({
val,
after: _object_spread({}, viewProps[key])
}), console.groupEnd());
continue;
}
if (isPseudo) {
if (!val) continue;
var pseudoStyleObject = getSubStyle(styleState, key, val, styleProps.noClassNames), descriptor = import_pseudoDescriptors.pseudoDescriptors[key], isEnter = key === "enterStyle", isExit = key === "exitStyle";
if (!descriptor)
continue;
if (!shouldDoClasses || process.env.IS_STATIC === "is_static") {
var _pseudos, _key;
if (pseudos || (pseudos = {}), (_pseudos = pseudos)[_key = key] || (_pseudos[_key] = {}), process.env.IS_STATIC === "is_static") {
Object.assign(pseudos[key], pseudoStyleObject);
continue;
}
}
if (shouldDoClasses && !isExit) {
var pseudoStyles = (0, import_getStylesAtomic.getStyleAtomic)(pseudoStyleObject, descriptor);
process.env.NODE_ENV === "development" && debug === "verbose" && (consoleGroupCollapsed("pseudo (classes)", key), (0, import_log.log)({
pseudoStyleObject,
pseudoStyles
}), console.groupEnd());
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
try {
for (var _iterator = pseudoStyles[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
var psuedoStyle = _step.value, fullKey = "".concat(psuedoStyle[import_helpers.StyleObjectProperty]).concat(PROP_SPLIT).concat(descriptor.name);
fullKey in usedKeys || (addStyleToInsertRules(rulesToInsert, psuedoStyle), mergeClassName(transforms, classNames, fullKey, psuedoStyle[import_helpers.StyleObjectIdentifier], isMediaOrPseudo1, !0));
}
} catch (err) {
_didIteratorError = !0, _iteratorError = err;
} finally {
try {
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
} finally {
if (_didIteratorError)
throw _iteratorError;
}
}
}
if (!shouldDoClasses || isExit || isEnter) {
var descriptorKey = descriptor.stateKey || descriptor.name, isDisabled = componentState[descriptorKey] === !1;
isExit && (isDisabled = !styleProps.isExiting), isEnter && componentState.unmounted === !1 && (isDisabled = !0), process.env.NODE_ENV === "development" && debug === "verbose" && (consoleGroupCollapsed("pseudo", key, {
isDisabled
}), (0, import_log.log)({
pseudoStyleObject,
isDisabled,
descriptor,
componentState
}), console.groupEnd());
var importance = descriptor.priority;
for (var pkey in pseudoStyleObject) {
var val1 = pseudoStyleObject[pkey];
if (isDisabled)
applyDefaultStyle(pkey, styleState);
else {
var curImportance = usedKeys[pkey] || 0, shouldMerge = importance >= curImportance;
if (shouldMerge) {
var _pseudos1, _key1;
pseudos || (pseudos = {}), (_pseudos1 = pseudos)[_key1 = key] || (_pseudos1[_key1] = {}), pseudos[key][pkey] = val1, mergeStyle(styleState, pkey, val1);
}
process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(" subKey", pkey, shouldMerge, {
importance,
curImportance,
pkey,
val: val1
});
}
}
if (!isDisabled)
for (var key1 in val) {
var k1 = shorthands[key1] || key1;
usedKeys[k1] = Math.max(importance, usedKeys[k1] || 0);
}
}
continue;
}
if (isMedia) {
if (!val) continue;
var hasSpace = val.space, mediaKeyShort = key.slice(1);
if (hasMedia || (hasMedia = !0), (hasSpace || !shouldDoClasses || styleProps.willBeAnimated) && ((typeof hasMedia > "u" ? "undefined" : _type_of(hasMedia)) !== "object" && (hasMedia = {}), hasMedia[mediaKeyShort] = !0), isMedia === "platform") {
var platform = key.slice(10);
if (
// supports web, ios, android
platform !== import_constants.currentPlatform && // supports web, native
platform !== "native"
)
continue;
}
if (process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(" \u{1F4FA} ".concat(key), {
key,
val,
props,
shouldDoClasses,
acceptsClassName,
componentState,
mediaState
}), shouldDoClasses) {
var mediaStyle = getSubStyle(styleState, key, val, !1);
if (hasSpace && (delete mediaStyle.space, mediaState[mediaKeyShort])) {
var importance1 = (0, import_useMedia.getMediaImportanceIfMoreImportant)(mediaKeyShort, "space", usedKeys, !0);
importance1 && (space = val.space, usedKeys.space = importance1, process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)("Found more important space for current media ".concat(mediaKeyShort, ": ").concat(val, " (importance: ").concat(importance1, ")")));
}
var mediaStyles = (0, import_getStylesAtomic.getStylesAtomic)(mediaStyle), priority = mediaStylesSeen;
mediaStylesSeen += 1;
var _iteratorNormalCompletion1 = !0, _didIteratorError1 = !1, _iteratorError1 = void 0;
try {
for (var _iterator1 = mediaStyles[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = !0) {
var style = _step1.value, out = (0, import_createMediaStyle.createMediaStyle)(style, mediaKeyShort, import_useMedia.mediaQueryConfig, isMedia, !1, priority);
process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)("\u{1F4FA} media style:", out);
var fullKey1 = "".concat(style[import_helpers.StyleObjectProperty]).concat(PROP_SPLIT).concat(mediaKeyShort).concat(style[import_helpers.StyleObjectPseudo] || "");
fullKey1 in usedKeys || (addStyleToInsertRules(rulesToInsert, out), mergeClassName(transforms, classNames, fullKey1, out[import_helpers.StyleObjectIdentifier], !0, !0));
}
} catch (err) {
_didIteratorError1 = !0, _iteratorError1 = err;
} finally {
try {
!_iteratorNormalCompletion1 && _iterator1.return != null && _iterator1.return();
} finally {
if (_didIteratorError1)
throw _iteratorError1;
}
}
} else {
var isThemeMedia = isMedia === "theme", isGroupMedia = isMedia === "group", isPlatformMedia = isMedia === "platform";
if (!isThemeMedia && !isPlatformMedia && !isGroupMedia) {
if (!mediaState[mediaKeyShort]) {
process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(" \u{1F4FA} \u274C DISABLED ".concat(mediaKeyShort));
continue;
}
process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(" \u{1F4FA} \u2705 ENABLED ".concat(mediaKeyShort));
}
var mediaStyle1 = getSubStyle(styleState, key, val, !0), importanceBump = 0;
if (isThemeMedia) {
dynamicThemeAccess = !0;
var mediaThemeName = mediaKeyShort.slice(6);
if (!(themeName === mediaThemeName || themeName.startsWith(mediaThemeName)))
continue;
} else if (isGroupMedia) {
var _componentState_group, groupInfo = (0, import_getGroupPropParts.getGroupPropParts)(mediaKeyShort), groupName = groupInfo.name, groupContext = context == null ? void 0 : context.groups.state[groupName];
if (!groupContext) {
process.env.NODE_ENV === "development" && debug && (0, import_log.log)("No parent with group prop, skipping styles: ".concat(groupName));
continue;
}
var groupPseudoKey = groupInfo.pseudo, groupMediaKey = groupInfo.media, componentGroupState = (_componentState_group = componentState.group) === null || _componentState_group === void 0 ? void 0 : _componentState_group[groupName];
if (groupMediaKey) {
mediaGroups || (mediaGroups = /* @__PURE__ */ new Set()), mediaGroups.add(groupMediaKey);
var mediaState1 = componentGroupState == null ? void 0 : componentGroupState.media, isActive = mediaState1 == null ? void 0 : mediaState1[groupMediaKey];
if (!mediaState1 && groupContext.layout && (isActive = (0, import_useMedia.mediaKeyMatch)(groupMediaKey, groupContext.layout)), process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(" \u{1F3D8}\uFE0F GROUP media ".concat(groupMediaKey, " active? ").concat(isActive)), !isActive) {
for (var pkey1 in mediaStyle1)
applyDefaultStyle(pkey1, styleState);
continue;
}
importanceBump = 2;
}
if (groupPseudoKey) {
pseudoGroups || (pseudoGroups = /* @__PURE__ */ new Set()), pseudoGroups.add(groupName);
var componentGroupPseudoState = (componentGroupState || // fallback to context initially
context.groups.state[groupName]).pseudo, isActive1 = componentGroupPseudoState == null ? void 0 : componentGroupPseudoState[groupPseudoKey], priority1 = import_pseudoDescriptors.pseudoPriorities[groupPseudoKey];
if (process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(" \u{1F3D8}\uFE0F GROUP pseudo ".concat(groupMediaKey, " active? ").concat(isActive1, ", priority ").concat(priority1)), !isActive1) {
for (var pkey2 in mediaStyle1)
applyDefaultStyle(pkey2, styleState);
continue;
}
importanceBump = priority1;
}
}
for (var subKey in mediaStyle1) {
var _styleState1;
if (subKey === "space") {
space = valInit.space;
continue;
}
(_styleState1 = styleState).style || (_styleState1.style = {});
var didMerge = mergeMediaByImportance(styleState, mediaKeyShort, subKey, mediaStyle1[subKey], usedKeys, mediaState[mediaKeyShort], importanceBump, debug);
didMerge && key === "fontFamily" && (styleState.fontFamily = mediaStyle1.fontFamily);
}
}
continue;
}
if (key === "pointerEvents") {
viewProps[key] = val;
continue;
}
if (
// is HOC we can just pass through the styles as props
// this fixes issues where style prop got merged with wrong priority
!isHOC && (isValidStyleKey(key, staticConfig) || import_constants.isAndroid && key === "elevation")
) {
mergeStyle(styleState, key, val);
continue;
}
isVariant || (viewProps[key] = val);
}
}
if (process.env.NODE_ENV === "development" && debug === "verbose") {
try {
(0, import_log.log)(" \u2714\uFE0F expand complete", keyInit), (0, import_log.log)("style", _object_spread({}, styleState.style)), (0, import_log.log)("transforms", _object_spread({}, transforms)), (0, import_log.log)("viewProps", _object_spread({}, viewProps));
} catch {
}
console.groupEnd();
}
}
}
}
for (var keyOg in props) _loop(keyOg);
var avoidNormalize = styleProps.noNormalize === !1;
if (!avoidNormalize) {
if (styleState.style && ((0, import_expandStyles.fixStyles)(styleState.style), import_constants.isWeb && !isReactNative && (0, import_getStylesAtomic.styleToCSS)(styleState.style)), styleState.flatTransforms) {
var _styleState2;
(_styleState2 = styleState).style || (_styleState2.style = {}), Object.entries(styleState.flatTransforms).sort(function(param, param1) {
var _styleState;
(_styleState = styleState).style || (_styleState.style = {}), Object.entries(styleState.flatTransforms).sort(function(param, param1) {
var _param = _sliced_to_array(param, 1), a = _param[0], _param1 = _sliced_to_array(param1, 1), b = _param1[0];
return a.localeCompare(b);
}).forEach(function(param) {
var _param = _sliced_to_array(param, 2), key6 = _param[0], val4 = _param[1];
mergeTransform(styleState.style, key6, val4, !0);
var _param = _sliced_to_array(param, 2), key4 = _param[0], val2 = _param[1];
mergeTransform(styleState.style, key4, val2, !0);
});

@@ -473,8 +464,8 @@ }

if (0 && shouldDoClasses)
for (var key2 in parentSplitStyles.classNames)
var val2;
for (var key in parentSplitStyles.classNames)
var val;
if (!shouldDoClasses)
for (var key3 in parentSplitStyles.style) {
var _styleState3;
key3 in classNames || styleState.style && key3 in styleState.style || ((_styleState3 = styleState).style || (_styleState3.style = {}), styleState.style[key3] = parentSplitStyles.style[key3]);
for (var key1 in parentSplitStyles.style) {
var _styleState1;
key1 in classNames || styleState.style && key1 in styleState.style || ((_styleState1 = styleState).style || (_styleState1.style = {}), styleState.style[key1] = parentSplitStyles.style[key1]);
}

@@ -489,6 +480,6 @@ }

if (!styleState.style.$$css) {
var atomic, _iteratorNormalCompletion2, _didIteratorError2, _iteratorError2;
var atomic, _iteratorNormalCompletion, _didIteratorError, _iteratorError;
try {
for (var _iterator2, _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = !0)
var atomicStyle, _props_animateOnly, _atomicStyle, key4, value, identifier1, isAnimatedAndAnimateOnly, nonAnimatedAnimateOnly;
for (var _iterator, _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0)
var atomicStyle, _props_animateOnly, _atomicStyle, key2, value, identifier, isAnimatedAndAnimateOnly, nonAnimatedAnimateOnly;
} catch (err) {

@@ -503,4 +494,4 @@ } finally {

for (var namespace in transforms) {
var _transforms_namespace, hash, val3, identifier2;
if (import_constants.isClient && !insertedTransforms[identifier2])
var _transforms_namespace, hash, val1, identifier1;
if (import_constants.isClient && !insertedTransforms[identifier1])
var rule;

@@ -520,20 +511,20 @@ }

else
for (var isArray = Array.isArray(styleProp), len = isArray ? styleProp.length : 1, i1 = 0; i1 < len; i1++) {
var style1 = isArray ? styleProp[i1] : styleProp;
if (style1)
if (style1.$$css)
Object.assign(styleState.classNames, style1);
for (var isArray = Array.isArray(styleProp), len = isArray ? styleProp.length : 1, i = 0; i < len; i++) {
var style = isArray ? styleProp[i] : styleProp;
if (style)
if (style.$$css)
Object.assign(styleState.classNames, style);
else {
var _styleState4;
(_styleState4 = styleState).style || (_styleState4.style = {}), Object.assign(styleState.style, normalizeStyle(style1));
var _styleState2;
(_styleState2 = styleState).style || (_styleState2.style = {}), Object.assign(styleState.style, normalizeStyle(style));
}
}
var style2 = styleState.style;
if (style2 != null && style2.fontFamily) {
var _getFont, faceInfo = (_getFont = (0, import_config.getFont)(style2.fontFamily)) === null || _getFont === void 0 ? void 0 : _getFont.face;
var style1 = styleState.style;
if (style1 != null && style1.fontFamily) {
var _getFont, faceInfo = (_getFont = (0, import_config.getFont)(style1.fontFamily)) === null || _getFont === void 0 ? void 0 : _getFont.face;
if (faceInfo) {
var _faceInfo_style_fontWeight_, _faceInfo_style_fontWeight, overrideFace = (_faceInfo_style_fontWeight = faceInfo[style2.fontWeight]) === null || _faceInfo_style_fontWeight === void 0 || (_faceInfo_style_fontWeight_ = _faceInfo_style_fontWeight[style2.fontStyle || "normal"]) === null || _faceInfo_style_fontWeight_ === void 0 ? void 0 : _faceInfo_style_fontWeight_.val;
overrideFace && (style2.fontFamily = overrideFace, styleState.fontFamily = overrideFace, delete style2.fontWeight, delete style2.fontStyle);
var _faceInfo_style_fontWeight_, _faceInfo_style_fontWeight, overrideFace = (_faceInfo_style_fontWeight = faceInfo[style1.fontWeight]) === null || _faceInfo_style_fontWeight === void 0 || (_faceInfo_style_fontWeight_ = _faceInfo_style_fontWeight[style1.fontStyle || "normal"]) === null || _faceInfo_style_fontWeight_ === void 0 ? void 0 : _faceInfo_style_fontWeight_.val;
overrideFace && (style1.fontFamily = overrideFace, styleState.fontFamily = overrideFace, delete style1.fontWeight, delete style1.fontStyle);
}
process.env.NODE_ENV === "development" && debug && debug !== "profile" && (0, import_log.log)("Found fontFamily native: ".concat(style2.fontFamily), faceInfo);
process.env.NODE_ENV === "development" && debug && debug !== "profile" && (0, import_log.log)("Found fontFamily native: ".concat(style1.fontFamily), faceInfo);
}

@@ -554,3 +545,3 @@ var result = {

if (!asChildExceptStyleLike) {
var style3 = styleState.style;
var style2 = styleState.style;
if (0) {

@@ -561,6 +552,6 @@ var _staticConfig_defaultProps, fontFamily, fontFamilyClassName, groupClassName, componentNameFinal, componentClassName, classList, finalClassName;

if (isReactNative) {
var cnStyles, _iteratorNormalCompletion3, _didIteratorError3, _iteratorError3;
var cnStyles, _iteratorNormalCompletion1, _didIteratorError1, _iteratorError1;
try {
for (var _iterator3, _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = !0)
var name1;
for (var _iterator1, _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = !0)
var name;
} catch (err) {

@@ -576,3 +567,3 @@ } finally {

} else
style3 && !styleProps.noMergeStyle && (viewProps.style = style3);
style2 && !styleProps.noMergeStyle && (viewProps.style = style2);
}

@@ -590,4 +581,4 @@ if (process.env.NODE_ENV === "development" && debug === "verbose" && import_isDevTools.isDevTools) {

});
for (var key5 in logs)
(0, import_log.log)(key5, logs[key5]);
for (var key3 in logs)
(0, import_log.log)(key3, logs[key3]);
} catch {

@@ -651,4 +642,4 @@ }

return styleProps.noNormalize || (0, import_expandStyles.fixStyles)(styleOut), styleOut;
};
var useSplitStyles = function(a, b, c, d, e, f, g, h, i, j) {
}, useInsertEffectCompat = import_constants.isWeb ? import_react.default.useInsertionEffect || import_constants.useIsomorphicLayoutEffect : function() {
}, useSplitStyles = function(a, b, c, d, e, f, g, h, i, j) {
conf = conf || (0, import_config.getConfig)();

@@ -655,0 +646,0 @@ var res = getSplitStyles(a, b, c, d, e, f, g, h, i, j);

@@ -22,3 +22,3 @@ var __defProp = Object.defineProperty;

module.exports = __toCommonJS(getStylesAtomic_exports);
var import_helpers = require("@tamagui/helpers"), import_config = require("../config"), import_defaultOffset = require("./defaultOffset"), import_normalizeColor = require("./normalizeColor"), import_normalizeValueWithProperty = require("./normalizeValueWithProperty"), import_pseudoDescriptors = require("./pseudoDescriptors"), import_transformsToString = require("./transformsToString");
var import_helpers = require("@tamagui/helpers"), import_config = require("../config"), import_defaultOffset = require("./defaultOffset"), import_normalizeColor = require("./normalizeColor"), import_normalizeValueWithProperty = require("./normalizeValueWithProperty"), import_pseudoDescriptors = require("./pseudoDescriptors"), import_transformsToString = require("./transformsToString"), import_useMedia = require("../hooks/useMedia");
function getStylesAtomic(style) {

@@ -31,2 +31,7 @@ styleToCSS(style);

val && out.push(...getStyleAtomic(val, import_pseudoDescriptors.pseudoDescriptors[key]));
else if ((0, import_useMedia.isMediaKey)(key))
for (const subKey in val) {
const so = getStyleObject(val, subKey);
so && (so[0] = key, out.push(so));
}
else {

@@ -33,0 +38,0 @@ const so = getStyleObject(style, key);

@@ -0,5 +1,6 @@

var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {

@@ -14,3 +15,10 @@ for (var name in all)

};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
mod
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var isTamaguiElement_exports = {};

@@ -21,4 +29,4 @@ __export(isTamaguiElement_exports, {

module.exports = __toCommonJS(isTamaguiElement_exports);
var import_react = require("react"), import_isTamaguiComponent = require("./isTamaguiComponent");
const isTamaguiElement = (child, name) => (0, import_react.isValidElement)(child) && (0, import_isTamaguiComponent.isTamaguiComponent)(child.type, name);
var import_react = __toESM(require("react")), import_isTamaguiComponent = require("./isTamaguiComponent");
const isTamaguiElement = (child, name) => import_react.default.isValidElement(child) && (0, import_isTamaguiComponent.isTamaguiComponent)(child.type, name);
//# sourceMappingURL=isTamaguiElement.js.map
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {

@@ -15,3 +16,10 @@ for (var name in all)

};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
mod
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var isTamaguiElement_exports = {};

@@ -22,4 +30,4 @@ __export(isTamaguiElement_exports, {

module.exports = __toCommonJS(isTamaguiElement_exports);
var import_react = require("react"), import_isTamaguiComponent = require("./isTamaguiComponent"), isTamaguiElement = function(child, name) {
return /* @__PURE__ */ (0, import_react.isValidElement)(child) && (0, import_isTamaguiComponent.isTamaguiComponent)(child.type, name);
var import_react = __toESM(require("react")), import_isTamaguiComponent = require("./isTamaguiComponent"), isTamaguiElement = function(child, name) {
return /* @__PURE__ */ import_react.default.isValidElement(child) && (0, import_isTamaguiComponent.isTamaguiComponent)(child.type, name);
};

@@ -26,0 +34,0 @@ // Annotate the CommonJS export names for ESM import in node:

@@ -0,5 +1,6 @@

var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {

@@ -14,3 +15,10 @@ for (var name in all)

};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
mod
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var themeable_exports = {};

@@ -21,3 +29,3 @@ __export(themeable_exports, {

module.exports = __toCommonJS(themeable_exports);
var import_react = require("react"), import_Theme = require("../views/Theme"), import_jsx_runtime = (
var import_react = __toESM(require("react")), import_Theme = require("../views/Theme"), import_jsx_runtime = (
// @ts-expect-error its ok

@@ -27,3 +35,3 @@ require("react/jsx-runtime")

function themeable(Component, staticConfig) {
const withTheme = (0, import_react.forwardRef)(function(props, ref) {
const withTheme = import_react.default.forwardRef(function(props, ref) {
const { themeInverse, theme, componentName, themeReset, ...rest } = props, element = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Component, { ref, ...rest, "data-disable-theme": !0 });

@@ -30,0 +38,0 @@ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(

"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {

@@ -15,3 +16,10 @@ for (var name in all)

};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
mod
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var themeable_exports = {};

@@ -22,3 +30,3 @@ __export(themeable_exports, {

module.exports = __toCommonJS(themeable_exports);
var import_jsx_runtime = require("react/jsx-runtime"), import_react = require("react"), import_Theme = require("../views/Theme");
var import_jsx_runtime = require("react/jsx-runtime"), import_react = __toESM(require("react")), import_Theme = require("../views/Theme");
function _define_property(obj, key, value) {

@@ -76,3 +84,3 @@ return key in obj ? Object.defineProperty(obj, key, {

function themeable(Component, staticConfig) {
var withThemeComponent = /* @__PURE__ */ (0, import_react.forwardRef)(function(props, ref) {
var withThemeComponent = /* @__PURE__ */ import_react.default.forwardRef(function(props, ref) {
var themeInverse = props.themeInverse, theme = props.theme, componentName = props.componentName, themeReset = props.themeReset, rest = _object_without_properties(props, [

@@ -79,0 +87,0 @@ "themeInverse",

@@ -0,5 +1,6 @@

var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {

@@ -14,3 +15,10 @@ for (var name in all)

};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
mod
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var ThemeManagerContext_exports = {};

@@ -21,4 +29,4 @@ __export(ThemeManagerContext_exports, {

module.exports = __toCommonJS(ThemeManagerContext_exports);
var import_react = require("react");
const ThemeManagerIDContext = (0, import_react.createContext)(1);
var import_react = __toESM(require("react"));
const ThemeManagerIDContext = import_react.default.createContext(1);
//# sourceMappingURL=ThemeManagerContext.js.map
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {

@@ -15,3 +16,10 @@ for (var name in all)

};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
mod
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var ThemeManagerContext_exports = {};

@@ -22,3 +30,3 @@ __export(ThemeManagerContext_exports, {

module.exports = __toCommonJS(ThemeManagerContext_exports);
var import_react = require("react"), ThemeManagerIDContext = /* @__PURE__ */ (0, import_react.createContext)(1);
var import_react = __toESM(require("react")), ThemeManagerIDContext = /* @__PURE__ */ import_react.default.createContext(1);
// Annotate the CommonJS export names for ESM import in node:

@@ -25,0 +33,0 @@ 0 && (module.exports = {

@@ -0,5 +1,6 @@

var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {

@@ -14,3 +15,10 @@ for (var name in all)

};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
mod
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var useConfiguration_exports = {};

@@ -21,5 +29,5 @@ __export(useConfiguration_exports, {

module.exports = __toCommonJS(useConfiguration_exports);
var import_react = require("react"), import_config = require("../config"), import_ComponentContext = require("../contexts/ComponentContext");
var import_react = __toESM(require("react")), import_config = require("../config"), import_ComponentContext = require("../contexts/ComponentContext");
const useConfiguration = () => {
const { groups, animationDriver, ...restComponentConfig } = (0, import_react.useContext)(import_ComponentContext.ComponentContext), { animations, ...restConfig } = (0, import_config.getConfig)();
const { groups, animationDriver, ...restComponentConfig } = import_react.default.useContext(import_ComponentContext.ComponentContext), { animations, ...restConfig } = (0, import_config.getConfig)();
return {

@@ -26,0 +34,0 @@ ...restConfig,

"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {

@@ -15,3 +16,10 @@ for (var name in all)

};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
mod
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var useConfiguration_exports = {};

@@ -22,3 +30,3 @@ __export(useConfiguration_exports, {

module.exports = __toCommonJS(useConfiguration_exports);
var import_react = require("react"), import_config = require("../config"), import_ComponentContext = require("../contexts/ComponentContext");
var import_react = __toESM(require("react")), import_config = require("../config"), import_ComponentContext = require("../contexts/ComponentContext");
function _define_property(obj, key, value) {

@@ -76,3 +84,3 @@ return key in obj ? Object.defineProperty(obj, key, {

var useConfiguration = function() {
var _useContext = (0, import_react.useContext)(import_ComponentContext.ComponentContext), groups = _useContext.groups, animationDriver = _useContext.animationDriver, restComponentConfig = _object_without_properties(_useContext, [
var _React_useContext = import_react.default.useContext(import_ComponentContext.ComponentContext), groups = _React_useContext.groups, animationDriver = _React_useContext.animationDriver, restComponentConfig = _object_without_properties(_React_useContext, [
"groups",

@@ -79,0 +87,0 @@ "animationDriver"

@@ -0,5 +1,6 @@

var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {

@@ -14,3 +15,10 @@ for (var name in all)

};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
mod
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var useDidHydrateOnce_exports = {};

@@ -22,3 +30,3 @@ __export(useDidHydrateOnce_exports, {

module.exports = __toCommonJS(useDidHydrateOnce_exports);
var import_react = require("react");
var import_react = __toESM(require("react"));
function useDidHydrateOnceRoot() {

@@ -32,3 +40,3 @@ return !0;

const emptySubscribe = () => () => {
}, getClientSnapshot = () => !0, getServerSnapshot = () => !1, useDidHydrateSync = () => (0, import_react.useSyncExternalStore)(emptySubscribe, getClientSnapshot, getServerSnapshot);
}, getClientSnapshot = () => !0, getServerSnapshot = () => !1, useDidHydrateSync = () => import_react.default.useSyncExternalStore(emptySubscribe, getClientSnapshot, getServerSnapshot);
//# sourceMappingURL=useDidHydrateOnce.js.map
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {

@@ -15,3 +16,10 @@ for (var name in all)

};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
mod
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var useDidHydrateOnce_exports = {};

@@ -23,3 +31,3 @@ __export(useDidHydrateOnce_exports, {

module.exports = __toCommonJS(useDidHydrateOnce_exports);
var import_react = require("react");
var import_react = __toESM(require("react"));
function useDidHydrateOnceRoot() {

@@ -40,3 +48,3 @@ return !0;

}, useDidHydrateSync = function() {
return (0, import_react.useSyncExternalStore)(emptySubscribe, getClientSnapshot, getServerSnapshot);
return import_react.default.useSyncExternalStore(emptySubscribe, getClientSnapshot, getServerSnapshot);
};

@@ -43,0 +51,0 @@ // Annotate the CommonJS export names for ESM import in node:

@@ -0,5 +1,6 @@

var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {

@@ -14,3 +15,10 @@ for (var name in all)

};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
mod
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var useMedia_exports = {};

@@ -36,3 +44,3 @@ __export(useMedia_exports, {

module.exports = __toCommonJS(useMedia_exports);
var import_constants = require("@tamagui/constants"), import_react = require("react"), import_config = require("../config"), import_matchMedia = require("../helpers/matchMedia"), import_pseudoDescriptors = require("../helpers/pseudoDescriptors"), import_useDisableSSR = require("./useDisableSSR");
var import_react = __toESM(require("react")), import_constants = require("@tamagui/constants"), import_config = require("../config"), import_matchMedia = require("../helpers/matchMedia"), import_pseudoDescriptors = require("../helpers/pseudoDescriptors"), import_useDisableSSR = require("./useDisableSSR");
let mediaState = (

@@ -119,3 +127,3 @@ // development only safeguard

function useMedia(uidIn, componentContext, debug) {
const uid = uidIn ?? (0, import_react.useRef)(), disableSSR = (0, import_useDisableSSR.getDisableSSR)(componentContext), initialState = (disableSSR || !import_constants.isWeb ? mediaState : initState) || {};
const uid = uidIn ?? import_react.default.useRef(), disableSSR = (0, import_useDisableSSR.getDisableSSR)(componentContext), initialState = (disableSSR || !import_constants.isWeb ? mediaState : initState) || {};
let componentState = States.get(uid);

@@ -134,3 +142,3 @@ componentState || (componentState = { prev: initialState }, States.set(uid, componentState));

if (process.env.TAMAGUI_SYNC_MEDIA_QUERY)
state = (0, import_react.useSyncExternalStore)(
state = import_react.default.useSyncExternalStore(
subscribe,

@@ -141,3 +149,3 @@ getSnapshot,

else {
const [_state, setState] = (0, import_react.useState)(initialState);
const [_state, setState] = import_react.default.useState(initialState);
state = _state, (0, import_constants.useIsomorphicLayoutEffect)(() => {

@@ -144,0 +152,0 @@ function update() {

"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {

@@ -15,3 +16,10 @@ for (var name in all)

};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
mod
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var useMedia_exports = {};

@@ -37,3 +45,3 @@ __export(useMedia_exports, {

module.exports = __toCommonJS(useMedia_exports);
var import_constants = require("@tamagui/constants"), import_react = require("react"), import_config = require("../config"), import_matchMedia = require("../helpers/matchMedia"), import_pseudoDescriptors = require("../helpers/pseudoDescriptors"), import_useDisableSSR = require("./useDisableSSR");
var import_react = __toESM(require("react")), import_constants = require("@tamagui/constants"), import_config = require("../config"), import_matchMedia = require("../helpers/matchMedia"), import_pseudoDescriptors = require("../helpers/pseudoDescriptors"), import_useDisableSSR = require("./useDisableSSR");
function _array_like_to_array(arr, len) {

@@ -202,3 +210,3 @@ (len == null || len > arr.length) && (len = arr.length);

function useMedia(uidIn, componentContext, debug) {
var uid = uidIn ?? (0, import_react.useRef)(), disableSSR = (0, import_useDisableSSR.getDisableSSR)(componentContext), initialState = (disableSSR || !import_constants.isWeb ? mediaState : initState) || {}, componentState = States.get(uid);
var uid = uidIn ?? import_react.default.useRef(), disableSSR = (0, import_useDisableSSR.getDisableSSR)(componentContext), initialState = (disableSSR || !import_constants.isWeb ? mediaState : initState) || {}, componentState = States.get(uid);
componentState || (componentState = {

@@ -219,7 +227,7 @@ prev: initialState

if (process.env.TAMAGUI_SYNC_MEDIA_QUERY)
state = (0, import_react.useSyncExternalStore)(subscribe, getSnapshot, function() {
state = import_react.default.useSyncExternalStore(subscribe, getSnapshot, function() {
return initialState;
});
else {
var _useState = _sliced_to_array((0, import_react.useState)(initialState), 2), _state = _useState[0], setState = _useState[1];
var _React_useState = _sliced_to_array(import_react.default.useState(initialState), 2), _state = _React_useState[0], setState = _React_useState[1];
state = _state, (0, import_constants.useIsomorphicLayoutEffect)(function() {

@@ -226,0 +234,0 @@ var update = function() {

@@ -0,5 +1,6 @@

var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {

@@ -14,3 +15,10 @@ for (var name in all)

};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
mod
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var useProps_exports = {};

@@ -23,3 +31,3 @@ __export(useProps_exports, {

module.exports = __toCommonJS(useProps_exports);
var import_react = require("react"), import_config = require("../config"), import_ComponentContext = require("../contexts/ComponentContext"), import_createComponent = require("../createComponent"), import_getSplitStyles = require("../helpers/getSplitStyles"), import_Stack = require("../views/Stack"), import_useMedia = require("./useMedia"), import_useTheme = require("./useTheme");
var import_react = __toESM(require("react")), import_config = require("../config"), import_ComponentContext = require("../contexts/ComponentContext"), import_createComponent = require("../createComponent"), import_getSplitStyles = require("../helpers/getSplitStyles"), import_Stack = require("../views/Stack"), import_useMedia = require("./useMedia"), import_useTheme = require("./useTheme");
function useProps(props, opts) {

@@ -45,3 +53,3 @@ const [propsOut, styleOut] = usePropsAndStyle(props, {

inverse: "themeInverse" in props ? props.themeInverse : void 0
}), componentContext = (0, import_react.useContext)(import_ComponentContext.ComponentContext), { state, disabled, setStateShallow } = (0, import_createComponent.useComponentState)(
}), componentContext = import_react.default.useContext(import_ComponentContext.ComponentContext), { state, disabled, setStateShallow } = (0, import_createComponent.useComponentState)(
props,

@@ -69,3 +77,3 @@ componentContext,

), { mediaGroups, pseudoGroups } = splitStyles;
return (0, import_react.useEffect)(() => {
return import_react.default.useEffect(() => {
if (!disabled) {

@@ -72,0 +80,0 @@ if (state.unmounted) {

"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {

@@ -15,3 +16,10 @@ for (var name in all)

};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
mod
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var useProps_exports = {};

@@ -24,3 +32,3 @@ __export(useProps_exports, {

module.exports = __toCommonJS(useProps_exports);
var import_react = require("react"), import_config = require("../config"), import_ComponentContext = require("../contexts/ComponentContext"), import_createComponent = require("../createComponent"), import_getSplitStyles = require("../helpers/getSplitStyles"), import_Stack = require("../views/Stack"), import_useMedia = require("./useMedia"), import_useTheme = require("./useTheme");
var import_react = __toESM(require("react")), import_config = require("../config"), import_ComponentContext = require("../contexts/ComponentContext"), import_createComponent = require("../createComponent"), import_getSplitStyles = require("../helpers/getSplitStyles"), import_Stack = require("../views/Stack"), import_useMedia = require("./useMedia"), import_useTheme = require("./useTheme");
function _array_like_to_array(arr, len) {

@@ -129,3 +137,3 @@ (len == null || len > arr.length) && (len = arr.length);

inverse: "themeInverse" in props ? props.themeInverse : void 0
}), 2), themeState = _useThemeWithState[0], theme = _useThemeWithState[1], componentContext = (0, import_react.useContext)(import_ComponentContext.ComponentContext), _useComponentState = (0, import_createComponent.useComponentState)(props, componentContext, staticConfig, (0, import_config.getConfig)()), state = _useComponentState.state, disabled = _useComponentState.disabled, setStateShallow = _useComponentState.setStateShallow, media = (0, import_useMedia.useMedia)(), splitStyles = (0, import_getSplitStyles.useSplitStyles)(props, staticConfig, theme, ((_themeState_state = themeState.state) === null || _themeState_state === void 0 ? void 0 : _themeState_state.name) || "", state, _object_spread({
}), 2), themeState = _useThemeWithState[0], theme = _useThemeWithState[1], componentContext = import_react.default.useContext(import_ComponentContext.ComponentContext), _useComponentState = (0, import_createComponent.useComponentState)(props, componentContext, staticConfig, (0, import_config.getConfig)()), state = _useComponentState.state, disabled = _useComponentState.disabled, setStateShallow = _useComponentState.setStateShallow, media = (0, import_useMedia.useMedia)(), splitStyles = (0, import_getSplitStyles.useSplitStyles)(props, staticConfig, theme, ((_themeState_state = themeState.state) === null || _themeState_state === void 0 ? void 0 : _themeState_state.name) || "", state, _object_spread({
isAnimated: !1,

@@ -138,3 +146,3 @@ mediaState: media,

}, opts), null, componentContext), mediaGroups = splitStyles.mediaGroups, pseudoGroups = splitStyles.pseudoGroups;
return (0, import_react.useEffect)(function() {
return import_react.default.useEffect(function() {
if (!disabled) {

@@ -141,0 +149,0 @@ if (state.unmounted) {

@@ -0,5 +1,6 @@

var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {

@@ -14,3 +15,10 @@ for (var name in all)

};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
mod
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var useTheme_exports = {};

@@ -26,3 +34,3 @@ __export(useTheme_exports, {

module.exports = __toCommonJS(useTheme_exports);
var import_constants = require("@tamagui/constants"), import_react = require("react"), import_config = require("../config"), import_createVariable = require("../createVariable"), import_ThemeManager = require("../helpers/ThemeManager"), import_ThemeManagerContext = require("../helpers/ThemeManagerContext"), import_createShallowSetState = require("../helpers/createShallowSetState");
var import_react = __toESM(require("react")), import_constants = require("@tamagui/constants"), import_config = require("../config"), import_createVariable = require("../createVariable"), import_ThemeManager = require("../helpers/ThemeManager"), import_ThemeManagerContext = require("../helpers/ThemeManagerContext"), import_createShallowSetState = require("../helpers/createShallowSetState");
const emptyProps = { name: null };

@@ -39,3 +47,3 @@ let cached;

}, useThemeWithState = (props) => {
const keys = (0, import_react.useRef)([]), changedThemeState = useChangeThemeEffect(
const keys = import_react.default.useRef([]), changedThemeState = useChangeThemeEffect(
props,

@@ -63,3 +71,3 @@ !1,

));
const themeProxied = (0, import_react.useMemo)(() => !themeManager || !state?.theme ? {} : getThemeProxied(state, props.deopt, themeManager, keys.current, props.debug), [state?.theme, themeManager, props.deopt, props.debug]);
const themeProxied = import_react.default.useMemo(() => !themeManager || !state?.theme ? {} : getThemeProxied(state, props.deopt, themeManager, keys.current, props.debug), [state?.theme, themeManager, props.deopt, props.debug]);
return process.env.NODE_ENV === "development" && props.debug === "verbose" && (console.groupCollapsed(` \u{1F539} [${themeManager?.id}] useTheme =>`, state?.name), console.info("returning state", changedThemeState, "from props", props), console.groupEnd()), [changedThemeState, themeProxied];

@@ -124,3 +132,3 @@ };

), useChangeThemeEffect = (props, isRoot = !1, keys, shouldUpdate) => {
const { disable } = props, parentManagerId = (0, import_react.useContext)(import_ThemeManagerContext.ThemeManagerIDContext), parentManager = getThemeManager(parentManagerId);
const { disable } = props, parentManagerId = import_react.default.useContext(import_ThemeManagerContext.ThemeManagerIDContext), parentManager = getThemeManager(parentManagerId);
if (!isRoot && !parentManager || disable)

@@ -132,3 +140,3 @@ return {

};
const [themeState, setThemeState] = (0, import_react.useState)(createState), { state, mounted, isNewTheme, themeManager, inversed } = themeState, isInversingOnMount = !!(!themeState.mounted && props.inverse);
const [themeState, setThemeState] = import_react.default.useState(createState), { state, mounted, isNewTheme, themeManager, inversed } = themeState, isInversingOnMount = !!(!themeState.mounted && props.inverse);
function getShouldUpdateTheme(manager = themeManager, nextState, prevState = state, forceShouldChange = !1) {

@@ -142,3 +150,3 @@ const forceUpdate = shouldUpdate?.();

}
if (import_constants.isServer || ((0, import_react.useEffect)(() => {
if (import_constants.isServer || (import_react.default.useEffect(() => {
if (!themeManager) return;

@@ -181,3 +189,3 @@ if (props.inverse && !mounted) {

mounted
]), process.env.NODE_ENV === "development" && props.debug !== "profile" && (0, import_react.useEffect)(() => (globalThis.TamaguiThemeManagers ??= /* @__PURE__ */ new Set(), globalThis.TamaguiThemeManagers.add(themeManager), () => {
]), process.env.NODE_ENV === "development" && props.debug !== "profile" && import_react.default.useEffect(() => (globalThis.TamaguiThemeManagers ??= /* @__PURE__ */ new Set(), globalThis.TamaguiThemeManagers.add(themeManager), () => {
globalThis.TamaguiThemeManagers.delete(themeManager);

@@ -184,0 +192,0 @@ }), [themeManager])), import_constants.isWeb && isInversingOnMount)

"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {

@@ -15,3 +16,10 @@ for (var name in all)

};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
mod
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var useTheme_exports = {};

@@ -27,3 +35,3 @@ __export(useTheme_exports, {

module.exports = __toCommonJS(useTheme_exports);
var import_constants = require("@tamagui/constants"), import_react = require("react"), import_config = require("../config"), import_createVariable = require("../createVariable"), import_ThemeManager = require("../helpers/ThemeManager"), import_ThemeManagerContext = require("../helpers/ThemeManagerContext"), import_createShallowSetState = require("../helpers/createShallowSetState");
var import_react = __toESM(require("react")), import_constants = require("@tamagui/constants"), import_config = require("../config"), import_createVariable = require("../createVariable"), import_ThemeManager = require("../helpers/ThemeManager"), import_ThemeManagerContext = require("../helpers/ThemeManagerContext"), import_createShallowSetState = require("../helpers/createShallowSetState");
function _array_like_to_array(arr, len) {

@@ -135,3 +143,3 @@ (len == null || len > arr.length) && (len = arr.length);

}, useThemeWithState = function(props) {
var keys = (0, import_react.useRef)([]), changedThemeState = useChangeThemeEffect(props, !1, keys.current, import_constants.isServer ? void 0 : function() {
var keys = import_react.default.useRef([]), changedThemeState = useChangeThemeEffect(props, !1, keys.current, import_constants.isServer ? void 0 : function() {
var _props_shouldUpdate, _props_shouldUpdate1, next = (_props_shouldUpdate1 = (_props_shouldUpdate = props.shouldUpdate) === null || _props_shouldUpdate === void 0 ? void 0 : _props_shouldUpdate.call(props)) !== null && _props_shouldUpdate1 !== void 0 ? _props_shouldUpdate1 : keys.current.length > 0 ? !0 : void 0;

@@ -150,3 +158,3 @@ if (process.env.NODE_ENV === "development" && typeof props.debug == "string" && props.debug !== "profile") {

If this is intended and you are using Tamagui without any themes, you can disable this warning by setting the environment variable TAMAGUI_DISABLE_NO_THEME_WARNING=1`)));
var themeProxied = (0, import_react.useMemo)(function() {
var themeProxied = import_react.default.useMemo(function() {
return !themeManager || !(state != null && state.theme) ? {} : getThemeProxied(state, props.deopt, themeManager, keys.current, props.debug);

@@ -301,3 +309,3 @@ }, [

return response;
}, disable = props.disable, parentManagerId = (0, import_react.useContext)(import_ThemeManagerContext.ThemeManagerIDContext), parentManager = getThemeManager(parentManagerId);
}, disable = props.disable, parentManagerId = import_react.default.useContext(import_ThemeManagerContext.ThemeManagerIDContext), parentManager = getThemeManager(parentManagerId);
if (!isRoot && !parentManager || disable)

@@ -309,4 +317,4 @@ return {

};
var _useState = _sliced_to_array((0, import_react.useState)(createState), 2), themeState = _useState[0], setThemeState = _useState[1], state = themeState.state, mounted = themeState.mounted, isNewTheme = themeState.isNewTheme, themeManager = themeState.themeManager, inversed = themeState.inversed, isInversingOnMount = !!(!themeState.mounted && props.inverse);
return import_constants.isServer || ((0, import_react.useEffect)(function() {
var _React_useState = _sliced_to_array(import_react.default.useState(createState), 2), themeState = _React_useState[0], setThemeState = _React_useState[1], state = themeState.state, mounted = themeState.mounted, isNewTheme = themeState.isNewTheme, themeManager = themeState.themeManager, inversed = themeState.inversed, isInversingOnMount = !!(!themeState.mounted && props.inverse);
return import_constants.isServer || (import_react.default.useEffect(function() {
if (themeManager) {

@@ -352,3 +360,3 @@ if (props.inverse && !mounted) {

mounted
]), process.env.NODE_ENV === "development" && props.debug !== "profile" && (0, import_react.useEffect)(function() {
]), process.env.NODE_ENV === "development" && props.debug !== "profile" && import_react.default.useEffect(function() {
var _globalThis, _TamaguiThemeManagers, _;

@@ -355,0 +363,0 @@ return (_ = (_globalThis = globalThis)[_TamaguiThemeManagers = "TamaguiThemeManagers"]) !== null && _ !== void 0 || (_globalThis[_TamaguiThemeManagers] = /* @__PURE__ */ new Set()), globalThis.TamaguiThemeManagers.add(themeManager), function() {

@@ -0,5 +1,6 @@

var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {

@@ -14,3 +15,10 @@ for (var name in all)

};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
mod
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var useThemeName_exports = {};

@@ -21,5 +29,5 @@ __export(useThemeName_exports, {

module.exports = __toCommonJS(useThemeName_exports);
var import_constants = require("@tamagui/constants"), import_react = require("react"), import_ThemeManagerContext = require("../helpers/ThemeManagerContext"), import_useTheme = require("./useTheme");
var import_react = __toESM(require("react")), import_constants = require("@tamagui/constants"), import_ThemeManagerContext = require("../helpers/ThemeManagerContext"), import_useTheme = require("./useTheme");
function useThemeName(opts) {
const manager = (0, import_useTheme.getThemeManager)((0, import_react.useContext)(import_ThemeManagerContext.ThemeManagerIDContext)), [name, setName] = (0, import_react.useState)(manager?.state.name || "");
const manager = (0, import_useTheme.getThemeManager)(import_react.default.useContext(import_ThemeManagerContext.ThemeManagerIDContext)), [name, setName] = import_react.default.useState(manager?.state.name || "");
return (0, import_constants.useIsomorphicLayoutEffect)(() => {

@@ -26,0 +34,0 @@ if (manager)

"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {

@@ -15,3 +16,10 @@ for (var name in all)

};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
mod
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var useThemeName_exports = {};

@@ -22,3 +30,3 @@ __export(useThemeName_exports, {

module.exports = __toCommonJS(useThemeName_exports);
var import_constants = require("@tamagui/constants"), import_react = require("react"), import_ThemeManagerContext = require("../helpers/ThemeManagerContext"), import_useTheme = require("./useTheme");
var import_react = __toESM(require("react")), import_constants = require("@tamagui/constants"), import_ThemeManagerContext = require("../helpers/ThemeManagerContext"), import_useTheme = require("./useTheme");
function _array_like_to_array(arr, len) {

@@ -66,3 +74,3 @@ (len == null || len > arr.length) && (len = arr.length);

function useThemeName(opts) {
var manager = (0, import_useTheme.getThemeManager)((0, import_react.useContext)(import_ThemeManagerContext.ThemeManagerIDContext)), _useState = _sliced_to_array((0, import_react.useState)((manager == null ? void 0 : manager.state.name) || ""), 2), name = _useState[0], setName = _useState[1];
var manager = (0, import_useTheme.getThemeManager)(import_react.default.useContext(import_ThemeManagerContext.ThemeManagerIDContext)), _React_useState = _sliced_to_array(import_react.default.useState((manager == null ? void 0 : manager.state.name) || ""), 2), name = _React_useState[0], setName = _React_useState[1];
return (0, import_constants.useIsomorphicLayoutEffect)(function() {

@@ -69,0 +77,0 @@ if (manager)

@@ -22,3 +22,3 @@ "use strict";

module.exports = __toCommonJS(setupHooks_exports);
var hooks = {};
var import_react = require("react"), hooks = {};
function setupHooks(next) {

@@ -25,0 +25,0 @@ Object.assign(hooks, next);

@@ -0,5 +1,6 @@

var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {

@@ -14,3 +15,10 @@ for (var name in all)

};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
mod
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var Configuration_exports = {};

@@ -21,5 +29,5 @@ __export(Configuration_exports, {

module.exports = __toCommonJS(Configuration_exports);
var import_react = require("react"), import_ComponentContext = require("../contexts/ComponentContext"), import_jsx_runtime = require("react/jsx-runtime");
var import_react = __toESM(require("react")), import_ComponentContext = require("../contexts/ComponentContext"), import_jsx_runtime = require("react/jsx-runtime");
const Configuration = (props) => {
const current = (0, import_react.useContext)(import_ComponentContext.ComponentContext);
const current = import_react.default.useContext(import_ComponentContext.ComponentContext);
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ComponentContext.ComponentContext.Provider, { ...current, ...props });

@@ -26,0 +34,0 @@ };

"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {

@@ -15,3 +16,10 @@ for (var name in all)

};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
mod
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var Configuration_exports = {};

@@ -22,3 +30,3 @@ __export(Configuration_exports, {

module.exports = __toCommonJS(Configuration_exports);
var import_jsx_runtime = require("react/jsx-runtime"), import_react = require("react"), import_ComponentContext = require("../contexts/ComponentContext");
var import_jsx_runtime = require("react/jsx-runtime"), import_react = __toESM(require("react")), import_ComponentContext = require("../contexts/ComponentContext");
function _define_property(obj, key, value) {

@@ -44,3 +52,3 @@ return key in obj ? Object.defineProperty(obj, key, {

var Configuration = function(props) {
var current = (0, import_react.useContext)(import_ComponentContext.ComponentContext);
var current = import_react.default.useContext(import_ComponentContext.ComponentContext);
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ComponentContext.ComponentContext.Provider, _object_spread({}, current, props));

@@ -47,0 +55,0 @@ };

"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {

@@ -15,3 +16,10 @@ for (var name in all)

};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
mod
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var FontLanguage_native_exports = {};

@@ -22,3 +30,3 @@ __export(FontLanguage_native_exports, {

module.exports = __toCommonJS(FontLanguage_native_exports);
var import_jsx_runtime = require("react/jsx-runtime"), import_react = require("react"), import_ComponentContext = require("../contexts/ComponentContext");
var import_jsx_runtime = require("react/jsx-runtime"), import_react = __toESM(require("react")), import_ComponentContext = require("../contexts/ComponentContext");
function _object_without_properties(source, excluded) {

@@ -44,3 +52,3 @@ if (source == null) return {};

"children"
]), language = (0, import_react.useMemo)(function() {
]), language = import_react.default.useMemo(function() {
return props;

@@ -47,0 +55,0 @@ }, [

@@ -0,5 +1,6 @@

var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {

@@ -14,3 +15,10 @@ for (var name in all)

};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
mod
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var TamaguiProvider_exports = {};

@@ -21,3 +29,3 @@ __export(TamaguiProvider_exports, {

module.exports = __toCommonJS(TamaguiProvider_exports);
var import_constants = require("@tamagui/constants"), import_react = require("react"), import_ComponentContext = require("../contexts/ComponentContext"), import_useDidHydrateOnce = require("../hooks/useDidHydrateOnce"), import_useMedia = require("../hooks/useMedia"), import_ThemeProvider = require("./ThemeProvider"), import_config = require("../config"), import_jsx_runtime = require("react/jsx-runtime");
var import_react = __toESM(require("react")), import_constants = require("@tamagui/constants"), import_ComponentContext = require("../contexts/ComponentContext"), import_useDidHydrateOnce = require("../hooks/useDidHydrateOnce"), import_useMedia = require("../hooks/useMedia"), import_ThemeProvider = require("./ThemeProvider"), import_config = require("../config"), import_jsx_runtime = require("react/jsx-runtime");
function TamaguiProvider({

@@ -53,4 +61,4 @@ children,

function UnmountedClassName(props) {
const [mounted, setMounted] = (0, import_react.useState)(!1);
return (0, import_react.useEffect)(() => {
const [mounted, setMounted] = import_react.default.useState(!1);
return import_react.default.useEffect(() => {
setMounted(!0);

@@ -57,0 +65,0 @@ }, []), import_constants.isWeb ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { style: { display: "contents" }, className: mounted ? "" : "t_unmounted", children: props.children }) : props.children;

"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {

@@ -15,3 +16,10 @@ for (var name in all)

};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
mod
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var TamaguiProvider_exports = {};

@@ -22,3 +30,3 @@ __export(TamaguiProvider_exports, {

module.exports = __toCommonJS(TamaguiProvider_exports);
var import_jsx_runtime = require("react/jsx-runtime"), import_constants = require("@tamagui/constants"), import_react = require("react"), import_ComponentContext = require("../contexts/ComponentContext"), import_useDidHydrateOnce = require("../hooks/useDidHydrateOnce"), import_useMedia = require("../hooks/useMedia"), import_ThemeProvider = require("./ThemeProvider"), import_config = require("../config");
var import_jsx_runtime = require("react/jsx-runtime"), import_react = __toESM(require("react")), import_constants = require("@tamagui/constants"), import_ComponentContext = require("../contexts/ComponentContext"), import_useDidHydrateOnce = require("../hooks/useDidHydrateOnce"), import_useMedia = require("../hooks/useMedia"), import_ThemeProvider = require("./ThemeProvider"), import_config = require("../config");
function _array_like_to_array(arr, len) {

@@ -92,4 +100,4 @@ (len == null || len > arr.length) && (len = arr.length);

function UnmountedClassName(props) {
var _useState = _sliced_to_array((0, import_react.useState)(!1), 2), mounted = _useState[0], setMounted = _useState[1];
return (0, import_react.useEffect)(function() {
var _React_useState = _sliced_to_array(import_react.default.useState(!1), 2), mounted = _React_useState[0], setMounted = _React_useState[1];
return import_react.default.useEffect(function() {
setMounted(!0);

@@ -96,0 +104,0 @@ }, []), import_constants.isWeb ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {

@@ -0,5 +1,6 @@

var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {

@@ -14,3 +15,10 @@ for (var name in all)

};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
mod
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var ThemeDebug_exports = {};

@@ -21,3 +29,3 @@ __export(ThemeDebug_exports, {

module.exports = __toCommonJS(ThemeDebug_exports);
var import_use_did_finish_ssr = require("@tamagui/use-did-finish-ssr"), import_use_force_update = require("@tamagui/use-force-update"), import_react = require("react"), import_react_dom = require("react-dom"), import_jsx_runtime = require("react/jsx-runtime");
var import_react = __toESM(require("react")), import_use_did_finish_ssr = require("@tamagui/use-did-finish-ssr"), import_use_force_update = require("@tamagui/use-force-update"), import_react_dom = require("react-dom"), import_jsx_runtime = require("react/jsx-runtime");
let node;

@@ -30,4 +38,4 @@ function ThemeDebug({

if (process.env.NODE_ENV === "development") {
const isHydrated = (0, import_use_did_finish_ssr.useDidFinishSSR)(), [onChangeCount, setOnChangeCount] = (0, import_react.useState)(0), rerender = (0, import_use_force_update.useForceUpdate)(), id = (0, import_react.useId)();
return process.env.NODE_ENV === "development" && typeof document < "u" && (node || (node = document.createElement("div"), node.style.height = "200px", node.style.overflowY = "scroll", node.style.position = "fixed", node.style.zIndex = 1e7, node.style.bottom = "30px", node.style.left = "30px", node.style.right = "30px", node.style.display = "flex", node.style.border = "1px solid #888", node.style.flexDirection = "row", node.style.background = "var(--background)", document.body.appendChild(node))), (0, import_react.useEffect)(() => {
const isHydrated = (0, import_use_did_finish_ssr.useDidFinishSSR)(), [onChangeCount, setOnChangeCount] = import_react.default.useState(0), rerender = (0, import_use_force_update.useForceUpdate)(), id = import_react.default.useId();
return process.env.NODE_ENV === "development" && typeof document < "u" && (node || (node = document.createElement("div"), node.style.height = "200px", node.style.overflowY = "scroll", node.style.position = "fixed", node.style.zIndex = 1e7, node.style.bottom = "30px", node.style.left = "30px", node.style.right = "30px", node.style.display = "flex", node.style.border = "1px solid #888", node.style.flexDirection = "row", node.style.background = "var(--background)", document.body.appendChild(node))), import_react.default.useEffect(() => {
themeState.themeManager?.parentManager?.onChangeTheme((name, manager) => {

@@ -39,3 +47,3 @@ setOnChangeCount((p) => ++p), console.warn(

});
}, [themeState.themeManager]), (0, import_react.useEffect)(() => {
}, [themeState.themeManager]), import_react.default.useEffect(() => {
const tm = setInterval(rerender, 1e3);

@@ -42,0 +50,0 @@ return () => clearTimeout(tm);

@@ -0,5 +1,6 @@

var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {

@@ -14,3 +15,10 @@ for (var name in all)

};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
mod
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var ThemeProvider_exports = {};

@@ -21,4 +29,4 @@ __export(ThemeProvider_exports, {

module.exports = __toCommonJS(ThemeProvider_exports);
var import_constants = require("@tamagui/constants"), import_react = require("react"), import_constants2 = require("../constants/constants"), import_Theme = require("./Theme"), import_config = require("../config"), import_jsx_runtime = require("react/jsx-runtime");
const ThemeProvider = (props) => (import_constants.isClient && (0, import_react.useLayoutEffect)(() => {
var import_react = __toESM(require("react")), import_constants = require("@tamagui/constants"), import_constants2 = require("../constants/constants"), import_Theme = require("./Theme"), import_config = require("../config"), import_jsx_runtime = require("react/jsx-runtime");
const ThemeProvider = (props) => (import_constants.isClient && import_react.default.useLayoutEffect(() => {
if (props.disableRootThemeClass) return;

@@ -25,0 +33,0 @@ const cn = `${import_constants2.THEME_CLASSNAME_PREFIX}${props.defaultTheme}`, target = props.themeClassNameOnRoot ?? (0, import_config.getSetting)("themeClassNameOnRoot") ? document.documentElement : document.body;

"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {

@@ -15,3 +16,10 @@ for (var name in all)

};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
mod
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var ThemeProvider_exports = {};

@@ -22,4 +30,4 @@ __export(ThemeProvider_exports, {

module.exports = __toCommonJS(ThemeProvider_exports);
var import_jsx_runtime = require("react/jsx-runtime"), import_constants = require("@tamagui/constants"), import_react = require("react"), import_constants2 = require("../constants/constants"), import_Theme = require("./Theme"), import_config = require("../config"), ThemeProvider = function(props) {
return import_constants.isClient && (0, import_react.useLayoutEffect)(function() {
var import_jsx_runtime = require("react/jsx-runtime"), import_react = __toESM(require("react")), import_constants = require("@tamagui/constants"), import_constants2 = require("../constants/constants"), import_Theme = require("./Theme"), import_config = require("../config"), ThemeProvider = function(props) {
return import_constants.isClient && import_react.default.useLayoutEffect(function() {
if (!props.disableRootThemeClass) {

@@ -26,0 +34,0 @@ var cn = "".concat(import_constants2.THEME_CLASSNAME_PREFIX).concat(props.defaultTheme), _props_themeClassNameOnRoot, target = ((_props_themeClassNameOnRoot = props.themeClassNameOnRoot) !== null && _props_themeClassNameOnRoot !== void 0 ? _props_themeClassNameOnRoot : (0, import_config.getSetting)("themeClassNameOnRoot")) ? document.documentElement : document.body;

@@ -1,5 +0,5 @@

import { forwardRef } from "react";
import React from "react";
import { useTheme } from "./hooks/useTheme";
import { jsx } from "react/jsx-runtime";
const _withStableStyle = (Component, styleProvider) => forwardRef((props, ref) => {
const _withStableStyle = (Component, styleProvider) => React.forwardRef((props, ref) => {
const { _expressions = [], ...rest } = props, theme = useTheme();

@@ -6,0 +6,0 @@ return /* @__PURE__ */ jsx(Component, { ref, style: styleProvider(theme, _expressions), ...rest });

import { jsx as _jsx } from "react/jsx-runtime";
import { forwardRef } from "react";
import React from "react";
import { useTheme } from "./hooks/useTheme";

@@ -41,3 +41,3 @@ function _define_property(obj, key, value) {

var _withStableStyle = function(Component, styleProvider) {
return /* @__PURE__ */ forwardRef(function(props, ref) {
return /* @__PURE__ */ React.forwardRef(function(props, ref) {
var _props__expressions = props._expressions, _expressions = _props__expressions === void 0 ? [] : _props__expressions, rest = _object_without_properties(props, [

@@ -44,0 +44,0 @@ "_expressions"

@@ -0,1 +1,2 @@

import React from "react";
import { composeRefs } from "@tamagui/compose-refs";

@@ -9,15 +10,2 @@ import { isClient, isServer, isWeb, useIsomorphicLayoutEffect } from "@tamagui/constants";

} from "@tamagui/helpers";
import React, {
Children,
Fragment,
createElement,
forwardRef,
memo,
useContext,
useEffect,
useId,
useMemo,
useRef,
useState
} from "react";
import { devConfig, getConfig, onConfiguredOnce } from "./config";

@@ -50,3 +38,3 @@ import { stackDefaultStyles } from "./constants/constants";

import { ThemeDebug } from "./views/ThemeDebug";
import { Fragment as Fragment2, jsx, jsxs } from "react/jsx-runtime";
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
let tamaguiConfig, time, debugKeyListeners, startVisualizer;

@@ -87,3 +75,3 @@ const componentSetStates = /* @__PURE__ */ new Set();

const useComponentState = (props, { animationDriver, groups }, staticConfig, config) => {
const useAnimations = animationDriver?.useAnimations, stateRef = useRef(
const useAnimations = animationDriver?.useAnimations, stateRef = React.useRef(
void 0

@@ -105,3 +93,3 @@ );

disabled != null && (initialState.disabled = disabled);
const states = useState(initialState), state = props.forceStyle ? { ...states[0], [props.forceStyle]: !0 } : states[0], setState = states[1], isHydrated = state.unmounted === !1 || state.unmounted === "should-enter";
const states = React.useState(initialState), state = props.forceStyle ? { ...states[0], [props.forceStyle]: !0 } : states[0], setState = states[1], isHydrated = state.unmounted === !1 || state.unmounted === "should-enter";
let isAnimated = willBeAnimated;

@@ -206,10 +194,10 @@ isWeb && hasRNAnimation && !staticConfig.isHOC && state.unmounted === !0 && (isAnimated = !1, curStateRef.willHydrate = !0), disabled !== state.disabled && (state.disabled = disabled, disabled && Object.assign(state, defaultComponentStateMounted), setState({ ...state }));

});
const component = forwardRef((propsIn, forwardedRef) => {
const internalID = process.env.NODE_ENV === "development" ? useId() : "";
const component = React.forwardRef((propsIn, forwardedRef) => {
const internalID = process.env.NODE_ENV === "development" ? React.useId() : "";
process.env.NODE_ENV === "development" && startVisualizer && (startVisualizer(), startVisualizer = void 0), process.env.NODE_ENV === "test" && propsIn["data-test-renders"] && (propsIn["data-test-renders"].current ??= 0, propsIn["data-test-renders"].current += 1);
const componentContext = useContext(ComponentContext);
const componentContext = React.useContext(ComponentContext);
let styledContextProps, overriddenContextProps, contextValue;
const { context, isReactNative } = staticConfig;
if (context) {
contextValue = useContext(context);
contextValue = React.useContext(context);
const { inverseShorthands } = getConfig();

@@ -228,3 +216,3 @@ for (const key in context.props) {

const debugProp = props.debug, componentName2 = props.componentName || staticConfig.componentName;
process.env.NODE_ENV === "development" && isClient && useEffect(() => {
process.env.NODE_ENV === "development" && isClient && React.useEffect(() => {
let overlay = null;

@@ -400,3 +388,3 @@ const debugVisualizerHandler = (show = !1) => {

setElementProps
)), viewProps.ref = curStateRef.composedRef, process.env.NODE_ENV === "development" && !isReactNative && !isText && isWeb && !isHOC && Children.toArray(props.children).forEach((item) => {
)), viewProps.ref = curStateRef.composedRef, process.env.NODE_ENV === "development" && !isReactNative && !isText && isWeb && !isHOC && React.Children.toArray(props.children).forEach((item) => {
typeof item == "string" && item !== `

@@ -410,3 +398,3 @@ ` && console.error(

debugProp && (console.groupCollapsed("Rendered style >"), console.warn(getComputedStyle(stateRef.current.host)), console.groupEnd());
}), useEffect(() => {
}), React.useEffect(() => {
if (disabled)

@@ -532,6 +520,6 @@ return;

staticConfig
)), useChildrenResult ? content = useChildrenResult : content = createElement(elementType, viewProps, content);
)), useChildrenResult ? content = useChildrenResult : content = React.createElement(elementType, viewProps, content);
const ResetPresence = config?.animations?.ResetPresence;
ResetPresence && willBeAnimated && (hasEnterStyle || presenceState) && content && typeof content != "string" && (content = /* @__PURE__ */ jsx(ResetPresence, { children: content })), process.env.NODE_ENV === "development" && time && time`create-element`;
const groupState = curStateRef.group, subGroupContext = useMemo(() => {
const groupState = curStateRef.group, subGroupContext = React.useMemo(() => {
if (!(!groupState || !groupName))

@@ -575,3 +563,3 @@ return groupState.listeners.clear(), {

const { rulesToInsert } = splitStyles, keys = Object.keys(splitStyles.rulesToInsert);
keys.length && (content = /* @__PURE__ */ jsxs(Fragment2, { children: [
keys.length && (content = /* @__PURE__ */ jsxs(Fragment, { children: [
content,

@@ -643,3 +631,3 @@ keys.map((key) => {

let res = component;
(process.env.TAMAGUI_FORCE_MEMO || staticConfig.memo) && (res = memo(res)), res.staticConfig = staticConfig;
(process.env.TAMAGUI_FORCE_MEMO || staticConfig.memo) && (res = React.memo(res)), res.staticConfig = staticConfig;
function extendStyledConfig(extended) {

@@ -658,5 +646,5 @@ return {

function styleable(Component2, options) {
let out = Component2.render?.length === 2 ? Component2 : forwardRef(Component2);
let out = Component2.render?.length === 2 ? Component2 : React.forwardRef(Component2);
const extendedConfig = extendStyledConfig(options?.staticConfig);
return out = options?.disableTheme ? out : themeable(out, extendedConfig), process.env.TAMAGUI_MEMOIZE_STYLEABLE && (out = memo(out)), out.staticConfig = extendedConfig, out.styleable = styleable, out;
return out = options?.disableTheme ? out : themeable(out, extendedConfig), process.env.TAMAGUI_MEMOIZE_STYLEABLE && (out = React.memo(out)), out.staticConfig = extendedConfig, out.styleable = styleable, out;
}

@@ -729,3 +717,3 @@ return res.extractable = extractable, res.styleable = styleable, res;

return children;
const childrenList = areChildrenArray ? children : Children.toArray(children);
const childrenList = areChildrenArray ? children : React.Children.toArray(children);
if (childrenList.length <= 1 && !isZStack && !childrenList[0]?.type?.shouldForwardSpace)

@@ -742,3 +730,3 @@ return children;

})), isEmpty || !child || child.key && !isZStack ? final.push(child) : final.push(
/* @__PURE__ */ jsx(Fragment, { children: isZStack ? /* @__PURE__ */ jsx(AbsoluteFill, { children: child }) : child }, `${index}0t`)
/* @__PURE__ */ jsx(React.Fragment, { children: isZStack ? /* @__PURE__ */ jsx(AbsoluteFill, { children: child }) : child }, `${index}0t`)
), isUnspaced(child) && index === 0 || isZStack) continue;

@@ -753,3 +741,3 @@ const next = childrenList[index + 1];

})
), final.push(/* @__PURE__ */ jsx(Fragment, { children: separator }, `${index}03t`)), hasSpace && final.push(
), final.push(/* @__PURE__ */ jsx(React.Fragment, { children: separator }, `${index}03t`)), hasSpace && final.push(
createSpacer({

@@ -756,0 +744,0 @@ key: `_${index}01t`,

import { jsx as _jsx } from "react/jsx-runtime";
import React from "react";
import { composeRefs } from "@tamagui/compose-refs";
import { isClient, isServer, isWeb, useIsomorphicLayoutEffect } from "@tamagui/constants";
import { composeEventHandlers, validStyles } from "@tamagui/helpers";
import React, { Children, Fragment, createElement, forwardRef, memo, useContext, useEffect, useId, useMemo, useRef, useState } from "react";
import { devConfig, getConfig, onConfiguredOnce } from "./config";

@@ -356,3 +356,3 @@ import { stackDefaultStyles } from "./constants/constants";

var useComponentState = function(props, param, staticConfig, config) {
var animationDriver = param.animationDriver, groups = param.groups, _animationDriver_usePresence, useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, stateRef = useRef(void 0);
var animationDriver = param.animationDriver, groups = param.groups, _animationDriver_usePresence, useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, stateRef = React.useRef(void 0);
stateRef.current || (stateRef.current = {});

@@ -375,3 +375,3 @@ var hasAnimationProp = !!("animation" in props || props.style && hasAnimatedStyleValue(props.style)), supportsCSSVars = animationDriver == null ? void 0 : animationDriver.supportsCSSVars, curStateRef = stateRef.current, willBeAnimatedClient = function() {

disabled != null && (initialState.disabled = disabled);
var states = useState(initialState), state = props.forceStyle ? _object_spread_props(_object_spread({}, states[0]), _define_property({}, props.forceStyle, !0)) : states[0], setState = states[1], isHydrated = state.unmounted === !1 || state.unmounted === "should-enter", isAnimated = willBeAnimated;
var states = React.useState(initialState), state = props.forceStyle ? _object_spread_props(_object_spread({}, states[0]), _define_property({}, props.forceStyle, !0)) : states[0], setState = states[1], isHydrated = state.unmounted === !1 || state.unmounted === "should-enter", isAnimated = willBeAnimated;
isWeb && hasRNAnimation && !staticConfig.isHOC && state.unmounted === !0 && (isAnimated = !1, curStateRef.willHydrate = !0), disabled !== state.disabled && (state.disabled = disabled, disabled && Object.assign(state, defaultComponentStateMounted), setState(_object_spread({}, state)));

@@ -466,4 +466,4 @@ var setStateShallow = createShallowSetState(setState, disabled, !1, props.debug);

});
var component = /* @__PURE__ */ forwardRef(function(propsIn, forwardedRef) {
var _themeState_state, _hooks_usePropsTransform, _hooks_useEvents, _config_animations, internalID = process.env.NODE_ENV === "development" ? useId() : "";
var component = /* @__PURE__ */ React.forwardRef(function(propsIn, forwardedRef) {
var _themeState_state, _hooks_usePropsTransform, _hooks_useEvents, _config_animations, internalID = process.env.NODE_ENV === "development" ? React.useId() : "";
if (process.env.NODE_ENV === "development" && startVisualizer && (startVisualizer(), startVisualizer = void 0), !hasSetupBaseViews) {

@@ -479,5 +479,5 @@ var _hooks_getBaseViews;

}
var componentContext = useContext(ComponentContext), styledContextProps, overriddenContextProps, contextValue, context = staticConfig.context, isReactNative = staticConfig.isReactNative;
var componentContext = React.useContext(ComponentContext), styledContextProps, overriddenContextProps, contextValue, context = staticConfig.context, isReactNative = staticConfig.isReactNative;
if (context) {
contextValue = useContext(context);
contextValue = React.useContext(context);
var inverseShorthands = getConfig().inverseShorthands;

@@ -498,3 +498,3 @@ for (var key in context.props) {

var debugProp = props.debug, componentName2 = props.componentName || staticConfig.componentName;
if (process.env.NODE_ENV === "development" && isClient && useEffect(function() {
if (process.env.NODE_ENV === "development" && isClient && React.useEffect(function() {
var overlay = null, debugVisualizerHandler = function() {

@@ -646,3 +646,3 @@ var show = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, node = curStateRef.host;

return stateRef.current.host = x;
}, forwardedRef, setElementProps)), viewProps.ref = curStateRef.composedRef, process.env.NODE_ENV === "development" && !isReactNative && !isText && isWeb && !isHOC && Children.toArray(props.children).forEach(function(item) {
}, forwardedRef, setElementProps)), viewProps.ref = curStateRef.composedRef, process.env.NODE_ENV === "development" && !isReactNative && !isText && isWeb && !isHOC && React.Children.toArray(props.children).forEach(function(item) {
typeof item == "string" && item !== `

@@ -659,3 +659,3 @@ ` && console.error("Unexpected text node: ".concat(item, ". A text node cannot be a child of a <View>."));

debugProp && (console.groupCollapsed("Rendered style >"), console.warn(getComputedStyle(stateRef.current.host)), console.groupEnd());
}), useEffect(function() {
}), React.useEffect(function() {
if (!disabled) {

@@ -788,3 +788,3 @@ if (state.unmounted === !0 && hasEnterStyle) {

var useChildrenResult;
hooks.useChildren && (useChildrenResult = hooks.useChildren(elementType, content, viewProps, events, staticConfig)), useChildrenResult ? content = useChildrenResult : content = /* @__PURE__ */ createElement(elementType, viewProps, content);
hooks.useChildren && (useChildrenResult = hooks.useChildren(elementType, content, viewProps, events, staticConfig)), useChildrenResult ? content = useChildrenResult : content = /* @__PURE__ */ React.createElement(elementType, viewProps, content);
var ResetPresence = config == null || (_config_animations = config.animations) === null || _config_animations === void 0 ? void 0 : _config_animations.ResetPresence;

@@ -794,3 +794,3 @@ ResetPresence && willBeAnimated && (hasEnterStyle || presenceState) && content && typeof content != "string" && (content = /* @__PURE__ */ _jsx(ResetPresence, {

})), process.env.NODE_ENV === "development" && time && time(_templateObject18());
var groupState = curStateRef.group, subGroupContext = useMemo(function() {
var groupState = curStateRef.group, subGroupContext = React.useMemo(function() {
var _splitStyles_style, _splitStyles_style1;

@@ -890,3 +890,3 @@ if (!(!groupState || !groupName))

var res = component;
(process.env.TAMAGUI_FORCE_MEMO || staticConfig.memo) && (res = /* @__PURE__ */ memo(res)), res.staticConfig = staticConfig;
(process.env.TAMAGUI_FORCE_MEMO || staticConfig.memo) && (res = /* @__PURE__ */ React.memo(res)), res.staticConfig = staticConfig;
function extendStyledConfig(extended) {

@@ -903,4 +903,4 @@ return _object_spread_props(_object_spread({}, staticConfig, extended), {

function styleable(Component2, options) {
var _Component_render, isForwardedRefAlready = ((_Component_render = Component2.render) === null || _Component_render === void 0 ? void 0 : _Component_render.length) === 2, out = isForwardedRefAlready ? Component2 : /* @__PURE__ */ forwardRef(Component2), extendedConfig = extendStyledConfig(options == null ? void 0 : options.staticConfig);
return out = options != null && options.disableTheme ? out : themeable(out, extendedConfig), process.env.TAMAGUI_MEMOIZE_STYLEABLE && (out = /* @__PURE__ */ memo(out)), out.staticConfig = extendedConfig, out.styleable = styleable, out;
var _Component_render, isForwardedRefAlready = ((_Component_render = Component2.render) === null || _Component_render === void 0 ? void 0 : _Component_render.length) === 2, out = isForwardedRefAlready ? Component2 : /* @__PURE__ */ React.forwardRef(Component2), extendedConfig = extendStyledConfig(options == null ? void 0 : options.staticConfig);
return out = options != null && options.disableTheme ? out : themeable(out, extendedConfig), process.env.TAMAGUI_MEMOIZE_STYLEABLE && (out = /* @__PURE__ */ React.memo(out)), out.staticConfig = extendedConfig, out.styleable = styleable, out;
}

@@ -960,3 +960,3 @@ return res.extractable = extractable, res.styleable = styleable, res;

return children;
var childrenList = areChildrenArray ? children : Children.toArray(children), len = childrenList.length;
var childrenList = areChildrenArray ? children : React.Children.toArray(children), len = childrenList.length;
if (len <= 1 && !isZStack && !(!((_childrenList_ = childrenList[0]) === null || _childrenList_ === void 0 || (_childrenList__type = _childrenList_.type) === null || _childrenList__type === void 0) && _childrenList__type.shouldForwardSpace))

@@ -973,3 +973,3 @@ return children;

key: child.key
})), isEmpty || !child || child.key && !isZStack ? final.push(child) : final.push(/* @__PURE__ */ _jsx(Fragment, {
})), isEmpty || !child || child.key && !isZStack ? final.push(child) : final.push(/* @__PURE__ */ _jsx(React.Fragment, {
children: isZStack ? /* @__PURE__ */ _jsx(AbsoluteFill, {

@@ -985,3 +985,3 @@ children: child

spaceFlex
})), final.push(/* @__PURE__ */ _jsx(Fragment, {
})), final.push(/* @__PURE__ */ _jsx(React.Fragment, {
children: separator

@@ -988,0 +988,0 @@ }, "".concat(index, "03t"))), hasSpace && final.push(createSpacer({

@@ -1,2 +0,2 @@

import { getConfig, getSetting } from "../config";
import { getSetting } from "../config";
import { mediaObjectToString } from "../hooks/useMedia";

@@ -8,4 +8,12 @@ import { getGroupPropParts } from "./getGroupPropParts";

press: "active"
}, specifities = new Array(5).fill(0).map((_, i) => new Array(i).fill(":root").join("")), createMediaStyle = (styleObject, mediaKeyIn, mediaQueries, type, negate, priority) => {
const [property, _value, identifier, _pseudo, rules] = styleObject, conf = getConfig(), enableMediaPropOrder = conf.settings.mediaPropOrder, isTheme = type === "theme", isPlatform = type === "platform", isGroup = type === "group", isNonWindowMedia = isTheme || isPlatform || isGroup, negKey = negate ? "0" : "", ogPrefix = identifier.slice(0, identifier.indexOf("-") + 1), id = `${ogPrefix}${MEDIA_SEP}${mediaKeyIn.replace("-", "")}${negKey}${MEDIA_SEP}`;
}, specifities = new Array(5).fill(0).map((_, i) => new Array(i).fill(":root").join(""));
function getThemeOrGroupSelector(name, styleInner, isGroup, groupParts, isTheme = !1, precedenceImportancePrefix = "") {
const selectorStart = styleInner.indexOf(":root"), selectorEnd = styleInner.lastIndexOf("{"), selector = styleInner.slice(selectorStart, selectorEnd), precedenceSpace = getSetting("themeClassNameOnRoot") && isTheme ? "" : " ", pseudoSelectorName = groupParts.pseudo ? groupPseudoToPseudoCSSMap[groupParts.pseudo] || groupParts.pseudo : void 0, pseudoSelector = pseudoSelectorName ? `:${pseudoSelectorName}` : "", presedencePrefix = `:root${precedenceImportancePrefix}${precedenceSpace}`, mediaSelector = `.t_${isGroup ? "group_" : ""}${name}${pseudoSelector}`;
return [
selector,
`${presedencePrefix}${mediaSelector} ${selector.replace(":root", "")}`
];
}
const createMediaStyle = (styleObject, mediaKeyIn, mediaQueries, type, negate, priority) => {
const [property, , identifier, , rules] = styleObject, enableMediaPropOrder = getSetting("mediaPropOrder"), isTheme = type === "theme", isPlatform = type === "platform", isGroup = type === "group", isNonWindowMedia = isTheme || isPlatform || isGroup, negKey = negate ? "0" : "", ogPrefix = identifier.slice(0, identifier.indexOf("-") + 1), id = `${ogPrefix}${MEDIA_SEP}${mediaKeyIn.replace("-", "")}${negKey}${MEDIA_SEP}`;
let styleRule = "", groupPriority = "", groupMediaKey, containerName, nextIdentifier = identifier.replace(ogPrefix, id), styleInner = rules.map((rule) => rule.replace(identifier, nextIdentifier)).join(";"), isHover = !1;

@@ -16,9 +24,13 @@ if (isNonWindowMedia) {

const { name, media, pseudo } = getGroupPropParts(mediaKeyIn);
groupMediaKey = media, isGroup && (containerName = name);
const groupClassName = (isGroup ? "group_" : "") + name, selectorStart = styleInner.indexOf(":root"), selectorEnd = styleInner.lastIndexOf("{"), selector = styleInner.slice(selectorStart, selectorEnd), precedenceSpace = getSetting("themeClassNameOnRoot") && isTheme ? "" : " ", pseudoSelectorName = pseudo ? groupPseudoToPseudoCSSMap[pseudo] || pseudo : void 0;
pseudo === "press" && (specificity += 2), pseudo === "hover" && (isHover = !0);
const pseudoSelector = pseudoSelectorName ? `:${pseudoSelectorName}` : "", presedencePrefix = `:root${specifities[specificity]}${precedenceSpace}`, mediaSelector = `.t_${groupClassName}${pseudoSelector}`, nextSelector = `${presedencePrefix}${mediaSelector} ${selector.replace(
":root",
""
)}`;
groupMediaKey = media;
const groupParts = getGroupPropParts(mediaKeyIn);
isGroup && (containerName = name), pseudo === "press" && (specificity += 2), pseudo === "hover" && (isHover = !0);
const [selector, nextSelector] = getThemeOrGroupSelector(
name,
styleInner,
isGroup,
groupParts,
isTheme,
specifities[specificity]
);
styleRule = styleInner.replace(selector, nextSelector);

@@ -44,3 +56,3 @@ } else

), prefix = groupMediaKey ? `@container ${containerName}` : "@media";
groupMediaKey && (styleInner = styleRule), styleInner.includes(prefix) ? styleRule = styleInner.replace("{", ` and ${mediaQuery} {`).replace("and screen and", "and") : styleRule = `${prefix} ${mediaQuery}{${precedenceImportancePrefix}${styleInner}}`, groupMediaKey && (styleRule = `@supports (contain: ${conf.settings.webContainerType || "inline-size"}) {${styleRule}}`);
groupMediaKey && (styleInner = styleRule), styleInner.includes(prefix) ? styleRule = styleInner.replace("{", ` and ${mediaQuery} {`).replace("and screen and", "and") : styleRule = `${prefix} ${mediaQuery}{${precedenceImportancePrefix}${styleInner}}`, groupMediaKey && (styleRule = `@supports (contain: ${getSetting("webContainerType") || "inline-size"}) {${styleRule}}`);
}

@@ -47,0 +59,0 @@ return isHover && (styleRule = `@media (hover:hover){${styleRule}}`), [property, void 0, nextIdentifier, void 0, [styleRule]];

@@ -1,2 +0,2 @@

import { getConfig, getSetting } from "../config";
import { getSetting } from "../config";
import { mediaObjectToString } from "../hooks/useMedia";

@@ -49,4 +49,12 @@ import { getGroupPropParts } from "./getGroupPropParts";

return new Array(i).fill(":root").join("");
}), createMediaStyle = function(styleObject, mediaKeyIn, mediaQueries, type, negate, priority) {
var _styleObject = _sliced_to_array(styleObject, 5), property = _styleObject[0], _value = _styleObject[1], identifier = _styleObject[2], _pseudo = _styleObject[3], rules = _styleObject[4], conf = getConfig(), enableMediaPropOrder = conf.settings.mediaPropOrder, isTheme = type === "theme", isPlatform = type === "platform", isGroup = type === "group", isNonWindowMedia = isTheme || isPlatform || isGroup, negKey = negate ? "0" : "", ogPrefix = identifier.slice(0, identifier.indexOf("-") + 1), id = "".concat(ogPrefix).concat(MEDIA_SEP).concat(mediaKeyIn.replace("-", "")).concat(negKey).concat(MEDIA_SEP), styleRule = "", groupPriority = "", groupMediaKey, containerName, nextIdentifier = identifier.replace(ogPrefix, id), styleInner = rules.map(function(rule) {
});
function getThemeOrGroupSelector(name, styleInner, isGroup, groupParts) {
var isTheme = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !1, precedenceImportancePrefix = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : "", selectorStart = styleInner.indexOf(":root"), selectorEnd = styleInner.lastIndexOf("{"), selector = styleInner.slice(selectorStart, selectorEnd), precedenceSpace = getSetting("themeClassNameOnRoot") && isTheme ? "" : " ", pseudoSelectorName = groupParts.pseudo ? groupPseudoToPseudoCSSMap[groupParts.pseudo] || groupParts.pseudo : void 0, pseudoSelector = pseudoSelectorName ? ":".concat(pseudoSelectorName) : "", presedencePrefix = ":root".concat(precedenceImportancePrefix).concat(precedenceSpace), mediaSelector = ".t_".concat(isGroup ? "group_" : "").concat(name).concat(pseudoSelector);
return [
selector,
"".concat(presedencePrefix).concat(mediaSelector, " ").concat(selector.replace(":root", ""))
];
}
var createMediaStyle = function(styleObject, mediaKeyIn, mediaQueries, type, negate, priority) {
var _styleObject = _sliced_to_array(styleObject, 5), property = _styleObject[0], identifier = _styleObject[2], rules = _styleObject[4], enableMediaPropOrder = getSetting("mediaPropOrder"), isTheme = type === "theme", isPlatform = type === "platform", isGroup = type === "group", isNonWindowMedia = isTheme || isPlatform || isGroup, negKey = negate ? "0" : "", ogPrefix = identifier.slice(0, identifier.indexOf("-") + 1), id = "".concat(ogPrefix).concat(MEDIA_SEP).concat(mediaKeyIn.replace("-", "")).concat(negKey).concat(MEDIA_SEP), styleRule = "", groupPriority = "", groupMediaKey, containerName, nextIdentifier = identifier.replace(ogPrefix, id), styleInner = rules.map(function(rule) {
return rule.replace(identifier, nextIdentifier);

@@ -58,6 +66,6 @@ }).join(";"), isHover = !1;

var _getGroupPropParts = getGroupPropParts(mediaKeyIn), name = _getGroupPropParts.name, media = _getGroupPropParts.media, pseudo = _getGroupPropParts.pseudo;
groupMediaKey = media, isGroup && (containerName = name);
var groupClassName = (isGroup ? "group_" : "") + name, selectorStart = styleInner.indexOf(":root"), selectorEnd = styleInner.lastIndexOf("{"), selector = styleInner.slice(selectorStart, selectorEnd), precedenceSpace = getSetting("themeClassNameOnRoot") && isTheme ? "" : " ", pseudoSelectorName = pseudo ? groupPseudoToPseudoCSSMap[pseudo] || pseudo : void 0;
pseudo === "press" && (specificity += 2), pseudo === "hover" && (isHover = !0);
var pseudoSelector = pseudoSelectorName ? ":".concat(pseudoSelectorName) : "", presedencePrefix = ":root".concat(specifities[specificity]).concat(precedenceSpace), mediaSelector = ".t_".concat(groupClassName).concat(pseudoSelector), nextSelector = "".concat(presedencePrefix).concat(mediaSelector, " ").concat(selector.replace(":root", ""));
groupMediaKey = media;
var groupParts = getGroupPropParts(mediaKeyIn);
isGroup && (containerName = name), pseudo === "press" && (specificity += 2), pseudo === "hover" && (isHover = !0);
var _getThemeOrGroupSelector = _sliced_to_array(getThemeOrGroupSelector(name, styleInner, isGroup, groupParts, isTheme, specifities[specificity]), 2), selector = _getThemeOrGroupSelector[0], nextSelector = _getThemeOrGroupSelector[1];
styleRule = styleInner.replace(selector, nextSelector);

@@ -82,3 +90,3 @@ } else

}
var mediaKey = groupMediaKey || mediaKeyIn, mediaSelector1 = selectors[mediaKey], screenStr = negate ? "not all and " : "", mediaQuery = "".concat(screenStr).concat(mediaSelector1), precedenceImportancePrefix = groupMediaKey ? groupPriority : enableMediaPropOrder && priority ? (
var mediaKey = groupMediaKey || mediaKeyIn, mediaSelector = selectors[mediaKey], screenStr = negate ? "not all and " : "", mediaQuery = "".concat(screenStr).concat(mediaSelector), precedenceImportancePrefix = groupMediaKey ? groupPriority : enableMediaPropOrder && priority ? (
// this new array should be cached

@@ -90,3 +98,3 @@ specifities[priority]

), prefix = groupMediaKey ? "@container ".concat(containerName) : "@media";
groupMediaKey && (styleInner = styleRule), styleInner.includes(prefix) ? styleRule = styleInner.replace("{", " and ".concat(mediaQuery, " {")).replace("and screen and", "and") : styleRule = "".concat(prefix, " ").concat(mediaQuery, "{").concat(precedenceImportancePrefix).concat(styleInner, "}"), groupMediaKey && (styleRule = "@supports (contain: ".concat(conf.settings.webContainerType || "inline-size", ") {").concat(styleRule, "}"));
groupMediaKey && (styleInner = styleRule), styleInner.includes(prefix) ? styleRule = styleInner.replace("{", " and ".concat(mediaQuery, " {")).replace("and screen and", "and") : styleRule = "".concat(prefix, " ").concat(mediaQuery, "{").concat(precedenceImportancePrefix).concat(styleInner, "}"), groupMediaKey && (styleRule = "@supports (contain: ".concat(getSetting("webContainerType") || "inline-size", ") {").concat(styleRule, "}"));
}

@@ -93,0 +101,0 @@ return isHover && (styleRule = "@media (hover:hover){".concat(styleRule, "}")), [

@@ -1,10 +0,6 @@

import {
createContext,
useContext,
useMemo
} from "react";
import React from "react";
import { objectIdentityKey } from "./objectIdentityKey";
import { jsx } from "react/jsx-runtime";
function createStyledContext(defaultValues) {
const OGContext = createContext(defaultValues), OGProvider = OGContext.Provider, Context = OGContext, scopedContexts = /* @__PURE__ */ new Map(), Provider = ({
const OGContext = React.createContext(defaultValues), OGProvider = OGContext.Provider, Context = OGContext, scopedContexts = /* @__PURE__ */ new Map(), Provider = ({
children,

@@ -14,3 +10,3 @@ scope,

}) => {
const next = useMemo(() => ({
const next = React.useMemo(() => ({
// this ! is a workaround for ts error

@@ -23,3 +19,3 @@ ...defaultValues,

let ScopedContext = scopedContexts.get(scope);
ScopedContext || (ScopedContext = createContext(defaultValues), scopedContexts.set(scope, ScopedContext)), Provider2 = ScopedContext.Provider;
ScopedContext || (ScopedContext = React.createContext(defaultValues), scopedContexts.set(scope, ScopedContext)), Provider2 = ScopedContext.Provider;
}

@@ -29,3 +25,3 @@ return /* @__PURE__ */ jsx(Provider2, { value: next, children });

const context = scope ? scopedContexts.get(scope) : OGContext;
return useContext(context);
return React.useContext(context);
};

@@ -32,0 +28,0 @@ return Context.Provider = Provider, Context.props = defaultValues, Context.context = OGContext, Context.useStyledContext = useStyledContext, Context;

import { jsx as _jsx } from "react/jsx-runtime";
import { createContext, useContext, useMemo } from "react";
import React from "react";
import { objectIdentityKey } from "./objectIdentityKey";

@@ -41,7 +41,7 @@ function _define_property(obj, key, value) {

function createStyledContext(defaultValues) {
var OGContext = /* @__PURE__ */ createContext(defaultValues), OGProvider = OGContext.Provider, Context = OGContext, scopedContexts = /* @__PURE__ */ new Map(), Provider = function(_param) {
var OGContext = /* @__PURE__ */ React.createContext(defaultValues), OGProvider = OGContext.Provider, Context = OGContext, scopedContexts = /* @__PURE__ */ new Map(), Provider = function(_param) {
var children = _param.children, scope = _param.scope, values = _object_without_properties(_param, [
"children",
"scope"
]), next = useMemo(function() {
]), next = React.useMemo(function() {
return _object_spread(

@@ -58,3 +58,3 @@ {},

var ScopedContext = scopedContexts.get(scope);
ScopedContext || (ScopedContext = /* @__PURE__ */ createContext(defaultValues), scopedContexts.set(scope, ScopedContext)), Provider2 = ScopedContext.Provider;
ScopedContext || (ScopedContext = /* @__PURE__ */ React.createContext(defaultValues), scopedContexts.set(scope, ScopedContext)), Provider2 = ScopedContext.Provider;
}

@@ -67,3 +67,3 @@ return /* @__PURE__ */ _jsx(Provider2, {

var context = scope ? scopedContexts.get(scope) : OGContext;
return useContext(context);
return React.useContext(context);
};

@@ -70,0 +70,0 @@ return Context.Provider = Provider, Context.props = defaultValues, Context.context = OGContext, Context.useStyledContext = useStyledContext, Context;

@@ -0,3 +1,3 @@

import React from "react";
import {
currentPlatform,
isClient,

@@ -19,3 +19,2 @@ isServer,

} from "@tamagui/helpers";
import { useInsertionEffect } from "react";
import { getConfig } from "../config";

@@ -52,2 +51,3 @@ import { accessibilityDirectMap } from "../constants/accessibilityDirectMap";

import { transformsToString } from "./transformsToString";
import { isActivePlatform } from "./isActivePlatform";
const consoleGroupCollapsed = isWeb ? console.groupCollapsed : console.info;

@@ -340,11 +340,4 @@ let conf;

const hasSpace = val.space, mediaKeyShort = key.slice(1);
if (hasMedia ||= !0, (hasSpace || !shouldDoClasses || styleProps.willBeAnimated) && (typeof hasMedia != "object" && (hasMedia = {}), hasMedia[mediaKeyShort] = !0), isMedia === "platform") {
const platform = key.slice(10);
if (
// supports web, ios, android
platform !== currentPlatform && // supports web, native
platform !== "web"
)
continue;
}
if (hasMedia ||= !0, (hasSpace || !shouldDoClasses || styleProps.willBeAnimated) && (typeof hasMedia != "object" && (hasMedia = {}), hasMedia[mediaKeyShort] = !0), isMedia === "platform" && !isActivePlatform(key))
continue;
if (process.env.NODE_ENV === "development" && debug === "verbose" && log(` \u{1F4FA} ${key}`, {

@@ -374,2 +367,5 @@ key,

for (const style of mediaStyles) {
const property = style[0];
if (property[0] === "$" && property.startsWith("$platform") && !isActivePlatform(property))
continue;
const out = createMediaStyle(

@@ -395,2 +391,14 @@ style,

} else {
let mergeMediaStyle = function(key2, val2) {
styleState.style ||= {}, mergeMediaByImportance(
styleState,
mediaKeyShort,
key2,
val2,
usedKeys,
mediaState[mediaKeyShort],
importanceBump,
debug
) && key2 === "fontFamily" && (styleState.fontFamily = mediaStyle.fontFamily);
};
const isThemeMedia = isMedia === "theme", isGroupMedia = isMedia === "group";

@@ -448,12 +456,9 @@ if (!isThemeMedia && !(isMedia === "platform") && !isGroupMedia) {

}
styleState.style ||= {}, mergeMediaByImportance(
styleState,
mediaKeyShort,
subKey,
mediaStyle[subKey],
usedKeys,
mediaState[mediaKeyShort],
importanceBump,
debug
) && key === "fontFamily" && (styleState.fontFamily = mediaStyle.fontFamily);
if (subKey[0] === "$") {
if (!isActivePlatform(subKey))
continue;
for (const subSubKey in mediaStyle[subKey])
mergeMediaStyle(subSubKey, mediaStyle[subKey][subSubKey]);
} else
mergeMediaStyle(subKey, mediaStyle[subKey]);
}

@@ -634,3 +639,3 @@ }

return styleProps.noNormalize || fixStyles(styleOut), styleOut;
}, useInsertEffectCompat = isWeb ? useInsertionEffect || useIsomorphicLayoutEffect : () => {
}, useInsertEffectCompat = isWeb ? React.useInsertionEffect || useIsomorphicLayoutEffect : () => {
}, useSplitStyles = (a, b, c, d, e, f, g, h, i, j) => {

@@ -637,0 +642,0 @@ conf = conf || getConfig();

@@ -1,4 +0,4 @@

import { currentPlatform, isAndroid, isClient, isServer, isWeb, useIsomorphicLayoutEffect } from "@tamagui/constants";
import React from "react";
import { isAndroid, isClient, isServer, isWeb, useIsomorphicLayoutEffect } from "@tamagui/constants";
import { StyleObjectIdentifier, StyleObjectProperty, StyleObjectPseudo, stylePropsText, stylePropsTransform, tokenCategories, validPseudoKeys, validStyles } from "@tamagui/helpers";
import { useInsertionEffect } from "react";
import { getConfig, getFont } from "../config";

@@ -20,2 +20,3 @@ import "../constants/accessibilityDirectMap";

import { transformsToString } from "./transformsToString";
import { isActivePlatform } from "./isActivePlatform";
function _array_like_to_array(arr, len) {

@@ -106,2 +107,294 @@ (len == null || len > arr.length) && (len = arr.length);

var getSplitStyles = function(props, staticConfig, theme, themeName, componentState, styleProps, parentSplitStyles, context, elementType, debug, skipThemeTokenResolution) {
var _loop = function(keyOg2) {
var _loop2 = function(i3) {
var _parentStaticConfig_variants;
if (expanded) {
var _expanded_i = _sliced_to_array(expanded[i3], 2), k = _expanded_i[0], v = _expanded_i[1];
key4 = k, val2 = v;
}
if (val2 == null || key4 in usedKeys) return "continue";
if (isPseudo = key4 in validPseudoKeys, isMedia = !isPseudo && !isValidStyleKeyInit && isMediaKey(key4), isMediaOrPseudo1 = !!(isMedia || isPseudo), isVariant = variants && key4 in variants, inlineProps != null && inlineProps.has(key4) || process.env.IS_STATIC === "is_static" && (inlineWhenUnflattened != null && inlineWhenUnflattened.has(key4))) {
var _props_key;
viewProps[key4] = (_props_key = props[key4]) !== null && _props_key !== void 0 ? _props_key : val2;
}
var shouldPassThrough2 = styleProps.noExpand && isPseudo || isHOC && (isMediaOrPseudo1 || (parentStaticConfig == null || (_parentStaticConfig_variants = parentStaticConfig.variants) === null || _parentStaticConfig_variants === void 0 ? void 0 : _parentStaticConfig_variants[keyInit]));
if (shouldPassThrough2)
return passDownProp(viewProps, key4, val2, isMediaOrPseudo1), process.env.NODE_ENV === "development" && debug === "verbose" && (consoleGroupCollapsed(" - passing down prop ".concat(key4)), log({
val: val2,
after: _object_spread({}, viewProps[key4])
}), console.groupEnd()), "continue";
if (isPseudo) {
if (!val2) return "continue";
var pseudoStyleObject = getSubStyle(styleState, key4, val2, styleProps.noClassNames), descriptor = pseudoDescriptors[key4], isEnter = key4 === "enterStyle", isExit = key4 === "exitStyle";
if (!descriptor)
return "continue";
if (!shouldDoClasses || process.env.IS_STATIC === "is_static") {
var _pseudos, _key;
if (pseudos || (pseudos = {}), (_pseudos = pseudos)[_key = key4] || (_pseudos[_key] = {}), process.env.IS_STATIC === "is_static")
return Object.assign(pseudos[key4], pseudoStyleObject), "continue";
}
if (shouldDoClasses && !isExit) {
var pseudoStyles = getStyleAtomic(pseudoStyleObject, descriptor);
process.env.NODE_ENV === "development" && debug === "verbose" && (consoleGroupCollapsed("pseudo (classes)", key4), log({
pseudoStyleObject,
pseudoStyles
}), console.groupEnd());
var _iteratorNormalCompletion2 = !0, _didIteratorError2 = !1, _iteratorError2 = void 0;
try {
for (var _iterator2 = pseudoStyles[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = !0) {
var psuedoStyle = _step2.value, fullKey = "".concat(psuedoStyle[StyleObjectProperty]).concat(PROP_SPLIT).concat(descriptor.name);
fullKey in usedKeys || (addStyleToInsertRules(rulesToInsert, psuedoStyle), mergeClassName(transforms, classNames, fullKey, psuedoStyle[StyleObjectIdentifier], isMediaOrPseudo1, !0));
}
} catch (err) {
_didIteratorError2 = !0, _iteratorError2 = err;
} finally {
try {
!_iteratorNormalCompletion2 && _iterator2.return != null && _iterator2.return();
} finally {
if (_didIteratorError2)
throw _iteratorError2;
}
}
}
if (!shouldDoClasses || isExit || isEnter) {
var descriptorKey = descriptor.stateKey || descriptor.name, isDisabled = componentState[descriptorKey] === !1;
isExit && (isDisabled = !styleProps.isExiting), isEnter && componentState.unmounted === !1 && (isDisabled = !0), process.env.NODE_ENV === "development" && debug === "verbose" && (consoleGroupCollapsed("pseudo", key4, {
isDisabled
}), log({
pseudoStyleObject,
isDisabled,
descriptor,
componentState
}), console.groupEnd());
var importance = descriptor.priority;
for (var pkey in pseudoStyleObject) {
var val12 = pseudoStyleObject[pkey];
if (isDisabled)
applyDefaultStyle(pkey, styleState);
else {
var curImportance = usedKeys[pkey] || 0, shouldMerge = importance >= curImportance;
if (shouldMerge) {
var _pseudos1, _key1;
pseudos || (pseudos = {}), (_pseudos1 = pseudos)[_key1 = key4] || (_pseudos1[_key1] = {}), pseudos[key4][pkey] = val12, mergeStyle(styleState, pkey, val12);
}
process.env.NODE_ENV === "development" && debug === "verbose" && log(" subKey", pkey, shouldMerge, {
importance,
curImportance,
pkey,
val: val12
});
}
}
if (!isDisabled)
for (var key12 in val2) {
var k1 = shorthands[key12] || key12;
usedKeys[k1] = Math.max(importance, usedKeys[k1] || 0);
}
}
return "continue";
}
if (isMedia) {
if (!val2) return "continue";
var hasSpace = val2.space, mediaKeyShort = key4.slice(1);
if (hasMedia || (hasMedia = !0), (hasSpace || !shouldDoClasses || styleProps.willBeAnimated) && ((typeof hasMedia > "u" ? "undefined" : _type_of(hasMedia)) !== "object" && (hasMedia = {}), hasMedia[mediaKeyShort] = !0), isMedia === "platform" && !isActivePlatform(key4))
return "continue";
if (process.env.NODE_ENV === "development" && debug === "verbose" && log(" \u{1F4FA} ".concat(key4), {
key: key4,
val: val2,
props,
shouldDoClasses,
acceptsClassName,
componentState,
mediaState
}), shouldDoClasses) {
var mediaStyle = getSubStyle(styleState, key4, val2, !1);
if (hasSpace && (delete mediaStyle.space, mediaState[mediaKeyShort])) {
var importance1 = getMediaImportanceIfMoreImportant(mediaKeyShort, "space", usedKeys, !0);
importance1 && (space = val2.space, usedKeys.space = importance1, process.env.NODE_ENV === "development" && debug === "verbose" && log("Found more important space for current media ".concat(mediaKeyShort, ": ").concat(val2, " (importance: ").concat(importance1, ")")));
}
var mediaStyles = getStylesAtomic(mediaStyle), priority = mediaStylesSeen;
mediaStylesSeen += 1;
var _iteratorNormalCompletion12 = !0, _didIteratorError12 = !1, _iteratorError12 = void 0;
try {
for (var _iterator12 = mediaStyles[Symbol.iterator](), _step12; !(_iteratorNormalCompletion12 = (_step12 = _iterator12.next()).done); _iteratorNormalCompletion12 = !0) {
var style3 = _step12.value, property = style3[0];
if (!(property[0] === "$" && property.startsWith("$platform") && !isActivePlatform(property))) {
var out = createMediaStyle(style3, mediaKeyShort, mediaQueryConfig, isMedia, !1, priority);
process.env.NODE_ENV === "development" && debug === "verbose" && log("\u{1F4FA} media style:", out);
var fullKey1 = "".concat(style3[StyleObjectProperty]).concat(PROP_SPLIT).concat(mediaKeyShort).concat(style3[StyleObjectPseudo] || "");
fullKey1 in usedKeys || (addStyleToInsertRules(rulesToInsert, out), mergeClassName(transforms, classNames, fullKey1, out[StyleObjectIdentifier], !0, !0));
}
}
} catch (err) {
_didIteratorError12 = !0, _iteratorError12 = err;
} finally {
try {
!_iteratorNormalCompletion12 && _iterator12.return != null && _iterator12.return();
} finally {
if (_didIteratorError12)
throw _iteratorError12;
}
}
} else {
var mergeMediaStyle = function(key5, val3) {
var _styleState4;
(_styleState4 = styleState).style || (_styleState4.style = {});
var didMerge = mergeMediaByImportance(styleState, mediaKeyShort, key5, val3, usedKeys, mediaState[mediaKeyShort], importanceBump, debug);
didMerge && key5 === "fontFamily" && (styleState.fontFamily = mediaStyle1.fontFamily);
}, isThemeMedia = isMedia === "theme", isGroupMedia = isMedia === "group", isPlatformMedia = isMedia === "platform";
if (!isThemeMedia && !isPlatformMedia && !isGroupMedia) {
if (!mediaState[mediaKeyShort])
return process.env.NODE_ENV === "development" && debug === "verbose" && log(" \u{1F4FA} \u274C DISABLED ".concat(mediaKeyShort)), "continue";
process.env.NODE_ENV === "development" && debug === "verbose" && log(" \u{1F4FA} \u2705 ENABLED ".concat(mediaKeyShort));
}
var mediaStyle1 = getSubStyle(styleState, key4, val2, !0), importanceBump = 0;
if (isThemeMedia) {
dynamicThemeAccess = !0;
var mediaThemeName = mediaKeyShort.slice(6);
if (!(themeName === mediaThemeName || themeName.startsWith(mediaThemeName)))
return "continue";
} else if (isGroupMedia) {
var _componentState_group, groupInfo = getGroupPropParts(mediaKeyShort), groupName = groupInfo.name, groupContext = context == null ? void 0 : context.groups.state[groupName];
if (!groupContext)
return process.env.NODE_ENV === "development" && debug && log("No parent with group prop, skipping styles: ".concat(groupName)), "continue";
var groupPseudoKey = groupInfo.pseudo, groupMediaKey = groupInfo.media, componentGroupState = (_componentState_group = componentState.group) === null || _componentState_group === void 0 ? void 0 : _componentState_group[groupName];
if (groupMediaKey) {
mediaGroups || (mediaGroups = /* @__PURE__ */ new Set()), mediaGroups.add(groupMediaKey);
var mediaState1 = componentGroupState == null ? void 0 : componentGroupState.media, isActive = mediaState1 == null ? void 0 : mediaState1[groupMediaKey];
if (!mediaState1 && groupContext.layout && (isActive = mediaKeyMatch(groupMediaKey, groupContext.layout)), process.env.NODE_ENV === "development" && debug === "verbose" && log(" \u{1F3D8}\uFE0F GROUP media ".concat(groupMediaKey, " active? ").concat(isActive)), !isActive) {
for (var pkey1 in mediaStyle1)
applyDefaultStyle(pkey1, styleState);
return "continue";
}
importanceBump = 2;
}
if (groupPseudoKey) {
pseudoGroups || (pseudoGroups = /* @__PURE__ */ new Set()), pseudoGroups.add(groupName);
var componentGroupPseudoState = (componentGroupState || // fallback to context initially
context.groups.state[groupName]).pseudo, isActive1 = componentGroupPseudoState == null ? void 0 : componentGroupPseudoState[groupPseudoKey], priority1 = pseudoPriorities[groupPseudoKey];
if (process.env.NODE_ENV === "development" && debug === "verbose" && log(" \u{1F3D8}\uFE0F GROUP pseudo ".concat(groupMediaKey, " active? ").concat(isActive1, ", priority ").concat(priority1)), !isActive1) {
for (var pkey2 in mediaStyle1)
applyDefaultStyle(pkey2, styleState);
return "continue";
}
importanceBump = priority1;
}
}
for (var subKey in mediaStyle1) {
if (subKey === "space") {
space = valInit.space;
continue;
}
if (subKey[0] === "$") {
if (!isActivePlatform(subKey))
continue;
for (var subSubKey in mediaStyle1[subKey])
mergeMediaStyle(subSubKey, mediaStyle1[subKey][subSubKey]);
} else
mergeMediaStyle(subKey, mediaStyle1[subKey]);
}
}
return "continue";
}
if (key4 === "pointerEvents")
return viewProps[key4] = val2, "continue";
if (
// is HOC we can just pass through the styles as props
// this fixes issues where style prop got merged with wrong priority
!isHOC && (isValidStyleKey(key4, staticConfig) || isAndroid && key4 === "elevation")
)
return mergeStyle(styleState, key4, val2), "continue";
isVariant || (viewProps[key4] = val2);
}, keyInit = keyOg2, valInit = props[keyInit];
if (accept) {
var accepted = accept[keyInit];
if ((accepted === "style" || accepted === "textStyle") && valInit && (typeof valInit > "u" ? "undefined" : _type_of(valInit)) === "object")
return viewProps[keyInit] = getSubStyle(styleState, keyInit, valInit, styleProps.noClassNames), "continue";
}
if (process.env.NODE_ENV === "development" && debug === "verbose" && console.groupEnd(), disableExpandShorthands || keyInit in shorthands && (keyInit = shorthands[keyInit]), keyInit === "className" || keyInit in usedKeys) return "continue";
if (keyInit in skipProps && !noSkip && !isHOC) {
if (keyInit === "group" && 0)
var identifier2, containerType, containerCSS;
return "continue";
}
var valInitType = typeof valInit > "u" ? "undefined" : _type_of(valInit), isValidStyleKeyInit = isValidStyleKey(keyInit, staticConfig);
if (0 && isValidStyleKeyInit && valInitType === "string" && valInit[0] === "_") {
var isValidClassName, isMediaOrPseudo;
if ((isValidClassName || isMediaOrPseudo) && !shouldDoClasses)
var _styleState3;
}
if (!isValidStyleKeyInit) {
if (!isAndroid && keyInit === "elevationAndroid")
return "continue";
if (keyInit === "userSelect")
keyInit = "selectable", valInit = valInit !== "none";
else if (keyInit.startsWith("data-"))
return "continue";
}
if (keyInit === "dataSet") {
for (var keyInit1 in valInit)
viewProps["data-".concat(hyphenate(keyInit1))] = valInit[keyInit1];
return "continue";
}
if (0 && !noExpand)
var didUseKeyInit;
var isShorthand = keyInit in shorthands, isVariant = !isValidStyleKeyInit && variants && keyInit in variants, isStyleLikeKey = isShorthand || isValidStyleKeyInit || isVariant, isPseudo = keyInit in validPseudoKeys, isMedia = !isStyleLikeKey && !isPseudo && isMediaKey(keyInit), isMediaOrPseudo1 = !!(isMedia || isPseudo);
if (isMediaOrPseudo1 && keyInit.startsWith("$group-")) {
var name2 = keyInit.split("-")[1];
context != null && context.groups.subscribe && !(context != null && context.groups.state[name2]) && (keyInit = keyInit.replace("$group-", "$group-true-"));
}
var isStyleProp = isValidStyleKeyInit || isMediaOrPseudo1 || isVariant && !noExpand || isShorthand;
if (isStyleProp && (asChild === "except-style" || asChild === "except-style-web"))
return "continue";
var shouldPassProp = !isStyleProp || // is in parent variants
isHOC && parentVariants && keyInit in parentVariants || (inlineProps == null ? void 0 : inlineProps.has(keyInit)), parentVariant = parentVariants == null ? void 0 : parentVariants[keyInit], isHOCShouldPassThrough = !!(isHOC && (isShorthand || isValidStyleKeyInit || isMediaOrPseudo1 || parentVariant || keyInit in skipProps)), shouldPassThrough = shouldPassProp || isHOCShouldPassThrough;
if (process.env.NODE_ENV === "development" && debug === "verbose" && (console.groupEnd(), console.groupEnd(), consoleGroupCollapsed(" \u{1F511} ".concat(keyOg2).concat(keyInit !== keyOg2 ? " (shorthand for ".concat(keyInit, ")") : "", " ").concat(shouldPassThrough ? "(pass)" : "")), log({
isVariant,
valInit,
shouldPassProp
}), isClient && log({
variants,
variant: variants == null ? void 0 : variants[keyInit],
isVariant,
isHOCShouldPassThrough,
curProps: _object_spread({}, styleState.curProps),
parentStaticConfig
})), shouldPassThrough && (passDownProp(viewProps, keyInit, valInit, isMediaOrPseudo1), !isVariant) || !noSkip && keyInit in skipProps)
return process.env.NODE_ENV === "development" && debug === "verbose" && console.groupEnd(), "continue";
(isText || isInput) && valInit && (keyInit === "fontFamily" || keyInit === shorthands.fontFamily) && valInit in conf.fontsParsed && (styleState.fontFamily = valInit);
var avoidPropMap = isMediaOrPseudo1 || !isVariant && !isValidStyleKeyInit, expanded = avoidPropMap ? null : propMapper(keyInit, valInit, styleState);
if (!avoidPropMap) {
if (!expanded) return "continue";
var next = getPropMappedFontFamily(expanded);
next && (styleState.fontFamily = next);
}
if (process.env.NODE_ENV === "development" && debug === "verbose") {
consoleGroupCollapsed(" \u{1F4A0} expanded", keyInit, valInit);
try {
!isServer && isDevTools && (log({
expanded,
styleProps,
componentState,
isVariant,
variant: variants == null ? void 0 : variants[keyInit],
shouldPassProp,
isHOCShouldPassThrough,
usedKeys: _object_spread({}, usedKeys),
curProps: _object_spread({}, styleState.curProps)
}), log("expanded", expanded, `
usedKeys`, _object_spread({}, usedKeys), `
current`, _object_spread({}, styleState.style)));
} catch {
}
console.groupEnd();
}
for (var key4 = keyInit, val2 = valInit, max = expanded ? expanded.length : 1, i2 = 0; i2 < max; i2++) _loop2(i2);
if (process.env.NODE_ENV === "development" && debug === "verbose") {
try {
log(" \u2714\uFE0F expand complete", keyInit), log("style", _object_spread({}, styleState.style)), log("transforms", _object_spread({}, transforms)), log("viewProps", _object_spread({}, viewProps));
} catch {
}
console.groupEnd();
}
};
conf = conf || getConfig(), isWeb && styleProps.isAnimated && conf.animations.isReactNative && !styleProps.noNormalize && (styleProps.noNormalize = "values");

@@ -142,322 +435,13 @@ var shorthands = conf.shorthands, isHOC = staticConfig.isHOC, isText = staticConfig.isText, isInput = staticConfig.isInput, variants = staticConfig.variants, isReactNative = staticConfig.isReactNative, inlineProps = staticConfig.inlineProps, inlineWhenUnflattened = staticConfig.inlineWhenUnflattened, parentStaticConfig = staticConfig.parentStaticConfig, acceptsClassName = staticConfig.acceptsClassName, viewProps = {}, mediaState = styleProps.mediaState || globalMediaState, usedKeys = {}, shouldDoClasses = acceptsClassName && isWeb && !styleProps.noClassNames, rulesToInsert = void 0, classNames = {}, transforms = {}, pseudos = null, space = props.space, hasMedia = !1, dynamicThemeAccess, pseudoGroups, mediaGroups, className = props.className || "", mediaStylesSeen = 0, curPropsState, styleState = {

var asChild = props.asChild, accept = staticConfig.accept, noSkip = styleProps.noSkip, disableExpandShorthands = styleProps.disableExpandShorthands, noExpand = styleProps.noExpand, webContainerType = conf.settings.webContainerType, parentVariants = parentStaticConfig == null ? void 0 : parentStaticConfig.variants;
for (var keyOg in props) {
var keyInit = keyOg, valInit = props[keyInit];
if (accept) {
var accepted = accept[keyInit];
if ((accepted === "style" || accepted === "textStyle") && valInit && (typeof valInit > "u" ? "undefined" : _type_of(valInit)) === "object") {
viewProps[keyInit] = getSubStyle(styleState, keyInit, valInit, styleProps.noClassNames);
continue;
}
}
if (process.env.NODE_ENV === "development" && debug === "verbose" && console.groupEnd(), disableExpandShorthands || keyInit in shorthands && (keyInit = shorthands[keyInit]), keyInit !== "className" && !(keyInit in usedKeys)) {
if (keyInit in skipProps && !noSkip && !isHOC) {
if (keyInit === "group" && 0)
var identifier, containerType, containerCSS;
continue;
}
var valInitType = typeof valInit > "u" ? "undefined" : _type_of(valInit), isValidStyleKeyInit = isValidStyleKey(keyInit, staticConfig);
if (0 && isValidStyleKeyInit && valInitType === "string" && valInit[0] === "_") {
var isValidClassName, isMediaOrPseudo;
if ((isValidClassName || isMediaOrPseudo) && !shouldDoClasses)
var _styleState;
}
if (!isValidStyleKeyInit) {
if (!isAndroid && keyInit === "elevationAndroid")
continue;
if (keyInit === "userSelect")
keyInit = "selectable", valInit = valInit !== "none";
else if (keyInit.startsWith("data-"))
continue;
}
if (keyInit === "dataSet") {
for (var keyInit1 in valInit)
viewProps["data-".concat(hyphenate(keyInit1))] = valInit[keyInit1];
continue;
}
if (0 && !noExpand)
var didUseKeyInit;
var isShorthand = keyInit in shorthands, isVariant = !isValidStyleKeyInit && variants && keyInit in variants, isStyleLikeKey = isShorthand || isValidStyleKeyInit || isVariant, isPseudo = keyInit in validPseudoKeys, isMedia = !isStyleLikeKey && !isPseudo && isMediaKey(keyInit), isMediaOrPseudo1 = !!(isMedia || isPseudo);
if (isMediaOrPseudo1 && keyInit.startsWith("$group-")) {
var name = keyInit.split("-")[1];
context != null && context.groups.subscribe && !(context != null && context.groups.state[name]) && (keyInit = keyInit.replace("$group-", "$group-true-"));
}
var isStyleProp = isValidStyleKeyInit || isMediaOrPseudo1 || isVariant && !noExpand || isShorthand;
if (!(isStyleProp && (asChild === "except-style" || asChild === "except-style-web"))) {
var shouldPassProp = !isStyleProp || // is in parent variants
isHOC && parentVariants && keyInit in parentVariants || (inlineProps == null ? void 0 : inlineProps.has(keyInit)), parentVariant = parentVariants == null ? void 0 : parentVariants[keyInit], isHOCShouldPassThrough = !!(isHOC && (isShorthand || isValidStyleKeyInit || isMediaOrPseudo1 || parentVariant || keyInit in skipProps)), shouldPassThrough = shouldPassProp || isHOCShouldPassThrough;
if (process.env.NODE_ENV === "development" && debug === "verbose" && (console.groupEnd(), console.groupEnd(), consoleGroupCollapsed(" \u{1F511} ".concat(keyOg).concat(keyInit !== keyOg ? " (shorthand for ".concat(keyInit, ")") : "", " ").concat(shouldPassThrough ? "(pass)" : "")), log({
isVariant,
valInit,
shouldPassProp
}), isClient && log({
variants,
variant: variants == null ? void 0 : variants[keyInit],
isVariant,
isHOCShouldPassThrough,
curProps: _object_spread({}, styleState.curProps),
parentStaticConfig
})), shouldPassThrough && (passDownProp(viewProps, keyInit, valInit, isMediaOrPseudo1), !isVariant)) {
process.env.NODE_ENV === "development" && debug === "verbose" && console.groupEnd();
continue;
}
if (!noSkip && keyInit in skipProps) {
process.env.NODE_ENV === "development" && debug === "verbose" && console.groupEnd();
continue;
}
(isText || isInput) && valInit && (keyInit === "fontFamily" || keyInit === shorthands.fontFamily) && valInit in conf.fontsParsed && (styleState.fontFamily = valInit);
var avoidPropMap = isMediaOrPseudo1 || !isVariant && !isValidStyleKeyInit, expanded = avoidPropMap ? null : propMapper(keyInit, valInit, styleState);
if (!avoidPropMap) {
if (!expanded) continue;
var next = getPropMappedFontFamily(expanded);
next && (styleState.fontFamily = next);
}
if (process.env.NODE_ENV === "development" && debug === "verbose") {
consoleGroupCollapsed(" \u{1F4A0} expanded", keyInit, valInit);
try {
!isServer && isDevTools && (log({
expanded,
styleProps,
componentState,
isVariant,
variant: variants == null ? void 0 : variants[keyInit],
shouldPassProp,
isHOCShouldPassThrough,
usedKeys: _object_spread({}, usedKeys),
curProps: _object_spread({}, styleState.curProps)
}), log("expanded", expanded, `
usedKeys`, _object_spread({}, usedKeys), `
current`, _object_spread({}, styleState.style)));
} catch {
}
console.groupEnd();
}
for (var key = keyInit, val = valInit, max = expanded ? expanded.length : 1, i = 0; i < max; i++) {
var _parentStaticConfig_variants;
if (expanded) {
var _expanded_i = _sliced_to_array(expanded[i], 2), k = _expanded_i[0], v = _expanded_i[1];
key = k, val = v;
}
if (val != null && !(key in usedKeys)) {
if (isPseudo = key in validPseudoKeys, isMedia = !isPseudo && !isValidStyleKeyInit && isMediaKey(key), isMediaOrPseudo1 = !!(isMedia || isPseudo), isVariant = variants && key in variants, inlineProps != null && inlineProps.has(key) || process.env.IS_STATIC === "is_static" && (inlineWhenUnflattened != null && inlineWhenUnflattened.has(key))) {
var _props_key;
viewProps[key] = (_props_key = props[key]) !== null && _props_key !== void 0 ? _props_key : val;
}
var shouldPassThrough1 = styleProps.noExpand && isPseudo || isHOC && (isMediaOrPseudo1 || (parentStaticConfig == null || (_parentStaticConfig_variants = parentStaticConfig.variants) === null || _parentStaticConfig_variants === void 0 ? void 0 : _parentStaticConfig_variants[keyInit]));
if (shouldPassThrough1) {
passDownProp(viewProps, key, val, isMediaOrPseudo1), process.env.NODE_ENV === "development" && debug === "verbose" && (consoleGroupCollapsed(" - passing down prop ".concat(key)), log({
val,
after: _object_spread({}, viewProps[key])
}), console.groupEnd());
continue;
}
if (isPseudo) {
if (!val) continue;
var pseudoStyleObject = getSubStyle(styleState, key, val, styleProps.noClassNames), descriptor = pseudoDescriptors[key], isEnter = key === "enterStyle", isExit = key === "exitStyle";
if (!descriptor)
continue;
if (!shouldDoClasses || process.env.IS_STATIC === "is_static") {
var _pseudos, _key;
if (pseudos || (pseudos = {}), (_pseudos = pseudos)[_key = key] || (_pseudos[_key] = {}), process.env.IS_STATIC === "is_static") {
Object.assign(pseudos[key], pseudoStyleObject);
continue;
}
}
if (shouldDoClasses && !isExit) {
var pseudoStyles = getStyleAtomic(pseudoStyleObject, descriptor);
process.env.NODE_ENV === "development" && debug === "verbose" && (consoleGroupCollapsed("pseudo (classes)", key), log({
pseudoStyleObject,
pseudoStyles
}), console.groupEnd());
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
try {
for (var _iterator = pseudoStyles[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
var psuedoStyle = _step.value, fullKey = "".concat(psuedoStyle[StyleObjectProperty]).concat(PROP_SPLIT).concat(descriptor.name);
fullKey in usedKeys || (addStyleToInsertRules(rulesToInsert, psuedoStyle), mergeClassName(transforms, classNames, fullKey, psuedoStyle[StyleObjectIdentifier], isMediaOrPseudo1, !0));
}
} catch (err) {
_didIteratorError = !0, _iteratorError = err;
} finally {
try {
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
} finally {
if (_didIteratorError)
throw _iteratorError;
}
}
}
if (!shouldDoClasses || isExit || isEnter) {
var descriptorKey = descriptor.stateKey || descriptor.name, isDisabled = componentState[descriptorKey] === !1;
isExit && (isDisabled = !styleProps.isExiting), isEnter && componentState.unmounted === !1 && (isDisabled = !0), process.env.NODE_ENV === "development" && debug === "verbose" && (consoleGroupCollapsed("pseudo", key, {
isDisabled
}), log({
pseudoStyleObject,
isDisabled,
descriptor,
componentState
}), console.groupEnd());
var importance = descriptor.priority;
for (var pkey in pseudoStyleObject) {
var val1 = pseudoStyleObject[pkey];
if (isDisabled)
applyDefaultStyle(pkey, styleState);
else {
var curImportance = usedKeys[pkey] || 0, shouldMerge = importance >= curImportance;
if (shouldMerge) {
var _pseudos1, _key1;
pseudos || (pseudos = {}), (_pseudos1 = pseudos)[_key1 = key] || (_pseudos1[_key1] = {}), pseudos[key][pkey] = val1, mergeStyle(styleState, pkey, val1);
}
process.env.NODE_ENV === "development" && debug === "verbose" && log(" subKey", pkey, shouldMerge, {
importance,
curImportance,
pkey,
val: val1
});
}
}
if (!isDisabled)
for (var key1 in val) {
var k1 = shorthands[key1] || key1;
usedKeys[k1] = Math.max(importance, usedKeys[k1] || 0);
}
}
continue;
}
if (isMedia) {
if (!val) continue;
var hasSpace = val.space, mediaKeyShort = key.slice(1);
if (hasMedia || (hasMedia = !0), (hasSpace || !shouldDoClasses || styleProps.willBeAnimated) && ((typeof hasMedia > "u" ? "undefined" : _type_of(hasMedia)) !== "object" && (hasMedia = {}), hasMedia[mediaKeyShort] = !0), isMedia === "platform") {
var platform = key.slice(10);
if (
// supports web, ios, android
platform !== currentPlatform && // supports web, native
platform !== "native"
)
continue;
}
if (process.env.NODE_ENV === "development" && debug === "verbose" && log(" \u{1F4FA} ".concat(key), {
key,
val,
props,
shouldDoClasses,
acceptsClassName,
componentState,
mediaState
}), shouldDoClasses) {
var mediaStyle = getSubStyle(styleState, key, val, !1);
if (hasSpace && (delete mediaStyle.space, mediaState[mediaKeyShort])) {
var importance1 = getMediaImportanceIfMoreImportant(mediaKeyShort, "space", usedKeys, !0);
importance1 && (space = val.space, usedKeys.space = importance1, process.env.NODE_ENV === "development" && debug === "verbose" && log("Found more important space for current media ".concat(mediaKeyShort, ": ").concat(val, " (importance: ").concat(importance1, ")")));
}
var mediaStyles = getStylesAtomic(mediaStyle), priority = mediaStylesSeen;
mediaStylesSeen += 1;
var _iteratorNormalCompletion1 = !0, _didIteratorError1 = !1, _iteratorError1 = void 0;
try {
for (var _iterator1 = mediaStyles[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = !0) {
var style = _step1.value, out = createMediaStyle(style, mediaKeyShort, mediaQueryConfig, isMedia, !1, priority);
process.env.NODE_ENV === "development" && debug === "verbose" && log("\u{1F4FA} media style:", out);
var fullKey1 = "".concat(style[StyleObjectProperty]).concat(PROP_SPLIT).concat(mediaKeyShort).concat(style[StyleObjectPseudo] || "");
fullKey1 in usedKeys || (addStyleToInsertRules(rulesToInsert, out), mergeClassName(transforms, classNames, fullKey1, out[StyleObjectIdentifier], !0, !0));
}
} catch (err) {
_didIteratorError1 = !0, _iteratorError1 = err;
} finally {
try {
!_iteratorNormalCompletion1 && _iterator1.return != null && _iterator1.return();
} finally {
if (_didIteratorError1)
throw _iteratorError1;
}
}
} else {
var isThemeMedia = isMedia === "theme", isGroupMedia = isMedia === "group", isPlatformMedia = isMedia === "platform";
if (!isThemeMedia && !isPlatformMedia && !isGroupMedia) {
if (!mediaState[mediaKeyShort]) {
process.env.NODE_ENV === "development" && debug === "verbose" && log(" \u{1F4FA} \u274C DISABLED ".concat(mediaKeyShort));
continue;
}
process.env.NODE_ENV === "development" && debug === "verbose" && log(" \u{1F4FA} \u2705 ENABLED ".concat(mediaKeyShort));
}
var mediaStyle1 = getSubStyle(styleState, key, val, !0), importanceBump = 0;
if (isThemeMedia) {
dynamicThemeAccess = !0;
var mediaThemeName = mediaKeyShort.slice(6);
if (!(themeName === mediaThemeName || themeName.startsWith(mediaThemeName)))
continue;
} else if (isGroupMedia) {
var _componentState_group, groupInfo = getGroupPropParts(mediaKeyShort), groupName = groupInfo.name, groupContext = context == null ? void 0 : context.groups.state[groupName];
if (!groupContext) {
process.env.NODE_ENV === "development" && debug && log("No parent with group prop, skipping styles: ".concat(groupName));
continue;
}
var groupPseudoKey = groupInfo.pseudo, groupMediaKey = groupInfo.media, componentGroupState = (_componentState_group = componentState.group) === null || _componentState_group === void 0 ? void 0 : _componentState_group[groupName];
if (groupMediaKey) {
mediaGroups || (mediaGroups = /* @__PURE__ */ new Set()), mediaGroups.add(groupMediaKey);
var mediaState1 = componentGroupState == null ? void 0 : componentGroupState.media, isActive = mediaState1 == null ? void 0 : mediaState1[groupMediaKey];
if (!mediaState1 && groupContext.layout && (isActive = mediaKeyMatch(groupMediaKey, groupContext.layout)), process.env.NODE_ENV === "development" && debug === "verbose" && log(" \u{1F3D8}\uFE0F GROUP media ".concat(groupMediaKey, " active? ").concat(isActive)), !isActive) {
for (var pkey1 in mediaStyle1)
applyDefaultStyle(pkey1, styleState);
continue;
}
importanceBump = 2;
}
if (groupPseudoKey) {
pseudoGroups || (pseudoGroups = /* @__PURE__ */ new Set()), pseudoGroups.add(groupName);
var componentGroupPseudoState = (componentGroupState || // fallback to context initially
context.groups.state[groupName]).pseudo, isActive1 = componentGroupPseudoState == null ? void 0 : componentGroupPseudoState[groupPseudoKey], priority1 = pseudoPriorities[groupPseudoKey];
if (process.env.NODE_ENV === "development" && debug === "verbose" && log(" \u{1F3D8}\uFE0F GROUP pseudo ".concat(groupMediaKey, " active? ").concat(isActive1, ", priority ").concat(priority1)), !isActive1) {
for (var pkey2 in mediaStyle1)
applyDefaultStyle(pkey2, styleState);
continue;
}
importanceBump = priority1;
}
}
for (var subKey in mediaStyle1) {
var _styleState1;
if (subKey === "space") {
space = valInit.space;
continue;
}
(_styleState1 = styleState).style || (_styleState1.style = {});
var didMerge = mergeMediaByImportance(styleState, mediaKeyShort, subKey, mediaStyle1[subKey], usedKeys, mediaState[mediaKeyShort], importanceBump, debug);
didMerge && key === "fontFamily" && (styleState.fontFamily = mediaStyle1.fontFamily);
}
}
continue;
}
if (key === "pointerEvents") {
viewProps[key] = val;
continue;
}
if (
// is HOC we can just pass through the styles as props
// this fixes issues where style prop got merged with wrong priority
!isHOC && (isValidStyleKey(key, staticConfig) || isAndroid && key === "elevation")
) {
mergeStyle(styleState, key, val);
continue;
}
isVariant || (viewProps[key] = val);
}
}
if (process.env.NODE_ENV === "development" && debug === "verbose") {
try {
log(" \u2714\uFE0F expand complete", keyInit), log("style", _object_spread({}, styleState.style)), log("transforms", _object_spread({}, transforms)), log("viewProps", _object_spread({}, viewProps));
} catch {
}
console.groupEnd();
}
}
}
}
for (var keyOg in props) _loop(keyOg);
var avoidNormalize = styleProps.noNormalize === !1;
if (!avoidNormalize) {
if (styleState.style && (fixStyles(styleState.style), isWeb && !isReactNative && styleToCSS(styleState.style)), styleState.flatTransforms) {
var _styleState2;
(_styleState2 = styleState).style || (_styleState2.style = {}), Object.entries(styleState.flatTransforms).sort(function(param, param1) {
var _styleState;
(_styleState = styleState).style || (_styleState.style = {}), Object.entries(styleState.flatTransforms).sort(function(param, param1) {
var _param = _sliced_to_array(param, 1), a = _param[0], _param1 = _sliced_to_array(param1, 1), b = _param1[0];
return a.localeCompare(b);
}).forEach(function(param) {
var _param = _sliced_to_array(param, 2), key6 = _param[0], val4 = _param[1];
mergeTransform(styleState.style, key6, val4, !0);
var _param = _sliced_to_array(param, 2), key4 = _param[0], val2 = _param[1];
mergeTransform(styleState.style, key4, val2, !0);
});

@@ -467,8 +451,8 @@ }

if (0 && shouldDoClasses)
for (var key2 in parentSplitStyles.classNames)
var val2;
for (var key in parentSplitStyles.classNames)
var val;
if (!shouldDoClasses)
for (var key3 in parentSplitStyles.style) {
var _styleState3;
key3 in classNames || styleState.style && key3 in styleState.style || ((_styleState3 = styleState).style || (_styleState3.style = {}), styleState.style[key3] = parentSplitStyles.style[key3]);
for (var key1 in parentSplitStyles.style) {
var _styleState1;
key1 in classNames || styleState.style && key1 in styleState.style || ((_styleState1 = styleState).style || (_styleState1.style = {}), styleState.style[key1] = parentSplitStyles.style[key1]);
}

@@ -483,6 +467,6 @@ }

if (!styleState.style.$$css) {
var atomic, _iteratorNormalCompletion2, _didIteratorError2, _iteratorError2;
var atomic, _iteratorNormalCompletion, _didIteratorError, _iteratorError;
try {
for (var _iterator2, _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = !0)
var atomicStyle, _props_animateOnly, _atomicStyle, key4, value, identifier1, isAnimatedAndAnimateOnly, nonAnimatedAnimateOnly;
for (var _iterator, _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0)
var atomicStyle, _props_animateOnly, _atomicStyle, key2, value, identifier, isAnimatedAndAnimateOnly, nonAnimatedAnimateOnly;
} catch (err) {

@@ -497,4 +481,4 @@ } finally {

for (var namespace in transforms) {
var _transforms_namespace, hash, val3, identifier2;
if (isClient && !insertedTransforms[identifier2])
var _transforms_namespace, hash, val1, identifier1;
if (isClient && !insertedTransforms[identifier1])
var rule;

@@ -514,20 +498,20 @@ }

else
for (var isArray = Array.isArray(styleProp), len = isArray ? styleProp.length : 1, i1 = 0; i1 < len; i1++) {
var style1 = isArray ? styleProp[i1] : styleProp;
if (style1)
if (style1.$$css)
Object.assign(styleState.classNames, style1);
for (var isArray = Array.isArray(styleProp), len = isArray ? styleProp.length : 1, i = 0; i < len; i++) {
var style = isArray ? styleProp[i] : styleProp;
if (style)
if (style.$$css)
Object.assign(styleState.classNames, style);
else {
var _styleState4;
(_styleState4 = styleState).style || (_styleState4.style = {}), Object.assign(styleState.style, normalizeStyle(style1));
var _styleState2;
(_styleState2 = styleState).style || (_styleState2.style = {}), Object.assign(styleState.style, normalizeStyle(style));
}
}
var style2 = styleState.style;
if (style2 != null && style2.fontFamily) {
var _getFont, faceInfo = (_getFont = getFont(style2.fontFamily)) === null || _getFont === void 0 ? void 0 : _getFont.face;
var style1 = styleState.style;
if (style1 != null && style1.fontFamily) {
var _getFont, faceInfo = (_getFont = getFont(style1.fontFamily)) === null || _getFont === void 0 ? void 0 : _getFont.face;
if (faceInfo) {
var _faceInfo_style_fontWeight_, _faceInfo_style_fontWeight, overrideFace = (_faceInfo_style_fontWeight = faceInfo[style2.fontWeight]) === null || _faceInfo_style_fontWeight === void 0 || (_faceInfo_style_fontWeight_ = _faceInfo_style_fontWeight[style2.fontStyle || "normal"]) === null || _faceInfo_style_fontWeight_ === void 0 ? void 0 : _faceInfo_style_fontWeight_.val;
overrideFace && (style2.fontFamily = overrideFace, styleState.fontFamily = overrideFace, delete style2.fontWeight, delete style2.fontStyle);
var _faceInfo_style_fontWeight_, _faceInfo_style_fontWeight, overrideFace = (_faceInfo_style_fontWeight = faceInfo[style1.fontWeight]) === null || _faceInfo_style_fontWeight === void 0 || (_faceInfo_style_fontWeight_ = _faceInfo_style_fontWeight[style1.fontStyle || "normal"]) === null || _faceInfo_style_fontWeight_ === void 0 ? void 0 : _faceInfo_style_fontWeight_.val;
overrideFace && (style1.fontFamily = overrideFace, styleState.fontFamily = overrideFace, delete style1.fontWeight, delete style1.fontStyle);
}
process.env.NODE_ENV === "development" && debug && debug !== "profile" && log("Found fontFamily native: ".concat(style2.fontFamily), faceInfo);
process.env.NODE_ENV === "development" && debug && debug !== "profile" && log("Found fontFamily native: ".concat(style1.fontFamily), faceInfo);
}

@@ -548,3 +532,3 @@ var result = {

if (!asChildExceptStyleLike) {
var style3 = styleState.style;
var style2 = styleState.style;
if (0) {

@@ -555,6 +539,6 @@ var _staticConfig_defaultProps, fontFamily, fontFamilyClassName, groupClassName, componentNameFinal, componentClassName, classList, finalClassName;

if (isReactNative) {
var cnStyles, _iteratorNormalCompletion3, _didIteratorError3, _iteratorError3;
var cnStyles, _iteratorNormalCompletion1, _didIteratorError1, _iteratorError1;
try {
for (var _iterator3, _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = !0)
var name1;
for (var _iterator1, _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = !0)
var name;
} catch (err) {

@@ -570,3 +554,3 @@ } finally {

} else
style3 && !styleProps.noMergeStyle && (viewProps.style = style3);
style2 && !styleProps.noMergeStyle && (viewProps.style = style2);
}

@@ -584,4 +568,4 @@ if (process.env.NODE_ENV === "development" && debug === "verbose" && isDevTools) {

});
for (var key5 in logs)
log(key5, logs[key5]);
for (var key3 in logs)
log(key3, logs[key3]);
} catch {

@@ -645,4 +629,4 @@ }

return styleProps.noNormalize || fixStyles(styleOut), styleOut;
};
var useSplitStyles = function(a, b, c, d, e, f, g, h, i, j) {
}, useInsertEffectCompat = isWeb ? React.useInsertionEffect || useIsomorphicLayoutEffect : function() {
}, useSplitStyles = function(a, b, c, d, e, f, g, h, i, j) {
conf = conf || getConfig();

@@ -649,0 +633,0 @@ var res = getSplitStyles(a, b, c, d, e, f, g, h, i, j);

@@ -8,2 +8,3 @@ import { simpleHash } from "@tamagui/helpers";

import { transformsToString } from "./transformsToString";
import { isMediaKey } from "../hooks/useMedia";
function getStylesAtomic(style) {

@@ -16,2 +17,7 @@ styleToCSS(style);

val && out.push(...getStyleAtomic(val, pseudoDescriptors[key]));
else if (isMediaKey(key))
for (const subKey in val) {
const so = getStyleObject(val, subKey);
so && (so[0] = key, out.push(so));
}
else {

@@ -18,0 +24,0 @@ const so = getStyleObject(style, key);

@@ -1,4 +0,4 @@

import { isValidElement } from "react";
import React from "react";
import { isTamaguiComponent } from "./isTamaguiComponent";
const isTamaguiElement = (child, name) => isValidElement(child) && isTamaguiComponent(child.type, name);
const isTamaguiElement = (child, name) => React.isValidElement(child) && isTamaguiComponent(child.type, name);
export {

@@ -5,0 +5,0 @@ isTamaguiElement

@@ -1,5 +0,5 @@

import { isValidElement } from "react";
import React from "react";
import { isTamaguiComponent } from "./isTamaguiComponent";
var isTamaguiElement = function(child, name) {
return /* @__PURE__ */ isValidElement(child) && isTamaguiComponent(child.type, name);
return /* @__PURE__ */ React.isValidElement(child) && isTamaguiComponent(child.type, name);
};

@@ -6,0 +6,0 @@ export {

@@ -1,6 +0,6 @@

import { forwardRef } from "react";
import React from "react";
import { Theme } from "../views/Theme";
import { jsx } from "react/jsx-runtime";
function themeable(Component, staticConfig) {
const withTheme = forwardRef(function(props, ref) {
const withTheme = React.forwardRef(function(props, ref) {
const { themeInverse, theme, componentName, themeReset, ...rest } = props, element = (

@@ -7,0 +7,0 @@ // @ts-expect-error its ok

import { jsx as _jsx } from "react/jsx-runtime";
import { forwardRef } from "react";
import React from "react";
import { Theme } from "../views/Theme";

@@ -56,3 +56,3 @@ function _define_property(obj, key, value) {

function themeable(Component, staticConfig) {
var withThemeComponent = /* @__PURE__ */ forwardRef(function(props, ref) {
var withThemeComponent = /* @__PURE__ */ React.forwardRef(function(props, ref) {
var themeInverse = props.themeInverse, theme = props.theme, componentName = props.componentName, themeReset = props.themeReset, rest = _object_without_properties(props, [

@@ -59,0 +59,0 @@ "themeInverse",

@@ -1,3 +0,3 @@

import { createContext } from "react";
const ThemeManagerIDContext = createContext(1);
import React from "react";
const ThemeManagerIDContext = React.createContext(1);
export {

@@ -4,0 +4,0 @@ ThemeManagerIDContext

@@ -1,3 +0,3 @@

import { createContext } from "react";
var ThemeManagerIDContext = /* @__PURE__ */ createContext(1);
import React from "react";
var ThemeManagerIDContext = /* @__PURE__ */ React.createContext(1);
export {

@@ -4,0 +4,0 @@ ThemeManagerIDContext

@@ -1,6 +0,6 @@

import { useContext } from "react";
import React from "react";
import { getConfig } from "../config";
import { ComponentContext } from "../contexts/ComponentContext";
const useConfiguration = () => {
const { groups, animationDriver, ...restComponentConfig } = useContext(ComponentContext), { animations, ...restConfig } = getConfig();
const { groups, animationDriver, ...restComponentConfig } = React.useContext(ComponentContext), { animations, ...restConfig } = getConfig();
return {

@@ -7,0 +7,0 @@ ...restConfig,

@@ -1,2 +0,2 @@

import { useContext } from "react";
import React from "react";
import { getConfig } from "../config";

@@ -56,3 +56,3 @@ import { ComponentContext } from "../contexts/ComponentContext";

var useConfiguration = function() {
var _useContext = useContext(ComponentContext), groups = _useContext.groups, animationDriver = _useContext.animationDriver, restComponentConfig = _object_without_properties(_useContext, [
var _React_useContext = React.useContext(ComponentContext), groups = _React_useContext.groups, animationDriver = _React_useContext.animationDriver, restComponentConfig = _object_without_properties(_React_useContext, [
"groups",

@@ -59,0 +59,0 @@ "animationDriver"

@@ -1,2 +0,2 @@

import { useSyncExternalStore } from "react";
import React from "react";
function useDidHydrateOnceRoot() {

@@ -10,3 +10,3 @@ return !0;

const emptySubscribe = () => () => {
}, getClientSnapshot = () => !0, getServerSnapshot = () => !1, useDidHydrateSync = () => useSyncExternalStore(emptySubscribe, getClientSnapshot, getServerSnapshot);
}, getClientSnapshot = () => !0, getServerSnapshot = () => !1, useDidHydrateSync = () => React.useSyncExternalStore(emptySubscribe, getClientSnapshot, getServerSnapshot);
export {

@@ -13,0 +13,0 @@ useDidHydrateOnce,

@@ -1,2 +0,2 @@

import { useSyncExternalStore } from "react";
import React from "react";
function useDidHydrateOnceRoot() {

@@ -17,3 +17,3 @@ return !0;

}, useDidHydrateSync = function() {
return useSyncExternalStore(emptySubscribe, getClientSnapshot, getServerSnapshot);
return React.useSyncExternalStore(emptySubscribe, getClientSnapshot, getServerSnapshot);
};

@@ -20,0 +20,0 @@ export {

@@ -0,3 +1,3 @@

import React from "react";
import { isServer, isWeb, useIsomorphicLayoutEffect } from "@tamagui/constants";
import { useRef, useState, useSyncExternalStore } from "react";
import { getConfig, getSetting } from "../config";

@@ -88,3 +88,3 @@ import { matchMedia } from "../helpers/matchMedia";

function useMedia(uidIn, componentContext, debug) {
const uid = uidIn ?? useRef(), disableSSR = getDisableSSR(componentContext), initialState = (disableSSR || !isWeb ? mediaState : initState) || {};
const uid = uidIn ?? React.useRef(), disableSSR = getDisableSSR(componentContext), initialState = (disableSSR || !isWeb ? mediaState : initState) || {};
let componentState = States.get(uid);

@@ -103,3 +103,3 @@ componentState || (componentState = { prev: initialState }, States.set(uid, componentState));

if (process.env.TAMAGUI_SYNC_MEDIA_QUERY)
state = useSyncExternalStore(
state = React.useSyncExternalStore(
subscribe,

@@ -110,3 +110,3 @@ getSnapshot,

else {
const [_state, setState] = useState(initialState);
const [_state, setState] = React.useState(initialState);
state = _state, useIsomorphicLayoutEffect(() => {

@@ -113,0 +113,0 @@ function update() {

@@ -0,3 +1,3 @@

import React from "react";
import { isServer, isWeb, useIsomorphicLayoutEffect } from "@tamagui/constants";
import { useRef, useState, useSyncExternalStore } from "react";
import { getConfig, getSetting } from "../config";

@@ -170,3 +170,3 @@ import { matchMedia } from "../helpers/matchMedia";

function useMedia(uidIn, componentContext, debug) {
var uid = uidIn ?? useRef(), disableSSR = getDisableSSR(componentContext), initialState = (disableSSR || !isWeb ? mediaState : initState) || {}, componentState = States.get(uid);
var uid = uidIn ?? React.useRef(), disableSSR = getDisableSSR(componentContext), initialState = (disableSSR || !isWeb ? mediaState : initState) || {}, componentState = States.get(uid);
componentState || (componentState = {

@@ -187,7 +187,7 @@ prev: initialState

if (process.env.TAMAGUI_SYNC_MEDIA_QUERY)
state = useSyncExternalStore(subscribe, getSnapshot, function() {
state = React.useSyncExternalStore(subscribe, getSnapshot, function() {
return initialState;
});
else {
var _useState = _sliced_to_array(useState(initialState), 2), _state = _useState[0], setState = _useState[1];
var _React_useState = _sliced_to_array(React.useState(initialState), 2), _state = _React_useState[0], setState = _React_useState[1];
state = _state, useIsomorphicLayoutEffect(function() {

@@ -194,0 +194,0 @@ var update = function() {

@@ -1,2 +0,2 @@

import { useContext, useEffect } from "react";
import React from "react";
import { getConfig } from "../config";

@@ -29,3 +29,3 @@ import { ComponentContext } from "../contexts/ComponentContext";

inverse: "themeInverse" in props ? props.themeInverse : void 0
}), componentContext = useContext(ComponentContext), { state, disabled, setStateShallow } = useComponentState(
}), componentContext = React.useContext(ComponentContext), { state, disabled, setStateShallow } = useComponentState(
props,

@@ -53,3 +53,3 @@ componentContext,

), { mediaGroups, pseudoGroups } = splitStyles;
return useEffect(() => {
return React.useEffect(() => {
if (!disabled) {

@@ -56,0 +56,0 @@ if (state.unmounted) {

@@ -1,2 +0,2 @@

import { useContext, useEffect } from "react";
import React from "react";
import { getConfig } from "../config";

@@ -112,3 +112,3 @@ import { ComponentContext } from "../contexts/ComponentContext";

inverse: "themeInverse" in props ? props.themeInverse : void 0
}), 2), themeState = _useThemeWithState[0], theme = _useThemeWithState[1], componentContext = useContext(ComponentContext), _useComponentState = useComponentState(props, componentContext, staticConfig, getConfig()), state = _useComponentState.state, disabled = _useComponentState.disabled, setStateShallow = _useComponentState.setStateShallow, media = useMedia(), splitStyles = useSplitStyles(props, staticConfig, theme, ((_themeState_state = themeState.state) === null || _themeState_state === void 0 ? void 0 : _themeState_state.name) || "", state, _object_spread({
}), 2), themeState = _useThemeWithState[0], theme = _useThemeWithState[1], componentContext = React.useContext(ComponentContext), _useComponentState = useComponentState(props, componentContext, staticConfig, getConfig()), state = _useComponentState.state, disabled = _useComponentState.disabled, setStateShallow = _useComponentState.setStateShallow, media = useMedia(), splitStyles = useSplitStyles(props, staticConfig, theme, ((_themeState_state = themeState.state) === null || _themeState_state === void 0 ? void 0 : _themeState_state.name) || "", state, _object_spread({
isAnimated: !1,

@@ -121,3 +121,3 @@ mediaState: media,

}, opts), null, componentContext), mediaGroups = splitStyles.mediaGroups, pseudoGroups = splitStyles.pseudoGroups;
return useEffect(function() {
return React.useEffect(function() {
if (!disabled) {

@@ -124,0 +124,0 @@ if (state.unmounted) {

@@ -0,3 +1,3 @@

import React from "react";
import { isClient, isServer, isWeb } from "@tamagui/constants";
import { useContext, useEffect, useMemo, useRef, useState } from "react";
import { getConfig, getSetting } from "../config";

@@ -19,3 +19,3 @@ import { getVariable } from "../createVariable";

}, useThemeWithState = (props) => {
const keys = useRef([]), changedThemeState = useChangeThemeEffect(
const keys = React.useRef([]), changedThemeState = useChangeThemeEffect(
props,

@@ -43,3 +43,3 @@ !1,

));
const themeProxied = useMemo(() => !themeManager || !state?.theme ? {} : getThemeProxied(state, props.deopt, themeManager, keys.current, props.debug), [state?.theme, themeManager, props.deopt, props.debug]);
const themeProxied = React.useMemo(() => !themeManager || !state?.theme ? {} : getThemeProxied(state, props.deopt, themeManager, keys.current, props.debug), [state?.theme, themeManager, props.deopt, props.debug]);
return process.env.NODE_ENV === "development" && props.debug === "verbose" && (console.groupCollapsed(` \u{1F539} [${themeManager?.id}] useTheme =>`, state?.name), console.info("returning state", changedThemeState, "from props", props), console.groupEnd()), [changedThemeState, themeProxied];

@@ -104,3 +104,3 @@ };

), useChangeThemeEffect = (props, isRoot = !1, keys, shouldUpdate) => {
const { disable } = props, parentManagerId = useContext(ThemeManagerIDContext), parentManager = getThemeManager(parentManagerId);
const { disable } = props, parentManagerId = React.useContext(ThemeManagerIDContext), parentManager = getThemeManager(parentManagerId);
if (!isRoot && !parentManager || disable)

@@ -112,3 +112,3 @@ return {

};
const [themeState, setThemeState] = useState(createState), { state, mounted, isNewTheme, themeManager, inversed } = themeState, isInversingOnMount = !!(!themeState.mounted && props.inverse);
const [themeState, setThemeState] = React.useState(createState), { state, mounted, isNewTheme, themeManager, inversed } = themeState, isInversingOnMount = !!(!themeState.mounted && props.inverse);
function getShouldUpdateTheme(manager = themeManager, nextState, prevState = state, forceShouldChange = !1) {

@@ -122,3 +122,3 @@ const forceUpdate = shouldUpdate?.();

}
if (isServer || (useEffect(() => {
if (isServer || (React.useEffect(() => {
if (!themeManager) return;

@@ -161,3 +161,3 @@ if (props.inverse && !mounted) {

mounted
]), process.env.NODE_ENV === "development" && props.debug !== "profile" && useEffect(() => (globalThis.TamaguiThemeManagers ??= /* @__PURE__ */ new Set(), globalThis.TamaguiThemeManagers.add(themeManager), () => {
]), process.env.NODE_ENV === "development" && props.debug !== "profile" && React.useEffect(() => (globalThis.TamaguiThemeManagers ??= /* @__PURE__ */ new Set(), globalThis.TamaguiThemeManagers.add(themeManager), () => {
globalThis.TamaguiThemeManagers.delete(themeManager);

@@ -164,0 +164,0 @@ }), [themeManager])), isWeb && isInversingOnMount)

@@ -0,3 +1,3 @@

import React from "react";
import { isClient, isIos, isServer, isWeb } from "@tamagui/constants";
import { useContext, useEffect, useMemo, useRef, useState } from "react";
import { getConfig, getSetting } from "../config";

@@ -114,3 +114,3 @@ import { getVariable } from "../createVariable";

}, useThemeWithState = function(props) {
var keys = useRef([]), changedThemeState = useChangeThemeEffect(props, !1, keys.current, isServer ? void 0 : function() {
var keys = React.useRef([]), changedThemeState = useChangeThemeEffect(props, !1, keys.current, isServer ? void 0 : function() {
var _props_shouldUpdate, _props_shouldUpdate1, next = (_props_shouldUpdate1 = (_props_shouldUpdate = props.shouldUpdate) === null || _props_shouldUpdate === void 0 ? void 0 : _props_shouldUpdate.call(props)) !== null && _props_shouldUpdate1 !== void 0 ? _props_shouldUpdate1 : keys.current.length > 0 ? !0 : void 0;

@@ -129,3 +129,3 @@ if (process.env.NODE_ENV === "development" && typeof props.debug == "string" && props.debug !== "profile") {

If this is intended and you are using Tamagui without any themes, you can disable this warning by setting the environment variable TAMAGUI_DISABLE_NO_THEME_WARNING=1`)));
var themeProxied = useMemo(function() {
var themeProxied = React.useMemo(function() {
return !themeManager || !(state != null && state.theme) ? {} : getThemeProxied(state, props.deopt, themeManager, keys.current, props.debug);

@@ -280,3 +280,3 @@ }, [

return response;
}, disable = props.disable, parentManagerId = useContext(ThemeManagerIDContext), parentManager = getThemeManager(parentManagerId);
}, disable = props.disable, parentManagerId = React.useContext(ThemeManagerIDContext), parentManager = getThemeManager(parentManagerId);
if (!isRoot && !parentManager || disable)

@@ -288,4 +288,4 @@ return {

};
var _useState = _sliced_to_array(useState(createState), 2), themeState = _useState[0], setThemeState = _useState[1], state = themeState.state, mounted = themeState.mounted, isNewTheme = themeState.isNewTheme, themeManager = themeState.themeManager, inversed = themeState.inversed, isInversingOnMount = !!(!themeState.mounted && props.inverse);
return isServer || (useEffect(function() {
var _React_useState = _sliced_to_array(React.useState(createState), 2), themeState = _React_useState[0], setThemeState = _React_useState[1], state = themeState.state, mounted = themeState.mounted, isNewTheme = themeState.isNewTheme, themeManager = themeState.themeManager, inversed = themeState.inversed, isInversingOnMount = !!(!themeState.mounted && props.inverse);
return isServer || (React.useEffect(function() {
if (themeManager) {

@@ -331,3 +331,3 @@ if (props.inverse && !mounted) {

mounted
]), process.env.NODE_ENV === "development" && props.debug !== "profile" && useEffect(function() {
]), process.env.NODE_ENV === "development" && props.debug !== "profile" && React.useEffect(function() {
var _globalThis, _TamaguiThemeManagers, _;

@@ -334,0 +334,0 @@ return (_ = (_globalThis = globalThis)[_TamaguiThemeManagers = "TamaguiThemeManagers"]) !== null && _ !== void 0 || (_globalThis[_TamaguiThemeManagers] = /* @__PURE__ */ new Set()), globalThis.TamaguiThemeManagers.add(themeManager), function() {

@@ -0,7 +1,7 @@

import React from "react";
import { useIsomorphicLayoutEffect } from "@tamagui/constants";
import { useContext, useState } from "react";
import { ThemeManagerIDContext } from "../helpers/ThemeManagerContext";
import { getThemeManager } from "./useTheme";
function useThemeName(opts) {
const manager = getThemeManager(useContext(ThemeManagerIDContext)), [name, setName] = useState(manager?.state.name || "");
const manager = getThemeManager(React.useContext(ThemeManagerIDContext)), [name, setName] = React.useState(manager?.state.name || "");
return useIsomorphicLayoutEffect(() => {

@@ -8,0 +8,0 @@ if (manager)

@@ -0,3 +1,3 @@

import React from "react";
import { useIsomorphicLayoutEffect } from "@tamagui/constants";
import { useContext, useState } from "react";
import { ThemeManagerIDContext } from "../helpers/ThemeManagerContext";

@@ -47,3 +47,3 @@ import { getThemeManager } from "./useTheme";

function useThemeName(opts) {
var manager = getThemeManager(useContext(ThemeManagerIDContext)), _useState = _sliced_to_array(useState((manager == null ? void 0 : manager.state.name) || ""), 2), name = _useState[0], setName = _useState[1];
var manager = getThemeManager(React.useContext(ThemeManagerIDContext)), _React_useState = _sliced_to_array(React.useState((manager == null ? void 0 : manager.state.name) || ""), 2), name = _React_useState[0], setName = _React_useState[1];
return useIsomorphicLayoutEffect(function() {

@@ -50,0 +50,0 @@ if (manager)

@@ -0,1 +1,2 @@

import "react";
var hooks = {};

@@ -2,0 +3,0 @@ function setupHooks(next) {

@@ -1,6 +0,6 @@

import { useContext } from "react";
import React from "react";
import { ComponentContext } from "../contexts/ComponentContext";
import { jsx } from "react/jsx-runtime";
const Configuration = (props) => {
const current = useContext(ComponentContext);
const current = React.useContext(ComponentContext);
return /* @__PURE__ */ jsx(ComponentContext.Provider, { ...current, ...props });

@@ -7,0 +7,0 @@ };

import { jsx as _jsx } from "react/jsx-runtime";
import { useContext } from "react";
import React from "react";
import { ComponentContext } from "../contexts/ComponentContext";

@@ -24,3 +24,3 @@ function _define_property(obj, key, value) {

var Configuration = function(props) {
var current = useContext(ComponentContext);
var current = React.useContext(ComponentContext);
return /* @__PURE__ */ _jsx(ComponentContext.Provider, _object_spread({}, current, props));

@@ -27,0 +27,0 @@ };

import { jsx as _jsx } from "react/jsx-runtime";
import { useMemo } from "react";
import React from "react";
import { ComponentContext } from "../contexts/ComponentContext";

@@ -24,3 +24,3 @@ function _object_without_properties(source, excluded) {

"children"
]), language = useMemo(function() {
]), language = React.useMemo(function() {
return props;

@@ -27,0 +27,0 @@ }, [

@@ -0,3 +1,3 @@

import React from "react";
import { isClient, isWeb, useIsomorphicLayoutEffect } from "@tamagui/constants";
import { useEffect, useState } from "react";
import { ComponentContext } from "../contexts/ComponentContext";

@@ -39,4 +39,4 @@ import { useDidHydrateOnceRoot } from "../hooks/useDidHydrateOnce";

function UnmountedClassName(props) {
const [mounted, setMounted] = useState(!1);
return useEffect(() => {
const [mounted, setMounted] = React.useState(!1);
return React.useEffect(() => {
setMounted(!0);

@@ -43,0 +43,0 @@ }, []), isWeb ? /* @__PURE__ */ jsx("span", { style: { display: "contents" }, className: mounted ? "" : "t_unmounted", children: props.children }) : props.children;

import { jsx as _jsx } from "react/jsx-runtime";
import React from "react";
import { isClient, isWeb, useIsomorphicLayoutEffect } from "@tamagui/constants";
import { useEffect, useState } from "react";
import { ComponentContext } from "../contexts/ComponentContext";

@@ -77,4 +77,4 @@ import { useDidHydrateOnceRoot } from "../hooks/useDidHydrateOnce";

function UnmountedClassName(props) {
var _useState = _sliced_to_array(useState(!1), 2), mounted = _useState[0], setMounted = _useState[1];
return useEffect(function() {
var _React_useState = _sliced_to_array(React.useState(!1), 2), mounted = _React_useState[0], setMounted = _React_useState[1];
return React.useEffect(function() {
setMounted(!0);

@@ -81,0 +81,0 @@ }, []), isWeb ? /* @__PURE__ */ _jsx("span", {

@@ -0,4 +1,4 @@

import React from "react";
import { useDidFinishSSR } from "@tamagui/use-did-finish-ssr";
import { useForceUpdate } from "@tamagui/use-force-update";
import { useEffect, useId, useState } from "react";
import { createPortal } from "react-dom";

@@ -13,4 +13,4 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";

if (process.env.NODE_ENV === "development") {
const isHydrated = useDidFinishSSR(), [onChangeCount, setOnChangeCount] = useState(0), rerender = useForceUpdate(), id = useId();
return process.env.NODE_ENV === "development" && typeof document < "u" && (node || (node = document.createElement("div"), node.style.height = "200px", node.style.overflowY = "scroll", node.style.position = "fixed", node.style.zIndex = 1e7, node.style.bottom = "30px", node.style.left = "30px", node.style.right = "30px", node.style.display = "flex", node.style.border = "1px solid #888", node.style.flexDirection = "row", node.style.background = "var(--background)", document.body.appendChild(node))), useEffect(() => {
const isHydrated = useDidFinishSSR(), [onChangeCount, setOnChangeCount] = React.useState(0), rerender = useForceUpdate(), id = React.useId();
return process.env.NODE_ENV === "development" && typeof document < "u" && (node || (node = document.createElement("div"), node.style.height = "200px", node.style.overflowY = "scroll", node.style.position = "fixed", node.style.zIndex = 1e7, node.style.bottom = "30px", node.style.left = "30px", node.style.right = "30px", node.style.display = "flex", node.style.border = "1px solid #888", node.style.flexDirection = "row", node.style.background = "var(--background)", document.body.appendChild(node))), React.useEffect(() => {
themeState.themeManager?.parentManager?.onChangeTheme((name, manager) => {

@@ -22,3 +22,3 @@ setOnChangeCount((p) => ++p), console.warn(

});
}, [themeState.themeManager]), useEffect(() => {
}, [themeState.themeManager]), React.useEffect(() => {
const tm = setInterval(rerender, 1e3);

@@ -25,0 +25,0 @@ return () => clearTimeout(tm);

@@ -0,3 +1,3 @@

import React from "react";
import { isClient } from "@tamagui/constants";
import { useLayoutEffect } from "react";
import { THEME_CLASSNAME_PREFIX } from "../constants/constants";

@@ -7,3 +7,3 @@ import { Theme } from "./Theme";

import { jsx } from "react/jsx-runtime";
const ThemeProvider = (props) => (isClient && useLayoutEffect(() => {
const ThemeProvider = (props) => (isClient && React.useLayoutEffect(() => {
if (props.disableRootThemeClass) return;

@@ -10,0 +10,0 @@ const cn = `${THEME_CLASSNAME_PREFIX}${props.defaultTheme}`, target = props.themeClassNameOnRoot ?? getSetting("themeClassNameOnRoot") ? document.documentElement : document.body;

import { jsx as _jsx } from "react/jsx-runtime";
import React from "react";
import { isClient } from "@tamagui/constants";
import { useLayoutEffect } from "react";
import { THEME_CLASSNAME_PREFIX } from "../constants/constants";

@@ -8,3 +8,3 @@ import { Theme } from "./Theme";

var ThemeProvider = function(props) {
return isClient && useLayoutEffect(function() {
return isClient && React.useLayoutEffect(function() {
if (!props.disableRootThemeClass) {

@@ -11,0 +11,0 @@ var cn = "".concat(THEME_CLASSNAME_PREFIX).concat(props.defaultTheme), _props_themeClassNameOnRoot, target = ((_props_themeClassNameOnRoot = props.themeClassNameOnRoot) !== null && _props_themeClassNameOnRoot !== void 0 ? _props_themeClassNameOnRoot : getSetting("themeClassNameOnRoot")) ? document.documentElement : document.body;

{
"name": "@tamagui/web",
"version": "1.107.0",
"version": "1.108.0-1722728147390",
"source": "src/index.ts",

@@ -30,15 +30,15 @@ "main": "dist/cjs",

"dependencies": {
"@tamagui/compose-refs": "1.107.0",
"@tamagui/constants": "1.107.0",
"@tamagui/helpers": "1.107.0",
"@tamagui/normalize-css-color": "1.107.0",
"@tamagui/timer": "1.107.0",
"@tamagui/types": "1.107.0",
"@tamagui/use-did-finish-ssr": "1.107.0",
"@tamagui/use-event": "1.107.0",
"@tamagui/use-force-update": "1.107.0"
"@tamagui/compose-refs": "1.108.0-1722728147390",
"@tamagui/constants": "1.108.0-1722728147390",
"@tamagui/helpers": "1.108.0-1722728147390",
"@tamagui/normalize-css-color": "1.108.0-1722728147390",
"@tamagui/timer": "1.108.0-1722728147390",
"@tamagui/types": "1.108.0-1722728147390",
"@tamagui/use-did-finish-ssr": "1.108.0-1722728147390",
"@tamagui/use-event": "1.108.0-1722728147390",
"@tamagui/use-force-update": "1.108.0-1722728147390"
},
"devDependencies": {
"@tamagui/build": "1.107.0",
"@testing-library/react": "^14.0.0",
"@tamagui/build": "1.108.0-1722728147390",
"@testing-library/react": "^16.0.0",
"csstype": "^3.0.10",

@@ -45,0 +45,0 @@ "typescript": "^5.5.2",

import { getConfig, getSetting } from '../config'
import { mediaObjectToString } from '../hooks/useMedia'
import type { IsMediaType, MediaQueries, MediaStyleObject, StyleObject } from '../types'
import { getGroupPropParts } from './getGroupPropParts'
import { getGroupPropParts, type GroupParts } from './getGroupPropParts'
import { isActivePlatform } from './isActivePlatform'

@@ -21,2 +22,27 @@ // TODO have this be used by extractMediaStyle in tamagui static

function getThemeOrGroupSelector(
name: string,
styleInner: string,
isGroup: boolean,
groupParts: GroupParts,
isTheme = false,
precedenceImportancePrefix = ''
) {
const selectorStart = styleInner.indexOf(':root')
const selectorEnd = styleInner.lastIndexOf('{')
const selector = styleInner.slice(selectorStart, selectorEnd)
const precedenceSpace = getSetting('themeClassNameOnRoot') && isTheme ? '' : ' '
const pseudoSelectorName = groupParts.pseudo
? groupPseudoToPseudoCSSMap[groupParts.pseudo] || groupParts.pseudo
: undefined
const pseudoSelector = pseudoSelectorName ? `:${pseudoSelectorName}` : ''
const presedencePrefix = `:root${precedenceImportancePrefix}${precedenceSpace}`
const mediaSelector = `.t_${isGroup ? 'group_' : ''}${name}${pseudoSelector}`
return [
selector,
`${presedencePrefix}${mediaSelector} ${selector.replace(':root', '')}`,
] as const
}
export const createMediaStyle = (

@@ -30,5 +56,4 @@ styleObject: StyleObject,

): MediaStyleObject => {
const [property, _value, identifier, _pseudo, rules] = styleObject
const conf = getConfig()
const enableMediaPropOrder = conf.settings.mediaPropOrder
const [property, , identifier, , rules] = styleObject
const enableMediaPropOrder = getSetting('mediaPropOrder')
const isTheme = type === 'theme'

@@ -56,13 +81,6 @@ const isPlatform = type === 'platform'

groupMediaKey = media
const groupParts = getGroupPropParts(mediaKeyIn)
if (isGroup) {
containerName = name
}
const groupClassName = (isGroup ? 'group_' : '') + name
const selectorStart = styleInner.indexOf(':root')
const selectorEnd = styleInner.lastIndexOf('{')
const selector = styleInner.slice(selectorStart, selectorEnd)
const precedenceSpace = getSetting('themeClassNameOnRoot') && isTheme ? '' : ' '
const pseudoSelectorName = pseudo
? groupPseudoToPseudoCSSMap[pseudo] || pseudo
: undefined
if (pseudo === 'press') {

@@ -74,9 +92,10 @@ specificity += 2

}
const pseudoSelector = pseudoSelectorName ? `:${pseudoSelectorName}` : ''
const presedencePrefix = `:root${specifities[specificity]}${precedenceSpace}`
const mediaSelector = `.t_${groupClassName}${pseudoSelector}`
const nextSelector = `${presedencePrefix}${mediaSelector} ${selector.replace(
':root',
''
)}`
const [selector, nextSelector] = getThemeOrGroupSelector(
name,
styleInner,
isGroup,
groupParts,
isTheme,
specifities[specificity]
)
// const selectors = `${nextSelector}, :root${nextSelector}`

@@ -136,3 +155,3 @@ // add back in the { we used to split

styleRule = `@supports (contain: ${
conf.settings.webContainerType || 'inline-size'
getSetting('webContainerType') || 'inline-size'
}) {${styleRule}}`

@@ -139,0 +158,0 @@ }

import { getMedia } from '../hooks/useMedia'
export function getGroupPropParts(groupProp: string) {
export type GroupParts = { name: string; pseudo?: string; media?: string }
export function getGroupPropParts(groupProp: string): GroupParts {
const mediaQueries = getMedia()

@@ -5,0 +7,0 @@ const [_, name, part3, part4] = groupProp.split('-')

@@ -17,2 +17,3 @@ /**

import { transformsToString } from './transformsToString'
import { isMediaKey } from '../hooks/useMedia'

@@ -30,2 +31,10 @@ // refactor this file away next...

}
} else if (isMediaKey(key)) {
for (const subKey in val) {
const so = getStyleObject(val, subKey)
if (so) {
so[0] = key // set the property to be eg $platform-web so we can use it above
out.push(so)
}
}
} else {

@@ -32,0 +41,0 @@ const so = getStyleObject(style, key)

import { normalizeValueWithProperty } from './normalizeValueWithProperty'
// mutates...
export function transformsToString(transforms: Object[]) {

@@ -6,0 +4,0 @@ return transforms

@@ -1,2 +0,2 @@

import { RefObject } from 'react'
import React from 'react'

@@ -3,0 +3,0 @@ import type { GetStyleResult, StaticConfig, TamaguiComponentStateRef } from './types'

@@ -0,3 +1,4 @@

import React from 'react';
/** internal: this is for tamagui babel plugin usage only */
export declare const _withStableStyle: (Component: any, styleProvider: (theme: any, expressions: any[]) => Object) => import("react").ForwardRefExoticComponent<Omit<any, "ref"> & import("react").RefAttributes<unknown>>;
export declare const _withStableStyle: (Component: any, styleProvider: (theme: any, expressions: any[]) => Object) => React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
//# sourceMappingURL=_withStableStyle.d.ts.map

@@ -1,2 +0,2 @@

import { type Context, type ProviderExoticComponent, type ReactNode } from 'react';
import type { Context, ProviderExoticComponent, ReactNode } from 'react';
export type StyledContext<Props extends Object = any> = Omit<Context<Props>, 'Provider'> & {

@@ -3,0 +3,0 @@ context: Context<Props>;

@@ -1,6 +0,7 @@

export declare function getGroupPropParts(groupProp: string): {
export type GroupParts = {
name: string;
pseudo: "hover" | "press" | "focus" | "disabled" | undefined;
media: string | undefined;
pseudo?: string;
media?: string;
};
export declare function getGroupPropParts(groupProp: string): GroupParts;
//# sourceMappingURL=getGroupPropParts.d.ts.map

@@ -0,1 +1,2 @@

import React from 'react';
import type { StaticConfig } from '../types';

@@ -2,0 +3,0 @@ export declare const isTamaguiElement: (child: any, name?: string) => child is React.ReactElement<any> & {

@@ -1,2 +0,3 @@

export declare const ThemeManagerIDContext: import("react").Context<number>;
import React from 'react';
export declare const ThemeManagerIDContext: React.Context<number>;
//# sourceMappingURL=ThemeManagerContext.d.ts.map

@@ -0,1 +1,2 @@

import React from 'react';
import type { AnimationDriver } from '../types';

@@ -2,0 +3,0 @@ interface ConfigurationProps {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc