@krak-stack/registry 0.1.25 → 0.1.27

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.
Files changed (44) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +5 -0
  3. package/dist/components/ui/data-table.js +212 -207
  4. package/dist/components/ui/effect-form.js +170 -169
  5. package/dist/components/ui/form.js +113 -112
  6. package/dist/components/ui/icon-input.js +43 -40
  7. package/dist/components/ui/pagination.js +2 -2
  8. package/dist/components/ui/sidebar-layout.d.ts +5 -2
  9. package/dist/components/ui/sidebar-layout.js +88 -80
  10. package/dist/components/ui/theme-switcher.js +3 -3
  11. package/dist/components/ui/virtualized-combobox.js +34 -31
  12. package/dist/lib/docs.d.ts +3 -1
  13. package/dist/lib/docs.js +181 -162
  14. package/dist/lib/docs.server.js +62 -36
  15. package/dist/lib/documentation-toolkit.js +63 -37
  16. package/dist/lib/httpapi-cli.js +7 -7
  17. package/dist/lib/httpapi-client.js +3 -3
  18. package/dist/lib/httpapi-helpers.js +11 -11
  19. package/dist/lib/httpapi-mcp.js +2 -2
  20. package/dist/lib/httpapi-toolkit.js +2 -2
  21. package/dist/lib/query.js +7 -7
  22. package/dist/lib/seo.js +2 -2
  23. package/dist/lib/webfetch-toolkit.js +6 -6
  24. package/dist/services/agent/client/index.js +129 -128
  25. package/dist/services/agent/schema.js +5 -5
  26. package/dist/services/file-extraction/index.js +4 -4
  27. package/dist/services/file-extraction/schema.js +2 -2
  28. package/dist/services/health/index.js +9 -9
  29. package/dist/services/notification/channels/ses/index.d.ts +2 -2
  30. package/dist/services/notification/channels/ses/index.js +2 -2
  31. package/dist/services/notification/channels/ses/schema.js +2 -2
  32. package/dist/services/notification/client/index.js +5 -5
  33. package/dist/services/notification/index.js +2 -2
  34. package/dist/services/notification/persistence/drizzle.d.ts +868 -0
  35. package/dist/services/notification/persistence/drizzle.js +2 -2
  36. package/dist/services/notification/persistence/index.d.ts +2 -0
  37. package/dist/services/notification/persistence/index.js +15 -15
  38. package/dist/services/notification/persistence/schema.d.ts +143 -0
  39. package/dist/services/notification/persistence/schema.js +12 -12
  40. package/dist/services/notification/public.js +7 -7
  41. package/dist/services/notification/schema.js +2 -2
  42. package/dist/services/s3/index.js +2 -2
  43. package/dist/services/s3/schema.js +2 -2
  44. package/package.json +2 -2
@@ -1,9 +1,8 @@
1
1
  // ../../src/components/ui/sidebar-layout.tsx
2
- import { useAtom } from "@effect/atom-react";
3
- import { BrowserKeyValueStore } from "@effect/platform-browser";
4
2
  import { Link, Outlet, useRouterState } from "@tanstack/react-router";
5
- import { Schema as Schema2 } from "effect";
6
- import { Atom } from "effect/unstable/reactivity";
3
+ import { Option, Schema as Schema2 } from "effect";
4
+ import { Cookies } from "effect/unstable/http";
5
+ import { useState as useState3 } from "react";
7
6
 
8
7
  // ../../src/components/ui/badge.tsx
9
8
  import { mergeProps } from "@base-ui/react/merge-props";
