@udixio/theme 1.3.1 → 2.1.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/CHANGELOG.md +23 -2
- package/dist/API.d.ts +7 -4
- package/dist/API.d.ts.map +1 -1
- package/dist/app.container.d.ts +1 -2
- package/dist/app.container.d.ts.map +1 -1
- package/dist/bin.cjs +1 -1
- package/dist/bin.js +1 -1
- package/dist/browser.cjs +23 -18
- package/dist/browser.js +34 -29
- package/dist/color/color.api.d.ts +16 -31
- package/dist/color/color.api.d.ts.map +1 -1
- package/dist/color/color.d.ts +100 -0
- package/dist/color/color.d.ts.map +1 -0
- package/dist/color/color.manager.d.ts +9 -18
- package/dist/color/color.manager.d.ts.map +1 -1
- package/dist/color/color.utils.d.ts +14 -3
- package/dist/color/color.utils.d.ts.map +1 -1
- package/dist/color/default-color.d.ts +5 -1
- package/dist/color/default-color.d.ts.map +1 -1
- package/dist/color/index.d.ts +1 -1
- package/dist/color/index.d.ts.map +1 -1
- package/dist/config/config.interface.d.ts +4 -4
- package/dist/config/config.interface.d.ts.map +1 -1
- package/dist/context/context.d.ts +41 -0
- package/dist/context/context.d.ts.map +1 -0
- package/dist/context/context.module.d.ts +3 -0
- package/dist/context/context.module.d.ts.map +1 -0
- package/dist/context/index.d.ts +3 -0
- package/dist/context/index.d.ts.map +1 -0
- package/dist/font.plugin-5Xpo-ntw.js +228 -0
- package/dist/font.plugin-FPU_gL1Y.cjs +227 -0
- package/dist/index.d.ts +6 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/{load-from-path-Bo1kCfh9.js → load-from-path-CBnO8ESw.js} +1 -1
- package/dist/{load-from-path-DoZnR1-p.cjs → load-from-path-kuofMGN3.cjs} +2 -2
- package/dist/loader/loader.d.ts +1 -1
- package/dist/loader/loader.d.ts.map +1 -1
- package/dist/loader-BzsrGBu-.cjs +3905 -0
- package/dist/loader-CoayTlSl.js +3906 -0
- package/dist/material-color-utilities/dynamic_color.d.ts +0 -22
- package/dist/material-color-utilities/dynamic_color.d.ts.map +1 -1
- package/dist/material-color-utilities/toneDeltaPair.d.ts +8 -8
- package/dist/material-color-utilities/toneDeltaPair.d.ts.map +1 -1
- package/dist/node.cjs +24 -19
- package/dist/node.js +36 -31
- package/dist/palette/index.d.ts +4 -0
- package/dist/palette/index.d.ts.map +1 -0
- package/dist/palette/palette.api.d.ts +13 -0
- package/dist/palette/palette.api.d.ts.map +1 -0
- package/dist/palette/palette.d.ts +33 -0
- package/dist/palette/palette.d.ts.map +1 -0
- package/dist/palette/palette.manager.d.ts +20 -0
- package/dist/palette/palette.manager.d.ts.map +1 -0
- package/dist/palette/palette.module.d.ts +3 -0
- package/dist/palette/palette.module.d.ts.map +1 -0
- package/dist/plugins/font/font.plugin.d.ts +1 -1
- package/dist/plugins/font/font.plugin.d.ts.map +1 -1
- package/dist/variant/index.d.ts +3 -0
- package/dist/variant/index.d.ts.map +1 -0
- package/dist/variant/variant.d.ts +31 -0
- package/dist/variant/variant.d.ts.map +1 -0
- package/dist/variant/variants/expressive.variant.d.ts +2 -0
- package/dist/variant/variants/expressive.variant.d.ts.map +1 -0
- package/dist/{theme → variant}/variants/index.d.ts +1 -1
- package/dist/variant/variants/index.d.ts.map +1 -0
- package/dist/variant/variants/neutral.variant.d.ts.map +1 -0
- package/dist/variant/variants/tonal-spot.variant.d.ts.map +1 -0
- package/dist/variant/variants/udixio.variant.d.ts +3 -0
- package/dist/variant/variants/udixio.variant.d.ts.map +1 -0
- package/dist/variant/variants/vibrant.variant.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/API.ts +12 -5
- package/src/app.container.ts +22 -11
- package/src/bootstrap.ts +1 -1
- package/src/color/color.api.ts +189 -47
- package/src/color/color.manager.ts +34 -189
- package/src/color/color.ts +295 -0
- package/src/color/color.utils.ts +48 -3
- package/src/color/default-color.ts +390 -425
- package/src/color/index.ts +1 -1
- package/src/config/config.interface.ts +5 -4
- package/src/context/context.module.ts +7 -0
- package/src/context/context.ts +169 -0
- package/src/context/index.ts +2 -0
- package/src/index.ts +6 -4
- package/src/loader/loader.ts +11 -24
- package/src/material-color-utilities/dynamic_color.ts +25 -34
- package/src/material-color-utilities/toneDeltaPair.ts +44 -41
- package/src/palette/index.ts +3 -0
- package/src/palette/palette.api.ts +43 -0
- package/src/palette/palette.manager.ts +74 -0
- package/src/palette/palette.module.ts +9 -0
- package/src/palette/palette.ts +206 -0
- package/src/plugins/font/font.plugin.ts +1 -1
- package/src/variant/index.ts +2 -0
- package/src/variant/variant.ts +84 -0
- package/src/{theme → variant}/variants/expressive.variant.ts +33 -29
- package/src/{theme → variant}/variants/index.ts +2 -2
- package/src/variant/variants/neutral.variant.ts +47 -0
- package/src/variant/variants/tonal-spot.variant.ts +37 -0
- package/src/variant/variants/udixio.variant.ts +846 -0
- package/src/{theme → variant}/variants/vibrant.variant.ts +23 -22
- package/dist/color/configurable-color.d.ts +0 -31
- package/dist/color/configurable-color.d.ts.map +0 -1
- package/dist/define-config-BasMdCqD.js +0 -430
- package/dist/define-config-CKSsLMnc.cjs +0 -429
- package/dist/loader-C8_TyOuS.js +0 -2698
- package/dist/loader-R7hccp8_.cjs +0 -2697
- package/dist/theme/index.d.ts +0 -8
- package/dist/theme/index.d.ts.map +0 -1
- package/dist/theme/scheme.d.ts +0 -20
- package/dist/theme/scheme.d.ts.map +0 -1
- package/dist/theme/scheme.manager.d.ts +0 -31
- package/dist/theme/scheme.manager.d.ts.map +0 -1
- package/dist/theme/theme.api.d.ts +0 -24
- package/dist/theme/theme.api.d.ts.map +0 -1
- package/dist/theme/theme.module.d.ts +0 -3
- package/dist/theme/theme.module.d.ts.map +0 -1
- package/dist/theme/variant.d.ts +0 -36
- package/dist/theme/variant.d.ts.map +0 -1
- package/dist/theme/variant.manager.d.ts +0 -14
- package/dist/theme/variant.manager.d.ts.map +0 -1
- package/dist/theme/variants/expressive.variant.d.ts +0 -3
- package/dist/theme/variants/expressive.variant.d.ts.map +0 -1
- package/dist/theme/variants/fidelity.variant.d.ts +0 -3
- package/dist/theme/variants/fidelity.variant.d.ts.map +0 -1
- package/dist/theme/variants/index.d.ts.map +0 -1
- package/dist/theme/variants/neutral.variant.d.ts.map +0 -1
- package/dist/theme/variants/tonal-spot.variant.d.ts.map +0 -1
- package/dist/theme/variants/vibrant.variant.d.ts.map +0 -1
- package/src/color/configurable-color.ts +0 -67
- package/src/theme/index.ts +0 -7
- package/src/theme/scheme.manager.ts +0 -100
- package/src/theme/scheme.ts +0 -66
- package/src/theme/theme.api.ts +0 -82
- package/src/theme/theme.module.ts +0 -11
- package/src/theme/variant.manager.ts +0 -58
- package/src/theme/variant.ts +0 -53
- package/src/theme/variants/fidelity.variant.ts +0 -38
- package/src/theme/variants/neutral.variant.ts +0 -45
- package/src/theme/variants/tonal-spot.variant.ts +0 -35
- /package/dist/{theme → variant}/variants/neutral.variant.d.ts +0 -0
- /package/dist/{theme → variant}/variants/tonal-spot.variant.d.ts +0 -0
- /package/dist/{theme → variant}/variants/vibrant.variant.d.ts +0 -0
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
|
+
import "./loader-CoayTlSl.js";
|
|
5
|
+
class PluginAbstract {
|
|
6
|
+
constructor(options) {
|
|
7
|
+
__publicField(this, "options");
|
|
8
|
+
__publicField(this, "pluginInstance");
|
|
9
|
+
this.options = options;
|
|
10
|
+
}
|
|
11
|
+
init(api) {
|
|
12
|
+
var _a, _b;
|
|
13
|
+
this.pluginInstance = new this.pluginClass(api, this.options);
|
|
14
|
+
(_b = (_a = this.pluginInstance).onInit) == null ? void 0 : _b.call(_a);
|
|
15
|
+
return this;
|
|
16
|
+
}
|
|
17
|
+
getInstance() {
|
|
18
|
+
if (!this.pluginInstance) {
|
|
19
|
+
throw new Error(`Plugin ${this.name} is not initialized`);
|
|
20
|
+
}
|
|
21
|
+
return this.pluginInstance;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
class PluginImplAbstract {
|
|
25
|
+
constructor(api, options) {
|
|
26
|
+
var _a;
|
|
27
|
+
this.api = api;
|
|
28
|
+
this.options = options;
|
|
29
|
+
(_a = this.onInit) == null ? void 0 : _a.call(this);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
function defineConfig(configObject) {
|
|
33
|
+
if (!configObject || typeof configObject !== "object") {
|
|
34
|
+
throw new Error("The configuration is missing or not an object");
|
|
35
|
+
}
|
|
36
|
+
if (!("sourceColor" in configObject)) {
|
|
37
|
+
throw new Error("Invalid configuration");
|
|
38
|
+
}
|
|
39
|
+
return configObject;
|
|
40
|
+
}
|
|
41
|
+
var FontFamily = /* @__PURE__ */ ((FontFamily2) => {
|
|
42
|
+
FontFamily2["Expressive"] = "expressive";
|
|
43
|
+
FontFamily2["Neutral"] = "neutral";
|
|
44
|
+
return FontFamily2;
|
|
45
|
+
})(FontFamily || {});
|
|
46
|
+
class FontPlugin extends PluginAbstract {
|
|
47
|
+
constructor() {
|
|
48
|
+
super(...arguments);
|
|
49
|
+
__publicField(this, "dependencies", []);
|
|
50
|
+
__publicField(this, "name", "font");
|
|
51
|
+
__publicField(this, "pluginClass", FontPluginImpl);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
class FontPluginImpl extends PluginImplAbstract {
|
|
55
|
+
constructor() {
|
|
56
|
+
super(...arguments);
|
|
57
|
+
__publicField(this, "_fontFamily");
|
|
58
|
+
__publicField(this, "_fontStyles");
|
|
59
|
+
}
|
|
60
|
+
get fontFamily() {
|
|
61
|
+
if (!this._fontFamily) throw new Error("Font family not initialized");
|
|
62
|
+
return this._fontFamily;
|
|
63
|
+
}
|
|
64
|
+
set fontFamily(value) {
|
|
65
|
+
this._fontFamily = value;
|
|
66
|
+
}
|
|
67
|
+
get fontStyles() {
|
|
68
|
+
if (!this._fontStyles) throw new Error("Font styles not initialized");
|
|
69
|
+
return this._fontStyles;
|
|
70
|
+
}
|
|
71
|
+
set fontStyles(value) {
|
|
72
|
+
this._fontStyles = value;
|
|
73
|
+
}
|
|
74
|
+
getFonts() {
|
|
75
|
+
return {
|
|
76
|
+
fontStyles: this.fontStyles,
|
|
77
|
+
fontFamily: this.fontFamily
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
onInit() {
|
|
81
|
+
var _a, _b, _c, _d;
|
|
82
|
+
this.fontFamily = {
|
|
83
|
+
expressive: ((_b = (_a = this.options) == null ? void 0 : _a.fontFamily) == null ? void 0 : _b.expressive) ?? [
|
|
84
|
+
"Roboto",
|
|
85
|
+
"sans-serif"
|
|
86
|
+
],
|
|
87
|
+
neutral: ((_d = (_c = this.options) == null ? void 0 : _c.fontFamily) == null ? void 0 : _d.neutral) ?? ["Roboto", "sans-serif"]
|
|
88
|
+
};
|
|
89
|
+
this.fontStyles = {
|
|
90
|
+
display: {
|
|
91
|
+
large: {
|
|
92
|
+
fontWeight: 400,
|
|
93
|
+
fontSize: 3.5625,
|
|
94
|
+
lineHeight: 4,
|
|
95
|
+
letterSpacing: -0.015625,
|
|
96
|
+
fontFamily: "expressive"
|
|
97
|
+
/* Expressive */
|
|
98
|
+
},
|
|
99
|
+
medium: {
|
|
100
|
+
fontWeight: 400,
|
|
101
|
+
fontSize: 2.8125,
|
|
102
|
+
lineHeight: 3.25,
|
|
103
|
+
fontFamily: "expressive"
|
|
104
|
+
/* Expressive */
|
|
105
|
+
},
|
|
106
|
+
small: {
|
|
107
|
+
fontWeight: 400,
|
|
108
|
+
fontSize: 2.25,
|
|
109
|
+
lineHeight: 2.75,
|
|
110
|
+
fontFamily: "expressive"
|
|
111
|
+
/* Expressive */
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
headline: {
|
|
115
|
+
large: {
|
|
116
|
+
fontWeight: 400,
|
|
117
|
+
fontSize: 2,
|
|
118
|
+
lineHeight: 2.5,
|
|
119
|
+
fontFamily: "expressive"
|
|
120
|
+
/* Expressive */
|
|
121
|
+
},
|
|
122
|
+
medium: {
|
|
123
|
+
fontWeight: 400,
|
|
124
|
+
fontSize: 1.75,
|
|
125
|
+
lineHeight: 2.25,
|
|
126
|
+
fontFamily: "expressive"
|
|
127
|
+
/* Expressive */
|
|
128
|
+
},
|
|
129
|
+
small: {
|
|
130
|
+
fontWeight: 400,
|
|
131
|
+
fontSize: 1.5,
|
|
132
|
+
lineHeight: 2,
|
|
133
|
+
fontFamily: "expressive"
|
|
134
|
+
/* Expressive */
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
title: {
|
|
138
|
+
large: {
|
|
139
|
+
fontWeight: 400,
|
|
140
|
+
fontSize: 1.375,
|
|
141
|
+
lineHeight: 1.75,
|
|
142
|
+
fontFamily: "neutral"
|
|
143
|
+
/* Neutral */
|
|
144
|
+
},
|
|
145
|
+
medium: {
|
|
146
|
+
fontWeight: 500,
|
|
147
|
+
fontSize: 1,
|
|
148
|
+
lineHeight: 1.5,
|
|
149
|
+
fontFamily: "neutral",
|
|
150
|
+
letterSpacing: 9375e-6
|
|
151
|
+
},
|
|
152
|
+
small: {
|
|
153
|
+
fontWeight: 500,
|
|
154
|
+
fontSize: 0.875,
|
|
155
|
+
lineHeight: 1.25,
|
|
156
|
+
fontFamily: "neutral",
|
|
157
|
+
letterSpacing: 625e-5
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
label: {
|
|
161
|
+
large: {
|
|
162
|
+
fontWeight: 500,
|
|
163
|
+
fontSize: 0.875,
|
|
164
|
+
lineHeight: 1.25,
|
|
165
|
+
fontFamily: "neutral",
|
|
166
|
+
letterSpacing: 625e-5
|
|
167
|
+
},
|
|
168
|
+
medium: {
|
|
169
|
+
fontWeight: 500,
|
|
170
|
+
fontSize: 0.75,
|
|
171
|
+
lineHeight: 1,
|
|
172
|
+
fontFamily: "neutral",
|
|
173
|
+
letterSpacing: 0.03125
|
|
174
|
+
},
|
|
175
|
+
small: {
|
|
176
|
+
fontWeight: 500,
|
|
177
|
+
fontSize: 0.6875,
|
|
178
|
+
lineHeight: 1,
|
|
179
|
+
fontFamily: "neutral",
|
|
180
|
+
letterSpacing: 0.03125
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
body: {
|
|
184
|
+
large: {
|
|
185
|
+
fontWeight: 400,
|
|
186
|
+
fontSize: 1,
|
|
187
|
+
lineHeight: 1.5625,
|
|
188
|
+
fontFamily: "neutral",
|
|
189
|
+
letterSpacing: 0.03125
|
|
190
|
+
},
|
|
191
|
+
medium: {
|
|
192
|
+
fontWeight: 400,
|
|
193
|
+
fontSize: 0.875,
|
|
194
|
+
lineHeight: 1.25,
|
|
195
|
+
fontFamily: "neutral",
|
|
196
|
+
letterSpacing: 0.015625
|
|
197
|
+
},
|
|
198
|
+
small: {
|
|
199
|
+
fontWeight: 400,
|
|
200
|
+
fontSize: 0.75,
|
|
201
|
+
lineHeight: 1,
|
|
202
|
+
fontFamily: "neutral",
|
|
203
|
+
letterSpacing: 0.025
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
};
|
|
207
|
+
if (this.options && this.options.fontStyles)
|
|
208
|
+
Object.entries(this.options.fontStyles).forEach(([key, fontParam]) => {
|
|
209
|
+
const fontRole = key;
|
|
210
|
+
Object.entries(fontParam).forEach(([size, fontStyle]) => {
|
|
211
|
+
const fontSize = size;
|
|
212
|
+
if (fontStyle) {
|
|
213
|
+
this.fontStyles[fontRole][fontSize] = {
|
|
214
|
+
...this.fontStyles[fontRole][fontSize],
|
|
215
|
+
...fontStyle
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
});
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
export {
|
|
223
|
+
FontFamily as F,
|
|
224
|
+
PluginAbstract as P,
|
|
225
|
+
PluginImplAbstract as a,
|
|
226
|
+
FontPlugin as b,
|
|
227
|
+
defineConfig as d
|
|
228
|
+
};
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
+
require("./loader-BzsrGBu-.cjs");
|
|
6
|
+
class PluginAbstract {
|
|
7
|
+
constructor(options) {
|
|
8
|
+
__publicField(this, "options");
|
|
9
|
+
__publicField(this, "pluginInstance");
|
|
10
|
+
this.options = options;
|
|
11
|
+
}
|
|
12
|
+
init(api) {
|
|
13
|
+
var _a, _b;
|
|
14
|
+
this.pluginInstance = new this.pluginClass(api, this.options);
|
|
15
|
+
(_b = (_a = this.pluginInstance).onInit) == null ? void 0 : _b.call(_a);
|
|
16
|
+
return this;
|
|
17
|
+
}
|
|
18
|
+
getInstance() {
|
|
19
|
+
if (!this.pluginInstance) {
|
|
20
|
+
throw new Error(`Plugin ${this.name} is not initialized`);
|
|
21
|
+
}
|
|
22
|
+
return this.pluginInstance;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
class PluginImplAbstract {
|
|
26
|
+
constructor(api, options) {
|
|
27
|
+
var _a;
|
|
28
|
+
this.api = api;
|
|
29
|
+
this.options = options;
|
|
30
|
+
(_a = this.onInit) == null ? void 0 : _a.call(this);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
function defineConfig(configObject) {
|
|
34
|
+
if (!configObject || typeof configObject !== "object") {
|
|
35
|
+
throw new Error("The configuration is missing or not an object");
|
|
36
|
+
}
|
|
37
|
+
if (!("sourceColor" in configObject)) {
|
|
38
|
+
throw new Error("Invalid configuration");
|
|
39
|
+
}
|
|
40
|
+
return configObject;
|
|
41
|
+
}
|
|
42
|
+
var FontFamily = /* @__PURE__ */ ((FontFamily2) => {
|
|
43
|
+
FontFamily2["Expressive"] = "expressive";
|
|
44
|
+
FontFamily2["Neutral"] = "neutral";
|
|
45
|
+
return FontFamily2;
|
|
46
|
+
})(FontFamily || {});
|
|
47
|
+
class FontPlugin extends PluginAbstract {
|
|
48
|
+
constructor() {
|
|
49
|
+
super(...arguments);
|
|
50
|
+
__publicField(this, "dependencies", []);
|
|
51
|
+
__publicField(this, "name", "font");
|
|
52
|
+
__publicField(this, "pluginClass", FontPluginImpl);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
class FontPluginImpl extends PluginImplAbstract {
|
|
56
|
+
constructor() {
|
|
57
|
+
super(...arguments);
|
|
58
|
+
__publicField(this, "_fontFamily");
|
|
59
|
+
__publicField(this, "_fontStyles");
|
|
60
|
+
}
|
|
61
|
+
get fontFamily() {
|
|
62
|
+
if (!this._fontFamily) throw new Error("Font family not initialized");
|
|
63
|
+
return this._fontFamily;
|
|
64
|
+
}
|
|
65
|
+
set fontFamily(value) {
|
|
66
|
+
this._fontFamily = value;
|
|
67
|
+
}
|
|
68
|
+
get fontStyles() {
|
|
69
|
+
if (!this._fontStyles) throw new Error("Font styles not initialized");
|
|
70
|
+
return this._fontStyles;
|
|
71
|
+
}
|
|
72
|
+
set fontStyles(value) {
|
|
73
|
+
this._fontStyles = value;
|
|
74
|
+
}
|
|
75
|
+
getFonts() {
|
|
76
|
+
return {
|
|
77
|
+
fontStyles: this.fontStyles,
|
|
78
|
+
fontFamily: this.fontFamily
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
onInit() {
|
|
82
|
+
var _a, _b, _c, _d;
|
|
83
|
+
this.fontFamily = {
|
|
84
|
+
expressive: ((_b = (_a = this.options) == null ? void 0 : _a.fontFamily) == null ? void 0 : _b.expressive) ?? [
|
|
85
|
+
"Roboto",
|
|
86
|
+
"sans-serif"
|
|
87
|
+
],
|
|
88
|
+
neutral: ((_d = (_c = this.options) == null ? void 0 : _c.fontFamily) == null ? void 0 : _d.neutral) ?? ["Roboto", "sans-serif"]
|
|
89
|
+
};
|
|
90
|
+
this.fontStyles = {
|
|
91
|
+
display: {
|
|
92
|
+
large: {
|
|
93
|
+
fontWeight: 400,
|
|
94
|
+
fontSize: 3.5625,
|
|
95
|
+
lineHeight: 4,
|
|
96
|
+
letterSpacing: -0.015625,
|
|
97
|
+
fontFamily: "expressive"
|
|
98
|
+
/* Expressive */
|
|
99
|
+
},
|
|
100
|
+
medium: {
|
|
101
|
+
fontWeight: 400,
|
|
102
|
+
fontSize: 2.8125,
|
|
103
|
+
lineHeight: 3.25,
|
|
104
|
+
fontFamily: "expressive"
|
|
105
|
+
/* Expressive */
|
|
106
|
+
},
|
|
107
|
+
small: {
|
|
108
|
+
fontWeight: 400,
|
|
109
|
+
fontSize: 2.25,
|
|
110
|
+
lineHeight: 2.75,
|
|
111
|
+
fontFamily: "expressive"
|
|
112
|
+
/* Expressive */
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
headline: {
|
|
116
|
+
large: {
|
|
117
|
+
fontWeight: 400,
|
|
118
|
+
fontSize: 2,
|
|
119
|
+
lineHeight: 2.5,
|
|
120
|
+
fontFamily: "expressive"
|
|
121
|
+
/* Expressive */
|
|
122
|
+
},
|
|
123
|
+
medium: {
|
|
124
|
+
fontWeight: 400,
|
|
125
|
+
fontSize: 1.75,
|
|
126
|
+
lineHeight: 2.25,
|
|
127
|
+
fontFamily: "expressive"
|
|
128
|
+
/* Expressive */
|
|
129
|
+
},
|
|
130
|
+
small: {
|
|
131
|
+
fontWeight: 400,
|
|
132
|
+
fontSize: 1.5,
|
|
133
|
+
lineHeight: 2,
|
|
134
|
+
fontFamily: "expressive"
|
|
135
|
+
/* Expressive */
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
title: {
|
|
139
|
+
large: {
|
|
140
|
+
fontWeight: 400,
|
|
141
|
+
fontSize: 1.375,
|
|
142
|
+
lineHeight: 1.75,
|
|
143
|
+
fontFamily: "neutral"
|
|
144
|
+
/* Neutral */
|
|
145
|
+
},
|
|
146
|
+
medium: {
|
|
147
|
+
fontWeight: 500,
|
|
148
|
+
fontSize: 1,
|
|
149
|
+
lineHeight: 1.5,
|
|
150
|
+
fontFamily: "neutral",
|
|
151
|
+
letterSpacing: 9375e-6
|
|
152
|
+
},
|
|
153
|
+
small: {
|
|
154
|
+
fontWeight: 500,
|
|
155
|
+
fontSize: 0.875,
|
|
156
|
+
lineHeight: 1.25,
|
|
157
|
+
fontFamily: "neutral",
|
|
158
|
+
letterSpacing: 625e-5
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
label: {
|
|
162
|
+
large: {
|
|
163
|
+
fontWeight: 500,
|
|
164
|
+
fontSize: 0.875,
|
|
165
|
+
lineHeight: 1.25,
|
|
166
|
+
fontFamily: "neutral",
|
|
167
|
+
letterSpacing: 625e-5
|
|
168
|
+
},
|
|
169
|
+
medium: {
|
|
170
|
+
fontWeight: 500,
|
|
171
|
+
fontSize: 0.75,
|
|
172
|
+
lineHeight: 1,
|
|
173
|
+
fontFamily: "neutral",
|
|
174
|
+
letterSpacing: 0.03125
|
|
175
|
+
},
|
|
176
|
+
small: {
|
|
177
|
+
fontWeight: 500,
|
|
178
|
+
fontSize: 0.6875,
|
|
179
|
+
lineHeight: 1,
|
|
180
|
+
fontFamily: "neutral",
|
|
181
|
+
letterSpacing: 0.03125
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
body: {
|
|
185
|
+
large: {
|
|
186
|
+
fontWeight: 400,
|
|
187
|
+
fontSize: 1,
|
|
188
|
+
lineHeight: 1.5625,
|
|
189
|
+
fontFamily: "neutral",
|
|
190
|
+
letterSpacing: 0.03125
|
|
191
|
+
},
|
|
192
|
+
medium: {
|
|
193
|
+
fontWeight: 400,
|
|
194
|
+
fontSize: 0.875,
|
|
195
|
+
lineHeight: 1.25,
|
|
196
|
+
fontFamily: "neutral",
|
|
197
|
+
letterSpacing: 0.015625
|
|
198
|
+
},
|
|
199
|
+
small: {
|
|
200
|
+
fontWeight: 400,
|
|
201
|
+
fontSize: 0.75,
|
|
202
|
+
lineHeight: 1,
|
|
203
|
+
fontFamily: "neutral",
|
|
204
|
+
letterSpacing: 0.025
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
};
|
|
208
|
+
if (this.options && this.options.fontStyles)
|
|
209
|
+
Object.entries(this.options.fontStyles).forEach(([key, fontParam]) => {
|
|
210
|
+
const fontRole = key;
|
|
211
|
+
Object.entries(fontParam).forEach(([size, fontStyle]) => {
|
|
212
|
+
const fontSize = size;
|
|
213
|
+
if (fontStyle) {
|
|
214
|
+
this.fontStyles[fontRole][fontSize] = {
|
|
215
|
+
...this.fontStyles[fontRole][fontSize],
|
|
216
|
+
...fontStyle
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
});
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
exports.FontFamily = FontFamily;
|
|
224
|
+
exports.FontPlugin = FontPlugin;
|
|
225
|
+
exports.PluginAbstract = PluginAbstract;
|
|
226
|
+
exports.PluginImplAbstract = PluginImplAbstract;
|
|
227
|
+
exports.defineConfig = defineConfig;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
|
+
export * from './API';
|
|
1
2
|
export * from './app.container';
|
|
2
3
|
export * from './app.module';
|
|
3
|
-
export * from './
|
|
4
|
+
export * from './bootstrap';
|
|
4
5
|
export * from './color';
|
|
6
|
+
export * from './config';
|
|
7
|
+
export * from './context';
|
|
5
8
|
export * from './loader';
|
|
6
|
-
export * from './bootstrap';
|
|
7
9
|
export * from './material-color-utilities';
|
|
10
|
+
export * from './palette';
|
|
8
11
|
export * from './plugin';
|
|
9
12
|
export * from './plugins';
|
|
10
|
-
export * from './
|
|
11
|
-
export * from './config';
|
|
13
|
+
export * from './variant';
|
|
12
14
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,4BAA4B,CAAC;AAC3C,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC"}
|
|
@@ -21,7 +21,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
21
21
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
22
|
mod
|
|
23
23
|
));
|
|
24
|
-
const loader = require("./loader-
|
|
24
|
+
const loader = require("./loader-BzsrGBu-.cjs");
|
|
25
25
|
const fs = require("node:fs");
|
|
26
26
|
var _documentCurrentScript = typeof document !== "undefined" ? document.currentScript : null;
|
|
27
27
|
function _interopNamespaceDefault(e) {
|
|
@@ -44,7 +44,7 @@ const fs__namespace = /* @__PURE__ */ _interopNamespaceDefault(fs);
|
|
|
44
44
|
async function resolveConfig(configPath = "./theme.config") {
|
|
45
45
|
const { createJiti } = await import("jiti");
|
|
46
46
|
const { resolve } = await import("pathe");
|
|
47
|
-
const jiti = createJiti(typeof document === "undefined" ? require("url").pathToFileURL(__filename).href : _documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === "SCRIPT" && _documentCurrentScript.src || new URL("load-from-path-
|
|
47
|
+
const jiti = createJiti(typeof document === "undefined" ? require("url").pathToFileURL(__filename).href : _documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === "SCRIPT" && _documentCurrentScript.src || new URL("load-from-path-kuofMGN3.cjs", document.baseURI).href, {
|
|
48
48
|
debug: process.env.NODE_ENV === "development",
|
|
49
49
|
fsCache: true,
|
|
50
50
|
interopDefault: true
|
package/dist/loader/loader.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../src/loader/loader.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../src/loader/loader.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAG5C,eAAO,MAAM,MAAM,GAAU,QAAQ,eAAe,EAAE,cAAW,8BAyChE,CAAC"}
|