@camstack/addon-benchmark 1.2.138 → 1.2.140

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.
Files changed (17) hide show
  1. package/dist/{MotionZonesSettings-CuG9Yw7l.mjs → MotionZonesSettings-j0THd_Ad.mjs} +55 -55
  2. package/dist/{PrivacyMaskSettings-Buml7wCQ.mjs → PrivacyMaskSettings-CrRAoTVY.mjs} +6 -6
  3. package/dist/{SceneMonitorEditor-Bt0oYeDj.mjs → SceneMonitorEditor-C6j9Fu47.mjs} +67 -67
  4. package/dist/_stub.js +4868 -5106
  5. package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_benchmark_page-CjdPkJum.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_benchmark_page-DeiZdla6.mjs} +3 -3
  6. package/dist/_virtual_mf___mfe_internal__addon_benchmark_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-9l4Xs4gS.mjs +26 -0
  7. package/dist/{grid-2x2-BGWnXcvA.mjs → grid-2x2-BLrTmaY1.mjs} +1 -1
  8. package/dist/{hostInit-S2Q2WTzQ.mjs → hostInit-BFhy2HV1.mjs} +2 -2
  9. package/dist/{player-overlays-BPFzEQbY.mjs → player-overlays-CR2lsh-A.mjs} +4 -4
  10. package/dist/remoteEntry.js +1 -1
  11. package/dist/{cap-error-B24Pd7A2.mjs → responsive-Y7J7gtG7.mjs} +8 -8
  12. package/dist/{scene-monitor-copy-DLiy0Kxq.mjs → scene-monitor-copy-CQCHYNUK.mjs} +1 -1
  13. package/dist/{square-CPjxgFY6.mjs → square-4JrrEHjL.mjs} +1 -1
  14. package/dist/{trash-2-CL-eG6C9.mjs → trash-2-BEMwnuoe.mjs} +1 -1
  15. package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_benchmark_page__remoteEntry_js-Bv9WF7Dh.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_benchmark_page__remoteEntry_js-DPVPT6jA.mjs} +1 -1
  16. package/package.json +1 -1
  17. package/dist/_virtual_mf___mfe_internal__addon_benchmark_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-B4qL-lZ0.mjs +0 -26
@@ -1,22 +1,22 @@
1
1
  import { c as e, g as t, h as n, p as r, u as i, x as a } from "./_virtual_mf___mfe_internal__addon_benchmark_page__loadShare__react__loadShare__.js-GeuxDuzQ.mjs";
2
- import { o, s, t as ee, u as te } from "./cap-error-B24Pd7A2.mjs";
3
- import { i as c, t as l } from "./player-overlays-BPFzEQbY.mjs";
4
- import { t as ne } from "./grid-2x2-BGWnXcvA.mjs";
5
- import { n as u, r as d, t as f } from "./_virtual_mf___mfe_internal__addon_benchmark_page__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-SOU_VnTj.mjs";
6
- import { MaskShapeCanvas as p } from "./MaskShapeCanvas-BDvrLf-K.mjs";
2
+ import { n as o, o as s, r as c, t as l } from "./responsive-Y7J7gtG7.mjs";
3
+ import { i as u, t as ee } from "./player-overlays-CR2lsh-A.mjs";
4
+ import { t as d } from "./grid-2x2-BLrTmaY1.mjs";
5
+ import { n as f, r as p, t as m } from "./_virtual_mf___mfe_internal__addon_benchmark_page__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-SOU_VnTj.mjs";
6
+ import { MaskShapeCanvas as h } from "./MaskShapeCanvas-BDvrLf-K.mjs";
7
7
  //#region ../ui-library/src/composites/cap-settings/MotionZonesSettings.tsx
8
8
  a();
