@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.
- package/dist/_stub.js +87 -89
- 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
|
-
|
|
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
|
|
19056
|
+
let i = await f.mutateAsync({
|
|
19058
19057
|
sourceDeviceId: e.id,
|
|
19059
19058
|
targetDeviceId: r
|
|
19060
19059
|
});
|
|
19061
|
-
l(`${
|
|
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
|
-
|
|
19068
|
-
|
|
19069
|
-
|
|
19070
|
-
|
|
19071
|
-
|
|
19072
|
-
|
|
19073
|
-
|
|
19074
|
-
|
|
19075
|
-
|
|
19076
|
-
|
|
19077
|
-
|
|
19078
|
-
|
|
19079
|
-
|
|
19080
|
-
|
|
19081
|
-
|
|
19082
|
-
|
|
19083
|
-
|
|
19084
|
-
|
|
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
|
-
]
|
|
19094
|
-
|
|
19095
|
-
|
|
19096
|
-
|
|
19097
|
-
|
|
19098
|
-
|
|
19099
|
-
|
|
19100
|
-
|
|
19101
|
-
|
|
19102
|
-
|
|
19103
|
-
|
|
19104
|
-
|
|
19105
|
-
|
|
19106
|
-
|
|
19107
|
-
|
|
19108
|
-
|
|
19109
|
-
|
|
19110
|
-
|
|
19111
|
-
|
|
19112
|
-
|
|
19113
|
-
|
|
19114
|
-
|
|
19115
|
-
|
|
19116
|
-
|
|
19117
|
-
|
|
19118
|
-
|
|
19119
|
-
|
|
19120
|
-
|
|
19121
|
-
|
|
19122
|
-
|
|
19123
|
-
|
|
19124
|
-
|
|
19125
|
-
|
|
19126
|
-
|
|
19127
|
-
|
|
19128
|
-
|
|
19129
|
-
|
|
19130
|
-
|
|
19131
|
-
|
|
19132
|
-
]
|
|
19133
|
-
|
|
19134
|
-
|
|
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
|
-
|
|
20002
|
+
if (a.length === 0) return /* @__PURE__ */ P("span", {
|
|
20001
20003
|
className: "text-xs text-foreground-subtle",
|
|
20002
20004
|
children: "No active sources"
|
|
20003
|
-
})
|
|
20004
|
-
|
|
20005
|
-
|
|
20006
|
-
|
|
20007
|
-
|
|
20008
|
-
|
|
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
|
|
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(
|
|
20300
|
-
|
|
20301
|
-
|
|
20302
|
-
|
|
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",
|