@tamagui/web 1.130.7 → 1.131.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/Tamagui.cjs +3 -3
- package/dist/cjs/_withStableStyle.cjs +1 -1
- package/dist/cjs/config.cjs +2 -2
- package/dist/cjs/contexts/ComponentContext.cjs +1 -1
- package/dist/cjs/createComponent.cjs +26 -25
- package/dist/cjs/createComponent.js +6 -5
- package/dist/cjs/createComponent.js.map +1 -1
- package/dist/cjs/createComponent.native.js +2 -1
- package/dist/cjs/createComponent.native.js.map +1 -1
- package/dist/cjs/createTamagui.cjs +11 -11
- package/dist/cjs/createTokens.cjs +1 -1
- package/dist/cjs/createVariable.cjs +1 -1
- package/dist/cjs/createVariables.cjs +1 -1
- package/dist/cjs/helpers/createMediaStyle.cjs +3 -3
- package/dist/cjs/helpers/createStyledContext.cjs +23 -15
- package/dist/cjs/helpers/createStyledContext.js +8 -8
- package/dist/cjs/helpers/createStyledContext.js.map +1 -1
- package/dist/cjs/helpers/createStyledContext.native.js +14 -9
- package/dist/cjs/helpers/createStyledContext.native.js.map +2 -2
- package/dist/cjs/helpers/expandStyle.cjs +2 -2
- package/dist/cjs/helpers/expandStyles.cjs +1 -1
- package/dist/cjs/helpers/getCSSStylesAtomic.cjs +7 -7
- package/dist/cjs/helpers/getExpandedShorthands.cjs +1 -1
- package/dist/cjs/helpers/getGroupPropParts.cjs +1 -1
- package/dist/cjs/helpers/getShorthandValue.cjs +1 -1
- package/dist/cjs/helpers/getSplitStyles.cjs +20 -20
- package/dist/cjs/helpers/getSplitStyles.js.map +1 -1
- package/dist/cjs/helpers/getSplitStyles.native.js.map +1 -1
- package/dist/cjs/helpers/getThemeCSSRules.cjs +5 -5
- package/dist/cjs/helpers/getVariantExtras.cjs +1 -1
- package/dist/cjs/helpers/insertStyleRule.cjs +1 -1
- package/dist/cjs/helpers/isTamaguiElement.cjs +1 -1
- package/dist/cjs/helpers/log.cjs +1 -1
- package/dist/cjs/helpers/mergeProps.cjs +2 -2
- package/dist/cjs/helpers/normalizeShadow.cjs +2 -2
- package/dist/cjs/helpers/normalizeStyle.cjs +5 -5
- package/dist/cjs/helpers/propMapper.cjs +8 -8
- package/dist/cjs/helpers/registerCSSVariable.cjs +1 -1
- package/dist/cjs/helpers/setElementProps.cjs +1 -1
- package/dist/cjs/helpers/skipProps.cjs +1 -1
- package/dist/cjs/helpers/subscribeToContextGroup.cjs +1 -1
- package/dist/cjs/helpers/themeable.cjs +1 -1
- package/dist/cjs/helpers/themes.cjs +1 -1
- package/dist/cjs/helpers/transformsToString.cjs +1 -1
- package/dist/cjs/hooks/getThemeProxied.cjs +4 -4
- package/dist/cjs/hooks/useComponentState.cjs +3 -3
- package/dist/cjs/hooks/useConfiguration.cjs +1 -1
- package/dist/cjs/hooks/useDisableSSR.cjs +1 -1
- package/dist/cjs/hooks/useMedia.cjs +4 -4
- package/dist/cjs/hooks/useMedia.js +1 -1
- package/dist/cjs/hooks/useMedia.js.map +1 -1
- package/dist/cjs/hooks/useMedia.native.js +1 -1
- package/dist/cjs/hooks/useMedia.native.js.map +1 -1
- package/dist/cjs/hooks/useProps.cjs +9 -9
- package/dist/cjs/hooks/useTheme.cjs +2 -2
- package/dist/cjs/hooks/useThemeName.cjs +1 -1
- package/dist/cjs/hooks/useThemeState.cjs +2 -2
- package/dist/cjs/index.cjs +63 -63
- package/dist/cjs/insertFont.cjs +5 -5
- package/dist/cjs/styled.cjs +3 -3
- package/dist/cjs/types.cjs +2 -2
- package/dist/cjs/views/Configuration.cjs +1 -1
- package/dist/cjs/views/Stack.cjs +2 -2
- package/dist/cjs/views/TamaguiProvider.cjs +5 -5
- package/dist/cjs/views/Text.cjs +1 -1
- package/dist/cjs/views/Theme.cjs +5 -5
- package/dist/cjs/views/ThemeDebug.cjs +1 -1
- package/dist/cjs/views/ThemeProvider.cjs +3 -3
- package/dist/cjs/views/View.cjs +2 -2
- package/dist/esm/createComponent.js +6 -5
- package/dist/esm/createComponent.js.map +1 -1
- package/dist/esm/createComponent.mjs +5 -4
- package/dist/esm/createComponent.mjs.map +1 -1
- package/dist/esm/createComponent.native.js +2 -1
- package/dist/esm/createComponent.native.js.map +1 -1
- package/dist/esm/helpers/createStyledContext.js +9 -9
- package/dist/esm/helpers/createStyledContext.js.map +1 -1
- package/dist/esm/helpers/createStyledContext.mjs +23 -15
- package/dist/esm/helpers/createStyledContext.mjs.map +1 -1
- package/dist/esm/helpers/createStyledContext.native.js +24 -11
- package/dist/esm/helpers/createStyledContext.native.js.map +1 -1
- package/dist/esm/helpers/getSplitStyles.js.map +1 -1
- package/dist/esm/helpers/getSplitStyles.mjs.map +1 -1
- package/dist/esm/helpers/getSplitStyles.native.js.map +1 -1
- package/dist/esm/hooks/useMedia.js +1 -1
- package/dist/esm/hooks/useMedia.js.map +1 -1
- package/dist/esm/hooks/useMedia.mjs +1 -1
- package/dist/esm/hooks/useMedia.mjs.map +1 -1
- package/dist/esm/hooks/useMedia.native.js +1 -1
- package/dist/esm/hooks/useMedia.native.js.map +1 -1
- package/package.json +12 -12
- package/src/contexts/ComponentContext.tsx +1 -1
- package/src/createComponent.tsx +18 -9
- package/src/helpers/createStyledContext.tsx +24 -7
- package/src/helpers/getSplitStyles.tsx +1 -5
- package/src/hooks/useMedia.tsx +1 -2
- package/types/contexts/ComponentContext.d.ts.map +1 -1
- package/types/createComponent.d.ts.map +1 -1
- package/types/helpers/createStyledContext.d.ts +3 -3
- package/types/helpers/createStyledContext.d.ts.map +1 -1
- package/types/helpers/getSplitStyles.d.ts +1 -1
- package/types/helpers/getSplitStyles.d.ts.map +1 -1
- package/types/hooks/useMedia.d.ts.map +1 -1
|
@@ -23,7 +23,7 @@ __export(transformsToString_exports, {
|
|
|
23
23
|
transformsToString: () => transformsToString
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(transformsToString_exports);
|
|
26
|
-
var import_normalizeValueWithProperty = require("./normalizeValueWithProperty");
|
|
26
|
+
var import_normalizeValueWithProperty = require("./normalizeValueWithProperty.cjs");
|
|
27
27
|
function transformsToString(transforms) {
|
|
28
28
|
return transforms.map(
|
|
29
29
|
// { scale: 2 } => 'scale(2)'
|
|
@@ -24,10 +24,10 @@ __export(getThemeProxied_exports, {
|
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(getThemeProxied_exports);
|
|
26
26
|
var import_constants = require("@tamagui/constants"),
|
|
27
|
-
import_config = require("../config"),
|
|
28
|
-
import_createVariable = require("../createVariable"),
|
|
29
|
-
import_doesRootSchemeMatchSystem = require("./doesRootSchemeMatchSystem"),
|
|
30
|
-
import_getDynamicVal = require("../helpers/getDynamicVal");
|
|
27
|
+
import_config = require("../config.cjs"),
|
|
28
|
+
import_createVariable = require("../createVariable.cjs"),
|
|
29
|
+
import_doesRootSchemeMatchSystem = require("./doesRootSchemeMatchSystem.cjs"),
|
|
30
|
+
import_getDynamicVal = require("../helpers/getDynamicVal.cjs");
|
|
31
31
|
const cache = /* @__PURE__ */new Map();
|
|
32
32
|
let curKeys, curProps, curState;
|
|
33
33
|
const emptyObject = {};
|
|
@@ -27,9 +27,9 @@ var import_constants = require("@tamagui/constants"),
|
|
|
27
27
|
import_is_equal_shallow = require("@tamagui/is-equal-shallow"),
|
|
28
28
|
import_use_did_finish_ssr = require("@tamagui/use-did-finish-ssr"),
|
|
29
29
|
import_react = require("react"),
|
|
30
|
-
import_defaultComponentState = require("../defaultComponentState"),
|
|
31
|
-
import_isObj = require("../helpers/isObj"),
|
|
32
|
-
import_log = require("../helpers/log");
|
|
30
|
+
import_defaultComponentState = require("../defaultComponentState.cjs"),
|
|
31
|
+
import_isObj = require("../helpers/isObj.cjs"),
|
|
32
|
+
import_log = require("../helpers/log.cjs");
|
|
33
33
|
const useComponentState = (props, animationDriver, staticConfig, config) => {
|
|
34
34
|
const isHydrated = (0, import_use_did_finish_ssr.useDidFinishSSR)(),
|
|
35
35
|
needsHydration = !(0, import_use_did_finish_ssr.useIsClientOnly)(),
|
|
@@ -35,5 +35,5 @@ __export(useConfiguration_exports, {
|
|
|
35
35
|
});
|
|
36
36
|
module.exports = __toCommonJS(useConfiguration_exports);
|
|
37
37
|
var import_react = __toESM(require("react")),
|
|
38
|
-
import_ComponentContext = require("../contexts/ComponentContext");
|
|
38
|
+
import_ComponentContext = require("../contexts/ComponentContext.cjs");
|
|
39
39
|
const useConfiguration = () => import_react.default.useContext(import_ComponentContext.ComponentContext);
|
|
@@ -23,7 +23,7 @@ __export(useDisableSSR_exports, {
|
|
|
23
23
|
getDisableSSR: () => getDisableSSR
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(useDisableSSR_exports);
|
|
26
|
-
var import_config = require("../config");
|
|
26
|
+
var import_config = require("../config.cjs");
|
|
27
27
|
function getDisableSSR(componentContext) {
|
|
28
28
|
return componentContext?.disableSSR ?? (0, import_config.getSetting)("disableSSR");
|
|
29
29
|
}
|
|
@@ -41,9 +41,9 @@ __export(useMedia_exports, {
|
|
|
41
41
|
module.exports = __toCommonJS(useMedia_exports);
|
|
42
42
|
var import_constants = require("@tamagui/constants"),
|
|
43
43
|
import_react = require("react"),
|
|
44
|
-
import_config = require("../config"),
|
|
45
|
-
import_matchMedia = require("../helpers/matchMedia"),
|
|
46
|
-
import_pseudoDescriptors = require("../helpers/pseudoDescriptors");
|
|
44
|
+
import_config = require("../config.cjs"),
|
|
45
|
+
import_matchMedia = require("../helpers/matchMedia.cjs"),
|
|
46
|
+
import_pseudoDescriptors = require("../helpers/pseudoDescriptors.cjs");
|
|
47
47
|
let mediaState =
|
|
48
48
|
// development only safeguard
|
|
49
49
|
process.env.NODE_ENV === "development" ? new Proxy({}, {
|
|
@@ -139,7 +139,7 @@ function useMedia(cc, debug) {
|
|
|
139
139
|
});
|
|
140
140
|
const {
|
|
141
141
|
keys,
|
|
142
|
-
lastState =
|
|
142
|
+
lastState = mediaState
|
|
143
143
|
} = internalRef.current;
|
|
144
144
|
keys.size && keys.clear();
|
|
145
145
|
const state = (0, import_react.useSyncExternalStore)(subscribe, () => {
|
|
@@ -118,7 +118,7 @@ function useMedia(cc, debug) {
|
|
|
118
118
|
internalRef.current || (internalRef.current = {
|
|
119
119
|
keys: /* @__PURE__ */ new Set()
|
|
120
120
|
});
|
|
121
|
-
const { keys, lastState =
|
|
121
|
+
const { keys, lastState = mediaState } = internalRef.current;
|
|
122
122
|
keys.size && keys.clear();
|
|
123
123
|
const state = (0, import_react.useSyncExternalStore)(
|
|
124
124
|
subscribe,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/hooks/useMedia.tsx"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAAgC,+BAChC,eAA6C,kBAC7C,gBAAsC,sBACtC,oBAA2B,kCAC3B,2BAAkC;AAc3B,IAAI;AAAA;AAAA,EAET,QAAQ,IAAI,aAAa,gBACrB,IAAI;AAAA,IACF,CAAC;AAAA,IACD;AAAA,MACE,IAAI,QAAQ,KAAK;AACf,YACE,OAAO,OAAQ,YACf,IAAI,CAAC,MAAM;AAAA,QAEX,IAAI,CAAC,MAAM;AAEX,gBAAM,IAAI,MAAM,yCAAyC,GAAG,EAAE;AAEhE,eAAO,QAAQ,IAAI,QAAQ,GAAG;AAAA,MAChC;AAAA,IACF;AAAA,EACF,IACC,CAAC;AAAA;AAED,MAAM,mBAAiC,CAAC,GAElC,WAAW,MAAM,YAEjB,YAAY,oBAAI,IAAY,GAEnC,gBAAgB,6BAET,aAAa,CAAC,QAA6B;AACtD,MAAI,UAAU,IAAI,GAAG,EAAG,QAAO;AAC/B,MAAI,IAAI,CAAC,MAAM,KAAK;AAClB,UAAM,QAAQ,IAAI,MAAM,aAAa;AACrC,QAAI,MAAO,QAAO,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;AACrE;AAEA,SAAS,cAAc,KAAa;AAClC,SAAO,IAAI,QAAQ,UAAU,CAAC,MAAM,IAAI,EAAE,YAAY,CAAC,EAAE,EAAE,YAAY;AACzE;AAEA,MAAM,QAAQ,oBAAI,QAAqB,GACjC,wBAAgD,CAAC;AAEhD,SAAS,oBAAoB,OAAkC,KAAc;AAClF,MAAI,OAAO,SAAU;AACnB,WAAO;AAET,MAAI,MAAM,IAAI,KAAK;AACjB,WAAO,MAAM,IAAI,KAAK;AAExB,QAAM,MAAM,OAAO,QAAQ,KAAK,EAC7B,IAAI,CAAC,CAAC,SAAS,KAAK,OACnB,UAAU,cAAc,OAAO,GAC3B,OAAO,SAAU,WACZ,IAAI,OAAO,KAAK,KAAK,OAE1B,OAAO,SAAU,YAAY,kBAAkB,KAAK,OAAO,MAC7D,QAAQ,GAAG,KAAK,OAEX,IAAI,OAAO,KAAK,KAAK,KAC7B,EACA,KAAK,OAAO;AACf,SAAI,QACF,sBAAsB,GAAG,IAAI,MAE/B,MAAM,IAAI,OAAO,GAAG,GACb;AACT;AAEO,SAAS,gBAAgB,KAAa;AAC3C,SAAO,sBAAsB,GAAG,KAAK,oBAAoB,iBAAiB,GAAG,GAAG,GAAG;AACrF;AAEO,SAAS,cACd,KACA,YACA;AACA,QAAM,eAAe,iBAAiB,GAAG;AASzC,SARe,OAAO,KAAK,YAAY,EAAE,MAAM,CAAC,UAAU;AACxD,UAAM,cAAc,CAAC,aAAa,KAAK,GACjC,QAAQ,MAAM,WAAW,KAAK,GAC9B,UAAU,MAAM,SAAS,OAAO,GAChC,WAAW,WAAW,UAAU,UAAU,QAAQ;AAExD,WAAO,QAAQ,WAAW,cAAc,WAAW;AAAA,EACrD,CAAC;AAEH;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -124,7 +124,7 @@ function useMedia(cc, debug) {
|
|
|
124
124
|
internalRef.current || (internalRef.current = {
|
|
125
125
|
keys: /* @__PURE__ */ new Set()
|
|
126
126
|
});
|
|
127
|
-
var { keys, lastState =
|
|
127
|
+
var { keys, lastState = mediaState } = internalRef.current;
|
|
128
128
|
keys.size && keys.clear();
|
|
129
129
|
var state = (0, import_react.useSyncExternalStore)(subscribe, function() {
|
|
130
130
|
if (componentState != null && componentState.enabled)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/hooks/useMedia.tsx"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;;;uBAAgC,+BAChC,eAA6C,kBAC7C,gBAAsC,sBACtC,oBAA2B,kCAC3B,2BAAkC,yCAcvBA;;EAETC,QAAQC,IAAIC,aAAa,gBACrB,IAAIC,MACF,CAAC,GACD;IACEC,IAAIC,QAAQC,KAAG;AACb,UACE,OAAOA,OAAQ,YACfA,IAAI,CAAA,MAAO;MAEXA,IAAI,CAAA,MAAO;AAEX,cAAM,IAAIC,MAAM,yCAAyCD,GAAAA,EAAK;AAEhE,aAAOE,QAAQJ,IAAIC,QAAQC,GAAAA;IAC7B;EACF,CAAA,IAED,CAAC;GAEKG,mBAAiC,CAAC,GAElCC,WAAW,WAAA;SAAMX;GAEjBY,YAAY,oBAAIC,IAAAA,GAEvBC,gBAAgB,6BAETC,aAAa,SAACR,KAAAA;AACzB,MAAIK,UAAUI,IAAIT,GAAAA,EAAM,QAAO;AAC/B,MAAIA,IAAI,CAAA,MAAO,KAAK;AAClB,QAAMU,QAAQV,IAAIU,MAAMH,aAAAA;AACxB,QAAIG,MAAO,QAAOA,MAAM,CAAA;EAC1B;AACA,SAAO;AACT,GAGIC,WAGEC,yBAAyBC,OAAOC,KAAKC,0CAAAA,EAAmBC,QAE1DC,kBAESC,wBAAwB,SAAClB,KAAAA;AACpC,MAAIN,QAAQC,IAAIC,aAAa,iBAAiBI,IAAI,CAAA,MAAO;AACvD,UAAM,IAAIC,MAAM,eAAA;AAGlB,MAAMkB,WAAOC,yBAAAA;AACb,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O,SAASsB,gBAAgB3G,KAAW;AACzC,SAAOoG,sBAAsBpG,GAAAA,KAAQwC,oBAAoBrC,iBAAiBH,GAAAA,GAAMA,GAAAA;AAClF;AAEO,SAASyF,cACdzF,KACA4G,YAA6C;AAE7C,MAAMC,eAAe1G,iBAAiBH,GAAAA,GAChC8G,SAASjG,OAAOC,KAAK+F,YAAAA,EAAcE,MAAM,SAACV,OAAAA;AAC9C,QAAMW,cAAc,CAACH,aAAaR,KAAAA,GAC5BY,QAAQZ,MAAMa,WAAW,KAAA,GACzBC,UAAUd,MAAMe,SAAS,OAAA,GACzBC,WAAWT,WAAWO,UAAU,UAAU,QAAA;AAEhD,WAAOF,QAAQI,WAAWL,cAAcK,WAAWL;EACrD,CAAA;AACA,SAAOF;AACT;",
|
|
5
5
|
"names": ["mediaState", "process", "env", "NODE_ENV", "Proxy", "get", "target", "key", "Error", "Reflect", "mediaQueryConfig", "getMedia", "mediaKeys", "Set", "mediaKeyRegex", "isMediaKey", "has", "match", "initState", "defaultMediaImportance", "Object", "keys", "pseudoDescriptors", "length", "mediaKeysOrdered", "getMediaKeyImportance", "conf", "getConfig", "settings", "mediaPropOrder", "indexOf", "dispose", "mediaVersion", "configureMedia", "config", "media", "mediaQueryDefaultActive", "getSetting", "add", "assign", "setupMediaListeners", "unlisten", "forEach", "cb", "clear", "setupVersion", "str", "mediaObjectToString", "getMatch", "matchMedia", "addListener", "update", "removeListener", "next", "matches", "updateMediaListeners", "isWeb", "isServer", "IS_STATIC", "listeners", "States", "WeakMap", "setMediaShouldUpdate", "ref", "enabled", "cur", "set", "subscribe", "subscriber", "delete", "useMedia", "cc", "debug", "componentState", "internalRef", "useRef", "current", "lastState", "size", "state", "useSyncExternalStore", "curKeys", "console", "warn", "getServerSnapshot", "_", "disableMediaTouch", "_disableMediaTouch", "val", "getMediaState", "mediaGroups", "layout", "res", "fromEntries", "map", "mediaKey", "mediaKeyMatch", "getMediaImportanceIfMoreImportant", "styleState", "isSizeMedia", "importance", "usedKeys", "camelToHyphen", "replace", "m", "toLowerCase", "cache", "cachedMediaKeyToQuery", "query", "entries", "feature", "value", "test", "join", "mediaKeyToQuery", "dimensions", "mediaQueries", "result", "every", "expectedVal", "isMax", "startsWith", "isWidth", "endsWith", "givenVal"]
|
|
6
6
|
}
|
|
@@ -38,15 +38,15 @@ __export(useProps_exports, {
|
|
|
38
38
|
module.exports = __toCommonJS(useProps_exports);
|
|
39
39
|
var import_constants = require("@tamagui/constants"),
|
|
40
40
|
import_react = __toESM(require("react")),
|
|
41
|
-
import_config = require("../config"),
|
|
42
|
-
import_ComponentContext = require("../contexts/ComponentContext"),
|
|
43
|
-
import_GroupContext = require("../contexts/GroupContext"),
|
|
44
|
-
import_getSplitStyles = require("../helpers/getSplitStyles"),
|
|
45
|
-
import_subscribeToContextGroup = require("../helpers/subscribeToContextGroup"),
|
|
46
|
-
import_Stack = require("../views/Stack"),
|
|
47
|
-
import_useComponentState = require("./useComponentState"),
|
|
48
|
-
import_useMedia = require("./useMedia"),
|
|
49
|
-
import_useTheme = require("./useTheme");
|
|
41
|
+
import_config = require("../config.cjs"),
|
|
42
|
+
import_ComponentContext = require("../contexts/ComponentContext.cjs"),
|
|
43
|
+
import_GroupContext = require("../contexts/GroupContext.cjs"),
|
|
44
|
+
import_getSplitStyles = require("../helpers/getSplitStyles.cjs"),
|
|
45
|
+
import_subscribeToContextGroup = require("../helpers/subscribeToContextGroup.cjs"),
|
|
46
|
+
import_Stack = require("../views/Stack.cjs"),
|
|
47
|
+
import_useComponentState = require("./useComponentState.cjs"),
|
|
48
|
+
import_useMedia = require("./useMedia.cjs"),
|
|
49
|
+
import_useTheme = require("./useTheme.cjs");
|
|
50
50
|
function useProps(props, opts) {
|
|
51
51
|
const [propsOut, styleOut] = usePropsAndStyle(props, {
|
|
52
52
|
...opts,
|
|
@@ -25,8 +25,8 @@ __export(useTheme_exports, {
|
|
|
25
25
|
});
|
|
26
26
|
module.exports = __toCommonJS(useTheme_exports);
|
|
27
27
|
var import_react = require("react"),
|
|
28
|
-
import_getThemeProxied = require("./getThemeProxied"),
|
|
29
|
-
import_useThemeState = require("./useThemeState");
|
|
28
|
+
import_getThemeProxied = require("./getThemeProxied.cjs"),
|
|
29
|
+
import_useThemeState = require("./useThemeState.cjs");
|
|
30
30
|
const useTheme = (props = {}) => {
|
|
31
31
|
const [theme] = useThemeWithState(props);
|
|
32
32
|
return theme;
|
|
@@ -23,7 +23,7 @@ __export(useThemeName_exports, {
|
|
|
23
23
|
useThemeName: () => useThemeName
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(useThemeName_exports);
|
|
26
|
-
var import_useThemeState = require("./useThemeState");
|
|
26
|
+
var import_useThemeState = require("./useThemeState.cjs");
|
|
27
27
|
const forceUpdateState = {
|
|
28
28
|
forceClassName: !0,
|
|
29
29
|
deopt: !0,
|
|
@@ -30,8 +30,8 @@ __export(useThemeState_exports, {
|
|
|
30
30
|
module.exports = __toCommonJS(useThemeState_exports);
|
|
31
31
|
var import_constants = require("@tamagui/constants"),
|
|
32
32
|
import_react = require("react"),
|
|
33
|
-
import_config = require("../config"),
|
|
34
|
-
import_constants2 = require("../constants/constants");
|
|
33
|
+
import_config = require("../config.cjs"),
|
|
34
|
+
import_constants2 = require("../constants/constants.cjs");
|
|
35
35
|
const ThemeStateContext = (0, import_react.createContext)(""),
|
|
36
36
|
allListeners = /* @__PURE__ */new Map(),
|
|
37
37
|
listenersByParent = {},
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -43,72 +43,72 @@ __export(index_exports, {
|
|
|
43
43
|
useMedia: () => import_useMedia.useMedia
|
|
44
44
|
});
|
|
45
45
|
module.exports = __toCommonJS(index_exports);
|
|
46
|
-
__reExport(index_exports, require("./Tamagui"), module.exports);
|
|
47
|
-
__reExport(index_exports, require("./createComponent"), module.exports);
|
|
48
|
-
__reExport(index_exports, require("./createShorthands"), module.exports);
|
|
49
|
-
__reExport(index_exports, require("./createTheme"), module.exports);
|
|
50
|
-
__reExport(index_exports, require("./createTamagui"), module.exports);
|
|
51
|
-
__reExport(index_exports, require("./createFont"), module.exports);
|
|
52
|
-
__reExport(index_exports, require("./createTokens"), module.exports);
|
|
53
|
-
__reExport(index_exports, require("./createVariable"), module.exports);
|
|
54
|
-
__reExport(index_exports, require("./createVariables"), module.exports);
|
|
55
|
-
__reExport(index_exports, require("./insertFont"), module.exports);
|
|
56
|
-
__reExport(index_exports, require("./styled"), module.exports);
|
|
57
|
-
__reExport(index_exports, require("./setupReactNative"), module.exports);
|
|
58
|
-
__reExport(index_exports, require("./interfaces/GetRef"), module.exports);
|
|
59
|
-
var import_config = require("./config"),
|
|
60
|
-
import_insertStyleRule = require("./helpers/insertStyleRule");
|
|
61
|
-
__reExport(index_exports, require("./constants/constants"), module.exports);
|
|
62
|
-
__reExport(index_exports, require("./contexts/ComponentContext"), module.exports);
|
|
63
|
-
__reExport(index_exports, require("./contexts/GroupContext"), module.exports);
|
|
64
|
-
__reExport(index_exports, require("./_withStableStyle"), module.exports);
|
|
65
|
-
__reExport(index_exports, require("./helpers/createMediaStyle"), module.exports);
|
|
66
|
-
__reExport(index_exports, require("./helpers/getShorthandValue"), module.exports);
|
|
46
|
+
__reExport(index_exports, require("./Tamagui.cjs"), module.exports);
|
|
47
|
+
__reExport(index_exports, require("./createComponent.cjs"), module.exports);
|
|
48
|
+
__reExport(index_exports, require("./createShorthands.cjs"), module.exports);
|
|
49
|
+
__reExport(index_exports, require("./createTheme.cjs"), module.exports);
|
|
50
|
+
__reExport(index_exports, require("./createTamagui.cjs"), module.exports);
|
|
51
|
+
__reExport(index_exports, require("./createFont.cjs"), module.exports);
|
|
52
|
+
__reExport(index_exports, require("./createTokens.cjs"), module.exports);
|
|
53
|
+
__reExport(index_exports, require("./createVariable.cjs"), module.exports);
|
|
54
|
+
__reExport(index_exports, require("./createVariables.cjs"), module.exports);
|
|
55
|
+
__reExport(index_exports, require("./insertFont.cjs"), module.exports);
|
|
56
|
+
__reExport(index_exports, require("./styled.cjs"), module.exports);
|
|
57
|
+
__reExport(index_exports, require("./setupReactNative.cjs"), module.exports);
|
|
58
|
+
__reExport(index_exports, require("./interfaces/GetRef.cjs"), module.exports);
|
|
59
|
+
var import_config = require("./config.cjs"),
|
|
60
|
+
import_insertStyleRule = require("./helpers/insertStyleRule.cjs");
|
|
61
|
+
__reExport(index_exports, require("./constants/constants.cjs"), module.exports);
|
|
62
|
+
__reExport(index_exports, require("./contexts/ComponentContext.cjs"), module.exports);
|
|
63
|
+
__reExport(index_exports, require("./contexts/GroupContext.cjs"), module.exports);
|
|
64
|
+
__reExport(index_exports, require("./_withStableStyle.cjs"), module.exports);
|
|
65
|
+
__reExport(index_exports, require("./helpers/createMediaStyle.cjs"), module.exports);
|
|
66
|
+
__reExport(index_exports, require("./helpers/getShorthandValue.cjs"), module.exports);
|
|
67
67
|
__reExport(index_exports, require("@tamagui/is-equal-shallow"), module.exports);
|
|
68
|
-
var import_insertStyleRule2 = require("./helpers/insertStyleRule");
|
|
69
|
-
__reExport(index_exports, require("./helpers/createStyledContext"), module.exports);
|
|
70
|
-
__reExport(index_exports, require("./helpers/expandStyles"), module.exports);
|
|
71
|
-
__reExport(index_exports, require("./helpers/getExpandedShorthands"), module.exports);
|
|
72
|
-
__reExport(index_exports, require("./helpers/getSplitStyles"), module.exports);
|
|
73
|
-
__reExport(index_exports, require("./helpers/getCSSStylesAtomic"), module.exports);
|
|
74
|
-
__reExport(index_exports, require("./createComponent"), module.exports);
|
|
75
|
-
__reExport(index_exports, require("./helpers/getThemeCSSRules"), module.exports);
|
|
76
|
-
__reExport(index_exports, require("./helpers/getVariantExtras"), module.exports);
|
|
77
|
-
__reExport(index_exports, require("./helpers/isTamaguiComponent"), module.exports);
|
|
78
|
-
__reExport(index_exports, require("./helpers/isTamaguiElement"), module.exports);
|
|
79
|
-
__reExport(index_exports, require("./helpers/matchMedia"), module.exports);
|
|
80
|
-
__reExport(index_exports, require("./helpers/mergeProps"), module.exports);
|
|
81
|
-
__reExport(index_exports, require("./helpers/normalizeColor"), module.exports);
|
|
82
|
-
__reExport(index_exports, require("./helpers/normalizeStyle"), module.exports);
|
|
83
|
-
__reExport(index_exports, require("./helpers/normalizeValueWithProperty"), module.exports);
|
|
84
|
-
__reExport(index_exports, require("./helpers/propMapper"), module.exports);
|
|
85
|
-
__reExport(index_exports, require("./helpers/proxyThemeToParents"), module.exports);
|
|
86
|
-
__reExport(index_exports, require("./helpers/proxyThemeVariables"), module.exports);
|
|
87
|
-
__reExport(index_exports, require("./helpers/pseudoDescriptors"), module.exports);
|
|
88
|
-
__reExport(index_exports, require("./helpers/themeable"), module.exports);
|
|
89
|
-
__reExport(index_exports, require("./helpers/themes"), module.exports);
|
|
90
|
-
__reExport(index_exports, require("./helpers/transformsToString"), module.exports);
|
|
91
|
-
__reExport(index_exports, require("./helpers/wrapStyleTags"), module.exports);
|
|
92
|
-
var import_useMedia = require("./hooks/useMedia");
|
|
93
|
-
__reExport(index_exports, require("./hooks/useTheme"), module.exports);
|
|
94
|
-
var import_useThemeState = require("./hooks/useThemeState");
|
|
95
|
-
__reExport(index_exports, require("./hooks/useThemeName"), module.exports);
|
|
96
|
-
__reExport(index_exports, require("./hooks/useConfiguration"), module.exports);
|
|
97
|
-
__reExport(index_exports, require("./hooks/useIsTouchDevice"), module.exports);
|
|
98
|
-
__reExport(index_exports, require("./hooks/useProps"), module.exports);
|
|
99
|
-
__reExport(index_exports, require("./hooks/useConfiguration"), module.exports);
|
|
100
|
-
__reExport(index_exports, require("./views/Slot"), module.exports);
|
|
101
|
-
__reExport(index_exports, require("./views/Stack"), module.exports);
|
|
102
|
-
__reExport(index_exports, require("./views/View"), module.exports);
|
|
103
|
-
__reExport(index_exports, require("./views/Text"), module.exports);
|
|
104
|
-
__reExport(index_exports, require("./views/Theme"), module.exports);
|
|
105
|
-
__reExport(index_exports, require("./views/ThemeProvider"), module.exports);
|
|
106
|
-
__reExport(index_exports, require("./views/FontLanguage"), module.exports);
|
|
107
|
-
__reExport(index_exports, require("./views/TamaguiProvider"), module.exports);
|
|
108
|
-
__reExport(index_exports, require("./views/Configuration"), module.exports);
|
|
68
|
+
var import_insertStyleRule2 = require("./helpers/insertStyleRule.cjs");
|
|
69
|
+
__reExport(index_exports, require("./helpers/createStyledContext.cjs"), module.exports);
|
|
70
|
+
__reExport(index_exports, require("./helpers/expandStyles.cjs"), module.exports);
|
|
71
|
+
__reExport(index_exports, require("./helpers/getExpandedShorthands.cjs"), module.exports);
|
|
72
|
+
__reExport(index_exports, require("./helpers/getSplitStyles.cjs"), module.exports);
|
|
73
|
+
__reExport(index_exports, require("./helpers/getCSSStylesAtomic.cjs"), module.exports);
|
|
74
|
+
__reExport(index_exports, require("./createComponent.cjs"), module.exports);
|
|
75
|
+
__reExport(index_exports, require("./helpers/getThemeCSSRules.cjs"), module.exports);
|
|
76
|
+
__reExport(index_exports, require("./helpers/getVariantExtras.cjs"), module.exports);
|
|
77
|
+
__reExport(index_exports, require("./helpers/isTamaguiComponent.cjs"), module.exports);
|
|
78
|
+
__reExport(index_exports, require("./helpers/isTamaguiElement.cjs"), module.exports);
|
|
79
|
+
__reExport(index_exports, require("./helpers/matchMedia.cjs"), module.exports);
|
|
80
|
+
__reExport(index_exports, require("./helpers/mergeProps.cjs"), module.exports);
|
|
81
|
+
__reExport(index_exports, require("./helpers/normalizeColor.cjs"), module.exports);
|
|
82
|
+
__reExport(index_exports, require("./helpers/normalizeStyle.cjs"), module.exports);
|
|
83
|
+
__reExport(index_exports, require("./helpers/normalizeValueWithProperty.cjs"), module.exports);
|
|
84
|
+
__reExport(index_exports, require("./helpers/propMapper.cjs"), module.exports);
|
|
85
|
+
__reExport(index_exports, require("./helpers/proxyThemeToParents.cjs"), module.exports);
|
|
86
|
+
__reExport(index_exports, require("./helpers/proxyThemeVariables.cjs"), module.exports);
|
|
87
|
+
__reExport(index_exports, require("./helpers/pseudoDescriptors.cjs"), module.exports);
|
|
88
|
+
__reExport(index_exports, require("./helpers/themeable.cjs"), module.exports);
|
|
89
|
+
__reExport(index_exports, require("./helpers/themes.cjs"), module.exports);
|
|
90
|
+
__reExport(index_exports, require("./helpers/transformsToString.cjs"), module.exports);
|
|
91
|
+
__reExport(index_exports, require("./helpers/wrapStyleTags.cjs"), module.exports);
|
|
92
|
+
var import_useMedia = require("./hooks/useMedia.cjs");
|
|
93
|
+
__reExport(index_exports, require("./hooks/useTheme.cjs"), module.exports);
|
|
94
|
+
var import_useThemeState = require("./hooks/useThemeState.cjs");
|
|
95
|
+
__reExport(index_exports, require("./hooks/useThemeName.cjs"), module.exports);
|
|
96
|
+
__reExport(index_exports, require("./hooks/useConfiguration.cjs"), module.exports);
|
|
97
|
+
__reExport(index_exports, require("./hooks/useIsTouchDevice.cjs"), module.exports);
|
|
98
|
+
__reExport(index_exports, require("./hooks/useProps.cjs"), module.exports);
|
|
99
|
+
__reExport(index_exports, require("./hooks/useConfiguration.cjs"), module.exports);
|
|
100
|
+
__reExport(index_exports, require("./views/Slot.cjs"), module.exports);
|
|
101
|
+
__reExport(index_exports, require("./views/Stack.cjs"), module.exports);
|
|
102
|
+
__reExport(index_exports, require("./views/View.cjs"), module.exports);
|
|
103
|
+
__reExport(index_exports, require("./views/Text.cjs"), module.exports);
|
|
104
|
+
__reExport(index_exports, require("./views/Theme.cjs"), module.exports);
|
|
105
|
+
__reExport(index_exports, require("./views/ThemeProvider.cjs"), module.exports);
|
|
106
|
+
__reExport(index_exports, require("./views/FontLanguage.cjs"), module.exports);
|
|
107
|
+
__reExport(index_exports, require("./views/TamaguiProvider.cjs"), module.exports);
|
|
108
|
+
__reExport(index_exports, require("./views/Configuration.cjs"), module.exports);
|
|
109
109
|
__reExport(index_exports, require("@tamagui/use-did-finish-ssr"), module.exports);
|
|
110
110
|
__reExport(index_exports, require("@tamagui/use-event"), module.exports);
|
|
111
111
|
__reExport(index_exports, require("@tamagui/compose-refs"), module.exports);
|
|
112
112
|
__reExport(index_exports, require("@tamagui/helpers"), module.exports);
|
|
113
113
|
__reExport(index_exports, require("@tamagui/constants"), module.exports);
|
|
114
|
-
__reExport(index_exports, require("./setupHooks"), module.exports);
|
|
114
|
+
__reExport(index_exports, require("./setupHooks.cjs"), module.exports);
|
package/dist/cjs/insertFont.cjs
CHANGED
|
@@ -26,11 +26,11 @@ __export(insertFont_exports, {
|
|
|
26
26
|
updateFont: () => updateFont
|
|
27
27
|
});
|
|
28
28
|
module.exports = __toCommonJS(insertFont_exports);
|
|
29
|
-
var import_config = require("./config"),
|
|
30
|
-
import_constants = require("./constants/constants"),
|
|
31
|
-
import_createFont = require("./createFont"),
|
|
32
|
-
import_createVariables = require("./createVariables"),
|
|
33
|
-
import_registerCSSVariable = require("./helpers/registerCSSVariable");
|
|
29
|
+
var import_config = require("./config.cjs"),
|
|
30
|
+
import_constants = require("./constants/constants.cjs"),
|
|
31
|
+
import_createFont = require("./createFont.cjs"),
|
|
32
|
+
import_createVariables = require("./createVariables.cjs"),
|
|
33
|
+
import_registerCSSVariable = require("./helpers/registerCSSVariable.cjs");
|
|
34
34
|
function insertFont(name, fontIn) {
|
|
35
35
|
const font = (0, import_createFont.createFont)(fontIn),
|
|
36
36
|
tokened = (0, import_createVariables.createVariables)(font, name),
|
package/dist/cjs/styled.cjs
CHANGED
|
@@ -23,9 +23,9 @@ __export(styled_exports, {
|
|
|
23
23
|
styled: () => styled
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(styled_exports);
|
|
26
|
-
var import_createComponent = require("./createComponent"),
|
|
27
|
-
import_mergeVariants = require("./helpers/mergeVariants"),
|
|
28
|
-
import_setupReactNative = require("./setupReactNative");
|
|
26
|
+
var import_createComponent = require("./createComponent.cjs"),
|
|
27
|
+
import_mergeVariants = require("./helpers/mergeVariants.cjs"),
|
|
28
|
+
import_setupReactNative = require("./setupReactNative.cjs");
|
|
29
29
|
function styled(ComponentIn, options, config) {
|
|
30
30
|
if (process.env.NODE_ENV !== "production" && !ComponentIn) throw new Error("No component given to styled()");
|
|
31
31
|
const parentStaticConfig = ComponentIn.staticConfig,
|
package/dist/cjs/types.cjs
CHANGED
|
@@ -15,5 +15,5 @@ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
|
15
15
|
}), mod);
|
|
16
16
|
var types_exports = {};
|
|
17
17
|
module.exports = __toCommonJS(types_exports);
|
|
18
|
-
__reExport(types_exports, require("./interfaces/KeyTypes"), module.exports);
|
|
19
|
-
__reExport(types_exports, require("./interfaces/TamaguiComponentState"), module.exports);
|
|
18
|
+
__reExport(types_exports, require("./interfaces/KeyTypes.cjs"), module.exports);
|
|
19
|
+
__reExport(types_exports, require("./interfaces/TamaguiComponentState.cjs"), module.exports);
|
|
@@ -36,7 +36,7 @@ __export(Configuration_exports, {
|
|
|
36
36
|
module.exports = __toCommonJS(Configuration_exports);
|
|
37
37
|
var import_use_did_finish_ssr = require("@tamagui/use-did-finish-ssr"),
|
|
38
38
|
import_react = __toESM(require("react")),
|
|
39
|
-
import_ComponentContext = require("../contexts/ComponentContext"),
|
|
39
|
+
import_ComponentContext = require("../contexts/ComponentContext.cjs"),
|
|
40
40
|
import_jsx_runtime = require("react/jsx-runtime");
|
|
41
41
|
const Configuration = props => {
|
|
42
42
|
const current = import_react.default.useContext(import_ComponentContext.ComponentContext),
|
package/dist/cjs/views/Stack.cjs
CHANGED
|
@@ -24,8 +24,8 @@ __export(Stack_exports, {
|
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(Stack_exports);
|
|
26
26
|
var import_helpers = require("@tamagui/helpers"),
|
|
27
|
-
import_constants = require("../constants/constants"),
|
|
28
|
-
import_createComponent = require("../createComponent");
|
|
27
|
+
import_constants = require("../constants/constants.cjs"),
|
|
28
|
+
import_createComponent = require("../createComponent.cjs");
|
|
29
29
|
const Stack = (0, import_createComponent.createComponent)({
|
|
30
30
|
acceptsClassName: !0,
|
|
31
31
|
defaultProps: import_constants.stackDefaultStyles,
|
|
@@ -37,11 +37,11 @@ module.exports = __toCommonJS(TamaguiProvider_exports);
|
|
|
37
37
|
var import_constants = require("@tamagui/constants"),
|
|
38
38
|
import_use_did_finish_ssr = require("@tamagui/use-did-finish-ssr"),
|
|
39
39
|
import_react = __toESM(require("react")),
|
|
40
|
-
import_config = require("../config"),
|
|
41
|
-
import_ComponentContext = require("../contexts/ComponentContext"),
|
|
42
|
-
import_useMedia = require("../hooks/useMedia"),
|
|
43
|
-
import_ThemeProvider = require("./ThemeProvider"),
|
|
44
|
-
import_insertStyleRule = require("../helpers/insertStyleRule"),
|
|
40
|
+
import_config = require("../config.cjs"),
|
|
41
|
+
import_ComponentContext = require("../contexts/ComponentContext.cjs"),
|
|
42
|
+
import_useMedia = require("../hooks/useMedia.cjs"),
|
|
43
|
+
import_ThemeProvider = require("./ThemeProvider.cjs"),
|
|
44
|
+
import_insertStyleRule = require("../helpers/insertStyleRule.cjs"),
|
|
45
45
|
import_jsx_runtime = require("react/jsx-runtime");
|
|
46
46
|
function TamaguiProvider({
|
|
47
47
|
children,
|
package/dist/cjs/views/Text.cjs
CHANGED
|
@@ -24,7 +24,7 @@ __export(Text_exports, {
|
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(Text_exports);
|
|
26
26
|
var import_helpers = require("@tamagui/helpers"),
|
|
27
|
-
import_createComponent = require("../createComponent");
|
|
27
|
+
import_createComponent = require("../createComponent.cjs");
|
|
28
28
|
const ellipseStyle = {
|
|
29
29
|
maxWidth: "100%",
|
|
30
30
|
overflow: "hidden",
|
package/dist/cjs/views/Theme.cjs
CHANGED
|
@@ -37,11 +37,11 @@ __export(Theme_exports, {
|
|
|
37
37
|
module.exports = __toCommonJS(Theme_exports);
|
|
38
38
|
var import_constants = require("@tamagui/constants"),
|
|
39
39
|
import_react = __toESM(require("react")),
|
|
40
|
-
import_config = require("../config"),
|
|
41
|
-
import_createVariable = require("../createVariable"),
|
|
42
|
-
import_useTheme = require("../hooks/useTheme"),
|
|
43
|
-
import_useThemeState = require("../hooks/useThemeState"),
|
|
44
|
-
import_ThemeDebug = require("./ThemeDebug"),
|
|
40
|
+
import_config = require("../config.cjs"),
|
|
41
|
+
import_createVariable = require("../createVariable.cjs"),
|
|
42
|
+
import_useTheme = require("../hooks/useTheme.cjs"),
|
|
43
|
+
import_useThemeState = require("../hooks/useThemeState.cjs"),
|
|
44
|
+
import_ThemeDebug = require("./ThemeDebug.cjs"),
|
|
45
45
|
import_jsx_runtime = require("react/jsx-runtime");
|
|
46
46
|
const Theme = (0, import_react.forwardRef)(function (props, ref) {
|
|
47
47
|
if (props.disable) return props.children;
|
|
@@ -26,7 +26,7 @@ module.exports = __toCommonJS(ThemeDebug_exports);
|
|
|
26
26
|
var import_use_did_finish_ssr = require("@tamagui/use-did-finish-ssr"),
|
|
27
27
|
import_react = require("react"),
|
|
28
28
|
import_react_dom = require("react-dom"),
|
|
29
|
-
import_useThemeState = require("../hooks/useThemeState"),
|
|
29
|
+
import_useThemeState = require("../hooks/useThemeState.cjs"),
|
|
30
30
|
import_jsx_runtime = require("react/jsx-runtime");
|
|
31
31
|
let node;
|
|
32
32
|
function ThemeDebug({
|
|
@@ -25,9 +25,9 @@ __export(ThemeProvider_exports, {
|
|
|
25
25
|
module.exports = __toCommonJS(ThemeProvider_exports);
|
|
26
26
|
var import_constants = require("@tamagui/constants"),
|
|
27
27
|
import_react = require("react"),
|
|
28
|
-
import_config = require("../config"),
|
|
29
|
-
import_constants2 = require("../constants/constants"),
|
|
30
|
-
import_Theme = require("./Theme"),
|
|
28
|
+
import_config = require("../config.cjs"),
|
|
29
|
+
import_constants2 = require("../constants/constants.cjs"),
|
|
30
|
+
import_Theme = require("./Theme.cjs"),
|
|
31
31
|
import_jsx_runtime = require("react/jsx-runtime");
|
|
32
32
|
const ThemeProvider = props => {
|
|
33
33
|
const disableRootThemeClass = props.disableRootThemeClass ?? (0, import_config.getSetting)("disableRootThemeClass"),
|
package/dist/cjs/views/View.cjs
CHANGED
|
@@ -24,8 +24,8 @@ __export(View_exports, {
|
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(View_exports);
|
|
26
26
|
var import_helpers = require("@tamagui/helpers"),
|
|
27
|
-
import_constants = require("../constants/constants"),
|
|
28
|
-
import_createComponent = require("../createComponent");
|
|
27
|
+
import_constants = require("../constants/constants.cjs"),
|
|
28
|
+
import_createComponent = require("../createComponent.cjs");
|
|
29
29
|
const View = (0, import_createComponent.createComponent)({
|
|
30
30
|
acceptsClassName: !0,
|
|
31
31
|
defaultProps: import_constants.stackDefaultStyles,
|
|
@@ -70,12 +70,12 @@ if (typeof window < "u") {
|
|
|
70
70
|
};
|
|
71
71
|
window.addEventListener("blur", () => {
|
|
72
72
|
show(!1);
|
|
73
|
-
}), window.addEventListener("keydown", ({ key, defaultPrevented }) => {
|
|
74
|
-
|
|
73
|
+
}), window.addEventListener("keydown", ({ key, metaKey, defaultPrevented }) => {
|
|
74
|
+
clearTimeout(tm), !defaultPrevented && (metaKey || key === options.key && (tm = setTimeout(() => {
|
|
75
75
|
show(!0);
|
|
76
76
|
}, options.delay)));
|
|
77
|
-
}), window.addEventListener("keyup", ({
|
|
78
|
-
defaultPrevented ||
|
|
77
|
+
}), window.addEventListener("keyup", ({ defaultPrevented }) => {
|
|
78
|
+
defaultPrevented || (clearTimeout(tm), isShowing && show(!1));
|
|
79
79
|
});
|
|
80
80
|
}
|
|
81
81
|
});
|
|
@@ -358,6 +358,7 @@ function createComponent(staticConfig) {
|
|
|
358
358
|
onBlur,
|
|
359
359
|
separator,
|
|
360
360
|
// ignore from here on out
|
|
361
|
+
passThrough,
|
|
361
362
|
forceStyle: _forceStyle,
|
|
362
363
|
// @ts-ignore for next/link compat etc
|
|
363
364
|
onClick,
|
|
@@ -365,7 +366,7 @@ function createComponent(staticConfig) {
|
|
|
365
366
|
...nonTamaguiProps
|
|
366
367
|
} = viewPropsIn || {};
|
|
367
368
|
let viewProps = nonTamaguiProps;
|
|
368
|
-
!isTaggable && props.forceStyle && (viewProps.forceStyle = props.forceStyle), isHOC && _themeProp && (viewProps.theme = _themeProp), tagProp && elementType.acceptTagProp && (viewProps.tag = tagProp);
|
|
369
|
+
!isTaggable && props.forceStyle && (viewProps.forceStyle = props.forceStyle), isHOC && (typeof _themeProp < "u" && (viewProps.theme = _themeProp), typeof passThrough < "u" && (viewProps.passThrough = passThrough)), tagProp && elementType.acceptTagProp && (viewProps.tag = tagProp);
|
|
369
370
|
let animationStyles;
|
|
370
371
|
const shouldUseAnimation = (
|
|
371
372
|
// if it supports css vars we run it on server too to get matching initial style
|