@camstack/addon-benchmark 1.2.118 → 1.2.120

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-DtQbq3Im.mjs → MotionZonesSettings-Cm_Dvpz5.mjs} +129 -147
  2. package/dist/{PrivacyMaskSettings-CU-qTVdT.mjs → PrivacyMaskSettings-vinyIide.mjs} +4 -4
  3. package/dist/{SceneMonitorEditor-Dko81uSm.mjs → SceneMonitorEditor-CteqhKoH.mjs} +136 -136
  4. package/dist/_stub.js +4733 -4207
  5. package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_benchmark_page-N-eSnSOQ.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_benchmark_page-Djy8wQOo.mjs} +4 -4
  6. package/dist/{_virtual_mf___mfe_internal__addon_benchmark_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-DbH7vZFO.mjs → _virtual_mf___mfe_internal__addon_benchmark_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-B_8RNOgn.mjs} +1 -1
  7. package/dist/addon-benchmark.css +1 -1
  8. package/dist/grid-2x2-DAxEj9uR.mjs +21 -0
  9. package/dist/{hostInit-B9UzGjcE.mjs → hostInit-DImjZQfo.mjs} +3 -3
  10. package/dist/{player-overlays-JUg8MuVo.mjs → player-overlays-DuBK7_sR.mjs} +1 -1
  11. package/dist/remoteEntry.js +1 -1
  12. package/dist/{responsive-CWeQn0TH.mjs → responsive-CIPaE71n.mjs} +1 -1
  13. package/dist/{use-device-snapshot-BMvs1K1x.mjs → scene-monitor-copy-Dm15cpj1.mjs} +46 -46
  14. package/dist/{square-DOq-wjEe.mjs → square-5phgB1vQ.mjs} +1 -1
  15. package/dist/{trash-2-BCuUDOir.mjs → trash-2-D24swekJ.mjs} +1 -1
  16. package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_benchmark_page__remoteEntry_js-18YTe0Ko.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_benchmark_page__remoteEntry_js-DnKwDDwd.mjs} +1 -1
  17. package/package.json +1 -1
@@ -1,40 +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 { c as o, n as s, o as c, r as ee, t as l } from "./responsive-CWeQn0TH.mjs";
3
- import { i as te, t as u } from "./player-overlays-JUg8MuVo.mjs";
4
- import { n as d, r as f, t as p } from "./_virtual_mf___mfe_internal__addon_benchmark_page__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-SOU_VnTj.mjs";
5
- import { MaskShapeCanvas as m } from "./MaskShapeCanvas-BDvrLf-K.mjs";
6
- var ne = o("grid-2x2", [
7
- ["path", {
8
- d: "M12 3v18",
9
- key: "108xh3"
10
- }],
11
- ["path", {
12
- d: "M3 12h18",
13
- key: "1i2n21"
14
- }],
15
- ["rect", {
16
- x: "3",
17
- y: "3",
18
- width: "18",
19
- height: "18",
20
- rx: "2",
21
- key: "h1oib"
22
- }]
23
- ]);
24
- //#endregion
2
+ import { n as o, o as s, r as c, t as l } from "./responsive-CIPaE71n.mjs";
3
+ import { i as u, t as ee } from "./player-overlays-DuBK7_sR.mjs";
4
+ import { t as d } from "./grid-2x2-DAxEj9uR.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";
25
7
  //#region ../ui-library/src/composites/cap-settings/MotionZonesSettings.tsx
26
8
  a();
27
- var re = 110, h = "motion-zones", g = 0, _ = [
9
+ var g = 110, te = "motion-zones", _ = 0, v = [
28
10
  1,
29
11
  2,
30
12
  3
31
- ], 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";
32
- 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) {
33
15
  let r = t * n, i = Array.from({ length: r });
34
16
  for (let t = 0; t < r; t += 1) i[t] = e[t] === !0;
35
17
  return i;
36
18
  }
