@mantine-vue/tiptap 3.0.0 → 3.2.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/cjs/index.cjs +725 -588
- package/cjs/index.cjs.map +1 -1
- package/esm/index.mjs +725 -614
- package/esm/index.mjs.map +1 -1
- package/lib/RichTextEditor.d.ts +63 -2674
- package/lib/RichTextEditor.types.d.ts +83 -0
- package/lib/RichTextEditor.vue.d.ts +25 -0
- package/lib/RichTextEditorContent/RichTextEditorContent.d.ts +8 -42
- package/lib/RichTextEditorContent/RichTextEditorContent.types.d.ts +18 -0
- package/lib/RichTextEditorContent/RichTextEditorContent.vue.d.ts +4 -0
- package/lib/RichTextEditorControl/RichTextEditorColorControl.d.ts +8 -17
- package/lib/RichTextEditorControl/RichTextEditorColorControl.types.d.ts +15 -0
- package/lib/RichTextEditorControl/RichTextEditorColorControl.vue.d.ts +4 -0
- package/lib/RichTextEditorControl/RichTextEditorColorPickerControl.d.ts +8 -39
- package/lib/RichTextEditorControl/RichTextEditorColorPickerControl.types.d.ts +19 -0
- package/lib/RichTextEditorControl/RichTextEditorColorPickerControl.vue.d.ts +4 -0
- package/lib/RichTextEditorControl/RichTextEditorControl.d.ts +18 -240
- package/lib/RichTextEditorControl/RichTextEditorControl.types.d.ts +91 -0
- package/lib/RichTextEditorControl/RichTextEditorControl.vue.d.ts +11 -0
- package/lib/RichTextEditorControl/RichTextEditorControlBase.vue.d.ts +11 -0
- package/lib/RichTextEditorControl/RichTextEditorGeneratedControl.vue.d.ts +11 -0
- package/lib/RichTextEditorControl/RichTextEditorLinkControl.d.ts +9 -81
- package/lib/RichTextEditorControl/RichTextEditorLinkControl.types.d.ts +34 -0
- package/lib/RichTextEditorControl/RichTextEditorLinkControl.vue.d.ts +11 -0
- package/lib/RichTextEditorControl/RichTextEditorSourceCodeControl.d.ts +8 -6
- package/lib/RichTextEditorControl/RichTextEditorSourceCodeControl.types.d.ts +10 -0
- package/lib/RichTextEditorControl/RichTextEditorSourceCodeControl.vue.d.ts +3 -0
- package/lib/RichTextEditorControl/controls.d.ts +248 -2139
- package/lib/RichTextEditorControl/use-editor-selector.d.ts +3 -0
- package/lib/RichTextEditorControlsGroup/RichTextEditorControlsGroup.d.ts +9 -50
- package/lib/RichTextEditorControlsGroup/RichTextEditorControlsGroup.types.d.ts +24 -0
- package/lib/RichTextEditorControlsGroup/RichTextEditorControlsGroup.vue.d.ts +11 -0
- package/lib/RichTextEditorToolbar/RichTextEditorToolbar.d.ts +9 -81
- package/lib/RichTextEditorToolbar/RichTextEditorToolbar.types.d.ts +32 -0
- package/lib/RichTextEditorToolbar/RichTextEditorToolbar.vue.d.ts +11 -0
- package/lib/icons/Icons.d.ts +40 -113
- package/lib/icons/RichTextEditorIcon.d.ts +5 -0
- package/lib/icons/RichTextEditorIcon.types.d.ts +10 -0
- package/lib/icons/RichTextEditorIcon.vue.d.ts +4 -0
- package/package.json +3 -3
package/cjs/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":[],"sources":["../src/labels.ts","../src/RichTextEditor.context.ts","../src/RichTextEditor.module.css","../src/RichTextEditorContent/RichTextEditorContent.ts","../src/RichTextEditorControl/RichTextEditorControl.ts","../src/RichTextEditorControl/RichTextEditorColorControl.ts","../src/icons/Icons.ts","../src/RichTextEditorControl/RichTextEditorColorPickerControl.ts","../src/RichTextEditorControl/RichTextEditorLinkControl.ts","../src/RichTextEditorControl/RichTextEditorSourceCodeControl.ts","../src/RichTextEditorControl/controls.ts","../src/RichTextEditorControlsGroup/RichTextEditorControlsGroup.ts","../src/RichTextEditorToolbar/RichTextEditorToolbar.ts","../src/RichTextEditor.ts","../src/extensions/Link.ts","../src/extensions/TaskList.ts"],"sourcesContent":["export interface RichTextEditorLabels {\n boldControlLabel: string\n hrControlLabel: string\n italicControlLabel: string\n underlineControlLabel: string\n strikeControlLabel: string\n clearFormattingControlLabel: string\n linkControlLabel: string\n unlinkControlLabel: string\n bulletListControlLabel: string\n orderedListControlLabel: string\n h1ControlLabel: string\n h2ControlLabel: string\n h3ControlLabel: string\n h4ControlLabel: string\n h5ControlLabel: string\n h6ControlLabel: string\n blockquoteControlLabel: string\n alignLeftControlLabel: string\n alignCenterControlLabel: string\n alignRightControlLabel: string\n alignJustifyControlLabel: string\n codeControlLabel: string\n codeBlockControlLabel: string\n subscriptControlLabel: string\n superscriptControlLabel: string\n colorPickerControlLabel: string\n unsetColorControlLabel: string\n highlightControlLabel: string\n undoControlLabel: string\n redoControlLabel: string\n colorControlLabel: (color: string) => string\n sourceCodeControlLabel: string\n linkEditorInputLabel: string\n linkEditorInputPlaceholder: string\n linkEditorExternalLink: string\n linkEditorInternalLink: string\n linkEditorSave: string\n colorPickerCancel: string\n colorPickerClear: string\n colorPickerColorPicker: string\n colorPickerPalette: string\n colorPickerSave: string\n colorPickerColorLabel: (color: string) => string\n tasksControlLabel: string\n tasksSinkLabel: string\n tasksLiftLabel: string\n}\n\nexport const DEFAULT_LABELS: RichTextEditorLabels = {\n linkControlLabel: 'Link',\n colorPickerControlLabel: 'Text color',\n highlightControlLabel: 'Highlight text',\n colorControlLabel: (color) => `Set text color ${color}`,\n boldControlLabel: 'Bold',\n italicControlLabel: 'Italic',\n underlineControlLabel: 'Underline',\n strikeControlLabel: 'Strikethrough',\n clearFormattingControlLabel: 'Clear formatting',\n unlinkControlLabel: 'Remove link',\n bulletListControlLabel: 'Bullet list',\n orderedListControlLabel: 'Ordered list',\n sourceCodeControlLabel: 'Switch between text/source code',\n h1ControlLabel: 'Heading 1',\n h2ControlLabel: 'Heading 2',\n h3ControlLabel: 'Heading 3',\n h4ControlLabel: 'Heading 4',\n h5ControlLabel: 'Heading 5',\n h6ControlLabel: 'Heading 6',\n blockquoteControlLabel: 'Blockquote',\n alignLeftControlLabel: 'Align text: left',\n alignCenterControlLabel: 'Align text: center',\n alignRightControlLabel: 'Align text: right',\n alignJustifyControlLabel: 'Align text: justify',\n codeControlLabel: 'Code',\n codeBlockControlLabel: 'Code block',\n subscriptControlLabel: 'Subscript',\n superscriptControlLabel: 'Superscript',\n unsetColorControlLabel: 'Unset color',\n hrControlLabel: 'Horizontal line',\n undoControlLabel: 'Undo',\n redoControlLabel: 'Redo',\n tasksControlLabel: 'Task list',\n tasksSinkLabel: 'Decrease task level',\n tasksLiftLabel: 'Increase task level',\n linkEditorInputLabel: 'Enter URL',\n linkEditorInputPlaceholder: 'https://example.com/',\n linkEditorExternalLink: 'Open link in a new tab',\n linkEditorInternalLink: 'Open link in the same tab',\n linkEditorSave: 'Save',\n colorPickerCancel: 'Cancel',\n colorPickerClear: 'Clear color',\n colorPickerColorPicker: 'Color picker',\n colorPickerPalette: 'Color palette',\n colorPickerSave: 'Save',\n colorPickerColorLabel: (color) => `Set text color ${color}`,\n}\n","import type { Editor } from '@tiptap/vue-3'\nimport { createSafeContext } from '@mantine-vue/core'\nimport type { RichTextEditorLabels } from './labels'\n\nexport interface RichTextEditorContextValue {\n getStyles: (\n selector: string,\n options?: {\n active?: boolean\n className?: any\n style?: any\n classNames?: any\n styles?: any\n props?: Record<string, any>\n variant?: string\n },\n ) => Record<string, any>\n editor: Editor | null\n labels: RichTextEditorLabels\n withCodeHighlightStyles: boolean | undefined\n withTypographyStyles: boolean | undefined\n unstyled: boolean | undefined\n variant: string | undefined\n onSourceCodeTextSwitch?: (isSourceCodeModeActive: boolean) => void\n}\n\nexport const [provideRichTextEditorContext, useRichTextEditorContext] =\n createSafeContext<RichTextEditorContextValue>('RichTextEditor component was not found in tree')\n",".root {\n position: relative;\n border: 1px solid;\n border-radius: var(--mantine-radius-default);\n\n @mixin where-light {\n border-color: var(--mantine-color-gray-4);\n }\n\n @mixin where-dark {\n border-color: var(--mantine-color-dark-4);\n }\n}\n\n.Typography {\n padding: 0;\n margin: 0;\n\n & li > p {\n margin: 0;\n }\n\n & ul li,\n & ol li {\n margin-top: 2px;\n }\n\n & p {\n margin-bottom: 7px;\n }\n\n & h1,\n & h2,\n & h3,\n & h4,\n & h5,\n & h6,\n & p {\n margin-top: 0;\n }\n}\n\n.content {\n background-color: var(--mantine-color-body);\n border-radius: var(--mantine-radius-default);\n\n & :global(.ProseMirror) {\n outline: 0;\n padding: var(--mantine-spacing-md);\n }\n\n & :global(.ProseMirror > *:last-child) {\n margin-bottom: 0;\n }\n\n & :global(.ProseMirror p.is-editor-empty:first-of-type::before) {\n content: attr(data-placeholder);\n pointer-events: none;\n user-select: none;\n float: left;\n height: 0;\n color: var(--mantine-color-placeholder);\n }\n\n & :global(div:not(.ProseMirror)) {\n /* Position the bubble menu above the toolbar. As it doesn't have its own selector,\n assert that the non-ProseMirror div is the bubble or floating menu */\n z-index: 2;\n }\n\n & :global(pre) {\n font-family: var(--mantine-font-family-monospace);\n border-radius: var(--mantine-radius-default);\n padding: var(--mantine-spacing-sm) var(--mantine-spacing-md);\n\n @mixin where-light {\n background-color: var(--mantine-color-gray-0);\n color: var(--mantine-color-gray-9);\n --code-color-comment: var(--mantine-color-gray-5);\n --code-color-var: var(--mantine-color-red-7);\n --code-color-number: var(--mantine-color-blue-7);\n --code-color-title: var(--mantine-color-pink-7);\n --code-color-keyword: var(--mantine-color-violet-7);\n }\n\n @mixin where-dark {\n background-color: var(--mantine-color-dark-8);\n color: var(--mantine-color-dark-1);\n --code-color-comment: var(--mantine-color-dark-2);\n --code-color-var: var(--mantine-color-red-5);\n --code-color-number: var(--mantine-color-cyan-5);\n --code-color-title: var(--mantine-color-yellow-5);\n --code-color-keyword: var(--mantine-color-violet-3);\n }\n\n & code {\n background: none !important;\n color: inherit;\n font-size: var(--mantine-font-size-sm);\n padding: 0;\n }\n\n & :global(.hljs-comment),\n & :global(.hljs-quote) {\n color: var(--code-color-comment);\n }\n\n & :global(.hljs-variable),\n & :global(.hljs-template-variable),\n & :global(.hljs-attribute),\n & :global(.hljs-tag),\n & :global(.hljs-regexp),\n & :global(.hljs-link),\n & :global(.hljs-name),\n & :global(.hljs-selector-id),\n & :global(.hljs-selector-class) {\n color: var(--code-color-var);\n }\n\n & :global(.hljs-number),\n & :global(.hljs-meta),\n & :global(.hljs-built_in),\n & :global(.hljs-builtin-name),\n & :global(.hljs-literal),\n & :global(.hljs-type),\n & :global(.hljs-params) {\n color: var(--code-color-number);\n }\n\n & :global(.hljs-string),\n & :global(.hljs-symbol),\n & :global(.hljs-bullet) {\n color: var(--code-color-var);\n }\n\n & :global(.hljs-title),\n & :global(.hljs-section) {\n color: var(--code-color-title);\n }\n\n & :global(.hljs-keyword),\n & :global(.hljs-selector-tag) {\n color: var(--code-color-keyword);\n }\n\n & :global(.hljs-emphasis) {\n font-style: italic;\n }\n\n & :global(.hljs-strong) {\n font-weight: 700;\n }\n }\n}\n\n.linkEditorDropdown {\n background-color: var(--mantine-color-body);\n}\n\n.control {\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: var(--mantine-radius-default);\n cursor: default;\n\n &:where([data-variant='default']) {\n border: 1px solid;\n min-width: 26px;\n height: 26px;\n }\n\n &:where([data-variant='subtle']) {\n --control-icon-size: 20px;\n min-width: 32px;\n height: 32px;\n }\n\n @mixin where-light {\n background-color: var(--mantine-color-white);\n border-color: var(--mantine-color-gray-4);\n color: var(--mantine-color-gray-7);\n }\n\n @mixin where-dark {\n border-color: var(--mantine-color-dark-4);\n color: var(--mantine-color-dark-1);\n\n &:where([data-variant='default']) {\n background-color: var(--mantine-color-dark-6);\n }\n\n &:where([data-variant='subtle']) {\n background-color: var(--mantine-color-dark-7);\n }\n }\n\n &:where([data-disabled]) {\n cursor: not-allowed;\n color: var(--mantine-color-disabled-color);\n background-color: var(--mantine-color-disabled);\n }\n\n &:where([data-interactive]:not([data-disabled])) {\n cursor: pointer;\n\n @mixin hover {\n color: var(--mantine-color-bright);\n\n @mixin where-light {\n &:where([data-variant='default']) {\n background-color: var(--mantine-color-gray-0);\n }\n\n &:where([data-variant='subtle']) {\n background-color: var(--mantine-color-gray-1);\n }\n }\n\n @mixin where-dark {\n background-color: var(--mantine-color-dark-5);\n }\n }\n }\n\n &:where([data-active]) {\n background-color: var(--mantine-primary-color-light);\n color: var(--mantine-primary-color-light-color);\n\n @mixin hover {\n background-color: var(--mantine-primary-color-light-hover);\n }\n }\n}\n\n.controlIcon {\n width: var(--control-icon-size, 16px);\n height: var(--control-icon-size, 16px);\n}\n\n.controlsGroup {\n display: flex;\n background-color: var(--mantine-color-body);\n\n &:where([data-variant='default']) {\n & :where([data-rich-text-editor-control]) {\n border-radius: 0;\n\n &:where(:not(:last-of-type)) {\n border-inline-end-width: 0;\n }\n\n &:where(:last-of-type) {\n border-start-end-radius: var(--mantine-radius-default);\n border-end-end-radius: var(--mantine-radius-default);\n }\n\n &:where(:first-of-type) {\n border-start-start-radius: var(--mantine-radius-default);\n border-end-start-radius: var(--mantine-radius-default);\n }\n }\n }\n}\n\n.linkEditor {\n display: flex;\n}\n\n.linkEditorInput {\n border-start-end-radius: 0;\n border-end-end-radius: 0;\n border-inline-end: 0;\n}\n\n.linkEditorExternalControl {\n border: 1px solid;\n color: var(--mantine-color-text);\n height: 24px;\n width: 24px;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: var(--mantine-radius-default);\n\n @mixin where-light {\n background-color: var(--mantine-color-white);\n border-color: var(--mantine-color-gray-4);\n }\n\n @mixin where-dark {\n background-color: var(--mantine-color-dark-7);\n border-color: var(--mantine-color-dark-4);\n }\n\n &:where([data-active]) {\n background-color: var(--mantine-primary-color-light);\n color: var(--mantine-primary-color-filled);\n\n @mixin hover {\n background-color: var(--mantine-primary-color-light-hover);\n }\n }\n}\n\n.linkEditorSave {\n border-start-start-radius: 0;\n border-end-start-radius: 0;\n}\n\n.toolbar {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: var(--mantine-spacing-sm);\n top: var(--rte-sticky-offset, 0px);\n background-color: var(--mantine-color-body);\n z-index: 1;\n border-start-end-radius: var(--mantine-radius-default);\n border-start-start-radius: var(--mantine-radius-default);\n border-bottom: 1px solid;\n\n &:where([data-variant='default']) {\n padding: var(--mantine-spacing-xs) var(--mantine-spacing-md);\n }\n\n &:where([data-variant='subtle']) {\n padding: 4px;\n row-gap: 0;\n }\n\n @mixin where-light {\n border-color: var(--mantine-color-gray-4);\n }\n\n @mixin where-dark {\n border-color: var(--mantine-color-dark-4);\n }\n\n &:where([data-sticky]) {\n position: sticky;\n }\n}\n\n.taskList {\n list-style-type: none;\n padding: 0;\n padding-inline-start: 0;\n\n & :where(li) {\n margin: 0;\n padding: 0;\n display: flex;\n }\n\n & :where(li[data-checked] > div) {\n flex: 1 1 auto;\n min-width: 0;\n }\n\n & :where(ul) {\n margin-top: 5px;\n }\n\n & p {\n margin: 0;\n padding: 0;\n }\n\n & :where(label) {\n display: inline-block;\n }\n\n & :where(input) {\n cursor: pointer;\n appearance: none;\n width: 18px;\n height: 18px;\n border: 1px solid;\n border-radius: var(--mantine-radius-default);\n vertical-align: middle;\n position: relative;\n\n @mixin where-light {\n background-color: var(--mantine-color-white);\n border-color: var(--mantine-color-gray-4);\n }\n\n @mixin where-dark {\n background-color: var(--mantine-color-dark-6);\n border-color: var(--mantine-color-dark-4);\n }\n\n &:checked {\n background-color: var(--mantine-primary-color-filled);\n border-color: var(--mantine-primary-color-filled);\n\n &::before {\n position: absolute;\n content: '';\n inset: 0;\n background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAxMCA3Ij48cGF0aCBmaWxsPSIjZmZmIiBkPSJNNCA0LjU4NkwxLjcwNyAyLjI5M0ExIDEgMCAxMC4yOTMgMy43MDdsMyAzYS45OTcuOTk3IDAgMDAxLjQxNCAwbDUtNUExIDEgMCAxMDguMjkzLjI5M0w0IDQuNTg2eiIvPjwvc3ZnPg==');\n background-repeat: no-repeat;\n background-size: 10px;\n background-position: center;\n }\n }\n }\n\n & :where(li > label) {\n margin-inline-end: var(--mantine-spacing-sm);\n }\n}\n","import { defineComponent, h } from 'vue'\nimport { EditorContent } from '@tiptap/vue-3'\nimport { Box, Typography, useProps } from '@mantine-vue/core'\nimport { useRichTextEditorContext } from '../RichTextEditor.context'\nimport classes from '../RichTextEditor.module.css'\n\nexport type RichTextEditorContentStylesNames = 'root'\nexport interface RichTextEditorContentProps {\n classNames?: any\n styles?: any\n vars?: any\n class?: any\n style?: any\n [key: string]: any\n}\n\nexport const RichTextEditorContent = defineComponent({\n name: 'RichTextEditorContent',\n inheritAttrs: false,\n props: {\n classNames: { type: [Object, Function], default: undefined },\n styles: { type: [Object, Function], default: undefined },\n vars: { type: [Object, Function], default: undefined },\n },\n setup(rawProps, { attrs }) {\n const props = useProps<RichTextEditorContentProps>(\n 'RichTextEditorContent',\n null,\n rawProps as any,\n )\n const ctx = useRichTextEditorContext()\n\n return () => {\n const editorContent = h(Box, {\n component: EditorContent,\n editor: ctx.editor,\n ...ctx.getStyles('content', {\n classNames: props.classNames,\n styles: props.styles,\n className: ctx.withTypographyStyles ? undefined : attrs.class,\n style: ctx.withTypographyStyles ? undefined : attrs.style,\n }),\n ...attrs,\n })\n\n return ctx.withTypographyStyles\n ? h(\n Typography,\n {\n ...ctx.getStyles('Typography', {\n className: attrs.class,\n style: attrs.style,\n styles: props.styles,\n classNames: props.classNames,\n }),\n unstyled: ctx.unstyled,\n },\n () => editorContent,\n )\n : editorContent\n }\n },\n})\n\nObject.assign(RichTextEditorContent, { classes })\n","import { computed, defineComponent, h, onBeforeUnmount, ref, watch, type PropType } from 'vue'\nimport type { Editor } from '@tiptap/vue-3'\nimport { Box, UnstyledButton, useProps } from '@mantine-vue/core'\nimport { useRichTextEditorContext } from '../RichTextEditor.context'\nimport type { RichTextEditorLabels } from '../labels'\nimport classes from '../RichTextEditor.module.css'\n\nexport type RichTextEditorControlStylesNames = 'control'\n\nexport interface RichTextEditorControlProps {\n active?: boolean\n interactive?: boolean\n disabled?: boolean\n variant?: string\n classNames?: any\n styles?: any\n vars?: any\n class?: any\n style?: any\n [key: string]: any\n}\n\nconst defaultProps = {\n interactive: true,\n} satisfies Partial<RichTextEditorControlProps>\n\nexport const RichTextEditorControl = defineComponent({\n name: 'RichTextEditorControl',\n inheritAttrs: false,\n props: {\n active: { type: Boolean, default: undefined },\n interactive: { type: Boolean, default: undefined },\n disabled: { type: Boolean, default: undefined },\n variant: { type: String, default: undefined },\n classNames: { type: [Object, Function], default: undefined },\n styles: { type: [Object, Function], default: undefined },\n vars: { type: [Object, Function], default: undefined },\n },\n setup(rawProps, { attrs, slots }) {\n const props = useProps<RichTextEditorControlProps>(\n 'RichTextEditorControl',\n defaultProps,\n rawProps as any,\n )\n const ctx = useRichTextEditorContext()\n\n return () =>\n h(\n UnstyledButton,\n {\n ...attrs,\n ...ctx.getStyles('control', {\n className: attrs.class,\n style: attrs.style,\n classNames: props.classNames,\n styles: props.styles,\n }),\n disabled: props.disabled,\n 'data-rich-text-editor-control': '',\n tabindex: props.interactive ? 0 : -1,\n 'data-interactive': props.interactive || undefined,\n 'data-disabled': props.disabled || undefined,\n 'data-active': props.active || undefined,\n 'aria-pressed': props.active && props.interactive ? true : undefined,\n 'aria-hidden': !props.interactive || undefined,\n unstyled: ctx.unstyled,\n variant: props.variant || ctx.variant || 'default',\n onMousedown: (event: MouseEvent) => {\n event.preventDefault()\n ;(attrs as any).onMousedown?.(event)\n },\n },\n slots,\n )\n },\n})\n\nObject.assign(RichTextEditorControl, { classes })\n\nexport interface RichTextEditorControlBaseProps extends RichTextEditorControlProps {\n icon?: any\n}\n\nexport const RichTextEditorControlBase = defineComponent({\n name: 'RichTextEditorControlBase',\n inheritAttrs: false,\n props: {\n icon: { type: [Object, Function] as PropType<any>, required: true },\n active: { type: Boolean, default: undefined },\n interactive: { type: Boolean, default: undefined },\n disabled: { type: Boolean, default: undefined },\n variant: { type: String, default: undefined },\n classNames: { type: [Object, Function], default: undefined },\n styles: { type: [Object, Function], default: undefined },\n },\n setup(props, { attrs }) {\n const ctx = useRichTextEditorContext()\n return () =>\n h(RichTextEditorControl, { ...attrs, ...props }, () =>\n h(props.icon, ctx.getStyles('controlIcon')),\n )\n },\n})\n\nexport interface CreateControlProps {\n label: keyof RichTextEditorLabels\n icon: any\n isActive?: { name: string; attributes?: Record<string, any> | string }\n isDisabled?: (editor: Editor) => boolean\n operation: { name: string; attributes?: Record<string, any> | string }\n}\n\nfunction isSafeEditor(editor: Editor | null): editor is Editor {\n return !!editor && !editor.isDestroyed\n}\n\nfunction useEditorSelector<T>(editor: () => Editor | null, selector: (editor: Editor | null) => T) {\n const tick = ref(0)\n const update = () => {\n tick.value += 1\n }\n const listen = (current: Editor | null | undefined) => {\n current?.on('transaction', update)\n current?.on('selectionUpdate', update)\n current?.on('update', update)\n }\n const unlisten = (current: Editor | null | undefined) => {\n current?.off('transaction', update)\n current?.off('selectionUpdate', update)\n current?.off('update', update)\n }\n\n const stop = watch(\n editor,\n (current, previous) => {\n unlisten(previous)\n listen(current)\n update()\n },\n { immediate: true },\n )\n\n onBeforeUnmount(() => {\n stop()\n unlisten(editor())\n })\n\n return computed(() => {\n void tick.value\n return selector(editor())\n })\n}\n\nexport function createControl({\n label,\n isActive,\n operation,\n icon,\n isDisabled,\n}: CreateControlProps) {\n return defineComponent({\n name: `RichTextEditor${String(label)}`,\n inheritAttrs: false,\n props: {\n icon: { type: [Object, Function] as PropType<any>, default: undefined },\n active: { type: Boolean, default: undefined },\n interactive: { type: Boolean, default: undefined },\n disabled: { type: Boolean, default: undefined },\n variant: { type: String, default: undefined },\n classNames: { type: [Object, Function], default: undefined },\n styles: { type: [Object, Function], default: undefined },\n },\n setup(props, { attrs }) {\n const ctx = useRichTextEditorContext()\n const editorState = useEditorSelector(\n () => ctx.editor,\n (editor) => {\n const safeEditor = isSafeEditor(editor) ? editor : null\n return {\n active:\n safeEditor && isActive?.name\n ? safeEditor.isActive(isActive.name, isActive.attributes as any)\n : false,\n disabled: safeEditor ? (isDisabled?.(safeEditor) ?? false) : true,\n }\n },\n )\n\n return () => {\n const controlLabel = ctx.labels[label] as string\n\n return h(RichTextEditorControlBase, {\n ...attrs,\n ...props,\n 'aria-label': controlLabel,\n title: controlLabel,\n active: props.active ?? editorState.value.active,\n icon: props.icon || icon,\n disabled: props.disabled ?? editorState.value.disabled,\n onClick: () => {\n if (!isSafeEditor(ctx.editor)) {\n return\n }\n\n ;(ctx.editor as any).chain().focus()[operation.name](operation.attributes).run()\n },\n })\n }\n },\n })\n}\n\nexport function renderControlIcon(Icon: any) {\n return h(Box, { component: Icon, class: classes.controlIcon })\n}\n","import { ColorSwatch, useProps } from '@mantine-vue/core'\nimport { defineComponent, h } from 'vue'\nimport { useRichTextEditorContext } from '../RichTextEditor.context'\nimport { RichTextEditorControl } from './RichTextEditorControl'\n\nexport interface RichTextEditorColorControlProps {\n color: string\n [key: string]: any\n}\n\nexport const RichTextEditorColorControl = defineComponent({\n name: 'RichTextEditorColorControl',\n inheritAttrs: false,\n props: {\n color: { type: String, required: true },\n },\n setup(rawProps, { attrs }) {\n const props = useProps<RichTextEditorColorControlProps>(\n 'RichTextEditorColorControl',\n null,\n rawProps as any,\n )\n const ctx = useRichTextEditorContext()\n\n return () => {\n const currentColor = ctx.editor?.getAttributes('textStyle').color || null\n const label = ctx.labels.colorControlLabel(props.color)\n\n return h(\n RichTextEditorControl,\n {\n ...attrs,\n variant: ctx.variant,\n active: currentColor === props.color,\n 'aria-label': label,\n title: label,\n onClick: () => (ctx.editor?.chain() as any)?.focus().setColor(props.color).run(),\n },\n () => h(ColorSwatch, { color: props.color, size: 14 }),\n )\n }\n },\n})\n","import { defineComponent, h } from 'vue'\n\nexport interface IconProps {\n style?: any\n class?: any\n}\n\nfunction createIcon(name: string, children: any[]) {\n return defineComponent({\n name,\n inheritAttrs: false,\n setup(_, { attrs }) {\n return () =>\n h(\n 'svg',\n {\n ...attrs,\n xmlns: 'http://www.w3.org/2000/svg',\n viewBox: '0 0 24 24',\n strokeWidth: '1.5',\n stroke: 'currentColor',\n fill: 'none',\n strokeLinecap: 'round',\n strokeLinejoin: 'round',\n },\n [h('path', { stroke: 'none', d: 'M0 0h24v24H0z', fill: 'none' }), ...children],\n )\n },\n })\n}\n\nconst path = (d: string) => h('path', { d })\n\nexport const IconBold = createIcon('IconBold', [\n path('M7 5h6a3.5 3.5 0 0 1 0 7h-6z'),\n path('M13 12h1a3.5 3.5 0 0 1 0 7h-7v-7'),\n])\nexport const IconItalic = createIcon('IconItalic', [\n path('M11 5l6 0'),\n path('M7 19l6 0'),\n path('M14 5l-4 14'),\n])\nexport const IconUnderline = createIcon('IconUnderline', [\n path('M7 5v5a5 5 0 0 0 10 0v-5'),\n path('M5 19h14'),\n])\nexport const IconStrikethrough = createIcon('IconStrikethrough', [\n path('M5 12l14 0'),\n path('M16 6.5a4 2 0 0 0 -4 -1.5h-1a3.5 3.5 0 0 0 0 7h2a3.5 3.5 0 0 1 0 7h-1.5a4 2 0 0 1 -4 -1.5'),\n])\nexport const IconClearFormatting = createIcon('IconClearFormatting', [\n path('M17 15l4 4m0 -4l-4 4'),\n path('M7 6v-1h11v1'),\n path('M7 19l4 0'),\n path('M13 5l-4 14'),\n])\nexport const IconH1 = createIcon('IconH1', [\n path('M19 18v-8l-2 2'),\n path('M4 6v12'),\n path('M12 6v12'),\n path('M11 18h2'),\n path('M3 18h2'),\n path('M4 12h8'),\n path('M3 6h2'),\n path('M11 6h2'),\n])\nexport const IconH2 = createIcon('IconH2', [\n path('M17 12a2 2 0 1 1 4 0c0 .591 -.417 1.318 -.816 1.858l-3.184 4.143l4 0'),\n path('M4 6v12'),\n path('M12 6v12'),\n path('M11 18h2'),\n path('M3 18h2'),\n path('M4 12h8'),\n path('M3 6h2'),\n path('M11 6h2'),\n])\nexport const IconH3 = createIcon('IconH3', [\n path('M19 14a2 2 0 1 0 -2 -2'),\n path('M17 16a2 2 0 1 0 2 -2'),\n path('M4 6v12'),\n path('M12 6v12'),\n path('M11 18h2'),\n path('M3 18h2'),\n path('M4 12h8'),\n path('M3 6h2'),\n path('M11 6h2'),\n])\nexport const IconH4 = createIcon('IconH4', [\n path('M20 18v-8l-4 6h5'),\n path('M4 6v12'),\n path('M12 6v12'),\n path('M11 18h2'),\n path('M3 18h2'),\n path('M4 12h8'),\n path('M3 6h2'),\n path('M11 6h2'),\n])\nexport const IconH5 = createIcon('IconH5', [\n path('M17 18h2a2 2 0 1 0 0 -4h-2v-4h4'),\n path('M4 6v12'),\n path('M12 6v12'),\n path('M11 18h2'),\n path('M3 18h2'),\n path('M4 12h8'),\n path('M3 6h2'),\n path('M11 6h2'),\n])\nexport const IconH6 = createIcon('IconH6', [\n path('M19 14a2 2 0 1 0 0 4a2 2 0 0 0 0 -4z'),\n path('M21 12a2 2 0 1 0 -4 0v4'),\n path('M4 6v12'),\n path('M12 6v12'),\n path('M11 18h2'),\n path('M3 18h2'),\n path('M4 12h8'),\n path('M3 6h2'),\n path('M11 6h2'),\n])\nexport const IconList = createIcon('IconList', [\n path('M9 6l11 0'),\n path('M9 12l11 0'),\n path('M9 18l11 0'),\n path('M5 6l0 .01'),\n path('M5 12l0 .01'),\n path('M5 18l0 .01'),\n])\nexport const IconListNumbers = createIcon('IconListNumbers', [\n path('M11 6h9'),\n path('M11 12h9'),\n path('M12 18h8'),\n path('M4 16a2 2 0 1 1 4 0c0 .591 -.5 1 -1 1.5l-3 2.5h4'),\n path('M6 10v-6l-2 2'),\n])\nexport const IconUnlink = createIcon('IconUnlink', [\n path('M17 22v-2'),\n path('M9 15l6 -6'),\n path('M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464'),\n path('M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463'),\n path('M20 17h2'),\n path('M2 7h2'),\n path('M7 2v2'),\n])\nexport const IconBlockquote = createIcon('IconBlockquote', [\n path('M6 15h15'),\n path('M21 19h-15'),\n path('M15 11h6'),\n path('M21 7h-6'),\n path('M9 9h1a1 1 0 1 1 -1 1v-2.5a2 2 0 0 1 2 -2'),\n path('M3 9h1a1 1 0 1 1 -1 1v-2.5a2 2 0 0 1 2 -2'),\n])\nexport const IconAlignLeft = createIcon('IconAlignLeft', [\n path('M4 6l16 0'),\n path('M4 12l10 0'),\n path('M4 18l14 0'),\n])\nexport const IconAlignRight = createIcon('IconAlignRight', [\n path('M4 6l16 0'),\n path('M10 12l10 0'),\n path('M6 18l14 0'),\n])\nexport const IconAlignCenter = createIcon('IconAlignCenter', [\n path('M4 6l16 0'),\n path('M8 12l8 0'),\n path('M6 18l12 0'),\n])\nexport const IconAlignJustified = createIcon('IconAlignJustified', [\n path('M4 6l16 0'),\n path('M4 12l16 0'),\n path('M4 18l12 0'),\n])\nexport const IconSubscript = createIcon('IconSubscript', [\n path('M5 7l8 10m-8 0l8 -10'),\n path('M21 20h-4l3.5 -4a1.73 1.73 0 0 0 -3.5 -2'),\n])\nexport const IconSuperscript = createIcon('IconSuperscript', [\n path('M5 7l8 10m-8 0l8 -10'),\n path('M21 11h-4l3.5 -4a1.73 1.73 0 0 0 -3.5 -2'),\n])\nexport const IconCode = createIcon('IconCode', [\n path('M7 8l-4 4l4 4'),\n path('M17 8l4 4l-4 4'),\n path('M14 4l-4 16'),\n])\nexport const IconHighlight = createIcon('IconHighlight', [\n path('M3 19h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4'),\n path('M12.5 5.5l4 4'),\n path('M4.5 13.5l4 4'),\n path('M21 15v4h-8l4 -4z'),\n])\nexport const IconLineDashed = createIcon('IconLineDashed', [\n path('M5 12h2'),\n path('M17 12h2'),\n path('M11 12h2'),\n])\nexport const IconCircleOff = createIcon('IconCircleOff', [\n path('M20.042 16.045a9 9 0 0 0 -12.087 -12.087m-2.318 1.677a9 9 0 1 0 12.725 12.73'),\n path('M3 3l18 18'),\n])\nexport const IconColorPicker = createIcon('IconColorPicker', [\n path('M11 7l6 6'),\n path('M4 16l11.7 -11.7a1 1 0 0 1 1.4 0l2.6 2.6a1 1 0 0 1 0 1.4l-11.7 11.7h-4v-4z'),\n])\nexport const IconX = createIcon('IconX', [path('M18 6l-12 12'), path('M6 6l12 12')])\nexport const IconPalette = createIcon('IconPalette', [\n path(\n 'M12 21a9 9 0 0 1 0 -18c4.97 0 9 3.582 9 8c0 1.06 -.474 2.078 -1.318 2.828c-.844 .75 -1.989 1.172 -3.182 1.172h-2.5a2 2 0 0 0 -1 3.75a1.3 1.3 0 0 1 -1 2.25',\n ),\n path('M8.5 10.5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0'),\n path('M12.5 7.5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0'),\n path('M16.5 10.5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0'),\n])\nexport const IconCheck = createIcon('IconCheck', [path('M5 12l5 5l10 -10')])\nexport const IconLink = createIcon('IconLink', [\n path('M9 15l6 -6'),\n path('M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464'),\n path('M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463'),\n])\nexport const IconExternalLink = createIcon('IconExternalLink', [\n path('M12 6h-6a2 2 0 0 0 -2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-6'),\n path('M11 13l9 -9'),\n path('M15 4h5v5'),\n])\nexport const IconArrowBackUp = createIcon('IconArrowBackUp', [\n path('M9 14l-4 -4l4 -4'),\n path('M5 10h11a4 4 0 1 1 0 8h-1'),\n])\nexport const IconArrowForwardUp = createIcon('IconArrowForwardUp', [\n path('M15 14l4 -4l-4 -4'),\n path('M19 10h-11a4 4 0 1 0 0 8h1'),\n])\nexport const IconListCheck = createIcon('IconListCheck', [\n path('M3.5 5.5l1.5 1.5l2.5 -2.5'),\n path('M3.5 11.5l1.5 1.5l2.5 -2.5'),\n path('M3.5 17.5l1.5 1.5l2.5 -2.5'),\n path('M11 6l9 0'),\n path('M11 12l9 0'),\n path('M11 18l9 0'),\n])\nexport const IconIndentIncrease = createIcon('IconIndentIncrease', [\n path('M20 6l-11 0'),\n path('M20 12l-7 0'),\n path('M20 18l-11 0'),\n path('M4 8l4 4l-4 4'),\n])\nexport const IconIndentDecrease = createIcon('IconIndentDecrease', [\n path('M20 6l-7 0'),\n path('M20 12l-9 0'),\n path('M20 18l-7 0'),\n path('M8 8l-4 4l4 4'),\n])\nexport const IconBraces = createIcon('IconBraces', [\n path(\n 'M19 3v16a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V7.914a1 1 0 0 1 .293-.707l3.914-3.914A1 1 0 0 1 9.914 3H18a1 1 0 0 1 1 1Z',\n ),\n path('M10 11l-2 2 2 2'),\n path('M14 11l2 2-2 2'),\n])\n","import { defineComponent, h, ref, type PropType } from 'vue'\nimport {\n ActionIcon,\n ColorPicker,\n ColorSwatch,\n Group,\n Popover,\n SimpleGrid,\n rem,\n useProps,\n} from '@mantine-vue/core'\nimport { useDisclosure } from '@mantine-vue/hooks'\nimport { IconCheck, IconCircleOff, IconColorPicker, IconPalette, IconX } from '../icons/Icons'\nimport { useRichTextEditorContext } from '../RichTextEditor.context'\nimport { RichTextEditorControl } from './RichTextEditorControl'\n\nexport interface RichTextEditorColorPickerControlProps {\n popoverProps?: Record<string, any>\n colorPickerProps?: Record<string, any>\n colors: string[]\n [key: string]: any\n}\n\nexport const RichTextEditorColorPickerControl = defineComponent({\n name: 'RichTextEditorColorPickerControl',\n inheritAttrs: false,\n props: {\n popoverProps: { type: Object as PropType<Record<string, any>>, default: undefined },\n colorPickerProps: { type: Object as PropType<Record<string, any>>, default: undefined },\n colors: { type: Array as PropType<string[]>, required: true },\n },\n setup(rawProps, { attrs }) {\n const props = useProps<RichTextEditorColorPickerControlProps>(\n 'RichTextEditorColorPickerControl',\n null,\n rawProps as any,\n )\n const ctx = useRichTextEditorContext()\n const [opened, handlers] = useDisclosure(false)\n const state = ref<'palette' | 'colorPicker'>('palette')\n\n const handleChange = (value: string, shouldClose = true) => {\n ;(ctx.editor?.chain() as any)?.focus().setColor(value).run()\n if (shouldClose) handlers.close()\n }\n\n const handleClear = () => {\n ;(ctx.editor?.chain() as any)?.focus().unsetColor().run()\n handlers.close()\n }\n\n return () => {\n const currentColor =\n ctx.editor?.getAttributes('textStyle').color || 'var(--mantine-color-text)'\n\n return h(\n Popover,\n {\n opened: opened.value,\n withinPortal: true,\n trapFocus: true,\n onChange: (nextOpened: boolean) => !nextOpened && handlers.close(),\n ...props.popoverProps,\n },\n {\n default: () => [\n h(Popover.Target, null, () =>\n h(\n RichTextEditorControl,\n {\n ...attrs,\n variant: ctx.variant,\n 'aria-label': ctx.labels.colorPickerControlLabel,\n title: ctx.labels.colorPickerControlLabel,\n onClick: handlers.toggle,\n },\n () => h(ColorSwatch, { color: currentColor, size: 14 }),\n ),\n ),\n h(Popover.Dropdown, ctx.getStyles('linkEditorDropdown'), () => [\n state.value === 'palette'\n ? h(SimpleGrid, { cols: 7, spacing: 2 }, () =>\n props.colors.map((color, index) =>\n h(ColorSwatch, {\n key: index,\n component: 'button',\n color,\n onClick: () => handleChange(color),\n size: 26,\n radius: 'xs',\n style: { cursor: 'pointer' },\n title: ctx.labels.colorPickerColorLabel(color),\n 'aria-label': ctx.labels.colorPickerColorLabel(color),\n }),\n ),\n )\n : null,\n state.value === 'colorPicker'\n ? h(ColorPicker, {\n defaultValue: currentColor,\n onChange: (value: string) => handleChange(value, false),\n ...props.colorPickerProps,\n })\n : null,\n h(Group, { justify: 'flex-end', gap: 'xs', mt: 'sm' }, () => [\n state.value === 'palette'\n ? h(\n ActionIcon,\n {\n variant: 'default',\n onClick: handlers.close,\n title: ctx.labels.colorPickerCancel,\n 'aria-label': ctx.labels.colorPickerCancel,\n },\n () => h(IconX, { style: { width: rem(16), height: rem(16) } }),\n )\n : null,\n h(\n ActionIcon,\n {\n variant: 'default',\n onClick: handleClear,\n title: ctx.labels.colorPickerClear,\n 'aria-label': ctx.labels.colorPickerClear,\n },\n () => h(IconCircleOff, { style: { width: rem(16), height: rem(16) } }),\n ),\n state.value === 'palette'\n ? h(\n ActionIcon,\n {\n variant: 'default',\n onClick: () => {\n state.value = 'colorPicker'\n },\n title: ctx.labels.colorPickerColorPicker,\n 'aria-label': ctx.labels.colorPickerColorPicker,\n },\n () => h(IconColorPicker, { style: { width: rem(16), height: rem(16) } }),\n )\n : h(\n ActionIcon,\n {\n variant: 'default',\n onClick: () => {\n state.value = 'palette'\n },\n title: ctx.labels.colorPickerPalette,\n 'aria-label': ctx.labels.colorPickerPalette,\n },\n () => h(IconPalette, { style: { width: rem(16), height: rem(16) } }),\n ),\n state.value === 'colorPicker'\n ? h(\n ActionIcon,\n {\n variant: 'default',\n onClick: handlers.close,\n title: ctx.labels.colorPickerSave,\n 'aria-label': ctx.labels.colorPickerSave,\n },\n () => h(IconCheck, { style: { width: rem(16), height: rem(16) } }),\n )\n : null,\n ]),\n ]),\n ],\n },\n )\n }\n },\n})\n","import { defineComponent, h, ref, type PropType } from 'vue'\nimport {\n Button,\n Popover,\n TextInput,\n Tooltip,\n UnstyledButton,\n rem,\n useProps,\n} from '@mantine-vue/core'\nimport { useDisclosure, useWindowEvent } from '@mantine-vue/hooks'\nimport { IconExternalLink, IconLink } from '../icons/Icons'\nimport { useRichTextEditorContext } from '../RichTextEditor.context'\nimport { RichTextEditorControlBase } from './RichTextEditorControl'\nimport classes from '../RichTextEditor.module.css'\n\nexport type RichTextEditorLinkControlStylesNames =\n | 'control'\n | 'linkEditor'\n | 'linkEditorDropdown'\n | 'linkEditorSave'\n | 'linkEditorInput'\n | 'linkEditorExternalControl'\n\nexport interface RichTextEditorLinkControlProps {\n popoverProps?: Record<string, any>\n disableTooltips?: boolean\n initialExternal?: boolean\n icon?: any\n classNames?: any\n styles?: any\n vars?: any\n [key: string]: any\n}\n\nexport const RichTextEditorLinkControl = defineComponent({\n name: 'RichTextEditorLinkControl',\n inheritAttrs: false,\n props: {\n popoverProps: { type: Object as PropType<Record<string, any>>, default: undefined },\n disableTooltips: { type: Boolean, default: false },\n initialExternal: { type: Boolean, default: false },\n icon: { type: [Object, Function] as PropType<any>, default: undefined },\n classNames: { type: [Object, Function], default: undefined },\n styles: { type: [Object, Function], default: undefined },\n vars: { type: [Object, Function], default: undefined },\n },\n setup(rawProps, { attrs }) {\n const props = useProps<RichTextEditorLinkControlProps>(\n 'RichTextEditorLinkControl',\n null,\n rawProps as any,\n )\n const ctx = useRichTextEditorContext()\n const url = ref('')\n const external = ref(props.initialExternal)\n const [opened, handlers] = useDisclosure(false)\n\n const handleOpen = () => {\n handlers.open()\n const linkData = ctx.editor?.getAttributes('link')\n url.value = linkData?.href || ''\n external.value = linkData?.href ? linkData?.target === '_blank' : !!props.initialExternal\n }\n\n const handleClose = () => {\n handlers.close()\n url.value = ''\n external.value = !!props.initialExternal\n }\n\n const setLink = () => {\n handleClose()\n if (url.value === '') {\n ctx.editor?.chain().focus().extendMarkRange('link').unsetLink().run()\n } else {\n ctx.editor\n ?.chain()\n .focus()\n .extendMarkRange('link')\n .setLink({ href: url.value, target: external.value ? '_blank' : null })\n .run()\n }\n }\n\n useWindowEvent('edit-link' as any, handleOpen as any)\n\n return () => {\n const stylesApiProps = { classNames: props.classNames, styles: props.styles }\n const active = ctx.editor && !ctx.editor.isDestroyed ? ctx.editor.isActive('link') : false\n\n return h(\n Popover,\n {\n trapFocus: true,\n shadow: 'md',\n withinPortal: true,\n opened: opened.value,\n onChange: (nextOpened: boolean) => !nextOpened && handleClose(),\n offset: -44,\n zIndex: 10000,\n ...props.popoverProps,\n },\n {\n default: () => [\n h(Popover.Target, null, () =>\n h(RichTextEditorControlBase, {\n ...attrs,\n icon: props.icon || IconLink,\n 'aria-label': ctx.labels.linkControlLabel,\n title: ctx.labels.linkControlLabel,\n onClick: handleOpen,\n active,\n classNames: props.classNames,\n styles: props.styles,\n variant: ctx.variant,\n }),\n ),\n h(Popover.Dropdown, ctx.getStyles('linkEditorDropdown', stylesApiProps), () =>\n h('div', ctx.getStyles('linkEditor', stylesApiProps), [\n h(TextInput, {\n placeholder: ctx.labels.linkEditorInputPlaceholder,\n 'aria-label': ctx.labels.linkEditorInputLabel,\n type: 'url',\n value: url.value,\n onInput: (event: Event) => {\n url.value = (event.currentTarget as HTMLInputElement).value\n },\n classNames: {\n input: ctx.getStyles('linkEditorInput', stylesApiProps).class,\n },\n onKeydown: (event: KeyboardEvent) => {\n if (event.key === 'Enter') {\n event.preventDefault()\n setLink()\n }\n },\n rightSection: () =>\n h(\n Tooltip,\n {\n label: external.value\n ? ctx.labels.linkEditorExternalLink\n : ctx.labels.linkEditorInternalLink,\n events: { hover: true, focus: true, touch: true },\n withinPortal: true,\n withArrow: true,\n disabled: props.disableTooltips,\n zIndex: 10000,\n },\n () =>\n h(\n UnstyledButton,\n {\n onClick: () => {\n external.value = !external.value\n },\n 'data-active': external.value || undefined,\n ...ctx.getStyles('linkEditorExternalControl', stylesApiProps),\n },\n () =>\n h(IconExternalLink, {\n style: { width: rem(14), height: rem(14) },\n }),\n ),\n ),\n }),\n h(\n Button,\n {\n variant: 'default',\n onClick: setLink,\n ...ctx.getStyles('linkEditorSave', stylesApiProps),\n },\n () => ctx.labels.linkEditorSave,\n ),\n ]),\n ),\n ],\n },\n )\n }\n },\n})\n\nObject.assign(RichTextEditorLinkControl, { classes })\n","import { defineComponent, h, ref } from 'vue'\nimport { rem, useProps } from '@mantine-vue/core'\nimport { IconBraces } from '../icons/Icons'\nimport { useRichTextEditorContext } from '../RichTextEditor.context'\nimport { RichTextEditorControl } from './RichTextEditorControl'\n\nexport interface RichTextEditorSourceCodeControlProps {\n [key: string]: any\n}\n\nexport const RichTextEditorSourceCodeControl = defineComponent({\n name: 'RichTextEditorSourceCodeControl',\n inheritAttrs: false,\n setup(rawProps, { attrs }) {\n useProps<RichTextEditorSourceCodeControlProps>(\n 'RichTextEditorSourceCodeControl',\n {},\n rawProps as any,\n )\n const ctx = useRichTextEditorContext()\n const isSourceCodeModeActive = ref(false)\n\n const handleStateChange = () => {\n if (isSourceCodeModeActive.value) {\n ctx.editor?.commands.setContent(ctx.editor.getText(), { emitUpdate: true })\n } else {\n ctx.editor?.commands.setContent(`<textarea>${ctx.editor.getHTML()}</textarea>`)\n }\n\n isSourceCodeModeActive.value = !isSourceCodeModeActive.value\n ctx.onSourceCodeTextSwitch?.(isSourceCodeModeActive.value)\n }\n\n return () =>\n h(\n RichTextEditorControl,\n {\n ...attrs,\n variant: ctx.variant,\n active: isSourceCodeModeActive.value,\n 'aria-label': ctx.labels.sourceCodeControlLabel,\n title: ctx.labels.sourceCodeControlLabel,\n onClick: handleStateChange,\n },\n () => h(IconBraces, { style: { width: rem(16), height: rem(16) } }),\n )\n },\n})\n","import {\n IconAlignCenter,\n IconAlignJustified,\n IconAlignLeft,\n IconAlignRight,\n IconArrowBackUp,\n IconArrowForwardUp,\n IconBlockquote,\n IconBold,\n IconCircleOff,\n IconClearFormatting,\n IconCode,\n IconH1,\n IconH2,\n IconH3,\n IconH4,\n IconH5,\n IconH6,\n IconHighlight,\n IconIndentDecrease,\n IconIndentIncrease,\n IconItalic,\n IconLineDashed,\n IconList,\n IconListCheck,\n IconListNumbers,\n IconStrikethrough,\n IconSubscript,\n IconSuperscript,\n IconUnderline,\n IconUnlink,\n} from '../icons/Icons'\nimport { createControl } from './RichTextEditorControl'\n\nexport const BoldControl = createControl({\n label: 'boldControlLabel',\n icon: IconBold,\n isActive: { name: 'bold' },\n operation: { name: 'toggleBold' },\n})\nexport const ItalicControl = createControl({\n label: 'italicControlLabel',\n icon: IconItalic,\n isActive: { name: 'italic' },\n operation: { name: 'toggleItalic' },\n})\nexport const UnderlineControl = createControl({\n label: 'underlineControlLabel',\n icon: IconUnderline,\n isActive: { name: 'underline' },\n operation: { name: 'toggleUnderline' },\n})\nexport const StrikeThroughControl = createControl({\n label: 'strikeControlLabel',\n icon: IconStrikethrough,\n isActive: { name: 'strike' },\n operation: { name: 'toggleStrike' },\n})\nexport const ClearFormattingControl = createControl({\n label: 'clearFormattingControlLabel',\n icon: IconClearFormatting,\n operation: { name: 'unsetAllMarks' },\n})\nexport const UnlinkControl = createControl({\n label: 'unlinkControlLabel',\n icon: IconUnlink,\n operation: { name: 'unsetLink' },\n})\nexport const BulletListControl = createControl({\n label: 'bulletListControlLabel',\n icon: IconList,\n isActive: { name: 'bulletList' },\n operation: { name: 'toggleBulletList' },\n})\nexport const OrderedListControl = createControl({\n label: 'orderedListControlLabel',\n icon: IconListNumbers,\n isActive: { name: 'orderedList' },\n operation: { name: 'toggleOrderedList' },\n})\nexport const H1Control = createControl({\n label: 'h1ControlLabel',\n icon: IconH1,\n isActive: { name: 'heading', attributes: { level: 1 } },\n operation: { name: 'toggleHeading', attributes: { level: 1 } },\n})\nexport const H2Control = createControl({\n label: 'h2ControlLabel',\n icon: IconH2,\n isActive: { name: 'heading', attributes: { level: 2 } },\n operation: { name: 'toggleHeading', attributes: { level: 2 } },\n})\nexport const H3Control = createControl({\n label: 'h3ControlLabel',\n icon: IconH3,\n isActive: { name: 'heading', attributes: { level: 3 } },\n operation: { name: 'toggleHeading', attributes: { level: 3 } },\n})\nexport const H4Control = createControl({\n label: 'h4ControlLabel',\n icon: IconH4,\n isActive: { name: 'heading', attributes: { level: 4 } },\n operation: { name: 'toggleHeading', attributes: { level: 4 } },\n})\nexport const H5Control = createControl({\n label: 'h5ControlLabel',\n icon: IconH5,\n isActive: { name: 'heading', attributes: { level: 5 } },\n operation: { name: 'toggleHeading', attributes: { level: 5 } },\n})\nexport const H6Control = createControl({\n label: 'h6ControlLabel',\n icon: IconH6,\n isActive: { name: 'heading', attributes: { level: 6 } },\n operation: { name: 'toggleHeading', attributes: { level: 6 } },\n})\nexport const BlockquoteControl = createControl({\n label: 'blockquoteControlLabel',\n icon: IconBlockquote,\n isActive: { name: 'blockquote' },\n operation: { name: 'toggleBlockquote' },\n})\nexport const AlignLeftControl = createControl({\n label: 'alignLeftControlLabel',\n icon: IconAlignLeft,\n operation: { name: 'setTextAlign', attributes: 'left' },\n})\nexport const AlignRightControl = createControl({\n label: 'alignRightControlLabel',\n icon: IconAlignRight,\n operation: { name: 'setTextAlign', attributes: 'right' },\n})\nexport const AlignCenterControl = createControl({\n label: 'alignCenterControlLabel',\n icon: IconAlignCenter,\n operation: { name: 'setTextAlign', attributes: 'center' },\n})\nexport const AlignJustifyControl = createControl({\n label: 'alignJustifyControlLabel',\n icon: IconAlignJustified,\n operation: { name: 'setTextAlign', attributes: 'justify' },\n})\nexport const SubscriptControl = createControl({\n label: 'subscriptControlLabel',\n icon: IconSubscript,\n isActive: { name: 'subscript' },\n operation: { name: 'toggleSubscript' },\n})\nexport const SuperscriptControl = createControl({\n label: 'superscriptControlLabel',\n icon: IconSuperscript,\n isActive: { name: 'superscript' },\n operation: { name: 'toggleSuperscript' },\n})\nexport const CodeControl = createControl({\n label: 'codeControlLabel',\n icon: IconCode,\n isActive: { name: 'code' },\n operation: { name: 'toggleCode' },\n})\nexport const CodeBlockControl = createControl({\n label: 'codeBlockControlLabel',\n icon: IconCode,\n isActive: { name: 'codeBlock' },\n operation: { name: 'toggleCodeBlock' },\n})\nexport const HighlightControl = createControl({\n label: 'highlightControlLabel',\n icon: IconHighlight,\n isActive: { name: 'highlight' },\n operation: { name: 'toggleHighlight' },\n})\nexport const HrControl = createControl({\n label: 'hrControlLabel',\n icon: IconLineDashed,\n operation: { name: 'setHorizontalRule' },\n})\nexport const UnsetColorControl = createControl({\n label: 'unsetColorControlLabel',\n icon: IconCircleOff,\n operation: { name: 'unsetColor' },\n})\nexport const UndoControl = createControl({\n label: 'undoControlLabel',\n icon: IconArrowBackUp,\n isDisabled: (editor) => !(editor?.can() as any)?.undo(),\n operation: { name: 'undo' },\n})\nexport const RedoControl = createControl({\n label: 'redoControlLabel',\n icon: IconArrowForwardUp,\n isDisabled: (editor) => !(editor?.can() as any)?.redo(),\n operation: { name: 'redo' },\n})\nexport const TaskListControl = createControl({\n label: 'tasksControlLabel',\n icon: IconListCheck,\n isActive: { name: 'taskList' },\n operation: { name: 'toggleTaskList' },\n})\nexport const TaskListSinkControl = createControl({\n label: 'tasksSinkLabel',\n icon: IconIndentIncrease,\n operation: { name: 'sinkListItem', attributes: 'taskItem' },\n isDisabled: (editor) => !editor?.can().sinkListItem('taskItem'),\n})\nexport const TaskListLiftControl = createControl({\n label: 'tasksLiftLabel',\n icon: IconIndentDecrease,\n operation: { name: 'liftListItem', attributes: 'taskItem' },\n isDisabled: (editor) => !editor?.can().liftListItem('taskItem'),\n})\n","import { defineComponent, h } from 'vue'\nimport { Box, useProps } from '@mantine-vue/core'\nimport { useRichTextEditorContext } from '../RichTextEditor.context'\nimport classes from '../RichTextEditor.module.css'\n\nexport type RichTextEditorControlsGroupStylesNames = 'controlsGroup'\nexport interface RichTextEditorControlsGroupProps {\n variant?: string\n classNames?: any\n styles?: any\n vars?: any\n [key: string]: any\n}\n\nexport const RichTextEditorControlsGroup = defineComponent({\n name: 'RichTextEditorControlsGroup',\n inheritAttrs: false,\n props: {\n variant: { type: String, default: undefined },\n classNames: { type: [Object, Function], default: undefined },\n styles: { type: [Object, Function], default: undefined },\n vars: { type: [Object, Function], default: undefined },\n },\n setup(rawProps, { attrs, slots }) {\n const props = useProps<RichTextEditorControlsGroupProps>(\n 'RichTextEditorControlsGroup',\n null,\n rawProps as any,\n )\n const ctx = useRichTextEditorContext()\n\n return () =>\n h(\n Box,\n {\n ...attrs,\n variant: props.variant || ctx.variant,\n ...ctx.getStyles('controlsGroup', {\n className: attrs.class,\n style: attrs.style,\n styles: props.styles,\n classNames: props.classNames,\n }),\n },\n slots,\n )\n },\n})\n\nObject.assign(RichTextEditorControlsGroup, { classes })\n","import { defineComponent, h, type PropType } from 'vue'\nimport { Box, rem, useProps } from '@mantine-vue/core'\nimport { useRichTextEditorContext } from '../RichTextEditor.context'\nimport classes from '../RichTextEditor.module.css'\n\nexport type RichTextEditorToolbarStylesNames = 'toolbar'\nexport interface RichTextEditorToolbarProps {\n sticky?: boolean\n stickyOffset?: string | number\n variant?: string\n classNames?: any\n styles?: any\n vars?: any\n mod?: any\n [key: string]: any\n}\n\nexport const RichTextEditorToolbar = defineComponent({\n name: 'RichTextEditorToolbar',\n inheritAttrs: false,\n props: {\n sticky: { type: Boolean, default: false },\n stickyOffset: { type: [String, Number] as PropType<string | number>, default: undefined },\n variant: { type: String, default: undefined },\n classNames: { type: [Object, Function], default: undefined },\n styles: { type: [Object, Function], default: undefined },\n vars: { type: [Object, Function], default: undefined },\n mod: { type: [Object, Array] as PropType<any>, default: undefined },\n },\n setup(rawProps, { attrs, slots }) {\n const props = useProps<RichTextEditorToolbarProps>(\n 'RichTextEditorToolbar',\n null,\n rawProps as any,\n )\n const ctx = useRichTextEditorContext()\n\n return () =>\n h(\n Box,\n {\n ...attrs,\n mod: [{ sticky: props.sticky }, props.mod],\n variant: props.variant || ctx.variant,\n ...ctx.getStyles('toolbar', {\n className: attrs.class,\n style: [attrs.style, { '--rte-sticky-offset': rem(props.stickyOffset) }],\n styles: props.styles,\n classNames: props.classNames,\n }),\n },\n slots,\n )\n },\n})\n\nObject.assign(RichTextEditorToolbar, { classes })\n","import { computed, defineComponent, h, type PropType } from 'vue'\nimport type { Editor } from '@tiptap/vue-3'\nimport { Box, useProps, useStyles } from '@mantine-vue/core'\nimport { DEFAULT_LABELS, type RichTextEditorLabels } from './labels'\nimport { provideRichTextEditorContext } from './RichTextEditor.context'\nimport {\n RichTextEditorContent,\n type RichTextEditorContentProps,\n} from './RichTextEditorContent/RichTextEditorContent'\nimport * as controls from './RichTextEditorControl'\nimport {\n RichTextEditorControl,\n type RichTextEditorControlProps,\n} from './RichTextEditorControl/RichTextEditorControl'\nimport { RichTextEditorColorControl } from './RichTextEditorControl/RichTextEditorColorControl'\nimport { RichTextEditorColorPickerControl } from './RichTextEditorControl/RichTextEditorColorPickerControl'\nimport { RichTextEditorLinkControl } from './RichTextEditorControl/RichTextEditorLinkControl'\nimport { RichTextEditorSourceCodeControl } from './RichTextEditorControl/RichTextEditorSourceCodeControl'\nimport {\n RichTextEditorControlsGroup,\n type RichTextEditorControlsGroupProps,\n} from './RichTextEditorControlsGroup/RichTextEditorControlsGroup'\nimport {\n RichTextEditorToolbar,\n type RichTextEditorToolbarProps,\n} from './RichTextEditorToolbar/RichTextEditorToolbar'\nimport classes from './RichTextEditor.module.css'\n\nexport type RichTextEditorVariant = 'default' | 'subtle'\nexport type RichTextEditorStylesNames =\n | 'linkEditorSave'\n | 'linkEditorDropdown'\n | 'root'\n | 'content'\n | 'Typography'\n | 'control'\n | 'controlIcon'\n | 'controlsGroup'\n | 'toolbar'\n | 'linkEditor'\n | 'linkEditorInput'\n | 'linkEditorExternalControl'\n\nexport interface RichTextEditorProps {\n editor: Editor | null\n withCodeHighlightStyles?: boolean\n withTypographyStyles?: boolean\n onSourceCodeTextSwitch?: (isSourceCodeModeActive: boolean) => void\n labels?: Partial<RichTextEditorLabels>\n variant?: RichTextEditorVariant\n classNames?: any\n styles?: any\n vars?: any\n unstyled?: boolean\n [key: string]: any\n}\n\nexport interface RichTextEditorFactory {\n props: RichTextEditorProps\n stylesNames: RichTextEditorStylesNames\n variant: RichTextEditorVariant\n}\n\nconst defaultProps = {\n withCodeHighlightStyles: true,\n withTypographyStyles: true,\n variant: 'default',\n} satisfies Partial<RichTextEditorProps>\n\nconst RichTextEditorBase = defineComponent({\n name: 'RichTextEditor',\n inheritAttrs: false,\n props: {\n editor: { type: Object as PropType<Editor | null>, default: null },\n withCodeHighlightStyles: { type: Boolean, default: undefined },\n withTypographyStyles: { type: Boolean, default: undefined },\n onSourceCodeTextSwitch: {\n type: Function as PropType<(isSourceCodeModeActive: boolean) => void>,\n default: undefined,\n },\n labels: { type: Object as PropType<Partial<RichTextEditorLabels>>, default: undefined },\n variant: { type: String as PropType<RichTextEditorVariant>, default: undefined },\n classNames: { type: [Object, Function], default: undefined },\n styles: { type: [Object, Function], default: undefined },\n vars: { type: [Object, Function], default: undefined },\n unstyled: { type: Boolean, default: false },\n },\n setup(rawProps, { attrs, slots }) {\n const props = useProps<RichTextEditorProps>('RichTextEditor', defaultProps, rawProps as any)\n const getStyles = useStyles<RichTextEditorFactory>({\n name: 'RichTextEditor',\n classes,\n props,\n className: attrs.class,\n style: attrs.style as any,\n classNames: props.classNames as any,\n styles: props.styles as any,\n vars: props.vars as any,\n unstyled: props.unstyled,\n })\n const mergedLabels = computed(() => ({ ...DEFAULT_LABELS, ...props.labels }))\n\n provideRichTextEditorContext({\n get editor() {\n return props.editor\n },\n getStyles,\n get labels() {\n return mergedLabels.value\n },\n get withCodeHighlightStyles() {\n return props.withCodeHighlightStyles\n },\n get withTypographyStyles() {\n return props.withTypographyStyles\n },\n get onSourceCodeTextSwitch() {\n return props.onSourceCodeTextSwitch\n },\n get unstyled() {\n return props.unstyled\n },\n get variant() {\n return props.variant\n },\n })\n\n return () =>\n h(\n Box,\n {\n ...attrs,\n ...getStyles('root'),\n },\n slots,\n )\n },\n})\n\nexport const RichTextEditor = Object.assign(RichTextEditorBase, {\n classes,\n Content: RichTextEditorContent,\n Control: RichTextEditorControl,\n Toolbar: RichTextEditorToolbar,\n ControlsGroup: RichTextEditorControlsGroup,\n Bold: controls.BoldControl,\n Italic: controls.ItalicControl,\n Strikethrough: controls.StrikeThroughControl,\n Underline: controls.UnderlineControl,\n ClearFormatting: controls.ClearFormattingControl,\n H1: controls.H1Control,\n H2: controls.H2Control,\n H3: controls.H3Control,\n H4: controls.H4Control,\n H5: controls.H5Control,\n H6: controls.H6Control,\n BulletList: controls.BulletListControl,\n OrderedList: controls.OrderedListControl,\n Link: RichTextEditorLinkControl,\n Unlink: controls.UnlinkControl,\n Blockquote: controls.BlockquoteControl,\n AlignLeft: controls.AlignLeftControl,\n AlignRight: controls.AlignRightControl,\n AlignCenter: controls.AlignCenterControl,\n AlignJustify: controls.AlignJustifyControl,\n Superscript: controls.SuperscriptControl,\n Subscript: controls.SubscriptControl,\n Code: controls.CodeControl,\n CodeBlock: controls.CodeBlockControl,\n ColorPicker: RichTextEditorColorPickerControl,\n Color: RichTextEditorColorControl,\n Highlight: controls.HighlightControl,\n Hr: controls.HrControl,\n UnsetColor: controls.UnsetColorControl,\n Undo: controls.UndoControl,\n Redo: controls.RedoControl,\n TaskList: controls.TaskListControl,\n TaskListSink: controls.TaskListSinkControl,\n TaskListLift: controls.TaskListLiftControl,\n SourceCode: RichTextEditorSourceCodeControl,\n})\n\nexport type {\n RichTextEditorContentProps,\n RichTextEditorControlProps,\n RichTextEditorControlsGroupProps,\n RichTextEditorToolbarProps,\n}\n","import TipTapLink from '@tiptap/extension-link'\n\nexport const Link = TipTapLink.extend({\n addKeyboardShortcuts: () => ({\n 'Mod-k': () => {\n window.dispatchEvent(new Event('edit-link'))\n return true\n },\n }),\n}).configure({ openOnClick: false })\n","import classes from '../RichTextEditor.module.css'\n\nexport const getTaskListExtension = <T>(TipTapTaskList: T): T =>\n (TipTapTaskList as any)\n .extend({\n addKeyboardShortcuts: () => ({\n 'Mod-[': ({ editor }: any) => {\n editor.chain().focus().liftListItem('taskItem').run()\n return true\n },\n 'Mod-]': ({ editor }: any) => {\n editor.chain().focus().sinkListItem('taskItem').run()\n return true\n },\n }),\n })\n .configure({\n HTMLAttributes: {\n class: `${classes.taskList} mantine-RichTextEditor-taskList`,\n },\n })\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiDA,IAAa,iBAAuC;CAClD,kBAAkB;CAClB,yBAAyB;CACzB,uBAAuB;CACvB,oBAAoB,UAAU,kBAAkB;CAChD,kBAAkB;CAClB,oBAAoB;CACpB,uBAAuB;CACvB,oBAAoB;CACpB,6BAA6B;CAC7B,oBAAoB;CACpB,wBAAwB;CACxB,yBAAyB;CACzB,wBAAwB;CACxB,gBAAgB;CAChB,gBAAgB;CAChB,gBAAgB;CAChB,gBAAgB;CAChB,gBAAgB;CAChB,gBAAgB;CAChB,wBAAwB;CACxB,uBAAuB;CACvB,yBAAyB;CACzB,wBAAwB;CACxB,0BAA0B;CAC1B,kBAAkB;CAClB,uBAAuB;CACvB,uBAAuB;CACvB,yBAAyB;CACzB,wBAAwB;CACxB,gBAAgB;CAChB,kBAAkB;CACl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CACd,cAAc;CACd,YAAY;AACd,CAAC;;;AClLD,IAAa,OAAO,uBAAA,QAAW,OAAO,EACpC,6BAA6B,EAC3B,eAAe;CACb,OAAO,cAAc,IAAI,MAAM,WAAW,CAAC;CAC3C,OAAO;AACT,EACF,GACF,CAAC,EAAE,UAAU,EAAE,aAAa,MAAM,CAAC;;;ACPnC,IAAa,wBAA2B,mBACrC,eACE,OAAO,EACN,6BAA6B;CAC3B,UAAU,EAAE,aAAkB;EAC5B,OAAO,MAAM,EAAE,MAAM,EAAE,aAAa,UAAU,EAAE,IAAI;EACpD,OAAO;CACT;CACA,UAAU,EAAE,aAAkB;EAC5B,OAAO,MAAM,EAAE,MAAM,EAAE,aAAa,UAAU,EAAE,IAAI;EACpD,OAAO;CACT;AACF,GACF,CAAC,EACA,UAAU,EACT,gBAAgB,EACd,OAAO,GAAG,8BAAQ,SAAS,kCAC7B,EACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.cjs","names":[],"sources":["../src/labels.ts","../src/RichTextEditor.context.ts","../src/RichTextEditor.module.css","../src/RichTextEditor.vue","../src/RichTextEditor.vue","../src/RichTextEditorContent/RichTextEditorContent.vue","../src/RichTextEditorContent/RichTextEditorContent.vue","../src/RichTextEditorContent/RichTextEditorContent.ts","../src/RichTextEditorControl/RichTextEditorControl.vue","../src/RichTextEditorControl/RichTextEditorControl.vue","../src/RichTextEditorControl/RichTextEditorControlBase.vue","../src/RichTextEditorControl/RichTextEditorControlBase.vue","../src/RichTextEditorControl/use-editor-selector.ts","../src/RichTextEditorControl/RichTextEditorGeneratedControl.vue","../src/RichTextEditorControl/RichTextEditorGeneratedControl.vue","../src/RichTextEditorControl/RichTextEditorControl.ts","../src/RichTextEditorControl/RichTextEditorColorControl.vue","../src/RichTextEditorControl/RichTextEditorColorControl.vue","../src/RichTextEditorControl/RichTextEditorColorControl.ts","../src/icons/RichTextEditorIcon.vue","../src/icons/RichTextEditorIcon.vue","../src/icons/RichTextEditorIcon.ts","../src/icons/Icons.ts","../src/RichTextEditorControl/RichTextEditorColorPickerControl.vue","../src/RichTextEditorControl/RichTextEditorColorPickerControl.vue","../src/RichTextEditorControl/RichTextEditorColorPickerControl.ts","../src/RichTextEditorControl/RichTextEditorLinkControl.vue","../src/RichTextEditorControl/RichTextEditorLinkControl.vue","../src/RichTextEditorControl/RichTextEditorLinkControl.ts","../src/RichTextEditorControl/RichTextEditorSourceCodeControl.vue","../src/RichTextEditorControl/RichTextEditorSourceCodeControl.vue","../src/RichTextEditorControl/RichTextEditorSourceCodeControl.ts","../src/RichTextEditorControl/controls.ts","../src/RichTextEditorControlsGroup/RichTextEditorControlsGroup.vue","../src/RichTextEditorControlsGroup/RichTextEditorControlsGroup.vue","../src/RichTextEditorControlsGroup/RichTextEditorControlsGroup.ts","../src/RichTextEditorToolbar/RichTextEditorToolbar.vue","../src/RichTextEditorToolbar/RichTextEditorToolbar.vue","../src/RichTextEditorToolbar/RichTextEditorToolbar.ts","../src/RichTextEditor.ts","../src/extensions/Link.ts","../src/extensions/TaskList.ts"],"sourcesContent":["export interface RichTextEditorLabels {\n boldControlLabel: string\n hrControlLabel: string\n italicControlLabel: string\n underlineControlLabel: string\n strikeControlLabel: string\n clearFormattingControlLabel: string\n linkControlLabel: string\n unlinkControlLabel: string\n bulletListControlLabel: string\n orderedListControlLabel: string\n h1ControlLabel: string\n h2ControlLabel: string\n h3ControlLabel: string\n h4ControlLabel: string\n h5ControlLabel: string\n h6ControlLabel: string\n blockquoteControlLabel: string\n alignLeftControlLabel: string\n alignCenterControlLabel: string\n alignRightControlLabel: string\n alignJustifyControlLabel: string\n codeControlLabel: string\n codeBlockControlLabel: string\n subscriptControlLabel: string\n superscriptControlLabel: string\n colorPickerControlLabel: string\n unsetColorControlLabel: string\n highlightControlLabel: string\n undoControlLabel: string\n redoControlLabel: string\n colorControlLabel: (color: string) => string\n sourceCodeControlLabel: string\n linkEditorInputLabel: string\n linkEditorInputPlaceholder: string\n linkEditorExternalLink: string\n linkEditorInternalLink: string\n linkEditorSave: string\n colorPickerCancel: string\n colorPickerClear: string\n colorPickerColorPicker: string\n colorPickerPalette: string\n colorPickerSave: string\n colorPickerColorLabel: (color: string) => string\n tasksControlLabel: string\n tasksSinkLabel: string\n tasksLiftLabel: string\n}\n\nexport const DEFAULT_LABELS: RichTextEditorLabels = {\n linkControlLabel: 'Link',\n colorPickerControlLabel: 'Text color',\n highlightControlLabel: 'Highlight text',\n colorControlLabel: (color) => `Set text color ${color}`,\n boldControlLabel: 'Bold',\n italicControlLabel: 'Italic',\n underlineControlLabel: 'Underline',\n strikeControlLabel: 'Strikethrough',\n clearFormattingControlLabel: 'Clear formatting',\n unlinkControlLabel: 'Remove link',\n bulletListControlLabel: 'Bullet list',\n orderedListControlLabel: 'Ordered list',\n sourceCodeControlLabel: 'Switch between text/source code',\n h1ControlLabel: 'Heading 1',\n h2ControlLabel: 'Heading 2',\n h3ControlLabel: 'Heading 3',\n h4ControlLabel: 'Heading 4',\n h5ControlLabel: 'Heading 5',\n h6ControlLabel: 'Heading 6',\n blockquoteControlLabel: 'Blockquote',\n alignLeftControlLabel: 'Align text: left',\n alignCenterControlLabel: 'Align text: center',\n alignRightControlLabel: 'Align text: right',\n alignJustifyControlLabel: 'Align text: justify',\n codeControlLabel: 'Code',\n codeBlockControlLabel: 'Code block',\n subscriptControlLabel: 'Subscript',\n superscriptControlLabel: 'Superscript',\n unsetColorControlLabel: 'Unset color',\n hrControlLabel: 'Horizontal line',\n undoControlLabel: 'Undo',\n redoControlLabel: 'Redo',\n tasksControlLabel: 'Task list',\n tasksSinkLabel: 'Decrease task level',\n tasksLiftLabel: 'Increase task level',\n linkEditorInputLabel: 'Enter URL',\n linkEditorInputPlaceholder: 'https://example.com/',\n linkEditorExternalLink: 'Open link in a new tab',\n linkEditorInternalLink: 'Open link in the same tab',\n linkEditorSave: 'Save',\n colorPickerCancel: 'Cancel',\n colorPickerClear: 'Clear color',\n colorPickerColorPicker: 'Color picker',\n colorPickerPalette: 'Color palette',\n colorPickerSave: 'Save',\n colorPickerColorLabel: (color) => `Set text color ${color}`,\n}\n","import type { Editor } from '@tiptap/vue-3'\nimport { createSafeContext } from '@mantine-vue/core'\nimport type { RichTextEditorLabels } from './labels'\n\nexport interface RichTextEditorContextValue {\n getStyles: (\n selector: string,\n options?: {\n active?: boolean\n className?: any\n style?: any\n classNames?: any\n styles?: any\n props?: Record<string, any>\n variant?: string\n },\n ) => Record<string, any>\n editor: Editor | null\n labels: RichTextEditorLabels\n withCodeHighlightStyles: boolean | undefined\n withTypographyStyles: boolean | undefined\n unstyled: boolean | undefined\n variant: string | undefined\n onSourceCodeTextSwitch?: (isSourceCodeModeActive: boolean) => void\n}\n\nexport const [provideRichTextEditorContext, useRichTextEditorContext] =\n createSafeContext<RichTextEditorContextValue>('RichTextEditor component was not found in tree')\n",".root {\n position: relative;\n border: 1px solid;\n border-radius: var(--mantine-radius-default);\n\n @mixin where-light {\n border-color: var(--mantine-color-gray-4);\n }\n\n @mixin where-dark {\n border-color: var(--mantine-color-dark-4);\n }\n}\n\n.Typography {\n padding: 0;\n margin: 0;\n\n & li > p {\n margin: 0;\n }\n\n & ul li,\n & ol li {\n margin-top: 2px;\n }\n\n & p {\n margin-bottom: 7px;\n }\n\n & h1,\n & h2,\n & h3,\n & h4,\n & h5,\n & h6,\n & p {\n margin-top: 0;\n }\n}\n\n.content {\n background-color: var(--mantine-color-body);\n border-radius: var(--mantine-radius-default);\n\n & :global(.ProseMirror) {\n outline: 0;\n padding: var(--mantine-spacing-md);\n }\n\n & :global(.ProseMirror > *:last-child) {\n margin-bottom: 0;\n }\n\n & :global(.ProseMirror p.is-editor-empty:first-of-type::before) {\n content: attr(data-placeholder);\n pointer-events: none;\n user-select: none;\n float: left;\n height: 0;\n color: var(--mantine-color-placeholder);\n }\n\n & :global(div:not(.ProseMirror)) {\n /* Position the bubble menu above the toolbar. As it doesn't have its own selector,\n assert that the non-ProseMirror div is the bubble or floating menu */\n z-index: 2;\n }\n\n & :global(pre) {\n font-family: var(--mantine-font-family-monospace);\n border-radius: var(--mantine-radius-default);\n padding: var(--mantine-spacing-sm) var(--mantine-spacing-md);\n\n @mixin where-light {\n background-color: var(--mantine-color-gray-0);\n color: var(--mantine-color-gray-9);\n --code-color-comment: var(--mantine-color-gray-5);\n --code-color-var: var(--mantine-color-red-7);\n --code-color-number: var(--mantine-color-blue-7);\n --code-color-title: var(--mantine-color-pink-7);\n --code-color-keyword: var(--mantine-color-violet-7);\n }\n\n @mixin where-dark {\n background-color: var(--mantine-color-dark-8);\n color: var(--mantine-color-dark-1);\n --code-color-comment: var(--mantine-color-dark-2);\n --code-color-var: var(--mantine-color-red-5);\n --code-color-number: var(--mantine-color-cyan-5);\n --code-color-title: var(--mantine-color-yellow-5);\n --code-color-keyword: var(--mantine-color-violet-3);\n }\n\n & code {\n background: none !important;\n color: inherit;\n font-size: var(--mantine-font-size-sm);\n padding: 0;\n }\n\n & :global(.hljs-comment),\n & :global(.hljs-quote) {\n color: var(--code-color-comment);\n }\n\n & :global(.hljs-variable),\n & :global(.hljs-template-variable),\n & :global(.hljs-attribute),\n & :global(.hljs-tag),\n & :global(.hljs-regexp),\n & :global(.hljs-link),\n & :global(.hljs-name),\n & :global(.hljs-selector-id),\n & :global(.hljs-selector-class) {\n color: var(--code-color-var);\n }\n\n & :global(.hljs-number),\n & :global(.hljs-meta),\n & :global(.hljs-built_in),\n & :global(.hljs-builtin-name),\n & :global(.hljs-literal),\n & :global(.hljs-type),\n & :global(.hljs-params) {\n color: var(--code-color-number);\n }\n\n & :global(.hljs-string),\n & :global(.hljs-symbol),\n & :global(.hljs-bullet) {\n color: var(--code-color-var);\n }\n\n & :global(.hljs-title),\n & :global(.hljs-section) {\n color: var(--code-color-title);\n }\n\n & :global(.hljs-keyword),\n & :global(.hljs-selector-tag) {\n color: var(--code-color-keyword);\n }\n\n & :global(.hljs-emphasis) {\n font-style: italic;\n }\n\n & :global(.hljs-strong) {\n font-weight: 700;\n }\n }\n}\n\n.linkEditorDropdown {\n background-color: var(--mantine-color-body);\n}\n\n.control {\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: var(--mantine-radius-default);\n cursor: default;\n\n &:where([data-variant='default']) {\n border: 1px solid;\n min-width: 26px;\n height: 26px;\n }\n\n &:where([data-variant='subtle']) {\n --control-icon-size: 20px;\n min-width: 32px;\n height: 32px;\n }\n\n @mixin where-light {\n background-color: var(--mantine-color-white);\n border-color: var(--mantine-color-gray-4);\n color: var(--mantine-color-gray-7);\n }\n\n @mixin where-dark {\n border-color: var(--mantine-color-dark-4);\n color: var(--mantine-color-dark-1);\n\n &:where([data-variant='default']) {\n background-color: var(--mantine-color-dark-6);\n }\n\n &:where([data-variant='subtle']) {\n background-color: var(--mantine-color-dark-7);\n }\n }\n\n &:where([data-disabled]) {\n cursor: not-allowed;\n color: var(--mantine-color-disabled-color);\n background-color: var(--mantine-color-disabled);\n }\n\n &:where([data-interactive]:not([data-disabled])) {\n cursor: pointer;\n\n @mixin hover {\n color: var(--mantine-color-bright);\n\n @mixin where-light {\n &:where([data-variant='default']) {\n background-color: var(--mantine-color-gray-0);\n }\n\n &:where([data-variant='subtle']) {\n background-color: var(--mantine-color-gray-1);\n }\n }\n\n @mixin where-dark {\n background-color: var(--mantine-color-dark-5);\n }\n }\n }\n\n &:where([data-active]) {\n background-color: var(--mantine-primary-color-light);\n color: var(--mantine-primary-color-light-color);\n\n @mixin hover {\n background-color: var(--mantine-primary-color-light-hover);\n }\n }\n}\n\n.controlIcon {\n width: var(--control-icon-size, 16px);\n height: var(--control-icon-size, 16px);\n}\n\n.controlsGroup {\n display: flex;\n background-color: var(--mantine-color-body);\n\n &:where([data-variant='default']) {\n & :where([data-rich-text-editor-control]) {\n border-radius: 0;\n\n &:where(:not(:last-of-type)) {\n border-inline-end-width: 0;\n }\n\n &:where(:last-of-type) {\n border-start-end-radius: var(--mantine-radius-default);\n border-end-end-radius: var(--mantine-radius-default);\n }\n\n &:where(:first-of-type) {\n border-start-start-radius: var(--mantine-radius-default);\n border-end-start-radius: var(--mantine-radius-default);\n }\n }\n }\n}\n\n.linkEditor {\n display: flex;\n}\n\n.linkEditorInput {\n border-start-end-radius: 0;\n border-end-end-radius: 0;\n border-inline-end: 0;\n}\n\n.linkEditorExternalControl {\n border: 1px solid;\n color: var(--mantine-color-text);\n height: 24px;\n width: 24px;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: var(--mantine-radius-default);\n\n @mixin where-light {\n background-color: var(--mantine-color-white);\n border-color: var(--mantine-color-gray-4);\n }\n\n @mixin where-dark {\n background-color: var(--mantine-color-dark-7);\n border-color: var(--mantine-color-dark-4);\n }\n\n &:where([data-active]) {\n background-color: var(--mantine-primary-color-light);\n color: var(--mantine-primary-color-filled);\n\n @mixin hover {\n background-color: var(--mantine-primary-color-light-hover);\n }\n }\n}\n\n.linkEditorSave {\n border-start-start-radius: 0;\n border-end-start-radius: 0;\n}\n\n.toolbar {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: var(--mantine-spacing-sm);\n top: var(--rte-sticky-offset, 0px);\n background-color: var(--mantine-color-body);\n z-index: 1;\n border-start-end-radius: var(--mantine-radius-default);\n border-start-start-radius: var(--mantine-radius-default);\n border-bottom: 1px solid;\n\n &:where([data-variant='default']) {\n padding: var(--mantine-spacing-xs) var(--mantine-spacing-md);\n }\n\n &:where([data-variant='subtle']) {\n padding: 4px;\n row-gap: 0;\n }\n\n @mixin where-light {\n border-color: var(--mantine-color-gray-4);\n }\n\n @mixin where-dark {\n border-color: var(--mantine-color-dark-4);\n }\n\n &:where([data-sticky]) {\n position: sticky;\n }\n}\n\n.taskList {\n list-style-type: none;\n padding: 0;\n padding-inline-start: 0;\n\n & :where(li) {\n margin: 0;\n padding: 0;\n display: flex;\n }\n\n & :where(li[data-checked] > div) {\n flex: 1 1 auto;\n min-width: 0;\n }\n\n & :where(ul) {\n margin-top: 5px;\n }\n\n & p {\n margin: 0;\n padding: 0;\n }\n\n & :where(label) {\n display: inline-block;\n }\n\n & :where(input) {\n cursor: pointer;\n appearance: none;\n width: 18px;\n height: 18px;\n border: 1px solid;\n border-radius: var(--mantine-radius-default);\n vertical-align: middle;\n position: relative;\n\n @mixin where-light {\n background-color: var(--mantine-color-white);\n border-color: var(--mantine-color-gray-4);\n }\n\n @mixin where-dark {\n background-color: var(--mantine-color-dark-6);\n border-color: var(--mantine-color-dark-4);\n }\n\n &:checked {\n background-color: var(--mantine-primary-color-filled);\n border-color: var(--mantine-primary-color-filled);\n\n &::before {\n position: absolute;\n content: '';\n inset: 0;\n background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAxMCA3Ij48cGF0aCBmaWxsPSIjZmZmIiBkPSJNNCA0LjU4NkwxLjcwNyAyLjI5M0ExIDEgMCAxMC4yOTMgMy43MDdsMyAzYS45OTcuOTk3IDAgMDAxLjQxNCAwbDUtNUExIDEgMCAxMDguMjkzLjI5M0w0IDQuNTg2eiIvPjwvc3ZnPg==');\n background-repeat: no-repeat;\n background-size: 10px;\n background-position: center;\n }\n }\n }\n\n & :where(li > label) {\n margin-inline-end: var(--mantine-spacing-sm);\n }\n}\n","<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue'\nimport type { Editor } from '@tiptap/vue-3'\nimport { Box, useProps, useStyles } from '@mantine-vue/core'\nimport { DEFAULT_LABELS } from './labels'\nimport type { RichTextEditorLabels } from './labels'\nimport { provideRichTextEditorContext } from './RichTextEditor.context'\nimport type {\n RichTextEditorFactory,\n RichTextEditorSlots,\n RichTextEditorVariant,\n} from './RichTextEditor.types'\nimport classes from './RichTextEditor.module.css'\n\ndefineOptions({ name: 'RichTextEditor', inheritAttrs: false })\n\ninterface RichTextEditorRuntimeProps {\n editor: Editor | null | undefined\n withCodeHighlightStyles?: boolean\n withTypographyStyles?: boolean\n onSourceCodeTextSwitch?: (isSourceCodeModeActive: boolean) => void\n labels?: Partial<RichTextEditorLabels>\n variant?: RichTextEditorVariant\n classNames?: unknown\n styles?: unknown\n vars?: unknown\n unstyled?: boolean\n}\n\nconst rawProps = withDefaults(defineProps<RichTextEditorRuntimeProps>(), {\n editor: null,\n withCodeHighlightStyles: true,\n withTypographyStyles: true,\n onSourceCodeTextSwitch: undefined,\n labels: undefined,\n variant: 'default',\n classNames: undefined,\n styles: undefined,\n vars: undefined,\n unstyled: undefined,\n})\n\ndefineSlots<RichTextEditorSlots>()\n\nconst attrs = useAttrs()\nconst props = useProps('RichTextEditor', null, rawProps)\nconst getStyles = useStyles<RichTextEditorFactory>({\n name: 'RichTextEditor',\n classes,\n props,\n className: attrs.class,\n style: attrs.style as any,\n classNames: props.classNames as never,\n styles: props.styles as never,\n vars: props.vars as never,\n unstyled: props.unstyled,\n})\nconst mergedLabels = computed(() => ({ ...DEFAULT_LABELS, ...props.labels }))\nconst rootProps = computed(() => {\n const forwarded = { ...attrs }\n delete forwarded.class\n delete forwarded.style\n return { ...getStyles('root'), ...forwarded }\n})\n\nprovideRichTextEditorContext({\n get editor() {\n return props.editor\n },\n getStyles,\n get labels() {\n return mergedLabels.value\n },\n get withCodeHighlightStyles() {\n return props.withCodeHighlightStyles\n },\n get withTypographyStyles() {\n return props.withTypographyStyles\n },\n get onSourceCodeTextSwitch() {\n return props.onSourceCodeTextSwitch\n },\n get unstyled() {\n return props.unstyled\n },\n get variant() {\n return props.variant\n },\n})\n</script>\n\n<template>\n <Box v-bind=\"rootProps\">\n <slot />\n </Box>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue'\nimport type { Editor } from '@tiptap/vue-3'\nimport { Box, useProps, useStyles } from '@mantine-vue/core'\nimport { DEFAULT_LABELS } from './labels'\nimport type { RichTextEditorLabels } from './labels'\nimport { provideRichTextEditorContext } from './RichTextEditor.context'\nimport type {\n RichTextEditorFactory,\n RichTextEditorSlots,\n RichTextEditorVariant,\n} from './RichTextEditor.types'\nimport classes from './RichTextEditor.module.css'\n\ndefineOptions({ name: 'RichTextEditor', inheritAttrs: false })\n\ninterface RichTextEditorRuntimeProps {\n editor: Editor | null | undefined\n withCodeHighlightStyles?: boolean\n withTypographyStyles?: boolean\n onSourceCodeTextSwitch?: (isSourceCodeModeActive: boolean) => void\n labels?: Partial<RichTextEditorLabels>\n variant?: RichTextEditorVariant\n classNames?: unknown\n styles?: unknown\n vars?: unknown\n unstyled?: boolean\n}\n\nconst rawProps = withDefaults(defineProps<RichTextEditorRuntimeProps>(), {\n editor: null,\n withCodeHighlightStyles: true,\n withTypographyStyles: true,\n onSourceCodeTextSwitch: undefined,\n labels: undefined,\n variant: 'default',\n classNames: undefined,\n styles: undefined,\n vars: undefined,\n unstyled: undefined,\n})\n\ndefineSlots<RichTextEditorSlots>()\n\nconst attrs = useAttrs()\nconst props = useProps('RichTextEditor', null, rawProps)\nconst getStyles = useStyles<RichTextEditorFactory>({\n name: 'RichTextEditor',\n classes,\n props,\n className: attrs.class,\n style: attrs.style as any,\n classNames: props.classNames as never,\n styles: props.styles as never,\n vars: props.vars as never,\n unstyled: props.unstyled,\n})\nconst mergedLabels = computed(() => ({ ...DEFAULT_LABELS, ...props.labels }))\nconst rootProps = computed(() => {\n const forwarded = { ...attrs }\n delete forwarded.class\n delete forwarded.style\n return { ...getStyles('root'), ...forwarded }\n})\n\nprovideRichTextEditorContext({\n get editor() {\n return props.editor\n },\n getStyles,\n get labels() {\n return mergedLabels.value\n },\n get withCodeHighlightStyles() {\n return props.withCodeHighlightStyles\n },\n get withTypographyStyles() {\n return props.withTypographyStyles\n },\n get onSourceCodeTextSwitch() {\n return props.onSourceCodeTextSwitch\n },\n get unstyled() {\n return props.unstyled\n },\n get variant() {\n return props.variant\n },\n})\n</script>\n\n<template>\n <Box v-bind=\"rootProps\">\n <slot />\n </Box>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue'\nimport { EditorContent } from '@tiptap/vue-3'\nimport { Box, Typography, useProps } from '@mantine-vue/core'\nimport { useRichTextEditorContext } from '../RichTextEditor.context'\nimport type { RichTextEditorContentRuntimeProps } from './RichTextEditorContent.types'\n\ndefineOptions({ name: 'RichTextEditorContent', inheritAttrs: false })\n\nconst rawProps = withDefaults(defineProps<RichTextEditorContentRuntimeProps>(), {\n classNames: undefined,\n styles: undefined,\n vars: undefined,\n unstyled: undefined,\n})\n\nconst attrs = useAttrs()\nconst props = useProps('RichTextEditorContent', null, rawProps)\nconst ctx = useRichTextEditorContext()\nconst contentProps = computed(() => {\n const forwarded = { ...attrs }\n delete forwarded.class\n delete forwarded.style\n return {\n ...ctx.getStyles('content', {\n classNames: props.classNames,\n styles: props.styles,\n className: ctx.withTypographyStyles ? undefined : attrs.class,\n style: ctx.withTypographyStyles ? undefined : attrs.style,\n }),\n ...forwarded,\n }\n})\nconst typographyProps = computed(() =>\n ctx.getStyles('Typography', {\n className: attrs.class,\n style: attrs.style,\n styles: props.styles,\n classNames: props.classNames,\n }),\n)\n</script>\n\n<template>\n <Typography v-if=\"ctx.withTypographyStyles\" v-bind=\"typographyProps\" :unstyled=\"ctx.unstyled\">\n <Box :component=\"EditorContent\" :editor=\"ctx.editor\" v-bind=\"contentProps\" />\n </Typography>\n <Box v-else :component=\"EditorContent\" :editor=\"ctx.editor\" v-bind=\"contentProps\" />\n</template>\n","<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue'\nimport { EditorContent } from '@tiptap/vue-3'\nimport { Box, Typography, useProps } from '@mantine-vue/core'\nimport { useRichTextEditorContext } from '../RichTextEditor.context'\nimport type { RichTextEditorContentRuntimeProps } from './RichTextEditorContent.types'\n\ndefineOptions({ name: 'RichTextEditorContent', inheritAttrs: false })\n\nconst rawProps = withDefaults(defineProps<RichTextEditorContentRuntimeProps>(), {\n classNames: undefined,\n styles: undefined,\n vars: undefined,\n unstyled: undefined,\n})\n\nconst attrs = useAttrs()\nconst props = useProps('RichTextEditorContent', null, rawProps)\nconst ctx = useRichTextEditorContext()\nconst contentProps = computed(() => {\n const forwarded = { ...attrs }\n delete forwarded.class\n delete forwarded.style\n return {\n ...ctx.getStyles('content', {\n classNames: props.classNames,\n styles: props.styles,\n className: ctx.withTypographyStyles ? undefined : attrs.class,\n style: ctx.withTypographyStyles ? undefined : attrs.style,\n }),\n ...forwarded,\n }\n})\nconst typographyProps = computed(() =>\n ctx.getStyles('Typography', {\n className: attrs.class,\n style: attrs.style,\n styles: props.styles,\n classNames: props.classNames,\n }),\n)\n</script>\n\n<template>\n <Typography v-if=\"ctx.withTypographyStyles\" v-bind=\"typographyProps\" :unstyled=\"ctx.unstyled\">\n <Box :component=\"EditorContent\" :editor=\"ctx.editor\" v-bind=\"contentProps\" />\n </Typography>\n <Box v-else :component=\"EditorContent\" :editor=\"ctx.editor\" v-bind=\"contentProps\" />\n</template>\n","import { factory } from '@mantine-vue/core'\nimport RichTextEditorContentComponent from './RichTextEditorContent.vue'\nimport type { RichTextEditorContentFactory } from './RichTextEditorContent.types'\nimport classes from '../RichTextEditor.module.css'\n\nexport const RichTextEditorContent = factory<RichTextEditorContentFactory>(\n RichTextEditorContentComponent,\n { classes },\n)\n\nexport type {\n RichTextEditorContentFactory,\n RichTextEditorContentOwnProps,\n RichTextEditorContentProps,\n RichTextEditorContentStylesNames,\n} from './RichTextEditorContent.types'\n","<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue'\nimport { UnstyledButton, useProps } from '@mantine-vue/core'\nimport { useRichTextEditorContext } from '../RichTextEditor.context'\nimport type {\n RichTextEditorControlRuntimeProps,\n RichTextEditorControlSlots,\n} from './RichTextEditorControl.types'\n\ndefineOptions({ name: 'RichTextEditorControl', inheritAttrs: false })\n\nconst rawProps = withDefaults(defineProps<RichTextEditorControlRuntimeProps>(), {\n active: undefined,\n interactive: true,\n disabled: undefined,\n variant: undefined,\n classNames: undefined,\n styles: undefined,\n vars: undefined,\n unstyled: undefined,\n})\n\ndefineSlots<RichTextEditorControlSlots>()\n\nconst attrs = useAttrs()\nconst props = useProps('RichTextEditorControl', null, rawProps)\nconst ctx = useRichTextEditorContext()\nconst forwardedAttrs = computed(() => {\n const result = { ...attrs }\n delete result.onMousedown\n return result\n})\nconst controlProps = computed(() => ({\n ...forwardedAttrs.value,\n ...ctx.getStyles('control', {\n className: attrs.class,\n style: attrs.style,\n classNames: props.classNames,\n styles: props.styles,\n }),\n}))\n\nfunction onMousedown(event: MouseEvent) {\n event.preventDefault()\n const handler = attrs.onMousedown\n if (typeof handler === 'function') {\n handler(event)\n }\n}\n</script>\n\n<template>\n <UnstyledButton\n v-bind=\"controlProps\"\n :disabled=\"props.disabled\"\n data-rich-text-editor-control\n :tabindex=\"props.interactive ? 0 : -1\"\n :data-interactive=\"props.interactive || undefined\"\n :data-disabled=\"props.disabled || undefined\"\n :data-active=\"props.active || undefined\"\n :aria-pressed=\"props.active && props.interactive ? true : undefined\"\n :aria-hidden=\"!props.interactive || undefined\"\n :unstyled=\"ctx.unstyled\"\n :variant=\"props.variant || ctx.variant || 'default'\"\n @mousedown=\"onMousedown\"\n >\n <slot />\n </UnstyledButton>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue'\nimport { UnstyledButton, useProps } from '@mantine-vue/core'\nimport { useRichTextEditorContext } from '../RichTextEditor.context'\nimport type {\n RichTextEditorControlRuntimeProps,\n RichTextEditorControlSlots,\n} from './RichTextEditorControl.types'\n\ndefineOptions({ name: 'RichTextEditorControl', inheritAttrs: false })\n\nconst rawProps = withDefaults(defineProps<RichTextEditorControlRuntimeProps>(), {\n active: undefined,\n interactive: true,\n disabled: undefined,\n variant: undefined,\n classNames: undefined,\n styles: undefined,\n vars: undefined,\n unstyled: undefined,\n})\n\ndefineSlots<RichTextEditorControlSlots>()\n\nconst attrs = useAttrs()\nconst props = useProps('RichTextEditorControl', null, rawProps)\nconst ctx = useRichTextEditorContext()\nconst forwardedAttrs = computed(() => {\n const result = { ...attrs }\n delete result.onMousedown\n return result\n})\nconst controlProps = computed(() => ({\n ...forwardedAttrs.value,\n ...ctx.getStyles('control', {\n className: attrs.class,\n style: attrs.style,\n classNames: props.classNames,\n styles: props.styles,\n }),\n}))\n\nfunction onMousedown(event: MouseEvent) {\n event.preventDefault()\n const handler = attrs.onMousedown\n if (typeof handler === 'function') {\n handler(event)\n }\n}\n</script>\n\n<template>\n <UnstyledButton\n v-bind=\"controlProps\"\n :disabled=\"props.disabled\"\n data-rich-text-editor-control\n :tabindex=\"props.interactive ? 0 : -1\"\n :data-interactive=\"props.interactive || undefined\"\n :data-disabled=\"props.disabled || undefined\"\n :data-active=\"props.active || undefined\"\n :aria-pressed=\"props.active && props.interactive ? true : undefined\"\n :aria-hidden=\"!props.interactive || undefined\"\n :unstyled=\"ctx.unstyled\"\n :variant=\"props.variant || ctx.variant || 'default'\"\n @mousedown=\"onMousedown\"\n >\n <slot />\n </UnstyledButton>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue'\nimport { useRichTextEditorContext } from '../RichTextEditor.context'\nimport RichTextEditorControlComponent from './RichTextEditorControl.vue'\nimport type {\n RichTextEditorControlBaseRuntimeProps,\n RichTextEditorControlBaseSlots,\n} from './RichTextEditorControl.types'\n\ndefineOptions({ name: 'RichTextEditorControlBase', inheritAttrs: false })\n\nconst props = defineProps<RichTextEditorControlBaseRuntimeProps>()\ndefineSlots<RichTextEditorControlBaseSlots>()\n\nconst attrs = useAttrs()\nconst ctx = useRichTextEditorContext()\nconst controlProps = computed(() => ({ ...props, ...attrs }))\nconst iconProps = computed(() => ctx.getStyles('controlIcon'))\n</script>\n\n<template>\n <RichTextEditorControlComponent v-bind=\"controlProps\">\n <slot name=\"icon\" v-bind=\"iconProps\">\n <component :is=\"props.icon\" v-bind=\"iconProps\" />\n </slot>\n </RichTextEditorControlComponent>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue'\nimport { useRichTextEditorContext } from '../RichTextEditor.context'\nimport RichTextEditorControlComponent from './RichTextEditorControl.vue'\nimport type {\n RichTextEditorControlBaseRuntimeProps,\n RichTextEditorControlBaseSlots,\n} from './RichTextEditorControl.types'\n\ndefineOptions({ name: 'RichTextEditorControlBase', inheritAttrs: false })\n\nconst props = defineProps<RichTextEditorControlBaseRuntimeProps>()\ndefineSlots<RichTextEditorControlBaseSlots>()\n\nconst attrs = useAttrs()\nconst ctx = useRichTextEditorContext()\nconst controlProps = computed(() => ({ ...props, ...attrs }))\nconst iconProps = computed(() => ctx.getStyles('controlIcon'))\n</script>\n\n<template>\n <RichTextEditorControlComponent v-bind=\"controlProps\">\n <slot name=\"icon\" v-bind=\"iconProps\">\n <component :is=\"props.icon\" v-bind=\"iconProps\" />\n </slot>\n </RichTextEditorControlComponent>\n</template>\n","import { computed, onBeforeUnmount, ref, watch } from 'vue'\nimport type { Editor } from '@tiptap/vue-3'\n\nexport function isSafeEditor(editor: Editor | null): editor is Editor {\n return !!editor && !editor.isDestroyed\n}\n\nexport function useEditorSelector<T>(\n editor: () => Editor | null,\n selector: (editor: Editor | null) => T,\n) {\n const tick = ref(0)\n const update = () => {\n tick.value += 1\n }\n const listen = (current: Editor | null | undefined) => {\n current?.on('transaction', update)\n current?.on('selectionUpdate', update)\n current?.on('update', update)\n }\n const unlisten = (current: Editor | null | undefined) => {\n current?.off('transaction', update)\n current?.off('selectionUpdate', update)\n current?.off('update', update)\n }\n\n const stop = watch(\n editor,\n (current, previous) => {\n unlisten(previous)\n listen(current)\n update()\n },\n { immediate: true },\n )\n\n onBeforeUnmount(() => {\n stop()\n unlisten(editor())\n })\n\n return computed(() => {\n void tick.value\n return selector(editor())\n })\n}\n","<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue'\nimport { useRichTextEditorContext } from '../RichTextEditor.context'\nimport RichTextEditorControlBaseComponent from './RichTextEditorControlBase.vue'\nimport { isSafeEditor, useEditorSelector } from './use-editor-selector'\nimport type {\n RichTextEditorGeneratedControlRuntimeProps,\n RichTextEditorGeneratedControlSlots,\n} from './RichTextEditorControl.types'\n\ndefineOptions({ name: 'RichTextEditorGeneratedControl', inheritAttrs: false })\n\nconst props = withDefaults(defineProps<RichTextEditorGeneratedControlRuntimeProps>(), {\n isActive: undefined,\n isDisabled: undefined,\n active: undefined,\n interactive: true,\n disabled: undefined,\n variant: undefined,\n classNames: undefined,\n styles: undefined,\n vars: undefined,\n unstyled: undefined,\n})\ndefineSlots<RichTextEditorGeneratedControlSlots>()\n\nconst attrs = useAttrs()\nconst ctx = useRichTextEditorContext()\nconst label = computed(() => ctx.labels[props.label] as string)\nconst editorState = useEditorSelector(\n () => ctx.editor,\n (editor) => {\n const safeEditor = isSafeEditor(editor) ? editor : null\n return {\n active:\n safeEditor && props.isActive?.name\n ? safeEditor.isActive(props.isActive.name, props.isActive.attributes as any)\n : false,\n disabled: safeEditor ? (props.isDisabled?.(safeEditor) ?? false) : true,\n }\n },\n)\n\nfunction runOperation() {\n if (!isSafeEditor(ctx.editor)) {\n return\n }\n\n ;(ctx.editor as any).chain().focus()[props.operation.name](props.operation.attributes).run()\n}\n</script>\n\n<template>\n <RichTextEditorControlBaseComponent\n v-bind=\"attrs\"\n :active=\"props.active ?? editorState.active\"\n :interactive=\"props.interactive\"\n :disabled=\"props.disabled ?? editorState.disabled\"\n :variant=\"props.variant\"\n :class-names=\"props.classNames\"\n :styles=\"props.styles\"\n :aria-label=\"label\"\n :title=\"label\"\n @click=\"runOperation\"\n >\n <template #icon=\"iconProps\">\n <slot name=\"icon\" v-bind=\"iconProps\">\n <component :is=\"props.icon\" v-bind=\"iconProps\" />\n </slot>\n </template>\n </RichTextEditorControlBaseComponent>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue'\nimport { useRichTextEditorContext } from '../RichTextEditor.context'\nimport RichTextEditorControlBaseComponent from './RichTextEditorControlBase.vue'\nimport { isSafeEditor, useEditorSelector } from './use-editor-selector'\nimport type {\n RichTextEditorGeneratedControlRuntimeProps,\n RichTextEditorGeneratedControlSlots,\n} from './RichTextEditorControl.types'\n\ndefineOptions({ name: 'RichTextEditorGeneratedControl', inheritAttrs: false })\n\nconst props = withDefaults(defineProps<RichTextEditorGeneratedControlRuntimeProps>(), {\n isActive: undefined,\n isDisabled: undefined,\n active: undefined,\n interactive: true,\n disabled: undefined,\n variant: undefined,\n classNames: undefined,\n styles: undefined,\n vars: undefined,\n unstyled: undefined,\n})\ndefineSlots<RichTextEditorGeneratedControlSlots>()\n\nconst attrs = useAttrs()\nconst ctx = useRichTextEditorContext()\nconst label = computed(() => ctx.labels[props.label] as string)\nconst editorState = useEditorSelector(\n () => ctx.editor,\n (editor) => {\n const safeEditor = isSafeEditor(editor) ? editor : null\n return {\n active:\n safeEditor && props.isActive?.name\n ? safeEditor.isActive(props.isActive.name, props.isActive.attributes as any)\n : false,\n disabled: safeEditor ? (props.isDisabled?.(safeEditor) ?? false) : true,\n }\n },\n)\n\nfunction runOperation() {\n if (!isSafeEditor(ctx.editor)) {\n return\n }\n\n ;(ctx.editor as any).chain().focus()[props.operation.name](props.operation.attributes).run()\n}\n</script>\n\n<template>\n <RichTextEditorControlBaseComponent\n v-bind=\"attrs\"\n :active=\"props.active ?? editorState.active\"\n :interactive=\"props.interactive\"\n :disabled=\"props.disabled ?? editorState.disabled\"\n :variant=\"props.variant\"\n :class-names=\"props.classNames\"\n :styles=\"props.styles\"\n :aria-label=\"label\"\n :title=\"label\"\n @click=\"runOperation\"\n >\n <template #icon=\"iconProps\">\n <slot name=\"icon\" v-bind=\"iconProps\">\n <component :is=\"props.icon\" v-bind=\"iconProps\" />\n </slot>\n </template>\n </RichTextEditorControlBaseComponent>\n</template>\n","import { factory } from '@mantine-vue/core'\nimport RichTextEditorControlComponent from './RichTextEditorControl.vue'\nimport RichTextEditorControlBaseComponent from './RichTextEditorControlBase.vue'\nimport RichTextEditorGeneratedControlComponent from './RichTextEditorGeneratedControl.vue'\nimport type {\n CreateControlProps,\n RichTextEditorControlBaseFactory,\n RichTextEditorControlFactory,\n RichTextEditorGeneratedControlFactory,\n} from './RichTextEditorControl.types'\nimport classes from '../RichTextEditor.module.css'\n\nexport const RichTextEditorControl = factory<RichTextEditorControlFactory>(\n RichTextEditorControlComponent,\n { classes },\n)\n\nexport const RichTextEditorControlBase = factory<RichTextEditorControlBaseFactory>(\n RichTextEditorControlBaseComponent,\n { classes },\n)\n\nconst RichTextEditorGeneratedControl = factory<RichTextEditorGeneratedControlFactory>(\n RichTextEditorGeneratedControlComponent,\n { classes },\n)\n\nexport function createControl(config: CreateControlProps) {\n return RichTextEditorGeneratedControl.withProps(\n config,\n ) as unknown as typeof RichTextEditorControlBase\n}\n\nexport type {\n ControlActiveState,\n ControlOperation,\n CreateControlProps,\n RichTextEditorControlBaseFactory,\n RichTextEditorControlBaseOwnProps,\n RichTextEditorControlBaseProps,\n RichTextEditorControlBaseSlots,\n RichTextEditorControlFactory,\n RichTextEditorControlIconSlotProps,\n RichTextEditorControlOwnProps,\n RichTextEditorControlProps,\n RichTextEditorControlSlots,\n RichTextEditorControlStylesNames,\n} from './RichTextEditorControl.types'\n","<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue'\nimport { ColorSwatch } from '@mantine-vue/core'\nimport { useRichTextEditorContext } from '../RichTextEditor.context'\nimport RichTextEditorControlComponent from './RichTextEditorControl.vue'\nimport type { RichTextEditorColorControlOwnProps } from './RichTextEditorColorControl.types'\nimport { useEditorSelector } from './use-editor-selector'\n\ndefineOptions({ name: 'RichTextEditorColorControl', inheritAttrs: false })\n\nconst props = defineProps<RichTextEditorColorControlOwnProps>()\nconst attrs = useAttrs()\nconst ctx = useRichTextEditorContext()\nconst currentColor = useEditorSelector(\n () => ctx.editor,\n (editor) => String(editor?.getAttributes('textStyle').color || ''),\n)\nconst label = computed(() => ctx.labels.colorControlLabel(props.color))\n\nfunction setColor() {\n ;(ctx.editor?.chain() as any)?.focus().setColor(props.color).run()\n}\n</script>\n\n<template>\n <RichTextEditorControlComponent\n v-bind=\"attrs\"\n :variant=\"ctx.variant\"\n :active=\"currentColor === props.color\"\n :aria-label=\"label\"\n :title=\"label\"\n @click=\"setColor\"\n >\n <ColorSwatch :color=\"props.color\" :size=\"14\" />\n </RichTextEditorControlComponent>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue'\nimport { ColorSwatch } from '@mantine-vue/core'\nimport { useRichTextEditorContext } from '../RichTextEditor.context'\nimport RichTextEditorControlComponent from './RichTextEditorControl.vue'\nimport type { RichTextEditorColorControlOwnProps } from './RichTextEditorColorControl.types'\nimport { useEditorSelector } from './use-editor-selector'\n\ndefineOptions({ name: 'RichTextEditorColorControl', inheritAttrs: false })\n\nconst props = defineProps<RichTextEditorColorControlOwnProps>()\nconst attrs = useAttrs()\nconst ctx = useRichTextEditorContext()\nconst currentColor = useEditorSelector(\n () => ctx.editor,\n (editor) => String(editor?.getAttributes('textStyle').color || ''),\n)\nconst label = computed(() => ctx.labels.colorControlLabel(props.color))\n\nfunction setColor() {\n ;(ctx.editor?.chain() as any)?.focus().setColor(props.color).run()\n}\n</script>\n\n<template>\n <RichTextEditorControlComponent\n v-bind=\"attrs\"\n :variant=\"ctx.variant\"\n :active=\"currentColor === props.color\"\n :aria-label=\"label\"\n :title=\"label\"\n @click=\"setColor\"\n >\n <ColorSwatch :color=\"props.color\" :size=\"14\" />\n </RichTextEditorControlComponent>\n</template>\n","import { factory } from '@mantine-vue/core'\nimport RichTextEditorColorControlComponent from './RichTextEditorColorControl.vue'\nimport type { RichTextEditorColorControlFactory } from './RichTextEditorColorControl.types'\nimport classes from '../RichTextEditor.module.css'\n\nexport const RichTextEditorColorControl = factory<RichTextEditorColorControlFactory>(\n RichTextEditorColorControlComponent,\n { classes },\n)\n\nexport type {\n RichTextEditorColorControlFactory,\n RichTextEditorColorControlProps,\n} from './RichTextEditorColorControl.types'\n","<script setup lang=\"ts\">\nimport { useAttrs } from 'vue'\nimport type { RichTextEditorIconProps } from './RichTextEditorIcon.types'\n\ndefineOptions({ name: 'RichTextEditorIcon', inheritAttrs: false })\n\ndefineProps<RichTextEditorIconProps>()\nconst attrs = useAttrs()\n</script>\n\n<template>\n <svg\n v-bind=\"attrs\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n stroke-width=\"1.5\"\n stroke=\"currentColor\"\n fill=\"none\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path v-for=\"path in paths\" :key=\"path\" :d=\"path\" />\n </svg>\n</template>\n","<script setup lang=\"ts\">\nimport { useAttrs } from 'vue'\nimport type { RichTextEditorIconProps } from './RichTextEditorIcon.types'\n\ndefineOptions({ name: 'RichTextEditorIcon', inheritAttrs: false })\n\ndefineProps<RichTextEditorIconProps>()\nconst attrs = useAttrs()\n</script>\n\n<template>\n <svg\n v-bind=\"attrs\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n stroke-width=\"1.5\"\n stroke=\"currentColor\"\n fill=\"none\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path v-for=\"path in paths\" :key=\"path\" :d=\"path\" />\n </svg>\n</template>\n","import { factory } from '@mantine-vue/core'\nimport RichTextEditorIconComponent from './RichTextEditorIcon.vue'\nimport type { RichTextEditorIconFactory } from './RichTextEditorIcon.types'\n\nexport const RichTextEditorIcon = factory<RichTextEditorIconFactory>(RichTextEditorIconComponent)\n","import type { Component } from 'vue'\nimport { RichTextEditorIcon } from './RichTextEditorIcon'\n\nexport interface IconProps {\n style?: unknown\n class?: unknown\n}\n\nfunction createIcon(_name: string, paths: string[]) {\n return RichTextEditorIcon.withProps({ paths }) as Component<IconProps>\n}\n\nconst path = (d: string) => d\n\nexport const IconBold = createIcon('IconBold', [\n path('M7 5h6a3.5 3.5 0 0 1 0 7h-6z'),\n path('M13 12h1a3.5 3.5 0 0 1 0 7h-7v-7'),\n])\nexport const IconItalic = createIcon('IconItalic', [\n path('M11 5l6 0'),\n path('M7 19l6 0'),\n path('M14 5l-4 14'),\n])\nexport const IconUnderline = createIcon('IconUnderline', [\n path('M7 5v5a5 5 0 0 0 10 0v-5'),\n path('M5 19h14'),\n])\nexport const IconStrikethrough = createIcon('IconStrikethrough', [\n path('M5 12l14 0'),\n path('M16 6.5a4 2 0 0 0 -4 -1.5h-1a3.5 3.5 0 0 0 0 7h2a3.5 3.5 0 0 1 0 7h-1.5a4 2 0 0 1 -4 -1.5'),\n])\nexport const IconClearFormatting = createIcon('IconClearFormatting', [\n path('M17 15l4 4m0 -4l-4 4'),\n path('M7 6v-1h11v1'),\n path('M7 19l4 0'),\n path('M13 5l-4 14'),\n])\nexport const IconH1 = createIcon('IconH1', [\n path('M19 18v-8l-2 2'),\n path('M4 6v12'),\n path('M12 6v12'),\n path('M11 18h2'),\n path('M3 18h2'),\n path('M4 12h8'),\n path('M3 6h2'),\n path('M11 6h2'),\n])\nexport const IconH2 = createIcon('IconH2', [\n path('M17 12a2 2 0 1 1 4 0c0 .591 -.417 1.318 -.816 1.858l-3.184 4.143l4 0'),\n path('M4 6v12'),\n path('M12 6v12'),\n path('M11 18h2'),\n path('M3 18h2'),\n path('M4 12h8'),\n path('M3 6h2'),\n path('M11 6h2'),\n])\nexport const IconH3 = createIcon('IconH3', [\n path('M19 14a2 2 0 1 0 -2 -2'),\n path('M17 16a2 2 0 1 0 2 -2'),\n path('M4 6v12'),\n path('M12 6v12'),\n path('M11 18h2'),\n path('M3 18h2'),\n path('M4 12h8'),\n path('M3 6h2'),\n path('M11 6h2'),\n])\nexport const IconH4 = createIcon('IconH4', [\n path('M20 18v-8l-4 6h5'),\n path('M4 6v12'),\n path('M12 6v12'),\n path('M11 18h2'),\n path('M3 18h2'),\n path('M4 12h8'),\n path('M3 6h2'),\n path('M11 6h2'),\n])\nexport const IconH5 = createIcon('IconH5', [\n path('M17 18h2a2 2 0 1 0 0 -4h-2v-4h4'),\n path('M4 6v12'),\n path('M12 6v12'),\n path('M11 18h2'),\n path('M3 18h2'),\n path('M4 12h8'),\n path('M3 6h2'),\n path('M11 6h2'),\n])\nexport const IconH6 = createIcon('IconH6', [\n path('M19 14a2 2 0 1 0 0 4a2 2 0 0 0 0 -4z'),\n path('M21 12a2 2 0 1 0 -4 0v4'),\n path('M4 6v12'),\n path('M12 6v12'),\n path('M11 18h2'),\n path('M3 18h2'),\n path('M4 12h8'),\n path('M3 6h2'),\n path('M11 6h2'),\n])\nexport const IconList = createIcon('IconList', [\n path('M9 6l11 0'),\n path('M9 12l11 0'),\n path('M9 18l11 0'),\n path('M5 6l0 .01'),\n path('M5 12l0 .01'),\n path('M5 18l0 .01'),\n])\nexport const IconListNumbers = createIcon('IconListNumbers', [\n path('M11 6h9'),\n path('M11 12h9'),\n path('M12 18h8'),\n path('M4 16a2 2 0 1 1 4 0c0 .591 -.5 1 -1 1.5l-3 2.5h4'),\n path('M6 10v-6l-2 2'),\n])\nexport const IconUnlink = createIcon('IconUnlink', [\n path('M17 22v-2'),\n path('M9 15l6 -6'),\n path('M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464'),\n path('M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463'),\n path('M20 17h2'),\n path('M2 7h2'),\n path('M7 2v2'),\n])\nexport const IconBlockquote = createIcon('IconBlockquote', [\n path('M6 15h15'),\n path('M21 19h-15'),\n path('M15 11h6'),\n path('M21 7h-6'),\n path('M9 9h1a1 1 0 1 1 -1 1v-2.5a2 2 0 0 1 2 -2'),\n path('M3 9h1a1 1 0 1 1 -1 1v-2.5a2 2 0 0 1 2 -2'),\n])\nexport const IconAlignLeft = createIcon('IconAlignLeft', [\n path('M4 6l16 0'),\n path('M4 12l10 0'),\n path('M4 18l14 0'),\n])\nexport const IconAlignRight = createIcon('IconAlignRight', [\n path('M4 6l16 0'),\n path('M10 12l10 0'),\n path('M6 18l14 0'),\n])\nexport const IconAlignCenter = createIcon('IconAlignCenter', [\n path('M4 6l16 0'),\n path('M8 12l8 0'),\n path('M6 18l12 0'),\n])\nexport const IconAlignJustified = createIcon('IconAlignJustified', [\n path('M4 6l16 0'),\n path('M4 12l16 0'),\n path('M4 18l12 0'),\n])\nexport const IconSubscript = createIcon('IconSubscript', [\n path('M5 7l8 10m-8 0l8 -10'),\n path('M21 20h-4l3.5 -4a1.73 1.73 0 0 0 -3.5 -2'),\n])\nexport const IconSuperscript = createIcon('IconSuperscript', [\n path('M5 7l8 10m-8 0l8 -10'),\n path('M21 11h-4l3.5 -4a1.73 1.73 0 0 0 -3.5 -2'),\n])\nexport const IconCode = createIcon('IconCode', [\n path('M7 8l-4 4l4 4'),\n path('M17 8l4 4l-4 4'),\n path('M14 4l-4 16'),\n])\nexport const IconHighlight = createIcon('IconHighlight', [\n path('M3 19h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4'),\n path('M12.5 5.5l4 4'),\n path('M4.5 13.5l4 4'),\n path('M21 15v4h-8l4 -4z'),\n])\nexport const IconLineDashed = createIcon('IconLineDashed', [\n path('M5 12h2'),\n path('M17 12h2'),\n path('M11 12h2'),\n])\nexport const IconCircleOff = createIcon('IconCircleOff', [\n path('M20.042 16.045a9 9 0 0 0 -12.087 -12.087m-2.318 1.677a9 9 0 1 0 12.725 12.73'),\n path('M3 3l18 18'),\n])\nexport const IconColorPicker = createIcon('IconColorPicker', [\n path('M11 7l6 6'),\n path('M4 16l11.7 -11.7a1 1 0 0 1 1.4 0l2.6 2.6a1 1 0 0 1 0 1.4l-11.7 11.7h-4v-4z'),\n])\nexport const IconX = createIcon('IconX', [path('M18 6l-12 12'), path('M6 6l12 12')])\nexport const IconPalette = createIcon('IconPalette', [\n path(\n 'M12 21a9 9 0 0 1 0 -18c4.97 0 9 3.582 9 8c0 1.06 -.474 2.078 -1.318 2.828c-.844 .75 -1.989 1.172 -3.182 1.172h-2.5a2 2 0 0 0 -1 3.75a1.3 1.3 0 0 1 -1 2.25',\n ),\n path('M8.5 10.5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0'),\n path('M12.5 7.5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0'),\n path('M16.5 10.5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0'),\n])\nexport const IconCheck = createIcon('IconCheck', [path('M5 12l5 5l10 -10')])\nexport const IconLink = createIcon('IconLink', [\n path('M9 15l6 -6'),\n path('M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464'),\n path('M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463'),\n])\nexport const IconExternalLink = createIcon('IconExternalLink', [\n path('M12 6h-6a2 2 0 0 0 -2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-6'),\n path('M11 13l9 -9'),\n path('M15 4h5v5'),\n])\nexport const IconArrowBackUp = createIcon('IconArrowBackUp', [\n path('M9 14l-4 -4l4 -4'),\n path('M5 10h11a4 4 0 1 1 0 8h-1'),\n])\nexport const IconArrowForwardUp = createIcon('IconArrowForwardUp', [\n path('M15 14l4 -4l-4 -4'),\n path('M19 10h-11a4 4 0 1 0 0 8h1'),\n])\nexport const IconListCheck = createIcon('IconListCheck', [\n path('M3.5 5.5l1.5 1.5l2.5 -2.5'),\n path('M3.5 11.5l1.5 1.5l2.5 -2.5'),\n path('M3.5 17.5l1.5 1.5l2.5 -2.5'),\n path('M11 6l9 0'),\n path('M11 12l9 0'),\n path('M11 18l9 0'),\n])\nexport const IconIndentIncrease = createIcon('IconIndentIncrease', [\n path('M20 6l-11 0'),\n path('M20 12l-7 0'),\n path('M20 18l-11 0'),\n path('M4 8l4 4l-4 4'),\n])\nexport const IconIndentDecrease = createIcon('IconIndentDecrease', [\n path('M20 6l-7 0'),\n path('M20 12l-9 0'),\n path('M20 18l-7 0'),\n path('M8 8l-4 4l4 4'),\n])\nexport const IconBraces = createIcon('IconBraces', [\n path(\n 'M19 3v16a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V7.914a1 1 0 0 1 .293-.707l3.914-3.914A1 1 0 0 1 9.914 3H18a1 1 0 0 1 1 1Z',\n ),\n path('M10 11l-2 2 2 2'),\n path('M14 11l2 2-2 2'),\n])\n","<script setup lang=\"ts\">\nimport { ref, useAttrs } from 'vue'\nimport {\n ActionIcon,\n ColorPicker,\n ColorSwatch,\n Group,\n Popover,\n SimpleGrid,\n Tooltip,\n rem,\n} from '@mantine-vue/core'\nimport { useDisclosure } from '@mantine-vue/hooks'\nimport { IconCheck, IconCircleOff, IconColorPicker, IconPalette, IconX } from '../icons/Icons'\nimport { useRichTextEditorContext } from '../RichTextEditor.context'\nimport RichTextEditorControlComponent from './RichTextEditorControl.vue'\nimport type { RichTextEditorColorPickerControlOwnProps } from './RichTextEditorColorPickerControl.types'\nimport { useEditorSelector } from './use-editor-selector'\n\ndefineOptions({ name: 'RichTextEditorColorPickerControl', inheritAttrs: false })\n\nconst props = defineProps<RichTextEditorColorPickerControlOwnProps>()\nconst attrs = useAttrs()\nconst ctx = useRichTextEditorContext()\nconst [opened, handlers] = useDisclosure(false)\nconst state = ref<'palette' | 'colorPicker'>('palette')\nconst currentColor = useEditorSelector(\n () => ctx.editor,\n (editor) => String(editor?.getAttributes('textStyle').color || 'var(--mantine-color-text)'),\n)\n\nfunction handleChange(value: string, shouldClose = true) {\n ;(ctx.editor?.chain() as any)?.focus().setColor(value).run()\n\n if (shouldClose) {\n handlers.close()\n }\n}\n\nfunction handleClear() {\n ;(ctx.editor?.chain() as any)?.focus().unsetColor().run()\n handlers.close()\n}\n</script>\n\n<template>\n <Popover\n :opened=\"opened\"\n :within-portal=\"true\"\n :trap-focus=\"true\"\n v-bind=\"props.popoverProps\"\n @change=\"(value: boolean) => !value && handlers.close()\"\n >\n <Popover.Target>\n <RichTextEditorControlComponent\n v-bind=\"attrs\"\n :variant=\"ctx.variant\"\n :aria-label=\"ctx.labels.colorPickerControlLabel\"\n :title=\"ctx.labels.colorPickerControlLabel\"\n @click=\"handlers.toggle\"\n >\n <ColorSwatch :color=\"currentColor\" :size=\"14\" />\n </RichTextEditorControlComponent>\n </Popover.Target>\n\n <Popover.Dropdown v-bind=\"ctx.getStyles('linkEditorDropdown')\">\n <SimpleGrid v-if=\"state === 'palette'\" :cols=\"7\" :spacing=\"2\">\n <ColorSwatch\n v-for=\"color in props.colors\"\n :key=\"color\"\n component=\"button\"\n :color=\"color\"\n :size=\"26\"\n radius=\"xs\"\n :style=\"{ cursor: 'pointer' }\"\n :title=\"ctx.labels.colorPickerColorLabel(color)\"\n :aria-label=\"ctx.labels.colorPickerColorLabel(color)\"\n @click=\"handleChange(color)\"\n />\n </SimpleGrid>\n\n <ColorPicker\n v-else\n :model-value=\"currentColor\"\n v-bind=\"props.colorPickerProps\"\n @update:model-value=\"(value) => handleChange(value, false)\"\n />\n\n <Tooltip.Group :close-delay=\"200\">\n <Group justify=\"flex-end\" gap=\"xs\" mt=\"sm\">\n <ActionIcon\n v-if=\"state === 'palette'\"\n variant=\"default\"\n :title=\"ctx.labels.colorPickerCancel\"\n :aria-label=\"ctx.labels.colorPickerCancel\"\n @click=\"handlers.close\"\n >\n <IconX :style=\"{ width: rem(16), height: rem(16) }\" />\n </ActionIcon>\n\n <ActionIcon\n variant=\"default\"\n :title=\"ctx.labels.colorPickerClear\"\n :aria-label=\"ctx.labels.colorPickerClear\"\n @click=\"handleClear\"\n >\n <IconCircleOff :style=\"{ width: rem(16), height: rem(16) }\" />\n </ActionIcon>\n\n <ActionIcon\n variant=\"default\"\n :title=\"\n state === 'palette'\n ? ctx.labels.colorPickerColorPicker\n : ctx.labels.colorPickerPalette\n \"\n :aria-label=\"\n state === 'palette'\n ? ctx.labels.colorPickerColorPicker\n : ctx.labels.colorPickerPalette\n \"\n @click=\"state = state === 'palette' ? 'colorPicker' : 'palette'\"\n >\n <IconColorPicker\n v-if=\"state === 'palette'\"\n :style=\"{ width: rem(16), height: rem(16) }\"\n />\n <IconPalette v-else :style=\"{ width: rem(16), height: rem(16) }\" />\n </ActionIcon>\n\n <ActionIcon\n v-if=\"state === 'colorPicker'\"\n variant=\"default\"\n :title=\"ctx.labels.colorPickerSave\"\n :aria-label=\"ctx.labels.colorPickerSave\"\n @click=\"handlers.close\"\n >\n <IconCheck :style=\"{ width: rem(16), height: rem(16) }\" />\n </ActionIcon>\n </Group>\n </Tooltip.Group>\n </Popover.Dropdown>\n </Popover>\n</template>\n","<script setup lang=\"ts\">\nimport { ref, useAttrs } from 'vue'\nimport {\n ActionIcon,\n ColorPicker,\n ColorSwatch,\n Group,\n Popover,\n SimpleGrid,\n Tooltip,\n rem,\n} from '@mantine-vue/core'\nimport { useDisclosure } from '@mantine-vue/hooks'\nimport { IconCheck, IconCircleOff, IconColorPicker, IconPalette, IconX } from '../icons/Icons'\nimport { useRichTextEditorContext } from '../RichTextEditor.context'\nimport RichTextEditorControlComponent from './RichTextEditorControl.vue'\nimport type { RichTextEditorColorPickerControlOwnProps } from './RichTextEditorColorPickerControl.types'\nimport { useEditorSelector } from './use-editor-selector'\n\ndefineOptions({ name: 'RichTextEditorColorPickerControl', inheritAttrs: false })\n\nconst props = defineProps<RichTextEditorColorPickerControlOwnProps>()\nconst attrs = useAttrs()\nconst ctx = useRichTextEditorContext()\nconst [opened, handlers] = useDisclosure(false)\nconst state = ref<'palette' | 'colorPicker'>('palette')\nconst currentColor = useEditorSelector(\n () => ctx.editor,\n (editor) => String(editor?.getAttributes('textStyle').color || 'var(--mantine-color-text)'),\n)\n\nfunction handleChange(value: string, shouldClose = true) {\n ;(ctx.editor?.chain() as any)?.focus().setColor(value).run()\n\n if (shouldClose) {\n handlers.close()\n }\n}\n\nfunction handleClear() {\n ;(ctx.editor?.chain() as any)?.focus().unsetColor().run()\n handlers.close()\n}\n</script>\n\n<template>\n <Popover\n :opened=\"opened\"\n :within-portal=\"true\"\n :trap-focus=\"true\"\n v-bind=\"props.popoverProps\"\n @change=\"(value: boolean) => !value && handlers.close()\"\n >\n <Popover.Target>\n <RichTextEditorControlComponent\n v-bind=\"attrs\"\n :variant=\"ctx.variant\"\n :aria-label=\"ctx.labels.colorPickerControlLabel\"\n :title=\"ctx.labels.colorPickerControlLabel\"\n @click=\"handlers.toggle\"\n >\n <ColorSwatch :color=\"currentColor\" :size=\"14\" />\n </RichTextEditorControlComponent>\n </Popover.Target>\n\n <Popover.Dropdown v-bind=\"ctx.getStyles('linkEditorDropdown')\">\n <SimpleGrid v-if=\"state === 'palette'\" :cols=\"7\" :spacing=\"2\">\n <ColorSwatch\n v-for=\"color in props.colors\"\n :key=\"color\"\n component=\"button\"\n :color=\"color\"\n :size=\"26\"\n radius=\"xs\"\n :style=\"{ cursor: 'pointer' }\"\n :title=\"ctx.labels.colorPickerColorLabel(color)\"\n :aria-label=\"ctx.labels.colorPickerColorLabel(color)\"\n @click=\"handleChange(color)\"\n />\n </SimpleGrid>\n\n <ColorPicker\n v-else\n :model-value=\"currentColor\"\n v-bind=\"props.colorPickerProps\"\n @update:model-value=\"(value) => handleChange(value, false)\"\n />\n\n <Tooltip.Group :close-delay=\"200\">\n <Group justify=\"flex-end\" gap=\"xs\" mt=\"sm\">\n <ActionIcon\n v-if=\"state === 'palette'\"\n variant=\"default\"\n :title=\"ctx.labels.colorPickerCancel\"\n :aria-label=\"ctx.labels.colorPickerCancel\"\n @click=\"handlers.close\"\n >\n <IconX :style=\"{ width: rem(16), height: rem(16) }\" />\n </ActionIcon>\n\n <ActionIcon\n variant=\"default\"\n :title=\"ctx.labels.colorPickerClear\"\n :aria-label=\"ctx.labels.colorPickerClear\"\n @click=\"handleClear\"\n >\n <IconCircleOff :style=\"{ width: rem(16), height: rem(16) }\" />\n </ActionIcon>\n\n <ActionIcon\n variant=\"default\"\n :title=\"\n state === 'palette'\n ? ctx.labels.colorPickerColorPicker\n : ctx.labels.colorPickerPalette\n \"\n :aria-label=\"\n state === 'palette'\n ? ctx.labels.colorPickerColorPicker\n : ctx.labels.colorPickerPalette\n \"\n @click=\"state = state === 'palette' ? 'colorPicker' : 'palette'\"\n >\n <IconColorPicker\n v-if=\"state === 'palette'\"\n :style=\"{ width: rem(16), height: rem(16) }\"\n />\n <IconPalette v-else :style=\"{ width: rem(16), height: rem(16) }\" />\n </ActionIcon>\n\n <ActionIcon\n v-if=\"state === 'colorPicker'\"\n variant=\"default\"\n :title=\"ctx.labels.colorPickerSave\"\n :aria-label=\"ctx.labels.colorPickerSave\"\n @click=\"handlers.close\"\n >\n <IconCheck :style=\"{ width: rem(16), height: rem(16) }\" />\n </ActionIcon>\n </Group>\n </Tooltip.Group>\n </Popover.Dropdown>\n </Popover>\n</template>\n","import { factory } from '@mantine-vue/core'\nimport RichTextEditorColorPickerControlComponent from './RichTextEditorColorPickerControl.vue'\nimport type { RichTextEditorColorPickerControlFactory } from './RichTextEditorColorPickerControl.types'\nimport classes from '../RichTextEditor.module.css'\n\nexport type {\n RichTextEditorColorPickerControlFactory,\n RichTextEditorColorPickerControlOwnProps,\n RichTextEditorColorPickerControlProps,\n} from './RichTextEditorColorPickerControl.types'\n\nexport const RichTextEditorColorPickerControl = factory<RichTextEditorColorPickerControlFactory>(\n RichTextEditorColorPickerControlComponent,\n { classes },\n)\n","<script setup lang=\"ts\">\nimport { computed, onBeforeUnmount, onMounted, ref, useAttrs } from 'vue'\nimport { Button, Popover, TextInput, Tooltip, UnstyledButton, rem } from '@mantine-vue/core'\nimport { useDisclosure } from '@mantine-vue/hooks'\nimport { IconExternalLink, IconLink } from '../icons/Icons'\nimport { useRichTextEditorContext } from '../RichTextEditor.context'\nimport RichTextEditorControlBaseComponent from './RichTextEditorControlBase.vue'\nimport { isSafeEditor, useEditorSelector } from './use-editor-selector'\nimport type {\n RichTextEditorLinkControlRuntimeProps,\n RichTextEditorLinkControlSlots,\n} from './RichTextEditorLinkControl.types'\n\ndefineOptions({ name: 'RichTextEditorLinkControl', inheritAttrs: false })\n\nconst props = withDefaults(defineProps<RichTextEditorLinkControlRuntimeProps>(), {\n popoverProps: undefined,\n disableTooltips: false,\n initialExternal: false,\n icon: undefined,\n classNames: undefined,\n styles: undefined,\n vars: undefined,\n unstyled: undefined,\n})\ndefineSlots<RichTextEditorLinkControlSlots>()\n\nconst attrs = useAttrs()\nconst ctx = useRichTextEditorContext()\nconst url = ref('')\nconst external = ref(props.initialExternal)\nconst [opened, handlers] = useDisclosure(false)\nconst stylesApiProps = computed(() => ({ classNames: props.classNames, styles: props.styles }))\nconst active = useEditorSelector(\n () => ctx.editor,\n (editor) => (isSafeEditor(editor) ? editor.isActive('link') : false),\n)\n\nfunction open() {\n handlers.open()\n const link = isSafeEditor(ctx.editor) ? ctx.editor.getAttributes('link') : undefined\n url.value = link?.href || ''\n external.value = link?.href ? link.target === '_blank' : props.initialExternal\n}\n\nfunction close() {\n handlers.close()\n url.value = ''\n external.value = props.initialExternal\n}\n\nfunction setLink() {\n close()\n if (!isSafeEditor(ctx.editor)) {\n return\n }\n\n if (url.value === '') {\n ctx.editor.chain().focus().extendMarkRange('link').unsetLink().run()\n } else {\n ctx.editor\n .chain()\n .focus()\n .extendMarkRange('link')\n .setLink({ href: url.value, target: external.value ? '_blank' : null })\n .run()\n }\n}\n\nfunction onKeydown(event: KeyboardEvent) {\n if (event.key === 'Enter') {\n event.preventDefault()\n setLink()\n }\n}\n\nfunction onPopoverChange(nextOpened: boolean) {\n if (!nextOpened) {\n close()\n }\n}\n\nonMounted(() => window.addEventListener('edit-link', open))\nonBeforeUnmount(() => window.removeEventListener('edit-link', open))\n</script>\n\n<template>\n <Popover\n :trap-focus=\"true\"\n shadow=\"md\"\n :within-portal=\"true\"\n :opened=\"opened\"\n :offset=\"-44\"\n :z-index=\"10000\"\n v-bind=\"props.popoverProps\"\n @change=\"onPopoverChange\"\n >\n <Popover.Target>\n <RichTextEditorControlBaseComponent\n v-bind=\"attrs\"\n :aria-label=\"ctx.labels.linkControlLabel\"\n :title=\"ctx.labels.linkControlLabel\"\n :active=\"active\"\n :class-names=\"props.classNames\"\n :styles=\"props.styles\"\n :variant=\"ctx.variant\"\n @click=\"open\"\n >\n <template #icon=\"iconProps\">\n <slot name=\"icon\" v-bind=\"iconProps\">\n <component :is=\"props.icon || IconLink\" v-bind=\"iconProps\" />\n </slot>\n </template>\n </RichTextEditorControlBaseComponent>\n </Popover.Target>\n\n <Popover.Dropdown v-bind=\"ctx.getStyles('linkEditorDropdown', stylesApiProps)\">\n <div v-bind=\"ctx.getStyles('linkEditor', stylesApiProps)\">\n <TextInput\n v-model=\"url\"\n :placeholder=\"ctx.labels.linkEditorInputPlaceholder\"\n :aria-label=\"ctx.labels.linkEditorInputLabel\"\n type=\"url\"\n :class-names=\"{ input: ctx.getStyles('linkEditorInput', stylesApiProps).class }\"\n @keydown=\"onKeydown\"\n >\n <template #rightSection>\n <Tooltip\n :label=\"\n external ? ctx.labels.linkEditorExternalLink : ctx.labels.linkEditorInternalLink\n \"\n :events=\"{ hover: true, focus: true, touch: true }\"\n :within-portal=\"true\"\n :with-arrow=\"true\"\n :disabled=\"props.disableTooltips\"\n :z-index=\"10000\"\n >\n <UnstyledButton\n :data-active=\"external || undefined\"\n v-bind=\"ctx.getStyles('linkEditorExternalControl', stylesApiProps)\"\n @click=\"external = !external\"\n >\n <IconExternalLink :style=\"{ width: rem(14), height: rem(14) }\" />\n </UnstyledButton>\n </Tooltip>\n </template>\n </TextInput>\n\n <Button\n variant=\"default\"\n v-bind=\"ctx.getStyles('linkEditorSave', stylesApiProps)\"\n @click=\"setLink\"\n >\n {{ ctx.labels.linkEditorSave }}\n </Button>\n </div>\n </Popover.Dropdown>\n </Popover>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, onBeforeUnmount, onMounted, ref, useAttrs } from 'vue'\nimport { Button, Popover, TextInput, Tooltip, UnstyledButton, rem } from '@mantine-vue/core'\nimport { useDisclosure } from '@mantine-vue/hooks'\nimport { IconExternalLink, IconLink } from '../icons/Icons'\nimport { useRichTextEditorContext } from '../RichTextEditor.context'\nimport RichTextEditorControlBaseComponent from './RichTextEditorControlBase.vue'\nimport { isSafeEditor, useEditorSelector } from './use-editor-selector'\nimport type {\n RichTextEditorLinkControlRuntimeProps,\n RichTextEditorLinkControlSlots,\n} from './RichTextEditorLinkControl.types'\n\ndefineOptions({ name: 'RichTextEditorLinkControl', inheritAttrs: false })\n\nconst props = withDefaults(defineProps<RichTextEditorLinkControlRuntimeProps>(), {\n popoverProps: undefined,\n disableTooltips: false,\n initialExternal: false,\n icon: undefined,\n classNames: undefined,\n styles: undefined,\n vars: undefined,\n unstyled: undefined,\n})\ndefineSlots<RichTextEditorLinkControlSlots>()\n\nconst attrs = useAttrs()\nconst ctx = useRichTextEditorContext()\nconst url = ref('')\nconst external = ref(props.initialExternal)\nconst [opened, handlers] = useDisclosure(false)\nconst stylesApiProps = computed(() => ({ classNames: props.classNames, styles: props.styles }))\nconst active = useEditorSelector(\n () => ctx.editor,\n (editor) => (isSafeEditor(editor) ? editor.isActive('link') : false),\n)\n\nfunction open() {\n handlers.open()\n const link = isSafeEditor(ctx.editor) ? ctx.editor.getAttributes('link') : undefined\n url.value = link?.href || ''\n external.value = link?.href ? link.target === '_blank' : props.initialExternal\n}\n\nfunction close() {\n handlers.close()\n url.value = ''\n external.value = props.initialExternal\n}\n\nfunction setLink() {\n close()\n if (!isSafeEditor(ctx.editor)) {\n return\n }\n\n if (url.value === '') {\n ctx.editor.chain().focus().extendMarkRange('link').unsetLink().run()\n } else {\n ctx.editor\n .chain()\n .focus()\n .extendMarkRange('link')\n .setLink({ href: url.value, target: external.value ? '_blank' : null })\n .run()\n }\n}\n\nfunction onKeydown(event: KeyboardEvent) {\n if (event.key === 'Enter') {\n event.preventDefault()\n setLink()\n }\n}\n\nfunction onPopoverChange(nextOpened: boolean) {\n if (!nextOpened) {\n close()\n }\n}\n\nonMounted(() => window.addEventListener('edit-link', open))\nonBeforeUnmount(() => window.removeEventListener('edit-link', open))\n</script>\n\n<template>\n <Popover\n :trap-focus=\"true\"\n shadow=\"md\"\n :within-portal=\"true\"\n :opened=\"opened\"\n :offset=\"-44\"\n :z-index=\"10000\"\n v-bind=\"props.popoverProps\"\n @change=\"onPopoverChange\"\n >\n <Popover.Target>\n <RichTextEditorControlBaseComponent\n v-bind=\"attrs\"\n :aria-label=\"ctx.labels.linkControlLabel\"\n :title=\"ctx.labels.linkControlLabel\"\n :active=\"active\"\n :class-names=\"props.classNames\"\n :styles=\"props.styles\"\n :variant=\"ctx.variant\"\n @click=\"open\"\n >\n <template #icon=\"iconProps\">\n <slot name=\"icon\" v-bind=\"iconProps\">\n <component :is=\"props.icon || IconLink\" v-bind=\"iconProps\" />\n </slot>\n </template>\n </RichTextEditorControlBaseComponent>\n </Popover.Target>\n\n <Popover.Dropdown v-bind=\"ctx.getStyles('linkEditorDropdown', stylesApiProps)\">\n <div v-bind=\"ctx.getStyles('linkEditor', stylesApiProps)\">\n <TextInput\n v-model=\"url\"\n :placeholder=\"ctx.labels.linkEditorInputPlaceholder\"\n :aria-label=\"ctx.labels.linkEditorInputLabel\"\n type=\"url\"\n :class-names=\"{ input: ctx.getStyles('linkEditorInput', stylesApiProps).class }\"\n @keydown=\"onKeydown\"\n >\n <template #rightSection>\n <Tooltip\n :label=\"\n external ? ctx.labels.linkEditorExternalLink : ctx.labels.linkEditorInternalLink\n \"\n :events=\"{ hover: true, focus: true, touch: true }\"\n :within-portal=\"true\"\n :with-arrow=\"true\"\n :disabled=\"props.disableTooltips\"\n :z-index=\"10000\"\n >\n <UnstyledButton\n :data-active=\"external || undefined\"\n v-bind=\"ctx.getStyles('linkEditorExternalControl', stylesApiProps)\"\n @click=\"external = !external\"\n >\n <IconExternalLink :style=\"{ width: rem(14), height: rem(14) }\" />\n </UnstyledButton>\n </Tooltip>\n </template>\n </TextInput>\n\n <Button\n variant=\"default\"\n v-bind=\"ctx.getStyles('linkEditorSave', stylesApiProps)\"\n @click=\"setLink\"\n >\n {{ ctx.labels.linkEditorSave }}\n </Button>\n </div>\n </Popover.Dropdown>\n </Popover>\n</template>\n","import { factory } from '@mantine-vue/core'\nimport RichTextEditorLinkControlComponent from './RichTextEditorLinkControl.vue'\nimport type { RichTextEditorLinkControlFactory } from './RichTextEditorLinkControl.types'\nimport classes from '../RichTextEditor.module.css'\n\nexport const RichTextEditorLinkControl = factory<RichTextEditorLinkControlFactory>(\n RichTextEditorLinkControlComponent,\n { classes },\n)\n\nexport type {\n RichTextEditorLinkControlFactory,\n RichTextEditorLinkControlOwnProps,\n RichTextEditorLinkControlProps,\n RichTextEditorLinkControlSlots,\n RichTextEditorLinkControlStylesNames,\n} from './RichTextEditorLinkControl.types'\n","<script setup lang=\"ts\">\nimport { ref, useAttrs } from 'vue'\nimport { rem } from '@mantine-vue/core'\nimport { IconBraces } from '../icons/Icons'\nimport { useRichTextEditorContext } from '../RichTextEditor.context'\nimport RichTextEditorControlComponent from './RichTextEditorControl.vue'\nimport { isSafeEditor } from './use-editor-selector'\n\ndefineOptions({ name: 'RichTextEditorSourceCodeControl', inheritAttrs: false })\n\nconst attrs = useAttrs()\nconst ctx = useRichTextEditorContext()\nconst active = ref(false)\n\nfunction toggleSourceCode() {\n if (!isSafeEditor(ctx.editor)) {\n return\n }\n\n if (active.value) {\n ctx.editor.commands.setContent(ctx.editor.getText(), { emitUpdate: true })\n } else {\n ctx.editor.commands.setContent(`<textarea>${ctx.editor.getHTML()}</textarea>`)\n }\n\n active.value = !active.value\n ctx.onSourceCodeTextSwitch?.(active.value)\n}\n</script>\n\n<template>\n <RichTextEditorControlComponent\n v-bind=\"attrs\"\n :variant=\"ctx.variant\"\n :active=\"active\"\n :aria-label=\"ctx.labels.sourceCodeControlLabel\"\n :title=\"ctx.labels.sourceCodeControlLabel\"\n @click=\"toggleSourceCode\"\n >\n <IconBraces :style=\"{ width: rem(16), height: rem(16) }\" />\n </RichTextEditorControlComponent>\n</template>\n","<script setup lang=\"ts\">\nimport { ref, useAttrs } from 'vue'\nimport { rem } from '@mantine-vue/core'\nimport { IconBraces } from '../icons/Icons'\nimport { useRichTextEditorContext } from '../RichTextEditor.context'\nimport RichTextEditorControlComponent from './RichTextEditorControl.vue'\nimport { isSafeEditor } from './use-editor-selector'\n\ndefineOptions({ name: 'RichTextEditorSourceCodeControl', inheritAttrs: false })\n\nconst attrs = useAttrs()\nconst ctx = useRichTextEditorContext()\nconst active = ref(false)\n\nfunction toggleSourceCode() {\n if (!isSafeEditor(ctx.editor)) {\n return\n }\n\n if (active.value) {\n ctx.editor.commands.setContent(ctx.editor.getText(), { emitUpdate: true })\n } else {\n ctx.editor.commands.setContent(`<textarea>${ctx.editor.getHTML()}</textarea>`)\n }\n\n active.value = !active.value\n ctx.onSourceCodeTextSwitch?.(active.value)\n}\n</script>\n\n<template>\n <RichTextEditorControlComponent\n v-bind=\"attrs\"\n :variant=\"ctx.variant\"\n :active=\"active\"\n :aria-label=\"ctx.labels.sourceCodeControlLabel\"\n :title=\"ctx.labels.sourceCodeControlLabel\"\n @click=\"toggleSourceCode\"\n >\n <IconBraces :style=\"{ width: rem(16), height: rem(16) }\" />\n </RichTextEditorControlComponent>\n</template>\n","import { factory } from '@mantine-vue/core'\nimport RichTextEditorSourceCodeControlComponent from './RichTextEditorSourceCodeControl.vue'\nimport type { RichTextEditorSourceCodeControlFactory } from './RichTextEditorSourceCodeControl.types'\nimport classes from '../RichTextEditor.module.css'\n\nexport const RichTextEditorSourceCodeControl = factory<RichTextEditorSourceCodeControlFactory>(\n RichTextEditorSourceCodeControlComponent,\n { classes },\n)\n\nexport type {\n RichTextEditorSourceCodeControlFactory,\n RichTextEditorSourceCodeControlProps,\n} from './RichTextEditorSourceCodeControl.types'\n","import {\n IconAlignCenter,\n IconAlignJustified,\n IconAlignLeft,\n IconAlignRight,\n IconArrowBackUp,\n IconArrowForwardUp,\n IconBlockquote,\n IconBold,\n IconCircleOff,\n IconClearFormatting,\n IconCode,\n IconH1,\n IconH2,\n IconH3,\n IconH4,\n IconH5,\n IconH6,\n IconHighlight,\n IconIndentDecrease,\n IconIndentIncrease,\n IconItalic,\n IconLineDashed,\n IconList,\n IconListCheck,\n IconListNumbers,\n IconStrikethrough,\n IconSubscript,\n IconSuperscript,\n IconUnderline,\n IconUnlink,\n} from '../icons/Icons'\nimport { createControl } from './RichTextEditorControl'\n\nexport const BoldControl = createControl({\n label: 'boldControlLabel',\n icon: IconBold,\n isActive: { name: 'bold' },\n operation: { name: 'toggleBold' },\n})\nexport const ItalicControl = createControl({\n label: 'italicControlLabel',\n icon: IconItalic,\n isActive: { name: 'italic' },\n operation: { name: 'toggleItalic' },\n})\nexport const UnderlineControl = createControl({\n label: 'underlineControlLabel',\n icon: IconUnderline,\n isActive: { name: 'underline' },\n operation: { name: 'toggleUnderline' },\n})\nexport const StrikeThroughControl = createControl({\n label: 'strikeControlLabel',\n icon: IconStrikethrough,\n isActive: { name: 'strike' },\n operation: { name: 'toggleStrike' },\n})\nexport const ClearFormattingControl = createControl({\n label: 'clearFormattingControlLabel',\n icon: IconClearFormatting,\n operation: { name: 'unsetAllMarks' },\n})\nexport const UnlinkControl = createControl({\n label: 'unlinkControlLabel',\n icon: IconUnlink,\n operation: { name: 'unsetLink' },\n})\nexport const BulletListControl = createControl({\n label: 'bulletListControlLabel',\n icon: IconList,\n isActive: { name: 'bulletList' },\n operation: { name: 'toggleBulletList' },\n})\nexport const OrderedListControl = createControl({\n label: 'orderedListControlLabel',\n icon: IconListNumbers,\n isActive: { name: 'orderedList' },\n operation: { name: 'toggleOrderedList' },\n})\nexport const H1Control = createControl({\n label: 'h1ControlLabel',\n icon: IconH1,\n isActive: { name: 'heading', attributes: { level: 1 } },\n operation: { name: 'toggleHeading', attributes: { level: 1 } },\n})\nexport const H2Control = createControl({\n label: 'h2ControlLabel',\n icon: IconH2,\n isActive: { name: 'heading', attributes: { level: 2 } },\n operation: { name: 'toggleHeading', attributes: { level: 2 } },\n})\nexport const H3Control = createControl({\n label: 'h3ControlLabel',\n icon: IconH3,\n isActive: { name: 'heading', attributes: { level: 3 } },\n operation: { name: 'toggleHeading', attributes: { level: 3 } },\n})\nexport const H4Control = createControl({\n label: 'h4ControlLabel',\n icon: IconH4,\n isActive: { name: 'heading', attributes: { level: 4 } },\n operation: { name: 'toggleHeading', attributes: { level: 4 } },\n})\nexport const H5Control = createControl({\n label: 'h5ControlLabel',\n icon: IconH5,\n isActive: { name: 'heading', attributes: { level: 5 } },\n operation: { name: 'toggleHeading', attributes: { level: 5 } },\n})\nexport const H6Control = createControl({\n label: 'h6ControlLabel',\n icon: IconH6,\n isActive: { name: 'heading', attributes: { level: 6 } },\n operation: { name: 'toggleHeading', attributes: { level: 6 } },\n})\nexport const BlockquoteControl = createControl({\n label: 'blockquoteControlLabel',\n icon: IconBlockquote,\n isActive: { name: 'blockquote' },\n operation: { name: 'toggleBlockquote' },\n})\nexport const AlignLeftControl = createControl({\n label: 'alignLeftControlLabel',\n icon: IconAlignLeft,\n operation: { name: 'setTextAlign', attributes: 'left' },\n})\nexport const AlignRightControl = createControl({\n label: 'alignRightControlLabel',\n icon: IconAlignRight,\n operation: { name: 'setTextAlign', attributes: 'right' },\n})\nexport const AlignCenterControl = createControl({\n label: 'alignCenterControlLabel',\n icon: IconAlignCenter,\n operation: { name: 'setTextAlign', attributes: 'center' },\n})\nexport const AlignJustifyControl = createControl({\n label: 'alignJustifyControlLabel',\n icon: IconAlignJustified,\n operation: { name: 'setTextAlign', attributes: 'justify' },\n})\nexport const SubscriptControl = createControl({\n label: 'subscriptControlLabel',\n icon: IconSubscript,\n isActive: { name: 'subscript' },\n operation: { name: 'toggleSubscript' },\n})\nexport const SuperscriptControl = createControl({\n label: 'superscriptControlLabel',\n icon: IconSuperscript,\n isActive: { name: 'superscript' },\n operation: { name: 'toggleSuperscript' },\n})\nexport const CodeControl = createControl({\n label: 'codeControlLabel',\n icon: IconCode,\n isActive: { name: 'code' },\n operation: { name: 'toggleCode' },\n})\nexport const CodeBlockControl = createControl({\n label: 'codeBlockControlLabel',\n icon: IconCode,\n isActive: { name: 'codeBlock' },\n operation: { name: 'toggleCodeBlock' },\n})\nexport const HighlightControl = createControl({\n label: 'highlightControlLabel',\n icon: IconHighlight,\n isActive: { name: 'highlight' },\n operation: { name: 'toggleHighlight' },\n})\nexport const HrControl = createControl({\n label: 'hrControlLabel',\n icon: IconLineDashed,\n operation: { name: 'setHorizontalRule' },\n})\nexport const UnsetColorControl = createControl({\n label: 'unsetColorControlLabel',\n icon: IconCircleOff,\n operation: { name: 'unsetColor' },\n})\nexport const UndoControl = createControl({\n label: 'undoControlLabel',\n icon: IconArrowBackUp,\n isDisabled: (editor) => !(editor?.can() as any)?.undo(),\n operation: { name: 'undo' },\n})\nexport const RedoControl = createControl({\n label: 'redoControlLabel',\n icon: IconArrowForwardUp,\n isDisabled: (editor) => !(editor?.can() as any)?.redo(),\n operation: { name: 'redo' },\n})\nexport const TaskListControl = createControl({\n label: 'tasksControlLabel',\n icon: IconListCheck,\n isActive: { name: 'taskList' },\n operation: { name: 'toggleTaskList' },\n})\nexport const TaskListSinkControl = createControl({\n label: 'tasksSinkLabel',\n icon: IconIndentIncrease,\n operation: { name: 'sinkListItem', attributes: 'taskItem' },\n isDisabled: (editor) => !editor?.can().sinkListItem('taskItem'),\n})\nexport const TaskListLiftControl = createControl({\n label: 'tasksLiftLabel',\n icon: IconIndentDecrease,\n operation: { name: 'liftListItem', attributes: 'taskItem' },\n isDisabled: (editor) => !editor?.can().liftListItem('taskItem'),\n})\n","<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue'\nimport { Box, useProps } from '@mantine-vue/core'\nimport { useRichTextEditorContext } from '../RichTextEditor.context'\nimport type {\n RichTextEditorControlsGroupRuntimeProps,\n RichTextEditorControlsGroupSlots,\n} from './RichTextEditorControlsGroup.types'\n\ndefineOptions({ name: 'RichTextEditorControlsGroup', inheritAttrs: false })\n\nconst rawProps = withDefaults(defineProps<RichTextEditorControlsGroupRuntimeProps>(), {\n classNames: undefined,\n styles: undefined,\n vars: undefined,\n unstyled: undefined,\n variant: undefined,\n})\n\ndefineSlots<RichTextEditorControlsGroupSlots>()\n\nconst attrs = useAttrs()\nconst props = useProps('RichTextEditorControlsGroup', null, rawProps)\nconst ctx = useRichTextEditorContext()\nconst rootProps = computed(() => ({\n ...attrs,\n variant: props.variant || ctx.variant,\n ...ctx.getStyles('controlsGroup', {\n className: attrs.class,\n style: attrs.style,\n styles: props.styles,\n classNames: props.classNames,\n }),\n}))\n</script>\n\n<template>\n <Box v-bind=\"rootProps\">\n <slot />\n </Box>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue'\nimport { Box, useProps } from '@mantine-vue/core'\nimport { useRichTextEditorContext } from '../RichTextEditor.context'\nimport type {\n RichTextEditorControlsGroupRuntimeProps,\n RichTextEditorControlsGroupSlots,\n} from './RichTextEditorControlsGroup.types'\n\ndefineOptions({ name: 'RichTextEditorControlsGroup', inheritAttrs: false })\n\nconst rawProps = withDefaults(defineProps<RichTextEditorControlsGroupRuntimeProps>(), {\n classNames: undefined,\n styles: undefined,\n vars: undefined,\n unstyled: undefined,\n variant: undefined,\n})\n\ndefineSlots<RichTextEditorControlsGroupSlots>()\n\nconst attrs = useAttrs()\nconst props = useProps('RichTextEditorControlsGroup', null, rawProps)\nconst ctx = useRichTextEditorContext()\nconst rootProps = computed(() => ({\n ...attrs,\n variant: props.variant || ctx.variant,\n ...ctx.getStyles('controlsGroup', {\n className: attrs.class,\n style: attrs.style,\n styles: props.styles,\n classNames: props.classNames,\n }),\n}))\n</script>\n\n<template>\n <Box v-bind=\"rootProps\">\n <slot />\n </Box>\n</template>\n","import { factory } from '@mantine-vue/core'\nimport RichTextEditorControlsGroupComponent from './RichTextEditorControlsGroup.vue'\nimport type { RichTextEditorControlsGroupFactory } from './RichTextEditorControlsGroup.types'\nimport classes from '../RichTextEditor.module.css'\n\nexport const RichTextEditorControlsGroup = factory<RichTextEditorControlsGroupFactory>(\n RichTextEditorControlsGroupComponent,\n { classes },\n)\n\nexport type {\n RichTextEditorControlsGroupFactory,\n RichTextEditorControlsGroupOwnProps,\n RichTextEditorControlsGroupProps,\n RichTextEditorControlsGroupSlots,\n RichTextEditorControlsGroupStylesNames,\n} from './RichTextEditorControlsGroup.types'\n","<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue'\nimport { Box, rem, useProps } from '@mantine-vue/core'\nimport { useRichTextEditorContext } from '../RichTextEditor.context'\nimport type {\n RichTextEditorToolbarRuntimeProps,\n RichTextEditorToolbarSlots,\n} from './RichTextEditorToolbar.types'\n\ndefineOptions({ name: 'RichTextEditorToolbar', inheritAttrs: false })\n\nconst rawProps = withDefaults(defineProps<RichTextEditorToolbarRuntimeProps>(), {\n sticky: false,\n stickyOffset: undefined,\n mod: undefined,\n variant: undefined,\n classNames: undefined,\n styles: undefined,\n vars: undefined,\n unstyled: undefined,\n})\n\ndefineSlots<RichTextEditorToolbarSlots>()\n\nconst attrs = useAttrs()\nconst props = useProps('RichTextEditorToolbar', null, rawProps)\nconst ctx = useRichTextEditorContext()\nconst rootProps = computed(() => ({\n ...attrs,\n mod: [{ sticky: props.sticky }, props.mod],\n variant: props.variant || ctx.variant,\n ...ctx.getStyles('toolbar', {\n className: attrs.class,\n style: [attrs.style, { '--rte-sticky-offset': rem(props.stickyOffset) }],\n styles: props.styles,\n classNames: props.classNames,\n }),\n}))\n</script>\n\n<template>\n <Box v-bind=\"rootProps\">\n <slot />\n </Box>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue'\nimport { Box, rem, useProps } from '@mantine-vue/core'\nimport { useRichTextEditorContext } from '../RichTextEditor.context'\nimport type {\n RichTextEditorToolbarRuntimeProps,\n RichTextEditorToolbarSlots,\n} from './RichTextEditorToolbar.types'\n\ndefineOptions({ name: 'RichTextEditorToolbar', inheritAttrs: false })\n\nconst rawProps = withDefaults(defineProps<RichTextEditorToolbarRuntimeProps>(), {\n sticky: false,\n stickyOffset: undefined,\n mod: undefined,\n variant: undefined,\n classNames: undefined,\n styles: undefined,\n vars: undefined,\n unstyled: undefined,\n})\n\ndefineSlots<RichTextEditorToolbarSlots>()\n\nconst attrs = useAttrs()\nconst props = useProps('RichTextEditorToolbar', null, rawProps)\nconst ctx = useRichTextEditorContext()\nconst rootProps = computed(() => ({\n ...attrs,\n mod: [{ sticky: props.sticky }, props.mod],\n variant: props.variant || ctx.variant,\n ...ctx.getStyles('toolbar', {\n className: attrs.class,\n style: [attrs.style, { '--rte-sticky-offset': rem(props.stickyOffset) }],\n styles: props.styles,\n classNames: props.classNames,\n }),\n}))\n</script>\n\n<template>\n <Box v-bind=\"rootProps\">\n <slot />\n </Box>\n</template>\n","import { factory } from '@mantine-vue/core'\nimport RichTextEditorToolbarComponent from './RichTextEditorToolbar.vue'\nimport type { RichTextEditorToolbarFactory } from './RichTextEditorToolbar.types'\nimport classes from '../RichTextEditor.module.css'\n\nexport const RichTextEditorToolbar = factory<RichTextEditorToolbarFactory>(\n RichTextEditorToolbarComponent,\n { classes },\n)\n\nexport type {\n RichTextEditorToolbarFactory,\n RichTextEditorToolbarOwnProps,\n RichTextEditorToolbarProps,\n RichTextEditorToolbarSlots,\n RichTextEditorToolbarStylesNames,\n} from './RichTextEditorToolbar.types'\n","import { factory } from '@mantine-vue/core'\nimport RichTextEditorComponent from './RichTextEditor.vue'\nimport { RichTextEditorContent } from './RichTextEditorContent/RichTextEditorContent'\nimport * as controls from './RichTextEditorControl'\nimport { RichTextEditorControl } from './RichTextEditorControl/RichTextEditorControl'\nimport { RichTextEditorColorControl } from './RichTextEditorControl/RichTextEditorColorControl'\nimport { RichTextEditorColorPickerControl } from './RichTextEditorControl/RichTextEditorColorPickerControl'\nimport { RichTextEditorLinkControl } from './RichTextEditorControl/RichTextEditorLinkControl'\nimport { RichTextEditorSourceCodeControl } from './RichTextEditorControl/RichTextEditorSourceCodeControl'\nimport { RichTextEditorControlsGroup } from './RichTextEditorControlsGroup/RichTextEditorControlsGroup'\nimport { RichTextEditorToolbar } from './RichTextEditorToolbar/RichTextEditorToolbar'\nimport type { RichTextEditorFactory } from './RichTextEditor.types'\nimport classes from './RichTextEditor.module.css'\n\nexport const RichTextEditor = factory<RichTextEditorFactory>(RichTextEditorComponent, {\n classes,\n Content: RichTextEditorContent,\n Control: RichTextEditorControl,\n Toolbar: RichTextEditorToolbar,\n ControlsGroup: RichTextEditorControlsGroup,\n Bold: controls.BoldControl,\n Italic: controls.ItalicControl,\n Strikethrough: controls.StrikeThroughControl,\n Underline: controls.UnderlineControl,\n ClearFormatting: controls.ClearFormattingControl,\n H1: controls.H1Control,\n H2: controls.H2Control,\n H3: controls.H3Control,\n H4: controls.H4Control,\n H5: controls.H5Control,\n H6: controls.H6Control,\n BulletList: controls.BulletListControl,\n OrderedList: controls.OrderedListControl,\n Link: RichTextEditorLinkControl,\n Unlink: controls.UnlinkControl,\n Blockquote: controls.BlockquoteControl,\n AlignLeft: controls.AlignLeftControl,\n AlignRight: controls.AlignRightControl,\n AlignCenter: controls.AlignCenterControl,\n AlignJustify: controls.AlignJustifyControl,\n Superscript: controls.SuperscriptControl,\n Subscript: controls.SubscriptControl,\n Code: controls.CodeControl,\n CodeBlock: controls.CodeBlockControl,\n ColorPicker: RichTextEditorColorPickerControl,\n Color: RichTextEditorColorControl,\n Highlight: controls.HighlightControl,\n Hr: controls.HrControl,\n UnsetColor: controls.UnsetColorControl,\n Undo: controls.UndoControl,\n Redo: controls.RedoControl,\n TaskList: controls.TaskListControl,\n TaskListSink: controls.TaskListSinkControl,\n TaskListLift: controls.TaskListLiftControl,\n SourceCode: RichTextEditorSourceCodeControl,\n})\n\nexport type {\n RichTextEditorFactory,\n RichTextEditorOwnProps,\n RichTextEditorProps,\n RichTextEditorSlots,\n RichTextEditorStylesNames,\n RichTextEditorVariant,\n} from './RichTextEditor.types'\nexport type { RichTextEditorContentProps } from './RichTextEditorContent/RichTextEditorContent.types'\nexport type { RichTextEditorControlProps } from './RichTextEditorControl/RichTextEditorControl.types'\nexport type { RichTextEditorControlsGroupProps } from './RichTextEditorControlsGroup/RichTextEditorControlsGroup.types'\nexport type { RichTextEditorToolbarProps } from './RichTextEditorToolbar/RichTextEditorToolbar.types'\n","import TipTapLink from '@tiptap/extension-link'\n\nexport const Link = TipTapLink.extend({\n addKeyboardShortcuts: () => ({\n 'Mod-k': () => {\n window.dispatchEvent(new Event('edit-link'))\n return true\n },\n }),\n}).configure({ openOnClick: false })\n","import classes from '../RichTextEditor.module.css'\n\nexport const getTaskListExtension = <T>(TipTapTaskList: T): T =>\n (TipTapTaskList as any)\n .extend({\n addKeyboardShortcuts: () => ({\n 'Mod-[': ({ editor }: any) => {\n editor.chain().focus().liftListItem('taskItem').run()\n return true\n },\n 'Mod-]': ({ editor }: any) => {\n editor.chain().focus().sinkListItem('taskItem').run()\n return true\n },\n }),\n })\n .configure({\n HTMLAttributes: {\n class: `${classes.taskList} mantine-RichTextEditor-taskList`,\n },\n })\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiDA,IAAa,iBAAuC;CAClD,kBAAkB;CAClB,yBAAyB;CACzB,uBAAuB;CACvB,oBAAoB,UAAU,kBAAkB;CAChD,kBAAkB;CAClB,oBAAoB;CACpB,uBAAuB;CACvB,oBAAoB;CACpB,6BAA6B;CAC7B,oBAAoB;CACpB,wBAAwB;CACxB,yBAAyB;CACzB,wBAAwB;CACxB,gBAAgB;CAChB,gBAAgB;CAChB,gBAAgB;CAChB,gBAAgB;CAChB,gBAAgB;CAChB,gBAAgB;CAChB,wBAAwB;CACxB,uBAAuB;CACvB,yBAAyB;CACzB,wBAAwB;CACxB,0BAA0B;CAC1B,kBAAkB;CAClB,uBAAuB;CACvB,uBAAuB;CACvB,yBAAyB;CACzB,wBAAwB;CACxB,gBAAgB;CAChB,kBAAkB;CAClB,kBAAkB;CAClB,mBAAmB;CACnB,gBAAgB;CAChB,gBAAgB;CAChB,sBAAsB;CACtB,4BAA4B;CAC5B,wBAAwB;CACxB,wBAAwB;CACxB,gBAAgB;CAChB,mBAAmB;CACnB,kBAAkB;CAClB,wBAAwB;CACxB,oBAAoB;CACpB,iBAAiB;CACjB,wBAAwB,UAAU,kBAAkB;AACtD;;;ACtEA,IAAa,CAA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