@sentinel-nvr/web 0.18.0 → 0.19.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 CHANGED
@@ -39,6 +39,7 @@ on older servers, but only get their full behaviour with the matching plugin ver
39
39
  | 0.16.x | any (spans: ≥ 1.3.0) | events as time spans: bar from first sighting to last movement on the timeline, running events pulse, duration/„running“ in the list (`endTs`/`open`); older servers show plain markers. 0.16.5: storage values in the UI language, today refresh during playback — client only. 0.16.7: overlapping timeline markers grouped with a count, a tap zooms in — client only. 0.16.8: the events tab counts the centred day — client only. 0.16.9: "yesterday" in front of the time in the overview events strip — client only. 0.16.10: "recording stalled" on tiles and in the status pill (`stalled` from plugin ≥ 2026-10-05; older servers: no change). 0.16.11: `header`/`externalUrl` may take the playback position — client only. |
40
40
  | 0.17.x | plugin with `features: ["export"]` (older plugins: no clip button, everything else as 0.16.x) | clip download on the camera page: "Download clip" in the info bar and per event in the list, range as a band on the timeline, edges set over the playhead line, `api/export` → `api/export-status` → `api/export-file` (save, or share up to 100 MB); `SentinelClient.startExport/exportStatus/exportFileUrl/cancelExport`, `SentinelHttpError.code`. |
41
41
  | 0.18.x | any | opt-in immersive camera page: `CameraPage appearance="immersive"` (`data-nvr-appearance` on the page) — picture edge to edge with the header over it on phones, floating controls, tabs as a segment, styled by the host through `--nvr-ctl-*`, `--nvr-float-*`, `--nvr-seg-*`, `--nvr-live-*`, `--nvr-shade-top`/`-bottom`, `--nvr-ease`/`--nvr-dur`; `header(at, { live })`, `CameraTitle` `live`/`at` (LIVE badge or the picture's time). Without the prop the page is unchanged. Client only. |
42
+ | 0.19.x | any (clip download: as 0.17.x) | immersive clip mode (`CameraPage appearance="immersive"`): the clip bar as a floating card with the edges as a segment, the picture edge to edge on phones; the clip bar's close button never wraps (both appearances); optional `icon` in front of the `EventsStrip` / `CameraGrid` titles. Client only. |
42
43
 
43
44
  Lab note: Scrypted's WebRTC sink re-encodes (1280 px, 15 fps) for clients that are not Windows/macOS/iOS and report a
44
45
  screen below 1920 physical pixels, unless the source declares a width ≤ 1280. Plugin ≥ 1.2.0 declares it for recorded
@@ -77,7 +78,10 @@ The server keeps its own types; `docs/API.md` in the plugin repository is the co
77
78
  controls); the lens' motion `--nvr-ease`, `--nvr-dur` (with reduced motion the chosen tab's fill fades over in 200
78
79
  ms instead). The name and time in the header lie on the top gradient, which is dark in every theme: without
79
80
  `--nvr-ctl-fg` they are white. `header` as a function gets `(at, { live })`; pass both to `CameraTitle` (`live`, `at`) for the LIVE
80
- badge or the picture's time next to the name.
81
+ badge or the picture's time next to the name. Clip mode (0.19.0): the clip bar floats as a card on the date chip's
82
+ surface hooks (`--nvr-float-bg`, `-filter`, `-shadow`, `-rim`; its text stays in `--text`/`--text-dim`, so that
83
+ surface must carry them), its edges are a segment with the `--nvr-seg-*` hooks (`.nvr-clipbar__edges[data-edge]`,
84
+ `data-was` = the edge before).
81
85
 
82
86
  ## Develop
83
87
 
@@ -162,8 +162,10 @@ declare function EventBadges({ ev, size, t }: {
162
162
  t: TFn;
163
163
  }): react.JSX.Element;
164
164
 
