@camstack/ui-library 1.2.319 → 1.2.321

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.
@@ -0,0 +1,17 @@
1
+ import { type ConfigAccountSignInField } from "@camstack/types";
2
+ import { type ReactElement } from "react";
3
+ export declare function AccountSignInField({ field, values, disabled, onAction, onChangeMany }: {
4
+ readonly field: ConfigAccountSignInField;
5
+ readonly values: Record<string, unknown>;
6
+ readonly disabled?: boolean;
7
+ readonly onAction?: (action: string, key: string, value?: unknown) => Promise<unknown>;
8
+ readonly onChangeMany?: (patch: Record<string, unknown>) => void;
9
+ }): ReactElement;
10
+ export declare function SecretPresenceField({ field, values }: {
11
+ readonly field: {
12
+ readonly sourceKey: string;
13
+ readonly yesLabel: string;
14
+ readonly noLabel: string;
15
+ };
16
+ readonly values: Record<string, unknown>;
17
+ }): ReactElement;
@@ -26,6 +26,13 @@ export declare function dishwasherOperationMeta(operationState: DishwasherOperat
26
26
  export declare function dishwasherHeadline(status: DishwasherStatus, t?: UiTextFn): DishwasherStateMeta;
27
27
  /** Last segment of a feature key, spaced out: `Dishcare.Dishwasher.Program.Eco50` -> `Eco50`. */
28
28
  export declare function featureLabel(key: string): string;
29
+ /**
30
+ * Salt and rinse aid are consumable items (D915). Their events must not
31
+ * reappear on the hero — the Consumables section is the only surface.
32
+ */
33
+ export declare function isConsumableDishwasherEvent(event: string): boolean;
34
+ /** Raised events the hero may name. Consumable events are dropped. */
35
+ export declare function visibleDishwasherEvents(events: readonly string[]): readonly string[];
29
36
  /** Whole seconds as a short duration: `1 h 24 min`, `42 min`, `30 s`. */
30
37
  export declare function formatDuration(seconds: number, t?: UiTextFn): string;
31
38
  export declare function DishwasherInlineControl(props: DeviceControlProps): ReactNode;
@@ -21,6 +21,7 @@
21
21
  * `NAME_COLUMN_TRUNCATE_BREAKPOINT` in device-list/columns.
22
22
  */
23
23
  import { type ReactNode } from "react";
24
+ import type { UseDeviceProxyTrpc } from "../../hooks/use-device-proxy";
24
25
  import type { DeviceItemDevice, DeviceItemParent, DeviceItemVariant, VariantDefaults } from "./helpers";
25
26
  /**
26
27
  * How the name behaves when it does not fit.
@@ -30,6 +31,7 @@ import type { DeviceItemDevice, DeviceItemParent, DeviceItemVariant, VariantDefa
30
31
  */
31
32
  export type DeviceNameOverflow = "truncate" | "scroll";
32
33
  export interface DeviceItemHeaderProps {
34
+ readonly trpc: UseDeviceProxyTrpc;
33
35
  readonly device: DeviceItemDevice;
34
36
  readonly variant: DeviceItemVariant;
35
37
  readonly flags: VariantDefaults;
@@ -53,4 +55,4 @@ export interface DeviceItemHeaderProps {
53
55
  */
54
56
  readonly nameOverflow?: DeviceNameOverflow;
55
57
  }
56
- export declare function DeviceItemHeader({ device, variant, flags, parent, integrationIcon, hasChildren, expanded, onToggleExpand, onNavigateToParent, stacked, nameOverflow }: DeviceItemHeaderProps): ReactNode;
58
+ export declare function DeviceItemHeader({ trpc, device, variant, flags, parent, integrationIcon, hasChildren, expanded, onToggleExpand, onNavigateToParent, stacked, nameOverflow }: DeviceItemHeaderProps): ReactNode;
@@ -14,6 +14,10 @@ export type { AudioWaveformProps } from "./audio-waveform";
14
14
  export { AudioWaveform } from "./audio-waveform";
15
15
  export type { BatteryBadgeProps, BatteryStatusLike } from "./battery-badge";
16
16
  export { BatteryBadge } from "./battery-badge";
17
+ export type { RunningBadgeProps, RunningStatusLineProps } from "./running-badge";
18
+ export { RunningBadge, RunningStatusLine } from "./running-badge";
19
+ export { runningDurationSince, runningStatusParts } from "./running-status";
20
+ export type { RunningDuration, RunningStatusKey, RunningStatusParts } from "./running-status";
17
21
  export type { ConsumableLevel, ConsumableLevelBadgeProps, ConsumableLevelFieldView } from "./consumable-level-badge";
18
22
  export { CONSUMABLE_LOW_PERCENT, ConsumableLevelBadge, consumableItemLevel, consumableLevelBarClass, consumableLevelLabel, consumableLevelVariant, isConsumableLevelField, parseConsumableLevel } from "./consumable-level-badge";
19
23
  export type { NetworkLinkBadgeProps, NetworkLinkStatusLike } from "./network-link-badge";
@@ -0,0 +1,20 @@
1
+ /**
2
+ * RunningBadge — ring or idle mark around a device lead icon (D933).
3
+ * `null` = unknown (unanswered or cap reported null): children only.
4
+ */
5
+ import type { ReactNode } from "react";
6
+ export interface RunningBadgeProps {
7
+ /** true = running, false = idle, null = unknown. */
8
+ readonly running: boolean | null;
9
+ readonly children: ReactNode;
10
+ readonly className?: string;
11
+ }
12
+ export declare function RunningBadge({ running, children, className }: RunningBadgeProps): ReactNode;
13
+ export interface RunningStatusLineProps {
14
+ readonly running: boolean | null;
15
+ readonly since: number | null;
16
+ readonly phase: string | null;
17
+ readonly className?: string;
18
+ readonly now?: number;
19
+ }
20
+ export declare function RunningStatusLine({ running, since, phase, className, now }: RunningStatusLineProps): ReactNode;
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Pure running-state duration helpers for {@link RunningStatusLine} (D933).
3
+ * `now` is always passed in so tests and screenshots stay deterministic.
4
+ */
5
+ export interface RunningDuration {
6
+ /** At least 1 when under 60 minutes. */
7
+ readonly minutes: number;
8
+ }
9
+ export interface RunningDurationHours {
10
+ readonly hours: number;
11
+ }
12
+ export type RunningStatusKey = "running" | "idle" | "unknown";
13
+ export interface RunningStatusParts {
14
+ readonly key: RunningStatusKey;
15
+ readonly duration?: RunningDuration | RunningDurationHours;
16
+ readonly phase?: string;
17
+ }
18
+ /** Minutes elapsed since `since`, at least 1; null when `since` is not usable. */
19
+ export declare function runningDurationSince(since: number | null, now: number): RunningDuration | RunningDurationHours | null;
20
+ export declare function runningStatusParts(running: boolean | null, since: number | null, phase: string | null, now: number): RunningStatusParts;
@@ -18,9 +18,8 @@
18
18
  * `clampToParent` narrows the target dropdown + access checkboxes to
19
19
  * what the CALLER possesses. Admins pass `null` to allow everything.
20
20
  *
21
- * This is the RAW editor. The simple, two-question Access panel on
22
- * `/system/users` composes the same wire shape through `ACCESS_ROLES`; this
23
- * one is what an operator drops into when a grant set is not a plain role.
21
+ * This is the RAW editor, for TOKENS. People are not edited here: a person
22
+ * is an Admin or a Viewer (D921), set from `/system/identity?tab=users`.
24
23
  */
25
24
  import { type ReactNode } from "react";
26
25
  import { type TokenScope } from "@camstack/types";
@@ -1,6 +1,6 @@
1
1
  export { GateBadge, GateControl, type GateControlProps, type StepGate } from "./gate-control";
2
2
  export { LayeredSettingsForm, type LayeredSettingsFormProps, type LayerLabels, type SettingsTarget, stepFieldDomId } from "./layered-settings-form";
3
- export { bindsToModel, defaultOfField, formatSettingValue, isValueField, type ValueField } from "./setting-values";
3
+ export { bindsToModel, defaultOfField, formatSettingValue, isModelScopedField, isValueField, type ValueField, withoutModelScopedFields } from "./setting-values";
4
4
  export { SegmentedChoice, type SegmentedChoiceOption, type SegmentedChoiceProps } from "./segmented-choice";
5
5
  export { BackToStepsButton, dockBox, STEP_DOCK_WIDTH_PX, StepDetailDock, type StepDetailDockProps } from "./step-detail-dock";
6
6
  export { type SaveBarState, StepInspectorPanel, type StepInspectorPanelProps } from "./step-inspector-panel";
@@ -34,4 +34,4 @@ export interface LayeredSettingsFormProps {
34
34
  }
35
35
  /** DOM id of a field's box — the target of a search hit. */
36
36
  export declare function stepFieldDomId(key: string): string;
37
- export declare function LayeredSettingsForm({ addon, fields, layers, target, labels, modelId, onChangeLayer, rootModel, pinnedKeys, fieldActions, headerActions, highlightKey, disabled }: LayeredSettingsFormProps): JSX.Element;
37
+ export declare function LayeredSettingsForm({ addon, fields: givenFields, layers, target, labels, modelId, onChangeLayer, rootModel, pinnedKeys, fieldActions, headerActions, highlightKey, disabled }: LayeredSettingsFormProps): JSX.Element;
@@ -3,12 +3,20 @@
3
3
  * back to when no layer stores it. Pure, so the provenance line and its tests
4
4
  * agree on one spelling.
5
5
  */
6
- import type { ConfigField } from "@camstack/types";
6
+ import { type ConfigField } from "@camstack/types";
7
7
  /** A field that stores a value (not a separator, an info block or a group). */
8
8
  export type ValueField = Exclude<ConfigField, {
9
9
  readonly type: "separator" | "info" | "group";
10
10
  }>;
11
11
  export declare function isValueField(field: ConfigField): field is ValueField;
12
+ /**
13
+ * A field only the accelerator that runs the model may set (D927): a model id,
14
+ * a `<key>ModelId` binding, a `minConfidence*` floor, or any field the schema
15
+ * marks as bound to its model. A camera never renders one as an input.
16
+ */
17
+ export declare function isModelScopedField(field: ConfigField): boolean;
18
+ /** The fields a CAMERA may edit: every model-scoped field removed, groups recursed. */
19
+ export declare function withoutModelScopedFields(fields: readonly ConfigField[]): readonly ConfigField[];
12
20
  /** True for a D738 field whose value is stored with the model it was made for. */
13
21
  export declare function bindsToModel(field: ConfigField): boolean;
14
22
  /**
@@ -1949,6 +1949,8 @@ export declare const useRecordingOnboardSetSettings: typeof trpc.recordingOnboar
1949
1949
  export declare const useRecordingOnboardGetStatus: typeof trpc.recordingOnboard.getStatus.useQuery;
1950
1950
  /** Generated alias around `trpc.recordingSignal.getStatus.useQuery`. */
1951
1951
  export declare const useRecordingSignalGetStatus: typeof trpc.recordingSignal.getStatus.useQuery;
1952
+ /** Generated alias around `trpc.runningState.getStatus.useQuery`. */
1953
+ export declare const useRunningStateGetStatus: typeof trpc.runningState.getStatus.useQuery;
1952
1954
  /** Generated alias around `trpc.sceneMonitor.listScenes.useQuery`. */
1953
1955
  export declare const useSceneMonitorListScenes: typeof trpc.sceneMonitor.listScenes.useQuery;
1954
1956
  /** Generated alias around `trpc.sceneMonitor.listScenesBatch.useQuery`. */