@camstack/addon-model-studio 1.1.291 → 1.1.293
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-DXxWq7vE.mjs → MotionZonesSettings-DrHyXG0G.mjs} +2 -2
- package/dist/{PrivacyMaskSettings-DvOLfWNI.mjs → PrivacyMaskSettings-CuqGSOYk.mjs} +4 -4
- package/dist/{SceneMonitorEditor-DqBJBxj1.mjs → SceneMonitorEditor-_wt-7NOB.mjs} +3 -3
- package/dist/_stub.js +4256 -4135
- package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-BPa3rRsT.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-D1kg1qk9.mjs} +3 -3
- package/dist/_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-BPZnyWUq.mjs +26 -0
- package/dist/addon-model-studio.css +1 -1
- package/dist/{hostInit-7KFbe0cc.mjs → hostInit-CqUjCpJe.mjs} +2 -2
- package/dist/model-studio.addon.js +590 -75
- package/dist/model-studio.addon.mjs +590 -75
- package/dist/{player-overlays-DfIeB2mX.mjs → player-overlays-IswZiT1v.mjs} +1 -1
- package/dist/remoteEntry.js +1 -1
- package/dist/{responsive-CISBqF_G.mjs → responsive-BRDOoNTu.mjs} +1 -1
- package/dist/{scene-monitor-copy-CScGmaG7.mjs → scene-monitor-copy-BLrlOdpo.mjs} +1 -1
- package/dist/{square-BtvqwHZc.mjs → square-CqxajgGh.mjs} +1 -1
- package/dist/{trash-2-DIqyhuDF.mjs → trash-2-B67pP3l-.mjs} +1 -1
- package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-C-xXOFlf.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-DeT4IssS.mjs} +1 -1
- package/package.json +1 -1
- package/dist/_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-BNQVBn-8.mjs +0 -26
|
@@ -9184,7 +9184,7 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
|
9184
9184
|
return DeviceRole;
|
|
9185
9185
|
}({});
|
|
9186
9186
|
//#endregion
|
|
9187
|
-
//#region ../types/dist/composition-
|
|
9187
|
+
//#region ../types/dist/composition-BJ8iAZb3.mjs
|
|
9188
9188
|
/**
|
|
9189
9189
|
* The ffmpeg build every CamStack node downloads, per platform and arch.
|
|
9190
9190
|
*
|
|
@@ -9244,7 +9244,7 @@ portable("linux64"), portable("linuxarm64"), portable("macarm64"), portable("mac
|
|
|
9244
9244
|
* ONE table for everyone who asks "is this device HIGH?": the
|
|
9245
9245
|
* recorder's `RecordingTriggers.sensorDeviceIds` trigger, the post-analysis
|
|
9246
9246
|
* sensor markers, the orchestrator's camera-sensors bridge and
|
|
9247
|
-
* the sources of a
|
|
9247
|
+
* the sources of a pulse (`compilePulseOverride`, D936).
|
|
9248
9248
|
* A second copy would diverge at the first cap added, and the symptom — "the
|
|
9249
9249
|
* sensor rings the doorbell but does not record" — is exactly D62.
|
|
9250
9250
|
*
|
|
@@ -16434,6 +16434,13 @@ var ComposerUnreadableBlockSchema = object({
|
|
|
16434
16434
|
/** The parse error, in the operator's words. */
|
|
16435
16435
|
error: string()
|
|
16436
16436
|
});
|
|
16437
|
+
/** A confirmed release the hub did not accept. `deviceId` is the claim's device. */
|
|
16438
|
+
var UnreleasedClaimSchema = object({
|
|
16439
|
+
deviceId: number().int(),
|
|
16440
|
+
capName: string(),
|
|
16441
|
+
owner: string(),
|
|
16442
|
+
error: string()
|
|
16443
|
+
});
|
|
16437
16444
|
method(object({
|
|
16438
16445
|
/** The shared Blocks integration; null until `core-blocks` has reconciled it. */
|
|
16439
16446
|
integrationId: string().nullable(),
|
|
@@ -16443,7 +16450,13 @@ method(object({
|
|
|
16443
16450
|
/** Operator restarts: rebuild these runtimes and re-resolve their sources. Stores nothing (D62). */
|
|
16444
16451
|
restartBlockIds: array(string()),
|
|
16445
16452
|
/** Composition rows that exist but do not parse: held, never withdrawn, reported failed. */
|
|
16446
|
-
unreadableBlocks: array(ComposerUnreadableBlockSchema)
|
|
16453
|
+
unreadableBlocks: array(ComposerUnreadableBlockSchema),
|
|
16454
|
+
/**
|
|
16455
|
+
* Operator-confirmed deletions. Their claims are released on this apply,
|
|
16456
|
+
* before any replacement block claims. A block that merely vanished from the
|
|
16457
|
+
* snapshot is not listed here and still waits for two applies (D49).
|
|
16458
|
+
*/
|
|
16459
|
+
retiredBlockIds: array(string()).optional()
|
|
16447
16460
|
}), object({
|
|
16448
16461
|
blocks: array(object({
|
|
16449
16462
|
blockId: string(),
|
|
@@ -16455,7 +16468,13 @@ method(object({
|
|
|
16455
16468
|
* integration unknown, its own rows unread or read empty once). An empty
|
|
16456
16469
|
* apply the caller owes is paid off only by one the composer acted on (D49).
|
|
16457
16470
|
*/
|
|
16458
|
-
acted: boolean()
|
|
16471
|
+
acted: boolean(),
|
|
16472
|
+
/**
|
|
16473
|
+
* Confirmed releases this apply tried and the hub did not accept. Empty when
|
|
16474
|
+
* every one landed (or there was nothing to hand back). Absent on a result
|
|
16475
|
+
* that never got that far.
|
|
16476
|
+
*/
|
|
16477
|
+
unreleasedClaims: array(UnreleasedClaimSchema).optional()
|
|
16459
16478
|
}), {
|
|
16460
16479
|
kind: "mutation",
|
|
16461
16480
|
auth: "admin"
|
|
@@ -42352,6 +42371,381 @@ var _macroLookup = /* @__PURE__ */ new Map();
|
|
|
42352
42371
|
for (const [k, v] of Object.entries(YAMNET_TO_MACRO.mapping)) _macroLookup.set(k.toLowerCase(), v);
|
|
42353
42372
|
for (const [k, v] of Object.entries(APPLE_SA_TO_MACRO.mapping)) _macroLookup.set(k.toLowerCase(), v);
|
|
42354
42373
|
/**
|
|
42374
|
+
* Palette entry ids (D939). Audio is the one gradient; `audio-*` leaves are
|
|
42375
|
+
* not entries. `heatmapScrub` is a mark, not an event kind.
|
|
42376
|
+
*/
|
|
42377
|
+
var PALETTE_ENTRY_IDS = [
|
|
42378
|
+
"motion",
|
|
42379
|
+
"audio",
|
|
42380
|
+
"recording",
|
|
42381
|
+
"live",
|
|
42382
|
+
"heatmapScrub",
|
|
42383
|
+
"person",
|
|
42384
|
+
"vehicle",
|
|
42385
|
+
"animal",
|
|
42386
|
+
"package",
|
|
42387
|
+
"sensor",
|
|
42388
|
+
"control",
|
|
42389
|
+
"face",
|
|
42390
|
+
"plate",
|
|
42391
|
+
"car",
|
|
42392
|
+
"truck",
|
|
42393
|
+
"bus",
|
|
42394
|
+
"motorcycle",
|
|
42395
|
+
"bicycle",
|
|
42396
|
+
"airplane",
|
|
42397
|
+
"boat",
|
|
42398
|
+
"train",
|
|
42399
|
+
"bird",
|
|
42400
|
+
"dog",
|
|
42401
|
+
"cat",
|
|
42402
|
+
"horse",
|
|
42403
|
+
"sheep",
|
|
42404
|
+
"cow",
|
|
42405
|
+
"elephant",
|
|
42406
|
+
"bear",
|
|
42407
|
+
"zebra",
|
|
42408
|
+
"giraffe",
|
|
42409
|
+
"package-delivered",
|
|
42410
|
+
"package-picked-up",
|
|
42411
|
+
"suitcase",
|
|
42412
|
+
"backpack",
|
|
42413
|
+
"handbag",
|
|
42414
|
+
"contact",
|
|
42415
|
+
"motion-sensor",
|
|
42416
|
+
"smoke",
|
|
42417
|
+
"flood",
|
|
42418
|
+
"gas",
|
|
42419
|
+
"carbon-monoxide",
|
|
42420
|
+
"vibration",
|
|
42421
|
+
"tamper",
|
|
42422
|
+
"presence",
|
|
42423
|
+
"enum-sensor",
|
|
42424
|
+
"device-event",
|
|
42425
|
+
"lock",
|
|
42426
|
+
"cover",
|
|
42427
|
+
"switch",
|
|
42428
|
+
"siren",
|
|
42429
|
+
"button",
|
|
42430
|
+
"doorbell"
|
|
42431
|
+
];
|
|
42432
|
+
var AUDIO_ENTRY_ID = "audio";
|
|
42433
|
+
/** Six rungs, quiet → loud. The opaque end is the entry's hex. */
|
|
42434
|
+
var AUDIO_GRADIENT_ALPHAS = [
|
|
42435
|
+
.3,
|
|
42436
|
+
.42,
|
|
42437
|
+
.55,
|
|
42438
|
+
.7,
|
|
42439
|
+
.85,
|
|
42440
|
+
1
|
|
42441
|
+
];
|
|
42442
|
+
var PALETTE_PRESET_IDS = [
|
|
42443
|
+
"camstack",
|
|
42444
|
+
"high-contrast",
|
|
42445
|
+
"okabe-ito"
|
|
42446
|
+
];
|
|
42447
|
+
/** Frozen palette tables (D939). The spec refuses a table that breaks the rule. */
|
|
42448
|
+
var CAMSTACK_HEX = {
|
|
42449
|
+
motion: "#d946ef",
|
|
42450
|
+
audio: "#059eb8",
|
|
42451
|
+
recording: "#ef4444",
|
|
42452
|
+
live: "#8d7a00",
|
|
42453
|
+
heatmapScrub: "#4b32ff",
|
|
42454
|
+
person: "#11a64c",
|
|
42455
|
+
vehicle: "#3b82f6",
|
|
42456
|
+
animal: "#ea6a09",
|
|
42457
|
+
package: "#924667",
|
|
42458
|
+
sensor: "#624bbc",
|
|
42459
|
+
control: "#944d24",
|
|
42460
|
+
face: "#ed4f8d",
|
|
42461
|
+
plate: "#4b7027",
|
|
42462
|
+
car: "#9684cf",
|
|
42463
|
+
truck: "#0f9b89",
|
|
42464
|
+
bus: "#a734a9",
|
|
42465
|
+
motorcycle: "#c1133a",
|
|
42466
|
+
bicycle: "#0e6a9b",
|
|
42467
|
+
airplane: "#7c9928",
|
|
42468
|
+
boat: "#b17933",
|
|
42469
|
+
train: "#ad6ca3",
|
|
42470
|
+
bird: "#0f7c55",
|
|
42471
|
+
dog: "#c82700",
|
|
42472
|
+
cat: "#7268f2",
|
|
42473
|
+
horse: "#cb795e",
|
|
42474
|
+
sheep: "#b8636b",
|
|
42475
|
+
cow: "#cb2969",
|
|
42476
|
+
elephant: "#1158d2",
|
|
42477
|
+
bear: "#8d5e00",
|
|
42478
|
+
zebra: "#0097d6",
|
|
42479
|
+
giraffe: "#8f61bb",
|
|
42480
|
+
"package-delivered": "#cd3f9b",
|
|
42481
|
+
"package-picked-up": "#388a08",
|
|
42482
|
+
suitcase: "#666800",
|
|
42483
|
+
backpack: "#ec5022",
|
|
42484
|
+
handbag: "#a76ef8",
|
|
42485
|
+
contact: "#ab5a49",
|
|
42486
|
+
"motion-sensor": "#b95d1a",
|
|
42487
|
+
smoke: "#dd3858",
|
|
42488
|
+
flood: "#b31e7d",
|
|
42489
|
+
gas: "#5b70b5",
|
|
42490
|
+
"carbon-monoxide": "#7b4e8e",
|
|
42491
|
+
vibration: "#e65bba",
|
|
42492
|
+
tamper: "#98464b",
|
|
42493
|
+
presence: "#3a9468",
|
|
42494
|
+
"enum-sensor": "#7885f8",
|
|
42495
|
+
"device-event": "#8c43c8",
|
|
42496
|
+
lock: "#649653",
|
|
42497
|
+
cover: "#c67597",
|
|
42498
|
+
switch: "#7a812a",
|
|
42499
|
+
siren: "#ac5d7f",
|
|
42500
|
+
button: "#b276cd",
|
|
42501
|
+
doorbell: "#0087ab"
|
|
42502
|
+
};
|
|
42503
|
+
var CAMSTACK_FALLBACK = [
|
|
42504
|
+
"#b34dc7",
|
|
42505
|
+
"#1d7d34",
|
|
42506
|
+
"#db6b6c",
|
|
42507
|
+
"#a43d29",
|
|
42508
|
+
"#0e6ee6",
|
|
42509
|
+
"#29a10b",
|
|
42510
|
+
"#a98731",
|
|
42511
|
+
"#0181c6"
|
|
42512
|
+
];
|
|
42513
|
+
var HIGH_CONTRAST_HEX = {
|
|
42514
|
+
motion: "#964360",
|
|
42515
|
+
audio: "#23a132",
|
|
42516
|
+
recording: "#2494ca",
|
|
42517
|
+
live: "#bd7e2b",
|
|
42518
|
+
heatmapScrub: "#ad6eea",
|
|
42519
|
+
person: "#62611e",
|
|
42520
|
+
vehicle: "#f4534c",
|
|
42521
|
+
animal: "#1556cd",
|
|
42522
|
+
package: "#9c4415",
|
|
42523
|
+
sensor: "#066c48",
|
|
42524
|
+
control: "#f2479f",
|
|
42525
|
+
face: "#139d8a",
|
|
42526
|
+
plate: "#909024",
|
|
42527
|
+
car: "#8e35ab",
|
|
42528
|
+
truck: "#bd0b2b",
|
|
42529
|
+
bus: "#7a88ca",
|
|
42530
|
+
motorcycle: "#e26725",
|
|
42531
|
+
bicycle: "#a6679b",
|
|
42532
|
+
airplane: "#7c5720",
|
|
42533
|
+
boat: "#467a1b",
|
|
42534
|
+
train: "#6f65a4",
|
|
42535
|
+
bird: "#cb717f",
|
|
42536
|
+
dog: "#c62490",
|
|
42537
|
+
cat: "#b36850",
|
|
42538
|
+
horse: "#1872ac",
|
|
42539
|
+
sheep: "#927939",
|
|
42540
|
+
cow: "#428a5c",
|
|
42541
|
+
elephant: "#d41160",
|
|
42542
|
+
bear: "#799453",
|
|
42543
|
+
zebra: "#a85455",
|
|
42544
|
+
giraffe: "#746be8",
|
|
42545
|
+
"package-delivered": "#824a80",
|
|
42546
|
+
"package-picked-up": "#614ac1",
|
|
42547
|
+
suitcase: "#2f77f3",
|
|
42548
|
+
backpack: "#fa476d",
|
|
42549
|
+
handbag: "#c14cbe",
|
|
42550
|
+
contact: "#c83921",
|
|
42551
|
+
"motion-sensor": "#a07ebd",
|
|
42552
|
+
smoke: "#a25b13",
|
|
42553
|
+
flood: "#526bab",
|
|
42554
|
+
gas: "#924938",
|
|
42555
|
+
"carbon-monoxide": "#bb7e53",
|
|
42556
|
+
vibration: "#b66182",
|
|
42557
|
+
tamper: "#3c6931",
|
|
42558
|
+
presence: "#6c851d",
|
|
42559
|
+
"enum-sensor": "#ad2d48",
|
|
42560
|
+
"device-event": "#5e9b04",
|
|
42561
|
+
lock: "#00a062",
|
|
42562
|
+
cover: "#ad8624",
|
|
42563
|
+
switch: "#d05259",
|
|
42564
|
+
siren: "#cd67b3",
|
|
42565
|
+
button: "#c9746a",
|
|
42566
|
+
doorbell: "#338eeb"
|
|
42567
|
+
};
|
|
42568
|
+
var HIGH_CONTRAST_FALLBACK = [
|
|
42569
|
+
"#817f3b",
|
|
42570
|
+
"#a0733e",
|
|
42571
|
+
"#8658b2",
|
|
42572
|
+
"#956301",
|
|
42573
|
+
"#bc652d",
|
|
42574
|
+
"#647331",
|
|
42575
|
+
"#a14c9e",
|
|
42576
|
+
"#d14e71"
|
|
42577
|
+
];
|
|
42578
|
+
var OKABE_ITO_HEX = {
|
|
42579
|
+
motion: "#b88128",
|
|
42580
|
+
audio: "#1096c8",
|
|
42581
|
+
recording: "#009e73",
|
|
42582
|
+
live: "#9c8c22",
|
|
42583
|
+
heatmapScrub: "#0072b2",
|
|
42584
|
+
person: "#d55e00",
|
|
42585
|
+
vehicle: "#c0739f",
|
|
42586
|
+
animal: "#226d18",
|
|
42587
|
+
package: "#91446c",
|
|
42588
|
+
sensor: "#217b56",
|
|
42589
|
+
control: "#648647",
|
|
42590
|
+
face: "#c22998",
|
|
42591
|
+
plate: "#fa4575",
|
|
42592
|
+
car: "#956301",
|
|
42593
|
+
truck: "#2f77f3",
|
|
42594
|
+
bus: "#7a4e86",
|
|
42595
|
+
motorcycle: "#f54597",
|
|
42596
|
+
bicycle: "#bb3e75",
|
|
42597
|
+
airplane: "#e054c0",
|
|
42598
|
+
boat: "#457942",
|
|
42599
|
+
train: "#867afa",
|
|
42600
|
+
bird: "#88914c",
|
|
42601
|
+
dog: "#1556cd",
|
|
42602
|
+
cat: "#71702c",
|
|
42603
|
+
horse: "#9b4fa4",
|
|
42604
|
+
sheep: "#c0559d",
|
|
42605
|
+
cow: "#d14f65",
|
|
42606
|
+
elephant: "#98470f",
|
|
42607
|
+
bear: "#595896",
|
|
42608
|
+
zebra: "#96790e",
|
|
42609
|
+
giraffe: "#cb717b",
|
|
42610
|
+
"package-delivered": "#139d8a",
|
|
42611
|
+
"package-picked-up": "#906ead",
|
|
42612
|
+
suitcase: "#d02939",
|
|
42613
|
+
backpack: "#d41160",
|
|
42614
|
+
handbag: "#f64f54",
|
|
42615
|
+
contact: "#7258d2",
|
|
42616
|
+
"motion-sensor": "#b66182",
|
|
42617
|
+
smoke: "#627abb",
|
|
42618
|
+
flood: "#b86ae4",
|
|
42619
|
+
gas: "#a95261",
|
|
42620
|
+
"carbon-monoxide": "#c65d3c",
|
|
42621
|
+
vibration: "#7a40b7",
|
|
42622
|
+
tamper: "#914b34",
|
|
42623
|
+
presence: "#9481c3",
|
|
42624
|
+
"enum-sensor": "#ac6d47",
|
|
42625
|
+
"device-event": "#7b6fce",
|
|
42626
|
+
lock: "#c67662",
|
|
42627
|
+
cover: "#a6564d",
|
|
42628
|
+
switch: "#ad2c4e",
|
|
42629
|
+
siren: "#348e08",
|
|
42630
|
+
button: "#d27303",
|
|
42631
|
+
doorbell: "#55770f"
|
|
42632
|
+
};
|
|
42633
|
+
var OKABE_ITO_FALLBACK = [
|
|
42634
|
+
"#9a3784",
|
|
42635
|
+
"#a7392c",
|
|
42636
|
+
"#409d50",
|
|
42637
|
+
"#6987e7",
|
|
42638
|
+
"#ee5b3d",
|
|
42639
|
+
"#c0430d",
|
|
42640
|
+
"#af79b3",
|
|
42641
|
+
"#4b6628"
|
|
42642
|
+
];
|
|
42643
|
+
/**
|
|
42644
|
+
* The display palette (D939). One table of colours, three presets, one
|
|
42645
|
+
* validator. Taxonomy colours and every consumer read this — there is no
|
|
42646
|
+
* second hex table.
|
|
42647
|
+
*/
|
|
42648
|
+
var paletteHexSchema = string().regex(/^#[0-9a-f]{6}$/);
|
|
42649
|
+
var paletteSwatchSchema = discriminatedUnion("form", [object({
|
|
42650
|
+
form: literal("solid"),
|
|
42651
|
+
hex: paletteHexSchema
|
|
42652
|
+
}), object({
|
|
42653
|
+
form: literal("gradient"),
|
|
42654
|
+
hex: paletteHexSchema,
|
|
42655
|
+
alphas: array(number().gt(0).lte(1)).length(AUDIO_GRADIENT_ALPHAS.length)
|
|
42656
|
+
})]);
|
|
42657
|
+
var paletteReadySchema = object({
|
|
42658
|
+
status: literal("ready"),
|
|
42659
|
+
presetId: _enum(PALETTE_PRESET_IDS),
|
|
42660
|
+
customized: boolean(),
|
|
42661
|
+
source: _enum(["stored", "unconfigured"]),
|
|
42662
|
+
swatches: record(string(), paletteSwatchSchema),
|
|
42663
|
+
fallbacks: array(paletteHexSchema).length(8)
|
|
42664
|
+
});
|
|
42665
|
+
var paletteResultSchema = discriminatedUnion("status", [paletteReadySchema, object({
|
|
42666
|
+
status: literal("unknown"),
|
|
42667
|
+
reason: string()
|
|
42668
|
+
})]);
|
|
42669
|
+
var setPaletteInputSchema = union([object({ presetId: string() }), object({
|
|
42670
|
+
presetId: string(),
|
|
42671
|
+
overrides: record(string(), paletteSwatchSchema)
|
|
42672
|
+
})]);
|
|
42673
|
+
object({
|
|
42674
|
+
presetId: string(),
|
|
42675
|
+
overrides: record(string(), paletteSwatchSchema)
|
|
42676
|
+
});
|
|
42677
|
+
function solid(hex) {
|
|
42678
|
+
return {
|
|
42679
|
+
form: "solid",
|
|
42680
|
+
hex
|
|
42681
|
+
};
|
|
42682
|
+
}
|
|
42683
|
+
function audioGradient(hex) {
|
|
42684
|
+
return {
|
|
42685
|
+
form: "gradient",
|
|
42686
|
+
hex,
|
|
42687
|
+
alphas: [...AUDIO_GRADIENT_ALPHAS]
|
|
42688
|
+
};
|
|
42689
|
+
}
|
|
42690
|
+
function swatchesFrom(hexes) {
|
|
42691
|
+
const out = {};
|
|
42692
|
+
for (const id of PALETTE_ENTRY_IDS) {
|
|
42693
|
+
const hex = hexes[id];
|
|
42694
|
+
if (hex === void 0) throw new Error(`palette table missing ${id}`);
|
|
42695
|
+
out[id] = id === "audio" ? audioGradient(hex) : solid(hex);
|
|
42696
|
+
}
|
|
42697
|
+
return out;
|
|
42698
|
+
}
|
|
42699
|
+
function preset(id, name, hexes, fallbacks) {
|
|
42700
|
+
return {
|
|
42701
|
+
id,
|
|
42702
|
+
name,
|
|
42703
|
+
swatches: swatchesFrom(hexes),
|
|
42704
|
+
fallbacks
|
|
42705
|
+
};
|
|
42706
|
+
}
|
|
42707
|
+
var DISPLAY_PRESETS = [
|
|
42708
|
+
preset("camstack", "CamStack", CAMSTACK_HEX, CAMSTACK_FALLBACK),
|
|
42709
|
+
preset("high-contrast", "High contrast", HIGH_CONTRAST_HEX, HIGH_CONTRAST_FALLBACK),
|
|
42710
|
+
preset("okabe-ito", "Colour-blind safe", OKABE_ITO_HEX, OKABE_ITO_FALLBACK)
|
|
42711
|
+
];
|
|
42712
|
+
function presetById(id) {
|
|
42713
|
+
return DISPLAY_PRESETS.find((item) => item.id === id);
|
|
42714
|
+
}
|
|
42715
|
+
function bundledCamstack() {
|
|
42716
|
+
const presetRow = presetById("camstack");
|
|
42717
|
+
if (presetRow === void 0) throw new Error("CamStack preset missing");
|
|
42718
|
+
return readyOf(presetRow, "unconfigured", false);
|
|
42719
|
+
}
|
|
42720
|
+
function readyOf(row, source, customized) {
|
|
42721
|
+
return {
|
|
42722
|
+
status: "ready",
|
|
42723
|
+
presetId: row.id,
|
|
42724
|
+
customized,
|
|
42725
|
+
source,
|
|
42726
|
+
swatches: row.swatches,
|
|
42727
|
+
fallbacks: [...row.fallbacks]
|
|
42728
|
+
};
|
|
42729
|
+
}
|
|
42730
|
+
function hashFallback(kind, fallbacks) {
|
|
42731
|
+
let hash = 0;
|
|
42732
|
+
for (let i = 0; i < kind.length; i++) hash = hash * 31 + (kind.codePointAt(i) ?? 0) >>> 0;
|
|
42733
|
+
const hex = fallbacks[hash % fallbacks.length];
|
|
42734
|
+
if (hex === void 0) throw new Error("display palette has no fallback colour");
|
|
42735
|
+
return hex;
|
|
42736
|
+
}
|
|
42737
|
+
/** Colour a kind paints with. Audio leaves share the audio gradient's hex. */
|
|
42738
|
+
function paintHex(swatches, fallbacks, kind) {
|
|
42739
|
+
const key = kind.trim().toLowerCase();
|
|
42740
|
+
if (key.startsWith("audio-")) {
|
|
42741
|
+
const audio = swatches[AUDIO_ENTRY_ID];
|
|
42742
|
+
return audio !== void 0 ? audio.hex : hashFallback(key, fallbacks);
|
|
42743
|
+
}
|
|
42744
|
+
const direct = swatches[key];
|
|
42745
|
+
if (direct !== void 0) return direct.hex;
|
|
42746
|
+
return hashFallback(key, fallbacks);
|
|
42747
|
+
}
|
|
42748
|
+
/**
|
|
42355
42749
|
* Unified event-kind taxonomy — THE single source of truth for
|
|
42356
42750
|
* `kind → { parentKind, category, level, color, iconId, labelKey, label,
|
|
42357
42751
|
* icon }`.
|
|
@@ -42365,109 +42759,88 @@ for (const [k, v] of Object.entries(APPLE_SA_TO_MACRO.mapping)) _macroLookup.set
|
|
|
42365
42759
|
* - `addon-post-analysis/shared/frame/box-drawer.ts` (DEFAULT_COLOR)
|
|
42366
42760
|
* - the COCO / audio class maps (macro ↔ sub relationships)
|
|
42367
42761
|
*
|
|
42368
|
-
* The DATA (serializable —
|
|
42369
|
-
* `@camstack/types`.
|
|
42370
|
-
*
|
|
42371
|
-
*
|
|
42372
|
-
*
|
|
42762
|
+
* The DATA (serializable — parentKind / iconId / labelKey) lives here in
|
|
42763
|
+
* `@camstack/types`. Colour is NOT a second table: each entry's `color` is
|
|
42764
|
+
* the bundled CamStack display palette (D939). The effective cluster palette
|
|
42765
|
+
* is the `display-palette` capability. The UI-side mapping `iconId → lucide
|
|
42766
|
+
* component` and `labelKey → t()` lives in `@camstack/ui-library`.
|
|
42373
42767
|
*
|
|
42374
42768
|
* Two levels only (v1 YAGNI): macro → sub. `person` is a leaf macro.
|
|
42375
42769
|
*/
|
|
42376
|
-
var
|
|
42377
|
-
|
|
42378
|
-
|
|
42379
|
-
|
|
42380
|
-
|
|
42381
|
-
|
|
42382
|
-
|
|
42383
|
-
|
|
42384
|
-
|
|
42385
|
-
|
|
42386
|
-
};
|
|
42387
|
-
var DETECTION_SUB_COLORS = {
|
|
42388
|
-
car: "#f59e0b",
|
|
42389
|
-
truck: "#d97706",
|
|
42390
|
-
bus: "#b45309",
|
|
42391
|
-
motorcycle: "#eab308",
|
|
42392
|
-
bicycle: "#ca8a04",
|
|
42393
|
-
airplane: "#60a5fa",
|
|
42394
|
-
boat: "#2563eb",
|
|
42395
|
-
train: "#1d4ed8",
|
|
42396
|
-
bird: "#14b8a6",
|
|
42397
|
-
dog: "#84cc16",
|
|
42398
|
-
cat: "#f97316",
|
|
42399
|
-
horse: "#a16207",
|
|
42400
|
-
sheep: "#a3a3a3",
|
|
42401
|
-
cow: "#78716c",
|
|
42402
|
-
elephant: "#6b7280",
|
|
42403
|
-
bear: "#7c2d12",
|
|
42404
|
-
zebra: "#404040",
|
|
42405
|
-
giraffe: "#d4a373"
|
|
42406
|
-
};
|
|
42770
|
+
var BUNDLED_PALETTE = bundledCamstack();
|
|
42771
|
+
function kindColor(kind) {
|
|
42772
|
+
return paintHex(BUNDLED_PALETTE.swatches, BUNDLED_PALETTE.fallbacks, kind);
|
|
42773
|
+
}
|
|
42774
|
+
function firstFallback(fallbacks) {
|
|
42775
|
+
const hex = fallbacks[0];
|
|
42776
|
+
if (hex === void 0) throw new Error("display palette has no fallback colour");
|
|
42777
|
+
return hex;
|
|
42778
|
+
}
|
|
42779
|
+
firstFallback(BUNDLED_PALETTE.fallbacks);
|
|
42407
42780
|
function titleCase(id) {
|
|
42408
42781
|
return id.split(/[-_ ]/).filter((p) => p.length > 0).map((p) => p.charAt(0).toUpperCase() + p.slice(1)).join(" ");
|
|
42409
42782
|
}
|
|
42410
42783
|
var entries = /* @__PURE__ */ new Map();
|
|
42411
|
-
function macro(kind, category,
|
|
42784
|
+
function macro(kind, category, iconId, label) {
|
|
42412
42785
|
entries.set(kind, {
|
|
42413
42786
|
kind,
|
|
42414
42787
|
parentKind: null,
|
|
42415
42788
|
level: "macro",
|
|
42416
42789
|
category,
|
|
42417
|
-
color,
|
|
42790
|
+
color: kindColor(kind),
|
|
42418
42791
|
iconId,
|
|
42419
42792
|
labelKey: `eventKind.${kind}`,
|
|
42420
42793
|
label
|
|
42421
42794
|
});
|
|
42422
42795
|
}
|
|
42423
|
-
function sub(kind, parentKind, category,
|
|
42796
|
+
function sub(kind, parentKind, category, iconId, label) {
|
|
42424
42797
|
entries.set(kind, {
|
|
42425
42798
|
kind,
|
|
42426
42799
|
parentKind,
|
|
42427
42800
|
level: "sub",
|
|
42428
42801
|
category,
|
|
42429
|
-
color,
|
|
42802
|
+
color: kindColor(kind),
|
|
42430
42803
|
iconId,
|
|
42431
42804
|
labelKey: `eventKind.${kind}`,
|
|
42432
42805
|
label
|
|
42433
42806
|
});
|
|
42434
42807
|
}
|
|
42435
|
-
macro("motion", "motion",
|
|
42436
|
-
macro("audio", "audio",
|
|
42437
|
-
macro("person", "detection",
|
|
42438
|
-
macro("vehicle", "detection",
|
|
42439
|
-
macro("animal", "detection",
|
|
42440
|
-
macro("package", "package",
|
|
42441
|
-
macro("sensor", "sensor",
|
|
42442
|
-
macro("control", "control",
|
|
42808
|
+
macro("motion", "motion", "motion", "Motion");
|
|
42809
|
+
macro("audio", "audio", "audio", "Audio");
|
|
42810
|
+
macro("person", "detection", "person", "Person");
|
|
42811
|
+
macro("vehicle", "detection", "vehicle", "Vehicle");
|
|
42812
|
+
macro("animal", "detection", "animal", "Animal");
|
|
42813
|
+
macro("package", "package", "package", "Package");
|
|
42814
|
+
macro("sensor", "sensor", "sensor", "Sensor");
|
|
42815
|
+
macro("control", "control", "control", "Control");
|
|
42443
42816
|
for (const [cocoClass, macroClass] of Object.entries(COCO_TO_MACRO.mapping)) {
|
|
42444
42817
|
if (macroClass !== "vehicle" && macroClass !== "animal") continue;
|
|
42445
42818
|
if (entries.has(cocoClass)) continue;
|
|
42446
|
-
sub(cocoClass, macroClass, "detection",
|
|
42819
|
+
sub(cocoClass, macroClass, "detection", cocoClass, titleCase(cocoClass));
|
|
42447
42820
|
}
|
|
42448
|
-
sub("package-delivered", "package", "package",
|
|
42449
|
-
sub("package-picked-up", "package", "package",
|
|
42450
|
-
sub("contact", "sensor", "sensor", "
|
|
42451
|
-
sub("motion-sensor", "sensor", "sensor",
|
|
42452
|
-
sub("smoke", "sensor", "sensor", "
|
|
42453
|
-
sub("flood", "sensor", "sensor", "
|
|
42454
|
-
sub("gas", "sensor", "sensor", "
|
|
42455
|
-
sub("carbon-monoxide", "sensor", "sensor", "
|
|
42456
|
-
sub("vibration", "sensor", "sensor", "
|
|
42457
|
-
sub("tamper", "sensor", "sensor", "
|
|
42458
|
-
sub("presence", "sensor", "sensor", "
|
|
42459
|
-
sub("enum-sensor", "sensor", "sensor",
|
|
42460
|
-
sub("device-event", "sensor", "sensor", "
|
|
42461
|
-
sub("lock", "control", "control", "
|
|
42462
|
-
sub("cover", "control", "control", "
|
|
42463
|
-
sub("switch", "control", "control",
|
|
42464
|
-
sub("siren", "control", "control", "
|
|
42465
|
-
sub("button", "control", "control", "
|
|
42466
|
-
sub("doorbell", "control", "control", "
|
|
42821
|
+
sub("package-delivered", "package", "package", "package", "Package delivered");
|
|
42822
|
+
sub("package-picked-up", "package", "package", "package", "Package picked up");
|
|
42823
|
+
sub("contact", "sensor", "sensor", "door", "Contact");
|
|
42824
|
+
sub("motion-sensor", "sensor", "sensor", "pir", "Motion sensor");
|
|
42825
|
+
sub("smoke", "sensor", "sensor", "smoke", "Smoke");
|
|
42826
|
+
sub("flood", "sensor", "sensor", "water", "Water leak");
|
|
42827
|
+
sub("gas", "sensor", "sensor", "gas", "Gas");
|
|
42828
|
+
sub("carbon-monoxide", "sensor", "sensor", "smoke", "Carbon monoxide");
|
|
42829
|
+
sub("vibration", "sensor", "sensor", "vibration", "Vibration");
|
|
42830
|
+
sub("tamper", "sensor", "sensor", "tamper", "Tamper");
|
|
42831
|
+
sub("presence", "sensor", "sensor", "presence", "Presence");
|
|
42832
|
+
sub("enum-sensor", "sensor", "sensor", "generic", "Sensor state");
|
|
42833
|
+
sub("device-event", "sensor", "sensor", "button", "Device event");
|
|
42834
|
+
sub("lock", "control", "control", "lock", "Lock");
|
|
42835
|
+
sub("cover", "control", "control", "door", "Cover");
|
|
42836
|
+
sub("switch", "control", "control", "switch", "Switch");
|
|
42837
|
+
sub("siren", "control", "control", "siren", "Siren");
|
|
42838
|
+
sub("button", "control", "control", "button", "Button");
|
|
42839
|
+
sub("doorbell", "control", "control", "doorbell", "Doorbell");
|
|
42467
42840
|
for (const l of AUDIO_MACRO_LABELS) {
|
|
42468
42841
|
const kind = `audio-${l.id}`;
|
|
42469
42842
|
if (entries.has(kind)) continue;
|
|
42470
|
-
sub(kind, "audio", "audio",
|
|
42843
|
+
sub(kind, "audio", "audio", kind, l.name);
|
|
42471
42844
|
}
|
|
42472
42845
|
/** The complete taxonomy dictionary, keyed by kind. */
|
|
42473
42846
|
var EVENT_TAXONOMY = Object.freeze(Object.fromEntries(entries));
|
|
@@ -54274,7 +54647,8 @@ var BatteryStatusSchema = object({
|
|
|
54274
54647
|
*/
|
|
54275
54648
|
binary: boolean().optional()
|
|
54276
54649
|
});
|
|
54277
|
-
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat
|
|
54650
|
+
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat;
|
|
54651
|
+
method(object({
|
|
54278
54652
|
deviceId: number(),
|
|
54279
54653
|
/** Bound on the wait. Sensible range 3000–10000ms. */
|
|
54280
54654
|
timeoutMs: number().int().min(500).max(3e4).default(8e3)
|
|
@@ -54983,6 +55357,7 @@ var ConsumablesStatusSchema = object({
|
|
|
54983
55357
|
})),
|
|
54984
55358
|
lastChangedAt: number()
|
|
54985
55359
|
});
|
|
55360
|
+
Object.values(DeviceType), [...ConsumableRemainingUnitSchema.options], [...ConsumableStatusSchema.options], [...ConsumableKindSchema.options], [...ConsumableFormSchema.options];
|
|
54986
55361
|
Object.values(DeviceType), method(object({
|
|
54987
55362
|
deviceId: number().int().nonnegative(),
|
|
54988
55363
|
key: string().min(1)
|
|
@@ -55175,6 +55550,30 @@ DeviceType.Camera, method(object({ deviceId: number() }), DayNightOptionsSchema)
|
|
|
55175
55550
|
auth: "admin"
|
|
55176
55551
|
});
|
|
55177
55552
|
/**
|
|
55553
|
+
* display-palette — the cluster's one colour table (D939).
|
|
55554
|
+
*
|
|
55555
|
+
* Hub singleton. `getPalette` reports `unknown` when the settings store
|
|
55556
|
+
* cannot be read; it does not pretend the bundled preset was stored.
|
|
55557
|
+
* `setPalette` refuses a palette that fails the ΔE / contrast rule and names
|
|
55558
|
+
* the pairs.
|
|
55559
|
+
*/
|
|
55560
|
+
var presetSummarySchema = object({
|
|
55561
|
+
id: string(),
|
|
55562
|
+
name: string(),
|
|
55563
|
+
swatches: record(string(), paletteSwatchSchema),
|
|
55564
|
+
fallbacks: array(string())
|
|
55565
|
+
});
|
|
55566
|
+
method(_void(), paletteResultSchema, {
|
|
55567
|
+
auth: "protected",
|
|
55568
|
+
role: "viewer"
|
|
55569
|
+
}), method(_void(), array(presetSummarySchema).readonly(), {
|
|
55570
|
+
auth: "protected",
|
|
55571
|
+
role: "viewer"
|
|
55572
|
+
}), method(setPaletteInputSchema, paletteReadySchema, {
|
|
55573
|
+
kind: "mutation",
|
|
55574
|
+
auth: "admin"
|
|
55575
|
+
});
|
|
55576
|
+
/**
|
|
55178
55577
|
* Generic device-level status snapshot. Auto-registered by `BaseDevice`
|
|
55179
55578
|
* for every device, regardless of provider — the kernel needs a uniform
|
|
55180
55579
|
* cap-keyed slice for the basic device flags every consumer expects to
|
|
@@ -55454,6 +55853,7 @@ DeviceType.Dishwasher, method(object({
|
|
|
55454
55853
|
kind: "mutation",
|
|
55455
55854
|
auth: "protected"
|
|
55456
55855
|
}), method(object({ deviceId: DeviceIdSchema }), DishwasherOptionsSchema, { auth: "protected" });
|
|
55856
|
+
DeviceType.Camera;
|
|
55457
55857
|
object({
|
|
55458
55858
|
/** Ms epoch of the last press. null = never observed since this provider started. */
|
|
55459
55859
|
lastPressedAt: number().nullable(),
|
|
@@ -57246,6 +57646,7 @@ authKey: string().optional() }), object({
|
|
|
57246
57646
|
/** Human-readable error when `ok: false`. */
|
|
57247
57647
|
error: string().optional()
|
|
57248
57648
|
}), { kind: "mutation" });
|
|
57649
|
+
DeviceType.Camera;
|
|
57249
57650
|
object({
|
|
57250
57651
|
detected: boolean(),
|
|
57251
57652
|
/** Ms epoch of the last detected-true observation. Null if never detected. */
|
|
@@ -59317,7 +59718,8 @@ object({
|
|
|
59317
59718
|
since: number().nullable(),
|
|
59318
59719
|
source: RunningStateSourceSchema,
|
|
59319
59720
|
phase: string().nullable(),
|
|
59320
|
-
|
|
59721
|
+
/** null until a reading has been published (D393). */
|
|
59722
|
+
lastFetchedAt: number().nullable()
|
|
59321
59723
|
});
|
|
59322
59724
|
object({
|
|
59323
59725
|
deviceId: number(),
|
|
@@ -59325,6 +59727,7 @@ object({
|
|
|
59325
59727
|
phase: string().nullable()
|
|
59326
59728
|
});
|
|
59327
59729
|
Object.values(DeviceType);
|
|
59730
|
+
DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.PetFeeder;
|
|
59328
59731
|
DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
|
|
59329
59732
|
kind: "mutation",
|
|
59330
59733
|
auth: "admin"
|
|
@@ -66167,6 +66570,27 @@ Object.freeze({
|
|
|
66167
66570
|
access: "create",
|
|
66168
66571
|
role: "viewer"
|
|
66169
66572
|
},
|
|
66573
|
+
"displayPalette.getPalette": {
|
|
66574
|
+
capName: "display-palette",
|
|
66575
|
+
capScope: "system",
|
|
66576
|
+
addonId: null,
|
|
66577
|
+
access: "view",
|
|
66578
|
+
role: "viewer"
|
|
66579
|
+
},
|
|
66580
|
+
"displayPalette.listPresets": {
|
|
66581
|
+
capName: "display-palette",
|
|
66582
|
+
capScope: "system",
|
|
66583
|
+
addonId: null,
|
|
66584
|
+
access: "view",
|
|
66585
|
+
role: "viewer"
|
|
66586
|
+
},
|
|
66587
|
+
"displayPalette.setPalette": {
|
|
66588
|
+
capName: "display-palette",
|
|
66589
|
+
capScope: "system",
|
|
66590
|
+
addonId: null,
|
|
66591
|
+
access: "create",
|
|
66592
|
+
role: "admin"
|
|
66593
|
+
},
|
|
66170
66594
|
"doorbell.getStatus": {
|
|
66171
66595
|
capName: "doorbell",
|
|
66172
66596
|
capScope: "device",
|
|
@@ -76623,6 +77047,7 @@ var SYSTEM_CAP_VOCABULARY = {
|
|
|
76623
77047
|
"device-provider": system(INTERNAL),
|
|
76624
77048
|
"device-removal-hook": system(INTERNAL),
|
|
76625
77049
|
"device-state": system("the runtime-state mirror every trigger already reads through"),
|
|
77050
|
+
"display-palette": system("the cluster display palette — one colour table for every client, not a device action"),
|
|
76626
77051
|
"embedding-encoder": system(ML),
|
|
76627
77052
|
"face-gallery": system("the face gallery — curated on its own page"),
|
|
76628
77053
|
"failure-contribution": system(INTERNAL),
|
|
@@ -79507,6 +79932,96 @@ Object.freeze({
|
|
|
79507
79932
|
"smtp-provider": "email"
|
|
79508
79933
|
});
|
|
79509
79934
|
DeviceType.Camera;
|
|
79935
|
+
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat, DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.Dishwasher, DeviceType.Camera, DeviceType.Camera, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.PetFeeder;
|
|
79936
|
+
/**
|
|
79937
|
+
* A saved Customize assignment (D936). The schema is the type: callers use
|
|
79938
|
+
* `z.infer`, they do not restate the shape.
|
|
79939
|
+
*/
|
|
79940
|
+
var OverrideSourceSchema = object({
|
|
79941
|
+
addonId: string().min(1),
|
|
79942
|
+
stableId: string().min(1),
|
|
79943
|
+
cap: string().min(1),
|
|
79944
|
+
fieldPath: string().min(1)
|
|
79945
|
+
});
|
|
79946
|
+
var CustomizeTransformDraftSchema = discriminatedUnion("kind", [
|
|
79947
|
+
object({ kind: literal("identity") }),
|
|
79948
|
+
object({ kind: literal("invert") }),
|
|
79949
|
+
object({
|
|
79950
|
+
kind: literal("threshold"),
|
|
79951
|
+
comparison: _enum(["gte", "lte"]),
|
|
79952
|
+
threshold: number(),
|
|
79953
|
+
startDwellMs: number().nonnegative(),
|
|
79954
|
+
stopDwellMs: number().nonnegative()
|
|
79955
|
+
}),
|
|
79956
|
+
object({
|
|
79957
|
+
kind: literal("linear"),
|
|
79958
|
+
scale: number(),
|
|
79959
|
+
offset: number(),
|
|
79960
|
+
clampMin: number().optional(),
|
|
79961
|
+
clampMax: number().optional()
|
|
79962
|
+
}),
|
|
79963
|
+
object({
|
|
79964
|
+
kind: literal("enum-map"),
|
|
79965
|
+
mapping: record(string(), string().nullable())
|
|
79966
|
+
}),
|
|
79967
|
+
object({ kind: literal("number") })
|
|
79968
|
+
]);
|
|
79969
|
+
var ScalarOverrideDraftSchema = object({
|
|
79970
|
+
kind: literal("scalar"),
|
|
79971
|
+
cap: string().min(1),
|
|
79972
|
+
targetId: string().min(1),
|
|
79973
|
+
source: OverrideSourceSchema,
|
|
79974
|
+
transform: CustomizeTransformDraftSchema
|
|
79975
|
+
});
|
|
79976
|
+
var KeyedArrayOverrideDraftSchema = object({
|
|
79977
|
+
kind: literal("keyedArray"),
|
|
79978
|
+
cap: string().min(1),
|
|
79979
|
+
targetId: string().min(1),
|
|
79980
|
+
key: string().min(1),
|
|
79981
|
+
label: string().min(1),
|
|
79982
|
+
fieldPath: string().min(1),
|
|
79983
|
+
source: OverrideSourceSchema,
|
|
79984
|
+
transform: CustomizeTransformDraftSchema
|
|
79985
|
+
});
|
|
79986
|
+
var PulseOverrideDraftSchema = object({
|
|
79987
|
+
kind: literal("pulse"),
|
|
79988
|
+
cap: string().min(1),
|
|
79989
|
+
targetId: string().min(1),
|
|
79990
|
+
enabled: boolean(),
|
|
79991
|
+
debounceMs: number().nonnegative(),
|
|
79992
|
+
sources: array(OverrideSourceSchema).min(1)
|
|
79993
|
+
});
|
|
79994
|
+
var SpanSourceDraftSchema = OverrideSourceSchema.extend({ mode: _enum([
|
|
79995
|
+
"in-addition",
|
|
79996
|
+
"confirm",
|
|
79997
|
+
"replace"
|
|
79998
|
+
]).optional() });
|
|
79999
|
+
discriminatedUnion("kind", [
|
|
80000
|
+
ScalarOverrideDraftSchema,
|
|
80001
|
+
KeyedArrayOverrideDraftSchema,
|
|
80002
|
+
PulseOverrideDraftSchema,
|
|
80003
|
+
object({
|
|
80004
|
+
kind: literal("span"),
|
|
80005
|
+
cap: string().min(1),
|
|
80006
|
+
targetId: string().min(1),
|
|
80007
|
+
timeoutMs: number().nonnegative(),
|
|
80008
|
+
cooldownMs: number().nonnegative().optional(),
|
|
80009
|
+
sources: array(SpanSourceDraftSchema)
|
|
80010
|
+
})
|
|
80011
|
+
]);
|
|
80012
|
+
object({
|
|
80013
|
+
targetId: string().min(1),
|
|
80014
|
+
configured: boolean(),
|
|
80015
|
+
source: _enum(["native", "assigned"]),
|
|
80016
|
+
state: _enum([
|
|
80017
|
+
"active",
|
|
80018
|
+
"stale",
|
|
80019
|
+
"released",
|
|
80020
|
+
"unavailable"
|
|
80021
|
+
]),
|
|
80022
|
+
reason: string().nullable()
|
|
80023
|
+
});
|
|
80024
|
+
String.raw`rose\(active(\d+), changed(\d+), (\d+(?:\.\d+)?)\)`;
|
|
79510
80025
|
var G711_SCALE_CORRECTION_DB = {
|
|
79511
80026
|
PCMU: 20 * Math.log10(4),
|
|
79512
80027
|
PCMA: 20 * Math.log10(8)
|