@camstack/system 1.2.478 → 1.2.480
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/{agent-https-CXMsY05a.mjs → agent-https-6j9JDvjh.mjs} +1 -1
- package/dist/{agent-https-D6a1IRPK.js → agent-https-DDnP9ywM.js} +1 -1
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
- package/dist/builtins/alerts/alerts.addon.js +1 -1
- package/dist/builtins/alerts/alerts.addon.mjs +1 -1
- package/dist/builtins/autotrack/index.js +1 -1
- package/dist/builtins/autotrack/index.mjs +1 -1
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +2 -2
- package/dist/builtins/calendars/calendars.addon.js +1 -1
- package/dist/builtins/calendars/calendars.addon.mjs +1 -1
- package/dist/builtins/camera-grid/index.js +1 -1
- package/dist/builtins/camera-grid/index.mjs +1 -1
- package/dist/builtins/composer/composer.addon.js +3 -3
- package/dist/builtins/composer/composer.addon.mjs +3 -3
- package/dist/builtins/console-logging/index.js +1 -1
- package/dist/builtins/console-logging/index.mjs +1 -1
- package/dist/builtins/core-blocks/core-blocks.addon.js +2 -2
- package/dist/builtins/core-blocks/core-blocks.addon.mjs +2 -2
- package/dist/builtins/device-history/device-history.addon.js +2 -2
- package/dist/builtins/device-history/device-history.addon.mjs +2 -2
- package/dist/builtins/device-manager/device-manager.addon.js +1 -1
- package/dist/builtins/device-manager/device-manager.addon.mjs +1 -1
- package/dist/builtins/hub-forwarder/index.js +1 -1
- package/dist/builtins/hub-forwarder/index.mjs +1 -1
- package/dist/builtins/keychain/index.js +3 -3
- package/dist/builtins/keychain/index.mjs +3 -3
- package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
- package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
- package/dist/builtins/local-auth/local-auth.addon.js +2 -2
- package/dist/builtins/local-auth/local-auth.addon.mjs +2 -2
- package/dist/builtins/local-network/local-network.addon.js +2 -2
- package/dist/builtins/local-network/local-network.addon.mjs +2 -2
- package/dist/builtins/loki-logging/index.js +1 -1
- package/dist/builtins/loki-logging/index.mjs +1 -1
- package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
- package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
- package/dist/builtins/platform-probe/index.js +1 -1
- package/dist/builtins/platform-probe/index.mjs +1 -1
- package/dist/builtins/record-entries/index.js +1 -1
- package/dist/builtins/record-entries/index.mjs +1 -1
- package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
- package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
- package/dist/builtins/snapshot/index.js +1 -1
- package/dist/builtins/snapshot/index.mjs +1 -1
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
- package/dist/builtins/sqlite-storage/index.js +1 -1
- package/dist/builtins/sqlite-storage/index.mjs +1 -1
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +2 -2
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +2 -2
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
- package/dist/builtins/system-config/system-config.addon.js +3 -3
- package/dist/builtins/system-config/system-config.addon.mjs +3 -3
- package/dist/builtins/winston-logging/index.js +1 -1
- package/dist/builtins/winston-logging/index.mjs +1 -1
- package/dist/{composition-sources-CQcYYZxL.mjs → composition-sources-CcxoCFH6.mjs} +1 -1
- package/dist/{composition-sources-yfxjp3qV.js → composition-sources-DTchGK8d.js} +1 -1
- package/dist/{constants-lWkcQxVE.mjs → constants-BUf0tYhG.mjs} +1 -1
- package/dist/{constants-D--JWd55.js → constants-Bc-5tr1I.js} +1 -1
- package/dist/{device-ca-J9ZsyoFw.mjs → device-ca-Bxjub9X-.mjs} +1 -1
- package/dist/{device-ca-D0KnLHMw.js → device-ca-CVO0N_Oz.js} +1 -1
- package/dist/{dist-iVUkxljP.js → dist-DDVtA047.js} +1 -311
- package/dist/{dist-OC-L50JY.mjs → dist-DfZKKnMP.mjs} +2 -270
- package/dist/file-host-worker.js +1 -1
- package/dist/file-host-worker.mjs +1 -1
- package/dist/{hub-mdns-ciao-BDKiKV75.js → hub-mdns-ciao-C49WPQfd.js} +2 -2
- package/dist/{hub-mdns-ciao-CvXWbJub.mjs → hub-mdns-ciao-KIDDBuDn.mjs} +2 -2
- package/dist/index.js +7 -7
- package/dist/index.mjs +7 -7
- package/dist/{restore-archive-DxkdJpWd.js → restore-archive-BXORpvel.js} +1 -1
- package/dist/{restore-archive-D1Uzojhc.mjs → restore-archive-NvTeD4tg.mjs} +1 -1
- package/dist/{retention-B3z_lBP1.js → retention-CAGXAgiQ.js} +1 -1
- package/dist/{retention-DdVnmXXS.mjs → retention-Dn74ba1y.mjs} +1 -1
- package/dist/{wal-maintenance-o9TyZeYp.js → wal-maintenance-ByIgd_g9.js} +0 -0
- package/dist/{wal-maintenance-DuO0D2H3.mjs → wal-maintenance-DkkPbYwt.mjs} +0 -0
- package/package.json +1 -19
- package/assets/display-palette/icon.svg +0 -7
- package/dist/builtins/display-palette/display-palette.addon.d.ts +0 -12
- package/dist/builtins/display-palette/display-palette.addon.js +0 -85
- package/dist/builtins/display-palette/display-palette.addon.mjs +0 -79
- package/dist/builtins/display-palette/index.d.ts +0 -1
- package/dist/builtins/display-palette/index.js +0 -8
- package/dist/builtins/display-palette/index.mjs +0 -2
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-DDVtA047.js");
|
|
7
7
|
const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
|
|
8
8
|
let zod = require("zod");
|
|
9
9
|
let node_crypto = require("node:crypto");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Bi as collectSecretConfigKeys, Bn as mayReadLocation, En as isLocationEnabled, Er as storageMigrationCapability, Nn as legacyModeOf, Oa as EventCategory, Rr as withLocationMode, Ta as transformSecretWrite, Tr as storageCapability, Vn as mayWriteToLocation, Wn as modeMayWrite, _n as gbToBytes, ba as secretTreeFromPaths, dt as StorageLocationModeSchema, fa as parseJsonObject, fr as resolveLocationMode, ft as StorageLocationTypeSchema, ia as isSecretMarker, ln as evictionPolicyOfLocation, pt as StorageMigrationJobSchema, q as LegacyStorageLocationDefaultSchema, qi as defineRecordKinds, ti as BaseAddon, ua as normalizeNodeId, ut as StorageCleanupJobSchema, va as resolveSecretMarkers, vi as REDACTED_SECRET, yr as settingsStoreCapability } from "../../dist-DfZKKnMP.mjs";
|
|
2
2
|
import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { randomUUID } from "node:crypto";
|
|
@@ -3,11 +3,11 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-DDVtA047.js");
|
|
7
7
|
const require_safe_buffer$1 = require("../../safe-buffer-D3aoa-7X.js");
|
|
8
8
|
const require_x509_es = require("../../x509.es-WtnRNyYS.js");
|
|
9
|
-
const require_agent_https = require("../../agent-https-
|
|
10
|
-
const require_constants$8 = require("../../constants-
|
|
9
|
+
const require_agent_https = require("../../agent-https-DDnP9ywM.js");
|
|
10
|
+
const require_constants$8 = require("../../constants-Bc-5tr1I.js");
|
|
11
11
|
const require_src$1 = require("../../src-CnAqG6EF.js");
|
|
12
12
|
let zod = require("zod");
|
|
13
13
|
let node_crypto = require("node:crypto");
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { a as __toCommonJS, i as __require, n as __esmMin, o as __toESM, r as __exportAll, t as __commonJSMin } from "../../chunk-CNf5ZN-e.mjs";
|
|
2
|
-
import { $i as
|
|
2
|
+
import { $i as hydrateSchema, Gi as customAction, Ki as defineCustomActions, br as shortHostname, ct as ServerNameSchema, ei as errMsg, ti as BaseAddon } from "../../dist-DfZKKnMP.mjs";
|
|
3
3
|
import { t as require_safe_buffer } from "../../safe-buffer-B1OjL1I9.mjs";
|
|
4
4
|
import { C as backdatedNotBefore, S as withUtcTimeEncoding, a as KeyUsageFlags, c as Pkcs10CertificateRequest, d as SubjectKeyIdentifierExtension, f as X509Certificate$1, l as Pkcs10CertificateRequestGenerator, m as cryptoProvider, n as BasicConstraintsExtension, o as KeyUsagesExtension, p as X509CertificateGenerator, r as ExtendedKeyUsageExtension, s as PemConverter, t as AuthorityKeyIdentifierExtension } from "../../x509.es-BRiJgOvu.mjs";
|
|
5
|
-
import { B as setProcessAgentHttpsNames, I as AGENT_HTTPS_NAMES_COLLECTION, L as AGENT_HTTPS_NAMES_COLUMNS, M as isLocalOnlyHostname, R as AgentHttpsNames, V as systemConfigRecordKinds, u as isPrivateAddress, z as getProcessAgentHttpsNames } from "../../agent-https-
|
|
6
|
-
import { a as MESH_CA_KEY_REF, c as SERVER_AUTH_OID, i as MESH_CA_FIELD, n as DEFAULT_HUB_TLS_TCP_PORT, o as MESH_CA_SETTINGS_KEY, r as MESH_CA_COMMON_NAME, s as MESH_CA_VALIDITY_DAYS, t as CLIENT_AUTH_OID } from "../../constants-
|
|
5
|
+
import { B as setProcessAgentHttpsNames, I as AGENT_HTTPS_NAMES_COLLECTION, L as AGENT_HTTPS_NAMES_COLUMNS, M as isLocalOnlyHostname, R as AgentHttpsNames, V as systemConfigRecordKinds, u as isPrivateAddress, z as getProcessAgentHttpsNames } from "../../agent-https-6j9JDvjh.mjs";
|
|
6
|
+
import { a as MESH_CA_KEY_REF, c as SERVER_AUTH_OID, i as MESH_CA_FIELD, n as DEFAULT_HUB_TLS_TCP_PORT, o as MESH_CA_SETTINGS_KEY, r as MESH_CA_COMMON_NAME, s as MESH_CA_VALIDITY_DAYS, t as CLIENT_AUTH_OID } from "../../constants-BUf0tYhG.mjs";
|
|
7
7
|
import { t as require_src } from "../../src-hG4grMU4.mjs";
|
|
8
8
|
import { z } from "zod";
|
|
9
9
|
import { X509Certificate, createHash, createPrivateKey, randomBytes, randomInt, sign, timingSafeEqual, verify, webcrypto } from "node:crypto";
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-DDVtA047.js");
|
|
7
7
|
const require_formatter = require("../../formatter-DqAKDlvN.js");
|
|
8
8
|
const require_log_file_read_protocol = require("../../log-file-read-protocol-D0WcLbIV.js");
|
|
9
9
|
let node_path = require("node:path");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Ln as logDestinationCapability, ti as BaseAddon } from "../../dist-DfZKKnMP.mjs";
|
|
2
2
|
import { t as formatLogLine } from "../../formatter-B7qW8bPJ.mjs";
|
|
3
3
|
import { a as LogFileIndexStore, i as serveRead, n as isFromReader, t as CancelBook } from "../../log-file-read-protocol-B7M3X3bT.mjs";
|
|
4
4
|
import { createRequire } from "node:module";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ei as
|
|
1
|
+
import { ei as errMsg, qr as compositionSourceKey } from "./dist-DfZKKnMP.mjs";
|
|
2
2
|
//#region src/builtins/core-blocks/composition-sources.ts
|
|
3
3
|
/**
|
|
4
4
|
* Describe what a composition reads and writes for SAVE-time validation
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** `secret://system/global/meshCaKey` — EC P-256 PKCS#8 PEM of the hub mesh CA. */
|
|
2
|
-
var MESH_CA_KEY_REF = require("./dist-
|
|
2
|
+
var MESH_CA_KEY_REF = require("./dist-DDVtA047.js").buildSecretRef({
|
|
3
3
|
owner: "system",
|
|
4
4
|
scope: { kind: "global" },
|
|
5
5
|
fieldPath: "meshCaKey"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as DEVICE_SAN_USER_PREFIX,
|
|
1
|
+
import { A as DEVICE_SAN_USER_PREFIX, k as DEVICE_SAN_CREDENTIAL_PREFIX, zi as buildSecretRef } from "./dist-DfZKKnMP.mjs";
|
|
2
2
|
import { C as backdatedNotBefore, S as withUtcTimeEncoding, a as KeyUsageFlags, d as SubjectKeyIdentifierExtension, f as X509Certificate$1, m as cryptoProvider, n as BasicConstraintsExtension, o as KeyUsagesExtension, p as X509CertificateGenerator, r as ExtendedKeyUsageExtension, s as PemConverter, t as AuthorityKeyIdentifierExtension, u as SubjectAlternativeNameExtension } from "./x509.es-BRiJgOvu.mjs";
|
|
3
3
|
import { X509Certificate, createPublicKey, randomBytes, verify, webcrypto } from "node:crypto";
|
|
4
4
|
//#region src/auth/jwt-signing-key.ts
|
|
@@ -44943,107 +44943,6 @@ var PALETTE_PRESET_IDS = [
|
|
|
44943
44943
|
"high-contrast",
|
|
44944
44944
|
"okabe-ito"
|
|
44945
44945
|
];
|
|
44946
|
-
function isPaletteEntryId(id) {
|
|
44947
|
-
return PALETTE_ENTRY_IDS.includes(id);
|
|
44948
|
-
}
|
|
44949
|
-
function isPalettePresetId(id) {
|
|
44950
|
-
return PALETTE_PRESET_IDS.includes(id);
|
|
44951
|
-
}
|
|
44952
|
-
/**
|
|
44953
|
-
* CIEDE2000 and WCAG contrast for the display palette (D939).
|
|
44954
|
-
*
|
|
44955
|
-
* One implementation, shared by the hub validator, the admin editor and
|
|
44956
|
-
* (phase 2) the viewer. The arithmetic matches the viewer's `src/theme/cie.ts`.
|
|
44957
|
-
*/
|
|
44958
|
-
/** Page backgrounds the contrast rule is measured against. */
|
|
44959
|
-
var PALETTE_BACKGROUNDS = {
|
|
44960
|
-
dark: "#0c0a09",
|
|
44961
|
-
light: "#fafaf9"
|
|
44962
|
-
};
|
|
44963
|
-
/** Marks that are not event kinds and share the raised distance floor. */
|
|
44964
|
-
var PALETTE_MARK_PAIR = ["live", "heatmapScrub"];
|
|
44965
|
-
var HEX = /^#[0-9a-fA-F]{6}$/;
|
|
44966
|
-
function srgbChannel(hex, start) {
|
|
44967
|
-
return Number.parseInt(hex.slice(start, start + 2), 16);
|
|
44968
|
-
}
|
|
44969
|
-
function srgbToLin(channel) {
|
|
44970
|
-
const x = channel / 255;
|
|
44971
|
-
return x <= .04045 ? x / 12.92 : ((x + .055) / 1.055) ** 2.4;
|
|
44972
|
-
}
|
|
44973
|
-
function relativeLuminance(hex) {
|
|
44974
|
-
const r = srgbToLin(srgbChannel(hex, 1));
|
|
44975
|
-
const g = srgbToLin(srgbChannel(hex, 3));
|
|
44976
|
-
const b = srgbToLin(srgbChannel(hex, 5));
|
|
44977
|
-
return .2126 * r + .7152 * g + .0722 * b;
|
|
44978
|
-
}
|
|
44979
|
-
/** WCAG contrast ratio of two `#rrggbb` colours. Non-hex returns 0. */
|
|
44980
|
-
function contrastRatio(a, b) {
|
|
44981
|
-
if (!HEX.test(a) || !HEX.test(b)) return 0;
|
|
44982
|
-
const hi = Math.max(relativeLuminance(a), relativeLuminance(b));
|
|
44983
|
-
const lo = Math.min(relativeLuminance(a), relativeLuminance(b));
|
|
44984
|
-
return (hi + .05) / (lo + .05);
|
|
44985
|
-
}
|
|
44986
|
-
function xyzToLab(hex) {
|
|
44987
|
-
const r = srgbToLin(srgbChannel(hex, 1));
|
|
44988
|
-
const g = srgbToLin(srgbChannel(hex, 3));
|
|
44989
|
-
const bl = srgbToLin(srgbChannel(hex, 5));
|
|
44990
|
-
const x = .4124564 * r + .3575761 * g + .1804375 * bl;
|
|
44991
|
-
const y = .2126729 * r + .7151522 * g + .072175 * bl;
|
|
44992
|
-
const z = .0193339 * r + .119192 * g + .9503041 * bl;
|
|
44993
|
-
const f = (t) => t > .008856 ? Math.cbrt(t) : 7.787 * t + 16 / 116;
|
|
44994
|
-
const fx = f(x / .95047);
|
|
44995
|
-
const fy = f(y);
|
|
44996
|
-
const fz = f(z / 1.08883);
|
|
44997
|
-
return {
|
|
44998
|
-
L: 116 * fy - 16,
|
|
44999
|
-
a: 500 * (fx - fy),
|
|
45000
|
-
b: 200 * (fy - fz)
|
|
45001
|
-
};
|
|
45002
|
-
}
|
|
45003
|
-
function hueDeg(ap, b) {
|
|
45004
|
-
if (ap === 0 && b === 0) return 0;
|
|
45005
|
-
const ang = Math.atan2(b, ap) * 180 / Math.PI;
|
|
45006
|
-
return ang < 0 ? ang + 360 : ang;
|
|
45007
|
-
}
|
|
45008
|
-
/** CIEDE2000. Non-hex returns 0 so a bad swatch fails the distinctness rule. */
|
|
45009
|
-
function deltaE00(hex1, hex2) {
|
|
45010
|
-
if (!HEX.test(hex1) || !HEX.test(hex2)) return 0;
|
|
45011
|
-
const lab1 = xyzToLab(hex1);
|
|
45012
|
-
const lab2 = xyzToLab(hex2);
|
|
45013
|
-
const cab7 = ((Math.hypot(lab1.a, lab1.b) + Math.hypot(lab2.a, lab2.b)) / 2) ** 7;
|
|
45014
|
-
const g = .5 * (1 - Math.sqrt(cab7 / (cab7 + 25 ** 7)));
|
|
45015
|
-
const a1p = (1 + g) * lab1.a;
|
|
45016
|
-
const a2p = (1 + g) * lab2.a;
|
|
45017
|
-
const c1p = Math.hypot(a1p, lab1.b);
|
|
45018
|
-
const c2p = Math.hypot(a2p, lab2.b);
|
|
45019
|
-
const h1p = hueDeg(a1p, lab1.b);
|
|
45020
|
-
const h2p = hueDeg(a2p, lab2.b);
|
|
45021
|
-
let dhp = 0;
|
|
45022
|
-
if (c1p * c2p !== 0) {
|
|
45023
|
-
dhp = h2p - h1p;
|
|
45024
|
-
if (dhp > 180) dhp -= 360;
|
|
45025
|
-
else if (dhp < -180) dhp += 360;
|
|
45026
|
-
}
|
|
45027
|
-
const dHp = 2 * Math.sqrt(c1p * c2p) * Math.sin(dhp * Math.PI / 360);
|
|
45028
|
-
const lbp = (lab1.L + lab2.L) / 2;
|
|
45029
|
-
const cbp = (c1p + c2p) / 2;
|
|
45030
|
-
let hbp = h1p + h2p;
|
|
45031
|
-
if (c1p * c2p !== 0) {
|
|
45032
|
-
if (Math.abs(h1p - h2p) > 180) hbp += hbp < 360 ? 360 : -360;
|
|
45033
|
-
hbp /= 2;
|
|
45034
|
-
}
|
|
45035
|
-
const t = 1 - .17 * Math.cos((hbp - 30) * Math.PI / 180) + .24 * Math.cos(2 * hbp * Math.PI / 180) + .32 * Math.cos((3 * hbp + 6) * Math.PI / 180) - .2 * Math.cos((4 * hbp - 63) * Math.PI / 180);
|
|
45036
|
-
const dTheta = 30 * Math.exp(-(((hbp - 275) / 25) ** 2));
|
|
45037
|
-
const cbp7 = cbp ** 7;
|
|
45038
|
-
const rc = 2 * Math.sqrt(cbp7 / (cbp7 + 25 ** 7));
|
|
45039
|
-
const sl = 1 + .015 * (lbp - 50) ** 2 / Math.sqrt(20 + (lbp - 50) ** 2);
|
|
45040
|
-
const sc = 1 + .045 * cbp;
|
|
45041
|
-
const sh = 1 + .015 * cbp * t;
|
|
45042
|
-
const rt = -Math.sin(2 * dTheta * Math.PI / 180) * rc;
|
|
45043
|
-
const dLp = lab2.L - lab1.L;
|
|
45044
|
-
const dCp = c2p - c1p;
|
|
45045
|
-
return Math.sqrt((dLp / sl) ** 2 + (dCp / sc) ** 2 + (dHp / sh) ** 2 + rt * (dCp / sc) * (dHp / sh));
|
|
45046
|
-
}
|
|
45047
44946
|
/** Frozen palette tables (D939). The spec refuses a table that breaks the rule. */
|
|
45048
44947
|
var CAMSTACK_HEX = {
|
|
45049
44948
|
motion: "#d946ef",
|
|
@@ -45273,7 +45172,7 @@ var setPaletteInputSchema = zod.z.union([zod.z.object({ presetId: zod.z.string()
|
|
|
45273
45172
|
presetId: zod.z.string(),
|
|
45274
45173
|
overrides: zod.z.record(zod.z.string(), paletteSwatchSchema)
|
|
45275
45174
|
})]);
|
|
45276
|
-
|
|
45175
|
+
zod.z.object({
|
|
45277
45176
|
presetId: zod.z.string(),
|
|
45278
45177
|
overrides: zod.z.record(zod.z.string(), paletteSwatchSchema)
|
|
45279
45178
|
});
|
|
@@ -45330,101 +45229,6 @@ function readyOf(row, source, customized) {
|
|
|
45330
45229
|
fallbacks: [...row.fallbacks]
|
|
45331
45230
|
};
|
|
45332
45231
|
}
|
|
45333
|
-
function namedColours(swatches, fallbacks) {
|
|
45334
|
-
const rows = [];
|
|
45335
|
-
for (const id of PALETTE_ENTRY_IDS) {
|
|
45336
|
-
const swatch = swatches[id];
|
|
45337
|
-
if (swatch !== void 0) rows.push({
|
|
45338
|
-
name: id,
|
|
45339
|
-
hex: swatch.hex
|
|
45340
|
-
});
|
|
45341
|
-
}
|
|
45342
|
-
fallbacks.forEach((hex, index) => {
|
|
45343
|
-
rows.push({
|
|
45344
|
-
name: `fallback-${index}`,
|
|
45345
|
-
hex
|
|
45346
|
-
});
|
|
45347
|
-
});
|
|
45348
|
-
return rows;
|
|
45349
|
-
}
|
|
45350
|
-
function gradientViolations(swatches) {
|
|
45351
|
-
const audio = swatches[AUDIO_ENTRY_ID];
|
|
45352
|
-
if (audio === void 0) return [];
|
|
45353
|
-
if (audio.form !== "gradient") return [{
|
|
45354
|
-
code: "bad-gradient",
|
|
45355
|
-
entry: AUDIO_ENTRY_ID
|
|
45356
|
-
}];
|
|
45357
|
-
return AUDIO_GRADIENT_ALPHAS.every((alpha, index) => audio.alphas[index] === alpha) ? [] : [{
|
|
45358
|
-
code: "bad-gradient",
|
|
45359
|
-
entry: AUDIO_ENTRY_ID
|
|
45360
|
-
}];
|
|
45361
|
-
}
|
|
45362
|
-
function isMarkPair(left, right) {
|
|
45363
|
-
const marks = PALETTE_MARK_PAIR;
|
|
45364
|
-
return marks.includes(left) && marks.includes(right);
|
|
45365
|
-
}
|
|
45366
|
-
/** Refuse a palette whose entries are not pairwise distinct on both themes. */
|
|
45367
|
-
function validatePalette(swatches, fallbacks) {
|
|
45368
|
-
const violations = [];
|
|
45369
|
-
for (const id of PALETTE_ENTRY_IDS) if (swatches[id] === void 0) violations.push({
|
|
45370
|
-
code: "missing-entry",
|
|
45371
|
-
entry: id
|
|
45372
|
-
});
|
|
45373
|
-
for (const key of Object.keys(swatches)) if (!isPaletteEntryId(key)) violations.push({
|
|
45374
|
-
code: "unknown-entry",
|
|
45375
|
-
entry: key
|
|
45376
|
-
});
|
|
45377
|
-
if (fallbacks.length !== 8) violations.push({ code: "bad-fallbacks" });
|
|
45378
|
-
violations.push(...gradientViolations(swatches));
|
|
45379
|
-
const rows = namedColours(swatches, fallbacks);
|
|
45380
|
-
for (let i = 0; i < rows.length; i++) for (let j = i + 1; j < rows.length; j++) {
|
|
45381
|
-
const left = rows[i];
|
|
45382
|
-
const right = rows[j];
|
|
45383
|
-
if (left === void 0 || right === void 0) continue;
|
|
45384
|
-
const deltaE = deltaE00(left.hex, right.hex);
|
|
45385
|
-
if (deltaE < (isMarkPair(left.name, right.name) ? 20 : 7)) violations.push({
|
|
45386
|
-
code: "too-close",
|
|
45387
|
-
left: left.name,
|
|
45388
|
-
right: right.name,
|
|
45389
|
-
deltaE
|
|
45390
|
-
});
|
|
45391
|
-
}
|
|
45392
|
-
for (const row of rows) for (const background of ["dark", "light"]) {
|
|
45393
|
-
const contrast = contrastRatio(row.hex, PALETTE_BACKGROUNDS[background]);
|
|
45394
|
-
if (contrast < 3) violations.push({
|
|
45395
|
-
code: "low-contrast",
|
|
45396
|
-
entry: row.name,
|
|
45397
|
-
background,
|
|
45398
|
-
contrast
|
|
45399
|
-
});
|
|
45400
|
-
}
|
|
45401
|
-
return violations.length === 0 ? { ok: true } : {
|
|
45402
|
-
ok: false,
|
|
45403
|
-
violations
|
|
45404
|
-
};
|
|
45405
|
-
}
|
|
45406
|
-
function formatPaletteViolation(violation) {
|
|
45407
|
-
switch (violation.code) {
|
|
45408
|
-
case "too-close": return `${violation.left} vs ${violation.right} (ΔE ${violation.deltaE.toFixed(1)})`;
|
|
45409
|
-
case "low-contrast": return `${violation.entry} on ${violation.background} (${violation.contrast.toFixed(1)}:1)`;
|
|
45410
|
-
case "missing-entry": return `${violation.entry} is missing`;
|
|
45411
|
-
case "unknown-entry": return `${violation.entry} is not a palette entry`;
|
|
45412
|
-
case "bad-gradient": return `${violation.entry} gradient is not the six canonical steps`;
|
|
45413
|
-
case "bad-fallbacks": return "fallback list must hold eight colours";
|
|
45414
|
-
case "unknown-preset": return `${violation.presetId} is not a preset`;
|
|
45415
|
-
}
|
|
45416
|
-
}
|
|
45417
|
-
function formatPaletteViolations(violations) {
|
|
45418
|
-
return violations.map(formatPaletteViolation).join("; ");
|
|
45419
|
-
}
|
|
45420
|
-
var PaletteRejectedError = class extends Error {
|
|
45421
|
-
violations;
|
|
45422
|
-
constructor(violations) {
|
|
45423
|
-
super(formatPaletteViolations(violations));
|
|
45424
|
-
this.name = "PaletteRejectedError";
|
|
45425
|
-
this.violations = violations;
|
|
45426
|
-
}
|
|
45427
|
-
};
|
|
45428
45232
|
function hashFallback(kind, fallbacks) {
|
|
45429
45233
|
let hash = 0;
|
|
45430
45234
|
for (let i = 0; i < kind.length; i++) hash = hash * 31 + (kind.codePointAt(i) ?? 0) >>> 0;
|
|
@@ -45443,78 +45247,6 @@ function paintHex(swatches, fallbacks, kind) {
|
|
|
45443
45247
|
if (direct !== void 0) return direct.hex;
|
|
45444
45248
|
return hashFallback(key, fallbacks);
|
|
45445
45249
|
}
|
|
45446
|
-
function mergeOverrides(base, overrides) {
|
|
45447
|
-
return {
|
|
45448
|
-
...base,
|
|
45449
|
-
...overrides
|
|
45450
|
-
};
|
|
45451
|
-
}
|
|
45452
|
-
function overridesOf(input) {
|
|
45453
|
-
return "overrides" in input ? input.overrides : {};
|
|
45454
|
-
}
|
|
45455
|
-
/** The palette a `setPalette` input would store. Invalid input is a refusal. */
|
|
45456
|
-
function paletteFromInput(input) {
|
|
45457
|
-
const row = presetById(input.presetId);
|
|
45458
|
-
if (row === void 0 || !isPalettePresetId(input.presetId)) throw new PaletteRejectedError([{
|
|
45459
|
-
code: "unknown-preset",
|
|
45460
|
-
presetId: input.presetId
|
|
45461
|
-
}]);
|
|
45462
|
-
const overrides = overridesOf(input);
|
|
45463
|
-
const swatches = mergeOverrides(row.swatches, overrides);
|
|
45464
|
-
const verdict = validatePalette(swatches, row.fallbacks);
|
|
45465
|
-
if (!verdict.ok) throw new PaletteRejectedError(verdict.violations);
|
|
45466
|
-
const customized = Object.keys(overrides).length > 0;
|
|
45467
|
-
return {
|
|
45468
|
-
status: "ready",
|
|
45469
|
-
presetId: row.id,
|
|
45470
|
-
customized,
|
|
45471
|
-
source: "stored",
|
|
45472
|
-
swatches,
|
|
45473
|
-
fallbacks: [...row.fallbacks]
|
|
45474
|
-
};
|
|
45475
|
-
}
|
|
45476
|
-
function isEmptyRecord(value) {
|
|
45477
|
-
return typeof value === "object" && value !== null && !Array.isArray(value) && Object.keys(value).length === 0;
|
|
45478
|
-
}
|
|
45479
|
-
/**
|
|
45480
|
-
* Interpret a settings blob. A missing row is the bundled preset and says so.
|
|
45481
|
-
* A blob that does not parse, names an unknown preset, or fails the rule is
|
|
45482
|
-
* `unknown` — never the default wearing the stored preset's name.
|
|
45483
|
-
*/
|
|
45484
|
-
function paletteFromStored(value) {
|
|
45485
|
-
if (value === void 0 || value === null || isEmptyRecord(value)) return bundledCamstack();
|
|
45486
|
-
const parsed = storedPaletteSchema.safeParse(value);
|
|
45487
|
-
if (!parsed.success) return {
|
|
45488
|
-
status: "unknown",
|
|
45489
|
-
reason: "stored palette is unreadable"
|
|
45490
|
-
};
|
|
45491
|
-
const row = presetById(parsed.data.presetId);
|
|
45492
|
-
if (row === void 0) return {
|
|
45493
|
-
status: "unknown",
|
|
45494
|
-
reason: `unknown preset ${parsed.data.presetId}`
|
|
45495
|
-
};
|
|
45496
|
-
const swatches = mergeOverrides(row.swatches, parsed.data.overrides);
|
|
45497
|
-
const verdict = validatePalette(swatches, row.fallbacks);
|
|
45498
|
-
if (!verdict.ok) return {
|
|
45499
|
-
status: "unknown",
|
|
45500
|
-
reason: formatPaletteViolations(verdict.violations)
|
|
45501
|
-
};
|
|
45502
|
-
const customized = Object.keys(parsed.data.overrides).length > 0;
|
|
45503
|
-
return {
|
|
45504
|
-
status: "ready",
|
|
45505
|
-
presetId: row.id,
|
|
45506
|
-
customized,
|
|
45507
|
-
source: "stored",
|
|
45508
|
-
swatches,
|
|
45509
|
-
fallbacks: [...row.fallbacks]
|
|
45510
|
-
};
|
|
45511
|
-
}
|
|
45512
|
-
function storedFromReady(ready, overrides) {
|
|
45513
|
-
return {
|
|
45514
|
-
presetId: ready.presetId,
|
|
45515
|
-
overrides: { ...overrides }
|
|
45516
|
-
};
|
|
45517
|
-
}
|
|
45518
45250
|
/**
|
|
45519
45251
|
* Unified event-kind taxonomy — THE single source of truth for
|
|
45520
45252
|
* `kind → { parentKind, category, level, color, iconId, labelKey, label,
|
|
@@ -95916,12 +95648,6 @@ Object.defineProperty(exports, "DEVICE_TOMBSTONE_RETENTION_MS", {
|
|
|
95916
95648
|
return DEVICE_TOMBSTONE_RETENTION_MS;
|
|
95917
95649
|
}
|
|
95918
95650
|
});
|
|
95919
|
-
Object.defineProperty(exports, "DISPLAY_PRESETS", {
|
|
95920
|
-
enumerable: true,
|
|
95921
|
-
get: function() {
|
|
95922
|
-
return DISPLAY_PRESETS;
|
|
95923
|
-
}
|
|
95924
|
-
});
|
|
95925
95651
|
Object.defineProperty(exports, "DataStoreDatabaseSchema", {
|
|
95926
95652
|
enumerable: true,
|
|
95927
95653
|
get: function() {
|
|
@@ -96108,12 +95834,6 @@ Object.defineProperty(exports, "PREFERENCES_MAX_VALUE_BYTES", {
|
|
|
96108
95834
|
return PREFERENCES_MAX_VALUE_BYTES;
|
|
96109
95835
|
}
|
|
96110
95836
|
});
|
|
96111
|
-
Object.defineProperty(exports, "PaletteRejectedError", {
|
|
96112
|
-
enumerable: true,
|
|
96113
|
-
get: function() {
|
|
96114
|
-
return PaletteRejectedError;
|
|
96115
|
-
}
|
|
96116
|
-
});
|
|
96117
95837
|
Object.defineProperty(exports, "PlaintextSecretError", {
|
|
96118
95838
|
enumerable: true,
|
|
96119
95839
|
get: function() {
|
|
@@ -96480,12 +96200,6 @@ Object.defineProperty(exports, "buildStreamParamsConfigSchema", {
|
|
|
96480
96200
|
return buildStreamParamsConfigSchema;
|
|
96481
96201
|
}
|
|
96482
96202
|
});
|
|
96483
|
-
Object.defineProperty(exports, "bundledCamstack", {
|
|
96484
|
-
enumerable: true,
|
|
96485
|
-
get: function() {
|
|
96486
|
-
return bundledCamstack;
|
|
96487
|
-
}
|
|
96488
|
-
});
|
|
96489
96203
|
Object.defineProperty(exports, "calendarsCapability", {
|
|
96490
96204
|
enumerable: true,
|
|
96491
96205
|
get: function() {
|
|
@@ -96750,12 +96464,6 @@ Object.defineProperty(exports, "disarmRoseMemory", {
|
|
|
96750
96464
|
return disarmRoseMemory;
|
|
96751
96465
|
}
|
|
96752
96466
|
});
|
|
96753
|
-
Object.defineProperty(exports, "displayPaletteCapability", {
|
|
96754
|
-
enumerable: true,
|
|
96755
|
-
get: function() {
|
|
96756
|
-
return displayPaletteCapability;
|
|
96757
|
-
}
|
|
96758
|
-
});
|
|
96759
96467
|
Object.defineProperty(exports, "emitDownForOwnedCaps", {
|
|
96760
96468
|
enumerable: true,
|
|
96761
96469
|
get: function() {
|
|
@@ -97140,18 +96848,6 @@ Object.defineProperty(exports, "objectInputDeclaresRequiredDeviceId", {
|
|
|
97140
96848
|
return objectInputDeclaresRequiredDeviceId;
|
|
97141
96849
|
}
|
|
97142
96850
|
});
|
|
97143
|
-
Object.defineProperty(exports, "paletteFromInput", {
|
|
97144
|
-
enumerable: true,
|
|
97145
|
-
get: function() {
|
|
97146
|
-
return paletteFromInput;
|
|
97147
|
-
}
|
|
97148
|
-
});
|
|
97149
|
-
Object.defineProperty(exports, "paletteFromStored", {
|
|
97150
|
-
enumerable: true,
|
|
97151
|
-
get: function() {
|
|
97152
|
-
return paletteFromStored;
|
|
97153
|
-
}
|
|
97154
|
-
});
|
|
97155
96851
|
Object.defineProperty(exports, "parseAcceleratorFactsJson", {
|
|
97156
96852
|
enumerable: true,
|
|
97157
96853
|
get: function() {
|
|
@@ -97416,12 +97112,6 @@ Object.defineProperty(exports, "storageProviderCapability", {
|
|
|
97416
97112
|
return storageProviderCapability;
|
|
97417
97113
|
}
|
|
97418
97114
|
});
|
|
97419
|
-
Object.defineProperty(exports, "storedFromReady", {
|
|
97420
|
-
enumerable: true,
|
|
97421
|
-
get: function() {
|
|
97422
|
-
return storedFromReady;
|
|
97423
|
-
}
|
|
97424
|
-
});
|
|
97425
97115
|
Object.defineProperty(exports, "streamCatalogCapability", {
|
|
97426
97116
|
enumerable: true,
|
|
97427
97117
|
get: function() {
|