9
- var m = 110, h = "motion-zones", g = 0, _ = [
9
+ var g = 110, te = "motion-zones", _ = 0, v = [
10
10
  1,
11
11
  2,
12
12
  3
13
- ], v = 1, y = "rounded-md border border-border bg-surface px-2 py-1 text-[11px] font-medium text-foreground-subtle hover:bg-surface-hover disabled:opacity-40 transition-colors", b = "rounded-md border border-primary/50 bg-primary/15 px-2.5 py-1 text-[11px] font-medium text-primary hover:bg-primary/25 disabled:opacity-40 transition-colors";
14
- function x(e, t, n) {
13
+ ], y = 1, b = "rounded-md border border-border bg-surface px-2 py-1 text-[11px] font-medium text-foreground-subtle hover:bg-surface-hover disabled:opacity-40 transition-colors", x = "rounded-md border border-primary/50 bg-primary/15 px-2.5 py-1 text-[11px] font-medium text-primary hover:bg-primary/25 disabled:opacity-40 transition-colors";
14
+ function S(e, t, n) {
15
15
  let r = t * n, i = Array.from({ length: r });
16
16
  for (let t = 0; t < r; t += 1) i[t] = e[t] === !0;
17
17
  return i;
18
18
  }
19
- function S(e, t) {
19
+ function ne(e, t) {
20
20
  if (e.length !== t.length) return !1;
21
21
  for (let n = 0; n < e.length; n += 1) if (e[n] !== t[n]) return !1;
22
22
  return !0;
@@ -44,11 +44,11 @@ function E(e, t, n, r) {
44
44
  return o;
45
45
  }
46
46
  function D({ deviceId: a }) {
47
- let w = s(te().trpcClient, a), [D, O] = t(null), [k, A] = t(!1), [j, M] = t(null), [N, P] = t(null), [F, I] = t(v), [L, R] = t(!1), [z, B] = t(!1), V = n(!1);
47
+ let w = c(s().trpcClient, a), [D, O] = t(null), [k, A] = t(!1), [j, M] = t(null), [N, P] = t(null), [F, I] = t(y), [L, R] = t(!1), [z, B] = t(!1), V = n(!1);
48
48
  i(() => {
49
49
  if (!w) return;
50
50
  let e = !1;
51
- return V.current = !1, O(null), A(!1), M(null), P(null), I(v), B(!1), (async () => {
51
+ return V.current = !1, O(null), A(!1), M(null), P(null), I(y), B(!1), (async () => {
52
52
  try {
53
53
  let t = await w.motionZones?.getOptions({});
54
54
  if (e) return;
@@ -58,11 +58,11 @@ function D({ deviceId: a }) {
58
58
  if (e) return;
59
59
  if (!n) throw Error("device proxy not ready");
60
60
  V.current = !0;
61
- let r = n.regions.find((e) => e.shape.kind === "grid"), i = x(r ? r.shape.cells : [], t.grid.width, t.grid.height);
62
- P(i), M(T(i, t.grid.width, t.grid.height, v));
61
+ let r = n.regions.find((e) => e.shape.kind === "grid"), i = S(r ? r.shape.cells : [], t.grid.width, t.grid.height);
62
+ P(i), M(T(i, t.grid.width, t.grid.height, y));
63
63
  } catch (t) {
64
64
  if (e) return;
65
- ee(t) ? A(!0) : console.error("Motion Zones load failed", t);
65
+ o(t) ? A(!0) : console.error("Motion Zones load failed", t);
66
66
  }
67
67
  })(), () => {
68
68
  e = !0;
@@ -74,7 +74,7 @@ function D({ deviceId: a }) {
74
74
  H,
75
75
  U,
76
76
  F
77
- ]), q = r(() => K !== null && N !== null && !S(K, N), [K, N]), J = r(() => K ? K.reduce((e, t) => t ? e + 1 : e, 0) : 0, [K]), Y = H * U, X = W * G, Z = e((e) => {
77
+ ]), q = r(() => K !== null && N !== null && !ne(K, N), [K, N]), J = r(() => K ? K.reduce((e, t) => t ? e + 1 : e, 0) : 0, [K]), Y = H * U, X = W * G, Z = e((e) => {
78
78
  X > 0 && M(Array.from({ length: X }, () => e));
79
79
  }, [X]), re = e(() => {
80
80
  M((e) => e && e.map((e) => !e));
@@ -98,7 +98,7 @@ function D({ deviceId: a }) {
98
98
  H,
99
99
  U
100
100
  ]), Q = r(() => D && j ? [{
101
- id: g,
101
+ id: _,
102
102
  shape: {
103
103
  kind: "grid",
104
104
  gridWidth: W,
@@ -123,13 +123,13 @@ function D({ deviceId: a }) {
123
123
  cells: e
124
124
  };
125
125
  await w.motionZones?.setZone({ patch: { regions: [{
126
- id: g,
126
+ id: _,
127
127
  enabled: !0,
128
128
  shape: t
129
129
  }] } });
130
130
  let n = await w.motionZones?.getStatus({});
131
131
  if (n) {
132
- let e = n.regions.find((e) => e.shape.kind === "grid"), t = x(e ? e.shape.cells : [], D.grid.width, D.grid.height);
132
+ let e = n.regions.find((e) => e.shape.kind === "grid"), t = S(e ? e.shape.cells : [], D.grid.width, D.grid.height);
133
133
  P(t), M(T(t, D.grid.width, D.grid.height, F));
134
134
  }
135
135
  } catch (e) {
@@ -144,10 +144,10 @@ function D({ deviceId: a }) {
144
144
  D,
145
145
  F
146
146
  ]);
147
- return l(r(() => z && !k && D && j ? {
148
- id: h,
149
- order: m,
150
- node: /* @__PURE__ */ u(p, {
147
+ return ee(r(() => z && !k && D && j ? {
148
+ id: te,
149
+ order: g,
150
+ node: /* @__PURE__ */ f(h, {
151
151
  transparent: !0,
152
152
  items: Q,
153
153
  supportedShapes: ["grid"],
@@ -155,7 +155,7 @@ function D({ deviceId: a }) {
155
155
  width: W,
156
156
  height: G
157
157
  },
158
- selectedId: g,
158
+ selectedId: _,
159
159
  onSelect: () => {},
160
160
  onShapeChange: $,
161
161
  onDrawComplete: () => {},
@@ -170,30 +170,30 @@ function D({ deviceId: a }) {
170
170
  $,
171
171
  W,
172
172
  G
173
- ])), w ? /* @__PURE__ */ u(c, {
173
+ ])), w ? /* @__PURE__ */ f(u, {
174
174
  title: "Motion Zones",
175
- icon: /* @__PURE__ */ u(ne, { className: "h-3.5 w-3.5 text-foreground-subtle" }),
176
- children: /* @__PURE__ */ u("div", {
175
+ icon: /* @__PURE__ */ f(d, { className: "h-3.5 w-3.5 text-foreground-subtle" }),
176
+ children: /* @__PURE__ */ f("div", {
177
177
  className: "flex flex-col gap-3",
178
- children: k ? /* @__PURE__ */ u("p", {
179
- className: `${o} leading-relaxed`,
178
+ children: k ? /* @__PURE__ */ f("p", {
179
+ className: `${l} leading-relaxed`,
180
180
  children: "This camera doesn't expose an on-board motion zones grid."
181
- }) : !k && D !== null && j !== null ? /* @__PURE__ */ d(f, { children: [/* @__PURE__ */ d("p", {
182
- className: `${o} leading-relaxed`,
181
+ }) : !k && D !== null && j !== null ? /* @__PURE__ */ p(m, { children: [/* @__PURE__ */ p("p", {
182
+ className: `${l} leading-relaxed`,
183
183
  children: [
184
184
  "Toggle ",
185
- /* @__PURE__ */ u("strong", {
185
+ /* @__PURE__ */ f("strong", {
186
186
  className: "text-foreground",
187
187
  children: "Edit grid"
188
188
  }),
189
189
  " to paint the region directly on the live frame, then ",
190
- /* @__PURE__ */ u("strong", {
190
+ /* @__PURE__ */ f("strong", {
191
191
  className: "text-foreground",
192
192
  children: "Save"
193
193
  }),
194
194
  " to push the mask to the camera. Pick a bigger",
195
195
  " ",
196
- /* @__PURE__ */ u("strong", {
196
+ /* @__PURE__ */ f("strong", {
197
197
  className: "text-foreground",
198
198
  children: "Cell size"
199
199
  }),
@@ -203,57 +203,57 @@ function D({ deviceId: a }) {
203
203
  D.grid.height,
204
204
  " grid on save (×1 is the finest)."
205
205
  ]
206
- }), /* @__PURE__ */ d("div", {
206
+ }), /* @__PURE__ */ p("div", {
207
207
  className: "flex items-center gap-2 flex-wrap",
208
208
  children: [
209
- /* @__PURE__ */ u("button", {
209
+ /* @__PURE__ */ f("button", {
210
210
  type: "button",
211
211
  onClick: () => B((e) => !e),
212
212
  disabled: L,
213
213
  "aria-pressed": z,
214
- className: z ? b : y,
214
+ className: z ? x : b,
215
215
  children: z ? "Done editing" : "Edit grid"
216
216
  }),
217
- /* @__PURE__ */ u("button", {
217
+ /* @__PURE__ */ f("button", {
218
218
  type: "button",
219
219
  onClick: () => Z(!0),
220
220
  disabled: L,
221
- className: y,
221
+ className: b,
222
222
  children: "All on"
223
223
  }),
224
- /* @__PURE__ */ u("button", {
224
+ /* @__PURE__ */ f("button", {
225
225
  type: "button",
226
226
  onClick: () => Z(!1),
227
227
  disabled: L,
228
- className: y,
228
+ className: b,
229
229
  children: "All off"
230
230
  }),
231
- /* @__PURE__ */ u("button", {
231
+ /* @__PURE__ */ f("button", {
232
232
  type: "button",
233
233
  onClick: re,
234
234
  disabled: L,
235
- className: y,
235
+ className: b,
236
236
  children: "Invert"
237
237
  }),
238
- /* @__PURE__ */ d("div", {
238
+ /* @__PURE__ */ p("div", {
239
239
  className: "flex items-center gap-1 ml-1",
240
240
  role: "group",
241
241
  "aria-label": "Cell size",
242
- children: [/* @__PURE__ */ u("span", {
243
- className: `${o} mr-0.5`,
242
+ children: [/* @__PURE__ */ f("span", {
243
+ className: `${l} mr-0.5`,
244
244
  children: "Cell size"
245
- }), _.map((e) => /* @__PURE__ */ d("button", {
245
+ }), v.map((e) => /* @__PURE__ */ p("button", {
246
246
  type: "button",
247
247
  onClick: () => ae(e),
248
248
  disabled: L,
249
249
  "aria-pressed": F === e,
250
250
  title: e === 1 ? `Camera grid ${H}×${U} (finest)` : `${C(H, e)}×${C(U, e)} painting grid · cells ×${e} bigger`,
251
- className: F === e ? b : y,
251
+ className: F === e ? x : b,
252
252
  children: ["×", e]
253
253
  }, e))]
254
254
  }),
255
- /* @__PURE__ */ d("span", {
256
- className: `${o} ml-1 tabular-nums`,
255
+ /* @__PURE__ */ p("span", {
256
+ className: `${l} ml-1 tabular-nums`,
257
257
  children: [
258
258
  J,
259
259
  " / ",
@@ -265,24 +265,24 @@ function D({ deviceId: a }) {
265
265
  F === 1 ? "" : ` · paint ${W}×${G}`
266
266
  ]
267
267
  }),
268
- /* @__PURE__ */ u("span", { className: "flex-1" }),
269
- /* @__PURE__ */ u("button", {
268
+ /* @__PURE__ */ f("span", { className: "flex-1" }),
269
+ /* @__PURE__ */ f("button", {
270
270
  type: "button",
271
271
  onClick: ie,
272
272
  disabled: L || !q,
273
273
  className: "rounded-md border border-border bg-surface px-2 py-1 text-[11px] text-foreground-subtle hover:bg-surface-hover disabled:opacity-40 transition-colors",
274
274
  children: "Revert"
275
275
  }),
276
- /* @__PURE__ */ u("button", {
276
+ /* @__PURE__ */ f("button", {
277
277
  type: "button",
278
278
  onClick: () => void oe(),
279
279
  disabled: L || !q,
280
- className: b,
280
+ className: x,
281
281
  children: L ? "Saving…" : "Save"
282
282
  })
283
283
  ]
284
- })] }) : /* @__PURE__ */ u("p", {
285
- className: `${o} leading-relaxed`,
284
+ })] }) : /* @__PURE__ */ f("p", {
285
+ className: `${l} leading-relaxed`,
286
286
  children: "Loading the camera's grid…"
287
287
  })
288
288
  })
@@ -1,8 +1,8 @@
1
1
  import { c as e, g as t, h as n, p as r, u as i, x as a } from "./_virtual_mf___mfe_internal__addon_benchmark_page__loadShare__react__loadShare__.js-GeuxDuzQ.mjs";
2
- import { f as o, o as s, s as ee, t as te, u as ne } from "./cap-error-B24Pd7A2.mjs";
3
- import { i as re, t as ie } from "./player-overlays-BPFzEQbY.mjs";
4
- import { n as ae, r as oe, t as se } from "./square-CPjxgFY6.mjs";
5
- import { t as c } from "./trash-2-CL-eG6C9.mjs";
2
+ import { c as o, n as ee, o as te, r as ne, t as s } from "./responsive-Y7J7gtG7.mjs";
3
+ import { i as re, t as ie } from "./player-overlays-CR2lsh-A.mjs";
4
+ import { n as ae, r as oe, t as se } from "./square-4JrrEHjL.mjs";
5
+ import { t as c } from "./trash-2-BEMwnuoe.mjs";
6
6
  import { n as l, r as u, t as ce } from "./_virtual_mf___mfe_internal__addon_benchmark_page__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-SOU_VnTj.mjs";
7
7
  import { MaskShapeCanvas as le } from "./MaskShapeCanvas-BDvrLf-K.mjs";
8
8
  var ue = o("hexagon", [["path", {
@@ -68,7 +68,7 @@ function he(e, t) {
68
68
  return !0;
69
69
  }
70
70
  function v({ deviceId: a }) {
71
- let o = ee(ne().trpcClient, a), [d, f] = t(null), [v, y] = t(!1), [b, x] = t(!1), [S, C] = t(null), [w, T] = t(null), [E, D] = t(!1), [O, k] = t(!1), [A, j] = t(null), [M, N] = t(null), [ge, P] = t(null), [F, I] = t(null), [L, R] = t(null), z = n(!1);
71
+ let o = ne(te().trpcClient, a), [d, f] = t(null), [v, y] = t(!1), [b, x] = t(!1), [S, C] = t(null), [w, T] = t(null), [E, D] = t(!1), [O, k] = t(!1), [A, j] = t(null), [M, N] = t(null), [ge, P] = t(null), [F, I] = t(null), [L, R] = t(null), z = n(!1);
72
72
  i(() => {
73
73
  if (!o) return;
74
74
  let e = !1;
@@ -93,7 +93,7 @@ function v({ deviceId: a }) {
93
93
  T(r), C(r), P(n.audioEnabled);
94
94
  } catch (t) {
95
95
  if (e) return;
96
- te(t) ? y(!0) : console.error("Privacy Mask load failed", t);
96
+ ee(t) ? y(!0) : console.error("Privacy Mask load failed", t);
97
97
  }
98
98
  })(), () => {
99
99
  e = !0;