@octax-app/hot-date-react 0.0.1

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,149 @@
1
+ import { useEffect as e, useRef as t, useState as n } from "react";
2
+ import { jsx as r } from "react/jsx-runtime";
3
+ //#region src/react/format.ts
4
+ var i = /YYYY|YY|MM|DD|yyyy|yy|mm|dd|M|D|m|d/g;
5
+ function a(e, t) {
6
+ if (!e || !t) return null;
7
+ let n = t.toUpperCase(), r = [
8
+ "YYYY",
9
+ "YY",
10
+ "MM",
11
+ "DD",
12
+ "M",
13
+ "D"
14
+ ], i = [], a = "^", o = 0;
15
+ for (; o < n.length;) {
16
+ let e = r.find((e) => n.startsWith(e, o));
17
+ e ? (i.push(e), a += e === "YYYY" ? "(\\d{4})" : e === "YY" ? "(\\d{2})" : "(\\d{1,2})", o += e.length) : (a += n[o].replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), o++);
18
+ }
19
+ a += "$";
20
+ let s = e.match(new RegExp(a, "i"));
21
+ if (!s) return null;
22
+ let c = (e) => {
23
+ let t = i.indexOf(e);
24
+ return t >= 0 ? s[t + 1] : null;
25
+ }, l = c("YYYY") ?? (c("YY") ? `20${c("YY")}` : null), u = c("MM") ?? c("M"), d = c("DD") ?? c("D");
26
+ return !l || !u || !d ? null : `${l}-${u.padStart(2, "0")}-${d.padStart(2, "0")}`;
27
+ }
28
+ function o(e, t) {
29
+ let [n, r, a] = e.split("-");
30
+ return t.replace(i, (e) => {
31
+ switch (e.toUpperCase()) {
32
+ case "YYYY": return n;
33
+ case "YY": return n.slice(-2);
34
+ case "MM": return r;
35
+ case "M": return String(parseInt(r, 10));
36
+ case "DD": return a;
37
+ case "D": return String(parseInt(a, 10));
38
+ default: return e;
39
+ }
40
+ });
41
+ }
42
+ var s = new Intl.DateTimeFormat("en-US", {
43
+ month: "short",
44
+ day: "numeric",
45
+ year: "numeric"
46
+ });
47
+ function c(e) {
48
+ let [t, n, r] = e.split("-").map(Number);
49
+ return s.format(new Date(Date.UTC(t, n - 1, r)));
50
+ }
51
+ function l(e) {
52
+ if (!e) return "";
53
+ if (e.includes("/")) {
54
+ let [t, n] = e.split("/");
55
+ return `${c(t)} — ${c(n)}`;
56
+ }
57
+ return c(e);
58
+ }
59
+ function u(e, t) {
60
+ if (!e) return null;
61
+ if (e.includes("/")) {
62
+ let [n, r] = e.split("/"), i = t ?? "YYYY-MM-DD";
63
+ return [o(n, i), o(r, i)];
64
+ }
65
+ return t ? o(e, t) : e;
66
+ }
67
+ //#endregion
68
+ //#region src/react/HotDate.tsx
69
+ function d(e) {
70
+ if (e !== void 0) return typeof e == "string" ? e : `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`;
71
+ }
72
+ function f({ value: i, onChange: o, onCommit: s, onClear: c, format: f, dateType: p = "point", startDate: m, endDate: h, className: g, style: _, placeholder: v, timezone: y, locale: b, weekStart: x, disabled: S, required: C, name: w, showHint: T, error: E, success: D, classNames: O }) {
73
+ let k = t(null), [A, j] = n(!!i), [M, N] = n(!1), P = T ?? !0;
74
+ return e(() => {
75
+ let e = k.current;
76
+ if (!e) return;
77
+ let t = (t, n) => {
78
+ n ? e.setAttribute(t, "") : e.removeAttribute(t);
79
+ }, n = (t, n) => {
80
+ n == null ? e.removeAttribute(t) : e.setAttribute(t, n);
81
+ };
82
+ n("placeholder", v), n("timezone", y), n("locale", b), n("week-start", x), n("start-date", d(m)), n("end-date", d(h)), n("mode", p), n("format", f), t("disabled", !!S), t("required", !!C), t("hide-hint", !P), n("name", w);
83
+ }, [
84
+ v,
85
+ y,
86
+ b,
87
+ x,
88
+ m,
89
+ h,
90
+ p,
91
+ f,
92
+ S,
93
+ C,
94
+ w,
95
+ P
96
+ ]), e(() => {
97
+ let e = k.current;
98
+ if (!e || i === void 0) return;
99
+ let t = i ? f ? a(i, f) ?? i : i : null;
100
+ e.value = t, j(!!t), t ? e.setAttribute("display-value", l(t)) : e.removeAttribute("display-value");
101
+ }, [i, f]), e(() => {
102
+ let e = k.current;
103
+ if (!e) return;
104
+ let t = (e) => {
105
+ let t = e.detail;
106
+ j(!!t.value), o?.(u(t.value, f));
107
+ }, n = (e) => {
108
+ let t = e.detail;
109
+ s?.(u(t.value, f));
110
+ }, r = () => {
111
+ j(!1), c?.();
112
+ }, i = () => N(!0), a = () => N(!1);
113
+ return e.addEventListener("value-change", t), e.addEventListener("value-commit", n), e.addEventListener("clear", r), e.addEventListener("focusin", i), e.addEventListener("focusout", a), () => {
114
+ e.removeEventListener("value-change", t), e.removeEventListener("value-commit", n), e.removeEventListener("clear", r), e.removeEventListener("focusin", i), e.removeEventListener("focusout", a);
115
+ };
116
+ }, [
117
+ o,
118
+ s,
119
+ c,
120
+ f
121
+ ]), e(() => {
122
+ let e = k.current;
123
+ if (!e) return;
124
+ let t = (e) => e ? typeof e == "function" ? e({
125
+ active: A,
126
+ disabled: !!S,
127
+ focused: M,
128
+ error: !!E,
129
+ success: !!D
130
+ }) : e : null, n = (n, r) => {
131
+ let i = t(r);
132
+ i ? e.setAttribute(n, i) : e.removeAttribute(n);
133
+ };
134
+ n("part-class-input", O?.input), n("part-class-ghost", O?.ghost), n("part-class-hint", O?.hint);
135
+ }, [
136
+ O,
137
+ A,
138
+ M,
139
+ S,
140
+ E,
141
+ D
142
+ ]), /* @__PURE__ */ r("hot-date", {
143
+ ref: k,
144
+ class: g,
145
+ style: _
146
+ });
147
+ }
148
+ //#endregion
149
+ export { f as HotDate, u as applyFormat, l as formatDisplayValue };
@@ -0,0 +1,64 @@
1
+ import type { Candidate, CompletionSuggestion, ParseContext, ParseResult, ParseStatus, ValueKind } from "./lib/parser/parser-types";
2
+ export declare class HotDateElement extends HTMLElement {
3
+ static formAssociated: boolean;
4
+ static get observedAttributes(): string[];
5
+ private readonly parser;
6
+ private readonly internals;
7
+ private styleObserver;
8
+ private readonly inputElement;
9
+ private readonly ghostElement;
10
+ private readonly ghostTypedElement;
11
+ private readonly ghostTailElement;
12
+ private readonly ghostHintElement;
13
+ private readonly ghostResolutionElement;
14
+ private readonly ambiguityElement;
15
+ private rawInputValue;
16
+ private committedValue;
17
+ private isDisplayMode;
18
+ private parseState;
19
+ private activeSuggestionIndexValue;
20
+ private lastTabCompletedTo;
21
+ constructor();
22
+ connectedCallback(): void;
23
+ disconnectedCallback(): void;
24
+ attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
25
+ get rawInput(): string;
26
+ set rawInput(nextValue: string);
27
+ get value(): string | null;
28
+ set value(nextValue: string | null);
29
+ get valueKind(): ValueKind;
30
+ get status(): ParseStatus;
31
+ get parseResult(): ParseResult;
32
+ get candidates(): Candidate[];
33
+ get suggestions(): CompletionSuggestion[];
34
+ get activeSuggestionIndex(): number;
35
+ focus(): void;
36
+ clear(): void;
37
+ confirm(): boolean;
38
+ acceptSuggestion(index?: number): boolean;
39
+ cycleSuggestion(direction: 1 | -1): void;
40
+ resolveAmbiguity(groupId: string, optionId: string): void;
41
+ setContext(context: Partial<ParseContext>): void;
42
+ private applyPartClass;
43
+ private updateStyles;
44
+ private syncExternalStyles;
45
+ private updateHintVisibility;
46
+ private bindEvents;
47
+ private parseAndRender;
48
+ private renderAll;
49
+ private renderGhost;
50
+ private computeCompletionTail;
51
+ private hasCompletionTail;
52
+ private renderAmbiguityChips;
53
+ private syncInputPresentation;
54
+ private createEmptyParseState;
55
+ private buildContext;
56
+ private getSelectedCandidate;
57
+ private getCanonicalValue;
58
+ private isCaretAtInputEnd;
59
+ private syncLiveValue;
60
+ private syncValidity;
61
+ private formatSingleIso;
62
+ private formatValue;
63
+ private emit;
64
+ }
@@ -0,0 +1,2 @@
1
+ import { t as e } from "./hot-date-CdRySQgv.js";
2
+ export { e as HotDateElement };
@@ -0,0 +1,13 @@
1
+ export interface AnchorPoint {
2
+ kind: "point";
3
+ date: Date;
4
+ suggestionText: string;
5
+ }
6
+ export interface AnchorRange {
7
+ kind: "range";
8
+ start: Date;
9
+ end: Date;
10
+ suggestionText: string;
11
+ }
12
+ export type AnchorValue = AnchorPoint | AnchorRange;
13
+ export declare function parseAnchor(normalizedInput: string, now: Date, timeZone: string): AnchorValue | null;
@@ -0,0 +1,23 @@
1
+ import type { Candidate } from "./parser-types";
2
+ export type CandidateWithSuggestion = Candidate & {
3
+ suggestionText: string;
4
+ };
5
+ export interface CandidateFactory {
6
+ createPoint(args: {
7
+ date: Date;
8
+ suggestionText: string;
9
+ confidence: number;
10
+ source: Candidate["source"];
11
+ id?: string;
12
+ }): CandidateWithSuggestion;
13
+ createRange(args: {
14
+ startDate: Date;
15
+ endDate: Date;
16
+ suggestionText: string;
17
+ confidence: number;
18
+ source: Candidate["source"];
19
+ }): CandidateWithSuggestion;
20
+ }
21
+ export declare function createCandidateFactory(timeZone: string): CandidateFactory;
22
+ export declare function startOfMinute(inputDate: Date): Date;
23
+ export declare function getCanonicalValue(candidate: Candidate | null): string | null;
@@ -0,0 +1 @@
1
+ export declare const CHALLENGE_PHRASES: readonly ["march 14 to march 28", "next monday in march plus 2 weeks", "today + 9 days", "friday before christmas", "labor day weekend + a week", "feb 18, 1988 - feb 29, 2024", "march 1st 1986", "3/1/86", "03/01/86", "3/01/1986", "mar 1 86", "m 1 86", "the last two weeks", "5 years in the past", "1 hour from now"];
@@ -0,0 +1,2 @@
1
+ import type { CompletionSuggestion } from "./parser-types";
2
+ export declare function buildSuggestions(rawInput: string): CompletionSuggestion[];
@@ -0,0 +1,10 @@
1
+ export interface ParsedEndpoint {
2
+ year?: number;
3
+ month: number;
4
+ day: number;
5
+ hasYear: boolean;
6
+ hour: number;
7
+ minute: number;
8
+ }
9
+ export declare function parseDateEndpoint(rawExpression: string, now: Date, timeZone: string): ParsedEndpoint | null;
10
+ export declare function isValidMonthDay(year: number, month: number, day: number, timeZone: string): boolean;
@@ -0,0 +1,21 @@
1
+ import { type CandidateFactory, type CandidateWithSuggestion } from "./candidates";
2
+ import type { ParseContext } from "./parser-types";
3
+ export interface RuleContext {
4
+ normalizedInput: string;
5
+ now: Date;
6
+ timeZone: string;
7
+ parseContext: ParseContext;
8
+ factory: CandidateFactory;
9
+ }
10
+ export declare function parseExplicitRange(ctx: RuleContext): CandidateWithSuggestion | null;
11
+ export declare function parseDurationBeforeAfterAnchor(ctx: RuleContext): CandidateWithSuggestion | null;
12
+ export declare function parseAnchorPlusDurationPoint(ctx: RuleContext): CandidateWithSuggestion | null;
13
+ export declare function parseAgoShorthand(ctx: RuleContext): CandidateWithSuggestion | null;
14
+ export declare function parseInDurationPoint(ctx: RuleContext): CandidateWithSuggestion | null;
15
+ export declare function parseBoundaryOfPeriod(ctx: RuleContext): CandidateWithSuggestion | null;
16
+ export declare function parseThisNextLastPeriod(ctx: RuleContext): CandidateWithSuggestion | null;
17
+ export declare function parseLookbackWindow(ctx: RuleContext): CandidateWithSuggestion | null;
18
+ export declare function parseAnchorRange(ctx: RuleContext): CandidateWithSuggestion | null;
19
+ export declare function parsePastDurationPoint(ctx: RuleContext): CandidateWithSuggestion | null;
20
+ export declare function parseFutureDurationPoint(ctx: RuleContext): CandidateWithSuggestion | null;
21
+ export declare function parsePointValue(ctx: RuleContext): CandidateWithSuggestion | null;
@@ -0,0 +1 @@
1
+ export declare function resolveHolidayDate(rawExpression: string, now: Date, timeZone: string): Date | null;
@@ -0,0 +1,5 @@
1
+ import type { ParserEngine } from "./parser-engine";
2
+ import type { ParseContext, ParseResult } from "./parser-types";
3
+ export declare class JsParserEngine implements ParserEngine {
4
+ parse(rawInput: string, context: ParseContext): ParseResult;
5
+ }
@@ -0,0 +1,4 @@
1
+ import type { ParseContext, ParseResult } from "./parser-types";
2
+ export interface ParserEngine {
3
+ parse(rawInput: string, context: ParseContext): ParseResult;
4
+ }
@@ -0,0 +1,66 @@
1
+ export type ParseStatus = "idle" | "valid" | "ambiguous" | "invalid";
2
+ export type ValueKind = "point" | "range" | null;
3
+ export interface ParseContext {
4
+ nowIso: string;
5
+ timezone: string;
6
+ locale: string;
7
+ weekStart: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday';
8
+ productRules: {
9
+ allowPast: boolean;
10
+ defaultTime?: {
11
+ hour: number;
12
+ minute: number;
13
+ };
14
+ timeOnlyPolicy: "today_if_future_else_tomorrow" | "always_require_date";
15
+ startDate?: string;
16
+ endDate?: string;
17
+ mode?: "point" | "range" | "any";
18
+ };
19
+ }
20
+ export interface Candidate {
21
+ id: string;
22
+ kind: "point" | "range";
23
+ utcIso?: string;
24
+ isoDate?: string;
25
+ range?: {
26
+ startUtcIso: string;
27
+ endUtcIso: string;
28
+ startDate: string;
29
+ endDate: string;
30
+ };
31
+ label: string;
32
+ confidence: number;
33
+ source: "rule" | "fallback";
34
+ }
35
+ export interface CompletionSuggestion {
36
+ id: string;
37
+ label: string;
38
+ insertText: string;
39
+ kind: "completion" | "candidate" | "shortcut";
40
+ confidence: number;
41
+ candidateId?: string;
42
+ }
43
+ export interface AmbiguityGroup {
44
+ id: string;
45
+ type: "relative_weekday_scope" | "week_start_convention" | "time_only_anchor" | "weekend_interpretation";
46
+ message: string;
47
+ required: boolean;
48
+ options: {
49
+ id: string;
50
+ label: string;
51
+ candidateId: string;
52
+ }[];
53
+ }
54
+ export interface ParseResult {
55
+ status: ParseStatus;
56
+ rawInput: string;
57
+ astType: string | null;
58
+ valueKind: ValueKind;
59
+ candidates: Candidate[];
60
+ suggestions: CompletionSuggestion[];
61
+ ambiguityGroups: AmbiguityGroup[];
62
+ selectedCandidateId: string | null;
63
+ previewLabel: string | null;
64
+ canonicalValue: string | null;
65
+ errors: string[];
66
+ }
@@ -0,0 +1,46 @@
1
+ export type DurationUnit = "hour" | "day" | "week" | "month" | "year";
2
+ export interface ParsedDurationExpression {
3
+ amount: number;
4
+ unit: DurationUnit;
5
+ }
6
+ export declare function parseMonthToken(rawToken: string): number | null;
7
+ export declare function parseWeekdayToken(rawToken: string): number | null;
8
+ export declare function parseYearToken(rawToken: string): number | null;
9
+ export declare function parseTimeToken(rawToken: string): {
10
+ hour: number;
11
+ minute: number;
12
+ } | null;
13
+ export declare function normalizeDurationUnit(rawUnit: string): DurationUnit | null;
14
+ export declare function parseDurationExpression(rawExpression: string, defaultUnit?: DurationUnit): ParsedDurationExpression | null;
15
+ export declare function createLocalDate(year: number, month: number, day: number, hour?: number, minute?: number, timeZone?: string): Date;
16
+ export declare function toUtcIso(date: Date): string;
17
+ export declare function toYmd(date: Date, timeZone?: string): string;
18
+ export declare function addDuration(inputDate: Date, amount: number, unit: DurationUnit, timeZone?: string): Date;
19
+ export declare function formatPointLabel(date: Date, timeZone?: string): string;
20
+ export declare function formatRangeLabel(startDate: Date, endDate: Date, timeZone?: string): string;
21
+ export declare function startOfDay(inputDate: Date, timeZone?: string): Date;
22
+ export declare function getNextWeekday(referenceDate: Date, weekday: number, timeZone?: string): Date;
23
+ export declare function getPreviousWeekdayBeforeDate(referenceDate: Date, weekday: number, timeZone?: string): Date;
24
+ export declare function getNthWeekdayInMonth(year: number, month: number, weekday: number, occurrence: number, timeZone?: string): Date;
25
+ export declare function getLastWeekdayInMonth(year: number, month: number, weekday: number, timeZone?: string): Date;
26
+ export declare function getNextAnnualNthWeekday(referenceDate: Date, month: number, weekday: number, occurrence: number, timeZone?: string): Date;
27
+ export declare function getNextAnnualLastWeekday(referenceDate: Date, month: number, weekday: number, timeZone?: string): Date;
28
+ export declare function getFirstWeekdayInMonth(year: number, month: number, weekday: number, timeZone?: string): Date;
29
+ export declare function getNextWeekdayInMonthAfterNow(referenceDate: Date, month: number, weekday: number, timeZone?: string): Date;
30
+ export declare function getFridayBeforeChristmas(referenceDate: Date, timeZone?: string): Date;
31
+ export declare function getNextAnnualDate(referenceDate: Date, month: number, day: number, timeZone?: string): Date;
32
+ export declare function getNextAnnualEasterDate(referenceDate: Date, timeZone?: string): Date;
33
+ export declare function getLaborDayDate(referenceDate: Date, timeZone?: string): Date;
34
+ export declare function withDayInMonth(referenceDate: Date, day: number, timeZone?: string): Date | null;
35
+ type WeekStartDay = "monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday";
36
+ export declare function startOfWeek(referenceDate: Date, weekStart: WeekStartDay, timeZone?: string): Date;
37
+ export declare function endOfWeek(referenceDate: Date, weekStart: WeekStartDay, timeZone?: string): Date;
38
+ export declare function startOfMonth(referenceDate: Date, timeZone?: string): Date;
39
+ export declare function endOfMonth(referenceDate: Date, timeZone?: string): Date;
40
+ export declare function startOfYear(referenceDate: Date, timeZone?: string): Date;
41
+ export declare function endOfYear(referenceDate: Date, timeZone?: string): Date;
42
+ export declare function getWeekendBeforeDate(referenceDate: Date, timeZone?: string): {
43
+ start: Date;
44
+ end: Date;
45
+ };
46
+ export {};
@@ -0,0 +1,5 @@
1
+ export declare function normalizeInput(value: string): string;
2
+ export declare function normalizeFuzzyInput(value: string): string;
3
+ export declare function damerauLevenshtein(a: string, b: string): number;
4
+ export declare function stripOrdinalSuffix(value: string): string;
5
+ export declare function parseCountToken(rawToken: string): number | null;
@@ -0,0 +1,68 @@
1
+ import "../hot-date";
2
+ export interface ClassNameProps {
3
+ active?: boolean;
4
+ disabled?: boolean;
5
+ focused?: boolean;
6
+ error?: boolean;
7
+ success?: boolean;
8
+ }
9
+ export type ClassNameValue = string | ((props: ClassNameProps) => string);
10
+ export interface ClassNamesConfig {
11
+ input?: ClassNameValue;
12
+ ghost?: ClassNameValue;
13
+ hint?: ClassNameValue;
14
+ }
15
+ type WEEK_START_MAP = 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday';
16
+ export interface HotDateProps {
17
+ value?: string | null;
18
+ onChange?: (value: string | [string, string] | null) => void;
19
+ onCommit?: (value: string | [string, string] | null) => void;
20
+ onClear?: () => void;
21
+ format?: string;
22
+ dateType?: "point" | "range";
23
+ startDate?: Date | string;
24
+ endDate?: Date | string;
25
+ className?: string;
26
+ style?: React.CSSProperties;
27
+ placeholder?: string;
28
+ timezone?: string;
29
+ locale?: string;
30
+ weekStart?: WEEK_START_MAP;
31
+ disabled?: boolean;
32
+ required?: boolean;
33
+ name?: string;
34
+ showHint?: boolean;
35
+ error?: boolean;
36
+ success?: boolean;
37
+ classNames?: ClassNamesConfig;
38
+ }
39
+ declare module "react" {
40
+ namespace JSX {
41
+ interface IntrinsicElements {
42
+ "hot-date": React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & {
43
+ class?: string;
44
+ name?: string;
45
+ placeholder?: string;
46
+ timezone?: string;
47
+ locale?: string;
48
+ "week-start"?: string;
49
+ "allow-past"?: string;
50
+ "start-date"?: string;
51
+ "end-date"?: string;
52
+ "hide-examples"?: string;
53
+ "hide-hint"?: string;
54
+ "display-value"?: string;
55
+ format?: string;
56
+ mode?: string;
57
+ disabled?: boolean;
58
+ required?: boolean;
59
+ value?: string;
60
+ "part-class-input"?: string;
61
+ "part-class-ghost"?: string;
62
+ "part-class-hint"?: string;
63
+ };
64
+ }
65
+ }
66
+ }
67
+ export declare function HotDate({ value, onChange, onCommit, onClear, format, dateType, startDate, endDate, className, style, placeholder, timezone, locale, weekStart, disabled, required, name, showHint, error, success, classNames, }: HotDateProps): import("react/jsx-runtime").JSX.Element;
68
+ export {};
@@ -0,0 +1,3 @@
1
+ export declare function parseFormatToIso(formatted: string, format: string): string | null;
2
+ export declare function formatDisplayValue(canonical: string | null): string;
3
+ export declare function applyFormat(canonical: string | null, format?: string): string | [string, string] | null;
@@ -0,0 +1,3 @@
1
+ export { HotDate } from "./HotDate";
2
+ export type { HotDateProps, ClassNamesConfig, ClassNameValue } from "./HotDate";
3
+ export { applyFormat, formatDisplayValue } from "./format";
package/package.json ADDED
@@ -0,0 +1,76 @@
1
+ {
2
+ "name": "@octax-app/hot-date-react",
3
+ "version": "0.0.1",
4
+ "description": "React wrapper for the hot-date natural language date input web component.",
5
+ "type": "module",
6
+ "main": "./dist/hot-date.js",
7
+ "module": "./dist/hot-date.js",
8
+ "types": "./dist/hot-date.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/hot-date.d.ts",
12
+ "import": "./dist/hot-date.js"
13
+ },
14
+ "./react": {
15
+ "types": "./dist/react/index.d.ts",
16
+ "import": "./dist/hot-date-react.js"
17
+ }
18
+ },
19
+ "files": [
20
+ "dist"
21
+ ],
22
+ "sideEffects": [
23
+ "./dist/hot-date.js",
24
+ "./dist/hot-date-react.js"
25
+ ],
26
+ "keywords": [
27
+ "date-picker",
28
+ "date-input",
29
+ "web-component",
30
+ "custom-element",
31
+ "react"
32
+ ],
33
+ "author": "Scott Tolinski",
34
+ "license": "MIT",
35
+ "repository": {
36
+ "type": "git",
37
+ "url": "git+https://github.com/octax-app/hot-date-react.git"
38
+ },
39
+ "peerDependencies": {
40
+ "react": ">=18",
41
+ "react-dom": ">=18"
42
+ },
43
+ "publishConfig": {
44
+ "access": "public",
45
+ "registry": "https://registry.npmjs.org"
46
+ },
47
+ "scripts": {
48
+ "dev": "vite",
49
+ "build": "vite build && tsc -p tsconfig.build.json",
50
+ "preview": "vite preview",
51
+ "test": "vitest run",
52
+ "test:watch": "vitest",
53
+ "bench": "node --import tsx bench/parser.bench.ts",
54
+ "coverage:variations": "node --import tsx scripts/variation-coverage.ts",
55
+ "coverage:variations:strict": "node --import tsx scripts/variation-coverage.ts --strict",
56
+ "prepublishOnly": "npm test && npm run build"
57
+ },
58
+ "devDependencies": {
59
+ "@js-temporal/polyfill": "^0.4.4",
60
+ "@tailwindcss/vite": "^4.0.0",
61
+ "@types/node": "^22.10.1",
62
+ "@types/react": "^19.2.14",
63
+ "@types/react-dom": "^19.2.3",
64
+ "@vitejs/plugin-react": "^6.0.0",
65
+ "jsdom": "^25.0.1",
66
+ "react": "^19.2.6",
67
+ "react-dom": "^19.2.6",
68
+ "react-hook-form": "^7.76.0",
69
+ "tailwindcss": "^4.0.0",
70
+ "tinybench": "^2.9.0",
71
+ "tsx": "^4.19.2",
72
+ "typescript": "^5.6.3",
73
+ "vite": "^8.0.13",
74
+ "vitest": "^4.1.6"
75
+ }
76
+ }