@arcadeai/design-system 3.36.0 → 3.36.2
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/components/index.js +411 -396
- package/dist/components/ui/atoms/arcade-gradient.d.ts.map +1 -0
- package/dist/components/ui/atoms/{icons/arcade-gradient.js → arcade-gradient.js} +1 -1
- package/dist/components/ui/atoms/icons/index.d.ts +0 -1
- package/dist/components/ui/atoms/icons/index.d.ts.map +1 -1
- package/dist/components/ui/atoms/icons/index.js +294 -296
- package/dist/components/ui/atoms/index.d.ts +1 -0
- package/dist/components/ui/atoms/index.d.ts.map +1 -1
- package/dist/components/ui/atoms/index.js +112 -112
- package/dist/components/ui/atoms/virtualized-grid.d.ts.map +1 -1
- package/dist/components/ui/atoms/virtualized-grid.js +16 -16
- package/dist/components/ui/index.js +411 -396
- package/dist/components/ui/molecules/chat-history-item.d.ts +21 -0
- package/dist/components/ui/molecules/chat-history-item.d.ts.map +1 -0
- package/dist/components/ui/molecules/chat-history-item.js +88 -0
- package/dist/components/ui/molecules/chat-message-list.d.ts +6 -0
- package/dist/components/ui/molecules/chat-message-list.d.ts.map +1 -1
- package/dist/components/ui/molecules/chat-message-list.js +117 -61
- package/dist/components/ui/molecules/confirm-popover.d.ts +20 -0
- package/dist/components/ui/molecules/confirm-popover.d.ts.map +1 -0
- package/dist/components/ui/molecules/confirm-popover.js +50 -0
- package/dist/components/ui/molecules/error-state.d.ts +17 -0
- package/dist/components/ui/molecules/error-state.d.ts.map +1 -0
- package/dist/components/ui/molecules/error-state.js +45 -0
- package/dist/components/ui/molecules/index.d.ts +8 -4
- package/dist/components/ui/molecules/index.d.ts.map +1 -1
- package/dist/components/ui/molecules/index.js +41 -41
- package/dist/components/ui/molecules/requirement-badges.js +4 -5
- package/dist/components/ui/molecules/toolkit-card.js +1 -1
- package/dist/components/ui/pages/chat-page-skeleton.d.ts +7 -0
- package/dist/components/ui/pages/chat-page-skeleton.d.ts.map +1 -0
- package/dist/components/ui/pages/chat-page-skeleton.js +18 -0
- package/dist/components/ui/pages/index.d.ts +2 -2
- package/dist/components/ui/pages/index.d.ts.map +1 -1
- package/dist/components/ui/pages/index.js +4 -4
- package/dist/components/ui/templates/chat-template-skeletons.d.ts +12 -0
- package/dist/components/ui/templates/chat-template-skeletons.d.ts.map +1 -0
- package/dist/components/ui/templates/chat-template-skeletons.js +127 -0
- package/dist/components/ui/templates/error-template.d.ts +20 -0
- package/dist/components/ui/templates/error-template.d.ts.map +1 -0
- package/dist/components/ui/templates/error-template.js +117 -0
- package/dist/components/ui/templates/index.d.ts +4 -0
- package/dist/components/ui/templates/index.d.ts.map +1 -1
- package/dist/components/ui/templates/index.js +37 -22
- package/dist/hooks/use-mobile.d.ts.map +1 -1
- package/dist/hooks/use-mobile.js +12 -11
- package/dist/main.js +380 -365
- package/dist/metadata/toolkit-icons.d.ts.map +1 -1
- package/dist/metadata/toolkit-icons.js +187 -186
- package/dist/metadata/toolkits.d.ts.map +1 -1
- package/dist/metadata/toolkits.js +13 -0
- package/dist/{toolkit-card-B97E7TBA.js → toolkit-card-CB1oiaei.js} +2 -3
- package/package.json +1 -1
- package/dist/components/ui/atoms/icons/arcade-gradient.d.ts.map +0 -1
- package/dist/components/ui/molecules/switcher.d.ts +0 -83
- package/dist/components/ui/molecules/switcher.d.ts.map +0 -1
- package/dist/components/ui/molecules/switcher.js +0 -164
- package/dist/components/ui/pages/chat-page.d.ts +0 -83
- package/dist/components/ui/pages/chat-page.d.ts.map +0 -1
- package/dist/components/ui/pages/chat-page.js +0 -385
- /package/dist/components/ui/atoms/{icons/arcade-gradient.d.ts → arcade-gradient.d.ts} +0 -0
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import { Accordion as e, AccordionContent as t, AccordionItem as p, AccordionTrigger as a } from "./accordion.js";
|
|
2
2
|
import { Alert as i, AlertDescription as f, AlertTitle as x } from "./alert.js";
|
|
3
3
|
import { AlertDialog as n, AlertDialogAction as d, AlertDialogCancel as g, AlertDialogContent as c, AlertDialogDescription as s, AlertDialogFooter as u, AlertDialogHeader as C, AlertDialogOverlay as b, AlertDialogPortal as S, AlertDialogTitle as h, AlertDialogTrigger as D } from "./alert-dialog.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
4
|
+
import { ArcadeGradient as M } from "./arcade-gradient.js";
|
|
5
|
+
import { Avatar as B, AvatarFallback as G, AvatarImage as k } from "./avatar.js";
|
|
6
|
+
import { AvatarNotificationBadge as y, avatarBadgeVariants as L } from "./avatar-notification-badge.js";
|
|
7
|
+
import { Badge as v, badgeVariants as I } from "./badge.js";
|
|
8
|
+
import { BrandChip as F } from "./brand-chip.js";
|
|
9
|
+
import { Breadcrumb as R, BreadcrumbEllipsis as O, BreadcrumbItem as E, BreadcrumbLink as z, BreadcrumbList as W, BreadcrumbPage as Z, BreadcrumbSeparator as N } from "./breadcrumb.js";
|
|
10
|
+
import { Button as J, buttonVariants as X } from "./button.js";
|
|
11
|
+
import { ByocBadge as j } from "./byoc-badge.js";
|
|
12
|
+
import { C as U, a as K } from "../../../calendar-DreAgQKY.js";
|
|
13
|
+
import { Card as $, CardAction as oo, CardContent as ro, CardDescription as eo, CardFooter as to, CardHeader as po, CardTitle as ao } from "./card.js";
|
|
14
|
+
import { ChartContainer as io, ChartLegend as fo, ChartLegendContent as xo, ChartStyle as lo, ChartTooltip as no, ChartTooltipContent as go } from "./chart.js";
|
|
15
|
+
import { ChatContainerContent as so, ChatContainerRoot as uo, ChatContainerScrollAnchor as Co } from "./chat-container.js";
|
|
16
|
+
import { Checkbox as So } from "./checkbox.js";
|
|
17
|
+
import { CodeBlock as Do, CodeBlockCode as To, CodeBlockGroup as Mo } from "./code-block.js";
|
|
18
|
+
import { Collapsible as Bo, CollapsibleContent as Go, CollapsibleTrigger as ko } from "./collapsible.js";
|
|
19
|
+
import { Command as yo, CommandDialog as Lo, CommandEmpty as Po, CommandGroup as vo, CommandInput as Io, CommandItem as Ho, CommandList as Fo, CommandSeparator as Vo, CommandShortcut as Ro } from "./command.js";
|
|
20
|
+
import { CopyButton as Eo } from "./copy-button.js";
|
|
21
|
+
import { Dialog as Wo, DialogClose as Zo, DialogContent as No, DialogDescription as qo, DialogFooter as Jo, DialogHeader as Xo, DialogOverlay as Yo, DialogPortal as jo, DialogTitle as Qo, DialogTrigger as Uo } from "./dialog.js";
|
|
22
|
+
import { DropdownMenu as _o, DropdownMenuCheckboxItem as $o, DropdownMenuContent as or, DropdownMenuGroup as rr, DropdownMenuItem as er, DropdownMenuLabel as tr, DropdownMenuPortal as pr, DropdownMenuRadioGroup as ar, DropdownMenuRadioItem as mr, DropdownMenuSeparator as ir, DropdownMenuShortcut as fr, DropdownMenuSub as xr, DropdownMenuSubContent as lr, DropdownMenuSubTrigger as nr, DropdownMenuTrigger as dr } from "./dropdown-menu.js";
|
|
23
|
+
import { HoverCard as cr, HoverCardContent as sr, HoverCardTrigger as ur } from "./hover-card.js";
|
|
24
|
+
import { Adp as br } from "./icons/adp.js";
|
|
25
|
+
import { Aha as hr } from "./icons/aha.js";
|
|
26
|
+
import { Airtable as Tr } from "./icons/airtable.js";
|
|
27
|
+
import { Amplitude as Ar } from "./icons/amplitude.js";
|
|
28
|
+
import { Arcade as Gr } from "./icons/arcade.js";
|
|
29
29
|
import { ArcadeLogo as wr } from "./icons/arcade-logo.js";
|
|
30
30
|
import { Asana as Lr } from "./icons/asana.js";
|
|
31
31
|
import { Ashby as vr } from "./icons/ashby.js";
|
|
@@ -206,9 +206,9 @@ export {
|
|
|
206
206
|
t as AccordionContent,
|
|
207
207
|
p as AccordionItem,
|
|
208
208
|
a as AccordionTrigger,
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
209
|
+
br as Adp,
|
|
210
|
+
hr as Aha,
|
|
211
|
+
Tr as Airtable,
|
|
212
212
|
i as Alert,
|
|
213
213
|
f as AlertDescription,
|
|
214
214
|
n as AlertDialog,
|
|
@@ -223,86 +223,86 @@ export {
|
|
|
223
223
|
h as AlertDialogTitle,
|
|
224
224
|
D as AlertDialogTrigger,
|
|
225
225
|
x as AlertTitle,
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
226
|
+
Ar as Amplitude,
|
|
227
|
+
Gr as Arcade,
|
|
228
|
+
M as ArcadeGradient,
|
|
229
229
|
wr as ArcadeLogo,
|
|
230
230
|
Lr as Asana,
|
|
231
231
|
vr as Ashby,
|
|
232
232
|
Hr as Atlassian,
|
|
233
233
|
Vr as Attio,
|
|
234
234
|
Or as Auth0,
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
235
|
+
B as Avatar,
|
|
236
|
+
G as AvatarFallback,
|
|
237
|
+
k as AvatarImage,
|
|
238
|
+
y as AvatarNotificationBadge,
|
|
239
239
|
zr as Azure,
|
|
240
|
-
|
|
240
|
+
v as Badge,
|
|
241
241
|
Zr as Bamboohr,
|
|
242
242
|
qr as Basecamp,
|
|
243
243
|
Xr as Bill,
|
|
244
244
|
jr as Bitbucket,
|
|
245
245
|
Ur as Bluesky,
|
|
246
246
|
_r as Box,
|
|
247
|
-
|
|
247
|
+
F as BrandChip,
|
|
248
248
|
oe as Braze,
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
249
|
+
R as Breadcrumb,
|
|
250
|
+
O as BreadcrumbEllipsis,
|
|
251
|
+
E as BreadcrumbItem,
|
|
252
|
+
z as BreadcrumbLink,
|
|
253
|
+
W as BreadcrumbList,
|
|
254
|
+
Z as BreadcrumbPage,
|
|
255
|
+
N as BreadcrumbSeparator,
|
|
256
256
|
ee as Brex,
|
|
257
257
|
pe as Brightdata,
|
|
258
258
|
me as Buffer,
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
259
|
+
J as Button,
|
|
260
|
+
j as ByocBadge,
|
|
261
|
+
U as Calendar,
|
|
262
|
+
K as CalendarDayButton,
|
|
263
263
|
fe as Calendly,
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
264
|
+
$ as Card,
|
|
265
|
+
oo as CardAction,
|
|
266
|
+
ro as CardContent,
|
|
267
|
+
eo as CardDescription,
|
|
268
|
+
to as CardFooter,
|
|
269
|
+
po as CardHeader,
|
|
270
|
+
ao as CardTitle,
|
|
271
|
+
io as ChartContainer,
|
|
272
|
+
fo as ChartLegend,
|
|
273
|
+
xo as ChartLegendContent,
|
|
274
|
+
lo as ChartStyle,
|
|
275
|
+
no as ChartTooltip,
|
|
276
|
+
go as ChartTooltipContent,
|
|
277
|
+
so as ChatContainerContent,
|
|
278
|
+
uo as ChatContainerRoot,
|
|
279
|
+
Co as ChatContainerScrollAnchor,
|
|
280
|
+
So as Checkbox,
|
|
281
281
|
le as Claude,
|
|
282
282
|
de as ClaudeCodeLogotype,
|
|
283
283
|
ce as Clickhouse,
|
|
284
284
|
ue as Clickup,
|
|
285
285
|
be as Cline,
|
|
286
286
|
he as Closeio,
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
287
|
+
Do as CodeBlock,
|
|
288
|
+
To as CodeBlockCode,
|
|
289
|
+
Mo as CodeBlockGroup,
|
|
290
290
|
Te as Codesandbox,
|
|
291
291
|
Ae as Coinbase,
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
292
|
+
Bo as Collapsible,
|
|
293
|
+
Go as CollapsibleContent,
|
|
294
|
+
ko as CollapsibleTrigger,
|
|
295
|
+
yo as Command,
|
|
296
|
+
Lo as CommandDialog,
|
|
297
|
+
Po as CommandEmpty,
|
|
298
|
+
vo as CommandGroup,
|
|
299
|
+
Io as CommandInput,
|
|
300
|
+
Ho as CommandItem,
|
|
301
|
+
Fo as CommandList,
|
|
302
|
+
Vo as CommandSeparator,
|
|
303
|
+
Ro as CommandShortcut,
|
|
304
304
|
Ge as Confluence,
|
|
305
|
-
|
|
305
|
+
Eo as CopyButton,
|
|
306
306
|
we as Cursor,
|
|
307
307
|
Le as CursorInstallDark,
|
|
308
308
|
ve as CursorInstallLight,
|
|
@@ -310,34 +310,34 @@ export {
|
|
|
310
310
|
Ve as Customerio,
|
|
311
311
|
Oe as Datadog,
|
|
312
312
|
ze as Daytona,
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
313
|
+
Wo as Dialog,
|
|
314
|
+
Zo as DialogClose,
|
|
315
|
+
No as DialogContent,
|
|
316
|
+
qo as DialogDescription,
|
|
317
|
+
Jo as DialogFooter,
|
|
318
|
+
Xo as DialogHeader,
|
|
319
|
+
Yo as DialogOverlay,
|
|
320
|
+
jo as DialogPortal,
|
|
321
|
+
Qo as DialogTitle,
|
|
322
|
+
Uo as DialogTrigger,
|
|
323
323
|
Ze as DigitalOcean,
|
|
324
324
|
qe as Discord,
|
|
325
325
|
Xe as Dropbox,
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
326
|
+
_o as DropdownMenu,
|
|
327
|
+
$o as DropdownMenuCheckboxItem,
|
|
328
|
+
or as DropdownMenuContent,
|
|
329
|
+
rr as DropdownMenuGroup,
|
|
330
|
+
er as DropdownMenuItem,
|
|
331
|
+
tr as DropdownMenuLabel,
|
|
332
|
+
pr as DropdownMenuPortal,
|
|
333
|
+
ar as DropdownMenuRadioGroup,
|
|
334
|
+
mr as DropdownMenuRadioItem,
|
|
335
|
+
ir as DropdownMenuSeparator,
|
|
336
|
+
fr as DropdownMenuShortcut,
|
|
337
|
+
xr as DropdownMenuSub,
|
|
338
|
+
lr as DropdownMenuSubContent,
|
|
339
|
+
nr as DropdownMenuSubTrigger,
|
|
340
|
+
dr as DropdownMenuTrigger,
|
|
341
341
|
je as E2b,
|
|
342
342
|
Ue as Ebay,
|
|
343
343
|
_e as Evernote,
|
|
@@ -370,9 +370,9 @@ export {
|
|
|
370
370
|
_t as Granola,
|
|
371
371
|
op as Heroku,
|
|
372
372
|
ep as Hootsuite,
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
373
|
+
cr as HoverCard,
|
|
374
|
+
sr as HoverCardContent,
|
|
375
|
+
ur as HoverCardTrigger,
|
|
376
376
|
pp as Hubspot,
|
|
377
377
|
mp as Imgflip,
|
|
378
378
|
_m as Input,
|
|
@@ -540,9 +540,9 @@ export {
|
|
|
540
540
|
Xm as ZohoBooks,
|
|
541
541
|
jm as ZohoCreator,
|
|
542
542
|
Um as Zoom,
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
543
|
+
L as avatarBadgeVariants,
|
|
544
|
+
I as badgeVariants,
|
|
545
|
+
X as buttonVariants,
|
|
546
546
|
ri as jsonHighlightVariants,
|
|
547
547
|
Hf as stepIndicatorIconVariants,
|
|
548
548
|
Ff as stepIndicatorLabelVariants,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"virtualized-grid.d.ts","sourceRoot":"","sources":["../../../../lib/components/ui/atoms/virtualized-grid.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,SAAS,EACd,KAAK,SAAS,EAKf,MAAM,OAAO,CAAC;AAEf,MAAM,MAAM,oBAAoB,CAAC,CAAC,IAAI;IACpC,0BAA0B;IAC1B,KAAK,EAAE,CAAC,EAAE,CAAC;IACX,oCAAoC;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,gDAAgD;IAChD,SAAS,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IACzC,oCAAoC;IACpC,UAAU,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,SAAS,CAAC;IAClD,2CAA2C;IAC3C,eAAe,EAAE,MAAM,CAAC;IACxB,mCAAmC;IACnC,UAAU,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAC;IAChC,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,+BAA+B;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kDAAkD;IAClD,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;
|
|
1
|
+
{"version":3,"file":"virtualized-grid.d.ts","sourceRoot":"","sources":["../../../../lib/components/ui/atoms/virtualized-grid.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,SAAS,EACd,KAAK,SAAS,EAKf,MAAM,OAAO,CAAC;AAEf,MAAM,MAAM,oBAAoB,CAAC,CAAC,IAAI;IACpC,0BAA0B;IAC1B,KAAK,EAAE,CAAC,EAAE,CAAC;IACX,oCAAoC;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,gDAAgD;IAChD,SAAS,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IACzC,oCAAoC;IACpC,UAAU,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,SAAS,CAAC;IAClD,2CAA2C;IAC3C,eAAe,EAAE,MAAM,CAAC;IACxB,mCAAmC;IACnC,UAAU,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAC;IAChC,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,+BAA+B;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kDAAkD;IAClD,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAgBF,wBAAgB,eAAe,CAAC,CAAC,EAAE,EACjC,KAAK,EACL,OAAO,EACP,SAAS,EACT,UAAU,EACV,eAAe,EACf,UAAU,EACV,QAA2B,EAC3B,QAA6B,EAC7B,aAAwC,GACzC,EAAE,oBAAoB,CAAC,CAAC,CAAC,kDA0GzB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as x } from "react/jsx-runtime";
|
|
2
2
|
import * as w from "react";
|
|
3
|
-
import { useRef as F, useState as
|
|
3
|
+
import { useRef as F, useState as k, useEffect as T, useMemo as D } from "react";
|
|
4
4
|
import { flushSync as N } from "react-dom";
|
|
5
5
|
function y(r, l, e) {
|
|
6
6
|
let s = e.initialDeps ?? [], t, n = !0;
|
|
@@ -42,7 +42,7 @@ function O(r, l) {
|
|
|
42
42
|
throw new Error("Unexpected undefined");
|
|
43
43
|
return r;
|
|
44
44
|
}
|
|
45
|
-
const W = (r, l) => Math.abs(r - l) < 1.01,
|
|
45
|
+
const W = (r, l) => Math.abs(r - l) < 1.01, V = (r, l, e) => {
|
|
46
46
|
let s;
|
|
47
47
|
return function(...t) {
|
|
48
48
|
r.clearTimeout(s), s = r.setTimeout(() => l.apply(this, t), e);
|
|
@@ -50,7 +50,7 @@ const W = (r, l) => Math.abs(r - l) < 1.01, L = (r, l, e) => {
|
|
|
50
50
|
}, z = (r) => {
|
|
51
51
|
const { offsetWidth: l, offsetHeight: e } = r;
|
|
52
52
|
return { width: l, height: e };
|
|
53
|
-
},
|
|
53
|
+
}, L = (r) => r, j = (r) => {
|
|
54
54
|
const l = Math.max(r.startIndex - r.overscan, 0), e = Math.min(r.endIndex + r.overscan, r.count - 1), s = [];
|
|
55
55
|
for (let t = l; t <= e; t++)
|
|
56
56
|
s.push(t);
|
|
@@ -97,7 +97,7 @@ const W = (r, l) => Math.abs(r - l) < 1.01, L = (r, l, e) => {
|
|
|
97
97
|
return;
|
|
98
98
|
let t = 0;
|
|
99
99
|
const n = r.options.useScrollendEvent && I ? () => {
|
|
100
|
-
} :
|
|
100
|
+
} : V(
|
|
101
101
|
s,
|
|
102
102
|
() => {
|
|
103
103
|
l(t, !1);
|
|
@@ -132,7 +132,7 @@ const W = (r, l) => Math.abs(r - l) < 1.01, L = (r, l, e) => {
|
|
|
132
132
|
behavior: e
|
|
133
133
|
});
|
|
134
134
|
};
|
|
135
|
-
class
|
|
135
|
+
class q {
|
|
136
136
|
constructor(l) {
|
|
137
137
|
this.unsubs = [], this.scrollElement = null, this.targetWindow = null, this.isScrolling = !1, this.currentScrollToIndex = null, this.measurementsCache = [], this.itemSizeCache = /* @__PURE__ */ new Map(), this.laneAssignments = /* @__PURE__ */ new Map(), this.pendingMeasuredCacheIndexes = [], this.prevLanes = void 0, this.lanesChangedFlag = !1, this.lanesSettling = !1, this.scrollRect = null, this.scrollOffset = null, this.scrollDirection = null, this.scrollAdjustments = 0, this.elementsCache = /* @__PURE__ */ new Map(), this.observer = /* @__PURE__ */ (() => {
|
|
138
138
|
let e = null;
|
|
@@ -170,7 +170,7 @@ class U {
|
|
|
170
170
|
scrollPaddingStart: 0,
|
|
171
171
|
scrollPaddingEnd: 0,
|
|
172
172
|
horizontal: !1,
|
|
173
|
-
getItemKey:
|
|
173
|
+
getItemKey: L,
|
|
174
174
|
rangeExtractor: j,
|
|
175
175
|
onChange: () => {
|
|
176
176
|
},
|
|
@@ -323,7 +323,7 @@ class U {
|
|
|
323
323
|
this.getScrollOffset(),
|
|
324
324
|
this.options.lanes
|
|
325
325
|
],
|
|
326
|
-
(e, s, t, n) => this.range = e.length > 0 && s > 0 ?
|
|
326
|
+
(e, s, t, n) => this.range = e.length > 0 && s > 0 ? U({
|
|
327
327
|
measurements: e,
|
|
328
328
|
outerSize: s,
|
|
329
329
|
scrollOffset: t,
|
|
@@ -531,7 +531,7 @@ const _ = (r, l, e, s) => {
|
|
|
531
531
|
}
|
|
532
532
|
return r > 0 ? r - 1 : 0;
|
|
533
533
|
};
|
|
534
|
-
function
|
|
534
|
+
function U({
|
|
535
535
|
measurements: r,
|
|
536
536
|
outerSize: l,
|
|
537
537
|
scrollOffset: e,
|
|
@@ -579,7 +579,7 @@ function K({
|
|
|
579
579
|
r && o ? N(e) : e(), (i = l.onChange) == null || i.call(l, n, o);
|
|
580
580
|
}
|
|
581
581
|
}, [t] = w.useState(
|
|
582
|
-
() => new
|
|
582
|
+
() => new q(s)
|
|
583
583
|
);
|
|
584
584
|
return t.setOptions(s), A(() => t._didMount(), []), A(() => t._willUpdate()), t;
|
|
585
585
|
}
|
|
@@ -591,8 +591,8 @@ function G(r) {
|
|
|
591
591
|
...r
|
|
592
592
|
});
|
|
593
593
|
}
|
|
594
|
-
const X = 5, Y = 0
|
|
595
|
-
function
|
|
594
|
+
const X = 5, Y = 0;
|
|
595
|
+
function J(r, l) {
|
|
596
596
|
if (l <= 0)
|
|
597
597
|
throw new Error(`chunkArray: size must be positive, received ${l}`);
|
|
598
598
|
const e = [];
|
|
@@ -600,7 +600,7 @@ function Q(r, l) {
|
|
|
600
600
|
e.push(r.slice(s, s + l));
|
|
601
601
|
return e;
|
|
602
602
|
}
|
|
603
|
-
function
|
|
603
|
+
function te({
|
|
604
604
|
items: r,
|
|
605
605
|
columns: l,
|
|
606
606
|
parentRef: e,
|
|
@@ -609,13 +609,13 @@ function se({
|
|
|
609
609
|
getItemKey: n,
|
|
610
610
|
overscan: o = X,
|
|
611
611
|
rowGapPx: i = Y,
|
|
612
|
-
gridClassName: h =
|
|
612
|
+
gridClassName: h = "grid grid-cols-1 gap-4"
|
|
613
613
|
}) {
|
|
614
614
|
if (l <= 0)
|
|
615
615
|
throw new Error(
|
|
616
616
|
`VirtualizedGrid: columns must be positive, received ${l}`
|
|
617
617
|
);
|
|
618
|
-
const u = F(null), [c, v] =
|
|
618
|
+
const u = F(null), [c, v] = k(0);
|
|
619
619
|
T(() => {
|
|
620
620
|
const m = u.current, p = e.current;
|
|
621
621
|
if (!(m && p))
|
|
@@ -628,7 +628,7 @@ function se({
|
|
|
628
628
|
const E = new ResizeObserver(d);
|
|
629
629
|
return E.observe(m), E.observe(p), () => E.disconnect();
|
|
630
630
|
}, [e]);
|
|
631
|
-
const a =
|
|
631
|
+
const a = D(() => J(r, l).map(
|
|
632
632
|
(p, d) => p.map((E, S) => ({
|
|
633
633
|
item: E,
|
|
634
634
|
index: d * l + S
|
|
@@ -679,5 +679,5 @@ function se({
|
|
|
679
679
|
);
|
|
680
680
|
}
|
|
681
681
|
export {
|
|
682
|
-
|
|
682
|
+
te as VirtualizedGrid
|
|
683
683
|
};
|