@sentinel-nvr/web 0.1.2 → 0.2.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/dist/api/index.js +28 -240
- package/dist/api/index.js.map +1 -1
- package/dist/chunk-VHZTAIPQ.js +1897 -0
- package/dist/chunk-VHZTAIPQ.js.map +1 -0
- package/dist/chunk-VUKE4DDM.js +270 -0
- package/dist/chunk-VUKE4DDM.js.map +1 -0
- package/dist/player/index.js +7 -1888
- package/dist/player/index.js.map +1 -1
- package/dist/ui/index.d.ts +268 -0
- package/dist/ui/index.js +1110 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/ui/locales/de.json +113 -0
- package/dist/ui/locales/en.json +113 -0
- package/dist/ui/locales/es.json +113 -0
- package/dist/ui/locales/fr.json +113 -0
- package/dist/ui/locales/it.json +113 -0
- package/dist/ui/locales/pt.json +113 -0
- package/dist/ui/locales/sv.json +113 -0
- package/dist/ui/ui.css +222 -0
- package/package.json +20 -5
package/dist/ui/ui.css
ADDED
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
/* @sentinel-nvr/web/ui — component styles. Tokens only (HAPulse token names); the host applies a theme (applyTheme) or defines the --tokens itself. */
|
|
2
|
+
|
|
3
|
+
/* ---- Self-contained base classes (mirror HAPulse's .card/.nvr-btn/.nvr-section__label/.nvr-data with tokens) ---- */
|
|
4
|
+
.nvr-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-card); box-shadow: var(--shadow-card); }
|
|
5
|
+
.nvr-card--pad { padding: 1.25rem; }
|
|
6
|
+
.nvr-section__label { margin: 0; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim); }
|
|
7
|
+
.nvr-data { font-family: var(--font-data); font-variant-numeric: tabular-nums; }
|
|
8
|
+
.nvr-btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.375rem; min-height: 44px; padding: 0 1rem; border-radius: var(--radius-control); border: 1px solid transparent; font: inherit; font-weight: 600; cursor: pointer; }
|
|
9
|
+
.nvr-btn--primary { background: var(--accent); color: var(--on-accent); }
|
|
10
|
+
.nvr-btn--ghost { background: transparent; color: var(--text); border-color: var(--border); }
|
|
11
|
+
.nvr-btn:focus-visible, .nvr-input:focus-visible, .nvr-dt__d:focus-visible, .nvr-dt__nav:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
|
|
12
|
+
.nvr-input { min-height: 44px; padding: 0 0.75rem; border-radius: var(--radius-control); border: 1px solid var(--border); background: var(--bg-subtle); color: var(--text); font: inherit; }
|
|
13
|
+
.nvr-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent); }
|
|
14
|
+
.nvr-strip { list-style: none; margin: 0; padding: 0; }
|
|
15
|
+
|
|
16
|
+
/* ---- NVR-own colour tokens, mapped onto HAPulse semantics ----------------- */
|
|
17
|
+
:root {
|
|
18
|
+
--nvr-c-person: var(--info);
|
|
19
|
+
/* not var(--accent): the accent is user-controllable (accentHue) and collides
|
|
20
|
+
with --warning (package) in amber identities like sunset. A fixed warm mix
|
|
21
|
+
keeps 'car' distinct from 'package' in every identity, still theme-tuned. */
|
|
22
|
+
--nvr-c-car: color-mix(in srgb, var(--warning) 58%, var(--danger));
|
|
23
|
+
--nvr-c-bike: color-mix(in srgb, var(--info) 55%, var(--danger));
|
|
24
|
+
--nvr-c-animal: var(--positive);
|
|
25
|
+
--nvr-c-package: var(--warning);
|
|
26
|
+
--nvr-c-motion: var(--text-faint);
|
|
27
|
+
--nvr-rec: color-mix(in srgb, var(--info) 60%, var(--bg-subtle));
|
|
28
|
+
--nvr-rec-motion: var(--positive);
|
|
29
|
+
--nvr-overlay: color-mix(in srgb, var(--text) 62%, transparent);
|
|
30
|
+
--nvr-on-overlay: var(--bg-card);
|
|
31
|
+
}
|
|
32
|
+
:root[data-mode='dark'] {
|
|
33
|
+
--nvr-overlay: color-mix(in srgb, var(--bg) 70%, transparent);
|
|
34
|
+
--nvr-on-overlay: var(--text);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
/* ---- Sections ---- */
|
|
39
|
+
.nvr-section { display: flex; flex-direction: column; gap: 0.625rem; }
|
|
40
|
+
.nvr-muted { font-size: 0.875rem; color: var(--text-faint); display: inline-flex; align-items: center; gap: 0.375rem; }
|
|
41
|
+
.nvr-banner {
|
|
42
|
+
display: inline-flex; align-items: center; gap: 0.5rem; align-self: flex-start;
|
|
43
|
+
padding: 0.375rem 0.75rem; border-radius: var(--radius-pill);
|
|
44
|
+
background: var(--warning-soft); color: var(--warning); font-size: 0.8125rem; font-weight: 500;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* ---- Card scaffolding (title row with icon chip, like Energy/Pool cards) --- */
|
|
48
|
+
.nvr-card { padding: 1.25rem; display: flex; flex-direction: column; gap: 1rem; height: 100%; }
|
|
49
|
+
.nvr-ctitle { display: flex; align-items: center; gap: 0.625rem; min-width: 0; }
|
|
50
|
+
.nvr-ctitle__chip {
|
|
51
|
+
display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0;
|
|
52
|
+
background: var(--accent-soft); color: var(--accent);
|
|
53
|
+
}
|
|
54
|
+
.nvr-ctitle__chip--info { background: var(--info-soft); color: var(--info); }
|
|
55
|
+
.nvr-ctitle__chip--positive { background: var(--positive-soft); color: var(--positive); }
|
|
56
|
+
.nvr-ctitle__chip--danger { background: var(--danger-soft); color: var(--danger); }
|
|
57
|
+
.nvr-ctitle__chip--neutral { background: var(--bg-subtle); color: var(--text-dim); }
|
|
58
|
+
.nvr-ctitle__text { min-width: 0; }
|
|
59
|
+
.nvr-ctitle__title { font-family: var(--font-display); font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; color: var(--text); line-height: 1.2; }
|
|
60
|
+
.nvr-ctitle__sub { font-size: 0.8125rem; color: var(--text-dim); }
|
|
61
|
+
.nvr-ctitle__action { margin-left: auto; }
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
/* ---- Hero ---------------------------------------------------------------- */
|
|
65
|
+
.nvr-hero {
|
|
66
|
+
padding: 1.25rem; display: flex; flex-direction: column; gap: 1rem; position: relative; overflow: hidden;
|
|
67
|
+
--hero-grad: linear-gradient(135deg, color-mix(in srgb, var(--accent) 15%, transparent) 0%, transparent 55%, color-mix(in srgb, var(--accent) 15%, transparent) 100%);
|
|
68
|
+
background-image: var(--hero-grad);
|
|
69
|
+
}
|
|
70
|
+
.nvr-hero:hover { background-color: var(--bg-card-hover); background-image: var(--hero-grad); }
|
|
71
|
+
.nvr-hero__head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; }
|
|
72
|
+
.nvr-hero__primary { display: flex; flex-direction: column; gap: 0.25rem; }
|
|
73
|
+
.nvr-hero__primary-label { display: inline-flex; align-items: center; gap: 0.375rem; font-size: 0.8125rem; font-weight: 500; color: var(--text-dim); }
|
|
74
|
+
.nvr-hero__primary-value { font-size: clamp(2.25rem, 5vw, 3rem); font-weight: 700; letter-spacing: -0.04em; line-height: 1; color: var(--text); }
|
|
75
|
+
.nvr-hero__stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.625rem; }
|
|
76
|
+
|
|
77
|
+
.nvr-stat { display: flex; align-items: center; gap: 0.625rem; padding: 0.75rem; border-radius: var(--radius-control); background: var(--bg-subtle); border: 1px solid var(--line); min-width: 0; }
|
|
78
|
+
.nvr-stat__icon { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0; background: var(--bg-card); color: var(--text-dim); }
|
|
79
|
+
.nvr-stat--accent .nvr-stat__icon { background: var(--accent-soft); color: var(--accent); }
|
|
80
|
+
.nvr-stat--info .nvr-stat__icon { background: var(--info-soft); color: var(--info); }
|
|
81
|
+
.nvr-stat--positive .nvr-stat__icon { background: var(--positive-soft); color: var(--positive); }
|
|
82
|
+
.nvr-stat--danger .nvr-stat__icon { background: var(--danger-soft); color: var(--danger); }
|
|
83
|
+
.nvr-stat__body { display: flex; flex-direction: column; gap: 0.125rem; min-width: 0; }
|
|
84
|
+
.nvr-stat__label { font-size: 0.75rem; color: var(--text-faint); white-space: nowrap; }
|
|
85
|
+
.nvr-stat__value { font-size: 1.0625rem; font-weight: 600; color: var(--text); white-space: nowrap; }
|
|
86
|
+
.nvr-stat__unit { font-size: 0.8125rem; font-weight: 500; color: var(--text-dim); }
|
|
87
|
+
|
|
88
|
+
.nvr-pill { display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.25rem 0.625rem; border-radius: var(--radius-pill); font-size: 0.75rem; font-weight: 600; white-space: nowrap; }
|
|
89
|
+
.nvr-pill__dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
|
|
90
|
+
.nvr-pill--positive { background: var(--positive-soft); color: var(--positive); }
|
|
91
|
+
.nvr-pill--danger { background: var(--danger-soft); color: var(--danger); }
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
/* ---- Class badges -------------------------------------------------------- */
|
|
95
|
+
.nvr-cbadge { display: inline-grid; place-items: center; border-radius: 6px; color: var(--on-accent); flex-shrink: 0; }
|
|
96
|
+
.nvr-cbadge--person { background: var(--nvr-c-person); }
|
|
97
|
+
.nvr-cbadge--car { background: var(--nvr-c-car); }
|
|
98
|
+
.nvr-cbadge--bike { background: var(--nvr-c-bike); }
|
|
99
|
+
.nvr-cbadge--animal { background: var(--nvr-c-animal); }
|
|
100
|
+
.nvr-cbadge--package { background: var(--nvr-c-package); }
|
|
101
|
+
.nvr-cbadge--motion { background: var(--nvr-c-motion); }
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
/* ---- Events strip -------------------------------------------------------- */
|
|
105
|
+
.nvr-strip { display: flex; gap: 0.5rem; overflow-x: auto; padding-bottom: 0.375rem; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
|
|
106
|
+
.nvr-strip__item { flex: 0 0 auto; width: 107px; display: flex; flex-direction: column; align-items: center; gap: 0.3rem; background: none; border: 0; padding: 0; cursor: pointer; }
|
|
107
|
+
.nvr-strip__img { position: relative; display: block; width: 107px; height: 107px; border-radius: 12px; overflow: hidden; background: var(--bg-subtle); border: 1px solid var(--border); box-shadow: var(--shadow-card); transition: transform 160ms ease-out; }
|
|
108
|
+
.nvr-strip__item:hover .nvr-strip__img { transform: translateY(-1px); }
|
|
109
|
+
.nvr-strip__item:active .nvr-strip__img { transform: scale(0.98); }
|
|
110
|
+
.nvr-strip__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
|
|
111
|
+
.nvr-strip__badges { position: absolute; top: 6px; left: 6px; display: flex; gap: 3px; }
|
|
112
|
+
.nvr-strip__time { font-size: 0.7rem; color: var(--text-faint); }
|
|
113
|
+
@media (max-width: 899px) { .nvr-strip__item, .nvr-strip__img { width: 96px; } .nvr-strip__img { height: 96px; } }
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
/* ---- Camera grid --------------------------------------------------------- */
|
|
117
|
+
.nvr-camgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 0.875rem; }
|
|
118
|
+
.nvr-camtile { position: relative; aspect-ratio: 16 / 9; padding: 0; overflow: hidden; background: var(--bg-subtle); border: 1px solid var(--border); box-shadow: var(--shadow-card); cursor: pointer; text-align: left; }
|
|
119
|
+
.nvr-camtile:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
|
|
120
|
+
.nvr-camtile__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
|
|
121
|
+
.nvr-camtile__placeholder { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--text-faint); }
|
|
122
|
+
.nvr-camtile__name {
|
|
123
|
+
position: absolute; top: 10px; right: 12px; display: flex; align-items: center; gap: 6px; max-width: calc(100% - 24px);
|
|
124
|
+
padding: 0.25rem 0.625rem; border-radius: var(--radius-pill); background: var(--nvr-overlay); color: var(--nvr-on-overlay);
|
|
125
|
+
backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
|
|
126
|
+
font-weight: 700; font-size: 0.75rem; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
|
|
127
|
+
}
|
|
128
|
+
.nvr-camtile__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); flex-shrink: 0; box-shadow: 0 0 0 2px color-mix(in srgb, var(--danger) 30%, transparent); }
|
|
129
|
+
.nvr-camtile__dot--off { background: var(--text-faint); box-shadow: none; }
|
|
130
|
+
.nvr-camtile__offline { position: absolute; top: 10px; left: 12px; display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.2rem 0.5rem; border-radius: 6px; background: var(--danger); color: var(--on-accent); font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
|
|
131
|
+
.nvr-camtile__meta { position: absolute; left: 12px; bottom: 10px; padding: 0.2rem 0.5rem; border-radius: 6px; background: var(--nvr-overlay); color: var(--nvr-on-overlay); font-size: 0.72rem; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
|
|
132
|
+
@media (max-width: 899px) { .nvr-camgrid { grid-template-columns: 1fr; } }
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
/* ---- Histogram + storage cards ------------------------------------------- */
|
|
136
|
+
.nvr-chart { display: flex; align-items: flex-end; gap: 2px; height: 150px; flex: none; }
|
|
137
|
+
.nvr-chart__col { flex: 1; height: 100%; display: flex; align-items: flex-end; min-width: 0; border-radius: 3px; }
|
|
138
|
+
.nvr-chart__col--now { background: var(--accent-soft); }
|
|
139
|
+
.nvr-chart__bar { width: 100%; min-height: 2px; border-radius: 3px 3px 0 0; background: var(--accent); transition: height 300ms ease-out; }
|
|
140
|
+
.nvr-chart__axis { display: flex; justify-content: space-between; font-size: 0.7rem; color: var(--text-faint); }
|
|
141
|
+
|
|
142
|
+
.nvr-meter { position: relative; height: 12px; border-radius: var(--radius-pill); background: var(--bg-subtle); border: 1px solid var(--line); overflow: hidden; }
|
|
143
|
+
.nvr-meter > span { position: absolute; top: 0; bottom: 0; }
|
|
144
|
+
.nvr-meter__rec { left: 0; background: var(--accent); }
|
|
145
|
+
.nvr-meter__other { background: var(--text-faint); }
|
|
146
|
+
.nvr-meter__reserve { right: 0; background: repeating-linear-gradient(135deg, transparent 0 4px, color-mix(in srgb, var(--text-faint) 45%, transparent) 4px 6px); }
|
|
147
|
+
.nvr-legend { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; font-size: 0.75rem; color: var(--text-dim); }
|
|
148
|
+
.nvr-legend > span { display: inline-flex; align-items: center; gap: 0.375rem; }
|
|
149
|
+
.nvr-legend__sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
|
|
150
|
+
.nvr-legend__sw--rec { background: var(--accent); }
|
|
151
|
+
.nvr-legend__sw--other { background: var(--text-faint); }
|
|
152
|
+
.nvr-legend__sw--free { background: var(--bg-subtle); border: 1px solid var(--border); }
|
|
153
|
+
.nvr-legend__sw--reserve { background: repeating-linear-gradient(135deg, transparent 0 2px, color-mix(in srgb, var(--text-faint) 60%, transparent) 2px 3px); border: 1px solid var(--border); }
|
|
154
|
+
.nvr-kv { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
|
|
155
|
+
.nvr-kv li { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; font-size: 0.875rem; }
|
|
156
|
+
.nvr-kv li > span { color: var(--text-dim); }
|
|
157
|
+
.nvr-kv li > b { font-weight: 600; color: var(--text); text-align: right; }
|
|
158
|
+
.nvr-kv em { font-style: normal; font-weight: 500; color: var(--text-dim); }
|
|
159
|
+
.nvr-note { font-size: 0.8125rem; line-height: 1.45; color: var(--text-dim); padding: 0.625rem 0.75rem; border-radius: var(--radius-control); background: var(--bg-subtle); }
|
|
160
|
+
.nvr-note--warn { background: var(--warning-soft); color: var(--warning); }
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
/* ---- Vertical timeline (Sentinel class names, scoped) --------------------- */
|
|
164
|
+
.nvr-vtl { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
|
|
165
|
+
.nvr-vtl .vtl-zoom { position: absolute; right: 8px; bottom: 10px; display: flex; flex-direction: column; gap: 4px; z-index: 3; }
|
|
166
|
+
.nvr-vtl .tool { width: 28px; height: 28px; border-radius: 8px; background: var(--bg-card); border: 1px solid var(--border); color: var(--text-dim); font-size: 1rem; box-shadow: var(--shadow-card); cursor: pointer; }
|
|
167
|
+
.nvr-vtl .vtl-scroll { flex: 1; overflow-y: auto; position: relative; scrollbar-width: none; overscroll-behavior: contain; }
|
|
168
|
+
.nvr-vtl .vtl-scroll::-webkit-scrollbar { display: none; }
|
|
169
|
+
.nvr-vtl .vtl-content { position: relative; }
|
|
170
|
+
.nvr-vtl .vtl-daybg { position: absolute; left: 74px; width: 22px; background: var(--bg-subtle); border-radius: 11px; }
|
|
171
|
+
.nvr-vtl .vaxis { position: absolute; left: 0; width: 60px; text-align: right; color: var(--text-faint); font-size: 0.66rem; transform: translateY(-50%); }
|
|
172
|
+
.nvr-vtl .vday { position: absolute; left: 0; right: 0; height: 1px; background: var(--border); }
|
|
173
|
+
.nvr-vtl .vday span { position: absolute; left: 4px; top: -9px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; font-size: 0.62rem; color: var(--text-dim); white-space: nowrap; }
|
|
174
|
+
.nvr-vtl .vseg { position: absolute; left: 74px; width: 22px; background: var(--nvr-rec); border-radius: 6px; min-height: 2px; }
|
|
175
|
+
.nvr-vtl .vmot { position: absolute; left: 101px; width: 4px; background: color-mix(in srgb, var(--nvr-rec-motion) 80%, transparent); border-radius: 2px; pointer-events: none; }
|
|
176
|
+
.nvr-vtl .vev { position: absolute; left: 70px; width: 30px; height: 9px; border: 0; border-radius: 5px; transform: translateY(-50%); box-shadow: 0 0 0 2px var(--bg-card); cursor: pointer; padding: 0; }
|
|
177
|
+
.nvr-vtl .vev--minor { width: 6px; left: 82px; height: 6px; border-radius: 3px; box-shadow: none; opacity: 0.85; }
|
|
178
|
+
.nvr-vtl .vthumb { position: absolute; right: 8px; transform: translateY(-50%); width: 137px; height: 77px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: var(--bg-subtle); box-shadow: var(--shadow-card); padding: 0; cursor: pointer; }
|
|
179
|
+
.nvr-vtl .vthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
|
|
180
|
+
.nvr-vtl .vthumb .tt { position: absolute; right: 5px; bottom: 3px; font-size: 0.62rem; padding: 1px 4px; border-radius: 4px; background: var(--nvr-overlay); color: var(--nvr-on-overlay); }
|
|
181
|
+
.nvr-vtl .vlive-line { position: absolute; left: 74px; right: 0; height: 2px; background: var(--danger); }
|
|
182
|
+
.nvr-vtl .vlive-chip { position: absolute; left: 66px; transform: translateY(-50%); border: 0; background: var(--danger); color: var(--on-accent); font-size: 0.6rem; font-weight: 700; letter-spacing: 0.08em; padding: 2px 6px; border-radius: 6px; z-index: 2; cursor: pointer; }
|
|
183
|
+
.nvr-vtl .vcenter { position: absolute; left: 0; right: 0; top: 35%; height: 2px; background: var(--accent); pointer-events: none; box-shadow: 0 0 10px var(--accent-soft); }
|
|
184
|
+
.nvr-vtl .vcenter-t { position: absolute; right: 8px; top: -14px; background: var(--bg-card); border: 1px solid var(--accent); border-radius: 8px; padding: 2px 8px; font-size: 0.74rem; color: var(--text); white-space: nowrap; }
|
|
185
|
+
.nvr-vtl .livejump { position: absolute; bottom: 52px; left: 10px; background: var(--bg-card); border: 1px solid var(--border); color: var(--danger); font-weight: 700; font-size: 0.74rem; letter-spacing: 0.04em; padding: 6px 14px; border-radius: var(--radius-pill); box-shadow: var(--shadow-elevated); z-index: 4; cursor: pointer; }
|
|
186
|
+
.nvr-vtl .vtick { position: absolute; right: calc(100% - 73px); width: 3px; height: 1px; background: color-mix(in srgb, var(--text-faint) 70%, transparent); pointer-events: none; }
|
|
187
|
+
.nvr-vtl .vtick--m { width: 5px; background: color-mix(in srgb, var(--text-faint) 85%, transparent); }
|
|
188
|
+
.nvr-vtl .vtick--l { width: 8px; background: var(--text-dim); }
|
|
189
|
+
.nvr-vtl .vlink { position: absolute; left: 104px; right: 150px; height: 1px; display: flex; align-items: center; gap: 6px; pointer-events: none; }
|
|
190
|
+
.nvr-vtl .vlink-badges { display: flex; gap: 3px; }
|
|
191
|
+
.nvr-vtl .vlink i { flex: 1; height: 1px; background: var(--border); }
|
|
192
|
+
@media (max-width: 899px) {
|
|
193
|
+
.nvr-vtl .vthumb { width: 112px; height: 63px; }
|
|
194
|
+
.nvr-vtl .vtl-daybg, .nvr-vtl .vseg { left: 62px; width: 18px; }
|
|
195
|
+
.nvr-vtl .vmot { left: 85px; }
|
|
196
|
+
.nvr-vtl .vev { left: 58px; width: 26px; }
|
|
197
|
+
.nvr-vtl .vev--minor { left: 68px; width: 6px; }
|
|
198
|
+
.nvr-vtl .vaxis { width: 48px; }
|
|
199
|
+
.nvr-vtl .vtick { right: calc(100% - 61px); }
|
|
200
|
+
.nvr-vtl .vlink { left: 90px; right: 126px; }
|
|
201
|
+
.nvr-vtl .vlive-line { left: 62px; }
|
|
202
|
+
.nvr-vtl .vlive-chip { left: 60px; }
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
/* ---- Date picker (inside the Modal primitive) ---------------------------- */
|
|
207
|
+
.nvr-dt__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.75rem; }
|
|
208
|
+
.nvr-dt__nav { width: 34px; height: 34px; border: 0; border-radius: 10px; background: var(--bg-subtle); color: var(--text-dim); display: grid; place-items: center; cursor: pointer; }
|
|
209
|
+
.nvr-dt__nav:hover { color: var(--text); }
|
|
210
|
+
.nvr-dt__month { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; color: var(--text); }
|
|
211
|
+
.nvr-dt__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
|
|
212
|
+
.nvr-dt__wd { text-align: center; font-size: 0.68rem; color: var(--text-faint); padding: 4px 0; text-transform: uppercase; letter-spacing: 0.06em; }
|
|
213
|
+
.nvr-dt__d { height: 38px; border: 0; border-radius: 9px; background: none; font-size: 0.875rem; color: var(--text); cursor: pointer; }
|
|
214
|
+
.nvr-dt__d:hover:not(:disabled) { background: var(--bg-subtle); }
|
|
215
|
+
.nvr-dt__d--dim { visibility: hidden; }
|
|
216
|
+
.nvr-dt__d--off { color: var(--text-faint); cursor: default; }
|
|
217
|
+
.nvr-dt__d--today { box-shadow: inset 0 0 0 1px var(--accent); }
|
|
218
|
+
.nvr-dt__d--sel { background: var(--accent); color: var(--on-accent); }
|
|
219
|
+
.nvr-dt__foot { display: flex; align-items: center; gap: 0.5rem; }
|
|
220
|
+
.nvr-dt__time { flex: 1; min-height: 40px; padding: 0.375rem 0.625rem; }
|
|
221
|
+
.nvr-dt__foot .nvr-btn { min-height: 40px; padding: 0.5rem 0.875rem; }
|
|
222
|
+
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentinel-nvr/web",
|
|
3
|
-
"version": "0.1
|
|
4
|
-
"description": "Shared browser code for the Sentinel NVR plugin for Scrypted: API model + client (/api), player (/player) and React UI (/ui
|
|
3
|
+
"version": "0.2.1",
|
|
4
|
+
"description": "Shared browser code for the Sentinel NVR plugin for Scrypted: API model + client (/api), player (/player) and React UI with i18n + themes (/ui). Consumed by the plugin's own web UI and the HAPulse dashboard.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Muggedadscher",
|
|
7
7
|
"repository": {
|
|
@@ -23,13 +23,20 @@
|
|
|
23
23
|
"types": "./dist/player/index.d.ts",
|
|
24
24
|
"import": "./dist/player/index.js",
|
|
25
25
|
"default": "./dist/player/index.js"
|
|
26
|
-
}
|
|
26
|
+
},
|
|
27
|
+
"./ui": {
|
|
28
|
+
"types": "./dist/ui/index.d.ts",
|
|
29
|
+
"import": "./dist/ui/index.js",
|
|
30
|
+
"default": "./dist/ui/index.js"
|
|
31
|
+
},
|
|
32
|
+
"./ui/ui.css": "./dist/ui/ui.css",
|
|
33
|
+
"./ui/locales/*": "./dist/ui/locales/*"
|
|
27
34
|
},
|
|
28
35
|
"engines": {
|
|
29
36
|
"node": ">=20"
|
|
30
37
|
},
|
|
31
38
|
"scripts": {
|
|
32
|
-
"build": "tsup",
|
|
39
|
+
"build": "tsup && mkdir -p dist/ui && cp src/ui/ui.css dist/ui/ui.css && cp -r src/ui/locales dist/ui/locales",
|
|
33
40
|
"typecheck": "tsc --noEmit",
|
|
34
41
|
"test": "vitest run",
|
|
35
42
|
"release": "npm run build && changeset publish"
|
|
@@ -38,6 +45,14 @@
|
|
|
38
45
|
"@changesets/cli": "^2.27.0",
|
|
39
46
|
"tsup": "^8.3.0",
|
|
40
47
|
"typescript": "^5.7.0",
|
|
41
|
-
"vitest": "^2.1.9"
|
|
48
|
+
"vitest": "^2.1.9",
|
|
49
|
+
"@types/react": "^19.0.0",
|
|
50
|
+
"lucide-react": "^0.469.0",
|
|
51
|
+
"react": "^19.0.0",
|
|
52
|
+
"react-dom": "^19.0.0"
|
|
53
|
+
},
|
|
54
|
+
"peerDependencies": {
|
|
55
|
+
"lucide-react": ">=0.400.0",
|
|
56
|
+
"react": ">=18"
|
|
42
57
|
}
|
|
43
58
|
}
|