@pixpilot/shadcn-ui 0.4.0 → 0.4.2
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/AbsoluteFill.cjs +24 -1
- package/dist/AbsoluteFill.js +21 -1
- package/dist/Alert.cjs +82 -1
- package/dist/Alert.js +77 -1
- package/dist/Button.cjs +84 -1
- package/dist/Button.d.cts +1 -1
- package/dist/Button.d.ts +1 -1
- package/dist/Button.js +79 -1
- package/dist/CloseButtonAbsolute.cjs +20 -1
- package/dist/CloseButtonAbsolute.js +16 -1
- package/dist/CloseButtonRounded.cjs +22 -1
- package/dist/CloseButtonRounded.js +17 -1
- package/dist/Combobox.cjs +53 -1
- package/dist/Combobox.js +48 -1
- package/dist/CommandOptionList.cjs +29 -1
- package/dist/CommandOptionList.js +25 -1
- package/dist/ContentCard.cjs +27 -1
- package/dist/ContentCard.d.cts +1 -1
- package/dist/ContentCard.js +23 -1
- package/dist/DatePicker.cjs +38 -1
- package/dist/DatePicker.d.cts +1 -1
- package/dist/DatePicker.js +33 -1
- package/dist/LoadingOverlay.cjs +65 -1
- package/dist/LoadingOverlay.js +60 -1
- package/dist/Select.cjs +27 -1
- package/dist/Select.d.cts +1 -1
- package/dist/Select.js +23 -1
- package/dist/Slider.cjs +19 -1
- package/dist/Slider.js +15 -1
- package/dist/ThemeToggle.cjs +98 -1
- package/dist/ThemeToggle.js +94 -1
- package/dist/_virtual/rolldown_runtime.cjs +25 -1
- package/dist/confirmation-dialog/ConfirmationDialog.cjs +46 -1
- package/dist/confirmation-dialog/ConfirmationDialog.d.cts +1 -0
- package/dist/confirmation-dialog/ConfirmationDialog.js +42 -1
- package/dist/confirmation-dialog/DialogProvider.cjs +16 -1
- package/dist/confirmation-dialog/DialogProvider.js +12 -1
- package/dist/confirmation-dialog/confirmation-dialogs.cjs +14 -1
- package/dist/confirmation-dialog/confirmation-dialogs.js +12 -1
- package/dist/confirmation-dialog/index.cjs +6 -1
- package/dist/confirmation-dialog/index.js +6 -1
- package/dist/file-upload/FileUpload.cjs +68 -1
- package/dist/file-upload/FileUpload.d.ts +2 -2
- package/dist/file-upload/FileUpload.js +63 -1
- package/dist/file-upload/FileUploadItems.cjs +36 -1
- package/dist/file-upload/FileUploadItems.js +32 -1
- package/dist/file-upload/FileUploadListItem.cjs +88 -1
- package/dist/file-upload/FileUploadListItem.js +82 -1
- package/dist/file-upload/hooks/index.cjs +3 -1
- package/dist/file-upload/hooks/index.d.cts +2 -0
- package/dist/file-upload/hooks/index.js +3 -1
- package/dist/file-upload/hooks/use-file-error.cjs +15 -1
- package/dist/file-upload/hooks/use-file-error.js +13 -1
- package/dist/file-upload/hooks/use-file-upload-progress-callbacks.cjs +34 -1
- package/dist/file-upload/hooks/use-file-upload-progress-callbacks.d.cts +1 -0
- package/dist/file-upload/hooks/use-file-upload-progress-callbacks.js +31 -1
- package/dist/file-upload/hooks/use-file-upload-store.cjs +77 -1
- package/dist/file-upload/hooks/use-file-upload-store.d.cts +2 -0
- package/dist/file-upload/hooks/use-file-upload-store.js +75 -1
- package/dist/file-upload/index.cjs +5 -1
- package/dist/file-upload/index.d.cts +2 -1
- package/dist/file-upload/index.js +5 -1
- package/dist/file-upload/utils/create-placeholder-file.cjs +11 -1
- package/dist/file-upload/utils/create-placeholder-file.js +10 -1
- package/dist/file-upload/utils/get-file-key.cjs +8 -1
- package/dist/file-upload/utils/get-file-key.d.cts +1 -0
- package/dist/file-upload/utils/get-file-key.js +7 -1
- package/dist/file-upload/utils/get-file-meta.cjs +23 -1
- package/dist/file-upload/utils/get-file-meta.d.cts +1 -0
- package/dist/file-upload/utils/get-file-meta.js +21 -1
- package/dist/file-upload/utils/index.d.cts +4 -0
- package/dist/file-upload/utils/is-file-equal.cjs +9 -1
- package/dist/file-upload/utils/is-file-equal.d.cts +1 -0
- package/dist/file-upload/utils/is-file-equal.js +8 -1
- package/dist/file-upload/utils/merge-file-metadata.cjs +26 -1
- package/dist/file-upload/utils/merge-file-metadata.d.cts +1 -0
- package/dist/file-upload/utils/merge-file-metadata.js +26 -1
- package/dist/file-upload-inline/FileUploadInline.cjs +71 -1
- package/dist/file-upload-inline/FileUploadInline.d.ts +2 -2
- package/dist/file-upload-inline/FileUploadInline.js +66 -1
- package/dist/file-upload-inline/FileUploadInlineItem.cjs +94 -1
- package/dist/file-upload-inline/FileUploadInlineItem.js +88 -1
- package/dist/file-upload-inline/defaults.cjs +11 -1
- package/dist/file-upload-inline/defaults.js +10 -1
- package/dist/file-upload-inline/index.cjs +1 -1
- package/dist/file-upload-inline/index.js +1 -1
- package/dist/file-upload-inline/utils.cjs +36 -1
- package/dist/file-upload-inline/utils.js +34 -1
- package/dist/hooks/index.cjs +1 -1
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/use-media-query.cjs +9 -1
- package/dist/hooks/use-media-query.js +7 -1
- package/dist/icon-selector/IconPicker.cjs +93 -1
- package/dist/icon-selector/IconPicker.d.cts +0 -1
- package/dist/icon-selector/IconPicker.d.ts +0 -1
- package/dist/icon-selector/IconPicker.js +88 -1
- package/dist/icon-selector/constants.cjs +6 -1
- package/dist/icon-selector/constants.js +5 -0
- package/dist/icon-selector/icon-picker-container.cjs +35 -1
- package/dist/icon-selector/icon-picker-container.js +32 -1
- package/dist/icon-selector/icon-picker-content.cjs +146 -1
- package/dist/icon-selector/icon-picker-content.js +141 -1
- package/dist/icon-selector/index.cjs +1 -1
- package/dist/icon-selector/index.d.cts +2 -2
- package/dist/icon-selector/index.d.ts +2 -2
- package/dist/icon-selector/index.js +1 -1
- package/dist/icon-selector/use-async-providers.cjs +69 -1
- package/dist/icon-selector/use-async-providers.js +67 -1
- package/dist/icon-selector/utils/is-valid-provider.cjs +11 -1
- package/dist/icon-selector/utils/is-valid-provider.js +10 -1
- package/dist/icon-selector/virtualized-icon-grid.cjs +137 -1
- package/dist/icon-selector/virtualized-icon-grid.js +132 -1
- package/dist/index.cjs +76 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +37 -1
- package/dist/node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.cjs +18 -0
- package/dist/node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js +17 -0
- package/dist/node_modules/.pnpm/tailwind-merge@3.4.0/node_modules/tailwind-merge/dist/bundle-mjs.cjs +1894 -0
- package/dist/node_modules/.pnpm/tailwind-merge@3.4.0/node_modules/tailwind-merge/dist/bundle-mjs.js +1893 -0
- package/dist/packages/shadcn/src/lib/utils.cjs +10 -1
- package/dist/packages/shadcn/src/lib/utils.js +10 -1
- package/dist/pagination/Pagination.cjs +156 -1
- package/dist/pagination/Pagination.js +151 -1
- package/dist/pagination/index.cjs +1 -1
- package/dist/pagination/index.js +1 -1
- package/dist/rich-text-editor/RichTextEditor.cjs +132 -1
- package/dist/rich-text-editor/RichTextEditor.js +126 -1
- package/dist/rich-text-editor/index.cjs +1 -1
- package/dist/rich-text-editor/index.js +1 -1
- package/dist/rich-text-editor/predefined-toolbar-options.cjs +84 -1
- package/dist/rich-text-editor/predefined-toolbar-options.js +81 -1
- package/dist/spinner/index.cjs +1 -1
- package/dist/spinner/index.js +1 -1
- package/dist/spinner/spinner.cjs +73 -6
- package/dist/spinner/spinner.js +70 -6
- package/dist/spinner/styles.cjs +24 -12
- package/dist/spinner/styles.js +23 -12
- package/dist/tags-input.cjs +226 -1
- package/dist/tags-input.js +222 -1
- package/dist/theme-provider/ThemeProvider.cjs +27 -1
- package/dist/theme-provider/ThemeProvider.js +23 -1
- package/dist/theme-provider/index.cjs +4 -1
- package/dist/theme-provider/index.js +4 -1
- package/dist/toast/AlertToast.cjs +36 -1
- package/dist/toast/AlertToast.js +31 -1
- package/dist/toast/index.cjs +1 -1
- package/dist/toast/index.js +1 -1
- package/dist/toast/toast.cjs +75 -1
- package/dist/toast/toast.js +66 -1
- package/package.json +2 -2
- package/dist/_virtual/rolldown_runtime.js +0 -1
- package/dist/node_modules/.pnpm/@diceui_shared@0.12.0_@floating-ui_react@0.27.16_react-dom@19.2.0_react@19.2.0__react@1_2c51ffe880f01dd537d5b6a13313daf4/node_modules/@diceui/shared/dist/index.cjs +0 -1
- package/dist/node_modules/.pnpm/@diceui_shared@0.12.0_@floating-ui_react@0.27.16_react-dom@19.2.0_react@19.2.0__react@1_2c51ffe880f01dd537d5b6a13313daf4/node_modules/@diceui/shared/dist/index.js +0 -1
- package/dist/node_modules/.pnpm/@diceui_tags-input@0.7.2_@floating-ui_react@0.27.16_react-dom@19.2.0_react@19.2.0__reac_e193dc2ff0d426ed009417f8d89778fd/node_modules/@diceui/tags-input/dist/index.cjs +0 -1
- package/dist/node_modules/.pnpm/@diceui_tags-input@0.7.2_@floating-ui_react@0.27.16_react-dom@19.2.0_react@19.2.0__reac_e193dc2ff0d426ed009417f8d89778fd/node_modules/@diceui/tags-input/dist/index.js +0 -1
- package/dist/node_modules/.pnpm/@floating-ui_core@1.7.3/node_modules/@floating-ui/core/dist/floating-ui.core.cjs +0 -1
- package/dist/node_modules/.pnpm/@floating-ui_core@1.7.3/node_modules/@floating-ui/core/dist/floating-ui.core.js +0 -1
- package/dist/node_modules/.pnpm/@floating-ui_dom@1.7.4/node_modules/@floating-ui/dom/dist/floating-ui.dom.cjs +0 -1
- package/dist/node_modules/.pnpm/@floating-ui_dom@1.7.4/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +0 -1
- package/dist/node_modules/.pnpm/@floating-ui_react-dom@2.1.6_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.cjs +0 -1
- package/dist/node_modules/.pnpm/@floating-ui_react-dom@2.1.6_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +0 -1
- package/dist/node_modules/.pnpm/@floating-ui_react@0.27.16_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@floating-ui/react/dist/floating-ui.react.esm.cjs +0 -1
- package/dist/node_modules/.pnpm/@floating-ui_react@0.27.16_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@floating-ui/react/dist/floating-ui.react.esm.js +0 -1
- package/dist/node_modules/.pnpm/@floating-ui_react@0.27.16_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@floating-ui/react/dist/floating-ui.react.utils.cjs +0 -1
- package/dist/node_modules/.pnpm/@floating-ui_react@0.27.16_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@floating-ui/react/dist/floating-ui.react.utils.js +0 -1
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.cjs +0 -1
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.cjs +0 -1
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +0 -1
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +0 -1
- package/dist/node_modules/.pnpm/tabbable@6.3.0/node_modules/tabbable/dist/index.cjs +0 -1
- package/dist/node_modules/.pnpm/tabbable@6.3.0/node_modules/tabbable/dist/index.esm.js +0 -1
- package/dist/packages/shadcn/src/components/index.cjs +0 -1
- package/dist/packages/shadcn/src/components/index.js +0 -1
- package/dist/packages/shadcn/src/components/ui/OrContinueWithSeparator.cjs +0 -1
- package/dist/packages/shadcn/src/components/ui/OrContinueWithSeparator.js +0 -1
- package/dist/packages/shadcn/src/components/ui/alert-dialog.cjs +0 -1
- package/dist/packages/shadcn/src/components/ui/alert-dialog.js +0 -1
- package/dist/packages/shadcn/src/components/ui/alert.cjs +0 -1
- package/dist/packages/shadcn/src/components/ui/alert.js +0 -1
- package/dist/packages/shadcn/src/components/ui/avatar.cjs +0 -1
- package/dist/packages/shadcn/src/components/ui/avatar.js +0 -1
- package/dist/packages/shadcn/src/components/ui/badge.cjs +0 -1
- package/dist/packages/shadcn/src/components/ui/badge.js +0 -1
- package/dist/packages/shadcn/src/components/ui/button.cjs +0 -1
- package/dist/packages/shadcn/src/components/ui/button.js +0 -1
- package/dist/packages/shadcn/src/components/ui/calendar.cjs +0 -1
- package/dist/packages/shadcn/src/components/ui/calendar.js +0 -1
- package/dist/packages/shadcn/src/components/ui/card.cjs +0 -1
- package/dist/packages/shadcn/src/components/ui/card.js +0 -1
- package/dist/packages/shadcn/src/components/ui/checkbox.cjs +0 -1
- package/dist/packages/shadcn/src/components/ui/checkbox.js +0 -1
- package/dist/packages/shadcn/src/components/ui/command.cjs +0 -1
- package/dist/packages/shadcn/src/components/ui/command.js +0 -1
- package/dist/packages/shadcn/src/components/ui/dialog.cjs +0 -1
- package/dist/packages/shadcn/src/components/ui/dialog.js +0 -1
- package/dist/packages/shadcn/src/components/ui/dropdown-menu.cjs +0 -1
- package/dist/packages/shadcn/src/components/ui/dropdown-menu.js +0 -1
- package/dist/packages/shadcn/src/components/ui/file-upload.cjs +0 -1
- package/dist/packages/shadcn/src/components/ui/file-upload.js +0 -1
- package/dist/packages/shadcn/src/components/ui/form.cjs +0 -1
- package/dist/packages/shadcn/src/components/ui/form.js +0 -1
- package/dist/packages/shadcn/src/components/ui/index.cjs +0 -1
- package/dist/packages/shadcn/src/components/ui/index.js +0 -1
- package/dist/packages/shadcn/src/components/ui/input.cjs +0 -1
- package/dist/packages/shadcn/src/components/ui/input.js +0 -1
- package/dist/packages/shadcn/src/components/ui/label.cjs +0 -1
- package/dist/packages/shadcn/src/components/ui/label.js +0 -1
- package/dist/packages/shadcn/src/components/ui/pagination.cjs +0 -1
- package/dist/packages/shadcn/src/components/ui/pagination.js +0 -1
- package/dist/packages/shadcn/src/components/ui/popover.cjs +0 -1
- package/dist/packages/shadcn/src/components/ui/popover.js +0 -1
- package/dist/packages/shadcn/src/components/ui/radio-group.cjs +0 -1
- package/dist/packages/shadcn/src/components/ui/radio-group.js +0 -1
- package/dist/packages/shadcn/src/components/ui/select.cjs +0 -1
- package/dist/packages/shadcn/src/components/ui/select.js +0 -1
- package/dist/packages/shadcn/src/components/ui/separator.cjs +0 -1
- package/dist/packages/shadcn/src/components/ui/separator.js +0 -1
- package/dist/packages/shadcn/src/components/ui/shadcn-io/tags/index.cjs +0 -1
- package/dist/packages/shadcn/src/components/ui/shadcn-io/tags/index.js +0 -1
- package/dist/packages/shadcn/src/components/ui/shadcn-io/tags-input-inline/index.cjs +0 -1
- package/dist/packages/shadcn/src/components/ui/shadcn-io/tags-input-inline/index.js +0 -1
- package/dist/packages/shadcn/src/components/ui/sheet.cjs +0 -1
- package/dist/packages/shadcn/src/components/ui/sheet.js +0 -1
- package/dist/packages/shadcn/src/components/ui/slider.cjs +0 -1
- package/dist/packages/shadcn/src/components/ui/slider.js +0 -1
- package/dist/packages/shadcn/src/components/ui/switch.cjs +0 -1
- package/dist/packages/shadcn/src/components/ui/switch.js +0 -1
- package/dist/packages/shadcn/src/components/ui/tabs.cjs +0 -1
- package/dist/packages/shadcn/src/components/ui/tabs.js +0 -1
- package/dist/packages/shadcn/src/components/ui/textarea.cjs +0 -1
- package/dist/packages/shadcn/src/components/ui/textarea.js +0 -1
- package/dist/packages/shadcn/src/components/ui/tooltip.cjs +0 -1
- package/dist/packages/shadcn/src/components/ui/tooltip.js +0 -1
- package/dist/packages/shadcn/src/lib/index.cjs +0 -1
- package/dist/packages/shadcn/src/lib/index.js +0 -1
|
@@ -1 +1,84 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
let lucide_react = require("lucide-react");
|
|
3
|
+
lucide_react = require_rolldown_runtime.__toESM(lucide_react);
|
|
4
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
5
|
+
react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
6
|
+
|
|
7
|
+
//#region src/rich-text-editor/predefined-toolbar-options.tsx
|
|
8
|
+
const predefinedToolbarOptions = {
|
|
9
|
+
bold: {
|
|
10
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Bold, { className: "h-4 w-4" }),
|
|
11
|
+
tooltip: "Bold",
|
|
12
|
+
onClick: (editor) => editor.chain().focus().toggleBold().run(),
|
|
13
|
+
isActive: (editor) => editor.isActive("bold")
|
|
14
|
+
},
|
|
15
|
+
italic: {
|
|
16
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Italic, { className: "h-4 w-4" }),
|
|
17
|
+
tooltip: "Italic",
|
|
18
|
+
onClick: (editor) => editor.chain().focus().toggleItalic().run(),
|
|
19
|
+
isActive: (editor) => editor.isActive("italic")
|
|
20
|
+
},
|
|
21
|
+
underline: {
|
|
22
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Underline, { className: "h-4 w-4" }),
|
|
23
|
+
tooltip: "Underline",
|
|
24
|
+
onClick: (editor) => editor.chain().focus().toggleUnderline().run(),
|
|
25
|
+
isActive: (editor) => editor.isActive("underline")
|
|
26
|
+
},
|
|
27
|
+
strike: {
|
|
28
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Strikethrough, { className: "h-4 w-4" }),
|
|
29
|
+
tooltip: "Strikethrough",
|
|
30
|
+
onClick: (editor) => editor.chain().focus().toggleStrike().run(),
|
|
31
|
+
isActive: (editor) => editor.isActive("strike")
|
|
32
|
+
},
|
|
33
|
+
code: {
|
|
34
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Code, { className: "h-4 w-4" }),
|
|
35
|
+
tooltip: "Inline Code",
|
|
36
|
+
onClick: (editor) => editor.chain().focus().toggleCode().run(),
|
|
37
|
+
isActive: (editor) => editor.isActive("code")
|
|
38
|
+
},
|
|
39
|
+
heading1: {
|
|
40
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Heading1, { className: "h-4 w-4" }),
|
|
41
|
+
tooltip: "Heading 1",
|
|
42
|
+
onClick: (editor) => editor.chain().focus().toggleHeading({ level: 1 }).run(),
|
|
43
|
+
isActive: (editor) => editor.isActive("heading", { level: 1 })
|
|
44
|
+
},
|
|
45
|
+
heading2: {
|
|
46
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Heading2, { className: "h-4 w-4" }),
|
|
47
|
+
tooltip: "Heading 2",
|
|
48
|
+
onClick: (editor) => editor.chain().focus().toggleHeading({ level: 2 }).run(),
|
|
49
|
+
isActive: (editor) => editor.isActive("heading", { level: 2 })
|
|
50
|
+
},
|
|
51
|
+
heading3: {
|
|
52
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Heading3, { className: "h-4 w-4" }),
|
|
53
|
+
tooltip: "Heading 3",
|
|
54
|
+
onClick: (editor) => editor.chain().focus().toggleHeading({ level: 3 }).run(),
|
|
55
|
+
isActive: (editor) => editor.isActive("heading", { level: 3 })
|
|
56
|
+
},
|
|
57
|
+
bulletList: {
|
|
58
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.List, { className: "h-4 w-4" }),
|
|
59
|
+
tooltip: "Bullet List",
|
|
60
|
+
onClick: (editor) => editor.chain().focus().toggleBulletList().run(),
|
|
61
|
+
isActive: (editor) => editor.isActive("bulletList")
|
|
62
|
+
},
|
|
63
|
+
orderedList: {
|
|
64
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ListOrdered, { className: "h-4 w-4" }),
|
|
65
|
+
tooltip: "Ordered List",
|
|
66
|
+
onClick: (editor) => editor.chain().focus().toggleOrderedList().run(),
|
|
67
|
+
isActive: (editor) => editor.isActive("orderedList")
|
|
68
|
+
},
|
|
69
|
+
blockquote: {
|
|
70
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Quote, { className: "h-4 w-4" }),
|
|
71
|
+
tooltip: "Blockquote",
|
|
72
|
+
onClick: (editor) => editor.chain().focus().toggleBlockquote().run(),
|
|
73
|
+
isActive: (editor) => editor.isActive("blockquote")
|
|
74
|
+
},
|
|
75
|
+
codeBlock: {
|
|
76
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Code2, { className: "h-4 w-4" }),
|
|
77
|
+
tooltip: "Code Block",
|
|
78
|
+
onClick: (editor) => editor.chain().focus().toggleCodeBlock().run(),
|
|
79
|
+
isActive: (editor) => editor.isActive("codeBlock")
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
//#endregion
|
|
84
|
+
exports.predefinedToolbarOptions = predefinedToolbarOptions;
|
|
@@ -1 +1,81 @@
|
|
|
1
|
-
import{Bold
|
|
1
|
+
import { Bold, Code, Code2, Heading1, Heading2, Heading3, Italic, List, ListOrdered, Quote, Strikethrough, Underline } from "lucide-react";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/rich-text-editor/predefined-toolbar-options.tsx
|
|
5
|
+
const predefinedToolbarOptions = {
|
|
6
|
+
bold: {
|
|
7
|
+
icon: /* @__PURE__ */ jsx(Bold, { className: "h-4 w-4" }),
|
|
8
|
+
tooltip: "Bold",
|
|
9
|
+
onClick: (editor) => editor.chain().focus().toggleBold().run(),
|
|
10
|
+
isActive: (editor) => editor.isActive("bold")
|
|
11
|
+
},
|
|
12
|
+
italic: {
|
|
13
|
+
icon: /* @__PURE__ */ jsx(Italic, { className: "h-4 w-4" }),
|
|
14
|
+
tooltip: "Italic",
|
|
15
|
+
onClick: (editor) => editor.chain().focus().toggleItalic().run(),
|
|
16
|
+
isActive: (editor) => editor.isActive("italic")
|
|
17
|
+
},
|
|
18
|
+
underline: {
|
|
19
|
+
icon: /* @__PURE__ */ jsx(Underline, { className: "h-4 w-4" }),
|
|
20
|
+
tooltip: "Underline",
|
|
21
|
+
onClick: (editor) => editor.chain().focus().toggleUnderline().run(),
|
|
22
|
+
isActive: (editor) => editor.isActive("underline")
|
|
23
|
+
},
|
|
24
|
+
strike: {
|
|
25
|
+
icon: /* @__PURE__ */ jsx(Strikethrough, { className: "h-4 w-4" }),
|
|
26
|
+
tooltip: "Strikethrough",
|
|
27
|
+
onClick: (editor) => editor.chain().focus().toggleStrike().run(),
|
|
28
|
+
isActive: (editor) => editor.isActive("strike")
|
|
29
|
+
},
|
|
30
|
+
code: {
|
|
31
|
+
icon: /* @__PURE__ */ jsx(Code, { className: "h-4 w-4" }),
|
|
32
|
+
tooltip: "Inline Code",
|
|
33
|
+
onClick: (editor) => editor.chain().focus().toggleCode().run(),
|
|
34
|
+
isActive: (editor) => editor.isActive("code")
|
|
35
|
+
},
|
|
36
|
+
heading1: {
|
|
37
|
+
icon: /* @__PURE__ */ jsx(Heading1, { className: "h-4 w-4" }),
|
|
38
|
+
tooltip: "Heading 1",
|
|
39
|
+
onClick: (editor) => editor.chain().focus().toggleHeading({ level: 1 }).run(),
|
|
40
|
+
isActive: (editor) => editor.isActive("heading", { level: 1 })
|
|
41
|
+
},
|
|
42
|
+
heading2: {
|
|
43
|
+
icon: /* @__PURE__ */ jsx(Heading2, { className: "h-4 w-4" }),
|
|
44
|
+
tooltip: "Heading 2",
|
|
45
|
+
onClick: (editor) => editor.chain().focus().toggleHeading({ level: 2 }).run(),
|
|
46
|
+
isActive: (editor) => editor.isActive("heading", { level: 2 })
|
|
47
|
+
},
|
|
48
|
+
heading3: {
|
|
49
|
+
icon: /* @__PURE__ */ jsx(Heading3, { className: "h-4 w-4" }),
|
|
50
|
+
tooltip: "Heading 3",
|
|
51
|
+
onClick: (editor) => editor.chain().focus().toggleHeading({ level: 3 }).run(),
|
|
52
|
+
isActive: (editor) => editor.isActive("heading", { level: 3 })
|
|
53
|
+
},
|
|
54
|
+
bulletList: {
|
|
55
|
+
icon: /* @__PURE__ */ jsx(List, { className: "h-4 w-4" }),
|
|
56
|
+
tooltip: "Bullet List",
|
|
57
|
+
onClick: (editor) => editor.chain().focus().toggleBulletList().run(),
|
|
58
|
+
isActive: (editor) => editor.isActive("bulletList")
|
|
59
|
+
},
|
|
60
|
+
orderedList: {
|
|
61
|
+
icon: /* @__PURE__ */ jsx(ListOrdered, { className: "h-4 w-4" }),
|
|
62
|
+
tooltip: "Ordered List",
|
|
63
|
+
onClick: (editor) => editor.chain().focus().toggleOrderedList().run(),
|
|
64
|
+
isActive: (editor) => editor.isActive("orderedList")
|
|
65
|
+
},
|
|
66
|
+
blockquote: {
|
|
67
|
+
icon: /* @__PURE__ */ jsx(Quote, { className: "h-4 w-4" }),
|
|
68
|
+
tooltip: "Blockquote",
|
|
69
|
+
onClick: (editor) => editor.chain().focus().toggleBlockquote().run(),
|
|
70
|
+
isActive: (editor) => editor.isActive("blockquote")
|
|
71
|
+
},
|
|
72
|
+
codeBlock: {
|
|
73
|
+
icon: /* @__PURE__ */ jsx(Code2, { className: "h-4 w-4" }),
|
|
74
|
+
tooltip: "Code Block",
|
|
75
|
+
onClick: (editor) => editor.chain().focus().toggleCodeBlock().run(),
|
|
76
|
+
isActive: (editor) => editor.isActive("codeBlock")
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
//#endregion
|
|
81
|
+
export { predefinedToolbarOptions };
|
package/dist/spinner/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_spinner = require('./spinner.cjs');
|
package/dist/spinner/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Spinner
|
|
1
|
+
import { Spinner } from "./spinner.js";
|
package/dist/spinner/spinner.cjs
CHANGED
|
@@ -1,7 +1,74 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_styles = require('./styles.cjs');
|
|
3
|
+
let react = require("react");
|
|
4
|
+
react = require_rolldown_runtime.__toESM(react);
|
|
5
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
6
|
+
react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
7
|
+
|
|
8
|
+
//#region src/spinner/spinner.tsx
|
|
9
|
+
const SpinnerSize = {
|
|
10
|
+
sm: 24,
|
|
11
|
+
md: 40,
|
|
12
|
+
lg: 64,
|
|
13
|
+
xl: 96
|
|
14
|
+
};
|
|
15
|
+
const DEFAULT_SIZE = 40;
|
|
16
|
+
const MIN_STROKE_WIDTH = 2;
|
|
17
|
+
const STROKE_WIDTH_RATIO = .1;
|
|
18
|
+
const DEFAULT_SPEED = 2;
|
|
19
|
+
const DEFAULT_COLOR = "currentColor";
|
|
20
|
+
const VIEWBOX_STROKE_REF = 40;
|
|
21
|
+
const PERCENT_MULTIPLIER = 100;
|
|
22
|
+
let spinnerIdCounter = 0;
|
|
23
|
+
const Spinner = ({ size: sizeProp = DEFAULT_SIZE, strokeWidth: strokeWidthProp, speed = DEFAULT_SPEED, color = DEFAULT_COLOR, colors, className = "" }) => {
|
|
24
|
+
const size = typeof sizeProp === "string" ? SpinnerSize[sizeProp] : sizeProp;
|
|
25
|
+
const strokeWidth = strokeWidthProp ?? Math.max(MIN_STROKE_WIDTH, Math.round(size * STROKE_WIDTH_RATIO));
|
|
26
|
+
const uniqueId = (0, react.useMemo)(() => `spinner-${++spinnerIdCounter}-${Date.now()}`, []);
|
|
27
|
+
const viewBoxStrokeWidth = strokeWidth / size * VIEWBOX_STROKE_REF;
|
|
28
|
+
const CIRCLE_RADIUS = 20;
|
|
29
|
+
const getColorAnimationId = () => {
|
|
30
|
+
if (!colors || colors.length === 0) return "";
|
|
31
|
+
return `${uniqueId}-color-change`;
|
|
32
|
+
};
|
|
33
|
+
const getColorAnimationKeyframes = () => {
|
|
34
|
+
if (!colors || colors.length === 0) return "";
|
|
35
|
+
const keyframes = colors.map((c, i) => {
|
|
36
|
+
return `${i / colors.length * PERCENT_MULTIPLIER}% { stroke: ${c}; }`;
|
|
37
|
+
}).join("\n");
|
|
38
|
+
return `
|
|
39
|
+
@keyframes ${getColorAnimationId()} {
|
|
40
|
+
${keyframes}
|
|
41
|
+
100% { stroke: ${colors[0]}; }
|
|
6
42
|
}
|
|
7
|
-
|
|
43
|
+
`;
|
|
44
|
+
};
|
|
45
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("style", { children: [require_styles.getGlobalStyles({
|
|
46
|
+
uniqueId,
|
|
47
|
+
speed,
|
|
48
|
+
size,
|
|
49
|
+
colors,
|
|
50
|
+
color,
|
|
51
|
+
strokeWidth
|
|
52
|
+
}), colors && colors.length > 0 && getColorAnimationKeyframes()] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
53
|
+
className: `${uniqueId}-loader ${className}`,
|
|
54
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", {
|
|
55
|
+
className: `${uniqueId}-circular`,
|
|
56
|
+
viewBox: "25 25 50 50",
|
|
57
|
+
width: "100%",
|
|
58
|
+
height: "100%",
|
|
59
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("circle", {
|
|
60
|
+
className: `${uniqueId}-path`,
|
|
61
|
+
cx: 50,
|
|
62
|
+
cy: 50,
|
|
63
|
+
r: CIRCLE_RADIUS,
|
|
64
|
+
fill: "none",
|
|
65
|
+
strokeWidth: viewBoxStrokeWidth,
|
|
66
|
+
strokeMiterlimit: "10"
|
|
67
|
+
})
|
|
68
|
+
})
|
|
69
|
+
})] });
|
|
70
|
+
};
|
|
71
|
+
Spinner.displayName = "Spinner";
|
|
72
|
+
|
|
73
|
+
//#endregion
|
|
74
|
+
exports.Spinner = Spinner;
|
package/dist/spinner/spinner.js
CHANGED
|
@@ -1,7 +1,71 @@
|
|
|
1
|
-
import{getGlobalStyles
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { getGlobalStyles } from "./styles.js";
|
|
2
|
+
import React, { useMemo } from "react";
|
|
3
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region src/spinner/spinner.tsx
|
|
6
|
+
const SpinnerSize = {
|
|
7
|
+
sm: 24,
|
|
8
|
+
md: 40,
|
|
9
|
+
lg: 64,
|
|
10
|
+
xl: 96
|
|
11
|
+
};
|
|
12
|
+
const DEFAULT_SIZE = 40;
|
|
13
|
+
const MIN_STROKE_WIDTH = 2;
|
|
14
|
+
const STROKE_WIDTH_RATIO = .1;
|
|
15
|
+
const DEFAULT_SPEED = 2;
|
|
16
|
+
const DEFAULT_COLOR = "currentColor";
|
|
17
|
+
const VIEWBOX_STROKE_REF = 40;
|
|
18
|
+
const PERCENT_MULTIPLIER = 100;
|
|
19
|
+
let spinnerIdCounter = 0;
|
|
20
|
+
const Spinner = ({ size: sizeProp = DEFAULT_SIZE, strokeWidth: strokeWidthProp, speed = DEFAULT_SPEED, color = DEFAULT_COLOR, colors, className = "" }) => {
|
|
21
|
+
const size = typeof sizeProp === "string" ? SpinnerSize[sizeProp] : sizeProp;
|
|
22
|
+
const strokeWidth = strokeWidthProp ?? Math.max(MIN_STROKE_WIDTH, Math.round(size * STROKE_WIDTH_RATIO));
|
|
23
|
+
const uniqueId = useMemo(() => `spinner-${++spinnerIdCounter}-${Date.now()}`, []);
|
|
24
|
+
const viewBoxStrokeWidth = strokeWidth / size * VIEWBOX_STROKE_REF;
|
|
25
|
+
const CIRCLE_RADIUS = 20;
|
|
26
|
+
const getColorAnimationId = () => {
|
|
27
|
+
if (!colors || colors.length === 0) return "";
|
|
28
|
+
return `${uniqueId}-color-change`;
|
|
29
|
+
};
|
|
30
|
+
const getColorAnimationKeyframes = () => {
|
|
31
|
+
if (!colors || colors.length === 0) return "";
|
|
32
|
+
const keyframes = colors.map((c, i) => {
|
|
33
|
+
return `${i / colors.length * PERCENT_MULTIPLIER}% { stroke: ${c}; }`;
|
|
34
|
+
}).join("\n");
|
|
35
|
+
return `
|
|
36
|
+
@keyframes ${getColorAnimationId()} {
|
|
37
|
+
${keyframes}
|
|
38
|
+
100% { stroke: ${colors[0]}; }
|
|
6
39
|
}
|
|
7
|
-
|
|
40
|
+
`;
|
|
41
|
+
};
|
|
42
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("style", { children: [getGlobalStyles({
|
|
43
|
+
uniqueId,
|
|
44
|
+
speed,
|
|
45
|
+
size,
|
|
46
|
+
colors,
|
|
47
|
+
color,
|
|
48
|
+
strokeWidth
|
|
49
|
+
}), colors && colors.length > 0 && getColorAnimationKeyframes()] }), /* @__PURE__ */ jsx("div", {
|
|
50
|
+
className: `${uniqueId}-loader ${className}`,
|
|
51
|
+
children: /* @__PURE__ */ jsx("svg", {
|
|
52
|
+
className: `${uniqueId}-circular`,
|
|
53
|
+
viewBox: "25 25 50 50",
|
|
54
|
+
width: "100%",
|
|
55
|
+
height: "100%",
|
|
56
|
+
children: /* @__PURE__ */ jsx("circle", {
|
|
57
|
+
className: `${uniqueId}-path`,
|
|
58
|
+
cx: 50,
|
|
59
|
+
cy: 50,
|
|
60
|
+
r: CIRCLE_RADIUS,
|
|
61
|
+
fill: "none",
|
|
62
|
+
strokeWidth: viewBoxStrokeWidth,
|
|
63
|
+
strokeMiterlimit: "10"
|
|
64
|
+
})
|
|
65
|
+
})
|
|
66
|
+
})] });
|
|
67
|
+
};
|
|
68
|
+
Spinner.displayName = "Spinner";
|
|
69
|
+
|
|
70
|
+
//#endregion
|
|
71
|
+
export { Spinner };
|
package/dist/spinner/styles.cjs
CHANGED
|
@@ -1,11 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
|
|
2
|
+
//#region src/spinner/styles.ts
|
|
3
|
+
function getGlobalStyles(options) {
|
|
4
|
+
const { uniqueId, speed = 2, size, colors, color } = options;
|
|
5
|
+
const getColorAnimationId = () => {
|
|
6
|
+
if (!colors || colors.length === 0) return "";
|
|
7
|
+
return `${uniqueId}-color-change`;
|
|
8
|
+
};
|
|
9
|
+
return `
|
|
10
|
+
@keyframes ${uniqueId}-rotate {
|
|
3
11
|
100% {
|
|
4
12
|
transform: rotate(360deg);
|
|
5
13
|
}
|
|
6
14
|
}
|
|
7
15
|
|
|
8
|
-
@keyframes ${
|
|
16
|
+
@keyframes ${uniqueId}-dash {
|
|
9
17
|
0% {
|
|
10
18
|
stroke-dasharray: 1, 200;
|
|
11
19
|
stroke-dashoffset: 0;
|
|
@@ -20,27 +28,31 @@ const e=require(`../_virtual/rolldown_runtime.cjs`);function t(e){let{uniqueId:t
|
|
|
20
28
|
}
|
|
21
29
|
}
|
|
22
30
|
|
|
23
|
-
.${
|
|
31
|
+
.${uniqueId}-loader {
|
|
24
32
|
position: relative;
|
|
25
33
|
display: inline-block;
|
|
26
|
-
width: ${
|
|
27
|
-
height: ${
|
|
34
|
+
width: ${size}px;
|
|
35
|
+
height: ${size}px;
|
|
28
36
|
overflow: hidden;
|
|
29
37
|
}
|
|
30
38
|
|
|
31
|
-
.${
|
|
32
|
-
animation: ${
|
|
39
|
+
.${uniqueId}-circular {
|
|
40
|
+
animation: ${uniqueId}-rotate ${speed}s linear infinite;
|
|
33
41
|
height: 100%;
|
|
34
42
|
width: 100%;
|
|
35
43
|
max-height: 100%;
|
|
36
44
|
max-width: 100%;
|
|
37
45
|
}
|
|
38
46
|
|
|
39
|
-
.${
|
|
40
|
-
stroke: ${
|
|
47
|
+
.${uniqueId}-path {
|
|
48
|
+
stroke: ${colors && colors.length > 0 ? colors[0] : color};
|
|
41
49
|
stroke-dasharray: 1, 200;
|
|
42
50
|
stroke-dashoffset: 0;
|
|
43
|
-
animation: ${
|
|
51
|
+
animation: ${colors && colors.length > 0 ? `${uniqueId}-dash 1.5s ease-in-out infinite, ${getColorAnimationId()} ${speed * colors.length}s ease-in-out infinite` : `${uniqueId}-dash 1.5s ease-in-out infinite`};
|
|
44
52
|
stroke-linecap: round;
|
|
45
53
|
}
|
|
46
|
-
|
|
54
|
+
`;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
//#endregion
|
|
58
|
+
exports.getGlobalStyles = getGlobalStyles;
|
package/dist/spinner/styles.js
CHANGED
|
@@ -1,11 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
//#region src/spinner/styles.ts
|
|
2
|
+
function getGlobalStyles(options) {
|
|
3
|
+
const { uniqueId, speed = 2, size, colors, color } = options;
|
|
4
|
+
const getColorAnimationId = () => {
|
|
5
|
+
if (!colors || colors.length === 0) return "";
|
|
6
|
+
return `${uniqueId}-color-change`;
|
|
7
|
+
};
|
|
8
|
+
return `
|
|
9
|
+
@keyframes ${uniqueId}-rotate {
|
|
3
10
|
100% {
|
|
4
11
|
transform: rotate(360deg);
|
|
5
12
|
}
|
|
6
13
|
}
|
|
7
14
|
|
|
8
|
-
@keyframes ${
|
|
15
|
+
@keyframes ${uniqueId}-dash {
|
|
9
16
|
0% {
|
|
10
17
|
stroke-dasharray: 1, 200;
|
|
11
18
|
stroke-dashoffset: 0;
|
|
@@ -20,27 +27,31 @@ function e(e){let{uniqueId:t,speed:n=2,size:r,colors:i,color:a}=e;return`
|
|
|
20
27
|
}
|
|
21
28
|
}
|
|
22
29
|
|
|
23
|
-
.${
|
|
30
|
+
.${uniqueId}-loader {
|
|
24
31
|
position: relative;
|
|
25
32
|
display: inline-block;
|
|
26
|
-
width: ${
|
|
27
|
-
height: ${
|
|
33
|
+
width: ${size}px;
|
|
34
|
+
height: ${size}px;
|
|
28
35
|
overflow: hidden;
|
|
29
36
|
}
|
|
30
37
|
|
|
31
|
-
.${
|
|
32
|
-
animation: ${
|
|
38
|
+
.${uniqueId}-circular {
|
|
39
|
+
animation: ${uniqueId}-rotate ${speed}s linear infinite;
|
|
33
40
|
height: 100%;
|
|
34
41
|
width: 100%;
|
|
35
42
|
max-height: 100%;
|
|
36
43
|
max-width: 100%;
|
|
37
44
|
}
|
|
38
45
|
|
|
39
|
-
.${
|
|
40
|
-
stroke: ${
|
|
46
|
+
.${uniqueId}-path {
|
|
47
|
+
stroke: ${colors && colors.length > 0 ? colors[0] : color};
|
|
41
48
|
stroke-dasharray: 1, 200;
|
|
42
49
|
stroke-dashoffset: 0;
|
|
43
|
-
animation: ${
|
|
50
|
+
animation: ${colors && colors.length > 0 ? `${uniqueId}-dash 1.5s ease-in-out infinite, ${getColorAnimationId()} ${speed * colors.length}s ease-in-out infinite` : `${uniqueId}-dash 1.5s ease-in-out infinite`};
|
|
44
51
|
stroke-linecap: round;
|
|
45
52
|
}
|
|
46
|
-
|
|
53
|
+
`;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
//#endregion
|
|
57
|
+
export { getGlobalStyles };
|