@jchat/addon-sdk 1.0.0-alpha.4 → 1.0.0-alpha.6

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/ui.mjs ADDED
@@ -0,0 +1,2 @@
1
+ import { $ as DialogHeader, $n as SidebarRail, $t as PopoverDescription, A as Button, An as SheetHeader, At as Field, B as CardHeader, Bn as SidebarHeader, Bt as Label, C as AvatarFallback, Cn as SelectValue, Ct as DropdownMenuSeparator, D as AvatarWithStatusRing, Dn as SheetContent, Dt as DropdownMenuSubTrigger, E as AvatarImage, En as SheetClose, Et as DropdownMenuSubContent, F as Card, Fn as SidebarFooter, Ft as Icon, G as CollapsibleTrigger, Gn as SidebarMenuBadge, Gt as Message, H as Checkbox, Hn as SidebarInset, Ht as Marker, I as CardAction, In as SidebarGroup, It as IconProps, J as Dialog, Jn as SidebarMenuSkeleton, Jt as MessageFooter, K as ColorPicker, Kn as SidebarMenuButton, Kt as MessageAvatar, L as CardContent, Ln as SidebarGroupAction, Lt as Image, M as CalendarDayButton, Mn as SheetTrigger, Mt as FieldErrorProps, N as Captcha, Nn as Sidebar, Nt as FieldProps, O as Badge, On as SheetDescription, Ot as DropdownMenuTrigger, P as CaptchaProps, Pn as SidebarContent, Pt as GalleryItem, Q as DialogFooter, Qn as SidebarProvider, Qt as PopoverContent, R as CardDescription, Rn as SidebarGroupContent, Rt as ImageZoom, S as AvatarBadge, Sn as SelectTrigger, St as DropdownMenuRadioItem, T as AvatarGroupCount, Tn as Sheet, Tt as DropdownMenuSub, U as Collapsible, Un as SidebarMenu, Ut as MarkerContent, V as CardTitle, Vn as SidebarInput, Vt as Loader, W as CollapsibleContent, Wn as SidebarMenuAction, Wt as MarkerIcon, X as DialogContent, Xn as SidebarMenuSubButton, Xt as MessageHeader, Y as DialogClose, Yn as SidebarMenuSub, Yt as MessageGroup, Z as DialogDescription, Zn as SidebarMenuSubItem, Zt as Popover, _ as AnimatedBackground, _n as SelectItem, _r as cn, _t as DropdownMenuGroup, a as AlertDialog, an as ResponsiveDialogClose, ar as Switch, at as DrawerClose, b as AppearancePicker, bn as SelectScrollUpButton, br as useSidebar, bt as DropdownMenuPortal, c as AlertDialogContent, cn as ResponsiveDialogFooter, cr as TabsList, ct as DrawerFooter, d as AlertDialogHeader, dn as ResponsiveDialogTrigger, dr as Tooltip, dt as DrawerPortal, en as PopoverHeader, er as SidebarSeparator, et as DialogOverlay, f as AlertDialogMedia, fn as ScrollArea, fr as TooltipContent, ft as DrawerTitle, g as AlertDialogTrigger, gn as SelectGroup, gr as buttonVariants, gt as DropdownMenuContent, h as AlertDialogTitle, hn as SelectContent, hr as badgeVariants, ht as DropdownMenuCheckboxItem, i as AccordionTrigger, in as ResponsiveDialogBody, ir as StarRating, it as Drawer, j as Calendar, jn as SheetTitle, jt as FieldError, k as BadgeIcon, kn as SheetFooter, kt as DynamicFontLoader, l as AlertDialogDescription, ln as ResponsiveDialogHeader, lr as TabsTrigger, lt as DrawerHeader, m as AlertDialogPortal, mn as Select, mr as TooltipTrigger, mt as DropdownMenu, n as AccordionContent, nn as PopoverTrigger, nr as Skeleton, nt as DialogTitle, o as AlertDialogAction, on as ResponsiveDialogContent, or as Tabs, ot as DrawerContent, p as AlertDialogOverlay, pn as ScrollBar, pr as TooltipProvider, pt as DrawerTrigger, q as ConfirmDialog, qn as SidebarMenuItem, qt as MessageContent, r as AccordionItem, rn as ResponsiveDialog, rr as Slider, rt as DialogTrigger, s as AlertDialogCancel, sn as ResponsiveDialogDescription, sr as TabsContent, st as DrawerDescription, t as Accordion, tn as PopoverTitle, tr as SidebarTrigger, tt as DialogPortal, u as AlertDialogFooter, un as ResponsiveDialogTitle, ur as Textarea, ut as DrawerOverlay, v as AnimatedBackgroundProps, vn as SelectLabel, vr as markerVariants, vt as DropdownMenuItem, w as AvatarGroup, wn as Separator, wt as DropdownMenuShortcut, x as Avatar, xn as SelectSeparator, xt as DropdownMenuRadioGroup, y as Appearance, yn as SelectScrollDownButton, yr as tabsListVariants, yt as DropdownMenuLabel, z as CardFooter, zn as SidebarGroupLabel, zt as Input } from "./ui.d.mts";
2
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AnimatedBackground, AnimatedBackgroundProps, Appearance, AppearancePicker, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, AvatarWithStatusRing, Badge, BadgeIcon, Button, Calendar, CalendarDayButton, Captcha, CaptchaProps, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, ColorPicker, ConfirmDialog, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, DynamicFontLoader, Field, FieldError, FieldErrorProps, FieldProps, GalleryItem, Icon, IconProps, Image, ImageZoom, Input, Label, Loader, Marker, MarkerContent, MarkerIcon, Message, MessageAvatar, MessageContent, MessageFooter, MessageGroup, MessageHeader, Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, ResponsiveDialog, ResponsiveDialogBody, ResponsiveDialogClose, ResponsiveDialogContent, ResponsiveDialogDescription, ResponsiveDialogFooter, ResponsiveDialogHeader, ResponsiveDialogTitle, ResponsiveDialogTrigger, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, 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, Slider, StarRating, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonVariants, cn, markerVariants, tabsListVariants, useSidebar };
package/dist/ui2.d.mts ADDED
@@ -0,0 +1,2 @@
1
+ import { $ as DialogHeader, $n as SidebarRail, $t as PopoverDescription, A as Button, An as SheetHeader, At as Field, B as CardHeader, Bn as SidebarHeader, Bt as Label, C as AvatarFallback, Cn as SelectValue, Ct as DropdownMenuSeparator, D as AvatarWithStatusRing, Dn as SheetContent, Dt as DropdownMenuSubTrigger, E as AvatarImage, En as SheetClose, Et as DropdownMenuSubContent, F as Card, Fn as SidebarFooter, Ft as Icon, G as CollapsibleTrigger, Gn as SidebarMenuBadge, Gt as Message, H as Checkbox, Hn as SidebarInset, Ht as Marker, I as CardAction, In as SidebarGroup, It as IconProps, J as Dialog, Jn as SidebarMenuSkeleton, Jt as MessageFooter, K as ColorPicker, Kn as SidebarMenuButton, Kt as MessageAvatar, L as CardContent, Ln as SidebarGroupAction, Lt as Image, M as CalendarDayButton, Mn as SheetTrigger, Mt as FieldErrorProps, N as Captcha, Nn as Sidebar, Nt as FieldProps, O as Badge, On as SheetDescription, Ot as DropdownMenuTrigger, P as CaptchaProps, Pn as SidebarContent, Pt as GalleryItem, Q as DialogFooter, Qn as SidebarProvider, Qt as PopoverContent, R as CardDescription, Rn as SidebarGroupContent, Rt as ImageZoom, S as AvatarBadge, Sn as SelectTrigger, St as DropdownMenuRadioItem, T as AvatarGroupCount, Tn as Sheet, Tt as DropdownMenuSub, U as Collapsible, Un as SidebarMenu, Ut as MarkerContent, V as CardTitle, Vn as SidebarInput, Vt as Loader, W as CollapsibleContent, Wn as SidebarMenuAction, Wt as MarkerIcon, X as DialogContent, Xn as SidebarMenuSubButton, Xt as MessageHeader, Y as DialogClose, Yn as SidebarMenuSub, Yt as MessageGroup, Z as DialogDescription, Zn as SidebarMenuSubItem, Zt as Popover, _ as AnimatedBackground, _n as SelectItem, _r as cn, _t as DropdownMenuGroup, a as AlertDialog, an as ResponsiveDialogClose, ar as Switch, at as DrawerClose, b as AppearancePicker, bn as SelectScrollUpButton, br as useSidebar, bt as DropdownMenuPortal, c as AlertDialogContent, cn as ResponsiveDialogFooter, cr as TabsList, ct as DrawerFooter, d as AlertDialogHeader, dn as ResponsiveDialogTrigger, dr as Tooltip, dt as DrawerPortal, en as PopoverHeader, er as SidebarSeparator, et as DialogOverlay, f as AlertDialogMedia, fn as ScrollArea, fr as TooltipContent, ft as DrawerTitle, g as AlertDialogTrigger, gn as SelectGroup, gr as buttonVariants, gt as DropdownMenuContent, h as AlertDialogTitle, hn as SelectContent, hr as badgeVariants, ht as DropdownMenuCheckboxItem, i as AccordionTrigger, in as ResponsiveDialogBody, ir as StarRating, it as Drawer, j as Calendar, jn as SheetTitle, jt as FieldError, k as BadgeIcon, kn as SheetFooter, kt as DynamicFontLoader, l as AlertDialogDescription, ln as ResponsiveDialogHeader, lr as TabsTrigger, lt as DrawerHeader, m as AlertDialogPortal, mn as Select, mr as TooltipTrigger, mt as DropdownMenu, n as AccordionContent, nn as PopoverTrigger, nr as Skeleton, nt as DialogTitle, o as AlertDialogAction, on as ResponsiveDialogContent, or as Tabs, ot as DrawerContent, p as AlertDialogOverlay, pn as ScrollBar, pr as TooltipProvider, pt as DrawerTrigger, q as ConfirmDialog, qn as SidebarMenuItem, qt as MessageContent, r as AccordionItem, rn as ResponsiveDialog, rr as Slider, rt as DialogTrigger, s as AlertDialogCancel, sn as ResponsiveDialogDescription, sr as TabsContent, st as DrawerDescription, t as Accordion, tn as PopoverTitle, tr as SidebarTrigger, tt as DialogPortal, u as AlertDialogFooter, un as ResponsiveDialogTitle, ur as Textarea, ut as DrawerOverlay, v as AnimatedBackgroundProps, vn as SelectLabel, vr as markerVariants, vt as DropdownMenuItem, w as AvatarGroup, wn as Separator, wt as DropdownMenuShortcut, x as Avatar, xn as SelectSeparator, xt as DropdownMenuRadioGroup, y as Appearance, yn as SelectScrollDownButton, yr as tabsListVariants, yt as DropdownMenuLabel, z as CardFooter, zn as SidebarGroupLabel, zt as Input } from "./ui.mjs";
2
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AnimatedBackground, AnimatedBackgroundProps, Appearance, AppearancePicker, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, AvatarWithStatusRing, Badge, BadgeIcon, Button, Calendar, CalendarDayButton, Captcha, CaptchaProps, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, ColorPicker, ConfirmDialog, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, DynamicFontLoader, Field, FieldError, FieldErrorProps, FieldProps, GalleryItem, Icon, IconProps, Image, ImageZoom, Input, Label, Loader, Marker, MarkerContent, MarkerIcon, Message, MessageAvatar, MessageContent, MessageFooter, MessageGroup, MessageHeader, Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, ResponsiveDialog, ResponsiveDialogBody, ResponsiveDialogClose, ResponsiveDialogContent, ResponsiveDialogDescription, ResponsiveDialogFooter, ResponsiveDialogHeader, ResponsiveDialogTitle, ResponsiveDialogTrigger, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, 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, Slider, StarRating, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonVariants, cn, markerVariants, tabsListVariants, useSidebar };
package/dist/vite.d.mts CHANGED
@@ -28,6 +28,8 @@ declare function jchatAddon(options: JchatAddonPluginOptions): Plugin;
28
28
  interface JchatAddonPluginOptions {
29
29
  /** The base manifest specification for the addon. */
30
30
  manifest: AddonManifest;
31
+ /** Explicitly declare development mode to permit unsigned database-bearing builds. */
32
+ development?: boolean;
31
33
  /**
32
34
  * Whether to package the build output into a `.zip` archive upon build completion. Defaults to
33
35
  * `true` during production builds and `false` during development builds.
package/dist/vite.mjs CHANGED
@@ -36,7 +36,7 @@ function jchatAddon(options) {
36
36
  return { define: { "process.env.NODE_ENV": JSON.stringify(env.mode || "production") } };
37
37
  },
38
38
  configResolved(config) {
39
- developmentBuild = config.mode === "development";
39
+ developmentBuild = options.development ?? (config.mode === "development" || process.env.JCHAT_ADDON_DEV === "true" || process.env.NODE_ENV === "development");
40
40
  if (shouldZip === void 0) shouldZip = config.mode === "production";
41
41
  },
42
42
  async writeBundle() {
@@ -164,7 +164,7 @@ function signAddonManifest(manifest, files, privateKey) {
164
164
  }
165
165
  };
166
166
  const hash = crypto.createHash("sha256");
167
- for (const file of [...files].sort((a, b) => a.path.localeCompare(b.path))) {
167
+ for (const file of [...files].toSorted((a, b) => a.path.localeCompare(b.path))) {
168
168
  hash.update(file.path);
169
169
  hash.update("\0");
170
170
  hash.update(file.path === "manifest.json" ? stableStringify(unsigned) : file.contents);
@@ -225,12 +225,12 @@ function embedCssIntoBundle(buildDir, addonId) {
225
225
  fs.unlinkSync(cssPath);
226
226
  } catch {}
227
227
  }
228
+ function sortValue(child) {
229
+ if (Array.isArray(child)) return child.map(sortValue);
230
+ if (child && typeof child === "object") return Object.fromEntries(Object.entries(child).toSorted(([left], [right]) => left.localeCompare(right)).map(([key, nested]) => [key, sortValue(nested)]));
231
+ return child;
232
+ }
228
233
  function stableStringify(value) {
229
- const sortValue = (child) => {
230
- if (Array.isArray(child)) return child.map(sortValue);
231
- if (child && typeof child === "object") return Object.fromEntries(Object.entries(child).sort(([left], [right]) => left.localeCompare(right)).map(([key, nested]) => [key, sortValue(nested)]));
232
- return child;
233
- };
234
234
  return JSON.stringify(sortValue(value));
235
235
  }
236
236
  //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jchat/addon-sdk",
3
- "version": "1.0.0-alpha.4",
3
+ "version": "1.0.0-alpha.6",
4
4
  "private": false,
5
5
  "keywords": [
6
6
  "addon",
@@ -37,6 +37,15 @@
37
37
  "./vite": {
38
38
  "types": "./dist/vite.d.mts",
39
39
  "import": "./dist/vite.mjs"
40
+ },
41
+ "./ui": {
42
+ "types": "./dist/ui.d.mts",
43
+ "import": "./dist/ui.mjs"
44
+ },
45
+ "./ui/tailwind.css": {
46
+ "style": "./src/tailwind.css",
47
+ "import": "./src/tailwind.css",
48
+ "default": "./src/tailwind.css"
40
49
  }
41
50
  },
42
51
  "publishConfig": {
@@ -51,6 +60,7 @@
51
60
  },
52
61
  "devDependencies": {
53
62
  "@jchat/icon": "workspace:*",
63
+ "@jchat/ui": "workspace:*",
54
64
  "@types/react": "catalog:",
55
65
  "elysia": "catalog:",
56
66
  "kysely": "^catalog:",