@tamagui/helpers 2.7.7 → 3.0.0-beta.637.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/clamp.cjs +16 -19
- package/dist/cjs/clamp.native.cjs +30 -0
- package/dist/cjs/clamp.native.js +17 -19
- package/dist/cjs/clamp.native.js.map +1 -1
- package/dist/cjs/composeEventHandlers.cjs +26 -32
- package/dist/cjs/composeEventHandlers.native.cjs +43 -0
- package/dist/cjs/composeEventHandlers.native.js +28 -34
- package/dist/cjs/composeEventHandlers.native.js.map +1 -1
- package/dist/cjs/index.cjs +13 -11
- package/dist/cjs/index.native.cjs +31 -0
- package/dist/cjs/index.native.js +13 -10
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/reservedThemeProps.cjs +43 -0
- package/dist/cjs/reservedThemeProps.native.cjs +45 -0
- package/dist/cjs/reservedThemeProps.native.js +47 -0
- package/dist/cjs/reservedThemeProps.native.js.map +1 -0
- package/dist/cjs/shouldRenderNativePlatform.cjs +38 -37
- package/dist/cjs/shouldRenderNativePlatform.native.cjs +71 -0
- package/dist/cjs/shouldRenderNativePlatform.native.js +55 -59
- package/dist/cjs/shouldRenderNativePlatform.native.js.map +1 -1
- package/dist/cjs/themeClassNames.cjs +39 -0
- package/dist/cjs/themeClassNames.native.cjs +42 -0
- package/dist/cjs/themeClassNames.native.js +44 -0
- package/dist/cjs/themeClassNames.native.js.map +1 -0
- package/dist/cjs/tokenCategories.cjs +79 -0
- package/dist/cjs/tokenCategories.native.cjs +80 -0
- package/dist/cjs/tokenCategories.native.js +82 -0
- package/dist/cjs/tokenCategories.native.js.map +1 -0
- package/dist/cjs/types.cjs +19 -20
- package/dist/cjs/types.native.cjs +37 -0
- package/dist/cjs/types.native.js +19 -19
- package/dist/cjs/types.native.js.map +1 -1
- package/dist/cjs/validStyleProps.cjs +240 -297
- package/dist/cjs/validStyleProps.native.cjs +277 -0
- package/dist/cjs/validStyleProps.native.js +236 -290
- package/dist/cjs/validStyleProps.native.js.map +1 -1
- package/dist/cjs/webOnlyStyleProps.cjs +85 -86
- package/dist/cjs/webOnlyStyleProps.native.cjs +106 -0
- package/dist/cjs/webOnlyStyleProps.native.js +85 -85
- package/dist/cjs/webOnlyStyleProps.native.js.map +1 -1
- package/dist/cjs/withStaticProperties.cjs +25 -30
- package/dist/cjs/withStaticProperties.native.cjs +38 -0
- package/dist/cjs/withStaticProperties.native.js +26 -30
- package/dist/cjs/withStaticProperties.native.js.map +1 -1
- package/dist/esm/clamp.mjs +2 -1
- package/dist/esm/clamp.mjs.map +1 -1
- package/dist/esm/clamp.native.js +3 -2
- package/dist/esm/clamp.native.js.map +1 -1
- package/dist/esm/composeEventHandlers.mjs +12 -14
- package/dist/esm/composeEventHandlers.mjs.map +1 -1
- package/dist/esm/composeEventHandlers.native.js +14 -17
- package/dist/esm/composeEventHandlers.native.js.map +1 -1
- package/dist/esm/index.js +21 -9
- package/dist/esm/index.mjs +21 -9
- package/dist/esm/index.native.js +21 -9
- package/dist/esm/reservedThemeProps.mjs +22 -0
- package/dist/esm/reservedThemeProps.mjs.map +1 -0
- package/dist/esm/reservedThemeProps.native.js +22 -0
- package/dist/esm/reservedThemeProps.native.js.map +1 -0
- package/dist/esm/shouldRenderNativePlatform.mjs +25 -19
- package/dist/esm/shouldRenderNativePlatform.mjs.map +1 -1
- package/dist/esm/shouldRenderNativePlatform.native.js +42 -42
- package/dist/esm/shouldRenderNativePlatform.native.js.map +1 -1
- package/dist/esm/themeClassNames.mjs +18 -0
- package/dist/esm/themeClassNames.mjs.map +1 -0
- package/dist/esm/themeClassNames.native.js +19 -0
- package/dist/esm/themeClassNames.native.js.map +1 -0
- package/dist/esm/tokenCategories.mjs +58 -0
- package/dist/esm/tokenCategories.mjs.map +1 -0
- package/dist/esm/tokenCategories.native.js +57 -0
- package/dist/esm/tokenCategories.native.js.map +1 -0
- package/dist/esm/types.mjs +1 -0
- package/dist/esm/types.mjs.map +1 -1
- package/dist/esm/types.native.js +1 -0
- package/dist/esm/types.native.js.map +1 -1
- package/dist/esm/validStyleProps.mjs +218 -272
- package/dist/esm/validStyleProps.mjs.map +1 -1
- package/dist/esm/validStyleProps.native.js +214 -266
- package/dist/esm/validStyleProps.native.js.map +1 -1
- package/dist/esm/webOnlyStyleProps.mjs +68 -67
- package/dist/esm/webOnlyStyleProps.mjs.map +1 -1
- package/dist/esm/webOnlyStyleProps.native.js +68 -67
- package/dist/esm/webOnlyStyleProps.native.js.map +1 -1
- package/dist/esm/withStaticProperties.mjs +11 -12
- package/dist/esm/withStaticProperties.mjs.map +1 -1
- package/dist/esm/withStaticProperties.native.js +12 -13
- package/dist/esm/withStaticProperties.native.js.map +1 -1
- package/package.json +13 -4
- package/src/composeEventHandlers.ts +6 -10
- package/src/index.ts +3 -0
- package/src/reservedThemeProps.ts +29 -0
- package/src/themeClassNames.ts +28 -0
- package/src/tokenCategories.ts +67 -0
- package/src/validStyleProps.ts +37 -79
- package/src/webOnlyStyleProps.ts +6 -3
- package/types/composeEventHandlers.d.ts.map +1 -1
- package/types/index.d.ts +3 -0
- package/types/index.d.ts.map +1 -1
- package/types/reservedThemeProps.d.ts +12 -0
- package/types/reservedThemeProps.d.ts.map +1 -0
- package/types/themeClassNames.d.ts +11 -0
- package/types/themeClassNames.d.ts.map +1 -0
- package/types/tokenCategories.d.ts +58 -0
- package/types/tokenCategories.d.ts.map +1 -0
- package/types/validStyleProps.d.ts +535 -560
- package/types/validStyleProps.d.ts.map +1 -1
- package/types/webOnlyStyleProps.d.ts +31 -29
- package/types/webOnlyStyleProps.d.ts.map +1 -1
- package/types/withStaticProperties.d.ts.map +1 -1
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/index.mjs.map +0 -1
- package/dist/esm/index.native.js.map +0 -1
|
@@ -1,44 +1,40 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
|
|
3
4
|
var __defProp = Object.defineProperty;
|
|
4
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
8
|
var __export = (target, all) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
for (var name in all) __defProp(target, name, {
|
|
10
|
+
get: all[name],
|
|
11
|
+
enumerable: true
|
|
12
|
+
});
|
|
12
13
|
};
|
|
13
14
|
var __copyProps = (to, from, except, desc) => {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
16
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
17
|
+
get: () => from[key],
|
|
18
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
return to;
|
|
21
22
|
};
|
|
22
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
23
|
-
value: true
|
|
24
|
-
}), mod);
|
|
23
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
25
24
|
var withStaticProperties_exports = {};
|
|
26
|
-
__export(withStaticProperties_exports, {
|
|
27
|
-
withStaticProperties: () => withStaticProperties
|
|
28
|
-
});
|
|
25
|
+
__export(withStaticProperties_exports, { withStaticProperties: () => withStaticProperties });
|
|
29
26
|
module.exports = __toCommonJS(withStaticProperties_exports);
|
|
30
|
-
var Decorated = /* @__PURE__ */Symbol();
|
|
31
|
-
var withStaticProperties = function
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
out[Decorated] = true;
|
|
42
|
-
return out;
|
|
27
|
+
var Decorated = /* @__PURE__ */ Symbol();
|
|
28
|
+
var withStaticProperties = function(component, staticProps) {
|
|
29
|
+
var out = (function() {
|
|
30
|
+
if (component[Decorated]) {
|
|
31
|
+
return typeof component === "function" ? Object.assign(component.bind(null), component) : { ...component };
|
|
32
|
+
}
|
|
33
|
+
return component;
|
|
34
|
+
})();
|
|
35
|
+
Object.assign(out, staticProps);
|
|
36
|
+
out[Decorated] = true;
|
|
37
|
+
return out;
|
|
43
38
|
};
|
|
39
|
+
|
|
44
40
|
//# sourceMappingURL=withStaticProperties.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"withStaticProperties.native.js","names":[],"sources":["cjs/withStaticProperties.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 withStaticProperties_exports = {};\n__export(withStaticProperties_exports, {\n withStaticProperties: () => withStaticProperties\n});\nmodule.exports = __toCommonJS(withStaticProperties_exports);\nvar Decorated = /* @__PURE__ */ Symbol();\nvar withStaticProperties = function(component, staticProps) {\n var out = (function() {\n if (component[Decorated]) {\n return typeof component === \"function\" ? Object.assign(component.bind(null), component) : {\n ...component\n };\n }\n return component;\n })();\n Object.assign(out, staticProps);\n out[Decorated] = true;\n return out;\n};\n//# sourceMappingURL=withStaticProperties.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,+BAA+B,CAAC;AACpC,SAAS,8BAA8B,EACrC,4BAA4B,qBAC9B,CAAC;AACD,OAAO,UAAU,aAAa,4BAA4B;AAC1D,IAAI,YAA4B,uBAAO;AACvC,IAAI,uBAAuB,SAAS,WAAW,aAAa;CAC1D,IAAI,OAAO,WAAW;EACpB,IAAI,UAAU,YAAY;GACxB,OAAO,OAAO,cAAc,aAAa,OAAO,OAAO,UAAU,KAAK,IAAI,GAAG,SAAS,IAAI,EACxF,GAAG,UACL;EACF;EACA,OAAO;CACT,GAAG;CACH,OAAO,OAAO,KAAK,WAAW;CAC9B,IAAI,aAAa;CACjB,OAAO;AACT"}
|
package/dist/esm/clamp.mjs
CHANGED
package/dist/esm/clamp.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"clamp.js","names":[],"sources":["esm/clamp.js"],"sourcesContent":["function clamp(value, [min, max]) {\n return Math.min(max, Math.max(min, value));\n}\nexport {\n clamp\n};\n//# sourceMappingURL=clamp.js.map\n"],"mappings":";AAAA,SAAS,MAAM,OAAO,CAAC,KAAK,MAAM;CAChC,OAAO,KAAK,IAAI,KAAK,KAAK,IAAI,KAAK,KAAK,CAAC;AAC3C"}
|
package/dist/esm/clamp.native.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"clamp.native.js","names":[],"sources":["esm/clamp.native.js"],"sourcesContent":["function clamp(value, param) {\n var [min, max] = param;\n return Math.min(max, Math.max(min, value));\n}\nexport {\n clamp\n};\n//# sourceMappingURL=clamp.js.map\n"],"mappings":";AAAA,SAAS,MAAM,OAAO,OAAO;CAC3B,IAAI,CAAC,KAAK,OAAO;CACjB,OAAO,KAAK,IAAI,KAAK,KAAK,IAAI,KAAK,KAAK,CAAC;AAC3C"}
|
|
@@ -1,17 +1,15 @@
|
|
|
1
|
-
function composeEventHandlers(og, next, {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
return next?.(event);
|
|
13
|
-
}
|
|
14
|
-
};
|
|
1
|
+
function composeEventHandlers(og, next, { checkDefaultPrevented = true } = {}) {
|
|
2
|
+
if (!og || !next) {
|
|
3
|
+
return next || og || void 0;
|
|
4
|
+
}
|
|
5
|
+
return (event) => {
|
|
6
|
+
og?.(event);
|
|
7
|
+
const isPrevented = !!event && typeof event === "object" && ("defaultPrevented" in event && Boolean(event.defaultPrevented) || "isCanceled" in event && Boolean(event.isCanceled));
|
|
8
|
+
if (!event || !checkDefaultPrevented || !isPrevented) {
|
|
9
|
+
return next?.(event);
|
|
10
|
+
}
|
|
11
|
+
};
|
|
15
12
|
}
|
|
13
|
+
|
|
16
14
|
export { composeEventHandlers };
|
|
17
15
|
//# sourceMappingURL=composeEventHandlers.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"composeEventHandlers.js","names":[],"sources":["esm/composeEventHandlers.js"],"sourcesContent":["function composeEventHandlers(og, next, { checkDefaultPrevented = true } = {}) {\n if (!og || !next) {\n return next || og || void 0;\n }\n return (event) => {\n og?.(event);\n const isPrevented = !!event && typeof event === \"object\" && (\"defaultPrevented\" in event && Boolean(event.defaultPrevented) || \"isCanceled\" in event && Boolean(event.isCanceled));\n if (!event || !checkDefaultPrevented || !isPrevented) {\n return next?.(event);\n }\n };\n}\nexport {\n composeEventHandlers\n};\n//# sourceMappingURL=composeEventHandlers.js.map\n"],"mappings":";AAAA,SAAS,qBAAqB,IAAI,MAAM,EAAE,wBAAwB,SAAS,CAAC,GAAG;CAC7E,IAAI,CAAC,MAAM,CAAC,MAAM;EAChB,OAAO,QAAQ,MAAM,KAAK;CAC5B;CACA,QAAQ,UAAU;EAChB,KAAK,KAAK;EACV,MAAM,cAAc,CAAC,CAAC,SAAS,OAAO,UAAU,aAAa,sBAAsB,SAAS,QAAQ,MAAM,gBAAgB,KAAK,gBAAgB,SAAS,QAAQ,MAAM,UAAU;EAChL,IAAI,CAAC,SAAS,CAAC,yBAAyB,CAAC,aAAa;GACpD,OAAO,OAAO,KAAK;EACrB;CACF;AACF"}
|
|
@@ -1,23 +1,20 @@
|
|
|
1
1
|
function _type_of(obj) {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
2
|
+
"@swc/helpers - typeof";
|
|
3
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
5
4
|
}
|
|
6
5
|
function composeEventHandlers(og, next) {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
return next === null || next === void 0 ? void 0 : next(event);
|
|
19
|
-
}
|
|
20
|
-
};
|
|
6
|
+
var { checkDefaultPrevented = true } = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
7
|
+
if (!og || !next) {
|
|
8
|
+
return next || og || void 0;
|
|
9
|
+
}
|
|
10
|
+
return function(event) {
|
|
11
|
+
og === null || og === void 0 ? void 0 : og(event);
|
|
12
|
+
var isPrevented = !!event && (typeof event === "undefined" ? "undefined" : _type_of(event)) === "object" && ("defaultPrevented" in event && Boolean(event.defaultPrevented) || "isCanceled" in event && Boolean(event.isCanceled));
|
|
13
|
+
if (!event || !checkDefaultPrevented || !isPrevented) {
|
|
14
|
+
return next === null || next === void 0 ? void 0 : next(event);
|
|
15
|
+
}
|
|
16
|
+
};
|
|
21
17
|
}
|
|
18
|
+
|
|
22
19
|
export { composeEventHandlers };
|
|
23
20
|
//# sourceMappingURL=composeEventHandlers.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"file":"composeEventHandlers.native.js","names":[],"sources":["esm/composeEventHandlers.native.js"],"sourcesContent":["function _type_of(obj) {\n \"@swc/helpers - typeof\";\n return obj && typeof Symbol !== \"undefined\" && obj.constructor === Symbol ? \"symbol\" : typeof obj;\n}\nfunction composeEventHandlers(og, next) {\n var { checkDefaultPrevented = true } = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};\n if (!og || !next) {\n return next || og || void 0;\n }\n return function(event) {\n og === null || og === void 0 ? void 0 : og(event);\n var isPrevented = !!event && (typeof event === \"undefined\" ? \"undefined\" : _type_of(event)) === \"object\" && (\"defaultPrevented\" in event && Boolean(event.defaultPrevented) || \"isCanceled\" in event && Boolean(event.isCanceled));\n if (!event || !checkDefaultPrevented || !isPrevented) {\n return next === null || next === void 0 ? void 0 : next(event);\n }\n };\n}\nexport {\n composeEventHandlers\n};\n//# sourceMappingURL=composeEventHandlers.js.map\n"],"mappings":";AAAA,SAAS,SAAS,KAAK;CACrB;CACA,OAAO,OAAO,OAAO,WAAW,eAAe,IAAI,gBAAgB,SAAS,WAAW,OAAO;AAChG;AACA,SAAS,qBAAqB,IAAI,MAAM;CACtC,IAAI,EAAE,wBAAwB,SAAS,UAAU,SAAS,KAAK,UAAU,OAAO,KAAK,IAAI,UAAU,KAAK,CAAC;CACzG,IAAI,CAAC,MAAM,CAAC,MAAM;EAChB,OAAO,QAAQ,MAAM,KAAK;CAC5B;CACA,OAAO,SAAS,OAAO;EACrB,OAAO,QAAQ,OAAO,KAAK,IAAI,KAAK,IAAI,GAAG,KAAK;EAChD,IAAI,cAAc,CAAC,CAAC,UAAU,OAAO,UAAU,cAAc,cAAc,SAAS,KAAK,OAAO,aAAa,sBAAsB,SAAS,QAAQ,MAAM,gBAAgB,KAAK,gBAAgB,SAAS,QAAQ,MAAM,UAAU;EAChO,IAAI,CAAC,SAAS,CAAC,yBAAyB,CAAC,aAAa;GACpD,OAAO,SAAS,QAAQ,SAAS,KAAK,IAAI,KAAK,IAAI,KAAK,KAAK;EAC/D;CACF;AACF"}
|
package/dist/esm/index.js
CHANGED
|
@@ -1,9 +1,21 @@
|
|
|
1
|
-
export * from "@tamagui/simple-hash"
|
|
2
|
-
|
|
3
|
-
export * from "./
|
|
4
|
-
|
|
5
|
-
export * from "./
|
|
6
|
-
|
|
7
|
-
export * from "./
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
export * from "@tamagui/simple-hash"
|
|
2
|
+
|
|
3
|
+
export * from "./clamp.mjs"
|
|
4
|
+
|
|
5
|
+
export * from "./reservedThemeProps.mjs"
|
|
6
|
+
|
|
7
|
+
export * from "./themeClassNames.mjs"
|
|
8
|
+
|
|
9
|
+
export * from "./composeEventHandlers.mjs"
|
|
10
|
+
|
|
11
|
+
export * from "./types.mjs"
|
|
12
|
+
|
|
13
|
+
export * from "./shouldRenderNativePlatform.mjs"
|
|
14
|
+
|
|
15
|
+
export * from "./tokenCategories.mjs"
|
|
16
|
+
|
|
17
|
+
export * from "./validStyleProps.mjs"
|
|
18
|
+
|
|
19
|
+
export * from "./withStaticProperties.mjs"
|
|
20
|
+
|
|
21
|
+
export * from "./webOnlyStyleProps.mjs"
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,9 +1,21 @@
|
|
|
1
|
-
export * from "@tamagui/simple-hash"
|
|
2
|
-
|
|
3
|
-
export * from "./
|
|
4
|
-
|
|
5
|
-
export * from "./
|
|
6
|
-
|
|
7
|
-
export * from "./
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
export * from "@tamagui/simple-hash"
|
|
2
|
+
|
|
3
|
+
export * from "./clamp.mjs"
|
|
4
|
+
|
|
5
|
+
export * from "./reservedThemeProps.mjs"
|
|
6
|
+
|
|
7
|
+
export * from "./themeClassNames.mjs"
|
|
8
|
+
|
|
9
|
+
export * from "./composeEventHandlers.mjs"
|
|
10
|
+
|
|
11
|
+
export * from "./types.mjs"
|
|
12
|
+
|
|
13
|
+
export * from "./shouldRenderNativePlatform.mjs"
|
|
14
|
+
|
|
15
|
+
export * from "./tokenCategories.mjs"
|
|
16
|
+
|
|
17
|
+
export * from "./validStyleProps.mjs"
|
|
18
|
+
|
|
19
|
+
export * from "./withStaticProperties.mjs"
|
|
20
|
+
|
|
21
|
+
export * from "./webOnlyStyleProps.mjs"
|
package/dist/esm/index.native.js
CHANGED
|
@@ -1,9 +1,21 @@
|
|
|
1
|
-
export * from "@tamagui/simple-hash"
|
|
2
|
-
|
|
3
|
-
export * from "./
|
|
4
|
-
|
|
5
|
-
export * from "./
|
|
6
|
-
|
|
7
|
-
export * from "./
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
export * from "@tamagui/simple-hash"
|
|
2
|
+
|
|
3
|
+
export * from "./clamp.native.js"
|
|
4
|
+
|
|
5
|
+
export * from "./reservedThemeProps.native.js"
|
|
6
|
+
|
|
7
|
+
export * from "./themeClassNames.native.js"
|
|
8
|
+
|
|
9
|
+
export * from "./composeEventHandlers.native.js"
|
|
10
|
+
|
|
11
|
+
export * from "./types.native.js"
|
|
12
|
+
|
|
13
|
+
export * from "./shouldRenderNativePlatform.native.js"
|
|
14
|
+
|
|
15
|
+
export * from "./tokenCategories.native.js"
|
|
16
|
+
|
|
17
|
+
export * from "./validStyleProps.native.js"
|
|
18
|
+
|
|
19
|
+
export * from "./withStaticProperties.native.js"
|
|
20
|
+
|
|
21
|
+
export * from "./webOnlyStyleProps.native.js"
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
const reservedThemeProps = {
|
|
2
|
+
_isRoot: true,
|
|
3
|
+
children: true,
|
|
4
|
+
className: true,
|
|
5
|
+
contain: true,
|
|
6
|
+
debug: true,
|
|
7
|
+
deopt: true,
|
|
8
|
+
disable: true,
|
|
9
|
+
"disable-child-theme": true,
|
|
10
|
+
forceClassName: true,
|
|
11
|
+
inlineClassName: true,
|
|
12
|
+
inlineValues: true,
|
|
13
|
+
name: true,
|
|
14
|
+
nativeUpdate: true,
|
|
15
|
+
needsUpdate: true,
|
|
16
|
+
passThrough: true,
|
|
17
|
+
reset: true,
|
|
18
|
+
shallow: true
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export { reservedThemeProps };
|
|
22
|
+
//# sourceMappingURL=reservedThemeProps.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reservedThemeProps.js","names":[],"sources":["esm/reservedThemeProps.js"],"sourcesContent":["const reservedThemeProps = {\n _isRoot: true,\n children: true,\n className: true,\n contain: true,\n debug: true,\n deopt: true,\n disable: true,\n \"disable-child-theme\": true,\n forceClassName: true,\n inlineClassName: true,\n inlineValues: true,\n name: true,\n nativeUpdate: true,\n needsUpdate: true,\n passThrough: true,\n reset: true,\n shallow: true\n};\nexport {\n reservedThemeProps\n};\n//# sourceMappingURL=reservedThemeProps.js.map\n"],"mappings":";AAAA,MAAM,qBAAqB;CACzB,SAAS;CACT,UAAU;CACV,WAAW;CACX,SAAS;CACT,OAAO;CACP,OAAO;CACP,SAAS;CACT,uBAAuB;CACvB,gBAAgB;CAChB,iBAAiB;CACjB,cAAc;CACd,MAAM;CACN,cAAc;CACd,aAAa;CACb,aAAa;CACb,OAAO;CACP,SAAS;AACX"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
var reservedThemeProps = {
|
|
2
|
+
_isRoot: true,
|
|
3
|
+
children: true,
|
|
4
|
+
className: true,
|
|
5
|
+
contain: true,
|
|
6
|
+
debug: true,
|
|
7
|
+
deopt: true,
|
|
8
|
+
disable: true,
|
|
9
|
+
"disable-child-theme": true,
|
|
10
|
+
forceClassName: true,
|
|
11
|
+
inlineClassName: true,
|
|
12
|
+
inlineValues: true,
|
|
13
|
+
name: true,
|
|
14
|
+
nativeUpdate: true,
|
|
15
|
+
needsUpdate: true,
|
|
16
|
+
passThrough: true,
|
|
17
|
+
reset: true,
|
|
18
|
+
shallow: true
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export { reservedThemeProps };
|
|
22
|
+
//# sourceMappingURL=reservedThemeProps.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reservedThemeProps.native.js","names":[],"sources":["esm/reservedThemeProps.native.js"],"sourcesContent":["var reservedThemeProps = {\n _isRoot: true,\n children: true,\n className: true,\n contain: true,\n debug: true,\n deopt: true,\n disable: true,\n \"disable-child-theme\": true,\n forceClassName: true,\n inlineClassName: true,\n inlineValues: true,\n name: true,\n nativeUpdate: true,\n needsUpdate: true,\n passThrough: true,\n reset: true,\n shallow: true\n};\nexport {\n reservedThemeProps\n};\n//# sourceMappingURL=reservedThemeProps.js.map\n"],"mappings":";AAAA,IAAI,qBAAqB;CACvB,SAAS;CACT,UAAU;CACV,WAAW;CACX,SAAS;CACT,OAAO;CACP,OAAO;CACP,SAAS;CACT,uBAAuB;CACvB,gBAAgB;CAChB,iBAAiB;CACjB,cAAc;CACd,MAAM;CACN,cAAc;CACd,aAAa;CACb,aAAa;CACb,OAAO;CACP,SAAS;AACX"}
|
|
@@ -1,26 +1,32 @@
|
|
|
1
1
|
import { currentPlatform } from "@tamagui/constants";
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
const ALL_PLATFORMS = [
|
|
4
|
+
"web",
|
|
5
|
+
"android",
|
|
6
|
+
"ios"
|
|
7
|
+
];
|
|
3
8
|
function shouldRenderNativePlatform(nativeProp) {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
if (!nativeProp) {
|
|
10
|
+
return null;
|
|
11
|
+
}
|
|
12
|
+
const userRequestedPlatforms = resolvePlatformNames(nativeProp);
|
|
13
|
+
for (const platform of ALL_PLATFORMS) {
|
|
14
|
+
if (platform === currentPlatform && userRequestedPlatforms.has(platform)) {
|
|
15
|
+
return platform;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
return null;
|
|
14
19
|
}
|
|
15
20
|
function resolvePlatformNames(nativeProp) {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
const platforms = nativeProp === true ? ALL_PLATFORMS : nativeProp === false ? [] : Array.isArray(nativeProp) ? nativeProp : [nativeProp];
|
|
22
|
+
const set = new Set(platforms);
|
|
23
|
+
if (set.has("mobile")) {
|
|
24
|
+
set.add("android");
|
|
25
|
+
set.add("ios");
|
|
26
|
+
set.delete("mobile");
|
|
27
|
+
}
|
|
28
|
+
return set;
|
|
24
29
|
}
|
|
30
|
+
|
|
25
31
|
export { shouldRenderNativePlatform };
|
|
26
32
|
//# sourceMappingURL=shouldRenderNativePlatform.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"shouldRenderNativePlatform.js","names":[],"sources":["esm/shouldRenderNativePlatform.js"],"sourcesContent":["import { currentPlatform } from \"@tamagui/constants\";\nconst ALL_PLATFORMS = [\"web\", \"android\", \"ios\"];\nfunction shouldRenderNativePlatform(nativeProp) {\n if (!nativeProp) {\n return null;\n }\n const userRequestedPlatforms = resolvePlatformNames(nativeProp);\n for (const platform of ALL_PLATFORMS) {\n if (platform === currentPlatform && userRequestedPlatforms.has(platform)) {\n return platform;\n }\n }\n return null;\n}\nfunction resolvePlatformNames(nativeProp) {\n const platforms = nativeProp === true ? ALL_PLATFORMS : nativeProp === false ? [] : Array.isArray(nativeProp) ? nativeProp : [nativeProp];\n const set = new Set(platforms);\n if (set.has(\"mobile\")) {\n set.add(\"android\");\n set.add(\"ios\");\n set.delete(\"mobile\");\n }\n return set;\n}\nexport {\n shouldRenderNativePlatform\n};\n//# sourceMappingURL=shouldRenderNativePlatform.js.map\n"],"mappings":";;;AACA,MAAM,gBAAgB;CAAC;CAAO;CAAW;AAAK;AAC9C,SAAS,2BAA2B,YAAY;CAC9C,IAAI,CAAC,YAAY;EACf,OAAO;CACT;CACA,MAAM,yBAAyB,qBAAqB,UAAU;CAC9D,KAAK,MAAM,YAAY,eAAe;EACpC,IAAI,aAAa,mBAAmB,uBAAuB,IAAI,QAAQ,GAAG;GACxE,OAAO;EACT;CACF;CACA,OAAO;AACT;AACA,SAAS,qBAAqB,YAAY;CACxC,MAAM,YAAY,eAAe,OAAO,gBAAgB,eAAe,QAAQ,CAAC,IAAI,MAAM,QAAQ,UAAU,IAAI,aAAa,CAAC,UAAU;CACxI,MAAM,MAAM,IAAI,IAAI,SAAS;CAC7B,IAAI,IAAI,IAAI,QAAQ,GAAG;EACrB,IAAI,IAAI,SAAS;EACjB,IAAI,IAAI,KAAK;EACb,IAAI,OAAO,QAAQ;CACrB;CACA,OAAO;AACT"}
|
|
@@ -1,49 +1,49 @@
|
|
|
1
1
|
import { currentPlatform } from "@tamagui/constants";
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
var ALL_PLATFORMS = [
|
|
4
|
+
"web",
|
|
5
|
+
"android",
|
|
6
|
+
"ios"
|
|
7
|
+
];
|
|
3
8
|
function shouldRenderNativePlatform(nativeProp) {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
return null;
|
|
9
|
+
if (!nativeProp) {
|
|
10
|
+
return null;
|
|
11
|
+
}
|
|
12
|
+
var userRequestedPlatforms = resolvePlatformNames(nativeProp);
|
|
13
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
14
|
+
try {
|
|
15
|
+
for (var _iterator = ALL_PLATFORMS[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
16
|
+
var platform = _step.value;
|
|
17
|
+
if (platform === currentPlatform && userRequestedPlatforms.has(platform)) {
|
|
18
|
+
return platform;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
} catch (err) {
|
|
22
|
+
_didIteratorError = true;
|
|
23
|
+
_iteratorError = err;
|
|
24
|
+
} finally {
|
|
25
|
+
try {
|
|
26
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
27
|
+
_iterator.return();
|
|
28
|
+
}
|
|
29
|
+
} finally {
|
|
30
|
+
if (_didIteratorError) {
|
|
31
|
+
throw _iteratorError;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return null;
|
|
33
36
|
}
|
|
34
37
|
function resolvePlatformNames(nativeProp) {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
set.add("ios");
|
|
44
|
-
set.delete("mobile");
|
|
45
|
-
}
|
|
46
|
-
return set;
|
|
38
|
+
var platforms = nativeProp === true ? ALL_PLATFORMS : nativeProp === false ? [] : Array.isArray(nativeProp) ? nativeProp : [nativeProp];
|
|
39
|
+
var set = new Set(platforms);
|
|
40
|
+
if (set.has("mobile")) {
|
|
41
|
+
set.add("android");
|
|
42
|
+
set.add("ios");
|
|
43
|
+
set.delete("mobile");
|
|
44
|
+
}
|
|
45
|
+
return set;
|
|
47
46
|
}
|
|
47
|
+
|
|
48
48
|
export { shouldRenderNativePlatform };
|
|
49
49
|
//# sourceMappingURL=shouldRenderNativePlatform.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"shouldRenderNativePlatform.native.js","names":[],"sources":["esm/shouldRenderNativePlatform.native.js"],"sourcesContent":["import { currentPlatform } from \"@tamagui/constants\";\nvar ALL_PLATFORMS = [\n \"web\",\n \"android\",\n \"ios\"\n];\nfunction shouldRenderNativePlatform(nativeProp) {\n if (!nativeProp) {\n return null;\n }\n var userRequestedPlatforms = resolvePlatformNames(nativeProp);\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = ALL_PLATFORMS[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var platform = _step.value;\n if (platform === currentPlatform && userRequestedPlatforms.has(platform)) {\n return platform;\n }\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n return null;\n}\nfunction resolvePlatformNames(nativeProp) {\n var platforms = nativeProp === true ? (\n // all native platforms\n ALL_PLATFORMS\n ) : nativeProp === false ? (\n // no native platform\n []\n ) : Array.isArray(nativeProp) ? nativeProp : [\n nativeProp\n ];\n var set = new Set(platforms);\n if (set.has(\"mobile\")) {\n set.add(\"android\");\n set.add(\"ios\");\n set.delete(\"mobile\");\n }\n return set;\n}\nexport {\n shouldRenderNativePlatform\n};\n//# sourceMappingURL=shouldRenderNativePlatform.js.map\n"],"mappings":";;;AACA,IAAI,gBAAgB;CAClB;CACA;CACA;AACF;AACA,SAAS,2BAA2B,YAAY;CAC9C,IAAI,CAAC,YAAY;EACf,OAAO;CACT;CACA,IAAI,yBAAyB,qBAAqB,UAAU;CAC5D,IAAI,4BAA4B,MAAM,oBAAoB,OAAO,iBAAiB,KAAK;CACvF,IAAI;EACF,KAAK,IAAI,YAAY,cAAc,OAAO,UAAU,GAAG,OAAO,EAAE,6BAA6B,QAAQ,UAAU,KAAK,GAAG,OAAO,4BAA4B,MAAM;GAC9J,IAAI,WAAW,MAAM;GACrB,IAAI,aAAa,mBAAmB,uBAAuB,IAAI,QAAQ,GAAG;IACxE,OAAO;GACT;EACF;CACF,SAAS,KAAK;EACZ,oBAAoB;EACpB,iBAAiB;CACnB,UAAU;EACR,IAAI;GACF,IAAI,CAAC,6BAA6B,UAAU,UAAU,MAAM;IAC1D,UAAU,OAAO;GACnB;EACF,UAAU;GACR,IAAI,mBAAmB;IACrB,MAAM;GACR;EACF;CACF;CACA,OAAO;AACT;AACA,SAAS,qBAAqB,YAAY;CACxC,IAAI,YAAY,eAAe,OAE7B,gBACE,eAAe,QAEjB,CAAC,IACC,MAAM,QAAQ,UAAU,IAAI,aAAa,CAC3C,UACF;CACA,IAAI,MAAM,IAAI,IAAI,SAAS;CAC3B,IAAI,IAAI,IAAI,QAAQ,GAAG;EACrB,IAAI,IAAI,SAAS;EACjB,IAAI,IAAI,KAAK;EACb,IAAI,OAAO,QAAQ;CACrB;CACA,OAAO;AACT"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const schemePrefix = /^(dark|light)_/;
|
|
2
|
+
function getThemeClassNames(name, isRoot = false) {
|
|
3
|
+
const themeClassName = name.replace(schemePrefix, "");
|
|
4
|
+
const fullThemeClassName = name === themeClassName ? "" : ` t_${name}`;
|
|
5
|
+
const themeNameParts = themeClassName.split("_");
|
|
6
|
+
let themeClasses = `t_${themeClassName}${fullThemeClassName}`;
|
|
7
|
+
if (themeNameParts.length > 1) {
|
|
8
|
+
const hierarchyClasses = [];
|
|
9
|
+
for (let i = 1; i <= themeNameParts.length; i++) {
|
|
10
|
+
hierarchyClasses.push(`t_${themeNameParts.slice(0, i).join("_")}`);
|
|
11
|
+
}
|
|
12
|
+
themeClasses = `${hierarchyClasses.join(" ")}${fullThemeClassName}`;
|
|
13
|
+
}
|
|
14
|
+
return `${isRoot ? "" : "t_sub_theme"} ${themeClasses}`;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export { getThemeClassNames };
|
|
18
|
+
//# sourceMappingURL=themeClassNames.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"themeClassNames.js","names":[],"sources":["esm/themeClassNames.js"],"sourcesContent":["const schemePrefix = /^(dark|light)_/;\nfunction getThemeClassNames(name, isRoot = false) {\n const themeClassName = name.replace(schemePrefix, \"\");\n const fullThemeClassName = name === themeClassName ? \"\" : ` t_${name}`;\n const themeNameParts = themeClassName.split(\"_\");\n let themeClasses = `t_${themeClassName}${fullThemeClassName}`;\n if (themeNameParts.length > 1) {\n const hierarchyClasses = [];\n for (let i = 1; i <= themeNameParts.length; i++) {\n hierarchyClasses.push(`t_${themeNameParts.slice(0, i).join(\"_\")}`);\n }\n themeClasses = `${hierarchyClasses.join(\" \")}${fullThemeClassName}`;\n }\n return `${isRoot ? \"\" : \"t_sub_theme\"} ${themeClasses}`;\n}\nexport {\n getThemeClassNames\n};\n//# sourceMappingURL=themeClassNames.js.map\n"],"mappings":";AAAA,MAAM,eAAe;AACrB,SAAS,mBAAmB,MAAM,SAAS,OAAO;CAChD,MAAM,iBAAiB,KAAK,QAAQ,cAAc,EAAE;CACpD,MAAM,qBAAqB,SAAS,iBAAiB,KAAK,MAAM;CAChE,MAAM,iBAAiB,eAAe,MAAM,GAAG;CAC/C,IAAI,eAAe,KAAK,iBAAiB;CACzC,IAAI,eAAe,SAAS,GAAG;EAC7B,MAAM,mBAAmB,CAAC;EAC1B,KAAK,IAAI,IAAI,GAAG,KAAK,eAAe,QAAQ,KAAK;GAC/C,iBAAiB,KAAK,KAAK,eAAe,MAAM,GAAG,CAAC,EAAE,KAAK,GAAG,GAAG;EACnE;EACA,eAAe,GAAG,iBAAiB,KAAK,GAAG,IAAI;CACjD;CACA,OAAO,GAAG,SAAS,KAAK,cAAc,GAAG;AAC3C"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
var schemePrefix = /^(dark|light)_/;
|
|
2
|
+
function getThemeClassNames(name) {
|
|
3
|
+
var isRoot = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
|
|
4
|
+
var themeClassName = name.replace(schemePrefix, "");
|
|
5
|
+
var fullThemeClassName = name === themeClassName ? "" : ` t_${name}`;
|
|
6
|
+
var themeNameParts = themeClassName.split("_");
|
|
7
|
+
var themeClasses = `t_${themeClassName}${fullThemeClassName}`;
|
|
8
|
+
if (themeNameParts.length > 1) {
|
|
9
|
+
var hierarchyClasses = [];
|
|
10
|
+
for (var i = 1; i <= themeNameParts.length; i++) {
|
|
11
|
+
hierarchyClasses.push(`t_${themeNameParts.slice(0, i).join("_")}`);
|
|
12
|
+
}
|
|
13
|
+
themeClasses = `${hierarchyClasses.join(" ")}${fullThemeClassName}`;
|
|
14
|
+
}
|
|
15
|
+
return `${isRoot ? "" : "t_sub_theme"} ${themeClasses}`;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export { getThemeClassNames };
|
|
19
|
+
//# sourceMappingURL=themeClassNames.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"themeClassNames.native.js","names":[],"sources":["esm/themeClassNames.native.js"],"sourcesContent":["var schemePrefix = /^(dark|light)_/;\nfunction getThemeClassNames(name) {\n var isRoot = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;\n var themeClassName = name.replace(schemePrefix, \"\");\n var fullThemeClassName = name === themeClassName ? \"\" : ` t_${name}`;\n var themeNameParts = themeClassName.split(\"_\");\n var themeClasses = `t_${themeClassName}${fullThemeClassName}`;\n if (themeNameParts.length > 1) {\n var hierarchyClasses = [];\n for (var i = 1; i <= themeNameParts.length; i++) {\n hierarchyClasses.push(`t_${themeNameParts.slice(0, i).join(\"_\")}`);\n }\n themeClasses = `${hierarchyClasses.join(\" \")}${fullThemeClassName}`;\n }\n return `${isRoot ? \"\" : \"t_sub_theme\"} ${themeClasses}`;\n}\nexport {\n getThemeClassNames\n};\n//# sourceMappingURL=themeClassNames.js.map\n"],"mappings":";AAAA,IAAI,eAAe;AACnB,SAAS,mBAAmB,MAAM;CAChC,IAAI,SAAS,UAAU,SAAS,KAAK,UAAU,OAAO,KAAK,IAAI,UAAU,KAAK;CAC9E,IAAI,iBAAiB,KAAK,QAAQ,cAAc,EAAE;CAClD,IAAI,qBAAqB,SAAS,iBAAiB,KAAK,MAAM;CAC9D,IAAI,iBAAiB,eAAe,MAAM,GAAG;CAC7C,IAAI,eAAe,KAAK,iBAAiB;CACzC,IAAI,eAAe,SAAS,GAAG;EAC7B,IAAI,mBAAmB,CAAC;EACxB,KAAK,IAAI,IAAI,GAAG,KAAK,eAAe,QAAQ,KAAK;GAC/C,iBAAiB,KAAK,KAAK,eAAe,MAAM,GAAG,CAAC,EAAE,KAAK,GAAG,GAAG;EACnE;EACA,eAAe,GAAG,iBAAiB,KAAK,GAAG,IAAI;CACjD;CACA,OAAO,GAAG,SAAS,KAAK,cAAc,GAAG;AAC3C"}
|