165
- declare function EventsStrip({ events }: {
165
+ /** `icon`: a symbol in front of the title (a host's look; without it the markup is that of 0.18.0). */
166
+ declare function EventsStrip({ events, icon }: {
166
167
  events: SentinelRecentEvent[];
168
+ icon?: ReactNode;
167
169
  }): react.JSX.Element | null;
168
170
 
169
171
  /** Tile snapshot width: a tile is ~300–450 CSS px wide; the 5-MP original (~400 KB every 5 s per camera) only cost the
@@ -174,8 +176,10 @@ declare function tileSnapshotWidth(): number;
174
176
  declare function CameraTiles({ cameras }: {
175
177
  cameras: SentinelCamera[];
176
178
  }): react.JSX.Element;
177
- declare function CameraGrid({ cameras }: {
179
+ /** `icon`: a symbol in front of the title (a host's look; without it the markup is that of 0.18.0). */
180
+ declare function CameraGrid({ cameras, icon }: {
178
181
  cameras: SentinelCamera[];
182
+ icon?: ReactNode;
179
183
  }): react.JSX.Element;
180
184
 
181
185
  /**
package/dist/ui/index.js CHANGED
@@ -468,12 +468,15 @@ function EventBadges({ ev, size, t }) {
468
468
 
469
469
  // src/ui/components/EventsStrip.tsx
470
470
  import { Fragment as Fragment2, jsx as jsx3, jsxs } from "react/jsx-runtime";
471
- function EventsStrip({ events }) {
471
+ function EventsStrip({ events, icon }) {
472
472
  const { client, t, locale, nav } = useSentinelUi();
473
473
  if (!events.length) return null;
474
474
  const now = Date.now();
475
475
  return /* @__PURE__ */ jsxs("section", { className: "nvr-section", children: [
476
- /* @__PURE__ */ jsx3("h2", { className: "nvr-section__label", children: t("nvr.events.title") }),
476
+ /* @__PURE__ */ jsxs("h2", { className: "nvr-section__label", children: [
477
+ icon && /* @__PURE__ */ jsx3("span", { className: "nvr-section__icon", "aria-hidden": "true", children: icon }),
478
+ t("nvr.events.title")
479
+ ] }),
477
480
  /* @__PURE__ */ jsx3("ul", { className: "nvr-strip", children: events.map((e) => {
478
481
  const day = fmtDayPrefix(e.ts, locale, now);
479
482
  const time = fmtTime(e.ts, locale);
@@ -600,10 +603,13 @@ function CameraTiles({ cameras }) {
600
603
  if (cameras.length === 0) return /* @__PURE__ */ jsx4("p", { className: "nvr-muted", children: t("nvr.cameras.none") });
601
604
  return /* @__PURE__ */ jsx4("div", { className: "nvr-camgrid", children: cameras.map((c) => /* @__PURE__ */ jsx4(CameraTile, { cam: c, tick, n }, c.id)) });
602
605
  }
603
- function CameraGrid({ cameras }) {
606
+ function CameraGrid({ cameras, icon }) {
604
607
  const { t } = useSentinelUi();
605
608
  return /* @__PURE__ */ jsxs2("section", { className: "nvr-section", children: [
606
- /* @__PURE__ */ jsx4("h2", { className: "nvr-section__label", children: t("nvr.cameras.title") }),
609
+ /* @__PURE__ */ jsxs2("h2", { className: "nvr-section__label", children: [
610
+ icon && /* @__PURE__ */ jsx4("span", { className: "nvr-section__icon", "aria-hidden": "true", children: icon }),
611
+ t("nvr.cameras.title")
612
+ ] }),
607
613
  /* @__PURE__ */ jsx4(CameraTiles, { cameras })
608
614
  ] });
609
615
  }
@@ -1710,6 +1716,8 @@ function viewerTz() {
1710
1716
  function ClipBar(p) {
1711
1717
  const { client, t, locale } = useSentinelUi();
1712
1718
  const [job, setJobState] = useState4({ s: "idle" });
1719
+ const [edges, setEdges] = useState4({ cur: p.edge, was: null });
1720
+ if (edges.cur !== p.edge) setEdges({ cur: p.edge, was: edges.cur });
1713
1721
  const jobRef = useRef2(job);
1714
1722
  const setJob = useCallback((j) => {
1715
1723
  jobRef.current = j;
@@ -2061,8 +2069,13 @@ function ClipBar(p) {
2061
2069
  }
2062
2070
  return /* @__PURE__ */ jsxs7("div", { className: "nvr-clipbar", role: "group", "aria-label": t("nvr.clip.download"), children: [
2063
2071
  /* @__PURE__ */ jsxs7("div", { className: "nvr-clipbar__row", children: [
2064
- chip("from"),
2065
- chip("to"),
2072
+ p.immersive ? /* @__PURE__ */ jsxs7("div", { className: "nvr-clipbar__edges", "data-edge": p.edge ?? void 0, "data-was": edges.was ?? void 0, children: [
2073
+ chip("from"),
2074
+ chip("to")
2075
+ ] }) : /* @__PURE__ */ jsxs7(Fragment7, { children: [
2076
+ chip("from"),
2077
+ chip("to")
2078
+ ] }),
2066
2079
  /* @__PURE__ */ jsx9(
2067
2080
  "button",
2068
2081
  {
@@ -2776,7 +2789,8 @@ function CameraPage(p) {
2776
2789
  edge: clipEdge,
2777
2790
  clips: merged.clips,
2778
2791
  onEdge: activateEdge,
2779
- onClose: closeClip
2792
+ onClose: closeClip,
2793
+ immersive
2780
2794
  },
2781
2795
  camId
2782
2796
  ),