notra-editor 0.5.0 → 0.7.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.
- package/dist/components/blockquote-button/blockquote-button.d.cts +2 -2
- package/dist/components/blockquote-button/blockquote-button.d.ts +2 -2
- package/dist/components/code-block-button/code-block-button.d.cts +2 -2
- package/dist/components/code-block-button/code-block-button.d.ts +2 -2
- package/dist/components/code-block-view/code-block-shell.cjs +41 -0
- package/dist/components/code-block-view/code-block-shell.cjs.map +1 -0
- package/dist/components/code-block-view/code-block-shell.d.cts +11 -0
- package/dist/components/code-block-view/code-block-shell.d.ts +11 -0
- package/dist/components/code-block-view/code-block-shell.mjs +17 -0
- package/dist/components/code-block-view/code-block-shell.mjs.map +1 -0
- package/dist/components/{code-block-view.cjs → code-block-view/code-block-view.cjs} +16 -8
- package/dist/components/code-block-view/code-block-view.cjs.map +1 -0
- package/dist/components/code-block-view/code-block-view.d.cts +6 -0
- package/dist/components/code-block-view/code-block-view.d.ts +6 -0
- package/dist/components/code-block-view/code-block-view.mjs +26 -0
- package/dist/components/code-block-view/code-block-view.mjs.map +1 -0
- package/dist/components/code-block-view/language-select.cjs +91 -0
- package/dist/components/code-block-view/language-select.cjs.map +1 -0
- package/dist/components/code-block-view/language-select.d.cts +11 -0
- package/dist/components/code-block-view/language-select.d.ts +11 -0
- package/dist/components/code-block-view/language-select.mjs +74 -0
- package/dist/components/code-block-view/language-select.mjs.map +1 -0
- package/dist/components/heading-dropdown-menu/heading-dropdown-menu.d.cts +2 -2
- package/dist/components/heading-dropdown-menu/heading-dropdown-menu.d.ts +2 -2
- package/dist/components/heading-dropdown-menu/heading-menu-item.d.cts +2 -2
- package/dist/components/heading-dropdown-menu/heading-menu-item.d.ts +2 -2
- package/dist/components/image-popover/image-popover.d.cts +2 -2
- package/dist/components/image-popover/image-popover.d.ts +2 -2
- package/dist/components/image-popover/use-image-popover.d.cts +3 -3
- package/dist/components/image-popover/use-image-popover.d.ts +3 -3
- package/dist/components/link-popover/link-popover.d.cts +2 -2
- package/dist/components/link-popover/link-popover.d.ts +2 -2
- package/dist/components/link-popover/use-link-popover.d.cts +2 -2
- package/dist/components/link-popover/use-link-popover.d.ts +2 -2
- package/dist/components/list-dropdown-menu/list-dropdown-menu.d.cts +2 -2
- package/dist/components/list-dropdown-menu/list-dropdown-menu.d.ts +2 -2
- package/dist/components/list-dropdown-menu/list-menu-item.d.cts +2 -2
- package/dist/components/list-dropdown-menu/list-menu-item.d.ts +2 -2
- package/dist/components/mark-button/mark-button.d.cts +2 -2
- package/dist/components/mark-button/mark-button.d.ts +2 -2
- package/dist/components/toolbar/toolbar.d.cts +2 -2
- package/dist/components/toolbar/toolbar.d.ts +2 -2
- package/dist/components/ui/button.d.cts +2 -2
- package/dist/components/ui/button.d.ts +2 -2
- package/dist/components/ui/command.cjs +207 -0
- package/dist/components/ui/command.cjs.map +1 -0
- package/dist/components/ui/command.d.cts +22 -0
- package/dist/components/ui/command.d.ts +22 -0
- package/dist/components/ui/command.mjs +181 -0
- package/dist/components/ui/command.mjs.map +1 -0
- package/dist/components/ui/dialog.cjs +188 -0
- package/dist/components/ui/dialog.cjs.map +1 -0
- package/dist/components/ui/dialog.d.cts +20 -0
- package/dist/components/ui/dialog.d.ts +20 -0
- package/dist/components/ui/dialog.mjs +155 -0
- package/dist/components/ui/dialog.mjs.map +1 -0
- package/dist/components/ui/dropdown-menu.cjs +3 -2
- package/dist/components/ui/dropdown-menu.cjs.map +1 -1
- package/dist/components/ui/dropdown-menu.d.cts +16 -16
- package/dist/components/ui/dropdown-menu.d.ts +16 -16
- package/dist/components/ui/dropdown-menu.mjs +3 -2
- package/dist/components/ui/dropdown-menu.mjs.map +1 -1
- package/dist/components/ui/input-group.cjs +175 -0
- package/dist/components/ui/input-group.cjs.map +1 -0
- package/dist/components/ui/input-group.d.cts +20 -0
- package/dist/components/ui/input-group.d.ts +20 -0
- package/dist/components/ui/input-group.mjs +146 -0
- package/dist/components/ui/input-group.mjs.map +1 -0
- package/dist/components/ui/input.cjs +1 -1
- package/dist/components/ui/input.cjs.map +1 -1
- package/dist/components/ui/input.d.cts +2 -2
- package/dist/components/ui/input.d.ts +2 -2
- package/dist/components/ui/input.mjs +1 -1
- package/dist/components/ui/input.mjs.map +1 -1
- package/dist/components/ui/popover.cjs +46 -6
- package/dist/components/ui/popover.cjs.map +1 -1
- package/dist/components/ui/popover.d.cts +9 -6
- package/dist/components/ui/popover.d.ts +9 -6
- package/dist/components/ui/popover.mjs +43 -6
- package/dist/components/ui/popover.mjs.map +1 -1
- package/dist/components/ui/separator.cjs +2 -1
- package/dist/components/ui/separator.cjs.map +1 -1
- package/dist/components/ui/separator.d.cts +2 -2
- package/dist/components/ui/separator.d.ts +2 -2
- package/dist/components/ui/separator.mjs +2 -1
- package/dist/components/ui/separator.mjs.map +1 -1
- package/dist/components/ui/textarea.cjs +43 -0
- package/dist/components/ui/textarea.cjs.map +1 -0
- package/dist/components/ui/textarea.d.cts +6 -0
- package/dist/components/ui/textarea.d.ts +6 -0
- package/dist/components/ui/textarea.mjs +19 -0
- package/dist/components/ui/textarea.mjs.map +1 -0
- package/dist/components/undo-redo-button/undo-redo-button.d.cts +2 -2
- package/dist/components/undo-redo-button/undo-redo-button.d.ts +2 -2
- package/dist/components/undo-redo-button/use-undo-redo.d.cts +2 -2
- package/dist/components/undo-redo-button/use-undo-redo.d.ts +2 -2
- package/dist/extensions/code-block.cjs +76 -19
- package/dist/extensions/code-block.cjs.map +1 -1
- package/dist/extensions/code-block.d.cts +7 -3
- package/dist/extensions/code-block.d.ts +7 -3
- package/dist/extensions/code-block.mjs +73 -8
- package/dist/extensions/code-block.mjs.map +1 -1
- package/dist/extensions/editor.d.cts +3 -3
- package/dist/extensions/editor.d.ts +3 -3
- package/dist/extensions/index.d.cts +1 -1
- package/dist/extensions/index.d.ts +1 -1
- package/dist/extensions/shared.cjs +5 -1
- package/dist/extensions/shared.cjs.map +1 -1
- package/dist/extensions/shared.d.cts +2 -1
- package/dist/extensions/shared.d.ts +2 -1
- package/dist/extensions/shared.mjs +5 -1
- package/dist/extensions/shared.mjs.map +1 -1
- package/dist/index.cjs +20 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.mjs +16 -1
- package/dist/index.mjs.map +1 -1
- package/dist/lib/highlight-code-to-html.cjs +38 -0
- package/dist/lib/highlight-code-to-html.cjs.map +1 -0
- package/dist/lib/highlight-code-to-html.d.cts +6 -0
- package/dist/lib/highlight-code-to-html.d.ts +6 -0
- package/dist/lib/highlight-code-to-html.mjs +14 -0
- package/dist/lib/highlight-code-to-html.mjs.map +1 -0
- package/dist/lib/languages.cjs +181 -0
- package/dist/lib/languages.cjs.map +1 -0
- package/dist/lib/languages.d.cts +24 -0
- package/dist/lib/languages.d.ts +24 -0
- package/dist/lib/languages.mjs +155 -0
- package/dist/lib/languages.mjs.map +1 -0
- package/dist/notra-reader.cjs +32 -3
- package/dist/notra-reader.cjs.map +1 -1
- package/dist/notra-reader.d.cts +11 -1
- package/dist/notra-reader.d.ts +11 -1
- package/dist/notra-reader.mjs +32 -3
- package/dist/notra-reader.mjs.map +1 -1
- package/dist/styles/globals.css +1022 -165
- package/dist/themes/default/editor.css +69 -0
- package/dist/themes/default/shared.css +165 -5
- package/package.json +7 -1
- package/dist/components/code-block-view.cjs.map +0 -1
- package/dist/components/code-block-view.d.cts +0 -12
- package/dist/components/code-block-view.d.ts +0 -12
- package/dist/components/code-block-view.mjs +0 -17
- package/dist/components/code-block-view.mjs.map +0 -1
- package/dist/icons/redo-icon.cjs +0 -54
- package/dist/icons/redo-icon.cjs.map +0 -1
- package/dist/icons/redo-icon.d.cts +0 -7
- package/dist/icons/redo-icon.d.ts +0 -7
- package/dist/icons/redo-icon.mjs +0 -30
- package/dist/icons/redo-icon.mjs.map +0 -1
- package/dist/icons/undo-icon.cjs +0 -54
- package/dist/icons/undo-icon.cjs.map +0 -1
- package/dist/icons/undo-icon.d.cts +0 -7
- package/dist/icons/undo-icon.d.ts +0 -7
- package/dist/icons/undo-icon.mjs +0 -30
- package/dist/icons/undo-icon.mjs.map +0 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
"use client";
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
@@ -21,6 +22,9 @@ __export(popover_exports, {
|
|
|
21
22
|
Popover: () => Popover,
|
|
22
23
|
PopoverAnchor: () => PopoverAnchor,
|
|
23
24
|
PopoverContent: () => PopoverContent,
|
|
25
|
+
PopoverDescription: () => PopoverDescription,
|
|
26
|
+
PopoverHeader: () => PopoverHeader,
|
|
27
|
+
PopoverTitle: () => PopoverTitle,
|
|
24
28
|
PopoverTrigger: () => PopoverTrigger
|
|
25
29
|
});
|
|
26
30
|
module.exports = __toCommonJS(popover_exports);
|
|
@@ -37,11 +41,6 @@ function PopoverTrigger({
|
|
|
37
41
|
}) {
|
|
38
42
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_radix_ui.Popover.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
39
43
|
}
|
|
40
|
-
function PopoverAnchor({
|
|
41
|
-
...props
|
|
42
|
-
}) {
|
|
43
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_radix_ui.Popover.Anchor, { "data-slot": "popover-anchor", ...props });
|
|
44
|
-
}
|
|
45
44
|
function PopoverContent({
|
|
46
45
|
className,
|
|
47
46
|
align = "center",
|
|
@@ -53,7 +52,7 @@ function PopoverContent({
|
|
|
53
52
|
{
|
|
54
53
|
align,
|
|
55
54
|
className: (0, import_utils.cn)(
|
|
56
|
-
"nt:z-50 nt:w-72 nt:origin-(--radix-popover-content-transform-origin) nt:rounded-lg nt:bg-popover nt:p-
|
|
55
|
+
"nt:z-50 nt:flex nt:w-72 nt:origin-(--radix-popover-content-transform-origin) nt:flex-col nt:gap-2.5 nt:rounded-lg nt:bg-popover nt:p-2.5 nt:text-sm nt:text-popover-foreground nt:shadow-md nt:ring-1 nt:ring-foreground/10 nt:outline-hidden nt:duration-100 nt:data-[side=bottom]:slide-in-from-top-2 nt:data-[side=left]:slide-in-from-right-2 nt:data-[side=right]:slide-in-from-left-2 nt:data-[side=top]:slide-in-from-bottom-2 nt:data-open:animate-in nt:data-open:fade-in-0 nt:data-open:zoom-in-95 nt:data-closed:animate-out nt:data-closed:fade-out-0 nt:data-closed:zoom-out-95",
|
|
57
56
|
className
|
|
58
57
|
),
|
|
59
58
|
"data-slot": "popover-content",
|
|
@@ -62,11 +61,52 @@ function PopoverContent({
|
|
|
62
61
|
}
|
|
63
62
|
) });
|
|
64
63
|
}
|
|
64
|
+
function PopoverAnchor({
|
|
65
|
+
...props
|
|
66
|
+
}) {
|
|
67
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_radix_ui.Popover.Anchor, { "data-slot": "popover-anchor", ...props });
|
|
68
|
+
}
|
|
69
|
+
function PopoverHeader({ className, ...props }) {
|
|
70
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
71
|
+
"div",
|
|
72
|
+
{
|
|
73
|
+
className: (0, import_utils.cn)("nt:flex nt:flex-col nt:gap-0.5 nt:text-sm", className),
|
|
74
|
+
"data-slot": "popover-header",
|
|
75
|
+
...props
|
|
76
|
+
}
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
function PopoverTitle({ className, ...props }) {
|
|
80
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
81
|
+
"div",
|
|
82
|
+
{
|
|
83
|
+
className: (0, import_utils.cn)("nt:font-medium", className),
|
|
84
|
+
"data-slot": "popover-title",
|
|
85
|
+
...props
|
|
86
|
+
}
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
function PopoverDescription({
|
|
90
|
+
className,
|
|
91
|
+
...props
|
|
92
|
+
}) {
|
|
93
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
94
|
+
"p",
|
|
95
|
+
{
|
|
96
|
+
className: (0, import_utils.cn)("nt:text-muted-foreground", className),
|
|
97
|
+
"data-slot": "popover-description",
|
|
98
|
+
...props
|
|
99
|
+
}
|
|
100
|
+
);
|
|
101
|
+
}
|
|
65
102
|
// Annotate the CommonJS export names for ESM import in node:
|
|
66
103
|
0 && (module.exports = {
|
|
67
104
|
Popover,
|
|
68
105
|
PopoverAnchor,
|
|
69
106
|
PopoverContent,
|
|
107
|
+
PopoverDescription,
|
|
108
|
+
PopoverHeader,
|
|
109
|
+
PopoverTitle,
|
|
70
110
|
PopoverTrigger
|
|
71
111
|
});
|
|
72
112
|
//# sourceMappingURL=popover.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/ui/popover.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ui/popover.tsx"],"sourcesContent":["'use client';\n\nimport { Popover as PopoverPrimitive } from 'radix-ui';\nimport * as React from 'react';\n\nimport { cn } from '../../lib/utils';\n\nfunction Popover({\n\t...props\n}: React.ComponentProps<typeof PopoverPrimitive.Root>) {\n\treturn <PopoverPrimitive.Root data-slot=\"popover\" {...props} />;\n}\n\nfunction PopoverTrigger({\n\t...props\n}: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {\n\treturn <PopoverPrimitive.Trigger data-slot=\"popover-trigger\" {...props} />;\n}\n\nfunction PopoverContent({\n\tclassName,\n\talign = 'center',\n\tsideOffset = 4,\n\t...props\n}: React.ComponentProps<typeof PopoverPrimitive.Content>) {\n\treturn (\n\t\t<PopoverPrimitive.Portal>\n\t\t\t<PopoverPrimitive.Content\n\t\t\t\talign={align}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'nt:z-50 nt:flex nt:w-72 nt:origin-(--radix-popover-content-transform-origin) nt:flex-col nt:gap-2.5 nt:rounded-lg nt:bg-popover nt:p-2.5 nt:text-sm nt:text-popover-foreground nt:shadow-md nt:ring-1 nt:ring-foreground/10 nt:outline-hidden nt:duration-100 nt:data-[side=bottom]:slide-in-from-top-2 nt:data-[side=left]:slide-in-from-right-2 nt:data-[side=right]:slide-in-from-left-2 nt:data-[side=top]:slide-in-from-bottom-2 nt:data-open:animate-in nt:data-open:fade-in-0 nt:data-open:zoom-in-95 nt:data-closed:animate-out nt:data-closed:fade-out-0 nt:data-closed:zoom-out-95',\n\t\t\t\t\tclassName\n\t\t\t\t)}\n\t\t\t\tdata-slot=\"popover-content\"\n\t\t\t\tsideOffset={sideOffset}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t</PopoverPrimitive.Portal>\n\t);\n}\n\nfunction PopoverAnchor({\n\t...props\n}: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {\n\treturn <PopoverPrimitive.Anchor data-slot=\"popover-anchor\" {...props} />;\n}\n\nfunction PopoverHeader({ className, ...props }: React.ComponentProps<'div'>) {\n\treturn (\n\t\t<div\n\t\t\tclassName={cn('nt:flex nt:flex-col nt:gap-0.5 nt:text-sm', className)}\n\t\t\tdata-slot=\"popover-header\"\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction PopoverTitle({ className, ...props }: React.ComponentProps<'h2'>) {\n\treturn (\n\t\t<div\n\t\t\tclassName={cn('nt:font-medium', className)}\n\t\t\tdata-slot=\"popover-title\"\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction PopoverDescription({\n\tclassName,\n\t...props\n}: React.ComponentProps<'p'>) {\n\treturn (\n\t\t<p\n\t\t\tclassName={cn('nt:text-muted-foreground', className)}\n\t\t\tdata-slot=\"popover-description\"\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport {\n\tPopover,\n\tPopoverAnchor,\n\tPopoverContent,\n\tPopoverDescription,\n\tPopoverHeader,\n\tPopoverTitle,\n\tPopoverTrigger\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;A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SACC;AAAA,IAAC;AAAA;AAAA,MACA,eAAW,iBAAG,4BAA4B,SAAS;AAAA,MACnD,aAAU;AAAA,MACT,GAAG;AAAA;AAAA,EACL;AAEF;","names":["PopoverPrimitive"]}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { Popover as Popover$1 } from 'radix-ui';
|
|
3
|
-
import * as
|
|
3
|
+
import * as React from 'react';
|
|
4
4
|
|
|
5
|
-
declare function Popover({ ...props }:
|
|
6
|
-
declare function PopoverTrigger({ ...props }:
|
|
7
|
-
declare function
|
|
8
|
-
declare function
|
|
5
|
+
declare function Popover({ ...props }: React.ComponentProps<typeof Popover$1.Root>): react_jsx_runtime.JSX.Element;
|
|
6
|
+
declare function PopoverTrigger({ ...props }: React.ComponentProps<typeof Popover$1.Trigger>): react_jsx_runtime.JSX.Element;
|
|
7
|
+
declare function PopoverContent({ className, align, sideOffset, ...props }: React.ComponentProps<typeof Popover$1.Content>): react_jsx_runtime.JSX.Element;
|
|
8
|
+
declare function PopoverAnchor({ ...props }: React.ComponentProps<typeof Popover$1.Anchor>): react_jsx_runtime.JSX.Element;
|
|
9
|
+
declare function PopoverHeader({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
10
|
+
declare function PopoverTitle({ className, ...props }: React.ComponentProps<'h2'>): react_jsx_runtime.JSX.Element;
|
|
11
|
+
declare function PopoverDescription({ className, ...props }: React.ComponentProps<'p'>): react_jsx_runtime.JSX.Element;
|
|
9
12
|
|
|
10
|
-
export { Popover, PopoverAnchor, PopoverContent, PopoverTrigger };
|
|
13
|
+
export { Popover, PopoverAnchor, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger };
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { Popover as Popover$1 } from 'radix-ui';
|
|
3
|
-
import * as
|
|
3
|
+
import * as React from 'react';
|
|
4
4
|
|
|
5
|
-
declare function Popover({ ...props }:
|
|
6
|
-
declare function PopoverTrigger({ ...props }:
|
|
7
|
-
declare function
|
|
8
|
-
declare function
|
|
5
|
+
declare function Popover({ ...props }: React.ComponentProps<typeof Popover$1.Root>): react_jsx_runtime.JSX.Element;
|
|
6
|
+
declare function PopoverTrigger({ ...props }: React.ComponentProps<typeof Popover$1.Trigger>): react_jsx_runtime.JSX.Element;
|
|
7
|
+
declare function PopoverContent({ className, align, sideOffset, ...props }: React.ComponentProps<typeof Popover$1.Content>): react_jsx_runtime.JSX.Element;
|
|
8
|
+
declare function PopoverAnchor({ ...props }: React.ComponentProps<typeof Popover$1.Anchor>): react_jsx_runtime.JSX.Element;
|
|
9
|
+
declare function PopoverHeader({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
10
|
+
declare function PopoverTitle({ className, ...props }: React.ComponentProps<'h2'>): react_jsx_runtime.JSX.Element;
|
|
11
|
+
declare function PopoverDescription({ className, ...props }: React.ComponentProps<'p'>): react_jsx_runtime.JSX.Element;
|
|
9
12
|
|
|
10
|
-
export { Popover, PopoverAnchor, PopoverContent, PopoverTrigger };
|
|
13
|
+
export { Popover, PopoverAnchor, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { jsx } from "react/jsx-runtime";
|
|
2
3
|
import { Popover as PopoverPrimitive } from "radix-ui";
|
|
3
4
|
import { cn } from "../../lib/utils";
|
|
@@ -11,11 +12,6 @@ function PopoverTrigger({
|
|
|
11
12
|
}) {
|
|
12
13
|
return /* @__PURE__ */ jsx(PopoverPrimitive.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
13
14
|
}
|
|
14
|
-
function PopoverAnchor({
|
|
15
|
-
...props
|
|
16
|
-
}) {
|
|
17
|
-
return /* @__PURE__ */ jsx(PopoverPrimitive.Anchor, { "data-slot": "popover-anchor", ...props });
|
|
18
|
-
}
|
|
19
15
|
function PopoverContent({
|
|
20
16
|
className,
|
|
21
17
|
align = "center",
|
|
@@ -27,7 +23,7 @@ function PopoverContent({
|
|
|
27
23
|
{
|
|
28
24
|
align,
|
|
29
25
|
className: cn(
|
|
30
|
-
"nt:z-50 nt:w-72 nt:origin-(--radix-popover-content-transform-origin) nt:rounded-lg nt:bg-popover nt:p-
|
|
26
|
+
"nt:z-50 nt:flex nt:w-72 nt:origin-(--radix-popover-content-transform-origin) nt:flex-col nt:gap-2.5 nt:rounded-lg nt:bg-popover nt:p-2.5 nt:text-sm nt:text-popover-foreground nt:shadow-md nt:ring-1 nt:ring-foreground/10 nt:outline-hidden nt:duration-100 nt:data-[side=bottom]:slide-in-from-top-2 nt:data-[side=left]:slide-in-from-right-2 nt:data-[side=right]:slide-in-from-left-2 nt:data-[side=top]:slide-in-from-bottom-2 nt:data-open:animate-in nt:data-open:fade-in-0 nt:data-open:zoom-in-95 nt:data-closed:animate-out nt:data-closed:fade-out-0 nt:data-closed:zoom-out-95",
|
|
31
27
|
className
|
|
32
28
|
),
|
|
33
29
|
"data-slot": "popover-content",
|
|
@@ -36,10 +32,51 @@ function PopoverContent({
|
|
|
36
32
|
}
|
|
37
33
|
) });
|
|
38
34
|
}
|
|
35
|
+
function PopoverAnchor({
|
|
36
|
+
...props
|
|
37
|
+
}) {
|
|
38
|
+
return /* @__PURE__ */ jsx(PopoverPrimitive.Anchor, { "data-slot": "popover-anchor", ...props });
|
|
39
|
+
}
|
|
40
|
+
function PopoverHeader({ className, ...props }) {
|
|
41
|
+
return /* @__PURE__ */ jsx(
|
|
42
|
+
"div",
|
|
43
|
+
{
|
|
44
|
+
className: cn("nt:flex nt:flex-col nt:gap-0.5 nt:text-sm", className),
|
|
45
|
+
"data-slot": "popover-header",
|
|
46
|
+
...props
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
function PopoverTitle({ className, ...props }) {
|
|
51
|
+
return /* @__PURE__ */ jsx(
|
|
52
|
+
"div",
|
|
53
|
+
{
|
|
54
|
+
className: cn("nt:font-medium", className),
|
|
55
|
+
"data-slot": "popover-title",
|
|
56
|
+
...props
|
|
57
|
+
}
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
function PopoverDescription({
|
|
61
|
+
className,
|
|
62
|
+
...props
|
|
63
|
+
}) {
|
|
64
|
+
return /* @__PURE__ */ jsx(
|
|
65
|
+
"p",
|
|
66
|
+
{
|
|
67
|
+
className: cn("nt:text-muted-foreground", className),
|
|
68
|
+
"data-slot": "popover-description",
|
|
69
|
+
...props
|
|
70
|
+
}
|
|
71
|
+
);
|
|
72
|
+
}
|
|
39
73
|
export {
|
|
40
74
|
Popover,
|
|
41
75
|
PopoverAnchor,
|
|
42
76
|
PopoverContent,
|
|
77
|
+
PopoverDescription,
|
|
78
|
+
PopoverHeader,
|
|
79
|
+
PopoverTitle,
|
|
43
80
|
PopoverTrigger
|
|
44
81
|
};
|
|
45
82
|
//# sourceMappingURL=popover.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/ui/popover.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ui/popover.tsx"],"sourcesContent":["'use client';\n\nimport { Popover as PopoverPrimitive } from 'radix-ui';\nimport * as React from 'react';\n\nimport { cn } from '../../lib/utils';\n\nfunction Popover({\n\t...props\n}: React.ComponentProps<typeof PopoverPrimitive.Root>) {\n\treturn <PopoverPrimitive.Root data-slot=\"popover\" {...props} />;\n}\n\nfunction PopoverTrigger({\n\t...props\n}: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {\n\treturn <PopoverPrimitive.Trigger data-slot=\"popover-trigger\" {...props} />;\n}\n\nfunction PopoverContent({\n\tclassName,\n\talign = 'center',\n\tsideOffset = 4,\n\t...props\n}: React.ComponentProps<typeof PopoverPrimitive.Content>) {\n\treturn (\n\t\t<PopoverPrimitive.Portal>\n\t\t\t<PopoverPrimitive.Content\n\t\t\t\talign={align}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'nt:z-50 nt:flex nt:w-72 nt:origin-(--radix-popover-content-transform-origin) nt:flex-col nt:gap-2.5 nt:rounded-lg nt:bg-popover nt:p-2.5 nt:text-sm nt:text-popover-foreground nt:shadow-md nt:ring-1 nt:ring-foreground/10 nt:outline-hidden nt:duration-100 nt:data-[side=bottom]:slide-in-from-top-2 nt:data-[side=left]:slide-in-from-right-2 nt:data-[side=right]:slide-in-from-left-2 nt:data-[side=top]:slide-in-from-bottom-2 nt:data-open:animate-in nt:data-open:fade-in-0 nt:data-open:zoom-in-95 nt:data-closed:animate-out nt:data-closed:fade-out-0 nt:data-closed:zoom-out-95',\n\t\t\t\t\tclassName\n\t\t\t\t)}\n\t\t\t\tdata-slot=\"popover-content\"\n\t\t\t\tsideOffset={sideOffset}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t</PopoverPrimitive.Portal>\n\t);\n}\n\nfunction PopoverAnchor({\n\t...props\n}: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {\n\treturn <PopoverPrimitive.Anchor data-slot=\"popover-anchor\" {...props} />;\n}\n\nfunction PopoverHeader({ className, ...props }: React.ComponentProps<'div'>) {\n\treturn (\n\t\t<div\n\t\t\tclassName={cn('nt:flex nt:flex-col nt:gap-0.5 nt:text-sm', className)}\n\t\t\tdata-slot=\"popover-header\"\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction PopoverTitle({ className, ...props }: React.ComponentProps<'h2'>) {\n\treturn (\n\t\t<div\n\t\t\tclassName={cn('nt:font-medium', className)}\n\t\t\tdata-slot=\"popover-title\"\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction PopoverDescription({\n\tclassName,\n\t...props\n}: React.ComponentProps<'p'>) {\n\treturn (\n\t\t<p\n\t\t\tclassName={cn('nt:text-muted-foreground', className)}\n\t\t\tdata-slot=\"popover-description\"\n\t\t\t{...props}\n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AAA,EAC3B;AAAA,EACA,GAAG;AACJ,GAA8B;AAC7B,SACC;AAAA,IAAC;AAAA;AAAA,MACA,WAAW,GAAG,4BAA4B,SAAS;AAAA,MACnD,aAAU;AAAA,MACT,GAAG;AAAA;AAAA,EACL;AAEF;","names":[]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
"use client";
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
@@ -34,7 +35,7 @@ function Separator({
|
|
|
34
35
|
import_radix_ui.Separator.Root,
|
|
35
36
|
{
|
|
36
37
|
className: (0, import_utils.cn)(
|
|
37
|
-
"nt:shrink-0 nt:bg-border nt:data-
|
|
38
|
+
"nt:shrink-0 nt:bg-border nt:data-horizontal:h-px nt:data-horizontal:w-full nt:data-vertical:w-px nt:data-vertical:self-stretch",
|
|
38
39
|
className
|
|
39
40
|
),
|
|
40
41
|
"data-slot": "separator",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/ui/separator.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ui/separator.tsx"],"sourcesContent":["'use client';\n\nimport { Separator as SeparatorPrimitive } from 'radix-ui';\nimport * as React from 'react';\n\nimport { cn } from '../../lib/utils';\n\nfunction Separator({\n\tclassName,\n\torientation = 'horizontal',\n\tdecorative = true,\n\t...props\n}: React.ComponentProps<typeof SeparatorPrimitive.Root>) {\n\treturn (\n\t\t<SeparatorPrimitive.Root\n\t\t\tclassName={cn(\n\t\t\t\t'nt:shrink-0 nt:bg-border nt:data-horizontal:h-px nt:data-horizontal:w-full nt:data-vertical:w-px nt:data-vertical:self-stretch',\n\t\t\t\tclassName\n\t\t\t)}\n\t\t\tdata-slot=\"separator\"\n\t\t\tdecorative={decorative}\n\t\t\torientation={orientation}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport { Separator };\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAcE;AAZF,sBAAgD;AAGhD,mBAAmB;AAEnB,SAAS,UAAU;AAAA,EAClB;AAAA,EACA,cAAc;AAAA,EACd,aAAa;AAAA,EACb,GAAG;AACJ,GAAyD;AACxD,SACC;AAAA,IAAC,gBAAAA,UAAmB;AAAA,IAAnB;AAAA,MACA,eAAW;AAAA,QACV;AAAA,QACA;AAAA,MACD;AAAA,MACA,aAAU;AAAA,MACV;AAAA,MACA;AAAA,MACC,GAAG;AAAA;AAAA,EACL;AAEF;","names":["SeparatorPrimitive"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { Separator as Separator$1 } from 'radix-ui';
|
|
3
|
-
import * as
|
|
3
|
+
import * as React from 'react';
|
|
4
4
|
|
|
5
|
-
declare function Separator({ className, orientation, decorative, ...props }:
|
|
5
|
+
declare function Separator({ className, orientation, decorative, ...props }: React.ComponentProps<typeof Separator$1.Root>): react_jsx_runtime.JSX.Element;
|
|
6
6
|
|
|
7
7
|
export { Separator };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { Separator as Separator$1 } from 'radix-ui';
|
|
3
|
-
import * as
|
|
3
|
+
import * as React from 'react';
|
|
4
4
|
|
|
5
|
-
declare function Separator({ className, orientation, decorative, ...props }:
|
|
5
|
+
declare function Separator({ className, orientation, decorative, ...props }: React.ComponentProps<typeof Separator$1.Root>): react_jsx_runtime.JSX.Element;
|
|
6
6
|
|
|
7
7
|
export { Separator };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { jsx } from "react/jsx-runtime";
|
|
2
3
|
import { Separator as SeparatorPrimitive } from "radix-ui";
|
|
3
4
|
import { cn } from "../../lib/utils";
|
|
@@ -11,7 +12,7 @@ function Separator({
|
|
|
11
12
|
SeparatorPrimitive.Root,
|
|
12
13
|
{
|
|
13
14
|
className: cn(
|
|
14
|
-
"nt:shrink-0 nt:bg-border nt:data-
|
|
15
|
+
"nt:shrink-0 nt:bg-border nt:data-horizontal:h-px nt:data-horizontal:w-full nt:data-vertical:w-px nt:data-vertical:self-stretch",
|
|
15
16
|
className
|
|
16
17
|
),
|
|
17
18
|
"data-slot": "separator",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/ui/separator.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ui/separator.tsx"],"sourcesContent":["'use client';\n\nimport { Separator as SeparatorPrimitive } from 'radix-ui';\nimport * as React from 'react';\n\nimport { cn } from '../../lib/utils';\n\nfunction Separator({\n\tclassName,\n\torientation = 'horizontal',\n\tdecorative = true,\n\t...props\n}: React.ComponentProps<typeof SeparatorPrimitive.Root>) {\n\treturn (\n\t\t<SeparatorPrimitive.Root\n\t\t\tclassName={cn(\n\t\t\t\t'nt:shrink-0 nt:bg-border nt:data-horizontal:h-px nt:data-horizontal:w-full nt:data-vertical:w-px nt:data-vertical:self-stretch',\n\t\t\t\tclassName\n\t\t\t)}\n\t\t\tdata-slot=\"separator\"\n\t\t\tdecorative={decorative}\n\t\t\torientation={orientation}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport { Separator };\n"],"mappings":";AAcE;AAZF,SAAS,aAAa,0BAA0B;AAGhD,SAAS,UAAU;AAEnB,SAAS,UAAU;AAAA,EAClB;AAAA,EACA,cAAc;AAAA,EACd,aAAa;AAAA,EACb,GAAG;AACJ,GAAyD;AACxD,SACC;AAAA,IAAC,mBAAmB;AAAA,IAAnB;AAAA,MACA,WAAW;AAAA,QACV;AAAA,QACA;AAAA,MACD;AAAA,MACA,aAAU;AAAA,MACV;AAAA,MACA;AAAA,MACC,GAAG;AAAA;AAAA,EACL;AAEF;","names":[]}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var textarea_exports = {};
|
|
20
|
+
__export(textarea_exports, {
|
|
21
|
+
Textarea: () => Textarea
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(textarea_exports);
|
|
24
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
25
|
+
var import_utils = require("../../lib/utils");
|
|
26
|
+
function Textarea({ className, ...props }) {
|
|
27
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
28
|
+
"textarea",
|
|
29
|
+
{
|
|
30
|
+
className: (0, import_utils.cn)(
|
|
31
|
+
"nt:flex nt:field-sizing-content nt:min-h-16 nt:w-full nt:rounded-lg nt:border nt:border-input nt:bg-transparent nt:px-2.5 nt:py-2 nt:text-base nt:transition-colors nt:outline-none nt:placeholder:text-muted-foreground nt:focus-visible:border-ring nt:focus-visible:ring-3 nt:focus-visible:ring-ring/50 nt:disabled:cursor-not-allowed nt:disabled:bg-input/50 nt:disabled:opacity-50 nt:aria-invalid:border-destructive nt:aria-invalid:ring-3 nt:aria-invalid:ring-destructive/20 nt:md:text-sm nt:dark:bg-input/30 nt:dark:disabled:bg-input/80 nt:dark:aria-invalid:border-destructive/50 nt:dark:aria-invalid:ring-destructive/40",
|
|
32
|
+
className
|
|
33
|
+
),
|
|
34
|
+
"data-slot": "textarea",
|
|
35
|
+
...props
|
|
36
|
+
}
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
40
|
+
0 && (module.exports = {
|
|
41
|
+
Textarea
|
|
42
|
+
});
|
|
43
|
+
//# sourceMappingURL=textarea.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ui/textarea.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { cn } from '../../lib/utils';\n\nfunction Textarea({ className, ...props }: React.ComponentProps<'textarea'>) {\n\treturn (\n\t\t<textarea\n\t\t\tclassName={cn(\n\t\t\t\t'nt:flex nt:field-sizing-content nt:min-h-16 nt:w-full nt:rounded-lg nt:border nt:border-input nt:bg-transparent nt:px-2.5 nt:py-2 nt:text-base nt:transition-colors nt:outline-none nt:placeholder:text-muted-foreground nt:focus-visible:border-ring nt:focus-visible:ring-3 nt:focus-visible:ring-ring/50 nt:disabled:cursor-not-allowed nt:disabled:bg-input/50 nt:disabled:opacity-50 nt:aria-invalid:border-destructive nt:aria-invalid:ring-3 nt:aria-invalid:ring-destructive/20 nt:md:text-sm nt:dark:bg-input/30 nt:dark:disabled:bg-input/80 nt:dark:aria-invalid:border-destructive/50 nt:dark:aria-invalid:ring-destructive/40',\n\t\t\t\tclassName\n\t\t\t)}\n\t\t\tdata-slot=\"textarea\"\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport { Textarea };\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAME;AAJF,mBAAmB;AAEnB,SAAS,SAAS,EAAE,WAAW,GAAG,MAAM,GAAqC;AAC5E,SACC;AAAA,IAAC;AAAA;AAAA,MACA,eAAW;AAAA,QACV;AAAA,QACA;AAAA,MACD;AAAA,MACA,aAAU;AAAA,MACT,GAAG;AAAA;AAAA,EACL;AAEF;","names":[]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../../lib/utils";
|
|
3
|
+
function Textarea({ className, ...props }) {
|
|
4
|
+
return /* @__PURE__ */ jsx(
|
|
5
|
+
"textarea",
|
|
6
|
+
{
|
|
7
|
+
className: cn(
|
|
8
|
+
"nt:flex nt:field-sizing-content nt:min-h-16 nt:w-full nt:rounded-lg nt:border nt:border-input nt:bg-transparent nt:px-2.5 nt:py-2 nt:text-base nt:transition-colors nt:outline-none nt:placeholder:text-muted-foreground nt:focus-visible:border-ring nt:focus-visible:ring-3 nt:focus-visible:ring-ring/50 nt:disabled:cursor-not-allowed nt:disabled:bg-input/50 nt:disabled:opacity-50 nt:aria-invalid:border-destructive nt:aria-invalid:ring-3 nt:aria-invalid:ring-destructive/20 nt:md:text-sm nt:dark:bg-input/30 nt:dark:disabled:bg-input/80 nt:dark:aria-invalid:border-destructive/50 nt:dark:aria-invalid:ring-destructive/40",
|
|
9
|
+
className
|
|
10
|
+
),
|
|
11
|
+
"data-slot": "textarea",
|
|
12
|
+
...props
|
|
13
|
+
}
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
Textarea
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=textarea.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ui/textarea.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { cn } from '../../lib/utils';\n\nfunction Textarea({ className, ...props }: React.ComponentProps<'textarea'>) {\n\treturn (\n\t\t<textarea\n\t\t\tclassName={cn(\n\t\t\t\t'nt:flex nt:field-sizing-content nt:min-h-16 nt:w-full nt:rounded-lg nt:border nt:border-input nt:bg-transparent nt:px-2.5 nt:py-2 nt:text-base nt:transition-colors nt:outline-none nt:placeholder:text-muted-foreground nt:focus-visible:border-ring nt:focus-visible:ring-3 nt:focus-visible:ring-ring/50 nt:disabled:cursor-not-allowed nt:disabled:bg-input/50 nt:disabled:opacity-50 nt:aria-invalid:border-destructive nt:aria-invalid:ring-3 nt:aria-invalid:ring-destructive/20 nt:md:text-sm nt:dark:bg-input/30 nt:dark:disabled:bg-input/80 nt:dark:aria-invalid:border-destructive/50 nt:dark:aria-invalid:ring-destructive/40',\n\t\t\t\tclassName\n\t\t\t)}\n\t\t\tdata-slot=\"textarea\"\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport { Textarea };\n"],"mappings":"AAME;AAJF,SAAS,UAAU;AAEnB,SAAS,SAAS,EAAE,WAAW,GAAG,MAAM,GAAqC;AAC5E,SACC;AAAA,IAAC;AAAA;AAAA,MACA,WAAW;AAAA,QACV;AAAA,QACA;AAAA,MACD;AAAA,MACA,aAAU;AAAA,MACT,GAAG;AAAA;AAAA,EACL;AAEF;","names":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as React$1 from 'react';
|
|
2
2
|
import { UndoRedoAction } from './use-undo-redo.cjs';
|
|
3
3
|
import { Editor } from '@tiptap/core';
|
|
4
4
|
import 'lucide-react';
|
|
@@ -7,6 +7,6 @@ interface UndoRedoButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButton
|
|
|
7
7
|
editor: Editor | null;
|
|
8
8
|
action: UndoRedoAction;
|
|
9
9
|
}
|
|
10
|
-
declare const UndoRedoButton:
|
|
10
|
+
declare const UndoRedoButton: React$1.ForwardRefExoticComponent<UndoRedoButtonProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
11
11
|
|
|
12
12
|
export { UndoRedoButton, type UndoRedoButtonProps };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as React$1 from 'react';
|
|
2
2
|
import { UndoRedoAction } from './use-undo-redo.js';
|
|
3
3
|
import { Editor } from '@tiptap/core';
|
|
4
4
|
import 'lucide-react';
|
|
@@ -7,6 +7,6 @@ interface UndoRedoButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButton
|
|
|
7
7
|
editor: Editor | null;
|
|
8
8
|
action: UndoRedoAction;
|
|
9
9
|
}
|
|
10
|
-
declare const UndoRedoButton:
|
|
10
|
+
declare const UndoRedoButton: React$1.ForwardRefExoticComponent<UndoRedoButtonProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
11
11
|
|
|
12
12
|
export { UndoRedoButton, type UndoRedoButtonProps };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import * as lucide_react from 'lucide-react';
|
|
3
3
|
import { Editor } from '@tiptap/core';
|
|
4
4
|
|
|
@@ -11,7 +11,7 @@ declare function useUndoRedo({ editor, action }: UseUndoRedoConfig): {
|
|
|
11
11
|
canExecute: boolean;
|
|
12
12
|
handleAction: () => boolean;
|
|
13
13
|
label: string;
|
|
14
|
-
Icon:
|
|
14
|
+
Icon: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
export { type UndoRedoAction, type UseUndoRedoConfig, useUndoRedo };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import * as lucide_react from 'lucide-react';
|
|
3
3
|
import { Editor } from '@tiptap/core';
|
|
4
4
|
|
|
@@ -11,7 +11,7 @@ declare function useUndoRedo({ editor, action }: UseUndoRedoConfig): {
|
|
|
11
11
|
canExecute: boolean;
|
|
12
12
|
handleAction: () => boolean;
|
|
13
13
|
label: string;
|
|
14
|
-
Icon:
|
|
14
|
+
Icon: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
export { type UndoRedoAction, type UseUndoRedoConfig, useUndoRedo };
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
2
|
var __defProp = Object.defineProperty;
|
|
4
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
6
|
var __export = (target, all) => {
|
|
9
7
|
for (var name in all)
|
|
@@ -17,30 +15,89 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
15
|
}
|
|
18
16
|
return to;
|
|
19
17
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
19
|
var code_block_exports = {};
|
|
30
20
|
__export(code_block_exports, {
|
|
31
|
-
CodeBlockExtension: () => CodeBlockExtension
|
|
21
|
+
CodeBlockExtension: () => CodeBlockExtension,
|
|
22
|
+
createCodeBlockExtension: () => createCodeBlockExtension,
|
|
23
|
+
defaultLowlight: () => defaultLowlight
|
|
32
24
|
});
|
|
33
25
|
module.exports = __toCommonJS(code_block_exports);
|
|
34
|
-
var
|
|
26
|
+
var import_core = require("@tiptap/core");
|
|
27
|
+
var import_extension_code_block_lowlight = require("@tiptap/extension-code-block-lowlight");
|
|
35
28
|
var import_react = require("@tiptap/react");
|
|
36
|
-
var
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
29
|
+
var import_lowlight = require("lowlight");
|
|
30
|
+
var import_code_block_view = require("../components/code-block-view/code-block-view");
|
|
31
|
+
var import_languages = require("../lib/languages");
|
|
32
|
+
const defaultLowlight = (0, import_lowlight.createLowlight)(import_lowlight.common);
|
|
33
|
+
const backtickInputRegex = /^```([a-z]+)?[\s\n]$/;
|
|
34
|
+
const tildeInputRegex = /^~~~([a-z]+)?[\s\n]$/;
|
|
35
|
+
function createCodeBlockExtension(lowlight) {
|
|
36
|
+
return import_extension_code_block_lowlight.CodeBlockLowlight.configure({
|
|
37
|
+
lowlight,
|
|
38
|
+
// Tab inserts spaces instead of leaving the editor; Shift-Tab dedents.
|
|
39
|
+
enableTabIndentation: true,
|
|
40
|
+
tabSize: 2
|
|
41
|
+
}).extend({
|
|
42
|
+
addNodeView() {
|
|
43
|
+
return (0, import_react.ReactNodeViewRenderer)(import_code_block_view.CodeBlockView);
|
|
44
|
+
},
|
|
45
|
+
addKeyboardShortcuts() {
|
|
46
|
+
const parent = this.parent?.() ?? {};
|
|
47
|
+
return {
|
|
48
|
+
...parent,
|
|
49
|
+
Tab: ({ editor }) => {
|
|
50
|
+
if (!this.options.enableTabIndentation) {
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
const tabSize = this.options.tabSize ?? 2;
|
|
54
|
+
const { selection } = editor.state;
|
|
55
|
+
const { $from, empty } = selection;
|
|
56
|
+
if ($from.parent.type !== this.type) {
|
|
57
|
+
return false;
|
|
58
|
+
}
|
|
59
|
+
const indent = " ".repeat(tabSize);
|
|
60
|
+
if (empty) {
|
|
61
|
+
return editor.commands.command(({ tr }) => {
|
|
62
|
+
tr.insertText(indent);
|
|
63
|
+
return true;
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
return editor.commands.command(({ tr, state }) => {
|
|
67
|
+
const { from, to } = selection;
|
|
68
|
+
const text = state.doc.textBetween(from, to, "\n", "\n");
|
|
69
|
+
const indented = text.split("\n").map((line) => indent + line).join("\n");
|
|
70
|
+
tr.replaceWith(from, to, state.schema.text(indented));
|
|
71
|
+
return true;
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
},
|
|
76
|
+
addInputRules() {
|
|
77
|
+
return [
|
|
78
|
+
(0, import_core.textblockTypeInputRule)({
|
|
79
|
+
find: backtickInputRegex,
|
|
80
|
+
type: this.type,
|
|
81
|
+
getAttributes: (match) => ({
|
|
82
|
+
language: (0, import_languages.normalizeLanguage)(match[1])
|
|
83
|
+
})
|
|
84
|
+
}),
|
|
85
|
+
(0, import_core.textblockTypeInputRule)({
|
|
86
|
+
find: tildeInputRegex,
|
|
87
|
+
type: this.type,
|
|
88
|
+
getAttributes: (match) => ({
|
|
89
|
+
language: (0, import_languages.normalizeLanguage)(match[1])
|
|
90
|
+
})
|
|
91
|
+
})
|
|
92
|
+
];
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
const CodeBlockExtension = createCodeBlockExtension(defaultLowlight);
|
|
42
97
|
// Annotate the CommonJS export names for ESM import in node:
|
|
43
98
|
0 && (module.exports = {
|
|
44
|
-
CodeBlockExtension
|
|
99
|
+
CodeBlockExtension,
|
|
100
|
+
createCodeBlockExtension,
|
|
101
|
+
defaultLowlight
|
|
45
102
|
});
|
|
46
103
|
//# sourceMappingURL=code-block.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/extensions/code-block.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"sources":["../../src/extensions/code-block.ts"],"sourcesContent":["import { textblockTypeInputRule } from '@tiptap/core';\nimport { CodeBlockLowlight } from '@tiptap/extension-code-block-lowlight';\nimport { ReactNodeViewRenderer } from '@tiptap/react';\nimport { common, createLowlight } from 'lowlight';\n\nimport { CodeBlockView } from '../components/code-block-view/code-block-view';\nimport { normalizeLanguage } from '../lib/languages';\n\ntype Lowlight = ReturnType<typeof createLowlight>;\n\n// Module-level instance, shared by the default CodeBlockExtension and the\n// reader. Loads the lowlight `common` set (~37 mainstream languages, ~150 KB).\n// Consumers needing more or fewer languages should call createCodeBlockExtension\n// with their own instance and pass the same instance to <NotraReader lowlight={…} />.\nexport const defaultLowlight: Lowlight = createLowlight(common);\n\n// Mirrors the regexes in @tiptap/extension-code-block. Override the rules so\n// the captured language is collapsed to its canonical LANGUAGES value before\n// being written to the node attribute (e.g. ```js → language: \"javascript\").\nconst backtickInputRegex = /^```([a-z]+)?[\\s\\n]$/;\nconst tildeInputRegex = /^~~~([a-z]+)?[\\s\\n]$/;\n\nexport function createCodeBlockExtension(lowlight: Lowlight) {\n\treturn CodeBlockLowlight.configure({\n\t\tlowlight,\n\t\t// Tab inserts spaces instead of leaving the editor; Shift-Tab dedents.\n\t\tenableTabIndentation: true,\n\t\ttabSize: 2\n\t}).extend({\n\t\taddNodeView() {\n\t\t\treturn ReactNodeViewRenderer(CodeBlockView);\n\t\t},\n\t\taddKeyboardShortcuts() {\n\t\t\tconst parent = this.parent?.() ?? {};\n\n\t\t\t// Upstream's empty-selection Tab branch goes through\n\t\t\t// `editor.commands.insertContent(' '.repeat(tabSize))`, which\n\t\t\t// `tiptap-markdown` reroutes via its overridden `insertContentAt`\n\t\t\t// → `markdown.parser.parse(...)`. Whitespace-only input parses to\n\t\t\t// an empty document, so the spaces vanish while the keymap still\n\t\t\t// reports the event as handled. Use a raw transaction instead.\n\t\t\treturn {\n\t\t\t\t...parent,\n\t\t\t\tTab: ({ editor }) => {\n\t\t\t\t\tif (!this.options.enableTabIndentation) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst tabSize = this.options.tabSize ?? 2;\n\t\t\t\t\tconst { selection } = editor.state;\n\t\t\t\t\tconst { $from, empty } = selection;\n\n\t\t\t\t\tif ($from.parent.type !== this.type) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst indent = ' '.repeat(tabSize);\n\n\t\t\t\t\tif (empty) {\n\t\t\t\t\t\treturn editor.commands.command(({ tr }) => {\n\t\t\t\t\t\t\ttr.insertText(indent);\n\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\n\t\t\t\t\treturn editor.commands.command(({ tr, state }) => {\n\t\t\t\t\t\tconst { from, to } = selection;\n\t\t\t\t\t\tconst text = state.doc.textBetween(from, to, '\\n', '\\n');\n\t\t\t\t\t\tconst indented = text\n\t\t\t\t\t\t\t.split('\\n')\n\t\t\t\t\t\t\t.map((line) => indent + line)\n\t\t\t\t\t\t\t.join('\\n');\n\n\t\t\t\t\t\ttr.replaceWith(from, to, state.schema.text(indented));\n\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t};\n\t\t},\n\t\taddInputRules() {\n\t\t\treturn [\n\t\t\t\ttextblockTypeInputRule({\n\t\t\t\t\tfind: backtickInputRegex,\n\t\t\t\t\ttype: this.type,\n\t\t\t\t\tgetAttributes: (match) => ({\n\t\t\t\t\t\tlanguage: normalizeLanguage(match[1])\n\t\t\t\t\t})\n\t\t\t\t}),\n\t\t\t\ttextblockTypeInputRule({\n\t\t\t\t\tfind: tildeInputRegex,\n\t\t\t\t\ttype: this.type,\n\t\t\t\t\tgetAttributes: (match) => ({\n\t\t\t\t\t\tlanguage: normalizeLanguage(match[1])\n\t\t\t\t\t})\n\t\t\t\t})\n\t\t\t];\n\t\t}\n\t});\n}\n\nexport const CodeBlockExtension = createCodeBlockExtension(defaultLowlight);\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAuC;AACvC,2CAAkC;AAClC,mBAAsC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AA,QACF;AAAA,MACD;AAAA,IACD;AAAA,IACA,gBAAgB;AACf,aAAO;AAAA,YACN,oCAAuB;AAAA,UACtB,MAAM;AAAA,UACN,MAAM,KAAK;AAAA,UACX,eAAe,CAAC,WAAW;AAAA,YAC1B,cAAU,oCAAkB,MAAM,CAAC,CAAC;AAAA,UACrC;AAAA,QACD,CAAC;AAAA,YACD,oCAAuB;AAAA,UACtB,MAAM;AAAA,UACN,MAAM,KAAK;AAAA,UACX,eAAe,CAAC,WAAW;AAAA,YAC1B,cAAU,oCAAkB,MAAM,CAAC,CAAC;AAAA,UACrC;AAAA,QACD,CAAC;AAAA,MACF;AAAA,IACD;AAAA,EACD,CAAC;AACF;AAEO,MAAM,qBAAqB,yBAAyB,eAAe;","names":[]}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import * as _tiptap_core from '@tiptap/core';
|
|
2
|
-
import * as
|
|
2
|
+
import * as _tiptap_extension_code_block_lowlight from '@tiptap/extension-code-block-lowlight';
|
|
3
|
+
import { createLowlight } from 'lowlight';
|
|
3
4
|
|
|
4
|
-
|
|
5
|
+
type Lowlight = ReturnType<typeof createLowlight>;
|
|
6
|
+
declare const defaultLowlight: Lowlight;
|
|
7
|
+
declare function createCodeBlockExtension(lowlight: Lowlight): _tiptap_core.Node<_tiptap_extension_code_block_lowlight.CodeBlockLowlightOptions, any>;
|
|
8
|
+
declare const CodeBlockExtension: _tiptap_core.Node<_tiptap_extension_code_block_lowlight.CodeBlockLowlightOptions, any>;
|
|
5
9
|
|
|
6
|
-
export { CodeBlockExtension };
|
|
10
|
+
export { CodeBlockExtension, createCodeBlockExtension, defaultLowlight };
|