@tamagui/web 3.0.5 → 3.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/_withNativeStyle.cjs +37 -20
- package/dist/cjs/_withNativeStyle.native.cjs +37 -20
- package/dist/cjs/_withNativeStyle.native.js +37 -20
- package/dist/cjs/_withNativeStyle.native.js.map +1 -1
- package/dist/cjs/createComponent.native.cjs +1 -0
- package/dist/cjs/createComponent.native.js +1 -0
- package/dist/cjs/createComponent.native.js.map +1 -1
- package/dist/cjs/helpers/getSplitStyles.cjs +2 -1
- package/dist/cjs/helpers/getSplitStyles.native.cjs +2 -1
- package/dist/cjs/helpers/getSplitStyles.native.js +2 -1
- package/dist/cjs/helpers/getSplitStyles.native.js.map +1 -1
- package/dist/cjs/helpers/nativeStyleEngine.cjs +80 -122
- package/dist/cjs/helpers/nativeStyleEngine.native.cjs +81 -161
- package/dist/cjs/helpers/nativeStyleEngine.native.js +81 -161
- package/dist/cjs/helpers/nativeStyleEngine.native.js.map +1 -1
- package/dist/esm/_withNativeStyle.mjs +38 -21
- package/dist/esm/_withNativeStyle.mjs.map +1 -1
- package/dist/esm/_withNativeStyle.native.js +38 -21
- package/dist/esm/_withNativeStyle.native.js.map +1 -1
- package/dist/esm/createComponent.native.js +2 -1
- package/dist/esm/createComponent.native.js.map +1 -1
- package/dist/esm/helpers/getSplitStyles.mjs +2 -1
- package/dist/esm/helpers/getSplitStyles.mjs.map +1 -1
- package/dist/esm/helpers/getSplitStyles.native.js +2 -1
- package/dist/esm/helpers/getSplitStyles.native.js.map +1 -1
- package/dist/esm/helpers/nativeStyleEngine.mjs +78 -122
- package/dist/esm/helpers/nativeStyleEngine.mjs.map +1 -1
- package/dist/esm/helpers/nativeStyleEngine.native.js +79 -161
- package/dist/esm/helpers/nativeStyleEngine.native.js.map +1 -1
- package/package.json +17 -17
- package/src/_withNativeStyle.tsx +67 -31
- package/src/createComponent.tsx +6 -1
- package/src/helpers/getSplitStyles.tsx +3 -0
- package/src/helpers/nativeStyleEngine.ts +118 -163
- package/types/_withNativeStyle.d.ts +4 -3
- package/types/_withNativeStyle.d.ts.map +1 -1
- package/types/createComponent.d.ts.map +1 -1
- package/types/helpers/getSplitStyles.d.ts.map +1 -1
- package/types/helpers/nativeStyleEngine.d.ts +26 -6
- package/types/helpers/nativeStyleEngine.d.ts.map +1 -1
|
@@ -51,13 +51,26 @@ const _withNativeStyle = (Component, baseStyle, themeStyleKeys, host) => {
|
|
|
51
51
|
...baseStyle,
|
|
52
52
|
...typeof baseStyle.fontWeight === "number" && { fontWeight: String(baseStyle.fontWeight) }
|
|
53
53
|
} : baseStyle;
|
|
54
|
-
const
|
|
55
|
-
const
|
|
54
|
+
const entries = /* @__PURE__ */ new Map();
|
|
55
|
+
const createEntry = () => {
|
|
56
|
+
const entry = {
|
|
57
|
+
style: [baseStyle, null],
|
|
58
|
+
hostTextStyle: [hostTextBase, null],
|
|
59
|
+
stateName: "",
|
|
60
|
+
theme: null,
|
|
61
|
+
state: null,
|
|
62
|
+
ref: (node) => {
|
|
63
|
+
if (node) linkHost(node, entry.state);
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
return entry;
|
|
67
|
+
};
|
|
56
68
|
const ScopeContext = import_useThemeState.ThemeStateContext;
|
|
57
69
|
const engineOf = import_nativeStyleEngine.getNativeStyleEngine;
|
|
58
70
|
const scopeState = import_useThemeState.getThemeState;
|
|
59
71
|
const resolve = import_nativeStyleEngine.resolveNativeStyleMapping;
|
|
60
|
-
const
|
|
72
|
+
const linkState = import_nativeStyleEngine.createNativeStyleLinkState;
|
|
73
|
+
const linkHost = import_nativeStyleEngine.linkNativeStyleHost;
|
|
61
74
|
const assignRef = import_compose_refs.setRef;
|
|
62
75
|
const render = (props, key) => {
|
|
63
76
|
const scopeId = (0, import_react.use)(ScopeContext);
|
|
@@ -79,28 +92,32 @@ const _withNativeStyle = (Component, baseStyle, themeStyleKeys, host) => {
|
|
|
79
92
|
const { name, theme } = themeState;
|
|
80
93
|
const asHostText = HostText && !inText;
|
|
81
94
|
const Rendered = asHostText ? HostText : Component;
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
cache.set(scopeId, style);
|
|
95
|
+
let entry = entries.get(scopeId);
|
|
96
|
+
if (!entry) {
|
|
97
|
+
entry = createEntry();
|
|
98
|
+
entries.set(scopeId, entry);
|
|
87
99
|
}
|
|
88
|
-
|
|
100
|
+
if (entry.stateName !== name || entry.theme !== theme) {
|
|
101
|
+
const themed = resolve(themeStyleKeys, name, theme);
|
|
102
|
+
entry.style[1] = themed;
|
|
103
|
+
entry.hostTextStyle[1] = themed;
|
|
104
|
+
entry.stateName = name;
|
|
105
|
+
entry.theme = theme;
|
|
106
|
+
entry.state = linkState(themeStyleKeys, scopeId, name, theme);
|
|
107
|
+
}
|
|
108
|
+
const style = asHostText ? entry.hostTextStyle : entry.style;
|
|
89
109
|
const wrapped = resetsText || asHostText && mayRenderText(rest.children);
|
|
110
|
+
const state = entry.state;
|
|
111
|
+
const hostRef = ref == null ? entry.ref : (node) => {
|
|
112
|
+
if (!node) return assignRef(ref, null);
|
|
113
|
+
linkHost(node, state);
|
|
114
|
+
if (typeof ref === "function") return ref(node);
|
|
115
|
+
assignRef(ref, node);
|
|
116
|
+
};
|
|
90
117
|
const element = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Rendered, {
|
|
91
118
|
...asHostText && hostTextProps,
|
|
92
119
|
...rest,
|
|
93
|
-
ref:
|
|
94
|
-
let refCleanup;
|
|
95
|
-
if (typeof ref === "function") refCleanup = ref(node);
|
|
96
|
-
else assignRef(ref, node);
|
|
97
|
-
const link = linkMapping(node, themeStyleKeys, scopeId, name, theme);
|
|
98
|
-
return () => {
|
|
99
|
-
link?.unlink();
|
|
100
|
-
if (typeof refCleanup === "function") refCleanup();
|
|
101
|
-
else assignRef(ref, null);
|
|
102
|
-
};
|
|
103
|
-
},
|
|
120
|
+
ref: hostRef,
|
|
104
121
|
style
|
|
105
122
|
}, wrapped ? void 0 : key);
|
|
106
123
|
if (!wrapped) return element;
|
|
@@ -61,13 +61,26 @@ var _withNativeStyle = function(Component, baseStyle, themeStyleKeys, host) {
|
|
|
61
61
|
...baseStyle,
|
|
62
62
|
...typeof baseStyle.fontWeight === "number" && { fontWeight: String(baseStyle.fontWeight) }
|
|
63
63
|
} : baseStyle;
|
|
64
|
-
var
|
|
65
|
-
var
|
|
64
|
+
var entries = /* @__PURE__ */ new Map();
|
|
65
|
+
var createEntry = function() {
|
|
66
|
+
var entry = {
|
|
67
|
+
style: [baseStyle, null],
|
|
68
|
+
hostTextStyle: [hostTextBase, null],
|
|
69
|
+
stateName: "",
|
|
70
|
+
theme: null,
|
|
71
|
+
state: null,
|
|
72
|
+
ref: function(node) {
|
|
73
|
+
if (node) linkHost(node, entry.state);
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
return entry;
|
|
77
|
+
};
|
|
66
78
|
var ScopeContext = import_useThemeState.ThemeStateContext;
|
|
67
79
|
var engineOf = import_nativeStyleEngine.getNativeStyleEngine;
|
|
68
80
|
var scopeState = import_useThemeState.getThemeState;
|
|
69
81
|
var resolve = import_nativeStyleEngine.resolveNativeStyleMapping;
|
|
70
|
-
var
|
|
82
|
+
var linkState = import_nativeStyleEngine.createNativeStyleLinkState;
|
|
83
|
+
var linkHost = import_nativeStyleEngine.linkNativeStyleHost;
|
|
71
84
|
var assignRef = import_compose_refs.setRef;
|
|
72
85
|
var render = function(props, key) {
|
|
73
86
|
var scopeId = (0, import_react.use)(ScopeContext);
|
|
@@ -89,28 +102,32 @@ var _withNativeStyle = function(Component, baseStyle, themeStyleKeys, host) {
|
|
|
89
102
|
var { name, theme } = themeState;
|
|
90
103
|
var asHostText = HostText && !inText;
|
|
91
104
|
var Rendered = asHostText ? HostText : Component;
|
|
92
|
-
var
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
cache.set(scopeId, style);
|
|
105
|
+
var entry = entries.get(scopeId);
|
|
106
|
+
if (!entry) {
|
|
107
|
+
entry = createEntry();
|
|
108
|
+
entries.set(scopeId, entry);
|
|
97
109
|
}
|
|
98
|
-
|
|
110
|
+
if (entry.stateName !== name || entry.theme !== theme) {
|
|
111
|
+
var themed = resolve(themeStyleKeys, name, theme);
|
|
112
|
+
entry.style[1] = themed;
|
|
113
|
+
entry.hostTextStyle[1] = themed;
|
|
114
|
+
entry.stateName = name;
|
|
115
|
+
entry.theme = theme;
|
|
116
|
+
entry.state = linkState(themeStyleKeys, scopeId, name, theme);
|
|
117
|
+
}
|
|
118
|
+
var style = asHostText ? entry.hostTextStyle : entry.style;
|
|
99
119
|
var wrapped = resetsText || asHostText && mayRenderText(rest.children);
|
|
120
|
+
var state = entry.state;
|
|
121
|
+
var hostRef = ref == null ? entry.ref : function(node) {
|
|
122
|
+
if (!node) return assignRef(ref, null);
|
|
123
|
+
linkHost(node, state);
|
|
124
|
+
if (typeof ref === "function") return ref(node);
|
|
125
|
+
assignRef(ref, node);
|
|
126
|
+
};
|
|
100
127
|
var element = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Rendered, {
|
|
101
128
|
...asHostText && hostTextProps,
|
|
102
129
|
...rest,
|
|
103
|
-
ref:
|
|
104
|
-
var refCleanup;
|
|
105
|
-
if (typeof ref === "function") refCleanup = ref(node);
|
|
106
|
-
else assignRef(ref, node);
|
|
107
|
-
var link = linkMapping(node, themeStyleKeys, scopeId, name, theme);
|
|
108
|
-
return function() {
|
|
109
|
-
link === null || link === void 0 ? void 0 : link.unlink();
|
|
110
|
-
if (typeof refCleanup === "function") refCleanup();
|
|
111
|
-
else assignRef(ref, null);
|
|
112
|
-
};
|
|
113
|
-
},
|
|
130
|
+
ref: hostRef,
|
|
114
131
|
style
|
|
115
132
|
}, wrapped ? void 0 : key);
|
|
116
133
|
if (!wrapped) return element;
|
|
@@ -61,13 +61,26 @@ var _withNativeStyle = function(Component, baseStyle, themeStyleKeys, host) {
|
|
|
61
61
|
...baseStyle,
|
|
62
62
|
...typeof baseStyle.fontWeight === "number" && { fontWeight: String(baseStyle.fontWeight) }
|
|
63
63
|
} : baseStyle;
|
|
64
|
-
var
|
|
65
|
-
var
|
|
64
|
+
var entries = /* @__PURE__ */ new Map();
|
|
65
|
+
var createEntry = function() {
|
|
66
|
+
var entry = {
|
|
67
|
+
style: [baseStyle, null],
|
|
68
|
+
hostTextStyle: [hostTextBase, null],
|
|
69
|
+
stateName: "",
|
|
70
|
+
theme: null,
|
|
71
|
+
state: null,
|
|
72
|
+
ref: function(node) {
|
|
73
|
+
if (node) linkHost(node, entry.state);
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
return entry;
|
|
77
|
+
};
|
|
66
78
|
var ScopeContext = import_useThemeState.ThemeStateContext;
|
|
67
79
|
var engineOf = import_nativeStyleEngine.getNativeStyleEngine;
|
|
68
80
|
var scopeState = import_useThemeState.getThemeState;
|
|
69
81
|
var resolve = import_nativeStyleEngine.resolveNativeStyleMapping;
|
|
70
|
-
var
|
|
82
|
+
var linkState = import_nativeStyleEngine.createNativeStyleLinkState;
|
|
83
|
+
var linkHost = import_nativeStyleEngine.linkNativeStyleHost;
|
|
71
84
|
var assignRef = import_compose_refs.setRef;
|
|
72
85
|
var render = function(props, key) {
|
|
73
86
|
var scopeId = (0, import_react.use)(ScopeContext);
|
|
@@ -89,28 +102,32 @@ var _withNativeStyle = function(Component, baseStyle, themeStyleKeys, host) {
|
|
|
89
102
|
var { name, theme } = themeState;
|
|
90
103
|
var asHostText = HostText && !inText;
|
|
91
104
|
var Rendered = asHostText ? HostText : Component;
|
|
92
|
-
var
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
cache.set(scopeId, style);
|
|
105
|
+
var entry = entries.get(scopeId);
|
|
106
|
+
if (!entry) {
|
|
107
|
+
entry = createEntry();
|
|
108
|
+
entries.set(scopeId, entry);
|
|
97
109
|
}
|
|
98
|
-
|
|
110
|
+
if (entry.stateName !== name || entry.theme !== theme) {
|
|
111
|
+
var themed = resolve(themeStyleKeys, name, theme);
|
|
112
|
+
entry.style[1] = themed;
|
|
113
|
+
entry.hostTextStyle[1] = themed;
|
|
114
|
+
entry.stateName = name;
|
|
115
|
+
entry.theme = theme;
|
|
116
|
+
entry.state = linkState(themeStyleKeys, scopeId, name, theme);
|
|
117
|
+
}
|
|
118
|
+
var style = asHostText ? entry.hostTextStyle : entry.style;
|
|
99
119
|
var wrapped = resetsText || asHostText && mayRenderText(rest.children);
|
|
120
|
+
var state = entry.state;
|
|
121
|
+
var hostRef = ref == null ? entry.ref : function(node) {
|
|
122
|
+
if (!node) return assignRef(ref, null);
|
|
123
|
+
linkHost(node, state);
|
|
124
|
+
if (typeof ref === "function") return ref(node);
|
|
125
|
+
assignRef(ref, node);
|
|
126
|
+
};
|
|
100
127
|
var element = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Rendered, {
|
|
101
128
|
...asHostText && hostTextProps,
|
|
102
129
|
...rest,
|
|
103
|
-
ref:
|
|
104
|
-
var refCleanup;
|
|
105
|
-
if (typeof ref === "function") refCleanup = ref(node);
|
|
106
|
-
else assignRef(ref, node);
|
|
107
|
-
var link = linkMapping(node, themeStyleKeys, scopeId, name, theme);
|
|
108
|
-
return function() {
|
|
109
|
-
link === null || link === void 0 ? void 0 : link.unlink();
|
|
110
|
-
if (typeof refCleanup === "function") refCleanup();
|
|
111
|
-
else assignRef(ref, null);
|
|
112
|
-
};
|
|
113
|
-
},
|
|
130
|
+
ref: hostRef,
|
|
114
131
|
style
|
|
115
132
|
}, wrapped ? void 0 : key);
|
|
116
133
|
if (!wrapped) return element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_withNativeStyle.native.js","names":[],"sources":["cjs/_withNativeStyle.native.js"],"sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar withNativeStyle_exports = {};\n__export(withNativeStyle_exports, {\n _withNativeStyle: () => _withNativeStyle\n});\nmodule.exports = __toCommonJS(withNativeStyle_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_compose_refs = require(\"@tamagui/compose-refs\");\nvar import_constants = require(\"@tamagui/constants\");\nvar import_react = __toESM(require(\"react\"), 1);\nvar import_withStableStyle = require(\"./_withStableStyle\");\nvar import_nativeStyleEngine = require(\"./helpers/nativeStyleEngine\");\nvar import_useThemeState = require(\"./hooks/useThemeState\");\nvar import_setupHooks = require(\"./setupHooks\");\nvar hostTextProps = {\n accessible: import_constants.isAndroid ? false : import_constants.isIos ? true : void 0,\n allowFontScaling: true,\n ellipsizeMode: \"tail\"\n};\nvar _withNativeStyle = function(Component, baseStyle, themeStyleKeys, host) {\n var _hooks_getBaseViews;\n var Fallback = (0, import_withStableStyle._withStableStyle)(Component, function(theme) {\n var themedStyle = {};\n for (var styleKey in themeStyleKeys) {\n var _theme_themeStyleKeys_styleKey;\n themedStyle[styleKey] = (_theme_themeStyleKeys_styleKey = theme[themeStyleKeys[styleKey]]) === null || _theme_themeStyleKeys_styleKey === void 0 ? void 0 : _theme_themeStyleKeys_styleKey.get();\n }\n return [\n baseStyle,\n themedStyle\n ];\n }, true, false);\n var baseViews = host ? (_hooks_getBaseViews = import_setupHooks.hooks.getBaseViews) === null || _hooks_getBaseViews === void 0 ? void 0 : _hooks_getBaseViews.call(import_setupHooks.hooks) : void 0;\n var TextAncestor = baseViews === null || baseViews === void 0 ? void 0 : baseViews.TextAncestor;\n var TextAncestorProvider = TextAncestor === null || TextAncestor === void 0 ? void 0 : TextAncestor.Provider;\n var HostText = host === \"text\" && !(\"userSelect\" in baseStyle) && !(\"verticalAlign\" in baseStyle) ? baseViews === null || baseViews === void 0 ? void 0 : baseViews.NativeText : void 0;\n var hostTextBase = HostText ? {\n overflow: \"hidden\",\n ...baseStyle,\n ...typeof baseStyle.fontWeight === \"number\" && {\n fontWeight: String(baseStyle.fontWeight)\n }\n } : baseStyle;\n var styles = /* @__PURE__ */ new Map();\n var hostTextStyles = /* @__PURE__ */ new Map();\n var ScopeContext = import_useThemeState.ThemeStateContext;\n var engineOf = import_nativeStyleEngine.getNativeStyleEngine;\n var scopeState = import_useThemeState.getThemeState;\n var resolve = import_nativeStyleEngine.resolveNativeStyleMapping;\n var linkMapping = import_nativeStyleEngine.linkNativeStyleMapping;\n var assignRef = import_compose_refs.setRef;\n var render = function(props, key) {\n var scopeId = (0, import_react.use)(ScopeContext);\n var inText = TextAncestor ? (0, import_react.use)(TextAncestor) : false;\n var themeState = scopeId && engineOf() ? scopeState(scopeId) : void 0;\n var resetsText = inText && host === \"view\";\n if (!themeState) {\n return resetsText ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TextAncestorProvider, {\n value: false,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Fallback, {\n ...props\n })\n }, key) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Fallback, {\n ...props\n }, key);\n }\n var rest = props;\n if (props._expressions !== void 0) {\n var { _expressions: _ignoredExpressions, ...withoutExpressions } = props;\n rest = withoutExpressions;\n }\n var ref = props.ref;\n var { name, theme } = themeState;\n var asHostText = HostText && !inText;\n var Rendered = asHostText ? HostText : Component;\n var cache = asHostText ? hostTextStyles : styles;\n var style = cache.get(scopeId);\n if (!style) {\n style = [\n asHostText ? hostTextBase : baseStyle,\n null\n ];\n cache.set(scopeId, style);\n }\n style[1] = resolve(themeStyleKeys, name, theme);\n var wrapped = resetsText || asHostText && mayRenderText(rest.children);\n var element = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Rendered, {\n ...asHostText && hostTextProps,\n ...rest,\n ref: function(node) {\n var refCleanup;\n if (typeof ref === \"function\") refCleanup = ref(node);\n else assignRef(ref, node);\n var link = linkMapping(node, themeStyleKeys, scopeId, name, theme);\n return function() {\n link === null || link === void 0 ? void 0 : link.unlink();\n if (typeof refCleanup === \"function\") refCleanup();\n else assignRef(ref, null);\n };\n },\n style\n }, wrapped ? void 0 : key);\n if (!wrapped) return element;\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TextAncestorProvider, {\n value: !resetsText,\n children: element\n }, key);\n };\n var NativeStyleView = function(props) {\n return render(props);\n };\n NativeStyleView.inline = function(element) {\n return render(element.props, element.key);\n };\n return NativeStyleView;\n};\nfunction mayRenderText(children) {\n if (children == null) return false;\n if (Array.isArray(children) && children.length <= 3) {\n return children.some(function(child) {\n return child != null && typeof child === \"object\";\n });\n }\n return typeof children === \"object\";\n}\n//# sourceMappingURL=_withNativeStyle.js.map\n"],"mappings":";;;AACA,IAAI,WAAW,OAAO;AACtB,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO;AAC1B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ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K,IAAI,KAAK,IAAI,KAAK,OAAO;KACxD,IAAI,OAAO,eAAe,YAAY,WAAW;UAC5C,UAAU,KAAK,IAAI;IAC1B;GACF;GACA;EACF,GAAG,UAAU,KAAK,IAAI,GAAG;EACzB,IAAI,CAAC,SAAS,OAAO;EACrB,OAAuB,iBAAC,GAAG,mBAAmB,IAAG,CAAE,sBAAsB;GACvE,OAAO,CAAC;GACR,UAAU;EACZ,GAAG,GAAG;CACR;CACA,IAAI,kBAAkB,SAAS,OAAO;EACpC,OAAO,OAAO,KAAK;CACrB;CACA,gBAAgB,SAAS,SAAS,SAAS;EACzC,OAAO,OAAO,QAAQ,OAAO,QAAQ,GAAG;CAC1C;CACA,OAAO;AACT;AACA,SAAS,cAAc,UAAU;CAC/B,IAAI,YAAY,MAAM,OAAO;CAC7B,IAAI,MAAM,QAAQ,QAAQ,KAAK,SAAS,UAAU,GAAG;EACnD,OAAO,SAAS,KAAK,SAAS,OAAO;GACnC,OAAO,SAAS,QAAQ,OAAO,UAAU;EAC3C,CAAC;CACH;CACA,OAAO,OAAO,aAAa;AAC7B"}
|
|
1
|
+
{"version":3,"file":"_withNativeStyle.native.js","names":[],"sources":["cjs/_withNativeStyle.native.js"],"sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar withNativeStyle_exports = {};\n__export(withNativeStyle_exports, {\n _withNativeStyle: () => _withNativeStyle\n});\nmodule.exports = __toCommonJS(withNativeStyle_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_compose_refs = require(\"@tamagui/compose-refs\");\nvar import_constants = require(\"@tamagui/constants\");\nvar import_react = __toESM(require(\"react\"), 1);\nvar import_withStableStyle = require(\"./_withStableStyle\");\nvar import_nativeStyleEngine = require(\"./helpers/nativeStyleEngine\");\nvar import_useThemeState = require(\"./hooks/useThemeState\");\nvar import_setupHooks = require(\"./setupHooks\");\nvar hostTextProps = {\n accessible: import_constants.isAndroid ? false : import_constants.isIos ? true : void 0,\n allowFontScaling: true,\n ellipsizeMode: \"tail\"\n};\nvar _withNativeStyle = function(Component, baseStyle, themeStyleKeys, host) {\n var _hooks_getBaseViews;\n var Fallback = (0, import_withStableStyle._withStableStyle)(Component, function(theme) {\n var themedStyle = {};\n for (var styleKey in themeStyleKeys) {\n var _theme_themeStyleKeys_styleKey;\n themedStyle[styleKey] = (_theme_themeStyleKeys_styleKey = theme[themeStyleKeys[styleKey]]) === null || _theme_themeStyleKeys_styleKey === void 0 ? void 0 : _theme_themeStyleKeys_styleKey.get();\n }\n return [\n baseStyle,\n themedStyle\n ];\n }, true, false);\n var baseViews = host ? (_hooks_getBaseViews = import_setupHooks.hooks.getBaseViews) === null || _hooks_getBaseViews === void 0 ? void 0 : _hooks_getBaseViews.call(import_setupHooks.hooks) : void 0;\n var TextAncestor = baseViews === null || baseViews === void 0 ? void 0 : baseViews.TextAncestor;\n var TextAncestorProvider = TextAncestor === null || TextAncestor === void 0 ? void 0 : TextAncestor.Provider;\n var HostText = host === \"text\" && !(\"userSelect\" in baseStyle) && !(\"verticalAlign\" in baseStyle) ? baseViews === null || baseViews === void 0 ? void 0 : baseViews.NativeText : void 0;\n var hostTextBase = HostText ? {\n overflow: \"hidden\",\n ...baseStyle,\n ...typeof baseStyle.fontWeight === \"number\" && {\n fontWeight: String(baseStyle.fontWeight)\n }\n } : baseStyle;\n var entries = /* @__PURE__ */ new Map();\n var createEntry = function() {\n var entry = {\n style: [\n baseStyle,\n null\n ],\n hostTextStyle: [\n hostTextBase,\n null\n ],\n stateName: \"\",\n theme: null,\n state: null,\n ref: function(node) {\n if (node) linkHost(node, entry.state);\n }\n };\n return entry;\n };\n var ScopeContext = import_useThemeState.ThemeStateContext;\n var engineOf = import_nativeStyleEngine.getNativeStyleEngine;\n var scopeState = import_useThemeState.getThemeState;\n var resolve = import_nativeStyleEngine.resolveNativeStyleMapping;\n var linkState = import_nativeStyleEngine.createNativeStyleLinkState;\n var linkHost = import_nativeStyleEngine.linkNativeStyleHost;\n var assignRef = import_compose_refs.setRef;\n var render = function(props, key) {\n var scopeId = (0, import_react.use)(ScopeContext);\n var inText = TextAncestor ? (0, import_react.use)(TextAncestor) : false;\n var themeState = scopeId && engineOf() ? scopeState(scopeId) : void 0;\n var resetsText = inText && host === \"view\";\n if (!themeState) {\n return resetsText ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TextAncestorProvider, {\n value: false,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Fallback, {\n ...props\n })\n }, key) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Fallback, {\n ...props\n }, key);\n }\n var rest = props;\n if (props._expressions !== void 0) {\n var { _expressions: _ignoredExpressions, ...withoutExpressions } = props;\n rest = withoutExpressions;\n }\n var ref = props.ref;\n var { name, theme } = themeState;\n var asHostText = HostText && !inText;\n var Rendered = asHostText ? HostText : Component;\n var entry = entries.get(scopeId);\n if (!entry) {\n entry = createEntry();\n entries.set(scopeId, entry);\n }\n if (entry.stateName !== name || entry.theme !== theme) {\n var themed = resolve(themeStyleKeys, name, theme);\n entry.style[1] = themed;\n entry.hostTextStyle[1] = themed;\n entry.stateName = name;\n entry.theme = theme;\n entry.state = linkState(themeStyleKeys, scopeId, name, theme);\n }\n var style = asHostText ? entry.hostTextStyle : entry.style;\n var wrapped = resetsText || asHostText && mayRenderText(rest.children);\n var state = entry.state;\n var hostRef = ref == null ? entry.ref : function(node) {\n if (!node) return assignRef(ref, null);\n linkHost(node, state);\n if (typeof ref === \"function\") return ref(node);\n assignRef(ref, node);\n };\n var element = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Rendered, {\n ...asHostText && hostTextProps,\n ...rest,\n ref: hostRef,\n style\n }, wrapped ? void 0 : key);\n if (!wrapped) return element;\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TextAncestorProvider, {\n value: !resetsText,\n children: element\n }, key);\n };\n var NativeStyleView = function(props) {\n return render(props);\n };\n NativeStyleView.inline = function(element) {\n return render(element.props, element.key);\n };\n return NativeStyleView;\n};\nfunction mayRenderText(children) {\n if (children == null) return false;\n if (Array.isArray(children) && children.length <= 3) {\n return children.some(function(child) {\n return child != null && typeof child === \"object\";\n });\n }\n return typeof children === \"object\";\n}\n//# sourceMappingURL=_withNativeStyle.js.map\n"],"mappings":";;;AACA,IAAI,WAAW,OAAO;AACtB,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO;AAC1B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,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SAAS,MAAM;GACrD,IAAI,CAAC,MAAM,OAAO,UAAU,KAAK,IAAI;GACrC,SAAS,MAAM,KAAK;GACpB,IAAI,OAAO,QAAQ,YAAY,OAAO,IAAI,IAAI;GAC9C,UAAU,KAAK,IAAI;EACrB;EACA,IAAI,UAA0B,iBAAC,GAAG,mBAAmB,IAAG,CAAE,UAAU;GAClE,GAAG,cAAc;GACjB,GAAG;GACH,KAAK;GACL;EACF,GAAG,UAAU,KAAK,IAAI,GAAG;EACzB,IAAI,CAAC,SAAS,OAAO;EACrB,OAAuB,iBAAC,GAAG,mBAAmB,IAAG,CAAE,sBAAsB;GACvE,OAAO,CAAC;GACR,UAAU;EACZ,GAAG,GAAG;CACR;CACA,IAAI,kBAAkB,SAAS,OAAO;EACpC,OAAO,OAAO,KAAK;CACrB;CACA,gBAAgB,SAAS,SAAS,SAAS;EACzC,OAAO,OAAO,QAAQ,OAAO,QAAQ,GAAG;CAC1C;CACA,OAAO;AACT;AACA,SAAS,cAAc,UAAU;CAC/B,IAAI,YAAY,MAAM,OAAO;CAC7B,IAAI,MAAM,QAAQ,QAAQ,KAAK,SAAS,UAAU,GAAG;EACnD,OAAO,SAAS,KAAK,SAAS,OAAO;GACnC,OAAO,SAAS,QAAQ,OAAO,UAAU;EAC3C,CAAC;CACH;CACA,OAAO,OAAO,aAAa;AAC7B"}
|
|
@@ -448,6 +448,7 @@ ${banner}
|
|
|
448
448
|
var nativeEngine = (0, import_nativeStyleEngine.getNativeStyleEngine)();
|
|
449
449
|
var canNativeUpdate = !!nativeEngine && !isPassthrough && !isHOC && !willBeAnimated && !groupName && !props.disableNativeStyle;
|
|
450
450
|
stateRef.current.nativePushedStates = canNativeUpdate ? /* @__PURE__ */ new Set() : void 0;
|
|
451
|
+
if (stateRef.current.nativeLink) (0, import_nativeStyleEngine.supersedeNativeViewStates)(stateRef.current.nativeLink.id);
|
|
451
452
|
stateRef.current.nativeThemeState = void 0;
|
|
452
453
|
stateRef.current.nativeActiveState = canNativeUpdate ? themeState === null || themeState === void 0 ? void 0 : themeState.name : void 0;
|
|
453
454
|
var pushViewState = canNativeUpdate ? function(stateName, style2) {
|
|
@@ -448,6 +448,7 @@ ${banner}
|
|
|
448
448
|
var nativeEngine = (0, import_nativeStyleEngine.getNativeStyleEngine)();
|
|
449
449
|
var canNativeUpdate = !!nativeEngine && !isPassthrough && !isHOC && !willBeAnimated && !groupName && !props.disableNativeStyle;
|
|
450
450
|
stateRef.current.nativePushedStates = canNativeUpdate ? /* @__PURE__ */ new Set() : void 0;
|
|
451
|
+
if (stateRef.current.nativeLink) (0, import_nativeStyleEngine.supersedeNativeViewStates)(stateRef.current.nativeLink.id);
|
|
451
452
|
stateRef.current.nativeThemeState = void 0;
|
|
452
453
|
stateRef.current.nativeActiveState = canNativeUpdate ? themeState === null || themeState === void 0 ? void 0 : themeState.name : void 0;
|
|
453
454
|
var pushViewState = canNativeUpdate ? function(stateName, style2) {
|