@yimingliao/cms 0.0.113 → 0.0.115

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.
@@ -9,8 +9,8 @@ import * as React$1 from 'react';
9
9
  import { HTMLAttributes, ReactNode, JSX, ComponentProps, InputHTMLAttributes, Dispatch, SetStateAction } from 'react';
10
10
  import { c as createVerifyAction, a as createSignOutAction, b as createSignInAction, d as createVerifyEmailAction, e as createEmailUnverifiedAction, f as createForgotPasswordAction, g as createResetPasswordAction, h as createChangePasswordAction } from '../create-reset-password-action-C-B3uh5m.js';
11
11
  import { LucideIcon } from 'lucide-react';
12
- import { S as Sidebar, B as ButtonProps$1, L as LabelProps } from '../sidebar-BlYl83Yl.js';
13
- export { a as SidebarContent, b as SidebarInset, c as SidebarProvider, u as useSidebar } from '../sidebar-BlYl83Yl.js';
12
+ import { B as ButtonProps$1, L as LabelProps } from '../sidebar-BlYl83Yl.js';
13
+ export { S as Sidebar, a as SidebarContent, b as SidebarInset, c as SidebarProvider, u as useSidebar } from '../sidebar-BlYl83Yl.js';
14
14
  import { U as UIStates, F as FormData, a as FormFieldController } from '../types-BUmWwzpD.js';
15
15
  import { ClassValue } from 'clsx';
16
16
  import 'zod';
@@ -346,7 +346,7 @@ interface ContentContainerProps extends HTMLAttributes<HTMLDivElement> {
346
346
  }
347
347
  declare function ContentContainer({ className, children, isNotFound, isFixHeight, ...props }: ContentContainerProps): react_jsx_runtime.JSX.Element;
348
348
 
349
- declare function ContentSkeleton(): react_jsx_runtime.JSX.Element;
349
+ declare function LayoutSkeleton(): react_jsx_runtime.JSX.Element;
350
350
 
