@suryapamenang/ui 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (216) hide show
  1. package/README.md +81 -0
  2. package/dist/components/basic-blocks-base-kit.d.ts +6 -0
  3. package/dist/components/basic-blocks-base-kit.d.ts.map +1 -0
  4. package/dist/components/basic-blocks-base-kit.js +17 -0
  5. package/dist/components/basic-blocks-kit.d.ts +6 -0
  6. package/dist/components/basic-blocks-kit.d.ts.map +1 -0
  7. package/dist/components/basic-blocks-kit.js +68 -0
  8. package/dist/components/basic-marks-base-kit.d.ts +20 -0
  9. package/dist/components/basic-marks-base-kit.d.ts.map +1 -0
  10. package/dist/components/basic-marks-base-kit.js +15 -0
  11. package/dist/components/basic-marks-kit.d.ts +20 -0
  12. package/dist/components/basic-marks-kit.d.ts.map +1 -0
  13. package/dist/components/basic-marks-kit.js +27 -0
  14. package/dist/components/basic-nodes-kit.d.ts +24 -0
  15. package/dist/components/basic-nodes-kit.d.ts.map +1 -0
  16. package/dist/components/basic-nodes-kit.js +3 -0
  17. package/dist/components/file-upload.d.ts +15 -0
  18. package/dist/components/file-upload.d.ts.map +1 -0
  19. package/dist/components/file-upload.js +29 -0
  20. package/dist/components/multi-step-viewer.d.ts +23 -0
  21. package/dist/components/multi-step-viewer.d.ts.map +1 -0
  22. package/dist/components/multi-step-viewer.js +73 -0
  23. package/dist/components/plate-editor.d.ts +2 -0
  24. package/dist/components/plate-editor.d.ts.map +1 -0
  25. package/dist/components/plate-editor.js +44 -0
  26. package/dist/hooks/use-file-upload.d.ts +46 -0
  27. package/dist/hooks/use-file-upload.d.ts.map +1 -0
  28. package/dist/hooks/use-file-upload.js +228 -0
  29. package/dist/hooks/use-mobile.d.ts +2 -0
  30. package/dist/hooks/use-mobile.d.ts.map +1 -0
  31. package/dist/hooks/use-mobile.js +15 -0
  32. package/dist/hooks/use-multi-step-viewer.d.ts +30 -0
  33. package/dist/hooks/use-multi-step-viewer.d.ts.map +1 -0
  34. package/dist/hooks/use-multi-step-viewer.js +72 -0
  35. package/dist/index.css +3645 -0
  36. package/dist/lib/utils.d.ts +3 -0
  37. package/dist/lib/utils.d.ts.map +1 -0
  38. package/dist/lib/utils.js +5 -0
  39. package/dist/primitives/accordion.d.ts +8 -0
  40. package/dist/primitives/accordion.d.ts.map +1 -0
  41. package/dist/primitives/accordion.js +17 -0
  42. package/dist/primitives/alert-dialog.d.ts +15 -0
  43. package/dist/primitives/alert-dialog.d.ts.map +1 -0
  44. package/dist/primitives/alert-dialog.js +38 -0
  45. package/dist/primitives/avatar.d.ts +7 -0
  46. package/dist/primitives/avatar.d.ts.map +1 -0
  47. package/dist/primitives/avatar.js +13 -0
  48. package/dist/primitives/badge.d.ts +10 -0
  49. package/dist/primitives/badge.d.ts.map +1 -0
  50. package/dist/primitives/badge.js +22 -0
  51. package/dist/primitives/blockquote-node-static.d.ts +3 -0
  52. package/dist/primitives/blockquote-node-static.d.ts.map +1 -0
  53. package/dist/primitives/blockquote-node-static.js +5 -0
  54. package/dist/primitives/blockquote-node.d.ts +3 -0
  55. package/dist/primitives/blockquote-node.d.ts.map +1 -0
  56. package/dist/primitives/blockquote-node.js +5 -0
  57. package/dist/primitives/breadcrumb.d.ts +14 -0
  58. package/dist/primitives/breadcrumb.d.ts.map +1 -0
  59. package/dist/primitives/breadcrumb.js +29 -0
  60. package/dist/primitives/button.d.ts +11 -0
  61. package/dist/primitives/button.d.ts.map +1 -0
  62. package/dist/primitives/button.js +33 -0
  63. package/dist/primitives/calendar.d.ts +9 -0
  64. package/dist/primitives/calendar.d.ts.map +1 -0
  65. package/dist/primitives/calendar.js +73 -0
  66. package/dist/primitives/card.d.ts +10 -0
  67. package/dist/primitives/card.d.ts.map +1 -0
  68. package/dist/primitives/card.js +24 -0
  69. package/dist/primitives/chart.d.ts +42 -0
  70. package/dist/primitives/chart.d.ts.map +1 -0
  71. package/dist/primitives/chart.js +132 -0
  72. package/dist/primitives/checkbox.d.ts +5 -0
  73. package/dist/primitives/checkbox.d.ts.map +1 -0
  74. package/dist/primitives/checkbox.js +8 -0
  75. package/dist/primitives/code-node-static.d.ts +3 -0
  76. package/dist/primitives/code-node-static.d.ts.map +1 -0
  77. package/dist/primitives/code-node-static.js +5 -0
  78. package/dist/primitives/code-node.d.ts +3 -0
  79. package/dist/primitives/code-node.d.ts.map +1 -0
  80. package/dist/primitives/code-node.js +5 -0
  81. package/dist/primitives/command.d.ts +19 -0
  82. package/dist/primitives/command.d.ts.map +1 -0
  83. package/dist/primitives/command.js +33 -0
  84. package/dist/primitives/datepicker.d.ts +8 -0
  85. package/dist/primitives/datepicker.d.ts.map +1 -0
  86. package/dist/primitives/datepicker.js +42 -0
  87. package/dist/primitives/datepicker2.d.ts +8 -0
  88. package/dist/primitives/datepicker2.d.ts.map +1 -0
  89. package/dist/primitives/datepicker2.js +13 -0
  90. package/dist/primitives/dialog.d.ts +16 -0
  91. package/dist/primitives/dialog.d.ts.map +1 -0
  92. package/dist/primitives/dialog.js +35 -0
  93. package/dist/primitives/drawer.d.ts +14 -0
  94. package/dist/primitives/drawer.d.ts.map +1 -0
  95. package/dist/primitives/drawer.js +34 -0
  96. package/dist/primitives/dropdown-menu.d.ts +26 -0
  97. package/dist/primitives/dropdown-menu.d.ts.map +1 -0
  98. package/dist/primitives/dropdown-menu.js +50 -0
  99. package/dist/primitives/dropzone.d.ts +12 -0
  100. package/dist/primitives/dropzone.d.ts.map +1 -0
  101. package/dist/primitives/dropzone.js +7 -0
  102. package/dist/primitives/editor-static.d.ts +9 -0
  103. package/dist/primitives/editor-static.d.ts.map +1 -0
  104. package/dist/primitives/editor-static.js +29 -0
  105. package/dist/primitives/editor.d.ts +29 -0
  106. package/dist/primitives/editor.d.ts.map +1 -0
  107. package/dist/primitives/editor.js +56 -0
  108. package/dist/primitives/field.d.ts +27 -0
  109. package/dist/primitives/field.d.ts.map +1 -0
  110. package/dist/primitives/field.js +77 -0
  111. package/dist/primitives/fixed-toolbar.d.ts +3 -0
  112. package/dist/primitives/fixed-toolbar.d.ts.map +1 -0
  113. package/dist/primitives/fixed-toolbar.js +6 -0
  114. package/dist/primitives/form.d.ts +24 -0
  115. package/dist/primitives/form.d.ts.map +1 -0
  116. package/dist/primitives/form.js +58 -0
  117. package/dist/primitives/heading-node-static.d.ts +15 -0
  118. package/dist/primitives/heading-node-static.d.ts.map +1 -0
  119. package/dist/primitives/heading-node-static.js +37 -0
  120. package/dist/primitives/heading-node.d.ts +15 -0
  121. package/dist/primitives/heading-node.d.ts.map +1 -0
  122. package/dist/primitives/heading-node.js +37 -0
  123. package/dist/primitives/highlight-node-static.d.ts +3 -0
  124. package/dist/primitives/highlight-node-static.d.ts.map +1 -0
  125. package/dist/primitives/highlight-node-static.js +5 -0
  126. package/dist/primitives/highlight-node.d.ts +3 -0
  127. package/dist/primitives/highlight-node.d.ts.map +1 -0
  128. package/dist/primitives/highlight-node.js +5 -0
  129. package/dist/primitives/hr-node-static.d.ts +3 -0
  130. package/dist/primitives/hr-node-static.d.ts.map +1 -0
  131. package/dist/primitives/hr-node-static.js +6 -0
  132. package/dist/primitives/hr-node.d.ts +3 -0
  133. package/dist/primitives/hr-node.d.ts.map +1 -0
  134. package/dist/primitives/hr-node.js +9 -0
  135. package/dist/primitives/input.d.ts +4 -0
  136. package/dist/primitives/input.d.ts.map +1 -0
  137. package/dist/primitives/input.js +6 -0
  138. package/dist/primitives/kbd-node-static.d.ts +3 -0
  139. package/dist/primitives/kbd-node-static.d.ts.map +1 -0
  140. package/dist/primitives/kbd-node-static.js +5 -0
  141. package/dist/primitives/kbd-node.d.ts +3 -0
  142. package/dist/primitives/kbd-node.d.ts.map +1 -0
  143. package/dist/primitives/kbd-node.js +5 -0
  144. package/dist/primitives/kbd.d.ts +4 -0
  145. package/dist/primitives/kbd.d.ts.map +1 -0
  146. package/dist/primitives/kbd.js +9 -0
  147. package/dist/primitives/label.d.ts +5 -0
  148. package/dist/primitives/label.d.ts.map +1 -0
  149. package/dist/primitives/label.js +7 -0
  150. package/dist/primitives/mark-toolbar-button.d.ts +7 -0
  151. package/dist/primitives/mark-toolbar-button.d.ts.map +1 -0
  152. package/dist/primitives/mark-toolbar-button.js +8 -0
  153. package/dist/primitives/pagination.d.ts +14 -0
  154. package/dist/primitives/pagination.d.ts.map +1 -0
  155. package/dist/primitives/pagination.js +29 -0
  156. package/dist/primitives/paragraph-node-static.d.ts +3 -0
  157. package/dist/primitives/paragraph-node-static.d.ts.map +1 -0
  158. package/dist/primitives/paragraph-node-static.js +6 -0
  159. package/dist/primitives/paragraph-node.d.ts +3 -0
  160. package/dist/primitives/paragraph-node.d.ts.map +1 -0
  161. package/dist/primitives/paragraph-node.js +6 -0
  162. package/dist/primitives/popover.d.ts +8 -0
  163. package/dist/primitives/popover.d.ts.map +1 -0
  164. package/dist/primitives/popover.js +16 -0
  165. package/dist/primitives/progress.d.ts +5 -0
  166. package/dist/primitives/progress.d.ts.map +1 -0
  167. package/dist/primitives/progress.js +7 -0
  168. package/dist/primitives/radio-group.d.ts +6 -0
  169. package/dist/primitives/radio-group.d.ts.map +1 -0
  170. package/dist/primitives/radio-group.js +11 -0
  171. package/dist/primitives/scroll-area.d.ts +6 -0
  172. package/dist/primitives/scroll-area.d.ts.map +1 -0
  173. package/dist/primitives/scroll-area.js +12 -0
  174. package/dist/primitives/select.d.ts +16 -0
  175. package/dist/primitives/select.d.ts.map +1 -0
  176. package/dist/primitives/select.js +37 -0
  177. package/dist/primitives/separator.d.ts +5 -0
  178. package/dist/primitives/separator.d.ts.map +1 -0
  179. package/dist/primitives/separator.js +7 -0
  180. package/dist/primitives/sheet.d.ts +14 -0
  181. package/dist/primitives/sheet.d.ts.map +1 -0
  182. package/dist/primitives/sheet.js +39 -0
  183. package/dist/primitives/sidebar.d.ts +71 -0
  184. package/dist/primitives/sidebar.d.ts.map +1 -0
  185. package/dist/primitives/sidebar.js +212 -0
  186. package/dist/primitives/skeleton.d.ts +3 -0
  187. package/dist/primitives/skeleton.d.ts.map +1 -0
  188. package/dist/primitives/skeleton.js +6 -0
  189. package/dist/primitives/sonner.d.ts +4 -0
  190. package/dist/primitives/sonner.d.ts.map +1 -0
  191. package/dist/primitives/sonner.js +20 -0
  192. package/dist/primitives/spinner.d.ts +3 -0
  193. package/dist/primitives/spinner.d.ts.map +1 -0
  194. package/dist/primitives/spinner.js +7 -0
  195. package/dist/primitives/table.d.ts +11 -0
  196. package/dist/primitives/table.d.ts.map +1 -0
  197. package/dist/primitives/table.js +27 -0
  198. package/dist/primitives/tabs.d.ts +8 -0
  199. package/dist/primitives/tabs.d.ts.map +1 -0
  200. package/dist/primitives/tabs.js +16 -0
  201. package/dist/primitives/textarea.d.ts +4 -0
  202. package/dist/primitives/textarea.d.ts.map +1 -0
  203. package/dist/primitives/textarea.js +6 -0
  204. package/dist/primitives/toggle-group.d.ts +10 -0
  205. package/dist/primitives/toggle-group.d.ts.map +1 -0
  206. package/dist/primitives/toggle-group.js +21 -0
  207. package/dist/primitives/toggle.d.ts +10 -0
  208. package/dist/primitives/toggle.d.ts.map +1 -0
  209. package/dist/primitives/toggle.js +25 -0
  210. package/dist/primitives/toolbar.d.ts +43 -0
  211. package/dist/primitives/toolbar.d.ts.map +1 -0
  212. package/dist/primitives/toolbar.js +110 -0
  213. package/dist/primitives/tooltip.d.ts +8 -0
  214. package/dist/primitives/tooltip.d.ts.map +1 -0
  215. package/dist/primitives/tooltip.js +16 -0
  216. package/package.json +88 -0
