@camstack/addon-osd-manager 0.1.214 → 0.1.215
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 +116 -134
- package/package.json +1 -1
package/dist/_stub.js
CHANGED
|
@@ -19868,20 +19868,13 @@ t();
|
|
|
19868
19868
|
function XS() {
|
|
19869
19869
|
return /* @__PURE__ */ F(bo, {
|
|
19870
19870
|
"data-testid": "osd-slot-content-tabs",
|
|
19871
|
-
children: [
|
|
19872
|
-
|
|
19873
|
-
|
|
19874
|
-
|
|
19875
|
-
|
|
19876
|
-
|
|
19877
|
-
|
|
19878
|
-
children: "Binding"
|
|
19879
|
-
}),
|
|
19880
|
-
/* @__PURE__ */ P(xo, {
|
|
19881
|
-
value: "preview",
|
|
19882
|
-
children: "Preview"
|
|
19883
|
-
})
|
|
19884
|
-
]
|
|
19871
|
+
children: [/* @__PURE__ */ P(xo, {
|
|
19872
|
+
value: "layer",
|
|
19873
|
+
children: "Layer"
|
|
19874
|
+
}), /* @__PURE__ */ P(xo, {
|
|
19875
|
+
value: "binding",
|
|
19876
|
+
children: "Binding"
|
|
19877
|
+
})]
|
|
19885
19878
|
});
|
|
19886
19879
|
}
|
|
19887
19880
|
function ZS({ deviceId: e, slot: t, binding: n, onBindingChange: r, onMarkClear: i, markedClear: o = !1, sources: s, pickerDevices: c, listState: u, templates: d, onRefreshCurrent: f, refreshingCurrent: p = !1 }) {
|
|
@@ -19981,6 +19974,44 @@ function ZS({ deviceId: e, slot: t, binding: n, onBindingChange: r, onMarkClear:
|
|
|
19981
19974
|
"data-testid": "osd-slot-refresh-current",
|
|
19982
19975
|
children: [p ? /* @__PURE__ */ P(wt, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ P(Zt, { className: "h-3.5 w-3.5" }), "Refresh"]
|
|
19983
19976
|
})]
|
|
19977
|
+
}),
|
|
19978
|
+
/* @__PURE__ */ F("div", {
|
|
19979
|
+
className: "space-y-3 border-t border-border pt-3",
|
|
19980
|
+
"data-testid": "osd-slot-section-preview",
|
|
19981
|
+
children: [
|
|
19982
|
+
/* @__PURE__ */ F("div", {
|
|
19983
|
+
className: "flex flex-wrap items-start justify-between gap-2",
|
|
19984
|
+
children: [/* @__PURE__ */ P("p", {
|
|
19985
|
+
className: "text-[11px] text-foreground-subtle",
|
|
19986
|
+
children: "Render this binding without writing the camera."
|
|
19987
|
+
}), /* @__PURE__ */ P(W, {
|
|
19988
|
+
type: "button",
|
|
19989
|
+
variant: "outline",
|
|
19990
|
+
size: "sm",
|
|
19991
|
+
disabled: x || o,
|
|
19992
|
+
onClick: () => void w(),
|
|
19993
|
+
children: "Preview"
|
|
19994
|
+
})]
|
|
19995
|
+
}),
|
|
19996
|
+
S && /* @__PURE__ */ P("p", {
|
|
19997
|
+
className: "text-xs text-danger",
|
|
19998
|
+
role: "alert",
|
|
19999
|
+
children: S.message
|
|
20000
|
+
}),
|
|
20001
|
+
h ? /* @__PURE__ */ F("div", {
|
|
20002
|
+
className: "flex items-center gap-2 text-xs",
|
|
20003
|
+
children: [/* @__PURE__ */ P(ea, {
|
|
20004
|
+
variant: OS(h.outcome),
|
|
20005
|
+
children: ES(h.outcome)
|
|
20006
|
+
}), /* @__PURE__ */ P("span", {
|
|
20007
|
+
className: "text-foreground-muted",
|
|
20008
|
+
children: h.text ? `"${h.text}"` : "(blank)"
|
|
20009
|
+
})]
|
|
20010
|
+
}) : /* @__PURE__ */ P("p", {
|
|
20011
|
+
className: "text-xs text-foreground-subtle",
|
|
20012
|
+
children: "Run Preview to see the rendered text."
|
|
20013
|
+
})
|
|
20014
|
+
]
|
|
19984
20015
|
})
|
|
19985
20016
|
]
|
|
19986
20017
|
}),
|
|
@@ -20033,45 +20064,6 @@ function ZS({ deviceId: e, slot: t, binding: n, onBindingChange: r, onMarkClear:
|
|
|
20033
20064
|
})
|
|
20034
20065
|
}) : null] }) : null
|
|
20035
20066
|
]
|
|
20036
|
-
}),
|
|
20037
|
-
/* @__PURE__ */ F(So, {
|
|
20038
|
-
value: "preview",
|
|
20039
|
-
className: "space-y-3 pt-0",
|
|
20040
|
-
"data-testid": "osd-slot-section-preview",
|
|
20041
|
-
children: [
|
|
20042
|
-
/* @__PURE__ */ F("div", {
|
|
20043
|
-
className: "flex flex-wrap items-start justify-between gap-2",
|
|
20044
|
-
children: [/* @__PURE__ */ P("p", {
|
|
20045
|
-
className: "text-[11px] text-foreground-subtle",
|
|
20046
|
-
children: "Render this binding without writing the camera."
|
|
20047
|
-
}), /* @__PURE__ */ P(W, {
|
|
20048
|
-
type: "button",
|
|
20049
|
-
variant: "outline",
|
|
20050
|
-
size: "sm",
|
|
20051
|
-
disabled: x || o,
|
|
20052
|
-
onClick: () => void w(),
|
|
20053
|
-
children: "Preview"
|
|
20054
|
-
})]
|
|
20055
|
-
}),
|
|
20056
|
-
S && /* @__PURE__ */ P("p", {
|
|
20057
|
-
className: "text-xs text-danger",
|
|
20058
|
-
role: "alert",
|
|
20059
|
-
children: S.message
|
|
20060
|
-
}),
|
|
20061
|
-
h ? /* @__PURE__ */ F("div", {
|
|
20062
|
-
className: "flex items-center gap-2 text-xs",
|
|
20063
|
-
children: [/* @__PURE__ */ P(ea, {
|
|
20064
|
-
variant: OS(h.outcome),
|
|
20065
|
-
children: ES(h.outcome)
|
|
20066
|
-
}), /* @__PURE__ */ P("span", {
|
|
20067
|
-
className: "text-foreground-muted",
|
|
20068
|
-
children: h.text ? `"${h.text}"` : "(blank)"
|
|
20069
|
-
})]
|
|
20070
|
-
}) : /* @__PURE__ */ P("p", {
|
|
20071
|
-
className: "text-xs text-foreground-subtle",
|
|
20072
|
-
children: "Run Preview to see the rendered text."
|
|
20073
|
-
})
|
|
20074
|
-
]
|
|
20075
20067
|
})
|
|
20076
20068
|
] });
|
|
20077
20069
|
}
|
|
@@ -20231,9 +20223,10 @@ function tC({ camera: e, pickerDevices: t, listState: r, templates: i, onRefetch
|
|
|
20231
20223
|
});
|
|
20232
20224
|
})(), k = e.supportsOsd && !f.isLoading && ae === null && h.length > 0, se = k && _ !== void 0 && !_.readOnly;
|
|
20233
20225
|
return /* @__PURE__ */ P(yo, {
|
|
20226
|
+
appearance: "pills",
|
|
20234
20227
|
value: w,
|
|
20235
20228
|
onValueChange: (e) => {
|
|
20236
|
-
(e === "layer" || e === "binding"
|
|
20229
|
+
(e === "layer" || e === "binding") && T(e);
|
|
20237
20230
|
},
|
|
20238
20231
|
children: /* @__PURE__ */ P(hb, {
|
|
20239
20232
|
open: !0,
|
|
@@ -20708,9 +20701,10 @@ function xC({ createRequested: e = !1, onCreateConsumed: t }) {
|
|
|
20708
20701
|
onRowClick: (e) => s.openEdit(e.id)
|
|
20709
20702
|
}),
|
|
20710
20703
|
v && u !== null ? /* @__PURE__ */ P(yo, {
|
|
20704
|
+
appearance: "pills",
|
|
20711
20705
|
value: b,
|
|
20712
20706
|
onValueChange: (e) => {
|
|
20713
|
-
(e === "template" || e === "bindings"
|
|
20707
|
+
(e === "template" || e === "bindings") && x(e);
|
|
20714
20708
|
},
|
|
20715
20709
|
children: /* @__PURE__ */ P(hb, {
|
|
20716
20710
|
open: !0,
|
|
@@ -20723,20 +20717,13 @@ function xC({ createRequested: e = !1, onCreateConsumed: t }) {
|
|
|
20723
20717
|
testId: "osd-template-editor",
|
|
20724
20718
|
beforeBody: /* @__PURE__ */ F(bo, {
|
|
20725
20719
|
"data-testid": "osd-tpl-editor-tabs",
|
|
20726
|
-
children: [
|
|
20727
|
-
|
|
20728
|
-
|
|
20729
|
-
|
|
20730
|
-
|
|
20731
|
-
|
|
20732
|
-
|
|
20733
|
-
children: "Bindings"
|
|
20734
|
-
}),
|
|
20735
|
-
/* @__PURE__ */ P(xo, {
|
|
20736
|
-
value: "preview",
|
|
20737
|
-
children: "Preview"
|
|
20738
|
-
})
|
|
20739
|
-
]
|
|
20720
|
+
children: [/* @__PURE__ */ P(xo, {
|
|
20721
|
+
value: "template",
|
|
20722
|
+
children: "Template"
|
|
20723
|
+
}), /* @__PURE__ */ P(xo, {
|
|
20724
|
+
value: "bindings",
|
|
20725
|
+
children: "Bindings"
|
|
20726
|
+
})]
|
|
20740
20727
|
}),
|
|
20741
20728
|
footer: /* @__PURE__ */ P("div", {
|
|
20742
20729
|
className: "flex gap-2",
|
|
@@ -20766,73 +20753,29 @@ function SC({ draft: e, pickerDevices: t, listState: n, onChange: r }) {
|
|
|
20766
20753
|
...e,
|
|
20767
20754
|
bindings: e.bindings.filter(yC)
|
|
20768
20755
|
}, { stateByDevice: s }), [e, s]);
|
|
20769
|
-
return /* @__PURE__ */ F(I, { children: [
|
|
20770
|
-
|
|
20771
|
-
|
|
20772
|
-
|
|
20773
|
-
|
|
20774
|
-
|
|
20775
|
-
|
|
20776
|
-
|
|
20777
|
-
|
|
20778
|
-
|
|
20779
|
-
|
|
20780
|
-
|
|
20781
|
-
|
|
20782
|
-
|
|
20783
|
-
|
|
20784
|
-
|
|
20785
|
-
|
|
20786
|
-
|
|
20787
|
-
}),
|
|
20788
|
-
/* @__PURE__ */ F(So, {
|
|
20789
|
-
value: "bindings",
|
|
20790
|
-
className: "space-y-3 pt-0",
|
|
20791
|
-
"data-testid": "osd-tpl-section-bindings",
|
|
20792
|
-
children: [
|
|
20793
|
-
/* @__PURE__ */ F("div", {
|
|
20794
|
-
className: "flex flex-wrap items-start justify-between gap-2",
|
|
20795
|
-
children: [/* @__PURE__ */ P("p", {
|
|
20796
|
-
className: "text-[11px] text-foreground-subtle",
|
|
20797
|
-
children: "Each binding picks device → child (if a container) → field. The same container can appear on more than one binding."
|
|
20798
|
-
}), /* @__PURE__ */ P(W, {
|
|
20799
|
-
type: "button",
|
|
20800
|
-
size: "sm",
|
|
20801
|
-
variant: "ghost",
|
|
20802
|
-
"data-testid": "osd-tpl-add-binding",
|
|
20803
|
-
onClick: () => {
|
|
20804
|
-
r({
|
|
20805
|
-
...e,
|
|
20806
|
-
bindings: [...e.bindings, vC()]
|
|
20807
|
-
});
|
|
20808
|
-
},
|
|
20809
|
-
children: "Add binding"
|
|
20810
|
-
})]
|
|
20811
|
-
}),
|
|
20812
|
-
e.bindings.length === 0 && /* @__PURE__ */ P("p", {
|
|
20813
|
-
className: "text-xs text-foreground-muted",
|
|
20814
|
-
children: "No bindings yet — add one to start."
|
|
20815
|
-
}),
|
|
20816
|
-
e.bindings.map((i, o) => /* @__PURE__ */ P(CC, {
|
|
20817
|
-
binding: i,
|
|
20818
|
-
index: o,
|
|
20819
|
-
draft: e,
|
|
20820
|
-
pickerDevices: t,
|
|
20821
|
-
listState: n,
|
|
20822
|
-
sources: a,
|
|
20823
|
-
stateByDevice: s,
|
|
20824
|
-
onChange: r
|
|
20825
|
-
}, `binding-${o}`))
|
|
20826
|
-
]
|
|
20827
|
-
}),
|
|
20828
|
-
/* @__PURE__ */ F(So, {
|
|
20829
|
-
value: "preview",
|
|
20830
|
-
className: "space-y-3 pt-0",
|
|
20756
|
+
return /* @__PURE__ */ F(I, { children: [/* @__PURE__ */ F(So, {
|
|
20757
|
+
value: "template",
|
|
20758
|
+
className: "space-y-3 pt-0",
|
|
20759
|
+
"data-testid": "osd-tpl-section-template",
|
|
20760
|
+
children: [/* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P($a, {
|
|
20761
|
+
htmlFor: "osd-tpl-name",
|
|
20762
|
+
children: "Name"
|
|
20763
|
+
}), /* @__PURE__ */ P(Oi, {
|
|
20764
|
+
id: "osd-tpl-name",
|
|
20765
|
+
"data-testid": "osd-tpl-name",
|
|
20766
|
+
value: e.name,
|
|
20767
|
+
maxLength: 64,
|
|
20768
|
+
onChange: (t) => r({
|
|
20769
|
+
...e,
|
|
20770
|
+
name: t.target.value
|
|
20771
|
+
})
|
|
20772
|
+
})] }), /* @__PURE__ */ F("div", {
|
|
20773
|
+
className: "space-y-3 border-t border-border pt-3",
|
|
20831
20774
|
"data-testid": "osd-tpl-section-preview",
|
|
20832
20775
|
children: [
|
|
20833
20776
|
/* @__PURE__ */ P("p", {
|
|
20834
20777
|
className: "text-[11px] text-foreground-subtle",
|
|
20835
|
-
children: "Parser tokens expand from the bindings
|
|
20778
|
+
children: "Parser tokens expand from the bindings on the Bindings tab."
|
|
20836
20779
|
}),
|
|
20837
20780
|
/* @__PURE__ */ P(iS, {
|
|
20838
20781
|
label: "Parser",
|
|
@@ -20862,8 +20805,47 @@ function SC({ draft: e, pickerDevices: t, listState: n, onChange: r }) {
|
|
|
20862
20805
|
})]
|
|
20863
20806
|
})
|
|
20864
20807
|
]
|
|
20865
|
-
})
|
|
20866
|
-
|
|
20808
|
+
})]
|
|
20809
|
+
}), /* @__PURE__ */ F(So, {
|
|
20810
|
+
value: "bindings",
|
|
20811
|
+
className: "space-y-3 pt-0",
|
|
20812
|
+
"data-testid": "osd-tpl-section-bindings",
|
|
20813
|
+
children: [
|
|
20814
|
+
/* @__PURE__ */ F("div", {
|
|
20815
|
+
className: "flex flex-wrap items-start justify-between gap-2",
|
|
20816
|
+
children: [/* @__PURE__ */ P("p", {
|
|
20817
|
+
className: "text-[11px] text-foreground-subtle",
|
|
20818
|
+
children: "Each binding picks device → child (if a container) → field. The same container can appear on more than one binding."
|
|
20819
|
+
}), /* @__PURE__ */ P(W, {
|
|
20820
|
+
type: "button",
|
|
20821
|
+
size: "sm",
|
|
20822
|
+
variant: "ghost",
|
|
20823
|
+
"data-testid": "osd-tpl-add-binding",
|
|
20824
|
+
onClick: () => {
|
|
20825
|
+
r({
|
|
20826
|
+
...e,
|
|
20827
|
+
bindings: [...e.bindings, vC()]
|
|
20828
|
+
});
|
|
20829
|
+
},
|
|
20830
|
+
children: "Add binding"
|
|
20831
|
+
})]
|
|
20832
|
+
}),
|
|
20833
|
+
e.bindings.length === 0 && /* @__PURE__ */ P("p", {
|
|
20834
|
+
className: "text-xs text-foreground-muted",
|
|
20835
|
+
children: "No bindings yet — add one to start."
|
|
20836
|
+
}),
|
|
20837
|
+
e.bindings.map((i, o) => /* @__PURE__ */ P(CC, {
|
|
20838
|
+
binding: i,
|
|
20839
|
+
index: o,
|
|
20840
|
+
draft: e,
|
|
20841
|
+
pickerDevices: t,
|
|
20842
|
+
listState: n,
|
|
20843
|
+
sources: a,
|
|
20844
|
+
stateByDevice: s,
|
|
20845
|
+
onChange: r
|
|
20846
|
+
}, `binding-${o}`))
|
|
20847
|
+
]
|
|
20848
|
+
})] });
|
|
20867
20849
|
}
|
|
20868
20850
|
function CC({ binding: e, index: t, draft: n, pickerDevices: r, listState: i, sources: a, stateByDevice: o, onChange: s }) {
|
|
20869
20851
|
let c = yC(e) ? fC(e, { stateByDevice: o }) : { reason: "Pick a device and field" }, l = {
|