@thalassic/ui 22.21.0 → 22.23.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.
@@ -89,8 +89,10 @@ const markdownParser = new MarkdownParser(richTextSchema, new MarkdownIt('common
89
89
  s: { mark: 'strikethrough' },
90
90
  });
91
91
 
92
- // Markdown-style typing shortcuts: `# ` for headings, `- `/`* ` for bullet lists,
93
- // `1. ` for ordered lists, `> ` for blockquotes, and a fenced ``` for code blocks.
92
+ /**
93
+ * Markdown-style typing shortcuts: `# ` for headings, `- `/`* ` for bullet lists,
94
+ * `1. ` for ordered lists, `> ` for blockquotes, and a fenced ``` for code blocks.
95
+ */
94
96
  function buildInputRules(schema) {
95
97
  return inputRules({
96
98
  rules: [
@@ -104,9 +106,11 @@ function buildInputRules(schema) {
104
106
  ],
105
107
  });
106
108
  }
107
- // Keyboard shortcuts layered on top of the base editing keymap: inline-mark toggles,
108
- // history, input-rule reversal, list splitting/indentation, and a soft line break.
109
- // Shortcuts whose behavior lives in the host component (link editing) come from `handlers`.
109
+ /**
110
+ * Keyboard shortcuts layered on top of the base editing keymap: inline-mark toggles,
111
+ * history, input-rule reversal, list splitting/indentation, and a soft line break.
112
+ * Shortcuts whose behavior lives in the host component (link editing) come from `handlers`.
113
+ */
110
114
  function buildKeymap(schema, handlers) {
111
115
  const hardBreak = schema.nodes['hard_break'];
112
116
  const listItem = schema.nodes['list_item'];
@@ -167,18 +171,24 @@ const RICH_TEXT_EDITOR_CONFIG = new InjectionToken('RICH_TEXT_EDITOR_CONFIG', {
167
171
  factory: () => DEFAULT_RICH_TEXT_EDITOR_CONFIG,
168
172
  });
169
173
 
170
- // Human-readable label for a `Mod-<key>` shortcut on the current platform (e.g. ⌘B / Ctrl+B).
174
+ /**
175
+ * Human-readable label for a `Mod-<key>` shortcut on the current platform (e.g. ⌘B / Ctrl+B).
176
+ */
171
177
  function shortcutLabel(key) {
172
178
  return IS_APPLE_PLATFORM ? `⌘${key}` : `Ctrl+${key}`;
173
179
  }
174
- // Whether `markType` is applied across the selection (or is queued on an empty selection).
180
+ /**
181
+ * Whether `markType` is applied across the selection (or is queued on an empty selection).
182
+ */
175
183
  function markActive(state, markType) {
176
184
  const { from, $from, to, empty } = state.selection;
177
185
  if (empty)
178
186
  return Boolean(markType.isInSet(state.storedMarks || $from.marks()));
179
187
  return state.doc.rangeHasMark(from, to, markType);
180
188
  }
181
- // Whether the selection's textblock is exactly `nodeType` (optionally matching `attrs`).
189
+ /**
190
+ * Whether the selection's textblock is exactly `nodeType` (optionally matching `attrs`).
191
+ */
182
192
  function blockActive(state, nodeType, attrs) {
183
193
  const selection = state.selection;
184
194
  if (selection instanceof NodeSelection)
@@ -186,7 +196,9 @@ function blockActive(state, nodeType, attrs) {
186
196
  const { $from, to } = selection;
187
197
  return to <= $from.end() && $from.parent.hasMarkup(nodeType, attrs);
188
198
  }
189
- // Whether the selection sits inside a list/blockquote of `nodeType` (walks ancestors).
199
+ /**
200
+ * Whether the selection sits inside a list/blockquote of `nodeType` (walks ancestors).
201
+ */
190
202
  function ancestorActive(state, nodeType) {
191
203
  const { $from } = state.selection;
192
204
  for (let depth = $from.depth; depth > 0; depth--) {
@@ -195,24 +207,28 @@ function ancestorActive(state, nodeType) {
195
207
  }
196
208
  return false;
197
209
  }
198
- // Toggles list membership: wraps the selection in `listType`, or lifts it out one
199
- // level when the selection already sits inside one — so the toolbar control both
200
- // enters and leaves the list instead of silently failing on a wrapped selection.
210
+ /**
211
+ * Toggles list membership: wraps the selection in `listType`, or lifts it out one
212
+ * level when the selection already sits inside one — so the toolbar control both
213
+ * enters and leaves the list instead of silently failing on a wrapped selection.
214
+ */
201
215
  function toggleList(listType, itemType) {
202
216
  return (state, dispatch, view) => {
203
217
  const command = ancestorActive(state, listType) ? liftListItem(itemType) : wrapInList(listType);
204
218
  return command(state, dispatch, view);
205
219
  };
206
220
  }
207
- // Toggles a wrapping node (blockquote): wraps the selection, or lifts it out when
208
- // the selection already sits inside one.
221
+ /**
222
+ * Toggles a wrapping node (blockquote): wraps the selection, or lifts it out when
223
+ * the selection already sits inside one.
224
+ */
209
225
  function toggleWrap(nodeType) {
210
226
  return (state, dispatch, view) => {
211
227
  const command = ancestorActive(state, nodeType) ? lift : wrapIn(nodeType);
212
228
  return command(state, dispatch, view);
213
229
  };
214
230
  }
215
- // Toggles between a heading of the given level and a plain paragraph.
231
+ /** Toggles between a heading of the given level and a plain paragraph. */
216
232
  function toggleHeading(headingType, paragraphType, level) {
217
233
  return (state, dispatch, view) => {
218
234
  const command = blockActive(state, headingType, { level })
@@ -358,10 +374,12 @@ class RichTextEditor extends ValueFormControl {
358
374
  linkUrl = signal('', /* @ts-ignore */
359
375
  ...(ngDevMode ? [{ debugName: "linkUrl" }] : /* istanbul ignore next */ []));
360
376
  labels = this._config.labels;
361
- // The toolbar-control map, resolved once against the schema.
377
+ /** The toolbar-control map, resolved once against the schema. */
362
378
  _buttons = buildToolbarButtons(richTextSchema, this._config.labels);
363
379
  _view = null;
364
- // The most recent Markdown this component emitted, used to ignore its own value writes.
380
+ /**
381
+ * The most recent Markdown this component emitted, used to ignore its own value writes.
382
+ */
365
383
  _lastEmitted = '';
366
384
  // Computed
367
385
  classes = computed(() => {
@@ -374,14 +392,18 @@ class RichTextEditor extends ValueFormControl {
374
392
  return array.concat(this.controlClasses());
375
393
  }, /* @ts-ignore */
376
394
  ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
377
- // The toolbar layout resolved to renderable entries (separators and controls).
395
+ /**
396
+ * The toolbar layout resolved to renderable entries (separators and controls).
397
+ */
378
398
  entries = computed(() => this.toolbar().map(entry => {
379
399
  if (entry === 'separator')
380
400
  return { separator: true, button: null };
381
401
  return { separator: false, button: this._buttons[entry] };
382
402
  }), /* @ts-ignore */
383
403
  ...(ngDevMode ? [{ debugName: "entries" }] : /* istanbul ignore next */ []));
384
- // ARIA/state attributes forwarded onto the contenteditable textbox managed by ProseMirror.
404
+ /**
405
+ * ARIA/state attributes forwarded onto the contenteditable textbox managed by ProseMirror.
406
+ */
385
407
  _contentAttributes = computed(() => {
386
408
  const attributes = {
387
409
  class: 'tls-rich-text-editor__content',
@@ -578,9 +600,11 @@ class RichTextEditor extends ValueFormControl {
578
600
  return true;
579
601
  return SAFE_LINK_SCHEMES.includes(scheme[0].toLowerCase());
580
602
  }
581
- // Whether the document holds no content (a single empty top-level block), so the
582
- // placeholder should show. ProseMirror keeps a trailing `<br>` in empty textblocks,
583
- // which defeats a CSS `:empty` check, so emptiness is derived from the document model.
603
+ /**
604
+ * Whether the document holds no content (a single empty top-level block), so the
605
+ * placeholder should show. ProseMirror keeps a trailing `<br>` in empty textblocks,
606
+ * which defeats a CSS `:empty` check, so emptiness is derived from the document model.
607
+ */
584
608
  _isDocumentEmpty() {
585
609
  const state = this._editorState();
586
610
  if (!state)
@@ -591,7 +615,9 @@ class RichTextEditor extends ValueFormControl {
591
615
  const firstChild = doc.firstChild;
592
616
  return firstChild === null || firstChild.content.size === 0;
593
617
  }
594
- // Removes the link on the current selection, or opens the link editor to add one.
618
+ /**
619
+ * Removes the link on the current selection, or opens the link editor to add one.
620
+ */
595
621
  _toggleLink() {
596
622
  const view = this._view;
597
623
  if (!view)
@@ -1 +1 @@
1
- {"version":3,"file":"thalassic-ui-rich-text-editor.mjs","sources":["../../../../libs/ui/rich-text-editor/src/features/rich-text-editor/rich-text-editor.constants.ts","../../../../libs/ui/rich-text-editor/src/features/rich-text-editor/rich-text-editor.schema.ts","../../../../libs/ui/rich-text-editor/src/features/rich-text-editor/rich-text-editor.markdown.ts","../../../../libs/ui/rich-text-editor/src/features/rich-text-editor/rich-text-editor.plugins.ts","../../../../libs/ui/rich-text-editor/src/features/rich-text-editor/rich-text-editor.config.ts","../../../../libs/ui/rich-text-editor/src/features/rich-text-editor/rich-text-editor.token.ts","../../../../libs/ui/rich-text-editor/src/features/rich-text-editor/rich-text-editor.toolbar.ts","../../../../libs/ui/rich-text-editor/src/features/rich-text-editor/rich-text-editor.ts","../../../../libs/ui/rich-text-editor/src/features/rich-text-editor/rich-text-editor.html","../../../../libs/ui/rich-text-editor/src/providers/rich-text-editor.provider.ts","../../../../libs/ui/rich-text-editor/src/thalassic-ui-rich-text-editor.ts"],"sourcesContent":["import { richTextToolbarEntry } from './rich-text-editor.types';\n\n/**\n * Whether the runtime is an Apple platform, where shortcuts are shown with the ⌘ symbol\n * (matching ProseMirror's `Mod-` resolution to Cmd there and Ctrl elsewhere).\n */\nexport const IS_APPLE_PLATFORM: boolean =\n typeof navigator !== 'undefined' && /Mac|iPhone|iPad|iPod/.test(navigator.platform);\n\n/** Matches a URL scheme prefix (`https:`, `javascript:`, …) at the start of an href. */\nexport const LINK_SCHEME_REGEX = /^[a-z][a-z0-9+.-]*:/i;\n\n/**\n * Schemes a link href may carry. Anything else (`javascript:`, `data:`, …) is rejected\n * so a crafted URL cannot smuggle an executable payload into the emitted Markdown;\n * scheme-less hrefs (relative paths, `#anchors`) are always allowed.\n */\nexport const SAFE_LINK_SCHEMES: readonly string[] = ['http:', 'https:', 'mailto:', 'tel:'];\n\n/** The default toolbar layout, grouped by kind with `separator` entries between groups. */\nexport const DEFAULT_RICH_TEXT_TOOLBAR: richTextToolbarEntry[] = [\n 'bold',\n 'italic',\n 'strikethrough',\n 'code',\n 'separator',\n 'heading1',\n 'heading2',\n 'heading3',\n 'separator',\n 'bulletList',\n 'orderedList',\n 'blockquote',\n 'separator',\n 'link',\n 'codeBlock',\n];\n","import { Schema } from 'prosemirror-model';\nimport { schema as markdownSchema } from 'prosemirror-markdown';\n\n/**\n * The editor document schema. It reuses `prosemirror-markdown`'s Markdown-capable\n * node/mark set (paragraph, headings, blockquote, code block, ordered/bullet lists,\n * strong, em, inline code, link) so every document round-trips losslessly to Markdown,\n * extended with a `strikethrough` mark for GFM `~~…~~`.\n */\nexport const richTextSchema: Schema = new Schema({\n nodes: markdownSchema.spec.nodes,\n marks: markdownSchema.spec.marks.addToEnd('strikethrough', {\n parseDOM: [\n { tag: 's' },\n { tag: 'del' },\n { style: 'text-decoration=line-through' },\n { style: 'text-decoration-line=line-through' },\n ],\n toDOM: () => ['s', 0],\n }),\n});\n","import MarkdownIt from 'markdown-it';\nimport {\n defaultMarkdownParser,\n defaultMarkdownSerializer,\n MarkdownParser,\n MarkdownSerializer,\n} from 'prosemirror-markdown';\nimport { richTextSchema } from './rich-text-editor.schema';\n\n/**\n * Serializes an editor document to a Markdown string. Extends the default serializer\n * with the `strikethrough` mark, emitted as GFM `~~…~~`.\n */\nexport const markdownSerializer = new MarkdownSerializer(defaultMarkdownSerializer.nodes, {\n ...defaultMarkdownSerializer.marks,\n strikethrough: {\n open: '~~',\n close: '~~',\n mixable: true,\n expelEnclosingWhitespace: true,\n },\n});\n\n/**\n * Parses a Markdown string into an editor document. Uses a dedicated CommonMark tokenizer\n * (matching `prosemirror-markdown`'s default, without mutating that shared instance) with\n * strikethrough enabled so `~~…~~` maps onto the `strikethrough` mark, and targets the\n * extended {@link richTextSchema}.\n */\nexport const markdownParser = new MarkdownParser(\n richTextSchema,\n new MarkdownIt('commonmark', { html: false }).enable('strikethrough'),\n {\n ...defaultMarkdownParser.tokens,\n s: { mark: 'strikethrough' },\n },\n);\n","import { baseKeymap, chainCommands, exitCode, toggleMark } from 'prosemirror-commands';\nimport { history, redo, undo } from 'prosemirror-history';\nimport {\n inputRules,\n textblockTypeInputRule,\n undoInputRule,\n wrappingInputRule,\n} from 'prosemirror-inputrules';\nimport { keymap } from 'prosemirror-keymap';\nimport { Schema } from 'prosemirror-model';\nimport { liftListItem, sinkListItem, splitListItem } from 'prosemirror-schema-list';\nimport { Plugin } from 'prosemirror-state';\nimport { RichTextEditorHandlers } from './rich-text-editor.types';\n\n// Markdown-style typing shortcuts: `# ` for headings, `- `/`* ` for bullet lists,\n// `1. ` for ordered lists, `> ` for blockquotes, and a fenced ``` for code blocks.\nfunction buildInputRules(schema: Schema): Plugin {\n return inputRules({\n rules: [\n wrappingInputRule(/^\\s*>\\s$/, schema.nodes['blockquote']),\n wrappingInputRule(\n /^(\\d+)\\.\\s$/,\n schema.nodes['ordered_list'],\n match => ({ order: Number(match[1]) }),\n (match, node) => node.childCount + node.attrs['order'] === Number(match[1]),\n ),\n wrappingInputRule(/^\\s*([-+*])\\s$/, schema.nodes['bullet_list']),\n textblockTypeInputRule(/^```$/, schema.nodes['code_block']),\n textblockTypeInputRule(/^(#{1,3})\\s$/, schema.nodes['heading'], match => ({\n level: match[1].length,\n })),\n ],\n });\n}\n\n// Keyboard shortcuts layered on top of the base editing keymap: inline-mark toggles,\n// history, input-rule reversal, list splitting/indentation, and a soft line break.\n// Shortcuts whose behavior lives in the host component (link editing) come from `handlers`.\nfunction buildKeymap(schema: Schema, handlers: RichTextEditorHandlers): Plugin {\n const hardBreak = schema.nodes['hard_break'];\n const listItem = schema.nodes['list_item'];\n\n return keymap({\n 'Mod-z': undo,\n 'Shift-Mod-z': redo,\n 'Mod-y': redo,\n\n Backspace: undoInputRule,\n\n 'Mod-b': toggleMark(schema.marks['strong']),\n 'Mod-i': toggleMark(schema.marks['em']),\n 'Mod-`': toggleMark(schema.marks['code']),\n 'Mod-k': () => handlers.toggleLink(),\n\n Enter: splitListItem(listItem),\n 'Mod-[': liftListItem(listItem),\n 'Mod-]': sinkListItem(listItem),\n\n 'Shift-Enter': chainCommands(exitCode, (state, dispatch) => {\n if (dispatch) dispatch(state.tr.replaceSelectionWith(hardBreak.create()).scrollIntoView());\n return true;\n }),\n });\n}\n\n/** The full plugin stack shared by every editor instance built on {@link richTextSchema}. */\nexport function buildRichTextPlugins(schema: Schema, handlers: RichTextEditorHandlers): Plugin[] {\n return [buildInputRules(schema), buildKeymap(schema, handlers), keymap(baseKeymap), history()];\n}\n","import { controlSize } from '@thalassic/ui';\nimport { DEFAULT_RICH_TEXT_TOOLBAR } from './rich-text-editor.constants';\nimport { richTextToolbarEntry, richTextToolbarItem } from './rich-text-editor.types';\n\n/** User-facing strings rendered by the editor, overridable for localization. */\nexport interface RichTextEditorLabels {\n /** Accessible name for the formatting toolbar. */\n toolbar: string;\n /** Accessible name for the link URL input. */\n linkUrl: string;\n /** Placeholder shown in the link URL input. */\n linkPlaceholder: string;\n /** Label for the button that applies the link. */\n linkApply: string;\n /** Label for the button that dismisses the link editor. */\n linkCancel: string;\n /** Accessible names (and tooltips) for the toolbar controls, keyed by control. */\n controls: Record<richTextToolbarItem, string>;\n}\n\nexport interface RichTextEditorConfig {\n size: controlSize;\n placeholder: string;\n fluid: boolean;\n /** Ordered toolbar layout; `separator` entries render a visual group divider. */\n toolbar: richTextToolbarEntry[];\n /** Minimum height of the editable area, expressed in rows of text. */\n minRows: number;\n /** User-facing strings, overridable for localization. */\n labels: RichTextEditorLabels;\n}\n\n/**\n * Consumer-supplied config overrides. Every field is optional, including the nested\n * `labels` (and its per-control map), so a caller can retitle a single control without\n * restating the rest.\n */\nexport type richTextEditorConfigOverride = Partial<Omit<RichTextEditorConfig, 'labels'>> & {\n labels?: Partial<Omit<RichTextEditorLabels, 'controls'>> & {\n controls?: Partial<Record<richTextToolbarItem, string>>;\n };\n};\n\nexport const DEFAULT_RICH_TEXT_EDITOR_CONFIG: RichTextEditorConfig = {\n size: 'md',\n placeholder: '',\n fluid: false,\n toolbar: DEFAULT_RICH_TEXT_TOOLBAR,\n minRows: 4,\n labels: {\n toolbar: 'Text formatting',\n linkUrl: 'Link URL',\n linkPlaceholder: 'https://example.com',\n linkApply: 'Apply',\n linkCancel: 'Cancel',\n controls: {\n bold: 'Bold',\n italic: 'Italic',\n strikethrough: 'Strikethrough',\n code: 'Inline code',\n heading1: 'Heading 1',\n heading2: 'Heading 2',\n heading3: 'Heading 3',\n bulletList: 'Bulleted list',\n orderedList: 'Numbered list',\n blockquote: 'Quote',\n link: 'Link',\n codeBlock: 'Code block',\n },\n },\n};\n","import { InjectionToken } from '@angular/core';\nimport { DEFAULT_RICH_TEXT_EDITOR_CONFIG, RichTextEditorConfig } from './rich-text-editor.config';\n\nexport const RICH_TEXT_EDITOR_CONFIG = new InjectionToken<RichTextEditorConfig>(\n 'RICH_TEXT_EDITOR_CONFIG',\n {\n factory: () => DEFAULT_RICH_TEXT_EDITOR_CONFIG,\n },\n);\n","import { lift, setBlockType, toggleMark, wrapIn } from 'prosemirror-commands';\nimport { MarkType, NodeType, Schema } from 'prosemirror-model';\nimport { liftListItem, wrapInList } from 'prosemirror-schema-list';\nimport { Command, EditorState, NodeSelection } from 'prosemirror-state';\nimport { RichTextEditorLabels } from './rich-text-editor.config';\nimport { IS_APPLE_PLATFORM } from './rich-text-editor.constants';\nimport { RichTextToolbarButton, richTextToolbarItem } from './rich-text-editor.types';\n\n// Human-readable label for a `Mod-<key>` shortcut on the current platform (e.g. ⌘B / Ctrl+B).\nfunction shortcutLabel(key: string): string {\n return IS_APPLE_PLATFORM ? `⌘${key}` : `Ctrl+${key}`;\n}\n\n// Whether `markType` is applied across the selection (or is queued on an empty selection).\nfunction markActive(state: EditorState, markType: MarkType): boolean {\n const { from, $from, to, empty } = state.selection;\n if (empty) return Boolean(markType.isInSet(state.storedMarks || $from.marks()));\n return state.doc.rangeHasMark(from, to, markType);\n}\n\n// Whether the selection's textblock is exactly `nodeType` (optionally matching `attrs`).\nfunction blockActive(\n state: EditorState,\n nodeType: NodeType,\n attrs?: Record<string, unknown>,\n): boolean {\n const selection = state.selection;\n if (selection instanceof NodeSelection) return selection.node.hasMarkup(nodeType, attrs);\n\n const { $from, to } = selection;\n return to <= $from.end() && $from.parent.hasMarkup(nodeType, attrs);\n}\n\n// Whether the selection sits inside a list/blockquote of `nodeType` (walks ancestors).\nfunction ancestorActive(state: EditorState, nodeType: NodeType): boolean {\n const { $from } = state.selection;\n for (let depth = $from.depth; depth > 0; depth--) {\n if ($from.node(depth).type === nodeType) return true;\n }\n return false;\n}\n\n// Toggles list membership: wraps the selection in `listType`, or lifts it out one\n// level when the selection already sits inside one — so the toolbar control both\n// enters and leaves the list instead of silently failing on a wrapped selection.\nfunction toggleList(listType: NodeType, itemType: NodeType): Command {\n return (state, dispatch, view) => {\n const command = ancestorActive(state, listType) ? liftListItem(itemType) : wrapInList(listType);\n return command(state, dispatch, view);\n };\n}\n\n// Toggles a wrapping node (blockquote): wraps the selection, or lifts it out when\n// the selection already sits inside one.\nfunction toggleWrap(nodeType: NodeType): Command {\n return (state, dispatch, view) => {\n const command = ancestorActive(state, nodeType) ? lift : wrapIn(nodeType);\n return command(state, dispatch, view);\n };\n}\n\n// Toggles between a heading of the given level and a plain paragraph.\nfunction toggleHeading(headingType: NodeType, paragraphType: NodeType, level: number): Command {\n return (state, dispatch, view) => {\n const command = blockActive(state, headingType, { level })\n ? setBlockType(paragraphType)\n : setBlockType(headingType, { level });\n return command(state, dispatch, view);\n };\n}\n\n/**\n * Builds the runtime toolbar-control map for a schema: each entry pairs the ProseMirror\n * command it dispatches with the predicate that reflects its active state. The `link`\n * control's command removes an existing link; adding a link is handled by the component,\n * which supplies the target URL.\n */\nexport function buildToolbarButtons(\n schema: Schema,\n labels: RichTextEditorLabels,\n): Record<richTextToolbarItem, RichTextToolbarButton> {\n const { strong, em, strikethrough, code, link } = schema.marks;\n const { heading, bullet_list, ordered_list, blockquote, code_block, paragraph, list_item } =\n schema.nodes;\n\n return {\n bold: {\n id: 'bold',\n icon: 'bold',\n label: labels.controls.bold,\n shortcut: shortcutLabel('B'),\n command: toggleMark(strong),\n isActive: state => markActive(state, strong),\n },\n italic: {\n id: 'italic',\n icon: 'italic',\n label: labels.controls.italic,\n shortcut: shortcutLabel('I'),\n command: toggleMark(em),\n isActive: state => markActive(state, em),\n },\n strikethrough: {\n id: 'strikethrough',\n icon: 'strikethrough',\n label: labels.controls.strikethrough,\n command: toggleMark(strikethrough),\n isActive: state => markActive(state, strikethrough),\n },\n code: {\n id: 'code',\n icon: 'inline-code',\n label: labels.controls.code,\n shortcut: shortcutLabel('`'),\n command: toggleMark(code),\n isActive: state => markActive(state, code),\n },\n heading1: {\n id: 'heading1',\n label: labels.controls.heading1,\n text: 'H1',\n command: toggleHeading(heading, paragraph, 1),\n isActive: state => blockActive(state, heading, { level: 1 }),\n },\n heading2: {\n id: 'heading2',\n label: labels.controls.heading2,\n text: 'H2',\n command: toggleHeading(heading, paragraph, 2),\n isActive: state => blockActive(state, heading, { level: 2 }),\n },\n heading3: {\n id: 'heading3',\n label: labels.controls.heading3,\n text: 'H3',\n command: toggleHeading(heading, paragraph, 3),\n isActive: state => blockActive(state, heading, { level: 3 }),\n },\n bulletList: {\n id: 'bulletList',\n icon: 'bullet-list',\n label: labels.controls.bulletList,\n command: toggleList(bullet_list, list_item),\n isActive: state => ancestorActive(state, bullet_list),\n },\n orderedList: {\n id: 'orderedList',\n icon: 'ordered-list',\n label: labels.controls.orderedList,\n command: toggleList(ordered_list, list_item),\n isActive: state => ancestorActive(state, ordered_list),\n },\n blockquote: {\n id: 'blockquote',\n icon: 'blockquote',\n label: labels.controls.blockquote,\n command: toggleWrap(blockquote),\n isActive: state => ancestorActive(state, blockquote),\n },\n link: {\n id: 'link',\n icon: 'link',\n label: labels.controls.link,\n shortcut: shortcutLabel('K'),\n command: toggleMark(link),\n isActive: state => markActive(state, link),\n },\n codeBlock: {\n id: 'codeBlock',\n icon: 'code-block',\n label: labels.controls.codeBlock,\n command: (state, dispatch, view) => {\n const command = blockActive(state, code_block)\n ? setBlockType(paragraph)\n : setBlockType(code_block);\n return command(state, dispatch, view);\n },\n isActive: state => blockActive(state, code_block),\n },\n };\n}\n","import {\n afterNextRender,\n booleanAttribute,\n Component,\n computed,\n effect,\n ElementRef,\n forwardRef,\n inject,\n input,\n InputSignal,\n InputSignalWithTransform,\n model,\n ModelSignal,\n OnDestroy,\n signal,\n Signal,\n viewChild,\n WritableSignal,\n} from '@angular/core';\nimport { Toolbar, ToolbarWidget } from '@angular/aria/toolbar';\nimport { toggleMark } from 'prosemirror-commands';\nimport { EditorState } from 'prosemirror-state';\nimport { EditorView } from 'prosemirror-view';\nimport { controlSize, FORM_CONTROL, Icon, ValueFormControl } from '@thalassic/ui';\nimport { RichTextEditorLabels } from './rich-text-editor.config';\nimport { LINK_SCHEME_REGEX, SAFE_LINK_SCHEMES } from './rich-text-editor.constants';\nimport { markdownParser, markdownSerializer } from './rich-text-editor.markdown';\nimport { buildRichTextPlugins } from './rich-text-editor.plugins';\nimport { richTextSchema } from './rich-text-editor.schema';\nimport { RICH_TEXT_EDITOR_CONFIG } from './rich-text-editor.token';\nimport { buildToolbarButtons } from './rich-text-editor.toolbar';\nimport {\n RichTextResolvedEntry,\n RichTextToolbarButton,\n richTextToolbarEntry,\n} from './rich-text-editor.types';\n\n/**\n * A WYSIWYG rich-text form control whose value is a Markdown string. The editable surface is\n * powered by ProseMirror against a Markdown-capable schema, so content round-trips losslessly\n * to Markdown while the user edits formatted text directly.\n */\n@Component({\n selector: 'tls-rich-text-editor',\n templateUrl: './rich-text-editor.html',\n styleUrl: './rich-text-editor.scss',\n imports: [Icon, Toolbar, ToolbarWidget],\n // The accessible name lives on the inner `role=\"textbox\"` (see `_contentAttributes`)\n // where focus lands; the group host reflects only validation state, so screen\n // readers never announce the name twice.\n host: {\n role: 'group',\n '[class]': 'classes()',\n '[style.--tls-rich-text-editor-min-rows]': 'minRows()',\n '[attr.aria-invalid]': \"invalid() ? 'true' : null\",\n },\n providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => RichTextEditor) }],\n})\nexport class RichTextEditor extends ValueFormControl<string> implements OnDestroy {\n // Injections\n private readonly _config = inject(RICH_TEXT_EDITOR_CONFIG);\n\n // Inputs\n public readonly value: ModelSignal<string> = model<string>('');\n public readonly placeholder: InputSignal<string> = input<string>(this._config.placeholder);\n public readonly size: InputSignal<controlSize> = input<controlSize>(this._config.size);\n public readonly fluid: InputSignalWithTransform<boolean, unknown> = input<boolean, unknown>(\n this._config.fluid,\n { transform: booleanAttribute },\n );\n public readonly toolbar: InputSignal<richTextToolbarEntry[]> = input<richTextToolbarEntry[]>(\n this._config.toolbar,\n );\n public readonly minRows: InputSignal<number> = input<number>(this._config.minRows);\n\n // State\n private readonly _editorHost = viewChild.required<ElementRef<HTMLElement>>('editorHost');\n private readonly _linkInput = viewChild<ElementRef<HTMLInputElement>>('linkInput');\n private readonly _editorState: WritableSignal<EditorState | null> = signal<EditorState | null>(\n null,\n );\n protected readonly linkEditing: WritableSignal<boolean> = signal<boolean>(false);\n protected readonly linkUrl: WritableSignal<string> = signal<string>('');\n\n protected readonly labels: RichTextEditorLabels = this._config.labels;\n\n // The toolbar-control map, resolved once against the schema.\n private readonly _buttons: Record<string, RichTextToolbarButton> = buildToolbarButtons(\n richTextSchema,\n this._config.labels,\n );\n\n private _view: EditorView | null = null;\n // The most recent Markdown this component emitted, used to ignore its own value writes.\n private _lastEmitted = '';\n\n // Computed\n protected readonly classes: Signal<string[]> = computed<string[]>(() => {\n const array: string[] = ['tls-rich-text-editor'];\n\n // Size/fluid ride the shared form-control classes (like every text control),\n // so the theme's size tokens apply without a duplicated per-component table.\n array.push(`${this.CLASS_NAME}--${this.size()}`);\n if (this.fluid()) array.push(`${this.CLASS_NAME}--fluid`);\n\n return array.concat(this.controlClasses());\n });\n\n // The toolbar layout resolved to renderable entries (separators and controls).\n protected readonly entries: Signal<RichTextResolvedEntry[]> = computed<RichTextResolvedEntry[]>(\n () =>\n this.toolbar().map(entry => {\n if (entry === 'separator') return { separator: true, button: null };\n\n return { separator: false, button: this._buttons[entry] };\n }),\n );\n\n // ARIA/state attributes forwarded onto the contenteditable textbox managed by ProseMirror.\n private readonly _contentAttributes: Signal<Record<string, string>> = computed<\n Record<string, string>\n >(() => {\n const attributes: Record<string, string> = {\n class: 'tls-rich-text-editor__content',\n role: 'textbox',\n 'aria-multiline': 'true',\n translate: 'no',\n };\n\n const label = this.ariaLabel();\n if (label) attributes['aria-label'] = label;\n\n const labelledby = this.labelledBy();\n if (labelledby) attributes['aria-labelledby'] = labelledby;\n\n const describedby = this.describedBy();\n if (describedby) attributes['aria-describedby'] = describedby;\n\n if (this.invalid()) attributes['aria-invalid'] = 'true';\n if (this.required()) attributes['aria-required'] = 'true';\n if (this.pending()) attributes['aria-busy'] = 'true';\n if (this.readonly()) attributes['aria-readonly'] = 'true';\n\n const placeholder = this.placeholder();\n if (placeholder) {\n attributes['data-placeholder'] = placeholder;\n if (this._isDocumentEmpty()) attributes['data-empty'] = 'true';\n }\n\n return attributes;\n });\n\n constructor() {\n super();\n\n // Reflect external value writes back into the document, skipping the component's own emits\n // and no-op writes so typing never rebuilds the document under the cursor.\n effect(() => {\n const markdown = this.value();\n const view = this._view;\n if (!view) return;\n if (markdown === this._lastEmitted) return;\n if (markdown === markdownSerializer.serialize(view.state.doc)) {\n this._lastEmitted = markdown;\n return;\n }\n\n // Replace the document through a transaction on the live state rather than a\n // rebuilt EditorState, so plugin state — notably the undo history — survives\n // the external write (and the write itself becomes undoable).\n const parsed = markdownParser.parse(markdown);\n const transaction = view.state.tr.replaceWith(0, view.state.doc.content.size, parsed.content);\n view.dispatch(transaction);\n this._lastEmitted = markdown;\n });\n\n // Keep the editable state and forwarded ARIA attributes in sync with the control's inputs.\n effect(() => {\n const editable = !this.notInteractive();\n const attributes = this._contentAttributes();\n const view = this._view;\n if (!view) return;\n\n view.setProps({ editable: () => editable, attributes: () => attributes });\n });\n\n // Move focus into the URL input when the link editor opens, so the ⌘K/toolbar flow\n // continues on the keyboard without tabbing.\n effect(() => {\n const linkInput = this._linkInput();\n if (this.linkEditing() && linkInput) linkInput.nativeElement.focus();\n });\n\n afterNextRender(() => this._createView());\n }\n\n // Protected methods\n protected isActive(button: RichTextToolbarButton): boolean {\n const state = this._editorState();\n if (!state) return false;\n return button.isActive(state);\n }\n\n protected runCommand(button: RichTextToolbarButton): void {\n const view = this._view;\n if (!view) return;\n\n if (button.id === 'link') {\n this._toggleLink();\n return;\n }\n\n button.command(view.state, view.dispatch, view);\n }\n\n /**\n * Returns focus to the editable surface after a pointer-driven toolbar click.\n *\n * Bound on the toolbar container rather than the controls themselves: the roving-tabindex\n * behavior focuses the clicked control from that control's own `click` handler, so only a\n * listener further up the bubble path is guaranteed to run afterwards. Restoring focus\n * there keeps it inside the same event dispatch, so no frame ever paints with focus — and\n * its ring — on the button.\n *\n * Keyboard-activated clicks report an empty `pointerType` and are left alone: there the\n * toolbar is the user's position in the widget and must keep both focus and its ring.\n */\n protected restoreEditorFocus(event: MouseEvent): void {\n if (!(event instanceof PointerEvent)) return;\n if (event.pointerType === '') return;\n // The URL editor legitimately owns focus once it opens.\n if (this.linkEditing()) return;\n\n const view = this._view;\n if (view) view.focus();\n }\n\n protected applyLink(event?: Event): void {\n // Enter must not bubble into an enclosing <form> submit or other default handling.\n if (event) event.preventDefault();\n\n const view = this._view;\n const href = this.linkUrl().trim();\n this.linkEditing.set(false);\n if (!view) return;\n if (!href || !this._isSafeHref(href)) {\n view.focus();\n return;\n }\n\n toggleMark(richTextSchema.marks['link'], { href })(view.state, view.dispatch);\n view.focus();\n }\n\n protected cancelLink(event?: Event): void {\n // Escape must not also close an enclosing dialog or clear other default behavior.\n if (event) event.preventDefault();\n\n const view = this._view;\n this.linkEditing.set(false);\n if (view) view.focus();\n }\n\n protected onLinkInput(event: Event): void {\n const target = event.target as HTMLInputElement;\n\n this.linkUrl.set(target.value);\n }\n\n // Private methods\n private _createView(): void {\n const host = this._editorHost();\n\n const state = EditorState.create({\n schema: richTextSchema,\n doc: markdownParser.parse(this.value()),\n plugins: buildRichTextPlugins(richTextSchema, {\n toggleLink: () => {\n this._toggleLink();\n return true;\n },\n }),\n });\n\n const view = new EditorView(host.nativeElement, {\n state,\n editable: () => !this.notInteractive(),\n attributes: () => this._contentAttributes(),\n handleDOMEvents: {\n blur: () => {\n this.touched.set(true);\n return false;\n },\n },\n dispatchTransaction: transaction => {\n const newState = view.state.apply(transaction);\n view.updateState(newState);\n this._editorState.set(newState);\n\n if (transaction.docChanged) {\n const markdown = markdownSerializer.serialize(newState.doc);\n this._lastEmitted = markdown;\n this.value.set(markdown);\n }\n },\n });\n\n this._view = view;\n this._editorState.set(state);\n // Seed with the Markdown the document was built from, so the value-sync effect's\n // \"own emit\" guard starts aligned with the actual content — otherwise the first\n // external write that happens to equal the seed default is silently dropped.\n this._lastEmitted = this.value();\n }\n\n /**\n * Whether an href is safe to store as a link: scheme-less (relative, `#anchor`) or\n * carrying an allow-listed scheme. Rejects `javascript:`/`data:`-style URLs so a\n * crafted link cannot smuggle an executable payload into the emitted Markdown.\n */\n private _isSafeHref(href: string): boolean {\n const scheme = LINK_SCHEME_REGEX.exec(href);\n if (!scheme) return true;\n return SAFE_LINK_SCHEMES.includes(scheme[0].toLowerCase());\n }\n\n // Whether the document holds no content (a single empty top-level block), so the\n // placeholder should show. ProseMirror keeps a trailing `<br>` in empty textblocks,\n // which defeats a CSS `:empty` check, so emptiness is derived from the document model.\n private _isDocumentEmpty(): boolean {\n const state = this._editorState();\n if (!state) return true;\n\n const { doc } = state;\n if (doc.childCount > 1) return false;\n\n const firstChild = doc.firstChild;\n return firstChild === null || firstChild.content.size === 0;\n }\n\n // Removes the link on the current selection, or opens the link editor to add one.\n private _toggleLink(): void {\n const view = this._view;\n if (!view) return;\n\n if (this._buttons['link'].isActive(view.state)) {\n this._buttons['link'].command(view.state, view.dispatch, view);\n view.focus();\n return;\n }\n\n if (view.state.selection.empty) {\n view.focus();\n return;\n }\n\n this.linkUrl.set('');\n this.linkEditing.set(true);\n }\n\n // Lifecycle\n public ngOnDestroy(): void {\n const view = this._view;\n if (!view) return;\n\n // Cleared so a deferred focus restore that outlives the component is a no-op\n // rather than a call into a destroyed view.\n this._view = null;\n view.destroy();\n }\n}\n","<div\n class=\"tls-rich-text-editor__toolbar\"\n ngToolbar\n [attr.aria-label]=\"labels.toolbar\"\n (click)=\"restoreEditorFocus($event)\"\n>\n @for (entry of entries(); track $index) {\n @if (entry.separator) {\n <span class=\"tls-rich-text-editor__separator\" aria-hidden=\"true\"></span>\n } @else if (entry.button) {\n <button\n class=\"tls-rich-text-editor__button\"\n [class.tls-rich-text-editor__button--active]=\"isActive(entry.button)\"\n [class.tls-rich-text-editor__button--text]=\"entry.button.text\"\n type=\"button\"\n ngToolbarWidget\n [value]=\"entry.button.id\"\n [disabled]=\"notInteractive()\"\n [attr.aria-label]=\"entry.button.label\"\n [attr.aria-pressed]=\"isActive(entry.button)\"\n [attr.title]=\"entry.button.shortcut ? entry.button.label + ' (' + entry.button.shortcut + ')' : entry.button.label\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"runCommand(entry.button)\"\n >\n @if (entry.button.text) {\n <span aria-hidden=\"true\">{{ entry.button.text }}</span>\n } @else if (entry.button.icon) {\n <tls-icon class=\"tls-rich-text-editor__icon\" [name]=\"entry.button.icon\" aria-hidden=\"true\" />\n }\n </button>\n }\n }\n</div>\n\n<div #editorHost class=\"tls-rich-text-editor__editor\"></div>\n\n@if (linkEditing()) {\n <div class=\"tls-rich-text-editor__link-bar\">\n <input\n #linkInput\n class=\"tls-rich-text-editor__link-input\"\n type=\"url\"\n inputmode=\"url\"\n [placeholder]=\"labels.linkPlaceholder\"\n [attr.aria-label]=\"labels.linkUrl\"\n [value]=\"linkUrl()\"\n (input)=\"onLinkInput($event)\"\n (keydown.enter)=\"applyLink($event)\"\n (keydown.escape)=\"cancelLink($event)\"\n />\n <button\n class=\"tls-rich-text-editor__link-action\"\n type=\"button\"\n (click)=\"applyLink()\"\n >\n {{ labels.linkApply }}\n </button>\n <button\n class=\"tls-rich-text-editor__link-action tls-rich-text-editor__link-action--ghost\"\n type=\"button\"\n (click)=\"cancelLink()\"\n >\n {{ labels.linkCancel }}\n </button>\n </div>\n}\n","import { EnvironmentProviders, makeEnvironmentProviders } from '@angular/core';\nimport { deepMerge } from '@thalassic/core';\nimport {\n DEFAULT_RICH_TEXT_EDITOR_CONFIG,\n RICH_TEXT_EDITOR_CONFIG,\n RichTextEditorConfig,\n richTextEditorConfigOverride,\n} from '../features/rich-text-editor';\n\nexport const provideThalassicRichTextEditorConfig = (\n config: richTextEditorConfigOverride,\n): EnvironmentProviders => {\n return makeEnvironmentProviders([\n {\n provide: RICH_TEXT_EDITOR_CONFIG,\n // `labels` is a deep-partial override; deepMerge merges it recursively, but its\n // `Partial<T>` signature only models a shallow partial, so cast to it.\n useValue: deepMerge(DEFAULT_RICH_TEXT_EDITOR_CONFIG, config as Partial<RichTextEditorConfig>),\n },\n ]);\n};\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["markdownSchema"],"mappings":";;;;;;;;;;;;;;;;AAEA;;;AAGG;AACI,MAAM,iBAAiB,GAC5B,OAAO,SAAS,KAAK,WAAW,IAAI,sBAAsB,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC;AAErF;AACO,MAAM,iBAAiB,GAAG,sBAAsB;AAEvD;;;;AAIG;AACI,MAAM,iBAAiB,GAAsB,CAAC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,CAAC;AAE1F;AACO,MAAM,yBAAyB,GAA2B;IAC/D,MAAM;IACN,QAAQ;IACR,eAAe;IACf,MAAM;IACN,WAAW;IACX,UAAU;IACV,UAAU;IACV,UAAU;IACV,WAAW;IACX,YAAY;IACZ,aAAa;IACb,YAAY;IACZ,WAAW;IACX,MAAM;IACN,WAAW;CACZ;;ACjCD;;;;;AAKG;AACI,MAAM,cAAc,GAAW,IAAI,MAAM,CAAC;AAC/C,IAAA,KAAK,EAAEA,MAAc,CAAC,IAAI,CAAC,KAAK;IAChC,KAAK,EAAEA,MAAc,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,eAAe,EAAE;AACzD,QAAA,QAAQ,EAAE;YACR,EAAE,GAAG,EAAE,GAAG,EAAE;YACZ,EAAE,GAAG,EAAE,KAAK,EAAE;YACd,EAAE,KAAK,EAAE,8BAA8B,EAAE;YACzC,EAAE,KAAK,EAAE,mCAAmC,EAAE;AAC/C,SAAA;QACD,KAAK,EAAE,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC;KACtB,CAAC;AACH,CAAA,CAAC;;ACXF;;;AAGG;AACI,MAAM,kBAAkB,GAAG,IAAI,kBA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EAAA,IAAA,EAAA,CAAA,YAAY,oEACjB,WAAW,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AErE5E,MAAM,oCAAoC,GAAG,CAClD,MAAoC,KACZ;AACxB,IAAA,OAAO,wBAAwB,CAAC;AAC9B,QAAA;AACE,YAAA,OAAO,EAAE,uBAAuB;;;AAGhC,YAAA,QAAQ,EAAE,SAAS,CAAC,+BAA+B,EAAE,MAAuC,CAAC;AAC9F,SAAA;AACF,KAAA,CAAC;AACJ;;ACpBA;;AAEG;;;;"}
1
+ {"version":3,"file":"thalassic-ui-rich-text-editor.mjs","sources":["../../../../libs/ui/rich-text-editor/src/features/rich-text-editor/rich-text-editor.constants.ts","../../../../libs/ui/rich-text-editor/src/features/rich-text-editor/rich-text-editor.schema.ts","../../../../libs/ui/rich-text-editor/src/features/rich-text-editor/rich-text-editor.markdown.ts","../../../../libs/ui/rich-text-editor/src/features/rich-text-editor/rich-text-editor.plugins.ts","../../../../libs/ui/rich-text-editor/src/features/rich-text-editor/rich-text-editor.config.ts","../../../../libs/ui/rich-text-editor/src/features/rich-text-editor/rich-text-editor.token.ts","../../../../libs/ui/rich-text-editor/src/features/rich-text-editor/rich-text-editor.toolbar.ts","../../../../libs/ui/rich-text-editor/src/features/rich-text-editor/rich-text-editor.ts","../../../../libs/ui/rich-text-editor/src/features/rich-text-editor/rich-text-editor.html","../../../../libs/ui/rich-text-editor/src/providers/rich-text-editor.provider.ts","../../../../libs/ui/rich-text-editor/src/thalassic-ui-rich-text-editor.ts"],"sourcesContent":["import { richTextToolbarEntry } from './rich-text-editor.types';\n\n/**\n * Whether the runtime is an Apple platform, where shortcuts are shown with the ⌘ symbol\n * (matching ProseMirror's `Mod-` resolution to Cmd there and Ctrl elsewhere).\n */\nexport const IS_APPLE_PLATFORM: boolean =\n typeof navigator !== 'undefined' && /Mac|iPhone|iPad|iPod/.test(navigator.platform);\n\n/** Matches a URL scheme prefix (`https:`, `javascript:`, …) at the start of an href. */\nexport const LINK_SCHEME_REGEX = /^[a-z][a-z0-9+.-]*:/i;\n\n/**\n * Schemes a link href may carry. Anything else (`javascript:`, `data:`, …) is rejected\n * so a crafted URL cannot smuggle an executable payload into the emitted Markdown;\n * scheme-less hrefs (relative paths, `#anchors`) are always allowed.\n */\nexport const SAFE_LINK_SCHEMES: readonly string[] = ['http:', 'https:', 'mailto:', 'tel:'];\n\n/** The default toolbar layout, grouped by kind with `separator` entries between groups. */\nexport const DEFAULT_RICH_TEXT_TOOLBAR: richTextToolbarEntry[] = [\n 'bold',\n 'italic',\n 'strikethrough',\n 'code',\n 'separator',\n 'heading1',\n 'heading2',\n 'heading3',\n 'separator',\n 'bulletList',\n 'orderedList',\n 'blockquote',\n 'separator',\n 'link',\n 'codeBlock',\n];\n","import { Schema } from 'prosemirror-model';\nimport { schema as markdownSchema } from 'prosemirror-markdown';\n\n/**\n * The editor document schema. It reuses `prosemirror-markdown`'s Markdown-capable\n * node/mark set (paragraph, headings, blockquote, code block, ordered/bullet lists,\n * strong, em, inline code, link) so every document round-trips losslessly to Markdown,\n * extended with a `strikethrough` mark for GFM `~~…~~`.\n */\nexport const richTextSchema: Schema = new Schema({\n nodes: markdownSchema.spec.nodes,\n marks: markdownSchema.spec.marks.addToEnd('strikethrough', {\n parseDOM: [\n { tag: 's' },\n { tag: 'del' },\n { style: 'text-decoration=line-through' },\n { style: 'text-decoration-line=line-through' },\n ],\n toDOM: () => ['s', 0],\n }),\n});\n","import MarkdownIt from 'markdown-it';\nimport {\n defaultMarkdownParser,\n defaultMarkdownSerializer,\n MarkdownParser,\n MarkdownSerializer,\n} from 'prosemirror-markdown';\nimport { richTextSchema } from './rich-text-editor.schema';\n\n/**\n * Serializes an editor document to a Markdown string. Extends the default serializer\n * with the `strikethrough` mark, emitted as GFM `~~…~~`.\n */\nexport const markdownSerializer = new MarkdownSerializer(defaultMarkdownSerializer.nodes, {\n ...defaultMarkdownSerializer.marks,\n strikethrough: {\n open: '~~',\n close: '~~',\n mixable: true,\n expelEnclosingWhitespace: true,\n },\n});\n\n/**\n * Parses a Markdown string into an editor document. Uses a dedicated CommonMark tokenizer\n * (matching `prosemirror-markdown`'s default, without mutating that shared instance) with\n * strikethrough enabled so `~~…~~` maps onto the `strikethrough` mark, and targets the\n * extended {@link richTextSchema}.\n */\nexport const markdownParser = new MarkdownParser(\n richTextSchema,\n new MarkdownIt('commonmark', { html: false }).enable('strikethrough'),\n {\n ...defaultMarkdownParser.tokens,\n s: { mark: 'strikethrough' },\n },\n);\n","import { baseKeymap, chainCommands, exitCode, toggleMark } from 'prosemirror-commands';\nimport { history, redo, undo } from 'prosemirror-history';\nimport {\n inputRules,\n textblockTypeInputRule,\n undoInputRule,\n wrappingInputRule,\n} from 'prosemirror-inputrules';\nimport { keymap } from 'prosemirror-keymap';\nimport { Schema } from 'prosemirror-model';\nimport { liftListItem, sinkListItem, splitListItem } from 'prosemirror-schema-list';\nimport { Plugin } from 'prosemirror-state';\nimport { RichTextEditorHandlers } from './rich-text-editor.types';\n\n/**\n * Markdown-style typing shortcuts: `# ` for headings, `- `/`* ` for bullet lists,\n * `1. ` for ordered lists, `> ` for blockquotes, and a fenced ``` for code blocks.\n */\nfunction buildInputRules(schema: Schema): Plugin {\n return inputRules({\n rules: [\n wrappingInputRule(/^\\s*>\\s$/, schema.nodes['blockquote']),\n wrappingInputRule(\n /^(\\d+)\\.\\s$/,\n schema.nodes['ordered_list'],\n match => ({ order: Number(match[1]) }),\n (match, node) => node.childCount + node.attrs['order'] === Number(match[1]),\n ),\n wrappingInputRule(/^\\s*([-+*])\\s$/, schema.nodes['bullet_list']),\n textblockTypeInputRule(/^```$/, schema.nodes['code_block']),\n textblockTypeInputRule(/^(#{1,3})\\s$/, schema.nodes['heading'], match => ({\n level: match[1].length,\n })),\n ],\n });\n}\n\n/**\n * Keyboard shortcuts layered on top of the base editing keymap: inline-mark toggles,\n * history, input-rule reversal, list splitting/indentation, and a soft line break.\n * Shortcuts whose behavior lives in the host component (link editing) come from `handlers`.\n */\nfunction buildKeymap(schema: Schema, handlers: RichTextEditorHandlers): Plugin {\n const hardBreak = schema.nodes['hard_break'];\n const listItem = schema.nodes['list_item'];\n\n return keymap({\n 'Mod-z': undo,\n 'Shift-Mod-z': redo,\n 'Mod-y': redo,\n\n Backspace: undoInputRule,\n\n 'Mod-b': toggleMark(schema.marks['strong']),\n 'Mod-i': toggleMark(schema.marks['em']),\n 'Mod-`': toggleMark(schema.marks['code']),\n 'Mod-k': () => handlers.toggleLink(),\n\n Enter: splitListItem(listItem),\n 'Mod-[': liftListItem(listItem),\n 'Mod-]': sinkListItem(listItem),\n\n 'Shift-Enter': chainCommands(exitCode, (state, dispatch) => {\n if (dispatch) dispatch(state.tr.replaceSelectionWith(hardBreak.create()).scrollIntoView());\n return true;\n }),\n });\n}\n\n/** The full plugin stack shared by every editor instance built on {@link richTextSchema}. */\nexport function buildRichTextPlugins(schema: Schema, handlers: RichTextEditorHandlers): Plugin[] {\n return [buildInputRules(schema), buildKeymap(schema, handlers), keymap(baseKeymap), history()];\n}\n","import { controlSize } from '@thalassic/ui';\nimport { DEFAULT_RICH_TEXT_TOOLBAR } from './rich-text-editor.constants';\nimport { richTextToolbarEntry, richTextToolbarItem } from './rich-text-editor.types';\n\n/** User-facing strings rendered by the editor, overridable for localization. */\nexport interface RichTextEditorLabels {\n /** Accessible name for the formatting toolbar. */\n toolbar: string;\n /** Accessible name for the link URL input. */\n linkUrl: string;\n /** Placeholder shown in the link URL input. */\n linkPlaceholder: string;\n /** Label for the button that applies the link. */\n linkApply: string;\n /** Label for the button that dismisses the link editor. */\n linkCancel: string;\n /** Accessible names (and tooltips) for the toolbar controls, keyed by control. */\n controls: Record<richTextToolbarItem, string>;\n}\n\nexport interface RichTextEditorConfig {\n size: controlSize;\n placeholder: string;\n fluid: boolean;\n /** Ordered toolbar layout; `separator` entries render a visual group divider. */\n toolbar: richTextToolbarEntry[];\n /** Minimum height of the editable area, expressed in rows of text. */\n minRows: number;\n /** User-facing strings, overridable for localization. */\n labels: RichTextEditorLabels;\n}\n\n/**\n * Consumer-supplied config overrides. Every field is optional, including the nested\n * `labels` (and its per-control map), so a caller can retitle a single control without\n * restating the rest.\n */\nexport type richTextEditorConfigOverride = Partial<Omit<RichTextEditorConfig, 'labels'>> & {\n labels?: Partial<Omit<RichTextEditorLabels, 'controls'>> & {\n controls?: Partial<Record<richTextToolbarItem, string>>;\n };\n};\n\nexport const DEFAULT_RICH_TEXT_EDITOR_CONFIG: RichTextEditorConfig = {\n size: 'md',\n placeholder: '',\n fluid: false,\n toolbar: DEFAULT_RICH_TEXT_TOOLBAR,\n minRows: 4,\n labels: {\n toolbar: 'Text formatting',\n linkUrl: 'Link URL',\n linkPlaceholder: 'https://example.com',\n linkApply: 'Apply',\n linkCancel: 'Cancel',\n controls: {\n bold: 'Bold',\n italic: 'Italic',\n strikethrough: 'Strikethrough',\n code: 'Inline code',\n heading1: 'Heading 1',\n heading2: 'Heading 2',\n heading3: 'Heading 3',\n bulletList: 'Bulleted list',\n orderedList: 'Numbered list',\n blockquote: 'Quote',\n link: 'Link',\n codeBlock: 'Code block',\n },\n },\n};\n","import { InjectionToken } from '@angular/core';\nimport { DEFAULT_RICH_TEXT_EDITOR_CONFIG, RichTextEditorConfig } from './rich-text-editor.config';\n\nexport const RICH_TEXT_EDITOR_CONFIG = new InjectionToken<RichTextEditorConfig>(\n 'RICH_TEXT_EDITOR_CONFIG',\n {\n factory: () => DEFAULT_RICH_TEXT_EDITOR_CONFIG,\n },\n);\n","import { lift, setBlockType, toggleMark, wrapIn } from 'prosemirror-commands';\nimport { MarkType, NodeType, Schema } from 'prosemirror-model';\nimport { liftListItem, wrapInList } from 'prosemirror-schema-list';\nimport { Command, EditorState, NodeSelection } from 'prosemirror-state';\nimport { RichTextEditorLabels } from './rich-text-editor.config';\nimport { IS_APPLE_PLATFORM } from './rich-text-editor.constants';\nimport { RichTextToolbarButton, richTextToolbarItem } from './rich-text-editor.types';\n\n/**\n * Human-readable label for a `Mod-<key>` shortcut on the current platform (e.g. ⌘B / Ctrl+B).\n */\nfunction shortcutLabel(key: string): string {\n return IS_APPLE_PLATFORM ? `⌘${key}` : `Ctrl+${key}`;\n}\n\n/**\n * Whether `markType` is applied across the selection (or is queued on an empty selection).\n */\nfunction markActive(state: EditorState, markType: MarkType): boolean {\n const { from, $from, to, empty } = state.selection;\n if (empty) return Boolean(markType.isInSet(state.storedMarks || $from.marks()));\n return state.doc.rangeHasMark(from, to, markType);\n}\n\n/**\n * Whether the selection's textblock is exactly `nodeType` (optionally matching `attrs`).\n */\nfunction blockActive(\n state: EditorState,\n nodeType: NodeType,\n attrs?: Record<string, unknown>,\n): boolean {\n const selection = state.selection;\n if (selection instanceof NodeSelection) return selection.node.hasMarkup(nodeType, attrs);\n\n const { $from, to } = selection;\n return to <= $from.end() && $from.parent.hasMarkup(nodeType, attrs);\n}\n\n/**\n * Whether the selection sits inside a list/blockquote of `nodeType` (walks ancestors).\n */\nfunction ancestorActive(state: EditorState, nodeType: NodeType): boolean {\n const { $from } = state.selection;\n for (let depth = $from.depth; depth > 0; depth--) {\n if ($from.node(depth).type === nodeType) return true;\n }\n return false;\n}\n\n/**\n * Toggles list membership: wraps the selection in `listType`, or lifts it out one\n * level when the selection already sits inside one — so the toolbar control both\n * enters and leaves the list instead of silently failing on a wrapped selection.\n */\nfunction toggleList(listType: NodeType, itemType: NodeType): Command {\n return (state, dispatch, view) => {\n const command = ancestorActive(state, listType) ? liftListItem(itemType) : wrapInList(listType);\n return command(state, dispatch, view);\n };\n}\n\n/**\n * Toggles a wrapping node (blockquote): wraps the selection, or lifts it out when\n * the selection already sits inside one.\n */\nfunction toggleWrap(nodeType: NodeType): Command {\n return (state, dispatch, view) => {\n const command = ancestorActive(state, nodeType) ? lift : wrapIn(nodeType);\n return command(state, dispatch, view);\n };\n}\n\n/** Toggles between a heading of the given level and a plain paragraph. */\nfunction toggleHeading(headingType: NodeType, paragraphType: NodeType, level: number): Command {\n return (state, dispatch, view) => {\n const command = blockActive(state, headingType, { level })\n ? setBlockType(paragraphType)\n : setBlockType(headingType, { level });\n return command(state, dispatch, view);\n };\n}\n\n/**\n * Builds the runtime toolbar-control map for a schema: each entry pairs the ProseMirror\n * command it dispatches with the predicate that reflects its active state. The `link`\n * control's command removes an existing link; adding a link is handled by the component,\n * which supplies the target URL.\n */\nexport function buildToolbarButtons(\n schema: Schema,\n labels: RichTextEditorLabels,\n): Record<richTextToolbarItem, RichTextToolbarButton> {\n const { strong, em, strikethrough, code, link } = schema.marks;\n const { heading, bullet_list, ordered_list, blockquote, code_block, paragraph, list_item } =\n schema.nodes;\n\n return {\n bold: {\n id: 'bold',\n icon: 'bold',\n label: labels.controls.bold,\n shortcut: shortcutLabel('B'),\n command: toggleMark(strong),\n isActive: state => markActive(state, strong),\n },\n italic: {\n id: 'italic',\n icon: 'italic',\n label: labels.controls.italic,\n shortcut: shortcutLabel('I'),\n command: toggleMark(em),\n isActive: state => markActive(state, em),\n },\n strikethrough: {\n id: 'strikethrough',\n icon: 'strikethrough',\n label: labels.controls.strikethrough,\n command: toggleMark(strikethrough),\n isActive: state => markActive(state, strikethrough),\n },\n code: {\n id: 'code',\n icon: 'inline-code',\n label: labels.controls.code,\n shortcut: shortcutLabel('`'),\n command: toggleMark(code),\n isActive: state => markActive(state, code),\n },\n heading1: {\n id: 'heading1',\n label: labels.controls.heading1,\n text: 'H1',\n command: toggleHeading(heading, paragraph, 1),\n isActive: state => blockActive(state, heading, { level: 1 }),\n },\n heading2: {\n id: 'heading2',\n label: labels.controls.heading2,\n text: 'H2',\n command: toggleHeading(heading, paragraph, 2),\n isActive: state => blockActive(state, heading, { level: 2 }),\n },\n heading3: {\n id: 'heading3',\n label: labels.controls.heading3,\n text: 'H3',\n command: toggleHeading(heading, paragraph, 3),\n isActive: state => blockActive(state, heading, { level: 3 }),\n },\n bulletList: {\n id: 'bulletList',\n icon: 'bullet-list',\n label: labels.controls.bulletList,\n command: toggleList(bullet_list, list_item),\n isActive: state => ancestorActive(state, bullet_list),\n },\n orderedList: {\n id: 'orderedList',\n icon: 'ordered-list',\n label: labels.controls.orderedList,\n command: toggleList(ordered_list, list_item),\n isActive: state => ancestorActive(state, ordered_list),\n },\n blockquote: {\n id: 'blockquote',\n icon: 'blockquote',\n label: labels.controls.blockquote,\n command: toggleWrap(blockquote),\n isActive: state => ancestorActive(state, blockquote),\n },\n link: {\n id: 'link',\n icon: 'link',\n label: labels.controls.link,\n shortcut: shortcutLabel('K'),\n command: toggleMark(link),\n isActive: state => markActive(state, link),\n },\n codeBlock: {\n id: 'codeBlock',\n icon: 'code-block',\n label: labels.controls.codeBlock,\n command: (state, dispatch, view) => {\n const command = blockActive(state, code_block)\n ? setBlockType(paragraph)\n : setBlockType(code_block);\n return command(state, dispatch, view);\n },\n isActive: state => blockActive(state, code_block),\n },\n };\n}\n","import {\n afterNextRender,\n booleanAttribute,\n Component,\n computed,\n effect,\n ElementRef,\n forwardRef,\n inject,\n input,\n InputSignal,\n InputSignalWithTransform,\n model,\n ModelSignal,\n OnDestroy,\n signal,\n Signal,\n viewChild,\n WritableSignal,\n} from '@angular/core';\nimport { Toolbar, ToolbarWidget } from '@angular/aria/toolbar';\nimport { toggleMark } from 'prosemirror-commands';\nimport { EditorState } from 'prosemirror-state';\nimport { EditorView } from 'prosemirror-view';\nimport { controlSize, FORM_CONTROL, Icon, ValueFormControl } from '@thalassic/ui';\nimport { RichTextEditorLabels } from './rich-text-editor.config';\nimport { LINK_SCHEME_REGEX, SAFE_LINK_SCHEMES } from './rich-text-editor.constants';\nimport { markdownParser, markdownSerializer } from './rich-text-editor.markdown';\nimport { buildRichTextPlugins } from './rich-text-editor.plugins';\nimport { richTextSchema } from './rich-text-editor.schema';\nimport { RICH_TEXT_EDITOR_CONFIG } from './rich-text-editor.token';\nimport { buildToolbarButtons } from './rich-text-editor.toolbar';\nimport {\n RichTextResolvedEntry,\n RichTextToolbarButton,\n richTextToolbarEntry,\n} from './rich-text-editor.types';\n\n/**\n * A WYSIWYG rich-text form control whose value is a Markdown string. The editable surface is\n * powered by ProseMirror against a Markdown-capable schema, so content round-trips losslessly\n * to Markdown while the user edits formatted text directly.\n */\n@Component({\n selector: 'tls-rich-text-editor',\n templateUrl: './rich-text-editor.html',\n styleUrl: './rich-text-editor.scss',\n imports: [Icon, Toolbar, ToolbarWidget],\n // The accessible name lives on the inner `role=\"textbox\"` (see `_contentAttributes`)\n // where focus lands; the group host reflects only validation state, so screen\n // readers never announce the name twice.\n host: {\n role: 'group',\n '[class]': 'classes()',\n '[style.--tls-rich-text-editor-min-rows]': 'minRows()',\n '[attr.aria-invalid]': \"invalid() ? 'true' : null\",\n },\n providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => RichTextEditor) }],\n})\nexport class RichTextEditor extends ValueFormControl<string> implements OnDestroy {\n // Injections\n private readonly _config = inject(RICH_TEXT_EDITOR_CONFIG);\n\n // Inputs\n public readonly value: ModelSignal<string> = model<string>('');\n public readonly placeholder: InputSignal<string> = input<string>(this._config.placeholder);\n public readonly size: InputSignal<controlSize> = input<controlSize>(this._config.size);\n public readonly fluid: InputSignalWithTransform<boolean, unknown> = input<boolean, unknown>(\n this._config.fluid,\n { transform: booleanAttribute },\n );\n public readonly toolbar: InputSignal<richTextToolbarEntry[]> = input<richTextToolbarEntry[]>(\n this._config.toolbar,\n );\n public readonly minRows: InputSignal<number> = input<number>(this._config.minRows);\n\n // State\n private readonly _editorHost = viewChild.required<ElementRef<HTMLElement>>('editorHost');\n private readonly _linkInput = viewChild<ElementRef<HTMLInputElement>>('linkInput');\n private readonly _editorState: WritableSignal<EditorState | null> = signal<EditorState | null>(\n null,\n );\n protected readonly linkEditing: WritableSignal<boolean> = signal<boolean>(false);\n protected readonly linkUrl: WritableSignal<string> = signal<string>('');\n\n protected readonly labels: RichTextEditorLabels = this._config.labels;\n\n /** The toolbar-control map, resolved once against the schema. */\n private readonly _buttons: Record<string, RichTextToolbarButton> = buildToolbarButtons(\n richTextSchema,\n this._config.labels,\n );\n\n private _view: EditorView | null = null;\n /**\n * The most recent Markdown this component emitted, used to ignore its own value writes.\n */\n private _lastEmitted = '';\n\n // Computed\n protected readonly classes: Signal<string[]> = computed<string[]>(() => {\n const array: string[] = ['tls-rich-text-editor'];\n\n // Size/fluid ride the shared form-control classes (like every text control),\n // so the theme's size tokens apply without a duplicated per-component table.\n array.push(`${this.CLASS_NAME}--${this.size()}`);\n if (this.fluid()) array.push(`${this.CLASS_NAME}--fluid`);\n\n return array.concat(this.controlClasses());\n });\n\n /**\n * The toolbar layout resolved to renderable entries (separators and controls).\n */\n protected readonly entries: Signal<RichTextResolvedEntry[]> = computed<RichTextResolvedEntry[]>(\n () =>\n this.toolbar().map(entry => {\n if (entry === 'separator') return { separator: true, button: null };\n\n return { separator: false, button: this._buttons[entry] };\n }),\n );\n\n /**\n * ARIA/state attributes forwarded onto the contenteditable textbox managed by ProseMirror.\n */\n private readonly _contentAttributes: Signal<Record<string, string>> = computed<\n Record<string, string>\n >(() => {\n const attributes: Record<string, string> = {\n class: 'tls-rich-text-editor__content',\n role: 'textbox',\n 'aria-multiline': 'true',\n translate: 'no',\n };\n\n const label = this.ariaLabel();\n if (label) attributes['aria-label'] = label;\n\n const labelledby = this.labelledBy();\n if (labelledby) attributes['aria-labelledby'] = labelledby;\n\n const describedby = this.describedBy();\n if (describedby) attributes['aria-describedby'] = describedby;\n\n if (this.invalid()) attributes['aria-invalid'] = 'true';\n if (this.required()) attributes['aria-required'] = 'true';\n if (this.pending()) attributes['aria-busy'] = 'true';\n if (this.readonly()) attributes['aria-readonly'] = 'true';\n\n const placeholder = this.placeholder();\n if (placeholder) {\n attributes['data-placeholder'] = placeholder;\n if (this._isDocumentEmpty()) attributes['data-empty'] = 'true';\n }\n\n return attributes;\n });\n\n constructor() {\n super();\n\n // Reflect external value writes back into the document, skipping the component's own emits\n // and no-op writes so typing never rebuilds the document under the cursor.\n effect(() => {\n const markdown = this.value();\n const view = this._view;\n if (!view) return;\n if (markdown === this._lastEmitted) return;\n if (markdown === markdownSerializer.serialize(view.state.doc)) {\n this._lastEmitted = markdown;\n return;\n }\n\n // Replace the document through a transaction on the live state rather than a\n // rebuilt EditorState, so plugin state — notably the undo history — survives\n // the external write (and the write itself becomes undoable).\n const parsed = markdownParser.parse(markdown);\n const transaction = view.state.tr.replaceWith(0, view.state.doc.content.size, parsed.content);\n view.dispatch(transaction);\n this._lastEmitted = markdown;\n });\n\n // Keep the editable state and forwarded ARIA attributes in sync with the control's inputs.\n effect(() => {\n const editable = !this.notInteractive();\n const attributes = this._contentAttributes();\n const view = this._view;\n if (!view) return;\n\n view.setProps({ editable: () => editable, attributes: () => attributes });\n });\n\n // Move focus into the URL input when the link editor opens, so the ⌘K/toolbar flow\n // continues on the keyboard without tabbing.\n effect(() => {\n const linkInput = this._linkInput();\n if (this.linkEditing() && linkInput) linkInput.nativeElement.focus();\n });\n\n afterNextRender(() => this._createView());\n }\n\n // Protected methods\n protected isActive(button: RichTextToolbarButton): boolean {\n const state = this._editorState();\n if (!state) return false;\n return button.isActive(state);\n }\n\n protected runCommand(button: RichTextToolbarButton): void {\n const view = this._view;\n if (!view) return;\n\n if (button.id === 'link') {\n this._toggleLink();\n return;\n }\n\n button.command(view.state, view.dispatch, view);\n }\n\n /**\n * Returns focus to the editable surface after a pointer-driven toolbar click.\n *\n * Bound on the toolbar container rather than the controls themselves: the roving-tabindex\n * behavior focuses the clicked control from that control's own `click` handler, so only a\n * listener further up the bubble path is guaranteed to run afterwards. Restoring focus\n * there keeps it inside the same event dispatch, so no frame ever paints with focus — and\n * its ring — on the button.\n *\n * Keyboard-activated clicks report an empty `pointerType` and are left alone: there the\n * toolbar is the user's position in the widget and must keep both focus and its ring.\n */\n protected restoreEditorFocus(event: MouseEvent): void {\n if (!(event instanceof PointerEvent)) return;\n if (event.pointerType === '') return;\n // The URL editor legitimately owns focus once it opens.\n if (this.linkEditing()) return;\n\n const view = this._view;\n if (view) view.focus();\n }\n\n protected applyLink(event?: Event): void {\n // Enter must not bubble into an enclosing <form> submit or other default handling.\n if (event) event.preventDefault();\n\n const view = this._view;\n const href = this.linkUrl().trim();\n this.linkEditing.set(false);\n if (!view) return;\n if (!href || !this._isSafeHref(href)) {\n view.focus();\n return;\n }\n\n toggleMark(richTextSchema.marks['link'], { href })(view.state, view.dispatch);\n view.focus();\n }\n\n protected cancelLink(event?: Event): void {\n // Escape must not also close an enclosing dialog or clear other default behavior.\n if (event) event.preventDefault();\n\n const view = this._view;\n this.linkEditing.set(false);\n if (view) view.focus();\n }\n\n protected onLinkInput(event: Event): void {\n const target = event.target as HTMLInputElement;\n\n this.linkUrl.set(target.value);\n }\n\n // Private methods\n private _createView(): void {\n const host = this._editorHost();\n\n const state = EditorState.create({\n schema: richTextSchema,\n doc: markdownParser.parse(this.value()),\n plugins: buildRichTextPlugins(richTextSchema, {\n toggleLink: () => {\n this._toggleLink();\n return true;\n },\n }),\n });\n\n const view = new EditorView(host.nativeElement, {\n state,\n editable: () => !this.notInteractive(),\n attributes: () => this._contentAttributes(),\n handleDOMEvents: {\n blur: () => {\n this.touched.set(true);\n return false;\n },\n },\n dispatchTransaction: transaction => {\n const newState = view.state.apply(transaction);\n view.updateState(newState);\n this._editorState.set(newState);\n\n if (transaction.docChanged) {\n const markdown = markdownSerializer.serialize(newState.doc);\n this._lastEmitted = markdown;\n this.value.set(markdown);\n }\n },\n });\n\n this._view = view;\n this._editorState.set(state);\n // Seed with the Markdown the document was built from, so the value-sync effect's\n // \"own emit\" guard starts aligned with the actual content — otherwise the first\n // external write that happens to equal the seed default is silently dropped.\n this._lastEmitted = this.value();\n }\n\n /**\n * Whether an href is safe to store as a link: scheme-less (relative, `#anchor`) or\n * carrying an allow-listed scheme. Rejects `javascript:`/`data:`-style URLs so a\n * crafted link cannot smuggle an executable payload into the emitted Markdown.\n */\n private _isSafeHref(href: string): boolean {\n const scheme = LINK_SCHEME_REGEX.exec(href);\n if (!scheme) return true;\n return SAFE_LINK_SCHEMES.includes(scheme[0].toLowerCase());\n }\n\n /**\n * Whether the document holds no content (a single empty top-level block), so the\n * placeholder should show. ProseMirror keeps a trailing `<br>` in empty textblocks,\n * which defeats a CSS `:empty` check, so emptiness is derived from the document model.\n */\n private _isDocumentEmpty(): boolean {\n const state = this._editorState();\n if (!state) return true;\n\n const { doc } = state;\n if (doc.childCount > 1) return false;\n\n const firstChild = doc.firstChild;\n return firstChild === null || firstChild.content.size === 0;\n }\n\n /**\n * Removes the link on the current selection, or opens the link editor to add one.\n */\n private _toggleLink(): void {\n const view = this._view;\n if (!view) return;\n\n if (this._buttons['link'].isActive(view.state)) {\n this._buttons['link'].command(view.state, view.dispatch, view);\n view.focus();\n return;\n }\n\n if (view.state.selection.empty) {\n view.focus();\n return;\n }\n\n this.linkUrl.set('');\n this.linkEditing.set(true);\n }\n\n // Lifecycle\n public ngOnDestroy(): void {\n const view = this._view;\n if (!view) return;\n\n // Cleared so a deferred focus restore that outlives the component is a no-op\n // rather than a call into a destroyed view.\n this._view = null;\n view.destroy();\n }\n}\n","<div\n class=\"tls-rich-text-editor__toolbar\"\n ngToolbar\n [attr.aria-label]=\"labels.toolbar\"\n (click)=\"restoreEditorFocus($event)\"\n>\n @for (entry of entries(); track $index) {\n @if (entry.separator) {\n <span class=\"tls-rich-text-editor__separator\" aria-hidden=\"true\"></span>\n } @else if (entry.button) {\n <button\n class=\"tls-rich-text-editor__button\"\n [class.tls-rich-text-editor__button--active]=\"isActive(entry.button)\"\n [class.tls-rich-text-editor__button--text]=\"entry.button.text\"\n type=\"button\"\n ngToolbarWidget\n [value]=\"entry.button.id\"\n [disabled]=\"notInteractive()\"\n [attr.aria-label]=\"entry.button.label\"\n [attr.aria-pressed]=\"isActive(entry.button)\"\n [attr.title]=\"entry.button.shortcut ? entry.button.label + ' (' + entry.button.shortcut + ')' : entry.button.label\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"runCommand(entry.button)\"\n >\n @if (entry.button.text) {\n <span aria-hidden=\"true\">{{ entry.button.text }}</span>\n } @else if (entry.button.icon) {\n <tls-icon class=\"tls-rich-text-editor__icon\" [name]=\"entry.button.icon\" aria-hidden=\"true\" />\n }\n </button>\n }\n }\n</div>\n\n<div #editorHost class=\"tls-rich-text-editor__editor\"></div>\n\n@if (linkEditing()) {\n <div class=\"tls-rich-text-editor__link-bar\">\n <input\n #linkInput\n class=\"tls-rich-text-editor__link-input\"\n type=\"url\"\n inputmode=\"url\"\n [placeholder]=\"labels.linkPlaceholder\"\n [attr.aria-label]=\"labels.linkUrl\"\n [value]=\"linkUrl()\"\n (input)=\"onLinkInput($event)\"\n (keydown.enter)=\"applyLink($event)\"\n (keydown.escape)=\"cancelLink($event)\"\n />\n <button\n class=\"tls-rich-text-editor__link-action\"\n type=\"button\"\n (click)=\"applyLink()\"\n >\n {{ labels.linkApply }}\n </button>\n <button\n class=\"tls-rich-text-editor__link-action tls-rich-text-editor__link-action--ghost\"\n type=\"button\"\n (click)=\"cancelLink()\"\n >\n {{ labels.linkCancel }}\n </button>\n </div>\n}\n","import { EnvironmentProviders, makeEnvironmentProviders } from '@angular/core';\nimport { deepMerge } from '@thalassic/core';\nimport {\n DEFAULT_RICH_TEXT_EDITOR_CONFIG,\n RICH_TEXT_EDITOR_CONFIG,\n RichTextEditorConfig,\n richTextEditorConfigOverride,\n} from '../features/rich-text-editor';\n\nexport const provideThalassicRichTextEditorConfig = (\n config: richTextEditorConfigOverride,\n): EnvironmentProviders => {\n return makeEnvironmentProviders([\n {\n provide: RICH_TEXT_EDITOR_CONFIG,\n // `labels` is a deep-partial override; deepMerge merges it recursively, but its\n // `Partial<T>` signature only models a shallow partial, so cast to it.\n useValue: deepMerge(DEFAULT_RICH_TEXT_EDITOR_CONFIG, config as Partial<RichTextEditorConfig>),\n },\n ]);\n};\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["markdownSchema"],"mappings":";;;;;;;;;;;;;;;;AAEA;;;AAGG;AACI,MAAM,iBAAiB,GAC5B,OAAO,S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