@hanzogui/theme-builder 2.0.0
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/ThemeBuilder.cjs +184 -0
- package/dist/cjs/ThemeBuilder.native.js +262 -0
- package/dist/cjs/ThemeBuilder.native.js.map +1 -0
- package/dist/cjs/createStudioThemes.cjs +40 -0
- package/dist/cjs/createStudioThemes.native.js +43 -0
- package/dist/cjs/createStudioThemes.native.js.map +1 -0
- package/dist/cjs/createThemes.cjs +345 -0
- package/dist/cjs/createThemes.native.js +366 -0
- package/dist/cjs/createThemes.native.js.map +1 -0
- package/dist/cjs/defaultComponentThemes.cjs +84 -0
- package/dist/cjs/defaultComponentThemes.native.js +87 -0
- package/dist/cjs/defaultComponentThemes.native.js.map +1 -0
- package/dist/cjs/defaultTemplates.cjs +149 -0
- package/dist/cjs/defaultTemplates.native.js +160 -0
- package/dist/cjs/defaultTemplates.native.js.map +1 -0
- package/dist/cjs/defaultTemplatesStronger.cjs +147 -0
- package/dist/cjs/defaultTemplatesStronger.native.js +158 -0
- package/dist/cjs/defaultTemplatesStronger.native.js.map +1 -0
- package/dist/cjs/defaultTemplatesStrongest.cjs +147 -0
- package/dist/cjs/defaultTemplatesStrongest.native.js +158 -0
- package/dist/cjs/defaultTemplatesStrongest.native.js.map +1 -0
- package/dist/cjs/getThemeSuitePalettes.cjs +81 -0
- package/dist/cjs/getThemeSuitePalettes.native.js +93 -0
- package/dist/cjs/getThemeSuitePalettes.native.js.map +1 -0
- package/dist/cjs/helpers.cjs +34 -0
- package/dist/cjs/helpers.native.js +39 -0
- package/dist/cjs/helpers.native.js.map +1 -0
- package/dist/cjs/index.cjs +43 -0
- package/dist/cjs/index.native.js +46 -0
- package/dist/cjs/index.native.js.map +1 -0
- package/dist/cjs/masks.cjs +114 -0
- package/dist/cjs/masks.native.js +118 -0
- package/dist/cjs/masks.native.js.map +1 -0
- package/dist/cjs/types.cjs +16 -0
- package/dist/cjs/types.native.js +19 -0
- package/dist/cjs/types.native.js.map +1 -0
- package/dist/esm/ThemeBuilder.mjs +160 -0
- package/dist/esm/ThemeBuilder.mjs.map +1 -0
- package/dist/esm/ThemeBuilder.native.js +235 -0
- package/dist/esm/ThemeBuilder.native.js.map +1 -0
- package/dist/esm/createStudioThemes.mjs +17 -0
- package/dist/esm/createStudioThemes.mjs.map +1 -0
- package/dist/esm/createStudioThemes.native.js +17 -0
- package/dist/esm/createStudioThemes.native.js.map +1 -0
- package/dist/esm/createThemes.mjs +316 -0
- package/dist/esm/createThemes.mjs.map +1 -0
- package/dist/esm/createThemes.native.js +334 -0
- package/dist/esm/createThemes.native.js.map +1 -0
- package/dist/esm/defaultComponentThemes.mjs +61 -0
- package/dist/esm/defaultComponentThemes.mjs.map +1 -0
- package/dist/esm/defaultComponentThemes.native.js +61 -0
- package/dist/esm/defaultComponentThemes.native.js.map +1 -0
- package/dist/esm/defaultTemplates.mjs +126 -0
- package/dist/esm/defaultTemplates.mjs.map +1 -0
- package/dist/esm/defaultTemplates.native.js +134 -0
- package/dist/esm/defaultTemplates.native.js.map +1 -0
- package/dist/esm/defaultTemplatesStronger.mjs +124 -0
- package/dist/esm/defaultTemplatesStronger.mjs.map +1 -0
- package/dist/esm/defaultTemplatesStronger.native.js +132 -0
- package/dist/esm/defaultTemplatesStronger.native.js.map +1 -0
- package/dist/esm/defaultTemplatesStrongest.mjs +124 -0
- package/dist/esm/defaultTemplatesStrongest.mjs.map +1 -0
- package/dist/esm/defaultTemplatesStrongest.native.js +132 -0
- package/dist/esm/defaultTemplatesStrongest.native.js.map +1 -0
- package/dist/esm/getThemeSuitePalettes.mjs +57 -0
- package/dist/esm/getThemeSuitePalettes.mjs.map +1 -0
- package/dist/esm/getThemeSuitePalettes.native.js +66 -0
- package/dist/esm/getThemeSuitePalettes.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 +10 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/index.mjs +10 -0
- package/dist/esm/index.mjs.map +1 -0
- package/dist/esm/index.native.js +10 -0
- package/dist/esm/index.native.js.map +1 -0
- package/dist/esm/masks.mjs +91 -0
- package/dist/esm/masks.mjs.map +1 -0
- package/dist/esm/masks.native.js +92 -0
- package/dist/esm/masks.native.js.map +1 -0
- package/dist/esm/types.mjs +2 -0
- package/dist/esm/types.mjs.map +1 -0
- package/dist/esm/types.native.js +2 -0
- package/dist/esm/types.native.js.map +1 -0
- package/package.json +48 -0
- package/src/ThemeBuilder.ts +514 -0
- package/src/createStudioThemes.ts +28 -0
- package/src/createThemes.ts +794 -0
- package/src/defaultComponentThemes.ts +26 -0
- package/src/defaultTemplates.ts +157 -0
- package/src/defaultTemplatesStronger.ts +152 -0
- package/src/defaultTemplatesStrongest.ts +152 -0
- package/src/getThemeSuitePalettes.ts +101 -0
- package/src/helpers.ts +44 -0
- package/src/index.ts +22 -0
- package/src/masks.tsx +83 -0
- package/src/types.ts +97 -0
- package/types/ThemeBuilder.d.ts +80 -0
- package/types/ThemeBuilder.d.ts.map +1 -0
- package/types/createStudioThemes.d.ts +8 -0
- package/types/createStudioThemes.d.ts.map +1 -0
- package/types/createThemes.d.ts +141 -0
- package/types/createThemes.d.ts.map +1 -0
- package/types/defaultComponentThemes.d.ts +63 -0
- package/types/defaultComponentThemes.d.ts.map +1 -0
- package/types/defaultTemplates.d.ts +42 -0
- package/types/defaultTemplates.d.ts.map +1 -0
- package/types/defaultTemplatesStronger.d.ts +42 -0
- package/types/defaultTemplatesStronger.d.ts.map +1 -0
- package/types/defaultTemplatesStrongest.d.ts +42 -0
- package/types/defaultTemplatesStrongest.d.ts.map +1 -0
- package/types/getThemeSuitePalettes.d.ts +7 -0
- package/types/getThemeSuitePalettes.d.ts.map +1 -0
- package/types/helpers.d.ts +24 -0
- package/types/helpers.d.ts.map +1 -0
- package/types/index.d.ts +11 -0
- package/types/index.d.ts.map +1 -0
- package/types/masks.d.ts +18 -0
- package/types/masks.d.ts.map +1 -0
- package/types/types.d.ts +76 -0
- package/types/types.d.ts.map +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","index_exports","__export","PALETTE_BACKGROUND_OFFSET","import_getThemeSuitePalettes","createPalettes","import_createThemes","createStudioThemes","import_createStudioThemes","createThemes","createV4ThemeBuilder","createV4Themes","defaultComponentThemes","import_defaultComponentThemes","defaultTemplates","import_defaultTemplates","getThemeSuitePalettes","masks","import_masks","module","exports","__reExport","require"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,aAAA;AAAAC,QAAA,CAAAD,aAAA;EAAAE,yBAAA,EAAAA,CAAA,KAAAC,4BAAA,CAAAD,yBAAA;EAAAE,cAAA,EAAAA,CAAA,KAAAC,mBAAA,CAAAD,cAAA;EAAAE,kBAAA,EAAAA,CAAA,KAAAC,yBAAA,CAAAD,kBAAA;EAAAE,YAAA,EAAAA,CAAA,KAAAH,mBAAA,CAAAG,YAAA;EAAAC,oBAAA,EAAAA,CAAA,KAAAJ,mBAAA,CAAAI,oBAAA;EAAAC,cAAA,EAAAA,CAAA,KAAAL,mBAAA,CAAAK,cAAA;EAAAC,sBAAA,EAAAA,CAAA,KAAAC,6BAAA,CAAAD,sBAAA;EAAAE,gBAAA,EAAAA,CAAA,KAAAC,uBAAA,CAAAD,gBAAA;EAAAE,qBAAA,EAAAA,CAAA,KAAAZ,4BAAA,CAAAY,qBAAA;EAAAC,KAAA,EAAAA,CAAA,KAAAC,YAAA,CAAAD;AAAA;AAAAE,MAAA,CAAAC,OAAA,GAAAxB,YAAc,CAAAK,aAAA;AACdoB,UAAA,CAAApB,aAAA,EAAcqB,OAAA,8BAAAH,MAAA,CAAAC,OADd;AAGAC,UAAA,CAAApB,aAAA,EAAAqB,OAAmC,4BAAAH,MACnC,CAAAC,OAAA","ignoreList":[]}
|
|
@@ -0,0 +1,114 @@
|
|
|
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: !0
|
|
9
|
+
});
|
|
10
|
+
},
|
|
11
|
+
__copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
13
|
+
get: () => from[key],
|
|
14
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
|
+
});
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
19
|
+
value: !0
|
|
20
|
+
}), mod);
|
|
21
|
+
var masks_exports = {};
|
|
22
|
+
__export(masks_exports, {
|
|
23
|
+
masks: () => masks
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(masks_exports);
|
|
26
|
+
var import_create_theme = require("@hanzogui/create-theme");
|
|
27
|
+
const masks = {
|
|
28
|
+
identity: (0, import_create_theme.createIdentityMask)(),
|
|
29
|
+
soften: (0, import_create_theme.createSoftenMask)(),
|
|
30
|
+
soften2: (0, import_create_theme.createSoftenMask)({
|
|
31
|
+
strength: 2
|
|
32
|
+
}),
|
|
33
|
+
soften3: (0, import_create_theme.createSoftenMask)({
|
|
34
|
+
strength: 3
|
|
35
|
+
}),
|
|
36
|
+
strengthen: (0, import_create_theme.createStrengthenMask)(),
|
|
37
|
+
inverse: (0, import_create_theme.createInverseMask)(),
|
|
38
|
+
inverseSoften: (0, import_create_theme.combineMasks)((0, import_create_theme.createInverseMask)(), (0, import_create_theme.createSoftenMask)({
|
|
39
|
+
strength: 2
|
|
40
|
+
})),
|
|
41
|
+
inverseSoften2: (0, import_create_theme.combineMasks)((0, import_create_theme.createInverseMask)(), (0, import_create_theme.createSoftenMask)({
|
|
42
|
+
strength: 3
|
|
43
|
+
})),
|
|
44
|
+
inverseSoften3: (0, import_create_theme.combineMasks)((0, import_create_theme.createInverseMask)(), (0, import_create_theme.createSoftenMask)({
|
|
45
|
+
strength: 4
|
|
46
|
+
})),
|
|
47
|
+
inverseStrengthen2: (0, import_create_theme.combineMasks)((0, import_create_theme.createInverseMask)(), (0, import_create_theme.createStrengthenMask)({
|
|
48
|
+
strength: 2
|
|
49
|
+
})),
|
|
50
|
+
strengthenButSoftenBorder: (0, import_create_theme.createMask)((template, options) => {
|
|
51
|
+
const stronger = (0, import_create_theme.createStrengthenMask)().mask(template, options),
|
|
52
|
+
softer = (0, import_create_theme.createSoftenMask)().mask(template, options);
|
|
53
|
+
return {
|
|
54
|
+
...stronger,
|
|
55
|
+
borderColor: softer.borderColor,
|
|
56
|
+
borderColorHover: softer.borderColorHover,
|
|
57
|
+
borderColorPress: softer.borderColorPress,
|
|
58
|
+
borderColorFocus: softer.borderColorFocus
|
|
59
|
+
};
|
|
60
|
+
}),
|
|
61
|
+
soften2Border1: (0, import_create_theme.createMask)((template, options) => {
|
|
62
|
+
const softer2 = (0, import_create_theme.createSoftenMask)({
|
|
63
|
+
strength: 2
|
|
64
|
+
}).mask(template, options),
|
|
65
|
+
softer1 = (0, import_create_theme.createSoftenMask)({
|
|
66
|
+
strength: 1
|
|
67
|
+
}).mask(template, options);
|
|
68
|
+
return {
|
|
69
|
+
...softer2,
|
|
70
|
+
borderColor: softer1.borderColor,
|
|
71
|
+
borderColorHover: softer1.borderColorHover,
|
|
72
|
+
borderColorPress: softer1.borderColorPress,
|
|
73
|
+
borderColorFocus: softer1.borderColorFocus
|
|
74
|
+
};
|
|
75
|
+
}),
|
|
76
|
+
soften3FlatBorder: (0, import_create_theme.createMask)((template, options) => {
|
|
77
|
+
const borderMask = (0, import_create_theme.createSoftenMask)({
|
|
78
|
+
strength: 2
|
|
79
|
+
}).mask(template, options);
|
|
80
|
+
return {
|
|
81
|
+
...(0, import_create_theme.createSoftenMask)({
|
|
82
|
+
strength: 3
|
|
83
|
+
}).mask(template, options),
|
|
84
|
+
borderColor: borderMask.borderColor,
|
|
85
|
+
borderColorHover: borderMask.borderColorHover,
|
|
86
|
+
borderColorPress: borderMask.borderColorPress,
|
|
87
|
+
borderColorFocus: borderMask.borderColorFocus
|
|
88
|
+
};
|
|
89
|
+
}),
|
|
90
|
+
softenBorder: (0, import_create_theme.createMask)((template, options) => {
|
|
91
|
+
const plain = import_create_theme.skipMask.mask(template, options),
|
|
92
|
+
softer = (0, import_create_theme.createSoftenMask)().mask(template, options);
|
|
93
|
+
return {
|
|
94
|
+
...plain,
|
|
95
|
+
borderColor: softer.borderColor,
|
|
96
|
+
borderColorHover: softer.borderColorHover,
|
|
97
|
+
borderColorPress: softer.borderColorPress,
|
|
98
|
+
borderColorFocus: softer.borderColorFocus
|
|
99
|
+
};
|
|
100
|
+
}),
|
|
101
|
+
softenBorder2: (0, import_create_theme.createMask)((template, options) => {
|
|
102
|
+
const plain = import_create_theme.skipMask.mask(template, options),
|
|
103
|
+
softer = (0, import_create_theme.createSoftenMask)({
|
|
104
|
+
strength: 2
|
|
105
|
+
}).mask(template, options);
|
|
106
|
+
return {
|
|
107
|
+
...plain,
|
|
108
|
+
borderColor: softer.borderColor,
|
|
109
|
+
borderColorHover: softer.borderColorHover,
|
|
110
|
+
borderColorPress: softer.borderColorPress,
|
|
111
|
+
borderColorFocus: softer.borderColorFocus
|
|
112
|
+
};
|
|
113
|
+
})
|
|
114
|
+
};
|
|
@@ -0,0 +1,118 @@
|
|
|
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: !0
|
|
11
|
+
});
|
|
12
|
+
},
|
|
13
|
+
__copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
15
|
+
get: () => from[key],
|
|
16
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
+
});
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
+
value: !0
|
|
22
|
+
}), mod);
|
|
23
|
+
var masks_exports = {};
|
|
24
|
+
__export(masks_exports, {
|
|
25
|
+
masks: () => masks
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(masks_exports);
|
|
28
|
+
var import_create_theme = require("@hanzogui/create-theme"),
|
|
29
|
+
masks = {
|
|
30
|
+
identity: (0, import_create_theme.createIdentityMask)(),
|
|
31
|
+
soften: (0, import_create_theme.createSoftenMask)(),
|
|
32
|
+
soften2: (0, import_create_theme.createSoftenMask)({
|
|
33
|
+
strength: 2
|
|
34
|
+
}),
|
|
35
|
+
soften3: (0, import_create_theme.createSoftenMask)({
|
|
36
|
+
strength: 3
|
|
37
|
+
}),
|
|
38
|
+
strengthen: (0, import_create_theme.createStrengthenMask)(),
|
|
39
|
+
inverse: (0, import_create_theme.createInverseMask)(),
|
|
40
|
+
inverseSoften: (0, import_create_theme.combineMasks)((0, import_create_theme.createInverseMask)(), (0, import_create_theme.createSoftenMask)({
|
|
41
|
+
strength: 2
|
|
42
|
+
})),
|
|
43
|
+
inverseSoften2: (0, import_create_theme.combineMasks)((0, import_create_theme.createInverseMask)(), (0, import_create_theme.createSoftenMask)({
|
|
44
|
+
strength: 3
|
|
45
|
+
})),
|
|
46
|
+
inverseSoften3: (0, import_create_theme.combineMasks)((0, import_create_theme.createInverseMask)(), (0, import_create_theme.createSoftenMask)({
|
|
47
|
+
strength: 4
|
|
48
|
+
})),
|
|
49
|
+
inverseStrengthen2: (0, import_create_theme.combineMasks)((0, import_create_theme.createInverseMask)(), (0, import_create_theme.createStrengthenMask)({
|
|
50
|
+
strength: 2
|
|
51
|
+
})),
|
|
52
|
+
strengthenButSoftenBorder: (0, import_create_theme.createMask)(function (template, options) {
|
|
53
|
+
var stronger = (0, import_create_theme.createStrengthenMask)().mask(template, options),
|
|
54
|
+
softer = (0, import_create_theme.createSoftenMask)().mask(template, options);
|
|
55
|
+
return {
|
|
56
|
+
...stronger,
|
|
57
|
+
borderColor: softer.borderColor,
|
|
58
|
+
borderColorHover: softer.borderColorHover,
|
|
59
|
+
borderColorPress: softer.borderColorPress,
|
|
60
|
+
borderColorFocus: softer.borderColorFocus
|
|
61
|
+
};
|
|
62
|
+
}),
|
|
63
|
+
soften2Border1: (0, import_create_theme.createMask)(function (template, options) {
|
|
64
|
+
var softer2 = (0, import_create_theme.createSoftenMask)({
|
|
65
|
+
strength: 2
|
|
66
|
+
}).mask(template, options),
|
|
67
|
+
softer1 = (0, import_create_theme.createSoftenMask)({
|
|
68
|
+
strength: 1
|
|
69
|
+
}).mask(template, options);
|
|
70
|
+
return {
|
|
71
|
+
...softer2,
|
|
72
|
+
borderColor: softer1.borderColor,
|
|
73
|
+
borderColorHover: softer1.borderColorHover,
|
|
74
|
+
borderColorPress: softer1.borderColorPress,
|
|
75
|
+
borderColorFocus: softer1.borderColorFocus
|
|
76
|
+
};
|
|
77
|
+
}),
|
|
78
|
+
soften3FlatBorder: (0, import_create_theme.createMask)(function (template, options) {
|
|
79
|
+
var borderMask = (0, import_create_theme.createSoftenMask)({
|
|
80
|
+
strength: 2
|
|
81
|
+
}).mask(template, options),
|
|
82
|
+
softer3 = (0, import_create_theme.createSoftenMask)({
|
|
83
|
+
strength: 3
|
|
84
|
+
}).mask(template, options);
|
|
85
|
+
return {
|
|
86
|
+
...softer3,
|
|
87
|
+
borderColor: borderMask.borderColor,
|
|
88
|
+
borderColorHover: borderMask.borderColorHover,
|
|
89
|
+
borderColorPress: borderMask.borderColorPress,
|
|
90
|
+
borderColorFocus: borderMask.borderColorFocus
|
|
91
|
+
};
|
|
92
|
+
}),
|
|
93
|
+
softenBorder: (0, import_create_theme.createMask)(function (template, options) {
|
|
94
|
+
var plain = import_create_theme.skipMask.mask(template, options),
|
|
95
|
+
softer = (0, import_create_theme.createSoftenMask)().mask(template, options);
|
|
96
|
+
return {
|
|
97
|
+
...plain,
|
|
98
|
+
borderColor: softer.borderColor,
|
|
99
|
+
borderColorHover: softer.borderColorHover,
|
|
100
|
+
borderColorPress: softer.borderColorPress,
|
|
101
|
+
borderColorFocus: softer.borderColorFocus
|
|
102
|
+
};
|
|
103
|
+
}),
|
|
104
|
+
softenBorder2: (0, import_create_theme.createMask)(function (template, options) {
|
|
105
|
+
var plain = import_create_theme.skipMask.mask(template, options),
|
|
106
|
+
softer = (0, import_create_theme.createSoftenMask)({
|
|
107
|
+
strength: 2
|
|
108
|
+
}).mask(template, options);
|
|
109
|
+
return {
|
|
110
|
+
...plain,
|
|
111
|
+
borderColor: softer.borderColor,
|
|
112
|
+
borderColorHover: softer.borderColorHover,
|
|
113
|
+
borderColorPress: softer.borderColorPress,
|
|
114
|
+
borderColorFocus: softer.borderColorFocus
|
|
115
|
+
};
|
|
116
|
+
})
|
|
117
|
+
};
|
|
118
|
+
//# sourceMappingURL=masks.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","masks_exports","__export","masks","module","exports","import_create_theme","require","identity","createIdentityMask","soften","createSoftenMask","soften2","strength","soften3","strengthen","createStrengthenMask","inverse","createInverseMask","inverseSoften","combineMasks","inverseSoften2","inverseSoften3","inverseStrengthen2","strengthenButSoftenBorder","createMask","template","options","stronger","mask","softer","borderColor","borderColorHover","borderColorPress","borderColorFocus","soften2Border1","softer2","softer1","soften3FlatBorder","borderMask","softer3","softenBorder","plain","skipMask"],"sources":["../../src/masks.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,aAAA;AAAAC,QAAA,CAAAD,aAAA;EAAAE,KAAA,EAAAA,CAAA,KAAAA;AAAA;AAGAC,MAAA,CAAAC,OAAA,GAAAT,YAQO,CAAAK,aAAA;AAEA,IAAAK,mBAAc,GAAAC,OAAA;EAAAJ,KAAA;IACnBK,QAAA,MAAUF,mBAAA,CAAAG,kBAAA,EAAmB;IAC7BC,MAAA,MAAQJ,mBAAA,CAAAK,gBAAA,EAAiB;IACzBC,OAAA,MAASN,mBAAA,CAAAK,gBAAA,EAAiB;MAC1BE,QAAA;IACA;IACAC,OAAA,MAASR,mBAAA,CAAAK,gBAAA;MACTE,QAAA;IACA;IACAE,UAAA,MAAAT,mBAAgB,CAAAU,oBAAA,EAAa;IAC7BC,OAAA,MAAAX,mBAAoB,CAAAY,iBAAA;IAAAC,aAClB,MAAAb,mBAAA,CAAAc,YAAkB,MAAAd,mBAAA,CAAAY,iBAAA,SAAAZ,mBAAA,CAAAK,gBAAA;MAAAE,QAClB;IACF;IACAQ,cAAA,MAAAf,mBAA2B,CAAAc,YAAA,MAAAd,mBAAsB,CAAAY,iBAAY,SAAAZ,mBAAA,CAAAK,gBAAA;MAC3DE,QAAM;IAEN;IAAOS,cACF,MAAAhB,mBAAA,CA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AC,QAAA,EAAAC,OAAA;MAAA,IACHY,UAAA,GAAa,IAAAjC,mBAAO,CAAAK,gBAAA;UACpBE,QAAA;QAAyB,EACzB,CAAAgB,IAAA,CAAAH,QAAA,EAAAC,OAAkB;QAAOa,OAAA,OAAAlC,mBAAA,CAAAK,gBAAA;UACzBE,QAAA;QACF,GAAAgB,IAAA,CAAAH,QAAA,EAAAC,OAAA;MACD;QACD,GAAAa,OAAA;QACET,WAAM,EAAQQ,UAAA,CAAAR,WAAA;QAEdC,gBAAO,EAAAO,UAAA,CAAAP,gBAAA;QACLC,gBAAG,EAAAM,UAAA,CAAAN,gBAAA;QACHC,gBAAa,EAAAK,UAAO,CAAAL;MAAA;IACK;IACAO,YACzB,MAAAnC,mBAAyB,CAAAmB,UAAA,YAAAC,QAAA,EAAAC,OAAA;MAC3B,IAAAe,KAAA,GAAApC,mBAAA,CAAAqC,QAAA,CAAAd,IAAA,CAAAH,QAAA,EAAAC,OAAA;QAAAG,MAAA,OAAAxB,mBAAA,CAAAK,gBAAA,IAAAkB,IAAA,CAAAH,QAAA,EAAAC,OAAA;MACD;QACH,GAAAe,KAAA","ignoreList":[]}
|
|
@@ -0,0 +1,16 @@
|
|
|
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") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
7
|
+
get: () => from[key],
|
|
8
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
9
|
+
});
|
|
10
|
+
return to;
|
|
11
|
+
};
|
|
12
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
13
|
+
value: !0
|
|
14
|
+
}), mod);
|
|
15
|
+
var types_exports = {};
|
|
16
|
+
module.exports = __toCommonJS(types_exports);
|
|
@@ -0,0 +1,19 @@
|
|
|
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") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
9
|
+
get: () => from[key],
|
|
10
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
11
|
+
});
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
15
|
+
value: !0
|
|
16
|
+
}), mod);
|
|
17
|
+
var types_exports = {};
|
|
18
|
+
module.exports = __toCommonJS(types_exports);
|
|
19
|
+
//# sourceMappingURL=types.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","types_exports"],"sources":["../../src/types.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,aAAA","ignoreList":[]}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import { applyMask, createMask, createThemeWithPalettes, objectEntries, objectFromEntries } from "@hanzogui/create-theme";
|
|
2
|
+
class ThemeBuilder {
|
|
3
|
+
constructor(state) {
|
|
4
|
+
this.state = state;
|
|
5
|
+
}
|
|
6
|
+
_getThemeFn;
|
|
7
|
+
addPalettes(palettes) {
|
|
8
|
+
return this.state.palettes = {
|
|
9
|
+
// as {} prevents generic string key merge messing up types
|
|
10
|
+
...this.state.palettes,
|
|
11
|
+
...palettes
|
|
12
|
+
}, this;
|
|
13
|
+
}
|
|
14
|
+
addTemplates(templates) {
|
|
15
|
+
return this.state.templates = {
|
|
16
|
+
// as {} prevents generic string key merge messing up types
|
|
17
|
+
...this.state.templates,
|
|
18
|
+
...templates
|
|
19
|
+
}, this;
|
|
20
|
+
}
|
|
21
|
+
addMasks(masks) {
|
|
22
|
+
return this.state.masks = {
|
|
23
|
+
// as {} prevents generic string key merge messing up types
|
|
24
|
+
...this.state.masks,
|
|
25
|
+
...objectFromEntries(objectEntries(masks).map(([key, val]) => [key, createMask(val)]))
|
|
26
|
+
}, this;
|
|
27
|
+
}
|
|
28
|
+
// for dev mode only really
|
|
29
|
+
_addedThemes = [];
|
|
30
|
+
addThemes(themes) {
|
|
31
|
+
return this._addedThemes.push({
|
|
32
|
+
type: "themes",
|
|
33
|
+
args: [themes]
|
|
34
|
+
}), this.state.themes = {
|
|
35
|
+
// as {} prevents generic string key merge messing up types
|
|
36
|
+
...this.state.themes,
|
|
37
|
+
...themes
|
|
38
|
+
}, this;
|
|
39
|
+
}
|
|
40
|
+
// these wont be typed to save some complexity and because they don't need to be typed!
|
|
41
|
+
addComponentThemes(childThemeDefinition, options) {
|
|
42
|
+
return this.addChildThemes(childThemeDefinition, options), this;
|
|
43
|
+
}
|
|
44
|
+
addChildThemes(childThemeDefinition, options) {
|
|
45
|
+
const currentThemes = this.state.themes;
|
|
46
|
+
if (!currentThemes) throw new Error("No themes defined yet, use addThemes first to set your base themes");
|
|
47
|
+
this._addedThemes.push({
|
|
48
|
+
type: "childThemes",
|
|
49
|
+
args: [childThemeDefinition, options]
|
|
50
|
+
});
|
|
51
|
+
const currentThemeNames = Object.keys(currentThemes),
|
|
52
|
+
incomingThemeNames = Object.keys(childThemeDefinition),
|
|
53
|
+
namesWithDefinitions = currentThemeNames.flatMap(prefix => {
|
|
54
|
+
const avoidNestingWithin = options?.avoidNestingWithin;
|
|
55
|
+
return avoidNestingWithin && avoidNestingWithin.some(avoidName => prefix.startsWith(avoidName) || prefix.endsWith(avoidName)) ? [] : incomingThemeNames.map(subName => {
|
|
56
|
+
const fullName = `${prefix}_${subName}`,
|
|
57
|
+
definition = childThemeDefinition[subName];
|
|
58
|
+
return "avoidNestingWithin" in definition && definition.avoidNestingWithin.some(name => (name === "light" || name === "dark") && prefix.includes("_") ? !1 : prefix.startsWith(name) || prefix.endsWith(name)) || prefix.endsWith(`_${subName}`) || fullName in currentThemes ? null : [fullName, definition];
|
|
59
|
+
}).filter(Boolean);
|
|
60
|
+
}),
|
|
61
|
+
childThemes = Object.fromEntries(namesWithDefinitions),
|
|
62
|
+
next = {
|
|
63
|
+
// as {} prevents generic string key merge messing up types
|
|
64
|
+
...this.state.themes,
|
|
65
|
+
...childThemes
|
|
66
|
+
};
|
|
67
|
+
return this.state.themes = next, this;
|
|
68
|
+
}
|
|
69
|
+
getTheme(fn) {
|
|
70
|
+
return this._getThemeFn = fn, this;
|
|
71
|
+
}
|
|
72
|
+
build() {
|
|
73
|
+
if (!this.state.themes) return {};
|
|
74
|
+
const out = {},
|
|
75
|
+
maskedThemes = [];
|
|
76
|
+
for (const themeName in this.state.themes) {
|
|
77
|
+
const nameParts = themeName.split("_"),
|
|
78
|
+
parentName = nameParts.slice(0, nameParts.length - 1).join("_"),
|
|
79
|
+
definitions = this.state.themes[themeName],
|
|
80
|
+
themeDefinition = Array.isArray(definitions) ? (() => {
|
|
81
|
+
const found = definitions.find(
|
|
82
|
+
// endWith match stronger than startsWith
|
|
83
|
+
d => d.parent ? parentName.endsWith(d.parent) || parentName.startsWith(d.parent) : !0);
|
|
84
|
+
return found || null;
|
|
85
|
+
})() : definitions;
|
|
86
|
+
if (themeDefinition) if ("theme" in themeDefinition) out[themeName] = themeDefinition.theme;else if ("mask" in themeDefinition) maskedThemes.push({
|
|
87
|
+
parentName,
|
|
88
|
+
themeName,
|
|
89
|
+
mask: themeDefinition
|
|
90
|
+
});else {
|
|
91
|
+
let {
|
|
92
|
+
palette: paletteName = "",
|
|
93
|
+
template: templateName,
|
|
94
|
+
...options
|
|
95
|
+
} = themeDefinition;
|
|
96
|
+
const parentDefinition = this.state.themes[parentName];
|
|
97
|
+
if (!this.state.palettes) throw new Error(`No palettes defined for theme with palette expected: ${themeName}`);
|
|
98
|
+
let palette = this.state.palettes[paletteName || ""],
|
|
99
|
+
attemptParentName = `${parentName}_${paletteName}`;
|
|
100
|
+
for (; !palette && attemptParentName;) attemptParentName in this.state.palettes ? (palette = this.state.palettes[attemptParentName], paletteName = attemptParentName) : attemptParentName = attemptParentName.split("_").slice(0, -1).join("_");
|
|
101
|
+
if (!palette) {
|
|
102
|
+
const msg = process.env.NODE_ENV !== "production" ? `: ${themeName}: ${paletteName}
|
|
103
|
+
Definition: ${JSON.stringify(themeDefinition)}
|
|
104
|
+
Parent: ${JSON.stringify(parentDefinition)}
|
|
105
|
+
Potential: (${Object.keys(this.state.palettes).join(", ")})` : "";
|
|
106
|
+
throw new Error(`No palette for theme${msg}`);
|
|
107
|
+
}
|
|
108
|
+
const template = this.state.templates?.[templateName] ??
|
|
109
|
+
// fall back to finding the scheme specific on if it exists
|
|
110
|
+
this.state.templates?.[`${nameParts[0]}_${templateName}`];
|
|
111
|
+
if (!template) throw new Error(`No template for theme ${themeName}: ${templateName} in templates:
|
|
112
|
+
- ${Object.keys(this.state.templates || {}).join(`
|
|
113
|
+
- `)}`);
|
|
114
|
+
const theme = createThemeWithPalettes(this.state.palettes, paletteName, template, options, themeName, !0);
|
|
115
|
+
out[themeName] = this._getThemeFn ? {
|
|
116
|
+
...theme,
|
|
117
|
+
...this._getThemeFn({
|
|
118
|
+
theme,
|
|
119
|
+
name: themeName,
|
|
120
|
+
level: nameParts.length,
|
|
121
|
+
parentName,
|
|
122
|
+
scheme: /^(light|dark)$/.test(nameParts[0]) ? nameParts[0] : void 0,
|
|
123
|
+
parentNames: nameParts.slice(0, -1),
|
|
124
|
+
palette,
|
|
125
|
+
template
|
|
126
|
+
})
|
|
127
|
+
} : theme;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
for (const {
|
|
131
|
+
mask,
|
|
132
|
+
themeName,
|
|
133
|
+
parentName
|
|
134
|
+
} of maskedThemes) {
|
|
135
|
+
const parent = out[parentName];
|
|
136
|
+
if (!parent) continue;
|
|
137
|
+
const {
|
|
138
|
+
mask: maskName,
|
|
139
|
+
...options
|
|
140
|
+
} = mask;
|
|
141
|
+
let maskFunction = this.state.masks?.[maskName];
|
|
142
|
+
if (!maskFunction) throw new Error(`No mask ${maskName}`);
|
|
143
|
+
const parentTheme = this.state.themes[parentName];
|
|
144
|
+
if (parentTheme && "childOptions" in parentTheme) {
|
|
145
|
+
const {
|
|
146
|
+
mask: mask2,
|
|
147
|
+
...childOpts
|
|
148
|
+
} = parentTheme.childOptions;
|
|
149
|
+
mask2 && (maskFunction = this.state.masks?.[mask2]), Object.assign(options, childOpts);
|
|
150
|
+
}
|
|
151
|
+
out[themeName] = applyMask(parent, maskFunction, options, parentName, themeName);
|
|
152
|
+
}
|
|
153
|
+
return out;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
function createThemeBuilder() {
|
|
157
|
+
return new ThemeBuilder({});
|
|
158
|
+
}
|
|
159
|
+
export { ThemeBuilder, createThemeBuilder };
|
|
160
|
+
//# sourceMappingURL=ThemeBuilder.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["applyMask","createMask","createThemeWithPalettes","objectEntries","objectFromEntries","ThemeBuilder","constructor","state","_getThemeFn","addPalettes","palettes","addTemplates","templates","addMasks","masks","map","key","val","_addedThemes","addThemes","themes","push","type","args","addComponentThemes","childThemeDefinition","options","addChildThemes","currentThemes","Error","currentThemeNames","Object","keys","incomingThemeNames","namesWithDefinitions","flatMap","prefix","avoidNestingWithin","some","avoidName","startsWith","endsWith","subName","fullName","definition","name","includes","filter","Boolean","childThemes","fromEntries","next","getTheme","fn","build","out","maskedThemes","themeName","nameParts","split","parentName","slice","length","join","definitions","themeDefinition","Array","isArray","found","find","d","parent","theme","mask","palette","paletteName","template","templateName","parentDefinition","attemptParentName","msg","process","env","NODE_ENV","JSON","stringify","level","scheme","test","parentNames","maskName","maskFunction","parentTheme","mask2","childOpts","childOptions","assign","createThemeBuilder"],"sources":["../../src/ThemeBuilder.ts"],"sourcesContent":[null],"mappings":"AAQA,SACEA,SAAA,EACAC,UAAA,EACAC,uBAAA,EACAC,aAAA,EACAC,iBAAA,QACK;AAwFA,MAAMC,YAAA,CAGX;EAGAC,YAAmBC,KAAA,EAAc;IAAd,KAAAA,KAAA,GAAAA,KAAA;EAAe;EAF1BC,WAAA;EAIRC,YAAgDC,QAAA,EAAa;IAC3D,YAAKH,KAAA,CAAMG,QAAA,GAAW;MAAA;MAEpB,GAAI,KAAKH,KAAA,CAAMG,QAAA;MACf,GAAGA;IACL,GACO;EAMT;EAEAC,aAAkDC,SAAA,EAAc;IAC9D,YAAKL,KAAA,CAAMK,SAAA,GAAY;MAAA;MAErB,GAAI,KAAKL,KAAA,CAAMK,SAAA;MACf,GAAGA;IACL,GACO;EAMT;EAEAC,SAA0CC,KAAA,EAAU;IAClD,YAAKP,KAAA,CAAMO,KAAA,GAAQ;MAAA;MAEjB,GAAI,KAAKP,KAAA,CAAMO,KAAA;MACf,GAAIV,iBAAA,CACFD,aAAA,CAAcW,KAAK,EAAEC,GAAA,CAAI,CAAC,CAACC,GAAA,EAAKC,GAAG,MAAM,CAACD,GAAA,EAAKf,UAAA,CAAWgB,GAAG,CAAC,CAAC,CACjE;IACF,GACO;EAMT;EAAA;EAGAC,YAAA,GAAgE,EAAC;EAEjEC,UACEC,MAAA,EACA;IACA,YAAKF,YAAA,CAAaG,IAAA,CAAK;MAAEC,IAAA,EAAM;MAAUC,IAAA,EAAM,CAACH,MAAM;IAAE,CAAC,GAEzD,KAAKb,KAAA,CAAMa,MAAA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