mtxuilib 0.0.308 → 0.0.310
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/App.cjs +17 -1
- package/dist/MtmButton.cjs +2 -1
- package/dist/NovelEditorLoader.cjs +8 -4
- package/dist/browser/index.min.js +2 -1
- package/dist/common/FullCenter.cjs +2 -1
- package/dist/common/MtImage.cjs +2 -1
- package/dist/common/mtlink.cjs +2 -1
- package/dist/common/table/cells/ExpenderCell.cjs +9 -4
- package/dist/common/table/cells/SelectCell.cjs +8 -4
- package/dist/common/table/cells/Text.cjs +2 -1
- package/dist/common/table/cells/ViewLink.cjs +8 -4
- package/dist/common/table/cells/container/cellWrapper.cjs +2 -1
- package/dist/common/table/cells/number.cjs +2 -1
- package/dist/common/table/cells/string.cjs +2 -1
- package/dist/common/table/data-table-pagination.cjs +89 -51
- package/dist/common/table/data-table-view-options.cjs +32 -22
- package/dist/common/tailwind-indicator.cjs +9 -1
- package/dist/entry-client.cjs +2 -1
- package/dist/entry-server.cjs +2 -1
- package/dist/esm/App.js +17 -1
- package/dist/esm/MtmButton.js +2 -1
- package/dist/esm/NovelEditorLoader.js +8 -4
- package/dist/esm/common/FullCenter.js +2 -1
- package/dist/esm/common/MtImage.js +2 -1
- package/dist/esm/common/mtlink.js +2 -1
- package/dist/esm/common/table/cells/ExpenderCell.js +9 -4
- package/dist/esm/common/table/cells/SelectCell.js +8 -4
- package/dist/esm/common/table/cells/Text.js +2 -1
- package/dist/esm/common/table/cells/ViewLink.js +8 -4
- package/dist/esm/common/table/cells/container/cellWrapper.js +2 -1
- package/dist/esm/common/table/cells/number.js +2 -1
- package/dist/esm/common/table/cells/string.js +2 -1
- package/dist/esm/common/table/data-table-pagination.js +89 -51
- package/dist/esm/common/table/data-table-view-options.js +32 -22
- package/dist/esm/common/tailwind-indicator.js +9 -1
- package/dist/esm/entry-client.js +2 -1
- package/dist/esm/entry-server.js +2 -1
- package/dist/esm/icons/icons.js +41 -31
- package/dist/esm/index.js +2 -1
- package/dist/esm/lib/connectquery/use-transport.js +2 -1
- package/dist/esm/lib/render copy.js +2 -1
- package/dist/esm/lib/render.js +2 -1
- package/dist/esm/store/MtConnectProvider.js +2 -1
- package/dist/esm/store/ReactQueryProvider.js +18 -10
- package/dist/esm/store/StorybookDecorator.js +5 -4
- package/dist/esm/store/appContext.js +28 -18
- package/dist/esm/store/hydrateCore.js +6 -5
- package/dist/esm/store/logger.context.js +3 -2
- package/dist/esm/store/pageMeta.js +5 -1
- package/dist/esm/tailwind.d.cts +88 -1
- package/dist/esm/ui/accordion.js +19 -11
- package/dist/esm/ui/alert copy.js +4 -3
- package/dist/esm/ui/alert-dialog.js +21 -17
- package/dist/esm/ui/alert.js +4 -3
- package/dist/esm/ui/avatar.js +4 -3
- package/dist/esm/ui/badge.js +2 -2
- package/dist/esm/ui/button.js +2 -1
- package/dist/esm/ui/calendar.js +4 -4
- package/dist/esm/ui/card.js +7 -6
- package/dist/esm/ui/checkbox.js +15 -10
- package/dist/esm/ui/command.js +25 -18
- package/dist/esm/ui/context-menu.js +35 -22
- package/dist/esm/ui/dialog.js +30 -17
- package/dist/esm/ui/drawer.js +28 -18
- package/dist/esm/ui/dropdown-menu.js +35 -22
- package/dist/esm/ui/form copy.js +14 -9
- package/dist/esm/ui/form.js +14 -9
- package/dist/esm/ui/hover-card.js +2 -1
- package/dist/esm/ui/input.js +2 -1
- package/dist/esm/ui/label.js +2 -1
- package/dist/esm/ui/menubar.js +37 -24
- package/dist/esm/ui/navigation-menu.js +36 -25
- package/dist/esm/ui/novel/novel/src/components/editor-bubble-item.js +2 -1
- package/dist/esm/ui/novel/novel/src/components/editor-bubble.js +5 -1
- package/dist/esm/ui/novel/novel/src/components/editor-command-item.js +5 -4
- package/dist/esm/ui/novel/novel/src/components/editor-command.js +21 -14
- package/dist/esm/ui/novel/novel/src/components/editor.js +7 -6
- package/dist/esm/ui/novel/novel/src/extensions/image-resizer.js +2 -1
- package/dist/esm/ui/novel/tailwind/advanced-editor.js +58 -35
- package/dist/esm/ui/novel/tailwind/generative/ai-completion-command.js +45 -30
- package/dist/esm/ui/novel/tailwind/generative/ai-selector-commands.js +37 -28
- package/dist/esm/ui/novel/tailwind/generative/ai-selector.js +58 -43
- package/dist/esm/ui/novel/tailwind/generative/generative-menu-switch.js +23 -15
- package/dist/esm/ui/novel/tailwind/selectors/color-selector.js +78 -55
- package/dist/esm/ui/novel/tailwind/selectors/link-selector.js +58 -50
- package/dist/esm/ui/novel/tailwind/selectors/node-selector.js +31 -19
- package/dist/esm/ui/novel/tailwind/selectors/text-buttons.js +13 -12
- package/dist/esm/ui/novel/tailwind/slash-command.js +12 -11
- package/dist/esm/ui/novel/tailwind/ui/button.js +2 -1
- package/dist/esm/ui/novel/tailwind/ui/command.js +25 -18
- package/dist/esm/ui/novel/tailwind/ui/dialog.js +30 -17
- package/dist/esm/ui/novel/tailwind/ui/icons/crazy-spinner.js +6 -1
- package/dist/esm/ui/novel/tailwind/ui/icons/font-default.js +20 -17
- package/dist/esm/ui/novel/tailwind/ui/icons/font-mono.js +20 -17
- package/dist/esm/ui/novel/tailwind/ui/icons/font-serif.js +20 -17
- package/dist/esm/ui/novel/tailwind/ui/icons/github.js +5 -4
- package/dist/esm/ui/novel/tailwind/ui/icons/loading-circle.js +20 -17
- package/dist/esm/ui/novel/tailwind/ui/icons/magic.js +27 -24
- package/dist/esm/ui/novel/tailwind/ui/menu.js +28 -16
- package/dist/esm/ui/novel/tailwind/ui/popover.js +3 -2
- package/dist/esm/ui/novel/tailwind/ui/scroll-area.js +18 -10
- package/dist/esm/ui/novel/tailwind/ui/separator.js +2 -1
- package/dist/esm/ui/pagination.js +32 -19
- package/dist/esm/ui/popover.js +3 -2
- package/dist/esm/ui/progress.js +15 -10
- package/dist/esm/ui/radio-group.js +7 -5
- package/dist/esm/ui/resizable.js +10 -5
- package/dist/esm/ui/scroll-area.js +26 -18
- package/dist/esm/ui/select.js +37 -26
- package/dist/esm/ui/separator.js +2 -1
- package/dist/esm/ui/sheet.js +24 -14
- package/dist/esm/ui/skeleton.js +2 -1
- package/dist/esm/ui/slider.js +12 -5
- package/dist/esm/ui/sonner.js +2 -1
- package/dist/esm/ui/switch.js +12 -11
- package/dist/esm/ui/table.js +10 -9
- package/dist/esm/ui/tabs.js +4 -3
- package/dist/esm/ui/textarea.js +2 -1
- package/dist/esm/ui/toast.js +14 -9
- package/dist/esm/ui/toaster.js +18 -4
- package/dist/esm/ui/toggle.js +2 -1
- package/dist/esm/ui/tooltip.js +2 -1
- package/dist/esm/ui/ui-mt/NavTag.js +5 -4
- package/dist/esm/ui/ui-mt/SimpleModel.js +12 -11
- package/dist/esm/ui/ui-mt/inputField/InputField.js +27 -20
- package/dist/esm/ui/ui-mt/inputField/SingleUploadForm.js +67 -56
- package/dist/esm/ui/ui-mt/inputField/TextArea.js +20 -16
- package/dist/esm/ui/ui-mt/inputField/TextFileInput.js +18 -15
- package/dist/esm/ui/ui-mt/inputField/select/InputSelect.js +35 -27
- package/dist/esm/ui/ui-mt/inputs/SearchInput.js +2 -1
- package/dist/esm/ui/ui-mt/inputs/searchBar.js +12 -8
- package/dist/esm/ui/ui-mt/skeleton/skeleton-card.js +9 -4
- package/dist/esm/ui/ui-mt/skeleton/skeleton2.js +5 -1
- package/dist/esm/ui/ui-mt/skeleton/skeletons.js +9 -1
- package/dist/esm/ui/ui-vamp/alert.js +30 -24
- package/dist/esm/ui/ui-vamp/avatar.js +12 -7
- package/dist/esm/ui/ui-vamp/button.js +2 -1
- package/dist/esm/ui/ui-vamp/card.js +15 -8
- package/dist/esm/ui/ui-vamp/checkbox.js +15 -8
- package/dist/esm/ui/ui-vamp/chip.js +2 -1
- package/dist/esm/ui/ui-vamp/dropdown.js +7 -6
- package/dist/esm/ui/ui-vamp/external-link.js +9 -4
- package/dist/esm/ui/ui-vamp/headline.js +5 -1
- package/dist/esm/ui/ui-vamp/input.js +3 -2
- package/dist/esm/ui/ui-vamp/keyvalue.js +5 -1
- package/dist/esm/ui/ui-vamp/label.js +2 -1
- package/dist/esm/ui/ui-vamp/mobile-nav-button.js +6 -5
- package/dist/esm/ui/ui-vamp/modal.js +17 -13
- package/dist/esm/ui/ui-vamp/pagination.js +57 -35
- package/dist/esm/ui/ui-vamp/scroll-area.js +5 -4
- package/dist/esm/ui/ui-vamp/skeleton.js +2 -2
- package/dist/esm/ui/ui-vamp/stripe-not-connected-modal.js +13 -2
- package/dist/esm/ui/ui-vamp/textarea.js +12 -8
- package/dist/esm/ui/ui-vamp/toggle-group.js +3 -2
- package/dist/icons/icons.cjs +41 -31
- package/dist/index.cjs +2 -1
- package/dist/lib/connectquery/use-transport.cjs +2 -1
- package/dist/lib/render copy.cjs +2 -1
- package/dist/lib/render.cjs +2 -1
- package/dist/store/MtConnectProvider.cjs +2 -1
- package/dist/store/ReactQueryProvider.cjs +18 -10
- package/dist/store/StorybookDecorator.cjs +5 -4
- package/dist/store/appContext.cjs +28 -28
- package/dist/store/hydrateCore.cjs +6 -5
- package/dist/store/logger.context.cjs +3 -2
- package/dist/store/pageMeta.cjs +5 -1
- package/dist/tailwind.cjs +72 -2
- package/dist/tsconfig.type.tsbuildinfo +1 -1
- package/dist/ui/accordion.cjs +19 -11
- package/dist/ui/alert copy.cjs +4 -3
- package/dist/ui/alert-dialog.cjs +21 -17
- package/dist/ui/alert.cjs +4 -3
- package/dist/ui/avatar.cjs +4 -3
- package/dist/ui/badge.cjs +2 -12
- package/dist/ui/button.cjs +2 -1
- package/dist/ui/calendar.cjs +4 -14
- package/dist/ui/card.cjs +7 -6
- package/dist/ui/checkbox.cjs +15 -10
- package/dist/ui/command.cjs +25 -18
- package/dist/ui/context-menu.cjs +35 -22
- package/dist/ui/dialog.cjs +30 -17
- package/dist/ui/drawer.cjs +28 -18
- package/dist/ui/dropdown-menu.cjs +35 -22
- package/dist/ui/form copy.cjs +14 -9
- package/dist/ui/form.cjs +14 -9
- package/dist/ui/hover-card.cjs +2 -1
- package/dist/ui/input.cjs +2 -1
- package/dist/ui/label.cjs +2 -1
- package/dist/ui/menubar.cjs +37 -24
- package/dist/ui/navigation-menu.cjs +36 -25
- package/dist/ui/novel/novel/src/components/editor-bubble-item.cjs +2 -1
- package/dist/ui/novel/novel/src/components/editor-bubble.cjs +5 -1
- package/dist/ui/novel/novel/src/components/editor-command-item.cjs +5 -4
- package/dist/ui/novel/novel/src/components/editor-command.cjs +21 -14
- package/dist/ui/novel/novel/src/components/editor.cjs +7 -6
- package/dist/ui/novel/novel/src/extensions/image-resizer.cjs +2 -1
- package/dist/ui/novel/tailwind/advanced-editor.cjs +58 -35
- package/dist/ui/novel/tailwind/generative/ai-completion-command.cjs +45 -30
- package/dist/ui/novel/tailwind/generative/ai-selector-commands.cjs +37 -28
- package/dist/ui/novel/tailwind/generative/ai-selector.cjs +58 -43
- package/dist/ui/novel/tailwind/generative/generative-menu-switch.cjs +23 -15
- package/dist/ui/novel/tailwind/selectors/color-selector.cjs +78 -55
- package/dist/ui/novel/tailwind/selectors/link-selector.cjs +58 -50
- package/dist/ui/novel/tailwind/selectors/node-selector.cjs +31 -19
- package/dist/ui/novel/tailwind/selectors/text-buttons.cjs +13 -12
- package/dist/ui/novel/tailwind/slash-command.cjs +12 -11
- package/dist/ui/novel/tailwind/ui/button.cjs +2 -1
- package/dist/ui/novel/tailwind/ui/command.cjs +25 -18
- package/dist/ui/novel/tailwind/ui/dialog.cjs +30 -17
- package/dist/ui/novel/tailwind/ui/icons/crazy-spinner.cjs +6 -1
- package/dist/ui/novel/tailwind/ui/icons/font-default.cjs +20 -17
- package/dist/ui/novel/tailwind/ui/icons/font-mono.cjs +20 -17
- package/dist/ui/novel/tailwind/ui/icons/font-serif.cjs +20 -17
- package/dist/ui/novel/tailwind/ui/icons/github.cjs +5 -4
- package/dist/ui/novel/tailwind/ui/icons/loading-circle.cjs +20 -17
- package/dist/ui/novel/tailwind/ui/icons/magic.cjs +27 -24
- package/dist/ui/novel/tailwind/ui/menu.cjs +28 -16
- package/dist/ui/novel/tailwind/ui/popover.cjs +3 -2
- package/dist/ui/novel/tailwind/ui/scroll-area.cjs +18 -10
- package/dist/ui/novel/tailwind/ui/separator.cjs +2 -1
- package/dist/ui/pagination.cjs +32 -19
- package/dist/ui/popover.cjs +3 -2
- package/dist/ui/progress.cjs +15 -10
- package/dist/ui/radio-group.cjs +7 -5
- package/dist/ui/resizable.cjs +10 -5
- package/dist/ui/scroll-area.cjs +26 -18
- package/dist/ui/select.cjs +37 -26
- package/dist/ui/separator.cjs +2 -1
- package/dist/ui/sheet.cjs +24 -14
- package/dist/ui/skeleton.cjs +2 -1
- package/dist/ui/slider.cjs +12 -5
- package/dist/ui/sonner.cjs +2 -1
- package/dist/ui/switch.cjs +12 -11
- package/dist/ui/table.cjs +10 -9
- package/dist/ui/tabs.cjs +4 -3
- package/dist/ui/textarea.cjs +2 -1
- package/dist/ui/toast.cjs +14 -9
- package/dist/ui/toaster.cjs +18 -4
- package/dist/ui/toggle.cjs +2 -1
- package/dist/ui/tooltip.cjs +2 -1
- package/dist/ui/ui-mt/NavTag.cjs +5 -4
- package/dist/ui/ui-mt/SimpleModel.cjs +12 -11
- package/dist/ui/ui-mt/inputField/InputField.cjs +27 -20
- package/dist/ui/ui-mt/inputField/SingleUploadForm.cjs +67 -56
- package/dist/ui/ui-mt/inputField/TextArea.cjs +20 -16
- package/dist/ui/ui-mt/inputField/TextFileInput.cjs +18 -25
- package/dist/ui/ui-mt/inputField/select/InputSelect.cjs +35 -27
- package/dist/ui/ui-mt/inputs/SearchInput.cjs +2 -1
- package/dist/ui/ui-mt/inputs/searchBar.cjs +12 -8
- package/dist/ui/ui-mt/skeleton/skeleton-card.cjs +9 -4
- package/dist/ui/ui-mt/skeleton/skeleton2.cjs +5 -1
- package/dist/ui/ui-mt/skeleton/skeletons.cjs +9 -1
- package/dist/ui/ui-vamp/alert.cjs +30 -24
- package/dist/ui/ui-vamp/avatar.cjs +12 -7
- package/dist/ui/ui-vamp/button.cjs +2 -1
- package/dist/ui/ui-vamp/card.cjs +15 -18
- package/dist/ui/ui-vamp/checkbox.cjs +15 -8
- package/dist/ui/ui-vamp/chip.cjs +2 -1
- package/dist/ui/ui-vamp/dropdown.cjs +7 -6
- package/dist/ui/ui-vamp/external-link.cjs +9 -4
- package/dist/ui/ui-vamp/headline.cjs +5 -1
- package/dist/ui/ui-vamp/input.cjs +3 -2
- package/dist/ui/ui-vamp/keyvalue.cjs +5 -1
- package/dist/ui/ui-vamp/label.cjs +2 -1
- package/dist/ui/ui-vamp/mobile-nav-button.cjs +6 -5
- package/dist/ui/ui-vamp/modal.cjs +17 -13
- package/dist/ui/ui-vamp/pagination.cjs +57 -35
- package/dist/ui/ui-vamp/scroll-area.cjs +5 -4
- package/dist/ui/ui-vamp/skeleton.cjs +2 -12
- package/dist/ui/ui-vamp/stripe-not-connected-modal.cjs +13 -2
- package/dist/ui/ui-vamp/textarea.cjs +12 -8
- package/dist/ui/ui-vamp/toggle-group.cjs +3 -2
- package/package.json +5 -4
|
@@ -23,6 +23,7 @@ __export(link_selector_exports, {
|
|
|
23
23
|
isValidUrl: () => isValidUrl
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(link_selector_exports);
|
|
26
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
26
27
|
var import_react_popover = require("@radix-ui/react-popover");
|
|
27
28
|
var import_lucide_react = require("lucide-react");
|
|
28
29
|
var import_react = require("react");
|
|
@@ -58,59 +59,66 @@ const LinkSelector = ({ open, onOpenChange }) => {
|
|
|
58
59
|
});
|
|
59
60
|
if (!editor)
|
|
60
61
|
return null;
|
|
61
|
-
return /* @__PURE__ */
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
size: "sm",
|
|
65
|
-
variant: "ghost",
|
|
66
|
-
className: "gap-2 rounded-none border-none"
|
|
67
|
-
},
|
|
68
|
-
/* @__PURE__ */ React.createElement("p", { className: "text-base" }, "\u2197"),
|
|
69
|
-
/* @__PURE__ */ React.createElement(
|
|
70
|
-
"p",
|
|
71
|
-
{
|
|
72
|
-
className: (0, import_utils.cn)("underline decoration-stone-400 underline-offset-4", {
|
|
73
|
-
"text-blue-500": editor.isActive("link")
|
|
74
|
-
})
|
|
75
|
-
},
|
|
76
|
-
"Link"
|
|
77
|
-
)
|
|
78
|
-
)), /* @__PURE__ */ React.createElement(import_popover.PopoverContent, { align: "start", className: "w-60 p-0", sideOffset: 10 }, /* @__PURE__ */ React.createElement(
|
|
79
|
-
"form",
|
|
80
|
-
{
|
|
81
|
-
onSubmit: (e) => {
|
|
82
|
-
const target = e.currentTarget;
|
|
83
|
-
e.preventDefault();
|
|
84
|
-
const input = target[0];
|
|
85
|
-
const url = getUrlFromString(input.value);
|
|
86
|
-
url && editor.chain().focus().setLink({ href: url }).run();
|
|
87
|
-
},
|
|
88
|
-
className: "flex p-1 "
|
|
89
|
-
},
|
|
90
|
-
/* @__PURE__ */ React.createElement(
|
|
91
|
-
"input",
|
|
62
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react_popover.Popover, { modal: true, open, onOpenChange, children: [
|
|
63
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_popover.PopoverTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
64
|
+
import_button.Button,
|
|
92
65
|
{
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
66
|
+
size: "sm",
|
|
67
|
+
variant: "ghost",
|
|
68
|
+
className: "gap-2 rounded-none border-none",
|
|
69
|
+
children: [
|
|
70
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-base", children: "\u2197" }),
|
|
71
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
72
|
+
"p",
|
|
73
|
+
{
|
|
74
|
+
className: (0, import_utils.cn)("underline decoration-stone-400 underline-offset-4", {
|
|
75
|
+
"text-blue-500": editor.isActive("link")
|
|
76
|
+
}),
|
|
77
|
+
children: "Link"
|
|
78
|
+
}
|
|
79
|
+
)
|
|
80
|
+
]
|
|
98
81
|
}
|
|
99
|
-
),
|
|
100
|
-
|
|
101
|
-
|
|
82
|
+
) }),
|
|
83
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_popover.PopoverContent, { align: "start", className: "w-60 p-0", sideOffset: 10, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
84
|
+
"form",
|
|
102
85
|
{
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
editor.chain().focus().
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
86
|
+
onSubmit: (e) => {
|
|
87
|
+
const target = e.currentTarget;
|
|
88
|
+
e.preventDefault();
|
|
89
|
+
const input = target[0];
|
|
90
|
+
const url = getUrlFromString(input.value);
|
|
91
|
+
url && editor.chain().focus().setLink({ href: url }).run();
|
|
92
|
+
},
|
|
93
|
+
className: "flex p-1 ",
|
|
94
|
+
children: [
|
|
95
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
96
|
+
"input",
|
|
97
|
+
{
|
|
98
|
+
ref: inputRef,
|
|
99
|
+
type: "text",
|
|
100
|
+
placeholder: "Paste a link",
|
|
101
|
+
className: "bg-background flex-1 p-1 text-sm outline-none",
|
|
102
|
+
defaultValue: editor.getAttributes("link").href || ""
|
|
103
|
+
}
|
|
104
|
+
),
|
|
105
|
+
editor.getAttributes("link").href ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
106
|
+
import_button.Button,
|
|
107
|
+
{
|
|
108
|
+
size: "icon",
|
|
109
|
+
variant: "outline",
|
|
110
|
+
type: "button",
|
|
111
|
+
className: "flex h-8 items-center rounded-sm p-1 text-red-600 transition-all hover:bg-red-100 dark:hover:bg-red-800",
|
|
112
|
+
onClick: () => {
|
|
113
|
+
editor.chain().focus().unsetLink().run();
|
|
114
|
+
},
|
|
115
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Trash, { className: "h-4 w-4" })
|
|
116
|
+
}
|
|
117
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.Button, { size: "icon", className: "h-8", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Check, { className: "h-4 w-4" }) })
|
|
118
|
+
]
|
|
119
|
+
}
|
|
120
|
+
) })
|
|
121
|
+
] });
|
|
114
122
|
};
|
|
115
123
|
// Annotate the CommonJS export names for ESM import in node:
|
|
116
124
|
0 && (module.exports = {
|
|
@@ -21,6 +21,7 @@ __export(node_selector_exports, {
|
|
|
21
21
|
NodeSelector: () => NodeSelector
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(node_selector_exports);
|
|
24
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
24
25
|
var import_lucide_react = require("lucide-react");
|
|
25
26
|
var import_react_popover = require("@radix-ui/react-popover");
|
|
26
27
|
var import_button = require("../ui/button");
|
|
@@ -91,26 +92,37 @@ const NodeSelector = ({ open, onOpenChange }) => {
|
|
|
91
92
|
const activeItem = (_a = items.filter((item) => item.isActive(editor)).pop()) != null ? _a : {
|
|
92
93
|
name: "Multiple"
|
|
93
94
|
};
|
|
94
|
-
return /* @__PURE__ */
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
95
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react_popover.Popover, { modal: true, open, onOpenChange, children: [
|
|
96
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
97
|
+
import_popover.PopoverTrigger,
|
|
98
|
+
{
|
|
99
|
+
asChild: true,
|
|
100
|
+
className: "hover:bg-accent gap-2 rounded-none border-none focus:ring-0",
|
|
101
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_button.Button, { size: "sm", variant: "ghost", className: "gap-2", children: [
|
|
102
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "whitespace-nowrap text-sm", children: activeItem.name }),
|
|
103
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ChevronDown, { className: "h-4 w-4" })
|
|
104
|
+
] })
|
|
105
|
+
}
|
|
106
|
+
),
|
|
107
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_popover.PopoverContent, { sideOffset: 5, align: "start", className: "w-48 p-1", children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
108
|
+
import_components.EditorBubbleItem,
|
|
109
|
+
{
|
|
110
|
+
onSelect: (editor2) => {
|
|
111
|
+
item.command(editor2);
|
|
112
|
+
onOpenChange(false);
|
|
113
|
+
},
|
|
114
|
+
className: "hover:bg-accent flex cursor-pointer items-center justify-between rounded-sm px-2 py-1 text-sm",
|
|
115
|
+
children: [
|
|
116
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center space-x-2", children: [
|
|
117
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "rounded-sm border p-1", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(item.icon, { className: "h-3 w-3" }) }),
|
|
118
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: item.name })
|
|
119
|
+
] }),
|
|
120
|
+
activeItem.name === item.name && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Check, { className: "h-4 w-4" })
|
|
121
|
+
]
|
|
108
122
|
},
|
|
109
|
-
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
activeItem.name === item.name && /* @__PURE__ */ React.createElement(import_lucide_react.Check, { className: "h-4 w-4" })
|
|
113
|
-
))));
|
|
123
|
+
index
|
|
124
|
+
)) })
|
|
125
|
+
] });
|
|
114
126
|
};
|
|
115
127
|
// Annotate the CommonJS export names for ESM import in node:
|
|
116
128
|
0 && (module.exports = {
|
|
@@ -21,6 +21,7 @@ __export(text_buttons_exports, {
|
|
|
21
21
|
TextButtons: () => TextButtons
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(text_buttons_exports);
|
|
24
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
24
25
|
var import_lucide_react = require("lucide-react");
|
|
25
26
|
var import_utils = require("../../../../lib/utils");
|
|
26
27
|
var import_button = require("../ui/button");
|
|
@@ -63,23 +64,23 @@ const TextButtons = () => {
|
|
|
63
64
|
icon: import_lucide_react.CodeIcon
|
|
64
65
|
}
|
|
65
66
|
];
|
|
66
|
-
return /* @__PURE__ */
|
|
67
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex", children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
67
68
|
import_components.EditorBubbleItem,
|
|
68
69
|
{
|
|
69
|
-
key: index,
|
|
70
70
|
onSelect: (editor2) => {
|
|
71
71
|
item.command(editor2);
|
|
72
|
-
}
|
|
72
|
+
},
|
|
73
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.Button, { size: "sm", className: "rounded-none", variant: "ghost", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
74
|
+
item.icon,
|
|
75
|
+
{
|
|
76
|
+
className: (0, import_utils.cn)("h-4 w-4", {
|
|
77
|
+
"text-blue-500": item.isActive(editor)
|
|
78
|
+
})
|
|
79
|
+
}
|
|
80
|
+
) })
|
|
73
81
|
},
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
{
|
|
77
|
-
className: (0, import_utils.cn)("h-4 w-4", {
|
|
78
|
-
"text-blue-500": item.isActive(editor)
|
|
79
|
-
})
|
|
80
|
-
}
|
|
81
|
-
))
|
|
82
|
-
)));
|
|
82
|
+
index
|
|
83
|
+
)) });
|
|
83
84
|
};
|
|
84
85
|
// Annotate the CommonJS export names for ESM import in node:
|
|
85
86
|
0 && (module.exports = {
|
|
@@ -42,6 +42,7 @@ __export(slash_command_exports, {
|
|
|
42
42
|
suggestionItems: () => suggestionItems
|
|
43
43
|
});
|
|
44
44
|
module.exports = __toCommonJS(slash_command_exports);
|
|
45
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
45
46
|
var import_lucide_react = require("lucide-react");
|
|
46
47
|
var import_extensions = require("../novel/src/extensions");
|
|
47
48
|
var import_image_upload = require("./image-upload");
|
|
@@ -49,7 +50,7 @@ const suggestionItems = (0, import_extensions.createSuggestionItems)([
|
|
|
49
50
|
{
|
|
50
51
|
title: "Send Feedback",
|
|
51
52
|
description: "Let us know how we can improve.",
|
|
52
|
-
icon: /* @__PURE__ */
|
|
53
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.MessageSquarePlus, { size: 18 }),
|
|
53
54
|
command: ({ editor, range }) => {
|
|
54
55
|
editor.chain().focus().deleteRange(range).run();
|
|
55
56
|
window.open("/feedback", "_blank");
|
|
@@ -59,7 +60,7 @@ const suggestionItems = (0, import_extensions.createSuggestionItems)([
|
|
|
59
60
|
title: "Text",
|
|
60
61
|
description: "Just start typing with plain text.",
|
|
61
62
|
searchTerms: ["p", "paragraph"],
|
|
62
|
-
icon: /* @__PURE__ */
|
|
63
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Text, { size: 18 }),
|
|
63
64
|
command: ({ editor, range }) => {
|
|
64
65
|
editor.chain().focus().deleteRange(range).toggleNode("paragraph", "paragraph").run();
|
|
65
66
|
}
|
|
@@ -68,7 +69,7 @@ const suggestionItems = (0, import_extensions.createSuggestionItems)([
|
|
|
68
69
|
title: "To-do List",
|
|
69
70
|
description: "Track tasks with a to-do list.",
|
|
70
71
|
searchTerms: ["todo", "task", "list", "check", "checkbox"],
|
|
71
|
-
icon: /* @__PURE__ */
|
|
72
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.CheckSquare, { size: 18 }),
|
|
72
73
|
command: ({ editor, range }) => {
|
|
73
74
|
editor.chain().focus().deleteRange(range).toggleTaskList().run();
|
|
74
75
|
}
|
|
@@ -77,7 +78,7 @@ const suggestionItems = (0, import_extensions.createSuggestionItems)([
|
|
|
77
78
|
title: "Heading 1",
|
|
78
79
|
description: "Big section heading.",
|
|
79
80
|
searchTerms: ["title", "big", "large"],
|
|
80
|
-
icon: /* @__PURE__ */
|
|
81
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Heading1, { size: 18 }),
|
|
81
82
|
command: ({ editor, range }) => {
|
|
82
83
|
editor.chain().focus().deleteRange(range).setNode("heading", { level: 1 }).run();
|
|
83
84
|
}
|
|
@@ -86,7 +87,7 @@ const suggestionItems = (0, import_extensions.createSuggestionItems)([
|
|
|
86
87
|
title: "Heading 2",
|
|
87
88
|
description: "Medium section heading.",
|
|
88
89
|
searchTerms: ["subtitle", "medium"],
|
|
89
|
-
icon: /* @__PURE__ */
|
|
90
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Heading2, { size: 18 }),
|
|
90
91
|
command: ({ editor, range }) => {
|
|
91
92
|
editor.chain().focus().deleteRange(range).setNode("heading", { level: 2 }).run();
|
|
92
93
|
}
|
|
@@ -95,7 +96,7 @@ const suggestionItems = (0, import_extensions.createSuggestionItems)([
|
|
|
95
96
|
title: "Heading 3",
|
|
96
97
|
description: "Small section heading.",
|
|
97
98
|
searchTerms: ["subtitle", "small"],
|
|
98
|
-
icon: /* @__PURE__ */
|
|
99
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Heading3, { size: 18 }),
|
|
99
100
|
command: ({ editor, range }) => {
|
|
100
101
|
editor.chain().focus().deleteRange(range).setNode("heading", { level: 3 }).run();
|
|
101
102
|
}
|
|
@@ -104,7 +105,7 @@ const suggestionItems = (0, import_extensions.createSuggestionItems)([
|
|
|
104
105
|
title: "Bullet List",
|
|
105
106
|
description: "Create a simple bullet list.",
|
|
106
107
|
searchTerms: ["unordered", "point"],
|
|
107
|
-
icon: /* @__PURE__ */
|
|
108
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.List, { size: 18 }),
|
|
108
109
|
command: ({ editor, range }) => {
|
|
109
110
|
editor.chain().focus().deleteRange(range).toggleBulletList().run();
|
|
110
111
|
}
|
|
@@ -113,7 +114,7 @@ const suggestionItems = (0, import_extensions.createSuggestionItems)([
|
|
|
113
114
|
title: "Numbered List",
|
|
114
115
|
description: "Create a list with numbering.",
|
|
115
116
|
searchTerms: ["ordered"],
|
|
116
|
-
icon: /* @__PURE__ */
|
|
117
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ListOrdered, { size: 18 }),
|
|
117
118
|
command: ({ editor, range }) => {
|
|
118
119
|
editor.chain().focus().deleteRange(range).toggleOrderedList().run();
|
|
119
120
|
}
|
|
@@ -122,21 +123,21 @@ const suggestionItems = (0, import_extensions.createSuggestionItems)([
|
|
|
122
123
|
title: "Quote",
|
|
123
124
|
description: "Capture a quote.",
|
|
124
125
|
searchTerms: ["blockquote"],
|
|
125
|
-
icon: /* @__PURE__ */
|
|
126
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.TextQuote, { size: 18 }),
|
|
126
127
|
command: ({ editor, range }) => editor.chain().focus().deleteRange(range).toggleNode("paragraph", "paragraph").toggleBlockquote().run()
|
|
127
128
|
},
|
|
128
129
|
{
|
|
129
130
|
title: "Code",
|
|
130
131
|
description: "Capture a code snippet.",
|
|
131
132
|
searchTerms: ["codeblock"],
|
|
132
|
-
icon: /* @__PURE__ */
|
|
133
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Code, { size: 18 }),
|
|
133
134
|
command: ({ editor, range }) => editor.chain().focus().deleteRange(range).toggleCodeBlock().run()
|
|
134
135
|
},
|
|
135
136
|
{
|
|
136
137
|
title: "Image",
|
|
137
138
|
description: "Upload an image from your computer.",
|
|
138
139
|
searchTerms: ["photo", "picture", "media"],
|
|
139
|
-
icon: /* @__PURE__ */
|
|
140
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ImageIcon, { size: 18 }),
|
|
140
141
|
command: ({ editor, range }) => {
|
|
141
142
|
editor.chain().focus().deleteRange(range).run();
|
|
142
143
|
const input = document.createElement("input");
|
|
@@ -58,6 +58,7 @@ __export(button_exports, {
|
|
|
58
58
|
buttonVariants: () => buttonVariants
|
|
59
59
|
});
|
|
60
60
|
module.exports = __toCommonJS(button_exports);
|
|
61
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
61
62
|
var import_react_slot = require("@radix-ui/react-slot");
|
|
62
63
|
var import_class_variance_authority = require("class-variance-authority");
|
|
63
64
|
var React = __toESM(require("react"), 1);
|
|
@@ -91,7 +92,7 @@ const Button = React.forwardRef(
|
|
|
91
92
|
(_a, ref) => {
|
|
92
93
|
var _b = _a, { className, variant, size, asChild = false } = _b, props = __objRest(_b, ["className", "variant", "size", "asChild"]);
|
|
93
94
|
const Comp = asChild ? import_react_slot.Slot : "button";
|
|
94
|
-
return /* @__PURE__ */
|
|
95
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
95
96
|
Comp,
|
|
96
97
|
__spreadValues({
|
|
97
98
|
className: (0, import_utils.cn)(buttonVariants({ variant, size, className })),
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
var __create = Object.create;
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
|
+
var __defProps = Object.defineProperties;
|
|
5
6
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6
8
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
9
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
10
|
var __getProtoOf = Object.getPrototypeOf;
|
|
@@ -20,6 +22,7 @@ var __spreadValues = (a, b) => {
|
|
|
20
22
|
}
|
|
21
23
|
return a;
|
|
22
24
|
};
|
|
25
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
23
26
|
var __objRest = (source, exclude) => {
|
|
24
27
|
var target = {};
|
|
25
28
|
for (var prop in source)
|
|
@@ -66,6 +69,7 @@ __export(command_exports, {
|
|
|
66
69
|
CommandShortcut: () => CommandShortcut
|
|
67
70
|
});
|
|
68
71
|
module.exports = __toCommonJS(command_exports);
|
|
72
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
69
73
|
var import_react_dialog = require("@radix-ui/react-dialog");
|
|
70
74
|
var import_cmdk = require("cmdk");
|
|
71
75
|
var React = __toESM(require("react"), 1);
|
|
@@ -74,7 +78,7 @@ var import_utils = require("../../../../lib/utils");
|
|
|
74
78
|
var import_magic = __toESM(require("./icons/magic"), 1);
|
|
75
79
|
const Command = React.forwardRef((_a, ref) => {
|
|
76
80
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
77
|
-
return /* @__PURE__ */
|
|
81
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
78
82
|
import_cmdk.Command,
|
|
79
83
|
__spreadValues({
|
|
80
84
|
ref,
|
|
@@ -88,25 +92,28 @@ const Command = React.forwardRef((_a, ref) => {
|
|
|
88
92
|
Command.displayName = import_cmdk.Command.displayName;
|
|
89
93
|
const CommandDialog = (_c) => {
|
|
90
94
|
var _d = _c, { children } = _d, props = __objRest(_d, ["children"]);
|
|
91
|
-
return /* @__PURE__ */
|
|
95
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.Dialog, __spreadProps(__spreadValues({}, props), { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_dialog.DialogContent, { className: "overflow-hidden p-0 shadow-lg", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Command, { className: "[&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children }) }) }));
|
|
92
96
|
};
|
|
93
97
|
const CommandInput = React.forwardRef((_e, ref) => {
|
|
94
98
|
var _f = _e, { className } = _f, props = __objRest(_f, ["className"]);
|
|
95
|
-
return /* @__PURE__ */
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
className
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
99
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center border-b px-4", "cmdk-input-wrapper": "", children: [
|
|
100
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_magic.default, { className: "mr-2 h-4 w-4 shrink-0 text-purple-500 " }),
|
|
101
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
102
|
+
import_cmdk.Command.Input,
|
|
103
|
+
__spreadValues({
|
|
104
|
+
ref,
|
|
105
|
+
className: (0, import_utils.cn)(
|
|
106
|
+
"placeholder:text-muted-foreground flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
107
|
+
className
|
|
108
|
+
)
|
|
109
|
+
}, props)
|
|
110
|
+
)
|
|
111
|
+
] });
|
|
105
112
|
});
|
|
106
113
|
CommandInput.displayName = import_cmdk.Command.Input.displayName;
|
|
107
114
|
const CommandList = React.forwardRef((_g, ref) => {
|
|
108
115
|
var _h = _g, { className } = _h, props = __objRest(_h, ["className"]);
|
|
109
|
-
return /* @__PURE__ */
|
|
116
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
110
117
|
import_cmdk.Command.List,
|
|
111
118
|
__spreadValues({
|
|
112
119
|
ref,
|
|
@@ -115,7 +122,7 @@ const CommandList = React.forwardRef((_g, ref) => {
|
|
|
115
122
|
);
|
|
116
123
|
});
|
|
117
124
|
CommandList.displayName = import_cmdk.Command.List.displayName;
|
|
118
|
-
const CommandEmpty = React.forwardRef((props, ref) => /* @__PURE__ */
|
|
125
|
+
const CommandEmpty = React.forwardRef((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
119
126
|
import_cmdk.Command.Empty,
|
|
120
127
|
__spreadValues({
|
|
121
128
|
ref,
|
|
@@ -125,7 +132,7 @@ const CommandEmpty = React.forwardRef((props, ref) => /* @__PURE__ */ React.crea
|
|
|
125
132
|
CommandEmpty.displayName = import_cmdk.Command.Empty.displayName;
|
|
126
133
|
const CommandGroup = React.forwardRef((_i, ref) => {
|
|
127
134
|
var _j = _i, { className } = _j, props = __objRest(_j, ["className"]);
|
|
128
|
-
return /* @__PURE__ */
|
|
135
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
129
136
|
import_cmdk.Command.Group,
|
|
130
137
|
__spreadValues({
|
|
131
138
|
ref,
|
|
@@ -139,7 +146,7 @@ const CommandGroup = React.forwardRef((_i, ref) => {
|
|
|
139
146
|
CommandGroup.displayName = import_cmdk.Command.Group.displayName;
|
|
140
147
|
const CommandSeparator = React.forwardRef((_k, ref) => {
|
|
141
148
|
var _l = _k, { className } = _l, props = __objRest(_l, ["className"]);
|
|
142
|
-
return /* @__PURE__ */
|
|
149
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
143
150
|
import_cmdk.Command.Separator,
|
|
144
151
|
__spreadValues({
|
|
145
152
|
ref,
|
|
@@ -150,7 +157,7 @@ const CommandSeparator = React.forwardRef((_k, ref) => {
|
|
|
150
157
|
CommandSeparator.displayName = import_cmdk.Command.Separator.displayName;
|
|
151
158
|
const CommandItem = React.forwardRef((_m, ref) => {
|
|
152
159
|
var _n = _m, { className } = _n, props = __objRest(_n, ["className"]);
|
|
153
|
-
return /* @__PURE__ */
|
|
160
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
154
161
|
import_cmdk.Command.Item,
|
|
155
162
|
__spreadValues({
|
|
156
163
|
ref,
|
|
@@ -168,7 +175,7 @@ const CommandShortcut = (_o) => {
|
|
|
168
175
|
} = _p, props = __objRest(_p, [
|
|
169
176
|
"className"
|
|
170
177
|
]);
|
|
171
|
-
return /* @__PURE__ */
|
|
178
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
172
179
|
"span",
|
|
173
180
|
__spreadValues({
|
|
174
181
|
className: (0, import_utils.cn)(
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
var __create = Object.create;
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
|
+
var __defProps = Object.defineProperties;
|
|
5
6
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6
8
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
9
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
10
|
var __getProtoOf = Object.getPrototypeOf;
|
|
@@ -20,6 +22,7 @@ var __spreadValues = (a, b) => {
|
|
|
20
22
|
}
|
|
21
23
|
return a;
|
|
22
24
|
};
|
|
25
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
23
26
|
var __objRest = (source, exclude) => {
|
|
24
27
|
var target = {};
|
|
25
28
|
for (var prop in source)
|
|
@@ -67,6 +70,7 @@ __export(dialog_exports, {
|
|
|
67
70
|
DialogTrigger: () => DialogTrigger
|
|
68
71
|
});
|
|
69
72
|
module.exports = __toCommonJS(dialog_exports);
|
|
73
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
70
74
|
var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"), 1);
|
|
71
75
|
var import_lucide_react = require("lucide-react");
|
|
72
76
|
var React = __toESM(require("react"), 1);
|
|
@@ -77,7 +81,7 @@ const DialogPortal = DialogPrimitive.Portal;
|
|
|
77
81
|
const DialogClose = DialogPrimitive.Close;
|
|
78
82
|
const DialogOverlay = React.forwardRef((_a, ref) => {
|
|
79
83
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
80
|
-
return /* @__PURE__ */
|
|
84
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
81
85
|
DialogPrimitive.Overlay,
|
|
82
86
|
__spreadValues({
|
|
83
87
|
ref,
|
|
@@ -91,18 +95,27 @@ const DialogOverlay = React.forwardRef((_a, ref) => {
|
|
|
91
95
|
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
92
96
|
const DialogContent = React.forwardRef((_c, ref) => {
|
|
93
97
|
var _d = _c, { className, children } = _d, props = __objRest(_d, ["className", "children"]);
|
|
94
|
-
return /* @__PURE__ */
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
className
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
98
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(DialogPortal, { children: [
|
|
99
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogOverlay, {}),
|
|
100
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
101
|
+
DialogPrimitive.Content,
|
|
102
|
+
__spreadProps(__spreadValues({
|
|
103
|
+
ref,
|
|
104
|
+
className: (0, import_utils.cn)(
|
|
105
|
+
"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-200 sm:rounded-lg",
|
|
106
|
+
className
|
|
107
|
+
)
|
|
108
|
+
}, props), {
|
|
109
|
+
children: [
|
|
110
|
+
children,
|
|
111
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(DialogPrimitive.Close, { className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none", children: [
|
|
112
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.X, { className: "h-4 w-4" }),
|
|
113
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "sr-only", children: "Close" })
|
|
114
|
+
] })
|
|
115
|
+
]
|
|
116
|
+
})
|
|
117
|
+
)
|
|
118
|
+
] });
|
|
106
119
|
});
|
|
107
120
|
DialogContent.displayName = DialogPrimitive.Content.displayName;
|
|
108
121
|
const DialogHeader = (_e) => {
|
|
@@ -111,7 +124,7 @@ const DialogHeader = (_e) => {
|
|
|
111
124
|
} = _f, props = __objRest(_f, [
|
|
112
125
|
"className"
|
|
113
126
|
]);
|
|
114
|
-
return /* @__PURE__ */
|
|
127
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
115
128
|
"div",
|
|
116
129
|
__spreadValues({
|
|
117
130
|
className: (0, import_utils.cn)(
|
|
@@ -128,7 +141,7 @@ const DialogFooter = (_g) => {
|
|
|
128
141
|
} = _h, props = __objRest(_h, [
|
|
129
142
|
"className"
|
|
130
143
|
]);
|
|
131
|
-
return /* @__PURE__ */
|
|
144
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
132
145
|
"div",
|
|
133
146
|
__spreadValues({
|
|
134
147
|
className: (0, import_utils.cn)(
|
|
@@ -141,7 +154,7 @@ const DialogFooter = (_g) => {
|
|
|
141
154
|
DialogFooter.displayName = "DialogFooter";
|
|
142
155
|
const DialogTitle = React.forwardRef((_i, ref) => {
|
|
143
156
|
var _j = _i, { className } = _j, props = __objRest(_j, ["className"]);
|
|
144
|
-
return /* @__PURE__ */
|
|
157
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
145
158
|
DialogPrimitive.Title,
|
|
146
159
|
__spreadValues({
|
|
147
160
|
ref,
|
|
@@ -155,7 +168,7 @@ const DialogTitle = React.forwardRef((_i, ref) => {
|
|
|
155
168
|
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
156
169
|
const DialogDescription = React.forwardRef((_k, ref) => {
|
|
157
170
|
var _l = _k, { className } = _l, props = __objRest(_l, ["className"]);
|
|
158
|
-
return /* @__PURE__ */
|
|
171
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
159
172
|
DialogPrimitive.Description,
|
|
160
173
|
__spreadValues({
|
|
161
174
|
ref,
|
|
@@ -21,7 +21,12 @@ __export(crazy_spinner_exports, {
|
|
|
21
21
|
default: () => crazy_spinner_default
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(crazy_spinner_exports);
|
|
24
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
24
25
|
const CrazySpinner = () => {
|
|
25
|
-
return /* @__PURE__ */
|
|
26
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center justify-center gap-0.5", children: [
|
|
27
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-1.5 w-1.5 animate-bounce rounded-full bg-purple-500 [animation-delay:-0.3s]" }),
|
|
28
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-1.5 w-1.5 animate-bounce rounded-full bg-purple-500 [animation-delay:-0.15s]" }),
|
|
29
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-1.5 w-1.5 animate-bounce rounded-full bg-purple-500" })
|
|
30
|
+
] });
|
|
26
31
|
};
|
|
27
32
|
var crazy_spinner_default = CrazySpinner;
|