@datum-cloud/datum-ui 0.7.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.
- package/dist/app-navigation/index.mjs +1 -1
- package/dist/{app-navigation-D0EBWUwJ.mjs → app-navigation-rSOfo1KV.mjs} +133 -115
- package/dist/form/adapters/conform/index.mjs +1 -1
- package/dist/form/adapters/rhf/index.mjs +1 -1
- package/dist/index.mjs +4 -4
- package/dist/map/index.mjs +1 -1
- package/dist/{map-DRzZDNtB.mjs → map-qo7bY_g_.mjs} +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.mjs +2 -1
- package/dist/utils/timezone.d.ts +19 -0
- package/dist/utils/timezone.d.ts.map +1 -0
- package/dist/utils-BwB1mIdZ.mjs +35 -0
- package/package.json +1 -1
- /package/dist/{map-leaflet-imports-BkUrNU37.mjs → map-leaflet-imports-yWwH4CHB.mjs} +0 -0
- /package/dist/{use-display-touched-8VGszCqj.mjs → use-display-touched-C-afz17j.mjs} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { C as SidebarTrigger, S as SidebarSeparator, _ as SidebarMenuSub, a as SidebarGroupAction, b as SidebarProvider, c as SidebarHeader, d as SidebarMenu, f as SidebarMenuAction, g as SidebarMenuSkeleton, h as SidebarMenuItem, i as SidebarGroup, l as SidebarInput, m as SidebarMenuButton, n as SidebarContent, o as SidebarGroupContent, p as SidebarMenuBadge, r as SidebarFooter, s as SidebarGroupLabel, t as Sidebar, u as SidebarInset, v as SidebarMenuSubButton, w as useSidebar, x as SidebarRail, y as SidebarMenuSubItem } from "../sidebar-B8LQJiNI.mjs";
|
|
2
2
|
import "../sidebar/index.mjs";
|
|
3
|
-
import { n as NavMenu, t as AppNavigation } from "../app-navigation-
|
|
3
|
+
import { n as NavMenu, t as AppNavigation } from "../app-navigation-rSOfo1KV.mjs";
|
|
4
4
|
export { AppNavigation, NavMenu, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar };
|
|
@@ -223,58 +223,61 @@ function NavMenu({ ref, className, items, currentPath, linkComponent: LinkComp =
|
|
|
223
223
|
}));
|
|
224
224
|
},
|
|
225
225
|
className: "group/collapsible",
|
|
226
|
-
children: /* @__PURE__ */ jsxs(SidebarMenuItem, {
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
variants: {
|
|
248
|
-
hidden: { opacity: 0 },
|
|
249
|
-
visible: {
|
|
250
|
-
opacity: 1,
|
|
251
|
-
transition: {
|
|
252
|
-
staggerChildren: .05,
|
|
253
|
-
delayChildren: .1
|
|
254
|
-
}
|
|
255
|
-
}
|
|
226
|
+
children: /* @__PURE__ */ jsxs(SidebarMenuItem, {
|
|
227
|
+
className: "[&>*:first-child]:w-full",
|
|
228
|
+
children: [/* @__PURE__ */ jsx(CollapsibleTrigger, {
|
|
229
|
+
asChild: true,
|
|
230
|
+
className: "w-full",
|
|
231
|
+
children: /* @__PURE__ */ jsxs(NavSidebarMenuButton, {
|
|
232
|
+
item,
|
|
233
|
+
isActive,
|
|
234
|
+
disableTooltip,
|
|
235
|
+
className: itemClassName,
|
|
236
|
+
children: [/* @__PURE__ */ jsx("span", { children: item.title }), /* @__PURE__ */ jsx(Icon, {
|
|
237
|
+
icon: ChevronRight,
|
|
238
|
+
className: "ml-auto transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90"
|
|
239
|
+
})]
|
|
240
|
+
})
|
|
241
|
+
}), /* @__PURE__ */ jsx(CollapsibleContent, {
|
|
242
|
+
className: "data-[state=open]:animate-collapsible-down data-[state=closed]:animate-collapsible-up overflow-hidden",
|
|
243
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
244
|
+
style: {
|
|
245
|
+
minHeight: 0,
|
|
246
|
+
overflow: "hidden"
|
|
256
247
|
},
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
opacity: 1,
|
|
266
|
-
transition: {
|
|
267
|
-
duration: .2,
|
|
268
|
-
ease: "easeOut"
|
|
269
|
-
}
|
|
248
|
+
children: /* @__PURE__ */ jsx(motion.div, {
|
|
249
|
+
variants: {
|
|
250
|
+
hidden: { opacity: 0 },
|
|
251
|
+
visible: {
|
|
252
|
+
opacity: 1,
|
|
253
|
+
transition: {
|
|
254
|
+
staggerChildren: .05,
|
|
255
|
+
delayChildren: .1
|
|
270
256
|
}
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
257
|
+
}
|
|
258
|
+
},
|
|
259
|
+
initial: isInitialMount.current || previousOpenItems.current[item.href] === openItems[item.href] && previousState.current === state && previousPathname.current === pathname && !hasActiveChild ? "visible" : "hidden",
|
|
260
|
+
animate: isOpen ? "visible" : "hidden",
|
|
261
|
+
children: /* @__PURE__ */ jsx(SidebarMenuSub, {
|
|
262
|
+
className: cn(level >= 1 ? "mr-0 pr-[.1rem]" : "", level === 2 ? "pl-4" : "", level === 3 ? "pl-6" : "", "mr-0 gap-0.5 pr-0"),
|
|
263
|
+
children: item.children?.map((subItem, index) => /* @__PURE__ */ jsx(motion.div, {
|
|
264
|
+
variants: {
|
|
265
|
+
hidden: { opacity: 0 },
|
|
266
|
+
visible: {
|
|
267
|
+
opacity: 1,
|
|
268
|
+
transition: {
|
|
269
|
+
duration: .2,
|
|
270
|
+
ease: "easeOut"
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
children: renderNavItem(subItem, level + 1)
|
|
275
|
+
}, `${subItem.href}-${level}-${index}`))
|
|
276
|
+
})
|
|
277
|
+
}, `collapsible-${item.href}-${isOpen}`)
|
|
278
|
+
})
|
|
279
|
+
})]
|
|
280
|
+
})
|
|
278
281
|
}, `collapsed-item-drop-down-item-${item.title}-${level}`)
|
|
279
282
|
}),
|
|
280
283
|
item.showSeparatorBelow && /* @__PURE__ */ jsx(SidebarSeparator, { className: "my-2" })
|
|
@@ -292,32 +295,35 @@ function NavMenu({ ref, className, items, currentPath, linkComponent: LinkComp =
|
|
|
292
295
|
}));
|
|
293
296
|
},
|
|
294
297
|
className: "group/collapsible",
|
|
295
|
-
children: /* @__PURE__ */ jsxs(SidebarMenuItem, {
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
className: "data-[state=open]:animate-collapsible-down data-[state=closed]:animate-collapsible-up overflow-hidden",
|
|
310
|
-
children: /* @__PURE__ */ jsx("div", {
|
|
311
|
-
style: {
|
|
312
|
-
minHeight: 0,
|
|
313
|
-
overflow: "hidden"
|
|
314
|
-
},
|
|
315
|
-
children: /* @__PURE__ */ jsx(SidebarMenuSub, {
|
|
316
|
-
className: cn(currentLevel >= 1 ? "mr-0 pr-[.1rem]" : "", "gap-0.5"),
|
|
317
|
-
children: currentItem.children?.map((subItem) => renderNavItem(subItem, currentLevel + 1))
|
|
298
|
+
children: /* @__PURE__ */ jsxs(SidebarMenuItem, {
|
|
299
|
+
className: "[&>*:first-child]:w-full",
|
|
300
|
+
children: [/* @__PURE__ */ jsx(CollapsibleTrigger, {
|
|
301
|
+
asChild: true,
|
|
302
|
+
className: "w-full",
|
|
303
|
+
children: /* @__PURE__ */ jsxs(NavSidebarMenuButton, {
|
|
304
|
+
item: currentItem,
|
|
305
|
+
isActive: currentItemIsActive,
|
|
306
|
+
disableTooltip,
|
|
307
|
+
className: itemClassName,
|
|
308
|
+
children: [/* @__PURE__ */ jsx("span", { children: currentItem.title }), /* @__PURE__ */ jsx(Icon, {
|
|
309
|
+
icon: ChevronRight,
|
|
310
|
+
className: "ml-auto transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90"
|
|
311
|
+
})]
|
|
318
312
|
})
|
|
319
|
-
})
|
|
320
|
-
|
|
313
|
+
}), /* @__PURE__ */ jsx(CollapsibleContent, {
|
|
314
|
+
className: "data-[state=open]:animate-collapsible-down data-[state=closed]:animate-collapsible-up overflow-hidden",
|
|
315
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
316
|
+
style: {
|
|
317
|
+
minHeight: 0,
|
|
318
|
+
overflow: "hidden"
|
|
319
|
+
},
|
|
320
|
+
children: /* @__PURE__ */ jsx(SidebarMenuSub, {
|
|
321
|
+
className: cn(currentLevel >= 1 ? "mr-0 pr-[.1rem]" : "", "gap-0.5"),
|
|
322
|
+
children: currentItem.children?.map((subItem) => renderNavItem(subItem, currentLevel + 1))
|
|
323
|
+
})
|
|
324
|
+
})
|
|
325
|
+
})]
|
|
326
|
+
}, `collapsible-sidebar-${currentItem.title}-${currentLevel}`)
|
|
321
327
|
}, `collapsed-item-drop-down-item-${currentItem.title}-${currentLevel}`);
|
|
322
328
|
};
|
|
323
329
|
if (level <= 2 && hasChildren) return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
@@ -332,38 +338,41 @@ function NavMenu({ ref, className, items, currentPath, linkComponent: LinkComp =
|
|
|
332
338
|
item.showSeparatorAbove && /* @__PURE__ */ jsx(SidebarSeparator, { className: "my-2" }),
|
|
333
339
|
/* @__PURE__ */ jsx(SidebarMenu, {
|
|
334
340
|
className: cn(`level_${level} px-2`),
|
|
335
|
-
children: /* @__PURE__ */ jsx(SidebarMenuItem, {
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
className: "flex items-center
|
|
341
|
+
children: /* @__PURE__ */ jsx(SidebarMenuItem, {
|
|
342
|
+
className: "[&>*:first-child]:w-full",
|
|
343
|
+
children: /* @__PURE__ */ jsx(NavSidebarMenuButton, {
|
|
344
|
+
asChild: true,
|
|
345
|
+
item,
|
|
346
|
+
isActive: isActive && !hasActiveChild,
|
|
347
|
+
disableTooltip,
|
|
348
|
+
onClick: () => hasChildren && toggleItem(item.href),
|
|
349
|
+
className: cn(level >= 1 && "h-6", itemClassName),
|
|
350
|
+
children: item.type === "externalLink" ? /* @__PURE__ */ jsxs("a", {
|
|
351
|
+
href: item.href || "",
|
|
352
|
+
target: "_blank",
|
|
353
|
+
rel: "noopener noreferrer",
|
|
354
|
+
className: "flex items-center justify-between",
|
|
355
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
356
|
+
className: "flex items-center gap-2",
|
|
357
|
+
children: [item?.icon && /* @__PURE__ */ jsx(Icon, {
|
|
358
|
+
icon: item.icon,
|
|
359
|
+
className: "size-4 transition-all duration-300"
|
|
360
|
+
}), /* @__PURE__ */ jsx("span", { children: item.title })]
|
|
361
|
+
}), /* @__PURE__ */ jsx(Icon, {
|
|
362
|
+
icon: ExternalLinkIcon,
|
|
363
|
+
className: "ml-auto size-4"
|
|
364
|
+
})]
|
|
365
|
+
}) : /* @__PURE__ */ jsxs(LinkComp, {
|
|
366
|
+
...LinkComp === "a" ? { href: item.href || "" } : { to: item.href || "" },
|
|
367
|
+
onClick: handleNavigation,
|
|
368
|
+
onMouseEnter: () => item.onPrefetch?.(),
|
|
349
369
|
children: [item?.icon && /* @__PURE__ */ jsx(Icon, {
|
|
350
370
|
icon: item.icon,
|
|
351
|
-
className: "
|
|
371
|
+
className: "text-sidebar-primary transition-all duration-300"
|
|
352
372
|
}), /* @__PURE__ */ jsx("span", { children: item.title })]
|
|
353
|
-
})
|
|
354
|
-
icon: ExternalLinkIcon,
|
|
355
|
-
className: "ml-auto size-4"
|
|
356
|
-
})]
|
|
357
|
-
}) : /* @__PURE__ */ jsxs(LinkComp, {
|
|
358
|
-
...LinkComp === "a" ? { href: item.href || "" } : { to: item.href || "" },
|
|
359
|
-
onClick: handleNavigation,
|
|
360
|
-
onMouseEnter: () => item.onPrefetch?.(),
|
|
361
|
-
children: [item?.icon && /* @__PURE__ */ jsx(Icon, {
|
|
362
|
-
icon: item.icon,
|
|
363
|
-
className: "text-sidebar-primary transition-all duration-300"
|
|
364
|
-
}), /* @__PURE__ */ jsx("span", { children: item.title })]
|
|
373
|
+
})
|
|
365
374
|
})
|
|
366
|
-
})
|
|
375
|
+
})
|
|
367
376
|
}),
|
|
368
377
|
item.showSeparatorBelow && /* @__PURE__ */ jsx(SidebarSeparator, { className: "my-2" })
|
|
369
378
|
] }, itemKey);
|
|
@@ -387,10 +396,13 @@ function NavSkeleton() {
|
|
|
387
396
|
children: [
|
|
388
397
|
/* @__PURE__ */ jsx(SidebarMenu, {
|
|
389
398
|
className: "px-2",
|
|
390
|
-
children: /* @__PURE__ */ jsx(SidebarMenuItem, {
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
399
|
+
children: /* @__PURE__ */ jsx(SidebarMenuItem, {
|
|
400
|
+
className: "[&>*:first-child]:w-full",
|
|
401
|
+
children: /* @__PURE__ */ jsx(SidebarMenuSkeleton, {
|
|
402
|
+
showIcon: true,
|
|
403
|
+
className: "bg-sidebar-accent/60 h-8 rounded-xl **:data-[sidebar=menu-skeleton-text]:max-w-12"
|
|
404
|
+
})
|
|
405
|
+
})
|
|
394
406
|
}),
|
|
395
407
|
/* @__PURE__ */ jsx(SidebarSeparator, { className: "my-2" }),
|
|
396
408
|
[
|
|
@@ -402,18 +414,24 @@ function NavSkeleton() {
|
|
|
402
414
|
6
|
|
403
415
|
].map((i) => /* @__PURE__ */ jsx(SidebarMenu, {
|
|
404
416
|
className: "px-2",
|
|
405
|
-
children: /* @__PURE__ */ jsx(SidebarMenuItem, {
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
417
|
+
children: /* @__PURE__ */ jsx(SidebarMenuItem, {
|
|
418
|
+
className: "[&>*:first-child]:w-full",
|
|
419
|
+
children: /* @__PURE__ */ jsx(SidebarMenuSkeleton, {
|
|
420
|
+
showIcon: true,
|
|
421
|
+
className: "h-8 rounded-xl"
|
|
422
|
+
})
|
|
423
|
+
})
|
|
409
424
|
}, i)),
|
|
410
425
|
/* @__PURE__ */ jsx(SidebarSeparator, { className: "my-2" }),
|
|
411
426
|
/* @__PURE__ */ jsx(SidebarMenu, {
|
|
412
427
|
className: "px-2",
|
|
413
|
-
children: /* @__PURE__ */ jsx(SidebarMenuItem, {
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
428
|
+
children: /* @__PURE__ */ jsx(SidebarMenuItem, {
|
|
429
|
+
className: "[&>*:first-child]:w-full",
|
|
430
|
+
children: /* @__PURE__ */ jsx(SidebarMenuSkeleton, {
|
|
431
|
+
showIcon: true,
|
|
432
|
+
className: "h-8 rounded-xl [&_[data-sidebar=menu-skeleton-text]]:max-w-28"
|
|
433
|
+
})
|
|
434
|
+
})
|
|
417
435
|
})
|
|
418
436
|
]
|
|
419
437
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as FormAdapterProvider } from "../../../adapter-context-NyGTDZYq.mjs";
|
|
2
|
-
import { n as getFieldConstraints, t as useDisplayTouched } from "../../../use-display-touched-
|
|
2
|
+
import { n as getFieldConstraints, t as useDisplayTouched } from "../../../use-display-touched-C-afz17j.mjs";
|
|
3
3
|
import * as React$1 from "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
import { FormProvider, getFormProps, getInputProps, useForm, useFormMetadata, useInputControl } from "@conform-to/react";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as FormAdapterProvider } from "../../../adapter-context-NyGTDZYq.mjs";
|
|
2
|
-
import { n as getFieldConstraints, r as getObjectShape, t as useDisplayTouched } from "../../../use-display-touched-
|
|
2
|
+
import { n as getFieldConstraints, r as getObjectShape, t as useDisplayTouched } from "../../../use-display-touched-C-afz17j.mjs";
|
|
3
3
|
import * as React$1 from "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
import { zodResolver } from "@hookform/resolvers/zod";
|
package/dist/index.mjs
CHANGED
|
@@ -21,7 +21,7 @@ import { n as HoverCardContent, r as HoverCardTrigger, t as HoverCard } from "./
|
|
|
21
21
|
import { t as Input } from "./input-FKGqZypx.mjs";
|
|
22
22
|
import { a as InputGroupText, i as InputGroupInput, n as InputGroupAddon, o as InputGroupTextarea, r as InputGroupButton, t as InputGroup } from "./input-group-DDtz-RT7.mjs";
|
|
23
23
|
import { t as Label } from "./label-cnAhY-ej.mjs";
|
|
24
|
-
import { A as useLeaflet, C as MapPolyline, D as MapTileLayer, E as MapSearchControl, O as MapTooltip, S as MapPolygon, T as MapRectangle, _ as MapLayers, a as MapDrawCircle, b as MapMarker, c as MapDrawEdit, d as MapDrawPolyline, f as MapDrawRectangle, g as MapLayerGroup, h as MapFullscreenControl, i as MapControlContainer, j as PlaceAutocomplete, k as MapZoomControl, l as MapDrawMarker, m as MapFeatureGroup, n as MapCircle, o as MapDrawControl, p as MapDrawUndo, r as MapCircleMarker, s as MapDrawDelete, t as Map, u as MapDrawPolygon, v as MapLayersControl, w as MapPopup, x as MapMarkerClusterGroup, y as MapLocateControl } from "./map-
|
|
24
|
+
import { A as useLeaflet, C as MapPolyline, D as MapTileLayer, E as MapSearchControl, O as MapTooltip, S as MapPolygon, T as MapRectangle, _ as MapLayers, a as MapDrawCircle, b as MapMarker, c as MapDrawEdit, d as MapDrawPolyline, f as MapDrawRectangle, g as MapLayerGroup, h as MapFullscreenControl, i as MapControlContainer, j as PlaceAutocomplete, k as MapZoomControl, l as MapDrawMarker, m as MapFeatureGroup, n as MapCircle, o as MapDrawControl, p as MapDrawUndo, r as MapCircleMarker, s as MapDrawDelete, t as Map, u as MapDrawPolygon, v as MapLayersControl, w as MapPopup, x as MapMarkerClusterGroup, y as MapLocateControl } from "./map-qo7bY_g_.mjs";
|
|
25
25
|
import { t as Spinner } from "./spinner-CgPI3DDi.mjs";
|
|
26
26
|
import { n as InSheetContext, r as useInSheet, t as MobileSheet } from "./mobile-sheet-BxMvkzAj.mjs";
|
|
27
27
|
import { a as SheetHeader, i as SheetFooter, o as SheetTitle, r as SheetDescription, s as SheetTrigger } from "./sheet-DVEToCVY.mjs";
|
|
@@ -42,7 +42,7 @@ import { Tabs, TabsContent, TabsLinkTrigger, TabsList, TabsTrigger } from "./tab
|
|
|
42
42
|
import { t as Textarea } from "./textarea-BoChBcFz.mjs";
|
|
43
43
|
import { a as ListItem, c as Title, d as titleVariants, i as List, l as paragraphVariants, n as Code, o as Paragraph, r as Link, s as Text, t as Blockquote, u as textVariants } from "./typography-TRKP_CLT.mjs";
|
|
44
44
|
import { t as VisuallyHidden } from "./visuallyhidden-BHOPczmW.mjs";
|
|
45
|
-
import { n as NavMenu, t as AppNavigation } from "./app-navigation-
|
|
45
|
+
import { n as NavMenu, t as AppNavigation } from "./app-navigation-rSOfo1KV.mjs";
|
|
46
46
|
import { t as LoaderOverlay } from "./loader-overlay-C2WDla6V.mjs";
|
|
47
47
|
import { t as Autocomplete } from "./autocomplete-DdbTQe6u.mjs";
|
|
48
48
|
import { n as avatarStackVariants, t as AvatarStack } from "./avatar-stack-CDhlA1Nm.mjs";
|
|
@@ -70,5 +70,5 @@ import { t as TagsInput } from "./tag-input-Bf4GMptp.mjs";
|
|
|
70
70
|
import { _ as RedisTaskStorage, a as TaskPanelItem, b as createProjectMetadata, c as TaskPanelHeader, d as useCurrentScope, f as useTasksWithLabels, g as detectStorage, h as TaskQueue, i as TaskPanel, l as getContextLabel, m as TaskQueueProvider, n as TaskSummaryDialog, o as TaskPanelCounter, p as useTaskQueue, r as TaskQueueTrigger, s as TaskPanelActions, t as TaskQueueDropdown, u as matchesCurrentScope, v as LocalTaskStorage, x as createUserMetadata, y as createOrgMetadata } from "./task-queue-dropdown-D-LncEWm.mjs";
|
|
71
71
|
import { C as utcToLocalInputString, S as utcStringToZonedDate, _ as getBrowserTimezone, a as formatTimeRangeDisplay, b as getTimezoneOffset, c as getPresetByKey, d as TimezoneSelector, f as QuickRangesPanel, g as formatUtcForDisplay, h as formatTimezoneLabel, i as formatSingleTimeDisplay, l as getPresetByShortcut, m as createTimezoneOption, n as TimeRangePicker, o as DEFAULT_PRESETS, p as CustomRangePanel, r as formatDateForInput, s as getDefaultPreset, t as toApiTimeRange, u as getPresetRange, v as getDefaultTimezoneOptions, w as zonedDateToUtcString, x as localInputStringToUtc, y as getShortTimezoneDisplay } from "./to-api-format-CgKcC9SK.mjs";
|
|
72
72
|
import { t as useDebounce } from "./hooks-DQXVwbrs.mjs";
|
|
73
|
-
import "./utils
|
|
74
|
-
export { CustomRangePanel as AbsoluteRangePanel, CustomRangePanel, ActionRow, Alert, AlertDescription, AlertTitle, AppNavigation, Autocomplete, Avatar, AvatarFallback, AvatarImage, AvatarStack, Badge, Blockquote, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Calendar, CalendarDatePicker, CalendarDayButton, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, ClientOnly, CloseIcon, Code, CodeEditor, CodeEditorTabs, Col, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, DEFAULT_PRESETS, Dialog, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Dropzone, DropzoneContent, DropzoneEmptyState, EmptyContent, FileInputButton, Form, FormAdapterProvider, FormAutocomplete, FormAutosearch, FormButton, FormCheckbox, FormCombobox, FormCopyBox, FormCustom, FormDatePicker, FormDateTimePicker, FormDescription, FormDialog, FormError, FormField, FormFieldArray, FormInput, FormRadioGroup, FormRadioItem, FormRoot, FormSelect, FormSelectItem, FormSubmit, FormSwitch, FormTextarea, FormTimePicker, FormTransfer, FormWhen, GRID_BREAKPOINTS, GRID_COLUMNS, GRID_PREFIX, HoverCard, HoverCardContent, HoverCardTrigger, Icon, InSheetContext, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputNumber, InputWithAddons, Label, Link, LinkButton, List, ListItem, LoaderOverlay, LocalTaskStorage, Map, MapCircle, MapCircleMarker, MapControlContainer, MapDrawCircle, MapDrawControl, MapDrawDelete, MapDrawEdit, MapDrawMarker, MapDrawPolygon, MapDrawPolyline, MapDrawRectangle, MapDrawUndo, MapFeatureGroup, MapFullscreenControl, MapLayerGroup, MapLayers, MapLayersControl, MapLocateControl, MapMarker, MapMarkerClusterGroup, MapPolygon, MapPolyline, MapPopup, MapRectangle, MapSearchControl, MapTileLayer, MapTooltip, MapZoomControl, MobileSheet, MoreActions, MultiSelect, NavMenu, PageTitle, Paragraph, PlaceAutocomplete, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, QuickRangesPanel, RESPONSIVE_ARRAY, RESPONSIVE_MAP, RadioGroup, RadioGroupItem, RedisTaskStorage, ResponsiveDropdown, ResponsivePopover, RichTextContent, RichTextEditor, Row, RowContext, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Spinner, SpinnerIcon, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsLinkTrigger, TabsList, TabsTrigger, TagsInput, TaskPanel, TaskPanelActions, TaskPanelCounter, TaskPanelHeader, TaskPanelItem, TaskQueue, TaskQueueDropdown, TaskQueueProvider, TaskQueueTrigger, TaskSummaryDialog, Text, Textarea, ThemeProvider, ThemeScript, TimeRangePicker, TimezoneSelector, Title, Toaster, Tooltip, VisuallyHidden, avatarStackVariants, badgeVariants, buttonGroupVariants, buttonVariants, cn, configureProgress, createCodeEditorSchema, createOrgMetadata, createProjectMetadata, createTimezoneOption, createUserMetadata, defineStepper, detectStorage, formatDateForInput, formatJson, formatSingleTimeDisplay, formatTimeRangeDisplay, formatTimezoneLabel, formatUtcForDisplay, formatYaml, getBrowserTimezone, getContextLabel, getDefaultPreset, getDefaultTimezoneOptions, getGutter, getPresetByKey, getPresetByShortcut, getPresetRange, getResponsiveValue, getShortTimezoneDisplay, getTimezoneOffset, isValidJson, isValidYaml, jsonSchema, jsonToYaml, localInputStringToUtc, matchesCurrentScope, paragraphVariants, registerMediaQuery, startProgress, stopProgress, textVariants, titleVariants, toApiTimeRange, toast, useAdapter, useBreakpoint, useCopyToClipboard, useCurrentScope, useDebounce, useField, useFieldContext, useFormContext, useFormState, useInSheet, useLeaflet, useRichTextEditor, useSidebar, useTaskQueue, useTasksWithLabels, useTheme, useToast, useWatch, useWatchAll, utcStringToZonedDate, utcToLocalInputString, yamlSchema, yamlToJson, zonedDateToUtcString };
|
|
73
|
+
import { n as toUTCTimestampStartOfDay, t as toUTCTimestampEndOfDay } from "./utils-BwB1mIdZ.mjs";
|
|
74
|
+
export { CustomRangePanel as AbsoluteRangePanel, CustomRangePanel, ActionRow, Alert, AlertDescription, AlertTitle, AppNavigation, Autocomplete, Avatar, AvatarFallback, AvatarImage, AvatarStack, Badge, Blockquote, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Calendar, CalendarDatePicker, CalendarDayButton, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, ClientOnly, CloseIcon, Code, CodeEditor, CodeEditorTabs, Col, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, DEFAULT_PRESETS, Dialog, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Dropzone, DropzoneContent, DropzoneEmptyState, EmptyContent, FileInputButton, Form, FormAdapterProvider, FormAutocomplete, FormAutosearch, FormButton, FormCheckbox, FormCombobox, FormCopyBox, FormCustom, FormDatePicker, FormDateTimePicker, FormDescription, FormDialog, FormError, FormField, FormFieldArray, FormInput, FormRadioGroup, FormRadioItem, FormRoot, FormSelect, FormSelectItem, FormSubmit, FormSwitch, FormTextarea, FormTimePicker, FormTransfer, FormWhen, GRID_BREAKPOINTS, GRID_COLUMNS, GRID_PREFIX, HoverCard, HoverCardContent, HoverCardTrigger, Icon, InSheetContext, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputNumber, InputWithAddons, Label, Link, LinkButton, List, ListItem, LoaderOverlay, LocalTaskStorage, Map, MapCircle, MapCircleMarker, MapControlContainer, MapDrawCircle, MapDrawControl, MapDrawDelete, MapDrawEdit, MapDrawMarker, MapDrawPolygon, MapDrawPolyline, MapDrawRectangle, MapDrawUndo, MapFeatureGroup, MapFullscreenControl, MapLayerGroup, MapLayers, MapLayersControl, MapLocateControl, MapMarker, MapMarkerClusterGroup, MapPolygon, MapPolyline, MapPopup, MapRectangle, MapSearchControl, MapTileLayer, MapTooltip, MapZoomControl, MobileSheet, MoreActions, MultiSelect, NavMenu, PageTitle, Paragraph, PlaceAutocomplete, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, QuickRangesPanel, RESPONSIVE_ARRAY, RESPONSIVE_MAP, RadioGroup, RadioGroupItem, RedisTaskStorage, ResponsiveDropdown, ResponsivePopover, RichTextContent, RichTextEditor, Row, RowContext, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Spinner, SpinnerIcon, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsLinkTrigger, TabsList, TabsTrigger, TagsInput, TaskPanel, TaskPanelActions, TaskPanelCounter, TaskPanelHeader, TaskPanelItem, TaskQueue, TaskQueueDropdown, TaskQueueProvider, TaskQueueTrigger, TaskSummaryDialog, Text, Textarea, ThemeProvider, ThemeScript, TimeRangePicker, TimezoneSelector, Title, Toaster, Tooltip, VisuallyHidden, avatarStackVariants, badgeVariants, buttonGroupVariants, buttonVariants, cn, configureProgress, createCodeEditorSchema, createOrgMetadata, createProjectMetadata, createTimezoneOption, createUserMetadata, defineStepper, detectStorage, formatDateForInput, formatJson, formatSingleTimeDisplay, formatTimeRangeDisplay, formatTimezoneLabel, formatUtcForDisplay, formatYaml, getBrowserTimezone, getContextLabel, getDefaultPreset, getDefaultTimezoneOptions, getGutter, getPresetByKey, getPresetByShortcut, getPresetRange, getResponsiveValue, getShortTimezoneDisplay, getTimezoneOffset, isValidJson, isValidYaml, jsonSchema, jsonToYaml, localInputStringToUtc, matchesCurrentScope, paragraphVariants, registerMediaQuery, startProgress, stopProgress, textVariants, titleVariants, toApiTimeRange, toUTCTimestampEndOfDay, toUTCTimestampStartOfDay, toast, useAdapter, useBreakpoint, useCopyToClipboard, useCurrentScope, useDebounce, useField, useFieldContext, useFormContext, useFormState, useInSheet, useLeaflet, useRichTextEditor, useSidebar, useTaskQueue, useTasksWithLabels, useTheme, useToast, useWatch, useWatchAll, utcStringToZonedDate, utcToLocalInputString, yamlSchema, yamlToJson, zonedDateToUtcString };
|
package/dist/map/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as useLeaflet, C as MapPolyline, D as MapTileLayer, E as MapSearchControl, O as MapTooltip, S as MapPolygon, T as MapRectangle, _ as MapLayers, a as MapDrawCircle, b as MapMarker, c as MapDrawEdit, d as MapDrawPolyline, f as MapDrawRectangle, g as MapLayerGroup, h as MapFullscreenControl, i as MapControlContainer, j as PlaceAutocomplete, k as MapZoomControl, l as MapDrawMarker, m as MapFeatureGroup, n as MapCircle, o as MapDrawControl, p as MapDrawUndo, r as MapCircleMarker, s as MapDrawDelete, t as Map, u as MapDrawPolygon, v as MapLayersControl, w as MapPopup, x as MapMarkerClusterGroup, y as MapLocateControl } from "../map-
|
|
1
|
+
import { A as useLeaflet, C as MapPolyline, D as MapTileLayer, E as MapSearchControl, O as MapTooltip, S as MapPolygon, T as MapRectangle, _ as MapLayers, a as MapDrawCircle, b as MapMarker, c as MapDrawEdit, d as MapDrawPolyline, f as MapDrawRectangle, g as MapLayerGroup, h as MapFullscreenControl, i as MapControlContainer, j as PlaceAutocomplete, k as MapZoomControl, l as MapDrawMarker, m as MapFeatureGroup, n as MapCircle, o as MapDrawControl, p as MapDrawUndo, r as MapCircleMarker, s as MapDrawDelete, t as Map, u as MapDrawPolygon, v as MapLayersControl, w as MapPopup, x as MapMarkerClusterGroup, y as MapLocateControl } from "../map-qo7bY_g_.mjs";
|
|
2
2
|
export { Map, MapCircle, MapCircleMarker, MapControlContainer, MapDrawCircle, MapDrawControl, MapDrawDelete, MapDrawEdit, MapDrawMarker, MapDrawPolygon, MapDrawPolyline, MapDrawRectangle, MapDrawUndo, MapFeatureGroup, MapFullscreenControl, MapLayerGroup, MapLayers, MapLayersControl, MapLocateControl, MapMarker, MapMarkerClusterGroup, MapPolygon, MapPolyline, MapPopup, MapRectangle, MapSearchControl, MapTileLayer, MapTooltip, MapZoomControl, PlaceAutocomplete, useLeaflet };
|
|
@@ -304,7 +304,7 @@ function PlaceAutocomplete({ debounceMs = 300, lang, limit = 5, bbox, lat, lon,
|
|
|
304
304
|
//#region ../shadcn/ui/map.tsx
|
|
305
305
|
let _useMap;
|
|
306
306
|
let _useMapEvents;
|
|
307
|
-
if (typeof window !== "undefined") import("./map-leaflet-imports-
|
|
307
|
+
if (typeof window !== "undefined") import("./map-leaflet-imports-yWwH4CHB.mjs").then((mod) => {
|
|
308
308
|
_useMap = mod.useMap;
|
|
309
309
|
_useMapEvents = mod.useMapEvents;
|
|
310
310
|
});
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAA;AACzB,OAAO,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAA"}
|
package/dist/utils/index.mjs
CHANGED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Convert a date to start of day in the specified timezone, then to a UTC
|
|
3
|
+
* timestamp in seconds.
|
|
4
|
+
*
|
|
5
|
+
* @param date - The date to convert.
|
|
6
|
+
* @param timezone - The IANA timezone to interpret the date in (e.g. `'America/New_York'`).
|
|
7
|
+
* @returns Unix timestamp in seconds (UTC).
|
|
8
|
+
*/
|
|
9
|
+
export declare function toUTCTimestampStartOfDay(date: Date, timezone: string): number;
|
|
10
|
+
/**
|
|
11
|
+
* Convert a date to end of day in the specified timezone, then to a UTC
|
|
12
|
+
* timestamp in seconds.
|
|
13
|
+
*
|
|
14
|
+
* @param date - The date to convert.
|
|
15
|
+
* @param timezone - The IANA timezone to interpret the date in.
|
|
16
|
+
* @returns Unix timestamp in seconds (UTC).
|
|
17
|
+
*/
|
|
18
|
+
export declare function toUTCTimestampEndOfDay(date: Date, timezone: string): number;
|
|
19
|
+
//# sourceMappingURL=timezone.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timezone.d.ts","sourceRoot":"","sources":["../../src/utils/timezone.ts"],"names":[],"mappings":"AASA;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAK7E;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAK3E"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { endOfDay, startOfDay } from "date-fns";
|
|
2
|
+
import { fromZonedTime, toZonedTime } from "date-fns-tz";
|
|
3
|
+
//#region src/utils/timezone.ts
|
|
4
|
+
/**
|
|
5
|
+
* Timezone-aware conversion utilities for date filters.
|
|
6
|
+
*
|
|
7
|
+
* Handles conversion between a user's timezone and UTC for accurate
|
|
8
|
+
* time-range queries (e.g. log/metric filtering, date-based search).
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Convert a date to start of day in the specified timezone, then to a UTC
|
|
12
|
+
* timestamp in seconds.
|
|
13
|
+
*
|
|
14
|
+
* @param date - The date to convert.
|
|
15
|
+
* @param timezone - The IANA timezone to interpret the date in (e.g. `'America/New_York'`).
|
|
16
|
+
* @returns Unix timestamp in seconds (UTC).
|
|
17
|
+
*/
|
|
18
|
+
function toUTCTimestampStartOfDay(date, timezone) {
|
|
19
|
+
const utcDate = fromZonedTime(startOfDay(toZonedTime(date, timezone)), timezone);
|
|
20
|
+
return Math.floor(utcDate.getTime() / 1e3);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Convert a date to end of day in the specified timezone, then to a UTC
|
|
24
|
+
* timestamp in seconds.
|
|
25
|
+
*
|
|
26
|
+
* @param date - The date to convert.
|
|
27
|
+
* @param timezone - The IANA timezone to interpret the date in.
|
|
28
|
+
* @returns Unix timestamp in seconds (UTC).
|
|
29
|
+
*/
|
|
30
|
+
function toUTCTimestampEndOfDay(date, timezone) {
|
|
31
|
+
const utcDate = fromZonedTime(endOfDay(toZonedTime(date, timezone)), timezone);
|
|
32
|
+
return Math.floor(utcDate.getTime() / 1e3);
|
|
33
|
+
}
|
|
34
|
+
//#endregion
|
|
35
|
+
export { toUTCTimestampStartOfDay as n, toUTCTimestampEndOfDay as t };
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|