@camstack/addon-osd-manager 0.1.209 → 0.1.210

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 (2) hide show
  1. package/dist/_stub.js +87 -89
  2. package/package.json +1 -1
package/dist/_stub.js CHANGED
@@ -19046,93 +19046,95 @@ function eS({ source: e, destinations: t, onDuplicated: n }) {
19046
19046
  let [r, i] = a(!1), [o, s] = a(void 0), [c, l] = a(void 0), [u, d] = a(void 0), f = Ki();
19047
19047
  if (t.length === 0) return null;
19048
19048
  function p() {
19049
- s(void 0), d(void 0), f.reset?.();
19049
+ s(void 0), d(void 0), l(void 0), f.reset?.();
19050
19050
  }
19051
- let m = t.find((e) => e.id === o)?.name;
19052
- async function h() {
19051
+ async function m() {
19053
19052
  if (o === void 0) return;
19054
19053
  let r = o;
19055
19054
  d(void 0);
19056
19055
  try {
19057
- let a = await f.mutateAsync({
19056
+ let i = await f.mutateAsync({
19058
19057
  sourceDeviceId: e.id,
19059
19058
  targetDeviceId: r
19060
19059
  });
19061
- l(`${a.copied} slot${a.copied === 1 ? "" : "s"} copied into ${t.find((e) => e.id === r)?.name ?? `camera #${r}`}${a.skipped > 0 ? ` · ${a.skipped} skipped` : ""}`), i(!1), p(), n(r);
19060
+ l(`${i.copied} slot${i.copied === 1 ? "" : "s"} copied into ${t.find((e) => e.id === r)?.name ?? `camera #${r}`}${i.skipped > 0 ? ` · ${i.skipped} skipped` : ""}`), n(r);
19062
19061
  } catch (e) {
19063
19062
  d(e instanceof Error ? e.message : "Duplication failed");
19064
19063
  }
19065
19064
  }
19066
- return /* @__PURE__ */ F(I, { children: [
19067
- /* @__PURE__ */ P(W, {
19068
- type: "button",
19069
- variant: "outline",
19070
- size: "sm",
19071
- onClick: () => {
19072
- l(void 0), i(!0);
19073
- },
19074
- children: "Duplicate into…"
19075
- }),
19076
- c !== void 0 && /* @__PURE__ */ P("p", {
19077
- className: "text-xs text-success",
19078
- role: "status",
19079
- children: c
19080
- }),
19081
- r ? /* @__PURE__ */ P(ma, {
19082
- open: !0,
19083
- onOpenChange: (e) => {
19084
- i(e), e || p();
19085
- },
19086
- children: /* @__PURE__ */ F(ga, {
19087
- width: "sm",
19088
- children: [
19089
- /* @__PURE__ */ F(_a, { children: [/* @__PURE__ */ F(ba, { children: [
19065
+ return /* @__PURE__ */ F(I, { children: [/* @__PURE__ */ P(W, {
19066
+ type: "button",
19067
+ variant: "outline",
19068
+ size: "sm",
19069
+ onClick: (e) => {
19070
+ e.stopPropagation(), p(), i(!0);
19071
+ },
19072
+ children: "Duplicate into…"
19073
+ }), r ? /* @__PURE__ */ P(ma, {
19074
+ open: !0,
19075
+ onOpenChange: (e) => {
19076
+ i(e), e || p();
19077
+ },
19078
+ children: /* @__PURE__ */ F(ga, {
19079
+ width: "sm",
19080
+ className: "overflow-x-hidden",
19081
+ children: [
19082
+ /* @__PURE__ */ F(_a, { children: [/* @__PURE__ */ F(ba, {
19083
+ className: "break-words",
19084
+ children: [
19090
19085
  "Duplicate “",
19091
19086
  e.name,
19092
19087
  "” into…"
19093
- ] }), /* @__PURE__ */ F(xa, { children: [
19094
- "Copies every configured overlay binding from “",
19095
- e.name,
19096
- "” onto the camera you pick below, replacing its current OSD configuration."
19097
- ] })] }),
19098
- /* @__PURE__ */ P(oa, {
19099
- "aria-label": "Destination camera",
19100
- value: o === void 0 ? "" : String(o),
19101
- options: [{
19102
- value: "",
19103
- label: "Select destination camera…"
19104
- }, ...t.map((e) => ({
19105
- value: String(e.id),
19106
- label: e.name
19107
- }))],
19108
- onChange: (e) => {
19109
- s(e.target.value === "" ? void 0 : Number(e.target.value));
19110
- }
19111
- }),
19112
- (u ?? f.error?.message) && /* @__PURE__ */ P("p", {
19113
- className: "mt-2 text-xs text-danger",
19114
- role: "alert",
19115
- children: u ?? f.error?.message
19116
- }),
19117
- /* @__PURE__ */ F(ya, { children: [/* @__PURE__ */ P(W, {
19118
- type: "button",
19119
- variant: "secondary",
19120
- disabled: f.isPending,
19121
- onClick: () => {
19122
- i(!1), p();
19123
- },
19124
- children: "Cancel"
19125
- }), /* @__PURE__ */ P(W, {
19126
- type: "button",
19127
- variant: "primary",
19128
- disabled: o === void 0 || f.isPending,
19129
- onClick: h,
19130
- children: m ? `Duplicate into ${m}` : "Duplicate"
19131
- })] })
19132
- ]
19133
- })
19134
- }) : null
19135
- ] });
19088
+ ]
19089
+ }), /* @__PURE__ */ P(xa, { children: "Copies every overlay binding onto the camera you pick. Replaces its current OSD configuration." })] }),
19090
+ c === void 0 ? /* @__PURE__ */ P(oa, {
19091
+ "aria-label": "Destination camera",
19092
+ value: o === void 0 ? "" : String(o),
19093
+ options: [{
19094
+ value: "",
19095
+ label: "Select destination camera…"
19096
+ }, ...t.map((e) => ({
19097
+ value: String(e.id),
19098
+ label: e.name
19099
+ }))],
19100
+ onChange: (e) => {
19101
+ s(e.target.value === "" ? void 0 : Number(e.target.value));
19102
+ }
19103
+ }) : /* @__PURE__ */ P("p", {
19104
+ className: "text-xs text-success break-words",
19105
+ role: "status",
19106
+ children: c
19107
+ }),
19108
+ (u ?? f.error?.message) && /* @__PURE__ */ P("p", {
19109
+ className: "mt-2 text-xs text-danger break-words",
19110
+ role: "alert",
19111
+ children: u ?? f.error?.message
19112
+ }),
19113
+ /* @__PURE__ */ P(ya, { children: c === void 0 ? /* @__PURE__ */ F(I, { children: [/* @__PURE__ */ P(W, {
19114
+ type: "button",
19115
+ variant: "secondary",
19116
+ disabled: f.isPending,
19117
+ onClick: () => {
19118
+ i(!1), p();
19119
+ },
19120
+ children: "Cancel"
19121
+ }), /* @__PURE__ */ P(W, {
19122
+ type: "button",
19123
+ variant: "primary",
19124
+ disabled: o === void 0 || f.isPending,
19125
+ onClick: () => void m(),
19126
+ children: "Duplicate"
19127
+ })] }) : /* @__PURE__ */ P(W, {
19128
+ type: "button",
19129
+ variant: "primary",
19130
+ onClick: () => {
19131
+ i(!1), p();
19132
+ },
19133
+ children: "Close"
19134
+ }) })
19135
+ ]
19136
+ })
19137
+ }) : null] });
19136
19138
  }
19137
19139
  //#endregion
19138
19140
  //#region src/ui/osd-page-model.ts
@@ -19997,16 +19999,15 @@ function qS({ cameraId: e, supportsOsd: t, deviceNameById: n, templateNameById:
19997
19999
  children: "Loading…"
19998
20000
  });
19999
20001
  let a = vS(i.data?.slots ?? [], n, r);
20000
- return a.length === 0 ? /* @__PURE__ */ P("span", {
20002
+ if (a.length === 0) return /* @__PURE__ */ P("span", {
20001
20003
  className: "text-xs text-foreground-subtle",
20002
20004
  children: "No active sources"
20003
- }) : /* @__PURE__ */ P("div", {
20004
- className: "flex flex-wrap gap-1",
20005
- children: a.map((e) => /* @__PURE__ */ P($i, {
20006
- variant: "default",
20007
- style: "outline",
20008
- children: e.label
20009
- }, e.key))
20005
+ });
20006
+ let o = a.map((e) => e.label).join(" · ");
20007
+ return /* @__PURE__ */ P("span", {
20008
+ className: "block max-w-[16rem] truncate text-xs text-foreground",
20009
+ title: o,
20010
+ children: o
20010
20011
  });
20011
20012
  }
20012
20013
  function JS({ cameraId: e, supportsOsd: t, onRendered: n }) {
@@ -20275,6 +20276,7 @@ function $S({ cameras: e, osdCapableIds: t, allDevices: r, pickerDevices: i, lis
20275
20276
  key: "sources",
20276
20277
  header: "Active sources",
20277
20278
  notSortableReason: "Live probe",
20279
+ nowrap: !0,
20278
20280
  render: (e) => /* @__PURE__ */ P(qS, {
20279
20281
  cameraId: e.id,
20280
20282
  supportsOsd: e.supportsOsd,
@@ -20289,21 +20291,17 @@ function $S({ cameras: e, osdCapableIds: t, allDevices: r, pickerDevices: i, lis
20289
20291
  notSortableReason: "Row actions",
20290
20292
  nowrap: !0,
20291
20293
  render: (e) => /* @__PURE__ */ F("div", {
20292
- className: "flex flex-wrap items-center justify-end gap-1",
20294
+ className: "flex justify-end gap-1",
20293
20295
  children: [
20294
20296
  /* @__PURE__ */ P(JS, {
20295
20297
  cameraId: e.id,
20296
20298
  supportsOsd: e.supportsOsd,
20297
20299
  onRendered: () => w(e.id)
20298
20300
  }),
20299
- e.supportsOsd ? /* @__PURE__ */ P("span", {
20300
- onClick: (e) => e.stopPropagation(),
20301
- onKeyDown: (e) => e.stopPropagation(),
20302
- children: /* @__PURE__ */ P(eS, {
20303
- source: e,
20304
- destinations: x.filter((t) => t.id !== e.id && t.supportsOsd),
20305
- onDuplicated: (e) => w(e)
20306
- })
20301
+ e.supportsOsd ? /* @__PURE__ */ P(eS, {
20302
+ source: e,
20303
+ destinations: x.filter((t) => t.id !== e.id && t.supportsOsd),
20304
+ onDuplicated: (e) => w(e)
20307
20305
  }) : null,
20308
20306
  /* @__PURE__ */ P(W, {
20309
20307
  type: "button",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-osd-manager",
3
- "version": "0.1.209",
3
+ "version": "0.1.210",
4
4
  "description": "Binds camera on-screen-display slots to live state and recognitions",
5
5
  "keywords": [
6
6
  "camstack",