@tamagui/web 3.0.0-beta.1312.1 → 3.0.0-beta.1341.1
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/contexts/ComponentContext.cjs +1 -0
- package/dist/cjs/contexts/ComponentContext.native.cjs +8 -0
- package/dist/cjs/contexts/ComponentContext.native.js +8 -0
- package/dist/cjs/contexts/ComponentContext.native.js.map +1 -1
- package/dist/cjs/createComponent.cjs +3 -1
- package/dist/cjs/createComponent.native.cjs +30 -6
- package/dist/cjs/createComponent.native.js +30 -6
- package/dist/cjs/createComponent.native.js.map +1 -1
- package/dist/cjs/createTamagui.cjs +0 -7
- package/dist/cjs/createTamagui.native.cjs +0 -12
- package/dist/cjs/createTamagui.native.js +0 -12
- package/dist/cjs/createTamagui.native.js.map +1 -1
- package/dist/cjs/dom/html.cjs +87 -329
- package/dist/cjs/dom/html.native.cjs +46 -0
- package/dist/cjs/dom/html.native.js +46 -0
- package/dist/cjs/dom/html.native.js.map +1 -1
- package/dist/cjs/dom/htmlReset.cjs +26 -0
- package/dist/cjs/dom/htmlReset.native.cjs +28 -0
- package/dist/cjs/dom/htmlReset.native.js +30 -0
- package/dist/cjs/dom/htmlReset.native.js.map +1 -0
- package/dist/cjs/dom/htmlStaticConfig.cjs +44 -0
- package/dist/cjs/dom/htmlStaticConfig.native.cjs +46 -0
- package/dist/cjs/dom/htmlStaticConfig.native.js +48 -0
- package/dist/cjs/dom/htmlStaticConfig.native.js.map +1 -0
- package/dist/cjs/dom/primitives.native.cjs +80 -29
- package/dist/cjs/dom/primitives.native.js +80 -29
- package/dist/cjs/dom/primitives.native.js.map +1 -1
- package/dist/cjs/helpers/NativeTextBinding.cjs +36 -0
- package/dist/cjs/helpers/NativeTextBinding.native.cjs +39 -0
- package/dist/cjs/helpers/NativeTextBinding.native.js +41 -0
- package/dist/cjs/helpers/NativeTextBinding.native.js.map +1 -0
- package/dist/cjs/helpers/createDesignSystem.cjs +3 -1
- package/dist/cjs/helpers/createDesignSystem.native.cjs +1 -0
- package/dist/cjs/helpers/createDesignSystem.native.js +1 -0
- package/dist/cjs/helpers/createDesignSystem.native.js.map +1 -1
- package/dist/cjs/helpers/expandStyle.cjs +1 -0
- package/dist/cjs/helpers/expandStyle.native.cjs +13 -0
- package/dist/cjs/helpers/expandStyle.native.js +13 -0
- package/dist/cjs/helpers/expandStyle.native.js.map +1 -1
- package/dist/cjs/helpers/getSplitStyles.cjs +10 -2
- package/dist/cjs/helpers/getSplitStyles.native.cjs +53 -18
- package/dist/cjs/helpers/getSplitStyles.native.js +53 -18
- package/dist/cjs/helpers/getSplitStyles.native.js.map +1 -1
- package/dist/cjs/helpers/mergeProps.cjs +7 -3
- package/dist/cjs/helpers/mergeProps.native.cjs +7 -3
- package/dist/cjs/helpers/mergeProps.native.js +7 -3
- package/dist/cjs/helpers/mergeProps.native.js.map +1 -1
- package/dist/cjs/helpers/nativeTextMetrics.cjs +74 -0
- package/dist/cjs/helpers/nativeTextMetrics.native.cjs +77 -0
- package/dist/cjs/helpers/nativeTextMetrics.native.js +79 -0
- package/dist/cjs/helpers/nativeTextMetrics.native.js.map +1 -0
- package/dist/cjs/helpers/normalizeValueWithProperty.cjs +2 -1
- package/dist/cjs/helpers/normalizeValueWithProperty.native.cjs +2 -1
- package/dist/cjs/helpers/normalizeValueWithProperty.native.js +2 -1
- package/dist/cjs/helpers/normalizeValueWithProperty.native.js.map +1 -1
- package/dist/cjs/helpers/resolveVariableValue.cjs +7 -7
- package/dist/cjs/helpers/resolveVariableValue.native.cjs +7 -9
- package/dist/cjs/helpers/resolveVariableValue.native.js +7 -9
- package/dist/cjs/helpers/resolveVariableValue.native.js.map +1 -1
- package/dist/cjs/helpers/styledDynamic.cjs +0 -1
- package/dist/cjs/helpers/styledDynamic.native.cjs +0 -1
- package/dist/cjs/helpers/styledDynamic.native.js +0 -1
- package/dist/cjs/helpers/styledDynamic.native.js.map +1 -1
- package/dist/cjs/helpers/webPropsToSkip.native.cjs +3 -2
- package/dist/cjs/helpers/webPropsToSkip.native.js +3 -2
- package/dist/cjs/helpers/webPropsToSkip.native.js.map +1 -1
- package/dist/cjs/index.cjs +2 -0
- package/dist/cjs/index.native.cjs +2 -0
- package/dist/cjs/index.native.js +2 -0
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/esm/contexts/ComponentContext.mjs +9 -9
- package/dist/esm/contexts/ComponentContext.mjs.map +1 -1
- package/dist/esm/contexts/ComponentContext.native.js +16 -9
- package/dist/esm/contexts/ComponentContext.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 +30 -6
- package/dist/esm/createComponent.native.js.map +1 -1
- package/dist/esm/createTamagui.mjs +0 -7
- package/dist/esm/createTamagui.mjs.map +1 -1
- package/dist/esm/createTamagui.native.js +0 -12
- package/dist/esm/createTamagui.native.js.map +1 -1
- package/dist/esm/dom/html.mjs +87 -329
- package/dist/esm/dom/html.mjs.map +1 -1
- package/dist/esm/dom/html.native.js +46 -0
- package/dist/esm/dom/html.native.js.map +1 -1
- package/dist/esm/dom/htmlReset.mjs +6 -0
- package/dist/esm/dom/htmlReset.mjs.map +1 -0
- package/dist/esm/dom/htmlReset.native.js +6 -0
- package/dist/esm/dom/htmlReset.native.js.map +1 -0
- package/dist/esm/dom/htmlStaticConfig.mjs +22 -0
- package/dist/esm/dom/htmlStaticConfig.mjs.map +1 -0
- package/dist/esm/dom/htmlStaticConfig.native.js +22 -0
- package/dist/esm/dom/htmlStaticConfig.native.js.map +1 -0
- package/dist/esm/dom/primitives.native.js +80 -29
- package/dist/esm/dom/primitives.native.js.map +1 -1
- package/dist/esm/helpers/NativeTextBinding.mjs +17 -0
- package/dist/esm/helpers/NativeTextBinding.mjs.map +1 -0
- package/dist/esm/helpers/NativeTextBinding.native.js +18 -0
- package/dist/esm/helpers/NativeTextBinding.native.js.map +1 -0
- package/dist/esm/helpers/createDesignSystem.mjs +3 -1
- package/dist/esm/helpers/createDesignSystem.mjs.map +1 -1
- package/dist/esm/helpers/expandStyle.native.js +13 -0
- package/dist/esm/helpers/expandStyle.native.js.map +1 -1
- package/dist/esm/helpers/getSplitStyles.mjs +8 -2
- package/dist/esm/helpers/getSplitStyles.mjs.map +1 -1
- package/dist/esm/helpers/getSplitStyles.native.js +53 -18
- package/dist/esm/helpers/getSplitStyles.native.js.map +1 -1
- package/dist/esm/helpers/mergeProps.mjs +7 -3
- package/dist/esm/helpers/mergeProps.mjs.map +1 -1
- package/dist/esm/helpers/mergeProps.native.js +7 -3
- package/dist/esm/helpers/mergeProps.native.js.map +1 -1
- package/dist/esm/helpers/nativeTextMetrics.mjs +55 -0
- package/dist/esm/helpers/nativeTextMetrics.mjs.map +1 -0
- package/dist/esm/helpers/nativeTextMetrics.native.js +56 -0
- package/dist/esm/helpers/nativeTextMetrics.native.js.map +1 -0
- package/dist/esm/helpers/normalizeValueWithProperty.mjs +2 -1
- package/dist/esm/helpers/normalizeValueWithProperty.mjs.map +1 -1
- package/dist/esm/helpers/normalizeValueWithProperty.native.js +2 -1
- package/dist/esm/helpers/normalizeValueWithProperty.native.js.map +1 -1
- package/dist/esm/helpers/resolveVariableValue.mjs +7 -7
- package/dist/esm/helpers/resolveVariableValue.mjs.map +1 -1
- package/dist/esm/helpers/resolveVariableValue.native.js +7 -9
- package/dist/esm/helpers/resolveVariableValue.native.js.map +1 -1
- package/dist/esm/helpers/styledDynamic.mjs +0 -1
- package/dist/esm/helpers/styledDynamic.mjs.map +1 -1
- package/dist/esm/helpers/styledDynamic.native.js +0 -1
- package/dist/esm/helpers/styledDynamic.native.js.map +1 -1
- package/dist/esm/helpers/webPropsToSkip.native.js +3 -2
- package/dist/esm/helpers/webPropsToSkip.native.js.map +1 -1
- package/dist/esm/index.js +2 -1
- package/dist/esm/index.mjs +2 -1
- package/dist/esm/index.native.js +2 -1
- package/package.json +16 -16
- package/src/contexts/ComponentContext.tsx +8 -0
- package/src/createComponent.tsx +78 -3
- package/src/createTamagui.ts +0 -19
- package/src/dom/contract.ts +4 -1
- package/src/dom/html.native.tsx +46 -0
- package/src/dom/html.tsx +189 -388
- package/src/dom/htmlReset.ts +15 -0
- package/src/dom/htmlStaticConfig.ts +40 -0
- package/src/dom/primitives.native.tsx +138 -33
- package/src/dom/standalone.ts +2 -1
- package/src/dom/styleTypes.ts +16 -23
- package/src/helpers/NativeTextBinding.tsx +26 -0
- package/src/helpers/createDesignSystem.ts +3 -1
- package/src/helpers/expandStyle.ts +30 -0
- package/src/helpers/getSplitStyles.tsx +88 -9
- package/src/helpers/mergeProps.ts +15 -3
- package/src/helpers/nativeTextMetrics.ts +77 -0
- package/src/helpers/normalizeValueWithProperty.ts +2 -1
- package/src/helpers/resolveVariableValue.ts +15 -16
- package/src/helpers/styledDynamic.ts +0 -1
- package/src/helpers/webPropsToSkip.native.ts +9 -2
- package/src/index.ts +3 -3
- package/src/types.tsx +51 -60
- package/types/contexts/ComponentContext.d.ts +1 -1
- package/types/contexts/ComponentContext.d.ts.map +1 -1
- package/types/createComponent.d.ts.map +1 -1
- package/types/createTamagui.d.ts.map +1 -1
- package/types/dom/contract.d.ts +4 -1
- package/types/dom/contract.d.ts.map +1 -1
- package/types/dom/html.d.ts +60 -51
- package/types/dom/html.d.ts.map +1 -1
- package/types/dom/html.native.d.ts.map +1 -1
- package/types/dom/htmlReset.d.ts +10 -0
- package/types/dom/htmlReset.d.ts.map +1 -0
- package/types/dom/htmlStaticConfig.d.ts +22 -0
- package/types/dom/htmlStaticConfig.d.ts.map +1 -0
- package/types/dom/primitives.native.d.ts.map +1 -1
- package/types/dom/standalone.d.ts +2 -1
- package/types/dom/standalone.d.ts.map +1 -1
- package/types/dom/styleTypes.d.ts +16 -26
- package/types/dom/styleTypes.d.ts.map +1 -1
- package/types/helpers/NativeTextBinding.d.ts +11 -0
- package/types/helpers/NativeTextBinding.d.ts.map +1 -0
- package/types/helpers/createDesignSystem.d.ts.map +1 -1
- package/types/helpers/expandStyle.d.ts.map +1 -1
- package/types/helpers/getSplitStyles.d.ts.map +1 -1
- package/types/helpers/mergeProps.d.ts.map +1 -1
- package/types/helpers/nativeTextMetrics.d.ts +16 -0
- package/types/helpers/nativeTextMetrics.d.ts.map +1 -0
- package/types/helpers/normalizeValueWithProperty.d.ts.map +1 -1
- package/types/helpers/resolveVariableValue.d.ts.map +1 -1
- package/types/helpers/styledDynamic.d.ts.map +1 -1
- package/types/helpers/webPropsToSkip.native.d.ts +0 -1
- package/types/helpers/webPropsToSkip.native.d.ts.map +1 -1
- package/types/index.d.ts +2 -1
- package/types/index.d.ts.map +1 -1
- package/types/types.d.ts +30 -45
- package/types/types.d.ts.map +1 -1
|
@@ -31,6 +31,11 @@ var import_createStyledContext = require("../helpers/createStyledContext.native.
|
|
|
31
31
|
var componentContextKeys = [
|
|
32
32
|
"disableSSR",
|
|
33
33
|
"inText",
|
|
34
|
+
...[
|
|
35
|
+
"parentFontSize",
|
|
36
|
+
"parentLineHeight",
|
|
37
|
+
"animatedText"
|
|
38
|
+
],
|
|
34
39
|
"language",
|
|
35
40
|
"animationDriver",
|
|
36
41
|
"setParentFocusState",
|
|
@@ -39,6 +44,9 @@ var componentContextKeys = [
|
|
|
39
44
|
var ComponentContext = (0, import_createStyledContext.createStyledContext)({
|
|
40
45
|
disableSSR: void 0,
|
|
41
46
|
inText: false,
|
|
47
|
+
parentFontSize: void 0,
|
|
48
|
+
parentLineHeight: void 0,
|
|
49
|
+
animatedText: null,
|
|
42
50
|
language: null,
|
|
43
51
|
animationDriver: null,
|
|
44
52
|
setParentFocusState: null,
|
|
@@ -31,6 +31,11 @@ var import_createStyledContext = require("../helpers/createStyledContext.native.
|
|
|
31
31
|
var componentContextKeys = [
|
|
32
32
|
"disableSSR",
|
|
33
33
|
"inText",
|
|
34
|
+
...[
|
|
35
|
+
"parentFontSize",
|
|
36
|
+
"parentLineHeight",
|
|
37
|
+
"animatedText"
|
|
38
|
+
],
|
|
34
39
|
"language",
|
|
35
40
|
"animationDriver",
|
|
36
41
|
"setParentFocusState",
|
|
@@ -39,6 +44,9 @@ var componentContextKeys = [
|
|
|
39
44
|
var ComponentContext = (0, import_createStyledContext.createStyledContext)({
|
|
40
45
|
disableSSR: void 0,
|
|
41
46
|
inText: false,
|
|
47
|
+
parentFontSize: void 0,
|
|
48
|
+
parentLineHeight: void 0,
|
|
49
|
+
animatedText: null,
|
|
42
50
|
language: null,
|
|
43
51
|
animationDriver: null,
|
|
44
52
|
setParentFocusState: null,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComponentContext.native.js","names":[],"sources":["cjs/contexts/ComponentContext.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n
|
|
1
|
+
{"version":3,"file":"ComponentContext.native.js","names":[],"sources":["cjs/contexts/ComponentContext.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n\tfor (var name in all) __defProp(target, name, {\n\t\tget: all[name],\n\t\tenumerable: true\n\t});\n};\nvar __copyProps = (to, from, except, desc) => {\n\tif (from && typeof from === \"object\" || typeof from === \"function\") {\n\t\tfor (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {\n\t\t\tget: () => from[key],\n\t\t\tenumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable\n\t\t});\n\t}\n\treturn to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar ComponentContext_exports = {};\n__export(ComponentContext_exports, {\n\tComponentContext: () => ComponentContext,\n\tuseConfiguration: () => useConfiguration\n});\nmodule.exports = __toCommonJS(ComponentContext_exports);\nvar import_react = require(\"react\");\nvar import_createStyledContext = require(\"../helpers/createStyledContext\");\nvar componentContextKeys = [\n\t\"disableSSR\",\n\t\"inText\",\n\t...[\n\t\t\"parentFontSize\",\n\t\t\"parentLineHeight\",\n\t\t\"animatedText\"\n\t],\n\t\"language\",\n\t\"animationDriver\",\n\t\"setParentFocusState\",\n\t\"insets\"\n];\nvar ComponentContext = (0, import_createStyledContext.createStyledContext)({\n\tdisableSSR: void 0,\n\tinText: false,\n\tparentFontSize: void 0,\n\tparentLineHeight: void 0,\n\tanimatedText: null,\n\tlanguage: null,\n\tanimationDriver: null,\n\tsetParentFocusState: null,\n\tinsets: null\n}, { keys: componentContextKeys });\nvar useConfiguration = function() {\n\treturn (0, import_react.useContext)(ComponentContext);\n};\n//# sourceMappingURL=ComponentContext.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC/B,KAAK,IAAI,QAAQ,KAAK,UAAU,QAAQ,MAAM;EAC7C,KAAK,IAAI;EACT,YAAY;CACb,CAAC;AACF;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC7C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EACnE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GAAG,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QAAQ,UAAU,IAAI,KAAK;GAC9G,WAAW,KAAK;GAChB,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAC3D,CAAC;CACF;CACA,OAAO;AACR;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,2BAA2B,CAAC;AAChC,SAAS,0BAA0B;CAClC,wBAAwB;CACxB,wBAAwB;AACzB,CAAC;AACD,OAAO,UAAU,aAAa,wBAAwB;AACtD,IAAI,eAAe,QAAQ,OAAO;AAClC,IAAI,6BAA6B,QAAQ,0CAAgC;AACzE,IAAI,uBAAuB;CAC1B;CACA;CACA,GAAG;EACF;EACA;EACA;CACD;CACA;CACA;CACA;CACA;AACD;AACA,IAAI,oBAAoB,GAAG,2BAA2B,oBAAmB,CAAE;CAC1E,YAAY,KAAK;CACjB,QAAQ;CACR,gBAAgB,KAAK;CACrB,kBAAkB,KAAK;CACvB,cAAc;CACd,UAAU;CACV,iBAAiB;CACjB,qBAAqB;CACrB,QAAQ;AACT,GAAG,EAAE,MAAM,qBAAqB,CAAC;AACjC,IAAI,mBAAmB,WAAW;CACjC,QAAQ,GAAG,aAAa,WAAU,CAAE,gBAAgB;AACrD"}
|
|
@@ -45,6 +45,8 @@ var import_defaultComponentState = require("./defaultComponentState.cjs");
|
|
|
45
45
|
var import_eventHandling = require("./eventHandling.cjs");
|
|
46
46
|
var import_componentDisplayName = require("./helpers/componentDisplayName.cjs");
|
|
47
47
|
var import_getSplitStyles = require("./helpers/getSplitStyles.cjs");
|
|
48
|
+
require("./helpers/isTamaguiElement.cjs");
|
|
49
|
+
require("./helpers/NativeTextBinding.cjs");
|
|
48
50
|
var import_grammarConfig = require("./helpers/grammarConfig.cjs");
|
|
49
51
|
var import_styleStaticConfig = require("./helpers/styleStaticConfig.cjs");
|
|
50
52
|
require("./helpers/nativeStyleEngine.cjs");
|
|
@@ -524,7 +526,7 @@ ${banner}
|
|
|
524
526
|
const effectiveTransition = nextStyles?.effectiveTransition ?? props.transition ?? (platformPseudo ? "0ms" : void 0);
|
|
525
527
|
stateRef.current.prevPseudoState = (0, import_extractPseudoState.extractPseudoState)(updatedState);
|
|
526
528
|
const hasActivePseudo = Boolean(updatedState.hover || updatedState.press || updatedState.pressIn || updatedState.focus || updatedState.focusWithin);
|
|
527
|
-
useStyleListener(nextStyles?.style || {}, effectiveTransition, hasActivePseudo);
|
|
529
|
+
useStyleListener(nextStyles?.style || {}, effectiveTransition, hasActivePseudo, void 0);
|
|
528
530
|
};
|
|
529
531
|
componentContext.mediaEmitListeners = componentContext.mediaEmitListeners || /* @__PURE__ */ new Set();
|
|
530
532
|
if (!stateRef.current.mediaEmitCleanup) {
|
|
@@ -48,6 +48,8 @@ var import_defaultComponentState = require("./defaultComponentState.native.js");
|
|
|
48
48
|
var import_eventHandling = require("./eventHandling.native.js");
|
|
49
49
|
var import_componentDisplayName = require("./helpers/componentDisplayName.native.js");
|
|
50
50
|
var import_getSplitStyles = require("./helpers/getSplitStyles.native.js");
|
|
51
|
+
var import_isTamaguiElement = require("./helpers/isTamaguiElement.native.js");
|
|
52
|
+
var import_NativeTextBinding = require("./helpers/NativeTextBinding.native.js");
|
|
51
53
|
var import_grammarConfig = require("./helpers/grammarConfig.native.js");
|
|
52
54
|
var import_styleStaticConfig = require("./helpers/styleStaticConfig.native.js");
|
|
53
55
|
var import_nativeStyleEngine = require("./helpers/nativeStyleEngine.native.js");
|
|
@@ -589,7 +591,7 @@ ${banner}
|
|
|
589
591
|
var effectiveTransition2 = (_ref5 = (_nextStyles_effectiveTransition = nextStyles === null || nextStyles === void 0 ? void 0 : nextStyles.effectiveTransition) !== null && _nextStyles_effectiveTransition !== void 0 ? _nextStyles_effectiveTransition : props.transition) !== null && _ref5 !== void 0 ? _ref5 : platformPseudo ? "0ms" : void 0;
|
|
590
592
|
stateRef.current.prevPseudoState = (0, import_extractPseudoState.extractPseudoState)(updatedState);
|
|
591
593
|
var hasActivePseudo = Boolean(updatedState.hover || updatedState.press || updatedState.pressIn || updatedState.focus || updatedState.focusWithin);
|
|
592
|
-
useStyleListener((nextStyles === null || nextStyles === void 0 ? void 0 : nextStyles.style) || {}, effectiveTransition2, hasActivePseudo);
|
|
594
|
+
useStyleListener((nextStyles === null || nextStyles === void 0 ? void 0 : nextStyles.style) || {}, effectiveTransition2, hasActivePseudo, nextStyles === null || nextStyles === void 0 ? void 0 : nextStyles.nativeTextMetrics);
|
|
593
595
|
};
|
|
594
596
|
componentContext.mediaEmitListeners = componentContext.mediaEmitListeners || /* @__PURE__ */ new Set();
|
|
595
597
|
if (!stateRef.current.mediaEmitCleanup) {
|
|
@@ -687,9 +689,11 @@ ${banner}
|
|
|
687
689
|
if (typeof onTransition !== "undefined") viewProps.onTransition = onTransition;
|
|
688
690
|
}
|
|
689
691
|
var animationStyles;
|
|
692
|
+
var animatedText = isText && (splitStyles === null || splitStyles === void 0 ? void 0 : splitStyles.nativeTextMetrics) && !splitStyles.nativeTextMetrics.inheritsFontSize ? null : componentContext.animatedText;
|
|
690
693
|
var shouldUseAnimation = (inputStyle === "css" ? willBeAnimatedClient : willBeAnimated) && useAnimations && !isHOC;
|
|
691
694
|
var animatedRef;
|
|
692
695
|
if (shouldUseAnimation) {
|
|
696
|
+
var _splitStyles_nativeTextMetrics;
|
|
693
697
|
var useStyleEmitter = (animationDriver === null || animationDriver === void 0 ? void 0 : animationDriver.avoidReRenders) ? function(listener) {
|
|
694
698
|
stateRef.current.useStyleListener = listener;
|
|
695
699
|
} : void 0;
|
|
@@ -698,6 +702,7 @@ ${banner}
|
|
|
698
702
|
if (splitStyles) splitStyles.effectiveTransition = effectiveTransition;
|
|
699
703
|
stateRef.current.prevPseudoState = (0, import_extractPseudoState.extractPseudoState)(state);
|
|
700
704
|
var animations = useAnimations({
|
|
705
|
+
inheritedText: (splitStyles === null || splitStyles === void 0 ? void 0 : (_splitStyles_nativeTextMetrics = splitStyles.nativeTextMetrics) === null || _splitStyles_nativeTextMetrics === void 0 ? void 0 : _splitStyles_nativeTextMetrics.inheritsFontSize) ? componentContext.animatedText : null,
|
|
701
706
|
props: propsWithAnimation,
|
|
702
707
|
style: isHydrated ? splitStylesStyle || {} : { ...splitStylesStyle },
|
|
703
708
|
styleState: splitStyles,
|
|
@@ -712,6 +717,7 @@ ${banner}
|
|
|
712
717
|
onTransition
|
|
713
718
|
});
|
|
714
719
|
if (animations) {
|
|
720
|
+
animatedText = animations.textChannel;
|
|
715
721
|
if (animations.ref) animatedRef = animations.ref;
|
|
716
722
|
if (isHydrated && animations) {
|
|
717
723
|
animationStyles = animations.style;
|
|
@@ -994,8 +1000,16 @@ ${banner}
|
|
|
994
1000
|
}
|
|
995
1001
|
}
|
|
996
1002
|
if (!content) {
|
|
1003
|
+
var _splitStyles_nativeTextMetrics1;
|
|
997
1004
|
if (isRenderPropString && elementType["acceptRenderProp"]) viewProps.render = renderProp;
|
|
998
1005
|
content = /* @__PURE__ */ import_react.default.createElement(elementType, viewProps, content || children);
|
|
1006
|
+
if (!shouldUseAnimation && !isHOC && !staticConfig.isDOM && !asChild && (splitStyles === null || splitStyles === void 0 ? void 0 : (_splitStyles_nativeTextMetrics1 = splitStyles.nativeTextMetrics) === null || _splitStyles_nativeTextMetrics1 === void 0 ? void 0 : _splitStyles_nativeTextMetrics1.inheritsFontSize) && componentContext.animatedText && (animationDriver === null || animationDriver === void 0 ? void 0 : animationDriver.useTextMetrics)) content = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_NativeTextBinding.NativeTextBinding, {
|
|
1007
|
+
element: content,
|
|
1008
|
+
useTextMetrics: animationDriver.useTextMetrics,
|
|
1009
|
+
inheritedText: componentContext.animatedText,
|
|
1010
|
+
lineHeight: splitStyles.nativeTextMetrics.lineHeight,
|
|
1011
|
+
isInput: staticConfig.isInput
|
|
1012
|
+
});
|
|
999
1013
|
}
|
|
1000
1014
|
if (process.env.NODE_ENV === "development" && time) time`use-children`;
|
|
1001
1015
|
}
|
|
@@ -1010,15 +1024,25 @@ ${banner}
|
|
|
1010
1024
|
children: content
|
|
1011
1025
|
});
|
|
1012
1026
|
if (process.env.NODE_ENV === "development" && time) time`create-element`;
|
|
1013
|
-
if (conditionalStates === null || conditionalStates === void 0 ? void 0 : conditionalStates.has("focus-within")) content = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ComponentContext.ComponentContext.Provider, {
|
|
1014
|
-
...componentContext,
|
|
1015
|
-
setParentFocusState: setStateShallow,
|
|
1016
|
-
children: content
|
|
1017
|
-
});
|
|
1018
1027
|
if (groupName || isContainer) content = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_GroupContext.GroupContext.Provider, {
|
|
1019
1028
|
value: allGroupContexts,
|
|
1020
1029
|
children: content
|
|
1021
1030
|
});
|
|
1031
|
+
var textMetrics = !staticConfig.isDOM && !isHOC && isText && !(asChild && (0, import_isTamaguiElement.isTamaguiElement)(children)) ? splitStyles === null || splitStyles === void 0 ? void 0 : splitStyles.nativeTextMetrics : void 0;
|
|
1032
|
+
var provideText = !!textMetrics && children !== null && typeof children === "object" && (!componentContext.inText || textMetrics.fontSize !== componentContext.parentFontSize || textMetrics.lineHeight !== componentContext.parentLineHeight || animatedText !== componentContext.animatedText);
|
|
1033
|
+
var provideFocus = conditionalStates === null || conditionalStates === void 0 ? void 0 : conditionalStates.has("focus-within");
|
|
1034
|
+
if (provideText || provideFocus) {
|
|
1035
|
+
var _textMetrics_fontSize;
|
|
1036
|
+
content = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ComponentContext.ComponentContext.Provider, {
|
|
1037
|
+
...componentContext,
|
|
1038
|
+
inText: provideText || componentContext.inText,
|
|
1039
|
+
parentFontSize: (_textMetrics_fontSize = textMetrics === null || textMetrics === void 0 ? void 0 : textMetrics.fontSize) !== null && _textMetrics_fontSize !== void 0 ? _textMetrics_fontSize : componentContext.parentFontSize,
|
|
1040
|
+
parentLineHeight: textMetrics ? textMetrics.lineHeight : componentContext.parentLineHeight,
|
|
1041
|
+
animatedText,
|
|
1042
|
+
setParentFocusState: provideFocus ? setStateShallow : componentContext.setParentFocusState,
|
|
1043
|
+
children: content
|
|
1044
|
+
});
|
|
1045
|
+
}
|
|
1022
1046
|
if (process.env.NODE_ENV === "development" && time) time`group-context`;
|
|
1023
1047
|
content = disableTheme || !splitStyles ? content : (0, import_Theme.getThemedChildren)(themeState, content, themeStateProps, false, stateRef);
|
|
1024
1048
|
if (process.env.NODE_ENV === "development" && time) time`themed-children`;
|
|
@@ -48,6 +48,8 @@ var import_defaultComponentState = require("./defaultComponentState.native.js");
|
|
|
48
48
|
var import_eventHandling = require("./eventHandling.native.js");
|
|
49
49
|
var import_componentDisplayName = require("./helpers/componentDisplayName.native.js");
|
|
50
50
|
var import_getSplitStyles = require("./helpers/getSplitStyles.native.js");
|
|
51
|
+
var import_isTamaguiElement = require("./helpers/isTamaguiElement.native.js");
|
|
52
|
+
var import_NativeTextBinding = require("./helpers/NativeTextBinding.native.js");
|
|
51
53
|
var import_grammarConfig = require("./helpers/grammarConfig.native.js");
|
|
52
54
|
var import_styleStaticConfig = require("./helpers/styleStaticConfig.native.js");
|
|
53
55
|
var import_nativeStyleEngine = require("./helpers/nativeStyleEngine.native.js");
|
|
@@ -589,7 +591,7 @@ ${banner}
|
|
|
589
591
|
var effectiveTransition2 = (_ref5 = (_nextStyles_effectiveTransition = nextStyles === null || nextStyles === void 0 ? void 0 : nextStyles.effectiveTransition) !== null && _nextStyles_effectiveTransition !== void 0 ? _nextStyles_effectiveTransition : props.transition) !== null && _ref5 !== void 0 ? _ref5 : platformPseudo ? "0ms" : void 0;
|
|
590
592
|
stateRef.current.prevPseudoState = (0, import_extractPseudoState.extractPseudoState)(updatedState);
|
|
591
593
|
var hasActivePseudo = Boolean(updatedState.hover || updatedState.press || updatedState.pressIn || updatedState.focus || updatedState.focusWithin);
|
|
592
|
-
useStyleListener((nextStyles === null || nextStyles === void 0 ? void 0 : nextStyles.style) || {}, effectiveTransition2, hasActivePseudo);
|
|
594
|
+
useStyleListener((nextStyles === null || nextStyles === void 0 ? void 0 : nextStyles.style) || {}, effectiveTransition2, hasActivePseudo, nextStyles === null || nextStyles === void 0 ? void 0 : nextStyles.nativeTextMetrics);
|
|
593
595
|
};
|
|
594
596
|
componentContext.mediaEmitListeners = componentContext.mediaEmitListeners || /* @__PURE__ */ new Set();
|
|
595
597
|
if (!stateRef.current.mediaEmitCleanup) {
|
|
@@ -687,9 +689,11 @@ ${banner}
|
|
|
687
689
|
if (typeof onTransition !== "undefined") viewProps.onTransition = onTransition;
|
|
688
690
|
}
|
|
689
691
|
var animationStyles;
|
|
692
|
+
var animatedText = isText && (splitStyles === null || splitStyles === void 0 ? void 0 : splitStyles.nativeTextMetrics) && !splitStyles.nativeTextMetrics.inheritsFontSize ? null : componentContext.animatedText;
|
|
690
693
|
var shouldUseAnimation = (inputStyle === "css" ? willBeAnimatedClient : willBeAnimated) && useAnimations && !isHOC;
|
|
691
694
|
var animatedRef;
|
|
692
695
|
if (shouldUseAnimation) {
|
|
696
|
+
var _splitStyles_nativeTextMetrics;
|
|
693
697
|
var useStyleEmitter = (animationDriver === null || animationDriver === void 0 ? void 0 : animationDriver.avoidReRenders) ? function(listener) {
|
|
694
698
|
stateRef.current.useStyleListener = listener;
|
|
695
699
|
} : void 0;
|
|
@@ -698,6 +702,7 @@ ${banner}
|
|
|
698
702
|
if (splitStyles) splitStyles.effectiveTransition = effectiveTransition;
|
|
699
703
|
stateRef.current.prevPseudoState = (0, import_extractPseudoState.extractPseudoState)(state);
|
|
700
704
|
var animations = useAnimations({
|
|
705
|
+
inheritedText: (splitStyles === null || splitStyles === void 0 ? void 0 : (_splitStyles_nativeTextMetrics = splitStyles.nativeTextMetrics) === null || _splitStyles_nativeTextMetrics === void 0 ? void 0 : _splitStyles_nativeTextMetrics.inheritsFontSize) ? componentContext.animatedText : null,
|
|
701
706
|
props: propsWithAnimation,
|
|
702
707
|
style: isHydrated ? splitStylesStyle || {} : { ...splitStylesStyle },
|
|
703
708
|
styleState: splitStyles,
|
|
@@ -712,6 +717,7 @@ ${banner}
|
|
|
712
717
|
onTransition
|
|
713
718
|
});
|
|
714
719
|
if (animations) {
|
|
720
|
+
animatedText = animations.textChannel;
|
|
715
721
|
if (animations.ref) animatedRef = animations.ref;
|
|
716
722
|
if (isHydrated && animations) {
|
|
717
723
|
animationStyles = animations.style;
|
|
@@ -994,8 +1000,16 @@ ${banner}
|
|
|
994
1000
|
}
|
|
995
1001
|
}
|
|
996
1002
|
if (!content) {
|
|
1003
|
+
var _splitStyles_nativeTextMetrics1;
|
|
997
1004
|
if (isRenderPropString && elementType["acceptRenderProp"]) viewProps.render = renderProp;
|
|
998
1005
|
content = /* @__PURE__ */ import_react.default.createElement(elementType, viewProps, content || children);
|
|
1006
|
+
if (!shouldUseAnimation && !isHOC && !staticConfig.isDOM && !asChild && (splitStyles === null || splitStyles === void 0 ? void 0 : (_splitStyles_nativeTextMetrics1 = splitStyles.nativeTextMetrics) === null || _splitStyles_nativeTextMetrics1 === void 0 ? void 0 : _splitStyles_nativeTextMetrics1.inheritsFontSize) && componentContext.animatedText && (animationDriver === null || animationDriver === void 0 ? void 0 : animationDriver.useTextMetrics)) content = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_NativeTextBinding.NativeTextBinding, {
|
|
1007
|
+
element: content,
|
|
1008
|
+
useTextMetrics: animationDriver.useTextMetrics,
|
|
1009
|
+
inheritedText: componentContext.animatedText,
|
|
1010
|
+
lineHeight: splitStyles.nativeTextMetrics.lineHeight,
|
|
1011
|
+
isInput: staticConfig.isInput
|
|
1012
|
+
});
|
|
999
1013
|
}
|
|
1000
1014
|
if (process.env.NODE_ENV === "development" && time) time`use-children`;
|
|
1001
1015
|
}
|
|
@@ -1010,15 +1024,25 @@ ${banner}
|
|
|
1010
1024
|
children: content
|
|
1011
1025
|
});
|
|
1012
1026
|
if (process.env.NODE_ENV === "development" && time) time`create-element`;
|
|
1013
|
-
if (conditionalStates === null || conditionalStates === void 0 ? void 0 : conditionalStates.has("focus-within")) content = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ComponentContext.ComponentContext.Provider, {
|
|
1014
|
-
...componentContext,
|
|
1015
|
-
setParentFocusState: setStateShallow,
|
|
1016
|
-
children: content
|
|
1017
|
-
});
|
|
1018
1027
|
if (groupName || isContainer) content = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_GroupContext.GroupContext.Provider, {
|
|
1019
1028
|
value: allGroupContexts,
|
|
1020
1029
|
children: content
|
|
1021
1030
|
});
|
|
1031
|
+
var textMetrics = !staticConfig.isDOM && !isHOC && isText && !(asChild && (0, import_isTamaguiElement.isTamaguiElement)(children)) ? splitStyles === null || splitStyles === void 0 ? void 0 : splitStyles.nativeTextMetrics : void 0;
|
|
1032
|
+
var provideText = !!textMetrics && children !== null && typeof children === "object" && (!componentContext.inText || textMetrics.fontSize !== componentContext.parentFontSize || textMetrics.lineHeight !== componentContext.parentLineHeight || animatedText !== componentContext.animatedText);
|
|
1033
|
+
var provideFocus = conditionalStates === null || conditionalStates === void 0 ? void 0 : conditionalStates.has("focus-within");
|
|
1034
|
+
if (provideText || provideFocus) {
|
|
1035
|
+
var _textMetrics_fontSize;
|
|
1036
|
+
content = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ComponentContext.ComponentContext.Provider, {
|
|
1037
|
+
...componentContext,
|
|
1038
|
+
inText: provideText || componentContext.inText,
|
|
1039
|
+
parentFontSize: (_textMetrics_fontSize = textMetrics === null || textMetrics === void 0 ? void 0 : textMetrics.fontSize) !== null && _textMetrics_fontSize !== void 0 ? _textMetrics_fontSize : componentContext.parentFontSize,
|
|
1040
|
+
parentLineHeight: textMetrics ? textMetrics.lineHeight : componentContext.parentLineHeight,
|
|
1041
|
+
animatedText,
|
|
1042
|
+
setParentFocusState: provideFocus ? setStateShallow : componentContext.setParentFocusState,
|
|
1043
|
+
children: content
|
|
1044
|
+
});
|
|
1045
|
+
}
|
|
1022
1046
|
if (process.env.NODE_ENV === "development" && time) time`group-context`;
|
|
1023
1047
|
content = disableTheme || !splitStyles ? content : (0, import_Theme.getThemedChildren)(themeState, content, themeStateProps, false, stateRef);
|
|
1024
1048
|
if (process.env.NODE_ENV === "development" && time) time`themed-children`;
|