@devalok/shilp-sutra 0.38.0 → 0.40.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/AGENTS.md +151 -0
- package/MIGRATION.md +255 -0
- package/README.md +3 -0
- package/dist/_chunks/badge-group.js +76 -75
- package/dist/_chunks/badge-group.js.map +1 -1
- package/dist/_chunks/chart-container.js +50 -0
- package/dist/_chunks/chart-container.js.map +1 -0
- package/dist/_chunks/chat.js +236 -228
- package/dist/_chunks/chat.js.map +1 -1
- package/dist/_chunks/colors.js +30 -0
- package/dist/_chunks/colors.js.map +1 -0
- package/dist/_chunks/document-preview.js +2 -2
- package/dist/_chunks/document-preview.js.map +1 -1
- package/dist/_chunks/emoji-data.js +45 -0
- package/dist/_chunks/emoji-data.js.map +1 -0
- package/dist/_chunks/grid-lines.js +72 -0
- package/dist/_chunks/grid-lines.js.map +1 -0
- package/dist/_chunks/image-preview.js +2 -2
- package/dist/_chunks/image-preview.js.map +1 -1
- package/dist/_chunks/mention-suggestion.js +35 -263
- package/dist/_chunks/mention-suggestion.js.map +1 -1
- package/dist/_chunks/normalize-icon.js +18 -0
- package/dist/_chunks/normalize-icon.js.map +1 -0
- package/dist/_chunks/oauth-button.js +227 -0
- package/dist/_chunks/oauth-button.js.map +1 -0
- package/dist/_chunks/popover.js +3 -3
- package/dist/_chunks/popover.js.map +1 -1
- package/dist/_chunks/primitives.js +107 -107
- package/dist/_chunks/primitives.js.map +1 -1
- package/dist/_chunks/shared.js +5 -5
- package/dist/_chunks/shared.js.map +1 -1
- package/dist/_chunks/{text.js → success.js} +26 -63
- package/dist/_chunks/success.js.map +1 -0
- package/dist/_chunks/tiptap.js +1952 -1949
- package/dist/_chunks/tiptap.js.map +1 -1
- package/dist/_chunks/tooltip.js +58 -0
- package/dist/_chunks/tooltip.js.map +1 -0
- package/dist/_chunks/tree-view.js +101 -96
- package/dist/_chunks/tree-view.js.map +1 -1
- package/dist/_chunks/use-calendar.js +5 -5
- package/dist/_chunks/use-calendar.js.map +1 -1
- package/dist/ai/ai-command-provider.d.ts +3 -2
- package/dist/ai/ai-command-provider.d.ts.map +1 -1
- package/dist/ai/ai-command-provider.js.map +1 -1
- package/dist/ai/block-renderer.js +11 -9
- package/dist/ai/block-renderer.js.map +1 -1
- package/dist/ai/blocks/error.js +31 -0
- package/dist/ai/blocks/error.js.map +1 -0
- package/dist/ai/blocks/index.d.ts +0 -2
- package/dist/ai/blocks/index.d.ts.map +1 -1
- package/dist/ai/blocks/index.js +2 -2
- package/dist/ai/blocks/text.js +19 -0
- package/dist/ai/blocks/text.js.map +1 -0
- package/dist/ai/command-bar.d.ts.map +1 -1
- package/dist/ai/command-bar.js +198 -193
- package/dist/ai/command-bar.js.map +1 -1
- package/dist/ai/conversation.d.ts +2 -1
- package/dist/ai/conversation.d.ts.map +1 -1
- package/dist/ai/conversation.js +92 -87
- package/dist/ai/conversation.js.map +1 -1
- package/dist/ai/index.d.ts +0 -4
- package/dist/ai/index.d.ts.map +1 -1
- package/dist/ai/index.js +45 -46
- package/dist/ai/index.js.map +1 -1
- package/dist/composed/activity-feed.d.ts +2 -1
- package/dist/composed/activity-feed.d.ts.map +1 -1
- package/dist/composed/activity-feed.js +5 -5
- package/dist/composed/activity-feed.js.map +1 -1
- package/dist/composed/avatar-group.js +4 -4
- package/dist/composed/avatar-group.js.map +1 -1
- package/dist/composed/bulk-action-bar.d.ts +2 -2
- package/dist/composed/bulk-action-bar.d.ts.map +1 -1
- package/dist/composed/bulk-action-bar.js +12 -12
- package/dist/composed/bulk-action-bar.js.map +1 -1
- package/dist/composed/command-palette.d.ts +2 -1
- package/dist/composed/command-palette.d.ts.map +1 -1
- package/dist/composed/command-palette.js +106 -101
- package/dist/composed/command-palette.js.map +1 -1
- package/dist/composed/content-card.js +1 -1
- package/dist/composed/content-card.js.map +1 -1
- package/dist/composed/date-picker/index.js +747 -3
- package/dist/composed/date-picker/index.js.map +1 -0
- package/dist/composed/emoji-picker.js +4 -4
- package/dist/composed/emoji-picker.js.map +1 -1
- package/dist/composed/empty-state.d.ts +3 -3
- package/dist/composed/empty-state.d.ts.map +1 -1
- package/dist/composed/empty-state.js +40 -31
- package/dist/composed/empty-state.js.map +1 -1
- package/dist/composed/error-boundary.js +3 -3
- package/dist/composed/error-boundary.js.map +1 -1
- package/dist/composed/extensions/emoji-node.js +81 -0
- package/dist/composed/extensions/emoji-node.js.map +1 -0
- package/dist/composed/extensions/emoji-suggestion.js +117 -0
- package/dist/composed/extensions/emoji-suggestion.js.map +1 -0
- package/dist/composed/file-preview.js +498 -2
- package/dist/composed/file-preview.js.map +1 -0
- package/dist/composed/filter-bar.js +1 -1
- package/dist/composed/filter-bar.js.map +1 -1
- package/dist/composed/index.d.ts +0 -15
- package/dist/composed/index.d.ts.map +1 -1
- package/dist/composed/index.js +16 -24
- package/dist/composed/inline-edit.js +1 -1
- package/dist/composed/inline-edit.js.map +1 -1
- package/dist/composed/loading-skeleton.js +9 -9
- package/dist/composed/loading-skeleton.js.map +1 -1
- package/dist/composed/markdown-viewer.js +3 -3
- package/dist/composed/markdown-viewer.js.map +1 -1
- package/dist/composed/multi-select-popover.js +1 -1
- package/dist/composed/multi-select-popover.js.map +1 -1
- package/dist/composed/page-header.js +1 -1
- package/dist/composed/page-header.js.map +1 -1
- package/dist/composed/page-skeletons.js +15 -15
- package/dist/composed/page-skeletons.js.map +1 -1
- package/dist/composed/priority-indicator.js +3 -3
- package/dist/composed/priority-indicator.js.map +1 -1
- package/dist/composed/rich-chat-input.js +2073 -2
- package/dist/composed/rich-chat-input.js.map +1 -0
- package/dist/composed/rich-text-editor.js +75 -72
- package/dist/composed/rich-text-editor.js.map +1 -1
- package/dist/composed/schedule-view.js +3 -3
- package/dist/composed/schedule-view.js.map +1 -1
- package/dist/composed/status-badge.d.ts +3 -2
- package/dist/composed/status-badge.d.ts.map +1 -1
- package/dist/composed/status-badge.js +58 -53
- package/dist/composed/status-badge.js.map +1 -1
- package/dist/shell/app-command-palette.d.ts +2 -1
- package/dist/shell/app-command-palette.d.ts.map +1 -1
- package/dist/shell/app-command-palette.js.map +1 -1
- package/dist/shell/bottom-navbar.d.ts +3 -1
- package/dist/shell/bottom-navbar.d.ts.map +1 -1
- package/dist/shell/bottom-navbar.js +94 -86
- package/dist/shell/bottom-navbar.js.map +1 -1
- package/dist/shell/command-registry.d.ts +2 -1
- package/dist/shell/command-registry.d.ts.map +1 -1
- package/dist/shell/command-registry.js.map +1 -1
- package/dist/shell/notification-center.js +8 -8
- package/dist/shell/notification-center.js.map +1 -1
- package/dist/shell/notification-preferences.js +1 -1
- package/dist/shell/notification-preferences.js.map +1 -1
- package/dist/shell/sidebar.d.ts +7 -4
- package/dist/shell/sidebar.d.ts.map +1 -1
- package/dist/shell/sidebar.js +148 -134
- package/dist/shell/sidebar.js.map +1 -1
- package/dist/shell/top-bar.d.ts +4 -3
- package/dist/shell/top-bar.d.ts.map +1 -1
- package/dist/shell/top-bar.js +116 -108
- package/dist/shell/top-bar.js.map +1 -1
- package/dist/tokens/semantic.css +82 -9
- package/dist/ui/accordion.js +1 -1
- package/dist/ui/accordion.js.map +1 -1
- package/dist/ui/alert-dialog.js +3 -3
- package/dist/ui/alert-dialog.js.map +1 -1
- package/dist/ui/alert.js +2 -2
- package/dist/ui/alert.js.map +1 -1
- package/dist/ui/autocomplete.js +2 -2
- package/dist/ui/autocomplete.js.map +1 -1
- package/dist/ui/avatar.js +11 -11
- package/dist/ui/avatar.js.map +1 -1
- package/dist/ui/badge-indicator.js +1 -1
- package/dist/ui/badge-indicator.js.map +1 -1
- package/dist/ui/badge.d.ts +3 -2
- package/dist/ui/badge.d.ts.map +1 -1
- package/dist/ui/banner.js +1 -1
- package/dist/ui/banner.js.map +1 -1
- package/dist/ui/breadcrumb.js +1 -1
- package/dist/ui/breadcrumb.js.map +1 -1
- package/dist/ui/button.d.ts +5 -4
- package/dist/ui/button.d.ts.map +1 -1
- package/dist/ui/button.js +66 -65
- package/dist/ui/button.js.map +1 -1
- package/dist/ui/card.js +5 -5
- package/dist/ui/card.js.map +1 -1
- package/dist/ui/charts/area-chart.js +177 -0
- package/dist/ui/charts/area-chart.js.map +1 -0
- package/dist/ui/charts/bar-chart.js +127 -0
- package/dist/ui/charts/bar-chart.js.map +1 -0
- package/dist/ui/charts/chart-container.js +3 -0
- package/dist/ui/charts/gauge-chart.js +72 -0
- package/dist/ui/charts/gauge-chart.js.map +1 -0
- package/dist/ui/charts/index.js +10 -1035
- package/dist/ui/charts/line-chart.js +135 -0
- package/dist/ui/charts/line-chart.js.map +1 -0
- package/dist/ui/charts/pie-chart.js +111 -0
- package/dist/ui/charts/pie-chart.js.map +1 -0
- package/dist/ui/charts/radar-chart.js +170 -0
- package/dist/ui/charts/radar-chart.js.map +1 -0
- package/dist/ui/charts/sparkline.js +119 -0
- package/dist/ui/charts/sparkline.js.map +1 -0
- package/dist/ui/chat/message.d.ts +3 -3
- package/dist/ui/chat/message.d.ts.map +1 -1
- package/dist/ui/chat/system-message.d.ts +2 -1
- package/dist/ui/chat/system-message.d.ts.map +1 -1
- package/dist/ui/checkbox.js +1 -1
- package/dist/ui/checkbox.js.map +1 -1
- package/dist/ui/code.js +2 -2
- package/dist/ui/code.js.map +1 -1
- package/dist/ui/color-input.js +10 -10
- package/dist/ui/color-input.js.map +1 -1
- package/dist/ui/color-swatch.js +3 -3
- package/dist/ui/color-swatch.js.map +1 -1
- package/dist/ui/combobox.d.ts +2 -1
- package/dist/ui/combobox.d.ts.map +1 -1
- package/dist/ui/combobox.js +100 -95
- package/dist/ui/combobox.js.map +1 -1
- package/dist/ui/container.d.ts +6 -1
- package/dist/ui/container.d.ts.map +1 -1
- package/dist/ui/container.js +2 -1
- package/dist/ui/container.js.map +1 -1
- package/dist/ui/context-menu.js +6 -6
- package/dist/ui/context-menu.js.map +1 -1
- package/dist/ui/data-table-body.js +1 -1
- package/dist/ui/data-table-body.js.map +1 -1
- package/dist/ui/data-table-bulk-actions.js +2 -2
- package/dist/ui/data-table-bulk-actions.js.map +1 -1
- package/dist/ui/data-table-card.js +2 -2
- package/dist/ui/data-table-card.js.map +1 -1
- package/dist/ui/data-table-header.js +2 -2
- package/dist/ui/data-table-header.js.map +1 -1
- package/dist/ui/data-table-pagination.js +3 -3
- package/dist/ui/data-table-pagination.js.map +1 -1
- package/dist/ui/data-table-toolbar.js +1 -1
- package/dist/ui/data-table-toolbar.js.map +1 -1
- package/dist/ui/data-table.js +1 -1
- package/dist/ui/data-table.js.map +1 -1
- package/dist/ui/devalok-grain.d.ts +1 -1
- package/dist/ui/devalok-grain.js.map +1 -1
- package/dist/ui/dialog.js +2 -2
- package/dist/ui/dialog.js.map +1 -1
- package/dist/ui/dropdown-menu.js +6 -6
- package/dist/ui/dropdown-menu.js.map +1 -1
- package/dist/ui/file-upload.js +4 -4
- package/dist/ui/file-upload.js.map +1 -1
- package/dist/ui/hover-card.js +1 -1
- package/dist/ui/hover-card.js.map +1 -1
- package/dist/ui/icon-button.d.ts +9 -2
- package/dist/ui/icon-button.d.ts.map +1 -1
- package/dist/ui/icon-button.js +14 -13
- package/dist/ui/icon-button.js.map +1 -1
- package/dist/ui/index.d.ts +1 -3
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/index.js +31 -33
- package/dist/ui/index.js.map +1 -1
- package/dist/ui/input-otp.js +1 -1
- package/dist/ui/input-otp.js.map +1 -1
- package/dist/ui/input.js +2 -2
- package/dist/ui/input.js.map +1 -1
- package/dist/ui/lib/icon-input.d.ts +42 -0
- package/dist/ui/lib/icon-input.d.ts.map +1 -0
- package/dist/ui/lib/normalize-icon.d.ts +39 -0
- package/dist/ui/lib/normalize-icon.d.ts.map +1 -0
- package/dist/ui/link.js +1 -1
- package/dist/ui/link.js.map +1 -1
- package/dist/ui/menubar.js +8 -8
- package/dist/ui/menubar.js.map +1 -1
- package/dist/ui/navigation-menu.js +3 -3
- package/dist/ui/navigation-menu.js.map +1 -1
- package/dist/ui/number-input.js +3 -3
- package/dist/ui/number-input.js.map +1 -1
- package/dist/ui/oauth-button/index.d.ts +3 -0
- package/dist/ui/oauth-button/index.d.ts.map +1 -0
- package/dist/ui/oauth-button/index.js +3 -0
- package/dist/ui/oauth-button/oauth-button.d.ts +208 -0
- package/dist/ui/oauth-button/oauth-button.d.ts.map +1 -0
- package/dist/ui/pagination.js +1 -1
- package/dist/ui/pagination.js.map +1 -1
- package/dist/ui/progress.js +2 -2
- package/dist/ui/progress.js.map +1 -1
- package/dist/ui/radio.js +1 -1
- package/dist/ui/radio.js.map +1 -1
- package/dist/ui/segmented-control.d.ts +3 -4
- package/dist/ui/segmented-control.d.ts.map +1 -1
- package/dist/ui/segmented-control.js +53 -45
- package/dist/ui/segmented-control.js.map +1 -1
- package/dist/ui/select.js +3 -3
- package/dist/ui/select.js.map +1 -1
- package/dist/ui/sheet.js +2 -2
- package/dist/ui/sheet.js.map +1 -1
- package/dist/ui/sidebar.js +11 -11
- package/dist/ui/sidebar.js.map +1 -1
- package/dist/ui/skeleton.js +9 -9
- package/dist/ui/skeleton.js.map +1 -1
- package/dist/ui/slider.js +2 -2
- package/dist/ui/slider.js.map +1 -1
- package/dist/ui/split-button.js +7 -7
- package/dist/ui/split-button.js.map +1 -1
- package/dist/ui/stack.d.ts +6 -1
- package/dist/ui/stack.d.ts.map +1 -1
- package/dist/ui/stack.js +2 -1
- package/dist/ui/stack.js.map +1 -1
- package/dist/ui/stat-card.d.ts +2 -3
- package/dist/ui/stat-card.d.ts.map +1 -1
- package/dist/ui/stat-card.js +118 -116
- package/dist/ui/stat-card.js.map +1 -1
- package/dist/ui/status-dot.js +2 -2
- package/dist/ui/status-dot.js.map +1 -1
- package/dist/ui/stepper.d.ts +2 -1
- package/dist/ui/stepper.d.ts.map +1 -1
- package/dist/ui/stepper.js +74 -69
- package/dist/ui/stepper.js.map +1 -1
- package/dist/ui/switch.js +2 -2
- package/dist/ui/switch.js.map +1 -1
- package/dist/ui/tabs.js +3 -3
- package/dist/ui/tabs.js.map +1 -1
- package/dist/ui/text.d.ts +7 -2
- package/dist/ui/text.d.ts.map +1 -1
- package/dist/ui/text.js +2 -1
- package/dist/ui/text.js.map +1 -1
- package/dist/ui/textarea.js +1 -1
- package/dist/ui/textarea.js.map +1 -1
- package/dist/ui/toast.js +8 -8
- package/dist/ui/toast.js.map +1 -1
- package/dist/ui/toaster.d.ts +11 -2
- package/dist/ui/toaster.d.ts.map +1 -1
- package/dist/ui/toaster.js.map +1 -1
- package/dist/ui/toggle.js +1 -1
- package/dist/ui/toggle.js.map +1 -1
- package/dist/ui/tooltip.js +12 -12
- package/dist/ui/tooltip.js.map +1 -1
- package/dist/ui/tree-view/tree-item.d.ts +3 -2
- package/dist/ui/tree-view/tree-item.d.ts.map +1 -1
- package/dist/ui/tree-view/use-tree.d.ts +2 -1
- package/dist/ui/tree-view/use-tree.d.ts.map +1 -1
- package/docs/components/_header.md +90 -1
- package/docs/components/ui/oauth-button.md +86 -0
- package/docs/recipes/customize-brand.md +100 -4
- package/docs/recipes/index.md +5 -1
- package/docs/recipes/install-astro.md +15 -0
- package/docs/recipes/install-next-app-router.md +21 -5
- package/docs/recipes/install-next-pages.md +2 -0
- package/docs/recipes/install-remix.md +15 -0
- package/docs/recipes/install-tanstack-start.md +15 -0
- package/docs/recipes/install-vite.md +15 -0
- package/docs/recipes/troubleshoot.md +22 -0
- package/llms-full.txt +177 -2
- package/llms-quick.txt +247 -0
- package/llms.txt +116 -3
- package/package.json +80 -2
- package/scripts/welcome.mjs +219 -0
- package/skill/README.md +99 -0
- package/skill/SKILL.md +163 -0
- package/skill/install.sh +59 -0
- package/skill/references/components-full.md +7083 -0
- package/skill/references/components.md +778 -0
- package/skill/references/customize-brand.md +314 -0
- package/skill/references/server-components.md +211 -0
- package/skill/references/setup-astro.md +195 -0
- package/skill/references/setup-next-app-router.md +248 -0
- package/skill/references/setup-next-pages.md +127 -0
- package/skill/references/setup-remix.md +188 -0
- package/skill/references/setup-tanstack-start.md +160 -0
- package/skill/references/setup-vite.md +187 -0
- package/skill/references/troubleshoot.md +241 -0
- package/dist/_chunks/date-picker.js +0 -748
- package/dist/_chunks/date-picker.js.map +0 -1
- package/dist/_chunks/file-preview.js +0 -499
- package/dist/_chunks/file-preview.js.map +0 -1
- package/dist/_chunks/rich-chat-input.js +0 -2071
- package/dist/_chunks/rich-chat-input.js.map +0 -1
- package/dist/_chunks/text.js.map +0 -1
- package/dist/ui/charts/index.js.map +0 -1
- /package/{LICENSE → skill/LICENSE} +0 -0
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn as e } from "../ui/lib/utils.js";
|
|
3
3
|
import { Icon as t } from "../ui/icon.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { a as n, c as r, d as i, f as a, h as o, l as s, m as c, n as l, r as u, t as d } from "../_chunks/tiptap.js";
|
|
5
|
+
import { useColorMode as f } from "../hooks/use-color-mode.js";
|
|
6
|
+
import { n as p, r as m } from "../_chunks/emoji-data.js";
|
|
7
|
+
import { EmojiNode as h } from "./extensions/emoji-node.js";
|
|
8
|
+
import { createEmojiSuggestion as g } from "./extensions/emoji-suggestion.js";
|
|
9
|
+
import { n as _, t as v } from "../_chunks/mention-suggestion.js";
|
|
7
10
|
import * as y from "react";
|
|
8
11
|
import { jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
9
12
|
import { IconAlignCenter as S, IconAlignLeft as C, IconAlignRight as w, IconArrowBackUp as T, IconArrowForwardUp as E, IconBlockquote as D, IconBold as O, IconCode as k, IconH2 as A, IconH3 as j, IconHighlight as M, IconItalic as N, IconLineDashed as P, IconLink as F, IconList as I, IconListCheck as L, IconListNumbers as R, IconMoodSmile as z, IconPaperclip as B, IconPhoto as V, IconStrikethrough as H, IconUnderline as U } from "@tabler/icons-react";
|
|
@@ -17,15 +20,15 @@ var W = [
|
|
|
17
20
|
"[&_ul]:ml-ds-05 [&_ul]:list-disc [&_ol]:ml-ds-05 [&_ol]:list-decimal",
|
|
18
21
|
"[&_li]:text-surface-fg-muted",
|
|
19
22
|
"[&_code]:rounded [&_code]:bg-surface-raised [&_code]:px-ds-02b [&_code]:py-ds-01 [&_code]:text-ds-md [&_code]:text-accent-11",
|
|
20
|
-
"[&_pre]:rounded-
|
|
23
|
+
"[&_pre]:rounded-surface [&_pre]:bg-surface-raised [&_pre]:p-ds-04",
|
|
21
24
|
"[&_strong]:font-semibold [&_strong]:text-surface-fg",
|
|
22
25
|
"[&_blockquote]:border-l-[3px] [&_blockquote]:border-accent-6 [&_blockquote]:pl-ds-04 [&_blockquote]:italic [&_blockquote]:text-surface-fg-subtle",
|
|
23
26
|
"[&_mark]:rounded-xs [&_mark]:bg-warning-3 [&_mark]:px-[2px]",
|
|
24
27
|
"[&_ul[data-type=\"taskList\"]]:ml-0 [&_ul[data-type=\"taskList\"]]:list-none [&_li[data-type=\"taskItem\"]]:flex [&_li[data-type=\"taskItem\"]]:items-start [&_li[data-type=\"taskItem\"]]:gap-ds-02",
|
|
25
28
|
"[&_hr]:my-ds-04 [&_hr]:border-surface-border-strong",
|
|
26
29
|
"[&_a]:text-accent-11 [&_a]:underline [&_a]:decoration-accent-6 hover:[&_a]:decoration-accent-11",
|
|
27
|
-
"[&_img]:max-w-full [&_img]:rounded-
|
|
28
|
-
"[&_.mention]:rounded-
|
|
30
|
+
"[&_img]:max-w-full [&_img]:rounded-control [&_img]:my-ds-03",
|
|
31
|
+
"[&_.mention]:rounded-control-inner [&_.mention]:bg-accent-2 [&_.mention]:px-ds-02 [&_.mention]:py-[1px] [&_.mention]:font-medium [&_.mention]:text-accent-11"
|
|
29
32
|
];
|
|
30
33
|
function G({ onClick: t, isActive: n = !1, disabled: r = !1, title: i, children: a }) {
|
|
31
34
|
return /* @__PURE__ */ b("button", {
|
|
@@ -35,12 +38,12 @@ function G({ onClick: t, isActive: n = !1, disabled: r = !1, title: i, children:
|
|
|
35
38
|
title: i,
|
|
36
39
|
"aria-label": i,
|
|
37
40
|
"aria-pressed": n,
|
|
38
|
-
className: e("inline-flex h-ds-xs-plus w-ds-xs-plus items-center justify-center rounded-
|
|
41
|
+
className: e("inline-flex h-ds-xs-plus w-ds-xs-plus items-center justify-center rounded-control transition-colors duration-fast-01 ease-productive-standard", "hover:bg-surface-raised-hover", "disabled:pointer-events-none disabled:opacity-action-disabled", n ? "bg-surface-raised-hover text-accent-11" : "text-surface-fg-subtle"),
|
|
39
42
|
children: a
|
|
40
43
|
});
|
|
41
44
|
}
|
|
42
45
|
function K({ editor: e }) {
|
|
43
|
-
let [n, r] = y.useState(!1), [
|
|
46
|
+
let [n, r] = y.useState(!1), [i, a] = y.useState(""), o = y.useRef(null), { isLink: c } = s({
|
|
44
47
|
editor: e,
|
|
45
48
|
selector: ({ editor: e }) => ({ isLink: e.isActive("link") })
|
|
46
49
|
});
|
|
@@ -52,7 +55,7 @@ function K({ editor: e }) {
|
|
|
52
55
|
e.chain().focus().unsetLink().run();
|
|
53
56
|
return;
|
|
54
57
|
}
|
|
55
|
-
|
|
58
|
+
a(e.getAttributes("link").href || ""), r(!0), setTimeout(() => o.current?.focus(), 0);
|
|
56
59
|
},
|
|
57
60
|
isActive: c,
|
|
58
61
|
title: "Link",
|
|
@@ -62,23 +65,23 @@ function K({ editor: e }) {
|
|
|
62
65
|
})
|
|
63
66
|
}), n && /* @__PURE__ */ x("form", {
|
|
64
67
|
onSubmit: (t) => {
|
|
65
|
-
t.preventDefault(),
|
|
68
|
+
t.preventDefault(), i.trim() && e.chain().focus().setLink({ href: i.trim() }).run(), r(!1), a("");
|
|
66
69
|
},
|
|
67
70
|
"aria-label": "Edit link URL",
|
|
68
|
-
className: "absolute left-0 top-full z-popover mt-ds-01 flex items-center gap-ds-02 rounded-
|
|
71
|
+
className: "absolute left-0 top-full z-popover mt-ds-01 flex items-center gap-ds-02 rounded-control border border-surface-border-strong bg-surface-overlay p-ds-02 shadow-raised-hover",
|
|
69
72
|
children: [/* @__PURE__ */ b("input", {
|
|
70
|
-
ref:
|
|
73
|
+
ref: o,
|
|
71
74
|
type: "url",
|
|
72
|
-
value:
|
|
73
|
-
onChange: (e) =>
|
|
75
|
+
value: i,
|
|
76
|
+
onChange: (e) => a(e.target.value),
|
|
74
77
|
onKeyDown: (t) => {
|
|
75
|
-
t.key === "Escape" && (r(!1),
|
|
78
|
+
t.key === "Escape" && (r(!1), a(""), e.commands.focus());
|
|
76
79
|
},
|
|
77
80
|
placeholder: "https://...",
|
|
78
|
-
className: "h-ds-sm w-[240px] rounded-
|
|
81
|
+
className: "h-ds-sm w-[240px] rounded-control-inner border border-surface-border-strong bg-surface-overlay px-ds-03 text-ds-sm text-surface-fg focus:border-accent-7 focus:outline-hidden"
|
|
79
82
|
}), /* @__PURE__ */ b("button", {
|
|
80
83
|
type: "submit",
|
|
81
|
-
className: "h-ds-sm rounded-
|
|
84
|
+
className: "h-ds-sm rounded-control-inner bg-accent-9 px-ds-03 text-ds-sm text-accent-fg hover:bg-accent-10",
|
|
82
85
|
children: "Apply"
|
|
83
86
|
})]
|
|
84
87
|
})]
|
|
@@ -87,8 +90,8 @@ function K({ editor: e }) {
|
|
|
87
90
|
function q() {
|
|
88
91
|
return /* @__PURE__ */ b("div", { className: "mx-ds-02 h-[16px] w-px bg-surface-border" });
|
|
89
92
|
}
|
|
90
|
-
function J({ editor: e, toolbar: n, onImageClick: r, onFileClick:
|
|
91
|
-
let
|
|
93
|
+
function J({ editor: e, toolbar: n, onImageClick: r, onFileClick: i, onEmojiClick: a }) {
|
|
94
|
+
let o = s({
|
|
92
95
|
editor: e,
|
|
93
96
|
selector: ({ editor: e }) => ({
|
|
94
97
|
isBold: e.isActive("bold"),
|
|
@@ -110,7 +113,7 @@ function J({ editor: e, toolbar: n, onImageClick: r, onFileClick: a, onEmojiClic
|
|
|
110
113
|
canUndo: e.can().undo(),
|
|
111
114
|
canRedo: e.can().redo()
|
|
112
115
|
})
|
|
113
|
-
}), c = (e) => !n || n.includes(e), l = c("bold") || c("italic") || c("underline") || c("strike") || c("highlight"), u = c("h2") || c("h3") || c("blockquote"), d = c("bulletList") || c("orderedList") || c("taskList") || c("codeBlock"), f = c("link") || !!r && c("image") || !!
|
|
116
|
+
}), c = (e) => !n || n.includes(e), l = c("bold") || c("italic") || c("underline") || c("strike") || c("highlight"), u = c("h2") || c("h3") || c("blockquote"), d = c("bulletList") || c("orderedList") || c("taskList") || c("codeBlock"), f = c("link") || !!r && c("image") || !!i && c("file") || c("hr"), p = c("alignLeft") || c("alignCenter") || c("alignRight"), m = !!a && c("emoji"), h = c("undo") || c("redo");
|
|
114
117
|
return /* @__PURE__ */ x("div", {
|
|
115
118
|
role: "toolbar",
|
|
116
119
|
"aria-label": "Text formatting",
|
|
@@ -118,7 +121,7 @@ function J({ editor: e, toolbar: n, onImageClick: r, onFileClick: a, onEmojiClic
|
|
|
118
121
|
children: [
|
|
119
122
|
c("bold") && /* @__PURE__ */ b(G, {
|
|
120
123
|
onClick: () => e.chain().focus().toggleBold().run(),
|
|
121
|
-
isActive:
|
|
124
|
+
isActive: o.isBold,
|
|
122
125
|
title: "Bold",
|
|
123
126
|
children: /* @__PURE__ */ b(t, {
|
|
124
127
|
icon: O,
|
|
@@ -128,7 +131,7 @@ function J({ editor: e, toolbar: n, onImageClick: r, onFileClick: a, onEmojiClic
|
|
|
128
131
|
}),
|
|
129
132
|
c("italic") && /* @__PURE__ */ b(G, {
|
|
130
133
|
onClick: () => e.chain().focus().toggleItalic().run(),
|
|
131
|
-
isActive:
|
|
134
|
+
isActive: o.isItalic,
|
|
132
135
|
title: "Italic",
|
|
133
136
|
children: /* @__PURE__ */ b(t, {
|
|
134
137
|
icon: N,
|
|
@@ -138,7 +141,7 @@ function J({ editor: e, toolbar: n, onImageClick: r, onFileClick: a, onEmojiClic
|
|
|
138
141
|
}),
|
|
139
142
|
c("underline") && /* @__PURE__ */ b(G, {
|
|
140
143
|
onClick: () => e.chain().focus().toggleUnderline().run(),
|
|
141
|
-
isActive:
|
|
144
|
+
isActive: o.isUnderline,
|
|
142
145
|
title: "Underline",
|
|
143
146
|
children: /* @__PURE__ */ b(t, {
|
|
144
147
|
icon: U,
|
|
@@ -148,7 +151,7 @@ function J({ editor: e, toolbar: n, onImageClick: r, onFileClick: a, onEmojiClic
|
|
|
148
151
|
}),
|
|
149
152
|
c("strike") && /* @__PURE__ */ b(G, {
|
|
150
153
|
onClick: () => e.chain().focus().toggleStrike().run(),
|
|
151
|
-
isActive:
|
|
154
|
+
isActive: o.isStrike,
|
|
152
155
|
title: "Strikethrough",
|
|
153
156
|
children: /* @__PURE__ */ b(t, {
|
|
154
157
|
icon: H,
|
|
@@ -158,7 +161,7 @@ function J({ editor: e, toolbar: n, onImageClick: r, onFileClick: a, onEmojiClic
|
|
|
158
161
|
}),
|
|
159
162
|
c("highlight") && /* @__PURE__ */ b(G, {
|
|
160
163
|
onClick: () => e.chain().focus().toggleHighlight().run(),
|
|
161
|
-
isActive:
|
|
164
|
+
isActive: o.isHighlight,
|
|
162
165
|
title: "Highlight",
|
|
163
166
|
children: /* @__PURE__ */ b(t, {
|
|
164
167
|
icon: M,
|
|
@@ -169,7 +172,7 @@ function J({ editor: e, toolbar: n, onImageClick: r, onFileClick: a, onEmojiClic
|
|
|
169
172
|
l && u && /* @__PURE__ */ b(q, {}),
|
|
170
173
|
c("h2") && /* @__PURE__ */ b(G, {
|
|
171
174
|
onClick: () => e.chain().focus().toggleHeading({ level: 2 }).run(),
|
|
172
|
-
isActive:
|
|
175
|
+
isActive: o.isH2,
|
|
173
176
|
title: "Heading 2",
|
|
174
177
|
children: /* @__PURE__ */ b(t, {
|
|
175
178
|
icon: A,
|
|
@@ -179,7 +182,7 @@ function J({ editor: e, toolbar: n, onImageClick: r, onFileClick: a, onEmojiClic
|
|
|
179
182
|
}),
|
|
180
183
|
c("h3") && /* @__PURE__ */ b(G, {
|
|
181
184
|
onClick: () => e.chain().focus().toggleHeading({ level: 3 }).run(),
|
|
182
|
-
isActive:
|
|
185
|
+
isActive: o.isH3,
|
|
183
186
|
title: "Heading 3",
|
|
184
187
|
children: /* @__PURE__ */ b(t, {
|
|
185
188
|
icon: j,
|
|
@@ -189,7 +192,7 @@ function J({ editor: e, toolbar: n, onImageClick: r, onFileClick: a, onEmojiClic
|
|
|
189
192
|
}),
|
|
190
193
|
c("blockquote") && /* @__PURE__ */ b(G, {
|
|
191
194
|
onClick: () => e.chain().focus().toggleBlockquote().run(),
|
|
192
|
-
isActive:
|
|
195
|
+
isActive: o.isBlockquote,
|
|
193
196
|
title: "Blockquote",
|
|
194
197
|
children: /* @__PURE__ */ b(t, {
|
|
195
198
|
icon: D,
|
|
@@ -200,7 +203,7 @@ function J({ editor: e, toolbar: n, onImageClick: r, onFileClick: a, onEmojiClic
|
|
|
200
203
|
u && d && /* @__PURE__ */ b(q, {}),
|
|
201
204
|
c("bulletList") && /* @__PURE__ */ b(G, {
|
|
202
205
|
onClick: () => e.chain().focus().toggleBulletList().run(),
|
|
203
|
-
isActive:
|
|
206
|
+
isActive: o.isBulletList,
|
|
204
207
|
title: "Bullet list",
|
|
205
208
|
children: /* @__PURE__ */ b(t, {
|
|
206
209
|
icon: I,
|
|
@@ -210,7 +213,7 @@ function J({ editor: e, toolbar: n, onImageClick: r, onFileClick: a, onEmojiClic
|
|
|
210
213
|
}),
|
|
211
214
|
c("orderedList") && /* @__PURE__ */ b(G, {
|
|
212
215
|
onClick: () => e.chain().focus().toggleOrderedList().run(),
|
|
213
|
-
isActive:
|
|
216
|
+
isActive: o.isOrderedList,
|
|
214
217
|
title: "Ordered list",
|
|
215
218
|
children: /* @__PURE__ */ b(t, {
|
|
216
219
|
icon: R,
|
|
@@ -220,7 +223,7 @@ function J({ editor: e, toolbar: n, onImageClick: r, onFileClick: a, onEmojiClic
|
|
|
220
223
|
}),
|
|
221
224
|
c("taskList") && /* @__PURE__ */ b(G, {
|
|
222
225
|
onClick: () => e.chain().focus().toggleTaskList().run(),
|
|
223
|
-
isActive:
|
|
226
|
+
isActive: o.isTaskList,
|
|
224
227
|
title: "Task list",
|
|
225
228
|
children: /* @__PURE__ */ b(t, {
|
|
226
229
|
icon: L,
|
|
@@ -230,7 +233,7 @@ function J({ editor: e, toolbar: n, onImageClick: r, onFileClick: a, onEmojiClic
|
|
|
230
233
|
}),
|
|
231
234
|
c("codeBlock") && /* @__PURE__ */ b(G, {
|
|
232
235
|
onClick: () => e.chain().focus().toggleCodeBlock().run(),
|
|
233
|
-
isActive:
|
|
236
|
+
isActive: o.isCodeBlock,
|
|
234
237
|
title: "Code block",
|
|
235
238
|
children: /* @__PURE__ */ b(t, {
|
|
236
239
|
icon: k,
|
|
@@ -248,8 +251,8 @@ function J({ editor: e, toolbar: n, onImageClick: r, onFileClick: a, onEmojiClic
|
|
|
248
251
|
size: "sm"
|
|
249
252
|
})
|
|
250
253
|
}),
|
|
251
|
-
|
|
252
|
-
onClick:
|
|
254
|
+
i && c("file") && /* @__PURE__ */ b(G, {
|
|
255
|
+
onClick: i,
|
|
253
256
|
title: "Attach file",
|
|
254
257
|
children: /* @__PURE__ */ b(t, {
|
|
255
258
|
icon: B,
|
|
@@ -267,7 +270,7 @@ function J({ editor: e, toolbar: n, onImageClick: r, onFileClick: a, onEmojiClic
|
|
|
267
270
|
f && p && /* @__PURE__ */ b(q, {}),
|
|
268
271
|
c("alignLeft") && /* @__PURE__ */ b(G, {
|
|
269
272
|
onClick: () => e.chain().focus().setTextAlign("left").run(),
|
|
270
|
-
isActive:
|
|
273
|
+
isActive: o.isAlignLeft,
|
|
271
274
|
title: "Align left",
|
|
272
275
|
children: /* @__PURE__ */ b(t, {
|
|
273
276
|
icon: C,
|
|
@@ -276,7 +279,7 @@ function J({ editor: e, toolbar: n, onImageClick: r, onFileClick: a, onEmojiClic
|
|
|
276
279
|
}),
|
|
277
280
|
c("alignCenter") && /* @__PURE__ */ b(G, {
|
|
278
281
|
onClick: () => e.chain().focus().setTextAlign("center").run(),
|
|
279
|
-
isActive:
|
|
282
|
+
isActive: o.isAlignCenter,
|
|
280
283
|
title: "Align center",
|
|
281
284
|
children: /* @__PURE__ */ b(t, {
|
|
282
285
|
icon: S,
|
|
@@ -285,7 +288,7 @@ function J({ editor: e, toolbar: n, onImageClick: r, onFileClick: a, onEmojiClic
|
|
|
285
288
|
}),
|
|
286
289
|
c("alignRight") && /* @__PURE__ */ b(G, {
|
|
287
290
|
onClick: () => e.chain().focus().setTextAlign("right").run(),
|
|
288
|
-
isActive:
|
|
291
|
+
isActive: o.isAlignRight,
|
|
289
292
|
title: "Align right",
|
|
290
293
|
children: /* @__PURE__ */ b(t, {
|
|
291
294
|
icon: w,
|
|
@@ -293,8 +296,8 @@ function J({ editor: e, toolbar: n, onImageClick: r, onFileClick: a, onEmojiClic
|
|
|
293
296
|
})
|
|
294
297
|
}),
|
|
295
298
|
p && (m || h) && /* @__PURE__ */ b(q, {}),
|
|
296
|
-
|
|
297
|
-
onClick:
|
|
299
|
+
a && c("emoji") && /* @__PURE__ */ b(G, {
|
|
300
|
+
onClick: a,
|
|
298
301
|
title: "Emoji",
|
|
299
302
|
children: /* @__PURE__ */ b(t, {
|
|
300
303
|
icon: z,
|
|
@@ -303,7 +306,7 @@ function J({ editor: e, toolbar: n, onImageClick: r, onFileClick: a, onEmojiClic
|
|
|
303
306
|
}),
|
|
304
307
|
c("undo") && /* @__PURE__ */ b(G, {
|
|
305
308
|
onClick: () => e.chain().focus().undo().run(),
|
|
306
|
-
disabled: !
|
|
309
|
+
disabled: !o.canUndo,
|
|
307
310
|
title: "Undo",
|
|
308
311
|
children: /* @__PURE__ */ b(t, {
|
|
309
312
|
icon: T,
|
|
@@ -312,7 +315,7 @@ function J({ editor: e, toolbar: n, onImageClick: r, onFileClick: a, onEmojiClic
|
|
|
312
315
|
}),
|
|
313
316
|
c("redo") && /* @__PURE__ */ b(G, {
|
|
314
317
|
onClick: () => e.chain().focus().redo().run(),
|
|
315
|
-
disabled: !
|
|
318
|
+
disabled: !o.canRedo,
|
|
316
319
|
title: "Redo",
|
|
317
320
|
children: /* @__PURE__ */ b(t, {
|
|
318
321
|
icon: E,
|
|
@@ -324,12 +327,12 @@ function J({ editor: e, toolbar: n, onImageClick: r, onFileClick: a, onEmojiClic
|
|
|
324
327
|
}
|
|
325
328
|
var Y = y.lazy(() => import("@emoji-mart/react"));
|
|
326
329
|
function X({ set: e = "native", onSelect: t }) {
|
|
327
|
-
let [n, r] = y.useState(null), { colorMode: i } =
|
|
330
|
+
let [n, r] = y.useState(null), { colorMode: i } = f();
|
|
328
331
|
y.useEffect(() => {
|
|
329
|
-
|
|
332
|
+
p(e).then((e) => r(e));
|
|
330
333
|
}, [e]);
|
|
331
334
|
let a = /* @__PURE__ */ b("div", {
|
|
332
|
-
className: "flex h-[350px] w-[352px] items-center justify-center rounded-
|
|
335
|
+
className: "flex h-[350px] w-[352px] items-center justify-center rounded-surface border border-surface-border-strong bg-surface-overlay shadow-raised-hover",
|
|
333
336
|
children: /* @__PURE__ */ b("span", {
|
|
334
337
|
className: "text-ds-sm text-surface-fg-subtle",
|
|
335
338
|
children: "Loading..."
|
|
@@ -350,7 +353,7 @@ function X({ set: e = "native", onSelect: t }) {
|
|
|
350
353
|
})
|
|
351
354
|
}) : a;
|
|
352
355
|
}
|
|
353
|
-
var Z = y.forwardRef(function({ content: t = "", placeholder:
|
|
356
|
+
var Z = y.forwardRef(function({ content: t = "", placeholder: s = "Start writing...", onChange: f, className: S, editable: C = !0, toolbar: w, onImageUpload: T, onFileUpload: E, mentions: D, onMentionSearch: O, onMentionSelect: k, emojiSet: A = "native", ...j }, M) {
|
|
354
357
|
let N = y.useRef(null), P = y.useRef(!1), [F, I] = y.useState(!1), L = y.useRef(null), R = y.useRef(null), z = y.useRef(null), B = async (e) => {
|
|
355
358
|
let t = N.current;
|
|
356
359
|
if (t) if (T) {
|
|
@@ -374,10 +377,10 @@ var Z = y.forwardRef(function({ content: t = "", placeholder: i = "Start writing
|
|
|
374
377
|
size: n.size
|
|
375
378
|
}
|
|
376
379
|
}).run();
|
|
377
|
-
}, H =
|
|
380
|
+
}, H = r({
|
|
378
381
|
immediatelyRender: !1,
|
|
379
382
|
extensions: [
|
|
380
|
-
|
|
383
|
+
l.configure({
|
|
381
384
|
heading: { levels: [2, 3] },
|
|
382
385
|
link: {
|
|
383
386
|
openOnClick: !1,
|
|
@@ -393,12 +396,12 @@ var Z = y.forwardRef(function({ content: t = "", placeholder: i = "Start writing
|
|
|
393
396
|
}
|
|
394
397
|
}
|
|
395
398
|
}),
|
|
396
|
-
|
|
397
|
-
placeholder:
|
|
399
|
+
i.configure({
|
|
400
|
+
placeholder: s,
|
|
398
401
|
emptyEditorClass: "before:content-[attr(data-placeholder)] before:text-surface-fg-subtle before:float-left before:h-0 before:pointer-events-none"
|
|
399
402
|
}),
|
|
400
|
-
|
|
401
|
-
|
|
403
|
+
o.configure({ multicolor: !1 }),
|
|
404
|
+
u.configure({
|
|
402
405
|
bulletList: !1,
|
|
403
406
|
orderedList: !1,
|
|
404
407
|
listItem: !1,
|
|
@@ -407,19 +410,19 @@ var Z = y.forwardRef(function({ content: t = "", placeholder: i = "Start writing
|
|
|
407
410
|
taskItem: { nested: !0 }
|
|
408
411
|
}),
|
|
409
412
|
d.configure({ types: ["heading", "paragraph"] }),
|
|
410
|
-
|
|
413
|
+
c.configure({
|
|
411
414
|
allowBase64: !0,
|
|
412
|
-
HTMLAttributes: { class: "max-w-full rounded-
|
|
415
|
+
HTMLAttributes: { class: "max-w-full rounded-control" }
|
|
413
416
|
}),
|
|
414
|
-
|
|
415
|
-
...D || O ? [
|
|
417
|
+
_,
|
|
418
|
+
...D || O ? [a.configure({
|
|
416
419
|
HTMLAttributes: { class: "mention" },
|
|
417
420
|
suggestion: {
|
|
418
421
|
items: async ({ query: e }) => O ? await O(e) : D ? D.filter((t) => t.label.toLowerCase().includes(e.toLowerCase())).slice(0, 8) : [],
|
|
419
|
-
render:
|
|
422
|
+
render: v(k)
|
|
420
423
|
}
|
|
421
424
|
})] : [],
|
|
422
|
-
|
|
425
|
+
h,
|
|
423
426
|
g(A)
|
|
424
427
|
],
|
|
425
428
|
content: t,
|
|
@@ -437,7 +440,7 @@ var Z = y.forwardRef(function({ content: t = "", placeholder: i = "Start writing
|
|
|
437
440
|
attributes: { class: e(...W, "focus:outline-hidden", "min-h-[120px] px-ds-04 py-ds-04") }
|
|
438
441
|
},
|
|
439
442
|
onUpdate: ({ editor: e }) => {
|
|
440
|
-
P.current = !0,
|
|
443
|
+
P.current = !0, f?.(e.getHTML()), queueMicrotask(() => {
|
|
441
444
|
P.current = !1;
|
|
442
445
|
});
|
|
443
446
|
}
|
|
@@ -465,7 +468,7 @@ var Z = y.forwardRef(function({ content: t = "", placeholder: i = "Start writing
|
|
|
465
468
|
children: /* @__PURE__ */ b(X, {
|
|
466
469
|
set: A,
|
|
467
470
|
onSelect: async ({ id: e, native: t }) => {
|
|
468
|
-
let n =
|
|
471
|
+
let n = m(await p(A), e);
|
|
469
472
|
n ? H.chain().focus().insertContent({
|
|
470
473
|
type: "emojiNode",
|
|
471
474
|
attrs: {
|
|
@@ -479,7 +482,7 @@ var Z = y.forwardRef(function({ content: t = "", placeholder: i = "Start writing
|
|
|
479
482
|
}
|
|
480
483
|
})
|
|
481
484
|
}), /* @__PURE__ */ x("div", {
|
|
482
|
-
className: e("overflow-hidden rounded-
|
|
485
|
+
className: e("overflow-hidden rounded-surface border border-surface-border-strong bg-surface-raised", "transition-colors ease-productive-standard focus-within:border-surface-border-strong"),
|
|
483
486
|
children: [
|
|
484
487
|
/* @__PURE__ */ b("input", {
|
|
485
488
|
ref: R,
|
|
@@ -509,17 +512,17 @@ var Z = y.forwardRef(function({ content: t = "", placeholder: i = "Start writing
|
|
|
509
512
|
onFileClick: E ? () => z.current?.click() : void 0,
|
|
510
513
|
onEmojiClick: () => I((e) => !e)
|
|
511
514
|
}),
|
|
512
|
-
/* @__PURE__ */ b(
|
|
515
|
+
/* @__PURE__ */ b(n, { editor: H })
|
|
513
516
|
]
|
|
514
517
|
})]
|
|
515
518
|
}) : null;
|
|
516
519
|
});
|
|
517
520
|
Z.displayName = "RichTextEditor";
|
|
518
|
-
var Q = y.forwardRef(function({ content: t, className: i, ...
|
|
519
|
-
let p =
|
|
521
|
+
var Q = y.forwardRef(function({ content: t, className: i, ...s }, f) {
|
|
522
|
+
let p = r({
|
|
520
523
|
immediatelyRender: !1,
|
|
521
524
|
extensions: [
|
|
522
|
-
|
|
525
|
+
l.configure({
|
|
523
526
|
heading: { levels: [2, 3] },
|
|
524
527
|
link: {
|
|
525
528
|
openOnClick: !0,
|
|
@@ -535,8 +538,8 @@ var Q = y.forwardRef(function({ content: t, className: i, ...c }, f) {
|
|
|
535
538
|
}
|
|
536
539
|
}
|
|
537
540
|
}),
|
|
538
|
-
|
|
539
|
-
|
|
541
|
+
o.configure({ multicolor: !1 }),
|
|
542
|
+
u.configure({
|
|
540
543
|
bulletList: !1,
|
|
541
544
|
orderedList: !1,
|
|
542
545
|
listItem: !1,
|
|
@@ -545,12 +548,12 @@ var Q = y.forwardRef(function({ content: t, className: i, ...c }, f) {
|
|
|
545
548
|
taskItem: { nested: !0 }
|
|
546
549
|
}),
|
|
547
550
|
d.configure({ types: ["heading", "paragraph"] }),
|
|
548
|
-
|
|
551
|
+
c.configure({
|
|
549
552
|
allowBase64: !0,
|
|
550
|
-
HTMLAttributes: { class: "max-w-full rounded-
|
|
553
|
+
HTMLAttributes: { class: "max-w-full rounded-control" }
|
|
551
554
|
}),
|
|
552
|
-
|
|
553
|
-
|
|
555
|
+
_,
|
|
556
|
+
a.configure({ HTMLAttributes: { class: "mention" } })
|
|
554
557
|
],
|
|
555
558
|
content: t,
|
|
556
559
|
editable: !1,
|
|
@@ -558,9 +561,9 @@ var Q = y.forwardRef(function({ content: t, className: i, ...c }, f) {
|
|
|
558
561
|
});
|
|
559
562
|
return p ? /* @__PURE__ */ b("div", {
|
|
560
563
|
ref: f,
|
|
561
|
-
...
|
|
564
|
+
...s,
|
|
562
565
|
className: i,
|
|
563
|
-
children: /* @__PURE__ */ b(
|
|
566
|
+
children: /* @__PURE__ */ b(n, { editor: p })
|
|
564
567
|
}) : null;
|
|
565
568
|
});
|
|
566
569
|
Q.displayName = "RichTextViewer";
|