@camstack/ui-library 1.2.221 → 1.2.222
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/index.cjs +7 -2
- package/dist/index.js +8 -3
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -39438,12 +39438,17 @@ function PopoverRowAction({ icon: Icon, title, children }) {
|
|
|
39438
39438
|
}
|
|
39439
39439
|
//#endregion
|
|
39440
39440
|
//#region src/lib/resolve-sensor-display.ts
|
|
39441
|
+
/** Table keys are canonical spellings; providers often send `C` / `F` / `celsius`. */
|
|
39442
|
+
function canonUnit(raw) {
|
|
39443
|
+
if (raw === void 0) return void 0;
|
|
39444
|
+
return (0, _camstack_types.normalizeUnit)(raw) ?? raw;
|
|
39445
|
+
}
|
|
39441
39446
|
var identity = (raw) => raw;
|
|
39442
39447
|
function resolveSensorDisplay(input) {
|
|
39443
39448
|
const perCap = input.capName !== void 0 ? input.display?.perCap?.[input.capName] : void 0;
|
|
39444
39449
|
const precision = perCap?.precision ?? input.display?.precision ?? input.roleDefault?.precision ?? input.slicePrecision;
|
|
39445
|
-
const sourceUnit = input.sliceUnit ?? input.canonicalUnit;
|
|
39446
|
-
const overrideUnit = perCap?.unit ?? input.display?.unit ?? input.roleDefault?.unit;
|
|
39450
|
+
const sourceUnit = canonUnit(input.sliceUnit ?? input.canonicalUnit);
|
|
39451
|
+
const overrideUnit = canonUnit(perCap?.unit ?? input.display?.unit ?? input.roleDefault?.unit);
|
|
39447
39452
|
if (overrideUnit !== void 0 && sourceUnit !== void 0 && overrideUnit !== sourceUnit && (0, _camstack_types.canConvertUnit)(sourceUnit, overrideUnit)) return {
|
|
39448
39453
|
unit: overrideUnit,
|
|
39449
39454
|
precision,
|
package/dist/index.js
CHANGED
|
@@ -13,7 +13,7 @@ import * as __mfHostReactDOMClient from "react-dom/client";
|
|
|
13
13
|
import { createRoot } from "react-dom/client";
|
|
14
14
|
import * as __mfHostTrpcClient from "@trpc/client";
|
|
15
15
|
import { createTRPCClient, createWSClient, httpLink, splitLink, wsLink } from "@trpc/client";
|
|
16
|
-
import { ALL_CAPABILITY_DEFINITIONS, CAM_PROFILE_ORDER, CLIP_STILL_DISPOSITION_HEADER, CLIP_STILL_REASON_CODE_HEADER, CLIP_STILL_REASON_HEADER, CONTAINER_CHILD_PRIORITY, DEFAULT_EVENTS_BAND_BUFFER_SEC, DEFAULT_EVENT_COLOR, DEVICE_TYPE_CONTROL_KIND, DISPLAY_ICON_GROUPS, DeviceExportStatusSchema, DeviceFeature, DeviceRole, DeviceType, EVENT_TAXONOMY, EXTENSION_SLOTS, EXTENSION_SLOT_IDS, EventCategory, ExposedDeviceSchema, FIRST_LEVEL_MACRO_CLASSES, KNOWN_CAP_NAMES, MAX_SENSOR_TRIGGER_DEVICES, MODEL_PROVIDER_IDS, NAVIGATION_LIGHT_LEVEL_MAX, NAVIGATION_LIGHT_LEVEL_MIN, PET_FEEDER_MANUAL_FEED_MAX, PET_FEEDER_MANUAL_FEED_MIN, RECORDING_AUDIO_TRIGGER_OFFERED_DBFS, RECORDING_SOURCE_CAMSTACK_ADDON, RecordingConfigSchema, RecordingStatusSchema, SOURCE_CAP_ACTIVE_FIELD, STATIONARY_OVERLAY_STYLE, TIMEZONES, buildModelVariantGroups, canConvertUnit, clusterStepSettingFieldsFor, createDeviceProxy, createLazyTrpcSource, createSliceHandle, deriveRecordingMode, describeModelVariant, findTimezone, formatParkedFor, publicEventCategories, resolveContainerPrimaryChild, resolveDeviceControlKind, resolveRecordingProfiles, resolveVariantModelId, resolveViewableDeviceIds, searchDisplayIcons, selectAssignedProfileSlots, tryConvertUnit } from "@camstack/types";
|
|
16
|
+
import { ALL_CAPABILITY_DEFINITIONS, CAM_PROFILE_ORDER, CLIP_STILL_DISPOSITION_HEADER, CLIP_STILL_REASON_CODE_HEADER, CLIP_STILL_REASON_HEADER, CONTAINER_CHILD_PRIORITY, DEFAULT_EVENTS_BAND_BUFFER_SEC, DEFAULT_EVENT_COLOR, DEVICE_TYPE_CONTROL_KIND, DISPLAY_ICON_GROUPS, DeviceExportStatusSchema, DeviceFeature, DeviceRole, DeviceType, EVENT_TAXONOMY, EXTENSION_SLOTS, EXTENSION_SLOT_IDS, EventCategory, ExposedDeviceSchema, FIRST_LEVEL_MACRO_CLASSES, KNOWN_CAP_NAMES, MAX_SENSOR_TRIGGER_DEVICES, MODEL_PROVIDER_IDS, NAVIGATION_LIGHT_LEVEL_MAX, NAVIGATION_LIGHT_LEVEL_MIN, PET_FEEDER_MANUAL_FEED_MAX, PET_FEEDER_MANUAL_FEED_MIN, RECORDING_AUDIO_TRIGGER_OFFERED_DBFS, RECORDING_SOURCE_CAMSTACK_ADDON, RecordingConfigSchema, RecordingStatusSchema, SOURCE_CAP_ACTIVE_FIELD, STATIONARY_OVERLAY_STYLE, TIMEZONES, buildModelVariantGroups, canConvertUnit, clusterStepSettingFieldsFor, createDeviceProxy, createLazyTrpcSource, createSliceHandle, deriveRecordingMode, describeModelVariant, findTimezone, formatParkedFor, normalizeUnit, publicEventCategories, resolveContainerPrimaryChild, resolveDeviceControlKind, resolveRecordingProfiles, resolveVariantModelId, resolveViewableDeviceIds, searchDisplayIcons, selectAssignedProfileSlots, tryConvertUnit } from "@camstack/types";
|
|
17
17
|
import { createSystem } from "@camstack/sdk";
|
|
18
18
|
import { z } from "zod";
|
|
19
19
|
//#region ../../node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.js
|
|
@@ -39414,12 +39414,17 @@ function PopoverRowAction({ icon: Icon, title, children }) {
|
|
|
39414
39414
|
}
|
|
39415
39415
|
//#endregion
|
|
39416
39416
|
//#region src/lib/resolve-sensor-display.ts
|
|
39417
|
+
/** Table keys are canonical spellings; providers often send `C` / `F` / `celsius`. */
|
|
39418
|
+
function canonUnit(raw) {
|
|
39419
|
+
if (raw === void 0) return void 0;
|
|
39420
|
+
return normalizeUnit(raw) ?? raw;
|
|
39421
|
+
}
|
|
39417
39422
|
var identity = (raw) => raw;
|
|
39418
39423
|
function resolveSensorDisplay(input) {
|
|
39419
39424
|
const perCap = input.capName !== void 0 ? input.display?.perCap?.[input.capName] : void 0;
|
|
39420
39425
|
const precision = perCap?.precision ?? input.display?.precision ?? input.roleDefault?.precision ?? input.slicePrecision;
|
|
39421
|
-
const sourceUnit = input.sliceUnit ?? input.canonicalUnit;
|
|
39422
|
-
const overrideUnit = perCap?.unit ?? input.display?.unit ?? input.roleDefault?.unit;
|
|
39426
|
+
const sourceUnit = canonUnit(input.sliceUnit ?? input.canonicalUnit);
|
|
39427
|
+
const overrideUnit = canonUnit(perCap?.unit ?? input.display?.unit ?? input.roleDefault?.unit);
|
|
39423
39428
|
if (overrideUnit !== void 0 && sourceUnit !== void 0 && overrideUnit !== sourceUnit && canConvertUnit(sourceUnit, overrideUnit)) return {
|
|
39424
39429
|
unit: overrideUnit,
|
|
39425
39430
|
precision,
|