37
- function S(e, t) {
19
+ function ne(e, t) {
38
20
  if (e.length !== t.length) return !1;
39
21
  for (let n = 0; n < e.length; n += 1) if (e[n] !== t[n]) return !1;
40
22
  return !0;
@@ -62,244 +44,244 @@ function E(e, t, n, r) {
62
44
  return o;
63
45
  }
64
46
  function D({ deviceId: a }) {
65
- let o = ee(c().trpcClient, a), [w, D] = t(null), [O, k] = t(!1), [A, j] = t(null), [M, N] = t(null), [P, F] = t(v), [I, L] = t(!1), [R, z] = t(!1), B = 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);
66
48
  i(() => {
67
- if (!o) return;
49
+ if (!w) return;
68
50
  let e = !1;
69
- return B.current = !1, D(null), k(!1), j(null), N(null), F(v), z(!1), (async () => {
51
+ return V.current = !1, O(null), A(!1), M(null), P(null), I(y), B(!1), (async () => {
70
52
  try {
71
- let t = await o.motionZones?.getOptions({});
53
+ let t = await w.motionZones?.getOptions({});
72
54
  if (e) return;
73
55
  if (!t) throw Error("device proxy not ready");
74
- if (D(t), B.current) return;
75
- let n = await o.motionZones?.getStatus({});
56
+ if (O(t), V.current) return;
57
+ let n = await w.motionZones?.getStatus({});
76
58
  if (e) return;
77
59
  if (!n) throw Error("device proxy not ready");
78
- B.current = !0;
79
- let r = n.regions.find((e) => e.shape.kind === "grid"), i = x(r ? r.shape.cells : [], t.grid.width, t.grid.height);
80
- N(i), j(T(i, t.grid.width, t.grid.height, v));
60
+ V.current = !0;
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));
81
63
  } catch (t) {
82
64
  if (e) return;
83
- s(t) ? k(!0) : console.error("Motion Zones load failed", t);
65
+ o(t) ? A(!0) : console.error("Motion Zones load failed", t);
84
66
  }
85
67
  })(), () => {
86
68
  e = !0;
87
69
  };
88
- }, [o]);
89
- let V = w ? w.grid.width : 0, H = w ? w.grid.height : 0, U = C(V, P), W = C(H, P), G = r(() => A && w ? E(A, V, H, P) : null, [
90
- A,
91
- w,
92
- V,
70
+ }, [w]);
71
+ let H = D ? D.grid.width : 0, U = D ? D.grid.height : 0, W = C(H, F), G = C(U, F), K = r(() => j && D ? E(j, H, U, F) : null, [
72
+ j,
73
+ D,
93
74
  H,
94
- P
95
- ]), K = r(() => G !== null && M !== null && !S(G, M), [G, M]), q = r(() => G ? G.reduce((e, t) => t ? e + 1 : e, 0) : 0, [G]), J = V * H, Y = U * W, X = e((e) => {
96
- Y > 0 && j(Array.from({ length: Y }, () => e));
97
- }, [Y]), Z = e(() => {
98
- j((e) => e && e.map((e) => !e));
75
+ U,
76
+ F
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
+ X > 0 && M(Array.from({ length: X }, () => e));
79
+ }, [X]), re = e(() => {
80
+ M((e) => e && e.map((e) => !e));
99
81
  }, []), ie = e(() => {
100
- M && w && j(T(M, V, H, P));
82
+ N && D && M(T(N, H, U, F));
101
83
  }, [
102
- M,
103
- w,
104
- V,
84
+ N,
85
+ D,
105
86
  H,
106
- P
87
+ U,
88
+ F
107
89
  ]), ae = e((e) => {
108
- e === P || !w || j((t) => {
109
- if (!t) return F(e), t;
110
- let n = T(E(t, V, H, P), V, H, e);
111
- return F(e), n;
90
+ e === F || !D || M((t) => {
91
+ if (!t) return I(e), t;
92
+ let n = T(E(t, H, U, F), H, U, e);
93
+ return I(e), n;
112
94
  });
113
95
  }, [
114
- P,
115
- w,
116
- V,
117
- H
118
- ]), Q = r(() => w && A ? [{
119
- id: g,
96
+ F,
97
+ D,
98
+ H,
99
+ U
100
+ ]), Q = r(() => D && j ? [{
101
+ id: _,
120
102
  shape: {
121
103
  kind: "grid",
122
- gridWidth: U,
123
- gridHeight: W,
124
- cells: [...A]
104
+ gridWidth: W,
105
+ gridHeight: G,
106
+ cells: [...j]
125
107
  }
126
108
  }] : [], [
127
- w,
128
- A,
129
- U,
130
- W
109
+ D,
110
+ j,
111
+ W,
112
+ G
131
113
  ]), $ = e((e, t) => {
132
- t.kind === "grid" && j(t.cells);
114
+ t.kind === "grid" && M(t.cells);
133
115
  }, []), oe = e(async () => {
134
- if (!(!o || !A || !w)) {
135
- L(!0);
116
+ if (!(!w || !j || !D)) {
117
+ R(!0);
136
118
  try {
137
- let e = E(A, w.grid.width, w.grid.height, P), t = {
119
+ let e = E(j, D.grid.width, D.grid.height, F), t = {
138
120
  kind: "grid",
139
- gridWidth: w.grid.width,
140
- gridHeight: w.grid.height,
121
+ gridWidth: D.grid.width,
122
+ gridHeight: D.grid.height,
141
123
  cells: e
142
124
  };
143
- await o.motionZones?.setZone({ patch: { regions: [{
144
- id: g,
125
+ await w.motionZones?.setZone({ patch: { regions: [{
126
+ id: _,
145
127
  enabled: !0,
146
128
  shape: t
147
129
  }] } });
148
- let n = await o.motionZones?.getStatus({});
130
+ let n = await w.motionZones?.getStatus({});
149
131
  if (n) {
150
- let e = n.regions.find((e) => e.shape.kind === "grid"), t = x(e ? e.shape.cells : [], w.grid.width, w.grid.height);
151
- N(t), j(T(t, w.grid.width, w.grid.height, P));
132
+ let e = n.regions.find((e) => e.shape.kind === "grid"), t = S(e ? e.shape.cells : [], D.grid.width, D.grid.height);
133
+ P(t), M(T(t, D.grid.width, D.grid.height, F));
152
134
  }
153
135
  } catch (e) {
154
136
  console.error("Motion Zones save failed", e);
155
137
  } finally {
156
- L(!1);
138
+ R(!1);
157
139
  }
158
140
  }
159
141
  }, [
160
- o,
161
- A,
162
142
  w,
163
- P
143
+ j,
144
+ D,
145
+ F
164
146
  ]);
165
- return u(r(() => R && !O && w && A ? {
166
- id: h,
167
- order: re,
168
- node: /* @__PURE__ */ d(m, {
147
+ return ee(r(() => z && !k && D && j ? {
148
+ id: te,
149
+ order: g,
150
+ node: /* @__PURE__ */ f(h, {
169
151
  transparent: !0,
170
152
  items: Q,
171
153
  supportedShapes: ["grid"],
172
154
  grid: {
173
- width: U,
174
- height: W
155
+ width: W,
156
+ height: G
175
157
  },
176
- selectedId: g,
158
+ selectedId: _,
177
159
  onSelect: () => {},
178
160
  onShapeChange: $,
179
161
  onDrawComplete: () => {},
180
162
  drawingKind: null
181
163
  })
182
164
  } : null, [
183
- R,
184
- O,
185
- w,
186
- A,
165
+ z,
166
+ k,
167
+ D,
168
+ j,
187
169
  Q,
188
170
  $,
189
- U,
190
- W
191
- ])), o ? /* @__PURE__ */ d(te, {
171
+ W,
172
+ G
173
+ ])), w ? /* @__PURE__ */ f(u, {
192
174
  title: "Motion Zones",
193
- icon: /* @__PURE__ */ d(ne, { className: "h-3.5 w-3.5 text-foreground-subtle" }),
194
- children: /* @__PURE__ */ d("div", {
175
+ icon: /* @__PURE__ */ f(d, { className: "h-3.5 w-3.5 text-foreground-subtle" }),
176
+ children: /* @__PURE__ */ f("div", {
195
177
  className: "flex flex-col gap-3",
196
- children: O ? /* @__PURE__ */ d("p", {
178
+ children: k ? /* @__PURE__ */ f("p", {
197
179
  className: `${l} leading-relaxed`,
198
180
  children: "This camera doesn't expose an on-board motion zones grid."
199
- }) : !O && w !== null && A !== null ? /* @__PURE__ */ f(p, { children: [/* @__PURE__ */ f("p", {
181
+ }) : !k && D !== null && j !== null ? /* @__PURE__ */ p(m, { children: [/* @__PURE__ */ p("p", {
200
182
  className: `${l} leading-relaxed`,
201
183
  children: [
202
184
  "Toggle ",
203
- /* @__PURE__ */ d("strong", {
185
+ /* @__PURE__ */ f("strong", {
204
186
  className: "text-foreground",
205
187
  children: "Edit grid"
206
188
  }),
207
189
  " to paint the region directly on the live frame, then ",
208
- /* @__PURE__ */ d("strong", {
190
+ /* @__PURE__ */ f("strong", {
209
191
  className: "text-foreground",
210
192
  children: "Save"
211
193
  }),
212
194
  " to push the mask to the camera. Pick a bigger",
213
195
  " ",
214
- /* @__PURE__ */ d("strong", {
196
+ /* @__PURE__ */ f("strong", {
215
197
  className: "text-foreground",
216
198
  children: "Cell size"
217
199
  }),
218
200
  " for quicker, broad-stroke painting — it's resampled to the camera's native ",
219
- w.grid.width,
201
+ D.grid.width,
220
202
  "×",
221
- w.grid.height,
203
+ D.grid.height,
222
204
  " grid on save (×1 is the finest)."
223
205
  ]
224
- }), /* @__PURE__ */ f("div", {
206
+ }), /* @__PURE__ */ p("div", {
225
207
  className: "flex items-center gap-2 flex-wrap",
226
208
  children: [
227
- /* @__PURE__ */ d("button", {
209
+ /* @__PURE__ */ f("button", {
228
210
  type: "button",
229
- onClick: () => z((e) => !e),
230
- disabled: I,
231
- "aria-pressed": R,
232
- className: R ? b : y,
233
- children: R ? "Done editing" : "Edit grid"
211
+ onClick: () => B((e) => !e),
212
+ disabled: L,
213
+ "aria-pressed": z,
214
+ className: z ? x : b,
215
+ children: z ? "Done editing" : "Edit grid"
234
216
  }),
235
- /* @__PURE__ */ d("button", {
217
+ /* @__PURE__ */ f("button", {
236
218
  type: "button",
237
- onClick: () => X(!0),
238
- disabled: I,
239
- className: y,
219
+ onClick: () => Z(!0),
220
+ disabled: L,
221
+ className: b,
240
222
  children: "All on"
241
223
  }),
242
- /* @__PURE__ */ d("button", {
224
+ /* @__PURE__ */ f("button", {
243
225
  type: "button",
244
- onClick: () => X(!1),
245
- disabled: I,
246
- className: y,
226
+ onClick: () => Z(!1),
227
+ disabled: L,
228
+ className: b,
247
229
  children: "All off"
248
230
  }),
249
- /* @__PURE__ */ d("button", {
231
+ /* @__PURE__ */ f("button", {
250
232
  type: "button",
251
- onClick: Z,
252
- disabled: I,
253
- className: y,
233
+ onClick: re,
234
+ disabled: L,
235
+ className: b,
254
236
  children: "Invert"
255
237
  }),
256
- /* @__PURE__ */ f("div", {
238
+ /* @__PURE__ */ p("div", {
257
239
  className: "flex items-center gap-1 ml-1",
258
240
  role: "group",
259
241
  "aria-label": "Cell size",
260
- children: [/* @__PURE__ */ d("span", {
242
+ children: [/* @__PURE__ */ f("span", {
261
243
  className: `${l} mr-0.5`,
262
244
  children: "Cell size"
263
- }), _.map((e) => /* @__PURE__ */ f("button", {
245
+ }), v.map((e) => /* @__PURE__ */ p("button", {
264
246
  type: "button",
265
247
  onClick: () => ae(e),
266
- disabled: I,
267
- "aria-pressed": P === e,
268
- title: e === 1 ? `Camera grid ${V}×${H} (finest)` : `${C(V, e)}×${C(H, e)} painting grid · cells ×${e} bigger`,
269
- className: P === e ? b : y,
248
+ disabled: L,
249
+ "aria-pressed": F === e,
250
+ title: e === 1 ? `Camera grid ${H}×${U} (finest)` : `${C(H, e)}×${C(U, e)} painting grid · cells ×${e} bigger`,
251
+ className: F === e ? x : b,
270
252
  children: ["×", e]
271
253
  }, e))]
272
254
  }),
273
- /* @__PURE__ */ f("span", {
255
+ /* @__PURE__ */ p("span", {
274
256
  className: `${l} ml-1 tabular-nums`,
275
257
  children: [
276
- q,
277
- " / ",
278
258
  J,
259
+ " / ",
260
+ Y,
279
261
  " cells · ",
280
- w.grid.width,
262
+ D.grid.width,
281
263
  "×",
282
- w.grid.height,
283
- P === 1 ? "" : ` · paint ${U}×${W}`
264
+ D.grid.height,
265
+ F === 1 ? "" : ` · paint ${W}×${G}`
284
266
  ]
285
267
  }),
286
- /* @__PURE__ */ d("span", { className: "flex-1" }),
287
- /* @__PURE__ */ d("button", {
268
+ /* @__PURE__ */ f("span", { className: "flex-1" }),
269
+ /* @__PURE__ */ f("button", {
288
270
  type: "button",
289
271
  onClick: ie,
290
- disabled: I || !K,
272
+ disabled: L || !q,
291
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",
292
274
  children: "Revert"
293
275
  }),
294
- /* @__PURE__ */ d("button", {
276
+ /* @__PURE__ */ f("button", {
295
277
  type: "button",
296
278
  onClick: () => void oe(),
297
- disabled: I || !K,
298
- className: b,
299
- children: I ? "Saving…" : "Save"
279
+ disabled: L || !q,
280
+ className: x,
281
+ children: L ? "Saving…" : "Save"
300
282
  })
301
283
  ]
302
- })] }) : /* @__PURE__ */ d("p", {
284
+ })] }) : /* @__PURE__ */ f("p", {
303
285
  className: `${l} leading-relaxed`,
304
286
  children: "Loading the camera's grid…"
305
287
  })
@@ -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 { c as o, n as ee, o as te, r as ne, t as s } from "./responsive-CWeQn0TH.mjs";
3
- import { i as re, t as ie } from "./player-overlays-JUg8MuVo.mjs";
4
- import { n as ae, r as oe, t as se } from "./square-DOq-wjEe.mjs";
5
- import { t as c } from "./trash-2-BCuUDOir.mjs";
2
+ import { c as o, n as ee, o as te, r as ne, t as s } from "./responsive-CIPaE71n.mjs";
3
+ import { i as re, t as ie } from "./player-overlays-DuBK7_sR.mjs";
4
+ import { n as ae, r as oe, t as se } from "./square-5phgB1vQ.mjs";
5
+ import { t as c } from "./trash-2-D24swekJ.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", {