@hanzogui/create-theme 2.0.0-rc.41-hanzoai.5
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/LICENSE +21 -0
- package/dist/cjs/applyMask.cjs +67 -0
- package/dist/cjs/applyMask.native.js +76 -0
- package/dist/cjs/applyMask.native.js.map +1 -0
- package/dist/cjs/combineMasks.cjs +48 -0
- package/dist/cjs/combineMasks.native.js +73 -0
- package/dist/cjs/combineMasks.native.js.map +1 -0
- package/dist/cjs/createTheme.cjs +105 -0
- package/dist/cjs/createTheme.native.js +111 -0
- package/dist/cjs/createTheme.native.js.map +1 -0
- package/dist/cjs/createThemeTypes.cjs +18 -0
- package/dist/cjs/createThemeTypes.native.js +21 -0
- package/dist/cjs/createThemeTypes.native.js.map +1 -0
- package/dist/cjs/helpers.cjs +36 -0
- package/dist/cjs/helpers.native.js +41 -0
- package/dist/cjs/helpers.native.js.map +1 -0
- package/dist/cjs/index.cjs +25 -0
- package/dist/cjs/index.native.js +28 -0
- package/dist/cjs/index.native.js.map +1 -0
- package/dist/cjs/isMinusZero.cjs +30 -0
- package/dist/cjs/isMinusZero.native.js +33 -0
- package/dist/cjs/isMinusZero.native.js.map +1 -0
- package/dist/cjs/masks.cjs +146 -0
- package/dist/cjs/masks.native.js +192 -0
- package/dist/cjs/masks.native.js.map +1 -0
- package/dist/cjs/tests.cjs +26 -0
- package/dist/cjs/tests.native.js +29 -0
- package/dist/cjs/tests.native.js.map +1 -0
- package/dist/cjs/themeInfo.cjs +40 -0
- package/dist/cjs/themeInfo.native.js +43 -0
- package/dist/cjs/themeInfo.native.js.map +1 -0
- package/dist/esm/applyMask.mjs +41 -0
- package/dist/esm/applyMask.mjs.map +1 -0
- package/dist/esm/applyMask.native.js +47 -0
- package/dist/esm/applyMask.native.js.map +1 -0
- package/dist/esm/combineMasks.mjs +23 -0
- package/dist/esm/combineMasks.mjs.map +1 -0
- package/dist/esm/combineMasks.native.js +45 -0
- package/dist/esm/combineMasks.native.js.map +1 -0
- package/dist/esm/createTheme.mjs +78 -0
- package/dist/esm/createTheme.mjs.map +1 -0
- package/dist/esm/createTheme.native.js +81 -0
- package/dist/esm/createTheme.native.js.map +1 -0
- package/dist/esm/createThemeTypes.mjs +2 -0
- package/dist/esm/createThemeTypes.mjs.map +1 -0
- package/dist/esm/createThemeTypes.native.js +2 -0
- package/dist/esm/createThemeTypes.native.js.map +1 -0
- package/dist/esm/helpers.mjs +9 -0
- package/dist/esm/helpers.mjs.map +1 -0
- package/dist/esm/helpers.native.js +11 -0
- package/dist/esm/helpers.native.js.map +1 -0
- package/dist/esm/index.js +7 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/index.mjs +7 -0
- package/dist/esm/index.mjs.map +1 -0
- package/dist/esm/index.native.js +7 -0
- package/dist/esm/index.native.js.map +1 -0
- package/dist/esm/isMinusZero.mjs +5 -0
- package/dist/esm/isMinusZero.mjs.map +1 -0
- package/dist/esm/isMinusZero.native.js +5 -0
- package/dist/esm/isMinusZero.native.js.map +1 -0
- package/dist/esm/masks.mjs +114 -0
- package/dist/esm/masks.mjs.map +1 -0
- package/dist/esm/masks.native.js +157 -0
- package/dist/esm/masks.native.js.map +1 -0
- package/dist/esm/tests.mjs +27 -0
- package/dist/esm/tests.mjs.map +1 -0
- package/dist/esm/tests.native.js +27 -0
- package/dist/esm/tests.native.js.map +1 -0
- package/dist/esm/themeInfo.mjs +14 -0
- package/dist/esm/themeInfo.mjs.map +1 -0
- package/dist/esm/themeInfo.native.js +14 -0
- package/dist/esm/themeInfo.native.js.map +1 -0
- package/package.json +42 -0
- package/src/applyMask.tsx +69 -0
- package/src/combineMasks.tsx +29 -0
- package/src/createTheme.tsx +127 -0
- package/src/createThemeTypes.tsx +85 -0
- package/src/helpers.tsx +44 -0
- package/src/index.tsx +6 -0
- package/src/isMinusZero.tsx +3 -0
- package/src/masks.tsx +137 -0
- package/src/tests.tsx +28 -0
- package/src/themeInfo.tsx +36 -0
- package/types/applyMask.d.ts +8 -0
- package/types/applyMask.d.ts.map +11 -0
- package/types/combineMasks.d.ts +4 -0
- package/types/combineMasks.d.ts.map +11 -0
- package/types/createTheme.d.ts +28 -0
- package/types/createTheme.d.ts.map +11 -0
- package/types/createThemeTypes.d.ts +67 -0
- package/types/createThemeTypes.d.ts.map +11 -0
- package/types/helpers.d.ts +18 -0
- package/types/helpers.d.ts.map +11 -0
- package/types/index.d.ts +8 -0
- package/types/index.d.ts.map +11 -0
- package/types/isMinusZero.d.ts +3 -0
- package/types/isMinusZero.d.ts.map +11 -0
- package/types/masks.d.ts +15 -0
- package/types/masks.d.ts.map +11 -0
- package/types/tests.d.ts +3 -0
- package/types/tests.d.ts.map +11 -0
- package/types/themeInfo.d.ts +13 -0
- package/types/themeInfo.d.ts.map +11 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020 Nate Wienert
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,67 @@
|
|
|
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", {
|
|
21
|
+
value: true
|
|
22
|
+
}), mod);
|
|
23
|
+
var applyMask_exports = {};
|
|
24
|
+
__export(applyMask_exports, {
|
|
25
|
+
applyMask: () => applyMask,
|
|
26
|
+
applyMaskStateless: () => applyMaskStateless
|
|
27
|
+
});
|
|
28
|
+
module.exports = __toCommonJS(applyMask_exports);
|
|
29
|
+
var import_createTheme = require("./createTheme.cjs");
|
|
30
|
+
var import_themeInfo = require("./themeInfo.cjs");
|
|
31
|
+
function applyMask(theme, mask, options = {}, parentName, nextName) {
|
|
32
|
+
const info = (0, import_themeInfo.getThemeInfo)(theme, parentName);
|
|
33
|
+
if (!info) {
|
|
34
|
+
throw new Error(process.env.NODE_ENV !== "production" ? `No info found for theme, you must pass the theme created by createThemeFromPalette directly to extendTheme` : `\u274C Err2`);
|
|
35
|
+
}
|
|
36
|
+
const next = applyMaskStateless(info, mask, options, parentName);
|
|
37
|
+
(0, import_themeInfo.setThemeInfo)(next.theme, {
|
|
38
|
+
definition: next.definition,
|
|
39
|
+
palette: info.palette,
|
|
40
|
+
name: nextName
|
|
41
|
+
});
|
|
42
|
+
return next.theme;
|
|
43
|
+
}
|
|
44
|
+
function applyMaskStateless(info, mask, options = {}, parentName) {
|
|
45
|
+
const skip = {
|
|
46
|
+
...options.skip
|
|
47
|
+
};
|
|
48
|
+
if (info.options?.nonInheritedValues) {
|
|
49
|
+
for (const key in info.options.nonInheritedValues) {
|
|
50
|
+
skip[key] = 1;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
const maskOptions = {
|
|
54
|
+
parentName,
|
|
55
|
+
palette: info.palette,
|
|
56
|
+
...options,
|
|
57
|
+
skip
|
|
58
|
+
};
|
|
59
|
+
const template = mask.mask(info.definition, maskOptions);
|
|
60
|
+
const theme = (0, import_createTheme.createTheme)(info.palette, template);
|
|
61
|
+
return {
|
|
62
|
+
...info,
|
|
63
|
+
cache: /* @__PURE__ */new Map(),
|
|
64
|
+
definition: template,
|
|
65
|
+
theme
|
|
66
|
+
};
|
|
67
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
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", {
|
|
23
|
+
value: true
|
|
24
|
+
}), mod);
|
|
25
|
+
var applyMask_exports = {};
|
|
26
|
+
__export(applyMask_exports, {
|
|
27
|
+
applyMask: () => applyMask,
|
|
28
|
+
applyMaskStateless: () => applyMaskStateless
|
|
29
|
+
});
|
|
30
|
+
module.exports = __toCommonJS(applyMask_exports);
|
|
31
|
+
var import_createTheme = require("./createTheme.native.js");
|
|
32
|
+
var import_themeInfo = require("./themeInfo.native.js");
|
|
33
|
+
function applyMask(theme, mask) {
|
|
34
|
+
var options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {},
|
|
35
|
+
parentName = arguments.length > 3 ? arguments[3] : void 0,
|
|
36
|
+
nextName = arguments.length > 4 ? arguments[4] : void 0;
|
|
37
|
+
var info = (0, import_themeInfo.getThemeInfo)(theme, parentName);
|
|
38
|
+
if (!info) {
|
|
39
|
+
throw new Error(process.env.NODE_ENV !== "production" ? `No info found for theme, you must pass the theme created by createThemeFromPalette directly to extendTheme` : `\u274C Err2`);
|
|
40
|
+
}
|
|
41
|
+
var next = applyMaskStateless(info, mask, options, parentName);
|
|
42
|
+
(0, import_themeInfo.setThemeInfo)(next.theme, {
|
|
43
|
+
definition: next.definition,
|
|
44
|
+
palette: info.palette,
|
|
45
|
+
name: nextName
|
|
46
|
+
});
|
|
47
|
+
return next.theme;
|
|
48
|
+
}
|
|
49
|
+
function applyMaskStateless(info, mask) {
|
|
50
|
+
var options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {},
|
|
51
|
+
parentName = arguments.length > 3 ? arguments[3] : void 0;
|
|
52
|
+
var _info_options;
|
|
53
|
+
var skip = {
|
|
54
|
+
...options.skip
|
|
55
|
+
};
|
|
56
|
+
if ((_info_options = info.options) === null || _info_options === void 0 ? void 0 : _info_options.nonInheritedValues) {
|
|
57
|
+
for (var key in info.options.nonInheritedValues) {
|
|
58
|
+
skip[key] = 1;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
var maskOptions = {
|
|
62
|
+
parentName,
|
|
63
|
+
palette: info.palette,
|
|
64
|
+
...options,
|
|
65
|
+
skip
|
|
66
|
+
};
|
|
67
|
+
var template = mask.mask(info.definition, maskOptions);
|
|
68
|
+
var theme = (0, import_createTheme.createTheme)(info.palette, template);
|
|
69
|
+
return {
|
|
70
|
+
...info,
|
|
71
|
+
cache: /* @__PURE__ */new Map(),
|
|
72
|
+
definition: template,
|
|
73
|
+
theme
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=applyMask.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","applyMask_exports","__export","applyMask","applyMaskStateless","module","exports","import_createTheme","require","import_themeInfo","theme","mask","options","arguments","length","parentName","nextName","info","getThemeInfo","Error","process","env","NODE_ENV","next","setThemeInfo","definition","palette","name","_info_options","skip","nonInheritedValues","key","maskOptions","template","createTheme","cache","Map"],"sources":["../../src/applyMask.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,iBAAA;AAAAC,QAAA,CAAAD,iBAAA;EAAAE,SAAA,EAAAA,CAAA,KAAAA,SAAA;EAAAC,kBAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAV,YAA4B,CAAAK,iBAAA;AAG5B,IAAAM,kBAAA,GAA2CC,OAAA;AAEpC,IAAAC,gBACL,GAAAD,OACA,wBACwB;AAIxB,SAAML,UAAOO,KAAA,EAAAC,IAAA;EACb,IAAIC,OAAO,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,iBAAAA,SAAA;IAAAE,UAAA,GAAAF,SAAA,CAAAC,MAAA,OAAAD,SAAA;IAAAG,QAAA,GAAAH,SAAA,CAAAC,MAAA,OAAAD,SAAA;EACT,IAAAI,IAAM,IAAI,GAAAR,gBAAA,CAAAS,YAAA,EAAAR,KAAA,EAAAK,UAAA;EAAA,IACR,CAAAE,IAAA;IAGF,UAAAE,KAAA,CAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA;EACF;EAEA,IAAAC,IAAM,GAAAnB,kBAAO,CAAAa,IAAmB,EAAAN,IAAM,EAAAC,OAAM,EAAAG,UAAS;EAErD,IAAAN,gBAAA,CAAAe,YAAA,EAAaD,IAAA,CAAKb,KAAA,EAAO;IACvBe,UAAA,EAAYF,IAAA,CAAKE,UAAA;IACjBC,OAAA,EAAST,IAAA,CAAKS,OAAA;IACdC,IAAA,EAAMX;EACR,CAAC;EAED,OAAOO,IAAA,CAAKb,KAAA;AACd;AAEO,SAASN,mBACda,IAAA,EACAN,IAAA,EACA;EAKA,IAAAC,OAAM,GAAOC,SAAA,CAAAC,MAAA,QAAAD,SAAA,iBAAAA,SAAA;IAAAE,UAAA,GAAAF,SAAA,CAAAC,MAAA,OAAAD,SAAA;EAAA,IACXe,aAAW;EACb,IAAAC,IAAA;IAGA,GAAIjB,OAAK,CAAAiB;EACP;EACE,KAAAD,aAAY,GAAAX,IAAA,CAAAL,OAAA,cAAAgB,aAAA,uBAAAA,aAAA,CAAAE,kBAAA;IACd,SAAAC,GAAA,IAAAd,IAAA,CAAAL,OAAA,CAAAkB,kBAAA;MACFD,IAAA,CAAAE,GAAA;IAGA;EAAoB;EAClB,IACAC,WAAS,GAAK;IACdjB,UAAG;IACHW,OAAA,EAAAT,IAAA,CAAAS,OAAA;IACF,GAAAd,OAAA;IAEAiB;EACA;EAEA,IAAAI,QAAO,GAAAtB,IAAA,CAAAA,IAAA,CAAAM,IAAA,CAAAQ,UAAA,EAAAO,WAAA;EAAA,IACLtB,KAAG,OAAAH,kBAAA,CAAA2B,WAAA,EAAAjB,IAAA,CAAAS,OAAA,EAAAO,QAAA;EAAA,OACH;IACA,GAAAhB,IAAA;IACAkB,KAAA,qBAAAC,GAAA;IACFX,UAAA,EAAAQ,QAAA;IACFvB","ignoreList":[]}
|
|
@@ -0,0 +1,48 @@
|
|
|
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", {
|
|
21
|
+
value: true
|
|
22
|
+
}), mod);
|
|
23
|
+
var combineMasks_exports = {};
|
|
24
|
+
__export(combineMasks_exports, {
|
|
25
|
+
combineMasks: () => combineMasks
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(combineMasks_exports);
|
|
28
|
+
var import_applyMask = require("./applyMask.cjs");
|
|
29
|
+
var import_themeInfo = require("./themeInfo.cjs");
|
|
30
|
+
const combineMasks = (...masks) => {
|
|
31
|
+
const mask = {
|
|
32
|
+
name: "combine-mask",
|
|
33
|
+
mask: (template, opts) => {
|
|
34
|
+
let current = (0, import_themeInfo.getThemeInfo)(template, opts.parentName);
|
|
35
|
+
let theme;
|
|
36
|
+
for (const mask2 of masks) {
|
|
37
|
+
if (!current) {
|
|
38
|
+
throw new Error(`Nothing returned from mask: ${current}, for template: ${template} and mask: ${mask2.toString()}, given opts ${JSON.stringify(opts, null, 2)}`);
|
|
39
|
+
}
|
|
40
|
+
const next = (0, import_applyMask.applyMaskStateless)(current, mask2, opts);
|
|
41
|
+
current = next;
|
|
42
|
+
theme = next.theme;
|
|
43
|
+
}
|
|
44
|
+
return theme;
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
return mask;
|
|
48
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
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", {
|
|
23
|
+
value: true
|
|
24
|
+
}), mod);
|
|
25
|
+
var combineMasks_exports = {};
|
|
26
|
+
__export(combineMasks_exports, {
|
|
27
|
+
combineMasks: () => combineMasks
|
|
28
|
+
});
|
|
29
|
+
module.exports = __toCommonJS(combineMasks_exports);
|
|
30
|
+
var import_applyMask = require("./applyMask.native.js");
|
|
31
|
+
var import_themeInfo = require("./themeInfo.native.js");
|
|
32
|
+
var combineMasks = function () {
|
|
33
|
+
for (var _len = arguments.length, masks = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
34
|
+
masks[_key] = arguments[_key];
|
|
35
|
+
}
|
|
36
|
+
var mask = {
|
|
37
|
+
name: "combine-mask",
|
|
38
|
+
mask: function (template, opts) {
|
|
39
|
+
var current = (0, import_themeInfo.getThemeInfo)(template, opts.parentName);
|
|
40
|
+
var theme;
|
|
41
|
+
var _iteratorNormalCompletion = true,
|
|
42
|
+
_didIteratorError = false,
|
|
43
|
+
_iteratorError = void 0;
|
|
44
|
+
try {
|
|
45
|
+
for (var _iterator = masks[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
46
|
+
var mask2 = _step.value;
|
|
47
|
+
if (!current) {
|
|
48
|
+
throw new Error(`Nothing returned from mask: ${current}, for template: ${template} and mask: ${mask2.toString()}, given opts ${JSON.stringify(opts, null, 2)}`);
|
|
49
|
+
}
|
|
50
|
+
var next = (0, import_applyMask.applyMaskStateless)(current, mask2, opts);
|
|
51
|
+
current = next;
|
|
52
|
+
theme = next.theme;
|
|
53
|
+
}
|
|
54
|
+
} catch (err) {
|
|
55
|
+
_didIteratorError = true;
|
|
56
|
+
_iteratorError = err;
|
|
57
|
+
} finally {
|
|
58
|
+
try {
|
|
59
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
60
|
+
_iterator.return();
|
|
61
|
+
}
|
|
62
|
+
} finally {
|
|
63
|
+
if (_didIteratorError) {
|
|
64
|
+
throw _iteratorError;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
return theme;
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
return mask;
|
|
72
|
+
};
|
|
73
|
+
//# sourceMappingURL=combineMasks.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","combineMasks_exports","__export","combineMasks","module","exports","import_applyMask","require","import_themeInfo","_len","arguments","length","masks","Array","_key","mask","name","template","opts","current","getThemeInfo","parentName","theme","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_iterator","Symbol","iterator","_step","next","done","mask2","Error","toString","JSON","stringify","applyMaskStateless","err"],"sources":["../../src/combineMasks.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,oBAAA;AAAAC,QAAA,CAAAD,oBAAA;EAAAE,YAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAT,YAAmC,CAAAK,oBAAA;AAEnC,IAAAK,gBAAA,GAA6BC,OAAA;AAEtB,IAAAC,gBAAM,GAAeD,OAAI,wBAAoC;AAClE,IAAAJ,YAAyB,YAAAA,CAAA;EAAA,KACvB,IAAMM,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAAC,KAAA,OAAAC,KAAA,CAAAJ,IAAA,GAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;IACNF,KAAA,CAAME,IAAC,IAAAJ,SAAU,CAAAI,IAAS;EACxB;EACA,IAAAC,IAAI;IACJC,IAAA,gBAAW;IACTD,IAAA,WAAAA,CAAKE,QAAS,EAAAC,IAAA;MACZ,IAAAC,OAAM,GAAI,IAAAX,gBAAA,CAAAY,YAAA,EAAAH,QAAA,EAAAC,IAAA,CAAAG,UAAA;MAAA,IAAAC,KACR;MAAmH,IAAAC,yBACjH;QAAAC,iBAAA;QAAAC,cAAA;MAAA;QACA,SACAC,SAAA,GAAAd,KAAA,CAAAe,MAAA,CAAAC,QAAA,KAAAC,KAAA,IAAAN,yBAAA,IAAAM,KAAA,GAAAH,SAAA,CAAAI,IAAA,IAAAC,IAAA,GAAAR,yBAAA;UAAA,IACDS,KAAA,GAAAH,KAAA,CAAA7B,KAAA;UACH,KAAAmB,OAAA;YACF,UAAAc,KAAA,gCAAAd,OAAA,mBAAAF,QAAA,cAAAe,KAAA,CAAAE,QAAA,kBAAAC,IAAA,CAAAC,SAAA,CAAAlB,IAAA;UACA;UACA,IAAAY,IAAU,OAAAxB,gBAAA,CAAA+B,kBAAA,EAAAlB,OAAA,EAAAa,KAAA,EAAAd,IAAA;UACVC,OAAQ,GAAAW,IAAK;UACfR,KAAA,GAAAQ,IAAA,CAAAR,KAAA;QACA;MACF,SAAAgB,GAAA;QACFd,iBAAA;QACAC,cAAO,GAAAa,GAAA;MACT","ignoreList":[]}
|
|
@@ -0,0 +1,105 @@
|
|
|
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", {
|
|
21
|
+
value: true
|
|
22
|
+
}), mod);
|
|
23
|
+
var createTheme_exports = {};
|
|
24
|
+
__export(createTheme_exports, {
|
|
25
|
+
addChildren: () => addChildren,
|
|
26
|
+
createTheme: () => createTheme,
|
|
27
|
+
createThemeWithPalettes: () => createThemeWithPalettes
|
|
28
|
+
});
|
|
29
|
+
module.exports = __toCommonJS(createTheme_exports);
|
|
30
|
+
var import_isMinusZero = require("./isMinusZero.cjs");
|
|
31
|
+
var import_themeInfo = require("./themeInfo.cjs");
|
|
32
|
+
const identityCache = /* @__PURE__ */new Map();
|
|
33
|
+
function createThemeWithPalettes(palettes, defaultPalette, definition, options, name, skipCache = false) {
|
|
34
|
+
if (!palettes[defaultPalette]) {
|
|
35
|
+
throw new Error(`No palette: ${defaultPalette}`);
|
|
36
|
+
}
|
|
37
|
+
const newDef = {
|
|
38
|
+
...definition
|
|
39
|
+
};
|
|
40
|
+
for (const key in definition) {
|
|
41
|
+
let val = definition[key];
|
|
42
|
+
if (typeof val === "string" && val[0] === "$") {
|
|
43
|
+
const [altPaletteName$, altPaletteIndex] = val.split(".");
|
|
44
|
+
const altPaletteName = altPaletteName$.slice(1);
|
|
45
|
+
const parentName = defaultPalette.split("_")[0];
|
|
46
|
+
const altPalette = palettes[altPaletteName] || palettes[`${parentName}_${altPaletteName}`];
|
|
47
|
+
if (altPalette) {
|
|
48
|
+
const next = getValue(altPalette, +altPaletteIndex);
|
|
49
|
+
if (typeof next !== "undefined") {
|
|
50
|
+
newDef[key] = next;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
return createTheme(palettes[defaultPalette], newDef, options, name, skipCache);
|
|
56
|
+
}
|
|
57
|
+
function createTheme(palette, definition, options, name, skipCache = false) {
|
|
58
|
+
const cacheKey = skipCache ? "" : JSON.stringify([name, palette, definition, options]);
|
|
59
|
+
if (!skipCache) {
|
|
60
|
+
if (identityCache.has(cacheKey)) {
|
|
61
|
+
return identityCache.get(cacheKey);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
const theme = {
|
|
65
|
+
...Object.fromEntries(Object.entries(definition).map(([key, offset]) => {
|
|
66
|
+
return [key, getValue(palette, offset)];
|
|
67
|
+
})),
|
|
68
|
+
...options?.nonInheritedValues
|
|
69
|
+
};
|
|
70
|
+
(0, import_themeInfo.setThemeInfo)(theme, {
|
|
71
|
+
palette,
|
|
72
|
+
definition,
|
|
73
|
+
options,
|
|
74
|
+
name
|
|
75
|
+
});
|
|
76
|
+
if (cacheKey) {
|
|
77
|
+
identityCache.set(cacheKey, theme);
|
|
78
|
+
}
|
|
79
|
+
return theme;
|
|
80
|
+
}
|
|
81
|
+
const getValue = (palette, value) => {
|
|
82
|
+
if (!palette) {
|
|
83
|
+
throw new Error(`No palette!`);
|
|
84
|
+
}
|
|
85
|
+
if (typeof value === "string") {
|
|
86
|
+
return value;
|
|
87
|
+
}
|
|
88
|
+
const max = palette.length - 1;
|
|
89
|
+
const isPositive = value === 0 ? !(0, import_isMinusZero.isMinusZero)(value) : value >= 0;
|
|
90
|
+
const next = isPositive ? value : max + value;
|
|
91
|
+
const index = Math.min(Math.max(0, next), max);
|
|
92
|
+
return palette[index];
|
|
93
|
+
};
|
|
94
|
+
function addChildren(themes, getChildren) {
|
|
95
|
+
const out = {
|
|
96
|
+
...themes
|
|
97
|
+
};
|
|
98
|
+
for (const key in themes) {
|
|
99
|
+
const subThemes = getChildren(key, themes[key]);
|
|
100
|
+
for (const sKey in subThemes) {
|
|
101
|
+
out[`${key}_${sKey}`] = subThemes[sKey];
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
return out;
|
|
105
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
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", {
|
|
23
|
+
value: true
|
|
24
|
+
}), mod);
|
|
25
|
+
var createTheme_exports = {};
|
|
26
|
+
__export(createTheme_exports, {
|
|
27
|
+
addChildren: () => addChildren,
|
|
28
|
+
createTheme: () => createTheme,
|
|
29
|
+
createThemeWithPalettes: () => createThemeWithPalettes
|
|
30
|
+
});
|
|
31
|
+
module.exports = __toCommonJS(createTheme_exports);
|
|
32
|
+
var import_isMinusZero = require("./isMinusZero.native.js");
|
|
33
|
+
var import_themeInfo = require("./themeInfo.native.js");
|
|
34
|
+
var identityCache = /* @__PURE__ */new Map();
|
|
35
|
+
function createThemeWithPalettes(palettes, defaultPalette, definition, options, name) {
|
|
36
|
+
var skipCache = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : false;
|
|
37
|
+
if (!palettes[defaultPalette]) {
|
|
38
|
+
throw new Error(`No palette: ${defaultPalette}`);
|
|
39
|
+
}
|
|
40
|
+
var newDef = {
|
|
41
|
+
...definition
|
|
42
|
+
};
|
|
43
|
+
for (var key in definition) {
|
|
44
|
+
var val = definition[key];
|
|
45
|
+
if (typeof val === "string" && val[0] === "$") {
|
|
46
|
+
var [altPaletteName$, altPaletteIndex] = val.split(".");
|
|
47
|
+
var altPaletteName = altPaletteName$.slice(1);
|
|
48
|
+
var parentName = defaultPalette.split("_")[0];
|
|
49
|
+
var altPalette = palettes[altPaletteName] || palettes[`${parentName}_${altPaletteName}`];
|
|
50
|
+
if (altPalette) {
|
|
51
|
+
var next = getValue(altPalette, +altPaletteIndex);
|
|
52
|
+
if (typeof next !== "undefined") {
|
|
53
|
+
newDef[key] = next;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return createTheme(palettes[defaultPalette], newDef, options, name, skipCache);
|
|
59
|
+
}
|
|
60
|
+
function createTheme(palette, definition, options, name) {
|
|
61
|
+
var skipCache = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : false;
|
|
62
|
+
var cacheKey = skipCache ? "" : JSON.stringify([name, palette, definition, options]);
|
|
63
|
+
if (!skipCache) {
|
|
64
|
+
if (identityCache.has(cacheKey)) {
|
|
65
|
+
return identityCache.get(cacheKey);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
var theme = {
|
|
69
|
+
...Object.fromEntries(Object.entries(definition).map(function (param) {
|
|
70
|
+
var [key, offset] = param;
|
|
71
|
+
return [key, getValue(palette, offset)];
|
|
72
|
+
})),
|
|
73
|
+
...(options === null || options === void 0 ? void 0 : options.nonInheritedValues)
|
|
74
|
+
};
|
|
75
|
+
(0, import_themeInfo.setThemeInfo)(theme, {
|
|
76
|
+
palette,
|
|
77
|
+
definition,
|
|
78
|
+
options,
|
|
79
|
+
name
|
|
80
|
+
});
|
|
81
|
+
if (cacheKey) {
|
|
82
|
+
identityCache.set(cacheKey, theme);
|
|
83
|
+
}
|
|
84
|
+
return theme;
|
|
85
|
+
}
|
|
86
|
+
var getValue = function (palette, value) {
|
|
87
|
+
if (!palette) {
|
|
88
|
+
throw new Error(`No palette!`);
|
|
89
|
+
}
|
|
90
|
+
if (typeof value === "string") {
|
|
91
|
+
return value;
|
|
92
|
+
}
|
|
93
|
+
var max = palette.length - 1;
|
|
94
|
+
var isPositive = value === 0 ? !(0, import_isMinusZero.isMinusZero)(value) : value >= 0;
|
|
95
|
+
var next = isPositive ? value : max + value;
|
|
96
|
+
var index = Math.min(Math.max(0, next), max);
|
|
97
|
+
return palette[index];
|
|
98
|
+
};
|
|
99
|
+
function addChildren(themes, getChildren) {
|
|
100
|
+
var out = {
|
|
101
|
+
...themes
|
|
102
|
+
};
|
|
103
|
+
for (var key in themes) {
|
|
104
|
+
var subThemes = getChildren(key, themes[key]);
|
|
105
|
+
for (var sKey in subThemes) {
|
|
106
|
+
out[`${key}_${sKey}`] = subThemes[sKey];
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
return out;
|
|
110
|
+
}
|
|
111
|
+
//# sourceMappingURL=createTheme.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","createTheme_exports","__export","addChildren","createTheme","createThemeWithPalettes","module","exports","import_isMinusZero","require","import_themeInfo","identityCache","Map","palettes","defaultPalette","definition","options","name","skipCache","arguments","length","Error","newDef","key","val","altPaletteName$","altPaletteIndex","split","altPaletteName","slice","parentName","altPalette","next","getValue","palette","cacheKey","JSON","stringify","has","get","theme","Object","fromEntries","entries","map","param","offset","nonInheritedValues","setThemeInfo","set"],"sources":["../../src/createTheme.tsx"],"sourcesContent":[null],"mappings":"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","ignoreList":[]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
8
|
+
get: () => from[key],
|
|
9
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
15
|
+
value: true
|
|
16
|
+
}), mod);
|
|
17
|
+
var createThemeTypes_exports = {};
|
|
18
|
+
module.exports = __toCommonJS(createThemeTypes_exports);
|
|
@@ -0,0 +1,21 @@
|
|
|
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 __copyProps = (to, from, except, desc) => {
|
|
8
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
9
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
10
|
+
get: () => from[key],
|
|
11
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
return to;
|
|
15
|
+
};
|
|
16
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
17
|
+
value: true
|
|
18
|
+
}), mod);
|
|
19
|
+
var createThemeTypes_exports = {};
|
|
20
|
+
module.exports = __toCommonJS(createThemeTypes_exports);
|
|
21
|
+
//# sourceMappingURL=createThemeTypes.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","createThemeTypes_exports"],"sources":["../../src/createThemeTypes.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,wBAAA","ignoreList":[]}
|
|
@@ -0,0 +1,36 @@
|
|
|
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", {
|
|
21
|
+
value: true
|
|
22
|
+
}), mod);
|
|
23
|
+
var helpers_exports = {};
|
|
24
|
+
__export(helpers_exports, {
|
|
25
|
+
objectEntries: () => objectEntries,
|
|
26
|
+
objectFromEntries: () => objectFromEntries,
|
|
27
|
+
objectKeys: () => objectKeys
|
|
28
|
+
});
|
|
29
|
+
module.exports = __toCommonJS(helpers_exports);
|
|
30
|
+
const objectKeys = obj => Object.keys(obj);
|
|
31
|
+
function objectEntries(obj) {
|
|
32
|
+
return Object.entries(obj);
|
|
33
|
+
}
|
|
34
|
+
function objectFromEntries(arr) {
|
|
35
|
+
return Object.fromEntries(arr);
|
|
36
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
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", {
|
|
23
|
+
value: true
|
|
24
|
+
}), mod);
|
|
25
|
+
var helpers_exports = {};
|
|
26
|
+
__export(helpers_exports, {
|
|
27
|
+
objectEntries: () => objectEntries,
|
|
28
|
+
objectFromEntries: () => objectFromEntries,
|
|
29
|
+
objectKeys: () => objectKeys
|
|
30
|
+
});
|
|
31
|
+
module.exports = __toCommonJS(helpers_exports);
|
|
32
|
+
var objectKeys = function (obj) {
|
|
33
|
+
return Object.keys(obj);
|
|
34
|
+
};
|
|
35
|
+
function objectEntries(obj) {
|
|
36
|
+
return Object.entries(obj);
|
|
37
|
+
}
|
|
38
|
+
function objectFromEntries(arr) {
|
|
39
|
+
return Object.fromEntries(arr);
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=helpers.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","helpers_exports","__export","objectEntries","objectFromEntries","objectKeys","module","exports","obj","Object","keys","entries"],"sources":["../../src/helpers.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,eAAA;AAAAC,QAAA,CAAAD,eAAA;EAAAE,aAAA,EAAAA,CAAA,KAAAA,aAAA;EAAAC,iBAAA,EAAAA,CAAA,KAAAA,iBAAA;EAAAC,UAAA,EAAAA,CAAA,KAAAA;AAAA;AAQOC,MAAM,CAAAC,OAAA,GAAAX,YAA2C,CAAAK,eAAe;AAEhE,IAAAI,UAAS,YAAAA,CACdG,GACsB;EACtB,OAAOC,MAAA,CAAOC,IAAA,CAAAF,GAAQ;AACxB;AAyBO,SAASL,cAAAK,GAAA,EACd;EAEA,OAAOC,MAAA,CAAOE,OAAA,CAAAH,GAAA,CAAY;AAC5B","ignoreList":[]}
|