@mantine-vue/tiptap 1.1.2

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