@camstack/addon-agent-ui 1.2.265 → 1.2.266
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/addon.js +491 -72
- package/dist/assets/{MotionZonesSettings-BLSlibl9.js → MotionZonesSettings-CYFttD5V.js} +1 -1
- package/dist/assets/{PrivacyMaskSettings-D0gv4kNZ.js → PrivacyMaskSettings-GEK-fRZ4.js} +1 -1
- package/dist/assets/{SceneMonitorEditor-D5rCHwkl.js → SceneMonitorEditor-B843h7k3.js} +1 -1
- package/dist/assets/index-XNs7KrPB.js +112 -0
- package/dist/assets/index-bfa1-DT6.css +2 -0
- package/dist/index.html +2 -2
- package/package.json +1 -1
- package/dist/assets/index-1hdxo5Nk.css +0 -2
- package/dist/assets/index-Bc74PdAb.js +0 -112
package/dist/addon.js
CHANGED
|
@@ -15847,6 +15847,13 @@ var ComposerUnreadableBlockSchema = object({
|
|
|
15847
15847
|
/** The parse error, in the operator's words. */
|
|
15848
15848
|
error: string()
|
|
15849
15849
|
});
|
|
15850
|
+
/** A confirmed release the hub did not accept. `deviceId` is the claim's device. */
|
|
15851
|
+
var UnreleasedClaimSchema = object({
|
|
15852
|
+
deviceId: number().int(),
|
|
15853
|
+
capName: string(),
|
|
15854
|
+
owner: string(),
|
|
15855
|
+
error: string()
|
|
15856
|
+
});
|
|
15850
15857
|
method(object({
|
|
15851
15858
|
/** The shared Blocks integration; null until `core-blocks` has reconciled it. */
|
|
15852
15859
|
integrationId: string().nullable(),
|
|
@@ -15856,7 +15863,13 @@ method(object({
|
|
|
15856
15863
|
/** Operator restarts: rebuild these runtimes and re-resolve their sources. Stores nothing (D62). */
|
|
15857
15864
|
restartBlockIds: array(string()),
|
|
15858
15865
|
/** Composition rows that exist but do not parse: held, never withdrawn, reported failed. */
|
|
15859
|
-
unreadableBlocks: array(ComposerUnreadableBlockSchema)
|
|
15866
|
+
unreadableBlocks: array(ComposerUnreadableBlockSchema),
|
|
15867
|
+
/**
|
|
15868
|
+
* Operator-confirmed deletions. Their claims are released on this apply,
|
|
15869
|
+
* before any replacement block claims. A block that merely vanished from the
|
|
15870
|
+
* snapshot is not listed here and still waits for two applies (D49).
|
|
15871
|
+
*/
|
|
15872
|
+
retiredBlockIds: array(string()).optional()
|
|
15860
15873
|
}), object({
|
|
15861
15874
|
blocks: array(object({
|
|
15862
15875
|
blockId: string(),
|
|
@@ -15868,7 +15881,13 @@ method(object({
|
|
|
15868
15881
|
* integration unknown, its own rows unread or read empty once). An empty
|
|
15869
15882
|
* apply the caller owes is paid off only by one the composer acted on (D49).
|
|
15870
15883
|
*/
|
|
15871
|
-
acted: boolean()
|
|
15884
|
+
acted: boolean(),
|
|
15885
|
+
/**
|
|
15886
|
+
* Confirmed releases this apply tried and the hub did not accept. Empty when
|
|
15887
|
+
* every one landed (or there was nothing to hand back). Absent on a result
|
|
15888
|
+
* that never got that far.
|
|
15889
|
+
*/
|
|
15890
|
+
unreleasedClaims: array(UnreleasedClaimSchema).optional()
|
|
15872
15891
|
}), {
|
|
15873
15892
|
kind: "mutation",
|
|
15874
15893
|
auth: "admin"
|
|
@@ -41731,6 +41750,381 @@ var _macroLookup = /* @__PURE__ */ new Map();
|
|
|
41731
41750
|
for (const [k, v] of Object.entries(YAMNET_TO_MACRO.mapping)) _macroLookup.set(k.toLowerCase(), v);
|
|
41732
41751
|
for (const [k, v] of Object.entries(APPLE_SA_TO_MACRO.mapping)) _macroLookup.set(k.toLowerCase(), v);
|
|
41733
41752
|
/**
|
|
41753
|
+
* Palette entry ids (D939). Audio is the one gradient; `audio-*` leaves are
|
|
41754
|
+
* not entries. `heatmapScrub` is a mark, not an event kind.
|
|
41755
|
+
*/
|
|
41756
|
+
var PALETTE_ENTRY_IDS = [
|
|
41757
|
+
"motion",
|
|
41758
|
+
"audio",
|
|
41759
|
+
"recording",
|
|
41760
|
+
"live",
|
|
41761
|
+
"heatmapScrub",
|
|
41762
|
+
"person",
|
|
41763
|
+
"vehicle",
|
|
41764
|
+
"animal",
|
|
41765
|
+
"package",
|
|
41766
|
+
"sensor",
|
|
41767
|
+
"control",
|
|
41768
|
+
"face",
|
|
41769
|
+
"plate",
|
|
41770
|
+
"car",
|
|
41771
|
+
"truck",
|
|
41772
|
+
"bus",
|
|
41773
|
+
"motorcycle",
|
|
41774
|
+
"bicycle",
|
|
41775
|
+
"airplane",
|
|
41776
|
+
"boat",
|
|
41777
|
+
"train",
|
|
41778
|
+
"bird",
|
|
41779
|
+
"dog",
|
|
41780
|
+
"cat",
|
|
41781
|
+
"horse",
|
|
41782
|
+
"sheep",
|
|
41783
|
+
"cow",
|
|
41784
|
+
"elephant",
|
|
41785
|
+
"bear",
|
|
41786
|
+
"zebra",
|
|
41787
|
+
"giraffe",
|
|
41788
|
+
"package-delivered",
|
|
41789
|
+
"package-picked-up",
|
|
41790
|
+
"suitcase",
|
|
41791
|
+
"backpack",
|
|
41792
|
+
"handbag",
|
|
41793
|
+
"contact",
|
|
41794
|
+
"motion-sensor",
|
|
41795
|
+
"smoke",
|
|
41796
|
+
"flood",
|
|
41797
|
+
"gas",
|
|
41798
|
+
"carbon-monoxide",
|
|
41799
|
+
"vibration",
|
|
41800
|
+
"tamper",
|
|
41801
|
+
"presence",
|
|
41802
|
+
"enum-sensor",
|
|
41803
|
+
"device-event",
|
|
41804
|
+
"lock",
|
|
41805
|
+
"cover",
|
|
41806
|
+
"switch",
|
|
41807
|
+
"siren",
|
|
41808
|
+
"button",
|
|
41809
|
+
"doorbell"
|
|
41810
|
+
];
|
|
41811
|
+
var AUDIO_ENTRY_ID = "audio";
|
|
41812
|
+
/** Six rungs, quiet → loud. The opaque end is the entry's hex. */
|
|
41813
|
+
var AUDIO_GRADIENT_ALPHAS = [
|
|
41814
|
+
.3,
|
|
41815
|
+
.42,
|
|
41816
|
+
.55,
|
|
41817
|
+
.7,
|
|
41818
|
+
.85,
|
|
41819
|
+
1
|
|
41820
|
+
];
|
|
41821
|
+
var PALETTE_PRESET_IDS = [
|
|
41822
|
+
"camstack",
|
|
41823
|
+
"high-contrast",
|
|
41824
|
+
"okabe-ito"
|
|
41825
|
+
];
|
|
41826
|
+
/** Frozen palette tables (D939). The spec refuses a table that breaks the rule. */
|
|
41827
|
+
var CAMSTACK_HEX = {
|
|
41828
|
+
motion: "#d946ef",
|
|
41829
|
+
audio: "#059eb8",
|
|
41830
|
+
recording: "#ef4444",
|
|
41831
|
+
live: "#8d7a00",
|
|
41832
|
+
heatmapScrub: "#4b32ff",
|
|
41833
|
+
person: "#11a64c",
|
|
41834
|
+
vehicle: "#3b82f6",
|
|
41835
|
+
animal: "#ea6a09",
|
|
41836
|
+
package: "#924667",
|
|
41837
|
+
sensor: "#624bbc",
|
|
41838
|
+
control: "#944d24",
|
|
41839
|
+
face: "#ed4f8d",
|
|
41840
|
+
plate: "#4b7027",
|
|
41841
|
+
car: "#9684cf",
|
|
41842
|
+
truck: "#0f9b89",
|
|
41843
|
+
bus: "#a734a9",
|
|
41844
|
+
motorcycle: "#c1133a",
|
|
41845
|
+
bicycle: "#0e6a9b",
|
|
41846
|
+
airplane: "#7c9928",
|
|
41847
|
+
boat: "#b17933",
|
|
41848
|
+
train: "#ad6ca3",
|
|
41849
|
+
bird: "#0f7c55",
|
|
41850
|
+
dog: "#c82700",
|
|
41851
|
+
cat: "#7268f2",
|
|
41852
|
+
horse: "#cb795e",
|
|
41853
|
+
sheep: "#b8636b",
|
|
41854
|
+
cow: "#cb2969",
|
|
41855
|
+
elephant: "#1158d2",
|
|
41856
|
+
bear: "#8d5e00",
|
|
41857
|
+
zebra: "#0097d6",
|
|
41858
|
+
giraffe: "#8f61bb",
|
|
41859
|
+
"package-delivered": "#cd3f9b",
|
|
41860
|
+
"package-picked-up": "#388a08",
|
|
41861
|
+
suitcase: "#666800",
|
|
41862
|
+
backpack: "#ec5022",
|
|
41863
|
+
handbag: "#a76ef8",
|
|
41864
|
+
contact: "#ab5a49",
|
|
41865
|
+
"motion-sensor": "#b95d1a",
|
|
41866
|
+
smoke: "#dd3858",
|
|
41867
|
+
flood: "#b31e7d",
|
|
41868
|
+
gas: "#5b70b5",
|
|
41869
|
+
"carbon-monoxide": "#7b4e8e",
|
|
41870
|
+
vibration: "#e65bba",
|
|
41871
|
+
tamper: "#98464b",
|
|
41872
|
+
presence: "#3a9468",
|
|
41873
|
+
"enum-sensor": "#7885f8",
|
|
41874
|
+
"device-event": "#8c43c8",
|
|
41875
|
+
lock: "#649653",
|
|
41876
|
+
cover: "#c67597",
|
|
41877
|
+
switch: "#7a812a",
|
|
41878
|
+
siren: "#ac5d7f",
|
|
41879
|
+
button: "#b276cd",
|
|
41880
|
+
doorbell: "#0087ab"
|
|
41881
|
+
};
|
|
41882
|
+
var CAMSTACK_FALLBACK = [
|
|
41883
|
+
"#b34dc7",
|
|
41884
|
+
"#1d7d34",
|
|
41885
|
+
"#db6b6c",
|
|
41886
|
+
"#a43d29",
|
|
41887
|
+
"#0e6ee6",
|
|
41888
|
+
"#29a10b",
|
|
41889
|
+
"#a98731",
|
|
41890
|
+
"#0181c6"
|
|
41891
|
+
];
|
|
41892
|
+
var HIGH_CONTRAST_HEX = {
|
|
41893
|
+
motion: "#964360",
|
|
41894
|
+
audio: "#23a132",
|
|
41895
|
+
recording: "#2494ca",
|
|
41896
|
+
live: "#bd7e2b",
|
|
41897
|
+
heatmapScrub: "#ad6eea",
|
|
41898
|
+
person: "#62611e",
|
|
41899
|
+
vehicle: "#f4534c",
|
|
41900
|
+
animal: "#1556cd",
|
|
41901
|
+
package: "#9c4415",
|
|
41902
|
+
sensor: "#066c48",
|
|
41903
|
+
control: "#f2479f",
|
|
41904
|
+
face: "#139d8a",
|
|
41905
|
+
plate: "#909024",
|
|
41906
|
+
car: "#8e35ab",
|
|
41907
|
+
truck: "#bd0b2b",
|
|
41908
|
+
bus: "#7a88ca",
|
|
41909
|
+
motorcycle: "#e26725",
|
|
41910
|
+
bicycle: "#a6679b",
|
|
41911
|
+
airplane: "#7c5720",
|
|
41912
|
+
boat: "#467a1b",
|
|
41913
|
+
train: "#6f65a4",
|
|
41914
|
+
bird: "#cb717f",
|
|
41915
|
+
dog: "#c62490",
|
|
41916
|
+
cat: "#b36850",
|
|
41917
|
+
horse: "#1872ac",
|
|
41918
|
+
sheep: "#927939",
|
|
41919
|
+
cow: "#428a5c",
|
|
41920
|
+
elephant: "#d41160",
|
|
41921
|
+
bear: "#799453",
|
|
41922
|
+
zebra: "#a85455",
|
|
41923
|
+
giraffe: "#746be8",
|
|
41924
|
+
"package-delivered": "#824a80",
|
|
41925
|
+
"package-picked-up": "#614ac1",
|
|
41926
|
+
suitcase: "#2f77f3",
|
|
41927
|
+
backpack: "#fa476d",
|
|
41928
|
+
handbag: "#c14cbe",
|
|
41929
|
+
contact: "#c83921",
|
|
41930
|
+
"motion-sensor": "#a07ebd",
|
|
41931
|
+
smoke: "#a25b13",
|
|
41932
|
+
flood: "#526bab",
|
|
41933
|
+
gas: "#924938",
|
|
41934
|
+
"carbon-monoxide": "#bb7e53",
|
|
41935
|
+
vibration: "#b66182",
|
|
41936
|
+
tamper: "#3c6931",
|
|
41937
|
+
presence: "#6c851d",
|
|
41938
|
+
"enum-sensor": "#ad2d48",
|
|
41939
|
+
"device-event": "#5e9b04",
|
|
41940
|
+
lock: "#00a062",
|
|
41941
|
+
cover: "#ad8624",
|
|
41942
|
+
switch: "#d05259",
|
|
41943
|
+
siren: "#cd67b3",
|
|
41944
|
+
button: "#c9746a",
|
|
41945
|
+
doorbell: "#338eeb"
|
|
41946
|
+
};
|
|
41947
|
+
var HIGH_CONTRAST_FALLBACK = [
|
|
41948
|
+
"#817f3b",
|
|
41949
|
+
"#a0733e",
|
|
41950
|
+
"#8658b2",
|
|
41951
|
+
"#956301",
|
|
41952
|
+
"#bc652d",
|
|
41953
|
+
"#647331",
|
|
41954
|
+
"#a14c9e",
|
|
41955
|
+
"#d14e71"
|
|
41956
|
+
];
|
|
41957
|
+
var OKABE_ITO_HEX = {
|
|
41958
|
+
motion: "#b88128",
|
|
41959
|
+
audio: "#1096c8",
|
|
41960
|
+
recording: "#009e73",
|
|
41961
|
+
live: "#9c8c22",
|
|
41962
|
+
heatmapScrub: "#0072b2",
|
|
41963
|
+
person: "#d55e00",
|
|
41964
|
+
vehicle: "#c0739f",
|
|
41965
|
+
animal: "#226d18",
|
|
41966
|
+
package: "#91446c",
|
|
41967
|
+
sensor: "#217b56",
|
|
41968
|
+
control: "#648647",
|
|
41969
|
+
face: "#c22998",
|
|
41970
|
+
plate: "#fa4575",
|
|
41971
|
+
car: "#956301",
|
|
41972
|
+
truck: "#2f77f3",
|
|
41973
|
+
bus: "#7a4e86",
|
|
41974
|
+
motorcycle: "#f54597",
|
|
41975
|
+
bicycle: "#bb3e75",
|
|
41976
|
+
airplane: "#e054c0",
|
|
41977
|
+
boat: "#457942",
|
|
41978
|
+
train: "#867afa",
|
|
41979
|
+
bird: "#88914c",
|
|
41980
|
+
dog: "#1556cd",
|
|
41981
|
+
cat: "#71702c",
|
|
41982
|
+
horse: "#9b4fa4",
|
|
41983
|
+
sheep: "#c0559d",
|
|
41984
|
+
cow: "#d14f65",
|
|
41985
|
+
elephant: "#98470f",
|
|
41986
|
+
bear: "#595896",
|
|
41987
|
+
zebra: "#96790e",
|
|
41988
|
+
giraffe: "#cb717b",
|
|
41989
|
+
"package-delivered": "#139d8a",
|
|
41990
|
+
"package-picked-up": "#906ead",
|
|
41991
|
+
suitcase: "#d02939",
|
|
41992
|
+
backpack: "#d41160",
|
|
41993
|
+
handbag: "#f64f54",
|
|
41994
|
+
contact: "#7258d2",
|
|
41995
|
+
"motion-sensor": "#b66182",
|
|
41996
|
+
smoke: "#627abb",
|
|
41997
|
+
flood: "#b86ae4",
|
|
41998
|
+
gas: "#a95261",
|
|
41999
|
+
"carbon-monoxide": "#c65d3c",
|
|
42000
|
+
vibration: "#7a40b7",
|
|
42001
|
+
tamper: "#914b34",
|
|
42002
|
+
presence: "#9481c3",
|
|
42003
|
+
"enum-sensor": "#ac6d47",
|
|
42004
|
+
"device-event": "#7b6fce",
|
|
42005
|
+
lock: "#c67662",
|
|
42006
|
+
cover: "#a6564d",
|
|
42007
|
+
switch: "#ad2c4e",
|
|
42008
|
+
siren: "#348e08",
|
|
42009
|
+
button: "#d27303",
|
|
42010
|
+
doorbell: "#55770f"
|
|
42011
|
+
};
|
|
42012
|
+
var OKABE_ITO_FALLBACK = [
|
|
42013
|
+
"#9a3784",
|
|
42014
|
+
"#a7392c",
|
|
42015
|
+
"#409d50",
|
|
42016
|
+
"#6987e7",
|
|
42017
|
+
"#ee5b3d",
|
|
42018
|
+
"#c0430d",
|
|
42019
|
+
"#af79b3",
|
|
42020
|
+
"#4b6628"
|
|
42021
|
+
];
|
|
42022
|
+
/**
|
|
42023
|
+
* The display palette (D939). One table of colours, three presets, one
|
|
42024
|
+
* validator. Taxonomy colours and every consumer read this — there is no
|
|
42025
|
+
* second hex table.
|
|
42026
|
+
*/
|
|
42027
|
+
var paletteHexSchema = string().regex(/^#[0-9a-f]{6}$/);
|
|
42028
|
+
var paletteSwatchSchema = discriminatedUnion("form", [object({
|
|
42029
|
+
form: literal("solid"),
|
|
42030
|
+
hex: paletteHexSchema
|
|
42031
|
+
}), object({
|
|
42032
|
+
form: literal("gradient"),
|
|
42033
|
+
hex: paletteHexSchema,
|
|
42034
|
+
alphas: array(number().gt(0).lte(1)).length(AUDIO_GRADIENT_ALPHAS.length)
|
|
42035
|
+
})]);
|
|
42036
|
+
var paletteReadySchema = object({
|
|
42037
|
+
status: literal("ready"),
|
|
42038
|
+
presetId: _enum(PALETTE_PRESET_IDS),
|
|
42039
|
+
customized: boolean(),
|
|
42040
|
+
source: _enum(["stored", "unconfigured"]),
|
|
42041
|
+
swatches: record(string(), paletteSwatchSchema),
|
|
42042
|
+
fallbacks: array(paletteHexSchema).length(8)
|
|
42043
|
+
});
|
|
42044
|
+
var paletteResultSchema = discriminatedUnion("status", [paletteReadySchema, object({
|
|
42045
|
+
status: literal("unknown"),
|
|
42046
|
+
reason: string()
|
|
42047
|
+
})]);
|
|
42048
|
+
var setPaletteInputSchema = union([object({ presetId: string() }), object({
|
|
42049
|
+
presetId: string(),
|
|
42050
|
+
overrides: record(string(), paletteSwatchSchema)
|
|
42051
|
+
})]);
|
|
42052
|
+
object({
|
|
42053
|
+
presetId: string(),
|
|
42054
|
+
overrides: record(string(), paletteSwatchSchema)
|
|
42055
|
+
});
|
|
42056
|
+
function solid(hex) {
|
|
42057
|
+
return {
|
|
42058
|
+
form: "solid",
|
|
42059
|
+
hex
|
|
42060
|
+
};
|
|
42061
|
+
}
|
|
42062
|
+
function audioGradient(hex) {
|
|
42063
|
+
return {
|
|
42064
|
+
form: "gradient",
|
|
42065
|
+
hex,
|
|
42066
|
+
alphas: [...AUDIO_GRADIENT_ALPHAS]
|
|
42067
|
+
};
|
|
42068
|
+
}
|
|
42069
|
+
function swatchesFrom(hexes) {
|
|
42070
|
+
const out = {};
|
|
42071
|
+
for (const id of PALETTE_ENTRY_IDS) {
|
|
42072
|
+
const hex = hexes[id];
|
|
42073
|
+
if (hex === void 0) throw new Error(`palette table missing ${id}`);
|
|
42074
|
+
out[id] = id === "audio" ? audioGradient(hex) : solid(hex);
|
|
42075
|
+
}
|
|
42076
|
+
return out;
|
|
42077
|
+
}
|
|
42078
|
+
function preset(id, name, hexes, fallbacks) {
|
|
42079
|
+
return {
|
|
42080
|
+
id,
|
|
42081
|
+
name,
|
|
42082
|
+
swatches: swatchesFrom(hexes),
|
|
42083
|
+
fallbacks
|
|
42084
|
+
};
|
|
42085
|
+
}
|
|
42086
|
+
var DISPLAY_PRESETS = [
|
|
42087
|
+
preset("camstack", "CamStack", CAMSTACK_HEX, CAMSTACK_FALLBACK),
|
|
42088
|
+
preset("high-contrast", "High contrast", HIGH_CONTRAST_HEX, HIGH_CONTRAST_FALLBACK),
|
|
42089
|
+
preset("okabe-ito", "Colour-blind safe", OKABE_ITO_HEX, OKABE_ITO_FALLBACK)
|
|
42090
|
+
];
|
|
42091
|
+
function presetById(id) {
|
|
42092
|
+
return DISPLAY_PRESETS.find((item) => item.id === id);
|
|
42093
|
+
}
|
|
42094
|
+
function bundledCamstack() {
|
|
42095
|
+
const presetRow = presetById("camstack");
|
|
42096
|
+
if (presetRow === void 0) throw new Error("CamStack preset missing");
|
|
42097
|
+
return readyOf(presetRow, "unconfigured", false);
|
|
42098
|
+
}
|
|
42099
|
+
function readyOf(row, source, customized) {
|
|
42100
|
+
return {
|
|
42101
|
+
status: "ready",
|
|
42102
|
+
presetId: row.id,
|
|
42103
|
+
customized,
|
|
42104
|
+
source,
|
|
42105
|
+
swatches: row.swatches,
|
|
42106
|
+
fallbacks: [...row.fallbacks]
|
|
42107
|
+
};
|
|
42108
|
+
}
|
|
42109
|
+
function hashFallback(kind, fallbacks) {
|
|
42110
|
+
let hash = 0;
|
|
42111
|
+
for (let i = 0; i < kind.length; i++) hash = hash * 31 + (kind.codePointAt(i) ?? 0) >>> 0;
|
|
42112
|
+
const hex = fallbacks[hash % fallbacks.length];
|
|
42113
|
+
if (hex === void 0) throw new Error("display palette has no fallback colour");
|
|
42114
|
+
return hex;
|
|
42115
|
+
}
|
|
42116
|
+
/** Colour a kind paints with. Audio leaves share the audio gradient's hex. */
|
|
42117
|
+
function paintHex(swatches, fallbacks, kind) {
|
|
42118
|
+
const key = kind.trim().toLowerCase();
|
|
42119
|
+
if (key.startsWith("audio-")) {
|
|
42120
|
+
const audio = swatches[AUDIO_ENTRY_ID];
|
|
42121
|
+
return audio !== void 0 ? audio.hex : hashFallback(key, fallbacks);
|
|
42122
|
+
}
|
|
42123
|
+
const direct = swatches[key];
|
|
42124
|
+
if (direct !== void 0) return direct.hex;
|
|
42125
|
+
return hashFallback(key, fallbacks);
|
|
42126
|
+
}
|
|
42127
|
+
/**
|
|
41734
42128
|
* Unified event-kind taxonomy — THE single source of truth for
|
|
41735
42129
|
* `kind → { parentKind, category, level, color, iconId, labelKey, label,
|
|
41736
42130
|
* icon }`.
|
|
@@ -41744,109 +42138,88 @@ for (const [k, v] of Object.entries(APPLE_SA_TO_MACRO.mapping)) _macroLookup.set
|
|
|
41744
42138
|
* - `addon-post-analysis/shared/frame/box-drawer.ts` (DEFAULT_COLOR)
|
|
41745
42139
|
* - the COCO / audio class maps (macro ↔ sub relationships)
|
|
41746
42140
|
*
|
|
41747
|
-
* The DATA (serializable —
|
|
41748
|
-
* `@camstack/types`.
|
|
41749
|
-
*
|
|
41750
|
-
*
|
|
41751
|
-
*
|
|
42141
|
+
* The DATA (serializable — parentKind / iconId / labelKey) lives here in
|
|
42142
|
+
* `@camstack/types`. Colour is NOT a second table: each entry's `color` is
|
|
42143
|
+
* the bundled CamStack display palette (D939). The effective cluster palette
|
|
42144
|
+
* is the `display-palette` capability. The UI-side mapping `iconId → lucide
|
|
42145
|
+
* component` and `labelKey → t()` lives in `@camstack/ui-library`.
|
|
41752
42146
|
*
|
|
41753
42147
|
* Two levels only (v1 YAGNI): macro → sub. `person` is a leaf macro.
|
|
41754
42148
|
*/
|
|
41755
|
-
var
|
|
41756
|
-
|
|
41757
|
-
|
|
41758
|
-
|
|
41759
|
-
|
|
41760
|
-
|
|
41761
|
-
|
|
41762
|
-
|
|
41763
|
-
|
|
41764
|
-
|
|
41765
|
-
};
|
|
41766
|
-
var DETECTION_SUB_COLORS = {
|
|
41767
|
-
car: "#f59e0b",
|
|
41768
|
-
truck: "#d97706",
|
|
41769
|
-
bus: "#b45309",
|
|
41770
|
-
motorcycle: "#eab308",
|
|
41771
|
-
bicycle: "#ca8a04",
|
|
41772
|
-
airplane: "#60a5fa",
|
|
41773
|
-
boat: "#2563eb",
|
|
41774
|
-
train: "#1d4ed8",
|
|
41775
|
-
bird: "#14b8a6",
|
|
41776
|
-
dog: "#84cc16",
|
|
41777
|
-
cat: "#f97316",
|
|
41778
|
-
horse: "#a16207",
|
|
41779
|
-
sheep: "#a3a3a3",
|
|
41780
|
-
cow: "#78716c",
|
|
41781
|
-
elephant: "#6b7280",
|
|
41782
|
-
bear: "#7c2d12",
|
|
41783
|
-
zebra: "#404040",
|
|
41784
|
-
giraffe: "#d4a373"
|
|
41785
|
-
};
|
|
42149
|
+
var BUNDLED_PALETTE = bundledCamstack();
|
|
42150
|
+
function kindColor(kind) {
|
|
42151
|
+
return paintHex(BUNDLED_PALETTE.swatches, BUNDLED_PALETTE.fallbacks, kind);
|
|
42152
|
+
}
|
|
42153
|
+
function firstFallback(fallbacks) {
|
|
42154
|
+
const hex = fallbacks[0];
|
|
42155
|
+
if (hex === void 0) throw new Error("display palette has no fallback colour");
|
|
42156
|
+
return hex;
|
|
42157
|
+
}
|
|
42158
|
+
firstFallback(BUNDLED_PALETTE.fallbacks);
|
|
41786
42159
|
function titleCase(id) {
|
|
41787
42160
|
return id.split(/[-_ ]/).filter((p) => p.length > 0).map((p) => p.charAt(0).toUpperCase() + p.slice(1)).join(" ");
|
|
41788
42161
|
}
|
|
41789
42162
|
var entries = /* @__PURE__ */ new Map();
|
|
41790
|
-
function macro(kind, category,
|
|
42163
|
+
function macro(kind, category, iconId, label) {
|
|
41791
42164
|
entries.set(kind, {
|
|
41792
42165
|
kind,
|
|
41793
42166
|
parentKind: null,
|
|
41794
42167
|
level: "macro",
|
|
41795
42168
|
category,
|
|
41796
|
-
color,
|
|
42169
|
+
color: kindColor(kind),
|
|
41797
42170
|
iconId,
|
|
41798
42171
|
labelKey: `eventKind.${kind}`,
|
|
41799
42172
|
label
|
|
41800
42173
|
});
|
|
41801
42174
|
}
|
|
41802
|
-
function sub(kind, parentKind, category,
|
|
42175
|
+
function sub(kind, parentKind, category, iconId, label) {
|
|
41803
42176
|
entries.set(kind, {
|
|
41804
42177
|
kind,
|
|
41805
42178
|
parentKind,
|
|
41806
42179
|
level: "sub",
|
|
41807
42180
|
category,
|
|
41808
|
-
color,
|
|
42181
|
+
color: kindColor(kind),
|
|
41809
42182
|
iconId,
|
|
41810
42183
|
labelKey: `eventKind.${kind}`,
|
|
41811
42184
|
label
|
|
41812
42185
|
});
|
|
41813
42186
|
}
|
|
41814
|
-
macro("motion", "motion",
|
|
41815
|
-
macro("audio", "audio",
|
|
41816
|
-
macro("person", "detection",
|
|
41817
|
-
macro("vehicle", "detection",
|
|
41818
|
-
macro("animal", "detection",
|
|
41819
|
-
macro("package", "package",
|
|
41820
|
-
macro("sensor", "sensor",
|
|
41821
|
-
macro("control", "control",
|
|
42187
|
+
macro("motion", "motion", "motion", "Motion");
|
|
42188
|
+
macro("audio", "audio", "audio", "Audio");
|
|
42189
|
+
macro("person", "detection", "person", "Person");
|
|
42190
|
+
macro("vehicle", "detection", "vehicle", "Vehicle");
|
|
42191
|
+
macro("animal", "detection", "animal", "Animal");
|
|
42192
|
+
macro("package", "package", "package", "Package");
|
|
42193
|
+
macro("sensor", "sensor", "sensor", "Sensor");
|
|
42194
|
+
macro("control", "control", "control", "Control");
|
|
41822
42195
|
for (const [cocoClass, macroClass] of Object.entries(COCO_TO_MACRO.mapping)) {
|
|
41823
42196
|
if (macroClass !== "vehicle" && macroClass !== "animal") continue;
|
|
41824
42197
|
if (entries.has(cocoClass)) continue;
|
|
41825
|
-
sub(cocoClass, macroClass, "detection",
|
|
42198
|
+
sub(cocoClass, macroClass, "detection", cocoClass, titleCase(cocoClass));
|
|
41826
42199
|
}
|
|
41827
|
-
sub("package-delivered", "package", "package",
|
|
41828
|
-
sub("package-picked-up", "package", "package",
|
|
41829
|
-
sub("contact", "sensor", "sensor", "
|
|
41830
|
-
sub("motion-sensor", "sensor", "sensor",
|
|
41831
|
-
sub("smoke", "sensor", "sensor", "
|
|
41832
|
-
sub("flood", "sensor", "sensor", "
|
|
41833
|
-
sub("gas", "sensor", "sensor", "
|
|
41834
|
-
sub("carbon-monoxide", "sensor", "sensor", "
|
|
41835
|
-
sub("vibration", "sensor", "sensor", "
|
|
41836
|
-
sub("tamper", "sensor", "sensor", "
|
|
41837
|
-
sub("presence", "sensor", "sensor", "
|
|
41838
|
-
sub("enum-sensor", "sensor", "sensor",
|
|
41839
|
-
sub("device-event", "sensor", "sensor", "
|
|
41840
|
-
sub("lock", "control", "control", "
|
|
41841
|
-
sub("cover", "control", "control", "
|
|
41842
|
-
sub("switch", "control", "control",
|
|
41843
|
-
sub("siren", "control", "control", "
|
|
41844
|
-
sub("button", "control", "control", "
|
|
41845
|
-
sub("doorbell", "control", "control", "
|
|
42200
|
+
sub("package-delivered", "package", "package", "package", "Package delivered");
|
|
42201
|
+
sub("package-picked-up", "package", "package", "package", "Package picked up");
|
|
42202
|
+
sub("contact", "sensor", "sensor", "door", "Contact");
|
|
42203
|
+
sub("motion-sensor", "sensor", "sensor", "pir", "Motion sensor");
|
|
42204
|
+
sub("smoke", "sensor", "sensor", "smoke", "Smoke");
|
|
42205
|
+
sub("flood", "sensor", "sensor", "water", "Water leak");
|
|
42206
|
+
sub("gas", "sensor", "sensor", "gas", "Gas");
|
|
42207
|
+
sub("carbon-monoxide", "sensor", "sensor", "smoke", "Carbon monoxide");
|
|
42208
|
+
sub("vibration", "sensor", "sensor", "vibration", "Vibration");
|
|
42209
|
+
sub("tamper", "sensor", "sensor", "tamper", "Tamper");
|
|
42210
|
+
sub("presence", "sensor", "sensor", "presence", "Presence");
|
|
42211
|
+
sub("enum-sensor", "sensor", "sensor", "generic", "Sensor state");
|
|
42212
|
+
sub("device-event", "sensor", "sensor", "button", "Device event");
|
|
42213
|
+
sub("lock", "control", "control", "lock", "Lock");
|
|
42214
|
+
sub("cover", "control", "control", "door", "Cover");
|
|
42215
|
+
sub("switch", "control", "control", "switch", "Switch");
|
|
42216
|
+
sub("siren", "control", "control", "siren", "Siren");
|
|
42217
|
+
sub("button", "control", "control", "button", "Button");
|
|
42218
|
+
sub("doorbell", "control", "control", "doorbell", "Doorbell");
|
|
41846
42219
|
for (const l of AUDIO_MACRO_LABELS) {
|
|
41847
42220
|
const kind = `audio-${l.id}`;
|
|
41848
42221
|
if (entries.has(kind)) continue;
|
|
41849
|
-
sub(kind, "audio", "audio",
|
|
42222
|
+
sub(kind, "audio", "audio", kind, l.name);
|
|
41850
42223
|
}
|
|
41851
42224
|
/** The complete taxonomy dictionary, keyed by kind. */
|
|
41852
42225
|
var EVENT_TAXONOMY = Object.freeze(Object.fromEntries(entries));
|
|
@@ -54556,6 +54929,30 @@ DeviceType.Camera, method(object({ deviceId: number() }), DayNightOptionsSchema)
|
|
|
54556
54929
|
auth: "admin"
|
|
54557
54930
|
});
|
|
54558
54931
|
/**
|
|
54932
|
+
* display-palette — the cluster's one colour table (D939).
|
|
54933
|
+
*
|
|
54934
|
+
* Hub singleton. `getPalette` reports `unknown` when the settings store
|
|
54935
|
+
* cannot be read; it does not pretend the bundled preset was stored.
|
|
54936
|
+
* `setPalette` refuses a palette that fails the ΔE / contrast rule and names
|
|
54937
|
+
* the pairs.
|
|
54938
|
+
*/
|
|
54939
|
+
var presetSummarySchema = object({
|
|
54940
|
+
id: string(),
|
|
54941
|
+
name: string(),
|
|
54942
|
+
swatches: record(string(), paletteSwatchSchema),
|
|
54943
|
+
fallbacks: array(string())
|
|
54944
|
+
});
|
|
54945
|
+
method(_void(), paletteResultSchema, {
|
|
54946
|
+
auth: "protected",
|
|
54947
|
+
role: "viewer"
|
|
54948
|
+
}), method(_void(), array(presetSummarySchema).readonly(), {
|
|
54949
|
+
auth: "protected",
|
|
54950
|
+
role: "viewer"
|
|
54951
|
+
}), method(setPaletteInputSchema, paletteReadySchema, {
|
|
54952
|
+
kind: "mutation",
|
|
54953
|
+
auth: "admin"
|
|
54954
|
+
});
|
|
54955
|
+
/**
|
|
54559
54956
|
* Generic device-level status snapshot. Auto-registered by `BaseDevice`
|
|
54560
54957
|
* for every device, regardless of provider — the kernel needs a uniform
|
|
54561
54958
|
* cap-keyed slice for the basic device flags every consumer expects to
|
|
@@ -65454,6 +65851,27 @@ Object.freeze({
|
|
|
65454
65851
|
access: "create",
|
|
65455
65852
|
role: "viewer"
|
|
65456
65853
|
},
|
|
65854
|
+
"displayPalette.getPalette": {
|
|
65855
|
+
capName: "display-palette",
|
|
65856
|
+
capScope: "system",
|
|
65857
|
+
addonId: null,
|
|
65858
|
+
access: "view",
|
|
65859
|
+
role: "viewer"
|
|
65860
|
+
},
|
|
65861
|
+
"displayPalette.listPresets": {
|
|
65862
|
+
capName: "display-palette",
|
|
65863
|
+
capScope: "system",
|
|
65864
|
+
addonId: null,
|
|
65865
|
+
access: "view",
|
|
65866
|
+
role: "viewer"
|
|
65867
|
+
},
|
|
65868
|
+
"displayPalette.setPalette": {
|
|
65869
|
+
capName: "display-palette",
|
|
65870
|
+
capScope: "system",
|
|
65871
|
+
addonId: null,
|
|
65872
|
+
access: "create",
|
|
65873
|
+
role: "admin"
|
|
65874
|
+
},
|
|
65457
65875
|
"doorbell.getStatus": {
|
|
65458
65876
|
capName: "doorbell",
|
|
65459
65877
|
capScope: "device",
|
|
@@ -75910,6 +76328,7 @@ var SYSTEM_CAP_VOCABULARY = {
|
|
|
75910
76328
|
"device-provider": system(INTERNAL),
|
|
75911
76329
|
"device-removal-hook": system(INTERNAL),
|
|
75912
76330
|
"device-state": system("the runtime-state mirror every trigger already reads through"),
|
|
76331
|
+
"display-palette": system("the cluster display palette — one colour table for every client, not a device action"),
|
|
75913
76332
|
"embedding-encoder": system(ML),
|
|
75914
76333
|
"face-gallery": system("the face gallery — curated on its own page"),
|
|
75915
76334
|
"failure-contribution": system(INTERNAL),
|
|
@@ -80098,7 +80517,7 @@ var AgentUIAddon = class extends BaseAddon {
|
|
|
80098
80517
|
capability: adminUiCapability,
|
|
80099
80518
|
provider: {
|
|
80100
80519
|
getStaticDir: async () => ({ staticDir: path.resolve(__dirname) }),
|
|
80101
|
-
getVersion: async () => ({ version: "1.2.
|
|
80520
|
+
getVersion: async () => ({ version: "1.2.266" })
|
|
80102
80521
|
}
|
|
80103
80522
|
}];
|
|
80104
80523
|
}
|