@mantine-vue/tiptap 3.2.0 → 3.3.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.map CHANGED
@@ -1 +1 @@
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-Rich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ichTextEditor.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/RichTextEditorTableInsertControl.vue","../src/RichTextEditorControl/RichTextEditorTableInsertControl.vue","../src/RichTextEditorControl/RichTextEditorDetailsControl.vue","../src/RichTextEditorControl/RichTextEditorDetailsControl.vue","../src/RichTextEditorControl/RichTextEditorInvisibleCharactersControl.vue","../src/RichTextEditorControl/RichTextEditorInvisibleCharactersControl.vue","../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 tableInsertControlLabel?: string\n tableInsertLabel?: (columns: number, rows: number) => string\n tableDeleteControlLabel?: string\n tableColumnBeforeControlLabel?: string\n tableColumnAfterControlLabel?: string\n tableColumnDeleteControlLabel?: string\n tableRowBeforeControlLabel?: string\n tableRowAfterControlLabel?: string\n tableRowDeleteControlLabel?: string\n tableToggleHeaderRowControlLabel?: string\n tableToggleHeaderColumnControlLabel?: string\n tableMergeCellsControlLabel?: string\n tableSplitCellControlLabel?: string\n detailsControlLabel?: string\n invisibleCharactersControlLabel?: string\n}\n\nexport type ResolvedRichTextEditorLabels = Required<RichTextEditorLabels>\n\nexport const DEFAULT_LABELS: ResolvedRichTextEditorLabels = {\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 tableInsertControlLabel: 'Insert table',\n tableInsertLabel: (columns, rows) => `Insert ${columns} × ${rows} table`,\n tableDeleteControlLabel: 'Delete table',\n tableColumnBeforeControlLabel: 'Add column before',\n tableColumnAfterControlLabel: 'Add column after',\n tableColumnDeleteControlLabel: 'Delete column',\n tableRowBeforeControlLabel: 'Add row before',\n tableRowAfterControlLabel: 'Add row after',\n tableRowDeleteControlLabel: 'Delete row',\n tableToggleHeaderRowControlLabel: 'Toggle header row',\n tableToggleHeaderColumnControlLabel: 'Toggle header column',\n tableMergeCellsControlLabel: 'Merge cells',\n tableSplitCellControlLabel: 'Split cell',\n detailsControlLabel: 'Toggle collapsible section',\n invisibleCharactersControlLabel: 'Toggle invisible characters',\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 { ResolvedRichTextEditorLabels } 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: ResolvedRichTextEditorLabels\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 &:where(:has(> [data-sticky])) {\n overflow: clip;\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\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 & :global(.tableWrapper) {\n margin-bottom: var(--mantine-spacing-sm);\n overflow-x: auto;\n }\n\n & :global(table) {\n width: 100%;\n margin: 0;\n border-collapse: collapse;\n table-layout: fixed;\n overflow: hidden;\n\n @mixin where-light {\n --rte-table-border-color: var(--mantine-color-gray-3);\n }\n\n @mixin where-dark {\n --rte-table-border-color: var(--mantine-color-dark-4);\n }\n }\n\n & :global(td),\n & :global(th) {\n position: relative;\n min-width: 1em;\n padding: 7px var(--mantine-spacing-xs);\n border: 1px solid var(--rte-table-border-color);\n vertical-align: top;\n box-sizing: border-box;\n }\n\n & :global(th) {\n text-align: start;\n }\n\n & :global(.selectedCell) {\n background-color: color-mix(in srgb, var(--mantine-primary-color-light) 30%, transparent);\n }\n\n & :global(.column-resize-handle) {\n position: absolute;\n inset-block: 0;\n inset-inline-end: -2px;\n width: 4px;\n pointer-events: none;\n background-color: var(--mantine-primary-color-filled);\n }\n\n & :global(.ProseMirror-gapcursor::after) {\n border-top-color: var(--mantine-color-text);\n }\n\n & :global([data-type='details']) {\n display: flex;\n align-items: flex-start;\n gap: var(--mantine-spacing-xs);\n margin-bottom: var(--mantine-spacing-sm);\n padding: var(--mantine-spacing-sm);\n border: 1px solid var(--rte-details-border-color);\n border-radius: var(--mantine-radius-default);\n\n @mixin where-light {\n --rte-details-border-color: var(--mantine-color-gray-3);\n --rte-details-button-hover: var(--mantine-color-gray-1);\n }\n\n @mixin where-dark {\n --rte-details-border-color: var(--mantine-color-dark-4);\n --rte-details-button-hover: var(--mantine-color-dark-5);\n }\n }\n\n & :global([data-type='details'] > button) {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n margin: 0;\n padding: 0;\n border: 0;\n border-radius: var(--mantine-radius-sm);\n background-color: transparent;\n color: inherit;\n cursor: pointer;\n }\n\n & :global([data-type='details'] > button:empty) {\n width: 1.25rem;\n height: calc(1em * var(--mantine-line-height));\n }\n\n & :global([data-type='details'] > button:empty:hover) {\n background-color: var(--rte-details-button-hover);\n }\n\n & :global([data-type='details'] > button:empty::before) {\n content: '';\n width: 0;\n height: 0;\n border-style: solid;\n border-width: 5px 0 5px 6px;\n border-color: transparent transparent transparent currentColor;\n }\n\n &\n :global(\n [data-type='details']:has(> div > [data-type='detailsContent']:not([hidden]))\n > button:empty::before\n ) {\n transform: rotate(90deg);\n }\n\n & :global([data-type='details'] > div) {\n display: flex;\n flex-direction: column;\n gap: var(--mantine-spacing-xs);\n width: 100%;\n min-width: 0;\n }\n\n & :global([data-type='details'] summary) {\n font-weight: 600;\n }\n\n & :global([data-type='detailsContent'][hidden]) {\n display: none;\n }\n\n & :global([data-type='detailsContent'] > *:last-child) {\n margin-bottom: 0;\n }\n}\n\n.linkEditorDropdown {\n background-color: var(--mantine-color-body);\n}\n\n.tableInsertDropdown {\n background-color: var(--mantine-color-body);\n padding: var(--mantine-spacing-xs);\n}\n\n.tableInsertGrid {\n display: grid;\n grid-template-columns: repeat(var(--rte-table-insert-columns, 10), 1fr);\n gap: 3px;\n}\n\n.tableInsertCell {\n width: 20px;\n height: 20px;\n\n @mixin where-light {\n background-color: var(--mantine-color-gray-2);\n }\n\n @mixin where-dark {\n background-color: var(--mantine-color-dark-5);\n }\n\n &[data-active] {\n background-color: var(--mantine-primary-color-filled);\n }\n}\n\n.tableInsertLabel {\n margin-top: var(--mantine-spacing-xs);\n text-align: center;\n font-size: var(--mantine-font-size-sm);\n color: var(--mantine-color-dimmed);\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 opacity: 0.5;\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-sm);\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])\nexport const IconTablePlus = createIcon('IconTablePlus', [\n path('M12.5 21h-7.5a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v7.5'),\n path('M3 10h18'),\n path('M10 3v18'),\n path('M16 19h6'),\n path('M19 16v6'),\n])\nexport const IconTableOff = createIcon('IconTableOff', [\n path(\n 'M7 3h12a2 2 0 0 1 2 2v12m-.585 3.413a1.994 1.994 0 0 1 -1.415 .587h-14a2 2 0 0 1 -2 -2v-14c0 -.55 .223 -1.05 .583 -1.412',\n ),\n path('M3 10h7m4 0h7'),\n path('M10 3v3m0 4v11'),\n path('M3 3l18 18'),\n])\nexport const IconColumnInsertLeft = createIcon('IconColumnInsertLeft', [\n path('M14 4h4a1 1 0 0 1 1 1v14a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-14a1 1 0 0 1 1 -1z'),\n path('M5 12l4 0'),\n path('M7 10l0 4'),\n])\nexport const IconColumnInsertRight = createIcon('IconColumnInsertRight', [\n path('M6 4h4a1 1 0 0 1 1 1v14a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-14a1 1 0 0 1 1 -1z'),\n path('M15 12l4 0'),\n path('M17 10l0 4'),\n])\nexport const IconColumnRemove = createIcon('IconColumnRemove', [\n path('M6 4h4a1 1 0 0 1 1 1v14a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-14a1 1 0 0 1 1 -1z'),\n path('M16 10l4 4'),\n path('M16 14l4 -4'),\n])\nexport const IconRowInsertTop = createIcon('IconRowInsertTop', [\n path('M4 18v-4a1 1 0 0 1 1 -1h14a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-14a1 1 0 0 1 -1 -1z'),\n path('M12 9v-4'),\n path('M10 7l4 0'),\n])\nexport const IconRowInsertBottom = createIcon('IconRowInsertBottom', [\n path('M20 6v4a1 1 0 0 1 -1 1h-14a1 1 0 0 1 -1 -1v-4a1 1 0 0 1 1 -1h14a1 1 0 0 1 1 1z'),\n path('M12 15l0 4'),\n path('M14 17l-4 0'),\n])\nexport const IconRowRemove = createIcon('IconRowRemove', [\n path('M20 6v4a1 1 0 0 1 -1 1h-14a1 1 0 0 1 -1 -1v-4a1 1 0 0 1 1 -1h14a1 1 0 0 1 1 1z'),\n path('M10 16l4 4'),\n path('M10 20l4 -4'),\n])\nexport const IconTableHeaderRow = createIcon('IconTableHeaderRow', [\n path('M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z'),\n path('M4 9l16 0'),\n])\nexport const IconTableHeaderColumn = createIcon('IconTableHeaderColumn', [\n path('M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z'),\n path('M9 4l0 16'),\n])\nexport const IconTableMergeCells = createIcon('IconTableMergeCells', [\n path('M18 10h-4v-4'),\n path('M20 4l-6 6'),\n path('M6 14h4v4'),\n path('M10 14l-6 6'),\n])\nexport const IconTableSplitCell = createIcon('IconTableSplitCell', [\n path('M12 4l0 16'),\n path('M8 8l-4 4l4 4'),\n path('M16 16l4 -4l-4 -4'),\n])\nexport const IconDetails = createIcon('IconDetails', [\n path('M8 5l3 3l-3 3'),\n path('M15 8l4 0'),\n path('M5 15l14 0'),\n path('M5 19l14 0'),\n])\nexport const IconPilcrow = createIcon('IconPilcrow', [\n path('M13 4v16'),\n path('M17 4v16'),\n path('M19 4h-9.5a4.5 4.5 0 0 0 0 9h3.5'),\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 emitUpdate: false,\n })\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 emitUpdate: false,\n })\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","<script setup lang=\"ts\">\nimport { computed, ref, useAttrs } from 'vue'\nimport { Popover, UnstyledButton } from '@mantine-vue/core'\nimport { IconTablePlus } from '../icons/Icons'\nimport { useRichTextEditorContext } from '../RichTextEditor.context'\nimport RichTextEditorControlBaseComponent from './RichTextEditorControlBase.vue'\nimport type { PopoverProps } from '@mantine-vue/core'\nimport type { RichTextEditorControlBaseRuntimeProps } from './RichTextEditorControl.types'\nimport { isSafeEditor, useEditorSelector } from './use-editor-selector'\n\ndefineOptions({ name: 'RichTextEditorTableInsertControl', inheritAttrs: false })\ninterface RuntimeProps extends RichTextEditorControlBaseRuntimeProps {\n maxColumns?: number\n maxRows?: number\n withHeaderRow?: boolean\n popoverProps?: Partial<PopoverProps>\n}\n\nconst props = withDefaults(defineProps<RuntimeProps>(), {\n maxColumns: 10,\n maxRows: 10,\n withHeaderRow: true,\n popoverProps: undefined,\n disabled: undefined,\n icon: undefined,\n})\nconst attrs = useAttrs()\nconst ctx = useRichTextEditorContext()\nconst opened = ref(false)\nconst selected = ref({ columns: 0, rows: 0 })\nconst commandDisabled = useEditorSelector(\n () => ctx.editor,\n (editor) => !isSafeEditor(editor) || !(editor.can() as any).insertTable?.(),\n)\nconst disabled = computed(() => props.disabled || commandDisabled.value)\nconst cells = computed(() =>\n Array.from({ length: props.maxRows * props.maxColumns }, (_, index) => ({\n row: Math.floor(index / props.maxColumns) + 1,\n column: (index % props.maxColumns) + 1,\n })),\n)\nconst stylesApi = computed(() => ({ classNames: props.classNames, styles: props.styles }))\n\nfunction close() {\n opened.value = false\n selected.value = { columns: 0, rows: 0 }\n}\n\nfunction insertTable(columns: number, rows: number) {\n close()\n if (isSafeEditor(ctx.editor)) {\n ;(ctx.editor.chain() as any)\n .focus()\n .insertTable({ rows, cols: columns, withHeaderRow: props.withHeaderRow })\n .run()\n }\n}\n</script>\n\n<template>\n <Popover\n :opened=\"opened\"\n :within-portal=\"true\"\n :trap-focus=\"true\"\n shadow=\"md\"\n position=\"bottom-end\"\n v-bind=\"props.popoverProps\"\n @change=\"(value: boolean) => !value && close()\"\n >\n <Popover.Target>\n <RichTextEditorControlBaseComponent\n v-bind=\"attrs\"\n :active=\"opened\"\n :disabled=\"disabled\"\n :variant=\"props.variant ?? ctx.variant\"\n :aria-label=\"ctx.labels.tableInsertControlLabel\"\n :title=\"ctx.labels.tableInsertControlLabel\"\n @click=\"opened ? close() : (opened = true)\"\n >\n <template #icon=\"iconProps\">\n <slot name=\"icon\" v-bind=\"iconProps\">\n <component :is=\"props.icon ?? IconTablePlus\" v-bind=\"iconProps\" />\n </slot>\n </template>\n </RichTextEditorControlBaseComponent>\n </Popover.Target>\n\n <Popover.Dropdown v-bind=\"ctx.getStyles('tableInsertDropdown', stylesApi)\">\n <div\n v-bind=\"ctx.getStyles('tableInsertGrid', stylesApi)\"\n :style=\"{ '--rte-table-insert-columns': props.maxColumns }\"\n @mouseleave=\"selected = { columns: 0, rows: 0 }\"\n >\n <UnstyledButton\n v-for=\"cell in cells\"\n :key=\"`${cell.row}-${cell.column}`\"\n v-bind=\"ctx.getStyles('tableInsertCell', stylesApi)\"\n :data-active=\"(cell.column <= selected.columns && cell.row <= selected.rows) || undefined\"\n :aria-label=\"ctx.labels.tableInsertLabel(cell.column, cell.row)\"\n @mouseenter=\"selected = { columns: cell.column, rows: cell.row }\"\n @focus=\"selected = { columns: cell.column, rows: cell.row }\"\n @click=\"insertTable(cell.column, cell.row)\"\n />\n </div>\n <div v-bind=\"ctx.getStyles('tableInsertLabel', stylesApi)\">\n {{\n selected.columns\n ? `${selected.columns} × ${selected.rows}`\n : ctx.labels.tableInsertControlLabel\n }}\n </div>\n </Popover.Dropdown>\n </Popover>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, ref, useAttrs } from 'vue'\nimport { Popover, UnstyledButton } from '@mantine-vue/core'\nimport { IconTablePlus } from '../icons/Icons'\nimport { useRichTextEditorContext } from '../RichTextEditor.context'\nimport RichTextEditorControlBaseComponent from './RichTextEditorControlBase.vue'\nimport type { PopoverProps } from '@mantine-vue/core'\nimport type { RichTextEditorControlBaseRuntimeProps } from './RichTextEditorControl.types'\nimport { isSafeEditor, useEditorSelector } from './use-editor-selector'\n\ndefineOptions({ name: 'RichTextEditorTableInsertControl', inheritAttrs: false })\ninterface RuntimeProps extends RichTextEditorControlBaseRuntimeProps {\n maxColumns?: number\n maxRows?: number\n withHeaderRow?: boolean\n popoverProps?: Partial<PopoverProps>\n}\n\nconst props = withDefaults(defineProps<RuntimeProps>(), {\n maxColumns: 10,\n maxRows: 10,\n withHeaderRow: true,\n popoverProps: undefined,\n disabled: undefined,\n icon: undefined,\n})\nconst attrs = useAttrs()\nconst ctx = useRichTextEditorContext()\nconst opened = ref(false)\nconst selected = ref({ columns: 0, rows: 0 })\nconst commandDisabled = useEditorSelector(\n () => ctx.editor,\n (editor) => !isSafeEditor(editor) || !(editor.can() as any).insertTable?.(),\n)\nconst disabled = computed(() => props.disabled || commandDisabled.value)\nconst cells = computed(() =>\n Array.from({ length: props.maxRows * props.maxColumns }, (_, index) => ({\n row: Math.floor(index / props.maxColumns) + 1,\n column: (index % props.maxColumns) + 1,\n })),\n)\nconst stylesApi = computed(() => ({ classNames: props.classNames, styles: props.styles }))\n\nfunction close() {\n opened.value = false\n selected.value = { columns: 0, rows: 0 }\n}\n\nfunction insertTable(columns: number, rows: number) {\n close()\n if (isSafeEditor(ctx.editor)) {\n ;(ctx.editor.chain() as any)\n .focus()\n .insertTable({ rows, cols: columns, withHeaderRow: props.withHeaderRow })\n .run()\n }\n}\n</script>\n\n<template>\n <Popover\n :opened=\"opened\"\n :within-portal=\"true\"\n :trap-focus=\"true\"\n shadow=\"md\"\n position=\"bottom-end\"\n v-bind=\"props.popoverProps\"\n @change=\"(value: boolean) => !value && close()\"\n >\n <Popover.Target>\n <RichTextEditorControlBaseComponent\n v-bind=\"attrs\"\n :active=\"opened\"\n :disabled=\"disabled\"\n :variant=\"props.variant ?? ctx.variant\"\n :aria-label=\"ctx.labels.tableInsertControlLabel\"\n :title=\"ctx.labels.tableInsertControlLabel\"\n @click=\"opened ? close() : (opened = true)\"\n >\n <template #icon=\"iconProps\">\n <slot name=\"icon\" v-bind=\"iconProps\">\n <component :is=\"props.icon ?? IconTablePlus\" v-bind=\"iconProps\" />\n </slot>\n </template>\n </RichTextEditorControlBaseComponent>\n </Popover.Target>\n\n <Popover.Dropdown v-bind=\"ctx.getStyles('tableInsertDropdown', stylesApi)\">\n <div\n v-bind=\"ctx.getStyles('tableInsertGrid', stylesApi)\"\n :style=\"{ '--rte-table-insert-columns': props.maxColumns }\"\n @mouseleave=\"selected = { columns: 0, rows: 0 }\"\n >\n <UnstyledButton\n v-for=\"cell in cells\"\n :key=\"`${cell.row}-${cell.column}`\"\n v-bind=\"ctx.getStyles('tableInsertCell', stylesApi)\"\n :data-active=\"(cell.column <= selected.columns && cell.row <= selected.rows) || undefined\"\n :aria-label=\"ctx.labels.tableInsertLabel(cell.column, cell.row)\"\n @mouseenter=\"selected = { columns: cell.column, rows: cell.row }\"\n @focus=\"selected = { columns: cell.column, rows: cell.row }\"\n @click=\"insertTable(cell.column, cell.row)\"\n />\n </div>\n <div v-bind=\"ctx.getStyles('tableInsertLabel', stylesApi)\">\n {{\n selected.columns\n ? `${selected.columns} × ${selected.rows}`\n : ctx.labels.tableInsertControlLabel\n }}\n </div>\n </Popover.Dropdown>\n </Popover>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue'\nimport { IconDetails } from '../icons/Icons'\nimport { useRichTextEditorContext } from '../RichTextEditor.context'\nimport RichTextEditorControlBaseComponent from './RichTextEditorControlBase.vue'\nimport type { RichTextEditorControlBaseRuntimeProps } from './RichTextEditorControl.types'\nimport { isSafeEditor, useEditorSelector } from './use-editor-selector'\n\ndefineOptions({ name: 'RichTextEditorDetailsControl', inheritAttrs: false })\nconst props = withDefaults(defineProps<RichTextEditorControlBaseRuntimeProps>(), {\n active: undefined,\n disabled: undefined,\n interactive: true,\n icon: undefined,\n})\nconst attrs = useAttrs()\nconst ctx = useRichTextEditorContext()\nconst state = useEditorSelector(\n () => ctx.editor,\n (editor) => {\n const safeEditor = isSafeEditor(editor) ? editor : null\n if (!safeEditor) return { active: false, disabled: true }\n const commands = safeEditor.can() as any\n const canSet = Boolean(commands.setDetails?.())\n const canUnset = Boolean(commands.unsetDetails?.())\n return { active: canUnset, disabled: !canSet && !canUnset }\n },\n)\nconst active = computed(() => props.active ?? state.value.active)\nconst disabled = computed(() => props.disabled || state.value.disabled)\n\nfunction toggle() {\n if (!isSafeEditor(ctx.editor)) return\n const chain = (ctx.editor as any).chain().focus()\n if ((ctx.editor.can() as any).unsetDetails?.()) chain.unsetDetails().run()\n else chain.setDetails().run()\n}\n</script>\n\n<template>\n <RichTextEditorControlBaseComponent\n v-bind=\"attrs\"\n :active=\"active\"\n :disabled=\"disabled\"\n :interactive=\"props.interactive\"\n :variant=\"props.variant ?? ctx.variant\"\n :aria-label=\"ctx.labels.detailsControlLabel\"\n :title=\"ctx.labels.detailsControlLabel\"\n @click=\"toggle\"\n >\n <template #icon=\"iconProps\">\n <slot name=\"icon\" v-bind=\"iconProps\">\n <component :is=\"props.icon ?? IconDetails\" v-bind=\"iconProps\" />\n </slot>\n </template>\n </RichTextEditorControlBaseComponent>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue'\nimport { IconDetails } from '../icons/Icons'\nimport { useRichTextEditorContext } from '../RichTextEditor.context'\nimport RichTextEditorControlBaseComponent from './RichTextEditorControlBase.vue'\nimport type { RichTextEditorControlBaseRuntimeProps } from './RichTextEditorControl.types'\nimport { isSafeEditor, useEditorSelector } from './use-editor-selector'\n\ndefineOptions({ name: 'RichTextEditorDetailsControl', inheritAttrs: false })\nconst props = withDefaults(defineProps<RichTextEditorControlBaseRuntimeProps>(), {\n active: undefined,\n disabled: undefined,\n interactive: true,\n icon: undefined,\n})\nconst attrs = useAttrs()\nconst ctx = useRichTextEditorContext()\nconst state = useEditorSelector(\n () => ctx.editor,\n (editor) => {\n const safeEditor = isSafeEditor(editor) ? editor : null\n if (!safeEditor) return { active: false, disabled: true }\n const commands = safeEditor.can() as any\n const canSet = Boolean(commands.setDetails?.())\n const canUnset = Boolean(commands.unsetDetails?.())\n return { active: canUnset, disabled: !canSet && !canUnset }\n },\n)\nconst active = computed(() => props.active ?? state.value.active)\nconst disabled = computed(() => props.disabled || state.value.disabled)\n\nfunction toggle() {\n if (!isSafeEditor(ctx.editor)) return\n const chain = (ctx.editor as any).chain().focus()\n if ((ctx.editor.can() as any).unsetDetails?.()) chain.unsetDetails().run()\n else chain.setDetails().run()\n}\n</script>\n\n<template>\n <RichTextEditorControlBaseComponent\n v-bind=\"attrs\"\n :active=\"active\"\n :disabled=\"disabled\"\n :interactive=\"props.interactive\"\n :variant=\"props.variant ?? ctx.variant\"\n :aria-label=\"ctx.labels.detailsControlLabel\"\n :title=\"ctx.labels.detailsControlLabel\"\n @click=\"toggle\"\n >\n <template #icon=\"iconProps\">\n <slot name=\"icon\" v-bind=\"iconProps\">\n <component :is=\"props.icon ?? IconDetails\" v-bind=\"iconProps\" />\n </slot>\n </template>\n </RichTextEditorControlBaseComponent>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue'\nimport { IconPilcrow } from '../icons/Icons'\nimport { useRichTextEditorContext } from '../RichTextEditor.context'\nimport RichTextEditorControlBaseComponent from './RichTextEditorControlBase.vue'\nimport type { RichTextEditorControlBaseRuntimeProps } from './RichTextEditorControl.types'\nimport { isSafeEditor, useEditorSelector } from './use-editor-selector'\n\ndefineOptions({ name: 'RichTextEditorInvisibleCharactersControl', inheritAttrs: false })\nconst props = withDefaults(defineProps<RichTextEditorControlBaseRuntimeProps>(), {\n active: undefined,\n disabled: undefined,\n interactive: true,\n icon: undefined,\n})\nconst attrs = useAttrs()\nconst ctx = useRichTextEditorContext()\nconst state = useEditorSelector(\n () => ctx.editor,\n (editor) => {\n const safeEditor = isSafeEditor(editor) ? editor : null\n if (!safeEditor) return { active: false, disabled: true }\n return {\n active: Boolean((safeEditor.storage as any).invisibleCharacters?.visibility?.()),\n disabled: !(safeEditor.can() as any).toggleInvisibleCharacters?.(),\n }\n },\n)\nconst active = computed(() => props.active ?? state.value.active)\nconst disabled = computed(() => props.disabled || state.value.disabled)\n\nfunction toggle() {\n if (isSafeEditor(ctx.editor)) {\n ;(ctx.editor as any).chain().focus().toggleInvisibleCharacters().run()\n }\n}\n</script>\n\n<template>\n <RichTextEditorControlBaseComponent\n v-bind=\"attrs\"\n :active=\"active\"\n :disabled=\"disabled\"\n :interactive=\"props.interactive\"\n :variant=\"props.variant ?? ctx.variant\"\n :aria-label=\"ctx.labels.invisibleCharactersControlLabel\"\n :title=\"ctx.labels.invisibleCharactersControlLabel\"\n @click=\"toggle\"\n >\n <template #icon=\"iconProps\">\n <slot name=\"icon\" v-bind=\"iconProps\">\n <component :is=\"props.icon ?? IconPilcrow\" v-bind=\"iconProps\" />\n </slot>\n </template>\n </RichTextEditorControlBaseComponent>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue'\nimport { IconPilcrow } from '../icons/Icons'\nimport { useRichTextEditorContext } from '../RichTextEditor.context'\nimport RichTextEditorControlBaseComponent from './RichTextEditorControlBase.vue'\nimport type { RichTextEditorControlBaseRuntimeProps } from './RichTextEditorControl.types'\nimport { isSafeEditor, useEditorSelector } from './use-editor-selector'\n\ndefineOptions({ name: 'RichTextEditorInvisibleCharactersControl', inheritAttrs: false })\nconst props = withDefaults(defineProps<RichTextEditorControlBaseRuntimeProps>(), {\n active: undefined,\n disabled: undefined,\n interactive: true,\n icon: undefined,\n})\nconst attrs = useAttrs()\nconst ctx = useRichTextEditorContext()\nconst state = useEditorSelector(\n () => ctx.editor,\n (editor) => {\n const safeEditor = isSafeEditor(editor) ? editor : null\n if (!safeEditor) return { active: false, disabled: true }\n return {\n active: Boolean((safeEditor.storage as any).invisibleCharacters?.visibility?.()),\n disabled: !(safeEditor.can() as any).toggleInvisibleCharacters?.(),\n }\n },\n)\nconst active = computed(() => props.active ?? state.value.active)\nconst disabled = computed(() => props.disabled || state.value.disabled)\n\nfunction toggle() {\n if (isSafeEditor(ctx.editor)) {\n ;(ctx.editor as any).chain().focus().toggleInvisibleCharacters().run()\n }\n}\n</script>\n\n<template>\n <RichTextEditorControlBaseComponent\n v-bind=\"attrs\"\n :active=\"active\"\n :disabled=\"disabled\"\n :interactive=\"props.interactive\"\n :variant=\"props.variant ?? ctx.variant\"\n :aria-label=\"ctx.labels.invisibleCharactersControlLabel\"\n :title=\"ctx.labels.invisibleCharactersControlLabel\"\n @click=\"toggle\"\n >\n <template #icon=\"iconProps\">\n <slot name=\"icon\" v-bind=\"iconProps\">\n <component :is=\"props.icon ?? IconPilcrow\" v-bind=\"iconProps\" />\n </slot>\n </template>\n </RichTextEditorControlBaseComponent>\n</template>\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 IconTableOff,\n IconColumnInsertLeft,\n IconColumnInsertRight,\n IconColumnRemove,\n IconRowInsertTop,\n IconRowInsertBottom,\n IconRowRemove,\n IconTableHeaderRow,\n IconTableHeaderColumn,\n IconTableMergeCells,\n IconTableSplitCell,\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})\nexport const TableDeleteControl = createControl({\n label: 'tableDeleteControlLabel',\n icon: IconTableOff,\n operation: { name: 'deleteTable' },\n isDisabled: (editor) => !(editor.can() as any).deleteTable?.(),\n})\nexport const TableColumnBeforeControl = createControl({\n label: 'tableColumnBeforeControlLabel',\n icon: IconColumnInsertLeft,\n operation: { name: 'addColumnBefore' },\n isDisabled: (editor) => !(editor.can() as any).addColumnBefore?.(),\n})\nexport const TableColumnAfterControl = createControl({\n label: 'tableColumnAfterControlLabel',\n icon: IconColumnInsertRight,\n operation: { name: 'addColumnAfter' },\n isDisabled: (editor) => !(editor.can() as any).addColumnAfter?.(),\n})\nexport const TableColumnDeleteControl = createControl({\n label: 'tableColumnDeleteControlLabel',\n icon: IconColumnRemove,\n operation: { name: 'deleteColumn' },\n isDisabled: (editor) => !(editor.can() as any).deleteColumn?.(),\n})\nexport const TableRowBeforeControl = createControl({\n label: 'tableRowBeforeControlLabel',\n icon: IconRowInsertTop,\n operation: { name: 'addRowBefore' },\n isDisabled: (editor) => !(editor.can() as any).addRowBefore?.(),\n})\nexport const TableRowAfterControl = createControl({\n label: 'tableRowAfterControlLabel',\n icon: IconRowInsertBottom,\n operation: { name: 'addRowAfter' },\n isDisabled: (editor) => !(editor.can() as any).addRowAfter?.(),\n})\nexport const TableRowDeleteControl = createControl({\n label: 'tableRowDeleteControlLabel',\n icon: IconRowRemove,\n operation: { name: 'deleteRow' },\n isDisabled: (editor) => !(editor.can() as any).deleteRow?.(),\n})\nexport const TableToggleHeaderRowControl = createControl({\n label: 'tableToggleHeaderRowControlLabel',\n icon: IconTableHeaderRow,\n operation: { name: 'toggleHeaderRow' },\n isDisabled: (editor) => !(editor.can() as any).toggleHeaderRow?.(),\n})\nexport const TableToggleHeaderColumnControl = createControl({\n label: 'tableToggleHeaderColumnControlLabel',\n icon: IconTableHeaderColumn,\n operation: { name: 'toggleHeaderColumn' },\n isDisabled: (editor) => !(editor.can() as any).toggleHeaderColumn?.(),\n})\nexport const TableMergeCellsControl = createControl({\n label: 'tableMergeCellsControlLabel',\n icon: IconTableMergeCells,\n operation: { name: 'mergeCells' },\n isDisabled: (editor) => !(editor.can() as any).mergeCells?.(),\n})\nexport const TableSplitCellControl = createControl({\n label: 'tableSplitCellControlLabel',\n icon: IconTableSplitCell,\n operation: { name: 'splitCell' },\n isDisabled: (editor) => !(editor.can() as any).splitCell?.(),\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 { RichTextEditorTableInsertControl } from './RichTextEditorControl/RichTextEditorTableInsertControl'\nimport { RichTextEditorDetailsControl } from './RichTextEditorControl/RichTextEditorDetailsControl'\nimport { RichTextEditorInvisibleCharactersControl } from './RichTextEditorControl/RichTextEditorInvisibleCharactersControl'\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 TableInsert: RichTextEditorTableInsertControl,\n TableDelete: controls.TableDeleteControl,\n TableColumnBefore: controls.TableColumnBeforeControl,\n TableColumnAfter: controls.TableColumnAfterControl,\n TableColumnDelete: controls.TableColumnDeleteControl,\n TableRowBefore: controls.TableRowBeforeControl,\n TableRowAfter: controls.TableRowAfterControl,\n TableRowDelete: controls.TableRowDeleteControl,\n TableToggleHeaderRow: controls.TableToggleHeaderRowControl,\n TableToggleHeaderColumn: controls.TableToggleHeaderColumnControl,\n TableMergeCells: controls.TableMergeCellsControl,\n TableSplitCell: controls.TableSplitCellControl,\n Details: RichTextEditorDetailsControl,\n InvisibleCharacters: RichTextEditorInvisibleCharactersControl,\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkEA,IAAa,iBAA+C;CAC1D,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,yBAAyB;CACzB,mBAAmB,SAAS,SAAS,UAAU,QAAQ,KAAK,KAAK;CACjE,yBAAyB;CAC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