@camstack/ui-library 1.2.361 → 1.2.363
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/CHANGELOG.md +15 -0
- package/dist/composites/index.d.ts +1 -0
- package/dist/composites/timeline-slider.d.ts +47 -0
- package/dist/generated/system-hooks.d.ts +2 -0
- package/dist/{icons-Bxx_Side.cjs → icons-jbAtRNh8.cjs} +1 -1
- package/dist/index.cjs +1495 -1295
- package/dist/index.js +1485 -1295
- package/dist/primitives/button.d.ts +7 -1
- package/dist/primitives/file-input.d.ts +7 -0
- package/dist/primitives/index.d.ts +4 -0
- package/dist/primitives/radio.d.ts +4 -0
- package/dist/primitives/select.d.ts +4 -1
- package/dist/primitives/slider.d.ts +4 -0
- package/dist/primitives/textarea.d.ts +6 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.2.363] - 2026-10-31
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- Generated system hooks no longer survive in every addon page bundle when unused, so a new hook stops changing every page addon's built output
|
|
15
|
+
- TimelineSlider: a 24 h track with draggable, keyboard-movable markers and hold bands
|
|
16
|
+
- Added Textarea, Slider, Radio and FileInput primitives and a Button 'unstyled' variant, so pages stop using the browser's form controls
|
|
17
|
+
- Select accepts option children and a wrapperClassName, for grouped, computed or inline selects
|
|
18
|
+
|
|
19
|
+
## [1.2.362] - 2026-10-31
|
|
20
|
+
|
|
21
|
+
### Changed
|
|
22
|
+
|
|
23
|
+
- An integration instance can have its own settings form: a Reolink NVR / Home Hub shows its connection only, the default integration keeps the full form
|
|
24
|
+
|
|
10
25
|
## [1.2.361] - 2026-10-31
|
|
11
26
|
|
|
12
27
|
### Changed
|
|
@@ -237,3 +237,4 @@ export { ViewSwitch, type ViewSwitchOption, type ViewSwitchProps } from "./view-
|
|
|
237
237
|
export * from "./charts/index.js";
|
|
238
238
|
export * from "./device-history/index.js";
|
|
239
239
|
export { useDiscoveredOptions, type DiscoveredOption, type DiscoveredOptionsState } from "./config-discovered-select-field";
|
|
240
|
+
export { MINUTES_PER_DAY, TimelineSlider, clampMinute, minuteFromPointer, snapMinute, type TimelineBand, type TimelineMarker, type TimelineSliderProps, type TimelineTone } from "./timeline-slider";
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TimelineSlider — one 24 h day as a track with draggable markers.
|
|
3
|
+
*
|
|
4
|
+
* A marker is a point on the day (a scheduler point). Dragging, or the arrow
|
|
5
|
+
* keys on a focused marker, moves it in whole `step` minutes and reports the
|
|
6
|
+
* new minute of the day; the page decides what that means for its data. A
|
|
7
|
+
* marker that is not `draggable` is only selectable. `bands` paint stretches of
|
|
8
|
+
* the day (a hold's window) behind the markers.
|
|
9
|
+
*
|
|
10
|
+
* The pointer → minute mapping is the pure {@link minuteFromPointer}, so it is
|
|
11
|
+
* tested without a layout engine.
|
|
12
|
+
*/
|
|
13
|
+
import { type JSX } from "react";
|
|
14
|
+
export declare const MINUTES_PER_DAY = 1440;
|
|
15
|
+
export type TimelineTone = "primary" | "success" | "warning" | "info" | "neutral";
|
|
16
|
+
export interface TimelineMarker {
|
|
17
|
+
readonly id: string;
|
|
18
|
+
/** Minute of the day, 0..1439. */
|
|
19
|
+
readonly minute: number;
|
|
20
|
+
/** Short text on the marker (a time, `sunset -30m`). */
|
|
21
|
+
readonly label: string;
|
|
22
|
+
readonly tone?: TimelineTone;
|
|
23
|
+
readonly draggable?: boolean;
|
|
24
|
+
}
|
|
25
|
+
export interface TimelineBand {
|
|
26
|
+
readonly id: string;
|
|
27
|
+
readonly fromMinute: number;
|
|
28
|
+
readonly toMinute: number;
|
|
29
|
+
readonly tone?: TimelineTone;
|
|
30
|
+
}
|
|
31
|
+
export interface TimelineSliderProps {
|
|
32
|
+
readonly markers: readonly TimelineMarker[];
|
|
33
|
+
readonly bands?: readonly TimelineBand[];
|
|
34
|
+
readonly selectedId?: string | null;
|
|
35
|
+
/** Minutes per drag / arrow step. Default 5. */
|
|
36
|
+
readonly step?: number;
|
|
37
|
+
readonly ariaLabel: string;
|
|
38
|
+
readonly onSelect?: (id: string) => void;
|
|
39
|
+
readonly onMove?: (id: string, minute: number) => void;
|
|
40
|
+
}
|
|
41
|
+
/** Keep a minute on the day. */
|
|
42
|
+
export declare function clampMinute(minute: number): number;
|
|
43
|
+
/** Round a minute to the nearest `step`, kept on the day. */
|
|
44
|
+
export declare function snapMinute(minute: number, step: number): number;
|
|
45
|
+
/** The minute under a pointer at `clientX` on a track spanning `left`..`left + width`. */
|
|
46
|
+
export declare function minuteFromPointer(clientX: number, left: number, width: number, step: number): number;
|
|
47
|
+
export declare function TimelineSlider({ markers, bands, selectedId, step, ariaLabel, onSelect, onMove }: TimelineSliderProps): JSX.Element;
|
|
@@ -125,6 +125,8 @@ export declare const useAddonSettingsGetGlobalSettings: typeof trpc.addonSetting
|
|
|
125
125
|
export declare const useAddonSettingsUpdateGlobalSettings: typeof trpc.addonSettings.updateGlobalSettings.useMutation;
|
|
126
126
|
/** Generated alias around `trpc.addonSettings.getIntegrationSettings.useQuery`. */
|
|
127
127
|
export declare const useAddonSettingsGetIntegrationSettings: typeof trpc.addonSettings.getIntegrationSettings.useQuery;
|
|
128
|
+
/** Generated alias around `trpc.addonSettings.getIntegrationFormSchema.useQuery`. */
|
|
129
|
+
export declare const useAddonSettingsGetIntegrationFormSchema: typeof trpc.addonSettings.getIntegrationFormSchema.useQuery;
|
|
128
130
|
/** Generated alias around `trpc.addonSettings.getDeclaredSettingsKeys.useQuery`. */
|
|
129
131
|
export declare const useAddonSettingsGetDeclaredSettingsKeys: typeof trpc.addonSettings.getDeclaredSettingsKeys.useQuery;
|
|
130
132
|
/** Generated alias around `trpc.addonSettings.unsetStoredSettingsKeys.useMutation`. */
|
|
@@ -38951,7 +38951,7 @@ exports.Rabbit = Rabbit;
|
|
|
38951
38951
|
exports.Radar = require_index.Radar;
|
|
38952
38952
|
exports.Radiation = Radiation;
|
|
38953
38953
|
exports.Radical = Radical;
|
|
38954
|
-
exports.Radio = require_index.Radio;
|
|
38954
|
+
exports.Radio = require_index.Radio$1;
|
|
38955
38955
|
exports.RadioReceiver = RadioReceiver;
|
|
38956
38956
|
exports.RadioTower = require_index.RadioTower;
|
|
38957
38957
|
exports.Radius = Radius;
|