retold-remote 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/css/retold-remote.css +83 -0
- package/html/codejar.js +511 -0
- package/html/index.html +23 -0
- package/package.json +68 -0
- package/server.js +43 -0
- package/source/Pict-Application-RetoldRemote-Configuration.json +7 -0
- package/source/Pict-Application-RetoldRemote.js +622 -0
- package/source/Pict-RetoldRemote-Bundle.js +14 -0
- package/source/cli/RetoldRemote-CLI-Program.js +15 -0
- package/source/cli/RetoldRemote-CLI-Run.js +3 -0
- package/source/cli/RetoldRemote-Server-Setup.js +257 -0
- package/source/cli/commands/RetoldRemote-Command-Serve.js +87 -0
- package/source/providers/Pict-Provider-GalleryFilterSort.js +597 -0
- package/source/providers/Pict-Provider-GalleryNavigation.js +819 -0
- package/source/providers/Pict-Provider-RetoldRemote.js +273 -0
- package/source/providers/Pict-Provider-RetoldRemoteIcons.js +640 -0
- package/source/providers/Pict-Provider-RetoldRemoteTheme.js +879 -0
- package/source/server/RetoldRemote-MediaService.js +536 -0
- package/source/server/RetoldRemote-PathRegistry.js +121 -0
- package/source/server/RetoldRemote-ThumbnailCache.js +89 -0
- package/source/server/RetoldRemote-ToolDetector.js +78 -0
- package/source/views/PictView-Remote-Gallery.js +1437 -0
- package/source/views/PictView-Remote-ImageViewer.js +363 -0
- package/source/views/PictView-Remote-Layout.js +420 -0
- package/source/views/PictView-Remote-MediaViewer.js +530 -0
- package/source/views/PictView-Remote-SettingsPanel.js +318 -0
- package/source/views/PictView-Remote-TopBar.js +206 -0
- package/web-application/codejar.js +511 -0
- package/web-application/css/retold-remote.css +83 -0
- package/web-application/index.html +23 -0
- package/web-application/js/pict.min.js +12 -0
- package/web-application/js/pict.min.js.map +1 -0
- package/web-application/retold-remote.compatible.js +5764 -0
- package/web-application/retold-remote.compatible.js.map +1 -0
- package/web-application/retold-remote.compatible.min.js +120 -0
- package/web-application/retold-remote.compatible.min.js.map +1 -0
- package/web-application/retold-remote.js +5763 -0
- package/web-application/retold-remote.js.map +1 -0
- package/web-application/retold-remote.min.js +120 -0
- package/web-application/retold-remote.min.js.map +1 -0
|
@@ -0,0 +1,879 @@
|
|
|
1
|
+
const libPictProvider = require('pict-provider');
|
|
2
|
+
|
|
3
|
+
const _ProviderConfiguration =
|
|
4
|
+
{
|
|
5
|
+
ProviderIdentifier: 'RetoldRemote-Theme',
|
|
6
|
+
AutoInitialize: true,
|
|
7
|
+
AutoInitializeOrdinal: 0
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Theme provider for retold-remote.
|
|
12
|
+
*
|
|
13
|
+
* Manages 15 themes (5 grey-only + 10 fun) via CSS custom properties.
|
|
14
|
+
* Injects a <style id="retold-remote-theme"> block into <head> with
|
|
15
|
+
* :root { --retold-* } variables. Calls the icon provider's setColors()
|
|
16
|
+
* to keep SVG icons in sync with the active theme.
|
|
17
|
+
*/
|
|
18
|
+
class RetoldRemoteThemeProvider extends libPictProvider
|
|
19
|
+
{
|
|
20
|
+
constructor(pFable, pOptions, pServiceHash)
|
|
21
|
+
{
|
|
22
|
+
super(pFable, pOptions, pServiceHash);
|
|
23
|
+
|
|
24
|
+
this._themes = {};
|
|
25
|
+
this._themeOrder = [];
|
|
26
|
+
this._currentTheme = 'twilight';
|
|
27
|
+
|
|
28
|
+
this._buildThemes();
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
_buildThemes()
|
|
32
|
+
{
|
|
33
|
+
let tmpSelf = this;
|
|
34
|
+
|
|
35
|
+
// ===================================================================
|
|
36
|
+
// GREY-ONLY THEMES (pure greyscale, no hue)
|
|
37
|
+
// ===================================================================
|
|
38
|
+
|
|
39
|
+
tmpSelf._addTheme('daylight',
|
|
40
|
+
{
|
|
41
|
+
Name: 'Daylight',
|
|
42
|
+
Category: 'Grey',
|
|
43
|
+
Description: 'Bright white, dark text',
|
|
44
|
+
Variables:
|
|
45
|
+
{
|
|
46
|
+
'--retold-bg-primary': '#FFFFFF',
|
|
47
|
+
'--retold-bg-secondary': '#F0F0F0',
|
|
48
|
+
'--retold-bg-tertiary': '#E8E8E8',
|
|
49
|
+
'--retold-bg-panel': '#F5F5F5',
|
|
50
|
+
'--retold-bg-viewer': '#FAFAFA',
|
|
51
|
+
'--retold-bg-hover': '#E0E0E0',
|
|
52
|
+
'--retold-bg-selected': '#C8C8C8',
|
|
53
|
+
'--retold-bg-thumb': '#F0F0F0',
|
|
54
|
+
'--retold-text-primary': '#1A1A1A',
|
|
55
|
+
'--retold-text-secondary': '#333333',
|
|
56
|
+
'--retold-text-muted': '#666666',
|
|
57
|
+
'--retold-text-dim': '#888888',
|
|
58
|
+
'--retold-text-placeholder': '#AAAAAA',
|
|
59
|
+
'--retold-accent': '#444444',
|
|
60
|
+
'--retold-accent-hover': '#222222',
|
|
61
|
+
'--retold-border': '#D0D0D0',
|
|
62
|
+
'--retold-border-light': '#E0E0E0',
|
|
63
|
+
'--retold-danger': '#CC0000',
|
|
64
|
+
'--retold-danger-muted': '#884444',
|
|
65
|
+
'--retold-scrollbar': '#C0C0C0',
|
|
66
|
+
'--retold-scrollbar-hover': '#A0A0A0',
|
|
67
|
+
'--retold-selection-bg': 'rgba(68, 68, 68, 0.2)',
|
|
68
|
+
'--retold-focus-outline': '#444444',
|
|
69
|
+
'--retold-font-family': "'Segoe UI', system-ui, -apple-system, sans-serif",
|
|
70
|
+
'--retold-font-mono': "'SF Mono', 'Fira Code', 'Consolas', monospace"
|
|
71
|
+
},
|
|
72
|
+
IconColors:
|
|
73
|
+
{
|
|
74
|
+
Primary: '#333333',
|
|
75
|
+
Accent: '#444444',
|
|
76
|
+
Muted: '#888888',
|
|
77
|
+
Light: '#E8E8E8',
|
|
78
|
+
WarmBeige: '#F0F0F0',
|
|
79
|
+
TealTint: '#E0E0E0',
|
|
80
|
+
Lavender: '#EBEBEB',
|
|
81
|
+
AmberTint: '#F0EDE8',
|
|
82
|
+
PdfFill: '#F0E0E0',
|
|
83
|
+
PdfText: '#CC0000'
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
tmpSelf._addTheme('afternoon',
|
|
88
|
+
{
|
|
89
|
+
Name: 'Afternoon',
|
|
90
|
+
Category: 'Grey',
|
|
91
|
+
Description: 'Warm light grey, softer contrast',
|
|
92
|
+
Variables:
|
|
93
|
+
{
|
|
94
|
+
'--retold-bg-primary': '#E8E4E0',
|
|
95
|
+
'--retold-bg-secondary': '#DAD6D2',
|
|
96
|
+
'--retold-bg-tertiary': '#D0CCC8',
|
|
97
|
+
'--retold-bg-panel': '#DDD9D5',
|
|
98
|
+
'--retold-bg-viewer': '#F0ECE8',
|
|
99
|
+
'--retold-bg-hover': '#CCC8C4',
|
|
100
|
+
'--retold-bg-selected': '#B8B4B0',
|
|
101
|
+
'--retold-bg-thumb': '#DAD6D2',
|
|
102
|
+
'--retold-text-primary': '#2A2A2A',
|
|
103
|
+
'--retold-text-secondary': '#404040',
|
|
104
|
+
'--retold-text-muted': '#707070',
|
|
105
|
+
'--retold-text-dim': '#909090',
|
|
106
|
+
'--retold-text-placeholder': '#B0B0B0',
|
|
107
|
+
'--retold-accent': '#555555',
|
|
108
|
+
'--retold-accent-hover': '#333333',
|
|
109
|
+
'--retold-border': '#C0BCB8',
|
|
110
|
+
'--retold-border-light': '#D0CCC8',
|
|
111
|
+
'--retold-danger': '#AA3333',
|
|
112
|
+
'--retold-danger-muted': '#886655',
|
|
113
|
+
'--retold-scrollbar': '#B8B4B0',
|
|
114
|
+
'--retold-scrollbar-hover': '#A0A09C',
|
|
115
|
+
'--retold-selection-bg': 'rgba(85, 85, 85, 0.2)',
|
|
116
|
+
'--retold-focus-outline': '#555555',
|
|
117
|
+
'--retold-font-family': "Georgia, 'Times New Roman', serif",
|
|
118
|
+
'--retold-font-mono': "'Courier New', Courier, monospace"
|
|
119
|
+
},
|
|
120
|
+
IconColors:
|
|
121
|
+
{
|
|
122
|
+
Primary: '#404040',
|
|
123
|
+
Accent: '#555555',
|
|
124
|
+
Muted: '#909090',
|
|
125
|
+
Light: '#D0CCC8',
|
|
126
|
+
WarmBeige: '#DAD6D2',
|
|
127
|
+
TealTint: '#CCC8C4',
|
|
128
|
+
Lavender: '#D2D0CE',
|
|
129
|
+
AmberTint: '#D8D2C8',
|
|
130
|
+
PdfFill: '#D8C8C0',
|
|
131
|
+
PdfText: '#AA3333'
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
tmpSelf._addTheme('evening',
|
|
136
|
+
{
|
|
137
|
+
Name: 'Evening',
|
|
138
|
+
Category: 'Grey',
|
|
139
|
+
Description: 'Medium grey, transitional',
|
|
140
|
+
Variables:
|
|
141
|
+
{
|
|
142
|
+
'--retold-bg-primary': '#484848',
|
|
143
|
+
'--retold-bg-secondary': '#3C3C3C',
|
|
144
|
+
'--retold-bg-tertiary': '#424242',
|
|
145
|
+
'--retold-bg-panel': '#454545',
|
|
146
|
+
'--retold-bg-viewer': '#363636',
|
|
147
|
+
'--retold-bg-hover': '#525252',
|
|
148
|
+
'--retold-bg-selected': '#606060',
|
|
149
|
+
'--retold-bg-thumb': '#3C3C3C',
|
|
150
|
+
'--retold-text-primary': '#E0E0E0',
|
|
151
|
+
'--retold-text-secondary': '#D0D0D0',
|
|
152
|
+
'--retold-text-muted': '#A0A0A0',
|
|
153
|
+
'--retold-text-dim': '#888888',
|
|
154
|
+
'--retold-text-placeholder': '#707070',
|
|
155
|
+
'--retold-accent': '#C0C0C0',
|
|
156
|
+
'--retold-accent-hover': '#E0E0E0',
|
|
157
|
+
'--retold-border': '#585858',
|
|
158
|
+
'--retold-border-light': '#606060',
|
|
159
|
+
'--retold-danger': '#FF6666',
|
|
160
|
+
'--retold-danger-muted': '#AA6666',
|
|
161
|
+
'--retold-scrollbar': '#585858',
|
|
162
|
+
'--retold-scrollbar-hover': '#686868',
|
|
163
|
+
'--retold-selection-bg': 'rgba(192, 192, 192, 0.25)',
|
|
164
|
+
'--retold-focus-outline': '#C0C0C0',
|
|
165
|
+
'--retold-font-family': "system-ui, -apple-system, sans-serif",
|
|
166
|
+
'--retold-font-mono': "'SF Mono', 'Fira Code', 'Consolas', monospace"
|
|
167
|
+
},
|
|
168
|
+
IconColors:
|
|
169
|
+
{
|
|
170
|
+
Primary: '#D0D0D0',
|
|
171
|
+
Accent: '#C0C0C0',
|
|
172
|
+
Muted: '#888888',
|
|
173
|
+
Light: '#424242',
|
|
174
|
+
WarmBeige: '#484848',
|
|
175
|
+
TealTint: '#3E3E3E',
|
|
176
|
+
Lavender: '#444444',
|
|
177
|
+
AmberTint: '#4A4640',
|
|
178
|
+
PdfFill: '#4A3C3C',
|
|
179
|
+
PdfText: '#FF6666'
|
|
180
|
+
}
|
|
181
|
+
});
|
|
182
|
+
|
|
183
|
+
tmpSelf._addTheme('twilight',
|
|
184
|
+
{
|
|
185
|
+
Name: 'Twilight',
|
|
186
|
+
Category: 'Grey',
|
|
187
|
+
Description: 'Dark grey, low light (default)',
|
|
188
|
+
Variables:
|
|
189
|
+
{
|
|
190
|
+
'--retold-bg-primary': '#1E1E1E',
|
|
191
|
+
'--retold-bg-secondary': '#181818',
|
|
192
|
+
'--retold-bg-tertiary': '#252525',
|
|
193
|
+
'--retold-bg-panel': '#202020',
|
|
194
|
+
'--retold-bg-viewer': '#141414',
|
|
195
|
+
'--retold-bg-hover': '#2E2E2E',
|
|
196
|
+
'--retold-bg-selected': '#404040',
|
|
197
|
+
'--retold-bg-thumb': '#181818',
|
|
198
|
+
'--retold-text-primary': '#E0E0E0',
|
|
199
|
+
'--retold-text-secondary': '#C8C8C8',
|
|
200
|
+
'--retold-text-muted': '#909090',
|
|
201
|
+
'--retold-text-dim': '#707070',
|
|
202
|
+
'--retold-text-placeholder': '#585858',
|
|
203
|
+
'--retold-accent': '#A0A0A0',
|
|
204
|
+
'--retold-accent-hover': '#C0C0C0',
|
|
205
|
+
'--retold-border': '#333333',
|
|
206
|
+
'--retold-border-light': '#404040',
|
|
207
|
+
'--retold-danger': '#FF6666',
|
|
208
|
+
'--retold-danger-muted': '#AA6666',
|
|
209
|
+
'--retold-scrollbar': '#404040',
|
|
210
|
+
'--retold-scrollbar-hover': '#505050',
|
|
211
|
+
'--retold-selection-bg': 'rgba(160, 160, 160, 0.25)',
|
|
212
|
+
'--retold-focus-outline': '#A0A0A0',
|
|
213
|
+
'--retold-font-family': "system-ui, -apple-system, sans-serif",
|
|
214
|
+
'--retold-font-mono': "'SF Mono', 'Fira Code', 'Consolas', monospace"
|
|
215
|
+
},
|
|
216
|
+
IconColors:
|
|
217
|
+
{
|
|
218
|
+
Primary: '#C8C8C8',
|
|
219
|
+
Accent: '#A0A0A0',
|
|
220
|
+
Muted: '#707070',
|
|
221
|
+
Light: '#252525',
|
|
222
|
+
WarmBeige: '#2A2A2A',
|
|
223
|
+
TealTint: '#222222',
|
|
224
|
+
Lavender: '#282828',
|
|
225
|
+
AmberTint: '#2E2A24',
|
|
226
|
+
PdfFill: '#2E2224',
|
|
227
|
+
PdfText: '#E06060'
|
|
228
|
+
}
|
|
229
|
+
});
|
|
230
|
+
|
|
231
|
+
tmpSelf._addTheme('night',
|
|
232
|
+
{
|
|
233
|
+
Name: 'Night',
|
|
234
|
+
Category: 'Grey',
|
|
235
|
+
Description: 'Near-black, minimal contrast',
|
|
236
|
+
Variables:
|
|
237
|
+
{
|
|
238
|
+
'--retold-bg-primary': '#0A0A0A',
|
|
239
|
+
'--retold-bg-secondary': '#060606',
|
|
240
|
+
'--retold-bg-tertiary': '#0E0E0E',
|
|
241
|
+
'--retold-bg-panel': '#0C0C0C',
|
|
242
|
+
'--retold-bg-viewer': '#040404',
|
|
243
|
+
'--retold-bg-hover': '#161616',
|
|
244
|
+
'--retold-bg-selected': '#252525',
|
|
245
|
+
'--retold-bg-thumb': '#060606',
|
|
246
|
+
'--retold-text-primary': '#888888',
|
|
247
|
+
'--retold-text-secondary': '#707070',
|
|
248
|
+
'--retold-text-muted': '#555555',
|
|
249
|
+
'--retold-text-dim': '#444444',
|
|
250
|
+
'--retold-text-placeholder': '#333333',
|
|
251
|
+
'--retold-accent': '#666666',
|
|
252
|
+
'--retold-accent-hover': '#808080',
|
|
253
|
+
'--retold-border': '#1A1A1A',
|
|
254
|
+
'--retold-border-light': '#222222',
|
|
255
|
+
'--retold-danger': '#AA4444',
|
|
256
|
+
'--retold-danger-muted': '#663333',
|
|
257
|
+
'--retold-scrollbar': '#1A1A1A',
|
|
258
|
+
'--retold-scrollbar-hover': '#2A2A2A',
|
|
259
|
+
'--retold-selection-bg': 'rgba(102, 102, 102, 0.2)',
|
|
260
|
+
'--retold-focus-outline': '#666666',
|
|
261
|
+
'--retold-font-family': "system-ui, -apple-system, sans-serif",
|
|
262
|
+
'--retold-font-mono': "'SF Mono', 'Fira Code', 'Consolas', monospace"
|
|
263
|
+
},
|
|
264
|
+
IconColors:
|
|
265
|
+
{
|
|
266
|
+
Primary: '#707070',
|
|
267
|
+
Accent: '#666666',
|
|
268
|
+
Muted: '#444444',
|
|
269
|
+
Light: '#0E0E0E',
|
|
270
|
+
WarmBeige: '#121212',
|
|
271
|
+
TealTint: '#0C0C0C',
|
|
272
|
+
Lavender: '#101010',
|
|
273
|
+
AmberTint: '#141210',
|
|
274
|
+
PdfFill: '#141010',
|
|
275
|
+
PdfText: '#AA4444'
|
|
276
|
+
}
|
|
277
|
+
});
|
|
278
|
+
|
|
279
|
+
// ===================================================================
|
|
280
|
+
// FUN THEMES
|
|
281
|
+
// ===================================================================
|
|
282
|
+
|
|
283
|
+
tmpSelf._addTheme('neo-tokyo',
|
|
284
|
+
{
|
|
285
|
+
Name: 'Neo-Tokyo',
|
|
286
|
+
Category: 'Fun',
|
|
287
|
+
Description: 'Neon pink on dark navy',
|
|
288
|
+
Variables:
|
|
289
|
+
{
|
|
290
|
+
'--retold-bg-primary': '#0D0D2B',
|
|
291
|
+
'--retold-bg-secondary': '#080820',
|
|
292
|
+
'--retold-bg-tertiary': '#121235',
|
|
293
|
+
'--retold-bg-panel': '#0F0F28',
|
|
294
|
+
'--retold-bg-viewer': '#060615',
|
|
295
|
+
'--retold-bg-hover': '#1A1A42',
|
|
296
|
+
'--retold-bg-selected': '#2A1845',
|
|
297
|
+
'--retold-bg-thumb': '#080820',
|
|
298
|
+
'--retold-text-primary': '#E8E0F0',
|
|
299
|
+
'--retold-text-secondary': '#D0C8E0',
|
|
300
|
+
'--retold-text-muted': '#9088A8',
|
|
301
|
+
'--retold-text-dim': '#6860A0',
|
|
302
|
+
'--retold-text-placeholder': '#504888',
|
|
303
|
+
'--retold-accent': '#FF2D8A',
|
|
304
|
+
'--retold-accent-hover': '#FF5AA0',
|
|
305
|
+
'--retold-border': '#2A2050',
|
|
306
|
+
'--retold-border-light': '#382868',
|
|
307
|
+
'--retold-danger': '#FF4466',
|
|
308
|
+
'--retold-danger-muted': '#AA3355',
|
|
309
|
+
'--retold-scrollbar': '#2A2050',
|
|
310
|
+
'--retold-scrollbar-hover': '#3A3068',
|
|
311
|
+
'--retold-selection-bg': 'rgba(255, 45, 138, 0.25)',
|
|
312
|
+
'--retold-focus-outline': '#FF2D8A',
|
|
313
|
+
'--retold-font-family': "'Courier New', monospace",
|
|
314
|
+
'--retold-font-mono': "'Courier New', monospace"
|
|
315
|
+
},
|
|
316
|
+
IconColors:
|
|
317
|
+
{
|
|
318
|
+
Primary: '#D0C8E0',
|
|
319
|
+
Accent: '#FF2D8A',
|
|
320
|
+
Muted: '#6860A0',
|
|
321
|
+
Light: '#121235',
|
|
322
|
+
WarmBeige: '#141438',
|
|
323
|
+
TealTint: '#100E30',
|
|
324
|
+
Lavender: '#141232',
|
|
325
|
+
AmberTint: '#1A1228',
|
|
326
|
+
PdfFill: '#1A1028',
|
|
327
|
+
PdfText: '#FF4466'
|
|
328
|
+
}
|
|
329
|
+
});
|
|
330
|
+
|
|
331
|
+
tmpSelf._addTheme('cyberpunk',
|
|
332
|
+
{
|
|
333
|
+
Name: 'Cyberpunk',
|
|
334
|
+
Category: 'Fun',
|
|
335
|
+
Description: 'Electric green on black',
|
|
336
|
+
Variables:
|
|
337
|
+
{
|
|
338
|
+
'--retold-bg-primary': '#0A0E0A',
|
|
339
|
+
'--retold-bg-secondary': '#060806',
|
|
340
|
+
'--retold-bg-tertiary': '#0E120E',
|
|
341
|
+
'--retold-bg-panel': '#0C100C',
|
|
342
|
+
'--retold-bg-viewer': '#040604',
|
|
343
|
+
'--retold-bg-hover': '#142014',
|
|
344
|
+
'--retold-bg-selected': '#1A3A1A',
|
|
345
|
+
'--retold-bg-thumb': '#060806',
|
|
346
|
+
'--retold-text-primary': '#C8FFC8',
|
|
347
|
+
'--retold-text-secondary': '#A0D8A0',
|
|
348
|
+
'--retold-text-muted': '#608860',
|
|
349
|
+
'--retold-text-dim': '#406040',
|
|
350
|
+
'--retold-text-placeholder': '#305030',
|
|
351
|
+
'--retold-accent': '#00FF41',
|
|
352
|
+
'--retold-accent-hover': '#44FF77',
|
|
353
|
+
'--retold-border': '#1A2A1A',
|
|
354
|
+
'--retold-border-light': '#224022',
|
|
355
|
+
'--retold-danger': '#FF3333',
|
|
356
|
+
'--retold-danger-muted': '#AA2222',
|
|
357
|
+
'--retold-scrollbar': '#1A2A1A',
|
|
358
|
+
'--retold-scrollbar-hover': '#2A4A2A',
|
|
359
|
+
'--retold-selection-bg': 'rgba(0, 255, 65, 0.2)',
|
|
360
|
+
'--retold-focus-outline': '#00FF41',
|
|
361
|
+
'--retold-font-family': "'Lucida Console', 'Courier New', monospace",
|
|
362
|
+
'--retold-font-mono': "'Lucida Console', 'Courier New', monospace"
|
|
363
|
+
},
|
|
364
|
+
IconColors:
|
|
365
|
+
{
|
|
366
|
+
Primary: '#A0D8A0',
|
|
367
|
+
Accent: '#00FF41',
|
|
368
|
+
Muted: '#406040',
|
|
369
|
+
Light: '#0E120E',
|
|
370
|
+
WarmBeige: '#101610',
|
|
371
|
+
TealTint: '#0C140C',
|
|
372
|
+
Lavender: '#0E120E',
|
|
373
|
+
AmberTint: '#141810',
|
|
374
|
+
PdfFill: '#181010',
|
|
375
|
+
PdfText: '#FF3333'
|
|
376
|
+
}
|
|
377
|
+
});
|
|
378
|
+
|
|
379
|
+
tmpSelf._addTheme('hotdog',
|
|
380
|
+
{
|
|
381
|
+
Name: 'Hotdog',
|
|
382
|
+
Category: 'Fun',
|
|
383
|
+
Description: 'Red and mustard yellow, garish',
|
|
384
|
+
Variables:
|
|
385
|
+
{
|
|
386
|
+
'--retold-bg-primary': '#8B0000',
|
|
387
|
+
'--retold-bg-secondary': '#6B0000',
|
|
388
|
+
'--retold-bg-tertiary': '#7B0000',
|
|
389
|
+
'--retold-bg-panel': '#750000',
|
|
390
|
+
'--retold-bg-viewer': '#550000',
|
|
391
|
+
'--retold-bg-hover': '#AA1111',
|
|
392
|
+
'--retold-bg-selected': '#BB3300',
|
|
393
|
+
'--retold-bg-thumb': '#6B0000',
|
|
394
|
+
'--retold-text-primary': '#FFD700',
|
|
395
|
+
'--retold-text-secondary': '#FFC000',
|
|
396
|
+
'--retold-text-muted': '#CC9900',
|
|
397
|
+
'--retold-text-dim': '#AA7700',
|
|
398
|
+
'--retold-text-placeholder': '#886600',
|
|
399
|
+
'--retold-accent': '#FFD700',
|
|
400
|
+
'--retold-accent-hover': '#FFEE44',
|
|
401
|
+
'--retold-border': '#AA2222',
|
|
402
|
+
'--retold-border-light': '#BB3333',
|
|
403
|
+
'--retold-danger': '#FFFF00',
|
|
404
|
+
'--retold-danger-muted': '#CCCC00',
|
|
405
|
+
'--retold-scrollbar': '#AA2222',
|
|
406
|
+
'--retold-scrollbar-hover': '#CC3333',
|
|
407
|
+
'--retold-selection-bg': 'rgba(255, 215, 0, 0.3)',
|
|
408
|
+
'--retold-focus-outline': '#FFD700',
|
|
409
|
+
'--retold-font-family': "Impact, 'Arial Black', sans-serif",
|
|
410
|
+
'--retold-font-mono': "'Courier New', monospace"
|
|
411
|
+
},
|
|
412
|
+
IconColors:
|
|
413
|
+
{
|
|
414
|
+
Primary: '#FFC000',
|
|
415
|
+
Accent: '#FFD700',
|
|
416
|
+
Muted: '#AA7700',
|
|
417
|
+
Light: '#7B0000',
|
|
418
|
+
WarmBeige: '#800000',
|
|
419
|
+
TealTint: '#6B0000',
|
|
420
|
+
Lavender: '#780000',
|
|
421
|
+
AmberTint: '#7A1000',
|
|
422
|
+
PdfFill: '#6B0000',
|
|
423
|
+
PdfText: '#FFFF00'
|
|
424
|
+
}
|
|
425
|
+
});
|
|
426
|
+
|
|
427
|
+
tmpSelf._addTheme('1970s-console',
|
|
428
|
+
{
|
|
429
|
+
Name: '1970s Console',
|
|
430
|
+
Category: 'Fun',
|
|
431
|
+
Description: 'Amber phosphor on brown-black',
|
|
432
|
+
Variables:
|
|
433
|
+
{
|
|
434
|
+
'--retold-bg-primary': '#1A1000',
|
|
435
|
+
'--retold-bg-secondary': '#140C00',
|
|
436
|
+
'--retold-bg-tertiary': '#1E1400',
|
|
437
|
+
'--retold-bg-panel': '#1C1200',
|
|
438
|
+
'--retold-bg-viewer': '#100A00',
|
|
439
|
+
'--retold-bg-hover': '#2A1C00',
|
|
440
|
+
'--retold-bg-selected': '#3A2800',
|
|
441
|
+
'--retold-bg-thumb': '#140C00',
|
|
442
|
+
'--retold-text-primary': '#FFAA00',
|
|
443
|
+
'--retold-text-secondary': '#DD8800',
|
|
444
|
+
'--retold-text-muted': '#AA6600',
|
|
445
|
+
'--retold-text-dim': '#884400',
|
|
446
|
+
'--retold-text-placeholder': '#663300',
|
|
447
|
+
'--retold-accent': '#FFCC00',
|
|
448
|
+
'--retold-accent-hover': '#FFDD44',
|
|
449
|
+
'--retold-border': '#2A1800',
|
|
450
|
+
'--retold-border-light': '#3A2200',
|
|
451
|
+
'--retold-danger': '#FF4400',
|
|
452
|
+
'--retold-danger-muted': '#AA3300',
|
|
453
|
+
'--retold-scrollbar': '#2A1800',
|
|
454
|
+
'--retold-scrollbar-hover': '#3A2800',
|
|
455
|
+
'--retold-selection-bg': 'rgba(255, 204, 0, 0.2)',
|
|
456
|
+
'--retold-focus-outline': '#FFCC00',
|
|
457
|
+
'--retold-font-family': "'Courier New', 'Lucida Console', monospace",
|
|
458
|
+
'--retold-font-mono': "'Courier New', 'Lucida Console', monospace"
|
|
459
|
+
},
|
|
460
|
+
IconColors:
|
|
461
|
+
{
|
|
462
|
+
Primary: '#DD8800',
|
|
463
|
+
Accent: '#FFCC00',
|
|
464
|
+
Muted: '#884400',
|
|
465
|
+
Light: '#1E1400',
|
|
466
|
+
WarmBeige: '#201800',
|
|
467
|
+
TealTint: '#1A1000',
|
|
468
|
+
Lavender: '#1C1200',
|
|
469
|
+
AmberTint: '#221800',
|
|
470
|
+
PdfFill: '#201000',
|
|
471
|
+
PdfText: '#FF4400'
|
|
472
|
+
}
|
|
473
|
+
});
|
|
474
|
+
|
|
475
|
+
tmpSelf._addTheme('1980s-console',
|
|
476
|
+
{
|
|
477
|
+
Name: '1980s Console',
|
|
478
|
+
Category: 'Fun',
|
|
479
|
+
Description: 'Green phosphor on black',
|
|
480
|
+
Variables:
|
|
481
|
+
{
|
|
482
|
+
'--retold-bg-primary': '#001200',
|
|
483
|
+
'--retold-bg-secondary': '#000E00',
|
|
484
|
+
'--retold-bg-tertiary': '#001600',
|
|
485
|
+
'--retold-bg-panel': '#001400',
|
|
486
|
+
'--retold-bg-viewer': '#000A00',
|
|
487
|
+
'--retold-bg-hover': '#002200',
|
|
488
|
+
'--retold-bg-selected': '#003800',
|
|
489
|
+
'--retold-bg-thumb': '#000E00',
|
|
490
|
+
'--retold-text-primary': '#00FF00',
|
|
491
|
+
'--retold-text-secondary': '#00CC00',
|
|
492
|
+
'--retold-text-muted': '#009900',
|
|
493
|
+
'--retold-text-dim': '#006600',
|
|
494
|
+
'--retold-text-placeholder': '#004400',
|
|
495
|
+
'--retold-accent': '#00FF66',
|
|
496
|
+
'--retold-accent-hover': '#44FF88',
|
|
497
|
+
'--retold-border': '#002A00',
|
|
498
|
+
'--retold-border-light': '#003A00',
|
|
499
|
+
'--retold-danger': '#FF0000',
|
|
500
|
+
'--retold-danger-muted': '#AA0000',
|
|
501
|
+
'--retold-scrollbar': '#002A00',
|
|
502
|
+
'--retold-scrollbar-hover': '#004400',
|
|
503
|
+
'--retold-selection-bg': 'rgba(0, 255, 102, 0.2)',
|
|
504
|
+
'--retold-focus-outline': '#00FF66',
|
|
505
|
+
'--retold-font-family': "'Courier New', monospace",
|
|
506
|
+
'--retold-font-mono': "'Courier New', monospace"
|
|
507
|
+
},
|
|
508
|
+
IconColors:
|
|
509
|
+
{
|
|
510
|
+
Primary: '#00CC00',
|
|
511
|
+
Accent: '#00FF66',
|
|
512
|
+
Muted: '#006600',
|
|
513
|
+
Light: '#001600',
|
|
514
|
+
WarmBeige: '#001A00',
|
|
515
|
+
TealTint: '#001200',
|
|
516
|
+
Lavender: '#001400',
|
|
517
|
+
AmberTint: '#001800',
|
|
518
|
+
PdfFill: '#140000',
|
|
519
|
+
PdfText: '#FF0000'
|
|
520
|
+
}
|
|
521
|
+
});
|
|
522
|
+
|
|
523
|
+
tmpSelf._addTheme('1990s-website',
|
|
524
|
+
{
|
|
525
|
+
Name: '1990s Web Site',
|
|
526
|
+
Category: 'Fun',
|
|
527
|
+
Description: 'Blue links on grey, beveled',
|
|
528
|
+
Variables:
|
|
529
|
+
{
|
|
530
|
+
'--retold-bg-primary': '#C0C0C0',
|
|
531
|
+
'--retold-bg-secondary': '#B0B0B0',
|
|
532
|
+
'--retold-bg-tertiary': '#A8A8A8',
|
|
533
|
+
'--retold-bg-panel': '#B8B8B8',
|
|
534
|
+
'--retold-bg-viewer': '#D0D0D0',
|
|
535
|
+
'--retold-bg-hover': '#B8B8D0',
|
|
536
|
+
'--retold-bg-selected': '#000080',
|
|
537
|
+
'--retold-bg-thumb': '#B0B0B0',
|
|
538
|
+
'--retold-text-primary': '#000000',
|
|
539
|
+
'--retold-text-secondary': '#000080',
|
|
540
|
+
'--retold-text-muted': '#404040',
|
|
541
|
+
'--retold-text-dim': '#606060',
|
|
542
|
+
'--retold-text-placeholder': '#808080',
|
|
543
|
+
'--retold-accent': '#0000FF',
|
|
544
|
+
'--retold-accent-hover': '#0000CC',
|
|
545
|
+
'--retold-border': '#808080',
|
|
546
|
+
'--retold-border-light': '#A0A0A0',
|
|
547
|
+
'--retold-danger': '#FF0000',
|
|
548
|
+
'--retold-danger-muted': '#990000',
|
|
549
|
+
'--retold-scrollbar': '#808080',
|
|
550
|
+
'--retold-scrollbar-hover': '#606060',
|
|
551
|
+
'--retold-selection-bg': 'rgba(0, 0, 128, 0.3)',
|
|
552
|
+
'--retold-focus-outline': '#0000FF',
|
|
553
|
+
'--retold-font-family': "'Times New Roman', Times, serif",
|
|
554
|
+
'--retold-font-mono': "'Courier New', Courier, monospace"
|
|
555
|
+
},
|
|
556
|
+
IconColors:
|
|
557
|
+
{
|
|
558
|
+
Primary: '#000080',
|
|
559
|
+
Accent: '#0000FF',
|
|
560
|
+
Muted: '#606060',
|
|
561
|
+
Light: '#A8A8A8',
|
|
562
|
+
WarmBeige: '#B0B0B0',
|
|
563
|
+
TealTint: '#A0A0A0',
|
|
564
|
+
Lavender: '#ABABD0',
|
|
565
|
+
AmberTint: '#B8B0A0',
|
|
566
|
+
PdfFill: '#C0A0A0',
|
|
567
|
+
PdfText: '#FF0000'
|
|
568
|
+
}
|
|
569
|
+
});
|
|
570
|
+
|
|
571
|
+
tmpSelf._addTheme('early-2000s',
|
|
572
|
+
{
|
|
573
|
+
Name: 'Early 2000s Web',
|
|
574
|
+
Category: 'Fun',
|
|
575
|
+
Description: 'Teal and silver, Web 2.0',
|
|
576
|
+
Variables:
|
|
577
|
+
{
|
|
578
|
+
'--retold-bg-primary': '#E8F4F8',
|
|
579
|
+
'--retold-bg-secondary': '#D0E8EE',
|
|
580
|
+
'--retold-bg-tertiary': '#C0DDE6',
|
|
581
|
+
'--retold-bg-panel': '#D8EEF2',
|
|
582
|
+
'--retold-bg-viewer': '#F0F8FA',
|
|
583
|
+
'--retold-bg-hover': '#B0D4E0',
|
|
584
|
+
'--retold-bg-selected': '#88C4D8',
|
|
585
|
+
'--retold-bg-thumb': '#D0E8EE',
|
|
586
|
+
'--retold-text-primary': '#1A3A4A',
|
|
587
|
+
'--retold-text-secondary': '#2A4A5A',
|
|
588
|
+
'--retold-text-muted': '#5A7A8A',
|
|
589
|
+
'--retold-text-dim': '#7A9AAA',
|
|
590
|
+
'--retold-text-placeholder': '#9ABACA',
|
|
591
|
+
'--retold-accent': '#0099CC',
|
|
592
|
+
'--retold-accent-hover': '#00AADD',
|
|
593
|
+
'--retold-border': '#A0C8D8',
|
|
594
|
+
'--retold-border-light': '#B8D8E4',
|
|
595
|
+
'--retold-danger': '#CC3300',
|
|
596
|
+
'--retold-danger-muted': '#994422',
|
|
597
|
+
'--retold-scrollbar': '#A0C8D8',
|
|
598
|
+
'--retold-scrollbar-hover': '#88B8CC',
|
|
599
|
+
'--retold-selection-bg': 'rgba(0, 153, 204, 0.2)',
|
|
600
|
+
'--retold-focus-outline': '#0099CC',
|
|
601
|
+
'--retold-font-family': "Verdana, Geneva, Tahoma, sans-serif",
|
|
602
|
+
'--retold-font-mono': "'Lucida Console', Monaco, monospace"
|
|
603
|
+
},
|
|
604
|
+
IconColors:
|
|
605
|
+
{
|
|
606
|
+
Primary: '#2A4A5A',
|
|
607
|
+
Accent: '#0099CC',
|
|
608
|
+
Muted: '#7A9AAA',
|
|
609
|
+
Light: '#C0DDE6',
|
|
610
|
+
WarmBeige: '#D0E8EE',
|
|
611
|
+
TealTint: '#B0D8E4',
|
|
612
|
+
Lavender: '#C8DCE6',
|
|
613
|
+
AmberTint: '#D8E0D0',
|
|
614
|
+
PdfFill: '#E0C8C0',
|
|
615
|
+
PdfText: '#CC3300'
|
|
616
|
+
}
|
|
617
|
+
});
|
|
618
|
+
|
|
619
|
+
tmpSelf._addTheme('synthwave',
|
|
620
|
+
{
|
|
621
|
+
Name: 'Synthwave',
|
|
622
|
+
Category: 'Fun',
|
|
623
|
+
Description: 'Purple and pink neon',
|
|
624
|
+
Variables:
|
|
625
|
+
{
|
|
626
|
+
'--retold-bg-primary': '#1A0A2E',
|
|
627
|
+
'--retold-bg-secondary': '#140824',
|
|
628
|
+
'--retold-bg-tertiary': '#200E38',
|
|
629
|
+
'--retold-bg-panel': '#1C0C32',
|
|
630
|
+
'--retold-bg-viewer': '#100620',
|
|
631
|
+
'--retold-bg-hover': '#2A1848',
|
|
632
|
+
'--retold-bg-selected': '#3A2060',
|
|
633
|
+
'--retold-bg-thumb': '#140824',
|
|
634
|
+
'--retold-text-primary': '#E8C0F8',
|
|
635
|
+
'--retold-text-secondary': '#D0A8E8',
|
|
636
|
+
'--retold-text-muted': '#9878B8',
|
|
637
|
+
'--retold-text-dim': '#7858A8',
|
|
638
|
+
'--retold-text-placeholder': '#584088',
|
|
639
|
+
'--retold-accent': '#FF71CE',
|
|
640
|
+
'--retold-accent-hover': '#FF99DD',
|
|
641
|
+
'--retold-border': '#302050',
|
|
642
|
+
'--retold-border-light': '#402868',
|
|
643
|
+
'--retold-danger': '#FF4488',
|
|
644
|
+
'--retold-danger-muted': '#AA3366',
|
|
645
|
+
'--retold-scrollbar': '#302050',
|
|
646
|
+
'--retold-scrollbar-hover': '#402868',
|
|
647
|
+
'--retold-selection-bg': 'rgba(255, 113, 206, 0.25)',
|
|
648
|
+
'--retold-focus-outline': '#FF71CE',
|
|
649
|
+
'--retold-font-family': "'Trebuchet MS', sans-serif",
|
|
650
|
+
'--retold-font-mono': "'Courier New', monospace"
|
|
651
|
+
},
|
|
652
|
+
IconColors:
|
|
653
|
+
{
|
|
654
|
+
Primary: '#D0A8E8',
|
|
655
|
+
Accent: '#FF71CE',
|
|
656
|
+
Muted: '#7858A8',
|
|
657
|
+
Light: '#200E38',
|
|
658
|
+
WarmBeige: '#221040',
|
|
659
|
+
TealTint: '#1A0C30',
|
|
660
|
+
Lavender: '#1E0E36',
|
|
661
|
+
AmberTint: '#241028',
|
|
662
|
+
PdfFill: '#241020',
|
|
663
|
+
PdfText: '#FF4488'
|
|
664
|
+
}
|
|
665
|
+
});
|
|
666
|
+
|
|
667
|
+
tmpSelf._addTheme('solarized-dark',
|
|
668
|
+
{
|
|
669
|
+
Name: 'Solarized Dark',
|
|
670
|
+
Category: 'Fun',
|
|
671
|
+
Description: "Schoonover's classic palette",
|
|
672
|
+
Variables:
|
|
673
|
+
{
|
|
674
|
+
'--retold-bg-primary': '#002B36',
|
|
675
|
+
'--retold-bg-secondary': '#073642',
|
|
676
|
+
'--retold-bg-tertiary': '#003B4A',
|
|
677
|
+
'--retold-bg-panel': '#00303C',
|
|
678
|
+
'--retold-bg-viewer': '#001E28',
|
|
679
|
+
'--retold-bg-hover': '#0A4858',
|
|
680
|
+
'--retold-bg-selected': '#155868',
|
|
681
|
+
'--retold-bg-thumb': '#073642',
|
|
682
|
+
'--retold-text-primary': '#FDF6E3',
|
|
683
|
+
'--retold-text-secondary': '#EEE8D5',
|
|
684
|
+
'--retold-text-muted': '#93A1A1',
|
|
685
|
+
'--retold-text-dim': '#839496',
|
|
686
|
+
'--retold-text-placeholder': '#657B83',
|
|
687
|
+
'--retold-accent': '#268BD2',
|
|
688
|
+
'--retold-accent-hover': '#45A0E0',
|
|
689
|
+
'--retold-border': '#0A4050',
|
|
690
|
+
'--retold-border-light': '#125868',
|
|
691
|
+
'--retold-danger': '#DC322F',
|
|
692
|
+
'--retold-danger-muted': '#AA2A28',
|
|
693
|
+
'--retold-scrollbar': '#0A4050',
|
|
694
|
+
'--retold-scrollbar-hover': '#125868',
|
|
695
|
+
'--retold-selection-bg': 'rgba(38, 139, 210, 0.25)',
|
|
696
|
+
'--retold-focus-outline': '#268BD2',
|
|
697
|
+
'--retold-font-family': "'Source Code Pro', 'Fira Code', monospace",
|
|
698
|
+
'--retold-font-mono': "'Source Code Pro', 'Fira Code', monospace"
|
|
699
|
+
},
|
|
700
|
+
IconColors:
|
|
701
|
+
{
|
|
702
|
+
Primary: '#EEE8D5',
|
|
703
|
+
Accent: '#268BD2',
|
|
704
|
+
Muted: '#839496',
|
|
705
|
+
Light: '#003B4A',
|
|
706
|
+
WarmBeige: '#073642',
|
|
707
|
+
TealTint: '#004050',
|
|
708
|
+
Lavender: '#003848',
|
|
709
|
+
AmberTint: '#0A3A30',
|
|
710
|
+
PdfFill: '#0A3028',
|
|
711
|
+
PdfText: '#DC322F'
|
|
712
|
+
}
|
|
713
|
+
});
|
|
714
|
+
|
|
715
|
+
tmpSelf._addTheme('forest',
|
|
716
|
+
{
|
|
717
|
+
Name: 'Forest',
|
|
718
|
+
Category: 'Fun',
|
|
719
|
+
Description: 'Deep greens and earth browns',
|
|
720
|
+
Variables:
|
|
721
|
+
{
|
|
722
|
+
'--retold-bg-primary': '#1A2018',
|
|
723
|
+
'--retold-bg-secondary': '#141A12',
|
|
724
|
+
'--retold-bg-tertiary': '#1E2620',
|
|
725
|
+
'--retold-bg-panel': '#1C221A',
|
|
726
|
+
'--retold-bg-viewer': '#101410',
|
|
727
|
+
'--retold-bg-hover': '#283828',
|
|
728
|
+
'--retold-bg-selected': '#344834',
|
|
729
|
+
'--retold-bg-thumb': '#141A12',
|
|
730
|
+
'--retold-text-primary': '#D0DCC8',
|
|
731
|
+
'--retold-text-secondary': '#B0C4A8',
|
|
732
|
+
'--retold-text-muted': '#809878',
|
|
733
|
+
'--retold-text-dim': '#607858',
|
|
734
|
+
'--retold-text-placeholder': '#486040',
|
|
735
|
+
'--retold-accent': '#6AAF5C',
|
|
736
|
+
'--retold-accent-hover': '#88CC78',
|
|
737
|
+
'--retold-border': '#2A3A28',
|
|
738
|
+
'--retold-border-light': '#3A4A38',
|
|
739
|
+
'--retold-danger': '#CC4422',
|
|
740
|
+
'--retold-danger-muted': '#884422',
|
|
741
|
+
'--retold-scrollbar': '#2A3A28',
|
|
742
|
+
'--retold-scrollbar-hover': '#3A4A38',
|
|
743
|
+
'--retold-selection-bg': 'rgba(106, 175, 92, 0.25)',
|
|
744
|
+
'--retold-focus-outline': '#6AAF5C',
|
|
745
|
+
'--retold-font-family': "'Palatino Linotype', 'Book Antiqua', Palatino, serif",
|
|
746
|
+
'--retold-font-mono': "'Courier New', monospace"
|
|
747
|
+
},
|
|
748
|
+
IconColors:
|
|
749
|
+
{
|
|
750
|
+
Primary: '#B0C4A8',
|
|
751
|
+
Accent: '#6AAF5C',
|
|
752
|
+
Muted: '#607858',
|
|
753
|
+
Light: '#1E2620',
|
|
754
|
+
WarmBeige: '#22281E',
|
|
755
|
+
TealTint: '#1A221A',
|
|
756
|
+
Lavender: '#1E2420',
|
|
757
|
+
AmberTint: '#262218',
|
|
758
|
+
PdfFill: '#261A18',
|
|
759
|
+
PdfText: '#CC4422'
|
|
760
|
+
}
|
|
761
|
+
});
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
/**
|
|
765
|
+
* Register a theme in the internal map and order list.
|
|
766
|
+
*/
|
|
767
|
+
_addTheme(pKey, pTheme)
|
|
768
|
+
{
|
|
769
|
+
this._themes[pKey] = pTheme;
|
|
770
|
+
this._themeOrder.push(pKey);
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
/**
|
|
774
|
+
* Apply a theme by key. Injects CSS variables into a dedicated <style>
|
|
775
|
+
* element and updates the icon provider colors.
|
|
776
|
+
*
|
|
777
|
+
* @param {string} pThemeName - Theme key (e.g. 'twilight', 'neo-tokyo')
|
|
778
|
+
* @returns {boolean} True if theme was applied successfully
|
|
779
|
+
*/
|
|
780
|
+
applyTheme(pThemeName)
|
|
781
|
+
{
|
|
782
|
+
let tmpTheme = this._themes[pThemeName];
|
|
783
|
+
if (!tmpTheme)
|
|
784
|
+
{
|
|
785
|
+
// Fall back to twilight if unknown theme key
|
|
786
|
+
tmpTheme = this._themes['twilight'];
|
|
787
|
+
pThemeName = 'twilight';
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
this._currentTheme = pThemeName;
|
|
791
|
+
|
|
792
|
+
// Build CSS variable block
|
|
793
|
+
let tmpCSS = ':root {\n';
|
|
794
|
+
let tmpVars = tmpTheme.Variables;
|
|
795
|
+
let tmpKeys = Object.keys(tmpVars);
|
|
796
|
+
for (let i = 0; i < tmpKeys.length; i++)
|
|
797
|
+
{
|
|
798
|
+
tmpCSS += '\t' + tmpKeys[i] + ': ' + tmpVars[tmpKeys[i]] + ';\n';
|
|
799
|
+
}
|
|
800
|
+
tmpCSS += '}\n';
|
|
801
|
+
|
|
802
|
+
// Inject into dedicated style element
|
|
803
|
+
if (typeof document !== 'undefined')
|
|
804
|
+
{
|
|
805
|
+
let tmpStyleEl = document.getElementById('retold-remote-theme');
|
|
806
|
+
if (!tmpStyleEl)
|
|
807
|
+
{
|
|
808
|
+
tmpStyleEl = document.createElement('style');
|
|
809
|
+
tmpStyleEl.id = 'retold-remote-theme';
|
|
810
|
+
document.head.appendChild(tmpStyleEl);
|
|
811
|
+
}
|
|
812
|
+
tmpStyleEl.textContent = tmpCSS;
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
// Update icon provider colors
|
|
816
|
+
let tmpIconProvider = this.pict.providers['RetoldRemote-Icons'];
|
|
817
|
+
if (tmpIconProvider && tmpTheme.IconColors)
|
|
818
|
+
{
|
|
819
|
+
tmpIconProvider.setColors(tmpTheme.IconColors);
|
|
820
|
+
}
|
|
821
|
+
|
|
822
|
+
// Update AppData
|
|
823
|
+
let tmpRemote = this.pict.AppData.RetoldRemote;
|
|
824
|
+
if (tmpRemote)
|
|
825
|
+
{
|
|
826
|
+
tmpRemote.Theme = pThemeName;
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
return true;
|
|
830
|
+
}
|
|
831
|
+
|
|
832
|
+
/**
|
|
833
|
+
* Get the ordered list of themes for building a dropdown.
|
|
834
|
+
*
|
|
835
|
+
* @returns {Array<Object>} Array of { key, name, category, description }
|
|
836
|
+
*/
|
|
837
|
+
getThemeList()
|
|
838
|
+
{
|
|
839
|
+
let tmpList = [];
|
|
840
|
+
for (let i = 0; i < this._themeOrder.length; i++)
|
|
841
|
+
{
|
|
842
|
+
let tmpKey = this._themeOrder[i];
|
|
843
|
+
let tmpTheme = this._themes[tmpKey];
|
|
844
|
+
tmpList.push(
|
|
845
|
+
{
|
|
846
|
+
key: tmpKey,
|
|
847
|
+
name: tmpTheme.Name,
|
|
848
|
+
category: tmpTheme.Category,
|
|
849
|
+
description: tmpTheme.Description
|
|
850
|
+
});
|
|
851
|
+
}
|
|
852
|
+
return tmpList;
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
/**
|
|
856
|
+
* Get the currently active theme key.
|
|
857
|
+
*
|
|
858
|
+
* @returns {string}
|
|
859
|
+
*/
|
|
860
|
+
getCurrentTheme()
|
|
861
|
+
{
|
|
862
|
+
return this._currentTheme;
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
/**
|
|
866
|
+
* Get a theme definition by key.
|
|
867
|
+
*
|
|
868
|
+
* @param {string} pThemeKey
|
|
869
|
+
* @returns {Object|null}
|
|
870
|
+
*/
|
|
871
|
+
getTheme(pThemeKey)
|
|
872
|
+
{
|
|
873
|
+
return this._themes[pThemeKey] || null;
|
|
874
|
+
}
|
|
875
|
+
}
|
|
876
|
+
|
|
877
|
+
RetoldRemoteThemeProvider.default_configuration = _ProviderConfiguration;
|
|
878
|
+
|
|
879
|
+
module.exports = RetoldRemoteThemeProvider;
|