@krak-stack/registry 0.1.2 → 0.1.4
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 +17 -1
- package/dist/components/ui/alert.d.ts +10 -0
- package/dist/components/ui/app-brand.js +20 -20
- package/dist/components/ui/bubble.d.ts +16 -0
- package/dist/components/ui/code-block.js +38 -38
- package/dist/components/ui/collapsible.d.ts +5 -0
- package/dist/components/ui/copy-button.js +16 -16
- package/dist/components/ui/data-table.js +687 -687
- package/dist/components/ui/editing-locale-switcher.js +54 -54
- package/dist/components/ui/effect-form.js +490 -490
- package/dist/components/ui/empty.d.ts +11 -0
- package/dist/components/ui/file-picker.js +96 -96
- package/dist/components/ui/form.js +418 -418
- package/dist/components/ui/google-map.js +27 -27
- package/dist/components/ui/icon-input.js +93 -93
- package/dist/components/ui/loading.js +5 -5
- package/dist/components/ui/locale-switcher.js +48 -48
- package/dist/components/ui/marker.d.ts +10 -0
- package/dist/components/ui/message-scroller.d.ts +10 -0
- package/dist/components/ui/message.d.ts +10 -0
- package/dist/components/ui/pagination.js +92 -92
- package/dist/components/ui/search-menu.js +93 -93
- package/dist/components/ui/sidebar-layout.js +156 -156
- package/dist/components/ui/stats-card.js +28 -28
- package/dist/components/ui/theme-switcher.js +64 -64
- package/dist/components/ui/virtualized-combobox.js +66 -66
- package/dist/lib/docs-ai.d.ts +136 -0
- package/dist/lib/docs-ai.js +310 -0
- package/dist/lib/docs-core.d.ts +681 -0
- package/dist/lib/docs-core.js +2571 -0
- package/dist/lib/httpapi-ai.d.ts +54 -0
- package/dist/lib/httpapi-ai.js +361 -0
- package/dist/lib/httpapi-cli.d.ts +22 -0
- package/dist/lib/httpapi-cli.js +412 -0
- package/dist/lib/httpapi-client.d.ts +20 -0
- package/dist/lib/httpapi-client.js +50 -0
- package/dist/lib/httpapi-helpers.d.ts +105 -0
- package/dist/lib/httpapi-helpers.js +237 -0
- package/dist/lib/httpapi-mcp.d.ts +20 -0
- package/dist/lib/httpapi-mcp.js +366 -0
- package/dist/lib/query.js +128 -0
- package/dist/services/agent/client/atom.d.ts +56 -0
- package/dist/services/agent/client/index.d.ts +2 -0
- package/dist/services/agent/client/index.js +2239 -0
- package/dist/services/agent/client/widget.d.ts +52 -0
- package/dist/services/agent/index.d.ts +111 -0
- package/dist/services/agent/index.js +190 -0
- package/dist/services/agent/schema.d.ts +161 -0
- package/dist/services/agent/schema.js +135 -0
- package/package.json +59 -3
|
@@ -78,7 +78,7 @@ function useIsMobile() {
|
|
|
78
78
|
// ../../src/components/ui/button.tsx
|
|
79
79
|
import { Button as ButtonPrimitive } from "@base-ui/react/button";
|
|
80
80
|
import { cva as cva2 } from "class-variance-authority";
|
|
81
|
-
import {
|
|
81
|
+
import { jsx } from "react/jsx-runtime";
|
|
82
82
|
var buttonVariants = cva2("group/button inline-flex shrink-0 items-center justify-center rounded-md border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
|
|
83
83
|
variants: {
|
|
84
84
|
variant: {
|
|
@@ -111,44 +111,44 @@ function Button({
|
|
|
111
111
|
size = "default",
|
|
112
112
|
...props
|
|
113
113
|
}) {
|
|
114
|
-
return /* @__PURE__ */
|
|
114
|
+
return /* @__PURE__ */ jsx(ButtonPrimitive, {
|
|
115
115
|
"data-slot": "button",
|
|
116
116
|
className: cn(buttonVariants({ variant, size, className })),
|
|
117
117
|
...props
|
|
118
|
-
}
|
|
118
|
+
});
|
|
119
119
|
}
|
|
120
120
|
|
|
121
121
|
// ../../src/components/ui/input.tsx
|
|
122
122
|
import { Input as InputPrimitive } from "@base-ui/react/input";
|
|
123
|
-
import {
|
|
123
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
124
124
|
|
|
125
125
|
// ../../src/components/ui/separator.tsx
|
|
126
126
|
import { Separator as SeparatorPrimitive } from "@base-ui/react/separator";
|
|
127
|
-
import {
|
|
127
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
128
128
|
|
|
129
129
|
// ../../src/components/ui/sheet.tsx
|
|
130
130
|
import { Dialog as SheetPrimitive } from "@base-ui/react/dialog";
|
|
131
131
|
import { XIcon } from "lucide-react";
|
|
132
|
-
import {
|
|
132
|
+
import { jsx as jsx4, jsxs } from "react/jsx-runtime";
|
|
133
133
|
"use client";
|
|
134
134
|
function Sheet({ ...props }) {
|
|
135
|
-
return /* @__PURE__ */
|
|
135
|
+
return /* @__PURE__ */ jsx4(SheetPrimitive.Root, {
|
|
136
136
|
"data-slot": "sheet",
|
|
137
137
|
...props
|
|
138
|
-
}
|
|
138
|
+
});
|
|
139
139
|
}
|
|
140
140
|
function SheetPortal({ ...props }) {
|
|
141
|
-
return /* @__PURE__ */
|
|
141
|
+
return /* @__PURE__ */ jsx4(SheetPrimitive.Portal, {
|
|
142
142
|
"data-slot": "sheet-portal",
|
|
143
143
|
...props
|
|
144
|
-
}
|
|
144
|
+
});
|
|
145
145
|
}
|
|
146
146
|
function SheetOverlay({ className, ...props }) {
|
|
147
|
-
return /* @__PURE__ */
|
|
147
|
+
return /* @__PURE__ */ jsx4(SheetPrimitive.Backdrop, {
|
|
148
148
|
"data-slot": "sheet-overlay",
|
|
149
149
|
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),
|
|
150
150
|
...props
|
|
151
|
-
}
|
|
151
|
+
});
|
|
152
152
|
}
|
|
153
153
|
function SheetContent({
|
|
154
154
|
className,
|
|
@@ -157,79 +157,79 @@ function SheetContent({
|
|
|
157
157
|
showCloseButton = true,
|
|
158
158
|
...props
|
|
159
159
|
}) {
|
|
160
|
-
return /* @__PURE__ */
|
|
160
|
+
return /* @__PURE__ */ jsxs(SheetPortal, {
|
|
161
161
|
children: [
|
|
162
|
-
/* @__PURE__ */
|
|
163
|
-
/* @__PURE__ */
|
|
162
|
+
/* @__PURE__ */ jsx4(SheetOverlay, {}),
|
|
163
|
+
/* @__PURE__ */ jsxs(SheetPrimitive.Popup, {
|
|
164
164
|
"data-slot": "sheet-content",
|
|
165
165
|
"data-side": side,
|
|
166
166
|
className: cn("fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm", className),
|
|
167
167
|
...props,
|
|
168
168
|
children: [
|
|
169
169
|
children,
|
|
170
|
-
showCloseButton && /* @__PURE__ */
|
|
170
|
+
showCloseButton && /* @__PURE__ */ jsxs(SheetPrimitive.Close, {
|
|
171
171
|
"data-slot": "sheet-close",
|
|
172
|
-
render: /* @__PURE__ */
|
|
172
|
+
render: /* @__PURE__ */ jsx4(Button, {
|
|
173
173
|
variant: "ghost",
|
|
174
174
|
className: "absolute top-4 right-4",
|
|
175
175
|
size: "icon-sm"
|
|
176
|
-
}
|
|
176
|
+
}),
|
|
177
177
|
children: [
|
|
178
|
-
/* @__PURE__ */
|
|
179
|
-
/* @__PURE__ */
|
|
178
|
+
/* @__PURE__ */ jsx4(XIcon, {}),
|
|
179
|
+
/* @__PURE__ */ jsx4("span", {
|
|
180
180
|
className: "sr-only",
|
|
181
181
|
children: "Close"
|
|
182
|
-
}
|
|
182
|
+
})
|
|
183
183
|
]
|
|
184
|
-
}
|
|
184
|
+
})
|
|
185
185
|
]
|
|
186
|
-
}
|
|
186
|
+
})
|
|
187
187
|
]
|
|
188
|
-
}
|
|
188
|
+
});
|
|
189
189
|
}
|
|
190
190
|
function SheetHeader({ className, ...props }) {
|
|
191
|
-
return /* @__PURE__ */
|
|
191
|
+
return /* @__PURE__ */ jsx4("div", {
|
|
192
192
|
"data-slot": "sheet-header",
|
|
193
193
|
className: cn("flex flex-col gap-1.5 p-4", className),
|
|
194
194
|
...props
|
|
195
|
-
}
|
|
195
|
+
});
|
|
196
196
|
}
|
|
197
197
|
function SheetTitle({ className, ...props }) {
|
|
198
|
-
return /* @__PURE__ */
|
|
198
|
+
return /* @__PURE__ */ jsx4(SheetPrimitive.Title, {
|
|
199
199
|
"data-slot": "sheet-title",
|
|
200
200
|
className: cn("font-medium text-foreground", className),
|
|
201
201
|
...props
|
|
202
|
-
}
|
|
202
|
+
});
|
|
203
203
|
}
|
|
204
204
|
function SheetDescription({
|
|
205
205
|
className,
|
|
206
206
|
...props
|
|
207
207
|
}) {
|
|
208
|
-
return /* @__PURE__ */
|
|
208
|
+
return /* @__PURE__ */ jsx4(SheetPrimitive.Description, {
|
|
209
209
|
"data-slot": "sheet-description",
|
|
210
210
|
className: cn("text-sm text-muted-foreground", className),
|
|
211
211
|
...props
|
|
212
|
-
}
|
|
212
|
+
});
|
|
213
213
|
}
|
|
214
214
|
|
|
215
215
|
// ../../src/components/ui/skeleton.tsx
|
|
216
|
-
import {
|
|
216
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
217
217
|
|
|
218
218
|
// ../../src/components/ui/tooltip.tsx
|
|
219
219
|
import { Tooltip as TooltipPrimitive } from "@base-ui/react/tooltip";
|
|
220
|
-
import {
|
|
220
|
+
import { jsx as jsx6, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
221
221
|
"use client";
|
|
222
222
|
function Tooltip({ ...props }) {
|
|
223
|
-
return /* @__PURE__ */
|
|
223
|
+
return /* @__PURE__ */ jsx6(TooltipPrimitive.Root, {
|
|
224
224
|
"data-slot": "tooltip",
|
|
225
225
|
...props
|
|
226
|
-
}
|
|
226
|
+
});
|
|
227
227
|
}
|
|
228
228
|
function TooltipTrigger({ ...props }) {
|
|
229
|
-
return /* @__PURE__ */
|
|
229
|
+
return /* @__PURE__ */ jsx6(TooltipPrimitive.Trigger, {
|
|
230
230
|
"data-slot": "tooltip-trigger",
|
|
231
231
|
...props
|
|
232
|
-
}
|
|
232
|
+
});
|
|
233
233
|
}
|
|
234
234
|
function TooltipContent({
|
|
235
235
|
className,
|
|
@@ -240,31 +240,31 @@ function TooltipContent({
|
|
|
240
240
|
children,
|
|
241
241
|
...props
|
|
242
242
|
}) {
|
|
243
|
-
return /* @__PURE__ */
|
|
244
|
-
children: /* @__PURE__ */
|
|
243
|
+
return /* @__PURE__ */ jsx6(TooltipPrimitive.Portal, {
|
|
244
|
+
children: /* @__PURE__ */ jsx6(TooltipPrimitive.Positioner, {
|
|
245
245
|
align,
|
|
246
246
|
alignOffset,
|
|
247
247
|
side,
|
|
248
248
|
sideOffset,
|
|
249
249
|
className: "isolate z-50",
|
|
250
|
-
children: /* @__PURE__ */
|
|
250
|
+
children: /* @__PURE__ */ jsxs2(TooltipPrimitive.Popup, {
|
|
251
251
|
"data-slot": "tooltip-content",
|
|
252
252
|
className: cn("z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
|
|
253
253
|
...props,
|
|
254
254
|
children: [
|
|
255
255
|
children,
|
|
256
|
-
/* @__PURE__ */
|
|
256
|
+
/* @__PURE__ */ jsx6(TooltipPrimitive.Arrow, {
|
|
257
257
|
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"
|
|
258
|
-
}
|
|
258
|
+
})
|
|
259
259
|
]
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
}
|
|
260
|
+
})
|
|
261
|
+
})
|
|
262
|
+
});
|
|
263
263
|
}
|
|
264
264
|
|
|
265
265
|
// ../../src/components/ui/sidebar.tsx
|
|
266
266
|
import { PanelLeftIcon } from "lucide-react";
|
|
267
|
-
import {
|
|
267
|
+
import { jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
268
268
|
var SIDEBAR_COOKIE_NAME = "sidebar_state";
|
|
269
269
|
var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
270
270
|
var SIDEBAR_WIDTH = "16rem";
|
|
@@ -324,9 +324,9 @@ function SidebarProvider({
|
|
|
324
324
|
setOpenMobile,
|
|
325
325
|
toggleSidebar
|
|
326
326
|
}), [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]);
|
|
327
|
-
return /* @__PURE__ */
|
|
327
|
+
return /* @__PURE__ */ jsx7(SidebarContext.Provider, {
|
|
328
328
|
value: contextValue,
|
|
329
|
-
children: /* @__PURE__ */
|
|
329
|
+
children: /* @__PURE__ */ jsx7("div", {
|
|
330
330
|
"data-slot": "sidebar-wrapper",
|
|
331
331
|
style: {
|
|
332
332
|
"--sidebar-width": SIDEBAR_WIDTH,
|
|
@@ -336,8 +336,8 @@ function SidebarProvider({
|
|
|
336
336
|
className: cn("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar", className),
|
|
337
337
|
...props,
|
|
338
338
|
children
|
|
339
|
-
}
|
|
340
|
-
}
|
|
339
|
+
})
|
|
340
|
+
});
|
|
341
341
|
}
|
|
342
342
|
function Sidebar({
|
|
343
343
|
side = "left",
|
|
@@ -350,19 +350,19 @@ function Sidebar({
|
|
|
350
350
|
}) {
|
|
351
351
|
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
352
352
|
if (collapsible === "none") {
|
|
353
|
-
return /* @__PURE__ */
|
|
353
|
+
return /* @__PURE__ */ jsx7("div", {
|
|
354
354
|
"data-slot": "sidebar",
|
|
355
355
|
className: cn("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground", className),
|
|
356
356
|
...props,
|
|
357
357
|
children
|
|
358
|
-
}
|
|
358
|
+
});
|
|
359
359
|
}
|
|
360
360
|
if (isMobile) {
|
|
361
|
-
return /* @__PURE__ */
|
|
361
|
+
return /* @__PURE__ */ jsx7(Sheet, {
|
|
362
362
|
open: openMobile,
|
|
363
363
|
onOpenChange: setOpenMobile,
|
|
364
364
|
...props,
|
|
365
|
-
children: /* @__PURE__ */
|
|
365
|
+
children: /* @__PURE__ */ jsxs3(SheetContent, {
|
|
366
366
|
dir,
|
|
367
367
|
"data-sidebar": "sidebar",
|
|
368
368
|
"data-slot": "sidebar",
|
|
@@ -373,26 +373,26 @@ function Sidebar({
|
|
|
373
373
|
},
|
|
374
374
|
side,
|
|
375
375
|
children: [
|
|
376
|
-
/* @__PURE__ */
|
|
376
|
+
/* @__PURE__ */ jsxs3(SheetHeader, {
|
|
377
377
|
className: "sr-only",
|
|
378
378
|
children: [
|
|
379
|
-
/* @__PURE__ */
|
|
379
|
+
/* @__PURE__ */ jsx7(SheetTitle, {
|
|
380
380
|
children: "Sidebar"
|
|
381
|
-
}
|
|
382
|
-
/* @__PURE__ */
|
|
381
|
+
}),
|
|
382
|
+
/* @__PURE__ */ jsx7(SheetDescription, {
|
|
383
383
|
children: "Displays the mobile sidebar."
|
|
384
|
-
}
|
|
384
|
+
})
|
|
385
385
|
]
|
|
386
|
-
}
|
|
387
|
-
/* @__PURE__ */
|
|
386
|
+
}),
|
|
387
|
+
/* @__PURE__ */ jsx7("div", {
|
|
388
388
|
className: "flex h-full w-full flex-col",
|
|
389
389
|
children
|
|
390
|
-
}
|
|
390
|
+
})
|
|
391
391
|
]
|
|
392
|
-
}
|
|
393
|
-
}
|
|
392
|
+
})
|
|
393
|
+
});
|
|
394
394
|
}
|
|
395
|
-
return /* @__PURE__ */
|
|
395
|
+
return /* @__PURE__ */ jsxs3("div", {
|
|
396
396
|
className: "group peer text-sidebar-foreground hidden md:block",
|
|
397
397
|
"data-state": state,
|
|
398
398
|
"data-collapsible": state === "collapsed" ? collapsible : "",
|
|
@@ -400,24 +400,24 @@ function Sidebar({
|
|
|
400
400
|
"data-side": side,
|
|
401
401
|
"data-slot": "sidebar",
|
|
402
402
|
children: [
|
|
403
|
-
/* @__PURE__ */
|
|
403
|
+
/* @__PURE__ */ jsx7("div", {
|
|
404
404
|
"data-slot": "sidebar-gap",
|
|
405
405
|
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)")
|
|
406
|
-
}
|
|
407
|
-
/* @__PURE__ */
|
|
406
|
+
}),
|
|
407
|
+
/* @__PURE__ */ jsx7("div", {
|
|
408
408
|
"data-slot": "sidebar-container",
|
|
409
409
|
"data-side": side,
|
|
410
410
|
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),
|
|
411
411
|
...props,
|
|
412
|
-
children: /* @__PURE__ */
|
|
412
|
+
children: /* @__PURE__ */ jsx7("div", {
|
|
413
413
|
"data-sidebar": "sidebar",
|
|
414
414
|
"data-slot": "sidebar-inner",
|
|
415
415
|
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",
|
|
416
416
|
children
|
|
417
|
-
}
|
|
418
|
-
}
|
|
417
|
+
})
|
|
418
|
+
})
|
|
419
419
|
]
|
|
420
|
-
}
|
|
420
|
+
});
|
|
421
421
|
}
|
|
422
422
|
function SidebarTrigger({
|
|
423
423
|
className,
|
|
@@ -425,7 +425,7 @@ function SidebarTrigger({
|
|
|
425
425
|
...props
|
|
426
426
|
}) {
|
|
427
427
|
const { toggleSidebar } = useSidebar();
|
|
428
|
-
return /* @__PURE__ */
|
|
428
|
+
return /* @__PURE__ */ jsxs3(Button, {
|
|
429
429
|
"data-sidebar": "trigger",
|
|
430
430
|
"data-slot": "sidebar-trigger",
|
|
431
431
|
variant: "ghost",
|
|
@@ -437,17 +437,17 @@ function SidebarTrigger({
|
|
|
437
437
|
},
|
|
438
438
|
...props,
|
|
439
439
|
children: [
|
|
440
|
-
/* @__PURE__ */
|
|
441
|
-
/* @__PURE__ */
|
|
440
|
+
/* @__PURE__ */ jsx7(PanelLeftIcon, {}),
|
|
441
|
+
/* @__PURE__ */ jsx7("span", {
|
|
442
442
|
className: "sr-only",
|
|
443
443
|
children: "Toggle Sidebar"
|
|
444
|
-
}
|
|
444
|
+
})
|
|
445
445
|
]
|
|
446
|
-
}
|
|
446
|
+
});
|
|
447
447
|
}
|
|
448
448
|
function SidebarRail({ className, ...props }) {
|
|
449
449
|
const { toggleSidebar } = useSidebar();
|
|
450
|
-
return /* @__PURE__ */
|
|
450
|
+
return /* @__PURE__ */ jsx7("button", {
|
|
451
451
|
"data-sidebar": "rail",
|
|
452
452
|
"data-slot": "sidebar-rail",
|
|
453
453
|
"aria-label": "Toggle Sidebar",
|
|
@@ -456,46 +456,46 @@ function SidebarRail({ className, ...props }) {
|
|
|
456
456
|
title: "Toggle Sidebar",
|
|
457
457
|
className: cn("absolute inset-y-0 z-20 hidden w-4 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:start-1/2 after:w-[2px] hover:after:bg-sidebar-border sm:flex ltr:-translate-x-1/2 rtl:-translate-x-1/2", "in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize", "[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize", "group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full hover:group-data-[collapsible=offcanvas]:bg-sidebar", "[[data-side=left][data-collapsible=offcanvas]_&]:-right-2", "[[data-side=right][data-collapsible=offcanvas]_&]:-left-2", className),
|
|
458
458
|
...props
|
|
459
|
-
}
|
|
459
|
+
});
|
|
460
460
|
}
|
|
461
461
|
function SidebarInset({ className, ...props }) {
|
|
462
|
-
return /* @__PURE__ */
|
|
462
|
+
return /* @__PURE__ */ jsx7("main", {
|
|
463
463
|
"data-slot": "sidebar-inset",
|
|
464
464
|
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),
|
|
465
465
|
...props
|
|
466
|
-
}
|
|
466
|
+
});
|
|
467
467
|
}
|
|
468
468
|
function SidebarHeader({ className, ...props }) {
|
|
469
|
-
return /* @__PURE__ */
|
|
469
|
+
return /* @__PURE__ */ jsx7("div", {
|
|
470
470
|
"data-slot": "sidebar-header",
|
|
471
471
|
"data-sidebar": "header",
|
|
472
472
|
className: cn("flex flex-col gap-2 p-2", className),
|
|
473
473
|
...props
|
|
474
|
-
}
|
|
474
|
+
});
|
|
475
475
|
}
|
|
476
476
|
function SidebarFooter({ className, ...props }) {
|
|
477
|
-
return /* @__PURE__ */
|
|
477
|
+
return /* @__PURE__ */ jsx7("div", {
|
|
478
478
|
"data-slot": "sidebar-footer",
|
|
479
479
|
"data-sidebar": "footer",
|
|
480
480
|
className: cn("flex flex-col gap-2 p-2", className),
|
|
481
481
|
...props
|
|
482
|
-
}
|
|
482
|
+
});
|
|
483
483
|
}
|
|
484
484
|
function SidebarContent({ className, ...props }) {
|
|
485
|
-
return /* @__PURE__ */
|
|
485
|
+
return /* @__PURE__ */ jsx7("div", {
|
|
486
486
|
"data-slot": "sidebar-content",
|
|
487
487
|
"data-sidebar": "content",
|
|
488
488
|
className: cn("no-scrollbar flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden", className),
|
|
489
489
|
...props
|
|
490
|
-
}
|
|
490
|
+
});
|
|
491
491
|
}
|
|
492
492
|
function SidebarGroup({ className, ...props }) {
|
|
493
|
-
return /* @__PURE__ */
|
|
493
|
+
return /* @__PURE__ */ jsx7("div", {
|
|
494
494
|
"data-slot": "sidebar-group",
|
|
495
495
|
"data-sidebar": "group",
|
|
496
496
|
className: cn("relative flex w-full min-w-0 flex-col p-2", className),
|
|
497
497
|
...props
|
|
498
|
-
}
|
|
498
|
+
});
|
|
499
499
|
}
|
|
500
500
|
function SidebarGroupLabel({
|
|
501
501
|
className,
|
|
@@ -518,28 +518,28 @@ function SidebarGroupContent({
|
|
|
518
518
|
className,
|
|
519
519
|
...props
|
|
520
520
|
}) {
|
|
521
|
-
return /* @__PURE__ */
|
|
521
|
+
return /* @__PURE__ */ jsx7("div", {
|
|
522
522
|
"data-slot": "sidebar-group-content",
|
|
523
523
|
"data-sidebar": "group-content",
|
|
524
524
|
className: cn("w-full text-sm", className),
|
|
525
525
|
...props
|
|
526
|
-
}
|
|
526
|
+
});
|
|
527
527
|
}
|
|
528
528
|
function SidebarMenu({ className, ...props }) {
|
|
529
|
-
return /* @__PURE__ */
|
|
529
|
+
return /* @__PURE__ */ jsx7("ul", {
|
|
530
530
|
"data-slot": "sidebar-menu",
|
|
531
531
|
"data-sidebar": "menu",
|
|
532
532
|
className: cn("flex w-full min-w-0 flex-col gap-1", className),
|
|
533
533
|
...props
|
|
534
|
-
}
|
|
534
|
+
});
|
|
535
535
|
}
|
|
536
536
|
function SidebarMenuItem({ className, ...props }) {
|
|
537
|
-
return /* @__PURE__ */
|
|
537
|
+
return /* @__PURE__ */ jsx7("li", {
|
|
538
538
|
"data-slot": "sidebar-menu-item",
|
|
539
539
|
"data-sidebar": "menu-item",
|
|
540
540
|
className: cn("group/menu-item relative", className),
|
|
541
541
|
...props
|
|
542
|
-
}
|
|
542
|
+
});
|
|
543
543
|
}
|
|
544
544
|
var sidebarMenuButtonVariants = cva3("peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate", {
|
|
545
545
|
variants: {
|
|
@@ -573,9 +573,9 @@ function SidebarMenuButton({
|
|
|
573
573
|
props: mergeProps2({
|
|
574
574
|
className: cn(sidebarMenuButtonVariants({ variant, size }), className)
|
|
575
575
|
}, props),
|
|
576
|
-
render: !tooltip ? render : /* @__PURE__ */
|
|
576
|
+
render: !tooltip ? render : /* @__PURE__ */ jsx7(TooltipTrigger, {
|
|
577
577
|
render
|
|
578
|
-
}
|
|
578
|
+
}),
|
|
579
579
|
state: {
|
|
580
580
|
slot: "sidebar-menu-button",
|
|
581
581
|
sidebar: "menu-button",
|
|
@@ -591,21 +591,21 @@ function SidebarMenuButton({
|
|
|
591
591
|
children: tooltip
|
|
592
592
|
};
|
|
593
593
|
}
|
|
594
|
-
return /* @__PURE__ */
|
|
594
|
+
return /* @__PURE__ */ jsxs3(Tooltip, {
|
|
595
595
|
children: [
|
|
596
596
|
comp,
|
|
597
|
-
/* @__PURE__ */
|
|
597
|
+
/* @__PURE__ */ jsx7(TooltipContent, {
|
|
598
598
|
side: "right",
|
|
599
599
|
align: "center",
|
|
600
600
|
hidden: state !== "collapsed" || isMobile,
|
|
601
601
|
...tooltip
|
|
602
|
-
}
|
|
602
|
+
})
|
|
603
603
|
]
|
|
604
|
-
}
|
|
604
|
+
});
|
|
605
605
|
}
|
|
606
606
|
|
|
607
607
|
// ../../src/components/ui/sidebar-layout.tsx
|
|
608
|
-
import {
|
|
608
|
+
import { jsx as jsx8, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
609
609
|
var sidebarStorageRuntime = Atom.runtime(BrowserKeyValueStore.layerLocalStorage);
|
|
610
610
|
var sidebarOpenAtom = Atom.kvs({
|
|
611
611
|
runtime: sidebarStorageRuntime,
|
|
@@ -626,54 +626,54 @@ function AppSidebar({ footer, groups, header }) {
|
|
|
626
626
|
if (isMobile)
|
|
627
627
|
setOpenMobile(false);
|
|
628
628
|
};
|
|
629
|
-
return /* @__PURE__ */
|
|
629
|
+
return /* @__PURE__ */ jsxs4(Sidebar, {
|
|
630
630
|
collapsible: "icon",
|
|
631
631
|
children: [
|
|
632
|
-
header && /* @__PURE__ */
|
|
632
|
+
header && /* @__PURE__ */ jsx8(SidebarHeader, {
|
|
633
633
|
children: header
|
|
634
|
-
}
|
|
635
|
-
/* @__PURE__ */
|
|
636
|
-
children: groups.map((group) => /* @__PURE__ */
|
|
634
|
+
}),
|
|
635
|
+
/* @__PURE__ */ jsx8(SidebarContent, {
|
|
636
|
+
children: groups.map((group) => /* @__PURE__ */ jsxs4(SidebarGroup, {
|
|
637
637
|
children: [
|
|
638
|
-
/* @__PURE__ */
|
|
638
|
+
/* @__PURE__ */ jsx8(SidebarGroupLabel, {
|
|
639
639
|
children: group.label()
|
|
640
|
-
}
|
|
641
|
-
/* @__PURE__ */
|
|
642
|
-
children: /* @__PURE__ */
|
|
640
|
+
}),
|
|
641
|
+
/* @__PURE__ */ jsx8(SidebarGroupContent, {
|
|
642
|
+
children: /* @__PURE__ */ jsx8(SidebarMenu, {
|
|
643
643
|
children: group.items.map((item) => {
|
|
644
|
-
const render = item.external ? /* @__PURE__ */
|
|
644
|
+
const render = item.external ? /* @__PURE__ */ jsx8("a", {
|
|
645
645
|
href: item.href,
|
|
646
646
|
target: "_blank",
|
|
647
647
|
rel: "noreferrer"
|
|
648
|
-
}
|
|
648
|
+
}) : /* @__PURE__ */ jsx8(Link, {
|
|
649
649
|
to: item.href
|
|
650
|
-
}
|
|
651
|
-
return /* @__PURE__ */
|
|
652
|
-
children: /* @__PURE__ */
|
|
650
|
+
});
|
|
651
|
+
return /* @__PURE__ */ jsx8(SidebarMenuItem, {
|
|
652
|
+
children: /* @__PURE__ */ jsxs4(SidebarMenuButton, {
|
|
653
653
|
isActive: !item.external && pathname === item.href,
|
|
654
654
|
onClick: closeMobileSidebar,
|
|
655
655
|
render,
|
|
656
656
|
tooltip: item.label(),
|
|
657
657
|
children: [
|
|
658
|
-
/* @__PURE__ */
|
|
659
|
-
/* @__PURE__ */
|
|
658
|
+
/* @__PURE__ */ jsx8(item.icon, {}),
|
|
659
|
+
/* @__PURE__ */ jsx8("span", {
|
|
660
660
|
children: item.label()
|
|
661
|
-
}
|
|
661
|
+
})
|
|
662
662
|
]
|
|
663
|
-
}
|
|
664
|
-
}, item.href
|
|
663
|
+
})
|
|
664
|
+
}, item.href);
|
|
665
665
|
})
|
|
666
|
-
}
|
|
667
|
-
}
|
|
666
|
+
})
|
|
667
|
+
})
|
|
668
668
|
]
|
|
669
|
-
}, group.label()
|
|
670
|
-
}
|
|
671
|
-
footer ? /* @__PURE__ */
|
|
669
|
+
}, group.label()))
|
|
670
|
+
}),
|
|
671
|
+
footer ? /* @__PURE__ */ jsx8(SidebarFooter, {
|
|
672
672
|
children: footer
|
|
673
|
-
}
|
|
674
|
-
/* @__PURE__ */
|
|
673
|
+
}) : null,
|
|
674
|
+
/* @__PURE__ */ jsx8(SidebarRail, {})
|
|
675
675
|
]
|
|
676
|
-
}
|
|
676
|
+
});
|
|
677
677
|
}
|
|
678
678
|
function SidebarPageHeader({
|
|
679
679
|
title,
|
|
@@ -681,38 +681,38 @@ function SidebarPageHeader({
|
|
|
681
681
|
badge,
|
|
682
682
|
actions
|
|
683
683
|
}) {
|
|
684
|
-
return /* @__PURE__ */
|
|
684
|
+
return /* @__PURE__ */ jsxs4("header", {
|
|
685
685
|
className: "flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",
|
|
686
686
|
children: [
|
|
687
|
-
/* @__PURE__ */
|
|
687
|
+
/* @__PURE__ */ jsxs4("div", {
|
|
688
688
|
className: "flex flex-col gap-2",
|
|
689
689
|
children: [
|
|
690
|
-
badge ? /* @__PURE__ */
|
|
690
|
+
badge ? /* @__PURE__ */ jsx8(Badge, {
|
|
691
691
|
className: "w-fit",
|
|
692
692
|
variant: badge.variant ?? "secondary",
|
|
693
693
|
children: badge.label
|
|
694
|
-
}
|
|
695
|
-
/* @__PURE__ */
|
|
694
|
+
}) : null,
|
|
695
|
+
/* @__PURE__ */ jsxs4("div", {
|
|
696
696
|
className: "flex flex-col gap-1",
|
|
697
697
|
children: [
|
|
698
|
-
/* @__PURE__ */
|
|
698
|
+
/* @__PURE__ */ jsx8("h1", {
|
|
699
699
|
className: "text-3xl font-bold tracking-tight",
|
|
700
700
|
children: title
|
|
701
|
-
}
|
|
702
|
-
description ? /* @__PURE__ */
|
|
701
|
+
}),
|
|
702
|
+
description ? /* @__PURE__ */ jsx8("p", {
|
|
703
703
|
className: "text-muted-foreground max-w-2xl text-sm",
|
|
704
704
|
children: description
|
|
705
|
-
}
|
|
705
|
+
}) : null
|
|
706
706
|
]
|
|
707
|
-
}
|
|
707
|
+
})
|
|
708
708
|
]
|
|
709
|
-
}
|
|
710
|
-
actions ? /* @__PURE__ */
|
|
709
|
+
}),
|
|
710
|
+
actions ? /* @__PURE__ */ jsx8("div", {
|
|
711
711
|
className: "flex gap-2",
|
|
712
712
|
children: actions
|
|
713
|
-
}
|
|
713
|
+
}) : null
|
|
714
714
|
]
|
|
715
|
-
}
|
|
715
|
+
});
|
|
716
716
|
}
|
|
717
717
|
function SidebarLayout({
|
|
718
718
|
groups,
|
|
@@ -724,37 +724,37 @@ function SidebarLayout({
|
|
|
724
724
|
fullPage = false
|
|
725
725
|
}) {
|
|
726
726
|
const [sidebarOpen, setSidebarOpen] = useAtom(sidebarOpenAtom);
|
|
727
|
-
return /* @__PURE__ */
|
|
727
|
+
return /* @__PURE__ */ jsxs4(SidebarProvider, {
|
|
728
728
|
open: sidebarOpen,
|
|
729
729
|
onOpenChange: setSidebarOpen,
|
|
730
730
|
className: cn(fullPage && "xl:h-svh xl:min-h-0 xl:overflow-hidden"),
|
|
731
731
|
children: [
|
|
732
|
-
/* @__PURE__ */
|
|
732
|
+
/* @__PURE__ */ jsx8(AppSidebar, {
|
|
733
733
|
footer: sidebarFooter,
|
|
734
734
|
groups,
|
|
735
735
|
header: sidebarHeader
|
|
736
|
-
}
|
|
737
|
-
/* @__PURE__ */
|
|
736
|
+
}),
|
|
737
|
+
/* @__PURE__ */ jsxs4(SidebarInset, {
|
|
738
738
|
className: cn("min-w-0 overflow-x-hidden", fullPage && "xl:h-svh xl:min-h-0 xl:overflow-hidden"),
|
|
739
739
|
children: [
|
|
740
|
-
/* @__PURE__ */
|
|
740
|
+
/* @__PURE__ */ jsxs4("header", {
|
|
741
741
|
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",
|
|
742
742
|
children: [
|
|
743
|
-
/* @__PURE__ */
|
|
744
|
-
/* @__PURE__ */
|
|
743
|
+
/* @__PURE__ */ jsx8(SidebarTrigger, {}),
|
|
744
|
+
/* @__PURE__ */ jsx8("div", {
|
|
745
745
|
className: "ml-auto flex items-center gap-2",
|
|
746
746
|
children: headerActions
|
|
747
|
-
}
|
|
747
|
+
})
|
|
748
748
|
]
|
|
749
|
-
}
|
|
750
|
-
/* @__PURE__ */
|
|
749
|
+
}),
|
|
750
|
+
/* @__PURE__ */ jsx8("div", {
|
|
751
751
|
className: contentClassName ?? "flex flex-col gap-6 px-5 py-6 md:px-8",
|
|
752
|
-
children: children ?? /* @__PURE__ */
|
|
753
|
-
}
|
|
752
|
+
children: children ?? /* @__PURE__ */ jsx8(Outlet, {})
|
|
753
|
+
})
|
|
754
754
|
]
|
|
755
|
-
}
|
|
755
|
+
})
|
|
756
756
|
]
|
|
757
|
-
}
|
|
757
|
+
});
|
|
758
758
|
}
|
|
759
759
|
export {
|
|
760
760
|
useSidebarLayout,
|