@hoardodile/workbench 0.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 +18 -0
- package/README.md +108 -0
- package/dist/assets/index-DuswH1zS.css +2 -0
- package/dist/assets/index-Rg27XFd4.js +77 -0
- package/dist/index.html +50 -0
- package/dist/mounts.mjs +730 -0
- package/dist/serve.d.mts +156 -0
- package/dist/serve.mjs +139 -0
- package/package.json +65 -0
package/dist/index.html
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<meta name="color-scheme" content="light dark" />
|
|
7
|
+
<title>hoardodile plugin workbench</title>
|
|
8
|
+
<script>
|
|
9
|
+
// Pre-hydration: apply the persisted config so the first frame is
|
|
10
|
+
// already themed (same dialect as apps/web/index.html's inline
|
|
11
|
+
// script; the workbench uses its own storage key). The values are
|
|
12
|
+
// mirror-checked by src/config.test.ts against the app defaults.
|
|
13
|
+
;(() => {
|
|
14
|
+
try {
|
|
15
|
+
const raw = localStorage.getItem("hoardodile.workbench.config")
|
|
16
|
+
const config = raw === null ? {} : JSON.parse(raw)
|
|
17
|
+
const root = document.documentElement
|
|
18
|
+
const mode = config.themeMode === "light" || config.themeMode === "dark"
|
|
19
|
+
? config.themeMode
|
|
20
|
+
: "system"
|
|
21
|
+
const resolved = mode === "system"
|
|
22
|
+
? (window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light")
|
|
23
|
+
: mode
|
|
24
|
+
root.classList.add(resolved)
|
|
25
|
+
if (
|
|
26
|
+
config.palette !== undefined &&
|
|
27
|
+
config.palette !== null &&
|
|
28
|
+
config.palette !== "mono"
|
|
29
|
+
) {
|
|
30
|
+
root.classList.add(`theme-${config.palette}`)
|
|
31
|
+
}
|
|
32
|
+
const iconStyle = config.iconStyle
|
|
33
|
+
if (iconStyle === "grayscale" || iconStyle === "linear") {
|
|
34
|
+
root.dataset.iconStyle = iconStyle
|
|
35
|
+
}
|
|
36
|
+
root.style.colorScheme = resolved
|
|
37
|
+
// Hold the mono canvas tone until theme.css arrives.
|
|
38
|
+
root.style.backgroundColor = resolved === "dark" ? "oklch(0.12 0 0)" : "#fbfbfb"
|
|
39
|
+
} catch (_err) {
|
|
40
|
+
// Corrupt config: leave the defaults; the workbench will repersist.
|
|
41
|
+
}
|
|
42
|
+
})()
|
|
43
|
+
</script>
|
|
44
|
+
<script type="module" crossorigin src="/assets/index-Rg27XFd4.js"></script>
|
|
45
|
+
<link rel="stylesheet" crossorigin href="/assets/index-DuswH1zS.css">
|
|
46
|
+
</head>
|
|
47
|
+
<body>
|
|
48
|
+
<div id="root"></div>
|
|
49
|
+
</body>
|
|
50
|
+
</html>
|