@camstack/types 1.2.408 → 1.2.410

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/client.mjs CHANGED
@@ -21867,6 +21867,390 @@ var _macroLookup = /* @__PURE__ */ new Map();
21867
21867
  for (const [k, v] of Object.entries(YAMNET_TO_MACRO.mapping)) _macroLookup.set(k.toLowerCase(), v);
21868
21868
  for (const [k, v] of Object.entries(APPLE_SA_TO_MACRO.mapping)) _macroLookup.set(k.toLowerCase(), v);
21869
21869
  //#endregion
21870
+ //#region src/catalogs/palette-entries.ts
21871
+ /**
21872
+ * Palette entry ids (D939). Audio is the one gradient; `audio-*` leaves are
21873
+ * not entries. `heatmapScrub` is a mark, not an event kind.
21874
+ */
21875
+ var PALETTE_ENTRY_IDS = [
21876
+ "motion",
21877
+ "audio",
21878
+ "recording",
21879
+ "live",
21880
+ "heatmapScrub",
21881
+ "person",
21882
+ "vehicle",
21883
+ "animal",
21884
+ "package",
21885
+ "sensor",
21886
+ "control",
21887
+ "face",
21888
+ "plate",
21889
+ "car",
21890
+ "truck",
21891
+ "bus",
21892
+ "motorcycle",
21893
+ "bicycle",
21894
+ "airplane",
21895
+ "boat",
21896
+ "train",
21897
+ "bird",
21898
+ "dog",
21899
+ "cat",
21900
+ "horse",
21901
+ "sheep",
21902
+ "cow",
21903
+ "elephant",
21904
+ "bear",
21905
+ "zebra",
21906
+ "giraffe",
21907
+ "package-delivered",
21908
+ "package-picked-up",
21909
+ "suitcase",
21910
+ "backpack",
21911
+ "handbag",
21912
+ "contact",
21913
+ "motion-sensor",
21914
+ "smoke",
21915
+ "flood",
21916
+ "gas",
21917
+ "carbon-monoxide",
21918
+ "vibration",
21919
+ "tamper",
21920
+ "presence",
21921
+ "enum-sensor",
21922
+ "device-event",
21923
+ "lock",
21924
+ "cover",
21925
+ "switch",
21926
+ "siren",
21927
+ "button",
21928
+ "doorbell"
21929
+ ];
21930
+ var AUDIO_ENTRY_ID = "audio";
21931
+ /** Six rungs, quiet → loud. The opaque end is the entry's hex. */
21932
+ var AUDIO_GRADIENT_ALPHAS = [
21933
+ .3,
21934
+ .42,
21935
+ .55,
21936
+ .7,
21937
+ .85,
21938
+ 1
21939
+ ];
21940
+ var PALETTE_PRESET_IDS = [
21941
+ "camstack",
21942
+ "high-contrast",
21943
+ "okabe-ito"
21944
+ ];
21945
+ //#endregion
21946
+ //#region src/catalogs/display-palette-tables.ts
21947
+ /** Frozen palette tables (D939). The spec refuses a table that breaks the rule. */
21948
+ var CAMSTACK_HEX = {
21949
+ motion: "#d946ef",
21950
+ audio: "#059eb8",
21951
+ recording: "#ef4444",
21952
+ live: "#8d7a00",
21953
+ heatmapScrub: "#4b32ff",
21954
+ person: "#11a64c",
21955
+ vehicle: "#3b82f6",
21956
+ animal: "#ea6a09",
21957
+ package: "#924667",
21958
+ sensor: "#624bbc",
21959
+ control: "#944d24",
21960
+ face: "#ed4f8d",
21961
+ plate: "#4b7027",
21962
+ car: "#9684cf",
21963
+ truck: "#0f9b89",
21964
+ bus: "#a734a9",
21965
+ motorcycle: "#c1133a",
21966
+ bicycle: "#0e6a9b",
21967
+ airplane: "#7c9928",
21968
+ boat: "#b17933",
21969
+ train: "#ad6ca3",
21970
+ bird: "#0f7c55",
21971
+ dog: "#c82700",
21972
+ cat: "#7268f2",
21973
+ horse: "#cb795e",
21974
+ sheep: "#b8636b",
21975
+ cow: "#cb2969",
21976
+ elephant: "#1158d2",
21977
+ bear: "#8d5e00",
21978
+ zebra: "#0097d6",
21979
+ giraffe: "#8f61bb",
21980
+ "package-delivered": "#cd3f9b",
21981
+ "package-picked-up": "#388a08",
21982
+ suitcase: "#666800",
21983
+ backpack: "#ec5022",
21984
+ handbag: "#a76ef8",
21985
+ contact: "#ab5a49",
21986
+ "motion-sensor": "#b95d1a",
21987
+ smoke: "#dd3858",
21988
+ flood: "#b31e7d",
21989
+ gas: "#5b70b5",
21990
+ "carbon-monoxide": "#7b4e8e",
21991
+ vibration: "#e65bba",
21992
+ tamper: "#98464b",
21993
+ presence: "#3a9468",
21994
+ "enum-sensor": "#7885f8",
21995
+ "device-event": "#8c43c8",
21996
+ lock: "#649653",
21997
+ cover: "#c67597",
21998
+ switch: "#7a812a",
21999
+ siren: "#ac5d7f",
22000
+ button: "#b276cd",
22001
+ doorbell: "#0087ab"
22002
+ };
22003
+ var CAMSTACK_FALLBACK = [
22004
+ "#b34dc7",
22005
+ "#1d7d34",
22006
+ "#db6b6c",
22007
+ "#a43d29",
22008
+ "#0e6ee6",
22009
+ "#29a10b",
22010
+ "#a98731",
22011
+ "#0181c6"
22012
+ ];
22013
+ var HIGH_CONTRAST_HEX = {
22014
+ motion: "#964360",
22015
+ audio: "#23a132",
22016
+ recording: "#2494ca",
22017
+ live: "#bd7e2b",
22018
+ heatmapScrub: "#ad6eea",
22019
+ person: "#62611e",
22020
+ vehicle: "#f4534c",
22021
+ animal: "#1556cd",
22022
+ package: "#9c4415",
22023
+ sensor: "#066c48",
22024
+ control: "#f2479f",
22025
+ face: "#139d8a",
22026
+ plate: "#909024",
22027
+ car: "#8e35ab",
22028
+ truck: "#bd0b2b",
22029
+ bus: "#7a88ca",
22030
+ motorcycle: "#e26725",
22031
+ bicycle: "#a6679b",
22032
+ airplane: "#7c5720",
22033
+ boat: "#467a1b",
22034
+ train: "#6f65a4",
22035
+ bird: "#cb717f",
22036
+ dog: "#c62490",
22037
+ cat: "#b36850",
22038
+ horse: "#1872ac",
22039
+ sheep: "#927939",
22040
+ cow: "#428a5c",
22041
+ elephant: "#d41160",
22042
+ bear: "#799453",
22043
+ zebra: "#a85455",
22044
+ giraffe: "#746be8",
22045
+ "package-delivered": "#824a80",
22046
+ "package-picked-up": "#614ac1",
22047
+ suitcase: "#2f77f3",
22048
+ backpack: "#fa476d",
22049
+ handbag: "#c14cbe",
22050
+ contact: "#c83921",
22051
+ "motion-sensor": "#a07ebd",
22052
+ smoke: "#a25b13",
22053
+ flood: "#526bab",
22054
+ gas: "#924938",
22055
+ "carbon-monoxide": "#bb7e53",
22056
+ vibration: "#b66182",
22057
+ tamper: "#3c6931",
22058
+ presence: "#6c851d",
22059
+ "enum-sensor": "#ad2d48",
22060
+ "device-event": "#5e9b04",
22061
+ lock: "#00a062",
22062
+ cover: "#ad8624",
22063
+ switch: "#d05259",
22064
+ siren: "#cd67b3",
22065
+ button: "#c9746a",
22066
+ doorbell: "#338eeb"
22067
+ };
22068
+ var HIGH_CONTRAST_FALLBACK = [
22069
+ "#817f3b",
22070
+ "#a0733e",
22071
+ "#8658b2",
22072
+ "#956301",
22073
+ "#bc652d",
22074
+ "#647331",
22075
+ "#a14c9e",
22076
+ "#d14e71"
22077
+ ];
22078
+ var OKABE_ITO_HEX = {
22079
+ motion: "#b88128",
22080
+ audio: "#1096c8",
22081
+ recording: "#009e73",
22082
+ live: "#9c8c22",
22083
+ heatmapScrub: "#0072b2",
22084
+ person: "#d55e00",
22085
+ vehicle: "#c0739f",
22086
+ animal: "#226d18",
22087
+ package: "#91446c",
22088
+ sensor: "#217b56",
22089
+ control: "#648647",
22090
+ face: "#c22998",
22091
+ plate: "#fa4575",
22092
+ car: "#956301",
22093
+ truck: "#2f77f3",
22094
+ bus: "#7a4e86",
22095
+ motorcycle: "#f54597",
22096
+ bicycle: "#bb3e75",
22097
+ airplane: "#e054c0",
22098
+ boat: "#457942",
22099
+ train: "#867afa",
22100
+ bird: "#88914c",
22101
+ dog: "#1556cd",
22102
+ cat: "#71702c",
22103
+ horse: "#9b4fa4",
22104
+ sheep: "#c0559d",
22105
+ cow: "#d14f65",
22106
+ elephant: "#98470f",
22107
+ bear: "#595896",
22108
+ zebra: "#96790e",
22109
+ giraffe: "#cb717b",
22110
+ "package-delivered": "#139d8a",
22111
+ "package-picked-up": "#906ead",
22112
+ suitcase: "#d02939",
22113
+ backpack: "#d41160",
22114
+ handbag: "#f64f54",
22115
+ contact: "#7258d2",
22116
+ "motion-sensor": "#b66182",
22117
+ smoke: "#627abb",
22118
+ flood: "#b86ae4",
22119
+ gas: "#a95261",
22120
+ "carbon-monoxide": "#c65d3c",
22121
+ vibration: "#7a40b7",
22122
+ tamper: "#914b34",
22123
+ presence: "#9481c3",
22124
+ "enum-sensor": "#ac6d47",
22125
+ "device-event": "#7b6fce",
22126
+ lock: "#c67662",
22127
+ cover: "#a6564d",
22128
+ switch: "#ad2c4e",
22129
+ siren: "#348e08",
22130
+ button: "#d27303",
22131
+ doorbell: "#55770f"
22132
+ };
22133
+ var OKABE_ITO_FALLBACK = [
22134
+ "#9a3784",
22135
+ "#a7392c",
22136
+ "#409d50",
22137
+ "#6987e7",
22138
+ "#ee5b3d",
22139
+ "#c0430d",
22140
+ "#af79b3",
22141
+ "#4b6628"
22142
+ ];
22143
+ //#endregion
22144
+ //#region src/catalogs/display-palette.ts
22145
+ /**
22146
+ * The display palette (D939). One table of colours, three presets, one
22147
+ * validator. Taxonomy colours and every consumer read this — there is no
22148
+ * second hex table.
22149
+ */
22150
+ var paletteHexSchema = z.string().regex(/^#[0-9a-f]{6}$/);
22151
+ var paletteSolidSchema = z.object({
22152
+ form: z.literal("solid"),
22153
+ hex: paletteHexSchema
22154
+ });
22155
+ var paletteGradientSchema = z.object({
22156
+ form: z.literal("gradient"),
22157
+ hex: paletteHexSchema,
22158
+ alphas: z.array(z.number().gt(0).lte(1)).length(AUDIO_GRADIENT_ALPHAS.length)
22159
+ });
22160
+ var paletteSwatchSchema = z.discriminatedUnion("form", [paletteSolidSchema, paletteGradientSchema]);
22161
+ var paletteReadySchema = z.object({
22162
+ status: z.literal("ready"),
22163
+ presetId: z.enum(PALETTE_PRESET_IDS),
22164
+ customized: z.boolean(),
22165
+ source: z.enum(["stored", "unconfigured"]),
22166
+ swatches: z.record(z.string(), paletteSwatchSchema),
22167
+ fallbacks: z.array(paletteHexSchema).length(8)
22168
+ });
22169
+ var paletteUnknownSchema = z.object({
22170
+ status: z.literal("unknown"),
22171
+ reason: z.string()
22172
+ });
22173
+ z.discriminatedUnion("status", [paletteReadySchema, paletteUnknownSchema]);
22174
+ z.union([z.object({ presetId: z.string() }), z.object({
22175
+ presetId: z.string(),
22176
+ overrides: z.record(z.string(), paletteSwatchSchema)
22177
+ })]);
22178
+ z.object({
22179
+ presetId: z.string(),
22180
+ overrides: z.record(z.string(), paletteSwatchSchema)
22181
+ });
22182
+ function solid(hex) {
22183
+ return {
22184
+ form: "solid",
22185
+ hex
22186
+ };
22187
+ }
22188
+ function audioGradient(hex) {
22189
+ return {
22190
+ form: "gradient",
22191
+ hex,
22192
+ alphas: [...AUDIO_GRADIENT_ALPHAS]
22193
+ };
22194
+ }
22195
+ function swatchesFrom(hexes) {
22196
+ const out = {};
22197
+ for (const id of PALETTE_ENTRY_IDS) {
22198
+ const hex = hexes[id];
22199
+ if (hex === void 0) throw new Error(`palette table missing ${id}`);
22200
+ out[id] = id === "audio" ? audioGradient(hex) : solid(hex);
22201
+ }
22202
+ return out;
22203
+ }
22204
+ function preset(id, name, hexes, fallbacks) {
22205
+ return {
22206
+ id,
22207
+ name,
22208
+ swatches: swatchesFrom(hexes),
22209
+ fallbacks
22210
+ };
22211
+ }
22212
+ var DISPLAY_PRESETS = [
22213
+ preset("camstack", "CamStack", CAMSTACK_HEX, CAMSTACK_FALLBACK),
22214
+ preset("high-contrast", "High contrast", HIGH_CONTRAST_HEX, HIGH_CONTRAST_FALLBACK),
22215
+ preset("okabe-ito", "Colour-blind safe", OKABE_ITO_HEX, OKABE_ITO_FALLBACK)
22216
+ ];
22217
+ function presetById(id) {
22218
+ return DISPLAY_PRESETS.find((item) => item.id === id);
22219
+ }
22220
+ function bundledCamstack() {
22221
+ const presetRow = presetById("camstack");
22222
+ if (presetRow === void 0) throw new Error("CamStack preset missing");
22223
+ return readyOf(presetRow, "unconfigured", false);
22224
+ }
22225
+ function readyOf(row, source, customized) {
22226
+ return {
22227
+ status: "ready",
22228
+ presetId: row.id,
22229
+ customized,
22230
+ source,
22231
+ swatches: row.swatches,
22232
+ fallbacks: [...row.fallbacks]
22233
+ };
22234
+ }
22235
+ function hashFallback(kind, fallbacks) {
22236
+ let hash = 0;
22237
+ for (let i = 0; i < kind.length; i++) hash = hash * 31 + (kind.codePointAt(i) ?? 0) >>> 0;
22238
+ const hex = fallbacks[hash % fallbacks.length];
22239
+ if (hex === void 0) throw new Error("display palette has no fallback colour");
22240
+ return hex;
22241
+ }
22242
+ /** Colour a kind paints with. Audio leaves share the audio gradient's hex. */
22243
+ function paintHex(swatches, fallbacks, kind) {
22244
+ const key = kind.trim().toLowerCase();
22245
+ if (key.startsWith("audio-")) {
22246
+ const audio = swatches[AUDIO_ENTRY_ID];
22247
+ return audio !== void 0 ? audio.hex : hashFallback(key, fallbacks);
22248
+ }
22249
+ const direct = swatches[key];
22250
+ if (direct !== void 0) return direct.hex;
22251
+ return hashFallback(key, fallbacks);
22252
+ }
22253
+ //#endregion
21870
22254
  //#region src/catalogs/event-taxonomy.ts
21871
22255
  /**
21872
22256
  * Unified event-kind taxonomy — THE single source of truth for
@@ -21882,109 +22266,88 @@ for (const [k, v] of Object.entries(APPLE_SA_TO_MACRO.mapping)) _macroLookup.set
21882
22266
  * - `addon-post-analysis/shared/frame/box-drawer.ts` (DEFAULT_COLOR)
21883
22267
  * - the COCO / audio class maps (macro ↔ sub relationships)
21884
22268
  *
21885
- * The DATA (serializable — color/iconId/labelKey/parentKind) lives here in
21886
- * `@camstack/types`. The UI-side mapping `iconId → lucide component` and
21887
- * `labelKey → t()` lives in `@camstack/ui-library`. UIs never hardcode a
21888
- * color or an icon: they read this dictionary (server descriptors carry the
21889
- * fields inline; the client resolves color/icon/label from `iconId`/`kind`).
22269
+ * The DATA (serializable — parentKind / iconId / labelKey) lives here in
22270
+ * `@camstack/types`. Colour is NOT a second table: each entry's `color` is
22271
+ * the bundled CamStack display palette (D939). The effective cluster palette
22272
+ * is the `display-palette` capability. The UI-side mapping `iconId → lucide
22273
+ * component` and `labelKey → t()` lives in `@camstack/ui-library`.
21890
22274
  *
21891
22275
  * Two levels only (v1 YAGNI): macro → sub. `person` is a leaf macro.
21892
22276
  */
21893
- var TAXONOMY_COLORS = {
21894
- motion: "#f59e0b",
21895
- audio: "#06b6d4",
21896
- person: "#22c55e",
21897
- vehicle: "#3b82f6",
21898
- animal: "#f97316",
21899
- package: "#a855f7",
21900
- sensor: "#8b5cf6",
21901
- control: "#10b981",
21902
- genericDetection: "#64748b"
21903
- };
21904
- var DETECTION_SUB_COLORS = {
21905
- car: "#f59e0b",
21906
- truck: "#d97706",
21907
- bus: "#b45309",
21908
- motorcycle: "#eab308",
21909
- bicycle: "#ca8a04",
21910
- airplane: "#60a5fa",
21911
- boat: "#2563eb",
21912
- train: "#1d4ed8",
21913
- bird: "#14b8a6",
21914
- dog: "#84cc16",
21915
- cat: "#f97316",
21916
- horse: "#a16207",
21917
- sheep: "#a3a3a3",
21918
- cow: "#78716c",
21919
- elephant: "#6b7280",
21920
- bear: "#7c2d12",
21921
- zebra: "#404040",
21922
- giraffe: "#d4a373"
21923
- };
22277
+ var BUNDLED_PALETTE = bundledCamstack();
22278
+ function kindColor(kind) {
22279
+ return paintHex(BUNDLED_PALETTE.swatches, BUNDLED_PALETTE.fallbacks, kind);
22280
+ }
22281
+ function firstFallback(fallbacks) {
22282
+ const hex = fallbacks[0];
22283
+ if (hex === void 0) throw new Error("display palette has no fallback colour");
22284
+ return hex;
22285
+ }
22286
+ firstFallback(BUNDLED_PALETTE.fallbacks);
21924
22287
  function titleCase(id) {
21925
22288
  return id.split(/[-_ ]/).filter((p) => p.length > 0).map((p) => p.charAt(0).toUpperCase() + p.slice(1)).join(" ");
21926
22289
  }
21927
22290
  var entries = /* @__PURE__ */ new Map();
21928
- function macro(kind, category, color, iconId, label) {
22291
+ function macro(kind, category, iconId, label) {
21929
22292
  entries.set(kind, {
21930
22293
  kind,
21931
22294
  parentKind: null,
21932
22295
  level: "macro",
21933
22296
  category,
21934
- color,
22297
+ color: kindColor(kind),
21935
22298
  iconId,
21936
22299
  labelKey: `eventKind.${kind}`,
21937
22300
  label
21938
22301
  });
21939
22302
  }
21940
- function sub(kind, parentKind, category, color, iconId, label) {
22303
+ function sub(kind, parentKind, category, iconId, label) {
21941
22304
  entries.set(kind, {
21942
22305
  kind,
21943
22306
  parentKind,
21944
22307
  level: "sub",
21945
22308
  category,
21946
- color,
22309
+ color: kindColor(kind),
21947
22310
  iconId,
21948
22311
  labelKey: `eventKind.${kind}`,
21949
22312
  label
21950
22313
  });
21951
22314
  }
21952
- macro("motion", "motion", TAXONOMY_COLORS.motion, "motion", "Motion");
21953
- macro("audio", "audio", TAXONOMY_COLORS.audio, "audio", "Audio");
21954
- macro("person", "detection", TAXONOMY_COLORS.person, "person", "Person");
21955
- macro("vehicle", "detection", TAXONOMY_COLORS.vehicle, "vehicle", "Vehicle");
21956
- macro("animal", "detection", TAXONOMY_COLORS.animal, "animal", "Animal");
21957
- macro("package", "package", TAXONOMY_COLORS.package, "package", "Package");
21958
- macro("sensor", "sensor", TAXONOMY_COLORS.sensor, "sensor", "Sensor");
21959
- macro("control", "control", TAXONOMY_COLORS.control, "control", "Control");
22315
+ macro("motion", "motion", "motion", "Motion");
22316
+ macro("audio", "audio", "audio", "Audio");
22317
+ macro("person", "detection", "person", "Person");
22318
+ macro("vehicle", "detection", "vehicle", "Vehicle");
22319
+ macro("animal", "detection", "animal", "Animal");
22320
+ macro("package", "package", "package", "Package");
22321
+ macro("sensor", "sensor", "sensor", "Sensor");
22322
+ macro("control", "control", "control", "Control");
21960
22323
  for (const [cocoClass, macroClass] of Object.entries(COCO_TO_MACRO.mapping)) {
21961
22324
  if (macroClass !== "vehicle" && macroClass !== "animal") continue;
21962
22325
  if (entries.has(cocoClass)) continue;
21963
- sub(cocoClass, macroClass, "detection", DETECTION_SUB_COLORS[cocoClass] ?? TAXONOMY_COLORS.genericDetection, cocoClass, titleCase(cocoClass));
22326
+ sub(cocoClass, macroClass, "detection", cocoClass, titleCase(cocoClass));
21964
22327
  }
21965
- sub("package-delivered", "package", "package", TAXONOMY_COLORS.package, "package", "Package delivered");
21966
- sub("package-picked-up", "package", "package", TAXONOMY_COLORS.package, "package", "Package picked up");
21967
- sub("contact", "sensor", "sensor", "#f59e0b", "door", "Contact");
21968
- sub("motion-sensor", "sensor", "sensor", TAXONOMY_COLORS.sensor, "pir", "Motion sensor");
21969
- sub("smoke", "sensor", "sensor", "#ef4444", "smoke", "Smoke");
21970
- sub("flood", "sensor", "sensor", "#3b82f6", "water", "Water leak");
21971
- sub("gas", "sensor", "sensor", "#ef4444", "gas", "Gas");
21972
- sub("carbon-monoxide", "sensor", "sensor", "#dc2626", "smoke", "Carbon monoxide");
21973
- sub("vibration", "sensor", "sensor", "#eab308", "vibration", "Vibration");
21974
- sub("tamper", "sensor", "sensor", "#f97316", "tamper", "Tamper");
21975
- sub("presence", "sensor", "sensor", "#22c55e", "presence", "Presence");
21976
- sub("enum-sensor", "sensor", "sensor", TAXONOMY_COLORS.sensor, "generic", "Sensor state");
21977
- sub("device-event", "sensor", "sensor", "#10b981", "button", "Device event");
21978
- sub("lock", "control", "control", "#0ea5e9", "lock", "Lock");
21979
- sub("cover", "control", "control", "#0ea5e9", "door", "Cover");
21980
- sub("switch", "control", "control", TAXONOMY_COLORS.control, "switch", "Switch");
21981
- sub("siren", "control", "control", "#dc2626", "siren", "Siren");
21982
- sub("button", "control", "control", "#10b981", "button", "Button");
21983
- sub("doorbell", "control", "control", "#a855f7", "doorbell", "Doorbell");
22328
+ sub("package-delivered", "package", "package", "package", "Package delivered");
22329
+ sub("package-picked-up", "package", "package", "package", "Package picked up");
22330
+ sub("contact", "sensor", "sensor", "door", "Contact");
22331
+ sub("motion-sensor", "sensor", "sensor", "pir", "Motion sensor");
22332
+ sub("smoke", "sensor", "sensor", "smoke", "Smoke");
22333
+ sub("flood", "sensor", "sensor", "water", "Water leak");
22334
+ sub("gas", "sensor", "sensor", "gas", "Gas");
22335
+ sub("carbon-monoxide", "sensor", "sensor", "smoke", "Carbon monoxide");
22336
+ sub("vibration", "sensor", "sensor", "vibration", "Vibration");
22337
+ sub("tamper", "sensor", "sensor", "tamper", "Tamper");
22338
+ sub("presence", "sensor", "sensor", "presence", "Presence");
22339
+ sub("enum-sensor", "sensor", "sensor", "generic", "Sensor state");
22340
+ sub("device-event", "sensor", "sensor", "button", "Device event");
22341
+ sub("lock", "control", "control", "lock", "Lock");
22342
+ sub("cover", "control", "control", "door", "Cover");
22343
+ sub("switch", "control", "control", "switch", "Switch");
22344
+ sub("siren", "control", "control", "siren", "Siren");
22345
+ sub("button", "control", "control", "button", "Button");
22346
+ sub("doorbell", "control", "control", "doorbell", "Doorbell");
21984
22347
  for (const l of AUDIO_MACRO_LABELS) {
21985
22348
  const kind = `audio-${l.id}`;
21986
22349
  if (entries.has(kind)) continue;
21987
- sub(kind, "audio", "audio", TAXONOMY_COLORS.audio, kind, l.name);
22350
+ sub(kind, "audio", "audio", kind, l.name);
21988
22351
  }
21989
22352
  /** The complete taxonomy dictionary, keyed by kind. */
21990
22353
  var EVENT_TAXONOMY = Object.freeze(Object.fromEntries(entries));
@@ -27910,6 +28273,11 @@ function createSystemProxy(api) {
27910
28273
  getAllSnapshots: (input) => dispatch("deviceState", "getAllSnapshots", "query", input),
27911
28274
  listClaims: (input) => dispatch("deviceState", "listClaims", "query", input)
27912
28275
  },
28276
+ displayPalette: {
28277
+ getPalette: (input) => dispatch("displayPalette", "getPalette", "query", input),
28278
+ listPresets: (input) => dispatch("displayPalette", "listPresets", "query", input),
28279
+ setPalette: (input) => dispatch("displayPalette", "setPalette", "mutation", input)
28280
+ },
27913
28281
  faceGallery: {
27914
28282
  listIdentities: (input) => dispatch("faceGallery", "listIdentities", "query", input),
27915
28283
  createIdentity: (input) => dispatch("faceGallery", "createIdentity", "mutation", input),
@@ -6,7 +6,7 @@
6
6
  * This is the shape HomeKit Secure Video's `CameraRecordingDelegate` yields
7
7
  * (`RecordingPacket` #0 is the initialisation, the rest are media fragments),
8
8
  * and it is the same shape a CamStack clip source wants — which is the point.
9
- * One fragmenter, two consumers ([roadmap 4b](../../../../../docs/roadmap.md)).
9
+ * One fragmenter, two consumers (roadmap item 4b, now in the private planning board).
10
10
  * The splitter therefore knows about NEITHER of them: it emits units, and
11
11
  * {@link import('./fmp4-fragment-plane.js').Fmp4FragmentPlane} decides who gets
12
12
  * them.
@@ -53,6 +53,7 @@ import type { deviceProviderCapability } from '../capabilities/device-provider.c
53
53
  import type { deviceRemovalHookCapability } from '../capabilities/device-removal-hook.cap.js';
54
54
  import type { deviceStateCapability } from '../capabilities/device-state.cap.js';
55
55
  import type { dishwasherCapability } from '../capabilities/dishwasher.cap.js';
56
+ import type { displayPaletteCapability } from '../capabilities/display-palette.cap.js';
56
57
  import type { embeddingEncoderCapability } from '../capabilities/embedding-encoder.cap.js';
57
58
  import type { faceGalleryCapability } from '../capabilities/face-gallery.cap.js';
58
59
  import type { failureContributionCapability } from '../capabilities/failure-contribution.cap.js';
@@ -3498,6 +3499,32 @@ export type AppRouter = TrpcCoreRouter<{
3498
3499
  meta: object;
3499
3500
  }>;
3500
3501
  }>>;
3502
+ displayPalette: TRPCBuiltRouter<{
3503
+ ctx: TrpcContext;
3504
+ meta: object;
3505
+ errorShape: AugmentedErrorShape;
3506
+ transformer: true;
3507
+ }, TRPCDecorateCreateRouterOptions<{
3508
+ getPalette: TRPCQueryProcedure<{
3509
+ input: {
3510
+ nodeId?: string | undefined;
3511
+ } | undefined;
3512
+ output: z.infer<typeof displayPaletteCapability.methods.getPalette.output>;
3513
+ meta: object;
3514
+ }>;
3515
+ listPresets: TRPCQueryProcedure<{
3516
+ input: {
3517
+ nodeId?: string | undefined;
3518
+ } | undefined;
3519
+ output: z.infer<typeof displayPaletteCapability.methods.listPresets.output>;
3520
+ meta: object;
3521
+ }>;
3522
+ setPalette: TRPCMutationProcedure<{
3523
+ input: z.input<typeof displayPaletteCapability.methods.setPalette.input>;
3524
+ output: z.infer<typeof displayPaletteCapability.methods.setPalette.output>;
3525
+ meta: object;
3526
+ }>;
3527
+ }>>;
3501
3528
  doorbell: TRPCBuiltRouter<{
3502
3529
  ctx: TrpcContext;
3503
3530
  meta: object;
@@ -60,6 +60,7 @@ export { deviceRemovalHookCapability } from '../capabilities/device-removal-hook
60
60
  export { deviceStateCapability } from '../capabilities/device-state.cap.js';
61
61
  export { deviceStatusCapability } from '../capabilities/device-status.cap.js';
62
62
  export { dishwasherCapability } from '../capabilities/dishwasher.cap.js';
63
+ export { displayPaletteCapability } from '../capabilities/display-palette.cap.js';
63
64
  export { doorbellCapability } from '../capabilities/doorbell.cap.js';
64
65
  export { embeddingEncoderCapability } from '../capabilities/embedding-encoder.cap.js';
65
66
  export { enumSensorCapability } from '../capabilities/enum-sensor.cap.js';
@@ -241,6 +242,7 @@ export declare const CAPABILITY_NAMES: {
241
242
  readonly deviceState: 'device-state';
242
243
  readonly deviceStatus: 'device-status';
243
244
  readonly dishwasher: 'dishwasher';
245
+ readonly displayPalette: 'display-palette';
244
246
  readonly doorbell: 'doorbell';
245
247
  readonly embeddingEncoder: 'embedding-encoder';
246
248
  readonly enumSensor: 'enum-sensor';
@@ -435,6 +437,7 @@ export interface CapabilityRouterMap<TRouter = unknown> {
435
437
  readonly deviceState: TRouter;
436
438
  readonly deviceStatus: TRouter;
437
439
  readonly dishwasher: TRouter;
440
+ readonly displayPalette: TRouter;
438
441
  readonly doorbell: TRouter;
439
442
  readonly embeddingEncoder: TRouter;
440
443
  readonly enumSensor: TRouter;
@@ -554,8 +557,8 @@ export interface CapabilityRouterMap<TRouter = unknown> {
554
557
  readonly zoneRules: TRouter;
555
558
  readonly zones: TRouter;
556
559
  }
557
- /** Capability names whose mode is `singleton` (145 caps). */
558
- export declare const SINGLETON_CAPABILITY_NAMES: readonly ['accessories', 'addon-pages', 'addon-settings', 'addon-widgets', 'addons', 'admin-ui', 'air-quality-sensor', 'alarm-panel', 'alerts', 'ambient-light-sensor', 'audio-analysis', 'audio-analyzer', 'audio-codec', 'audio-metrics', 'automation-control', 'backup', 'battery', 'binary', 'brightness', 'button', 'calendars', 'camera-credentials', 'camera-grid-layout', 'camera-pipeline-config', 'camera-streams', 'carbon-monoxide', 'climate-control', 'color', 'composer', 'connectivity', 'consumables', 'contact', 'control', 'core-blocks', 'cover', 'database-snapshot', 'day-night', 'decoder', 'detection-pipeline', 'device-admin-link', 'device-credentials', 'device-discovery', 'device-history', 'device-manager', 'device-ops', 'device-state', 'device-status', 'dishwasher', 'doorbell', 'enum-sensor', 'event-emitter', 'face-gallery', 'fan-control', 'feature-probe', 'filesystem-browse', 'flood', 'gas', 'heating-valve', 'humidifier', 'humidity-sensor', 'image', 'image-settings', 'integrations', 'intercom', 'keychain', 'keychain-admin', 'lawn-mower-control', 'llm-runtime', 'local-network', 'lock-control', 'media-player', 'metrics-provider', 'model-convert', 'model-distributor', 'motion', 'motion-detection', 'motion-trigger', 'motion-zones', 'native-object-detection', 'navigation', 'network-link', 'network-quality', 'node-certificates', 'nodes', 'notification-rules', 'notifier', 'numeric-sensor', 'oidc-connections', 'osd', 'osd-manager', 'pet-feeder', 'pipeline-analytics', 'pipeline-executor', 'pipeline-orchestrator', 'pipeline-runner', 'plate-gallery', 'platform-probe', 'power-meter', 'presence', 'pressure-sensor', 'privacy-mask', 'ptz', 'ptz-autotrack', 'reboot', 'record-entries', 'recording-archive', 'recording-export', 'recording-onboard', 'recording-signal', 'records', 'running-state', 'scene-monitor', 'script-runner', 'server-management', 'settings-store', 'smoke', 'snapshot', 'sso-bridge', 'storage', 'storage-admin', 'storage-migration', 'stream-broker', 'stream-catalog', 'stream-params', 'stream-signals', 'switch', 'system', 'tamper', 'temperature-sensor', 'terminal-session', 'toast', 'training', 'update', 'user-management', 'vacuum-control', 'valve', 'vector-store', 'vibration', 'viewer-ui', 'water-heater', 'weather', 'webrtc-session', 'zone-analytics', 'zone-rules', 'zones'];
560
+ /** Capability names whose mode is `singleton` (146 caps). */
561
+ export declare const SINGLETON_CAPABILITY_NAMES: readonly ['accessories', 'addon-pages', 'addon-settings', 'addon-widgets', 'addons', 'admin-ui', 'air-quality-sensor', 'alarm-panel', 'alerts', 'ambient-light-sensor', 'audio-analysis', 'audio-analyzer', 'audio-codec', 'audio-metrics', 'automation-control', 'backup', 'battery', 'binary', 'brightness', 'button', 'calendars', 'camera-credentials', 'camera-grid-layout', 'camera-pipeline-config', 'camera-streams', 'carbon-monoxide', 'climate-control', 'color', 'composer', 'connectivity', 'consumables', 'contact', 'control', 'core-blocks', 'cover', 'database-snapshot', 'day-night', 'decoder', 'detection-pipeline', 'device-admin-link', 'device-credentials', 'device-discovery', 'device-history', 'device-manager', 'device-ops', 'device-state', 'device-status', 'dishwasher', 'display-palette', 'doorbell', 'enum-sensor', 'event-emitter', 'face-gallery', 'fan-control', 'feature-probe', 'filesystem-browse', 'flood', 'gas', 'heating-valve', 'humidifier', 'humidity-sensor', 'image', 'image-settings', 'integrations', 'intercom', 'keychain', 'keychain-admin', 'lawn-mower-control', 'llm-runtime', 'local-network', 'lock-control', 'media-player', 'metrics-provider', 'model-convert', 'model-distributor', 'motion', 'motion-detection', 'motion-trigger', 'motion-zones', 'native-object-detection', 'navigation', 'network-link', 'network-quality', 'node-certificates', 'nodes', 'notification-rules', 'notifier', 'numeric-sensor', 'oidc-connections', 'osd', 'osd-manager', 'pet-feeder', 'pipeline-analytics', 'pipeline-executor', 'pipeline-orchestrator', 'pipeline-runner', 'plate-gallery', 'platform-probe', 'power-meter', 'presence', 'pressure-sensor', 'privacy-mask', 'ptz', 'ptz-autotrack', 'reboot', 'record-entries', 'recording-archive', 'recording-export', 'recording-onboard', 'recording-signal', 'records', 'running-state', 'scene-monitor', 'script-runner', 'server-management', 'settings-store', 'smoke', 'snapshot', 'sso-bridge', 'storage', 'storage-admin', 'storage-migration', 'stream-broker', 'stream-catalog', 'stream-params', 'stream-signals', 'switch', 'system', 'tamper', 'temperature-sensor', 'terminal-session', 'toast', 'training', 'update', 'user-management', 'vacuum-control', 'valve', 'vector-store', 'vibration', 'viewer-ui', 'water-heater', 'weather', 'webrtc-session', 'zone-analytics', 'zone-rules', 'zones'];
559
562
  /** Union of singleton capability names (literal string union). */
560
563
  export type SingletonCapabilityName = typeof SINGLETON_CAPABILITY_NAMES[number];
561
564
  /** Capability names whose mode is `collection` (35 caps). */
@@ -6,7 +6,7 @@
6
6
  * scope+access check inside `protectedProcedure` (see
7
7
  * `server/backend/src/api/trpc/trpc.middleware.ts`).
8
8
  *
9
- * Coverage: 1379 method paths across 180 capabilities.
9
+ * Coverage: 1382 method paths across 181 capabilities.
10
10
  */
11
11
  import type { MethodRole } from '../auth/viewer-access.js';
12
12
  import type { CapabilityMethodAccess } from '../capabilities/capability-definition.js';