@inshapardaz/likhari-react 0.1.21 → 0.1.22-dev.218

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.
Files changed (55) hide show
  1. package/dist/EditorRoot.d.ts +12 -0
  2. package/dist/EditorRoot.d.ts.map +1 -1
  3. package/dist/EditorRoot.js +21 -4
  4. package/dist/autocorrect/AutoCorrectPlugin.d.ts +27 -0
  5. package/dist/autocorrect/AutoCorrectPlugin.d.ts.map +1 -0
  6. package/dist/autocorrect/AutoCorrectPlugin.js +108 -0
  7. package/dist/autocorrect/autoCorrectActions.d.ts +35 -0
  8. package/dist/autocorrect/autoCorrectActions.d.ts.map +1 -0
  9. package/dist/autocorrect/autoCorrectActions.js +182 -0
  10. package/dist/autocorrect/autoCorrectStores.d.ts +52 -0
  11. package/dist/autocorrect/autoCorrectStores.d.ts.map +1 -0
  12. package/dist/autocorrect/autoCorrectStores.js +115 -0
  13. package/dist/autocorrect/punctuationRules.d.ts +26 -0
  14. package/dist/autocorrect/punctuationRules.d.ts.map +1 -0
  15. package/dist/autocorrect/punctuationRules.js +53 -0
  16. package/dist/cleanup/textCleanupActions.d.ts +8 -0
  17. package/dist/cleanup/textCleanupActions.d.ts.map +1 -0
  18. package/dist/cleanup/textCleanupActions.js +28 -0
  19. package/dist/components/AutoCorrectPanel.d.ts +15 -0
  20. package/dist/components/AutoCorrectPanel.d.ts.map +1 -0
  21. package/dist/components/AutoCorrectPanel.js +44 -0
  22. package/dist/components/SpellcheckPanel.d.ts +15 -0
  23. package/dist/components/SpellcheckPanel.d.ts.map +1 -0
  24. package/dist/components/SpellcheckPanel.js +91 -0
  25. package/dist/components/Toolbar.d.ts +10 -1
  26. package/dist/components/Toolbar.d.ts.map +1 -1
  27. package/dist/components/Toolbar.js +125 -109
  28. package/dist/find/findReplaceActions.d.ts +13 -0
  29. package/dist/find/findReplaceActions.d.ts.map +1 -1
  30. package/dist/find/findReplaceActions.js +2 -2
  31. package/dist/i18n/strings.d.ts +34 -0
  32. package/dist/i18n/strings.d.ts.map +1 -1
  33. package/dist/i18n/strings.js +107 -5
  34. package/dist/index.d.ts +7 -0
  35. package/dist/index.d.ts.map +1 -1
  36. package/dist/index.js +3 -0
  37. package/dist/normalization/urduNormalize.d.ts +24 -0
  38. package/dist/normalization/urduNormalize.d.ts.map +1 -0
  39. package/dist/normalization/urduNormalize.js +116 -0
  40. package/dist/spellcheck/SpellHighlightPlugin.d.ts +8 -0
  41. package/dist/spellcheck/SpellHighlightPlugin.d.ts.map +1 -0
  42. package/dist/spellcheck/SpellHighlightPlugin.js +60 -0
  43. package/dist/spellcheck/spellDictionaries.d.ts.map +1 -1
  44. package/dist/spellcheck/spellDictionaries.js +8 -1
  45. package/dist/spellcheck/spellcheckActions.d.ts +21 -0
  46. package/dist/spellcheck/spellcheckActions.d.ts.map +1 -0
  47. package/dist/spellcheck/spellcheckActions.js +38 -0
  48. package/dist/spellcheck/spellingMenu.d.ts +15 -0
  49. package/dist/spellcheck/spellingMenu.d.ts.map +1 -0
  50. package/dist/spellcheck/spellingMenu.js +27 -0
  51. package/dist/spellcheck/userWords.d.ts +39 -0
  52. package/dist/spellcheck/userWords.d.ts.map +1 -0
  53. package/dist/spellcheck/userWords.js +132 -0
  54. package/dist/theme/editor.css +185 -0
  55. package/package.json +1 -1
@@ -2,12 +2,17 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
2
2
  import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
3
3
  import { Menu, Select } from '@mantine/core';
4
4
  import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
5
- import { $getSelection, $isRangeSelection, $isElementNode, $setSelection, $getRoot, $getNearestNodeFromDOMNode, $createTextNode, KEY_MODIFIER_COMMAND, COMMAND_PRIORITY_NORMAL, FORMAT_TEXT_COMMAND, FORMAT_ELEMENT_COMMAND, INDENT_CONTENT_COMMAND, OUTDENT_CONTENT_COMMAND, UNDO_COMMAND, REDO_COMMAND, SELECTION_CHANGE_COMMAND, CAN_UNDO_COMMAND, CAN_REDO_COMMAND, COMMAND_PRIORITY_LOW, } from 'lexical';
5
+ import { $getSelection, $isRangeSelection, $isElementNode, $setSelection, $getRoot, $selectAll, $getNearestNodeFromDOMNode, $createTextNode, KEY_MODIFIER_COMMAND, COMMAND_PRIORITY_NORMAL, FORMAT_TEXT_COMMAND, FORMAT_ELEMENT_COMMAND, INDENT_CONTENT_COMMAND, OUTDENT_CONTENT_COMMAND, UNDO_COMMAND, REDO_COMMAND, SELECTION_CHANGE_COMMAND, CAN_UNDO_COMMAND, CAN_REDO_COMMAND, COMMAND_PRIORITY_LOW, } from 'lexical';
6
6
  import { $getSelectionStyleValueForProperty, $patchStyleText, $setBlocksType } from '@lexical/selection';
7
7
  import { $createParagraphNode } from 'lexical';
8
8
  import { $createHeadingNode, $createQuoteNode, $isHeadingNode, $isQuoteNode } from '@lexical/rich-text';
9
9
  import { $isListNode, INSERT_CHECK_LIST_COMMAND, INSERT_ORDERED_LIST_COMMAND, INSERT_UNORDERED_LIST_COMMAND, REMOVE_LIST_COMMAND, } from '@lexical/list';
10
10
  import { $findMatchingParent, $insertNodeToNearestRoot } from '@lexical/utils';
11
+ import { CORRECT_DOCUMENT_COMMAND } from '../autocorrect/AutoCorrectPlugin.js';
12
+ import { $replaceMatch } from '../find/findReplaceActions.js';
13
+ import { getSpeller } from '../spellcheck/spellDictionaries.js';
14
+ import { addUserWord, ignoreWord } from '../spellcheck/userWords.js';
15
+ import { $wordAtDomPoint, textPointAt } from '../spellcheck/spellingMenu.js';
11
16
  import { INSERT_HORIZONTAL_RULE_COMMAND } from '@lexical/react/LexicalHorizontalRuleNode';
