@camstack/addon-training 0.1.79 → 0.1.80
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/{MotionZonesSettings-CHoUtlZU.mjs → MotionZonesSettings-BliuxpCH.mjs} +2 -2
- package/dist/{PrivacyMaskSettings-DfxPrf-U.mjs → PrivacyMaskSettings-CKL9xV-S.mjs} +2 -2
- package/dist/{SceneMonitorEditor-B32hWMGP.mjs → SceneMonitorEditor-BE7rVggL.mjs} +1 -1
- package/dist/_stub.js +5248 -5127
- package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_training_page-GwANcGcn.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_training_page-DyaQwk4k.mjs} +3 -3
- package/dist/_virtual_mf___mfe_internal__addon_training_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-DKoALssM.mjs +26 -0
- package/dist/addon-training.css +1 -1
- package/dist/{dist-we-Yi15l.mjs → dist-BCUHufOe.mjs} +490 -71
- package/dist/{dist-DuaaneP-.js → dist-FpC7GFu_.js} +490 -71
- package/dist/{hostInit-OSodFHgq.mjs → hostInit-DxnxYPQ_.mjs} +2 -2
- package/dist/index.js +1 -1
- package/dist/orchestrator/training.addon.js +1 -1
- package/dist/orchestrator/training.addon.mjs +1 -1
- package/dist/{player-overlays-CN0bZ_0v.mjs → player-overlays-1cASdLh_.mjs} +1 -1
- package/dist/providers/modal/training-modal.addon.js +1 -1
- package/dist/providers/modal/training-modal.addon.mjs +1 -1
- package/dist/remoteEntry.js +1 -1
- package/dist/{responsive-wQi9hajb.mjs → responsive-Ctl0WYwk.mjs} +1 -1
- package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_training_page__remoteEntry_js-CbTZ0yvt.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_training_page__remoteEntry_js-C_798y4H.mjs} +1 -1
- package/package.json +1 -1
- package/dist/_virtual_mf___mfe_internal__addon_training_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-ff_0UQsH.mjs +0 -26
|
@@ -16277,6 +16277,13 @@ var ComposerUnreadableBlockSchema = object({
|
|
|
16277
16277
|
/** The parse error, in the operator's words. */
|
|
16278
16278
|
error: string()
|
|
16279
16279
|
});
|
|
16280
|
+
/** A confirmed release the hub did not accept. `deviceId` is the claim's device. */
|
|
16281
|
+
var UnreleasedClaimSchema = object({
|
|
16282
|
+
deviceId: number().int(),
|
|
16283
|
+
capName: string(),
|
|
16284
|
+
owner: string(),
|
|
16285
|
+
error: string()
|
|
16286
|
+
});
|
|
16280
16287
|
method(object({
|
|
16281
16288
|
/** The shared Blocks integration; null until `core-blocks` has reconciled it. */
|
|
16282
16289
|
integrationId: string().nullable(),
|
|
@@ -16286,7 +16293,13 @@ method(object({
|
|
|
16286
16293
|
/** Operator restarts: rebuild these runtimes and re-resolve their sources. Stores nothing (D62). */
|
|
16287
16294
|
restartBlockIds: array(string()),
|
|
16288
16295
|
/** Composition rows that exist but do not parse: held, never withdrawn, reported failed. */
|
|
16289
|
-
unreadableBlocks: array(ComposerUnreadableBlockSchema)
|
|
16296
|
+
unreadableBlocks: array(ComposerUnreadableBlockSchema),
|
|
16297
|
+
/**
|
|
16298
|
+
* Operator-confirmed deletions. Their claims are released on this apply,
|
|
16299
|
+
* before any replacement block claims. A block that merely vanished from the
|
|
16300
|
+
* snapshot is not listed here and still waits for two applies (D49).
|
|
16301
|
+
*/
|
|
16302
|
+
retiredBlockIds: array(string()).optional()
|
|
16290
16303
|
}), object({
|
|
16291
16304
|
blocks: array(object({
|
|
16292
16305
|
blockId: string(),
|
|
@@ -16298,7 +16311,13 @@ method(object({
|
|
|
16298
16311
|
* integration unknown, its own rows unread or read empty once). An empty
|
|
16299
16312
|
* apply the caller owes is paid off only by one the composer acted on (D49).
|
|
16300
16313
|
*/
|
|
16301
|
-
acted: boolean()
|
|
16314
|
+
acted: boolean(),
|
|
16315
|
+
/**
|
|
16316
|
+
* Confirmed releases this apply tried and the hub did not accept. Empty when
|
|
16317
|
+
* every one landed (or there was nothing to hand back). Absent on a result
|
|
16318
|
+
* that never got that far.
|
|
16319
|
+
*/
|
|
16320
|
+
unreleasedClaims: array(UnreleasedClaimSchema).optional()
|
|
16302
16321
|
}), {
|
|
16303
16322
|
kind: "mutation",
|
|
16304
16323
|
auth: "admin"
|
|
@@ -42161,6 +42180,381 @@ var _macroLookup = /* @__PURE__ */ new Map();
|
|
|
42161
42180
|
for (const [k, v] of Object.entries(YAMNET_TO_MACRO.mapping)) _macroLookup.set(k.toLowerCase(), v);
|
|
42162
42181
|
for (const [k, v] of Object.entries(APPLE_SA_TO_MACRO.mapping)) _macroLookup.set(k.toLowerCase(), v);
|
|
42163
42182
|
/**
|
|
42183
|
+
* Palette entry ids (D939). Audio is the one gradient; `audio-*` leaves are
|
|
42184
|
+
* not entries. `heatmapScrub` is a mark, not an event kind.
|
|
42185
|
+
*/
|
|
42186
|
+
var PALETTE_ENTRY_IDS = [
|
|
42187
|
+
"motion",
|
|
42188
|
+
"audio",
|
|
42189
|
+
"recording",
|
|
42190
|
+
"live",
|
|
42191
|
+
"heatmapScrub",
|
|
42192
|
+
"person",
|
|
42193
|
+
"vehicle",
|
|
42194
|
+
"animal",
|
|
42195
|
+
"package",
|
|
42196
|
+
"sensor",
|
|
42197
|
+
"control",
|
|
42198
|
+
"face",
|
|
42199
|
+
"plate",
|
|
42200
|
+
"car",
|
|
42201
|
+
"truck",
|
|
42202
|
+
"bus",
|
|
42203
|
+
"motorcycle",
|
|
42204
|
+
"bicycle",
|
|
42205
|
+
"airplane",
|
|
42206
|
+
"boat",
|
|
42207
|
+
"train",
|
|
42208
|
+
"bird",
|
|
42209
|
+
"dog",
|
|
42210
|
+
"cat",
|
|
42211
|
+
"horse",
|
|
42212
|
+
"sheep",
|
|
42213
|
+
"cow",
|
|
42214
|
+
"elephant",
|
|
42215
|
+
"bear",
|
|
42216
|
+
"zebra",
|
|
42217
|
+
"giraffe",
|
|
42218
|
+
"package-delivered",
|
|
42219
|
+
"package-picked-up",
|
|
42220
|
+
"suitcase",
|
|
42221
|
+
"backpack",
|
|
42222
|
+
"handbag",
|
|
42223
|
+
"contact",
|
|
42224
|
+
"motion-sensor",
|
|
42225
|
+
"smoke",
|
|
42226
|
+
"flood",
|
|
42227
|
+
"gas",
|
|
42228
|
+
"carbon-monoxide",
|
|
42229
|
+
"vibration",
|
|
42230
|
+
"tamper",
|
|
42231
|
+
"presence",
|
|
42232
|
+
"enum-sensor",
|
|
42233
|
+
"device-event",
|
|
42234
|
+
"lock",
|
|
42235
|
+
"cover",
|
|
42236
|
+
"switch",
|
|
42237
|
+
"siren",
|
|
42238
|
+
"button",
|
|
42239
|
+
"doorbell"
|
|
42240
|
+
];
|
|
42241
|
+
var AUDIO_ENTRY_ID = "audio";
|
|
42242
|
+
/** Six rungs, quiet → loud. The opaque end is the entry's hex. */
|
|
42243
|
+
var AUDIO_GRADIENT_ALPHAS = [
|
|
42244
|
+
.3,
|
|
42245
|
+
.42,
|
|
42246
|
+
.55,
|
|
42247
|
+
.7,
|
|
42248
|
+
.85,
|
|
42249
|
+
1
|
|
42250
|
+
];
|
|
42251
|
+
var PALETTE_PRESET_IDS = [
|
|
42252
|
+
"camstack",
|
|
42253
|
+
"high-contrast",
|
|
42254
|
+
"okabe-ito"
|
|
42255
|
+
];
|
|
42256
|
+
/** Frozen palette tables (D939). The spec refuses a table that breaks the rule. */
|
|
42257
|
+
var CAMSTACK_HEX = {
|
|
42258
|
+
motion: "#d946ef",
|
|
42259
|
+
audio: "#059eb8",
|
|
42260
|
+
recording: "#ef4444",
|
|
42261
|
+
live: "#8d7a00",
|
|
42262
|
+
heatmapScrub: "#4b32ff",
|
|
42263
|
+
person: "#11a64c",
|
|
42264
|
+
vehicle: "#3b82f6",
|
|
42265
|
+
animal: "#ea6a09",
|
|
42266
|
+
package: "#924667",
|
|
42267
|
+
sensor: "#624bbc",
|
|
42268
|
+
control: "#944d24",
|
|
42269
|
+
face: "#ed4f8d",
|
|
42270
|
+
plate: "#4b7027",
|
|
42271
|
+
car: "#9684cf",
|
|
42272
|
+
truck: "#0f9b89",
|
|
42273
|
+
bus: "#a734a9",
|
|
42274
|
+
motorcycle: "#c1133a",
|
|
42275
|
+
bicycle: "#0e6a9b",
|
|
42276
|
+
airplane: "#7c9928",
|
|
42277
|
+
boat: "#b17933",
|
|
42278
|
+
train: "#ad6ca3",
|
|
42279
|
+
bird: "#0f7c55",
|
|
42280
|
+
dog: "#c82700",
|
|
42281
|
+
cat: "#7268f2",
|
|
42282
|
+
horse: "#cb795e",
|
|
42283
|
+
sheep: "#b8636b",
|
|
42284
|
+
cow: "#cb2969",
|
|
42285
|
+
elephant: "#1158d2",
|
|
42286
|
+
bear: "#8d5e00",
|
|
42287
|
+
zebra: "#0097d6",
|
|
42288
|
+
giraffe: "#8f61bb",
|
|
42289
|
+
"package-delivered": "#cd3f9b",
|
|
42290
|
+
"package-picked-up": "#388a08",
|
|
42291
|
+
suitcase: "#666800",
|
|
42292
|
+
backpack: "#ec5022",
|
|
42293
|
+
handbag: "#a76ef8",
|
|
42294
|
+
contact: "#ab5a49",
|
|
42295
|
+
"motion-sensor": "#b95d1a",
|
|
42296
|
+
smoke: "#dd3858",
|
|
42297
|
+
flood: "#b31e7d",
|
|
42298
|
+
gas: "#5b70b5",
|
|
42299
|
+
"carbon-monoxide": "#7b4e8e",
|
|
42300
|
+
vibration: "#e65bba",
|
|
42301
|
+
tamper: "#98464b",
|
|
42302
|
+
presence: "#3a9468",
|
|
42303
|
+
"enum-sensor": "#7885f8",
|
|
42304
|
+
"device-event": "#8c43c8",
|
|
42305
|
+
lock: "#649653",
|
|
42306
|
+
cover: "#c67597",
|
|
42307
|
+
switch: "#7a812a",
|
|
42308
|
+
siren: "#ac5d7f",
|
|
42309
|
+
button: "#b276cd",
|
|
42310
|
+
doorbell: "#0087ab"
|
|
42311
|
+
};
|
|
42312
|
+
var CAMSTACK_FALLBACK = [
|
|
42313
|
+
"#b34dc7",
|
|
42314
|
+
"#1d7d34",
|
|
42315
|
+
"#db6b6c",
|
|
42316
|
+
"#a43d29",
|
|
42317
|
+
"#0e6ee6",
|
|
42318
|
+
"#29a10b",
|
|
42319
|
+
"#a98731",
|
|
42320
|
+
"#0181c6"
|
|
42321
|
+
];
|
|
42322
|
+
var HIGH_CONTRAST_HEX = {
|
|
42323
|
+
motion: "#964360",
|
|
42324
|
+
audio: "#23a132",
|
|
42325
|
+
recording: "#2494ca",
|
|
42326
|
+
live: "#bd7e2b",
|
|
42327
|
+
heatmapScrub: "#ad6eea",
|
|
42328
|
+
person: "#62611e",
|
|
42329
|
+
vehicle: "#f4534c",
|
|
42330
|
+
animal: "#1556cd",
|
|
42331
|
+
package: "#9c4415",
|
|
42332
|
+
sensor: "#066c48",
|
|
42333
|
+
control: "#f2479f",
|
|
42334
|
+
face: "#139d8a",
|
|
42335
|
+
plate: "#909024",
|
|
42336
|
+
car: "#8e35ab",
|
|
42337
|
+
truck: "#bd0b2b",
|
|
42338
|
+
bus: "#7a88ca",
|
|
42339
|
+
motorcycle: "#e26725",
|
|
42340
|
+
bicycle: "#a6679b",
|
|
42341
|
+
airplane: "#7c5720",
|
|
42342
|
+
boat: "#467a1b",
|
|
42343
|
+
train: "#6f65a4",
|
|
42344
|
+
bird: "#cb717f",
|
|
42345
|
+
dog: "#c62490",
|
|
42346
|
+
cat: "#b36850",
|
|
42347
|
+
horse: "#1872ac",
|
|
42348
|
+
sheep: "#927939",
|
|
42349
|
+
cow: "#428a5c",
|
|
42350
|
+
elephant: "#d41160",
|
|
42351
|
+
bear: "#799453",
|
|
42352
|
+
zebra: "#a85455",
|
|
42353
|
+
giraffe: "#746be8",
|
|
42354
|
+
"package-delivered": "#824a80",
|
|
42355
|
+
"package-picked-up": "#614ac1",
|
|
42356
|
+
suitcase: "#2f77f3",
|
|
42357
|
+
backpack: "#fa476d",
|
|
42358
|
+
handbag: "#c14cbe",
|
|
42359
|
+
contact: "#c83921",
|
|
42360
|
+
"motion-sensor": "#a07ebd",
|
|
42361
|
+
smoke: "#a25b13",
|
|
42362
|
+
flood: "#526bab",
|
|
42363
|
+
gas: "#924938",
|
|
42364
|
+
"carbon-monoxide": "#bb7e53",
|
|
42365
|
+
vibration: "#b66182",
|
|
42366
|
+
tamper: "#3c6931",
|
|
42367
|
+
presence: "#6c851d",
|
|
42368
|
+
"enum-sensor": "#ad2d48",
|
|
42369
|
+
"device-event": "#5e9b04",
|
|
42370
|
+
lock: "#00a062",
|
|
42371
|
+
cover: "#ad8624",
|
|
42372
|
+
switch: "#d05259",
|
|
42373
|
+
siren: "#cd67b3",
|
|
42374
|
+
button: "#c9746a",
|
|
42375
|
+
doorbell: "#338eeb"
|
|
42376
|
+
};
|
|
42377
|
+
var HIGH_CONTRAST_FALLBACK = [
|
|
42378
|
+
"#817f3b",
|
|
42379
|
+
"#a0733e",
|
|
42380
|
+
"#8658b2",
|
|
42381
|
+
"#956301",
|
|
42382
|
+
"#bc652d",
|
|
42383
|
+
"#647331",
|
|
42384
|
+
"#a14c9e",
|
|
42385
|
+
"#d14e71"
|
|
42386
|
+
];
|
|
42387
|
+
var OKABE_ITO_HEX = {
|
|
42388
|
+
motion: "#b88128",
|
|
42389
|
+
audio: "#1096c8",
|
|
42390
|
+
recording: "#009e73",
|
|
42391
|
+
live: "#9c8c22",
|
|
42392
|
+
heatmapScrub: "#0072b2",
|
|
42393
|
+
person: "#d55e00",
|
|
42394
|
+
vehicle: "#c0739f",
|
|
42395
|
+
animal: "#226d18",
|
|
42396
|
+
package: "#91446c",
|
|
42397
|
+
sensor: "#217b56",
|
|
42398
|
+
control: "#648647",
|
|
42399
|
+
face: "#c22998",
|
|
42400
|
+
plate: "#fa4575",
|
|
42401
|
+
car: "#956301",
|
|
42402
|
+
truck: "#2f77f3",
|
|
42403
|
+
bus: "#7a4e86",
|
|
42404
|
+
motorcycle: "#f54597",
|
|
42405
|
+
bicycle: "#bb3e75",
|
|
42406
|
+
airplane: "#e054c0",
|
|
42407
|
+
boat: "#457942",
|
|
42408
|
+
train: "#867afa",
|
|
42409
|
+
bird: "#88914c",
|
|
42410
|
+
dog: "#1556cd",
|
|
42411
|
+
cat: "#71702c",
|
|
42412
|
+
horse: "#9b4fa4",
|
|
42413
|
+
sheep: "#c0559d",
|
|
42414
|
+
cow: "#d14f65",
|
|
42415
|
+
elephant: "#98470f",
|
|
42416
|
+
bear: "#595896",
|
|
42417
|
+
zebra: "#96790e",
|
|
42418
|
+
giraffe: "#cb717b",
|
|
42419
|
+
"package-delivered": "#139d8a",
|
|
42420
|
+
"package-picked-up": "#906ead",
|
|
42421
|
+
suitcase: "#d02939",
|
|
42422
|
+
backpack: "#d41160",
|
|
42423
|
+
handbag: "#f64f54",
|
|
42424
|
+
contact: "#7258d2",
|
|
42425
|
+
"motion-sensor": "#b66182",
|
|
42426
|
+
smoke: "#627abb",
|
|
42427
|
+
flood: "#b86ae4",
|
|
42428
|
+
gas: "#a95261",
|
|
42429
|
+
"carbon-monoxide": "#c65d3c",
|
|
42430
|
+
vibration: "#7a40b7",
|
|
42431
|
+
tamper: "#914b34",
|
|
42432
|
+
presence: "#9481c3",
|
|
42433
|
+
"enum-sensor": "#ac6d47",
|
|
42434
|
+
"device-event": "#7b6fce",
|
|
42435
|
+
lock: "#c67662",
|
|
42436
|
+
cover: "#a6564d",
|
|
42437
|
+
switch: "#ad2c4e",
|
|
42438
|
+
siren: "#348e08",
|
|
42439
|
+
button: "#d27303",
|
|
42440
|
+
doorbell: "#55770f"
|
|
42441
|
+
};
|
|
42442
|
+
var OKABE_ITO_FALLBACK = [
|
|
42443
|
+
"#9a3784",
|
|
42444
|
+
"#a7392c",
|
|
42445
|
+
"#409d50",
|
|
42446
|
+
"#6987e7",
|
|
42447
|
+
"#ee5b3d",
|
|
42448
|
+
"#c0430d",
|
|
42449
|
+
"#af79b3",
|
|
42450
|
+
"#4b6628"
|
|
42451
|
+
];
|
|
42452
|
+
/**
|
|
42453
|
+
* The display palette (D939). One table of colours, three presets, one
|
|
42454
|
+
* validator. Taxonomy colours and every consumer read this — there is no
|
|
42455
|
+
* second hex table.
|
|
42456
|
+
*/
|
|
42457
|
+
var paletteHexSchema = string().regex(/^#[0-9a-f]{6}$/);
|
|
42458
|
+
var paletteSwatchSchema = discriminatedUnion("form", [object({
|
|
42459
|
+
form: literal("solid"),
|
|
42460
|
+
hex: paletteHexSchema
|
|
42461
|
+
}), object({
|
|
42462
|
+
form: literal("gradient"),
|
|
42463
|
+
hex: paletteHexSchema,
|
|
42464
|
+
alphas: array(number().gt(0).lte(1)).length(AUDIO_GRADIENT_ALPHAS.length)
|
|
42465
|
+
})]);
|
|
42466
|
+
var paletteReadySchema = object({
|
|
42467
|
+
status: literal("ready"),
|
|
42468
|
+
presetId: _enum(PALETTE_PRESET_IDS),
|
|
42469
|
+
customized: boolean(),
|
|
42470
|
+
source: _enum(["stored", "unconfigured"]),
|
|
42471
|
+
swatches: record(string(), paletteSwatchSchema),
|
|
42472
|
+
fallbacks: array(paletteHexSchema).length(8)
|
|
42473
|
+
});
|
|
42474
|
+
var paletteResultSchema = discriminatedUnion("status", [paletteReadySchema, object({
|
|
42475
|
+
status: literal("unknown"),
|
|
42476
|
+
reason: string()
|
|
42477
|
+
})]);
|
|
42478
|
+
var setPaletteInputSchema = union([object({ presetId: string() }), object({
|
|
42479
|
+
presetId: string(),
|
|
42480
|
+
overrides: record(string(), paletteSwatchSchema)
|
|
42481
|
+
})]);
|
|
42482
|
+
object({
|
|
42483
|
+
presetId: string(),
|
|
42484
|
+
overrides: record(string(), paletteSwatchSchema)
|
|
42485
|
+
});
|
|
42486
|
+
function solid(hex) {
|
|
42487
|
+
return {
|
|
42488
|
+
form: "solid",
|
|
42489
|
+
hex
|
|
42490
|
+
};
|
|
42491
|
+
}
|
|
42492
|
+
function audioGradient(hex) {
|
|
42493
|
+
return {
|
|
42494
|
+
form: "gradient",
|
|
42495
|
+
hex,
|
|
42496
|
+
alphas: [...AUDIO_GRADIENT_ALPHAS]
|
|
42497
|
+
};
|
|
42498
|
+
}
|
|
42499
|
+
function swatchesFrom(hexes) {
|
|
42500
|
+
const out = {};
|
|
42501
|
+
for (const id of PALETTE_ENTRY_IDS) {
|
|
42502
|
+
const hex = hexes[id];
|
|
42503
|
+
if (hex === void 0) throw new Error(`palette table missing ${id}`);
|
|
42504
|
+
out[id] = id === "audio" ? audioGradient(hex) : solid(hex);
|
|
42505
|
+
}
|
|
42506
|
+
return out;
|
|
42507
|
+
}
|
|
42508
|
+
function preset(id, name, hexes, fallbacks) {
|
|
42509
|
+
return {
|
|
42510
|
+
id,
|
|
42511
|
+
name,
|
|
42512
|
+
swatches: swatchesFrom(hexes),
|
|
42513
|
+
fallbacks
|
|
42514
|
+
};
|
|
42515
|
+
}
|
|
42516
|
+
var DISPLAY_PRESETS = [
|
|
42517
|
+
preset("camstack", "CamStack", CAMSTACK_HEX, CAMSTACK_FALLBACK),
|
|
42518
|
+
preset("high-contrast", "High contrast", HIGH_CONTRAST_HEX, HIGH_CONTRAST_FALLBACK),
|
|
42519
|
+
preset("okabe-ito", "Colour-blind safe", OKABE_ITO_HEX, OKABE_ITO_FALLBACK)
|
|
42520
|
+
];
|
|
42521
|
+
function presetById(id) {
|
|
42522
|
+
return DISPLAY_PRESETS.find((item) => item.id === id);
|
|
42523
|
+
}
|
|
42524
|
+
function bundledCamstack() {
|
|
42525
|
+
const presetRow = presetById("camstack");
|
|
42526
|
+
if (presetRow === void 0) throw new Error("CamStack preset missing");
|
|
42527
|
+
return readyOf(presetRow, "unconfigured", false);
|
|
42528
|
+
}
|
|
42529
|
+
function readyOf(row, source, customized) {
|
|
42530
|
+
return {
|
|
42531
|
+
status: "ready",
|
|
42532
|
+
presetId: row.id,
|
|
42533
|
+
customized,
|
|
42534
|
+
source,
|
|
42535
|
+
swatches: row.swatches,
|
|
42536
|
+
fallbacks: [...row.fallbacks]
|
|
42537
|
+
};
|
|
42538
|
+
}
|
|
42539
|
+
function hashFallback(kind, fallbacks) {
|
|
42540
|
+
let hash = 0;
|
|
42541
|
+
for (let i = 0; i < kind.length; i++) hash = hash * 31 + (kind.codePointAt(i) ?? 0) >>> 0;
|
|
42542
|
+
const hex = fallbacks[hash % fallbacks.length];
|
|
42543
|
+
if (hex === void 0) throw new Error("display palette has no fallback colour");
|
|
42544
|
+
return hex;
|
|
42545
|
+
}
|
|
42546
|
+
/** Colour a kind paints with. Audio leaves share the audio gradient's hex. */
|
|
42547
|
+
function paintHex(swatches, fallbacks, kind) {
|
|
42548
|
+
const key = kind.trim().toLowerCase();
|
|
42549
|
+
if (key.startsWith("audio-")) {
|
|
42550
|
+
const audio = swatches[AUDIO_ENTRY_ID];
|
|
42551
|
+
return audio !== void 0 ? audio.hex : hashFallback(key, fallbacks);
|
|
42552
|
+
}
|
|
42553
|
+
const direct = swatches[key];
|
|
42554
|
+
if (direct !== void 0) return direct.hex;
|
|
42555
|
+
return hashFallback(key, fallbacks);
|
|
42556
|
+
}
|
|
42557
|
+
/**
|
|
42164
42558
|
* Unified event-kind taxonomy — THE single source of truth for
|
|
42165
42559
|
* `kind → { parentKind, category, level, color, iconId, labelKey, label,
|
|
42166
42560
|
* icon }`.
|
|
@@ -42174,109 +42568,88 @@ for (const [k, v] of Object.entries(APPLE_SA_TO_MACRO.mapping)) _macroLookup.set
|
|
|
42174
42568
|
* - `addon-post-analysis/shared/frame/box-drawer.ts` (DEFAULT_COLOR)
|
|
42175
42569
|
* - the COCO / audio class maps (macro ↔ sub relationships)
|
|
42176
42570
|
*
|
|
42177
|
-
* The DATA (serializable —
|
|
42178
|
-
* `@camstack/types`.
|
|
42179
|
-
*
|
|
42180
|
-
*
|
|
42181
|
-
*
|
|
42571
|
+
* The DATA (serializable — parentKind / iconId / labelKey) lives here in
|
|
42572
|
+
* `@camstack/types`. Colour is NOT a second table: each entry's `color` is
|
|
42573
|
+
* the bundled CamStack display palette (D939). The effective cluster palette
|
|
42574
|
+
* is the `display-palette` capability. The UI-side mapping `iconId → lucide
|
|
42575
|
+
* component` and `labelKey → t()` lives in `@camstack/ui-library`.
|
|
42182
42576
|
*
|
|
42183
42577
|
* Two levels only (v1 YAGNI): macro → sub. `person` is a leaf macro.
|
|
42184
42578
|
*/
|
|
42185
|
-
var
|
|
42186
|
-
|
|
42187
|
-
|
|
42188
|
-
|
|
42189
|
-
|
|
42190
|
-
|
|
42191
|
-
|
|
42192
|
-
|
|
42193
|
-
|
|
42194
|
-
|
|
42195
|
-
};
|
|
42196
|
-
var DETECTION_SUB_COLORS = {
|
|
42197
|
-
car: "#f59e0b",
|
|
42198
|
-
truck: "#d97706",
|
|
42199
|
-
bus: "#b45309",
|
|
42200
|
-
motorcycle: "#eab308",
|
|
42201
|
-
bicycle: "#ca8a04",
|
|
42202
|
-
airplane: "#60a5fa",
|
|
42203
|
-
boat: "#2563eb",
|
|
42204
|
-
train: "#1d4ed8",
|
|
42205
|
-
bird: "#14b8a6",
|
|
42206
|
-
dog: "#84cc16",
|
|
42207
|
-
cat: "#f97316",
|
|
42208
|
-
horse: "#a16207",
|
|
42209
|
-
sheep: "#a3a3a3",
|
|
42210
|
-
cow: "#78716c",
|
|
42211
|
-
elephant: "#6b7280",
|
|
42212
|
-
bear: "#7c2d12",
|
|
42213
|
-
zebra: "#404040",
|
|
42214
|
-
giraffe: "#d4a373"
|
|
42215
|
-
};
|
|
42579
|
+
var BUNDLED_PALETTE = bundledCamstack();
|
|
42580
|
+
function kindColor(kind) {
|
|
42581
|
+
return paintHex(BUNDLED_PALETTE.swatches, BUNDLED_PALETTE.fallbacks, kind);
|
|
42582
|
+
}
|
|
42583
|
+
function firstFallback(fallbacks) {
|
|
42584
|
+
const hex = fallbacks[0];
|
|
42585
|
+
if (hex === void 0) throw new Error("display palette has no fallback colour");
|
|
42586
|
+
return hex;
|
|
42587
|
+
}
|
|
42588
|
+
firstFallback(BUNDLED_PALETTE.fallbacks);
|
|
42216
42589
|
function titleCase(id) {
|
|
42217
42590
|
return id.split(/[-_ ]/).filter((p) => p.length > 0).map((p) => p.charAt(0).toUpperCase() + p.slice(1)).join(" ");
|
|
42218
42591
|
}
|
|
42219
42592
|
var entries = /* @__PURE__ */ new Map();
|
|
42220
|
-
function macro(kind, category,
|
|
42593
|
+
function macro(kind, category, iconId, label) {
|
|
42221
42594
|
entries.set(kind, {
|
|
42222
42595
|
kind,
|
|
42223
42596
|
parentKind: null,
|
|
42224
42597
|
level: "macro",
|
|
42225
42598
|
category,
|
|
42226
|
-
color,
|
|
42599
|
+
color: kindColor(kind),
|
|
42227
42600
|
iconId,
|
|
42228
42601
|
labelKey: `eventKind.${kind}`,
|
|
42229
42602
|
label
|
|
42230
42603
|
});
|
|
42231
42604
|
}
|
|
42232
|
-
function sub(kind, parentKind, category,
|
|
42605
|
+
function sub(kind, parentKind, category, iconId, label) {
|
|
42233
42606
|
entries.set(kind, {
|
|
42234
42607
|
kind,
|
|
42235
42608
|
parentKind,
|
|
42236
42609
|
level: "sub",
|
|
42237
42610
|
category,
|
|
42238
|
-
color,
|
|
42611
|
+
color: kindColor(kind),
|
|
42239
42612
|
iconId,
|
|
42240
42613
|
labelKey: `eventKind.${kind}`,
|
|
42241
42614
|
label
|
|
42242
42615
|
});
|
|
42243
42616
|
}
|
|
42244
|
-
macro("motion", "motion",
|
|
42245
|
-
macro("audio", "audio",
|
|
42246
|
-
macro("person", "detection",
|
|
42247
|
-
macro("vehicle", "detection",
|
|
42248
|
-
macro("animal", "detection",
|
|
42249
|
-
macro("package", "package",
|
|
42250
|
-
macro("sensor", "sensor",
|
|
42251
|
-
macro("control", "control",
|
|
42617
|
+
macro("motion", "motion", "motion", "Motion");
|
|
42618
|
+
macro("audio", "audio", "audio", "Audio");
|
|
42619
|
+
macro("person", "detection", "person", "Person");
|
|
42620
|
+
macro("vehicle", "detection", "vehicle", "Vehicle");
|
|
42621
|
+
macro("animal", "detection", "animal", "Animal");
|
|
42622
|
+
macro("package", "package", "package", "Package");
|
|
42623
|
+
macro("sensor", "sensor", "sensor", "Sensor");
|
|
42624
|
+
macro("control", "control", "control", "Control");
|
|
42252
42625
|
for (const [cocoClass, macroClass] of Object.entries(COCO_TO_MACRO.mapping)) {
|
|
42253
42626
|
if (macroClass !== "vehicle" && macroClass !== "animal") continue;
|
|
42254
42627
|
if (entries.has(cocoClass)) continue;
|
|
42255
|
-
sub(cocoClass, macroClass, "detection",
|
|
42628
|
+
sub(cocoClass, macroClass, "detection", cocoClass, titleCase(cocoClass));
|
|
42256
42629
|
}
|
|
42257
|
-
sub("package-delivered", "package", "package",
|
|
42258
|
-
sub("package-picked-up", "package", "package",
|
|
42259
|
-
sub("contact", "sensor", "sensor", "
|
|
42260
|
-
sub("motion-sensor", "sensor", "sensor",
|
|
42261
|
-
sub("smoke", "sensor", "sensor", "
|
|
42262
|
-
sub("flood", "sensor", "sensor", "
|
|
42263
|
-
sub("gas", "sensor", "sensor", "
|
|
42264
|
-
sub("carbon-monoxide", "sensor", "sensor", "
|
|
42265
|
-
sub("vibration", "sensor", "sensor", "
|
|
42266
|
-
sub("tamper", "sensor", "sensor", "
|
|
42267
|
-
sub("presence", "sensor", "sensor", "
|
|
42268
|
-
sub("enum-sensor", "sensor", "sensor",
|
|
42269
|
-
sub("device-event", "sensor", "sensor", "
|
|
42270
|
-
sub("lock", "control", "control", "
|
|
42271
|
-
sub("cover", "control", "control", "
|
|
42272
|
-
sub("switch", "control", "control",
|
|
42273
|
-
sub("siren", "control", "control", "
|
|
42274
|
-
sub("button", "control", "control", "
|
|
42275
|
-
sub("doorbell", "control", "control", "
|
|
42630
|
+
sub("package-delivered", "package", "package", "package", "Package delivered");
|
|
42631
|
+
sub("package-picked-up", "package", "package", "package", "Package picked up");
|
|
42632
|
+
sub("contact", "sensor", "sensor", "door", "Contact");
|
|
42633
|
+
sub("motion-sensor", "sensor", "sensor", "pir", "Motion sensor");
|
|
42634
|
+
sub("smoke", "sensor", "sensor", "smoke", "Smoke");
|
|
42635
|
+
sub("flood", "sensor", "sensor", "water", "Water leak");
|
|
42636
|
+
sub("gas", "sensor", "sensor", "gas", "Gas");
|
|
42637
|
+
sub("carbon-monoxide", "sensor", "sensor", "smoke", "Carbon monoxide");
|
|
42638
|
+
sub("vibration", "sensor", "sensor", "vibration", "Vibration");
|
|
42639
|
+
sub("tamper", "sensor", "sensor", "tamper", "Tamper");
|
|
42640
|
+
sub("presence", "sensor", "sensor", "presence", "Presence");
|
|
42641
|
+
sub("enum-sensor", "sensor", "sensor", "generic", "Sensor state");
|
|
42642
|
+
sub("device-event", "sensor", "sensor", "button", "Device event");
|
|
42643
|
+
sub("lock", "control", "control", "lock", "Lock");
|
|
42644
|
+
sub("cover", "control", "control", "door", "Cover");
|
|
42645
|
+
sub("switch", "control", "control", "switch", "Switch");
|
|
42646
|
+
sub("siren", "control", "control", "siren", "Siren");
|
|
42647
|
+
sub("button", "control", "control", "button", "Button");
|
|
42648
|
+
sub("doorbell", "control", "control", "doorbell", "Doorbell");
|
|
42276
42649
|
for (const l of AUDIO_MACRO_LABELS) {
|
|
42277
42650
|
const kind = `audio-${l.id}`;
|
|
42278
42651
|
if (entries.has(kind)) continue;
|
|
42279
|
-
sub(kind, "audio", "audio",
|
|
42652
|
+
sub(kind, "audio", "audio", kind, l.name);
|
|
42280
42653
|
}
|
|
42281
42654
|
/** The complete taxonomy dictionary, keyed by kind. */
|
|
42282
42655
|
var EVENT_TAXONOMY = Object.freeze(Object.fromEntries(entries));
|
|
@@ -54986,6 +55359,30 @@ DeviceType.Camera, method(object({ deviceId: number() }), DayNightOptionsSchema)
|
|
|
54986
55359
|
auth: "admin"
|
|
54987
55360
|
});
|
|
54988
55361
|
/**
|
|
55362
|
+
* display-palette — the cluster's one colour table (D939).
|
|
55363
|
+
*
|
|
55364
|
+
* Hub singleton. `getPalette` reports `unknown` when the settings store
|
|
55365
|
+
* cannot be read; it does not pretend the bundled preset was stored.
|
|
55366
|
+
* `setPalette` refuses a palette that fails the ΔE / contrast rule and names
|
|
55367
|
+
* the pairs.
|
|
55368
|
+
*/
|
|
55369
|
+
var presetSummarySchema = object({
|
|
55370
|
+
id: string(),
|
|
55371
|
+
name: string(),
|
|
55372
|
+
swatches: record(string(), paletteSwatchSchema),
|
|
55373
|
+
fallbacks: array(string())
|
|
55374
|
+
});
|
|
55375
|
+
method(_void(), paletteResultSchema, {
|
|
55376
|
+
auth: "protected",
|
|
55377
|
+
role: "viewer"
|
|
55378
|
+
}), method(_void(), array(presetSummarySchema).readonly(), {
|
|
55379
|
+
auth: "protected",
|
|
55380
|
+
role: "viewer"
|
|
55381
|
+
}), method(setPaletteInputSchema, paletteReadySchema, {
|
|
55382
|
+
kind: "mutation",
|
|
55383
|
+
auth: "admin"
|
|
55384
|
+
});
|
|
55385
|
+
/**
|
|
54989
55386
|
* Generic device-level status snapshot. Auto-registered by `BaseDevice`
|
|
54990
55387
|
* for every device, regardless of provider — the kernel needs a uniform
|
|
54991
55388
|
* cap-keyed slice for the basic device flags every consumer expects to
|
|
@@ -65986,6 +66383,27 @@ Object.freeze({
|
|
|
65986
66383
|
access: "create",
|
|
65987
66384
|
role: "viewer"
|
|
65988
66385
|
},
|
|
66386
|
+
"displayPalette.getPalette": {
|
|
66387
|
+
capName: "display-palette",
|
|
66388
|
+
capScope: "system",
|
|
66389
|
+
addonId: null,
|
|
66390
|
+
access: "view",
|
|
66391
|
+
role: "viewer"
|
|
66392
|
+
},
|
|
66393
|
+
"displayPalette.listPresets": {
|
|
66394
|
+
capName: "display-palette",
|
|
66395
|
+
capScope: "system",
|
|
66396
|
+
addonId: null,
|
|
66397
|
+
access: "view",
|
|
66398
|
+
role: "viewer"
|
|
66399
|
+
},
|
|
66400
|
+
"displayPalette.setPalette": {
|
|
66401
|
+
capName: "display-palette",
|
|
66402
|
+
capScope: "system",
|
|
66403
|
+
addonId: null,
|
|
66404
|
+
access: "create",
|
|
66405
|
+
role: "admin"
|
|
66406
|
+
},
|
|
65989
66407
|
"doorbell.getStatus": {
|
|
65990
66408
|
capName: "doorbell",
|
|
65991
66409
|
capScope: "device",
|
|
@@ -76442,6 +76860,7 @@ var SYSTEM_CAP_VOCABULARY = {
|
|
|
76442
76860
|
"device-provider": system(INTERNAL),
|
|
76443
76861
|
"device-removal-hook": system(INTERNAL),
|
|
76444
76862
|
"device-state": system("the runtime-state mirror every trigger already reads through"),
|
|
76863
|
+
"display-palette": system("the cluster display palette — one colour table for every client, not a device action"),
|
|
76445
76864
|
"embedding-encoder": system(ML),
|
|
76446
76865
|
"face-gallery": system("the face gallery — curated on its own page"),
|
|
76447
76866
|
"failure-contribution": system(INTERNAL),
|
|
@@ -36,7 +36,7 @@ async function r() {
|
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
38
|
"@camstack/types": {
|
|
39
|
-
version: "1.2.
|
|
39
|
+
version: "1.2.410",
|
|
40
40
|
scope: "default",
|
|
41
41
|
shareConfig: {
|
|
42
42
|
singleton: !0,
|
|
@@ -81,7 +81,7 @@ async function r() {
|
|
|
81
81
|
}
|
|
82
82
|
},
|
|
83
83
|
"@camstack/ui-library": {
|
|
84
|
-
version: "1.2.
|
|
84
|
+
version: "1.2.323",
|
|
85
85
|
scope: "default",
|
|
86
86
|
shareConfig: {
|
|
87
87
|
singleton: !0,
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
require("./dist-
|
|
2
|
+
require("./dist-FpC7GFu_.js");
|
|
3
3
|
const require_orchestrator_training_addon = require("./orchestrator/training.addon.js");
|
|
4
4
|
const require_providers_modal_training_modal_addon = require("./providers/modal/training-modal.addon.js");
|
|
5
5
|
//#region src/providers/fake/fake-provider.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_dist = require("../dist-
|
|
2
|
+
const require_dist = require("../dist-FpC7GFu_.js");
|
|
3
3
|
let node_path = require("node:path");
|
|
4
4
|
node_path = require_dist.__toESM(node_path);
|
|
5
5
|
let node_crypto = require("node:crypto");
|