@@ -0,0 +1,29 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { cva } from "class-variance-authority";
3
+ import { PlateStatic } from "platejs/static";
4
+ import { cn } from "../lib/utils";
5
+ export const editorVariants = cva(cn("group/editor", "relative w-full cursor-text overflow-x-hidden break-words whitespace-pre-wrap select-text", "rounded-md ring-offset-background focus-visible:outline-none", "placeholder:text-muted-foreground/80 **:data-slate-placeholder:top-[auto_!important] **:data-slate-placeholder:text-muted-foreground/80 **:data-slate-placeholder:opacity-100!", "[&_strong]:font-bold"), {
6
+ defaultVariants: {
7
+ variant: "none",
8
+ },
9
+ variants: {
10
+ disabled: {
11
+ true: "cursor-not-allowed opacity-50",
12
+ },
13
+ focused: {
14
+ true: "ring-2 ring-ring ring-offset-2",
15
+ },
16
+ variant: {
17
+ ai: "w-full px-0 text-base md:text-sm",
18
+ aiChat: "max-h-[min(70vh,320px)] w-full max-w-[700px] overflow-y-auto px-5 py-3 text-base md:text-sm",
19
+ default: "size-full px-16 pt-4 pb-72 text-base sm:px-[max(64px,calc(50%-350px))]",
20
+ demo: "size-full px-16 pt-4 pb-72 text-base sm:px-[max(64px,calc(50%-350px))]",
21
+ fullWidth: "size-full px-16 pt-4 pb-72 text-base sm:px-24",
22
+ none: "",
23
+ select: "px-3 py-2 text-base data-readonly:w-fit",
24
+ },
25
+ },
26
+ });
27
+ export function EditorStatic({ className, variant, ...props }) {
28
+ return (_jsx(PlateStatic, { className: cn(editorVariants({ variant }), className), ...props }));
29
+ }
@@ -0,0 +1,29 @@
1
+ import type { VariantProps } from "class-variance-authority";
2
+ import type { PlateContentProps, PlateViewProps } from "platejs/react";
3
+ import * as React from "react";
4
+ declare const editorContainerVariants: (props?: ({
5
+ variant?: "select" | "default" | "comment" | "demo" | null | undefined;
6
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
+ export declare function EditorContainer({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof editorContainerVariants>): React.JSX.Element;
8
+ declare const editorVariants: (props?: ({
9
+ disabled?: boolean | null | undefined;
10
+ focused?: boolean | null | undefined;
11
+ variant?: "select" | "default" | "none" | "comment" | "demo" | "ai" | "aiChat" | "fullWidth" | null | undefined;
12
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
13
+ export type EditorProps = PlateContentProps & VariantProps<typeof editorVariants>;
14
+ export declare const Editor: React.ForwardRefExoticComponent<Omit<import("platejs").EditableProps, "decorate"> & {
15
+ autoFocusOnEditable?: boolean;
16
+ decorate?: import("platejs/react").PlateStoreState["decorate"];
17
+ disabled?: boolean;
18
+ renderEditable?: (editable: React.ReactElement<any>) => React.ReactNode;
19
+ } & VariantProps<(props?: ({
20
+ disabled?: boolean | null | undefined;
21
+ focused?: boolean | null | undefined;
22
+ variant?: "select" | "default" | "none" | "comment" | "demo" | "ai" | "aiChat" | "fullWidth" | null | undefined;
23
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string> & React.RefAttributes<HTMLDivElement>>;
24
+ export declare function EditorView({ className, variant, ...props }: PlateViewProps & VariantProps<typeof editorVariants>): React.JSX.Element;
25
+ export declare namespace EditorView {
26
+ var displayName: string;
27
+ }
28
+ export {};
29
+ //# sourceMappingURL=editor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editor.d.ts","sourceRoot":"","sources":["../../src/primitives/editor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAE7D,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEvE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,QAAA,MAAM,uBAAuB;;8EAuB5B,CAAC;AAEF,wBAAgB,eAAe,CAAC,EAC9B,SAAS,EACT,OAAO,EACP,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,YAAY,CAAC,OAAO,uBAAuB,CAAC,qBAW5E;AAED,QAAA,MAAM,cAAc;;;;8EAiCnB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,iBAAiB,GACzC,YAAY,CAAC,OAAO,cAAc,CAAC,CAAC;AAEtC,eAAO,MAAM,MAAM;;;;;;;;;sHAmBlB,CAAC;AAIF,wBAAgB,UAAU,CAAC,EACzB,SAAS,EACT,OAAO,EACP,GAAG,KAAK,EACT,EAAE,cAAc,GAAG,YAAY,CAAC,OAAO,cAAc,CAAC,qBAOtD;yBAXe,UAAU"}
@@ -0,0 +1,56 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { cva } from "class-variance-authority";
3
+ import { PlateContainer, PlateContent, PlateView } from "platejs/react";
4
+ import * as React from "react";
5
+ import { cn } from "../lib/utils";
6
+ const editorContainerVariants = cva("relative w-full cursor-text overflow-y-auto caret-primary select-text selection:bg-brand/25 focus-visible:outline-none [&_.slate-selection-area]:z-50 [&_.slate-selection-area]:border [&_.slate-selection-area]:border-brand/25 [&_.slate-selection-area]:bg-brand/15", {
7
+ defaultVariants: {
8
+ variant: "default",
9
+ },
10
+ variants: {
11
+ variant: {
12
+ comment: cn("flex flex-wrap justify-between gap-1 px-1 py-0.5 text-sm", "rounded-md border-[1.5px] border-transparent bg-transparent", "has-[[data-slate-editor]:focus]:border-brand/50 has-[[data-slate-editor]:focus]:ring-2 has-[[data-slate-editor]:focus]:ring-brand/30", "has-aria-disabled:border-input has-aria-disabled:bg-muted"),
13
+ default: "h-full",
14
+ demo: "h-[650px]",
15
+ select: cn("group rounded-md border border-input ring-offset-background focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2", "has-data-readonly:w-fit has-data-readonly:cursor-default has-data-readonly:border-transparent has-data-readonly:focus-within:[box-shadow:none]"),
16
+ },
17
+ },
18
+ });
19
+ export function EditorContainer({ className, variant, ...props }) {
20
+ return (_jsx(PlateContainer, { className: cn("ignore-click-outside/toolbar", editorContainerVariants({ variant }), className), ...props }));
21
+ }
22
+ const editorVariants = cva(cn("group/editor", "relative w-full cursor-text overflow-x-hidden break-words whitespace-pre-wrap select-text", "rounded-md ring-offset-background focus-visible:outline-none", "placeholder:text-muted-foreground/80 **:data-slate-placeholder:!top-1/2 **:data-slate-placeholder:-translate-y-1/2 **:data-slate-placeholder:text-muted-foreground/80 **:data-slate-placeholder:opacity-100!", "[&_strong]:font-bold"), {
23
+ defaultVariants: {
24
+ variant: "default",
25
+ },
26
+ variants: {
27
+ disabled: {
28
+ true: "cursor-not-allowed opacity-50",
29
+ },
30
+ focused: {
31
+ true: "ring-2 ring-ring ring-offset-2",
32
+ },
33
+ variant: {
34
+ ai: "w-full px-0 text-base md:text-sm",
35
+ aiChat: "max-h-[min(70vh,320px)] w-full max-w-[700px] overflow-y-auto px-3 py-2 text-base md:text-sm",
36
+ comment: cn("rounded-none border-none bg-transparent text-sm"),
37
+ default: "size-full px-16 pt-4 pb-72 text-base sm:px-[max(64px,calc(50%-350px))]",
38
+ demo: "size-full px-16 pt-4 pb-72 text-base sm:px-[max(64px,calc(50%-350px))]",
39
+ fullWidth: "size-full px-16 pt-4 pb-72 text-base sm:px-24",
40
+ none: "",
41
+ select: "px-3 py-2 text-base data-readonly:w-fit",
42
+ },
43
+ },
44
+ });
45
+ export const Editor = React.forwardRef(({ className, disabled, focused, variant, ...props }, ref) => {
46
+ return (_jsx(PlateContent, { ref: ref, className: cn(editorVariants({
47
+ disabled,
48
+ focused,
49
+ variant,
50
+ }), className), disabled: disabled, disableDefaultStyles: true, ...props }));
51
+ });
52
+ Editor.displayName = "Editor";
53
+ export function EditorView({ className, variant, ...props }) {
54
+ return (_jsx(PlateView, { ...props, className: cn(editorVariants({ variant }), className) }));
55
+ }
56
+ EditorView.displayName = "EditorView";
@@ -0,0 +1,27 @@
1
+ /** biome-ignore-all lint/a11y/useSemanticElements: from shadcn */
2
+ /** biome-ignore-all lint/suspicious/noArrayIndexKey: from shadcn */
3
+ import { type VariantProps } from "class-variance-authority";
4
+ import { Label } from "./label";
5
+ declare function FieldSet({ className, ...props }: React.ComponentProps<"fieldset">): import("react").JSX.Element;
6
+ declare function FieldLegend({ className, variant, ...props }: React.ComponentProps<"legend"> & {
7
+ variant?: "legend" | "label";
8
+ }): import("react").JSX.Element;
9
+ declare function FieldGroup({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
10
+ declare const fieldVariants: (props?: ({
11
+ orientation?: "horizontal" | "vertical" | "responsive" | null | undefined;
12
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
13
+ declare function Field({ className, orientation, ...props }: React.ComponentProps<"div"> & VariantProps<typeof fieldVariants>): import("react").JSX.Element;
14
+ declare function FieldContent({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
15
+ declare function FieldLabel({ className, ...props }: React.ComponentProps<typeof Label>): import("react").JSX.Element;
16
+ declare function FieldTitle({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
17
+ declare function FieldDescription({ className, ...props }: React.ComponentProps<"p">): import("react").JSX.Element;
18
+ declare function FieldSeparator({ children, className, ...props }: React.ComponentProps<"div"> & {
19
+ children?: React.ReactNode;
20
+ }): import("react").JSX.Element;
21
+ declare function FieldError({ className, children, errors, ...props }: React.ComponentProps<"div"> & {
22
+ errors?: Array<{
23
+ message?: string;
24
+ } | undefined>;
25
+ }): import("react").JSX.Element | null;
26
+ export { Field, FieldLabel, FieldDescription, FieldError, FieldGroup, FieldLegend, FieldSeparator, FieldSet, FieldContent, FieldTitle, };
27
+ //# sourceMappingURL=field.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../src/primitives/field.tsx"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,oEAAoE;AACpE,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAIlE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAGhC,iBAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,UAAU,CAAC,+BAY1E;AAED,iBAAS,WAAW,CAAC,EACnB,SAAS,EACT,OAAkB,EAClB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,GAAG;IAAE,OAAO,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAA;CAAE,+BAcnE;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,+BAWvE;AAED,QAAA,MAAM,aAAa;;8EAsBlB,CAAC;AAEF,iBAAS,KAAK,CAAC,EACb,SAAS,EACT,WAAwB,EACxB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,YAAY,CAAC,OAAO,aAAa,CAAC,+BAUlE;AAED,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,+BAWzE;AAED,iBAAS,UAAU,CAAC,EAClB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,KAAK,CAAC,+BAapC;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,+BAWvE;AAED,iBAAS,gBAAgB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,+BAa3E;AAED,iBAAS,cAAc,CAAC,EACtB,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAC/B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,+BAsBA;AAED,iBAAS,UAAU,CAAC,EAClB,SAAS,EACT,QAAQ,EACR,MAAM,EACN,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAC/B,MAAM,CAAC,EAAE,KAAK,CAAC;QAAE,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS,CAAC,CAAC;CAClD,sCA0CA;AAED,OAAO,EACL,KAAK,EACL,UAAU,EACV,gBAAgB,EAChB,UAAU,EACV,UAAU,EACV,WAAW,EACX,cAAc,EACd,QAAQ,EACR,YAAY,EACZ,UAAU,GACX,CAAC"}
@@ -0,0 +1,77 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /** biome-ignore-all lint/a11y/useSemanticElements: from shadcn */
3
+ /** biome-ignore-all lint/suspicious/noArrayIndexKey: from shadcn */
4
+ import { cva } from "class-variance-authority";
5
+ import { useMemo } from "react";
6
+ import { cn } from "../lib/utils";
7
+ import { Label } from "./label";
8
+ import { Separator } from "./separator";
9
+ function FieldSet({ className, ...props }) {
10
+ return (_jsx("fieldset", { "data-slot": "field-set", className: cn("flex flex-col gap-6", "has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3", className), ...props }));
11
+ }
12
+ function FieldLegend({ className, variant = "legend", ...props }) {
13
+ return (_jsx("legend", { "data-slot": "field-legend", "data-variant": variant, className: cn("mb-3 font-medium", "data-[variant=legend]:text-base", "data-[variant=label]:text-sm", className), ...props }));
14
+ }
15
+ function FieldGroup({ className, ...props }) {
16
+ return (_jsx("div", { "data-slot": "field-group", className: cn("group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4", className), ...props }));
17
+ }
18
+ const fieldVariants = cva("group/field flex w-full gap-3 data-[invalid=true]:text-destructive", {
19
+ variants: {
20
+ orientation: {
21
+ vertical: ["flex-col [&>*]:w-full [&>.sr-only]:w-auto"],
22
+ horizontal: [
23
+ "flex-row items-center",
24
+ "[&>[data-slot=field-label]]:flex-auto",
25
+ "has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",
26
+ ],
27
+ responsive: [
28
+ "flex-col [&>*]:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto",
29
+ "@md/field-group:[&>[data-slot=field-label]]:flex-auto",
30
+ "@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",
31
+ ],
32
+ },
33
+ },
34
+ defaultVariants: {
35
+ orientation: "vertical",
36
+ },
37
+ });
38
+ function Field({ className, orientation = "vertical", ...props }) {
39
+ return (_jsx("div", { role: "group", "data-slot": "field", "data-orientation": orientation, className: cn(fieldVariants({ orientation }), className), ...props }));
40
+ }
41
+ function FieldContent({ className, ...props }) {
42
+ return (_jsx("div", { "data-slot": "field-content", className: cn("group/field-content flex flex-1 flex-col gap-1.5 leading-snug", className), ...props }));
43
+ }
44
+ function FieldLabel({ className, ...props }) {
45
+ return (_jsx(Label, { "data-slot": "field-label", className: cn("group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50", "has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border *:data-[slot=field]:p-4", "has-data-[state=checked]:bg-primary/5 has-data-[state=checked]:border-primary dark:has-data-[state=checked]:bg-primary/10", className), ...props }));
46
+ }
47
+ function FieldTitle({ className, ...props }) {
48
+ return (_jsx("div", { "data-slot": "field-label", className: cn("flex w-fit items-center gap-2 text-sm leading-snug font-medium group-data-[disabled=true]/field:opacity-50", className), ...props }));
49
+ }
50
+ function FieldDescription({ className, ...props }) {
51
+ return (_jsx("p", { "data-slot": "field-description", className: cn("text-muted-foreground text-sm leading-normal font-normal group-has-data-[orientation=horizontal]/field:text-balance", "last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5", "[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4", className), ...props }));
52
+ }
53
+ function FieldSeparator({ children, className, ...props }) {
54
+ return (_jsxs("div", { "data-slot": "field-separator", "data-content": !!children, className: cn("relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2", className), ...props, children: [_jsx(Separator, { className: "absolute inset-0 top-1/2" }), children && (_jsx("span", { className: "bg-background text-muted-foreground relative mx-auto block w-fit px-2", "data-slot": "field-separator-content", children: children }))] }));
55
+ }
56
+ function FieldError({ className, children, errors, ...props }) {
57
+ const content = useMemo(() => {
58
+ if (children) {
59
+ return children;
60
+ }
61
+ if (!errors?.length) {
62
+ return null;
63
+ }
64
+ const uniqueErrors = [
65
+ ...new Map(errors.map((error) => [error?.message, error])).values(),
66
+ ];
67
+ if (uniqueErrors?.length === 1) {
68
+ return uniqueErrors[0]?.message;
69
+ }
70
+ return (_jsx("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: uniqueErrors.map((error, index) => error?.message && _jsx("li", { children: error.message }, index)) }));
71
+ }, [children, errors]);
72
+ if (!content) {
73
+ return null;
74
+ }
75
+ return (_jsx("div", { role: "alert", "data-slot": "field-error", className: cn("text-destructive text-sm font-normal", className), ...props, children: content }));
76
+ }
77
+ export { Field, FieldLabel, FieldDescription, FieldError, FieldGroup, FieldLegend, FieldSeparator, FieldSet, FieldContent, FieldTitle, };
@@ -0,0 +1,3 @@
1
+ import { Toolbar } from "./toolbar";
2
+ export declare function FixedToolbar(props: React.ComponentProps<typeof Toolbar>): import("react").JSX.Element;
3
+ //# sourceMappingURL=fixed-toolbar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fixed-toolbar.d.ts","sourceRoot":"","sources":["../../src/primitives/fixed-toolbar.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,wBAAgB,YAAY,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,OAAO,CAAC,+BAUvE"}
@@ -0,0 +1,6 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { cn } from "../lib/utils";
3
+ import { Toolbar } from "./toolbar";
4
+ export function FixedToolbar(props) {
5
+ return (_jsx(Toolbar, { ...props, className: cn("sticky top-0 left-0 z-50 scrollbar-hide w-full justify-between overflow-x-auto rounded-t-lg border-b border-b-border bg-background/95 p-1 backdrop-blur-sm supports-backdrop-blur:bg-background/60", props.className) }));
6
+ }
@@ -0,0 +1,24 @@
1
+ import { type Label as LabelPrimitive, Slot as SlotPrimitive } from "radix-ui";
2
+ import * as React from "react";
3
+ import { type ControllerProps, type FieldPath, type FieldValues } from "react-hook-form";
4
+ declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>({ children, watch, getValues, getErrors, getFieldState, setError, clearErrors, setValue, setValues, trigger, formState, resetField, reset, resetDefaultValues, handleSubmit, unregister, control, register, setFocus, subscribe, }: import("react-hook-form").FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
5
+ declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) => React.JSX.Element;
6
+ declare const useFormField: () => {
7
+ invalid: boolean;
8
+ isDirty: boolean;
9
+ isTouched: boolean;
10
+ isValidating: boolean;
11
+ error?: import("react-hook-form").FieldError | undefined;
12
+ id: string;
13
+ name: string;
14
+ formItemId: string;
15
+ formDescriptionId: string;
16
+ formMessageId: string;
17
+ };
18
+ declare function FormItem({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
19
+ declare function FormLabel({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>): React.JSX.Element;
20
+ declare function FormControl({ ...props }: React.ComponentProps<typeof SlotPrimitive.Slot>): React.JSX.Element;
21
+ declare function FormDescription({ className, ...props }: React.ComponentProps<"p">): React.JSX.Element;
22
+ declare function FormMessage({ className, ...props }: React.ComponentProps<"p">): React.JSX.Element | null;
23
+ export { useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField, };
24
+ //# sourceMappingURL=form.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../src/primitives/form.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,KAAK,IAAI,cAAc,EAAE,IAAI,IAAI,aAAa,EAAE,MAAM,UAAU,CAAC;AAE/E,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,SAAS,EACd,KAAK,WAAW,EAIjB,MAAM,iBAAiB,CAAC;AAKzB,QAAA,MAAM,IAAI,yaAAe,CAAC;AAa1B,QAAA,MAAM,SAAS,GACb,YAAY,SAAS,WAAW,GAAG,WAAW,EAC9C,KAAK,SAAS,SAAS,CAAC,YAAY,CAAC,GAAG,SAAS,CAAC,YAAY,CAAC,EAC/D,cAEC,eAAe,CAAC,YAAY,EAAE,KAAK,CAAC,sBAMtC,CAAC;AAEF,QAAA,MAAM,YAAY;;;;;;;;;;;CAqBjB,CAAC;AAUF,iBAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAYrE;AAED,iBAAS,SAAS,CAAC,EACjB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,IAAI,CAAC,qBAYlD;AAED,iBAAS,WAAW,CAAC,EACnB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,aAAa,CAAC,IAAI,CAAC,qBAiBjD;AAED,iBAAS,eAAe,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,qBAW1E;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,4BAkBtE;AAED,OAAO,EACL,YAAY,EACZ,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,WAAW,EACX,eAAe,EACf,WAAW,EACX,SAAS,GACV,CAAC"}
@@ -0,0 +1,58 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Slot as SlotPrimitive } from "radix-ui";
3
+ import * as React from "react";
4
+ import { Controller, FormProvider, useFormContext, useFormState, } from "react-hook-form";
5
+ import { cn } from "../lib/utils";
6
+ import { Label } from "./label";
7
+ const Form = FormProvider;
8
+ const FormFieldContext = React.createContext({});
9
+ const FormField = ({ ...props }) => {
10
+ return (_jsx(FormFieldContext.Provider, { value: { name: props.name }, children: _jsx(Controller, { ...props }) }));
11
+ };
12
+ const useFormField = () => {
13
+ const fieldContext = React.useContext(FormFieldContext);
14
+ const itemContext = React.useContext(FormItemContext);
15
+ const { getFieldState } = useFormContext();
16
+ const formState = useFormState({ name: fieldContext.name });
17
+ const fieldState = getFieldState(fieldContext.name, formState);
18
+ if (!fieldContext) {
19
+ throw new Error("useFormField should be used within <FormField>");
20
+ }
21
+ const { id } = itemContext;
22
+ return {
23
+ id,
24
+ name: fieldContext.name,
25
+ formItemId: `${id}-form-item`,
26
+ formDescriptionId: `${id}-form-item-description`,
27
+ formMessageId: `${id}-form-item-message`,
28
+ ...fieldState,
29
+ };
30
+ };
31
+ const FormItemContext = React.createContext({});
32
+ function FormItem({ className, ...props }) {
33
+ const id = React.useId();
34
+ return (_jsx(FormItemContext.Provider, { value: { id }, children: _jsx("div", { "data-slot": "form-item", className: cn("grid gap-2", className), ...props }) }));
35
+ }
36
+ function FormLabel({ className, ...props }) {
37
+ const { error, formItemId } = useFormField();
38
+ return (_jsx(Label, { "data-slot": "form-label", "data-error": !!error, className: cn("data-[error=true]:text-destructive", className), htmlFor: formItemId, ...props }));
39
+ }
40
+ function FormControl({ ...props }) {
41
+ const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
42
+ return (_jsx(SlotPrimitive.Slot, { "data-slot": "form-control", id: formItemId, "aria-describedby": !error
43
+ ? `${formDescriptionId}`
44
+ : `${formDescriptionId} ${formMessageId}`, "aria-invalid": !!error, ...props }));
45
+ }
46
+ function FormDescription({ className, ...props }) {
47
+ const { formDescriptionId } = useFormField();
48
+ return (_jsx("p", { "data-slot": "form-description", id: formDescriptionId, className: cn("text-muted-foreground text-sm", className), ...props }));
49
+ }
50
+ function FormMessage({ className, ...props }) {
51
+ const { error, formMessageId } = useFormField();
52
+ const body = error ? String(error?.message ?? "") : props.children;
53
+ if (!body) {
54
+ return null;
55
+ }
56
+ return (_jsx("p", { "data-slot": "form-message", id: formMessageId, className: cn("text-destructive text-sm", className), ...props, children: body }));
57
+ }
58
+ export { useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField, };
@@ -0,0 +1,15 @@
1
+ /** biome-ignore-all lint/style/noNonNullAssertion: From platejs docs */
2
+ import { type VariantProps } from "class-variance-authority";
3
+ import type { SlateElementProps } from "platejs/static";
4
+ declare const headingVariants: (props?: ({
5
+ variant?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | null | undefined;
6
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
+ export declare function HeadingElementStatic({ variant, ...props }: SlateElementProps & VariantProps<typeof headingVariants>): import("react").JSX.Element;
8
+ export declare function H1ElementStatic(props: SlateElementProps): import("react").JSX.Element;
9
+ export declare function H2ElementStatic(props: React.ComponentProps<typeof HeadingElementStatic>): import("react").JSX.Element;
10
+ export declare function H3ElementStatic(props: React.ComponentProps<typeof HeadingElementStatic>): import("react").JSX.Element;
11
+ export declare function H4ElementStatic(props: React.ComponentProps<typeof HeadingElementStatic>): import("react").JSX.Element;
12
+ export declare function H5ElementStatic(props: React.ComponentProps<typeof HeadingElementStatic>): import("react").JSX.Element;
13
+ export declare function H6ElementStatic(props: React.ComponentProps<typeof HeadingElementStatic>): import("react").JSX.Element;
14
+ export {};
15
+ //# sourceMappingURL=heading-node-static.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"heading-node-static.d.ts","sourceRoot":"","sources":["../../src/primitives/heading-node-static.tsx"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAGxD,QAAA,MAAM,eAAe;;8EAWnB,CAAC;AAEH,wBAAgB,oBAAoB,CAAC,EACnC,OAAc,EACd,GAAG,KAAK,EACT,EAAE,iBAAiB,GAAG,YAAY,CAAC,OAAO,eAAe,CAAC,+BAU1D;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,iBAAiB,+BAEvD;AAED,wBAAgB,eAAe,CAC7B,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,+BAGzD;AAED,wBAAgB,eAAe,CAC7B,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,+BAGzD;AAED,wBAAgB,eAAe,CAC7B,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,+BAGzD;AAED,wBAAgB,eAAe,CAC7B,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,+BAGzD;AAED,wBAAgB,eAAe,CAC7B,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,+BAGzD"}
@@ -0,0 +1,37 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /** biome-ignore-all lint/style/noNonNullAssertion: From platejs docs */
3
+ import { cva } from "class-variance-authority";
4
+ import { SlateElement } from "platejs/static";
5
+ const headingVariants = cva("relative mb-1", {
6
+ variants: {
7
+ variant: {
8
+ h1: "mt-[1.6em] pb-1 font-heading text-4xl font-bold",
9
+ h2: "mt-[1.4em] pb-px font-heading text-2xl font-semibold tracking-tight",
10
+ h3: "mt-[1em] pb-px font-heading text-xl font-semibold tracking-tight",
11
+ h4: "mt-[0.75em] font-heading text-lg font-semibold tracking-tight",
12
+ h5: "mt-[0.75em] text-lg font-semibold tracking-tight",
13
+ h6: "mt-[0.75em] text-base font-semibold tracking-tight",
14
+ },
15
+ },
16
+ });
17
+ export function HeadingElementStatic({ variant = "h1", ...props }) {
18
+ return (_jsx(SlateElement, { as: variant, className: headingVariants({ variant }), ...props, children: props.children }));
19
+ }
20
+ export function H1ElementStatic(props) {
21
+ return _jsx(HeadingElementStatic, { variant: "h1", ...props });
22
+ }
23
+ export function H2ElementStatic(props) {
24
+ return _jsx(HeadingElementStatic, { variant: "h2", ...props });
25
+ }
26
+ export function H3ElementStatic(props) {
27
+ return _jsx(HeadingElementStatic, { variant: "h3", ...props });
28
+ }
29
+ export function H4ElementStatic(props) {
30
+ return _jsx(HeadingElementStatic, { variant: "h4", ...props });
31
+ }
32
+ export function H5ElementStatic(props) {
33
+ return _jsx(HeadingElementStatic, { variant: "h5", ...props });
34
+ }
35
+ export function H6ElementStatic(props) {
36
+ return _jsx(HeadingElementStatic, { variant: "h6", ...props });
37
+ }
@@ -0,0 +1,15 @@
1
+ /** biome-ignore-all lint/style/noNonNullAssertion: From platejs docs */
2
+ import { type VariantProps } from "class-variance-authority";
3
+ import type { PlateElementProps } from "platejs/react";
4
+ declare const headingVariants: (props?: ({
5
+ variant?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | null | undefined;
6
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
+ export declare function HeadingElement({ variant, ...props }: PlateElementProps & VariantProps<typeof headingVariants>): import("react").JSX.Element;
8
+ export declare function H1Element(props: PlateElementProps): import("react").JSX.Element;
9
+ export declare function H2Element(props: PlateElementProps): import("react").JSX.Element;
10
+ export declare function H3Element(props: PlateElementProps): import("react").JSX.Element;
11
+ export declare function H4Element(props: PlateElementProps): import("react").JSX.Element;
12
+ export declare function H5Element(props: PlateElementProps): import("react").JSX.Element;
13
+ export declare function H6Element(props: PlateElementProps): import("react").JSX.Element;
14
+ export {};
15
+ //# sourceMappingURL=heading-node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"heading-node.d.ts","sourceRoot":"","sources":["../../src/primitives/heading-node.tsx"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAGvD,QAAA,MAAM,eAAe;;8EAWnB,CAAC;AAEH,wBAAgB,cAAc,CAAC,EAC7B,OAAc,EACd,GAAG,KAAK,EACT,EAAE,iBAAiB,GAAG,YAAY,CAAC,OAAO,eAAe,CAAC,+BAU1D;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,iBAAiB,+BAEjD;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,iBAAiB,+BAEjD;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,iBAAiB,+BAEjD;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,iBAAiB,+BAEjD;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,iBAAiB,+BAEjD;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,iBAAiB,+BAEjD"}
@@ -0,0 +1,37 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /** biome-ignore-all lint/style/noNonNullAssertion: From platejs docs */
3
+ import { cva } from "class-variance-authority";
4
+ import { PlateElement } from "platejs/react";
5
+ const headingVariants = cva("relative mb-1", {
6
+ variants: {
7
+ variant: {
8
+ h1: "mt-[1.6em] pb-1 font-heading text-4xl font-bold",
9
+ h2: "mt-[1.4em] pb-px font-heading text-2xl font-semibold tracking-tight",
10
+ h3: "mt-[1em] pb-px font-heading text-xl font-semibold tracking-tight",
11
+ h4: "mt-[0.75em] font-heading text-lg font-semibold tracking-tight",
12
+ h5: "mt-[0.75em] text-lg font-semibold tracking-tight",
13
+ h6: "mt-[0.75em] text-base font-semibold tracking-tight",
14
+ },
15
+ },
16
+ });
17
+ export function HeadingElement({ variant = "h1", ...props }) {
18
+ return (_jsx(PlateElement, { as: variant, className: headingVariants({ variant }), ...props, children: props.children }));
19
+ }
20
+ export function H1Element(props) {
21
+ return _jsx(HeadingElement, { variant: "h1", ...props });
22
+ }
23
+ export function H2Element(props) {
24
+ return _jsx(HeadingElement, { variant: "h2", ...props });
25
+ }
26
+ export function H3Element(props) {
27
+ return _jsx(HeadingElement, { variant: "h3", ...props });
28
+ }
29
+ export function H4Element(props) {
30
+ return _jsx(HeadingElement, { variant: "h4", ...props });
31
+ }
32
+ export function H5Element(props) {
33
+ return _jsx(HeadingElement, { variant: "h5", ...props });
34
+ }
35
+ export function H6Element(props) {
36
+ return _jsx(HeadingElement, { variant: "h6", ...props });
37
+ }
@@ -0,0 +1,3 @@
1
+ import type { SlateLeafProps } from "platejs/static";
2
+ export declare function HighlightLeafStatic(props: SlateLeafProps): import("react").JSX.Element;
3
+ //# sourceMappingURL=highlight-node-static.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"highlight-node-static.d.ts","sourceRoot":"","sources":["../../src/primitives/highlight-node-static.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGrD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,cAAc,+BAMxD"}
@@ -0,0 +1,5 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { SlateLeaf } from "platejs/static";
3
+ export function HighlightLeafStatic(props) {
4
+ return (_jsx(SlateLeaf, { ...props, as: "mark", className: "bg-highlight/30 text-inherit", children: props.children }));
5
+ }
@@ -0,0 +1,3 @@
1
+ import type { PlateLeafProps } from "platejs/react";
2
+ export declare function HighlightLeaf(props: PlateLeafProps): import("react").JSX.Element;
3
+ //# sourceMappingURL=highlight-node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"highlight-node.d.ts","sourceRoot":"","sources":["../../src/primitives/highlight-node.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAGpD,wBAAgB,aAAa,CAAC,KAAK,EAAE,cAAc,+BAMlD"}
@@ -0,0 +1,5 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { PlateLeaf } from "platejs/react";
3
+ export function HighlightLeaf(props) {
4
+ return (_jsx(PlateLeaf, { ...props, as: "mark", className: "bg-highlight/30 text-inherit", children: props.children }));
5
+ }
@@ -0,0 +1,3 @@
1
+ import type { SlateElementProps } from "platejs/static";
2
+ export declare function HrElementStatic(props: SlateElementProps): import("react").JSX.Element;
3
+ //# sourceMappingURL=hr-node-static.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hr-node-static.d.ts","sourceRoot":"","sources":["../../src/primitives/hr-node-static.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAKxD,wBAAgB,eAAe,CAAC,KAAK,EAAE,iBAAiB,+BAavD"}
@@ -0,0 +1,6 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { SlateElement } from "platejs/static";
3
+ import { cn } from "../lib/utils";
4
+ export function HrElementStatic(props) {
5
+ return (_jsxs(SlateElement, { ...props, children: [_jsx("div", { className: "cursor-text py-6", contentEditable: false, children: _jsx("hr", { className: cn("h-0.5 rounded-sm border-none bg-muted bg-clip-content") }) }), props.children] }));
6
+ }
@@ -0,0 +1,3 @@
1
+ import type { PlateElementProps } from "platejs/react";
2
+ export declare function HrElement(props: PlateElementProps): import("react").JSX.Element;
3
+ //# sourceMappingURL=hr-node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hr-node.d.ts","sourceRoot":"","sources":["../../src/primitives/hr-node.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAWvD,wBAAgB,SAAS,CAAC,KAAK,EAAE,iBAAiB,+BAmBjD"}
@@ -0,0 +1,9 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { PlateElement, useFocused, useReadOnly, useSelected, } from "platejs/react";
3
+ import { cn } from "../lib/utils";
4
+ export function HrElement(props) {
5
+ const readOnly = useReadOnly();
6
+ const selected = useSelected();
7
+ const focused = useFocused();
8
+ return (_jsxs(PlateElement, { ...props, children: [_jsx("div", { className: "py-6", contentEditable: false, children: _jsx("hr", { className: cn("h-0.5 rounded-sm border-none bg-muted bg-clip-content", selected && focused && "ring-2 ring-ring ring-offset-2", !readOnly && "cursor-pointer") }) }), props.children] }));
9
+ }
@@ -0,0 +1,4 @@
1
+ import type * as React from "react";
2
+ declare function Input({ className, type, ...props }: React.ComponentProps<"input">): React.JSX.Element;
3
+ export { Input };
4
+ //# sourceMappingURL=input.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../src/primitives/input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAIpC,iBAAS,KAAK,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,qBAc1E;AAED,OAAO,EAAE,KAAK,EAAE,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { cn } from "../lib/utils";
3
+ function Input({ className, type, ...props }) {
4
+ return (_jsx("input", { type: type, "data-slot": "input", className: cn("flex h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground 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 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30", "focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50", "aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40", className), ...props }));
5
+ }
6
+ export { Input };
@@ -0,0 +1,3 @@
1
+ import type { SlateLeafProps } from "platejs/static";
2
+ export declare function KbdLeafStatic(props: SlateLeafProps): import("react").JSX.Element;
3
+ //# sourceMappingURL=kbd-node-static.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kbd-node-static.d.ts","sourceRoot":"","sources":["../../src/primitives/kbd-node-static.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGrD,wBAAgB,aAAa,CAAC,KAAK,EAAE,cAAc,+BAUlD"}
@@ -0,0 +1,5 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { SlateLeaf } from "platejs/static";
3
+ export function KbdLeafStatic(props) {
4
+ return (_jsx(SlateLeaf, { ...props, as: "kbd", className: "rounded border border-border bg-muted px-1.5 py-0.5 font-mono text-sm shadow-[rgba(255,_255,_255,_0.1)_0px_0.5px_0px_0px_inset,_rgb(248,_249,_250)_0px_1px_5px_0px_inset,_rgb(193,_200,_205)_0px_0px_0px_0.5px,_rgb(193,_200,_205)_0px_2px_1px_-1px,_rgb(193,_200,_205)_0px_1px_0px_0px] dark:shadow-[rgba(255,_255,_255,_0.1)_0px_0.5px_0px_0px_inset,_rgb(26,_29,_30)_0px_1px_5px_0px_inset,_rgb(76,_81,_85)_0px_0px_0px_0.5px,_rgb(76,_81,_85)_0px_2px_1px_-1px,_rgb(76,_81,_85)_0px_1px_0px_0px]", children: props.children }));
5
+ }
@@ -0,0 +1,3 @@
1
+ import type { PlateLeafProps } from "platejs/react";
2
+ export declare function KbdLeaf(props: PlateLeafProps): import("react").JSX.Element;
3
+ //# sourceMappingURL=kbd-node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kbd-node.d.ts","sourceRoot":"","sources":["../../src/primitives/kbd-node.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAGpD,wBAAgB,OAAO,CAAC,KAAK,EAAE,cAAc,+BAU5C"}
@@ -0,0 +1,5 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { PlateLeaf } from "platejs/react";
3
+ export function KbdLeaf(props) {
4
+ return (_jsx(PlateLeaf, { ...props, as: "kbd", className: "rounded border border-border bg-muted px-1.5 py-0.5 font-mono text-sm shadow-[rgba(255,_255,_255,_0.1)_0px_0.5px_0px_0px_inset,_rgb(248,_249,_250)_0px_1px_5px_0px_inset,_rgb(193,_200,_205)_0px_0px_0px_0.5px,_rgb(193,_200,_205)_0px_2px_1px_-1px,_rgb(193,_200,_205)_0px_1px_0px_0px] dark:shadow-[rgba(255,_255,_255,_0.1)_0px_0.5px_0px_0px_inset,_rgb(26,_29,_30)_0px_1px_5px_0px_inset,_rgb(76,_81,_85)_0px_0px_0px_0.5px,_rgb(76,_81,_85)_0px_2px_1px_-1px,_rgb(76,_81,_85)_0px_1px_0px_0px]", children: props.children }));
5
+ }
@@ -0,0 +1,4 @@
1
+ declare function Kbd({ className, ...props }: React.ComponentProps<"kbd">): import("react").JSX.Element;
2
+ declare function KbdGroup({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
3
+ export { Kbd, KbdGroup };
4
+ //# sourceMappingURL=kbd.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kbd.d.ts","sourceRoot":"","sources":["../../src/primitives/kbd.tsx"],"names":[],"mappings":"AAEA,iBAAS,GAAG,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,+BAahE;AAED,iBAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,+BAQrE;AAED,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { cn } from "../lib/utils";
3
+ function Kbd({ className, ...props }) {
4
+ return (_jsx("kbd", { "data-slot": "kbd", className: cn("bg-muted text-muted-foreground pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm px-1 font-sans text-xs font-medium select-none", "[&_svg:not([class*='size-'])]:size-3", "in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10", className), ...props }));
5
+ }
6
+ function KbdGroup({ className, ...props }) {
7
+ return (_jsx("kbd", { "data-slot": "kbd-group", className: cn("inline-flex items-center gap-1", className), ...props }));
8
+ }
9
+ export { Kbd, KbdGroup };