@spacesync/client 0.1.0 → 0.1.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.
- package/README.md +9 -14
- package/dist/analog-clock-picker.d.ts +2 -2
- package/dist/analog-clock-picker.js +12 -406
- package/dist/analog-clock-picker.js.map +1 -1
- package/dist/api.js +7 -87
- package/dist/api.js.map +1 -1
- package/dist/app-modal.d.ts +7 -8
- package/dist/app-modal.js +3 -74
- package/dist/app-modal.js.map +1 -1
- package/dist/app-shell-mobile-nav.d.ts +1 -2
- package/dist/app-shell-mobile-nav.js +2 -66
- package/dist/app-shell-mobile-nav.js.map +1 -1
- package/dist/app-web-shell.d.ts +2 -2
- package/dist/app-web-shell.js +1 -4
- package/dist/app-web-shell.js.map +1 -1
- package/dist/booking-schedule-calendars.d.ts +12 -12
- package/dist/booking-schedule-calendars.js +13 -402
- package/dist/booking-schedule-calendars.js.map +1 -1
- package/dist/chat-stick-to-bottom.d.ts +1 -2
- package/dist/chat-stick-to-bottom.js +12 -48
- package/dist/chat-stick-to-bottom.js.map +1 -1
- package/dist/chunk-4A6RCBB5.js +4925 -0
- package/dist/chunk-4A6RCBB5.js.map +1 -0
- package/dist/chunk-4NNK5IXY.js +79 -0
- package/dist/chunk-4NNK5IXY.js.map +1 -0
- package/dist/chunk-4Y5DBM6Z.js +6 -0
- package/dist/chunk-4Y5DBM6Z.js.map +1 -0
- package/dist/chunk-7YCAAP43.js +107 -0
- package/dist/chunk-7YCAAP43.js.map +1 -0
- package/dist/chunk-DMPSQ22Q.js +11 -0
- package/dist/chunk-DMPSQ22Q.js.map +1 -0
- package/dist/chunk-FCY5FYJB.js +104 -0
- package/dist/chunk-FCY5FYJB.js.map +1 -0
- package/dist/chunk-H7EX6B6N.js +580 -0
- package/dist/chunk-H7EX6B6N.js.map +1 -0
- package/dist/chunk-HCHASUB6.js +13 -0
- package/dist/chunk-HCHASUB6.js.map +1 -0
- package/dist/chunk-L65F4EMK.js +34 -0
- package/dist/chunk-L65F4EMK.js.map +1 -0
- package/dist/chunk-LUB7QWGU.js +301 -0
- package/dist/chunk-LUB7QWGU.js.map +1 -0
- package/dist/chunk-OMSJWTSZ.js +120 -0
- package/dist/chunk-OMSJWTSZ.js.map +1 -0
- package/dist/chunk-OWNUMPUC.js +9 -0
- package/dist/chunk-OWNUMPUC.js.map +1 -0
- package/dist/chunk-P65TMY3D.js +87 -0
- package/dist/chunk-P65TMY3D.js.map +1 -0
- package/dist/chunk-PBNBLCC2.js +84 -0
- package/dist/chunk-PBNBLCC2.js.map +1 -0
- package/dist/chunk-RV5PMZYZ.js +63 -0
- package/dist/chunk-RV5PMZYZ.js.map +1 -0
- package/dist/chunk-VHINHHZQ.js +48 -0
- package/dist/chunk-VHINHHZQ.js.map +1 -0
- package/dist/chunk-VVXGQKN7.js +107 -0
- package/dist/chunk-VVXGQKN7.js.map +1 -0
- package/dist/chunk-XU3EFSQX.js +22 -0
- package/dist/chunk-XU3EFSQX.js.map +1 -0
- package/dist/chunk-YAVEMXXV.js +381 -0
- package/dist/chunk-YAVEMXXV.js.map +1 -0
- package/dist/chunk-ZIJQ7BXU.js +27 -0
- package/dist/chunk-ZIJQ7BXU.js.map +1 -0
- package/dist/detail-page-header.d.ts +3 -3
- package/dist/detail-page-header.js +5 -149
- package/dist/detail-page-header.js.map +1 -1
- package/dist/{dialog-CIdvylPK.d.ts → dialog-CPkbi5N3.d.ts} +10 -11
- package/dist/file-picker-field.d.ts +2 -2
- package/dist/file-picker-field.js +3 -163
- package/dist/file-picker-field.js.map +1 -1
- package/dist/file-viewer-dialog.d.ts +2 -2
- package/dist/file-viewer-dialog.js +12 -223
- package/dist/file-viewer-dialog.js.map +1 -1
- package/dist/floor-switcher.d.ts +2 -2
- package/dist/floor-switcher.js +13 -323
- package/dist/floor-switcher.js.map +1 -1
- package/dist/forms.js +1 -23
- package/dist/forms.js.map +1 -1
- package/dist/image-picker-field.d.ts +2 -2
- package/dist/image-picker-field.js +3 -48
- package/dist/image-picker-field.js.map +1 -1
- package/dist/layout-canvas-view.d.ts +2 -2
- package/dist/layout-canvas-view.js +17 -220
- package/dist/layout-canvas-view.js.map +1 -1
- package/dist/lib/dateDisplay.js +1 -82
- package/dist/lib/dateDisplay.js.map +1 -1
- package/dist/live-resource-meta.js +1 -25
- package/dist/live-resource-meta.js.map +1 -1
- package/dist/live-space-pulse-dot.d.ts +2 -2
- package/dist/live-space-pulse-dot.js +2 -16
- package/dist/live-space-pulse-dot.js.map +1 -1
- package/dist/notification-sidebar-preview.d.ts +3 -3
- package/dist/notification-sidebar-preview.js +3 -61
- package/dist/notification-sidebar-preview.js.map +1 -1
- package/dist/page-list-chrome.d.ts +25 -25
- package/dist/page-list-chrome.js +6 -968
- package/dist/page-list-chrome.js.map +1 -1
- package/dist/platform-support-message-composer.d.ts +4 -4
- package/dist/platform-support-message-composer.js +15 -218
- package/dist/platform-support-message-composer.js.map +1 -1
- package/dist/shell-sidebar-nav.js +8 -13
- package/dist/shell-sidebar-nav.js.map +1 -1
- package/dist/shell-theme.js +1 -7
- package/dist/shell-theme.js.map +1 -1
- package/dist/shell-top-bar-chrome.js +3 -103
- package/dist/shell-top-bar-chrome.js.map +1 -1
- package/dist/shell-top-bar.d.ts +3 -3
- package/dist/shell-top-bar.js +1 -69
- package/dist/shell-top-bar.js.map +1 -1
- package/dist/support-presence-status.d.ts +2 -2
- package/dist/support-presence-status.js +3 -41
- package/dist/support-presence-status.js.map +1 -1
- package/dist/theme-appearance-control.d.ts +2 -2
- package/dist/theme-appearance-control.js +4 -63
- package/dist/theme-appearance-control.js.map +1 -1
- package/dist/theme-boot-script.js +1 -2
- package/dist/theme-boot-script.js.map +1 -1
- package/dist/theme-provider.d.ts +2 -2
- package/dist/theme-provider.js +2 -23
- package/dist/theme-provider.js.map +1 -1
- package/dist/ui.d.ts +261 -262
- package/dist/ui.js +11 -5635
- package/dist/ui.js.map +1 -1
- package/package.json +11 -2
|
@@ -1,11 +1,19 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AnalogClockPicker } from './chunk-YAVEMXXV.js';
|
|
2
|
+
import { formatTimeForDisplay } from './chunk-4A6RCBB5.js';
|
|
3
|
+
import './chunk-RV5PMZYZ.js';
|
|
4
|
+
import './chunk-L65F4EMK.js';
|
|
5
|
+
import './chunk-PBNBLCC2.js';
|
|
6
|
+
import './chunk-VVXGQKN7.js';
|
|
7
|
+
import './chunk-7YCAAP43.js';
|
|
8
|
+
import './chunk-LUB7QWGU.js';
|
|
9
|
+
import './chunk-VHINHHZQ.js';
|
|
10
|
+
import './chunk-FCY5FYJB.js';
|
|
11
|
+
import './chunk-OWNUMPUC.js';
|
|
12
|
+
import { cn } from './chunk-DMPSQ22Q.js';
|
|
13
|
+
import { useState, useEffect } from 'react';
|
|
2
14
|
import { Info, ChevronLeft, ChevronRight } from 'lucide-react';
|
|
3
|
-
import { clsx } from 'clsx';
|
|
4
|
-
import { twMerge } from 'tailwind-merge';
|
|
5
15
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
6
16
|
|
|
7
|
-
// src/booking/booking-schedule-calendars.tsx
|
|
8
|
-
|
|
9
17
|
// src/lib/booking-schedule.ts
|
|
10
18
|
var PRICING_TODAY = (/* @__PURE__ */ new Date()).toISOString().split("T")[0];
|
|
11
19
|
function computeMinMonth() {
|
|
@@ -65,403 +73,6 @@ function addDays(date, days) {
|
|
|
65
73
|
d.setDate(d.getDate() + days);
|
|
66
74
|
return formatDateOnly(d);
|
|
67
75
|
}
|
|
68
|
-
function cn(...inputs) {
|
|
69
|
-
return twMerge(clsx(inputs));
|
|
70
|
-
}
|
|
71
|
-
function parseHm(value) {
|
|
72
|
-
const m = /^([01]\d|2[0-3]):([0-5]\d)$/.exec(value.trim());
|
|
73
|
-
if (!m) return void 0;
|
|
74
|
-
const h = Number(m[1]);
|
|
75
|
-
const min = Number(m[2]);
|
|
76
|
-
if (h > 23 || min > 59) return void 0;
|
|
77
|
-
return { h, m: min };
|
|
78
|
-
}
|
|
79
|
-
function toTimeStr(h, m) {
|
|
80
|
-
return `${String(h).padStart(2, "0")}:${String(m).padStart(2, "0")}`;
|
|
81
|
-
}
|
|
82
|
-
function formatTimeForDisplay(value, timeFormat) {
|
|
83
|
-
const p = parseHm(value);
|
|
84
|
-
if (!p) return value.trim() || "\u2014";
|
|
85
|
-
if (timeFormat === "24h") return toTimeStr(p.h, p.m);
|
|
86
|
-
const ap = p.h >= 12 ? "pm" : "am";
|
|
87
|
-
const h12 = p.h % 12 || 12;
|
|
88
|
-
return `${String(h12).padStart(2, "0")}:${String(p.m).padStart(2, "0")} ${ap}`;
|
|
89
|
-
}
|
|
90
|
-
Array.from({ length: 24 }, (_, i) => String(i).padStart(2, "0"));
|
|
91
|
-
Array.from({ length: 60 }, (_, i) => String(i).padStart(2, "0"));
|
|
92
|
-
Array.from({ length: 12 }, (_, i) => String(i + 1));
|
|
93
|
-
var SIZE = 248;
|
|
94
|
-
var CX = SIZE / 2;
|
|
95
|
-
var CY = SIZE / 2;
|
|
96
|
-
var FACE_R = 98;
|
|
97
|
-
var HOUR_LABEL_R = 72;
|
|
98
|
-
var MINUTE_TICK_R = 84;
|
|
99
|
-
function pointToAngleDeg(x, y) {
|
|
100
|
-
const dx = x - CX;
|
|
101
|
-
const dy = y - CY;
|
|
102
|
-
let deg = Math.atan2(dy, dx) * 180 / Math.PI + 90;
|
|
103
|
-
if (deg < 0) deg += 360;
|
|
104
|
-
return deg;
|
|
105
|
-
}
|
|
106
|
-
function angleToHour12(deg) {
|
|
107
|
-
const h = Math.round(deg / 30) % 12;
|
|
108
|
-
return h === 0 ? 12 : h;
|
|
109
|
-
}
|
|
110
|
-
function angleToHour24(deg) {
|
|
111
|
-
return Math.round(deg / 15) % 24;
|
|
112
|
-
}
|
|
113
|
-
function angleToMinute(deg) {
|
|
114
|
-
return Math.round(deg / 6) % 60;
|
|
115
|
-
}
|
|
116
|
-
function hour12To24(h12, ap) {
|
|
117
|
-
if (ap === "am") return h12 === 12 ? 0 : h12;
|
|
118
|
-
return h12 === 12 ? 12 : h12 + 12;
|
|
119
|
-
}
|
|
120
|
-
function hour24To12(h24) {
|
|
121
|
-
return { h12: h24 % 12 || 12, ap: h24 >= 12 ? "pm" : "am" };
|
|
122
|
-
}
|
|
123
|
-
function handEnd(deg, length) {
|
|
124
|
-
const rad = (deg - 90) * Math.PI / 180;
|
|
125
|
-
return { x: CX + Math.cos(rad) * length, y: CY + Math.sin(rad) * length };
|
|
126
|
-
}
|
|
127
|
-
function hourCenterDeg(h, timeFormat) {
|
|
128
|
-
if (timeFormat === "24h") return h * 15;
|
|
129
|
-
return h % 12 * 30;
|
|
130
|
-
}
|
|
131
|
-
function sectorPath(centerDeg, spread, radius) {
|
|
132
|
-
const start = handEnd(centerDeg - spread, radius);
|
|
133
|
-
const end = handEnd(centerDeg + spread, radius);
|
|
134
|
-
return `M ${CX} ${CY} L ${start.x} ${start.y} A ${radius} ${radius} 0 0 1 ${end.x} ${end.y} Z`;
|
|
135
|
-
}
|
|
136
|
-
function pointerTarget(clientX, clientY, svg, phase, timeFormat) {
|
|
137
|
-
const rect = svg.getBoundingClientRect();
|
|
138
|
-
const scale = SIZE / rect.width;
|
|
139
|
-
const x = (clientX - rect.left) * scale;
|
|
140
|
-
const y = (clientY - rect.top) * scale;
|
|
141
|
-
const dist = Math.hypot(x - CX, y - CY);
|
|
142
|
-
if (dist < 24 || dist > FACE_R + 8) return null;
|
|
143
|
-
const deg = pointToAngleDeg(x, y);
|
|
144
|
-
if (phase === "hour") {
|
|
145
|
-
return timeFormat === "24h" ? angleToHour24(deg) : angleToHour12(deg);
|
|
146
|
-
}
|
|
147
|
-
return angleToMinute(deg);
|
|
148
|
-
}
|
|
149
|
-
function AnalogClockPicker({
|
|
150
|
-
value,
|
|
151
|
-
onChange,
|
|
152
|
-
timeFormat = "24h",
|
|
153
|
-
className
|
|
154
|
-
}) {
|
|
155
|
-
const svgRef = useRef(null);
|
|
156
|
-
const parsed = parseHm(value);
|
|
157
|
-
const editor = parsed ?? { h: 9, m: 0 };
|
|
158
|
-
const { h12, ap } = hour24To12(editor.h);
|
|
159
|
-
const [phase, setPhase] = useState("hour");
|
|
160
|
-
const [hoverTarget, setHoverTarget] = useState(null);
|
|
161
|
-
const setTime = useCallback(
|
|
162
|
-
(h, m) => {
|
|
163
|
-
onChange(toTimeStr(h, m));
|
|
164
|
-
},
|
|
165
|
-
[onChange]
|
|
166
|
-
);
|
|
167
|
-
const handlePointer = useCallback(
|
|
168
|
-
(clientX, clientY) => {
|
|
169
|
-
const svg = svgRef.current;
|
|
170
|
-
if (!svg) return;
|
|
171
|
-
const rect = svg.getBoundingClientRect();
|
|
172
|
-
const scale = SIZE / rect.width;
|
|
173
|
-
const x = (clientX - rect.left) * scale;
|
|
174
|
-
const y = (clientY - rect.top) * scale;
|
|
175
|
-
const deg = pointToAngleDeg(x, y);
|
|
176
|
-
if (phase === "hour") {
|
|
177
|
-
if (timeFormat === "24h") {
|
|
178
|
-
const h24 = angleToHour24(deg);
|
|
179
|
-
setTime(h24, editor.m);
|
|
180
|
-
} else {
|
|
181
|
-
const h = angleToHour12(deg);
|
|
182
|
-
setTime(hour12To24(h, ap), editor.m);
|
|
183
|
-
}
|
|
184
|
-
setPhase("minute");
|
|
185
|
-
} else {
|
|
186
|
-
const m = angleToMinute(deg);
|
|
187
|
-
setTime(editor.h, m);
|
|
188
|
-
}
|
|
189
|
-
},
|
|
190
|
-
[phase, timeFormat, ap, editor.h, editor.m, setTime]
|
|
191
|
-
);
|
|
192
|
-
const updateHover = useCallback(
|
|
193
|
-
(clientX, clientY) => {
|
|
194
|
-
const svg = svgRef.current;
|
|
195
|
-
if (!svg) return;
|
|
196
|
-
setHoverTarget(pointerTarget(clientX, clientY, svg, phase, timeFormat));
|
|
197
|
-
},
|
|
198
|
-
[phase, timeFormat]
|
|
199
|
-
);
|
|
200
|
-
const previewHour = phase === "hour" && hoverTarget != null ? timeFormat === "24h" ? hoverTarget : hour12To24(hoverTarget, ap) : editor.h;
|
|
201
|
-
const previewMinute = phase === "minute" && hoverTarget != null ? hoverTarget : editor.m;
|
|
202
|
-
const hourHandDeg = previewHour % 12 * 30 + previewMinute * 0.5;
|
|
203
|
-
const minuteHandDeg = previewMinute * 6;
|
|
204
|
-
const hourEnd = handEnd(hourHandDeg, 46);
|
|
205
|
-
const minuteEnd = handEnd(minuteHandDeg, 64);
|
|
206
|
-
const selectedHourKey = timeFormat === "24h" ? editor.h : h12;
|
|
207
|
-
const hoveredHourKey = phase === "hour" ? hoverTarget : null;
|
|
208
|
-
const hourMarkers = useMemo(() => {
|
|
209
|
-
if (timeFormat === "24h") {
|
|
210
|
-
return Array.from({ length: 24 }, (_, h) => {
|
|
211
|
-
const deg = h * 15;
|
|
212
|
-
const rad = (deg - 90) * Math.PI / 180;
|
|
213
|
-
const showLabel = h % 3 === 0;
|
|
214
|
-
const r = showLabel ? HOUR_LABEL_R - 6 : HOUR_LABEL_R + 4;
|
|
215
|
-
return {
|
|
216
|
-
key: h,
|
|
217
|
-
label: showLabel ? String(h).padStart(2, "0") : null,
|
|
218
|
-
x: CX + Math.cos(rad) * r,
|
|
219
|
-
y: CY + Math.sin(rad) * r,
|
|
220
|
-
deg,
|
|
221
|
-
h
|
|
222
|
-
};
|
|
223
|
-
});
|
|
224
|
-
}
|
|
225
|
-
return Array.from({ length: 12 }, (_, i) => {
|
|
226
|
-
const h = i === 0 ? 12 : i;
|
|
227
|
-
const deg = h * 30;
|
|
228
|
-
const rad = (deg - 90) * Math.PI / 180;
|
|
229
|
-
return {
|
|
230
|
-
key: h,
|
|
231
|
-
label: String(h),
|
|
232
|
-
x: CX + Math.cos(rad) * HOUR_LABEL_R,
|
|
233
|
-
y: CY + Math.sin(rad) * HOUR_LABEL_R,
|
|
234
|
-
deg,
|
|
235
|
-
h
|
|
236
|
-
};
|
|
237
|
-
});
|
|
238
|
-
}, [timeFormat]);
|
|
239
|
-
const minuteMarkers = useMemo(
|
|
240
|
-
() => Array.from({ length: 12 }, (_, i) => {
|
|
241
|
-
const m = i * 5;
|
|
242
|
-
const deg = m * 6;
|
|
243
|
-
const rad = (deg - 90) * Math.PI / 180;
|
|
244
|
-
const selected = editor.m === m;
|
|
245
|
-
const hovered = hoverTarget != null && Math.round(hoverTarget / 5) * 5 === m;
|
|
246
|
-
return {
|
|
247
|
-
m,
|
|
248
|
-
x: CX + Math.cos(rad) * MINUTE_TICK_R,
|
|
249
|
-
y: CY + Math.sin(rad) * MINUTE_TICK_R,
|
|
250
|
-
selected,
|
|
251
|
-
hovered
|
|
252
|
-
};
|
|
253
|
-
}),
|
|
254
|
-
[editor.m, hoverTarget]
|
|
255
|
-
);
|
|
256
|
-
const displayTime = formatTimeForDisplay(value || toTimeStr(editor.h, editor.m), timeFormat);
|
|
257
|
-
return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col items-center gap-4", className), children: [
|
|
258
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 rounded-2xl border border-border bg-muted/60 px-4 py-2.5", children: [
|
|
259
|
-
/* @__PURE__ */ jsx(
|
|
260
|
-
"button",
|
|
261
|
-
{
|
|
262
|
-
type: "button",
|
|
263
|
-
onClick: () => setPhase("hour"),
|
|
264
|
-
className: cn(
|
|
265
|
-
"rounded-lg px-3 py-1 text-2xl font-semibold tabular-nums transition-colors",
|
|
266
|
-
phase === "hour" ? "bg-blue-500 text-white shadow-sm" : "text-foreground hover:bg-accent"
|
|
267
|
-
),
|
|
268
|
-
children: timeFormat === "24h" ? String(editor.h).padStart(2, "0") : String(h12).padStart(2, "0")
|
|
269
|
-
}
|
|
270
|
-
),
|
|
271
|
-
/* @__PURE__ */ jsx("span", { className: "text-2xl font-semibold text-muted-foreground", children: ":" }),
|
|
272
|
-
/* @__PURE__ */ jsx(
|
|
273
|
-
"button",
|
|
274
|
-
{
|
|
275
|
-
type: "button",
|
|
276
|
-
onClick: () => setPhase("minute"),
|
|
277
|
-
className: cn(
|
|
278
|
-
"rounded-lg px-3 py-1 text-2xl font-semibold tabular-nums transition-colors",
|
|
279
|
-
phase === "minute" ? "bg-blue-500 text-white shadow-sm" : "text-foreground hover:bg-accent"
|
|
280
|
-
),
|
|
281
|
-
children: String(editor.m).padStart(2, "0")
|
|
282
|
-
}
|
|
283
|
-
),
|
|
284
|
-
timeFormat === "12h" ? /* @__PURE__ */ jsx("div", { className: "ml-2 flex flex-col gap-0.5", children: ["am", "pm"].map((p) => /* @__PURE__ */ jsx(
|
|
285
|
-
"button",
|
|
286
|
-
{
|
|
287
|
-
type: "button",
|
|
288
|
-
onClick: () => setTime(hour12To24(h12, p), editor.m),
|
|
289
|
-
className: cn(
|
|
290
|
-
"rounded-md px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wide transition-colors",
|
|
291
|
-
ap === p ? "bg-blue-100 text-blue-700 dark:bg-blue-950/50 dark:text-blue-300" : "text-muted-foreground hover:bg-accent"
|
|
292
|
-
),
|
|
293
|
-
children: p
|
|
294
|
-
},
|
|
295
|
-
p
|
|
296
|
-
)) }) : null
|
|
297
|
-
] }),
|
|
298
|
-
/* @__PURE__ */ jsx("div", { className: "relative", children: /* @__PURE__ */ jsxs(
|
|
299
|
-
"svg",
|
|
300
|
-
{
|
|
301
|
-
ref: svgRef,
|
|
302
|
-
width: SIZE,
|
|
303
|
-
height: SIZE,
|
|
304
|
-
viewBox: `0 0 ${SIZE} ${SIZE}`,
|
|
305
|
-
className: "cursor-pointer touch-none select-none",
|
|
306
|
-
onClick: (e) => handlePointer(e.clientX, e.clientY),
|
|
307
|
-
onPointerMove: (e) => updateHover(e.clientX, e.clientY),
|
|
308
|
-
onPointerLeave: () => setHoverTarget(null),
|
|
309
|
-
onPointerDown: (e) => {
|
|
310
|
-
e.preventDefault();
|
|
311
|
-
handlePointer(e.clientX, e.clientY);
|
|
312
|
-
},
|
|
313
|
-
children: [
|
|
314
|
-
/* @__PURE__ */ jsx("circle", { cx: CX, cy: CY, r: FACE_R, className: "fill-blue-50/80 dark:fill-blue-950/30" }),
|
|
315
|
-
/* @__PURE__ */ jsx(
|
|
316
|
-
"circle",
|
|
317
|
-
{
|
|
318
|
-
cx: CX,
|
|
319
|
-
cy: CY,
|
|
320
|
-
r: FACE_R,
|
|
321
|
-
className: "fill-none stroke-border",
|
|
322
|
-
strokeWidth: 1.5
|
|
323
|
-
}
|
|
324
|
-
),
|
|
325
|
-
phase === "hour" && hoverTarget != null ? /* @__PURE__ */ jsx(
|
|
326
|
-
"path",
|
|
327
|
-
{
|
|
328
|
-
d: sectorPath(
|
|
329
|
-
hourCenterDeg(hoverTarget, timeFormat),
|
|
330
|
-
timeFormat === "24h" ? 7.5 : 15,
|
|
331
|
-
FACE_R - 2
|
|
332
|
-
),
|
|
333
|
-
className: "fill-blue-200/70 transition-opacity dark:fill-blue-500/25"
|
|
334
|
-
}
|
|
335
|
-
) : null,
|
|
336
|
-
phase === "minute" && hoverTarget != null ? /* @__PURE__ */ jsx(
|
|
337
|
-
"path",
|
|
338
|
-
{
|
|
339
|
-
d: sectorPath(hoverTarget * 6, 3, FACE_R - 2),
|
|
340
|
-
className: "fill-blue-200/70 transition-opacity dark:fill-blue-500/25"
|
|
341
|
-
}
|
|
342
|
-
) : null,
|
|
343
|
-
phase === "hour" ? hourMarkers.map((m) => {
|
|
344
|
-
const isSelected = m.h === selectedHourKey || timeFormat === "12h" && m.h === h12;
|
|
345
|
-
const isHovered = m.h === hoveredHourKey;
|
|
346
|
-
const active = isHovered || isSelected && hoveredHourKey == null;
|
|
347
|
-
return /* @__PURE__ */ jsxs("g", { children: [
|
|
348
|
-
active ? /* @__PURE__ */ jsx(
|
|
349
|
-
"circle",
|
|
350
|
-
{
|
|
351
|
-
cx: m.x,
|
|
352
|
-
cy: m.y,
|
|
353
|
-
r: isHovered ? 18 : 16,
|
|
354
|
-
className: cn(
|
|
355
|
-
"transition-all duration-100",
|
|
356
|
-
isHovered ? "fill-blue-500 shadow-sm" : "fill-blue-400/90"
|
|
357
|
-
)
|
|
358
|
-
}
|
|
359
|
-
) : null,
|
|
360
|
-
m.label ? /* @__PURE__ */ jsx(
|
|
361
|
-
"text",
|
|
362
|
-
{
|
|
363
|
-
x: m.x,
|
|
364
|
-
y: m.y,
|
|
365
|
-
textAnchor: "middle",
|
|
366
|
-
dominantBaseline: "central",
|
|
367
|
-
className: cn(
|
|
368
|
-
"pointer-events-none text-[11px] font-semibold transition-colors duration-100",
|
|
369
|
-
active ? "fill-white" : "fill-muted-foreground",
|
|
370
|
-
isHovered && "text-[12px] font-bold"
|
|
371
|
-
),
|
|
372
|
-
children: m.label
|
|
373
|
-
}
|
|
374
|
-
) : /* @__PURE__ */ jsx(
|
|
375
|
-
"circle",
|
|
376
|
-
{
|
|
377
|
-
cx: m.x,
|
|
378
|
-
cy: m.y,
|
|
379
|
-
r: isHovered ? 5 : 2,
|
|
380
|
-
className: cn(
|
|
381
|
-
"pointer-events-none transition-all duration-100",
|
|
382
|
-
isHovered ? "fill-white" : "fill-muted-foreground/40"
|
|
383
|
-
)
|
|
384
|
-
}
|
|
385
|
-
)
|
|
386
|
-
] }, m.key);
|
|
387
|
-
}) : minuteMarkers.map((m) => {
|
|
388
|
-
const active = m.selected || m.hovered;
|
|
389
|
-
return /* @__PURE__ */ jsxs("g", { children: [
|
|
390
|
-
/* @__PURE__ */ jsx(
|
|
391
|
-
"circle",
|
|
392
|
-
{
|
|
393
|
-
cx: m.x,
|
|
394
|
-
cy: m.y,
|
|
395
|
-
r: m.hovered ? 16 : m.selected ? 14 : 4,
|
|
396
|
-
className: cn(
|
|
397
|
-
"transition-all duration-100",
|
|
398
|
-
m.hovered ? "fill-blue-400" : m.selected ? "fill-blue-500" : "fill-blue-200/80 dark:fill-blue-800/60"
|
|
399
|
-
)
|
|
400
|
-
}
|
|
401
|
-
),
|
|
402
|
-
active || m.m % 15 === 0 ? /* @__PURE__ */ jsx(
|
|
403
|
-
"text",
|
|
404
|
-
{
|
|
405
|
-
x: m.x,
|
|
406
|
-
y: m.y,
|
|
407
|
-
textAnchor: "middle",
|
|
408
|
-
dominantBaseline: "central",
|
|
409
|
-
className: cn(
|
|
410
|
-
"pointer-events-none text-[10px] font-semibold transition-colors duration-100",
|
|
411
|
-
active ? "fill-white" : "fill-blue-700 dark:fill-blue-300"
|
|
412
|
-
),
|
|
413
|
-
children: String(m.m).padStart(2, "0")
|
|
414
|
-
}
|
|
415
|
-
) : null
|
|
416
|
-
] }, m.m);
|
|
417
|
-
}),
|
|
418
|
-
/* @__PURE__ */ jsx(
|
|
419
|
-
"line",
|
|
420
|
-
{
|
|
421
|
-
x1: CX,
|
|
422
|
-
y1: CY,
|
|
423
|
-
x2: hourEnd.x,
|
|
424
|
-
y2: hourEnd.y,
|
|
425
|
-
className: cn(
|
|
426
|
-
"stroke-blue-600 transition-all duration-100 dark:stroke-blue-400",
|
|
427
|
-
phase === "hour" && hoverTarget != null && "stroke-blue-500 opacity-90"
|
|
428
|
-
),
|
|
429
|
-
strokeWidth: 3.5,
|
|
430
|
-
strokeLinecap: "round"
|
|
431
|
-
}
|
|
432
|
-
),
|
|
433
|
-
/* @__PURE__ */ jsx(
|
|
434
|
-
"line",
|
|
435
|
-
{
|
|
436
|
-
x1: CX,
|
|
437
|
-
y1: CY,
|
|
438
|
-
x2: minuteEnd.x,
|
|
439
|
-
y2: minuteEnd.y,
|
|
440
|
-
className: cn(
|
|
441
|
-
"stroke-blue-500 transition-all duration-100 dark:stroke-blue-300",
|
|
442
|
-
phase === "minute" && hoverTarget != null && "stroke-blue-400 opacity-90"
|
|
443
|
-
),
|
|
444
|
-
strokeWidth: 2.5,
|
|
445
|
-
strokeLinecap: "round"
|
|
446
|
-
}
|
|
447
|
-
),
|
|
448
|
-
/* @__PURE__ */ jsx("circle", { cx: CX, cy: CY, r: 5, className: "fill-blue-600 dark:fill-blue-400" }),
|
|
449
|
-
/* @__PURE__ */ jsx("circle", { cx: CX, cy: CY, r: 2.5, className: "fill-white" })
|
|
450
|
-
]
|
|
451
|
-
}
|
|
452
|
-
) }),
|
|
453
|
-
/* @__PURE__ */ jsxs("p", { className: "text-center text-[11px] text-muted-foreground", children: [
|
|
454
|
-
phase === "hour" ? "Hover or tap an hour" : "Hover or tap minutes \xB7 ",
|
|
455
|
-
/* @__PURE__ */ jsx("span", { className: "font-medium text-foreground", children: hoverTarget != null && phase === "hour" ? formatTimeForDisplay(
|
|
456
|
-
toTimeStr(
|
|
457
|
-
timeFormat === "24h" ? hoverTarget : hour12To24(hoverTarget, ap),
|
|
458
|
-
editor.m
|
|
459
|
-
),
|
|
460
|
-
timeFormat
|
|
461
|
-
) : hoverTarget != null && phase === "minute" ? formatTimeForDisplay(toTimeStr(editor.h, hoverTarget), timeFormat) : displayTime })
|
|
462
|
-
] })
|
|
463
|
-
] });
|
|
464
|
-
}
|
|
465
76
|
var MONTH_NAMES = [
|
|
466
77
|
"January",
|
|
467
78
|
"February",
|