@@ -120,29 +119,31 @@ function Button({
120
119
 
121
120
  // ../../src/components/ui/input.tsx
122
121
  import { Input as InputPrimitive } from "@base-ui/react/input";
122
+ import { jsx as jsx2 } from "react/jsx-runtime";
123
123
 
124
124
  // ../../src/components/ui/separator.tsx
125
125
  import { Separator as SeparatorPrimitive } from "@base-ui/react/separator";
126
+ import { jsx as jsx3 } from "react/jsx-runtime";
126
127
 
127
128
  // ../../src/components/ui/sheet.tsx
128
129
  import { Dialog as SheetPrimitive } from "@base-ui/react/dialog";
129
130
  import { XIcon } from "lucide-react";
130
- import { jsx as jsx2, jsxs } from "react/jsx-runtime";
131
+ import { jsx as jsx4, jsxs } from "react/jsx-runtime";
131
132
  "use client";
132
133
  function Sheet({ ...props }) {
133
- return /* @__PURE__ */ jsx2(SheetPrimitive.Root, {
134
+ return /* @__PURE__ */ jsx4(SheetPrimitive.Root, {
134
135
  "data-slot": "sheet",
135
136
  ...props
136
137
  });
137
138
  }
138
139
  function SheetPortal({ ...props }) {
139
- return /* @__PURE__ */ jsx2(SheetPrimitive.Portal, {
140
+ return /* @__PURE__ */ jsx4(SheetPrimitive.Portal, {
140
141
  "data-slot": "sheet-portal",
141
142
  ...props
142
143
  });
143
144
  }
144
145
  function SheetOverlay({ className, ...props }) {
145
- return /* @__PURE__ */ jsx2(SheetPrimitive.Backdrop, {
146
+ return /* @__PURE__ */ jsx4(SheetPrimitive.Backdrop, {
146
147
  "data-slot": "sheet-overlay",
147
148
  className: cn("fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs", className),
148
149
  ...props
@@ -157,7 +158,7 @@ function SheetContent({
157
158
  }) {
158
159
  return /* @__PURE__ */ jsxs(SheetPortal, {
159
160
  children: [
160
- /* @__PURE__ */ jsx2(SheetOverlay, {}),
161
+ /* @__PURE__ */ jsx4(SheetOverlay, {}),
161
162
  /* @__PURE__ */ jsxs(SheetPrimitive.Popup, {
162
163
  "data-slot": "sheet-content",
163
164
  "data-side": side,
@@ -167,14 +168,14 @@ function SheetContent({
167
168
  children,
168
169
  showCloseButton && /* @__PURE__ */ jsxs(SheetPrimitive.Close, {
169
170
  "data-slot": "sheet-close",
170
- render: /* @__PURE__ */ jsx2(Button, {
171
+ render: /* @__PURE__ */ jsx4(Button, {
171
172
  variant: "ghost",
172
173
  className: "absolute top-4 right-4",
173
174
  size: "icon-sm"
174
175
  }),
175
176
  children: [
176
- /* @__PURE__ */ jsx2(XIcon, {}),
177
- /* @__PURE__ */ jsx2("span", {
177
+ /* @__PURE__ */ jsx4(XIcon, {}),
178
+ /* @__PURE__ */ jsx4("span", {
178
179
  className: "sr-only",
179
180
  children: "Close"
180
181
  })
@@ -186,14 +187,14 @@ function SheetContent({
186
187
  });
187
188
  }
188
189
  function SheetHeader({ className, ...props }) {
189
- return /* @__PURE__ */ jsx2("div", {
190
+ return /* @__PURE__ */ jsx4("div", {
190
191
  "data-slot": "sheet-header",
191
192
  className: cn("flex flex-col gap-1.5 p-4", className),
192
193
  ...props
193
194
  });
194
195
  }
195
196
  function SheetTitle({ className, ...props }) {
196
- return /* @__PURE__ */ jsx2(SheetPrimitive.Title, {
197
+ return /* @__PURE__ */ jsx4(SheetPrimitive.Title, {
197
198
  "data-slot": "sheet-title",
198
199
  className: cn("font-medium text-foreground", className),
199
200
  ...props
@@ -203,25 +204,28 @@ function SheetDescription({
203
204
  className,
204
205
  ...props
205
206
  }) {
206
- return /* @__PURE__ */ jsx2(SheetPrimitive.Description, {
207
+ return /* @__PURE__ */ jsx4(SheetPrimitive.Description, {
207
208
  "data-slot": "sheet-description",
208
209
  className: cn("text-sm text-muted-foreground", className),
209
210
  ...props
210
211
  });
211
212
  }
212
213
 
214
+ // ../../src/components/ui/skeleton.tsx
215
+ import { jsx as jsx5 } from "react/jsx-runtime";
216
+
213
217
  // ../../src/components/ui/tooltip.tsx
214
218
  import { Tooltip as TooltipPrimitive } from "@base-ui/react/tooltip";
215
- import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
219
+ import { jsx as jsx6, jsxs as jsxs2 } from "react/jsx-runtime";
216
220
  "use client";
217
221
  function Tooltip({ ...props }) {
218
- return /* @__PURE__ */ jsx3(TooltipPrimitive.Root, {
222
+ return /* @__PURE__ */ jsx6(TooltipPrimitive.Root, {
219
223
  "data-slot": "tooltip",
220
224
  ...props
221
225
  });
222
226
  }
223
227
  function TooltipTrigger({ ...props }) {
224
- return /* @__PURE__ */ jsx3(TooltipPrimitive.Trigger, {
228
+ return /* @__PURE__ */ jsx6(TooltipPrimitive.Trigger, {
225
229
  "data-slot": "tooltip-trigger",
226
230
  ...props
227
231
  });
@@ -235,8 +239,8 @@ function TooltipContent({
235
239
  children,
236
240
  ...props
237
241
  }) {
238
- return /* @__PURE__ */ jsx3(TooltipPrimitive.Portal, {
239
- children: /* @__PURE__ */ jsx3(TooltipPrimitive.Positioner, {
242
+ return /* @__PURE__ */ jsx6(TooltipPrimitive.Portal, {
243
+ children: /* @__PURE__ */ jsx6(TooltipPrimitive.Positioner, {
240
244
  align,
241
245
  alignOffset,
242
246
  side,
@@ -248,7 +252,7 @@ function TooltipContent({
248
252
  ...props,
249
253
  children: [
250
254
  children,
251
- /* @__PURE__ */ jsx3(TooltipPrimitive.Arrow, {
255
+ /* @__PURE__ */ jsx6(TooltipPrimitive.Arrow, {
252
256
  className: "bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5"
253
257
  })
254
258
  ]
@@ -260,7 +264,7 @@ function TooltipContent({
260
264
  // ../../src/components/ui/sidebar.tsx
261
265
  import { PanelLeftIcon } from "lucide-react";
262
266
  import { Schema } from "effect";
263
- import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
267
+ import { jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
264
268
  var SIDEBAR_COOKIE_NAME = "sidebar_state";
265
269
  var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
266
270
  var SIDEBAR_WIDTH = "16rem";
@@ -324,9 +328,9 @@ function SidebarProvider({
324
328
  "--sidebar-width-icon": SIDEBAR_WIDTH_ICON,
325
329
  ...style
326
330
  };
327
- return /* @__PURE__ */ jsx4(SidebarContext.Provider, {
331
+ return /* @__PURE__ */ jsx7(SidebarContext.Provider, {
328
332
  value: contextValue,
329
- children: /* @__PURE__ */ jsx4("div", {
333
+ children: /* @__PURE__ */ jsx7("div", {
330
334
  "data-slot": "sidebar-wrapper",
331
335
  style: wrapperStyle,
332
336
  className: cn("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar", className),
@@ -346,7 +350,7 @@ function Sidebar({
346
350
  }) {
347
351
  const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
348
352
  if (collapsible === "none") {
349
- return /* @__PURE__ */ jsx4("div", {
353
+ return /* @__PURE__ */ jsx7("div", {
350
354
  "data-slot": "sidebar",
351
355
  className: cn("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground", className),
352
356
  ...props,
@@ -357,7 +361,7 @@ function Sidebar({
357
361
  const mobileStyle = {
358
362
  "--sidebar-width": SIDEBAR_WIDTH_MOBILE
359
363
  };
360
- return /* @__PURE__ */ jsx4(Sheet, {
364
+ return /* @__PURE__ */ jsx7(Sheet, {
361
365
  open: openMobile,
362
366
  onOpenChange: setOpenMobile,
363
367
  ...props,
@@ -373,15 +377,15 @@ function Sidebar({
373
377
  /* @__PURE__ */ jsxs3(SheetHeader, {
374
378
  className: "sr-only",
375
379
  children: [
376
- /* @__PURE__ */ jsx4(SheetTitle, {
380
+ /* @__PURE__ */ jsx7(SheetTitle, {
377
381
  children: "Sidebar"
378
382
  }),
379
- /* @__PURE__ */ jsx4(SheetDescription, {
383
+ /* @__PURE__ */ jsx7(SheetDescription, {
380
384
  children: "Displays the mobile sidebar."
381
385
  })
382
386
  ]
383
387
  }),
384
- /* @__PURE__ */ jsx4("div", {
388
+ /* @__PURE__ */ jsx7("div", {
385
389
  className: "flex h-full w-full flex-col",
386
390
  children
387
391
  })
@@ -397,16 +401,16 @@ function Sidebar({
397
401
  "data-side": side,
398
402
  "data-slot": "sidebar",
399
403
  children: [
400
- /* @__PURE__ */ jsx4("div", {
404
+ /* @__PURE__ */ jsx7("div", {
401
405
  "data-slot": "sidebar-gap",
402
406
  className: cn("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear", "group-data-[collapsible=offcanvas]:w-0", "group-data-[side=right]:rotate-180", variant === "floating" || variant === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)")
403
407
  }),
404
- /* @__PURE__ */ jsx4("div", {
408
+ /* @__PURE__ */ jsx7("div", {
405
409
  "data-slot": "sidebar-container",
406
410
  "data-side": side,
407
411
  className: cn("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex", variant === "floating" || variant === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l", className),
408
412
  ...props,
409
- children: /* @__PURE__ */ jsx4("div", {
413
+ children: /* @__PURE__ */ jsx7("div", {
410
414
  "data-sidebar": "sidebar",
411
415
  "data-slot": "sidebar-inner",
412
416
  className: "bg-sidebar group-data-[variant=floating]:ring-sidebar-border flex size-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1",
@@ -434,8 +438,8 @@ function SidebarTrigger({
434
438
  },
435
439
  ...props,
436
440
  children: [
437
- /* @__PURE__ */ jsx4(PanelLeftIcon, {}),
438
- /* @__PURE__ */ jsx4("span", {
441
+ /* @__PURE__ */ jsx7(PanelLeftIcon, {}),
442
+ /* @__PURE__ */ jsx7("span", {
439
443
  className: "sr-only",
440
444
  children: "Toggle Sidebar"
441
445
  })
@@ -444,7 +448,7 @@ function SidebarTrigger({
444
448
  }
445
449
  function SidebarRail({ className, ...props }) {
446
450
  const { toggleSidebar } = useSidebar();
447
- return /* @__PURE__ */ jsx4("button", {
451
+ return /* @__PURE__ */ jsx7("button", {
448
452
  "data-sidebar": "rail",
449
453
  "data-slot": "sidebar-rail",
450
454
  "aria-label": "Toggle Sidebar",
@@ -456,14 +460,14 @@ function SidebarRail({ className, ...props }) {
456
460
  });
457
461
  }
458
462
  function SidebarInset({ className, ...props }) {
459
- return /* @__PURE__ */ jsx4("main", {
463
+ return /* @__PURE__ */ jsx7("main", {
460
464
  "data-slot": "sidebar-inset",
461
465
  className: cn("relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2", className),
462
466
  ...props
463
467
  });
464
468
  }
465
469
  function SidebarHeader({ className, ...props }) {
466
- return /* @__PURE__ */ jsx4("div", {
470
+ return /* @__PURE__ */ jsx7("div", {
467
471
  "data-slot": "sidebar-header",
468
472
  "data-sidebar": "header",
469
473
  className: cn("flex flex-col gap-2 p-2", className),
@@ -471,7 +475,7 @@ function SidebarHeader({ className, ...props }) {
471
475
  });
472
476
  }
473
477
  function SidebarFooter({ className, ...props }) {
474
- return /* @__PURE__ */ jsx4("div", {
478
+ return /* @__PURE__ */ jsx7("div", {
475
479
  "data-slot": "sidebar-footer",
476
480
  "data-sidebar": "footer",
477
481
  className: cn("flex flex-col gap-2 p-2", className),
@@ -479,7 +483,7 @@ function SidebarFooter({ className, ...props }) {
479
483
  });
480
484
  }
481
485
  function SidebarContent({ className, ...props }) {
482
- return /* @__PURE__ */ jsx4("div", {
486
+ return /* @__PURE__ */ jsx7("div", {
483
487
  "data-slot": "sidebar-content",
484
488
  "data-sidebar": "content",
485
489
  className: cn("no-scrollbar flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden", className),
@@ -487,7 +491,7 @@ function SidebarContent({ className, ...props }) {
487
491
  });
488
492
  }
489
493
  function SidebarGroup({ className, ...props }) {
490
- return /* @__PURE__ */ jsx4("div", {
494
+ return /* @__PURE__ */ jsx7("div", {
491
495
  "data-slot": "sidebar-group",
492
496
  "data-sidebar": "group",
493
497
  className: cn("relative flex w-full min-w-0 flex-col p-2", className),
@@ -515,7 +519,7 @@ function SidebarGroupContent({
515
519
  className,
516
520
  ...props
517
521
  }) {
518
- return /* @__PURE__ */ jsx4("div", {
522
+ return /* @__PURE__ */ jsx7("div", {
519
523
  "data-slot": "sidebar-group-content",
520
524
  "data-sidebar": "group-content",
521
525
  className: cn("w-full text-sm", className),
@@ -523,7 +527,7 @@ function SidebarGroupContent({
523
527
  });
524
528
  }
525
529
  function SidebarMenu({ className, ...props }) {
526
- return /* @__PURE__ */ jsx4("ul", {
530
+ return /* @__PURE__ */ jsx7("ul", {
527
531
  "data-slot": "sidebar-menu",
528
532
  "data-sidebar": "menu",
529
533
  className: cn("flex w-full min-w-0 flex-col gap-1", className),
@@ -531,7 +535,7 @@ function SidebarMenu({ className, ...props }) {
531
535
  });
532
536
  }
533
537
  function SidebarMenuItem({ className, ...props }) {
534
- return /* @__PURE__ */ jsx4("li", {
538
+ return /* @__PURE__ */ jsx7("li", {
535
539
  "data-slot": "sidebar-menu-item",
536
540
  "data-sidebar": "menu-item",
537
541
  className: cn("group/menu-item relative", className),
@@ -570,7 +574,7 @@ function SidebarMenuButton({
570
574
  props: mergeProps2({
571
575
  className: cn(sidebarMenuButtonVariants({ variant, size }), className)
572
576
  }, props),
573
- render: !tooltip ? render : /* @__PURE__ */ jsx4(TooltipTrigger, {
577
+ render: !tooltip ? render : /* @__PURE__ */ jsx7(TooltipTrigger, {
574
578
  render
575
579
  }),
576
580
  state: {
@@ -587,7 +591,7 @@ function SidebarMenuButton({
587
591
  return /* @__PURE__ */ jsxs3(Tooltip, {
588
592
  children: [
589
593
  comp,
590
- /* @__PURE__ */ jsx4(TooltipContent, {
594
+ /* @__PURE__ */ jsx7(TooltipContent, {
591
595
  side: "right",
592
596
  align: "center",
593
597
  hidden: state !== "collapsed" || isMobile,
@@ -598,19 +602,19 @@ function SidebarMenuButton({
598
602
  }
599
603
 
600
604
  // ../../src/components/ui/sidebar-layout.tsx
601
- import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
602
- var sidebarStorageRuntime = Atom.runtime(BrowserKeyValueStore.layerLocalStorage);
603
- var sidebarOpenAtom = Atom.kvs({
604
- runtime: sidebarStorageRuntime,
605
- key: "sidebar:open",
606
- schema: Schema2.Boolean,
607
- defaultValue: () => true
605
+ import { jsx as jsx8, jsxs as jsxs4 } from "react/jsx-runtime";
606
+ var SIDEBAR_COOKIE_NAME2 = "sidebar_state";
607
+ var SidebarOpenCookie = Schema2.Literals(["true", "false"]).annotate({
608
+ identifier: "SidebarOpenCookie"
608
609
  });
610
+ var getSidebarDefaultOpen = (defaultOpen) => {
611
+ return Schema2.decodeUnknownOption(SidebarOpenCookie)(Cookies.parseHeader(globalThis.document?.cookie ?? "")[SIDEBAR_COOKIE_NAME2]).pipe(Option.map((value) => value === "true"), Option.getOrElse(() => defaultOpen));
612
+ };
609
613
  var useSidebarLayout = () => {
610
614
  const { isMobile } = useSidebar();
611
615
  return { isMobile };
612
616
  };
613
- function AppSidebar({ footer, groups, header }) {
617
+ function AppSidebar({ collapsible, footer, groups, header }) {
614
618
  const { isMobile, setOpenMobile } = useSidebar();
615
619
  const pathname = useRouterState({
616
620
  select: (state) => state.location.pathname
@@ -620,39 +624,40 @@ function AppSidebar({ footer, groups, header }) {
620
624
  setOpenMobile(false);
621
625
  };
622
626
  return /* @__PURE__ */ jsxs4(Sidebar, {
623
- collapsible: "icon",
627
+ collapsible,
624
628
  children: [
625
- header && /* @__PURE__ */ jsx5(SidebarHeader, {
629
+ header && /* @__PURE__ */ jsx8(SidebarHeader, {
626
630
  children: header
627
631
  }),
628
- /* @__PURE__ */ jsx5(SidebarContent, {
632
+ /* @__PURE__ */ jsx8(SidebarContent, {
633
+ className: "group-data-[collapsible=icon]:overflow-x-hidden group-data-[collapsible=icon]:overflow-y-auto",
629
634
  children: groups.map((group) => /* @__PURE__ */ jsxs4(SidebarGroup, {
630
635
  children: [
631
- /* @__PURE__ */ jsx5(SidebarGroupLabel, {
636
+ /* @__PURE__ */ jsx8(SidebarGroupLabel, {
632
637
  children: group.label()
633
638
  }),
634
- /* @__PURE__ */ jsx5(SidebarGroupContent, {
635
- children: /* @__PURE__ */ jsx5(SidebarMenu, {
639
+ /* @__PURE__ */ jsx8(SidebarGroupContent, {
640
+ children: /* @__PURE__ */ jsx8(SidebarMenu, {
636
641
  children: group.items.map((item) => {
637
- const render = item.external ? /* @__PURE__ */ jsx5("a", {
642
+ const render = item.external ? /* @__PURE__ */ jsx8("a", {
638
643
  href: item.href,
639
644
  target: "_blank",
640
645
  rel: "noreferrer"
641
- }) : /* @__PURE__ */ jsx5(Link, {
646
+ }) : /* @__PURE__ */ jsx8(Link, {
642
647
  to: item.href
643
648
  });
644
- return /* @__PURE__ */ jsx5(SidebarMenuItem, {
649
+ return /* @__PURE__ */ jsx8(SidebarMenuItem, {
645
650
  children: /* @__PURE__ */ jsxs4(SidebarMenuButton, {
646
651
  isActive: !item.external && pathname === item.href,
647
652
  onClick: closeMobileSidebar,
648
653
  render,
649
654
  tooltip: item.label(),
650
655
  children: [
651
- /* @__PURE__ */ jsx5(item.icon, {}),
652
- /* @__PURE__ */ jsx5("span", {
656
+ item.icon ? /* @__PURE__ */ jsx8(item.icon, {}) : null,
657
+ /* @__PURE__ */ jsx8("span", {
653
658
  children: item.label()
654
659
  }),
655
- item.badge ? /* @__PURE__ */ jsx5(Badge, {
660
+ item.badge ? /* @__PURE__ */ jsx8(Badge, {
656
661
  className: "ml-auto",
657
662
  variant: "secondary",
658
663
  children: item.badge()
@@ -666,10 +671,10 @@ function AppSidebar({ footer, groups, header }) {
666
671
  ]
667
672
  }, group.label()))
668
673
  }),
669
- footer ? /* @__PURE__ */ jsx5(SidebarFooter, {
674
+ footer ? /* @__PURE__ */ jsx8(SidebarFooter, {
670
675
  children: footer
671
676
  }) : null,
672
- /* @__PURE__ */ jsx5(SidebarRail, {})
677
+ /* @__PURE__ */ jsx8(SidebarRail, {})
673
678
  ]
674
679
  });
675
680
  }
@@ -685,7 +690,7 @@ function SidebarPageHeader({
685
690
  /* @__PURE__ */ jsxs4("div", {
686
691
  className: "flex flex-col gap-2",
687
692
  children: [
688
- badge ? /* @__PURE__ */ jsx5(Badge, {
693
+ badge ? /* @__PURE__ */ jsx8(Badge, {
689
694
  className: "w-fit",
690
695
  variant: badge.variant ?? "secondary",
691
696
  children: badge.label
@@ -693,11 +698,11 @@ function SidebarPageHeader({
693
698
  /* @__PURE__ */ jsxs4("div", {
694
699
  className: "flex flex-col gap-1",
695
700
  children: [
696
- /* @__PURE__ */ jsx5("h1", {
701
+ /* @__PURE__ */ jsx8("h1", {
697
702
  className: "text-3xl font-bold tracking-tight",
698
703
  children: title
699
704
  }),
700
- description ? /* @__PURE__ */ jsx5("p", {
705
+ description ? /* @__PURE__ */ jsx8("p", {
701
706
  className: "text-muted-foreground max-w-2xl text-sm",
702
707
  children: description
703
708
  }) : null
@@ -705,7 +710,7 @@ function SidebarPageHeader({
705
710
  })
706
711
  ]
707
712
  }),
708
- actions ? /* @__PURE__ */ jsx5("div", {
713
+ actions ? /* @__PURE__ */ jsx8("div", {
709
714
  className: "flex gap-2",
710
715
  children: actions
711
716
  }) : null
@@ -719,15 +724,18 @@ function SidebarLayout({
719
724
  sidebarHeader,
720
725
  headerActions,
721
726
  contentClassName,
722
- fullPage = false
727
+ fullPage = false,
728
+ sidebarCollapsible = "icon",
729
+ defaultOpen = true
723
730
  }) {
724
- const [sidebarOpen, setSidebarOpen] = useAtom(sidebarOpenAtom);
731
+ const [sidebarOpen, setSidebarOpen] = useState3(() => getSidebarDefaultOpen(defaultOpen));
725
732
  return /* @__PURE__ */ jsxs4(SidebarProvider, {
726
733
  open: sidebarOpen,
727
734
  onOpenChange: setSidebarOpen,
728
735
  className: cn(fullPage && "xl:h-svh xl:min-h-0 xl:overflow-hidden"),
729
736
  children: [
730
- /* @__PURE__ */ jsx5(AppSidebar, {
737
+ /* @__PURE__ */ jsx8(AppSidebar, {
738
+ collapsible: sidebarCollapsible,
731
739
  footer: sidebarFooter,
732
740
  groups,
733
741
  header: sidebarHeader
@@ -738,16 +746,16 @@ function SidebarLayout({
738
746
  /* @__PURE__ */ jsxs4("header", {
739
747
  className: "bg-background/95 supports-[backdrop-filter]:bg-background/60 sticky top-0 z-10 flex h-14 shrink-0 items-center gap-2 border-b px-4 backdrop-blur",
740
748
  children: [
741
- /* @__PURE__ */ jsx5(SidebarTrigger, {}),
742
- /* @__PURE__ */ jsx5("div", {
749
+ /* @__PURE__ */ jsx8(SidebarTrigger, {}),
750
+ /* @__PURE__ */ jsx8("div", {
743
751
  className: "ml-auto flex items-center gap-2",
744
752
  children: headerActions
745
753
  })
746
754
  ]
747
755
  }),
748
- /* @__PURE__ */ jsx5("div", {
756
+ /* @__PURE__ */ jsx8("div", {
749
757
  className: contentClassName ?? "flex flex-col gap-6 px-5 py-6 md:px-8",
750
- children: children ?? /* @__PURE__ */ jsx5(Outlet, {})
758
+ children: children ?? /* @__PURE__ */ jsx8(Outlet, {})
751
759
  })
752
760
  ]
753
761
  })
@@ -755,7 +763,7 @@ function SidebarLayout({
755
763
  });
756
764
  }
757
765
  export {
758
- SidebarLayout,
766
+ useSidebarLayout,
759
767
  SidebarPageHeader,
760
- useSidebarLayout
768
+ SidebarLayout
761
769
  };
@@ -776,8 +776,8 @@ var ThemeOptionIcon = ({ theme }) => {
776
776
  });
777
777
  };
778
778
  export {
779
- ThemeProvider,
780
- ThemeSwitcher,
779
+ useTheme,
781
780
  themes,
782
- useTheme
781
+ ThemeSwitcher,
782
+ ThemeProvider
783
783
  };