@seelen-ui/lib 2.4.8 → 2.4.10
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/esm/gen/types/BluetoothDevice.d.ts +1 -0
- package/esm/gen/types/BluetoothDevice.d.ts.map +1 -1
- package/esm/gen/types/DevicePairingAnswer.d.ts +8 -0
- package/esm/gen/types/DevicePairingAnswer.d.ts.map +1 -0
- package/esm/gen/types/DevicePairingNeededAction.d.ts +18 -0
- package/esm/gen/types/DevicePairingNeededAction.d.ts.map +1 -0
- package/esm/gen/types/RadioDevice.d.ts +14 -0
- package/esm/gen/types/RadioDevice.d.ts.map +1 -0
- package/esm/gen/types/RadioDevice.js +1 -0
- package/esm/gen/types/RadioDeviceKind.d.ts +8 -0
- package/esm/gen/types/RadioDeviceKind.d.ts.map +1 -0
- package/esm/gen/types/RadioDeviceKind.js +9 -0
- package/esm/gen/types/ResourceMetadata.d.ts +6 -0
- package/esm/gen/types/ResourceMetadata.d.ts.map +1 -1
- package/esm/gen/types/SeelenCommandArgument.d.ts +25 -14
- package/esm/gen/types/SeelenCommandArgument.d.ts.map +1 -1
- package/esm/gen/types/SeelenCommandConfirmBluetoothDevicePairingArgs.d.ts +6 -0
- package/esm/gen/types/SeelenCommandConfirmBluetoothDevicePairingArgs.d.ts.map +1 -0
- package/esm/gen/types/SeelenCommandConfirmBluetoothDevicePairingArgs.js +1 -0
- package/esm/gen/types/SeelenCommandDisconnectBluetoothDeviceArgs.d.ts +4 -0
- package/esm/gen/types/SeelenCommandDisconnectBluetoothDeviceArgs.d.ts.map +1 -0
- package/esm/gen/types/SeelenCommandDisconnectBluetoothDeviceArgs.js +2 -0
- package/esm/gen/types/SeelenCommandRequestPairBluetoothDeviceArgs.d.ts +4 -0
- package/esm/gen/types/SeelenCommandRequestPairBluetoothDeviceArgs.d.ts.map +1 -0
- package/esm/gen/types/SeelenCommandRequestPairBluetoothDeviceArgs.js +2 -0
- package/esm/gen/types/SeelenCommandReturn.d.ts +22 -12
- package/esm/gen/types/SeelenCommandReturn.d.ts.map +1 -1
- package/esm/gen/types/SeelenCommandSetCurrentWidgetStatusArgs.d.ts +5 -0
- package/esm/gen/types/SeelenCommandSetCurrentWidgetStatusArgs.d.ts.map +1 -0
- package/esm/gen/types/SeelenCommandSetCurrentWidgetStatusArgs.js +1 -0
- package/esm/gen/types/SeelenCommandSetRadioStateArgs.d.ts +6 -0
- package/esm/gen/types/SeelenCommandSetRadioStateArgs.d.ts.map +1 -0
- package/esm/gen/types/SeelenCommandSetRadioStateArgs.js +1 -0
- package/esm/gen/types/SeelenEventPayload.d.ts +7 -9
- package/esm/gen/types/SeelenEventPayload.d.ts.map +1 -1
- package/esm/gen/types/ThemeVariable.d.ts +18 -4
- package/esm/gen/types/ThemeVariable.d.ts.map +1 -1
- package/esm/gen/types/ThemeVariableDefinition.d.ts +1 -1
- package/esm/gen/types/ThemeVariableDefinition.d.ts.map +1 -1
- package/esm/gen/types/ThemeVariableWithUnit.d.ts +22 -6
- package/esm/gen/types/ThemeVariableWithUnit.d.ts.map +1 -1
- package/esm/gen/types/Wallpaper.d.ts +9 -2
- package/esm/gen/types/Wallpaper.d.ts.map +1 -1
- package/esm/gen/types/WallpaperKind.d.ts +7 -0
- package/esm/gen/types/WallpaperKind.d.ts.map +1 -0
- package/esm/gen/types/WallpaperKind.js +8 -0
- package/esm/gen/types/Widget.d.ts +4 -0
- package/esm/gen/types/Widget.d.ts.map +1 -1
- package/esm/gen/types/WidgetStatus.d.ts +8 -0
- package/esm/gen/types/WidgetStatus.d.ts.map +1 -0
- package/esm/gen/types/WidgetStatus.js +9 -0
- package/esm/gen/types/mod.d.ts +11 -2
- package/esm/gen/types/mod.d.ts.map +1 -1
- package/esm/gen/types/mod.js +11 -2
- package/esm/src/handlers/commands.d.ts +11 -7
- package/esm/src/handlers/commands.d.ts.map +1 -1
- package/esm/src/handlers/commands.js +10 -6
- package/esm/src/handlers/events.d.ts +4 -5
- package/esm/src/handlers/events.d.ts.map +1 -1
- package/esm/src/handlers/events.js +3 -4
- package/esm/src/state/theme/mod.d.ts +0 -6
- package/esm/src/state/theme/mod.d.ts.map +1 -1
- package/esm/src/state/theme/mod.js +12 -28
- package/esm/src/state/theme/theming.d.ts +7 -0
- package/esm/src/state/theme/theming.d.ts.map +1 -0
- package/esm/src/state/theme/theming.js +56 -0
- package/esm/src/state/wallpaper/mod.d.ts +4 -2
- package/esm/src/state/wallpaper/mod.d.ts.map +1 -1
- package/esm/src/state/wallpaper/mod.js +4 -2
- package/esm/src/state/widget/mod.d.ts +31 -8
- package/esm/src/state/widget/mod.d.ts.map +1 -1
- package/esm/src/state/widget/mod.js +69 -31
- package/esm/src/state/widget/sizing.d.ts +7 -2
- package/esm/src/state/widget/sizing.d.ts.map +1 -1
- package/esm/src/state/widget/sizing.js +39 -36
- package/esm/src/system_state/bluetooth/mod.d.ts +1 -7
- package/esm/src/system_state/bluetooth/mod.d.ts.map +1 -1
- package/esm/src/system_state/bluetooth/mod.js +1 -26
- package/esm/src/system_state/ui_colors.d.ts +6 -3
- package/esm/src/system_state/ui_colors.d.ts.map +1 -1
- package/esm/src/system_state/ui_colors.js +63 -32
- package/esm/src/utils/DOM.d.ts +9 -0
- package/esm/src/utils/DOM.d.ts.map +1 -0
- package/esm/src/utils/DOM.js +29 -0
- package/package.json +1 -1
- package/script/gen/types/BluetoothDevice.d.ts +1 -0
- package/script/gen/types/BluetoothDevice.d.ts.map +1 -1
- package/script/gen/types/DevicePairingAnswer.d.ts +8 -0
- package/script/gen/types/DevicePairingAnswer.d.ts.map +1 -0
- package/script/gen/types/DevicePairingNeededAction.d.ts +18 -0
- package/script/gen/types/DevicePairingNeededAction.d.ts.map +1 -0
- package/script/gen/types/RadioDevice.d.ts +14 -0
- package/script/gen/types/RadioDevice.d.ts.map +1 -0
- package/script/gen/types/RadioDevice.js +2 -0
- package/script/gen/types/RadioDeviceKind.d.ts +8 -0
- package/script/gen/types/RadioDeviceKind.d.ts.map +1 -0
- package/script/gen/types/RadioDeviceKind.js +12 -0
- package/script/gen/types/ResourceMetadata.d.ts +6 -0
- package/script/gen/types/ResourceMetadata.d.ts.map +1 -1
- package/script/gen/types/SeelenCommandArgument.d.ts +25 -14
- package/script/gen/types/SeelenCommandArgument.d.ts.map +1 -1
- package/script/gen/types/SeelenCommandConfirmBluetoothDevicePairingArgs.d.ts +6 -0
- package/script/gen/types/SeelenCommandConfirmBluetoothDevicePairingArgs.d.ts.map +1 -0
- package/script/gen/types/SeelenCommandConfirmBluetoothDevicePairingArgs.js +2 -0
- package/script/gen/types/SeelenCommandDisconnectBluetoothDeviceArgs.d.ts +4 -0
- package/script/gen/types/SeelenCommandDisconnectBluetoothDeviceArgs.d.ts.map +1 -0
- package/script/gen/types/SeelenCommandDisconnectBluetoothDeviceArgs.js +3 -0
- package/script/gen/types/SeelenCommandRequestPairBluetoothDeviceArgs.d.ts +4 -0
- package/script/gen/types/SeelenCommandRequestPairBluetoothDeviceArgs.d.ts.map +1 -0
- package/script/gen/types/SeelenCommandRequestPairBluetoothDeviceArgs.js +3 -0
- package/script/gen/types/SeelenCommandReturn.d.ts +22 -12
- package/script/gen/types/SeelenCommandReturn.d.ts.map +1 -1
- package/script/gen/types/SeelenCommandSetCurrentWidgetStatusArgs.d.ts +5 -0
- package/script/gen/types/SeelenCommandSetCurrentWidgetStatusArgs.d.ts.map +1 -0
- package/script/gen/types/SeelenCommandSetCurrentWidgetStatusArgs.js +2 -0
- package/script/gen/types/SeelenCommandSetRadioStateArgs.d.ts +6 -0
- package/script/gen/types/SeelenCommandSetRadioStateArgs.d.ts.map +1 -0
- package/script/gen/types/SeelenCommandSetRadioStateArgs.js +2 -0
- package/script/gen/types/SeelenEventPayload.d.ts +7 -9
- package/script/gen/types/SeelenEventPayload.d.ts.map +1 -1
- package/script/gen/types/ThemeVariable.d.ts +18 -4
- package/script/gen/types/ThemeVariable.d.ts.map +1 -1
- package/script/gen/types/ThemeVariableDefinition.d.ts +1 -1
- package/script/gen/types/ThemeVariableDefinition.d.ts.map +1 -1
- package/script/gen/types/ThemeVariableWithUnit.d.ts +22 -6
- package/script/gen/types/ThemeVariableWithUnit.d.ts.map +1 -1
- package/script/gen/types/Wallpaper.d.ts +9 -2
- package/script/gen/types/Wallpaper.d.ts.map +1 -1
- package/script/gen/types/WallpaperKind.d.ts +7 -0
- package/script/gen/types/WallpaperKind.d.ts.map +1 -0
- package/script/gen/types/WallpaperKind.js +11 -0
- package/script/gen/types/Widget.d.ts +4 -0
- package/script/gen/types/Widget.d.ts.map +1 -1
- package/script/gen/types/WidgetStatus.d.ts +8 -0
- package/script/gen/types/WidgetStatus.d.ts.map +1 -0
- package/script/gen/types/WidgetStatus.js +12 -0
- package/script/gen/types/mod.d.ts +11 -2
- package/script/gen/types/mod.d.ts.map +1 -1
- package/script/gen/types/mod.js +11 -2
- package/script/src/handlers/commands.d.ts +11 -7
- package/script/src/handlers/commands.d.ts.map +1 -1
- package/script/src/handlers/commands.js +10 -6
- package/script/src/handlers/events.d.ts +4 -5
- package/script/src/handlers/events.d.ts.map +1 -1
- package/script/src/handlers/events.js +3 -4
- package/script/src/state/theme/mod.d.ts +0 -6
- package/script/src/state/theme/mod.d.ts.map +1 -1
- package/script/src/state/theme/mod.js +11 -29
- package/script/src/state/theme/theming.d.ts +7 -0
- package/script/src/state/theme/theming.d.ts.map +1 -0
- package/script/src/state/theme/theming.js +60 -0
- package/script/src/state/wallpaper/mod.d.ts +4 -2
- package/script/src/state/wallpaper/mod.d.ts.map +1 -1
- package/script/src/state/wallpaper/mod.js +4 -2
- package/script/src/state/widget/mod.d.ts +31 -8
- package/script/src/state/widget/mod.d.ts.map +1 -1
- package/script/src/state/widget/mod.js +66 -28
- package/script/src/state/widget/sizing.d.ts +7 -2
- package/script/src/state/widget/sizing.d.ts.map +1 -1
- package/script/src/state/widget/sizing.js +41 -37
- package/script/src/system_state/bluetooth/mod.d.ts +1 -7
- package/script/src/system_state/bluetooth/mod.d.ts.map +1 -1
- package/script/src/system_state/bluetooth/mod.js +1 -26
- package/script/src/system_state/ui_colors.d.ts +6 -3
- package/script/src/system_state/ui_colors.d.ts.map +1 -1
- package/script/src/system_state/ui_colors.js +63 -32
- package/script/src/utils/DOM.d.ts +9 -0
- package/script/src/utils/DOM.d.ts.map +1 -0
- package/script/src/utils/DOM.js +33 -0
- package/esm/gen/types/SeelenCommandConfirmBluetoothDevicePairArgs.d.ts +0 -5
- package/esm/gen/types/SeelenCommandConfirmBluetoothDevicePairArgs.d.ts.map +0 -1
- package/esm/gen/types/SeelenCommandPairBluetoothDeviceArgs.d.ts +0 -4
- package/esm/gen/types/SeelenCommandPairBluetoothDeviceArgs.d.ts.map +0 -1
- package/esm/src/utils/Wrapper.d.ts +0 -3
- package/esm/src/utils/Wrapper.d.ts.map +0 -1
- package/esm/src/utils/Wrapper.js +0 -5
- package/script/gen/types/SeelenCommandConfirmBluetoothDevicePairArgs.d.ts +0 -5
- package/script/gen/types/SeelenCommandConfirmBluetoothDevicePairArgs.d.ts.map +0 -1
- package/script/gen/types/SeelenCommandPairBluetoothDeviceArgs.d.ts +0 -4
- package/script/gen/types/SeelenCommandPairBluetoothDeviceArgs.d.ts.map +0 -1
- package/script/src/utils/Wrapper.d.ts +0 -3
- package/script/src/utils/Wrapper.d.ts.map +0 -1
- package/script/src/utils/Wrapper.js +0 -8
- /package/esm/gen/types/{SeelenCommandConfirmBluetoothDevicePairArgs.js → DevicePairingAnswer.js} +0 -0
- /package/esm/gen/types/{SeelenCommandPairBluetoothDeviceArgs.js → DevicePairingNeededAction.js} +0 -0
- /package/script/gen/types/{SeelenCommandConfirmBluetoothDevicePairArgs.js → DevicePairingAnswer.js} +0 -0
- /package/script/gen/types/{SeelenCommandPairBluetoothDeviceArgs.js → DevicePairingNeededAction.js} +0 -0
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Color = exports.UIColors = void 0;
|
|
4
4
|
const mod_js_1 = require("../handlers/mod.js");
|
|
5
|
+
const DOM_js_1 = require("../utils/DOM.js");
|
|
5
6
|
const State_js_1 = require("../utils/State.js");
|
|
6
7
|
class UIColors {
|
|
7
8
|
inner;
|
|
@@ -29,36 +30,38 @@ class UIColors {
|
|
|
29
30
|
});
|
|
30
31
|
}
|
|
31
32
|
setAsCssVariables() {
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
const element = document.createElement("style");
|
|
35
|
-
element.id = id;
|
|
36
|
-
element.textContent = ":root {\n";
|
|
33
|
+
const oldStyles = new DOM_js_1.RuntimeStyleSheet("@deprecated/system-colors");
|
|
34
|
+
const newStyles = new DOM_js_1.RuntimeStyleSheet("@runtime/system-colors");
|
|
37
35
|
for (const [key, value] of Object.entries(this.inner)) {
|
|
38
36
|
if (typeof value !== "string") {
|
|
39
37
|
continue;
|
|
40
38
|
}
|
|
41
|
-
const
|
|
42
|
-
const
|
|
43
|
-
const r = (color >> 16) & 255;
|
|
44
|
-
const g = (color >> 8) & 255;
|
|
45
|
-
const b = color & 255;
|
|
39
|
+
const color = Color.fromHex(value);
|
|
40
|
+
const { r, g, b } = color;
|
|
46
41
|
// replace rust snake case with kebab case
|
|
47
42
|
const name = key.replace("_", "-");
|
|
48
|
-
element.textContent += `--system-${name}-color: ${value.slice(0, 7)};\n`;
|
|
49
|
-
element.textContent += `--system-${name}-color-rgb: ${r}, ${g}, ${b};\n`;
|
|
50
43
|
// @deprecated old names
|
|
51
|
-
|
|
52
|
-
|
|
44
|
+
oldStyles.addVariable(`--config-${name}-color`, value.slice(0, 7));
|
|
45
|
+
oldStyles.addVariable(`--config-${name}-color-rgb`, `${r}, ${g}, ${b}`);
|
|
46
|
+
if (name.startsWith("accent")) {
|
|
47
|
+
newStyles.addVariable(`--system-${name}-color`, value.slice(0, 7));
|
|
48
|
+
newStyles.addVariable(`--system-${name}-color-rgb`, `${r}, ${g}, ${b}`);
|
|
49
|
+
const complement = color.complementary();
|
|
50
|
+
newStyles.addVariable(`--system-${name}-complementary-color`, complement.toHexString());
|
|
51
|
+
newStyles.addVariable(`--system-${name}-complementary-color-rgb`, `${complement.r}, ${complement.g}, ${complement.b}`);
|
|
52
|
+
}
|
|
53
53
|
}
|
|
54
|
-
|
|
54
|
+
oldStyles.applyToDocument();
|
|
55
|
+
newStyles.applyToDocument();
|
|
55
56
|
}
|
|
56
57
|
}
|
|
57
58
|
exports.UIColors = UIColors;
|
|
58
59
|
class Color {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
this.
|
|
60
|
+
constructor(obj) {
|
|
61
|
+
this.r = obj.r;
|
|
62
|
+
this.g = obj.g;
|
|
63
|
+
this.b = obj.b;
|
|
64
|
+
this.a = obj.a;
|
|
62
65
|
}
|
|
63
66
|
/** generates a random solid color */
|
|
64
67
|
static random() {
|
|
@@ -69,6 +72,34 @@ class Color {
|
|
|
69
72
|
a: 255,
|
|
70
73
|
});
|
|
71
74
|
}
|
|
75
|
+
static fromHex(hex) {
|
|
76
|
+
if (hex.startsWith("#")) {
|
|
77
|
+
hex = hex.slice(1);
|
|
78
|
+
}
|
|
79
|
+
if (hex.length === 3) {
|
|
80
|
+
hex = hex
|
|
81
|
+
.split("")
|
|
82
|
+
.map((char) => `${char}${char}`)
|
|
83
|
+
.join("");
|
|
84
|
+
}
|
|
85
|
+
if (hex.length === 6) {
|
|
86
|
+
hex = hex.padStart(8, "f");
|
|
87
|
+
}
|
|
88
|
+
const color = parseInt(hex.replace("#", ""), 16);
|
|
89
|
+
return new Color({
|
|
90
|
+
r: (color >> 24) & 255,
|
|
91
|
+
g: (color >> 16) & 255,
|
|
92
|
+
b: (color >> 8) & 255,
|
|
93
|
+
a: color & 255,
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
toHexString() {
|
|
97
|
+
return ("#" +
|
|
98
|
+
this.r.toString(16).padStart(2, "0") +
|
|
99
|
+
this.g.toString(16).padStart(2, "0") +
|
|
100
|
+
this.b.toString(16).padStart(2, "0") +
|
|
101
|
+
(this.a === 255 ? "" : this.a.toString(16).padStart(2, "0")));
|
|
102
|
+
}
|
|
72
103
|
getRuntimeStyleSheet() {
|
|
73
104
|
const styleId = "slu-lib-runtime-color-variables";
|
|
74
105
|
let styleElement = document.getElementById(styleId);
|
|
@@ -96,13 +127,6 @@ class Color {
|
|
|
96
127
|
lines.push("}");
|
|
97
128
|
sheet.textContent = lines.join("\n");
|
|
98
129
|
}
|
|
99
|
-
toHexString() {
|
|
100
|
-
return ("#" +
|
|
101
|
-
this.inner.r.toString(16).padStart(2, "0") +
|
|
102
|
-
this.inner.g.toString(16).padStart(2, "0") +
|
|
103
|
-
this.inner.b.toString(16).padStart(2, "0") +
|
|
104
|
-
this.inner.a.toString(16).padStart(2, "0"));
|
|
105
|
-
}
|
|
106
130
|
/**
|
|
107
131
|
* @param name the name of the color
|
|
108
132
|
* the name will be parsed to lower kebab case and remove non-alphanumeric characters
|
|
@@ -118,8 +142,8 @@ class Color {
|
|
|
118
142
|
.toLowerCase();
|
|
119
143
|
this.insertIntoStyleSheet({
|
|
120
144
|
[`--color-${parsedName}`]: this.toHexString(),
|
|
121
|
-
[`--color-${parsedName}-rgb`]: `${this.
|
|
122
|
-
[`--color-${parsedName}-rgba`]: `${this.
|
|
145
|
+
[`--color-${parsedName}-rgb`]: `${this.r}, ${this.g}, ${this.b}`,
|
|
146
|
+
[`--color-${parsedName}-rgba`]: `${this.r}, ${this.g}, ${this.b}, ${this.a}`,
|
|
123
147
|
});
|
|
124
148
|
}
|
|
125
149
|
/**
|
|
@@ -129,16 +153,23 @@ class Color {
|
|
|
129
153
|
* @returns a number between 0 and 255
|
|
130
154
|
*/
|
|
131
155
|
calcLuminance(accuracy) {
|
|
132
|
-
const { r, g, b } = this.inner;
|
|
133
156
|
if (accuracy) {
|
|
134
157
|
// gamma correction
|
|
135
|
-
const gR = r ** 2.2;
|
|
136
|
-
const gG = g ** 2.2;
|
|
137
|
-
const gB = b ** 2.2;
|
|
158
|
+
const gR = this.r ** 2.2;
|
|
159
|
+
const gG = this.g ** 2.2;
|
|
160
|
+
const gB = this.b ** 2.2;
|
|
138
161
|
return (0.299 * gR + 0.587 * gG + 0.114 * gB) ** (1 / 2.2);
|
|
139
162
|
}
|
|
140
163
|
// standard algorithm
|
|
141
|
-
return 0.2126 * r + 0.7152 * g + 0.0722 * b;
|
|
164
|
+
return 0.2126 * this.r + 0.7152 * this.g + 0.0722 * this.b;
|
|
165
|
+
}
|
|
166
|
+
complementary() {
|
|
167
|
+
return new Color({
|
|
168
|
+
r: 255 - this.r,
|
|
169
|
+
g: 255 - this.g,
|
|
170
|
+
b: 255 - this.b,
|
|
171
|
+
a: this.a,
|
|
172
|
+
});
|
|
142
173
|
}
|
|
143
174
|
}
|
|
144
175
|
exports.Color = Color;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DOM.d.ts","sourceRoot":"","sources":["../../../src/src/utils/DOM.ts"],"names":[],"mappings":"AAAA,qBAAa,iBAAiB;;gBAKhB,OAAO,EAAE,MAAM;IAU3B,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAI7C,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAI7B,KAAK,IAAI,IAAI;IAKb,eAAe,IAAI,IAAI;CAKxB"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RuntimeStyleSheet = void 0;
|
|
4
|
+
class RuntimeStyleSheet {
|
|
5
|
+
#element;
|
|
6
|
+
#variables = [];
|
|
7
|
+
#styles = [];
|
|
8
|
+
constructor(styleId) {
|
|
9
|
+
let styleElement = document.getElementById(styleId);
|
|
10
|
+
if (!styleElement) {
|
|
11
|
+
styleElement = document.createElement("style");
|
|
12
|
+
styleElement.id = styleId;
|
|
13
|
+
document.head.appendChild(styleElement);
|
|
14
|
+
}
|
|
15
|
+
this.#element = styleElement;
|
|
16
|
+
}
|
|
17
|
+
addVariable(key, value) {
|
|
18
|
+
this.#variables.push([key, value]);
|
|
19
|
+
}
|
|
20
|
+
addStyle(style) {
|
|
21
|
+
this.#styles.push(style);
|
|
22
|
+
}
|
|
23
|
+
clear() {
|
|
24
|
+
this.#variables = [];
|
|
25
|
+
this.#styles = [];
|
|
26
|
+
}
|
|
27
|
+
applyToDocument() {
|
|
28
|
+
const vars = this.#variables.map(([key, value]) => `${key}: ${value};`).join("\n");
|
|
29
|
+
this.#element.textContent = `:root {\n${vars}\n}\n\n`;
|
|
30
|
+
this.#element.textContent += this.#styles.join("\n\n/* -=-=-=-=-=-=-=-=- */\n\n");
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.RuntimeStyleSheet = RuntimeStyleSheet;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SeelenCommandConfirmBluetoothDevicePairArgs.d.ts","sourceRoot":"","sources":["../../../src/gen/types/SeelenCommandConfirmBluetoothDevicePairArgs.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,2CAA2C,GAAG;IAAE,MAAM,EAAE,OAAO,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;CAAE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SeelenCommandPairBluetoothDeviceArgs.d.ts","sourceRoot":"","sources":["../../../src/gen/types/SeelenCommandPairBluetoothDeviceArgs.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,oCAAoC,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;CAAE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Wrapper.d.ts","sourceRoot":"","sources":["../../../src/src/utils/Wrapper.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,OAAO,GAAG,KAAK,CAAC,EAAE,KAAK,EAAE,CAAC,KAAK,CAAC,CAAC;AAE7C,eAAO,MAAM,OAAO,EAIf,OAAO,CAAC"}
|
package/esm/src/utils/Wrapper.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SeelenCommandConfirmBluetoothDevicePairArgs.d.ts","sourceRoot":"","sources":["../../../src/gen/types/SeelenCommandConfirmBluetoothDevicePairArgs.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,2CAA2C,GAAG;IAAE,MAAM,EAAE,OAAO,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;CAAE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SeelenCommandPairBluetoothDeviceArgs.d.ts","sourceRoot":"","sources":["../../../src/gen/types/SeelenCommandPairBluetoothDeviceArgs.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,oCAAoC,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;CAAE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Wrapper.d.ts","sourceRoot":"","sources":["../../../src/src/utils/Wrapper.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,OAAO,GAAG,KAAK,CAAC,EAAE,KAAK,EAAE,CAAC,KAAK,CAAC,CAAC;AAE7C,eAAO,MAAM,OAAO,EAIf,OAAO,CAAC"}
|
/package/esm/gen/types/{SeelenCommandConfirmBluetoothDevicePairArgs.js → DevicePairingAnswer.js}
RENAMED
|
File without changes
|
/package/esm/gen/types/{SeelenCommandPairBluetoothDeviceArgs.js → DevicePairingNeededAction.js}
RENAMED
|
File without changes
|
/package/script/gen/types/{SeelenCommandConfirmBluetoothDevicePairArgs.js → DevicePairingAnswer.js}
RENAMED
|
File without changes
|
/package/script/gen/types/{SeelenCommandPairBluetoothDeviceArgs.js → DevicePairingNeededAction.js}
RENAMED
|
File without changes
|