@tamagui/web 3.0.10 → 3.0.12
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 +18 -4
- package/dist/cjs/_withNativeStyle.native.cjs +18 -4
- package/dist/cjs/_withNativeStyle.native.js +18 -4
- package/dist/cjs/_withNativeStyle.native.js.map +1 -1
- package/dist/cjs/createComponent.cjs +1 -1
- package/dist/cjs/createComponent.native.cjs +1 -1
- package/dist/cjs/createComponent.native.js +1 -1
- package/dist/cjs/createComponent.native.js.map +1 -1
- package/dist/cjs/helpers/nativeStyleEngine.cjs +77 -5
- package/dist/cjs/helpers/nativeStyleEngine.native.cjs +80 -5
- package/dist/cjs/helpers/nativeStyleEngine.native.js +80 -5
- package/dist/cjs/helpers/nativeStyleEngine.native.js.map +1 -1
- package/dist/esm/_withNativeStyle.mjs +19 -5
- package/dist/esm/_withNativeStyle.mjs.map +1 -1
- package/dist/esm/_withNativeStyle.native.js +19 -5
- package/dist/esm/_withNativeStyle.native.js.map +1 -1
- package/dist/esm/createComponent.mjs +1 -1
- package/dist/esm/createComponent.mjs.map +1 -1
- package/dist/esm/createComponent.native.js +1 -1
- package/dist/esm/createComponent.native.js.map +1 -1
- package/dist/esm/helpers/nativeStyleEngine.mjs +75 -6
- package/dist/esm/helpers/nativeStyleEngine.mjs.map +1 -1
- package/dist/esm/helpers/nativeStyleEngine.native.js +78 -6
- package/dist/esm/helpers/nativeStyleEngine.native.js.map +1 -1
- package/package.json +17 -17
- package/src/_withNativeStyle.tsx +34 -13
- package/src/createComponent.tsx +5 -4
- package/src/helpers/nativeStyleEngine.ts +116 -6
- package/src/hooks/useComponentState.ts +34 -1
- package/types/_withNativeStyle.d.ts +5 -4
- package/types/_withNativeStyle.d.ts.map +1 -1
- package/types/createComponent.d.ts.map +1 -1
- package/types/helpers/nativeStyleEngine.d.ts +5 -0
- package/types/helpers/nativeStyleEngine.d.ts.map +1 -1
- package/types/hooks/useComponentState.d.ts +14 -11
- package/types/hooks/useComponentState.d.ts.map +1 -1
|
@@ -60,7 +60,9 @@ const _withNativeStyle = (Component, baseStyle, themeStyleKeys, host) => {
|
|
|
60
60
|
theme: null,
|
|
61
61
|
state: null,
|
|
62
62
|
ref: (node) => {
|
|
63
|
-
if (node)
|
|
63
|
+
if (!node) return;
|
|
64
|
+
captureRoot(node);
|
|
65
|
+
linkHost(node, entry.state);
|
|
64
66
|
}
|
|
65
67
|
};
|
|
66
68
|
return entry;
|
|
@@ -71,6 +73,9 @@ const _withNativeStyle = (Component, baseStyle, themeStyleKeys, host) => {
|
|
|
71
73
|
const resolve = import_nativeStyleEngine.resolveNativeStyleMapping;
|
|
72
74
|
const linkState = import_nativeStyleEngine.createNativeStyleLinkState;
|
|
73
75
|
const linkHost = import_nativeStyleEngine.linkNativeStyleHost;
|
|
76
|
+
const registerStyle = import_nativeStyleEngine.registerNativeStyle;
|
|
77
|
+
const mountMode = import_nativeStyleEngine.nativeStyleMountMode;
|
|
78
|
+
const captureRoot = import_nativeStyleEngine.captureNativeStyleRoot;
|
|
74
79
|
const assignRef = import_compose_refs.setRef;
|
|
75
80
|
const render = (props, key) => {
|
|
76
81
|
const scopeId = (0, import_react.use)(ScopeContext);
|
|
@@ -104,20 +109,24 @@ const _withNativeStyle = (Component, baseStyle, themeStyleKeys, host) => {
|
|
|
104
109
|
entry.stateName = name;
|
|
105
110
|
entry.theme = theme;
|
|
106
111
|
entry.state = linkState(themeStyleKeys, scopeId, name, theme);
|
|
112
|
+
registerStyle(entry.style, entry.state);
|
|
113
|
+
registerStyle(entry.hostTextStyle, entry.state);
|
|
107
114
|
}
|
|
108
115
|
const style = asHostText ? entry.hostTextStyle : entry.style;
|
|
109
116
|
const wrapped = resetsText || asHostText && mayRenderText(rest.children);
|
|
110
117
|
const state = entry.state;
|
|
111
|
-
const
|
|
118
|
+
const discover = mountMode() === "discover";
|
|
119
|
+
const passedRef = discover ? ref ?? null : ref == null ? entry.ref : (node) => {
|
|
112
120
|
if (!node) return assignRef(ref, null);
|
|
121
|
+
captureRoot(node);
|
|
113
122
|
linkHost(node, state);
|
|
114
123
|
if (typeof ref === "function") return ref(node);
|
|
115
124
|
assignRef(ref, node);
|
|
116
125
|
};
|
|
117
126
|
const element = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Rendered, {
|
|
118
127
|
...asHostText && hostTextProps,
|
|
119
|
-
...rest,
|
|
120
|
-
ref:
|
|
128
|
+
...passedRef == null ? omitRef(rest) : rest,
|
|
129
|
+
...passedRef != null ? { ref: passedRef } : null,
|
|
121
130
|
style
|
|
122
131
|
}, wrapped ? void 0 : key);
|
|
123
132
|
if (!wrapped) return element;
|
|
@@ -130,6 +139,11 @@ const _withNativeStyle = (Component, baseStyle, themeStyleKeys, host) => {
|
|
|
130
139
|
NativeStyleView.inline = (element) => render(element.props, element.key);
|
|
131
140
|
return NativeStyleView;
|
|
132
141
|
};
|
|
142
|
+
function omitRef(props) {
|
|
143
|
+
if (!Object.prototype.hasOwnProperty.call(props, "ref")) return props;
|
|
144
|
+
const { ref: _ref, ...rest } = props;
|
|
145
|
+
return rest;
|
|
146
|
+
}
|
|
133
147
|
function mayRenderText(children) {
|
|
134
148
|
if (children == null) return false;
|
|
135
149
|
if (Array.isArray(children) && children.length <= 3) {
|
|
@@ -70,7 +70,9 @@ var _withNativeStyle = function _withNativeStyle2(Component, baseStyle, themeSty
|
|
|
70
70
|
theme: null,
|
|
71
71
|
state: null,
|
|
72
72
|
ref: function ref(node) {
|
|
73
|
-
if (node)
|
|
73
|
+
if (!node) return;
|
|
74
|
+
captureRoot(node);
|
|
75
|
+
linkHost(node, entry.state);
|
|
74
76
|
}
|
|
75
77
|
};
|
|
76
78
|
return entry;
|
|
@@ -81,6 +83,9 @@ var _withNativeStyle = function _withNativeStyle2(Component, baseStyle, themeSty
|
|
|
81
83
|
var resolve = import_nativeStyleEngine.resolveNativeStyleMapping;
|
|
82
84
|
var linkState = import_nativeStyleEngine.createNativeStyleLinkState;
|
|
83
85
|
var linkHost = import_nativeStyleEngine.linkNativeStyleHost;
|
|
86
|
+
var registerStyle = import_nativeStyleEngine.registerNativeStyle;
|
|
87
|
+
var mountMode = import_nativeStyleEngine.nativeStyleMountMode;
|
|
88
|
+
var captureRoot = import_nativeStyleEngine.captureNativeStyleRoot;
|
|
84
89
|
var assignRef = import_compose_refs.setRef;
|
|
85
90
|
var render = function render2(props, key) {
|
|
86
91
|
var scopeId = (0, import_react.use)(ScopeContext);
|
|
@@ -114,20 +119,24 @@ var _withNativeStyle = function _withNativeStyle2(Component, baseStyle, themeSty
|
|
|
114
119
|
entry.stateName = name;
|
|
115
120
|
entry.theme = theme;
|
|
116
121
|
entry.state = linkState(themeStyleKeys, scopeId, name, theme);
|
|
122
|
+
registerStyle(entry.style, entry.state);
|
|
123
|
+
registerStyle(entry.hostTextStyle, entry.state);
|
|
117
124
|
}
|
|
118
125
|
var style = asHostText ? entry.hostTextStyle : entry.style;
|
|
119
126
|
var wrapped = resetsText || asHostText && mayRenderText(rest.children);
|
|
120
127
|
var state = entry.state;
|
|
121
|
-
var
|
|
128
|
+
var discover = mountMode() === "discover";
|
|
129
|
+
var passedRef = discover ? ref !== null && ref !== void 0 ? ref : null : ref == null ? entry.ref : function(node) {
|
|
122
130
|
if (!node) return assignRef(ref, null);
|
|
131
|
+
captureRoot(node);
|
|
123
132
|
linkHost(node, state);
|
|
124
133
|
if (typeof ref === "function") return ref(node);
|
|
125
134
|
assignRef(ref, node);
|
|
126
135
|
};
|
|
127
136
|
var element = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Rendered, {
|
|
128
137
|
...asHostText && hostTextProps,
|
|
129
|
-
...rest,
|
|
130
|
-
ref:
|
|
138
|
+
...passedRef == null ? omitRef(rest) : rest,
|
|
139
|
+
...passedRef != null ? { ref: passedRef } : null,
|
|
131
140
|
style
|
|
132
141
|
}, wrapped ? void 0 : key);
|
|
133
142
|
if (!wrapped) return element;
|
|
@@ -144,6 +153,11 @@ var _withNativeStyle = function _withNativeStyle2(Component, baseStyle, themeSty
|
|
|
144
153
|
};
|
|
145
154
|
return NativeStyleView;
|
|
146
155
|
};
|
|
156
|
+
function omitRef(props) {
|
|
157
|
+
if (!Object.prototype.hasOwnProperty.call(props, "ref")) return props;
|
|
158
|
+
var { ref: _ref, ...rest } = props;
|
|
159
|
+
return rest;
|
|
160
|
+
}
|
|
147
161
|
function mayRenderText(children) {
|
|
148
162
|
if (children == null) return false;
|
|
149
163
|
if (Array.isArray(children) && children.length <= 3) {
|
|
@@ -70,7 +70,9 @@ var _withNativeStyle = function _withNativeStyle2(Component, baseStyle, themeSty
|
|
|
70
70
|
theme: null,
|
|
71
71
|
state: null,
|
|
72
72
|
ref: function ref(node) {
|
|
73
|
-
if (node)
|
|
73
|
+
if (!node) return;
|
|
74
|
+
captureRoot(node);
|
|
75
|
+
linkHost(node, entry.state);
|
|
74
76
|
}
|
|
75
77
|
};
|
|
76
78
|
return entry;
|
|
@@ -81,6 +83,9 @@ var _withNativeStyle = function _withNativeStyle2(Component, baseStyle, themeSty
|
|
|
81
83
|
var resolve = import_nativeStyleEngine.resolveNativeStyleMapping;
|
|
82
84
|
var linkState = import_nativeStyleEngine.createNativeStyleLinkState;
|
|
83
85
|
var linkHost = import_nativeStyleEngine.linkNativeStyleHost;
|
|
86
|
+
var registerStyle = import_nativeStyleEngine.registerNativeStyle;
|
|
87
|
+
var mountMode = import_nativeStyleEngine.nativeStyleMountMode;
|
|
88
|
+
var captureRoot = import_nativeStyleEngine.captureNativeStyleRoot;
|
|
84
89
|
var assignRef = import_compose_refs.setRef;
|
|
85
90
|
var render = function render2(props, key) {
|
|
86
91
|
var scopeId = (0, import_react.use)(ScopeContext);
|
|
@@ -114,20 +119,24 @@ var _withNativeStyle = function _withNativeStyle2(Component, baseStyle, themeSty
|
|
|
114
119
|
entry.stateName = name;
|
|
115
120
|
entry.theme = theme;
|
|
116
121
|
entry.state = linkState(themeStyleKeys, scopeId, name, theme);
|
|
122
|
+
registerStyle(entry.style, entry.state);
|
|
123
|
+
registerStyle(entry.hostTextStyle, entry.state);
|
|
117
124
|
}
|
|
118
125
|
var style = asHostText ? entry.hostTextStyle : entry.style;
|
|
119
126
|
var wrapped = resetsText || asHostText && mayRenderText(rest.children);
|
|
120
127
|
var state = entry.state;
|
|
121
|
-
var
|
|
128
|
+
var discover = mountMode() === "discover";
|
|
129
|
+
var passedRef = discover ? ref !== null && ref !== void 0 ? ref : null : ref == null ? entry.ref : function(node) {
|
|
122
130
|
if (!node) return assignRef(ref, null);
|
|
131
|
+
captureRoot(node);
|
|
123
132
|
linkHost(node, state);
|
|
124
133
|
if (typeof ref === "function") return ref(node);
|
|
125
134
|
assignRef(ref, node);
|
|
126
135
|
};
|
|
127
136
|
var element = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Rendered, {
|
|
128
137
|
...asHostText && hostTextProps,
|
|
129
|
-
...rest,
|
|
130
|
-
ref:
|
|
138
|
+
...passedRef == null ? omitRef(rest) : rest,
|
|
139
|
+
...passedRef != null ? { ref: passedRef } : null,
|
|
131
140
|
style
|
|
132
141
|
}, wrapped ? void 0 : key);
|
|
133
142
|
if (!wrapped) return element;
|
|
@@ -144,6 +153,11 @@ var _withNativeStyle = function _withNativeStyle2(Component, baseStyle, themeSty
|
|
|
144
153
|
};
|
|
145
154
|
return NativeStyleView;
|
|
146
155
|
};
|
|
156
|
+
function omitRef(props) {
|
|
157
|
+
if (!Object.prototype.hasOwnProperty.call(props, "ref")) return props;
|
|
158
|
+
var { ref: _ref, ...rest } = props;
|
|
159
|
+
return rest;
|
|
160
|
+
}
|
|
147
161
|
function mayRenderText(children) {
|
|
148
162
|
if (children == null) return false;
|
|
149
163
|
if (Array.isArray(children) && children.length <= 3) {
|
|
@@ -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 _withNativeStyle2(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 createEntry2() {\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 ref(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 render2(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 = [\n baseStyle,\n themed\n ];\n entry.hostTextStyle = [\n hostTextBase,\n themed\n ];\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 NativeStyleView2(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,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,WAAW,KAAK,YAAY,YAAY,SAAS,OAAO,OAAO,SAAS,aAAa,GAAG,CAAC,IAAI,CAAC,GAAG,YAKnG,cAAc,CAAC,OAAO,CAAC,IAAI,aAAa,UAAU,QAAQ,WAAW;CAAE,OAAO;CAAK,YAAY;AAAK,CAAC,IAAI,QACzG,GACF;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,0BAA0B,CAAC;AAC/B,SAAS,yBAAyB,EAChC,wBAAwB,iBAC1B,CAAC;AACD,OAAO,UAAU,aAAa,uBAAuB;AACrD,IAAI,qBAAqB,QAAQ,mBAAmB;AACpD,IAAI,sBAAsB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,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 _withNativeStyle2(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 createEntry2() {\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 ref(node) {\n if (!node) return;\n captureRoot(node);\n 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 registerStyle = import_nativeStyleEngine.registerNativeStyle;\n var mountMode = import_nativeStyleEngine.nativeStyleMountMode;\n var captureRoot = import_nativeStyleEngine.captureNativeStyleRoot;\n var assignRef = import_compose_refs.setRef;\n var render = function render2(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 = [\n baseStyle,\n themed\n ];\n entry.hostTextStyle = [\n hostTextBase,\n themed\n ];\n entry.stateName = name;\n entry.theme = theme;\n entry.state = linkState(themeStyleKeys, scopeId, name, theme);\n registerStyle(entry.style, entry.state);\n registerStyle(entry.hostTextStyle, entry.state);\n }\n var style = asHostText ? entry.hostTextStyle : entry.style;\n var wrapped = resetsText || asHostText && mayRenderText(rest.children);\n var state = entry.state;\n var discover = mountMode() === \"discover\";\n var passedRef = discover ? ref !== null && ref !== void 0 ? ref : null : ref == null ? entry.ref : function(node) {\n if (!node) return assignRef(ref, null);\n captureRoot(node);\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 ...passedRef == null ? omitRef(rest) : rest,\n ...passedRef != null ? {\n ref: passedRef\n } : null,\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 NativeStyleView2(props) {\n return render(props);\n };\n NativeStyleView.inline = function(element) {\n return render(element.props, element.key);\n };\n return NativeStyleView;\n};\nfunction omitRef(props) {\n if (!Object.prototype.hasOwnProperty.call(props, \"ref\")) return props;\n var { ref: _ref, ...rest } = props;\n return rest;\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,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACp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AAS,QAAQ,OAAO,UAAU;EAC3C,CAAC;CACH;CACA,OAAO,OAAO,aAAa;AAC7B"}
|
|
@@ -887,8 +887,8 @@ ${banner}
|
|
|
887
887
|
const childrenFromHooks = import_setupHooks.hooks.useChildren ? import_setupHooks.hooks.useChildren(elementType, children, viewProps, isPassthrough) : void 0;
|
|
888
888
|
if (isPassthrough) content = import_react.default.createElement(BaseComponent, { style: { display: "contents" } }, propsIn.children);
|
|
889
889
|
else {
|
|
890
|
-
if (childrenFromHooks) content = childrenFromHooks;
|
|
891
890
|
const isRenderPropString = typeof renderProp === "string";
|
|
891
|
+
if (childrenFromHooks && (!renderProp || isRenderPropString)) content = childrenFromHooks;
|
|
892
892
|
if (renderProp && !isRenderPropString) {
|
|
893
893
|
const out = getCustomRender(renderProp, content || children, viewProps, componentState);
|
|
894
894
|
if (out) {
|
|
@@ -979,8 +979,8 @@ ${banner}
|
|
|
979
979
|
var childrenFromHooks = import_setupHooks.hooks.useChildren ? import_setupHooks.hooks.useChildren(elementType, children, viewProps, isPassthrough) : void 0;
|
|
980
980
|
if (isPassthrough) content = /* @__PURE__ */ import_react.default.createElement(BaseComponent, { style: { display: "contents" } }, propsIn.children);
|
|
981
981
|
else {
|
|
982
|
-
if (childrenFromHooks) content = childrenFromHooks;
|
|
983
982
|
var isRenderPropString = typeof renderProp === "string";
|
|
983
|
+
if (childrenFromHooks && (!renderProp || isRenderPropString)) content = childrenFromHooks;
|
|
984
984
|
if (renderProp && !isRenderPropString) {
|
|
985
985
|
var out = getCustomRender(renderProp, content || children, viewProps, componentState);
|
|
986
986
|
if (out) {
|
|
@@ -979,8 +979,8 @@ ${banner}
|
|
|
979
979
|
var childrenFromHooks = import_setupHooks.hooks.useChildren ? import_setupHooks.hooks.useChildren(elementType, children, viewProps, isPassthrough) : void 0;
|
|
980
980
|
if (isPassthrough) content = /* @__PURE__ */ import_react.default.createElement(BaseComponent, { style: { display: "contents" } }, propsIn.children);
|
|
981
981
|
else {
|
|
982
|
-
if (childrenFromHooks) content = childrenFromHooks;
|
|
983
982
|
var isRenderPropString = typeof renderProp === "string";
|
|
983
|
+
if (childrenFromHooks && (!renderProp || isRenderPropString)) content = childrenFromHooks;
|
|
984
984
|
if (renderProp && !isRenderPropString) {
|
|
985
985
|
var out = getCustomRender(renderProp, content || children, viewProps, componentState);
|
|
986
986
|
if (out) {
|