@krak-stack/registry 0.6.0 → 0.8.0

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,56 @@
1
+ import { type TimeZoneContinent, type TimeZoneContinentFilter } from "./timezone-select.schema.js";
2
+ export { TimeZoneIdSchema, TimeZoneContinentFilterSchema, isTimeZoneId, } from "./timezone-select.schema.js";
3
+ export type { TimeZoneContinent, TimeZoneContinentFilter, } from "./timezone-select.schema.js";
4
+ export type TimeZoneDetails = {
5
+ timeZone: string;
6
+ name: string;
7
+ offset: string;
8
+ offsetMinutes: number;
9
+ time: string;
10
+ date: string;
11
+ };
12
+ export type TimezoneSelectMessages = {
13
+ label: string;
14
+ placeholder: string;
15
+ search: string;
16
+ empty: string;
17
+ clear: string;
18
+ yourTime: string;
19
+ comparisonTime: string;
20
+ selectedTime: string;
21
+ useLocal: string;
22
+ unavailable: string;
23
+ invalid: string;
24
+ invalidReference: string;
25
+ same: string;
26
+ ahead: (duration: string) => string;
27
+ behind: (duration: string) => string;
28
+ };
29
+ export type TimezoneSelectProps = {
30
+ value: string | null;
31
+ onValueChange: (timeZone: string | null) => void;
32
+ label?: string;
33
+ /** Code-only catalog filter; no continent control is rendered. */
34
+ continent?: TimeZoneContinentFilter;
35
+ /** Omit to detect the browser zone; null disables comparison. */
36
+ comparisonTimeZone?: string | null;
37
+ /** Omit for a live clock; fixed instants make DST comparisons reproducible. */
38
+ referenceTime?: Date;
39
+ name?: string;
40
+ disabled?: boolean;
41
+ className?: string;
42
+ locale?: string;
43
+ messages?: Partial<Record<string, Partial<TimezoneSelectMessages>>>;
44
+ };
45
+ /** Location-based continent groups. UTC and fixed-offset zones belong to All. */
46
+ export declare const getTimeZoneContinent: (timeZone: string) => TimeZoneContinent | null;
47
+ /** Primary runtime IANA zones, UTC and supported fixed-offset Etc zones; no duplicate alias catalog. */
48
+ export declare const getTimeZones: (additional?: readonly string[]) => string[];
49
+ /** The browser supplies these parts; no locale-dependent date-string parsing. */
50
+ export declare const getTimeZoneDetails: ({ timeZone, at, locale, }: {
51
+ timeZone: string;
52
+ at: Date;
53
+ locale?: string;
54
+ }) => TimeZoneDetails | undefined;
55
+ /** Adds time-zone semantics to the existing combobox; owns no generic picker behavior. */
56
+ export declare const TimezoneSelect: ({ value, onValueChange, label, continent, comparisonTimeZone, referenceTime, name, disabled, className, locale: override, messages, }: TimezoneSelectProps) => import("react").JSX.Element;