UNPKG

@blocknote/shadcn

Version:

A "Notion-style" block-based extensible text editor built on top of Prosemirror and Tiptap.

1 lines 141 kB
{"version":3,"file":"blocknote-shadcn.cjs","names":[],"sources":["../src/form/Form.tsx","../src/lib/utils.ts","../src/components/ui/avatar.tsx","../src/components/ui/badge.tsx","../src/components/ui/button.tsx","../src/components/ui/card.tsx","../src/components/ui/dropdown-menu.tsx","../src/components/ui/input.tsx","../src/components/ui/label.tsx","../src/components/ui/popover.tsx","../src/components/ui/select.tsx","../src/components/ui/skeleton.tsx","../src/components/ui/tabs.tsx","../src/components/ui/toggle.tsx","../src/components/ui/tooltip.tsx","../src/ShadCNComponentsContext.tsx","../src/form/TextInput.tsx","../src/lib/preventFocusOnOpen.ts","../src/menu/Menu.tsx","../src/menu/Button.tsx","../src/panel/Panel.tsx","../src/panel/PanelTab.tsx","../src/panel/PanelTextInput.tsx","../src/popover/popover.tsx","../src/sideMenu/SideMenu.tsx","../src/sideMenu/SideMenuButton.tsx","../src/suggestionMenu/gridSuggestionMenu/GridSuggestionMenu.tsx","../src/suggestionMenu/gridSuggestionMenu/GridSuggestionMenuEmptyItem.tsx","../src/suggestionMenu/SuggestionMenu.tsx","../src/suggestionMenu/SuggestionMenuEmptyItem.tsx","../src/suggestionMenu/SuggestionMenuItem.tsx","../src/suggestionMenu/SuggestionMenuLabel.tsx","../src/suggestionMenu/SuggestionMenuLoader.tsx","../src/attributionMarks/AttributionTooltip.tsx","../src/tableHandle/ExtendButton.tsx","../src/tableHandle/TableHandle.tsx","../src/toolbar/Toolbar.tsx","../src/comments/Card.tsx","../src/comments/Comment.tsx","../src/comments/Editor.tsx","../src/badge/Badge.tsx","../src/versioning/Versioning.tsx","../src/panel/PanelButton.tsx","../src/panel/PanelFileInput.tsx","../src/suggestionMenu/gridSuggestionMenu/GridSuggestionMenuItem.tsx","../src/suggestionMenu/gridSuggestionMenu/GridSuggestionMenuLoader.tsx","../src/components.ts","../src/BlockNoteView.tsx"],"sourcesContent":["import { assertEmpty } from \"@blocknote/core\";\nimport { ComponentProps } from \"@blocknote/react\";\n\nexport const Form = (props: ComponentProps[\"Generic\"][\"Form\"][\"Root\"]) => {\n  const { children, onSubmit, submitButton, ...rest } = props;\n\n  assertEmpty(rest);\n\n  return (\n    <form\n      className={\"bn-form\"}\n      onSubmit={(event) => {\n        // These forms have no action — a real submission would navigate.\n        event.preventDefault();\n        onSubmit?.();\n      }}\n    >\n      {children}\n      {submitButton === \"none\" ? null : submitButton}\n    </form>\n  );\n};\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n  return twMerge(clsx(inputs));\n}\n","import * as React from \"react\";\nimport { Avatar as AvatarPrimitive } from \"@base-ui/react/avatar\";\n\n// Manual change from the shadcn CLI output: relative import instead of the\n// CLI's \"@/lib/utils\" alias (not resolvable when consumed from source).\nimport { cn } from \"../../lib/utils\";\n\nfunction Avatar({\n  className,\n  size = \"default\",\n  ...props\n}: AvatarPrimitive.Root.Props & {\n  size?: \"default\" | \"sm\" | \"lg\";\n}) {\n  return (\n    <AvatarPrimitive.Root\n      data-slot=\"avatar\"\n      data-size={size}\n      className={cn(\n        \"group/avatar relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:border-border after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten\",\n        className,\n      )}\n      {...props}\n    />\n  );\n}\n\nfunction AvatarImage({ className, ...props }: AvatarPrimitive.Image.Props) {\n  return (\n    <AvatarPrimitive.Image\n      data-slot=\"avatar-image\"\n      className={cn(\n        \"aspect-square size-full rounded-full object-cover\",\n        className,\n      )}\n      {...props}\n    />\n  );\n}\n\nfunction AvatarFallback({\n  className,\n  ...props\n}: AvatarPrimitive.Fallback.Props) {\n  return (\n    <AvatarPrimitive.Fallback\n      data-slot=\"avatar-fallback\"\n      className={cn(\n        \"flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs\",\n        className,\n      )}\n      {...props}\n    />\n  );\n}\n\nfunction AvatarBadge({ className, ...props }: React.ComponentProps<\"span\">) {\n  return (\n    <span\n      data-slot=\"avatar-badge\"\n      className={cn(\n        \"absolute right-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full bg-primary text-primary-foreground bg-blend-color ring-2 ring-background select-none\",\n        \"group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden\",\n        \"group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2\",\n        \"group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2\",\n        className,\n      )}\n      {...props}\n    />\n  );\n}\n\nfunction AvatarGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n  return (\n    <div\n      data-slot=\"avatar-group\"\n      className={cn(\n        \"group/avatar-group flex -space-x-2 *:data-[slot=avatar]:ring-2 *:data-[slot=avatar]:ring-background\",\n        className,\n      )}\n      {...props}\n    />\n  );\n}\n\nfunction AvatarGroupCount({\n  className,\n  ...props\n}: React.ComponentProps<\"div\">) {\n  return (\n    <div\n      data-slot=\"avatar-group-count\"\n      className={cn(\n        \"relative flex size-8 shrink-0 items-center justify-center rounded-full bg-muted text-sm text-muted-foreground ring-2 ring-background group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=sm]/avatar-group:size-6 [&>svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3\",\n        className,\n      )}\n      {...props}\n    />\n  );\n}\n\nexport {\n  Avatar,\n  AvatarImage,\n  AvatarFallback,\n  AvatarGroup,\n  AvatarGroupCount,\n  AvatarBadge,\n};\n","import { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\n// Manual change from the shadcn CLI output: relative import instead of the\n// CLI's \"@/lib/utils\" alias (not resolvable when consumed from source).\nimport { cn } from \"../../lib/utils\";\n\nconst badgeVariants = cva(\n  \"group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!\",\n  {\n    variants: {\n      variant: {\n        default: \"bg-primary text-primary-foreground [a]:hover:bg-primary/80\",\n        secondary:\n          \"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80\",\n        destructive:\n          \"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20\",\n        outline:\n          \"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground\",\n        ghost:\n          \"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50\",\n        link: \"text-primary underline-offset-4 hover:underline\",\n      },\n    },\n    defaultVariants: {\n      variant: \"default\",\n    },\n  },\n);\n\nfunction Badge({\n  className,\n  variant = \"default\",\n  render,\n  ...props\n}: useRender.ComponentProps<\"span\"> & VariantProps<typeof badgeVariants>) {\n  return useRender({\n    defaultTagName: \"span\",\n    props: mergeProps<\"span\">(\n      {\n        className: cn(badgeVariants({ variant }), className),\n      },\n      props,\n    ),\n    render,\n    state: {\n      slot: \"badge\",\n      variant,\n    },\n  });\n}\n\nexport { Badge, badgeVariants };\n","import { Button as ButtonPrimitive } from \"@base-ui/react/button\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\n// Manual change from the shadcn CLI output: relative import instead of the\n// CLI's \"@/lib/utils\" alias (not resolvable when consumed from source).\nimport { cn } from \"../../lib/utils\";\n\nconst buttonVariants = cva(\n  \"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\",\n  {\n    variants: {\n      variant: {\n        default: \"bg-primary text-primary-foreground hover:bg-primary/80\",\n        outline:\n          \"border-border bg-background shadow-xs hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50\",\n        secondary:\n          \"bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground\",\n        ghost:\n          \"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50\",\n        destructive:\n          \"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40\",\n        link: \"text-primary underline-offset-4 hover:underline\",\n      },\n      size: {\n        default:\n          \"h-9 gap-1.5 px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2\",\n        xs: \"h-6 gap-1 rounded-[min(var(--radius-md),8px)] px-2 text-xs in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3\",\n        sm: \"h-8 gap-1 rounded-[min(var(--radius-md),10px)] px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5\",\n        lg: \"h-10 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2\",\n        icon: \"size-9\",\n        \"icon-xs\":\n          \"size-6 rounded-[min(var(--radius-md),8px)] in-data-[slot=button-group]:rounded-md [&_svg:not([class*='size-'])]:size-3\",\n        \"icon-sm\":\n          \"size-8 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-md\",\n        \"icon-lg\": \"size-10\",\n      },\n    },\n    defaultVariants: {\n      variant: \"default\",\n      size: \"default\",\n    },\n  },\n);\n\nfunction Button({\n  className,\n  variant = \"default\",\n  size = \"default\",\n  ...props\n}: ButtonPrimitive.Props & VariantProps<typeof buttonVariants>) {\n  return (\n    <ButtonPrimitive\n      data-slot=\"button\"\n      className={cn(buttonVariants({ variant, size, className }))}\n      {...props}\n    />\n  );\n}\n\nexport { Button, buttonVariants };\n","import * as React from \"react\";\n\n// Manual change from the shadcn CLI output: relative import instead of the\n// CLI's \"@/lib/utils\" alias (not resolvable when consumed from source).\nimport { cn } from \"../../lib/utils\";\n\nfunction Card({\n  className,\n  size = \"default\",\n  ...props\n}: React.ComponentProps<\"div\"> & { size?: \"default\" | \"sm\" }) {\n  return (\n    <div\n      data-slot=\"card\"\n      data-size={size}\n      className={cn(\n        \"group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground shadow-xs ring-1 ring-foreground/10 [--card-spacing:--spacing(6)] has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(4)] *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl\",\n        className,\n      )}\n      {...props}\n    />\n  );\n}\n\nfunction CardHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n  return (\n    <div\n      data-slot=\"card-header\"\n      className={cn(\n        \"group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)\",\n        className,\n      )}\n      {...props}\n    />\n  );\n}\n\nfunction CardTitle({ className, ...props }: React.ComponentProps<\"div\">) {\n  return (\n    <div\n      data-slot=\"card-title\"\n      className={cn(\n        \"text-base leading-normal font-medium group-data-[size=sm]/card:text-sm\",\n        className,\n      )}\n      {...props}\n    />\n  );\n}\n\nfunction CardDescription({ className, ...props }: React.ComponentProps<\"div\">) {\n  return (\n    <div\n      data-slot=\"card-description\"\n      className={cn(\"text-sm text-muted-foreground\", className)}\n      {...props}\n    />\n  );\n}\n\nfunction CardAction({ className, ...props }: React.ComponentProps<\"div\">) {\n  return (\n    <div\n      data-slot=\"card-action\"\n      className={cn(\n        \"col-start-2 row-span-2 row-start-1 self-start justify-self-end\",\n        className,\n      )}\n      {...props}\n    />\n  );\n}\n\nfunction CardContent({ className, ...props }: React.ComponentProps<\"div\">) {\n  return (\n    <div\n      data-slot=\"card-content\"\n      className={cn(\"px-(--card-spacing)\", className)}\n      {...props}\n    />\n  );\n}\n\nfunction CardFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n  return (\n    <div\n      data-slot=\"card-footer\"\n      className={cn(\n        \"flex items-center rounded-b-xl px-(--card-spacing) [.border-t]:pt-(--card-spacing)\",\n        className,\n      )}\n      {...props}\n    />\n  );\n}\n\nexport {\n  Card,\n  CardHeader,\n  CardFooter,\n  CardTitle,\n  CardAction,\n  CardDescription,\n  CardContent,\n};\n","\"use client\";\n\nimport * as React from \"react\";\nimport { Menu as MenuPrimitive } from \"@base-ui/react/menu\";\n\n// Manual change from the shadcn CLI output: relative import instead of the\n// CLI's \"@/lib/utils\" alias (not resolvable when consumed from source).\nimport { cn } from \"../../lib/utils\";\nimport { ChevronRightIcon, CheckIcon } from \"lucide-react\";\n\nfunction DropdownMenu({ ...props }: MenuPrimitive.Root.Props) {\n  return <MenuPrimitive.Root data-slot=\"dropdown-menu\" {...props} />;\n}\n\nfunction DropdownMenuPortal({ ...props }: MenuPrimitive.Portal.Props) {\n  return <MenuPrimitive.Portal data-slot=\"dropdown-menu-portal\" {...props} />;\n}\n\nfunction DropdownMenuTrigger({ ...props }: MenuPrimitive.Trigger.Props) {\n  return <MenuPrimitive.Trigger data-slot=\"dropdown-menu-trigger\" {...props} />;\n}\n\n// Manual changes from the shadcn CLI output:\n// - Added a `container` prop (forwarded to the Base UI Portal) so BlockNote can\n//   portal the menu into the editor's portal element, which carries the\n//   light/dark color-scheme class.\n// - Removed the CLI's `w-(--anchor-width)` from the popup className so menus\n//   size to their content rather than the (icon-button) trigger width, which\n//   otherwise clamped them to `min-w-32` and wrapped long items.\nfunction DropdownMenuContent({\n  align = \"start\",\n  alignOffset = 0,\n  side = \"bottom\",\n  sideOffset = 4,\n  className,\n  container,\n  ...props\n}: MenuPrimitive.Popup.Props &\n  Pick<\n    MenuPrimitive.Positioner.Props,\n    \"align\" | \"alignOffset\" | \"side\" | \"sideOffset\"\n  > &\n  Pick<MenuPrimitive.Portal.Props, \"container\">) {\n  return (\n    <MenuPrimitive.Portal container={container}>\n      <MenuPrimitive.Positioner\n        className=\"isolate z-50 outline-none\"\n        align={align}\n        alignOffset={alignOffset}\n        side={side}\n        sideOffset={sideOffset}\n      >\n        <MenuPrimitive.Popup\n          data-slot=\"dropdown-menu-content\"\n          className={cn(\n            \"z-50 max-h-(--available-height) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none 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-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95\",\n            className,\n          )}\n          {...props}\n        />\n      </MenuPrimitive.Positioner>\n    </MenuPrimitive.Portal>\n  );\n}\n\nfunction DropdownMenuGroup({ ...props }: MenuPrimitive.Group.Props) {\n  return <MenuPrimitive.Group data-slot=\"dropdown-menu-group\" {...props} />;\n}\n\nfunction DropdownMenuLabel({\n  className,\n  inset,\n  ...props\n}: MenuPrimitive.GroupLabel.Props & {\n  inset?: boolean;\n}) {\n  return (\n    <MenuPrimitive.GroupLabel\n      data-slot=\"dropdown-menu-label\"\n      data-inset={inset}\n      className={cn(\n        \"px-2 py-1.5 text-xs font-medium text-muted-foreground data-inset:pl-8\",\n        className,\n      )}\n      {...props}\n    />\n  );\n}\n\nfunction DropdownMenuItem({\n  className,\n  inset,\n  variant = \"default\",\n  ...props\n}: MenuPrimitive.Item.Props & {\n  inset?: boolean;\n  variant?: \"default\" | \"destructive\";\n}) {\n  return (\n    <MenuPrimitive.Item\n      data-slot=\"dropdown-menu-item\"\n      data-inset={inset}\n      data-variant={variant}\n      className={cn(\n        \"group/dropdown-menu-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive\",\n        className,\n      )}\n      {...props}\n    />\n  );\n}\n\nfunction DropdownMenuSub({ ...props }: MenuPrimitive.SubmenuRoot.Props) {\n  return <MenuPrimitive.SubmenuRoot data-slot=\"dropdown-menu-sub\" {...props} />;\n}\n\nfunction DropdownMenuSubTrigger({\n  className,\n  inset,\n  children,\n  ...props\n}: MenuPrimitive.SubmenuTrigger.Props & {\n  inset?: boolean;\n}) {\n  return (\n    <MenuPrimitive.SubmenuTrigger\n      data-slot=\"dropdown-menu-sub-trigger\"\n      data-inset={inset}\n      className={cn(\n        \"flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-8 data-popup-open:bg-accent data-popup-open:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n        className,\n      )}\n      {...props}\n    >\n      {children}\n      <ChevronRightIcon className=\"ml-auto\" />\n    </MenuPrimitive.SubmenuTrigger>\n  );\n}\n\nfunction DropdownMenuSubContent({\n  align = \"start\",\n  alignOffset = -3,\n  side = \"right\",\n  sideOffset = 0,\n  className,\n  ...props\n}: React.ComponentProps<typeof DropdownMenuContent>) {\n  return (\n    <DropdownMenuContent\n      data-slot=\"dropdown-menu-sub-content\"\n      className={cn(\n        \"w-auto min-w-[96px] rounded-md bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-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-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\",\n        className,\n      )}\n      align={align}\n      alignOffset={alignOffset}\n      side={side}\n      sideOffset={sideOffset}\n      {...props}\n    />\n  );\n}\n\nfunction DropdownMenuCheckboxItem({\n  className,\n  children,\n  checked,\n  inset,\n  ...props\n}: MenuPrimitive.CheckboxItem.Props & {\n  inset?: boolean;\n}) {\n  return (\n    <MenuPrimitive.CheckboxItem\n      data-slot=\"dropdown-menu-checkbox-item\"\n      data-inset={inset}\n      className={cn(\n        \"relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-8 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n        className,\n      )}\n      checked={checked}\n      {...props}\n    >\n      <span\n        className=\"pointer-events-none absolute right-2 flex items-center justify-center\"\n        data-slot=\"dropdown-menu-checkbox-item-indicator\"\n      >\n        <MenuPrimitive.CheckboxItemIndicator>\n          <CheckIcon />\n        </MenuPrimitive.CheckboxItemIndicator>\n      </span>\n      {children}\n    </MenuPrimitive.CheckboxItem>\n  );\n}\n\nfunction DropdownMenuRadioGroup({ ...props }: MenuPrimitive.RadioGroup.Props) {\n  return (\n    <MenuPrimitive.RadioGroup\n      data-slot=\"dropdown-menu-radio-group\"\n      {...props}\n    />\n  );\n}\n\nfunction DropdownMenuRadioItem({\n  className,\n  children,\n  inset,\n  ...props\n}: MenuPrimitive.RadioItem.Props & {\n  inset?: boolean;\n}) {\n  return (\n    <MenuPrimitive.RadioItem\n      data-slot=\"dropdown-menu-radio-item\"\n      data-inset={inset}\n      className={cn(\n        \"relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-8 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n        className,\n      )}\n      {...props}\n    >\n      <span\n        className=\"pointer-events-none absolute right-2 flex items-center justify-center\"\n        data-slot=\"dropdown-menu-radio-item-indicator\"\n      >\n        <MenuPrimitive.RadioItemIndicator>\n          <CheckIcon />\n        </MenuPrimitive.RadioItemIndicator>\n      </span>\n      {children}\n    </MenuPrimitive.RadioItem>\n  );\n}\n\nfunction DropdownMenuSeparator({\n  className,\n  ...props\n}: MenuPrimitive.Separator.Props) {\n  return (\n    <MenuPrimitive.Separator\n      data-slot=\"dropdown-menu-separator\"\n      className={cn(\"-mx-1 my-1 h-px bg-border\", className)}\n      {...props}\n    />\n  );\n}\n\nfunction DropdownMenuShortcut({\n  className,\n  ...props\n}: React.ComponentProps<\"span\">) {\n  return (\n    <span\n      data-slot=\"dropdown-menu-shortcut\"\n      className={cn(\n        \"ml-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground\",\n        className,\n      )}\n      {...props}\n    />\n  );\n}\n\nexport {\n  DropdownMenu,\n  DropdownMenuPortal,\n  DropdownMenuTrigger,\n  DropdownMenuContent,\n  DropdownMenuGroup,\n  DropdownMenuLabel,\n  DropdownMenuItem,\n  DropdownMenuCheckboxItem,\n  DropdownMenuRadioGroup,\n  DropdownMenuRadioItem,\n  DropdownMenuSeparator,\n  DropdownMenuShortcut,\n  DropdownMenuSub,\n  DropdownMenuSubTrigger,\n  DropdownMenuSubContent,\n};\n","import * as React from \"react\";\nimport { Input as InputPrimitive } from \"@base-ui/react/input\";\n\n// Manual change from the shadcn CLI output: relative import instead of the\n// CLI's \"@/lib/utils\" alias (not resolvable when consumed from source).\nimport { cn } from \"../../lib/utils\";\n\nfunction Input({ className, type, ...props }: React.ComponentProps<\"input\">) {\n  return (\n    <InputPrimitive\n      type={type}\n      data-slot=\"input\"\n      className={cn(\n        \"h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-2.5 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40\",\n        className,\n      )}\n      {...props}\n    />\n  );\n}\n\nexport { Input };\n","import * as React from \"react\";\n\n// Manual change from the shadcn CLI output: relative import instead of the\n// CLI's \"@/lib/utils\" alias (not resolvable when consumed from source).\nimport { cn } from \"../../lib/utils\";\n\nfunction Label({ className, ...props }: React.ComponentProps<\"label\">) {\n  return (\n    <label\n      data-slot=\"label\"\n      className={cn(\n        \"flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50\",\n        className,\n      )}\n      {...props}\n    />\n  );\n}\n\nexport { Label };\n","\"use client\";\n\nimport * as React from \"react\";\nimport { Popover as PopoverPrimitive } from \"@base-ui/react/popover\";\n\n// Manual change from the shadcn CLI output: relative import instead of the\n// CLI's \"@/lib/utils\" alias (not resolvable when consumed from source).\nimport { cn } from \"../../lib/utils\";\n\nfunction Popover({ ...props }: PopoverPrimitive.Root.Props) {\n  return <PopoverPrimitive.Root data-slot=\"popover\" {...props} />;\n}\n\nfunction PopoverTrigger({ ...props }: PopoverPrimitive.Trigger.Props) {\n  return <PopoverPrimitive.Trigger data-slot=\"popover-trigger\" {...props} />;\n}\n\n// Manual change from the shadcn CLI output: added a `container` prop (forwarded\n// to the Base UI Portal) so BlockNote can portal this into the editor's portal\n// element, which carries the light/dark color-scheme class.\nfunction PopoverContent({\n  className,\n  align = \"center\",\n  alignOffset = 0,\n  side = \"bottom\",\n  sideOffset = 4,\n  container,\n  ...props\n}: PopoverPrimitive.Popup.Props &\n  Pick<\n    PopoverPrimitive.Positioner.Props,\n    \"align\" | \"alignOffset\" | \"side\" | \"sideOffset\"\n  > &\n  Pick<PopoverPrimitive.Portal.Props, \"container\">) {\n  return (\n    <PopoverPrimitive.Portal container={container}>\n      <PopoverPrimitive.Positioner\n        align={align}\n        alignOffset={alignOffset}\n        side={side}\n        sideOffset={sideOffset}\n        className=\"isolate z-50\"\n      >\n        <PopoverPrimitive.Popup\n          data-slot=\"popover-content\"\n          className={cn(\n            \"z-50 flex w-72 origin-(--transform-origin) flex-col gap-4 rounded-md bg-popover p-4 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 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-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\",\n            className,\n          )}\n          {...props}\n        />\n      </PopoverPrimitive.Positioner>\n    </PopoverPrimitive.Portal>\n  );\n}\n\nfunction PopoverHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n  return (\n    <div\n      data-slot=\"popover-header\"\n      className={cn(\"flex flex-col gap-1 text-sm\", className)}\n      {...props}\n    />\n  );\n}\n\nfunction PopoverTitle({ className, ...props }: PopoverPrimitive.Title.Props) {\n  return (\n    <PopoverPrimitive.Title\n      data-slot=\"popover-title\"\n      className={cn(\"font-medium\", className)}\n      {...props}\n    />\n  );\n}\n\nfunction PopoverDescription({\n  className,\n  ...props\n}: PopoverPrimitive.Description.Props) {\n  return (\n    <PopoverPrimitive.Description\n      data-slot=\"popover-description\"\n      className={cn(\"text-muted-foreground\", className)}\n      {...props}\n    />\n  );\n}\n\nexport {\n  Popover,\n  PopoverContent,\n  PopoverDescription,\n  PopoverHeader,\n  PopoverTitle,\n  PopoverTrigger,\n};\n","import * as React from \"react\";\nimport { Select as SelectPrimitive } from \"@base-ui/react/select\";\n\n// Manual change from the shadcn CLI output: relative import instead of the\n// CLI's \"@/lib/utils\" alias (not resolvable when consumed from source).\nimport { cn } from \"../../lib/utils\";\nimport { ChevronDownIcon, CheckIcon, ChevronUpIcon } from \"lucide-react\";\n\nconst Select = SelectPrimitive.Root;\n\nfunction SelectGroup({ className, ...props }: SelectPrimitive.Group.Props) {\n  return (\n    <SelectPrimitive.Group\n      data-slot=\"select-group\"\n      className={cn(\"scroll-my-1 p-1\", className)}\n      {...props}\n    />\n  );\n}\n\nfunction SelectValue({ className, ...props }: SelectPrimitive.Value.Props) {\n  return (\n    <SelectPrimitive.Value\n      data-slot=\"select-value\"\n      className={cn(\"flex flex-1 text-left\", className)}\n      {...props}\n    />\n  );\n}\n\nfunction SelectTrigger({\n  className,\n  size = \"default\",\n  children,\n  ...props\n}: SelectPrimitive.Trigger.Props & {\n  size?: \"sm\" | \"default\";\n}) {\n  return (\n    <SelectPrimitive.Trigger\n      data-slot=\"select-trigger\"\n      data-size={size}\n      className={cn(\n        \"flex w-fit items-center justify-between gap-1.5 rounded-md border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 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\",\n        className,\n      )}\n      {...props}\n    >\n      {children}\n      <SelectPrimitive.Icon\n        render={\n          <ChevronDownIcon className=\"text-muted-foreground pointer-events-none size-4\" />\n        }\n      />\n    </SelectPrimitive.Trigger>\n  );\n}\n\n// Manual change from the shadcn CLI output: added a `container` prop (forwarded\n// to the Base UI Portal) so BlockNote can portal this into the editor's portal\n// element, which carries the light/dark color-scheme class.\nfunction SelectContent({\n  className,\n  children,\n  side = \"bottom\",\n  sideOffset = 4,\n  align = \"center\",\n  alignOffset = 0,\n  alignItemWithTrigger = true,\n  container,\n  ...props\n}: SelectPrimitive.Popup.Props &\n  Pick<\n    SelectPrimitive.Positioner.Props,\n    \"align\" | \"alignOffset\" | \"side\" | \"sideOffset\" | \"alignItemWithTrigger\"\n  > &\n  Pick<SelectPrimitive.Portal.Props, \"container\">) {\n  return (\n    <SelectPrimitive.Portal container={container}>\n      <SelectPrimitive.Positioner\n        side={side}\n        sideOffset={sideOffset}\n        align={align}\n        alignOffset={alignOffset}\n        alignItemWithTrigger={alignItemWithTrigger}\n        className=\"isolate z-50\"\n      >\n        <SelectPrimitive.Popup\n          data-slot=\"select-content\"\n          data-align-trigger={alignItemWithTrigger}\n          className={cn(\n            \"relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none 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-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\",\n            className,\n          )}\n          {...props}\n        >\n          <SelectScrollUpButton />\n          <SelectPrimitive.List>{children}</SelectPrimitive.List>\n          <SelectScrollDownButton />\n        </SelectPrimitive.Popup>\n      </SelectPrimitive.Positioner>\n    </SelectPrimitive.Portal>\n  );\n}\n\nfunction SelectLabel({\n  className,\n  ...props\n}: SelectPrimitive.GroupLabel.Props) {\n  return (\n    <SelectPrimitive.GroupLabel\n      data-slot=\"select-label\"\n      className={cn(\"px-2 py-1.5 text-xs text-muted-foreground\", className)}\n      {...props}\n    />\n  );\n}\n\nfunction SelectItem({\n  className,\n  children,\n  ...props\n}: SelectPrimitive.Item.Props) {\n  return (\n    <SelectPrimitive.Item\n      data-slot=\"select-item\"\n      className={cn(\n        \"relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2\",\n        className,\n      )}\n      {...props}\n    >\n      <SelectPrimitive.ItemText className=\"flex flex-1 shrink-0 gap-2 whitespace-nowrap\">\n        {children}\n      </SelectPrimitive.ItemText>\n      <SelectPrimitive.ItemIndicator\n        render={\n          <span className=\"pointer-events-none absolute right-2 flex size-4 items-center justify-center\" />\n        }\n      >\n        <CheckIcon className=\"pointer-events-none\" />\n      </SelectPrimitive.ItemIndicator>\n    </SelectPrimitive.Item>\n  );\n}\n\nfunction SelectSeparator({\n  className,\n  ...props\n}: SelectPrimitive.Separator.Props) {\n  return (\n    <SelectPrimitive.Separator\n      data-slot=\"select-separator\"\n      className={cn(\"pointer-events-none -mx-1 my-1 h-px bg-border\", className)}\n      {...props}\n    />\n  );\n}\n\nfunction SelectScrollUpButton({\n  className,\n  ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollUpArrow>) {\n  return (\n    <SelectPrimitive.ScrollUpArrow\n      data-slot=\"select-scroll-up-button\"\n      className={cn(\n        \"top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4\",\n        className,\n      )}\n      {...props}\n    >\n      <ChevronUpIcon />\n    </SelectPrimitive.ScrollUpArrow>\n  );\n}\n\nfunction SelectScrollDownButton({\n  className,\n  ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollDownArrow>) {\n  return (\n    <SelectPrimitive.ScrollDownArrow\n      data-slot=\"select-scroll-down-button\"\n      className={cn(\n        \"bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4\",\n        className,\n      )}\n      {...props}\n    >\n      <ChevronDownIcon />\n    </SelectPrimitive.ScrollDownArrow>\n  );\n}\n\nexport {\n  Select,\n  SelectContent,\n  SelectGroup,\n  SelectItem,\n  SelectLabel,\n  SelectScrollDownButton,\n  SelectScrollUpButton,\n  SelectSeparator,\n  SelectTrigger,\n  SelectValue,\n};\n","// Manual change from the shadcn CLI output: relative import instead of the\n// CLI's \"@/lib/utils\" alias (not resolvable when consumed from source).\nimport { cn } from \"../../lib/utils\";\n\nfunction Skeleton({ className, ...props }: React.ComponentProps<\"div\">) {\n  return (\n    <div\n      data-slot=\"skeleton\"\n      className={cn(\"animate-pulse rounded-md bg-muted\", className)}\n      {...props}\n    />\n  );\n}\n\nexport { Skeleton };\n","\"use client\";\n\nimport { Tabs as TabsPrimitive } from \"@base-ui/react/tabs\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\n// Manual change from the shadcn CLI output: relative import instead of the\n// CLI's \"@/lib/utils\" alias (not resolvable when consumed from source).\nimport { cn } from \"../../lib/utils\";\n\n// Manual change from the shadcn CLI output: the CLI emits orientation variants\n// as `data-horizontal:` / `group-data-vertical/tabs:`, which Tailwind compiles\n// to `[data-horizontal]` etc. and never match Base UI's `data-orientation`\n// attribute (so tabs would render side-by-side). Rewritten throughout this file\n// to the arbitrary `data-[orientation=...]` form, which matches.\nfunction Tabs({\n  className,\n  orientation = \"horizontal\",\n  ...props\n}: TabsPrimitive.Root.Props) {\n  return (\n    <TabsPrimitive.Root\n      data-slot=\"tabs\"\n      data-orientation={orientation}\n      className={cn(\n        \"group/tabs flex gap-2 data-[orientation=horizontal]:flex-col\",\n        className,\n      )}\n      {...props}\n    />\n  );\n}\n\nconst tabsListVariants = cva(\n  \"group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-[orientation=horizontal]/tabs:h-9 group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col data-[variant=line]:rounded-none\",\n  {\n    variants: {\n      variant: {\n        default: \"bg-muted\",\n        line: \"gap-1 bg-transparent\",\n      },\n    },\n    defaultVariants: {\n      variant: \"default\",\n    },\n  },\n);\n\nfunction TabsList({\n  className,\n  variant = \"default\",\n  ...props\n}: TabsPrimitive.List.Props & VariantProps<typeof tabsListVariants>) {\n  return (\n    <TabsPrimitive.List\n      data-slot=\"tabs-list\"\n      data-variant={variant}\n      className={cn(tabsListVariants({ variant }), className)}\n      {...props}\n    />\n  );\n}\n\nfunction TabsTrigger({ className, ...props }: TabsPrimitive.Tab.Props) {\n  return (\n    <TabsPrimitive.Tab\n      data-slot=\"tabs-trigger\"\n      className={cn(\n        \"relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-disabled:pointer-events-none aria-disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n        \"group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent\",\n        \"data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground\",\n        \"after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100\",\n        className,\n      )}\n      {...props}\n    />\n  );\n}\n\nfunction TabsContent({ className, ...props }: TabsPrimitive.Panel.Props) {\n  return (\n    <TabsPrimitive.Panel\n      data-slot=\"tabs-content\"\n      className={cn(\"flex-1 text-sm outline-none\", className)}\n      {...props}\n    />\n  );\n}\n\nexport { Tabs, TabsList, TabsTrigger, TabsContent, tabsListVariants };\n","import { Toggle as TogglePrimitive } from \"@base-ui/react/toggle\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\n// Manual change from the shadcn CLI output: relative import instead of the\n// CLI's \"@/lib/utils\" alias (not resolvable when consumed from source).\nimport { cn } from \"../../lib/utils\";\n\nconst toggleVariants = cva(\n  \"group/toggle inline-flex items-center justify-center gap-1 rounded-md text-sm font-medium whitespace-nowrap transition-[color,box-shadow] outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n  {\n    variants: {\n      variant: {\n        default: \"bg-transparent\",\n        outline: \"border border-input bg-transparent shadow-xs hover:bg-muted\",\n      },\n      size: {\n        default:\n          \"h-9 min-w-9 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2\",\n        sm: \"h-8 min-w-8 px-2.5 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5\",\n        lg: \"h-10 min-w-10 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2\",\n      },\n    },\n    defaultVariants: {\n      variant: \"default\",\n      size: \"default\",\n    },\n  },\n);\n\nfunction Toggle({\n  className,\n  variant = \"default\",\n  size = \"default\",\n  ...props\n}: TogglePrimitive.Props & VariantProps<typeof toggleVariants>) {\n  return (\n    <TogglePrimitive\n      data-slot=\"toggle\"\n      className={cn(toggleVariants({ variant, size, className }))}\n      {...props}\n    />\n  );\n}\n\nexport { Toggle, toggleVariants };\n","\"use client\";\n\nimport { Tooltip as TooltipPrimitive } from \"@base-ui/react/tooltip\";\n\n// Manual change from the shadcn CLI output: relative import instead of the\n// CLI's \"@/lib/utils\" alias (not resolvable when consumed from source).\nimport { cn } from \"../../lib/utils\";\n\nfunction TooltipProvider({\n  delay = 0,\n  ...props\n}: TooltipPrimitive.Provider.Props) {\n  return (\n    <TooltipPrimitive.Provider\n      data-slot=\"tooltip-provider\"\n      delay={delay}\n      {...props}\n    />\n  );\n}\n\nfunction Tooltip({ ...props }: TooltipPrimitive.Root.Props) {\n  return <TooltipPrimitive.Root data-slot=\"tooltip\" {...props} />;\n}\n\nfunction TooltipTrigger({ ...props }: TooltipPrimitive.Trigger.Props) {\n  return <TooltipPrimitive.Trigger data-slot=\"tooltip-trigger\" {...props} />;\n}\n\n// Manual change from the shadcn CLI output: added a `container` prop (forwarded\n// to the Base UI Portal) so BlockNote can portal this into the editor's portal\n// element, which carries the light/dark color-scheme class.\nfunction TooltipContent({\n  className,\n  side = \"top\",\n  sideOffset = 4,\n  align = \"center\",\n  alignOffset = 0,\n  children,\n  container,\n  ...props\n}: TooltipPrimitive.Popup.Props &\n  Pick<\n    TooltipPrimitive.Positioner.Props,\n    \"align\" | \"alignOffset\" | \"side\" | \"sideOffset\"\n  > &\n  Pick<TooltipPrimitive.Portal.Props, \"container\">) {\n  return (\n    <TooltipPrimitive.Portal container={container}>\n      <TooltipPrimitive.Positioner\n        align={align}\n        alignOffset={alignOffset}\n        side={side}\n        sideOffset={sideOffset}\n        className=\"isolate z-50\"\n      >\n        <TooltipPrimitive.Popup\n          data-slot=\"tooltip-content\"\n          className={cn(\n            \"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\",\n            className,\n          )}\n          {...props}\n        >\n          {children}\n          <TooltipPrimitive.Arrow 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\" />\n        </TooltipPrimitive.Popup>\n      </TooltipPrimitive.Positioner>\n    </TooltipPrimitive.Portal>\n  );\n}\n\nexport { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };\n","import {\n  Avatar as ShadCNAvatar,\n  AvatarFallback as ShadCNAvatarFallback,\n  AvatarImage as ShadCNAvatarImage,\n} from \"./components/ui/avatar.js\";\nimport { Badge as ShadCNBadge } from \"./components/ui/badge.js\";\nimport { Button as ShadCNButton } from \"./components/ui/button.js\";\nimport {\n  Card as ShadCNCard,\n  CardContent as ShadCNCardContent,\n} from \"./components/ui/card.js\";\nimport {\n  DropdownMenu as ShadCNDropdownMenu,\n  DropdownMenuCheckboxItem as ShadCNDropdownMenuCheckboxItem,\n  DropdownMenuContent as ShadCNDropdownMenuContent,\n  DropdownMenuGroup as ShadCNDropdownMenuGroup,\n  DropdownMenuItem as ShadCNDropdownMenuItem,\n  DropdownMenuLabel as ShadCNDropdownMenuLabel,\n  DropdownMenuSeparator as ShadCNDropdownMenuSeparator,\n  DropdownMenuSub as ShadCNDropdownMenuSub,\n  DropdownMenuSubContent as ShadCNDropdownMenuSubContent,\n  DropdownMenuSubTrigger as ShadCNDropdownMenuSubTrigger,\n  DropdownMenuTrigger as ShadCNDropdownMenuTrigger,\n} from \"./components/ui/dropdown-menu.js\";\nimport { Input as ShadCNInput } from \"./components/ui/input.js\";\nimport { Label as ShadCNLabel } from \"./components/ui/label.js\";\nimport {\n  Popover as ShadCNPopover,\n  PopoverContent as ShadCNPopoverContent,\n  PopoverTrigger as ShadCNPopoverTrigger,\n} from \"./components/ui/popover.js\";\nimport {\n  Select as ShadCNSelect,\n  SelectContent as ShadCNSelectContent,\n  SelectItem as ShadCNSelectItem,\n  SelectTrigger as ShadCNSelectTrigger,\n  SelectValue as ShadCNSelectValue,\n} from \"./components/ui/select.js\";\nimport { Skeleton as ShadCNSkeleton } from \"./components/ui/skeleton.js\";\nimport {\n  Tabs as ShadCNTabs,\n  TabsContent as ShadCNTabsContent,\n  TabsList as ShadCNTabsList,\n  TabsTrigger as ShadCNTabsTrigger,\n} from \"./components/ui/tabs.js\";\nimport { Toggle as ShadCNToggle } from \"./components/ui/toggle.js\";\nimport {\n  Tooltip as ShadCNTooltip,\n  TooltipContent as ShadCNTooltipContent,\n  TooltipProvider as ShadCNTooltipProvider,\n  TooltipTrigger as ShadCNTooltipTrigger,\n} from \"./components/ui/tooltip.js\";\n\nimport { createContext, useContext } from \"react\";\n\nexport const ShadCNDefaultComponents = {\n  Avatar: {\n    Avatar: ShadCNAvatar,\n    AvatarFallback: ShadCNAvatarFallback,\n    AvatarImage: ShadCNAvatarImage,\n  },\n  Badge: {\n    Badge: ShadCNBadge,\n  },\n  Button: {\n    Button: ShadCNButton,\n  },\n  Card: {\n    Card: ShadCNCard,\n    CardContent: ShadCNCardContent,\n  },\n  DropdownMenu: {\n    DropdownMenu: ShadCNDropdownMenu,\n    DropdownMenuCheckboxItem: ShadCNDropdownMenuCheckboxItem,\n    DropdownMenuContent: ShadCNDropdownMenuContent,\n    DropdownMenuGroup: ShadCNDropdownMenuGroup,\n    DropdownMenuItem: ShadCNDropdownMenuItem,\n    DropdownMenuLabel: ShadCNDropdownMenuLabel,\n    DropdownMenuSeparator: ShadCNDropdownMenuSeparator,\n    DropdownMenuSub: ShadCNDropdownMenuSub,\n    DropdownMenuSubContent: ShadCNDropdownMenuSubContent,\n    DropdownMenuSubTrigger: ShadCNDropdownMenuSubTrigger,\n    DropdownMenuTrigger: ShadCNDropdownMenuTrigger,\n  },\n  Input: {\n    Input: ShadCNInput,\n  },\n  Label: {\n    Label: ShadCNLabel,\n  },\n  Popover: {\n    Popover: ShadCNPopover,\n    PopoverContent: ShadCNPopoverContent,\n    PopoverTrigger: ShadCNPopoverTrigger,\n  },\n  Select: {\n    Select: ShadCNSelect,\n    SelectContent: ShadCNSelectContent,\n    SelectItem: ShadCNSelectItem,\n    SelectTrigger: ShadCNSelectTrigger,\n    SelectValue: ShadCNSelectValue,\n  },\n  Skeleton: {\n    Skeleton: ShadCNSkeleton,\n  },\n  Tabs: {\n    Tabs: ShadCNTabs,\n    TabsContent: ShadCNTabsContent,\n    TabsList: ShadCNTabsList,\n    TabsTrigger: ShadCNTabsTrigger,\n  },\n  Toggle: {\n    Toggle: ShadCNToggle,\n  },\n  Tooltip: {\n    Tooltip: ShadCNTooltip,\n    TooltipContent: ShadCNTooltipContent,\n    TooltipProvider: ShadCNTooltipProvider,\n    TooltipTrigger: ShadCNTooltipTrigger,\n  },\n};\n\nexport type ShadCNComponents = typeof ShadCNDefaultComponents;\n\nexport const ShadCNComponentsContext = createContext<\n  ShadCNComponents | undefined\n>(undefined);\n\nexport function useShadCNComponentsContext() {\n  return useContext(ShadCNComponentsContext);\n}\n","import { assertEmpty } from \"@blocknote/core\";\nimport { ComponentProps, useMergeRefs, useAutoFocus } from \"@blocknote/react\";\nimport { forwardRef } from \"react\";\n\nimport { useShadCNComponentsContext } from \"../ShadCNComponentsContext.js\";\nimport { cn } from \"../lib/utils.js\";\n\nexport const TextInput = forwardRef<\n  HTMLInputElement,\n  ComponentProps[\"Generic\"][\"Form\"][\"TextInput\"]\n>((props, ref) => {\n  const {\n    className,\n    name,\n    label,\n    variant: _variant,\n    icon, // TODO: implement\n    value,\n    autoFocus,\n    placeholder,\n    disabled,\n    onKeyDown,\n    onChange,\n    autoComplete: _autoComplete,\n    \"aria-activedescendant\": ariaActivedescendant,\n    rightSection, // TODO: add rightSection\n    ...rest\n  } = props;\n\n  assertEmpty(rest);\n\n  // Rationale (and the trap contract `data-autofocus` serves) in the hook.\n\n  const inputRef = useAutoFocus<HTMLInputElement>(autoFocus);\n  const setRefs = useMergeRefs([inputRef, ref]);\n\n  const ShadCNComponents = useShadCNComponentsContext()!;\n\n  return (\n    <div\n      className={cn(\n        className,\n        \"border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:ring-ring flex h-10 w-full rounded-md border px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50\",\n        \"text-foreground items-center gap-2\",\n      )}\n    >\n      {icon}\n      <div className=\"flex-1\">\n        {label && (\n          <ShadCNComponents.Label.Label htmlFor={label}>\n            {label}\n          </ShadCNComponents.Label.Label>\n        )}\n        <ShadCNComponents.Input.Input\n          className={cn(className, \"h-auto border-none p-0\")}\n          id={label}\n          name={name}\n          placeholder={placeholder}\n          disabled={disabled}\n          value={value}\n          onKeyDown={onKeyDown}\n          onChange={onChange}\n          ref={setRefs}\n          aria-activedescendant={ariaActivedescendant}\n        />\n      </div>\n      {rightSection}\n    </div>\n  );\n});\n","import type { FocusEvent } from \"react\";\n\n/**\n * Props for a Base UI Menu / Select popup that make `preventFocusOnOpen` hold.\n *\n * Base UI always moves focus into these popups when they open (floating-ui's\n * `FloatingFocusManager`; `initialFocus` exists on Popover and Dialog only).\n * That is upstream's position, not a gap: a menu \"is supposed to only contain\n * menu items\", so focus belongs in it\n * (https://github.com/mui/base-ui/issues/2143#issuecomment-2993226778), and on touch\n * \"focus should always go to the Popup element\" to keep the virtual keyboard\n * closed (https://github.com/mui/base-ui/issues/714). Our mobile toolbar\n * starts from the opposite situation, the keyboard is open and must stay open.\n * On the mobile toolbar the library's focus move is fatal:\n * Android hides the on-screen keyboard as soon as a non-editable element has\n * focus, the toolbar hides with the keyboard, and the popup, a child of the\n * toolbar, is gone about 150 ms after it opened.\n *\n * So focus arriving from outside the popup (the editor) goes straight back\n * where it came from, in the same task, before the keyboard reacts. The focus\n * manager does not read that as \"focus left\": it ignores a `focusout` whose\n * target is the element that was focused before the popup opened.\n */\nexport function preventFocusOnOpenProps(enabled: boolean) {\n  if (!enabled) {\n    return {};\n  }\n  return {\n    onFocusCapture(event: FocusEvent<HTMLElement>) {\n      const from = event.relatedTarget;\n      if (from instanceof HTMLElement && !event.currentTarget.contains(from)) {\n        from.focus({ preventScroll: true });\n      }\n    },\n  };\n}\n","import { assertEmpty } from \"@blocknote/core\";\nimport { ComponentProps, preventFocusOnTap } from \"@blocknote/react\";\nimport { ChevronRight } from \"lucide-react\";\nimport { createContext, forwardRef, ReactElement, useContext } from \"react\";\nimport { preventFocusOnOpenProps } from \"../lib/preventFocusOnOpen.js\";\nimport { cn } from \"../lib/utils.js\";\nimport { useShadCNComponentsContext } from \"../ShadCNComponentsContext.js\";\n\n// Hands the `portalElement` and `preventFocusOnOpen` props from `Menu` (the\n// root) down to `MenuDropdown`, where the dropdown's `container` is set.\nconst MenuRootPropsContext = createContext<{\n  portalElement: HTMLElement | null;\n  preventFocusOnOpen: boolean;\n}>({ portalElement: null, preventFocusOnOpen: false });\n\nexport const Menu = (props: ComponentProps[\"Generic\"][\"Menu\"][\"Root\"]) => {\n  const {\n    children,\n    onOpenChange,\n    position: _position, // Unused\n    portalElement,\n    // Base UI has no `initialFocus` on Menu; see lib/preventFocusOnOpen.ts.\n    preventFocusOnOpen,\n    sub,\n    ...rest\n  } = props;\n\n  assertEmpty(rest);\n\n  const ShadCNComponents = useShadCNComponentsContext()!;\n\n  const rootProps = {\n    portalElement,\n    preventFocusOnOpen: preventFocusOnOpen ?? false,\n  };\n\n  if (sub) {\n    return (\n      <ShadCNComponents.DropdownMenu.DropdownMenuSub\n        onOpenChange={onOpenChange}\n      >\n        <MenuRootPropsContext.Provider value={rootProps}>\n          {children}\n        </MenuRootPropsContext.Provider>\n      </ShadCNComponents.DropdownMenu.DropdownMenuSub>\n    );\n  } else {\n    return (\n      <ShadCNComponents.DropdownMenu.DropdownMenu\n        modal={false}\n        onOpenChange={onOpenChange}\n      >\n        <MenuRootPropsContext.Provider value={rootProps}>\n          {children}\n        </MenuRootPropsContext.Provider>\n      </ShadCNComponents.DropdownMenu.DropdownMenu>\n    );\n  }\n};\n\nexport const MenuTrigger = (\n  props: ComponentProps[\"Generic\"][\"Menu\"][\"Trigger\"],\n) => {\n  const { children, sub, ...rest } = props;\n\n  assertEmpty(rest);\n\n  const ShadCNComponents = useShadCNComponentsContext()!;\n\n  if (sub) {\n    return (\n      <ShadCNComponents.DropdownMenu.DropdownMenuSubTrigger>\n        {children}\n      </ShadCNComponents.DropdownMenu.DropdownMenuSubTrigger>\n    );\n  } else {\n    return (\n      <ShadCNComponents.DropdownMenu.DropdownMenuTrigger\n        render={children as ReactElement}\n      />\n    );\n  }\n};\n\nexport const MenuDropdown = forwardRef<\n  HTMLDivElement,\n  ComponentProps[\"Generic\"][\"Menu\"][\"Dropdown\"]\n>((props, ref) => {\n  const { className, children, sub, ...rest } = props;\n\n  assertEmpty(rest);\n\n  const ShadCNComponents = useShadCNComponentsContext()!;\n\n  // The `portalElement` supplied at the call site is a themed `.bn-root`, so the\n  // menu inherits light/dark mode instead of the document body's.\n  // `null` (editor not mounted yet) makes Base UI wait for a container\n  // instead of falling back to the body; nothing is open at that point.\n  const { portalElement: container, preventFocusOnOpen } =\n    useContext(MenuRootPropsContext);\n\n  if (sub) {\n    return (\n      <ShadCNComponents.DropdownMenu.DropdownMenuSubContent\n        className={className}\n        container={container}\n        ref={ref}\n      >\n        {children}\n      </ShadCNComponents.DropdownMenu.DropdownMenuSubContent>\n    );\n  } else {\n    return (\n      <ShadCNComponents.DropdownMenu.DropdownMenuContent\n        className={className}\n        container={container}\n        ref={ref}\n        // How-to-test: without it, opening the colors menu from the mobile toolbar focuses the menu, which closes the keyboard and the toolbar with it (covered by skinFocus, android, shadcn: \"opening the colors menu keeps focus in the editor\").\n        {...preventFocusOnOpenProps(preventFocusOnOpen)}\n      >\n        {children}\n      </ShadCNComponents.DropdownMenu.DropdownMenuContent>\n    );\n  }\n});\n\nexport const MenuItem = forwardRef<\n  HTMLDivElement,\n  ComponentProps[\"Generic\"][\"Menu\"][\"Item\"]\n>((props, ref) => {\n  const { className, children, icon, checked, subTrigger, onClick, ...rest } =\n    props;\n\n  assertEmpty(rest);\n\n  const ShadCNComponents = useShadCNComponentsContext()!;\n\n  if (subTrigger) {\n    return (\n      <>\n        {icon}\n        {children}\n      </>\n    );\n  }\n\n  if (checked !== undefined) {\n    return (\n      <ShadCNComponents.DropdownMenu.DropdownMenuCheckboxItem\n        className={cn(className, \"gap-1\", checked ? \"\" : \"px-2\")}\n        ref={ref}\n        checked={checked}\n        onClick={onClick}\n        // How-to-test: without the tap guard (here and on the plain item below), tapping a color focuses the item and closes the keyboard (covered by skinFocus, android, shadcn: \"picking from the colors menu leaves focus in the editor\").\n        onMouseDown={preventFocusOnTap}\n        {...rest}\n      >\n        {icon}\n        {children}\n      </ShadCNComponents.DropdownMenu.DropdownMenuCheckboxItem>\n    );\n  }\n\n  return (\n    <ShadCNComponents.DropdownMenu.DropdownMenuItem\n      className={className}\n      ref={ref}\n      onClick={onClick}\n      onMouseDown={preventFocusOnTap}\n      {...rest}\n    >\n      {icon}\n      {children}\n      {subTrigger && <ChevronRight className=\"ml-auto h-4 w-4\" />}\n    </ShadCNComponents.DropdownMenu.DropdownMenuItem>\n  );\n});\n\nexport const MenuDivider = forwardRef<\n  HTMLDivElement,\n  ComponentProps[\"Generic\"][\"Menu\"][\"Divider\"]\n>((props, ref) => {\n  const { className, ...rest } = props;\n\n  assertEmpty(rest);\n\n  const ShadCNComponents = useShadCNComponentsContext()!;\n\n  return (\n    <ShadCNComponents.DropdownMenu.DropdownMenuSeparator\n      className={className}\n      ref={ref}\n    />\n  );\n});\n\nexport const MenuLabel = forwardRef<\n  HTMLDivElement,\n  ComponentProps[\"Generic\"][\"Menu\"][\"Label\"]\n>((props, ref) => {\n  const { className, children, ...rest } = props;\n\n  assertEmpty(rest);\n\n  const ShadCNComponents = useShadCNComponentsContext()!;\n\n  return (\n    <ShadCNComponents.DropdownMenu.DropdownMenuGroup>\n      <ShadCNComponents.DropdownMenu.DropdownMenuLabel\n        className={className}\n        ref={ref}\n      >\n        {children}\n      </ShadCNComponents.DropdownMenu.DropdownMenuLabel>\n    </ShadCNComponents.DropdownMenu.DropdownMenuGroup>\n  );\n});\n","import { assertEmpty } from \"@blocknote/core\";\nimport { ComponentProps } from \"@blocknote/react\";\nimport { forwardRef } from \"react\";\n\nimport { cn } from \"../lib/utils.js\";\nimport { useShadCNComponentsContext } from \"../ShadCNComponentsContext.js\";\n\nexport const MenuButton = forwardRef<\n  HTMLButtonElement,\n  ComponentProps[\"Generic\"][\"Menu\"][\"Button\"]\n>((props, ref) => {\n  const {\n    className,\n    children,\n    icon,\n    onClick,\n    onDragEnd,\n    onDragStart,\n    draggable,\n    label,\n    ...rest\n  } = props;\n\n  // false, because rest props can be added by ariakit when button is used as a trigger\n  // assertEmpty in this case is only used at typescript level, not runtime level\n  assertEmpty(rest, false);\n\n  const ShadCNComponents = useShadCNComponentsContext()!;\n\n  return (\n    <ShadCNComponents.Button.Button\n      variant={\"ghost\"}\n      className={cn(className, \"text-gray-400\")}\n      ref={ref}\n      aria-label={label}\n      onClick={onClick}\n      onDragStart={onDragStart}\n      onDragEnd={onDragEnd}\n      draggable={draggable}\n      {...rest}\n    >\n      {icon}\n      {children}\n    </ShadCNComponents.Button.Button>\n  );\n});\n","import { assertEmpty } from \"@blocknote/core\";\nimport { ComponentProps } from \"@blocknote/react\";\nimport { forwardRef } from \"react\";\n\nimport { cn } from \"../lib/utils.js\";\nimport { useShadCNComponentsContext } from \"../ShadCNComponentsContext.js\";\n\nexport const Panel = forwardRef<\n  HTMLDivElement,\n  ComponentProps[\"FilePanel\"][\"Root\"]\n>((props, ref) => {\n  const {\n    className,\n    tabs,\n    defaultOpenTab,\n    openTab,\n    setOpenTab,\n    loading: _loading, // TODO: implement loader\n    ...rest\n  } = props;\n\n  assertEmpty(rest);\n\n  const ShadCNComponents = useShadCNComponentsContext()!;\n\n  return (\n    <ShadCNComponents.Tabs.Tabs\n      className={cn(className, \"bg-popover max-w-screen rounded-lg p-2\")}\n      ref={ref}\n      value={openTab}\n      defaultValue={defaultOpenTab}\n      onValueChange={setOpenTab}\n    >\n      {/*{loading && <LoadingOverlay visible={loading} />}*/}\n\n      <ShadCNComponents.Tabs.TabsList>\n        {tabs.map((tab) => (\n          <ShadCNComponents.Tabs.TabsTrigger value={tab.name} key={tab.name}>\n            {tab.name}\n          </ShadCNComponents.Tabs.TabsTrigger>\n        ))}\n      </ShadCNComponents.Tabs.TabsList>\n\n      {tabs.map((tab) => (\n        <ShadCNComponents.Tabs.TabsContent value={tab.name} key={tab.name}>\n          <ShadCNComponents.Card.Card>\n            <ShadCNComponents.Card.CardContent className={\"p-4\"}>\n              {tab.tabPanel}\n            </ShadCNComponents.Card.CardContent>\n          </ShadCNComponents.Card.Card>\n        </ShadCNComponents.Tabs.TabsContent>\n      ))}\n    </ShadCNComponents.Tabs.Tabs>\n  );\n});\n","import { assertEmpty } from \"@blocknote/core\";\nimport { ComponentProps } from \"@blocknote/react\";\nimport { forwardRef } from \"react\";\n\nimport { cn } from \"../lib/utils.js\";\n\nexport const PanelTab = forwardRef<\n  HTMLDivElement,\n  ComponentProps[\"FilePanel\"][\"TabPanel\"]\n>((props, ref) => {\n  const { className, children, ...rest } = props;\n\n  assertEmpty(rest);\n\n  return (\n    <div\n      className={cn(\n        className,\n        \"flex flex-col items-start justify-center gap-2\",\n      )}\n      ref={ref}\n    >\n      {children}\n    </div>\n  );\n});\n","import { assertEmpty } from \"@blocknote/core\";\nimport { ComponentProps } from \"@blocknote/react\";\nimport { forwardRef } from \"react\";\n\nimport { cn } from \"../lib/utils.js\";\nimport { useShadCNComponentsContext } from \"../ShadCNComponentsContext.js\";\n\nexport const PanelTextInput = forwardRef<\n  HTMLInputElement,\n  ComponentProps[\"FilePanel\"][\"TextInput\"]\n>((props, ref) => {\n  const { className, value, placeholder, onKeyDown, onChange, ...rest } = props;\n\n  assertEmpty(rest);\n\n  const ShadCNComponents = useShadCNComponentsContext()!;\n\n  return (\n    <ShadCNComponents.Input.Input\n      data-test={\"embed-input\"}\n      className={cn(className, \"w-80 max-w-full\")}\n      ref={ref}\n      value={value}\n      placeholder={placeholder}\n      onKeyDown={onKeyDown}\n      onChange={onChange}\n    />\n  );\n});\n","import { assertEmpty } from \"@blocknote/core\";\nimport { ComponentProps } from \"@blocknote/react\";\nimport { createContext, forwardRef, ReactElement, useContext } from \"react\";\n\nimport { cn } from \"../lib/utils.js\";\nimport { useShadCNComponentsContext } from \"../ShadCNComponentsContext.js\";\n\n// Hands the `portalElement` prop from `Popover` (the root) down to\n// `PopoverContent`, where the content's `container` is set.\nconst PopoverPortalElementContext = createContext<HTMLElement | null>(null);\n\nexport const Popover = (\n  props: ComponentProps[\"Generic\"][\"Popover\"][\"Root\"],\n) => {\n  const {\n    children,\n    open,\n    onOpenChange,\n    position: _position, // unused\n    portalElement,\n    ...rest\n  } = props;\n\n  assertEmpty(rest);\n\n  const ShadCNComponents = useShadCNComponentsContext()!;\n\n  return (\n    <ShadCNComponents.Popover.Popover open={open} onOpenChange={onOpenChange}>\n      <PopoverPortalElementContext.Provider value={portalElement}>\n        {children}\n      </PopoverPortalElementContext.Provider>\n    </ShadCNComponents.Popover.Popover>\n  );\n};\n\nexport const PopoverTrigger = forwardRef(\n  (props: ComponentProps[\"Generic\"][\"Popover\"][\"Trigger\"], ref: any) => {\n    const { children, ...rest } = props;\n\n    assertEmpty(rest);\n\n    const ShadCNComponents = useShadCNComponentsContext()!;\n\n    return (\n      <ShadCNComponents.Popover.PopoverTrigger\n        ref={ref}\n        render={children as ReactElement}\n      />\n    );\n  },\n);\n\nexport const PopoverContent = forwardRef<\n  HTMLDivElement,\n  ComponentProps[\"Generic\"][\"Popover\"][\"Content\"]\n>((props, ref) => {\n  const { className, variant, children, ...rest } = props;\n\n  assertEmpty(rest);\n\n  const ShadCNComponents = useShadCNComponentsContext()!;\n\n  // The `portalElement` supplied at the call site is a themed `.bn-root`, so\n  // popovers inherit light/dark mode instead of the document body's, and escape\n  // the mobile formatting toolbar's horizontal scroll clip.\n  // `null` (editor not mounted yet) makes Base UI wait for a container\n  // instead of falling back to the body; nothing is open at that point.\n  const container = useContext(PopoverPortalElementContext);\n\n  return (\n    <ShadCNComponents.Popover.PopoverContent\n      sideOffset={8}\n      container={container}\n      // Base UI would focus the popup's first tabbable on open. BlockNote owns\n      // focus in its popovers (`useAutoFocus` on the input that wants it), as\n      // in the Mantine and Ariakit adapters; on the mobile toolbar a focus move\n      // onto anything else blurs the editor and closes the keyboard. Example:\n      // without it, \"Replace file\" on the mobile toolbar flickers and closes\n      // the keyboard.\n      initialFocus={false}\n      className={cn(\n        className,\n        \"flex flex-col gap-2\",\n        variant === \"panel-popover\"\n          ? \"w-fit max-w-none border-none p-0 shadow-none\"\n          : \"\",\n      )}\n      ref={ref}\n    >\n      {children}\n    </ShadCNComponents.Popover.PopoverContent>\n  );\n});\n","import { assertEmpty } from \"@blocknote/core\";\nimport { ComponentProps } from \"@blocknote/react\";\nimport { forwardRef } from \"react\";\n\nexport const SideMenu = forwardRef<\n  HTMLDivElement,\n  ComponentProps[\"SideMenu\"][\"Root\"]\n>((props, ref) => {\n  const { className, children, ...rest } = props;\n\n  assertEmpty(rest, false);\n\n  return (\n    <div className={className} ref={ref} {...rest}>\n      {children}\n    </div>\n  );\n});\n","import { assertEmpty } from \"@blocknote/core\";\nimport { ComponentProps } from \"@blocknote/react\";\nimport { forwardRef } from \"react\";\n\nimport { cn } from \"../lib/utils.js\";\nimport { useShadCNComponentsContext } from \"../ShadCNComponentsContext.js\";\n\nexport const SideMenuButton = forwardRef<\n  HTMLButtonElement,\n  ComponentProps[\"SideMenu\"][\"Button\"]\n>((props, ref) => {\n  const {\n    className,\n    children,\n    icon,\n    onClick,\n    onDragEnd,\n    onDragStart,\n    draggable,\n    label,\n    ...rest\n  } = props;\n\n  // false, because rest props can be added by ariakit when button is used as a trigger\n  // assertEmpty in this case is only used at typescript level, not runtime level\n  assertEmpty(rest, false);\n\n  const ShadCNComponents = useShadCNComponentsContext()!;\n\n  return (\n    <ShadCNComponents.Button.Button\n      variant={\"ghost\"}\n      className={cn(className, \"text-gray-400\")}\n      ref={ref}\n      aria-label={label}\n      onClick={onClick}\n      onDragStart={onDragStart}\n      onDragEnd={onDragEnd}\n      draggable={draggable}\n      {...rest}\n    >\n      {icon}\n      {children}\n    </ShadCNComponents.Button.Button>\n  );\n});\n","import { assertEmpty } from \"@blocknote/core\";\nimport { ComponentProps } from \"@blocknote/react\";\nimport { forwardRef } from \"react\";\n\nimport { cn } from \"../../lib/utils.js\";\n\nexport const GridSuggestionMenu = forwardRef<\n  HTMLDivElement,\n  ComponentProps[\"GridSuggestionMenu\"][\"Root\"]\n>((props, ref) => {\n  const { className, children, id, columns, ...rest } = props;\n\n  assertEmpty(rest);\n\n  return (\n    <div\n      // Styles from ShadCN DropdownMenuContent component\n      className={cn(\n        \"bg-popover text-popover-foreground z-50 min-w-32 overflow-x-hidden overflow-y-auto rounded-md p-1 shadow-md ring-1 ring-foreground/10\",\n        \"grid\",\n        className,\n      )}\n      style={{ gridTemplateColumns: `repeat(${columns}, 1fr)` } as any}\n      ref={ref}\n      id={id}\n      role=\"grid\"\n    >\n      {children}\n    </div>\n  );\n});\n","import { assertEmpty } from \"@blocknote/core\";\nimport { ComponentProps } from \"@blocknote/react\";\nimport { forwardRef } from \"react\";\n\nexport const GridSuggestionMenuEmptyItem = forwardRef<\n  HTMLDivElement,\n  ComponentProps[\"GridSuggestionMenu\"][\"EmptyItem\"]\n>((props, ref) => {\n  const { className, children, columns, ...rest } = props;\n\n  assertEmpty(rest);\n\n  return (\n    <div\n      className={className}\n      style={{ gridColumn: `1 / ${columns + 1}` }}\n      ref={ref}\n    >\n      {children}\n    </div>\n  );\n});\n","import { ComponentProps } from \"@blocknote/react\";\nimport { forwardRef } from \"react\";\n\nimport { assertEmpty } from \"@blocknote/core\";\nimport { cn } from \"../lib/utils.js\";\n\nexport const SuggestionMenu = forwardRef<\n  HTMLDivElement,\n  ComponentProps[\"SuggestionMenu\"][\"Root\"]\n>((props, ref) => {\n  const { className, children, id, ...rest } = props;\n\n  assertEmpty(rest);\n\n  return (\n    <div\n      id={id}\n      role=\"listbox\"\n      // Styles from ShadCN DropdownMenuContent component\n      className={cn(\n        \"bg-popover text-popover-foreground z-50 min-w-32 overflow-x-hidden overflow-y-auto rounded-md p-1 shadow-md ring-1 ring-foreground/10\",\n        className,\n      )}\n      ref={ref}\n    >\n      {children}\n    </div>\n  );\n});\n","import { assertEmpty } from \"@blocknote/core\";\nimport { ComponentProps } from \"@blocknote/react\";\nimport { forwardRef } from \"react\";\n\nimport { cn } from \"../lib/utils.js\";\n\nexport const SuggestionMenuEmptyItem = forwardRef<\n  HTMLDivElement,\n  ComponentProps[\"SuggestionMenu\"][\"EmptyItem\"]\n>((props, ref) => {\n  const { className, children, ...rest } = props;\n\n  assertEmpty(rest);\n\n  return (\n    <div\n      // Styles from ShadCN DropdownMenuItem component\n      className={cn(\n        \"focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*=text-])]:text-muted-foreground outline-hidden relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm data-[disabled]:pointer-events-none data-[inset]:pl-8 data-[disabled]:opacity-50 [&_svg:not([class*=size-])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n        \"hover:bg-accent hover:text-accent-foreground data-[variant=destructive]:hover:bg-destructive/10 dark:data-[variant=destructive]:hover:bg-destructive/20 data-[variant=destructive]:hover:text-destructive\",\n        \"aria-selected:bg-accent aria-selected:text-accent-foreground data-[variant=destructive]:aria-selected:bg-destructive/10 dark:data-[variant=destructive]:aria-selected:bg-destructive/20 data-[variant=destructive]:aria-selected:text-destructive\",\n        className,\n      )}\n      ref={ref}\n    >\n      <div>{children}</div>\n    </div>\n  );\n});\n","import { assertEmpty } from \"@blocknote/core\";\nimport { ComponentProps, elementOverflow, mergeRefs } from \"@blocknote/react\";\nimport { forwardRef, useEffect, useRef } from \"react\";\n\nimport { cn } from \"../lib/utils.js\";\nimport { useShadCNComponentsContext } from \"../ShadCNComponentsContext.js\";\n\nexport const SuggestionMenuItem = forwardRef<\n  HTMLDivElement,\n  ComponentProps[\"SuggestionMenu\"][\"Item\"]\n>((props, ref) => {\n  const ShadCNComponents = useShadCNComponentsContext()!;\n\n  const { className, item, isSelected, onClick, id, ...rest } = props;\n\n  assertEmpty(rest);\n\n  const itemRef = useRef<HTMLDivElement>(null);\n\n  useEffect(() => {\n    if (!itemRef.current || !isSelected) {\n      return;\n    }\n\n    const overflow = elementOverflow(\n      itemRef.current,\n      itemRef.current.closest(\".bn-suggestion-menu, #ai-suggestion-menu\")!,\n    );\n\n    if (overflow !== \"none\") {\n      itemRef.current.scrollIntoView({ block: \"nearest\" });\n    }\n  }, [isSelected]);\n\n  return (\n    <div\n      // Styles from ShadCN DropdownMenuItem component\n      className={cn(\n        \"focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*=text-])]:text-muted-foreground outline-hidden relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm data-[disabled]:pointer-events-none data-[inset]:pl-8 data-[disabled]:opacity-50 [&_svg:not([class*=size-])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n        \"hover:bg-accent hover:text-accent-foreground data-[variant=destructive]:hover:bg-destructive/10 dark:data-[variant=destructive]:hover:bg-destructive/20 data-[variant=destructive]:hover:text-destructive\",\n        \"aria-selected:bg-accent aria-selected:text-accent-foreground data-[variant=destructive]:aria-selected:bg-destructive/10 dark:data-[variant=destructive]:aria-selected:bg-destructive/20 data-[variant=destructive]:aria-selected:text-destructive\",\n        props.item.size === \"small\" ? \"gap-3 py-1\" : \"\",\n        className,\n      )}\n      data-highlighted\n      ref={mergeRefs([ref, itemRef])}\n      id={id}\n      onMouseDown={(event) => event.preventDefault()}\n      onClick={onClick}\n      role=\"option\"\n      aria-selected={isSelected || undefined}\n    >\n      {item.icon && (\n        <div\n          className={cn(\n            \"p-3\",\n            props.item.size === \"small\" ? \"p-0\" : \"\",\n            className,\n          )}\n          data-position=\"left\"\n        >\n          {item.icon}\n        </div>\n      )}\n      <div className=\"flex-1\">\n        <div\n          className={cn(\n            \"text-base\",\n            props.item.size === \"small\" ? \"text-sm\" : \"\",\n            className,\n          )}\n        >\n          {item.title}\n        </div>\n        <div\n          className={cn(\n            \"text-xs\",\n            props.item.size === \"small\" ? \"hidden\" : \"\",\n            className,\n          )}\n        >\n          {item.subtext}\n        </div>\n      </div>\n      {item.badge && (\n        <div data-position=\"right\" className=\"text-xs\">\n          <ShadCNComponents.Badge.Badge variant={\"secondary\"}>\n            {item.badge}\n          </ShadCNComponents.Badge.Badge>\n        </div>\n      )}\n    </div>\n  );\n});\n","import { assertEmpty } from \"@blocknote/core\";\nimport { ComponentProps } from \"@blocknote/react\";\nimport { forwardRef } from \"react\";\n\nimport { cn } from \"../lib/utils.js\";\n\nexport const SuggestionMenuLabel = forwardRef<\n  HTMLDivElement,\n  ComponentProps[\"SuggestionMenu\"][\"Label\"]\n>((props, ref) => {\n  const { className, children, ...rest } = props;\n\n  assertEmpty(rest);\n\n  return (\n    <div\n      // Styles from ShadCN DropdownMenuLabel component\n      className={cn(\n        \"px-2 py-1.5 text-sm font-medium data-[inset]:pl-8\",\n        className,\n      )}\n      ref={ref}\n    >\n      {children}\n    </div>\n  );\n});\n","import { assertEmpty } from \"@blocknote/core\";\nimport { ComponentProps } from \"@blocknote/react\";\nimport { forwardRef } from \"react\";\n\nimport { cn } from \"../lib/utils.js\";\n\nexport const SuggestionMenuLoader = forwardRef<\n  HTMLDivElement,\n  ComponentProps[\"SuggestionMenu\"][\"Loader\"]\n>((props, ref) => {\n  const { className, ...rest } = props;\n\n  assertEmpty(rest);\n\n  return (\n    <div className={cn(className, \"animate-spin\")} ref={ref}>\n      {/* Taken from Google Material Icons */}\n      {/* https://fonts.google.com/icons?selected=Material+Symbols+Rounded:progress_activity:FILL@0;wght@400;GRAD@0;opsz@24&icon.query=load&icon.size=24&icon.color=%23e8eaed&icon.set=Material+Symbols&icon.style=Rounded&icon.platform=web */}\n      <svg\n        xmlns=\"http://www.w3.org/2000/svg\"\n        height=\"1em\"\n        viewBox=\"0 -960 960 960\"\n        width=\"1em\"\n        fill=\"#e8eaed\"\n      >\n        <path d=\"M480-80q-82 0-155-31.5t-127.5-86Q143-252 111.5-325T80-480q0-83 31.5-155.5t86-127Q252-817 325-848.5T480-880q17 0 28.5 11.5T520-840q0 17-11.5 28.5T480-800q-133 0-226.5 93.5T160-480q0 133 93.5 226.5T480-160q133 0 226.5-93.5T800-480q0-17 11.5-28.5T840-520q17 0 28.5 11.5T880-480q0 82-31.5 155t-86 127.5q-54.5 54.5-127 86T480-80Z\" />\n      </svg>\n    </div>\n  );\n});\n","import { assertEmpty } from \"@blocknote/core\";\nimport { ComponentProps } from \"@blocknote/react\";\nimport { forwardRef } from \"react\";\n\nimport { cn } from \"../lib/utils.js\";\n\nexport const AttributionTooltip = forwardRef<\n  HTMLSpanElement,\n  ComponentProps[\"AttributionTooltip\"][\"Root\"]\n>((props, ref) => {\n  const { className, markClassName, backgroundColor, children, ...rest } =\n    props;\n\n  assertEmpty(rest);\n\n  return (\n    <span\n      className={cn(className, markClassName)}\n      style={markClassName ? undefined : { backgroundColor }}\n      ref={ref}\n    >\n      {children}\n    </span>\n  );\n});\n","import { assertEmpty } from \"@blocknote/core\";\nimport { ComponentProps } from \"@blocknote/react\";\nimport { forwardRef } from \"react\";\n\nimport { cn } from \"../lib/utils.js\";\nimport { useShadCNComponentsContext } from \"../ShadCNComponentsContext.js\";\n\nexport const ExtendButton = forwardRef<\n  HTMLButtonElement,\n  ComponentProps[\"TableHandle\"][\"ExtendButton\"]\n>((props, ref) => {\n  const { className, children, onMouseDown, onClick, ...rest } = props;\n\n  // false, because rest props can be added by shadcn when button is used as a trigger\n  // assertEmpty in this case is only used at typescript level, not runtime level\n  assertEmpty(rest, false);\n\n  const ShadCNComponents = useShadCNComponentsContext()!;\n\n  return (\n    <ShadCNComponents.Button.Button\n      variant={\"ghost\"}\n      className={cn(\n        className,\n        \"h-full w-full p-0 text-gray-400\",\n        className?.includes(\"extend-button-add-remove-columns\")\n          ? \"ml-1\"\n          : \"mt-1\",\n        className?.includes(\"extend-button-editing\")\n          ? \"bg-accent text-accent-foreground\"\n          : \"\",\n      )}\n      ref={ref}\n      onClick={onClick}\n      onMouseDown={onMouseDown}\n      {...rest}\n    >\n      {children}\n    </ShadCNComponents.Button.Button>\n  );\n});\n","import { assertEmpty } from \"@blocknote/core\";\nimport { ComponentProps } from \"@blocknote/react\";\nimport { forwardRef } from \"react\";\n\nimport { cn } from \"../lib/utils.js\";\nimport { useShadCNComponentsContext } from \"../ShadCNComponentsContext.js\";\n\nexport const TableHandle = forwardRef<\n  HTMLButtonElement,\n  ComponentProps[\"TableHandle\"][\"Root\"]\n>((props, ref) => {\n  const {\n    className,\n    children,\n    draggable,\n    onDragStart,\n    onDragEnd,\n    style,\n    label,\n    ...rest\n  } = props;\n\n  // false, because rest props can be added by shadcn when button is used as a trigger\n  // assertEmpty in this case is only used at typescript level, not runtime level\n  assertEmpty(rest, false);\n\n  const ShadCNComponents = useShadCNComponentsContext()!;\n\n  return (\n    <ShadCNComponents.Button.Button\n      variant={\"ghost\"}\n      className={cn(className, \"h-fit w-fit p-0 text-gray-400\")}\n      ref={ref}\n      aria-label={label}\n      draggable={draggable}\n      onDragStart={onDragStart}\n      onDragEnd={onDragEnd}\n      style={style}\n      {...rest}\n    >\n      {children}\n    </ShadCNComponents.Button.Button>\n  );\n});\n","import { assertEmpty } from \"@blocknote/core\";\nimport {\n  ComponentProps,\n  preventFocusOnTap,\n  usePortalElement,\n} from \"@blocknote/react\";\nimport { forwardRef, type HTMLAttributes, type MouseEvent } from \"react\";\n\nimport { preventFocusOnOpenProps } from \"../lib/preventFocusOnOpen.js\";\nimport { cn } from \"../lib/utils.js\";\nimport { useShadCNComponentsContext } from \"../ShadCNComponentsContext.js\";\n\ntype ToolbarProps = ComponentProps[\"Generic\"][\"Toolbar\"][\"Root\"];\n\nexport const Toolbar = forwardRef<HTMLDivElement, ToolbarProps>(\n  (props, ref) => {\n    const {\n      className,\n      children,\n      onMouseEnter,\n      onMouseLeave,\n      variant,\n      ...rest\n    } = props;\n\n    assertEmpty(rest);\n\n    const ShadCNComponents = useShadCNComponentsContext()!;\n\n    return (\n      <ShadCNComponents.Tooltip.TooltipProvider delay={0}>\n        <div\n          className={cn(\n            className,\n            \"bg-popover text-popover-foreground flex h-fit gap-1 rounded-lg border p-1 shadow-md\",\n            variant === \"action-toolbar\" ? \"w-fit\" : \"\",\n          )}\n          ref={ref}\n          onMouseEnter={onMouseEnter}\n          onMouseLeave={onMouseLeave}\n        >\n          {children}\n        </div>\n      </ShadCNComponents.Tooltip.TooltipProvider>\n    );\n  },\n);\n\n// Base UI merges its own props into a `render` element (the trigger's HTML\n// attributes, handlers and ref). This button is the render element of the\n// tooltip, menu and popover triggers, so it receives those on top of the\n// generic Button props.\ntype ToolbarButtonProps = ComponentProps[\"Generic\"][\"Toolbar\"][\"Button\"] &\n  HTMLAttributes<HTMLButtonElement>;\n\nexport const ToolbarButton = forwardRef<HTMLButtonElement, ToolbarButtonProps>(\n  (props, ref) => {\n    const {\n      className,\n      children,\n      mainTooltip,\n      secondaryTooltip,\n      icon,\n      isSelected,\n      isDisabled,\n      onClick,\n      label,\n      variant,\n      onMouseDown: triggerMouseDown,\n      ...rest\n    } = props;\n\n    // Every generic prop is taken above, so only what Base UI injected may\n    // remain: a forgotten generic prop fails to compile here. Type-level only;\n    // at runtime the injected attributes are expected.\n    assertEmpty(\n      rest as Omit<typeof rest, keyof HTMLAttributes<HTMLButtonElement>>,\n      false,\n    );\n\n    const ShadCNComponents = useShadCNComponentsContext()!;\n\n    // Portal the tooltip into the ambient portal target (a themed `.bn-root`)\n    // so it inherits the editor's light/dark color scheme instead of the\n    // document body's.\n    // NOTE: Only ShadCN Badge / Tooltip depend on usePortalElement.\n    // Alternative would be to pass a portalElement to these components, but they\n    // would be ignored by ariakit / mantine. For now keep these two exceptions\n    // (ideally skin components don't have a dependency on the editor's context)\n\n    const portalElement = usePortalElement();\n\n    const onMouseDown = (e: MouseEvent<HTMLButtonElement>) => {\n      preventFocusOnTap(e);\n      triggerMouseDown?.(e);\n    };\n\n    const trigger =\n      isSelected === undefined ? (\n        <ShadCNComponents.Button.Button\n          className={cn(\n            className,\n            variant === \"compact\" ? \"h-6 min-w-6 p-0\" : \"\",\n          )}\n          variant=\"ghost\"\n          size={variant === \"compact\" ? \"sm\" : \"default\"}\n          disabled={isDisabled}\n          onClick={onClick}\n          ref={ref}\n          aria-label={label}\n          {...rest}\n          onMouseDown={onMouseDown}\n        >\n          {icon}\n          {children}\n        </ShadCNComponents.Button.Button>\n      ) : (\n        <ShadCNComponents.Toggle.Toggle\n          className={cn(\n            className,\n            \"aria-expanded:bg-accent aria-expanded:text-accent-foreground\",\n            variant === \"compact\" ? \"h-6 min-w-6 p-0\" : \"\",\n          )}\n          size={variant === \"compact\" ? \"sm\" : \"default\"}\n          aria-label={label}\n          onClick={onClick}\n          pressed={isSelected}\n          disabled={isDisabled}\n          ref={ref}\n          {...rest}\n          onMouseDown={onMouseDown}\n        >\n          {icon}\n          {children}\n        </ShadCNComponents.Toggle.Toggle>\n      );\n\n    return (\n      <ShadCNComponents.Tooltip.Tooltip>\n        <ShadCNComponents.Tooltip.TooltipTrigger render={trigger} />\n        <ShadCNComponents.Tooltip.TooltipContent\n          container={portalElement}\n          className={\"flex flex-col items-center whitespace-pre-wrap\"}\n        >\n          <span>{mainTooltip}</span>\n          {secondaryTooltip && <span>{secondaryTooltip}</span>}\n        </ShadCNComponents.Tooltip.TooltipContent>\n      </ShadCNComponents.Tooltip.Tooltip>\n    );\n  },\n);\n\nexport const ToolbarSelect = forwardRef<\n  HTMLDivElement,\n  ComponentProps[\"FormattingToolbar\"][\"Select\"]\n>((props, ref) => {\n  const {\n    className,\n    items,\n    isDisabled,\n    portalElement,\n    // Base UI has no `initialFocus` on Select; see lib/preventFocusOnOpen.ts.\n    preventFocusOnOpen,\n    ...rest\n  } = props;\n\n  assertEmpty(rest);\n\n  const ShadCNComponents = useShadCNComponentsContext()!;\n\n  // TODO?\n  const SelectItemContent = (props: any) => (\n    <div className={\"flex items-center gap-1\"}>\n      {props.icon}\n      {props.text}\n    </div>\n  );\n\n  const selectedItem = items.filter((p) => p.isSelected)[0];\n\n  if (!selectedItem) {\n    return null;\n  }\n\n  return (\n    <ShadCNComponents.Select.Select\n      value={selectedItem.text}\n      onValueChange={(value) =>\n        items.find((item) => item.text === value)!.onClick?.()\n      }\n      disabled={isDisabled}\n    >\n      <ShadCNComponents.Select.SelectTrigger\n        className={\"border-none\"}\n        // How-to-test: without it, tapping the block type select focuses the button and closes the keyboard (covered by skinFocus, android, shadcn: \"opening the block type select keeps focus in the editor\").\n        onMouseDown={preventFocusOnTap}\n      >\n        <ShadCNComponents.Select.SelectValue />\n      </ShadCNComponents.Select.SelectTrigger>\n      <ShadCNComponents.Select.SelectContent\n        className={className}\n        container={portalElement}\n        // Position the dropdown below the trigger (classic dropdown behavior)\n        // instead of aligning the selected item over the trigger (the Base UI\n        // default).\n        alignItemWithTrigger={false}\n        ref={ref}\n        // How-to-test: without it, opening the block type select focuses the listbox and closes the keyboard (covered by skinFocus, android, shadcn: \"opening the block type select keeps focus in the editor\").\n        {...preventFocusOnOpenProps(preventFocusOnOpen ?? false)}\n      >\n        {items.map((item) => (\n          <ShadCNComponents.Select.SelectItem\n            disabled={item.isDisabled}\n            key={item.text}\n            value={item.text}\n            // How-to-test: without it, tapping a block type focuses the option and closes the keyboard (covered by skinFocus, android, shadcn: \"picking from the block type select leaves focus in the editor\").\n            onMouseDown={preventFocusOnTap}\n          >\n            <SelectItemContent {...item} />\n          </ShadCNComponents.Select.SelectItem>\n        ))}\n      </ShadCNComponents.Select.SelectContent>\n    </ShadCNComponents.Select.Select>\n  );\n});\n","import { assertEmpty } from \"@blocknote/core\";\nimport { ComponentProps } from \"@blocknote/react\";\nimport { forwardRef } from \"react\";\n\nimport { cn } from \"../lib/utils.js\";\nimport { useShadCNComponentsContext } from \"../ShadCNComponentsContext.js\";\n\nexport const Card = forwardRef<\n  HTMLDivElement,\n  ComponentProps[\"Comments\"][\"Card\"]\n>((props, ref) => {\n  const {\n    className,\n    children,\n    selected,\n    headerText,\n    onFocus,\n    onBlur,\n    tabIndex,\n    ...rest\n  } = props;\n\n  assertEmpty(rest);\n\n  const ShadCNComponents = useShadCNComponentsContext()!;\n\n  return (\n    <ShadCNComponents.Card.Card\n      className={cn(\n        className,\n        \"w-[300px]\",\n        selected ? \"bg-accent text-accent-foreground\" : \"\",\n      )}\n      onFocus={onFocus}\n      onBlur={onBlur}\n      tabIndex={tabIndex}\n      ref={ref}\n    >\n      {headerText && (\n        <div className={\"px-4 pt-4 text-sm italic\"}>{headerText}</div>\n      )}\n      {children}\n    </ShadCNComponents.Card.Card>\n  );\n});\n\nexport const CardSection = forwardRef<\n  HTMLDivElement,\n  ComponentProps[\"Comments\"][\"CardSection\"]\n>((props, ref) => {\n  const { className, children, ...rest } = props;\n\n  assertEmpty(rest);\n\n  return (\n    <div\n      className={cn(\n        className,\n        \"p-4\",\n        className?.includes(\"thread-comments\")\n          ? \"flex flex-col gap-6 border-b\"\n          : \"\",\n      )}\n      ref={ref}\n    >\n      {children}\n    </div>\n  );\n});\n\nexport const ExpandSectionsPrompt = forwardRef<\n  HTMLButtonElement,\n  ComponentProps[\"Comments\"][\"ExpandSectionsPrompt\"]\n>((props, ref) => {\n  const { className, children, ...rest } = props;\n\n  assertEmpty(rest, false);\n\n  const ShadCNComponents = useShadCNComponentsContext()!;\n\n  return (\n    <ShadCNComponents.Button.Button\n      className={cn(\n        className,\n        \"text-foreground w-fit bg-transparent p-0 hover:bg-transparent\",\n      )}\n      ref={ref}\n    >\n      {children}\n    </ShadCNComponents.Button.Button>\n  );\n});\n","import { assertEmpty } from \"@blocknote/core\";\nimport {\n  ComponentProps,\n  useDictionary,\n  useFocusWithin,\n} from \"@blocknote/react\";\nimport { forwardRef, useState } from \"react\";\n\nimport { cn } from \"../lib/utils.js\";\nimport { useShadCNComponentsContext } from \"../ShadCNComponentsContext.js\";\n\nconst AuthorInfo = forwardRef<\n  HTMLDivElement,\n  Pick<\n    ComponentProps[\"Comments\"][\"Comment\"],\n    \"authorInfo\" | \"timeString\" | \"edited\"\n  >\n>((props, _ref) => {\n  const { authorInfo, timeString, edited, ...rest } = props;\n  const dict = useDictionary();\n\n  assertEmpty(rest, false);\n\n  const ShadCNComponents = useShadCNComponentsContext()!;\n\n  if (authorInfo === \"loading\") {\n    return (\n      <div className={\"flex flex-row flex-nowrap items-center gap-4\"}>\n        <ShadCNComponents.Skeleton.Skeleton\n          className={\"size-7 animate-pulse rounded-full bg-neutral-400\"}\n        />\n        <ShadCNComponents.Skeleton.Skeleton\n          className={\"h-3 w-32 animate-pulse rounded-full bg-neutral-400\"}\n        />\n      </div>\n    );\n  }\n\n  return (\n    <div className={\"flex flex-row flex-nowrap items-center gap-4\"}>\n      <ShadCNComponents.Avatar.Avatar>\n        <ShadCNComponents.Avatar.AvatarImage\n          src={authorInfo.avatarUrl}\n          alt={authorInfo.username}\n          className={\"h-7 rounded-full\"}\n        />\n        <ShadCNComponents.Avatar.AvatarFallback>\n          {authorInfo.username[0]}\n        </ShadCNComponents.Avatar.AvatarFallback>\n      </ShadCNComponents.Avatar.Avatar>\n\n      <div className={\"flex flex-row flex-nowrap items-center gap-2\"}>\n        <span className={\"text-sm font-bold\"}>{authorInfo.username}</span>\n        <span className={\"text-xs\"}>\n          {timeString} {edited && `(${dict.comments.edited})`}\n        </span>\n      </div>\n    </div>\n  );\n});\n\nexport const Comment = forwardRef<\n  HTMLDivElement,\n  ComponentProps[\"Comments\"][\"Comment\"]\n>((props, ref) => {\n  const {\n    className,\n    showActions,\n    authorInfo: _authorInfo,\n    timeString: _timeString,\n    actions,\n    edited: _edited,\n    emojiPickerOpen,\n    children,\n    ...rest\n  } = props;\n\n  assertEmpty(rest);\n\n  const [hovered, setHovered] = useState(false);\n  const { focused, ref: focusRef } = useFocusWithin();\n\n  const doShowActions =\n    actions &&\n    (showActions === true ||\n      showActions === undefined ||\n      (showActions === \"hover\" && hovered) ||\n      focused ||\n      emojiPickerOpen);\n\n  return (\n    <div\n      ref={ref}\n      className={cn(className, \"relative flex flex-col gap-2\")}\n      onMouseEnter={() => setHovered(true)}\n      onMouseLeave={() => setHovered(false)}\n    >\n      {doShowActions ? (\n        <div className={\"absolute top-0 right-0 z-10\"} ref={focusRef}>\n          {actions}\n        </div>\n      ) : null}\n      <AuthorInfo {...props} />\n      {children}\n    </div>\n  );\n});\n","import { assertEmpty } from \"@blocknote/core\";\nimport {\n  ComponentProps,\n  FormattingToolbar,\n  FormattingToolbarController,\n  getFormattingToolbarItems,\n  useBlockNoteContext,\n} from \"@blocknote/react\";\nimport { forwardRef } from \"react\";\n\nimport { BlockNoteView } from \"../BlockNoteView.js\";\nimport { cn } from \"../lib/utils.js\";\n\nexport const Editor = forwardRef<\n  HTMLDivElement,\n  ComponentProps[\"Comments\"][\"Editor\"]\n>((props, ref) => {\n  const {\n    className,\n    onFocus,\n    onBlur,\n    autoFocus,\n    editor: _editor,\n    editable,\n    ...rest\n  } = props;\n\n  assertEmpty(rest);\n\n  const blockNoteContext = useBlockNoteContext();\n\n  return (\n    <BlockNoteView\n      autoFocus={autoFocus}\n      className={cn(className, \"\")}\n      theme={blockNoteContext?.colorSchemePreference}\n      editor={props.editor}\n      sideMenu={false}\n      slashMenu={false}\n      tableHandles={false}\n      filePanel={false}\n      formattingToolbar={false}\n      editable={editable}\n      ref={ref}\n      onFocus={onFocus}\n      onBlur={onBlur}\n    >\n      <FormattingToolbarController\n        formattingToolbar={CustomFormattingToolbar}\n      />\n    </BlockNoteView>\n  );\n});\n\nconst CustomFormattingToolbar = () => {\n  const items = getFormattingToolbarItems([]).filter(\n    (el) => el.key !== \"nestBlockButton\" && el.key !== \"unnestBlockButton\",\n  );\n  return (\n    <FormattingToolbar blockTypeSelectItems={[]}>{items}</FormattingToolbar>\n  );\n};\n","import { assertEmpty } from \"@blocknote/core\";\nimport { ComponentProps, usePortalElement } from \"@blocknote/react\";\nimport { forwardRef } from \"react\";\n\nimport { cn } from \"../lib/utils.js\";\nimport { useShadCNComponentsContext } from \"../ShadCNComponentsContext.js\";\n\nexport const Badge = forwardRef<\n  HTMLButtonElement,\n  ComponentProps[\"Generic\"][\"Badge\"][\"Root\"]\n>((props, ref) => {\n  const {\n    className,\n    text,\n    icon,\n    isSelected,\n    mainTooltip,\n    secondaryTooltip,\n    onClick,\n    onMouseEnter,\n    ...rest\n  } = props;\n\n  assertEmpty(rest, false);\n\n  const ShadCNComponents = useShadCNComponentsContext()!;\n\n  // Portal the tooltip into the ambient portal target (a themed `.bn-root`)\n  // so it inherits the editor's light/dark color scheme instead of the\n  // document body's.\n  // NOTE: Only ShadCN Badge / Tooltip depend on usePortalElement.\n  // Alternative would be to pass a portalElement to these components, but they\n  // would be ignored by ariakit / mantine. For now keep these two exceptions\n  // (ideally skin components don't have a dependency on the editor's context)\n  const portalElement = usePortalElement();\n\n  const badge = (\n    <ShadCNComponents.Button.Button\n      variant={isSelected ? \"secondary\" : \"outline\"}\n      className={cn(\n        className,\n        \"flex h-7 items-center gap-1 rounded-full px-2.5\",\n      )}\n      onClick={onClick}\n      onMouseEnter={onMouseEnter}\n      ref={ref}\n    >\n      <span>{icon}</span>\n      <span>{text}</span>\n    </ShadCNComponents.Button.Button>\n  );\n\n  if (!mainTooltip) {\n    return badge;\n  }\n\n  return (\n    <ShadCNComponents.Tooltip.Tooltip>\n      <ShadCNComponents.Tooltip.TooltipTrigger render={badge} />\n      <ShadCNComponents.Tooltip.TooltipContent\n        container={portalElement}\n        className={\"flex flex-col items-center whitespace-pre-wrap\"}\n      >\n        <span>{mainTooltip}</span>\n        {secondaryTooltip && <span>{secondaryTooltip}</span>}\n      </ShadCNComponents.Tooltip.TooltipContent>\n    </ShadCNComponents.Tooltip.Tooltip>\n  );\n});\n\nexport const BadgeGroup = forwardRef<\n  HTMLDivElement,\n  ComponentProps[\"Generic\"][\"Badge\"][\"Group\"]\n>((props, ref) => {\n  const { className, children, ...rest } = props;\n\n  assertEmpty(rest);\n\n  const ShadCNComponents = useShadCNComponentsContext()!;\n\n  return (\n    <ShadCNComponents.Tooltip.TooltipProvider delay={0}>\n      <div\n        className={cn(className, \"flex w-full flex-row flex-wrap gap-1\")}\n        ref={ref}\n      >\n        {children}\n      </div>\n    </ShadCNComponents.Tooltip.TooltipProvider>\n  );\n});\n","import { assertEmpty } from \"@blocknote/core\";\nimport { ComponentProps } from \"@blocknote/react\";\nimport { forwardRef } from \"react\";\n\nimport { cn } from \"../lib/utils.js\";\nimport { useShadCNComponentsContext } from \"../ShadCNComponentsContext.js\";\n\nexport const Sidebar = forwardRef<\n  HTMLDivElement,\n  ComponentProps[\"Versioning\"][\"Sidebar\"]\n>((props, ref) => {\n  const { className, children, ...rest } = props;\n\n  assertEmpty(rest, false);\n\n  return (\n    <div className={cn(className)} ref={ref}>\n      {children}\n    </div>\n  );\n});\n\nexport const Snapshot = forwardRef<\n  HTMLDivElement,\n  ComponentProps[\"Versioning\"][\"Snapshot\"]\n>((props, ref) => {\n  const {\n    className,\n    selected,\n    comparing,\n    onClick,\n    actions,\n    children,\n    ...rest\n  } = props;\n\n  assertEmpty(rest, false);\n\n  const ShadCNComponents = useShadCNComponentsContext()!;\n\n  return (\n    <ShadCNComponents.Card.Card\n      // `bn-snapshot` (and the `selected`/`comparing` state classes) carry the\n      // shared sidebar CSS, which also styles this row's children — so they're\n      // kept and Tailwind is merged alongside, as in `Comments/Card`. The\n      // utilities below only neutralize `Card`'s own defaults (`gap-6`,\n      // `rounded-xl`, `py-6`, `shadow-sm`) where they'd fight that CSS.\n      className={cn(\n        className,\n        selected ? \"selected\" : \"\",\n        comparing ? \"comparing\" : \"\",\n        \"gap-0 rounded-lg py-0 shadow-none\",\n      )}\n      onClick={onClick}\n      ref={ref}\n    >\n      {children}\n      {actions && (\n        // Isolate the actions area so clicks on the menu (trigger and items,\n        // which render inline rather than in a portal) don't bubble to the\n        // row's select handler.\n        <div\n          className={\"bn-snapshot-menu\"}\n          onClick={(event) => event.stopPropagation()}\n        >\n          {actions}\n        </div>\n      )}\n    </ShadCNComponents.Card.Card>\n  );\n});\n","import { assertEmpty } from \"@blocknote/core\";\nimport { ComponentProps } from \"@blocknote/react\";\nimport { forwardRef } from \"react\";\n\nimport { useShadCNComponentsContext } from \"../ShadCNComponentsContext.js\";\n\nexport const PanelButton = forwardRef<\n  HTMLButtonElement,\n  ComponentProps[\"FilePanel\"][\"Button\"]\n>((props, ref) => {\n  const { className, children, type, onClick, label, ...rest } = props;\n\n  assertEmpty(rest);\n\n  const ShadCNComponents = useShadCNComponentsContext()!;\n\n  return (\n    <ShadCNComponents.Button.Button\n      type={type}\n      className={className}\n      aria-label={label}\n      ref={ref}\n      onClick={onClick}\n    >\n      {children}\n    </ShadCNComponents.Button.Button>\n  );\n});\n","import { assertEmpty } from \"@blocknote/core\";\nimport { ComponentProps } from \"@blocknote/react\";\nimport { forwardRef } from \"react\";\n\nimport { useShadCNComponentsContext } from \"../ShadCNComponentsContext.js\";\n\nexport const PanelFileInput = forwardRef<\n  HTMLInputElement,\n  ComponentProps[\"FilePanel\"][\"FileInput\"]\n>((props, ref) => {\n  const { className, accept, value, placeholder, onChange, ...rest } = props;\n\n  assertEmpty(rest);\n\n  const ShadCNComponents = useShadCNComponentsContext()!;\n\n  return (\n    <ShadCNComponents.Input.Input\n      type={\"file\"}\n      className={className}\n      ref={ref}\n      accept={accept}\n      value={value ? value.name : undefined}\n      onChange={async (e) => onChange?.(e.target.files![0])}\n      placeholder={placeholder}\n    />\n  );\n});\n","import { assertEmpty } from \"@blocknote/core\";\nimport { ComponentProps, elementOverflow, mergeRefs } from \"@blocknote/react\";\nimport { forwardRef, useEffect, useRef } from \"react\";\n\nimport { cn } from \"../../lib/utils.js\";\n\nexport const GridSuggestionMenuItem = forwardRef<\n  HTMLDivElement,\n  ComponentProps[\"GridSuggestionMenu\"][\"Item\"]\n>((props, ref) => {\n  const { className, isSelected, onClick, item, id, ...rest } = props;\n\n  assertEmpty(rest);\n\n  const itemRef = useRef<HTMLDivElement>(null);\n\n  useEffect(() => {\n    if (!itemRef.current || !isSelected) {\n      return;\n    }\n\n    const overflow = elementOverflow(\n      itemRef.current,\n      itemRef.current.closest(\".bn-grid-suggestion-menu\")!,\n    );\n\n    if (overflow !== \"none\") {\n      itemRef.current.scrollIntoView({ block: \"nearest\" });\n    }\n  }, [isSelected]);\n\n  return (\n    <div\n      // Styles from ShadCN DropdownMenuItem component\n      className={cn(\n        \"focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*=text-])]:text-muted-foreground outline-hidden relative flex cursor-default select-none items-center gap-2 rounded-sm p-2 text-sm data-[disabled]:pointer-events-none data-[inset]:pl-8 data-[disabled]:opacity-50 [&_svg:not([class*=size-])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n        \"hover:bg-accent hover:text-accent-foreground data-[variant=destructive]:hover:bg-destructive/10 dark:data-[variant=destructive]:hover:bg-destructive/20 data-[variant=destructive]:hover:text-destructive\",\n        \"aria-selected:bg-accent aria-selected:text-accent-foreground data-[variant=destructive]:aria-selected:bg-destructive/10 dark:data-[variant=destructive]:aria-selected:bg-destructive/20 data-[variant=destructive]:aria-selected:text-destructive\",\n        \"text-base!\",\n        className,\n      )}\n      ref={mergeRefs([ref, itemRef])}\n      id={id}\n      role=\"option\"\n      onClick={onClick}\n      aria-selected={isSelected || undefined}\n    >\n      {item.icon}\n    </div>\n  );\n});\n","import { assertEmpty } from \"@blocknote/core\";\nimport { ComponentProps } from \"@blocknote/react\";\nimport { forwardRef } from \"react\";\n\nexport const GridSuggestionMenuLoader = forwardRef<\n  HTMLDivElement,\n  ComponentProps[\"GridSuggestionMenu\"][\"Loader\"]\n>((props, ref) => {\n  const {\n    className,\n    children, // unused, using \"dots\" instead\n    columns,\n    ...rest\n  } = props;\n\n  assertEmpty(rest);\n\n  return (\n    <div\n      className={className}\n      style={{ gridColumn: `1 / ${columns + 1}` }}\n      ref={ref}\n    >\n      {children}\n    </div>\n  );\n});\n","import { Components } from \"@blocknote/react\";\n\nimport { Form } from \"./form/Form.js\";\nimport { TextInput } from \"./form/TextInput.js\";\nimport {\n  Menu,\n  MenuDivider,\n  MenuDropdown,\n  MenuItem,\n  MenuLabel,\n  MenuTrigger,\n} from \"./menu/Menu.js\";\nimport { MenuButton } from \"./menu/Button.js\";\nimport { Panel } from \"./panel/Panel.js\";\nimport { PanelTab } from \"./panel/PanelTab.js\";\nimport { PanelTextInput } from \"./panel/PanelTextInput.js\";\nimport { Popover, PopoverContent, PopoverTrigger } from \"./popover/popover.js\";\nimport { SideMenu } from \"./sideMenu/SideMenu.js\";\nimport { SideMenuButton } from \"./sideMenu/SideMenuButton.js\";\nimport { GridSuggestionMenu } from \"./suggestionMenu/gridSuggestionMenu/GridSuggestionMenu.js\";\nimport { GridSuggestionMenuEmptyItem } from \"./suggestionMenu/gridSuggestionMenu/GridSuggestionMenuEmptyItem.js\";\nimport { SuggestionMenu } from \"./suggestionMenu/SuggestionMenu.js\";\nimport { SuggestionMenuEmptyItem } from \"./suggestionMenu/SuggestionMenuEmptyItem.js\";\nimport { SuggestionMenuItem } from \"./suggestionMenu/SuggestionMenuItem.js\";\nimport { SuggestionMenuLabel } from \"./suggestionMenu/SuggestionMenuLabel.js\";\nimport { SuggestionMenuLoader } from \"./suggestionMenu/SuggestionMenuLoader.js\";\nimport { AttributionTooltip } from \"./attributionMarks/AttributionTooltip.js\";\nimport { ExtendButton } from \"./tableHandle/ExtendButton.js\";\nimport { TableHandle } from \"./tableHandle/TableHandle.js\";\nimport { Toolbar, ToolbarButton, ToolbarSelect } from \"./toolbar/Toolbar.js\";\nimport { Card, CardSection, ExpandSectionsPrompt } from \"./comments/Card.js\";\nimport { Comment } from \"./comments/Comment.js\";\nimport { Editor } from \"./comments/Editor.js\";\nimport { Badge, BadgeGroup } from \"./badge/Badge.js\";\nimport {\n  Sidebar as VersioningSidebar,\n  Snapshot as VersioningSnapshot,\n} from \"./versioning/Versioning.js\";\n\nimport { PanelButton } from \"./panel/PanelButton.js\";\nimport { PanelFileInput } from \"./panel/PanelFileInput.js\";\nimport { GridSuggestionMenuItem } from \"./suggestionMenu/gridSuggestionMenu/GridSuggestionMenuItem.js\";\nimport { GridSuggestionMenuLoader } from \"./suggestionMenu/gridSuggestionMenu/GridSuggestionMenuLoader.js\";\n\nexport const components: Components = {\n  FormattingToolbar: {\n    Root: Toolbar,\n    Button: ToolbarButton,\n    Select: ToolbarSelect,\n  },\n  FilePanel: {\n    Root: Panel,\n    Button: PanelButton,\n    FileInput: PanelFileInput,\n    TabPanel: PanelTab,\n    TextInput: PanelTextInput,\n  },\n  LinkToolbar: {\n    Root: Toolbar,\n    Button: ToolbarButton,\n    Select: ToolbarSelect,\n  },\n  SideMenu: {\n    Root: SideMenu,\n    Button: SideMenuButton,\n  },\n  SuggestionMenu: {\n    Root: SuggestionMenu,\n    Item: SuggestionMenuItem,\n    EmptyItem: SuggestionMenuEmptyItem,\n    Label: SuggestionMenuLabel,\n    Loader: SuggestionMenuLoader,\n  },\n  GridSuggestionMenu: {\n    Root: GridSuggestionMenu,\n    Item: GridSuggestionMenuItem,\n    EmptyItem: GridSuggestionMenuEmptyItem,\n    Loader: GridSuggestionMenuLoader,\n  },\n  TableHandle: {\n    Root: TableHandle,\n    ExtendButton: ExtendButton,\n  },\n  Comments: {\n    Comment: Comment,\n    Editor: Editor,\n    Card: Card,\n    CardSection: CardSection,\n    ExpandSectionsPrompt: ExpandSectionsPrompt,\n  },\n  Versioning: {\n    Sidebar: VersioningSidebar,\n    Snapshot: VersioningSnapshot,\n  },\n  AttributionTooltip: {\n    Root: AttributionTooltip,\n  },\n  Generic: {\n    Badge: {\n      Root: Badge,\n      Group: BadgeGroup,\n    },\n    Toolbar: {\n      Root: Toolbar,\n      Button: ToolbarButton,\n      Select: ToolbarSelect,\n    },\n    Form: {\n      Root: Form,\n      TextInput: TextInput,\n    },\n    Menu: {\n      Root: Menu,\n      Trigger: MenuTrigger,\n      Dropdown: MenuDropdown,\n      Divider: MenuDivider,\n      Label: MenuLabel,\n      Item: MenuItem,\n      Button: MenuButton,\n    },\n    Popover: {\n      Root: Popover,\n      Trigger: PopoverTrigger,\n      Content: PopoverContent,\n    },\n  },\n};\n","import {\n  BlockSchema,\n  InlineContentSchema,\n  mergeCSSClasses,\n  StyleSchema,\n} from \"@blocknote/core\";\nimport { BlockNoteViewRaw, ComponentsContext } from \"@blocknote/react\";\nimport { useMemo } from \"react\";\n\nimport { components } from \"./components.js\";\nimport {\n  ShadCNComponents,\n  ShadCNComponentsContext,\n  ShadCNDefaultComponents,\n} from \"./ShadCNComponentsContext.js\";\n\nimport \"./style.css\";\n\nexport const BlockNoteView = <\n  BSchema extends BlockSchema,\n  ISchema extends InlineContentSchema,\n  SSchema extends StyleSchema,\n>(\n  props: React.ComponentProps<\n    typeof BlockNoteViewRaw<BSchema, ISchema, SSchema>\n  > & {\n    /**\n     * (optional)Provide your own shadcn component overrides\n     */\n    shadCNComponents?: Partial<ShadCNComponents>;\n  },\n) => {\n  const { className, shadCNComponents, ...rest } = props;\n\n  const componentsValue = useMemo(() => {\n    return {\n      ...ShadCNDefaultComponents,\n      ...shadCNComponents,\n    };\n  }, [shadCNComponents]);\n\n  return (\n    <ShadCNComponentsContext.Provider value={componentsValue}>\n      <ComponentsContext.Provider value={components}>\n        <BlockNoteViewRaw\n          className={mergeCSSClasses(\"bn-shadcn\", className || \"\")}\n          {...rest}\n        />\n      </ComponentsContext.Provider>\n    </ShadCNComponentsContext.Provider>\n  );\n};\n"],"mappings":"2qCAGA,IAAa,GAAQ,GAAqD,CACxE,GAAM,CAAE,WAAU,WAAU,eAAc,GAAG,GAAS,EAItD,OAFA,EAAA,EAAA,YAAA,CAAY,CAAI,GAGd,EAAA,EAAA,KAAA,CAAC,OAAD,CACE,UAAW,UACX,SAAW,GAAU,CAEnB,EAAM,eAAe,EACrB,IAAW,CACb,EANF,SAAA,CAQG,EACA,IAAiB,OAAS,KAAO,CAC9B,GAEV,EClBA,SAAgB,EAAG,GAAG,EAAsB,CAC1C,OAAA,EAAO,EAAA,QAAA,EAAA,EAAQ,EAAA,KAAA,CAAK,CAAM,CAAC,CAC7B,CCEA,SAAS,GAAO,CACd,YACA,OAAO,UACP,GAAG,GA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