351
351
  interface NavItem {
352
352
  icon?: LucideIcon;
@@ -359,8 +359,6 @@ declare function NavMain({ items }: {
359
359
  items: NavItem[];
360
360
  }): react_jsx_runtime.JSX.Element;
361
361
 
362
- declare function SidebarSkeleton({ ...props }: React$1.ComponentProps<typeof Sidebar>): react_jsx_runtime.JSX.Element;
363
-
364
362
  declare function createNavbar({ webUrl, storageUrl, I18nSelector, SignOutButton, }: {
365
363
  webUrl: string;
366
364
  storageUrl: string;
@@ -585,8 +583,12 @@ declare function createChangePasswordPage({ useCommand, changePasswordAction, }:
585
583
  changePasswordAction: ReturnType<typeof createChangePasswordAction>;
586
584
  }): () => react_jsx_runtime.JSX.Element;
587
585
 
586
+ declare const NAVBAR_HEIGHT = 60;
587
+ declare const SIDEBAR_WIDTH = 288;
588
+ declare const PAGE_HEADER_HEIGHT = 56;
589
+
588
590
  declare const cn: (...inputs: ClassValue[]) => string;
589
591
 
590
592
  declare function useDeviceInfo(): DeviceInfo | null;
591
593
 
592
- export { AdminProvider, ArrayInput, Button, type ButtonProps, Checkbox, ContentContainer, ContentSkeleton, ControlFields, type ControlMeta, Field, FieldBody, FieldsContainer, Form, IndexField, Input, type InputProps, MainFields, type NavItem, NavMain, PageHeader, PasswordInput, ReturnButton, SearchInput, type ShowToastOption, SideFields, Sidebar, SidebarSkeleton, SlugField, Textarea, ThemeProvider, cn, createAdminInitializer, createChangePasswordPage, createEmailUnverifiedPage, createForgotPasswordPage, createI18nSelector, createNavbar, createRequestInterceptor, createResetPasswordPage, createResponseInterceptor, createSignInPage, createSignOutButton, createSmartFetch, createUseCommand, createUseQuery, createVerifyEmailPage, handleToast, useAdmin, useDeviceInfo };
594
+ export { AdminProvider, ArrayInput, Button, type ButtonProps, Checkbox, ContentContainer, LayoutSkeleton as ContentSkeleton, ControlFields, type ControlMeta, Field, FieldBody, FieldsContainer, Form, IndexField, Input, type InputProps, MainFields, NAVBAR_HEIGHT, type NavItem, NavMain, PAGE_HEADER_HEIGHT, PageHeader, PasswordInput, ReturnButton, SIDEBAR_WIDTH, SearchInput, type ShowToastOption, SideFields, SlugField, Textarea, ThemeProvider, cn, createAdminInitializer, createChangePasswordPage, createEmailUnverifiedPage, createForgotPasswordPage, createI18nSelector, createNavbar, createRequestInterceptor, createResetPasswordPage, createResponseInterceptor, createSignInPage, createSignOutButton, createSmartFetch, createUseCommand, createUseQuery, createVerifyEmailPage, handleToast, useAdmin, useDeviceInfo };
@@ -1,5 +1,5 @@
1
- import { cn, useSidebar, SidebarMenuSkeleton, SidebarInset, SIDEBAR_WIDTH, Skeleton, SidebarGroup, SidebarMenu, Collapsible, SidebarMenuItem, SidebarMenuButton, Separator, CollapsibleTrigger, SidebarMenuAction, CollapsibleContent, SidebarMenuSub, SidebarMenuSubItem, SidebarMenuSubButton, Sidebar, Button, Spinner, useParentPathname, DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, PAGE_HEADER_HEIGHT, Label, FORM_MIDDLE_GAP_WIDTH, FORM_SIDE_FIELDS_WIDTH, InputGroup, InputGroupAddon, InputGroupInput, InputGroupButton, Textarea, Card, useDeviceInfo, CardHeader, CardTitle, CardContent, useCountdown, CardDescription, NAVBAR_HEIGHT, isConfirm, Avatar, AvatarImage, AvatarFallback, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuGroup } from '../chunk-Q654SMCX.js';
2
- export { Sidebar, SidebarContent, SidebarInset, SidebarProvider, cn, useDeviceInfo, useSidebar } from '../chunk-Q654SMCX.js';
1
+ import { cn, useSidebar, Sidebar, Skeleton, SidebarInset, SIDEBAR_WIDTH, SidebarGroup, SidebarMenu, Collapsible, SidebarMenuItem, SidebarMenuButton, Separator, CollapsibleTrigger, SidebarMenuAction, CollapsibleContent, SidebarMenuSub, SidebarMenuSubItem, SidebarMenuSubButton, Button, Spinner, useParentPathname, DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, PAGE_HEADER_HEIGHT, Label, FORM_MIDDLE_GAP_WIDTH, FORM_SIDE_FIELDS_WIDTH, InputGroup, InputGroupAddon, InputGroupInput, InputGroupButton, Textarea, Card, useDeviceInfo, CardHeader, CardTitle, CardContent, useCountdown, CardDescription, NAVBAR_HEIGHT, isConfirm, Avatar, AvatarImage, AvatarFallback, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuGroup } from '../chunk-WU47KNJR.js';
2
+ export { NAVBAR_HEIGHT, PAGE_HEADER_HEIGHT, SIDEBAR_WIDTH, Sidebar, SidebarContent, SidebarInset, SidebarProvider, cn, useDeviceInfo, useSidebar } from '../chunk-WU47KNJR.js';
3
3
  import { ensureArray, findTranslation, joinUrl } from '../chunk-VSV6SQWC.js';
4
4
  import { toast } from 'sonner';
5
5
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
@@ -285,10 +285,15 @@ function ContentContainer({
285
285
  }
286
286
  );
287
287
  }
288
- function ContentSkeleton() {
288
+ function LayoutSkeleton() {
289
289
  const { open } = useSidebar();
290
290
  return /* @__PURE__ */ jsxs("div", { className: "flex flex-1", children: [
291
- /* @__PURE__ */ jsx(SidebarMenuSkeleton, {}),
291
+ /* @__PURE__ */ jsx(Sidebar, { className: "top-(--header-height) h-[calc(100svh-var(--header-height))]!", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2 p-3", children: [
292
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-10 w-full" }),
293
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-10 w-full" }),
294
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-10 w-full" }),
295
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-10 w-full" })
296
+ ] }) }),
292
297
  /* @__PURE__ */ jsx(
293
298
  SidebarInset,
294
299
  {
@@ -377,23 +382,6 @@ function NavMain({ items }) {
377
382
  );
378
383
  }) }) });
379
384
  }
380
- function SidebarSkeleton({
381
- ...props
382
- }) {
383
- return /* @__PURE__ */ jsx(
384
- Sidebar,
385
- {
386
- className: "top-(--header-height) h-[calc(100svh-var(--header-height))]!",
387
- ...props,
388
- children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2 p-3", children: [
389
- /* @__PURE__ */ jsx(Skeleton, { className: "h-10 w-full" }),
390
- /* @__PURE__ */ jsx(Skeleton, { className: "h-10 w-full" }),
391
- /* @__PURE__ */ jsx(Skeleton, { className: "h-10 w-full" }),
392
- /* @__PURE__ */ jsx(Skeleton, { className: "h-10 w-full" })
393
- ] })
394
- }
395
- );
396
- }
397
385
 