12
17
  import { ImageDialog } from '../image/ImageDialog.js';
13
18
  import { $createImageNode } from '../image/ImageNode.js';
@@ -29,7 +34,7 @@ import { CANVAS_FONT_DEFAULTS, DEFAULT_FONT_OPTIONS, FONT_SIZES_PX } from '../fo
29
34
  import { setStyleProperty } from '../utils/style.js';
30
35
  import { useStrings } from '../i18n/useStrings.js';
31
36
  import { usePortalTarget } from '../PortalTargetContext.js';
32
- import { IconAbc, IconAlignCenter, IconAlignJustified, IconAlignLeft, IconAlignRight, IconArrowBackUp, IconArrowForwardUp, IconBold, IconClearFormatting, IconDeviceFloppy, IconDots, IconHistory, IconExternalLink, IconFeather, IconH1, IconH2, IconH3, IconH4, IconH5, IconH6, IconIndentDecrease, IconIndentIncrease, IconItalic, IconLetterCase, IconLetterCaseLower, IconLetterCaseUpper, IconLink, IconLinkOff, IconList, IconListCheck, IconListNumbers, IconPageBreak, IconPencil, IconPhoto, IconPilcrow, IconQuote, IconSeparatorHorizontal, IconSparkles, IconStrikethrough, IconSubscript, IconSuperscript, IconArrowMergeBoth, IconArrowsSplit2, IconColumnInsertLeft, IconColumnInsertRight, IconColumnRemove, IconColumns, IconSearch, IconColumns1, IconColumns2, IconNumber1Small, IconRowInsertBottom, IconRowInsertTop, IconRowRemove, IconArrowsMaximize, IconArrowsMinimize, IconArrowsShuffle, IconTable, IconTableMinus, IconTrash, IconTableOptions, IconTextSize, IconTypography, IconUnderline, IconWand, } from '@tabler/icons-react';
37
+ import { IconAbc, IconAlignCenter, IconAlignJustified, IconAlignLeft, IconAlignRight, IconArrowBackUp, IconArrowForwardUp, IconBold, IconClearFormatting, IconDeviceFloppy, IconDots, IconHistory, IconExternalLink, IconFeather, IconH1, IconH2, IconH3, IconH4, IconH5, IconH6, IconIndentDecrease, IconIndentIncrease, IconItalic, IconLetterCase, IconLetterCaseLower, IconLetterCaseUpper, IconLink, IconLinkOff, IconList, IconListCheck, IconListNumbers, IconPageBreak, IconPencil, IconPhoto, IconPilcrow, IconQuote, IconSeparatorHorizontal, IconSparkles, IconStrikethrough, IconSubscript, IconSuperscript, IconArrowMergeBoth, IconArrowsSplit2, IconColumnInsertLeft, IconColumnInsertRight, IconColumnRemove, IconColumns, IconClipboard, IconCopy, IconCut, IconSearch, IconSelectAll, IconColumns1, IconColumns2, IconNumber1Small, IconRowInsertBottom, IconRowInsertTop, IconRowRemove, IconArrowsMaximize, IconArrowsMinimize, IconArrowsShuffle, IconTable, IconTableMinus, IconTrash, IconTableOptions, IconTextSize, IconTypography, IconUnderline, IconWand, } from '@tabler/icons-react';
33
38
  /** Sentinel for "no inline style": Lexical returns the default it is given when
34
39
  * the selection has none, so this tells "unstyled" (show the canvas default)
35
40
  * apart from "styled with a value the dropdown doesn't list" (show nothing). */
@@ -139,8 +144,6 @@ function OverflowItem({ icon: Icon, label, active, onClick, }) {
139
144
  // Keep the editor's selection: a mousedown here would blur the canvas.
140
145
  onMouseDown: (e) => e.preventDefault(), onClick: onClick, children: label }));
141
146
  }
142
- /** The link menu's contents — shared by the toolbar button and the right-click
143
- * menu: the URL (opens in a new tab), Edit link, Remove link. */
144
147
  function LinkMenuItems({ url, onEdit, onRemove, strings }) {
145
148
  // Only offer the link as clickable if it's a URL the editor would have accepted.
146
149
  const safeUrl = normalizeLinkUrl(url);
@@ -182,7 +185,7 @@ function PoetryMenuItems({ strings, layout, scale, centered, onAction, }) {
182
185
  };
183
186
  return (_jsxs(_Fragment, { children: [_jsx(Menu.Label, { children: t.menuLabel }), item(IconColumns1, t.singleColumn, setLayout('single'), layout === 'single'), item(IconColumns2, t.twoColumn, setLayout('two-column'), layout === 'two-column'), item(IconArrowsShuffle, t.staggered, setLayout('staggered'), layout === 'staggered'), _jsx(Menu.Divider, {}), _jsx(Menu.Divider, {}), item(IconRowInsertTop, t.insertCoupletBefore, () => $insertCoupletRelativeToSelection('before')), item(IconRowInsertBottom, t.insertCoupletAfter, () => $insertCoupletRelativeToSelection('after')), item(IconArrowsMinimize, t.tighterSpacing, () => $adjustPoetrySpacing(-1), !canStep(POETRY_SPACINGS, scale.spacing, -1)), item(IconArrowsMaximize, t.looserSpacing, () => $adjustPoetrySpacing(1), !canStep(POETRY_SPACINGS, scale.spacing, 1)), layout === 'staggered' && (_jsxs(_Fragment, { children: [item(IconArrowsMinimize, t.narrowerCouplets, () => $adjustPoetryStagger(-1), !canStep(POETRY_STAGGERS, scale.stagger, -1)), item(IconArrowsMaximize, t.widerCouplets, () => $adjustPoetryStagger(1), !canStep(POETRY_STAGGERS, scale.stagger, 1))] })), layout === 'two-column' && (_jsxs(_Fragment, { children: [item(IconAlignCenter, centered ? t.uncenterCouplet : t.centerCouplet, () => $setCoupletCentered(!centered)), item(IconColumns2, t.narrowerGutter, () => $adjustPoetryGutter(-1), !canStep(POETRY_GUTTERS, scale.gutter, -1)), item(IconColumns2, t.widerGutter, () => $adjustPoetryGutter(1), !canStep(POETRY_GUTTERS, scale.gutter, 1))] })), item(IconTrash, t.deleteCouplet, $deletePoetryCouplet, false, 'red'), item(IconTrash, t.deletePoetry, $deletePoetryBlock, false, 'red')] }));
184
187
  }
