@sentinel-nvr/web 0.21.0 → 0.22.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/README.md +4 -2
- package/dist/chunk-Z5USWUIE.js +1102 -0
- package/dist/chunk-Z5USWUIE.js.map +1 -0
- package/dist/glas/index.js +27 -755
- package/dist/glas/index.js.map +1 -1
- package/dist/ui/glas.css +379 -0
- package/dist/ui/index.js +200 -59
- package/dist/ui/index.js.map +1 -1
- package/dist/ui/locales/de.json +1 -1
- package/dist/ui/locales/es.json +1 -1
- package/dist/ui/locales/fr.json +1 -1
- package/dist/ui/locales/it.json +1 -1
- package/dist/ui/locales/pt.json +1 -1
- package/dist/ui/locales/sv.json +1 -1
- package/package.json +1 -1
- package/dist/chunk-KUDATN2V.js +0 -324
- package/dist/chunk-KUDATN2V.js.map +0 -1
package/dist/ui/index.js
CHANGED
|
@@ -42,11 +42,12 @@ import {
|
|
|
42
42
|
TOKEN_TO_VAR,
|
|
43
43
|
accentOverride,
|
|
44
44
|
applyTheme,
|
|
45
|
+
glasAccent,
|
|
45
46
|
isThemeName,
|
|
46
47
|
resolveMode,
|
|
47
48
|
resolveThemeMode,
|
|
48
49
|
watchSystemMode
|
|
49
|
-
} from "../chunk-
|
|
50
|
+
} from "../chunk-Z5USWUIE.js";
|
|
50
51
|
|
|
51
52
|
// src/ui/context.tsx
|
|
52
53
|
import { createContext, useContext } from "react";
|
|
@@ -2953,9 +2954,120 @@ function CameraPage(p) {
|
|
|
2953
2954
|
}
|
|
2954
2955
|
|
|
2955
2956
|
// src/ui/components/Appearance.tsx
|
|
2956
|
-
import { useState as
|
|
2957
|
+
import { useEffect as useEffect6, useRef as useRef6, useState as useState8 } from "react";
|
|
2957
2958
|
import { Blend, ChevronDown, Contrast, Languages, Layers, Palette, Sun } from "lucide-react";
|
|
2959
|
+
|
|
2960
|
+
// src/ui/components/GlassSegment.tsx
|
|
2961
|
+
import { useLayoutEffect as useLayoutEffect2, useRef as useRef5, useState as useState7 } from "react";
|
|
2958
2962
|
import { jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
2963
|
+
var measureCtx;
|
|
2964
|
+
function textWidth(text, font) {
|
|
2965
|
+
if (measureCtx === void 0) {
|
|
2966
|
+
try {
|
|
2967
|
+
measureCtx = document.createElement("canvas").getContext("2d");
|
|
2968
|
+
} catch {
|
|
2969
|
+
measureCtx = null;
|
|
2970
|
+
}
|
|
2971
|
+
}
|
|
2972
|
+
if (!measureCtx) return 0;
|
|
2973
|
+
measureCtx.font = font;
|
|
2974
|
+
return measureCtx.measureText(text).width;
|
|
2975
|
+
}
|
|
2976
|
+
function GlassSegment({
|
|
2977
|
+
options,
|
|
2978
|
+
value,
|
|
2979
|
+
onChange,
|
|
2980
|
+
label,
|
|
2981
|
+
className,
|
|
2982
|
+
activation = "auto"
|
|
2983
|
+
}) {
|
|
2984
|
+
const ref = useRef5(null);
|
|
2985
|
+
const [cursor, setCursor] = useState7(null);
|
|
2986
|
+
const n = options.length;
|
|
2987
|
+
const found = options.findIndex((o) => o.value === value);
|
|
2988
|
+
const index = Math.max(0, found);
|
|
2989
|
+
const stop = cursor !== null && cursor < n ? cursor : index;
|
|
2990
|
+
const labels = options.map((o) => o.label).join("\n");
|
|
2991
|
+
useLayoutEffect2(() => {
|
|
2992
|
+
const el = ref.current;
|
|
2993
|
+
if (!el || !labels.trim()) return;
|
|
2994
|
+
let alive = true;
|
|
2995
|
+
const fit = () => {
|
|
2996
|
+
el.removeAttribute("data-tight");
|
|
2997
|
+
const opts = [...el.querySelectorAll(".nvr-gl-seg__opt")];
|
|
2998
|
+
const cs = opts[0] ? getComputedStyle(opts[0]) : null;
|
|
2999
|
+
if (!opts[0] || !cs) return;
|
|
3000
|
+
const font = `600 ${cs.fontSize} ${cs.fontFamily}`;
|
|
3001
|
+
const need = Math.max(...opts.map((o) => textWidth(o.textContent ?? "", font)));
|
|
3002
|
+
const room = opts[0].offsetWidth - parseFloat(cs.paddingLeft) - parseFloat(cs.paddingRight);
|
|
3003
|
+
el.toggleAttribute("data-tight", need + 1 > room);
|
|
3004
|
+
};
|
|
3005
|
+
fit();
|
|
3006
|
+
const ro = typeof ResizeObserver === "undefined" ? null : new ResizeObserver(fit);
|
|
3007
|
+
ro?.observe(el);
|
|
3008
|
+
void document.fonts?.ready.then(() => {
|
|
3009
|
+
if (alive) fit();
|
|
3010
|
+
});
|
|
3011
|
+
return () => {
|
|
3012
|
+
alive = false;
|
|
3013
|
+
ro?.disconnect();
|
|
3014
|
+
};
|
|
3015
|
+
}, [labels]);
|
|
3016
|
+
function onKeyDown(e) {
|
|
3017
|
+
const from = activation === "manual" ? stop : found;
|
|
3018
|
+
let i = null;
|
|
3019
|
+
if (e.key === "ArrowRight" || e.key === "ArrowDown") i = from < 0 ? 0 : (from + 1) % n;
|
|
3020
|
+
else if (e.key === "ArrowLeft" || e.key === "ArrowUp") i = from < 0 ? n - 1 : (from - 1 + n) % n;
|
|
3021
|
+
else if (e.key === "Home") i = 0;
|
|
3022
|
+
else if (e.key === "End") i = n - 1;
|
|
3023
|
+
const next = i === null ? void 0 : options[i];
|
|
3024
|
+
if (i === null || !next) return;
|
|
3025
|
+
e.preventDefault();
|
|
3026
|
+
if (activation === "manual") setCursor(i);
|
|
3027
|
+
else if (next.value !== value) onChange(next.value);
|
|
3028
|
+
ref.current?.querySelectorAll(".nvr-gl-seg__opt")[i]?.focus();
|
|
3029
|
+
}
|
|
3030
|
+
function choose(o) {
|
|
3031
|
+
setCursor(null);
|
|
3032
|
+
if (o.value !== value) onChange(o.value);
|
|
3033
|
+
}
|
|
3034
|
+
return /* @__PURE__ */ jsxs10(
|
|
3035
|
+
"div",
|
|
3036
|
+
{
|
|
3037
|
+
ref,
|
|
3038
|
+
role: "radiogroup",
|
|
3039
|
+
"aria-label": label,
|
|
3040
|
+
className: className ? `nvr-gl-seg ${className}` : "nvr-gl-seg",
|
|
3041
|
+
"data-none": found < 0 ? "" : void 0,
|
|
3042
|
+
style: { "--nvr-gl-seg-n": n, "--nvr-gl-seg-i": index },
|
|
3043
|
+
onKeyDown,
|
|
3044
|
+
onBlur: (e) => {
|
|
3045
|
+
if (cursor !== null && !e.currentTarget.contains(e.relatedTarget)) setCursor(null);
|
|
3046
|
+
},
|
|
3047
|
+
children: [
|
|
3048
|
+
/* @__PURE__ */ jsx12("span", { className: "nvr-gl-seg__track", "aria-hidden": "true" }),
|
|
3049
|
+
/* @__PURE__ */ jsx12("span", { className: "nvr-gl-seg__lens", "aria-hidden": "true" }),
|
|
3050
|
+
options.map((o, i) => /* @__PURE__ */ jsx12(
|
|
3051
|
+
"button",
|
|
3052
|
+
{
|
|
3053
|
+
type: "button",
|
|
3054
|
+
role: "radio",
|
|
3055
|
+
"aria-checked": i === found,
|
|
3056
|
+
tabIndex: i === stop ? 0 : -1,
|
|
3057
|
+
className: "nvr-gl-seg__opt",
|
|
3058
|
+
"data-value": o.value,
|
|
3059
|
+
onClick: () => choose(o),
|
|
3060
|
+
children: o.label
|
|
3061
|
+
},
|
|
3062
|
+
o.value
|
|
3063
|
+
))
|
|
3064
|
+
]
|
|
3065
|
+
}
|
|
3066
|
+
);
|
|
3067
|
+
}
|
|
3068
|
+
|
|
3069
|
+
// src/ui/components/Appearance.tsx
|
|
3070
|
+
import { jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
2959
3071
|
var STYLES = ["classic", "glas"];
|
|
2960
3072
|
var STRENGTHS = ["clear", "tinted", "opaque"];
|
|
2961
3073
|
function hexHue(hex) {
|
|
@@ -2977,7 +3089,7 @@ function ThemeSwatch({
|
|
|
2977
3089
|
ariaLabel
|
|
2978
3090
|
}) {
|
|
2979
3091
|
const c = THEMES[name][previewMode];
|
|
2980
|
-
return /* @__PURE__ */
|
|
3092
|
+
return /* @__PURE__ */ jsxs11(
|
|
2981
3093
|
"button",
|
|
2982
3094
|
{
|
|
2983
3095
|
type: "button",
|
|
@@ -2986,8 +3098,8 @@ function ThemeSwatch({
|
|
|
2986
3098
|
"aria-label": ariaLabel,
|
|
2987
3099
|
"aria-pressed": active,
|
|
2988
3100
|
children: [
|
|
2989
|
-
/* @__PURE__ */
|
|
2990
|
-
/* @__PURE__ */
|
|
3101
|
+
/* @__PURE__ */ jsxs11("div", { className: "nvr-swatch__preview", style: { background: c.bg }, "aria-hidden": "true", children: [
|
|
3102
|
+
/* @__PURE__ */ jsx13(
|
|
2991
3103
|
"div",
|
|
2992
3104
|
{
|
|
2993
3105
|
style: {
|
|
@@ -3002,7 +3114,7 @@ function ThemeSwatch({
|
|
|
3002
3114
|
}
|
|
3003
3115
|
}
|
|
3004
3116
|
),
|
|
3005
|
-
/* @__PURE__ */
|
|
3117
|
+
/* @__PURE__ */ jsx13(
|
|
3006
3118
|
"div",
|
|
3007
3119
|
{
|
|
3008
3120
|
style: {
|
|
@@ -3016,7 +3128,7 @@ function ThemeSwatch({
|
|
|
3016
3128
|
}
|
|
3017
3129
|
}
|
|
3018
3130
|
),
|
|
3019
|
-
/* @__PURE__ */
|
|
3131
|
+
/* @__PURE__ */ jsx13(
|
|
3020
3132
|
"div",
|
|
3021
3133
|
{
|
|
3022
3134
|
style: {
|
|
@@ -3031,7 +3143,7 @@ function ThemeSwatch({
|
|
|
3031
3143
|
}
|
|
3032
3144
|
}
|
|
3033
3145
|
),
|
|
3034
|
-
/* @__PURE__ */
|
|
3146
|
+
/* @__PURE__ */ jsx13(
|
|
3035
3147
|
"div",
|
|
3036
3148
|
{
|
|
3037
3149
|
style: {
|
|
@@ -3047,7 +3159,7 @@ function ThemeSwatch({
|
|
|
3047
3159
|
}
|
|
3048
3160
|
)
|
|
3049
3161
|
] }),
|
|
3050
|
-
/* @__PURE__ */
|
|
3162
|
+
/* @__PURE__ */ jsx13("span", { className: "nvr-swatch__name", children: THEME_LABELS[name] })
|
|
3051
3163
|
]
|
|
3052
3164
|
}
|
|
3053
3165
|
);
|
|
@@ -3055,37 +3167,66 @@ function ThemeSwatch({
|
|
|
3055
3167
|
function AppearanceSection(p) {
|
|
3056
3168
|
const { t } = useSentinelUi();
|
|
3057
3169
|
const resolved = resolveMode(p.mode);
|
|
3058
|
-
const
|
|
3059
|
-
const
|
|
3060
|
-
const
|
|
3170
|
+
const glas = !!p.onUiStyle && p.uiStyle === "glas";
|
|
3171
|
+
const ownAccent = (name) => glas ? glasAccent(void 0, resolved).accent : THEMES[name][resolved].accent;
|
|
3172
|
+
const defaultHue = (name) => hexHue(ownAccent(name));
|
|
3173
|
+
const [localHue, setLocalHue] = useState8(p.accentHue ?? defaultHue(p.theme));
|
|
3174
|
+
const [hueForGlas, setHueForGlas] = useState8(glas);
|
|
3175
|
+
if (hueForGlas !== glas) {
|
|
3176
|
+
setHueForGlas(glas);
|
|
3177
|
+
if (p.accentHue === void 0) setLocalHue(defaultHue(p.theme));
|
|
3178
|
+
}
|
|
3179
|
+
const previewColor = p.accentHue !== void 0 ? `hsl(${p.accentHue}, 78%, ${resolved === "dark" ? 60 : 50}%)` : ownAccent(p.theme);
|
|
3061
3180
|
const modes = ["light", "dark", "auto"];
|
|
3062
|
-
const chip = (bg, fg, icon) => /* @__PURE__ */
|
|
3063
|
-
const seg = (label, values, value, key, on) =>
|
|
3181
|
+
const chip = (bg, fg, icon) => /* @__PURE__ */ jsx13("span", { className: "nvr-set__chip", style: { background: bg, color: fg }, children: icon });
|
|
3182
|
+
const seg = (label, values, value, key, on) => glas ? /* @__PURE__ */ jsx13(
|
|
3183
|
+
GlassSegment,
|
|
3184
|
+
{
|
|
3185
|
+
className: "nvr-gl-seg--settings",
|
|
3186
|
+
label,
|
|
3187
|
+
value,
|
|
3188
|
+
onChange: on,
|
|
3189
|
+
activation: "manual",
|
|
3190
|
+
options: values.map((v) => ({ value: v, label: t(`${key}.${v}`) }))
|
|
3191
|
+
}
|
|
3192
|
+
) : /* @__PURE__ */ jsx13("div", { className: "nvr-seg", role: "group", "aria-label": label, children: values.map((v) => /* @__PURE__ */ jsx13(
|
|
3064
3193
|
"button",
|
|
3065
3194
|
{
|
|
3066
3195
|
type: "button",
|
|
3067
3196
|
className: "nvr-seg__btn" + (value === v ? " nvr-seg__btn--active" : ""),
|
|
3068
3197
|
onClick: () => on(v),
|
|
3069
3198
|
"aria-pressed": value === v,
|
|
3199
|
+
"data-value": key === "nvr.settings.style" ? v : void 0,
|
|
3070
3200
|
children: t(`${key}.${v}`)
|
|
3071
3201
|
},
|
|
3072
3202
|
v
|
|
3073
3203
|
)) });
|
|
3074
|
-
const
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3204
|
+
const styleRow = useRef6(null);
|
|
3205
|
+
const refocus = useRef6(false);
|
|
3206
|
+
useEffect6(() => {
|
|
3207
|
+
if (!refocus.current) return;
|
|
3208
|
+
refocus.current = false;
|
|
3209
|
+
if (document.activeElement && document.activeElement !== document.body) return;
|
|
3210
|
+
styleRow.current?.querySelector(`[data-value="${p.uiStyle ?? "classic"}"]`)?.focus();
|
|
3211
|
+
}, [p.uiStyle]);
|
|
3212
|
+
const chooseStyle = (v) => {
|
|
3213
|
+
if (v !== (p.uiStyle ?? "classic")) refocus.current = true;
|
|
3214
|
+
p.onUiStyle?.(v);
|
|
3215
|
+
};
|
|
3216
|
+
return /* @__PURE__ */ jsxs11("section", { className: "nvr-set__section", children: [
|
|
3217
|
+
/* @__PURE__ */ jsx13("div", { className: "nvr-section__label", children: t("nvr.settings.appearance") }),
|
|
3218
|
+
/* @__PURE__ */ jsxs11("div", { className: "nvr-card nvr-set-card", children: [
|
|
3219
|
+
p.onUiStyle && /* @__PURE__ */ jsxs11("div", { ref: styleRow, className: "nvr-set__row nvr-set__row--inline", children: [
|
|
3220
|
+
/* @__PURE__ */ jsxs11("span", { className: "nvr-set__label", children: [
|
|
3221
|
+
chip("var(--accent-soft)", "var(--accent)", /* @__PURE__ */ jsx13(Layers, { size: 14, strokeWidth: 1.75 })),
|
|
3081
3222
|
t("nvr.settings.style")
|
|
3082
3223
|
] }),
|
|
3083
|
-
seg(t("nvr.settings.style.groupAria"), STYLES, p.uiStyle ?? "classic", "nvr.settings.style",
|
|
3084
|
-
/* @__PURE__ */
|
|
3224
|
+
seg(t("nvr.settings.style.groupAria"), STYLES, p.uiStyle ?? "classic", "nvr.settings.style", chooseStyle),
|
|
3225
|
+
/* @__PURE__ */ jsx13("p", { className: "nvr-set__hint", children: t("nvr.settings.style.hint") })
|
|
3085
3226
|
] }),
|
|
3086
|
-
glas && p.onGlassStrength && /* @__PURE__ */
|
|
3087
|
-
/* @__PURE__ */
|
|
3088
|
-
chip("var(--info-soft)", "var(--info)", /* @__PURE__ */
|
|
3227
|
+
glas && p.onGlassStrength && /* @__PURE__ */ jsxs11("div", { className: "nvr-set__row nvr-set__row--inline", children: [
|
|
3228
|
+
/* @__PURE__ */ jsxs11("span", { className: "nvr-set__label", children: [
|
|
3229
|
+
chip("var(--info-soft)", "var(--info)", /* @__PURE__ */ jsx13(Blend, { size: 14, strokeWidth: 1.75 })),
|
|
3089
3230
|
t("nvr.settings.glassStrength")
|
|
3090
3231
|
] }),
|
|
3091
3232
|
seg(
|
|
@@ -3096,12 +3237,12 @@ function AppearanceSection(p) {
|
|
|
3096
3237
|
p.onGlassStrength
|
|
3097
3238
|
)
|
|
3098
3239
|
] }),
|
|
3099
|
-
glas && p.onReduceTransparency && /* @__PURE__ */
|
|
3100
|
-
/* @__PURE__ */
|
|
3101
|
-
chip("var(--info-soft)", "var(--info)", /* @__PURE__ */
|
|
3240
|
+
glas && p.onReduceTransparency && /* @__PURE__ */ jsxs11("div", { className: "nvr-set__row nvr-set__row--inline", children: [
|
|
3241
|
+
/* @__PURE__ */ jsxs11("span", { className: "nvr-set__label", children: [
|
|
3242
|
+
chip("var(--info-soft)", "var(--info)", /* @__PURE__ */ jsx13(Contrast, { size: 14, strokeWidth: 1.75 })),
|
|
3102
3243
|
t("nvr.settings.reduceTransparency")
|
|
3103
3244
|
] }),
|
|
3104
|
-
/* @__PURE__ */
|
|
3245
|
+
/* @__PURE__ */ jsx13(
|
|
3105
3246
|
"button",
|
|
3106
3247
|
{
|
|
3107
3248
|
type: "button",
|
|
@@ -3110,17 +3251,17 @@ function AppearanceSection(p) {
|
|
|
3110
3251
|
"aria-label": t("nvr.settings.reduceTransparency"),
|
|
3111
3252
|
className: "nvr-switch" + (p.reduceTransparency ? " nvr-switch--on" : ""),
|
|
3112
3253
|
onClick: () => p.onReduceTransparency?.(!p.reduceTransparency),
|
|
3113
|
-
children: /* @__PURE__ */
|
|
3254
|
+
children: /* @__PURE__ */ jsx13("span", { className: "nvr-switch__thumb" })
|
|
3114
3255
|
}
|
|
3115
3256
|
),
|
|
3116
|
-
/* @__PURE__ */
|
|
3257
|
+
/* @__PURE__ */ jsx13("p", { className: "nvr-set__hint", children: t("nvr.settings.reduceTransparency.hint") })
|
|
3117
3258
|
] }),
|
|
3118
|
-
/* @__PURE__ */
|
|
3119
|
-
/* @__PURE__ */
|
|
3120
|
-
chip("var(--warning-soft)", "var(--warning)", /* @__PURE__ */
|
|
3259
|
+
/* @__PURE__ */ jsxs11("div", { className: "nvr-set__row nvr-set__row--inline", children: [
|
|
3260
|
+
/* @__PURE__ */ jsxs11("span", { className: "nvr-set__label", children: [
|
|
3261
|
+
chip("var(--warning-soft)", "var(--warning)", /* @__PURE__ */ jsx13(Sun, { size: 14, strokeWidth: 1.75 })),
|
|
3121
3262
|
t("nvr.settings.mode")
|
|
3122
3263
|
] }),
|
|
3123
|
-
/* @__PURE__ */
|
|
3264
|
+
glas ? seg(t("nvr.settings.mode"), modes, p.mode, "nvr.settings.mode", p.onMode) : /* @__PURE__ */ jsx13("div", { className: "nvr-seg", role: "group", "aria-label": t("nvr.settings.mode"), children: modes.map((m) => /* @__PURE__ */ jsx13(
|
|
3124
3265
|
"button",
|
|
3125
3266
|
{
|
|
3126
3267
|
type: "button",
|
|
@@ -3132,13 +3273,13 @@ function AppearanceSection(p) {
|
|
|
3132
3273
|
m
|
|
3133
3274
|
)) })
|
|
3134
3275
|
] }),
|
|
3135
|
-
/* @__PURE__ */
|
|
3136
|
-
/* @__PURE__ */
|
|
3137
|
-
chip("var(--accent-soft)", "var(--accent)", /* @__PURE__ */
|
|
3276
|
+
/* @__PURE__ */ jsxs11("div", { className: "nvr-set__row nvr-set__row--inline", children: [
|
|
3277
|
+
/* @__PURE__ */ jsxs11("span", { className: "nvr-set__label", children: [
|
|
3278
|
+
chip("var(--accent-soft)", "var(--accent)", /* @__PURE__ */ jsx13(Languages, { size: 14, strokeWidth: 1.75 })),
|
|
3138
3279
|
t("nvr.settings.language")
|
|
3139
3280
|
] }),
|
|
3140
|
-
/* @__PURE__ */
|
|
3141
|
-
/* @__PURE__ */
|
|
3281
|
+
/* @__PURE__ */ jsxs11("div", { className: "nvr-select", children: [
|
|
3282
|
+
/* @__PURE__ */ jsxs11(
|
|
3142
3283
|
"select",
|
|
3143
3284
|
{
|
|
3144
3285
|
className: "nvr-select__native",
|
|
@@ -3146,26 +3287,26 @@ function AppearanceSection(p) {
|
|
|
3146
3287
|
onChange: (e) => p.onLanguage(e.target.value),
|
|
3147
3288
|
"aria-label": t("nvr.settings.language"),
|
|
3148
3289
|
children: [
|
|
3149
|
-
/* @__PURE__ */
|
|
3150
|
-
p.languages.map((l) => /* @__PURE__ */
|
|
3290
|
+
/* @__PURE__ */ jsx13("option", { value: "auto", children: t("nvr.settings.language.auto") }),
|
|
3291
|
+
p.languages.map((l) => /* @__PURE__ */ jsx13("option", { value: l.id, children: l.label }, l.id))
|
|
3151
3292
|
]
|
|
3152
3293
|
}
|
|
3153
3294
|
),
|
|
3154
|
-
/* @__PURE__ */
|
|
3295
|
+
/* @__PURE__ */ jsx13(ChevronDown, { size: 14, strokeWidth: 2, className: "nvr-select__chevron", "aria-hidden": "true" })
|
|
3155
3296
|
] })
|
|
3156
3297
|
] }),
|
|
3157
|
-
glas ? /* @__PURE__ */
|
|
3158
|
-
/* @__PURE__ */
|
|
3159
|
-
chip("var(--accent-soft)", "var(--accent)", /* @__PURE__ */
|
|
3298
|
+
glas ? /* @__PURE__ */ jsxs11("div", { className: "nvr-set__row nvr-set__row--inline", children: [
|
|
3299
|
+
/* @__PURE__ */ jsxs11("span", { className: "nvr-set__label", children: [
|
|
3300
|
+
chip("var(--accent-soft)", "var(--accent)", /* @__PURE__ */ jsx13(Palette, { size: 14, strokeWidth: 1.75 })),
|
|
3160
3301
|
t("nvr.settings.theme")
|
|
3161
3302
|
] }),
|
|
3162
|
-
/* @__PURE__ */
|
|
3163
|
-
] }) : /* @__PURE__ */
|
|
3164
|
-
/* @__PURE__ */
|
|
3165
|
-
chip("var(--accent-soft)", "var(--accent)", /* @__PURE__ */
|
|
3303
|
+
/* @__PURE__ */ jsx13("p", { className: "nvr-set__hint", children: t("nvr.settings.theme.glasHint") })
|
|
3304
|
+
] }) : /* @__PURE__ */ jsxs11("div", { className: "nvr-set__row", children: [
|
|
3305
|
+
/* @__PURE__ */ jsxs11("div", { className: "nvr-set__label", children: [
|
|
3306
|
+
chip("var(--accent-soft)", "var(--accent)", /* @__PURE__ */ jsx13(Palette, { size: 14, strokeWidth: 1.75 })),
|
|
3166
3307
|
t("nvr.settings.theme")
|
|
3167
3308
|
] }),
|
|
3168
|
-
/* @__PURE__ */
|
|
3309
|
+
/* @__PURE__ */ jsx13("div", { className: "nvr-swatches", children: THEME_NAMES.map((n) => /* @__PURE__ */ jsx13(
|
|
3169
3310
|
ThemeSwatch,
|
|
3170
3311
|
{
|
|
3171
3312
|
name: n,
|
|
@@ -3180,14 +3321,14 @@ function AppearanceSection(p) {
|
|
|
3180
3321
|
n
|
|
3181
3322
|
)) })
|
|
3182
3323
|
] }),
|
|
3183
|
-
/* @__PURE__ */
|
|
3184
|
-
/* @__PURE__ */
|
|
3185
|
-
/* @__PURE__ */
|
|
3186
|
-
chip("var(--accent-soft)", "var(--accent)", /* @__PURE__ */
|
|
3324
|
+
/* @__PURE__ */ jsx13("div", { className: "nvr-set__row", children: /* @__PURE__ */ jsxs11("div", { className: "nvr-accent", children: [
|
|
3325
|
+
/* @__PURE__ */ jsxs11("div", { className: "nvr-accent__label", children: [
|
|
3326
|
+
/* @__PURE__ */ jsxs11("span", { className: "nvr-set__label", children: [
|
|
3327
|
+
chip("var(--accent-soft)", "var(--accent)", /* @__PURE__ */ jsx13(Palette, { size: 14, strokeWidth: 1.75 })),
|
|
3187
3328
|
t("nvr.settings.accent"),
|
|
3188
|
-
/* @__PURE__ */
|
|
3329
|
+
/* @__PURE__ */ jsx13("span", { className: "nvr-accent__dot", style: { background: previewColor }, "aria-hidden": "true" })
|
|
3189
3330
|
] }),
|
|
3190
|
-
p.accentHue !== void 0 && /* @__PURE__ */
|
|
3331
|
+
p.accentHue !== void 0 && /* @__PURE__ */ jsx13(
|
|
3191
3332
|
"button",
|
|
3192
3333
|
{
|
|
3193
3334
|
type: "button",
|
|
@@ -3200,7 +3341,7 @@ function AppearanceSection(p) {
|
|
|
3200
3341
|
}
|
|
3201
3342
|
)
|
|
3202
3343
|
] }),
|
|
3203
|
-
/* @__PURE__ */
|
|
3344
|
+
/* @__PURE__ */ jsx13(
|
|
3204
3345
|
"input",
|
|
3205
3346
|
{
|
|
3206
3347
|
type: "range",
|