@tamagui/web 3.0.0-beta.807.1 → 3.0.0-beta.831.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/config.cjs +1 -1
- package/dist/cjs/config.native.cjs +1 -1
- package/dist/cjs/config.native.js +1 -1
- package/dist/cjs/config.native.js.map +1 -1
- package/dist/cjs/createComponent.cjs +28 -18
- package/dist/cjs/createComponent.native.cjs +30 -20
- package/dist/cjs/createComponent.native.js +30 -20
- package/dist/cjs/createComponent.native.js.map +1 -1
- package/dist/cjs/createStyledHOC.cjs +54 -4
- package/dist/cjs/createStyledHOC.native.cjs +55 -4
- package/dist/cjs/createStyledHOC.native.js +55 -4
- package/dist/cjs/createStyledHOC.native.js.map +1 -1
- package/dist/cjs/createTokens.cjs +1 -1
- package/dist/cjs/createTokens.native.cjs +1 -1
- package/dist/cjs/createTokens.native.js +1 -1
- package/dist/cjs/createTokens.native.js.map +1 -1
- package/dist/cjs/dom/html.cjs +147 -99
- package/dist/cjs/dom/htmlRuntime.native.cjs +6 -2
- package/dist/cjs/dom/htmlRuntime.native.js +6 -2
- package/dist/cjs/dom/htmlRuntime.native.js.map +1 -1
- package/dist/cjs/dom/primitives.native.cjs +16 -13
- package/dist/cjs/dom/primitives.native.js +16 -13
- package/dist/cjs/dom/primitives.native.js.map +1 -1
- package/dist/cjs/helpers/componentDisplayName.cjs +1 -11
- package/dist/cjs/helpers/componentDisplayName.native.cjs +1 -11
- package/dist/cjs/helpers/componentDisplayName.native.js +1 -11
- package/dist/cjs/helpers/componentDisplayName.native.js.map +1 -1
- package/dist/cjs/helpers/directStyleCSS.cjs +101 -104
- package/dist/cjs/helpers/formatDiagnostic.cjs +2 -4
- package/dist/cjs/helpers/formatDiagnostic.native.cjs +2 -4
- package/dist/cjs/helpers/formatDiagnostic.native.js +2 -4
- package/dist/cjs/helpers/formatDiagnostic.native.js.map +1 -1
- package/dist/cjs/helpers/getCSSStylesAtomic.cjs +10 -10
- package/dist/cjs/helpers/getSplitStyles.cjs +168 -600
- package/dist/cjs/helpers/getSplitStyles.native.cjs +168 -762
- package/dist/cjs/helpers/getSplitStyles.native.js +168 -762
- package/dist/cjs/helpers/getSplitStyles.native.js.map +1 -1
- package/dist/cjs/helpers/splitStyleProps.cjs +46 -0
- package/dist/cjs/helpers/splitStyleProps.native.cjs +49 -0
- package/dist/cjs/helpers/splitStyleProps.native.js +51 -0
- package/dist/cjs/helpers/splitStyleProps.native.js.map +1 -0
- package/dist/cjs/helpers/styleStaticConfig.cjs +76 -0
- package/dist/cjs/helpers/styleStaticConfig.native.cjs +79 -0
- package/dist/cjs/helpers/styleStaticConfig.native.js +81 -0
- package/dist/cjs/helpers/styleStaticConfig.native.js.map +1 -0
- package/dist/cjs/helpers/tokenCategories.cjs +32 -71
- package/dist/cjs/helpers/tokenCategories.native.cjs +34 -73
- package/dist/cjs/helpers/tokenCategories.native.js +34 -73
- package/dist/cjs/helpers/tokenCategories.native.js.map +1 -1
- package/dist/cjs/helpers/variantResolvers.cjs +87 -0
- package/dist/cjs/helpers/variantResolvers.native.cjs +140 -0
- package/dist/cjs/helpers/variantResolvers.native.js +142 -0
- package/dist/cjs/helpers/variantResolvers.native.js.map +1 -0
- package/dist/cjs/hooks/useSplitStyles.cjs +2 -2
- package/dist/cjs/hooks/useSplitStyles.native.cjs +2 -2
- package/dist/cjs/hooks/useSplitStyles.native.js +2 -2
- package/dist/cjs/hooks/useSplitStyles.native.js.map +1 -1
- package/dist/cjs/index.cjs +3 -9
- package/dist/cjs/index.native.cjs +3 -9
- package/dist/cjs/index.native.js +3 -9
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/internal-runtime.cjs +8 -7
- package/dist/cjs/internal-runtime.native.cjs +8 -7
- package/dist/cjs/internal-runtime.native.js +8 -7
- package/dist/cjs/internal-runtime.native.js.map +1 -1
- package/dist/cjs/static-resolve.cjs +6 -5
- package/dist/cjs/static-resolve.native.cjs +6 -5
- package/dist/cjs/static-resolve.native.js +6 -5
- package/dist/cjs/static-resolve.native.js.map +1 -1
- package/dist/cjs/styled.cjs +4 -56
- package/dist/cjs/styled.native.cjs +4 -58
- package/dist/cjs/styled.native.js +4 -58
- package/dist/cjs/styled.native.js.map +1 -1
- package/dist/cjs/types.cjs +1 -21
- package/dist/cjs/types.native.cjs +1 -21
- package/dist/cjs/types.native.js +1 -21
- package/dist/cjs/types.native.js.map +1 -1
- package/dist/cjs/views/Text.cjs +4 -2
- package/dist/cjs/views/Text.native.cjs +4 -2
- package/dist/cjs/views/Text.native.js +4 -2
- package/dist/cjs/views/Text.native.js.map +1 -1
- package/dist/cjs/views/View.cjs +4 -2
- package/dist/cjs/views/View.native.cjs +4 -2
- package/dist/cjs/views/View.native.js +4 -2
- package/dist/cjs/views/View.native.js.map +1 -1
- package/dist/esm/config.mjs +1 -1
- package/dist/esm/config.mjs.map +1 -1
- package/dist/esm/config.native.js +1 -1
- package/dist/esm/config.native.js.map +1 -1
- package/dist/esm/createComponent.mjs +29 -19
- package/dist/esm/createComponent.mjs.map +1 -1
- package/dist/esm/createComponent.native.js +31 -21
- package/dist/esm/createComponent.native.js.map +1 -1
- package/dist/esm/createStyledHOC.mjs +55 -5
- package/dist/esm/createStyledHOC.mjs.map +1 -1
- package/dist/esm/createStyledHOC.native.js +56 -5
- package/dist/esm/createStyledHOC.native.js.map +1 -1
- package/dist/esm/createTokens.mjs +1 -1
- package/dist/esm/createTokens.mjs.map +1 -1
- package/dist/esm/createTokens.native.js +1 -1
- package/dist/esm/createTokens.native.js.map +1 -1
- package/dist/esm/dom/html.mjs +147 -99
- package/dist/esm/dom/html.mjs.map +1 -1
- package/dist/esm/dom/htmlRuntime.native.js +7 -3
- package/dist/esm/dom/htmlRuntime.native.js.map +1 -1
- package/dist/esm/dom/primitives.native.js +16 -13
- package/dist/esm/dom/primitives.native.js.map +1 -1
- package/dist/esm/helpers/componentDisplayName.mjs +1 -8
- package/dist/esm/helpers/componentDisplayName.mjs.map +1 -1
- package/dist/esm/helpers/componentDisplayName.native.js +1 -8
- package/dist/esm/helpers/componentDisplayName.native.js.map +1 -1
- package/dist/esm/helpers/directStyleCSS.mjs +101 -104
- package/dist/esm/helpers/directStyleCSS.mjs.map +1 -1
- package/dist/esm/helpers/formatDiagnostic.mjs +2 -4
- package/dist/esm/helpers/formatDiagnostic.mjs.map +1 -1
- package/dist/esm/helpers/formatDiagnostic.native.js +2 -4
- package/dist/esm/helpers/formatDiagnostic.native.js.map +1 -1
- package/dist/esm/helpers/getCSSStylesAtomic.mjs +10 -10
- package/dist/esm/helpers/getCSSStylesAtomic.mjs.map +1 -1
- package/dist/esm/helpers/getSplitStyles.mjs +166 -594
- package/dist/esm/helpers/getSplitStyles.mjs.map +1 -1
- package/dist/esm/helpers/getSplitStyles.native.js +166 -757
- package/dist/esm/helpers/getSplitStyles.native.js.map +1 -1
- package/dist/esm/helpers/splitStyleProps.mjs +27 -0
- package/dist/esm/helpers/splitStyleProps.mjs.map +1 -0
- package/dist/esm/helpers/splitStyleProps.native.js +28 -0
- package/dist/esm/helpers/splitStyleProps.native.js.map +1 -0
- package/dist/esm/helpers/styleStaticConfig.mjs +57 -0
- package/dist/esm/helpers/styleStaticConfig.mjs.map +1 -0
- package/dist/esm/helpers/styleStaticConfig.native.js +58 -0
- package/dist/esm/helpers/styleStaticConfig.native.js.map +1 -0
- package/dist/esm/helpers/tokenCategories.mjs +33 -72
- package/dist/esm/helpers/tokenCategories.mjs.map +1 -1
- package/dist/esm/helpers/tokenCategories.native.js +35 -74
- package/dist/esm/helpers/tokenCategories.native.js.map +1 -1
- package/dist/esm/helpers/variantResolvers.mjs +65 -0
- package/dist/esm/helpers/variantResolvers.mjs.map +1 -0
- package/dist/esm/helpers/variantResolvers.native.js +116 -0
- package/dist/esm/helpers/variantResolvers.native.js.map +1 -0
- package/dist/esm/hooks/useSplitStyles.mjs +2 -2
- package/dist/esm/hooks/useSplitStyles.mjs.map +1 -1
- package/dist/esm/hooks/useSplitStyles.native.js +2 -2
- package/dist/esm/hooks/useSplitStyles.native.js.map +1 -1
- package/dist/esm/index.js +3 -5
- package/dist/esm/index.mjs +3 -5
- package/dist/esm/index.native.js +3 -5
- package/dist/esm/internal-runtime.mjs +8 -7
- package/dist/esm/internal-runtime.mjs.map +1 -1
- package/dist/esm/internal-runtime.native.js +8 -7
- package/dist/esm/internal-runtime.native.js.map +1 -1
- package/dist/esm/static-resolve.mjs +8 -6
- package/dist/esm/static-resolve.mjs.map +1 -1
- package/dist/esm/static-resolve.native.js +8 -6
- package/dist/esm/static-resolve.native.js.map +1 -1
- package/dist/esm/styled.mjs +6 -57
- package/dist/esm/styled.mjs.map +1 -1
- package/dist/esm/styled.native.js +6 -59
- package/dist/esm/styled.native.js.map +1 -1
- package/dist/esm/types.mjs +1 -18
- package/dist/esm/types.mjs.map +1 -1
- package/dist/esm/types.native.js +1 -18
- package/dist/esm/types.native.js.map +1 -1
- package/dist/esm/views/Text.mjs +4 -2
- package/dist/esm/views/Text.mjs.map +1 -1
- package/dist/esm/views/Text.native.js +4 -2
- package/dist/esm/views/Text.native.js.map +1 -1
- package/dist/esm/views/View.mjs +4 -2
- package/dist/esm/views/View.mjs.map +1 -1
- package/dist/esm/views/View.native.js +4 -2
- package/dist/esm/views/View.native.js.map +1 -1
- package/package.json +15 -15
- package/src/config.ts +1 -1
- package/src/createComponent.tsx +41 -30
- package/src/createStyledHOC.tsx +56 -9
- package/src/createTokens.ts +1 -1
- package/src/dom/html.tsx +778 -877
- package/src/dom/htmlRuntime.native.tsx +7 -3
- package/src/dom/primitives.native.tsx +30 -39
- package/src/helpers/componentDisplayName.ts +0 -11
- package/src/helpers/directStyleCSS.ts +91 -112
- package/src/helpers/formatDiagnostic.ts +2 -4
- package/src/helpers/getCSSStylesAtomic.ts +32 -26
- package/src/helpers/getSplitStyles.tsx +315 -1119
- package/src/helpers/getVariantExtras.tsx +3 -3
- package/src/helpers/splitStyleProps.ts +166 -0
- package/src/helpers/styleFrontend.ts +8 -4
- package/src/helpers/styleStaticConfig.ts +88 -0
- package/src/helpers/tokenCategories.ts +62 -93
- package/src/helpers/variantResolvers.ts +121 -0
- package/src/hooks/useSplitStyles.tsx +17 -2
- package/src/hooks/useTheme.tsx +1 -1
- package/src/index.ts +8 -4
- package/src/internal-runtime.ts +10 -9
- package/src/static-resolve.ts +18 -14
- package/src/styled.tsx +7 -264
- package/src/types.tsx +19 -40
- package/src/views/Text.tsx +6 -7
- package/src/views/View.tsx +6 -7
- package/types/createComponent.d.ts.map +1 -1
- package/types/createStyledHOC.d.ts.map +1 -1
- package/types/dom/html.d.ts.map +1 -1
- package/types/dom/htmlRuntime.native.d.ts.map +1 -1
- package/types/dom/primitives.native.d.ts.map +1 -1
- package/types/helpers/componentDisplayName.d.ts +0 -3
- package/types/helpers/componentDisplayName.d.ts.map +1 -1
- package/types/helpers/directStyleCSS.d.ts.map +1 -1
- package/types/helpers/formatDiagnostic.d.ts.map +1 -1
- package/types/helpers/getCSSStylesAtomic.d.ts +17 -15
- package/types/helpers/getCSSStylesAtomic.d.ts.map +1 -1
- package/types/helpers/getSplitStyles.d.ts +6 -6
- package/types/helpers/getSplitStyles.d.ts.map +1 -1
- package/types/helpers/splitStyleProps.d.ts +44 -0
- package/types/helpers/splitStyleProps.d.ts.map +1 -0
- package/types/helpers/styleFrontend.d.ts +4 -4
- package/types/helpers/styleFrontend.d.ts.map +1 -1
- package/types/helpers/styleStaticConfig.d.ts +19 -0
- package/types/helpers/styleStaticConfig.d.ts.map +1 -0
- package/types/helpers/tokenCategories.d.ts +1 -1
- package/types/helpers/tokenCategories.d.ts.map +1 -1
- package/types/helpers/variantResolvers.d.ts +9 -0
- package/types/helpers/variantResolvers.d.ts.map +1 -0
- package/types/hooks/useSplitStyles.d.ts.map +1 -1
- package/types/index.d.ts +2 -4
- package/types/index.d.ts.map +1 -1
- package/types/internal-runtime.d.ts.map +1 -1
- package/types/static-resolve.d.ts +2 -2
- package/types/static-resolve.d.ts.map +1 -1
- package/types/styled.d.ts +3 -39
- package/types/styled.d.ts.map +1 -1
- package/types/types.d.ts +2 -12
- package/types/types.d.ts.map +1 -1
- package/types/views/Text.d.ts.map +1 -1
- package/types/views/View.d.ts.map +1 -1
- package/dist/cjs/helpers/getDefaultProps.cjs +0 -24
- package/dist/cjs/helpers/getDefaultProps.native.cjs +0 -28
- package/dist/cjs/helpers/getDefaultProps.native.js +0 -30
- package/dist/cjs/helpers/getDefaultProps.native.js.map +0 -1
- package/dist/cjs/helpers/themeable.cjs +0 -92
- package/dist/cjs/helpers/themeable.native.cjs +0 -95
- package/dist/cjs/helpers/themeable.native.js +0 -97
- package/dist/cjs/helpers/themeable.native.js.map +0 -1
- package/dist/cjs/hooks/useProps.cjs +0 -129
- package/dist/cjs/hooks/useProps.native.cjs +0 -135
- package/dist/cjs/hooks/useProps.native.js +0 -137
- package/dist/cjs/hooks/useProps.native.js.map +0 -1
- package/dist/esm/helpers/getDefaultProps.mjs +0 -4
- package/dist/esm/helpers/getDefaultProps.mjs.map +0 -1
- package/dist/esm/helpers/getDefaultProps.native.js +0 -6
- package/dist/esm/helpers/getDefaultProps.native.js.map +0 -1
- package/dist/esm/helpers/themeable.mjs +0 -67
- package/dist/esm/helpers/themeable.mjs.map +0 -1
- package/dist/esm/helpers/themeable.native.js +0 -68
- package/dist/esm/helpers/themeable.native.js.map +0 -1
- package/dist/esm/hooks/useProps.mjs +0 -100
- package/dist/esm/hooks/useProps.mjs.map +0 -1
- package/dist/esm/hooks/useProps.native.js +0 -104
- package/dist/esm/hooks/useProps.native.js.map +0 -1
- package/src/helpers/getDefaultProps.ts +0 -3
- package/src/helpers/themeable.tsx +0 -96
- package/src/hooks/useProps.tsx +0 -186
- package/types/helpers/getDefaultProps.d.ts +0 -3
- package/types/helpers/getDefaultProps.d.ts.map +0 -1
- package/types/helpers/themeable.d.ts +0 -3
- package/types/helpers/themeable.d.ts.map +0 -1
- package/types/hooks/useProps.d.ts +0 -39
- package/types/hooks/useProps.d.ts.map +0 -1
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
+
get: () => from[key],
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
+
var splitStyleProps_exports = {};
|
|
22
|
+
__export(splitStyleProps_exports, { splitStyleProps: () => splitStyleProps });
|
|
23
|
+
module.exports = __toCommonJS(splitStyleProps_exports);
|
|
24
|
+
var import_helpers = require("@tamagui/helpers");
|
|
25
|
+
var import_config = require("../config.cjs");
|
|
26
|
+
function splitStyleProps(props, options = {}) {
|
|
27
|
+
const styleProps = {};
|
|
28
|
+
const regularProps = {};
|
|
29
|
+
const { expandShorthands = false, filter } = options;
|
|
30
|
+
const shorthands = (0, import_config.getConfig)().shorthands;
|
|
31
|
+
const filterIsFunction = typeof filter === "function";
|
|
32
|
+
const propsRecord = props;
|
|
33
|
+
for (const originalKey in props) {
|
|
34
|
+
if (!Object.hasOwn(props, originalKey)) continue;
|
|
35
|
+
const value = propsRecord[originalKey];
|
|
36
|
+
const key = shorthands[originalKey] || originalKey;
|
|
37
|
+
const isStyleProp = key in import_helpers.stylePropsAll;
|
|
38
|
+
const selected = filter ? filterIsFunction ? filter(key, value, originalKey, isStyleProp) : Object.hasOwn(filter, key) : isStyleProp;
|
|
39
|
+
if (selected) {
|
|
40
|
+
styleProps[expandShorthands ? key : originalKey] = value;
|
|
41
|
+
} else {
|
|
42
|
+
regularProps[originalKey] = value;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return [styleProps, regularProps];
|
|
46
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
+
get: () => from[key],
|
|
17
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
|
+
var splitStyleProps_exports = {};
|
|
24
|
+
__export(splitStyleProps_exports, { splitStyleProps: () => splitStyleProps });
|
|
25
|
+
module.exports = __toCommonJS(splitStyleProps_exports);
|
|
26
|
+
var import_helpers = require("@tamagui/helpers");
|
|
27
|
+
var import_config = require("../config.native.js");
|
|
28
|
+
function splitStyleProps(props) {
|
|
29
|
+
var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
30
|
+
var styleProps = {};
|
|
31
|
+
var regularProps = {};
|
|
32
|
+
var { expandShorthands = false, filter } = options;
|
|
33
|
+
var shorthands = (0, import_config.getConfig)().shorthands;
|
|
34
|
+
var filterIsFunction = typeof filter === "function";
|
|
35
|
+
var propsRecord = props;
|
|
36
|
+
for (var originalKey in props) {
|
|
37
|
+
if (!Object.hasOwn(props, originalKey)) continue;
|
|
38
|
+
var value = propsRecord[originalKey];
|
|
39
|
+
var key = shorthands[originalKey] || originalKey;
|
|
40
|
+
var isStyleProp = key in import_helpers.stylePropsAll;
|
|
41
|
+
var selected = filter ? filterIsFunction ? filter(key, value, originalKey, isStyleProp) : Object.hasOwn(filter, key) : isStyleProp;
|
|
42
|
+
if (selected) {
|
|
43
|
+
styleProps[expandShorthands ? key : originalKey] = value;
|
|
44
|
+
} else {
|
|
45
|
+
regularProps[originalKey] = value;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return [styleProps, regularProps];
|
|
49
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
+
get: () => from[key],
|
|
17
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
|
+
var splitStyleProps_exports = {};
|
|
24
|
+
__export(splitStyleProps_exports, { splitStyleProps: () => splitStyleProps });
|
|
25
|
+
module.exports = __toCommonJS(splitStyleProps_exports);
|
|
26
|
+
var import_helpers = require("@tamagui/helpers");
|
|
27
|
+
var import_config = require("../config.native.js");
|
|
28
|
+
function splitStyleProps(props) {
|
|
29
|
+
var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
30
|
+
var styleProps = {};
|
|
31
|
+
var regularProps = {};
|
|
32
|
+
var { expandShorthands = false, filter } = options;
|
|
33
|
+
var shorthands = (0, import_config.getConfig)().shorthands;
|
|
34
|
+
var filterIsFunction = typeof filter === "function";
|
|
35
|
+
var propsRecord = props;
|
|
36
|
+
for (var originalKey in props) {
|
|
37
|
+
if (!Object.hasOwn(props, originalKey)) continue;
|
|
38
|
+
var value = propsRecord[originalKey];
|
|
39
|
+
var key = shorthands[originalKey] || originalKey;
|
|
40
|
+
var isStyleProp = key in import_helpers.stylePropsAll;
|
|
41
|
+
var selected = filter ? filterIsFunction ? filter(key, value, originalKey, isStyleProp) : Object.hasOwn(filter, key) : isStyleProp;
|
|
42
|
+
if (selected) {
|
|
43
|
+
styleProps[expandShorthands ? key : originalKey] = value;
|
|
44
|
+
} else {
|
|
45
|
+
regularProps[originalKey] = value;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return [styleProps, regularProps];
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
//# sourceMappingURL=splitStyleProps.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"splitStyleProps.native.js","names":[],"sources":["cjs/helpers/splitStyleProps.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 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 __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar splitStyleProps_exports = {};\n__export(splitStyleProps_exports, {\n splitStyleProps: () => splitStyleProps\n});\nmodule.exports = __toCommonJS(splitStyleProps_exports);\nvar import_helpers = require(\"@tamagui/helpers\");\nvar import_config = require(\"../config\");\nfunction splitStyleProps(props) {\n var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};\n var styleProps = {};\n var regularProps = {};\n var { expandShorthands = false, filter } = options;\n var shorthands = (0, import_config.getConfig)().shorthands;\n var filterIsFunction = typeof filter === \"function\";\n var propsRecord = props;\n for (var originalKey in props) {\n if (!Object.hasOwn(props, originalKey)) continue;\n var value = propsRecord[originalKey];\n var key = shorthands[originalKey] || originalKey;\n var isStyleProp = key in import_helpers.stylePropsAll;\n var selected = filter ? filterIsFunction ? filter(key, value, originalKey, isStyleProp) : Object.hasOwn(filter, key) : isStyleProp;\n if (selected) {\n styleProps[expandShorthands ? key : originalKey] = value;\n } else {\n regularProps[originalKey] = value;\n }\n }\n return [\n styleProps,\n regularProps\n ];\n}\n//# sourceMappingURL=splitStyleProps.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;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,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,0BAA0B,CAAC;AAC/B,SAAS,yBAAyB,EAChC,uBAAuB,gBACzB,CAAC;AACD,OAAO,UAAU,aAAa,uBAAuB;AACrD,IAAI,iBAAiB,QAAQ,kBAAkB;AAC/C,IAAI,gBAAgB,QAAQ,qBAAW;AACvC,SAAS,gBAAgB,OAAO;CAC9B,IAAI,UAAU,UAAU,SAAS,KAAK,UAAU,OAAO,KAAK,IAAI,UAAU,KAAK,CAAC;CAChF,IAAI,aAAa,CAAC;CAClB,IAAI,eAAe,CAAC;CACpB,IAAI,EAAE,mBAAmB,OAAO,WAAW;CAC3C,IAAI,cAAc,GAAG,cAAc,UAAS,CAAE,CAAC,CAAC;CAChD,IAAI,mBAAmB,OAAO,WAAW;CACzC,IAAI,cAAc;CAClB,KAAK,IAAI,eAAe,OAAO;EAC7B,IAAI,CAAC,OAAO,OAAO,OAAO,WAAW,GAAG;EACxC,IAAI,QAAQ,YAAY;EACxB,IAAI,MAAM,WAAW,gBAAgB;EACrC,IAAI,cAAc,OAAO,eAAe;EACxC,IAAI,WAAW,SAAS,mBAAmB,OAAO,KAAK,OAAO,aAAa,WAAW,IAAI,OAAO,OAAO,QAAQ,GAAG,IAAI;EACvH,IAAI,UAAU;GACZ,WAAW,mBAAmB,MAAM,eAAe;EACrD,OAAO;GACL,aAAa,eAAe;EAC9B;CACF;CACA,OAAO,CACL,YACA,YACF;AACF"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
+
get: () => from[key],
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
+
var styleStaticConfig_exports = {};
|
|
22
|
+
__export(styleStaticConfig_exports, { getStyleStaticConfig: () => getStyleStaticConfig });
|
|
23
|
+
module.exports = __toCommonJS(styleStaticConfig_exports);
|
|
24
|
+
var import_helpers = require("@tamagui/helpers");
|
|
25
|
+
var import_grammarConfig = require("./grammarConfig.cjs");
|
|
26
|
+
const styleStaticConfigCache = /* @__PURE__ */ new WeakMap();
|
|
27
|
+
function getStyleStaticConfig(staticConfig, conf) {
|
|
28
|
+
let configCache = styleStaticConfigCache.get(staticConfig);
|
|
29
|
+
const revision = (0, import_grammarConfig.getConfigRevisionState)(conf).revision;
|
|
30
|
+
const cached = configCache?.get(conf);
|
|
31
|
+
if (cached?.revision === revision) return cached.value;
|
|
32
|
+
const normalized = staticConfig.styleFrontend?.normalizeStaticConfig?.(staticConfig, conf);
|
|
33
|
+
const variants = normalized ? normalized.variants : staticConfig.variants;
|
|
34
|
+
const authoredBaseStyle = normalized ? normalized.baseStyle : staticConfig.baseStyle;
|
|
35
|
+
const authoredDefaultProps = staticConfig.defaultProps;
|
|
36
|
+
let baseStyle;
|
|
37
|
+
let baseVariantProps;
|
|
38
|
+
let defaultProps;
|
|
39
|
+
if (authoredDefaultProps) {
|
|
40
|
+
const validStyles = staticConfig.validStyles || (staticConfig.isText || staticConfig.isInput ? import_helpers.stylePropsText : import_helpers.validStyles);
|
|
41
|
+
for (const key in authoredDefaultProps) {
|
|
42
|
+
const isVariant = Boolean(variants?.[key]);
|
|
43
|
+
const isStyle = key !== "transition" && (key in validStyles || key in conf.shorthands);
|
|
44
|
+
if (isVariant || isStyle) {
|
|
45
|
+
;
|
|
46
|
+
(baseStyle ||= authoredBaseStyle ? { ...authoredBaseStyle } : {})[key] = authoredDefaultProps[key];
|
|
47
|
+
}
|
|
48
|
+
if (isVariant || !isStyle) {
|
|
49
|
+
;
|
|
50
|
+
(defaultProps ||= {})[key] = authoredDefaultProps[key];
|
|
51
|
+
}
|
|
52
|
+
if (isVariant) {
|
|
53
|
+
;
|
|
54
|
+
(baseVariantProps ||= {})[key] = authoredDefaultProps[key];
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
const keys = staticConfig.contextProps || staticConfig.context?.propKeys;
|
|
59
|
+
const value = {
|
|
60
|
+
baseStyle: baseStyle || authoredBaseStyle,
|
|
61
|
+
baseVariantProps,
|
|
62
|
+
defaultProps,
|
|
63
|
+
styledContextKeys: keys ? new Set(keys) : null,
|
|
64
|
+
variants,
|
|
65
|
+
passthroughClassName: normalized ? normalized.passthroughClassName : staticConfig.passthroughClassName
|
|
66
|
+
};
|
|
67
|
+
if (!configCache) {
|
|
68
|
+
configCache = /* @__PURE__ */ new WeakMap();
|
|
69
|
+
styleStaticConfigCache.set(staticConfig, configCache);
|
|
70
|
+
}
|
|
71
|
+
configCache.set(conf, {
|
|
72
|
+
revision,
|
|
73
|
+
value
|
|
74
|
+
});
|
|
75
|
+
return value;
|
|
76
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
+
get: () => from[key],
|
|
17
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
|
+
var styleStaticConfig_exports = {};
|
|
24
|
+
__export(styleStaticConfig_exports, { getStyleStaticConfig: () => getStyleStaticConfig });
|
|
25
|
+
module.exports = __toCommonJS(styleStaticConfig_exports);
|
|
26
|
+
var import_helpers = require("@tamagui/helpers");
|
|
27
|
+
var import_grammarConfig = require("./grammarConfig.native.js");
|
|
28
|
+
var styleStaticConfigCache = /* @__PURE__ */ new WeakMap();
|
|
29
|
+
function getStyleStaticConfig(staticConfig, conf) {
|
|
30
|
+
var _staticConfig_styleFrontend_normalizeStaticConfig, _staticConfig_styleFrontend, _staticConfig_context;
|
|
31
|
+
var configCache = styleStaticConfigCache.get(staticConfig);
|
|
32
|
+
var revision = (0, import_grammarConfig.getConfigRevisionState)(conf).revision;
|
|
33
|
+
var cached = configCache === null || configCache === void 0 ? void 0 : configCache.get(conf);
|
|
34
|
+
if ((cached === null || cached === void 0 ? void 0 : cached.revision) === revision) return cached.value;
|
|
35
|
+
var normalized = (_staticConfig_styleFrontend = staticConfig.styleFrontend) === null || _staticConfig_styleFrontend === void 0 ? void 0 : (_staticConfig_styleFrontend_normalizeStaticConfig = _staticConfig_styleFrontend.normalizeStaticConfig) === null || _staticConfig_styleFrontend_normalizeStaticConfig === void 0 ? void 0 : _staticConfig_styleFrontend_normalizeStaticConfig.call(_staticConfig_styleFrontend, staticConfig, conf);
|
|
36
|
+
var variants = normalized ? normalized.variants : staticConfig.variants;
|
|
37
|
+
var authoredBaseStyle = normalized ? normalized.baseStyle : staticConfig.baseStyle;
|
|
38
|
+
var authoredDefaultProps = staticConfig.defaultProps;
|
|
39
|
+
var baseStyle;
|
|
40
|
+
var baseVariantProps;
|
|
41
|
+
var defaultProps;
|
|
42
|
+
if (authoredDefaultProps) {
|
|
43
|
+
var validStyles = staticConfig.validStyles || (staticConfig.isText || staticConfig.isInput ? import_helpers.stylePropsText : import_helpers.validStyles);
|
|
44
|
+
for (var key in authoredDefaultProps) {
|
|
45
|
+
var isVariant = Boolean(variants === null || variants === void 0 ? void 0 : variants[key]);
|
|
46
|
+
var isStyle = key !== "transition" && (key in validStyles || key in conf.shorthands);
|
|
47
|
+
if (isVariant || isStyle) {
|
|
48
|
+
;
|
|
49
|
+
(baseStyle || (baseStyle = authoredBaseStyle ? { ...authoredBaseStyle } : {}))[key] = authoredDefaultProps[key];
|
|
50
|
+
}
|
|
51
|
+
if (isVariant || !isStyle) {
|
|
52
|
+
;
|
|
53
|
+
(defaultProps || (defaultProps = {}))[key] = authoredDefaultProps[key];
|
|
54
|
+
}
|
|
55
|
+
if (isVariant) {
|
|
56
|
+
;
|
|
57
|
+
(baseVariantProps || (baseVariantProps = {}))[key] = authoredDefaultProps[key];
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
var keys = staticConfig.contextProps || ((_staticConfig_context = staticConfig.context) === null || _staticConfig_context === void 0 ? void 0 : _staticConfig_context.propKeys);
|
|
62
|
+
var value = {
|
|
63
|
+
baseStyle: baseStyle || authoredBaseStyle,
|
|
64
|
+
baseVariantProps,
|
|
65
|
+
defaultProps,
|
|
66
|
+
styledContextKeys: keys ? new Set(keys) : null,
|
|
67
|
+
variants,
|
|
68
|
+
passthroughClassName: normalized ? normalized.passthroughClassName : staticConfig.passthroughClassName
|
|
69
|
+
};
|
|
70
|
+
if (!configCache) {
|
|
71
|
+
configCache = /* @__PURE__ */ new WeakMap();
|
|
72
|
+
styleStaticConfigCache.set(staticConfig, configCache);
|
|
73
|
+
}
|
|
74
|
+
configCache.set(conf, {
|
|
75
|
+
revision,
|
|
76
|
+
value
|
|
77
|
+
});
|
|
78
|
+
return value;
|
|
79
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
+
get: () => from[key],
|
|
17
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
|
+
var styleStaticConfig_exports = {};
|
|
24
|
+
__export(styleStaticConfig_exports, { getStyleStaticConfig: () => getStyleStaticConfig });
|
|
25
|
+
module.exports = __toCommonJS(styleStaticConfig_exports);
|
|
26
|
+
var import_helpers = require("@tamagui/helpers");
|
|
27
|
+
var import_grammarConfig = require("./grammarConfig.native.js");
|
|
28
|
+
var styleStaticConfigCache = /* @__PURE__ */ new WeakMap();
|
|
29
|
+
function getStyleStaticConfig(staticConfig, conf) {
|
|
30
|
+
var _staticConfig_styleFrontend_normalizeStaticConfig, _staticConfig_styleFrontend, _staticConfig_context;
|
|
31
|
+
var configCache = styleStaticConfigCache.get(staticConfig);
|
|
32
|
+
var revision = (0, import_grammarConfig.getConfigRevisionState)(conf).revision;
|
|
33
|
+
var cached = configCache === null || configCache === void 0 ? void 0 : configCache.get(conf);
|
|
34
|
+
if ((cached === null || cached === void 0 ? void 0 : cached.revision) === revision) return cached.value;
|
|
35
|
+
var normalized = (_staticConfig_styleFrontend = staticConfig.styleFrontend) === null || _staticConfig_styleFrontend === void 0 ? void 0 : (_staticConfig_styleFrontend_normalizeStaticConfig = _staticConfig_styleFrontend.normalizeStaticConfig) === null || _staticConfig_styleFrontend_normalizeStaticConfig === void 0 ? void 0 : _staticConfig_styleFrontend_normalizeStaticConfig.call(_staticConfig_styleFrontend, staticConfig, conf);
|
|
36
|
+
var variants = normalized ? normalized.variants : staticConfig.variants;
|
|
37
|
+
var authoredBaseStyle = normalized ? normalized.baseStyle : staticConfig.baseStyle;
|
|
38
|
+
var authoredDefaultProps = staticConfig.defaultProps;
|
|
39
|
+
var baseStyle;
|
|
40
|
+
var baseVariantProps;
|
|
41
|
+
var defaultProps;
|
|
42
|
+
if (authoredDefaultProps) {
|
|
43
|
+
var validStyles = staticConfig.validStyles || (staticConfig.isText || staticConfig.isInput ? import_helpers.stylePropsText : import_helpers.validStyles);
|
|
44
|
+
for (var key in authoredDefaultProps) {
|
|
45
|
+
var isVariant = Boolean(variants === null || variants === void 0 ? void 0 : variants[key]);
|
|
46
|
+
var isStyle = key !== "transition" && (key in validStyles || key in conf.shorthands);
|
|
47
|
+
if (isVariant || isStyle) {
|
|
48
|
+
;
|
|
49
|
+
(baseStyle || (baseStyle = authoredBaseStyle ? { ...authoredBaseStyle } : {}))[key] = authoredDefaultProps[key];
|
|
50
|
+
}
|
|
51
|
+
if (isVariant || !isStyle) {
|
|
52
|
+
;
|
|
53
|
+
(defaultProps || (defaultProps = {}))[key] = authoredDefaultProps[key];
|
|
54
|
+
}
|
|
55
|
+
if (isVariant) {
|
|
56
|
+
;
|
|
57
|
+
(baseVariantProps || (baseVariantProps = {}))[key] = authoredDefaultProps[key];
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
var keys = staticConfig.contextProps || ((_staticConfig_context = staticConfig.context) === null || _staticConfig_context === void 0 ? void 0 : _staticConfig_context.propKeys);
|
|
62
|
+
var value = {
|
|
63
|
+
baseStyle: baseStyle || authoredBaseStyle,
|
|
64
|
+
baseVariantProps,
|
|
65
|
+
defaultProps,
|
|
66
|
+
styledContextKeys: keys ? new Set(keys) : null,
|
|
67
|
+
variants,
|
|
68
|
+
passthroughClassName: normalized ? normalized.passthroughClassName : staticConfig.passthroughClassName
|
|
69
|
+
};
|
|
70
|
+
if (!configCache) {
|
|
71
|
+
configCache = /* @__PURE__ */ new WeakMap();
|
|
72
|
+
styleStaticConfigCache.set(staticConfig, configCache);
|
|
73
|
+
}
|
|
74
|
+
configCache.set(conf, {
|
|
75
|
+
revision,
|
|
76
|
+
value
|
|
77
|
+
});
|
|
78
|
+
return value;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
//# sourceMappingURL=styleStaticConfig.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styleStaticConfig.native.js","names":[],"sources":["cjs/helpers/styleStaticConfig.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 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 __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar styleStaticConfig_exports = {};\n__export(styleStaticConfig_exports, {\n getStyleStaticConfig: () => getStyleStaticConfig\n});\nmodule.exports = __toCommonJS(styleStaticConfig_exports);\nvar import_helpers = require(\"@tamagui/helpers\");\nvar import_grammarConfig = require(\"./grammarConfig\");\nvar styleStaticConfigCache = /* @__PURE__ */ new WeakMap();\nfunction getStyleStaticConfig(staticConfig, conf) {\n var _staticConfig_styleFrontend_normalizeStaticConfig, _staticConfig_styleFrontend, _staticConfig_context;\n var configCache = styleStaticConfigCache.get(staticConfig);\n var revision = (0, import_grammarConfig.getConfigRevisionState)(conf).revision;\n var cached = configCache === null || configCache === void 0 ? void 0 : configCache.get(conf);\n if ((cached === null || cached === void 0 ? void 0 : cached.revision) === revision) return cached.value;\n var normalized = (_staticConfig_styleFrontend = staticConfig.styleFrontend) === null || _staticConfig_styleFrontend === void 0 ? void 0 : (_staticConfig_styleFrontend_normalizeStaticConfig = _staticConfig_styleFrontend.normalizeStaticConfig) === null || _staticConfig_styleFrontend_normalizeStaticConfig === void 0 ? void 0 : _staticConfig_styleFrontend_normalizeStaticConfig.call(_staticConfig_styleFrontend, staticConfig, conf);\n var variants = normalized ? normalized.variants : staticConfig.variants;\n var authoredBaseStyle = normalized ? normalized.baseStyle : staticConfig.baseStyle;\n var authoredDefaultProps = staticConfig.defaultProps;\n var baseStyle;\n var baseVariantProps;\n var defaultProps;\n if (authoredDefaultProps) {\n var validStyles = staticConfig.validStyles || (staticConfig.isText || staticConfig.isInput ? import_helpers.stylePropsText : import_helpers.validStyles);\n for (var key in authoredDefaultProps) {\n var isVariant = Boolean(variants === null || variants === void 0 ? void 0 : variants[key]);\n var isStyle = key !== \"transition\" && (key in validStyles || key in conf.shorthands);\n if (isVariant || isStyle) {\n ;\n (baseStyle || (baseStyle = authoredBaseStyle ? {\n ...authoredBaseStyle\n } : {}))[key] = authoredDefaultProps[key];\n }\n if (isVariant || !isStyle) {\n ;\n (defaultProps || (defaultProps = {}))[key] = authoredDefaultProps[key];\n }\n if (isVariant) {\n ;\n (baseVariantProps || (baseVariantProps = {}))[key] = authoredDefaultProps[key];\n }\n }\n }\n var keys = staticConfig.contextProps || ((_staticConfig_context = staticConfig.context) === null || _staticConfig_context === void 0 ? void 0 : _staticConfig_context.propKeys);\n var value = {\n baseStyle: baseStyle || authoredBaseStyle,\n baseVariantProps,\n defaultProps,\n styledContextKeys: keys ? new Set(keys) : null,\n variants,\n passthroughClassName: normalized ? normalized.passthroughClassName : staticConfig.passthroughClassName\n };\n if (!configCache) {\n configCache = /* @__PURE__ */ new WeakMap();\n styleStaticConfigCache.set(staticConfig, configCache);\n }\n configCache.set(conf, {\n revision,\n value\n });\n return value;\n}\n//# sourceMappingURL=styleStaticConfig.js.map\n"],"mappings":"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"}
|
|
@@ -25,78 +25,39 @@ __export(tokenCategories_exports, {
|
|
|
25
25
|
});
|
|
26
26
|
module.exports = __toCommonJS(tokenCategories_exports);
|
|
27
27
|
var import_helpers = require("@tamagui/helpers");
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
const tokenCategoryByProperty = {
|
|
32
|
-
...mapTokenCategory(import_helpers.tokenCategories.size, "size"),
|
|
33
|
-
...mapTokenCategory(import_helpers.tokenCategories.radius, "radius"),
|
|
34
|
-
...mapTokenCategory(import_helpers.tokenCategories.zIndex, "zIndex"),
|
|
35
|
-
x: "space",
|
|
36
|
-
y: "space",
|
|
37
|
-
fontSize: "fontSize",
|
|
38
|
-
borderWidth: "space",
|
|
39
|
-
borderTopWidth: "space",
|
|
40
|
-
borderRightWidth: "space",
|
|
41
|
-
borderBottomWidth: "space",
|
|
42
|
-
borderLeftWidth: "space",
|
|
43
|
-
borderBlockWidth: "space",
|
|
44
|
-
borderBlockStartWidth: "space",
|
|
45
|
-
borderBlockEndWidth: "space",
|
|
46
|
-
borderInlineWidth: "space",
|
|
47
|
-
borderInlineStartWidth: "space",
|
|
48
|
-
borderInlineEndWidth: "space",
|
|
49
|
-
outlineOffset: "space",
|
|
50
|
-
outlineWidth: "space",
|
|
51
|
-
gap: "space",
|
|
52
|
-
rowGap: "space",
|
|
53
|
-
columnGap: "space",
|
|
54
|
-
top: "space",
|
|
55
|
-
right: "space",
|
|
56
|
-
bottom: "space",
|
|
57
|
-
left: "space",
|
|
58
|
-
inset: "space",
|
|
59
|
-
insetBlock: "space",
|
|
60
|
-
insetBlockEnd: "space",
|
|
61
|
-
insetBlockStart: "space",
|
|
62
|
-
insetInline: "space",
|
|
63
|
-
insetInlineEnd: "space",
|
|
64
|
-
insetInlineStart: "space",
|
|
65
|
-
margin: "space",
|
|
66
|
-
marginBlock: "space",
|
|
67
|
-
marginBlockEnd: "space",
|
|
68
|
-
marginBlockStart: "space",
|
|
69
|
-
marginInline: "space",
|
|
70
|
-
marginInlineEnd: "space",
|
|
71
|
-
marginInlineStart: "space",
|
|
72
|
-
marginTop: "space",
|
|
73
|
-
marginRight: "space",
|
|
74
|
-
marginBottom: "space",
|
|
75
|
-
marginEnd: "space",
|
|
76
|
-
marginLeft: "space",
|
|
77
|
-
marginHorizontal: "space",
|
|
78
|
-
marginStart: "space",
|
|
79
|
-
marginVertical: "space",
|
|
80
|
-
padding: "space",
|
|
81
|
-
paddingBlock: "space",
|
|
82
|
-
paddingBlockEnd: "space",
|
|
83
|
-
paddingBlockStart: "space",
|
|
84
|
-
paddingInline: "space",
|
|
85
|
-
paddingInlineEnd: "space",
|
|
86
|
-
paddingInlineStart: "space",
|
|
87
|
-
paddingTop: "space",
|
|
88
|
-
paddingRight: "space",
|
|
89
|
-
paddingBottom: "space",
|
|
90
|
-
paddingEnd: "space",
|
|
91
|
-
paddingLeft: "space",
|
|
92
|
-
paddingHorizontal: "space",
|
|
93
|
-
paddingStart: "space",
|
|
94
|
-
paddingVertical: "space"
|
|
28
|
+
const legacyCategory = (property) => {
|
|
29
|
+
const category = (0, import_helpers.getTokenCategoryName)(import_helpers.propToTokenCategoryCode[property]);
|
|
30
|
+
return category === "space" || category === "size" || category === "radius" || category === "zIndex" || category === "fontSize" ? category : void 0;
|
|
95
31
|
};
|
|
32
|
+
const tokenCategoryByProperty = /* @__PURE__ */ new Proxy(/* @__PURE__ */ Object.create(null), {
|
|
33
|
+
get(_, property) {
|
|
34
|
+
return typeof property === "string" ? legacyCategory(property) : void 0;
|
|
35
|
+
},
|
|
36
|
+
has(_, property) {
|
|
37
|
+
return typeof property === "string" && legacyCategory(property) !== void 0;
|
|
38
|
+
},
|
|
39
|
+
ownKeys() {
|
|
40
|
+
return Object.keys(import_helpers.propToTokenCategoryCode).filter((property) => legacyCategory(property) !== void 0);
|
|
41
|
+
},
|
|
42
|
+
getOwnPropertyDescriptor(_, property) {
|
|
43
|
+
if (typeof property !== "string" || legacyCategory(property) === void 0) return;
|
|
44
|
+
return {
|
|
45
|
+
configurable: true,
|
|
46
|
+
enumerable: true
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
});
|
|
96
50
|
function getTokenCategoryForProperty(property) {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
return "
|
|
51
|
+
switch (import_helpers.propToTokenCategoryCode[property]) {
|
|
52
|
+
case import_helpers.tokenCategorySpace: return "space";
|
|
53
|
+
case import_helpers.tokenCategorySize: return "size";
|
|
54
|
+
case import_helpers.tokenCategoryRadius: return "radius";
|
|
55
|
+
case import_helpers.tokenCategoryZIndex: return "zIndex";
|
|
56
|
+
case import_helpers.tokenCategoryColor: return "color";
|
|
57
|
+
case import_helpers.tokenCategoryFontFamily: return "fontFamily";
|
|
58
|
+
case import_helpers.tokenCategoryFontSize:
|
|
59
|
+
case import_helpers.tokenCategoryFontWeight:
|
|
60
|
+
case import_helpers.tokenCategoryLineHeight:
|
|
61
|
+
case import_helpers.tokenCategoryLetterSpacing: return "font";
|
|
100
62
|
}
|
|
101
|
-
return tokenCategoryByProperty[property] || (property in import_helpers.tokenCategories.color ? "color" : void 0);
|
|
102
63
|
}
|
|
@@ -27,80 +27,41 @@ __export(tokenCategories_exports, {
|
|
|
27
27
|
});
|
|
28
28
|
module.exports = __toCommonJS(tokenCategories_exports);
|
|
29
29
|
var import_helpers = require("@tamagui/helpers");
|
|
30
|
-
function
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}));
|
|
34
|
-
}
|
|
35
|
-
var tokenCategoryByProperty = {
|
|
36
|
-
...mapTokenCategory(import_helpers.tokenCategories.size, "size"),
|
|
37
|
-
...mapTokenCategory(import_helpers.tokenCategories.radius, "radius"),
|
|
38
|
-
...mapTokenCategory(import_helpers.tokenCategories.zIndex, "zIndex"),
|
|
39
|
-
x: "space",
|
|
40
|
-
y: "space",
|
|
41
|
-
fontSize: "fontSize",
|
|
42
|
-
borderWidth: "space",
|
|
43
|
-
borderTopWidth: "space",
|
|
44
|
-
borderRightWidth: "space",
|
|
45
|
-
borderBottomWidth: "space",
|
|
46
|
-
borderLeftWidth: "space",
|
|
47
|
-
borderBlockWidth: "space",
|
|
48
|
-
borderBlockStartWidth: "space",
|
|
49
|
-
borderBlockEndWidth: "space",
|
|
50
|
-
borderInlineWidth: "space",
|
|
51
|
-
borderInlineStartWidth: "space",
|
|
52
|
-
borderInlineEndWidth: "space",
|
|
53
|
-
outlineOffset: "space",
|
|
54
|
-
outlineWidth: "space",
|
|
55
|
-
gap: "space",
|
|
56
|
-
rowGap: "space",
|
|
57
|
-
columnGap: "space",
|
|
58
|
-
top: "space",
|
|
59
|
-
right: "space",
|
|
60
|
-
bottom: "space",
|
|
61
|
-
left: "space",
|
|
62
|
-
inset: "space",
|
|
63
|
-
insetBlock: "space",
|
|
64
|
-
insetBlockEnd: "space",
|
|
65
|
-
insetBlockStart: "space",
|
|
66
|
-
insetInline: "space",
|
|
67
|
-
insetInlineEnd: "space",
|
|
68
|
-
insetInlineStart: "space",
|
|
69
|
-
margin: "space",
|
|
70
|
-
marginBlock: "space",
|
|
71
|
-
marginBlockEnd: "space",
|
|
72
|
-
marginBlockStart: "space",
|
|
73
|
-
marginInline: "space",
|
|
74
|
-
marginInlineEnd: "space",
|
|
75
|
-
marginInlineStart: "space",
|
|
76
|
-
marginTop: "space",
|
|
77
|
-
marginRight: "space",
|
|
78
|
-
marginBottom: "space",
|
|
79
|
-
marginEnd: "space",
|
|
80
|
-
marginLeft: "space",
|
|
81
|
-
marginHorizontal: "space",
|
|
82
|
-
marginStart: "space",
|
|
83
|
-
marginVertical: "space",
|
|
84
|
-
padding: "space",
|
|
85
|
-
paddingBlock: "space",
|
|
86
|
-
paddingBlockEnd: "space",
|
|
87
|
-
paddingBlockStart: "space",
|
|
88
|
-
paddingInline: "space",
|
|
89
|
-
paddingInlineEnd: "space",
|
|
90
|
-
paddingInlineStart: "space",
|
|
91
|
-
paddingTop: "space",
|
|
92
|
-
paddingRight: "space",
|
|
93
|
-
paddingBottom: "space",
|
|
94
|
-
paddingEnd: "space",
|
|
95
|
-
paddingLeft: "space",
|
|
96
|
-
paddingHorizontal: "space",
|
|
97
|
-
paddingStart: "space",
|
|
98
|
-
paddingVertical: "space"
|
|
30
|
+
var legacyCategory = function(property) {
|
|
31
|
+
var category = (0, import_helpers.getTokenCategoryName)(import_helpers.propToTokenCategoryCode[property]);
|
|
32
|
+
return category === "space" || category === "size" || category === "radius" || category === "zIndex" || category === "fontSize" ? category : void 0;
|
|
99
33
|
};
|
|
34
|
+
var tokenCategoryByProperty = /* @__PURE__ */ new Proxy(/* @__PURE__ */ Object.create(null), {
|
|
35
|
+
get(_, property) {
|
|
36
|
+
return typeof property === "string" ? legacyCategory(property) : void 0;
|
|
37
|
+
},
|
|
38
|
+
has(_, property) {
|
|
39
|
+
return typeof property === "string" && legacyCategory(property) !== void 0;
|
|
40
|
+
},
|
|
41
|
+
ownKeys() {
|
|
42
|
+
return Object.keys(import_helpers.propToTokenCategoryCode).filter(function(property) {
|
|
43
|
+
return legacyCategory(property) !== void 0;
|
|
44
|
+
});
|
|
45
|
+
},
|
|
46
|
+
getOwnPropertyDescriptor(_, property) {
|
|
47
|
+
if (typeof property !== "string" || legacyCategory(property) === void 0) return;
|
|
48
|
+
return {
|
|
49
|
+
configurable: true,
|
|
50
|
+
enumerable: true
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
});
|
|
100
54
|
function getTokenCategoryForProperty(property) {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
return "
|
|
55
|
+
switch (import_helpers.propToTokenCategoryCode[property]) {
|
|
56
|
+
case import_helpers.tokenCategorySpace: return "space";
|
|
57
|
+
case import_helpers.tokenCategorySize: return "size";
|
|
58
|
+
case import_helpers.tokenCategoryRadius: return "radius";
|
|
59
|
+
case import_helpers.tokenCategoryZIndex: return "zIndex";
|
|
60
|
+
case import_helpers.tokenCategoryColor: return "color";
|
|
61
|
+
case import_helpers.tokenCategoryFontFamily: return "fontFamily";
|
|
62
|
+
case import_helpers.tokenCategoryFontSize:
|
|
63
|
+
case import_helpers.tokenCategoryFontWeight:
|
|
64
|
+
case import_helpers.tokenCategoryLineHeight:
|
|
65
|
+
case import_helpers.tokenCategoryLetterSpacing: return "font";
|
|
104
66
|
}
|
|
105
|
-
return tokenCategoryByProperty[property] || (property in import_helpers.tokenCategories.color ? "color" : void 0);
|
|
106
67
|
}
|