185
- export function Toolbar({ config, onSave, isDirty, showSave, findOpen = false, onToggleFind, fontOptions = DEFAULT_FONT_OPTIONS, direction = 'ltr', locale = 'en', drafts }) {
188
+ export function Toolbar({ config, dictionaryStores = [], onSave, isDirty, showSave, findOpen = false, onToggleFind, spellOpen = false, onToggleSpell, autoCorrectOpen = false, onToggleAutoCorrect, fontOptions = DEFAULT_FONT_OPTIONS, direction = 'ltr', locale = 'en', drafts }) {
186
189
  const [editor] = useLexicalComposerContext();
187
190
  const [state, setState] = useState(INITIAL_STATE);
188
191
  const strings = useStrings(locale);
@@ -463,112 +466,116 @@ export function Toolbar({ config, onSave, isDirty, showSave, findOpen = false, o
463
466
  editor.dispatchCommand(TOGGLE_LINK_COMMAND, null);
464
467
  closeLinkDialog();
465
468
  };
466
- // Right-clicking a link in the text opens the same menu, at the pointer.
467
- const [linkContext, setLinkContext] = useState(null);
468
- useEffect(() => {
469
- if (!config.links)
470
- return;
471
- const onContextMenu = (event) => {
472
- const anchor = event.target?.closest?.('a');
473
- if (!anchor)
474
- return;
475
- let url = null;
476
- // Select the whole link first, so Edit / Remove act on it wherever the caret was.
477
- editor.update(() => {
478
- const node = $getNearestNodeFromDOMNode(anchor);
479
- const link = node ? $findMatchingParent(node, $isLinkNode) : null;
480
- if (!link || !$isLinkNode(link))
481
- return;
482
- url = link.getURL();
483
- link.select(0, link.getChildrenSize());
484
- }, { discrete: true });
485
- if (url === null)
486
- return;
487
- event.preventDefault();
488
- snapshotSelectionRef.current();
489
- setLinkContext({ x: event.clientX, y: event.clientY, url });
490
- };
491
- return editor.registerRootListener((root, previous) => {
492
- previous?.removeEventListener('contextmenu', onContextMenu);
493
- root?.addEventListener('contextmenu', onContextMenu);
494
- });
495
- }, [editor, config.links]);
496
- // Table/poetry contextual-menu actions. The menu takes focus, so the
497
- // selection is snapshotted when it opens and restored before an action runs.
469
+ // One right-click menu for the whole editor, replacing the browser's own. It
470
+ // adds what applies to what is under the pointer (a spelling fix, a link, a
471
+ // table cell, a poetry couplet) and always offers cut, copy, paste and select all.
498
472
  const runMenuAction = (action) => () => {
499
473
  restoreSelection();
500
474
  editor.update(action);
501
475
  editor.focus();
502
476
  };
503
- // Right-clicking a table cell opens the same actions at the pointer.
504
- const [tableContext, setTableContext] = useState(null);
477
+ const [contextMenu, setContextMenu] = useState(null);
505
478
  useEffect(() => {
506
- if (!config.tables)
507
- return;
508
- const onContextMenu = (event) => {
509
- if (event.defaultPrevented)
510
- return; // a link inside the cell already took it
511
- const cellElement = event.target?.closest?.('td, th');
512
- if (!cellElement)
513
- return;
514
- let handled = false;
515
- editor.update(() => {
516
- const node = $getNearestNodeFromDOMNode(cellElement);
517
- const cell = node ? $getTableCellNodeFromLexicalNode(node) : null;
518
- if (!cell)
519
- return;
520
- handled = true;
521
- const selection = $getSelection();
522
- // Keep a multi-cell selection that includes this cell, so "insert
523
- // rows" / "delete columns" act on everything selected.
524
- const insideSelection = $isTableSelection(selection) && selection.getNodes().some((n) => n.getKey() === cell.getKey());
525
- if (!insideSelection)
526
- cell.selectEnd();
527
- }, { discrete: true });
528
- if (!handled)
529
- return;
479
+ const onContextMenu = async (event) => {
530
480
  event.preventDefault();
531
481
  snapshotSelectionRef.current();
532
- const size = editor.getEditorState().read($getTableSelectionSize);
533
- setTableContext({ x: event.clientX, y: event.clientY, rows: size.rows, columns: size.columns });
534
- };
535
- return editor.registerRootListener((root, previous) => {
536
- previous?.removeEventListener('contextmenu', onContextMenu);
537
- root?.addEventListener('contextmenu', onContextMenu);
538
- });
539
- }, [editor, config.tables]);
540
- // Right-clicking a poetry couplet opens the same options menu at the pointer.
541
- const [poetryContext, setPoetryContext] = useState(null);
542
- useEffect(() => {
543
- if (!config.poetry.enabled)
544
- return;
545
- const onContextMenu = (event) => {
546
- if (event.defaultPrevented)
547
- return; // a link inside the couplet already took it
548
- const coupletElement = event.target?.closest?.('.likhari-poetry');
549
- if (!coupletElement)
550
- return;
551
- let handled = false;
482
+ const target = event.target;
483
+ const anchor = config.links ? (target?.closest?.('a') ?? null) : null;
484
+ const cell = config.tables ? (target?.closest?.('td, th') ?? null) : null;
485
+ const couplet = config.poetry.enabled ? (target?.closest?.('.likhari-poetry') ?? null) : null;
486
+ const point = config.language.spellCheck ? textPointAt(event.clientX, event.clientY) : null;
487
+ const menu = { x: event.clientX, y: event.clientY };
488
+ let word = null;
552
489
  editor.update(() => {
553
- const node = $getNearestNodeFromDOMNode(coupletElement);
554
- const couplet = node ? $findMatchingParent(node, $isPoetryBlockNode) : null;
555
- if (!couplet)
556
- return;
557
- handled = true;
558
- if (!$getPoetryBlockFromSelection())
559
- couplet.selectStart();
490
+ if (anchor) {
491
+ const node = $getNearestNodeFromDOMNode(anchor);
492
+ const link = node ? $findMatchingParent(node, $isLinkNode) : null;
493
+ if ($isLinkNode(link)) {
494
+ menu.link = link.getURL();
495
+ // Select the whole link first, so Edit / Remove act on it wherever the caret was.
496
+ link.select(0, link.getChildrenSize());
497
+ }
498
+ }
499
+ if (cell) {
500
+ const node = $getNearestNodeFromDOMNode(cell);
501
+ const tableCell = node ? $getTableCellNodeFromLexicalNode(node) : null;
502
+ if (tableCell) {
503
+ const selection = $getSelection();
504
+ // Keep a multi-cell selection that includes this cell.
505
+ const insideSelection = $isTableSelection(selection) && selection.getNodes().some((n) => n.getKey() === tableCell.getKey());
506
+ if (!insideSelection)
507
+ tableCell.selectEnd();
508
+ const size = $getTableSelectionSize();
509
+ menu.table = { rows: size.rows, columns: size.columns };
510
+ }
511
+ }
512
+ if (couplet) {
513
+ const node = $getNearestNodeFromDOMNode(couplet);
514
+ const block = node ? $findMatchingParent(node, $isPoetryBlockNode) : null;
515
+ if (block) {
516
+ menu.poetry = true;
517
+ if (!$getPoetryBlockFromSelection())
518
+ block.selectStart();
519
+ }
520
+ }
521
+ if (point)
522
+ word = $wordAtDomPoint(point.node, point.offset);
560
523
  }, { discrete: true });
561
- if (!handled)
562
- return;
563
- event.preventDefault();
564
- snapshotSelectionRef.current();
565
- setPoetryContext({ x: event.clientX, y: event.clientY });
524
+ if (word) {
525
+ const language = word.direction === 'rtl' ? 'ur' : 'en';
526
+ const speller = getSpeller(language);
527
+ if (speller) {
528
+ const checked = await speller;
529
+ if (!checked.correct(word.word)) {
530
+ menu.spelling = { word: word.word, language, suggestions: checked.suggest(word.word).slice(0, 5), match: word.match };
531
+ }
532
+ }
533
+ }
534
+ setContextMenu(menu);
566
535
  };
567
536
  return editor.registerRootListener((root, previous) => {
568
537
  previous?.removeEventListener('contextmenu', onContextMenu);
569
538
  root?.addEventListener('contextmenu', onContextMenu);
570
539
  });
571
- }, [editor, config.poetry.enabled]);
540
+ }, [editor, config.links, config.tables, config.poetry.enabled, config.language.spellCheck]);
541
+ // Cut and copy put the selected text on the clipboard as plain text.
542
+ const copyOrCut = (cut) => async () => {
543
+ restoreSelection();
544
+ let text = '';
545
+ editor.update(() => {
546
+ const selection = $getSelection();
547
+ if (!$isRangeSelection(selection))
548
+ return;
549
+ text = selection.getTextContent();
550
+ if (cut)
551
+ selection.removeText();
552
+ }, { discrete: true });
553
+ if (text)
554
+ await navigator.clipboard?.writeText(text).catch(() => undefined);
555
+ editor.focus();
556
+ };
557
+ // Paste reads plain text from the clipboard (the browser may ask for permission).
558
+ const paste = async () => {
559
+ restoreSelection();
560
+ let text;
561
+ try {
562
+ text = await navigator.clipboard.readText();
563
+ }
564
+ catch {
565
+ return;
566
+ }
567
+ editor.update(() => {
568
+ const selection = $getSelection();
569
+ if (!$isRangeSelection(selection))
570
+ return;
571
+ text.split(/\r?\n/).forEach((line, index) => {
572
+ if (index > 0)
573
+ selection.insertParagraph();
574
+ selection.insertText(line);
575
+ });
576
+ }, { discrete: true });
577
+ editor.focus();
578
+ };
572
579
  // Ctrl/Cmd+K opens the link dialog.
573
580
  useEffect(() => {
574
581
  if (!config.links)
@@ -811,25 +818,34 @@ export function Toolbar({ config, onSave, isDirty, showSave, findOpen = false, o
811
818
  showStubInsertGroup && (_jsxs("div", { className: "likhari-toolbar-group likhari-toolbar-group--collapse-tablet", children: [(config.images.linked || config.images.embedded) && (_jsx(ToolbarButton, { icon: IconPhoto, title: strings.toolbar.insertImage, onClick: openImageDialog })), config.blocks.pageBreak && (_jsx(ToolbarButton, { icon: IconPageBreak, title: strings.toolbar.insertPageBreak, onClick: () => editor.dispatchCommand(INSERT_PAGE_BREAK_COMMAND, undefined) })), config.tables && _jsx(ToolbarButton, { icon: IconTable, title: strings.toolbar.insertTable, onClick: openTableDialog }), config.columns && _jsx(ToolbarButton, { icon: IconColumns, title: strings.toolbar.insertColumns, onClick: openLayoutDialog }), config.footnotes && (_jsx(ToolbarButton, { icon: IconNumber1Small, title: strings.toolbar.insertFootnote, onClick: () => editor.dispatchCommand(INSERT_FOOTNOTE_COMMAND, undefined) })), config.blocks.horizontalRule && (_jsx(ToolbarButton, { icon: IconSeparatorHorizontal, title: strings.toolbar.insertHorizontalRule, onClick: () => editor.dispatchCommand(INSERT_HORIZONTAL_RULE_COMMAND, undefined) })), config.findReplace && (_jsx(ToolbarButton, { icon: IconSearch, title: strings.findReplace.toggle, active: findOpen, onClick: onToggleFind })), config.poetry.enabled && locale !== 'en' && (_jsx(ToolbarButton, { icon: IconFeather, title: strings.toolbar.insertPoetryCouplet, onClick: () => editor.dispatchCommand(INSERT_POETRY_COUPLET_COMMAND, { layout: config.poetry.defaultLayout }) }))] }, "stubInsert")),
812
819
  config.tables && state.inTable && (_jsx("div", { className: "likhari-toolbar-group", children: _jsxs(Menu, { position: "bottom-start", withinPortal: true, portalProps: { target: portalTarget }, shadow: "sm", width: 240, onOpen: snapshotSelection, children: [_jsx(Menu.Target, { children: _jsx("button", { type: "button", className: "likhari-toolbar-button", "data-active": "true", "aria-pressed": "true", "aria-haspopup": "menu", "aria-label": strings.toolbar.tableOptions, title: strings.toolbar.tableOptions, onMouseDown: (e) => e.preventDefault(), children: _jsx(IconTableOptions, { size: ICON_SIZE, stroke: ICON_STROKE }) }) }), _jsx(Menu.Dropdown, { children: _jsx(TableMenuItems, { strings: strings, direction: direction, rows: state.tableRows, columns: state.tableColumns, canMergeCells: state.canMergeCells, canUnmergeCell: state.canUnmergeCell, onAction: runMenuAction }) })] }) }, "tableActions")),
813
820
  config.poetry.enabled && state.inPoetry && (_jsx("div", { className: "likhari-toolbar-group", children: _jsxs(Menu, { position: "bottom-start", withinPortal: true, portalProps: { target: portalTarget }, shadow: "sm", width: 200, onOpen: snapshotSelection, children: [_jsx(Menu.Target, { children: _jsx("button", { type: "button", className: "likhari-toolbar-button", "data-active": "true", "aria-pressed": "true", "aria-haspopup": "menu", "aria-label": strings.toolbar.poetryOptions, title: strings.toolbar.poetryOptions, onMouseDown: (e) => e.preventDefault(), children: _jsx(IconFeather, { size: ICON_SIZE, stroke: ICON_STROKE }) }) }), _jsx(Menu.Dropdown, { children: _jsx(PoetryMenuItems, { strings: strings, layout: state.poetryLayout, scale: state.poetryScale, centered: state.poetryCentered, onAction: runMenuAction }) })] }) }, "poetryActions")),
814
- showLanguageGroup && (_jsxs("div", { className: "likhari-toolbar-group likhari-toolbar-group--collapse-tablet", children: [config.language.autocorrect && _jsx(StubButton, { icon: IconWand, title: strings.toolbar.autocorrect, comingSoon: strings.toolbar.comingSoon }), config.language.textCleanup && _jsx(StubButton, { icon: IconSparkles, title: strings.toolbar.textCleanup, comingSoon: strings.toolbar.comingSoon }), config.language.spellCheck && _jsx(StubButton, { icon: IconAbc, title: strings.toolbar.spellChecker, comingSoon: strings.toolbar.comingSoon })] }, "language")),
821
+ showLanguageGroup && (_jsxs("div", { className: "likhari-toolbar-group likhari-toolbar-group--collapse-tablet", children: [config.language.autocorrect && (_jsx(ToolbarButton, { icon: IconWand, title: strings.toolbar.autocorrect, active: autoCorrectOpen, onClick: onToggleAutoCorrect })), config.language.textCleanup && (_jsx(ToolbarButton, { icon: IconSparkles, title: strings.autoCorrect.correctDocument, onClick: () => editor.dispatchCommand(CORRECT_DOCUMENT_COMMAND, undefined) })), config.language.spellCheck && (_jsx(ToolbarButton, { icon: IconAbc, title: strings.toolbar.spellChecker, active: spellOpen, onClick: onToggleSpell }))] }, "language")),
815
822
  ];
816
823
  return (_jsxs("div", { className: "likhari-toolbar", role: "toolbar", "aria-label": strings.toolbar.ariaLabel, ref: toolbarContainerRef, children: [fixedGroups, movableGroups
817
824
  .filter((group) => !overflowGroupKeys.has(group.key))
818
825
  .map((group) => (_jsx(MovableGroupButtons, { group: group }, group.key))), overflowGroupKeys.size > 0 && (_jsxs(Menu, { position: "bottom-end", withinPortal: true, portalProps: { target: portalTarget }, shadow: "sm", width: 210, closeOnItemClick: true, onOpen: snapshotSelection, children: [_jsx(Menu.Target, { children: _jsx("button", { type: "button", className: "likhari-toolbar-button", "aria-label": strings.toolbar.moreFormatting, title: strings.toolbar.moreFormatting, onMouseDown: (e) => e.preventDefault(), children: _jsx(IconDots, { size: ICON_SIZE, stroke: ICON_STROKE }) }) }), _jsx(Menu.Dropdown, { children: movableGroups
819
826
  .filter((group) => overflowGroupKeys.has(group.key))
820
- .flatMap((group) => group.items.map((item) => (_jsx(OverflowItem, { icon: item.icon, label: item.label, active: item.active, onClick: runOverflowAction(item.onClick) }, item.key)))) })] })), config.links && (_jsxs(Menu, { opened: linkContext !== null, onChange: (opened) => {
821
- if (!opened)
822
- setLinkContext(null);
823
- }, position: "bottom-start", withinPortal: true, portalProps: { target: portalTarget }, shadow: "sm", width: 240, children: [_jsx(Menu.Target, { children: _jsx("span", { "aria-hidden": "true", style: { position: 'fixed', left: linkContext?.x ?? -9999, top: linkContext?.y ?? -9999, width: 1, height: 1, pointerEvents: 'none' } }) }), _jsx(Menu.Dropdown, { children: _jsx(LinkMenuItems, { url: linkContext?.url ?? '', onEdit: () => {
824
- restoreSelection();
825
- openLinkDialog();
826
- }, onRemove: removeLink, strings: strings }) })] })), config.tables && (_jsxs(Menu, { opened: tableContext !== null, onChange: (opened) => {
827
- if (!opened)
828
- setTableContext(null);
829
- }, position: "bottom-start", withinPortal: true, portalProps: { target: portalTarget }, shadow: "sm", width: 240, children: [_jsx(Menu.Target, { children: _jsx("span", { "aria-hidden": "true", style: { position: 'fixed', left: tableContext?.x ?? -9999, top: tableContext?.y ?? -9999, width: 1, height: 1, pointerEvents: 'none' } }) }), _jsx(Menu.Dropdown, { children: _jsx(TableMenuItems, { strings: strings, direction: direction, rows: tableContext?.rows ?? 1, columns: tableContext?.columns ?? 1, canMergeCells: state.canMergeCells, canUnmergeCell: state.canUnmergeCell, onAction: runMenuAction }) })] })), config.poetry.enabled && (_jsxs(Menu, { opened: poetryContext !== null, onChange: (opened) => {
827
+ .flatMap((group) => group.items.map((item) => (_jsx(OverflowItem, { icon: item.icon, label: item.label, active: item.active, onClick: runOverflowAction(item.onClick) }, item.key)))) })] })), _jsxs(Menu, { opened: contextMenu !== null, onChange: (opened) => {
830
828
  if (!opened)
831
- setPoetryContext(null);
832
- }, position: "bottom-start", withinPortal: true, portalProps: { target: portalTarget }, shadow: "sm", width: 200, children: [_jsx(Menu.Target, { children: _jsx("span", { "aria-hidden": "true", style: { position: 'fixed', left: poetryContext?.x ?? -9999, top: poetryContext?.y ?? -9999, width: 1, height: 1, pointerEvents: 'none' } }) }), _jsx(Menu.Dropdown, { children: _jsx(PoetryMenuItems, { strings: strings, layout: state.poetryLayout, scale: state.poetryScale, centered: state.poetryCentered, onAction: runMenuAction }) })] })), _jsxs("div", { "aria-hidden": "true", ref: toolbarMeasureRef, style: {
829
+ setContextMenu(null);
830
+ }, position: "bottom-start", withinPortal: true, portalProps: { target: portalTarget }, shadow: "sm", width: 260, children: [_jsx(Menu.Target, { children: _jsx("span", { "aria-hidden": "true", style: { position: 'fixed', left: contextMenu?.x ?? -9999, top: contextMenu?.y ?? -9999, width: 1, height: 1, pointerEvents: 'none' } }) }), _jsxs(Menu.Dropdown, { children: [contextMenu?.spelling && (_jsxs(_Fragment, { children: [_jsx(Menu.Label, { children: strings.contextMenu.spelling }), contextMenu.spelling.suggestions.length === 0 && _jsx(Menu.Item, { disabled: true, children: strings.contextMenu.noSuggestions }), contextMenu.spelling.suggestions.map((suggestion) => (_jsx(Menu.Item, { onClick: () => {
831
+ const match = contextMenu.spelling.match;
832
+ editor.update(() => $replaceMatch(match, suggestion), { discrete: true });
833
+ editor.focus();
834
+ }, children: suggestion }, suggestion))), _jsx(Menu.Item, { onClick: () => {
835
+ ignoreWord(contextMenu.spelling.language, contextMenu.spelling.word);
836
+ setContextMenu(null);
837
+ }, children: strings.contextMenu.ignore }), _jsx(Menu.Item, { onClick: () => {
838
+ const { language, word } = contextMenu.spelling;
839
+ // Without a writable store, the word is ignored for this session instead.
840
+ void addUserWord(dictionaryStores, language, word).then((added) => {
841
+ if (!added)
842
+ ignoreWord(language, word);
843
+ });
844
+ setContextMenu(null);
845
+ }, children: strings.contextMenu.addToDictionary }), _jsx(Menu.Divider, {})] })), contextMenu?.link !== undefined && (_jsxs(_Fragment, { children: [_jsx(LinkMenuItems, { url: contextMenu.link, onEdit: () => {
846
+ restoreSelection();
847
+ openLinkDialog();
848
+ }, onRemove: removeLink, strings: strings }), _jsx(Menu.Divider, {})] })), contextMenu?.table && (_jsxs(_Fragment, { children: [_jsx(TableMenuItems, { strings: strings, direction: direction, rows: contextMenu.table.rows, columns: contextMenu.table.columns, canMergeCells: state.canMergeCells, canUnmergeCell: state.canUnmergeCell, onAction: runMenuAction }), _jsx(Menu.Divider, {})] })), contextMenu?.poetry && (_jsxs(_Fragment, { children: [_jsx(PoetryMenuItems, { strings: strings, layout: state.poetryLayout, scale: state.poetryScale, centered: state.poetryCentered, onAction: runMenuAction }), _jsx(Menu.Divider, {})] })), _jsx(Menu.Item, { leftSection: _jsx(IconCut, { size: ICON_SIZE, stroke: ICON_STROKE }), onClick: () => void copyOrCut(true)(), children: strings.contextMenu.cut }), _jsx(Menu.Item, { leftSection: _jsx(IconCopy, { size: ICON_SIZE, stroke: ICON_STROKE }), onClick: () => void copyOrCut(false)(), children: strings.contextMenu.copy }), _jsx(Menu.Item, { leftSection: _jsx(IconClipboard, { size: ICON_SIZE, stroke: ICON_STROKE }), onClick: () => void paste(), children: strings.contextMenu.paste }), _jsx(Menu.Item, { leftSection: _jsx(IconSelectAll, { size: ICON_SIZE, stroke: ICON_STROKE }), onClick: runMenuAction(() => $selectAll()), children: strings.contextMenu.selectAll })] })] }), _jsxs("div", { "aria-hidden": "true", ref: toolbarMeasureRef, style: {
833
849
  position: 'absolute',
834
850
  visibility: 'hidden',
835
851
  pointerEvents: 'none',
@@ -1,3 +1,4 @@
1
+ import { type TextNode } from 'lexical';
1
2
  /** A match as a Lexical selection range: start and end points, each in a text node. */
2
3
  export interface FindMatch {
3
4
  anchorKey: string;
@@ -5,6 +6,18 @@ export interface FindMatch {
5
6
  focusKey: string;
6
7
  focusOffset: number;
7
8
  }
9
+ /**
10
+ * Text nodes grouped by their parent, in document order. A match is searched
11
+ * for within one parent only, so it never spans two paragraphs or table
12
+ * cells, but it can span the several text nodes that formatting splits a
13
+ * paragraph into.
14
+ */
15
+ export declare function $textGroups(): TextNode[][];
16
+ /** The text node and offset that a character index in a group falls in. */
17
+ export declare function $locate(group: TextNode[], index: number, end: boolean): {
18
+ key: string;
19
+ offset: number;
20
+ };
8
21
  /** Every non-overlapping occurrence of `query` in the document, case-sensitive. */
9
22
  export declare function $findMatches(query: string): FindMatch[];
10
23
  /** Makes the match the editor's selection, so it's highlighted and scrolled to. */
@@ -1 +1 @@
1
- {"version":3,"file":"findReplaceActions.d.ts","sourceRoot":"","sources":["../../src/find/findReplaceActions.ts"],"names":[],"mappings":"AAEA,uFAAuF;AACvF,MAAM,WAAW,SAAS;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;CACrB;AAgCD,mFAAmF;AACnF,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,CAcvD;AAED,mFAAmF;AACnF,wBAAgB,YAAY,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI,CAKnD;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,GAAG,IAAI,CAMzE;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,CAItE"}
1
+ {"version":3,"file":"findReplaceActions.d.ts","sourceRoot":"","sources":["../../src/find/findReplaceActions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoF,KAAK,QAAQ,EAAE,MAAM,SAAS,CAAC;AAE1H,uFAAuF;AACvF,MAAM,WAAW,SAAS;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,IAAI,QAAQ,EAAE,EAAE,CAS1C;AAED,2EAA2E;AAC3E,wBAAgB,OAAO,CAAC,KAAK,EAAE,QAAQ,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAUvG;AAED,mFAAmF;AACnF,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,CAcvD;AAED,mFAAmF;AACnF,wBAAgB,YAAY,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI,CAKnD;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,GAAG,IAAI,CAMzE;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,CAItE"}
@@ -5,7 +5,7 @@ import { $createRangeSelection, $getRoot, $getSelection, $isRangeSelection, $set
5
5
  * cells, but it can span the several text nodes that formatting splits a
6
6
  * paragraph into.
7
7
  */
8
- function $textGroups() {
8
+ export function $textGroups() {
9
9
  const groups = new Map();
10
10
  for (const node of $getRoot().getAllTextNodes()) {
11
11
  const parentKey = node.getParentOrThrow().getKey();
@@ -18,7 +18,7 @@ function $textGroups() {
18
18
  return [...groups.values()];
19
19
  }
20
20
  /** The text node and offset that a character index in a group falls in. */
21
- function $locate(group, index, end) {
21
+ export function $locate(group, index, end) {
22
22
  let start = 0;
23
23
  for (const node of group) {
24
24
  const length = node.getTextContent().length;
@@ -169,6 +169,40 @@ export interface Strings {
169
169
  noMatches: string;
170
170
  close: string;
171
171
  };
172
+ spellcheck: {
173
+ title: string;
174
+ language: string;
175
+ check: string;
176
+ close: string;
177
+ noMisspellings: string;
178
+ previous: string;
179
+ next: string;
180
+ noSuggestions: string;
181
+ };
182
+ autoCorrect: {
183
+ title: string;
184
+ language: string;
185
+ from: string;
186
+ fromPlaceholder: string;
187
+ to: string;
188
+ toPlaceholder: string;
189
+ save: string;
190
+ saved: string;
191
+ noWritableStore: string;
192
+ failed: string;
193
+ close: string;
194
+ correctDocument: string;
195
+ };
196
+ contextMenu: {
197
+ cut: string;
198
+ copy: string;
199
+ paste: string;
200
+ selectAll: string;
201
+ ignore: string;
202
+ addToDictionary: string;
203
+ spelling: string;
204
+ noSuggestions: string;
205
+ };
172
206
  link: {
173
207
  menuLabel: string;
174
208
  noUrl: string;
@@ -1 +1 @@
1
- {"version":3,"file":"strings.d.ts","sourceRoot":"","sources":["../../src/i18n/strings.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;+DAC+D;AAC/D,MAAM,MAAM,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,cAAc,CAAC;AAElD,MAAM,WAAW,OAAO;IACtB,MAAM,EAAE;QACN,mGAAmG;QACnG,WAAW,EAAE,MAAM,CAAC;QACpB,gDAAgD;QAChD,YAAY,EAAE,MAAM,CAAC;QACrB,sEAAsE;QACtE,cAAc,EAAE,MAAM,CAAC;KACxB,CAAC;IACF,MAAM,EAAE;QACN,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,OAAO,EAAE;QACP,gEAAgE;QAChE,SAAS,EAAE,MAAM,CAAC;QAClB,IAAI,EAAE,MAAM,CAAC;QACb,0CAA0C;QAC1C,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,eAAe,EAAE,MAAM,CAAC;QACxB,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,EAAE,MAAM,CAAC;QACf,SAAS,EAAE,MAAM,CAAC;QAClB,UAAU,EAAE,MAAM,CAAC;QACnB,qBAAqB,EAAE,MAAM,CAAC;QAC9B,QAAQ,EAAE,MAAM,CAAC;QACjB,mBAAmB,EAAE,MAAM,CAAC;QAC5B,OAAO,EAAE,MAAM,CAAC;QAChB,SAAS,EAAE,MAAM,CAAC;QAClB,WAAW,EAAE,MAAM,CAAC;QACpB,8FAA8F;QAC9F,YAAY,EAAE,MAAM,CAAC;QACrB,0GAA0G;QAC1G,aAAa,EAAE,MAAM,CAAC;QACtB,UAAU,EAAE,MAA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AC;YACxB,gBAAgB,EAAE,MAAM,CAAC;YACzB,UAAU,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,CAAC;SAC3C,CAAC;KACH,CAAC;IACF,eAAe,EAAE;QACf,KAAK,EAAE,MAAM,CAAC;QACd,SAAS,EAAE,MAAM,CAAC;QAClB,UAAU,EAAE,MAAM,CAAC;QACnB,WAAW,EAAE,MAAM,CAAC;QACpB,eAAe,EAAE,MAAM,CAAC;QACxB,eAAe,EAAE,MAAM,CAAC;QACxB,YAAY,EAAE,MAAM,CAAC;QACrB,QAAQ,EAAE,CAAC,OAAO,EAAE;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,MAAM,EAAE,MAAM,CAAA;SAAE,GAAG,IAAI,KAAK,MAAM,CAAC;QACxE,MAAM,EAAE;YACN,cAAc,EAAE,MAAM,CAAC;YACvB,YAAY,EAAE,MAAM,CAAC;YACrB,UAAU,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,CAAC;SAC3C,CAAC;KACH,CAAC;IACF,SAAS,EAAE;QACT,SAAS,EAAE,MAAM,CAAC;QAClB,iBAAiB,EAAE,MAAM,CAAC;QAC1B,UAAU,EAAE,MAAM,CAAC;QACnB,UAAU,EAAE,MAAM,CAAC;QACnB,WAAW,EAAE,MAAM,CAAC;QACpB,aAAa,EAAE,MAAM,CAAC;QACtB,WAAW,EAAE,MAAM,CAAC;QACpB,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;CACH;AAyyBD,eAAO,MAAM,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAI3C,CAAC;AAEF;;sDAEsD;AACtD,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAElD"}
@@ -152,6 +152,40 @@ const en = {
152
152
  noMatches: 'No matches',
153
153
  close: 'Close',
154
154
  },
155
+ spellcheck: {
156
+ title: 'Spell check',
157
+ language: 'Language',
158
+ check: 'Check',
159
+ close: 'Close',
160
+ noMisspellings: 'No misspellings found',
161
+ previous: 'Previous',
162
+ next: 'Next',
163
+ noSuggestions: 'No suggestions',
164
+ },
165
+ autoCorrect: {
166
+ title: 'Auto-correct',
167
+ language: 'Language',
168
+ from: 'Typed word',
169
+ fromPlaceholder: 'Word as typed',
170
+ to: 'Corrected word',
171
+ toPlaceholder: 'Correct it to',
172
+ save: 'Save correction',
173
+ saved: 'Saved. It applies to the next word typed.',
174
+ noWritableStore: 'No store accepts new corrections',
175
+ failed: 'Could not save the correction',
176
+ close: 'Close',
177
+ correctDocument: 'Correct whole document',
178
+ },
179
+ contextMenu: {
180
+ cut: 'Cut',
181
+ copy: 'Copy',
182
+ paste: 'Paste',
183
+ selectAll: 'Select all',
184
+ ignore: 'Ignore',
185
+ addToDictionary: 'Add to dictionary',
186
+ spelling: 'Spelling suggestions',
187
+ noSuggestions: 'No suggestions',
188
+ },
155
189
  link: {
156
190
  menuLabel: 'Link',
157
191
  noUrl: '(no URL)',
@@ -385,6 +419,40 @@ const ur = {
385
419
  noMatches: 'کوئی میچ نہیں',
386
420
  close: 'بند کریں',
387
421
  },
422
+ spellcheck: {
423
+ title: 'ہجے کی جانچ',
424
+ language: 'زبان',
425
+ check: 'جانچیں',
426
+ close: 'بند کریں',
427
+ noMisspellings: 'کوئی غلط ہجے نہیں ملے',
428
+ previous: 'پچھلا',
429
+ next: 'اگلا',
430
+ noSuggestions: 'کوئی تجویز نہیں',
431
+ },
432
+ autoCorrect: {
433
+ title: 'خودکار تصحیح',
434
+ language: 'زبان',
435
+ from: 'لکھا ہوا لفظ',
436
+ fromPlaceholder: 'جو لفظ لکھا جاتا ہے',
437
+ to: 'درست لفظ',
438
+ toPlaceholder: 'اسے درست کریں',
439
+ save: 'تصحیح محفوظ کریں',
440
+ saved: 'محفوظ ہو گئی۔ اگلے لفظ پر لاگو ہوگی۔',
441
+ noWritableStore: 'کوئی ذخیرہ نئی تصحیح قبول نہیں کرتا',
442
+ failed: 'تصحیح محفوظ نہیں ہو سکی',
443
+ close: 'بند کریں',
444
+ correctDocument: 'تمام متن کی تصحیح کریں',
445
+ },
446
+ contextMenu: {
447
+ cut: 'کاٹیں',
448
+ copy: 'کاپی کریں',
449
+ paste: 'چسپاں کریں',
450
+ selectAll: 'سب منتخب کریں',
451
+ ignore: 'نظرانداز کریں',
452
+ addToDictionary: 'لغت میں شامل کریں',
453
+ spelling: 'ہجے کی تجاویز',
454
+ noSuggestions: 'کوئی تجویز نہیں',
455
+ },
388
456
  link: {
389
457
  menuLabel: 'لنک',
390
458
  noUrl: '(کوئی یو آر ایل نہیں)',
@@ -607,16 +675,50 @@ const paShahmukhi = {
607
675
  },
608
676
  findReplace: {
609
677
  toggle: 'لبھو تے بدلو',
610
- find: 'لبھo',
611
- replace: 'بدلo',
678
+ find: 'لبھو',
679
+ replace: 'بدلو',
612
680
  findPlaceholder: 'جو لبھنا اے',
613
681
  replacePlaceholder: 'بدلن والا متن',
614
682
  previous: 'پچھلا',
615
683
  next: 'اگلا',
616
- replaceOne: 'بدلo',
617
- replaceAll: 'سارے بدلo',
684
+ replaceOne: 'بدلو',
685
+ replaceAll: 'سارے بدلو',
618
686
  noMatches: 'کوئی ملدا نئیں',
619
- close: 'بند کرo',
687
+ close: 'بند کرو',
688
+ },
689
+ spellcheck: {
690
+ title: 'ہجے دی جانچ',
691
+ language: 'بولی',
692
+ check: 'جانچو',
693
+ close: 'بند کرو',
694
+ noMisspellings: 'کوئی غلط ہجے نئیں لبھے',
695
+ previous: 'پچھلا',
696
+ next: 'اگلا',
697
+ noSuggestions: 'کوئی تجویز نئیں',
698
+ },
699
+ autoCorrect: {
700
+ title: 'خودکار درستی',
701
+ language: 'بولی',
702
+ from: 'لکھیا ہویا لفظ',
703
+ fromPlaceholder: 'جو لفظ لکھیا جاندا اے',
704
+ to: 'ٹھیک لفظ',
705
+ toPlaceholder: 'ایس نوں ٹھیک کرو',
706
+ save: 'درستی سانبھو',
707
+ saved: 'سانبھ لیا۔ اگلے لفظ تے لاگو ہووے گی۔',
708
+ noWritableStore: 'کوئی ذخیرہ نویں درستی نئیں منّدا',
709
+ failed: 'درستی سانبھی نئیں جا سکی',
710
+ close: 'بند کرو',
711
+ correctDocument: 'پورے متن دی درستی کرو',
712
+ },
713
+ contextMenu: {
714
+ cut: 'کٹو',
715
+ copy: 'کاپی کرو',
716
+ paste: 'چسپاں کرو',
717
+ selectAll: 'سارا چنو',
718
+ ignore: 'نظر انداز کرو',
719
+ addToDictionary: 'شبدکوش وچ پاؤ',
720
+ spelling: 'ہجے دیاں تجویزاں',
721
+ noSuggestions: 'کوئی تجویز نئیں',
620
722
  },
621
723
  link: {
622
724
  menuLabel: 'لنک',
package/dist/index.d.ts CHANGED
@@ -9,4 +9,11 @@ export type { FontOption } from './fonts/index.js';
9
9
  export { STRINGS, getStrings, useStrings, useUiStrings, UiStringsContext } from './i18n/index.js';
10
10
  export type { Locale, Strings } from './i18n/index.js';
11
11
  export { registerSpellDictionary, hasSpellDictionary, type HunspellFiles, type SpellLanguage } from './spellcheck/spellDictionaries.js';
12
+ export { localStorageAutoCorrectStore, apiAutoCorrectStore, fileAutoCorrectStore } from './autocorrect/autoCorrectStores.js';
13
+ export type { AutoCorrectStore, AutoCorrectEntry } from './autocorrect/autoCorrectStores.js';
14
+ export { normalizeUrdu, normalizeUrduCharacters, removeUrduDiacritics, replaceUrduDigits } from './normalization/urduNormalize.js';
15
+ export type { UrduNormalizationOptions } from './normalization/urduNormalize.js';
16
+ export type { PunctuationOptions, PunctuationRule } from './autocorrect/punctuationRules.js';
17
+ export { localStorageUserWordStore, apiUserWordStore, ignoreWord, addUserWord, onSpellWordsChange } from './spellcheck/userWords.js';
18
+ export type { UserWordStore } from './spellcheck/userWords.js';
12
19
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EAAE,eAAe,E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EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACrF,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AACzF,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAE9C,OAAO,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,KAAK,aAAa,EAAE,KAAK,aAAa,EAAE,MAAM,gCAAgC,CAAC;AACrI,OAAO,EAAE,4BAA4B,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAC1H,YAAY,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAC1F,OAAO,EAAE,aAAa,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAChI,YAAY,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAC9E,YAAY,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAC1F,OAAO,EAAE,yBAAyB,EAAE,gBAAgB,EAAE,UAAU,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAClI,YAAY,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC"}
package/dist/index.js CHANGED
@@ -4,3 +4,6 @@ export { ImageNode, $createImageNode, $isImageNode } from './image/ImageNode.js'
4
4
  export { DEFAULT_FONT_OPTIONS, URDU_WEB_FONT_OPTIONS, FONT_SIZES_PX } from './fonts/index.js';
5
5
  export { STRINGS, getStrings, useStrings, useUiStrings, UiStringsContext } from './i18n/index.js';
6
6
  export { registerSpellDictionary, hasSpellDictionary } from './spellcheck/spellDictionaries.js';
7
+ export { localStorageAutoCorrectStore, apiAutoCorrectStore, fileAutoCorrectStore } from './autocorrect/autoCorrectStores.js';
8
+ export { normalizeUrdu, normalizeUrduCharacters, removeUrduDiacritics, replaceUrduDigits } from './normalization/urduNormalize.js';
9
+ export { localStorageUserWordStore, apiUserWordStore, ignoreWord, addUserWord, onSpellWordsChange } from './spellcheck/userWords.js';