398
386
  // src/constants/keys/auth.ts
399
387
  var AUTH_KEYS = {
@@ -653,7 +641,7 @@ function createNavbar({
653
641
  children: /* @__PURE__ */ jsx(SidebarIcon, {})
654
642
  }
655
643
  ),
656
- /* @__PURE__ */ jsx(Separator, { orientation: "vertical", className: "mr-2 h-4" }),
644
+ /* @__PURE__ */ jsx(Separator, { orientation: "vertical", className: "mr-1 h-4" }),
657
645
  /* @__PURE__ */ jsx(
658
646
  Button2,
659
647
  {
@@ -2330,4 +2318,4 @@ function createChangePasswordPage({
2330
2318
  };
2331
2319
  }
2332
2320
 
2333
- export { AdminProvider, ArrayInput, Button2 as Button, Checkbox, ContentContainer, ContentSkeleton, ControlFields, Field, FieldBody, FieldsContainer, Form, IndexField, Input, MainFields, NavMain, PageHeader, PasswordInput, ReturnButton, SearchInput, SideFields, SidebarSkeleton, SlugField, Textarea2 as Textarea, ThemeProvider, createAdminInitializer, createChangePasswordPage, createEmailUnverifiedPage, createForgotPasswordPage, createI18nSelector, createNavbar, createRequestInterceptor, createResetPasswordPage, createResponseInterceptor, createSignInPage, createSignOutButton, createSmartFetch, createUseCommand, createUseQuery, createVerifyEmailPage, handleToast, useAdmin };
2321
+ export { AdminProvider, ArrayInput, Button2 as Button, Checkbox, ContentContainer, LayoutSkeleton as ContentSkeleton, ControlFields, Field, FieldBody, FieldsContainer, Form, IndexField, Input, MainFields, NavMain, PageHeader, PasswordInput, ReturnButton, SearchInput, SideFields, SlugField, Textarea2 as Textarea, ThemeProvider, createAdminInitializer, createChangePasswordPage, createEmailUnverifiedPage, createForgotPasswordPage, createI18nSelector, createNavbar, createRequestInterceptor, createResetPasswordPage, createResponseInterceptor, createSignInPage, createSignOutButton, createSmartFetch, createUseCommand, createUseQuery, createVerifyEmailPage, handleToast, useAdmin };
@@ -1 +1 @@
1
- export { Avatar, AvatarFallback, AvatarImage, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Collapsible, CollapsibleContent, CollapsibleTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, Label, SIDEBAR_COOKIE_NAME, 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, Spinner, Textarea, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, useSidebar } from '../../chunk-Q654SMCX.js';
1
+ export { Avatar, AvatarFallback, AvatarImage, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Collapsible, CollapsibleContent, CollapsibleTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, Label, SIDEBAR_COOKIE_NAME, 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, Spinner, Textarea, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, useSidebar } from '../../chunk-WU47KNJR.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yimingliao/cms",
3
- "version": "0.0.113",
3
+ "version": "0.0.115",
4
4
  "author": "Yiming Liao",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -98,6 +98,13 @@ var useIsMobile = () => {
98
98
  }, []);
99
99
  return !!isMobile;
100
100
  };
101
+
102
+ // src/client/interfaces/styles/constants.ts
103
+ var NAVBAR_HEIGHT = 60;
104
+ var SIDEBAR_WIDTH = 288;
105
+ var PAGE_HEADER_HEIGHT = 56;
106
+ var FORM_SIDE_FIELDS_WIDTH = 320;
107
+ var FORM_MIDDLE_GAP_WIDTH = 24;
101
108
  var buttonVariants = cva(
102
109
  "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
103
110
  {
@@ -607,13 +614,6 @@ function TooltipContent({
607
614
  }
608
615
  ) });
609
616
  }
610
-
611
- // src/client/interfaces/styles/constants.ts
612
- var NAVBAR_HEIGHT = 60;
613
- var SIDEBAR_WIDTH = 288;
614
- var PAGE_HEADER_HEIGHT = 56;
615
- var FORM_SIDE_FIELDS_WIDTH = 320;
616
- var FORM_MIDDLE_GAP_WIDTH = 24;
617
617
  var SIDEBAR_COOKIE_NAME = "sidebar_state";
618
618
  var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
619
619
  var SIDEBAR_WIDTH_MOBILE = "18rem";