notra-editor 0.3.0 → 0.4.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/README.md +4 -8
- package/dist/components/blockquote-button/blockquote-button.cjs +91 -0
- package/dist/components/blockquote-button/blockquote-button.cjs.map +1 -0
- package/dist/components/blockquote-button/blockquote-button.d.cts +9 -0
- package/dist/components/blockquote-button/blockquote-button.d.ts +9 -0
- package/dist/components/blockquote-button/blockquote-button.mjs +67 -0
- package/dist/components/blockquote-button/blockquote-button.mjs.map +1 -0
- package/dist/components/code-block-button/code-block-button.cjs +91 -0
- package/dist/components/code-block-button/code-block-button.cjs.map +1 -0
- package/dist/components/code-block-button/code-block-button.d.cts +9 -0
- package/dist/components/code-block-button/code-block-button.d.ts +9 -0
- package/dist/components/code-block-button/code-block-button.mjs +67 -0
- package/dist/components/code-block-button/code-block-button.mjs.map +1 -0
- package/dist/components/code-block-view.cjs +39 -0
- package/dist/components/code-block-view.cjs.map +1 -0
- package/dist/components/code-block-view.d.cts +12 -0
- package/dist/components/code-block-view.d.ts +12 -0
- package/dist/components/code-block-view.mjs +17 -0
- package/dist/components/code-block-view.mjs.map +1 -0
- package/dist/components/copy-button.cjs +49 -0
- package/dist/components/copy-button.cjs.map +1 -0
- package/dist/components/copy-button.d.cts +9 -0
- package/dist/components/copy-button.d.ts +9 -0
- package/dist/components/copy-button.mjs +25 -0
- package/dist/components/copy-button.mjs.map +1 -0
- package/dist/components/heading-dropdown-menu/heading-dropdown-menu.cjs +67 -0
- package/dist/components/heading-dropdown-menu/heading-dropdown-menu.cjs.map +1 -0
- package/dist/components/heading-dropdown-menu/heading-dropdown-menu.d.cts +17 -0
- package/dist/components/heading-dropdown-menu/heading-dropdown-menu.d.ts +17 -0
- package/dist/components/heading-dropdown-menu/heading-dropdown-menu.mjs +51 -0
- package/dist/components/heading-dropdown-menu/heading-dropdown-menu.mjs.map +1 -0
- package/dist/components/heading-dropdown-menu/heading-menu-item.cjs +56 -0
- package/dist/components/heading-dropdown-menu/heading-menu-item.cjs.map +1 -0
- package/dist/components/heading-dropdown-menu/heading-menu-item.d.cts +12 -0
- package/dist/components/heading-dropdown-menu/heading-menu-item.d.ts +12 -0
- package/dist/components/heading-dropdown-menu/heading-menu-item.mjs +32 -0
- package/dist/components/heading-dropdown-menu/heading-menu-item.mjs.map +1 -0
- package/dist/components/heading-dropdown-menu/use-heading.cjs +109 -0
- package/dist/components/heading-dropdown-menu/use-heading.cjs.map +1 -0
- package/dist/components/heading-dropdown-menu/use-heading.d.cts +19 -0
- package/dist/components/heading-dropdown-menu/use-heading.d.ts +19 -0
- package/dist/components/heading-dropdown-menu/use-heading.mjs +83 -0
- package/dist/components/heading-dropdown-menu/use-heading.mjs.map +1 -0
- package/dist/components/link-popover/link-popover.cjs +148 -0
- package/dist/components/link-popover/link-popover.cjs.map +1 -0
- package/dist/components/link-popover/link-popover.d.cts +9 -0
- package/dist/components/link-popover/link-popover.d.ts +9 -0
- package/dist/components/link-popover/link-popover.mjs +129 -0
- package/dist/components/link-popover/link-popover.mjs.map +1 -0
- package/dist/components/link-popover/use-link-popover.cjs +71 -0
- package/dist/components/link-popover/use-link-popover.cjs.map +1 -0
- package/dist/components/link-popover/use-link-popover.d.cts +17 -0
- package/dist/components/link-popover/use-link-popover.d.ts +17 -0
- package/dist/components/link-popover/use-link-popover.mjs +47 -0
- package/dist/components/link-popover/use-link-popover.mjs.map +1 -0
- package/dist/components/list-dropdown-menu/list-dropdown-menu.cjs +73 -0
- package/dist/components/list-dropdown-menu/list-dropdown-menu.cjs.map +1 -0
- package/dist/components/list-dropdown-menu/list-dropdown-menu.d.cts +17 -0
- package/dist/components/list-dropdown-menu/list-dropdown-menu.d.ts +17 -0
- package/dist/components/list-dropdown-menu/list-dropdown-menu.mjs +57 -0
- package/dist/components/list-dropdown-menu/list-dropdown-menu.mjs.map +1 -0
- package/dist/components/list-dropdown-menu/list-menu-item.cjs +56 -0
- package/dist/components/list-dropdown-menu/list-menu-item.cjs.map +1 -0
- package/dist/components/list-dropdown-menu/list-menu-item.d.cts +12 -0
- package/dist/components/list-dropdown-menu/list-menu-item.d.ts +12 -0
- package/dist/components/list-dropdown-menu/list-menu-item.mjs +32 -0
- package/dist/components/list-dropdown-menu/list-menu-item.mjs.map +1 -0
- package/dist/components/list-dropdown-menu/use-list.cjs +111 -0
- package/dist/components/list-dropdown-menu/use-list.cjs.map +1 -0
- package/dist/components/list-dropdown-menu/use-list.d.cts +19 -0
- package/dist/components/list-dropdown-menu/use-list.d.ts +19 -0
- package/dist/components/list-dropdown-menu/use-list.mjs +85 -0
- package/dist/components/list-dropdown-menu/use-list.mjs.map +1 -0
- package/dist/components/mark-button/mark-button.cjs +72 -0
- package/dist/components/mark-button/mark-button.cjs.map +1 -0
- package/dist/components/mark-button/mark-button.d.cts +12 -0
- package/dist/components/mark-button/mark-button.d.ts +12 -0
- package/dist/components/mark-button/mark-button.mjs +48 -0
- package/dist/components/mark-button/mark-button.mjs.map +1 -0
- package/dist/components/mark-button/use-mark.cjs +71 -0
- package/dist/components/mark-button/use-mark.cjs.map +1 -0
- package/dist/components/mark-button/use-mark.d.cts +17 -0
- package/dist/components/mark-button/use-mark.d.ts +17 -0
- package/dist/components/mark-button/use-mark.mjs +47 -0
- package/dist/components/mark-button/use-mark.mjs.map +1 -0
- package/dist/components/toolbar/toolbar.cjs +77 -0
- package/dist/components/toolbar/toolbar.cjs.map +1 -0
- package/dist/components/toolbar/toolbar.d.cts +14 -0
- package/dist/components/toolbar/toolbar.d.ts +14 -0
- package/dist/components/toolbar/toolbar.mjs +51 -0
- package/dist/components/toolbar/toolbar.mjs.map +1 -0
- package/dist/components/ui/button.cjs +82 -0
- package/dist/components/ui/button.cjs.map +1 -0
- package/dist/components/ui/button.d.cts +14 -0
- package/dist/components/ui/button.d.ts +14 -0
- package/dist/components/ui/button.mjs +57 -0
- package/dist/components/ui/button.mjs.map +1 -0
- package/dist/components/ui/dropdown-menu.cjs +290 -0
- package/dist/components/ui/dropdown-menu.cjs.map +1 -0
- package/dist/components/ui/dropdown-menu.d.cts +32 -0
- package/dist/components/ui/dropdown-menu.d.ts +32 -0
- package/dist/components/ui/dropdown-menu.mjs +252 -0
- package/dist/components/ui/dropdown-menu.mjs.map +1 -0
- package/dist/components/ui/input.cjs +44 -0
- package/dist/components/ui/input.cjs.map +1 -0
- package/dist/components/ui/input.d.cts +6 -0
- package/dist/components/ui/input.d.ts +6 -0
- package/dist/components/ui/input.mjs +20 -0
- package/dist/components/ui/input.mjs.map +1 -0
- package/dist/components/ui/popover.cjs +72 -0
- package/dist/components/ui/popover.cjs.map +1 -0
- package/dist/components/ui/popover.d.cts +10 -0
- package/dist/components/ui/popover.d.ts +10 -0
- package/dist/components/ui/popover.mjs +45 -0
- package/dist/components/ui/popover.mjs.map +1 -0
- package/dist/components/ui/separator.cjs +51 -0
- package/dist/components/ui/separator.cjs.map +1 -0
- package/dist/components/ui/separator.d.cts +7 -0
- package/dist/components/ui/separator.d.ts +7 -0
- package/dist/components/ui/separator.mjs +27 -0
- package/dist/components/ui/separator.mjs.map +1 -0
- package/dist/components/ui/spacer.cjs +32 -0
- package/dist/components/ui/spacer.cjs.map +1 -0
- package/dist/components/ui/spacer.d.cts +5 -0
- package/dist/components/ui/spacer.d.ts +5 -0
- package/dist/components/ui/spacer.mjs +8 -0
- package/dist/components/ui/spacer.mjs.map +1 -0
- package/dist/components/undo-redo-button/undo-redo-button.cjs +63 -0
- package/dist/components/undo-redo-button/undo-redo-button.cjs.map +1 -0
- package/dist/components/undo-redo-button/undo-redo-button.d.cts +12 -0
- package/dist/components/undo-redo-button/undo-redo-button.d.ts +12 -0
- package/dist/components/undo-redo-button/undo-redo-button.mjs +39 -0
- package/dist/components/undo-redo-button/undo-redo-button.mjs.map +1 -0
- package/dist/components/undo-redo-button/use-undo-redo.cjs +68 -0
- package/dist/components/undo-redo-button/use-undo-redo.cjs.map +1 -0
- package/dist/components/undo-redo-button/use-undo-redo.d.cts +17 -0
- package/dist/components/undo-redo-button/use-undo-redo.d.ts +17 -0
- package/dist/components/undo-redo-button/use-undo-redo.mjs +44 -0
- package/dist/components/undo-redo-button/use-undo-redo.mjs.map +1 -0
- package/dist/extensions/code-block.cjs +46 -0
- package/dist/extensions/code-block.cjs.map +1 -0
- package/dist/extensions/code-block.d.cts +6 -0
- package/dist/extensions/code-block.d.ts +6 -0
- package/dist/extensions/code-block.mjs +12 -0
- package/dist/extensions/code-block.mjs.map +1 -0
- package/dist/extensions/editor.cjs +53 -0
- package/dist/extensions/editor.cjs.map +1 -0
- package/dist/extensions/editor.d.cts +9 -0
- package/dist/extensions/editor.d.ts +9 -0
- package/dist/extensions/editor.mjs +19 -0
- package/dist/extensions/editor.mjs.map +1 -0
- package/dist/extensions/index.cjs +32 -0
- package/dist/extensions/index.cjs.map +1 -0
- package/dist/extensions/index.d.cts +7 -0
- package/dist/extensions/index.d.ts +7 -0
- package/dist/extensions/index.mjs +7 -0
- package/dist/extensions/index.mjs.map +1 -0
- package/dist/extensions/shared.cjs +64 -0
- package/dist/extensions/shared.cjs.map +1 -0
- package/dist/extensions/shared.d.cts +8 -0
- package/dist/extensions/shared.d.ts +8 -0
- package/dist/extensions/shared.mjs +29 -0
- package/dist/extensions/shared.mjs.map +1 -0
- package/dist/hooks/use-copy-to-clipboard.cjs +50 -0
- package/dist/hooks/use-copy-to-clipboard.cjs.map +1 -0
- package/dist/hooks/use-copy-to-clipboard.d.cts +10 -0
- package/dist/hooks/use-copy-to-clipboard.d.ts +10 -0
- package/dist/hooks/use-copy-to-clipboard.mjs +26 -0
- package/dist/hooks/use-copy-to-clipboard.mjs.map +1 -0
- package/dist/hooks/use-markdown-editor.cjs +80 -0
- package/dist/hooks/use-markdown-editor.cjs.map +1 -0
- package/dist/hooks/use-markdown-editor.d.cts +13 -0
- package/dist/hooks/use-markdown-editor.d.ts +13 -0
- package/dist/hooks/use-markdown-editor.mjs +56 -0
- package/dist/hooks/use-markdown-editor.mjs.map +1 -0
- package/dist/icons/redo-icon.cjs +54 -0
- package/dist/icons/redo-icon.cjs.map +1 -0
- package/dist/icons/redo-icon.d.cts +7 -0
- package/dist/icons/redo-icon.d.ts +7 -0
- package/dist/icons/redo-icon.mjs +30 -0
- package/dist/icons/redo-icon.mjs.map +1 -0
- package/dist/icons/undo-icon.cjs +54 -0
- package/dist/icons/undo-icon.cjs.map +1 -0
- package/dist/icons/undo-icon.d.cts +7 -0
- package/dist/icons/undo-icon.d.ts +7 -0
- package/dist/icons/undo-icon.mjs +30 -0
- package/dist/icons/undo-icon.mjs.map +1 -0
- package/dist/index.cjs +24 -1322
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +22 -105
- package/dist/index.d.ts +22 -105
- package/dist/index.mjs +14 -1301
- package/dist/index.mjs.map +1 -1
- package/dist/lib/utils.cjs +33 -0
- package/dist/lib/utils.cjs.map +1 -0
- package/dist/lib/utils.d.cts +5 -0
- package/dist/lib/utils.d.ts +5 -0
- package/dist/lib/utils.mjs +9 -0
- package/dist/lib/utils.mjs.map +1 -0
- package/dist/notra-editor.cjs +88 -0
- package/dist/notra-editor.cjs.map +1 -0
- package/dist/notra-editor.d.cts +17 -0
- package/dist/notra-editor.d.ts +17 -0
- package/dist/notra-editor.mjs +68 -0
- package/dist/notra-editor.mjs.map +1 -0
- package/dist/notra-reader.cjs +47 -0
- package/dist/notra-reader.cjs.map +1 -0
- package/dist/notra-reader.d.cts +11 -0
- package/dist/notra-reader.d.ts +11 -0
- package/dist/notra-reader.mjs +23 -0
- package/dist/notra-reader.mjs.map +1 -0
- package/dist/styles/globals.css +29 -0
- package/dist/themes/default/editor.css +2 -0
- package/dist/themes/default/reader.css +2 -0
- package/dist/utils/markdown-to-json.cjs +50 -0
- package/dist/utils/markdown-to-json.cjs.map +1 -0
- package/dist/utils/markdown-to-json.d.cts +7 -0
- package/dist/utils/markdown-to-json.d.ts +7 -0
- package/dist/utils/markdown-to-json.mjs +26 -0
- package/dist/utils/markdown-to-json.mjs.map +1 -0
- package/package.json +2 -1
|
@@ -0,0 +1,44 @@
|
|
|
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 input_exports = {};
|
|
20
|
+
__export(input_exports, {
|
|
21
|
+
Input: () => Input
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(input_exports);
|
|
24
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
25
|
+
var import_utils = require("../../lib/utils");
|
|
26
|
+
function Input({ className, type, ...props }) {
|
|
27
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
28
|
+
"input",
|
|
29
|
+
{
|
|
30
|
+
className: (0, import_utils.cn)(
|
|
31
|
+
"nt:flex nt:h-9 nt:w-full nt:min-w-0 nt:rounded-md nt:border nt:border-input nt:bg-transparent nt:px-3 nt:py-1 nt:text-base nt:shadow-xs nt:transition-[color,box-shadow] nt:outline-none nt:file:inline-flex nt:file:h-7 nt:file:border-0 nt:file:bg-transparent nt:file:text-sm nt:file:font-medium nt:file:text-foreground nt:placeholder:text-muted-foreground nt:selection:bg-primary nt:selection:text-primary-foreground nt:dark:bg-input/30 nt:md:text-sm nt:focus-visible:border-ring nt:focus-visible:ring-3 nt:focus-visible:ring-ring/50 nt:aria-invalid:border-destructive nt:aria-invalid:ring-3 nt:aria-invalid:ring-destructive/20 nt:dark:aria-invalid:ring-destructive/40 nt:disabled:cursor-not-allowed nt:disabled:opacity-50",
|
|
32
|
+
className
|
|
33
|
+
),
|
|
34
|
+
"data-slot": "input",
|
|
35
|
+
type,
|
|
36
|
+
...props
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
41
|
+
0 && (module.exports = {
|
|
42
|
+
Input
|
|
43
|
+
});
|
|
44
|
+
//# sourceMappingURL=input.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ui/input.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { cn } from '../../lib/utils';\n\nfunction Input({ className, type, ...props }: React.ComponentProps<'input'>) {\n\treturn (\n\t\t<input\n\t\t\tclassName={cn(\n\t\t\t\t'nt:flex nt:h-9 nt:w-full nt:min-w-0 nt:rounded-md nt:border nt:border-input nt:bg-transparent nt:px-3 nt:py-1 nt:text-base nt:shadow-xs nt:transition-[color,box-shadow] nt:outline-none nt:file:inline-flex nt:file:h-7 nt:file:border-0 nt:file:bg-transparent nt:file:text-sm nt:file:font-medium nt:file:text-foreground nt:placeholder:text-muted-foreground nt:selection:bg-primary nt:selection:text-primary-foreground nt:dark:bg-input/30 nt:md:text-sm nt:focus-visible:border-ring nt:focus-visible:ring-3 nt:focus-visible:ring-ring/50 nt:aria-invalid:border-destructive nt:aria-invalid:ring-3 nt:aria-invalid:ring-destructive/20 nt:dark:aria-invalid:ring-destructive/40 nt:disabled:cursor-not-allowed nt:disabled:opacity-50',\n\t\t\t\tclassName\n\t\t\t)}\n\t\t\tdata-slot=\"input\"\n\t\t\ttype={type}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport { Input };\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAME;AAJF,mBAAmB;AAEnB,SAAS,MAAM,EAAE,WAAW,MAAM,GAAG,MAAM,GAAkC;AAC5E,SACC;AAAA,IAAC;AAAA;AAAA,MACA,eAAW;AAAA,QACV;AAAA,QACA;AAAA,MACD;AAAA,MACA,aAAU;AAAA,MACV;AAAA,MACC,GAAG;AAAA;AAAA,EACL;AAEF;","names":[]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../../lib/utils";
|
|
3
|
+
function Input({ className, type, ...props }) {
|
|
4
|
+
return /* @__PURE__ */ jsx(
|
|
5
|
+
"input",
|
|
6
|
+
{
|
|
7
|
+
className: cn(
|
|
8
|
+
"nt:flex nt:h-9 nt:w-full nt:min-w-0 nt:rounded-md nt:border nt:border-input nt:bg-transparent nt:px-3 nt:py-1 nt:text-base nt:shadow-xs nt:transition-[color,box-shadow] nt:outline-none nt:file:inline-flex nt:file:h-7 nt:file:border-0 nt:file:bg-transparent nt:file:text-sm nt:file:font-medium nt:file:text-foreground nt:placeholder:text-muted-foreground nt:selection:bg-primary nt:selection:text-primary-foreground nt:dark:bg-input/30 nt:md:text-sm nt:focus-visible:border-ring nt:focus-visible:ring-3 nt:focus-visible:ring-ring/50 nt:aria-invalid:border-destructive nt:aria-invalid:ring-3 nt:aria-invalid:ring-destructive/20 nt:dark:aria-invalid:ring-destructive/40 nt:disabled:cursor-not-allowed nt:disabled:opacity-50",
|
|
9
|
+
className
|
|
10
|
+
),
|
|
11
|
+
"data-slot": "input",
|
|
12
|
+
type,
|
|
13
|
+
...props
|
|
14
|
+
}
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
Input
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=input.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ui/input.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { cn } from '../../lib/utils';\n\nfunction Input({ className, type, ...props }: React.ComponentProps<'input'>) {\n\treturn (\n\t\t<input\n\t\t\tclassName={cn(\n\t\t\t\t'nt:flex nt:h-9 nt:w-full nt:min-w-0 nt:rounded-md nt:border nt:border-input nt:bg-transparent nt:px-3 nt:py-1 nt:text-base nt:shadow-xs nt:transition-[color,box-shadow] nt:outline-none nt:file:inline-flex nt:file:h-7 nt:file:border-0 nt:file:bg-transparent nt:file:text-sm nt:file:font-medium nt:file:text-foreground nt:placeholder:text-muted-foreground nt:selection:bg-primary nt:selection:text-primary-foreground nt:dark:bg-input/30 nt:md:text-sm nt:focus-visible:border-ring nt:focus-visible:ring-3 nt:focus-visible:ring-ring/50 nt:aria-invalid:border-destructive nt:aria-invalid:ring-3 nt:aria-invalid:ring-destructive/20 nt:dark:aria-invalid:ring-destructive/40 nt:disabled:cursor-not-allowed nt:disabled:opacity-50',\n\t\t\t\tclassName\n\t\t\t)}\n\t\t\tdata-slot=\"input\"\n\t\t\ttype={type}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport { Input };\n"],"mappings":"AAME;AAJF,SAAS,UAAU;AAEnB,SAAS,MAAM,EAAE,WAAW,MAAM,GAAG,MAAM,GAAkC;AAC5E,SACC;AAAA,IAAC;AAAA;AAAA,MACA,WAAW;AAAA,QACV;AAAA,QACA;AAAA,MACD;AAAA,MACA,aAAU;AAAA,MACV;AAAA,MACC,GAAG;AAAA;AAAA,EACL;AAEF;","names":[]}
|
|
@@ -0,0 +1,72 @@
|
|
|
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 popover_exports = {};
|
|
20
|
+
__export(popover_exports, {
|
|
21
|
+
Popover: () => Popover,
|
|
22
|
+
PopoverAnchor: () => PopoverAnchor,
|
|
23
|
+
PopoverContent: () => PopoverContent,
|
|
24
|
+
PopoverTrigger: () => PopoverTrigger
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(popover_exports);
|
|
27
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
28
|
+
var import_radix_ui = require("radix-ui");
|
|
29
|
+
var import_utils = require("../../lib/utils");
|
|
30
|
+
function Popover({
|
|
31
|
+
...props
|
|
32
|
+
}) {
|
|
33
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_radix_ui.Popover.Root, { "data-slot": "popover", ...props });
|
|
34
|
+
}
|
|
35
|
+
function PopoverTrigger({
|
|
36
|
+
...props
|
|
37
|
+
}) {
|
|
38
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_radix_ui.Popover.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
39
|
+
}
|
|
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
|
+
function PopoverContent({
|
|
46
|
+
className,
|
|
47
|
+
align = "center",
|
|
48
|
+
sideOffset = 4,
|
|
49
|
+
...props
|
|
50
|
+
}) {
|
|
51
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_radix_ui.Popover.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
52
|
+
import_radix_ui.Popover.Content,
|
|
53
|
+
{
|
|
54
|
+
align,
|
|
55
|
+
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-4 nt:text-popover-foreground nt:shadow-md nt:ring-1 nt:ring-foreground/10 nt:outline-none 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
|
+
className
|
|
58
|
+
),
|
|
59
|
+
"data-slot": "popover-content",
|
|
60
|
+
sideOffset,
|
|
61
|
+
...props
|
|
62
|
+
}
|
|
63
|
+
) });
|
|
64
|
+
}
|
|
65
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
66
|
+
0 && (module.exports = {
|
|
67
|
+
Popover,
|
|
68
|
+
PopoverAnchor,
|
|
69
|
+
PopoverContent,
|
|
70
|
+
PopoverTrigger
|
|
71
|
+
});
|
|
72
|
+
//# sourceMappingURL=popover.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ui/popover.tsx"],"sourcesContent":["import { 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 PopoverAnchor({\n\t...props\n}: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {\n\treturn <PopoverPrimitive.Anchor data-slot=\"popover-anchor\" {...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:w-72 nt:origin-(--radix-popover-content-transform-origin) nt:rounded-lg nt:bg-popover nt:p-4 nt:text-popover-foreground nt:shadow-md nt:ring-1 nt:ring-foreground/10 nt:outline-none 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\nexport { Popover, PopoverAnchor, PopoverContent, PopoverTrigger };\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQQ;AARR,sBAA4C;AAG5C,mBAAmB;AAEnB,SAAS,QAAQ;AAAA,EAChB,GAAG;AACJ,GAAuD;AACtD,SAAO,4CAAC,gBAAAA,QAAiB,MAAjB,EAAsB,aAAU,WAAW,GAAG,OAAO;AAC9D;AAEA,SAAS,eAAe;AAAA,EACvB,GAAG;AACJ,GAA0D;AACzD,SAAO,4CAAC,gBAAAA,QAAiB,SAAjB,EAAyB,aAAU,mBAAmB,GAAG,OAAO;AACzE;AAEA,SAAS,cAAc;AAAA,EACtB,GAAG;AACJ,GAAyD;AACxD,SAAO,4CAAC,gBAAAA,QAAiB,QAAjB,EAAwB,aAAU,kBAAkB,GAAG,OAAO;AACvE;AAEA,SAAS,eAAe;AAAA,EACvB;AAAA,EACA,QAAQ;AAAA,EACR,aAAa;AAAA,EACb,GAAG;AACJ,GAA0D;AACzD,SACC,4CAAC,gBAAAA,QAAiB,QAAjB,EACA;AAAA,IAAC,gBAAAA,QAAiB;AAAA,IAAjB;AAAA,MACA;AAAA,MACA,eAAW;AAAA,QACV;AAAA,QACA;AAAA,MACD;AAAA,MACA,aAAU;AAAA,MACV;AAAA,MACC,GAAG;AAAA;AAAA,EACL,GACD;AAEF;","names":["PopoverPrimitive"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { Popover as Popover$1 } from 'radix-ui';
|
|
3
|
+
import * as react from 'react';
|
|
4
|
+
|
|
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 PopoverAnchor({ ...props }: react.ComponentProps<typeof Popover$1.Anchor>): react_jsx_runtime.JSX.Element;
|
|
8
|
+
declare function PopoverContent({ className, align, sideOffset, ...props }: react.ComponentProps<typeof Popover$1.Content>): react_jsx_runtime.JSX.Element;
|
|
9
|
+
|
|
10
|
+
export { Popover, PopoverAnchor, PopoverContent, PopoverTrigger };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { Popover as Popover$1 } from 'radix-ui';
|
|
3
|
+
import * as react from 'react';
|
|
4
|
+
|
|
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 PopoverAnchor({ ...props }: react.ComponentProps<typeof Popover$1.Anchor>): react_jsx_runtime.JSX.Element;
|
|
8
|
+
declare function PopoverContent({ className, align, sideOffset, ...props }: react.ComponentProps<typeof Popover$1.Content>): react_jsx_runtime.JSX.Element;
|
|
9
|
+
|
|
10
|
+
export { Popover, PopoverAnchor, PopoverContent, PopoverTrigger };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Popover as PopoverPrimitive } from "radix-ui";
|
|
3
|
+
import { cn } from "../../lib/utils";
|
|
4
|
+
function Popover({
|
|
5
|
+
...props
|
|
6
|
+
}) {
|
|
7
|
+
return /* @__PURE__ */ jsx(PopoverPrimitive.Root, { "data-slot": "popover", ...props });
|
|
8
|
+
}
|
|
9
|
+
function PopoverTrigger({
|
|
10
|
+
...props
|
|
11
|
+
}) {
|
|
12
|
+
return /* @__PURE__ */ jsx(PopoverPrimitive.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
13
|
+
}
|
|
14
|
+
function PopoverAnchor({
|
|
15
|
+
...props
|
|
16
|
+
}) {
|
|
17
|
+
return /* @__PURE__ */ jsx(PopoverPrimitive.Anchor, { "data-slot": "popover-anchor", ...props });
|
|
18
|
+
}
|
|
19
|
+
function PopoverContent({
|
|
20
|
+
className,
|
|
21
|
+
align = "center",
|
|
22
|
+
sideOffset = 4,
|
|
23
|
+
...props
|
|
24
|
+
}) {
|
|
25
|
+
return /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
26
|
+
PopoverPrimitive.Content,
|
|
27
|
+
{
|
|
28
|
+
align,
|
|
29
|
+
className: cn(
|
|
30
|
+
"nt:z-50 nt:w-72 nt:origin-(--radix-popover-content-transform-origin) nt:rounded-lg nt:bg-popover nt:p-4 nt:text-popover-foreground nt:shadow-md nt:ring-1 nt:ring-foreground/10 nt:outline-none 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
|
+
className
|
|
32
|
+
),
|
|
33
|
+
"data-slot": "popover-content",
|
|
34
|
+
sideOffset,
|
|
35
|
+
...props
|
|
36
|
+
}
|
|
37
|
+
) });
|
|
38
|
+
}
|
|
39
|
+
export {
|
|
40
|
+
Popover,
|
|
41
|
+
PopoverAnchor,
|
|
42
|
+
PopoverContent,
|
|
43
|
+
PopoverTrigger
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=popover.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ui/popover.tsx"],"sourcesContent":["import { 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 PopoverAnchor({\n\t...props\n}: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {\n\treturn <PopoverPrimitive.Anchor data-slot=\"popover-anchor\" {...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:w-72 nt:origin-(--radix-popover-content-transform-origin) nt:rounded-lg nt:bg-popover nt:p-4 nt:text-popover-foreground nt:shadow-md nt:ring-1 nt:ring-foreground/10 nt:outline-none 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\nexport { Popover, PopoverAnchor, PopoverContent, PopoverTrigger };\n"],"mappings":"AAQQ;AARR,SAAS,WAAW,wBAAwB;AAG5C,SAAS,UAAU;AAEnB,SAAS,QAAQ;AAAA,EAChB,GAAG;AACJ,GAAuD;AACtD,SAAO,oBAAC,iBAAiB,MAAjB,EAAsB,aAAU,WAAW,GAAG,OAAO;AAC9D;AAEA,SAAS,eAAe;AAAA,EACvB,GAAG;AACJ,GAA0D;AACzD,SAAO,oBAAC,iBAAiB,SAAjB,EAAyB,aAAU,mBAAmB,GAAG,OAAO;AACzE;AAEA,SAAS,cAAc;AAAA,EACtB,GAAG;AACJ,GAAyD;AACxD,SAAO,oBAAC,iBAAiB,QAAjB,EAAwB,aAAU,kBAAkB,GAAG,OAAO;AACvE;AAEA,SAAS,eAAe;AAAA,EACvB;AAAA,EACA,QAAQ;AAAA,EACR,aAAa;AAAA,EACb,GAAG;AACJ,GAA0D;AACzD,SACC,oBAAC,iBAAiB,QAAjB,EACA;AAAA,IAAC,iBAAiB;AAAA,IAAjB;AAAA,MACA;AAAA,MACA,WAAW;AAAA,QACV;AAAA,QACA;AAAA,MACD;AAAA,MACA,aAAU;AAAA,MACV;AAAA,MACC,GAAG;AAAA;AAAA,EACL,GACD;AAEF;","names":[]}
|
|
@@ -0,0 +1,51 @@
|
|
|
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 separator_exports = {};
|
|
20
|
+
__export(separator_exports, {
|
|
21
|
+
Separator: () => Separator
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(separator_exports);
|
|
24
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
25
|
+
var import_radix_ui = require("radix-ui");
|
|
26
|
+
var import_utils = require("../../lib/utils");
|
|
27
|
+
function Separator({
|
|
28
|
+
className,
|
|
29
|
+
orientation = "horizontal",
|
|
30
|
+
decorative = true,
|
|
31
|
+
...props
|
|
32
|
+
}) {
|
|
33
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
34
|
+
import_radix_ui.Separator.Root,
|
|
35
|
+
{
|
|
36
|
+
className: (0, import_utils.cn)(
|
|
37
|
+
"nt:shrink-0 nt:bg-border nt:data-[orientation=horizontal]:h-px nt:data-[orientation=horizontal]:w-full nt:data-[orientation=vertical]:h-full nt:data-[orientation=vertical]:w-px",
|
|
38
|
+
className
|
|
39
|
+
),
|
|
40
|
+
"data-slot": "separator",
|
|
41
|
+
decorative,
|
|
42
|
+
orientation,
|
|
43
|
+
...props
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
48
|
+
0 && (module.exports = {
|
|
49
|
+
Separator
|
|
50
|
+
});
|
|
51
|
+
//# sourceMappingURL=separator.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ui/separator.tsx"],"sourcesContent":["import { 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-[orientation=horizontal]:h-px nt:data-[orientation=horizontal]:w-full nt:data-[orientation=vertical]:h-full nt:data-[orientation=vertical]:w-px',\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;AAYE;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"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { Separator as Separator$1 } from 'radix-ui';
|
|
3
|
+
import * as react from 'react';
|
|
4
|
+
|
|
5
|
+
declare function Separator({ className, orientation, decorative, ...props }: react.ComponentProps<typeof Separator$1.Root>): react_jsx_runtime.JSX.Element;
|
|
6
|
+
|
|
7
|
+
export { Separator };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { Separator as Separator$1 } from 'radix-ui';
|
|
3
|
+
import * as react from 'react';
|
|
4
|
+
|
|
5
|
+
declare function Separator({ className, orientation, decorative, ...props }: react.ComponentProps<typeof Separator$1.Root>): react_jsx_runtime.JSX.Element;
|
|
6
|
+
|
|
7
|
+
export { Separator };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Separator as SeparatorPrimitive } from "radix-ui";
|
|
3
|
+
import { cn } from "../../lib/utils";
|
|
4
|
+
function Separator({
|
|
5
|
+
className,
|
|
6
|
+
orientation = "horizontal",
|
|
7
|
+
decorative = true,
|
|
8
|
+
...props
|
|
9
|
+
}) {
|
|
10
|
+
return /* @__PURE__ */ jsx(
|
|
11
|
+
SeparatorPrimitive.Root,
|
|
12
|
+
{
|
|
13
|
+
className: cn(
|
|
14
|
+
"nt:shrink-0 nt:bg-border nt:data-[orientation=horizontal]:h-px nt:data-[orientation=horizontal]:w-full nt:data-[orientation=vertical]:h-full nt:data-[orientation=vertical]:w-px",
|
|
15
|
+
className
|
|
16
|
+
),
|
|
17
|
+
"data-slot": "separator",
|
|
18
|
+
decorative,
|
|
19
|
+
orientation,
|
|
20
|
+
...props
|
|
21
|
+
}
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
Separator
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=separator.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ui/separator.tsx"],"sourcesContent":["import { 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-[orientation=horizontal]:h-px nt:data-[orientation=horizontal]:w-full nt:data-[orientation=vertical]:h-full nt:data-[orientation=vertical]:w-px',\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":"AAYE;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,32 @@
|
|
|
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 spacer_exports = {};
|
|
20
|
+
__export(spacer_exports, {
|
|
21
|
+
Spacer: () => Spacer
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(spacer_exports);
|
|
24
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
25
|
+
function Spacer() {
|
|
26
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { flex: 1 } });
|
|
27
|
+
}
|
|
28
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
29
|
+
0 && (module.exports = {
|
|
30
|
+
Spacer
|
|
31
|
+
});
|
|
32
|
+
//# sourceMappingURL=spacer.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ui/spacer.tsx"],"sourcesContent":["export function Spacer() {\n\treturn <div style={{ flex: 1 }} />;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACQ;AADD,SAAS,SAAS;AACxB,SAAO,4CAAC,SAAI,OAAO,EAAE,MAAM,EAAE,GAAG;AACjC;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ui/spacer.tsx"],"sourcesContent":["export function Spacer() {\n\treturn <div style={{ flex: 1 }} />;\n}\n"],"mappings":"AACQ;AADD,SAAS,SAAS;AACxB,SAAO,oBAAC,SAAI,OAAO,EAAE,MAAM,EAAE,GAAG;AACjC;","names":[]}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
var undo_redo_button_exports = {};
|
|
21
|
+
__export(undo_redo_button_exports, {
|
|
22
|
+
UndoRedoButton: () => UndoRedoButton
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(undo_redo_button_exports);
|
|
25
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
26
|
+
var import_react = require("react");
|
|
27
|
+
var import_use_undo_redo = require("./use-undo-redo");
|
|
28
|
+
var import_button = require("../ui/button");
|
|
29
|
+
const UndoRedoButton = (0, import_react.forwardRef)(({ editor, action, onClick, ...buttonProps }, ref) => {
|
|
30
|
+
const { canExecute, handleAction, label, Icon } = (0, import_use_undo_redo.useUndoRedo)({
|
|
31
|
+
editor,
|
|
32
|
+
action
|
|
33
|
+
});
|
|
34
|
+
const handleClick = (0, import_react.useCallback)(
|
|
35
|
+
(event) => {
|
|
36
|
+
onClick?.(event);
|
|
37
|
+
if (event.defaultPrevented) return;
|
|
38
|
+
handleAction();
|
|
39
|
+
},
|
|
40
|
+
[handleAction, onClick]
|
|
41
|
+
);
|
|
42
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
43
|
+
import_button.Button,
|
|
44
|
+
{
|
|
45
|
+
ref,
|
|
46
|
+
"aria-label": label,
|
|
47
|
+
disabled: !canExecute,
|
|
48
|
+
size: "icon",
|
|
49
|
+
tabIndex: -1,
|
|
50
|
+
type: "button",
|
|
51
|
+
variant: "ghost",
|
|
52
|
+
onClick: handleClick,
|
|
53
|
+
...buttonProps,
|
|
54
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, {})
|
|
55
|
+
}
|
|
56
|
+
);
|
|
57
|
+
});
|
|
58
|
+
UndoRedoButton.displayName = "UndoRedoButton";
|
|
59
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
60
|
+
0 && (module.exports = {
|
|
61
|
+
UndoRedoButton
|
|
62
|
+
});
|
|
63
|
+
//# sourceMappingURL=undo-redo-button.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/undo-redo-button/undo-redo-button.tsx"],"sourcesContent":["'use client';\n\nimport { forwardRef, useCallback } from 'react';\n\nimport { useUndoRedo } from './use-undo-redo';\nimport { Button } from '../ui/button';\n\nimport type { UndoRedoAction } from './use-undo-redo';\nimport type { Editor } from '@tiptap/core';\n\nexport interface UndoRedoButtonProps extends Omit<\n\tReact.ButtonHTMLAttributes<HTMLButtonElement>,\n\t'type'\n> {\n\teditor: Editor | null;\n\taction: UndoRedoAction;\n}\n\nexport const UndoRedoButton = forwardRef<\n\tHTMLButtonElement,\n\tUndoRedoButtonProps\n>(({ editor, action, onClick, ...buttonProps }, ref) => {\n\tconst { canExecute, handleAction, label, Icon } = useUndoRedo({\n\t\teditor,\n\t\taction\n\t});\n\n\tconst handleClick = useCallback(\n\t\t(event: React.MouseEvent<HTMLButtonElement>) => {\n\t\t\tonClick?.(event);\n\n\t\t\tif (event.defaultPrevented) return;\n\n\t\t\thandleAction();\n\t\t},\n\t\t[handleAction, onClick]\n\t);\n\n\treturn (\n\t\t<Button\n\t\t\tref={ref}\n\t\t\taria-label={label}\n\t\t\tdisabled={!canExecute}\n\t\t\tsize=\"icon\"\n\t\t\ttabIndex={-1}\n\t\t\ttype=\"button\"\n\t\t\tvariant=\"ghost\"\n\t\t\tonClick={handleClick}\n\t\t\t{...buttonProps}\n\t\t>\n\t\t\t<Icon />\n\t\t</Button>\n\t);\n});\n\nUndoRedoButton.displayName = 'UndoRedoButton';\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAkDG;AAhDH,mBAAwC;AAExC,2BAA4B;AAC5B,oBAAuB;AAahB,MAAM,qBAAiB,yBAG5B,CAAC,EAAE,QAAQ,QAAQ,SAAS,GAAG,YAAY,GAAG,QAAQ;AACvD,QAAM,EAAE,YAAY,cAAc,OAAO,KAAK,QAAI,kCAAY;AAAA,IAC7D;AAAA,IACA;AAAA,EACD,CAAC;AAED,QAAM,kBAAc;AAAA,IACnB,CAAC,UAA+C;AAC/C,gBAAU,KAAK;AAEf,UAAI,MAAM,iBAAkB;AAE5B,mBAAa;AAAA,IACd;AAAA,IACA,CAAC,cAAc,OAAO;AAAA,EACvB;AAEA,SACC;AAAA,IAAC;AAAA;AAAA,MACA;AAAA,MACA,cAAY;AAAA,MACZ,UAAU,CAAC;AAAA,MACX,MAAK;AAAA,MACL,UAAU;AAAA,MACV,MAAK;AAAA,MACL,SAAQ;AAAA,MACR,SAAS;AAAA,MACR,GAAG;AAAA,MAEJ,sDAAC,QAAK;AAAA;AAAA,EACP;AAEF,CAAC;AAED,eAAe,cAAc;","names":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { UndoRedoAction } from './use-undo-redo.cjs';
|
|
3
|
+
import { Editor } from '@tiptap/core';
|
|
4
|
+
import 'lucide-react';
|
|
5
|
+
|
|
6
|
+
interface UndoRedoButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'type'> {
|
|
7
|
+
editor: Editor | null;
|
|
8
|
+
action: UndoRedoAction;
|
|
9
|
+
}
|
|
10
|
+
declare const UndoRedoButton: react.ForwardRefExoticComponent<UndoRedoButtonProps & react.RefAttributes<HTMLButtonElement>>;
|
|
11
|
+
|
|
12
|
+
export { UndoRedoButton, type UndoRedoButtonProps };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { UndoRedoAction } from './use-undo-redo.js';
|
|
3
|
+
import { Editor } from '@tiptap/core';
|
|
4
|
+
import 'lucide-react';
|
|
5
|
+
|
|
6
|
+
interface UndoRedoButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'type'> {
|
|
7
|
+
editor: Editor | null;
|
|
8
|
+
action: UndoRedoAction;
|
|
9
|
+
}
|
|
10
|
+
declare const UndoRedoButton: react.ForwardRefExoticComponent<UndoRedoButtonProps & react.RefAttributes<HTMLButtonElement>>;
|
|
11
|
+
|
|
12
|
+
export { UndoRedoButton, type UndoRedoButtonProps };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef, useCallback } from "react";
|
|
4
|
+
import { useUndoRedo } from "./use-undo-redo";
|
|
5
|
+
import { Button } from "../ui/button";
|
|
6
|
+
const UndoRedoButton = forwardRef(({ editor, action, onClick, ...buttonProps }, ref) => {
|
|
7
|
+
const { canExecute, handleAction, label, Icon } = useUndoRedo({
|
|
8
|
+
editor,
|
|
9
|
+
action
|
|
10
|
+
});
|
|
11
|
+
const handleClick = useCallback(
|
|
12
|
+
(event) => {
|
|
13
|
+
onClick?.(event);
|
|
14
|
+
if (event.defaultPrevented) return;
|
|
15
|
+
handleAction();
|
|
16
|
+
},
|
|
17
|
+
[handleAction, onClick]
|
|
18
|
+
);
|
|
19
|
+
return /* @__PURE__ */ jsx(
|
|
20
|
+
Button,
|
|
21
|
+
{
|
|
22
|
+
ref,
|
|
23
|
+
"aria-label": label,
|
|
24
|
+
disabled: !canExecute,
|
|
25
|
+
size: "icon",
|
|
26
|
+
tabIndex: -1,
|
|
27
|
+
type: "button",
|
|
28
|
+
variant: "ghost",
|
|
29
|
+
onClick: handleClick,
|
|
30
|
+
...buttonProps,
|
|
31
|
+
children: /* @__PURE__ */ jsx(Icon, {})
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
});
|
|
35
|
+
UndoRedoButton.displayName = "UndoRedoButton";
|
|
36
|
+
export {
|
|
37
|
+
UndoRedoButton
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=undo-redo-button.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/undo-redo-button/undo-redo-button.tsx"],"sourcesContent":["'use client';\n\nimport { forwardRef, useCallback } from 'react';\n\nimport { useUndoRedo } from './use-undo-redo';\nimport { Button } from '../ui/button';\n\nimport type { UndoRedoAction } from './use-undo-redo';\nimport type { Editor } from '@tiptap/core';\n\nexport interface UndoRedoButtonProps extends Omit<\n\tReact.ButtonHTMLAttributes<HTMLButtonElement>,\n\t'type'\n> {\n\teditor: Editor | null;\n\taction: UndoRedoAction;\n}\n\nexport const UndoRedoButton = forwardRef<\n\tHTMLButtonElement,\n\tUndoRedoButtonProps\n>(({ editor, action, onClick, ...buttonProps }, ref) => {\n\tconst { canExecute, handleAction, label, Icon } = useUndoRedo({\n\t\teditor,\n\t\taction\n\t});\n\n\tconst handleClick = useCallback(\n\t\t(event: React.MouseEvent<HTMLButtonElement>) => {\n\t\t\tonClick?.(event);\n\n\t\t\tif (event.defaultPrevented) return;\n\n\t\t\thandleAction();\n\t\t},\n\t\t[handleAction, onClick]\n\t);\n\n\treturn (\n\t\t<Button\n\t\t\tref={ref}\n\t\t\taria-label={label}\n\t\t\tdisabled={!canExecute}\n\t\t\tsize=\"icon\"\n\t\t\ttabIndex={-1}\n\t\t\ttype=\"button\"\n\t\t\tvariant=\"ghost\"\n\t\t\tonClick={handleClick}\n\t\t\t{...buttonProps}\n\t\t>\n\t\t\t<Icon />\n\t\t</Button>\n\t);\n});\n\nUndoRedoButton.displayName = 'UndoRedoButton';\n"],"mappings":";AAkDG;AAhDH,SAAS,YAAY,mBAAmB;AAExC,SAAS,mBAAmB;AAC5B,SAAS,cAAc;AAahB,MAAM,iBAAiB,WAG5B,CAAC,EAAE,QAAQ,QAAQ,SAAS,GAAG,YAAY,GAAG,QAAQ;AACvD,QAAM,EAAE,YAAY,cAAc,OAAO,KAAK,IAAI,YAAY;AAAA,IAC7D;AAAA,IACA;AAAA,EACD,CAAC;AAED,QAAM,cAAc;AAAA,IACnB,CAAC,UAA+C;AAC/C,gBAAU,KAAK;AAEf,UAAI,MAAM,iBAAkB;AAE5B,mBAAa;AAAA,IACd;AAAA,IACA,CAAC,cAAc,OAAO;AAAA,EACvB;AAEA,SACC;AAAA,IAAC;AAAA;AAAA,MACA;AAAA,MACA,cAAY;AAAA,MACZ,UAAU,CAAC;AAAA,MACX,MAAK;AAAA,MACL,UAAU;AAAA,MACV,MAAK;AAAA,MACL,SAAQ;AAAA,MACR,SAAS;AAAA,MACR,GAAG;AAAA,MAEJ,8BAAC,QAAK;AAAA;AAAA,EACP;AAEF,CAAC;AAED,eAAe,cAAc;","names":[]}
|
|
@@ -0,0 +1,68 @@
|
|
|
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 use_undo_redo_exports = {};
|
|
20
|
+
__export(use_undo_redo_exports, {
|
|
21
|
+
useUndoRedo: () => useUndoRedo
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(use_undo_redo_exports);
|
|
24
|
+
var import_lucide_react = require("lucide-react");
|
|
25
|
+
var import_react = require("react");
|
|
26
|
+
const actionLabels = {
|
|
27
|
+
undo: "Undo",
|
|
28
|
+
redo: "Redo"
|
|
29
|
+
};
|
|
30
|
+
const actionIcons = {
|
|
31
|
+
undo: import_lucide_react.Undo2,
|
|
32
|
+
redo: import_lucide_react.Redo2
|
|
33
|
+
};
|
|
34
|
+
function canExecuteAction(editor, action) {
|
|
35
|
+
if (!editor || !editor.isEditable) return false;
|
|
36
|
+
return action === "undo" ? editor.can().undo() : editor.can().redo();
|
|
37
|
+
}
|
|
38
|
+
function useUndoRedo({ editor, action }) {
|
|
39
|
+
const [canExecute, setCanExecute] = (0, import_react.useState)(false);
|
|
40
|
+
(0, import_react.useEffect)(() => {
|
|
41
|
+
if (!editor) return;
|
|
42
|
+
const handleUpdate = () => {
|
|
43
|
+
setCanExecute(canExecuteAction(editor, action));
|
|
44
|
+
};
|
|
45
|
+
handleUpdate();
|
|
46
|
+
editor.on("transaction", handleUpdate);
|
|
47
|
+
return () => {
|
|
48
|
+
editor.off("transaction", handleUpdate);
|
|
49
|
+
};
|
|
50
|
+
}, [editor, action]);
|
|
51
|
+
const handleAction = (0, import_react.useCallback)(() => {
|
|
52
|
+
if (!editor || !editor.isEditable) return false;
|
|
53
|
+
if (!canExecuteAction(editor, action)) return false;
|
|
54
|
+
const chain = editor.chain().focus();
|
|
55
|
+
return action === "undo" ? chain.undo().run() : chain.redo().run();
|
|
56
|
+
}, [editor, action]);
|
|
57
|
+
return {
|
|
58
|
+
canExecute,
|
|
59
|
+
handleAction,
|
|
60
|
+
label: actionLabels[action],
|
|
61
|
+
Icon: actionIcons[action]
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
65
|
+
0 && (module.exports = {
|
|
66
|
+
useUndoRedo
|
|
67
|
+
});
|
|
68
|
+
//# sourceMappingURL=use-undo-redo.cjs.map
|