@inshapardaz/likhari-react 0.1.18 → 0.1.19-dev.184
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/EditorRoot.d.ts.map +1 -1
- package/dist/EditorRoot.js +14 -2
- package/dist/blocks/PoetryNode.d.ts +70 -0
- package/dist/blocks/PoetryNode.d.ts.map +1 -0
- package/dist/blocks/PoetryNode.js +198 -0
- package/dist/blocks/PoetryResizer.d.ts +11 -0
- package/dist/blocks/PoetryResizer.d.ts.map +1 -0
- package/dist/blocks/PoetryResizer.js +94 -0
- package/dist/blocks/poetryActions.d.ts +117 -0
- package/dist/blocks/poetryActions.d.ts.map +1 -0
- package/dist/blocks/poetryActions.js +481 -0
- package/dist/components/FindReplaceBar.d.ts +13 -0
- package/dist/components/FindReplaceBar.d.ts.map +1 -0
- package/dist/components/FindReplaceBar.js +72 -0
- package/dist/components/SpellcheckPanel.d.ts +11 -0
- package/dist/components/SpellcheckPanel.d.ts.map +1 -0
- package/dist/components/SpellcheckPanel.js +60 -0
- package/dist/components/Toolbar.d.ts +7 -1
- package/dist/components/Toolbar.d.ts.map +1 -1
- package/dist/components/Toolbar.js +82 -10
- package/dist/find/findReplaceActions.d.ts +36 -0
- package/dist/find/findReplaceActions.d.ts.map +1 -0
- package/dist/find/findReplaceActions.js +81 -0
- package/dist/i18n/strings.d.ts +42 -1
- package/dist/i18n/strings.d.ts.map +1 -1
- package/dist/i18n/strings.js +123 -3
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/nodes.d.ts.map +1 -1
- package/dist/nodes.js +2 -0
- package/dist/plugins/PoetryPlugin.d.ts +19 -0
- package/dist/plugins/PoetryPlugin.d.ts.map +1 -0
- package/dist/plugins/PoetryPlugin.js +54 -0
- package/dist/spellcheck/dictionaries/en/LICENSE.txt +347 -0
- package/dist/spellcheck/dictionaries/en/index.aff +205 -0
- package/dist/spellcheck/dictionaries/en/index.dic +49569 -0
- package/dist/spellcheck/spellDictionaries.d.ts +40 -0
- package/dist/spellcheck/spellDictionaries.d.ts.map +1 -0
- package/dist/spellcheck/spellDictionaries.js +62 -0
- package/dist/spellcheck/spellcheckActions.d.ts +9 -0
- package/dist/spellcheck/spellcheckActions.d.ts.map +1 -0
- package/dist/spellcheck/spellcheckActions.js +20 -0
- package/dist/theme/editor.css +363 -0
- package/dist/theme/editorTheme.d.ts.map +1 -1
- package/dist/theme/editorTheme.js +1 -0
- package/package.json +8 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toolbar.d.ts","sourceRoot":"","sources":["../../src/components/Toolbar.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Toolbar.d.ts","sourceRoot":"","sources":["../../src/components/Toolbar.tsx"],"names":[],"mappings":"AAqFA,OAAO,EAAgB,KAAK,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAEzE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,2BAA2B,CAAC;AAC7E,OAAO,EAA6D,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AAItG,OAAO,KAAK,EAAE,MAAM,EAAW,MAAM,iBAAiB,CAAC;AA+gBvD,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,2BAA2B,CAAC;IACpC,+FAA+F;IAC/F,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,wFAAwF;IACxF,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sEAAsE;IACtE,WAAW,CAAC,EAAE,UAAU,EAAE,CAAC;IAC3B,wFAAwF;IACxF,SAAS,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC;IAC1B,oFAAoF;IACpF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kGAAkG;IAClG,MAAM,CAAC,EAAE,oBAAoB,CAAC;CAC/B;AAED,wBAAgB,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAgB,EAAE,YAAY,EAAE,SAAiB,EAAE,aAAa,EAAE,WAAkC,EAAE,SAAiB,EAAE,MAAa,EAAE,MAAM,EAAE,EAAE,YAAY,+BAwkC1N"}
|
|
@@ -14,6 +14,9 @@ import { $createImageNode } from '../image/ImageNode.js';
|
|
|
14
14
|
import { INSERT_PAGE_BREAK_COMMAND } from '../blocks/PageBreakNode.js';
|
|
15
15
|
import { INSERT_LAYOUT_COMMAND } from '../blocks/LayoutNode.js';
|
|
16
16
|
import { INSERT_FOOTNOTE_COMMAND } from '../blocks/FootnoteNode.js';
|
|
17
|
+
import { $isPoetryBlockNode, POETRY_GUTTERS, POETRY_SPACINGS, POETRY_STAGGERS, } from '../blocks/PoetryNode.js';
|
|
18
|
+
import { $adjustPoetryGutter, $getCoupletCenteredFromSelection, $setCoupletCentered, $adjustPoetryStagger, $adjustPoetrySpacing, $deletePoetryBlock, $deletePoetryCouplet, $getPoetryBlockFromSelection, $insertCoupletRelativeToSelection, $setPoetryLayout, } from '../blocks/poetryActions.js';
|
|
19
|
+
import { INSERT_POETRY_COUPLET_COMMAND } from '../plugins/PoetryPlugin.js';
|
|
17
20
|
import { TableDialog } from './TableDialog.js';
|
|
18
21
|
import { LayoutDialog } from './LayoutDialog.js';
|
|
19
22
|
import { $getTableCellNodeFromLexicalNode, $isTableSelection, INSERT_TABLE_COMMAND } from '@lexical/table';
|
|
@@ -26,7 +29,7 @@ import { CANVAS_FONT_DEFAULTS, DEFAULT_FONT_OPTIONS, FONT_SIZES_PX } from '../fo
|
|
|
26
29
|
import { setStyleProperty } from '../utils/style.js';
|
|
27
30
|
import { useStrings } from '../i18n/useStrings.js';
|
|
28
31
|
import { usePortalTarget } from '../PortalTargetContext.js';
|
|
29
|
-
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, IconNumber1Small, IconRowInsertBottom, IconRowInsertTop, IconRowRemove, IconTable, IconTableMinus, IconTableOptions, IconTextSize, IconTypography, IconUnderline, IconWand, } from '@tabler/icons-react';
|
|
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';
|
|
30
33
|
/** Sentinel for "no inline style": Lexical returns the default it is given when
|
|
31
34
|
* the selection has none, so this tells "unstyled" (show the canvas default)
|
|
32
35
|
* apart from "styled with a value the dropdown doesn't list" (show nothing). */
|
|
@@ -45,6 +48,10 @@ const INITIAL_STATE = {
|
|
|
45
48
|
tableColumns: 1,
|
|
46
49
|
canMergeCells: false,
|
|
47
50
|
canUnmergeCell: false,
|
|
51
|
+
inPoetry: false,
|
|
52
|
+
poetryLayout: 'single',
|
|
53
|
+
poetryScale: { spacing: 'normal', gutter: 'normal', stagger: 'normal' },
|
|
54
|
+
poetryCentered: false,
|
|
48
55
|
canUndo: false,
|
|
49
56
|
canRedo: false,
|
|
50
57
|
};
|
|
@@ -156,7 +163,26 @@ function TableMenuItems({ strings, direction, rows, columns, canMergeCells, canU
|
|
|
156
163
|
};
|
|
157
164
|
return (_jsxs(_Fragment, { children: [_jsx(Menu.Label, { children: t.menuLabel }), item(IconRowInsertTop, manyRows ? t.insertRowsBefore : t.insertRowBefore, () => $insertTableRows(false)), item(IconRowInsertBottom, manyRows ? t.insertRowsAfter : t.insertRowAfter, () => $insertTableRows(true)), item(rtl ? IconColumnInsertRight : IconColumnInsertLeft, manyColumns ? t.insertColumnsBefore : t.insertColumnBefore, () => $insertTableColumns(false)), item(rtl ? IconColumnInsertLeft : IconColumnInsertRight, manyColumns ? t.insertColumnsAfter : t.insertColumnAfter, () => $insertTableColumns(true)), (canMergeCells || canUnmergeCell) && _jsx(Menu.Divider, {}), canMergeCells && item(IconArrowMergeBoth, t.mergeCells, $mergeTableCells), canUnmergeCell && item(IconArrowsSplit2, t.unmergeCell, $unmergeTableCell), _jsx(Menu.Divider, {}), item(IconRowRemove, manyRows ? t.deleteRows : t.deleteRow, $deleteTableRows), item(IconColumnRemove, manyColumns ? t.deleteColumns : t.deleteColumn, $deleteTableColumns), item(IconTableMinus, t.deleteTable, $deleteTable, 'red')] }));
|
|
158
165
|
}
|
|
159
|
-
|
|
166
|
+
/** Whether a one-notch step from `value` stays on the scale — a step that
|
|
167
|
+
* would fall off either end is disabled rather than silently clamped. */
|
|
168
|
+
function canStep(scale, value, step) {
|
|
169
|
+
const next = scale.indexOf(value) + step;
|
|
170
|
+
return next >= 0 && next < scale.length;
|
|
171
|
+
}
|
|
172
|
+
function PoetryMenuItems({ strings, layout, scale, centered, onAction, }) {
|
|
173
|
+
const t = strings.poetryMenu;
|
|
174
|
+
const item = (icon, label, action, active = false, color) => {
|
|
175
|
+
const Icon = icon;
|
|
176
|
+
return (_jsx(Menu.Item, { color: color, disabled: active, leftSection: _jsx(Icon, { size: ICON_SIZE, stroke: ICON_STROKE }), onMouseDown: (e) => e.preventDefault(), onClick: onAction(action), children: label }));
|
|
177
|
+
};
|
|
178
|
+
const setLayout = (next) => () => {
|
|
179
|
+
const node = $getPoetryBlockFromSelection();
|
|
180
|
+
if (node)
|
|
181
|
+
$setPoetryLayout(node, next);
|
|
182
|
+
};
|
|
183
|
+
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
|
+
}
|
|
185
|
+
export function Toolbar({ config, onSave, isDirty, showSave, findOpen = false, onToggleFind, spellOpen = false, onToggleSpell, fontOptions = DEFAULT_FONT_OPTIONS, direction = 'ltr', locale = 'en', drafts }) {
|
|
160
186
|
const [editor] = useLexicalComposerContext();
|
|
161
187
|
const [state, setState] = useState(INITIAL_STATE);
|
|
162
188
|
const strings = useStrings(locale);
|
|
@@ -180,7 +206,7 @@ export function Toolbar({ config, onSave, isDirty, showSave, fontOptions = DEFAU
|
|
|
180
206
|
if ($isTableSelection(selection)) {
|
|
181
207
|
const { rows, columns } = $getTableSelectionSize();
|
|
182
208
|
const canMergeCells = $canMergeSelectedCells();
|
|
183
|
-
setState((s) => ({ ...s, inTable: true, tableRows: rows, tableColumns: columns, canMergeCells, canUnmergeCell: false }));
|
|
209
|
+
setState((s) => ({ ...s, inTable: true, tableRows: rows, tableColumns: columns, canMergeCells, canUnmergeCell: false, inPoetry: false }));
|
|
184
210
|
return;
|
|
185
211
|
}
|
|
186
212
|
if (!$isRangeSelection(selection))
|
|
@@ -189,6 +215,7 @@ export function Toolbar({ config, onSave, isDirty, showSave, fontOptions = DEFAU
|
|
|
189
215
|
const inTable = $getTableCellNodeFromLexicalNode(anchorNode) !== null;
|
|
190
216
|
const tableSize = inTable ? $getTableSelectionSize() : { rows: 1, columns: 1 };
|
|
191
217
|
const canUnmergeCell = inTable && $canUnmergeSelectedCell();
|
|
218
|
+
const poetryBlock = $getPoetryBlockFromSelection();
|
|
192
219
|
const element = anchorNode.getKey() === 'root' ? anchorNode : (anchorNode.getTopLevelElement() ?? anchorNode);
|
|
193
220
|
const listParent = $findMatchingParent(anchorNode, $isListNode);
|
|
194
221
|
const listType = listParent && $isListNode(listParent) ? listParent.getListType() : null;
|
|
@@ -214,6 +241,11 @@ export function Toolbar({ config, onSave, isDirty, showSave, fontOptions = DEFAU
|
|
|
214
241
|
// Lexical's read/update context has already closed, so any $-prefixed
|
|
215
242
|
// node method (getFormatType() included) must not be deferred into it.
|
|
216
243
|
const elementFormat = ($isElementNode(element) ? element.getFormatType() : 'start') || 'start';
|
|
244
|
+
const poetryLayout = poetryBlock?.getLayout();
|
|
245
|
+
const poetryCentered = $getCoupletCenteredFromSelection();
|
|
246
|
+
const poetryScale = poetryBlock
|
|
247
|
+
? { spacing: poetryBlock.getSpacing(), gutter: poetryBlock.getGutter(), stagger: poetryBlock.getStagger() }
|
|
248
|
+
: null;
|
|
217
249
|
setState((s) => ({
|
|
218
250
|
...s,
|
|
219
251
|
blockType,
|
|
@@ -229,6 +261,10 @@ export function Toolbar({ config, onSave, isDirty, showSave, fontOptions = DEFAU
|
|
|
229
261
|
tableColumns: tableSize.columns,
|
|
230
262
|
canMergeCells: false,
|
|
231
263
|
canUnmergeCell,
|
|
264
|
+
inPoetry: poetryBlock !== null,
|
|
265
|
+
poetryLayout: poetryLayout ?? s.poetryLayout,
|
|
266
|
+
poetryScale: poetryScale ?? s.poetryScale,
|
|
267
|
+
poetryCentered: poetryCentered ?? false,
|
|
232
268
|
}));
|
|
233
269
|
});
|
|
234
270
|
}, [editor]);
|
|
@@ -457,9 +493,9 @@ export function Toolbar({ config, onSave, isDirty, showSave, fontOptions = DEFAU
|
|
|
457
493
|
root?.addEventListener('contextmenu', onContextMenu);
|
|
458
494
|
});
|
|
459
495
|
}, [editor, config.links]);
|
|
460
|
-
// Table actions. The menu takes focus, so the
|
|
461
|
-
// opens and restored before an action runs.
|
|
462
|
-
const
|
|
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.
|
|
498
|
+
const runMenuAction = (action) => () => {
|
|
463
499
|
restoreSelection();
|
|
464
500
|
editor.update(action);
|
|
465
501
|
editor.focus();
|
|
@@ -501,6 +537,38 @@ export function Toolbar({ config, onSave, isDirty, showSave, fontOptions = DEFAU
|
|
|
501
537
|
root?.addEventListener('contextmenu', onContextMenu);
|
|
502
538
|
});
|
|
503
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;
|
|
552
|
+
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();
|
|
560
|
+
}, { discrete: true });
|
|
561
|
+
if (!handled)
|
|
562
|
+
return;
|
|
563
|
+
event.preventDefault();
|
|
564
|
+
snapshotSelectionRef.current();
|
|
565
|
+
setPoetryContext({ x: event.clientX, y: event.clientY });
|
|
566
|
+
};
|
|
567
|
+
return editor.registerRootListener((root, previous) => {
|
|
568
|
+
previous?.removeEventListener('contextmenu', onContextMenu);
|
|
569
|
+
root?.addEventListener('contextmenu', onContextMenu);
|
|
570
|
+
});
|
|
571
|
+
}, [editor, config.poetry.enabled]);
|
|
504
572
|
// Ctrl/Cmd+K opens the link dialog.
|
|
505
573
|
useEffect(() => {
|
|
506
574
|
if (!config.links)
|
|
@@ -740,9 +808,10 @@ export function Toolbar({ config, onSave, isDirty, showSave, fontOptions = DEFAU
|
|
|
740
808
|
restoreSelection();
|
|
741
809
|
openLinkDialog();
|
|
742
810
|
}, onRemove: removeLink, strings: strings }) })] })) : (_jsx(ToolbarButton, { icon: IconLink, title: strings.toolbar.insertLink, onClick: openLinkDialog })) }, "link")),
|
|
743
|
-
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.poetry.enabled && _jsx(
|
|
744
|
-
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:
|
|
745
|
-
|
|
811
|
+
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
|
+
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
|
+
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(ToolbarButton, { icon: IconAbc, title: strings.toolbar.spellChecker, active: spellOpen, onClick: onToggleSpell }))] }, "language")),
|
|
746
815
|
];
|
|
747
816
|
return (_jsxs("div", { className: "likhari-toolbar", role: "toolbar", "aria-label": strings.toolbar.ariaLabel, ref: toolbarContainerRef, children: [fixedGroups, movableGroups
|
|
748
817
|
.filter((group) => !overflowGroupKeys.has(group.key))
|
|
@@ -757,7 +826,10 @@ export function Toolbar({ config, onSave, isDirty, showSave, fontOptions = DEFAU
|
|
|
757
826
|
}, onRemove: removeLink, strings: strings }) })] })), config.tables && (_jsxs(Menu, { opened: tableContext !== null, onChange: (opened) => {
|
|
758
827
|
if (!opened)
|
|
759
828
|
setTableContext(null);
|
|
760
|
-
}, 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:
|
|
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) => {
|
|
830
|
+
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: {
|
|
761
833
|
position: 'absolute',
|
|
762
834
|
visibility: 'hidden',
|
|
763
835
|
pointerEvents: 'none',
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { type TextNode } from 'lexical';
|
|
2
|
+
/** A match as a Lexical selection range: start and end points, each in a text node. */
|
|
3
|
+
export interface FindMatch {
|
|
4
|
+
anchorKey: string;
|
|
5
|
+
anchorOffset: number;
|
|
6
|
+
focusKey: string;
|
|
7
|
+
focusOffset: number;
|
|
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
|
+
};
|
|
21
|
+
/** Every non-overlapping occurrence of `query` in the document, case-sensitive. */
|
|
22
|
+
export declare function $findMatches(query: string): FindMatch[];
|
|
23
|
+
/** Makes the match the editor's selection, so it's highlighted and scrolled to. */
|
|
24
|
+
export declare function $selectMatch(match: FindMatch): void;
|
|
25
|
+
/**
|
|
26
|
+
* Replaces one match, keeping the formatting of the text around it. The
|
|
27
|
+
* replacement takes the formatting of the match's first character.
|
|
28
|
+
*/
|
|
29
|
+
export declare function $replaceMatch(match: FindMatch, replacement: string): void;
|
|
30
|
+
/**
|
|
31
|
+
* Replaces every match. Walks from the last match to the first, so each
|
|
32
|
+
* replacement leaves the positions of the matches before it unchanged.
|
|
33
|
+
* Returns how many were replaced.
|
|
34
|
+
*/
|
|
35
|
+
export declare function $replaceAll(query: string, replacement: string): number;
|
|
36
|
+
//# sourceMappingURL=findReplaceActions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { $createRangeSelection, $getRoot, $getSelection, $isRangeSelection, $setSelection } from 'lexical';
|
|
2
|
+
/**
|
|
3
|
+
* Text nodes grouped by their parent, in document order. A match is searched
|
|
4
|
+
* for within one parent only, so it never spans two paragraphs or table
|
|
5
|
+
* cells, but it can span the several text nodes that formatting splits a
|
|
6
|
+
* paragraph into.
|
|
7
|
+
*/
|
|
8
|
+
export function $textGroups() {
|
|
9
|
+
const groups = new Map();
|
|
10
|
+
for (const node of $getRoot().getAllTextNodes()) {
|
|
11
|
+
const parentKey = node.getParentOrThrow().getKey();
|
|
12
|
+
const group = groups.get(parentKey);
|
|
13
|
+
if (group)
|
|
14
|
+
group.push(node);
|
|
15
|
+
else
|
|
16
|
+
groups.set(parentKey, [node]);
|
|
17
|
+
}
|
|
18
|
+
return [...groups.values()];
|
|
19
|
+
}
|
|
20
|
+
/** The text node and offset that a character index in a group falls in. */
|
|
21
|
+
export function $locate(group, index, end) {
|
|
22
|
+
let start = 0;
|
|
23
|
+
for (const node of group) {
|
|
24
|
+
const length = node.getTextContent().length;
|
|
25
|
+
const inside = end ? index > start && index <= start + length : index >= start && index < start + length;
|
|
26
|
+
if (inside)
|
|
27
|
+
return { key: node.getKey(), offset: index - start };
|
|
28
|
+
start += length;
|
|
29
|
+
}
|
|
30
|
+
const last = group[group.length - 1];
|
|
31
|
+
return { key: last.getKey(), offset: last.getTextContent().length };
|
|
32
|
+
}
|
|
33
|
+
/** Every non-overlapping occurrence of `query` in the document, case-sensitive. */
|
|
34
|
+
export function $findMatches(query) {
|
|
35
|
+
if (query === '')
|
|
36
|
+
return [];
|
|
37
|
+
const matches = [];
|
|
38
|
+
for (const group of $textGroups()) {
|
|
39
|
+
const text = group.map((node) => node.getTextContent()).join('');
|
|
40
|
+
let index = text.indexOf(query);
|
|
41
|
+
while (index !== -1) {
|
|
42
|
+
const start = $locate(group, index, false);
|
|
43
|
+
const end = $locate(group, index + query.length, true);
|
|
44
|
+
matches.push({ anchorKey: start.key, anchorOffset: start.offset, focusKey: end.key, focusOffset: end.offset });
|
|
45
|
+
index = text.indexOf(query, index + query.length);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return matches;
|
|
49
|
+
}
|
|
50
|
+
/** Makes the match the editor's selection, so it's highlighted and scrolled to. */
|
|
51
|
+
export function $selectMatch(match) {
|
|
52
|
+
const selection = $createRangeSelection();
|
|
53
|
+
selection.anchor.set(match.anchorKey, match.anchorOffset, 'text');
|
|
54
|
+
selection.focus.set(match.focusKey, match.focusOffset, 'text');
|
|
55
|
+
$setSelection(selection);
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Replaces one match, keeping the formatting of the text around it. The
|
|
59
|
+
* replacement takes the formatting of the match's first character.
|
|
60
|
+
*/
|
|
61
|
+
export function $replaceMatch(match, replacement) {
|
|
62
|
+
$selectMatch(match);
|
|
63
|
+
const selection = $getSelection();
|
|
64
|
+
if (!$isRangeSelection(selection))
|
|
65
|
+
return;
|
|
66
|
+
if (replacement === '')
|
|
67
|
+
selection.removeText();
|
|
68
|
+
else
|
|
69
|
+
selection.insertText(replacement);
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Replaces every match. Walks from the last match to the first, so each
|
|
73
|
+
* replacement leaves the positions of the matches before it unchanged.
|
|
74
|
+
* Returns how many were replaced.
|
|
75
|
+
*/
|
|
76
|
+
export function $replaceAll(query, replacement) {
|
|
77
|
+
const matches = $findMatches(query);
|
|
78
|
+
for (let i = matches.length - 1; i >= 0; i--)
|
|
79
|
+
$replaceMatch(matches[i], replacement);
|
|
80
|
+
return matches.length;
|
|
81
|
+
}
|
package/dist/i18n/strings.d.ts
CHANGED
|
@@ -42,14 +42,16 @@ export interface Strings {
|
|
|
42
42
|
linkOptions: string;
|
|
43
43
|
/** Toolbar button (shown while the caret is in a table) that opens the table actions menu. */
|
|
44
44
|
tableOptions: string;
|
|
45
|
+
/** Toolbar button (shown while the caret is in a couplet) that opens the poetry layout/alignment menu. */
|
|
46
|
+
poetryOptions: string;
|
|
45
47
|
insertLink: string;
|
|
46
48
|
insertImage: string;
|
|
47
49
|
insertPageBreak: string;
|
|
48
50
|
insertTable: string;
|
|
49
51
|
insertColumns: string;
|
|
50
52
|
insertFootnote: string;
|
|
53
|
+
insertPoetryCouplet: string;
|
|
51
54
|
insertHorizontalRule: string;
|
|
52
|
-
poetryBlocks: string;
|
|
53
55
|
comingSoon: (label: string) => string;
|
|
54
56
|
autocorrect: string;
|
|
55
57
|
textCleanup: string;
|
|
@@ -136,6 +138,45 @@ export interface Strings {
|
|
|
136
138
|
mergeCells: string;
|
|
137
139
|
unmergeCell: string;
|
|
138
140
|
};
|
|
141
|
+
poetryMenu: {
|
|
142
|
+
menuLabel: string;
|
|
143
|
+
singleColumn: string;
|
|
144
|
+
twoColumn: string;
|
|
145
|
+
staggered: string;
|
|
146
|
+
narrowerCouplets: string;
|
|
147
|
+
widerCouplets: string;
|
|
148
|
+
insertCoupletBefore: string;
|
|
149
|
+
insertCoupletAfter: string;
|
|
150
|
+
centerCouplet: string;
|
|
151
|
+
uncenterCouplet: string;
|
|
152
|
+
tighterSpacing: string;
|
|
153
|
+
looserSpacing: string;
|
|
154
|
+
narrowerGutter: string;
|
|
155
|
+
widerGutter: string;
|
|
156
|
+
deleteCouplet: string;
|
|
157
|
+
deletePoetry: string;
|
|
158
|
+
};
|
|
159
|
+
findReplace: {
|
|
160
|
+
toggle: string;
|
|
161
|
+
find: string;
|
|
162
|
+
replace: string;
|
|
163
|
+
findPlaceholder: string;
|
|
164
|
+
replacePlaceholder: string;
|
|
165
|
+
previous: string;
|
|
166
|
+
next: string;
|
|
167
|
+
replaceOne: string;
|
|
168
|
+
replaceAll: string;
|
|
169
|
+
noMatches: string;
|
|
170
|
+
close: string;
|
|
171
|
+
};
|
|
172
|
+
spellcheck: {
|
|
173
|
+
title: string;
|
|
174
|
+
language: string;
|
|
175
|
+
check: string;
|
|
176
|
+
close: string;
|
|
177
|
+
noDictionary: string;
|
|
178
|
+
noMisspellings: string;
|
|
179
|
+
};
|
|
139
180
|
link: {
|
|
140
181
|
menuLabel: string;
|
|
141
182
|
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,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AAM,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;AA2tBD,eAAO,MAAM,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAI3C,CAAC;AAEF;;sDAEsD;AACtD,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAElD"}
|
package/dist/i18n/strings.js
CHANGED
|
@@ -33,14 +33,15 @@ const en = {
|
|
|
33
33
|
alignment: 'Alignment',
|
|
34
34
|
linkOptions: 'Link options',
|
|
35
35
|
tableOptions: 'Table options',
|
|
36
|
+
poetryOptions: 'Poetry options',
|
|
36
37
|
insertLink: 'Insert link (Ctrl+K)',
|
|
37
38
|
insertImage: 'Insert image',
|
|
38
39
|
insertPageBreak: 'Insert page break',
|
|
39
40
|
insertTable: 'Insert table',
|
|
40
41
|
insertColumns: 'Insert columns',
|
|
41
42
|
insertFootnote: 'Insert footnote',
|
|
43
|
+
insertPoetryCouplet: 'Insert poetry couplet',
|
|
42
44
|
insertHorizontalRule: 'Insert horizontal rule',
|
|
43
|
-
poetryBlocks: 'Poetry blocks',
|
|
44
45
|
comingSoon: (label) => `${label} (coming soon)`,
|
|
45
46
|
autocorrect: 'Auto-correct',
|
|
46
47
|
textCleanup: 'Text cleanup',
|
|
@@ -120,6 +121,45 @@ const en = {
|
|
|
120
121
|
mergeCells: 'Merge cells',
|
|
121
122
|
unmergeCell: 'Unmerge cell',
|
|
122
123
|
},
|
|
124
|
+
poetryMenu: {
|
|
125
|
+
menuLabel: 'Poetry',
|
|
126
|
+
singleColumn: 'Single column',
|
|
127
|
+
twoColumn: 'Two column',
|
|
128
|
+
staggered: 'Alternating sides',
|
|
129
|
+
narrowerCouplets: 'Narrower couplets',
|
|
130
|
+
widerCouplets: 'Wider couplets',
|
|
131
|
+
insertCoupletBefore: 'Insert couplet above',
|
|
132
|
+
insertCoupletAfter: 'Insert couplet below',
|
|
133
|
+
centerCouplet: 'Center this couplet',
|
|
134
|
+
uncenterCouplet: 'Un-center this couplet',
|
|
135
|
+
tighterSpacing: 'Tighter couplet spacing',
|
|
136
|
+
looserSpacing: 'Looser couplet spacing',
|
|
137
|
+
narrowerGutter: 'Narrower gutter',
|
|
138
|
+
widerGutter: 'Wider gutter',
|
|
139
|
+
deleteCouplet: 'Delete couplet',
|
|
140
|
+
deletePoetry: 'Delete poetry',
|
|
141
|
+
},
|
|
142
|
+
findReplace: {
|
|
143
|
+
toggle: 'Find and replace',
|
|
144
|
+
find: 'Find',
|
|
145
|
+
replace: 'Replace',
|
|
146
|
+
findPlaceholder: 'Text to find',
|
|
147
|
+
replacePlaceholder: 'Replacement text',
|
|
148
|
+
previous: 'Previous',
|
|
149
|
+
next: 'Next',
|
|
150
|
+
replaceOne: 'Replace',
|
|
151
|
+
replaceAll: 'Replace all',
|
|
152
|
+
noMatches: 'No matches',
|
|
153
|
+
close: 'Close',
|
|
154
|
+
},
|
|
155
|
+
spellcheck: {
|
|
156
|
+
title: 'Spell check',
|
|
157
|
+
language: 'Language',
|
|
158
|
+
check: 'Check',
|
|
159
|
+
close: 'Close',
|
|
160
|
+
noDictionary: 'No dictionary installed',
|
|
161
|
+
noMisspellings: 'No misspellings found',
|
|
162
|
+
},
|
|
123
163
|
link: {
|
|
124
164
|
menuLabel: 'Link',
|
|
125
165
|
noUrl: '(no URL)',
|
|
@@ -234,14 +274,15 @@ const ur = {
|
|
|
234
274
|
alignment: 'سیدھ',
|
|
235
275
|
linkOptions: 'لنک کے اختیارات',
|
|
236
276
|
tableOptions: 'جدول کے اختیارات',
|
|
277
|
+
poetryOptions: 'شاعری کے اختیارات',
|
|
237
278
|
insertLink: 'لنک شامل کریں (Ctrl+K)',
|
|
238
279
|
insertImage: 'تصویر شامل کریں',
|
|
239
280
|
insertPageBreak: 'صفحے کی تقسیم شامل کریں',
|
|
240
281
|
insertTable: 'جدول شامل کریں',
|
|
241
282
|
insertColumns: 'کالم شامل کریں',
|
|
242
283
|
insertFootnote: 'فٹ نوٹ شامل کریں',
|
|
284
|
+
insertPoetryCouplet: 'شعر شامل کریں',
|
|
243
285
|
insertHorizontalRule: 'افقی لکیر شامل کریں',
|
|
244
|
-
poetryBlocks: 'شاعری کے بلاکس',
|
|
245
286
|
comingSoon: (label) => `${label} (جلد آ رہا ہے)`,
|
|
246
287
|
autocorrect: 'خودکار تصحیح',
|
|
247
288
|
textCleanup: 'متن کی صفائی',
|
|
@@ -321,6 +362,45 @@ const ur = {
|
|
|
321
362
|
mergeCells: 'خانے ضم کریں',
|
|
322
363
|
unmergeCell: 'خانہ الگ کریں',
|
|
323
364
|
},
|
|
365
|
+
poetryMenu: {
|
|
366
|
+
menuLabel: 'شاعری',
|
|
367
|
+
singleColumn: 'ایک کالم',
|
|
368
|
+
twoColumn: 'دو کالم',
|
|
369
|
+
staggered: 'کالم متبادل',
|
|
370
|
+
narrowerCouplets: 'شعر کی چوڑائی کم',
|
|
371
|
+
widerCouplets: 'شعر کی چوڑائی زیادہ',
|
|
372
|
+
insertCoupletBefore: 'اوپر شعر شامل کریں',
|
|
373
|
+
insertCoupletAfter: 'نیچے شعر شامل کریں',
|
|
374
|
+
centerCouplet: 'یہ شعر وسط میں رکھیں',
|
|
375
|
+
uncenterCouplet: 'وسط میں رکھنا ختم کریں',
|
|
376
|
+
tighterSpacing: 'شعروں کے درمیان کم جگہ',
|
|
377
|
+
looserSpacing: 'شعروں کے درمیان زیادہ جگہ',
|
|
378
|
+
narrowerGutter: 'کالمز کے درمیان کم جگہ',
|
|
379
|
+
widerGutter: 'کالمز کے درمیان زیادہ جگہ',
|
|
380
|
+
deleteCouplet: 'شعر حذف کریں',
|
|
381
|
+
deletePoetry: 'پوری شاعری حذف کریں',
|
|
382
|
+
},
|
|
383
|
+
findReplace: {
|
|
384
|
+
toggle: 'تلاش اور تبدیلی',
|
|
385
|
+
find: 'تلاش کریں',
|
|
386
|
+
replace: 'تبدیل کریں',
|
|
387
|
+
findPlaceholder: 'جو متن تلاش کرنا ہے',
|
|
388
|
+
replacePlaceholder: 'تبدیل کرنے کا متن',
|
|
389
|
+
previous: 'پچھلا',
|
|
390
|
+
next: 'اگلا',
|
|
391
|
+
replaceOne: 'تبدیل کریں',
|
|
392
|
+
replaceAll: 'سب تبدیل کریں',
|
|
393
|
+
noMatches: 'کوئی میچ نہیں',
|
|
394
|
+
close: 'بند کریں',
|
|
395
|
+
},
|
|
396
|
+
spellcheck: {
|
|
397
|
+
title: 'ہجے کی جانچ',
|
|
398
|
+
language: 'زبان',
|
|
399
|
+
check: 'جانچیں',
|
|
400
|
+
close: 'بند کریں',
|
|
401
|
+
noDictionary: 'کوئی لغت نصب نہیں',
|
|
402
|
+
noMisspellings: 'کوئی غلط ہجے نہیں ملے',
|
|
403
|
+
},
|
|
324
404
|
link: {
|
|
325
405
|
menuLabel: 'لنک',
|
|
326
406
|
noUrl: '(کوئی یو آر ایل نہیں)',
|
|
@@ -435,14 +515,15 @@ const paShahmukhi = {
|
|
|
435
515
|
alignment: 'سیدھ',
|
|
436
516
|
linkOptions: 'لنک دے اختیار',
|
|
437
517
|
tableOptions: 'ٹیبل دے اختیار',
|
|
518
|
+
poetryOptions: 'شاعری دے اختیار',
|
|
438
519
|
insertLink: 'لنک پاؤ (Ctrl+K)',
|
|
439
520
|
insertImage: 'تصویر پاؤ',
|
|
440
521
|
insertPageBreak: 'صفحے دی ونڈ پاؤ',
|
|
441
522
|
insertTable: 'ٹیبل پاؤ',
|
|
442
523
|
insertColumns: 'کالم پاؤ',
|
|
443
524
|
insertFootnote: 'فٹ نوٹ پاؤ',
|
|
525
|
+
insertPoetryCouplet: 'شعر پاؤ',
|
|
444
526
|
insertHorizontalRule: 'لیٹی لکیر پاؤ',
|
|
445
|
-
poetryBlocks: 'شاعری بلاک',
|
|
446
527
|
comingSoon: (label) => `${label} (چھیتی آ رہا اے)`,
|
|
447
528
|
autocorrect: 'خودکار درستی',
|
|
448
529
|
textCleanup: 'متن دی صفائی',
|
|
@@ -522,6 +603,45 @@ const paShahmukhi = {
|
|
|
522
603
|
mergeCells: 'خانے رلاؤ',
|
|
523
604
|
unmergeCell: 'خانہ الگ کرو',
|
|
524
605
|
},
|
|
606
|
+
poetryMenu: {
|
|
607
|
+
menuLabel: 'شاعری',
|
|
608
|
+
singleColumn: 'اک کالم',
|
|
609
|
+
twoColumn: 'دو کالم',
|
|
610
|
+
staggered: 'وارو وار پاسے',
|
|
611
|
+
narrowerCouplets: 'شعر دی چوڑائی گھٹ',
|
|
612
|
+
widerCouplets: 'شعر دی چوڑائی ودھ',
|
|
613
|
+
insertCoupletBefore: 'اُتے شعر شامل کرو',
|
|
614
|
+
insertCoupletAfter: 'ھیٹھ شعر شامل کرو',
|
|
615
|
+
centerCouplet: 'ایہ شعر وچکار رکھو',
|
|
616
|
+
uncenterCouplet: 'وچکار رکھنا بند کرو',
|
|
617
|
+
tighterSpacing: 'شعراں وچکار گھٹ جگہ',
|
|
618
|
+
looserSpacing: 'شعراں وچکار ودھ جگہ',
|
|
619
|
+
narrowerGutter: 'کالماں وچکار گھٹ جگہ',
|
|
620
|
+
widerGutter: 'کالماں وچکار ودھ جگہ',
|
|
621
|
+
deleteCouplet: 'شعر مٹاؤ',
|
|
622
|
+
deletePoetry: 'ساری شاعری مٹاؤ',
|
|
623
|
+
},
|
|
624
|
+
findReplace: {
|
|
625
|
+
toggle: 'لبھو تے بدلو',
|
|
626
|
+
find: 'لبھo',
|
|
627
|
+
replace: 'بدلo',
|
|
628
|
+
findPlaceholder: 'جو لبھنا اے',
|
|
629
|
+
replacePlaceholder: 'بدلن والا متن',
|
|
630
|
+
previous: 'پچھلا',
|
|
631
|
+
next: 'اگلا',
|
|
632
|
+
replaceOne: 'بدلo',
|
|
633
|
+
replaceAll: 'سارے بدلo',
|
|
634
|
+
noMatches: 'کوئی ملدا نئیں',
|
|
635
|
+
close: 'بند کرo',
|
|
636
|
+
},
|
|
637
|
+
spellcheck: {
|
|
638
|
+
title: 'ہجے دی جانچ',
|
|
639
|
+
language: 'بولی',
|
|
640
|
+
check: 'جانچو',
|
|
641
|
+
close: 'بند کرو',
|
|
642
|
+
noDictionary: 'کوئی شبدکوش نئیں لگی',
|
|
643
|
+
noMisspellings: 'کوئی غلط ہجے نئیں لبھے',
|
|
644
|
+
},
|
|
525
645
|
link: {
|
|
526
646
|
menuLabel: 'لنک',
|
|
527
647
|
noUrl: '(کوئی یو آر ایل نئیں)',
|
package/dist/index.d.ts
CHANGED
|
@@ -8,4 +8,5 @@ export { DEFAULT_FONT_OPTIONS, URDU_WEB_FONT_OPTIONS, FONT_SIZES_PX } from './fo
|
|
|
8
8
|
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
|
+
export { registerSpellDictionary, hasSpellDictionary, type HunspellFiles, type SpellLanguage } from './spellcheck/spellDictionaries.js';
|
|
11
12
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -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,EAAE,SAAS,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAC1G,YAAY,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC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B,EAAE,kBAAkB,EAAE,KAAK,aAAa,EAAE,KAAK,aAAa,EAAE,MAAM,gCAAgC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -3,3 +3,4 @@ export { defaultMantineTheme } from './theme/mantineTheme.js';
|
|
|
3
3
|
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
|
+
export { registerSpellDictionary, hasSpellDictionary } from './spellcheck/spellDictionaries.js';
|
package/dist/nodes.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nodes.d.ts","sourceRoot":"","sources":["../src/nodes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"nodes.d.ts","sourceRoot":"","sources":["../src/nodes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAalD;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,WAAW,CAAC,EAkB5C,CAAC"}
|