quoin-editor 1.7.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -1
- package/MIGRATION.md +137 -23
- package/README.md +32 -11
- package/dist/ai-labels-BXX32H9a.d.cts +53 -0
- package/dist/ai-labels-BXX32H9a.d.ts +53 -0
- package/dist/ai.cjs +84 -86
- package/dist/ai.d.cts +4 -53
- package/dist/ai.d.ts +4 -53
- package/dist/ai.js +8 -10
- package/dist/ai.js.map +1 -1
- package/dist/catalogue.cjs +27 -26
- package/dist/catalogue.d.cts +10 -1
- package/dist/catalogue.d.ts +10 -1
- package/dist/catalogue.js +18 -17
- package/dist/catalogue.js.map +1 -1
- package/dist/{chunk-MNA7MBCH.js → chunk-2UKI26JA.js} +9 -11
- package/dist/chunk-2UKI26JA.js.map +1 -0
- package/dist/{chunk-MZXW2HXP.cjs → chunk-4PIJC4FD.cjs} +27 -29
- package/dist/{chunk-OS2O6IKX.js → chunk-5RBMZGKV.js} +4 -4
- package/dist/{chunk-OS2O6IKX.js.map → chunk-5RBMZGKV.js.map} +1 -1
- package/dist/{chunk-OJ4O6HWC.js → chunk-5X52BAZB.js} +10 -12
- package/dist/chunk-5X52BAZB.js.map +1 -0
- package/dist/{chunk-JY5VUHKN.cjs → chunk-5YAJZSTI.cjs} +28 -30
- package/dist/{chunk-YEFPH27F.cjs → chunk-66OPHDFA.cjs} +92 -94
- package/dist/{chunk-PWUFFHAQ.js → chunk-6BVE46K7.js} +8 -10
- package/dist/chunk-6BVE46K7.js.map +1 -0
- package/dist/{chunk-LKZJ2TDU.cjs → chunk-77CNOLHY.cjs} +10 -13
- package/dist/{chunk-4T4TJ2QS.cjs → chunk-7E43TURF.cjs} +7 -7
- package/dist/{chunk-BJTOLCRR.js → chunk-7Y4B7NHO.js} +2 -2
- package/dist/chunk-7Y4B7NHO.js.map +1 -0
- package/dist/{chunk-7GU25Z6L.js → chunk-B4VCDJSA.js} +9 -11
- package/dist/chunk-B4VCDJSA.js.map +1 -0
- package/dist/{chunk-QR2NIDUK.cjs → chunk-BYYCD54G.cjs} +2 -2
- package/dist/{chunk-6T5YGCZ5.cjs → chunk-CJVJNMOB.cjs} +302 -299
- package/dist/{chunk-CSKKSXCE.js → chunk-CSPCDVCT.js} +3 -3
- package/dist/{chunk-CSKKSXCE.js.map → chunk-CSPCDVCT.js.map} +1 -1
- package/dist/{chunk-BF7733XS.cjs → chunk-D6CIIWCU.cjs} +57 -59
- package/dist/{chunk-GHNQKJMD.js → chunk-DBOZFNWU.js} +3 -3
- package/dist/{chunk-GHNQKJMD.js.map → chunk-DBOZFNWU.js.map} +1 -1
- package/dist/{chunk-BM2GRZNM.cjs → chunk-DJU25PFC.cjs} +11 -11
- package/dist/chunk-DLQCTGC3.js +10 -0
- package/dist/chunk-DLQCTGC3.js.map +1 -0
- package/dist/{chunk-RQXJKJ5S.js → chunk-EU5IGKMP.js} +7 -10
- package/dist/chunk-EU5IGKMP.js.map +1 -0
- package/dist/{chunk-VZZPCYA3.cjs → chunk-FK7EBZPX.cjs} +226 -226
- package/dist/{chunk-BXSWZEA5.js → chunk-GPTJYWGS.js} +3 -3
- package/dist/{chunk-BXSWZEA5.js.map → chunk-GPTJYWGS.js.map} +1 -1
- package/dist/{chunk-I722LBD3.cjs → chunk-HOSDMHK6.cjs} +32 -34
- package/dist/{chunk-AZF7B2AE.cjs → chunk-IKZSCTRF.cjs} +11 -11
- package/dist/{chunk-R7MYG522.js → chunk-IW4TMECB.js} +3 -3
- package/dist/{chunk-R7MYG522.js.map → chunk-IW4TMECB.js.map} +1 -1
- package/dist/{chunk-PLUMKN4B.js → chunk-J2SVYBTC.js} +10 -12
- package/dist/chunk-J2SVYBTC.js.map +1 -0
- package/dist/{chunk-UZS3TW75.js → chunk-KQPZTSW3.js} +9 -11
- package/dist/chunk-KQPZTSW3.js.map +1 -0
- package/dist/{chunk-STKGRXSA.cjs → chunk-LEICOZYK.cjs} +15 -17
- package/dist/{chunk-H3C3MJW5.cjs → chunk-LM3DHROX.cjs} +2 -2
- package/dist/{chunk-AD3NY7NA.js → chunk-LSI4RMTY.js} +3 -3
- package/dist/{chunk-AD3NY7NA.js.map → chunk-LSI4RMTY.js.map} +1 -1
- package/dist/{chunk-QOIVLYMW.js → chunk-M77A3EGD.js} +5 -5
- package/dist/{chunk-QOIVLYMW.js.map → chunk-M77A3EGD.js.map} +1 -1
- package/dist/{chunk-5JEQZIRI.js → chunk-MAS4AEF4.js} +8 -10
- package/dist/chunk-MAS4AEF4.js.map +1 -0
- package/dist/{chunk-KDK2ATMB.cjs → chunk-NFO3W644.cjs} +51 -53
- package/dist/{chunk-XFEDJEJF.js → chunk-NL5J77VD.js} +204 -204
- package/dist/chunk-NL5J77VD.js.map +1 -0
- package/dist/{chunk-WN7BZDNH.cjs → chunk-PURYVDC3.cjs} +13 -13
- package/dist/{chunk-G25FMFEZ.js → chunk-UDBLZILE.js} +4 -4
- package/dist/{chunk-G25FMFEZ.js.map → chunk-UDBLZILE.js.map} +1 -1
- package/dist/{chunk-FNJOPGMN.cjs → chunk-V4WQG7FR.cjs} +116 -118
- package/dist/{chunk-IJKGF6SC.js → chunk-YABGWOAV.js} +8 -10
- package/dist/chunk-YABGWOAV.js.map +1 -0
- package/dist/{chunk-XZ4NC3Q7.cjs → chunk-YEDPBYO5.cjs} +4 -4
- package/dist/{chunk-QJ34MOFV.cjs → chunk-Z6LAARPB.cjs} +315 -320
- package/dist/{chunk-HSLOPJVT.js → chunk-ZN5DHNSL.js} +19 -16
- package/dist/chunk-ZN5DHNSL.js.map +1 -0
- package/dist/chunk-ZWTIRGY5.cjs +10 -0
- package/dist/comments-labels-DWqsSz8G.d.cts +30 -0
- package/dist/comments-labels-DWqsSz8G.d.ts +30 -0
- package/dist/comments.cjs +63 -65
- package/dist/comments.d.cts +4 -30
- package/dist/comments.d.ts +4 -30
- package/dist/comments.js +9 -11
- package/dist/comments.js.map +1 -1
- package/dist/{diagram-extension-Da7hp-tv.d.ts → diagram-extension-22x_njXB.d.ts} +4 -12
- package/dist/{diagram-extension-D573COJv.d.cts → diagram-extension-C_FSkoj9.d.cts} +4 -12
- package/dist/diagram-labels-Bi_jEZ8_.d.cts +11 -0
- package/dist/diagram-labels-Bi_jEZ8_.d.ts +11 -0
- package/dist/diagram.cjs +10 -9
- package/dist/diagram.d.cts +3 -2
- package/dist/diagram.d.ts +3 -2
- package/dist/diagram.js +7 -6
- package/dist/diff-labels-DWwg7N0n.d.cts +27 -0
- package/dist/diff-labels-DWwg7N0n.d.ts +27 -0
- package/dist/diff.cjs +27 -29
- package/dist/diff.d.cts +4 -27
- package/dist/diff.d.ts +4 -27
- package/dist/diff.js +5 -7
- package/dist/diff.js.map +1 -1
- package/dist/docx.cjs +30 -30
- package/dist/docx.js +3 -3
- package/dist/embed-labels-BiVa9HYl.d.cts +23 -0
- package/dist/embed-labels-BiVa9HYl.d.ts +23 -0
- package/dist/embed.cjs +10 -9
- package/dist/embed.d.cts +4 -23
- package/dist/embed.d.ts +4 -23
- package/dist/embed.js +8 -7
- package/dist/emoji-extension-C832oGeT.d.ts +16 -0
- package/dist/emoji-extension-Dk5IQLZf.d.cts +16 -0
- package/dist/{emoji-extension-gRKnbW8G.d.ts → emoji-labels-YwOms7ZJ.d.cts} +2 -15
- package/dist/{emoji-extension-C3o_Y5uC.d.cts → emoji-labels-YwOms7ZJ.d.ts} +2 -15
- package/dist/emoji.cjs +10 -9
- package/dist/emoji.d.cts +4 -3
- package/dist/emoji.d.ts +4 -3
- package/dist/emoji.js +7 -6
- package/dist/engine.cjs +58 -58
- package/dist/engine.d.cts +8 -7
- package/dist/engine.d.ts +8 -7
- package/dist/engine.js +3 -3
- package/dist/find-extension-BfruAPLi.d.cts +15 -0
- package/dist/find-extension-DmK9_N81.d.ts +15 -0
- package/dist/{find-extension-B_Ctrs6T.d.ts → find-labels-C4vs8Qe9.d.cts} +2 -14
- package/dist/{find-extension-BGGsJMu4.d.cts → find-labels-C4vs8Qe9.d.ts} +2 -14
- package/dist/find.cjs +11 -10
- package/dist/find.d.cts +2 -1
- package/dist/find.d.ts +2 -1
- package/dist/find.js +7 -6
- package/dist/headless.cjs +69 -89
- package/dist/headless.d.cts +21 -28
- package/dist/headless.d.ts +21 -28
- package/dist/headless.js +4 -4
- package/dist/highlight.cjs +7 -6
- package/dist/highlight.js +6 -5
- package/dist/highlight.js.map +1 -1
- package/dist/{index-CsG7OQoq.d.cts → index-3fYvwqUZ.d.cts} +1 -1
- package/dist/{index-h1llgZM-.d.ts → index-CgxnzCO5.d.ts} +1 -1
- package/dist/index.cjs +82 -101
- package/dist/index.d.cts +18 -185
- package/dist/index.d.ts +18 -185
- package/dist/index.js +6 -5
- package/dist/labels-BhRJYo46.d.ts +176 -0
- package/dist/labels-CiCxj2jP.d.cts +176 -0
- package/dist/locale-ar.cjs +565 -0
- package/dist/locale-ar.d.cts +63 -0
- package/dist/locale-ar.d.ts +63 -0
- package/dist/locale-ar.js +551 -0
- package/dist/locale-ar.js.map +1 -0
- package/dist/locale-de.cjs +510 -0
- package/dist/locale-de.d.cts +63 -0
- package/dist/locale-de.d.ts +63 -0
- package/dist/locale-de.js +496 -0
- package/dist/locale-de.js.map +1 -0
- package/dist/locale-es.cjs +510 -0
- package/dist/locale-es.d.cts +63 -0
- package/dist/locale-es.d.ts +63 -0
- package/dist/locale-es.js +496 -0
- package/dist/locale-es.js.map +1 -0
- package/dist/locale-fr.cjs +510 -0
- package/dist/locale-fr.d.cts +63 -0
- package/dist/locale-fr.d.ts +63 -0
- package/dist/locale-fr.js +496 -0
- package/dist/locale-fr.js.map +1 -0
- package/dist/locale-ja.cjs +505 -0
- package/dist/locale-ja.d.cts +63 -0
- package/dist/locale-ja.d.ts +63 -0
- package/dist/locale-ja.js +491 -0
- package/dist/locale-ja.js.map +1 -0
- package/dist/locale-pt.cjs +511 -0
- package/dist/locale-pt.d.cts +63 -0
- package/dist/locale-pt.d.ts +63 -0
- package/dist/locale-pt.js +497 -0
- package/dist/locale-pt.js.map +1 -0
- package/dist/locale-zh.cjs +505 -0
- package/dist/locale-zh.d.cts +63 -0
- package/dist/locale-zh.d.ts +63 -0
- package/dist/locale-zh.js +491 -0
- package/dist/locale-zh.js.map +1 -0
- package/dist/math-labels-DOf5KFxp.d.cts +24 -0
- package/dist/math-labels-DOf5KFxp.d.ts +24 -0
- package/dist/math.cjs +11 -10
- package/dist/math.d.cts +4 -24
- package/dist/math.d.ts +4 -24
- package/dist/math.js +9 -8
- package/dist/mention-labels-DIQy8LRT.d.cts +15 -0
- package/dist/mention-labels-DIQy8LRT.d.ts +15 -0
- package/dist/mention.cjs +11 -10
- package/dist/mention.d.cts +4 -15
- package/dist/mention.d.ts +4 -15
- package/dist/mention.js +9 -8
- package/dist/{view-controller-p-2x3J7Y.d.ts → node-reveal-BnFcnHhz.d.ts} +14 -14
- package/dist/{view-controller-BfVSNZYZ.d.cts → node-reveal-DY6bimv3.d.cts} +14 -14
- package/dist/palette-BrX-hEd-.d.cts +4 -0
- package/dist/palette-BrX-hEd-.d.ts +4 -0
- package/dist/presence-labels-DXVJLifl.d.cts +15 -0
- package/dist/presence-labels-DXVJLifl.d.ts +15 -0
- package/dist/presence.cjs +40 -42
- package/dist/presence.d.cts +4 -15
- package/dist/presence.d.ts +4 -15
- package/dist/presence.js +9 -11
- package/dist/presence.js.map +1 -1
- package/dist/source-labels-CeQDXsYZ.d.cts +9 -0
- package/dist/source-labels-CeQDXsYZ.d.ts +9 -0
- package/dist/source.cjs +11 -14
- package/dist/source.d.cts +5 -10
- package/dist/source.d.ts +5 -10
- package/dist/source.js +7 -10
- package/dist/source.js.map +1 -1
- package/dist/{stats-extension-oD6D1cYy.d.ts → stats-extension-D5HySF0a.d.cts} +4 -16
- package/dist/{stats-extension-XqOTvRaq.d.cts → stats-extension-Dmw0Ujxe.d.ts} +4 -16
- package/dist/stats-labels-W8gep51s.d.cts +15 -0
- package/dist/stats-labels-W8gep51s.d.ts +15 -0
- package/dist/stats.cjs +11 -10
- package/dist/stats.d.cts +3 -2
- package/dist/stats.d.ts +3 -2
- package/dist/stats.js +8 -7
- package/dist/styles.css +2 -2
- package/dist/table-extension-7LkLNK6Q.d.cts +15 -0
- package/dist/table-extension-DEpV0DnP.d.ts +15 -0
- package/dist/{table-extension-v6VB59bF.d.ts → table-labels-Dc-MzU3j.d.cts} +2 -14
- package/dist/{table-extension-BP47hHoz.d.cts → table-labels-Dc-MzU3j.d.ts} +2 -14
- package/dist/table.cjs +26 -25
- package/dist/table.d.cts +2 -1
- package/dist/table.d.ts +2 -1
- package/dist/table.js +7 -6
- package/dist/{to-html-1oD-CDle.d.cts → to-html-C19PbIzh.d.cts} +1 -0
- package/dist/{to-html-CLRBCX0I.d.ts → to-html-CogwrQer.d.ts} +1 -0
- package/dist/{to-markdown-CFPMbbiX.d.cts → to-markdown-C2w7Dzg8.d.cts} +1 -0
- package/dist/{to-markdown-BVOzhgVM.d.ts → to-markdown-DC1EUye5.d.ts} +1 -0
- package/dist/toc-extension-Dvh37bWQ.d.cts +15 -0
- package/dist/toc-extension-SVckrFmb.d.ts +15 -0
- package/dist/toc-labels-B2apPfXG.d.cts +14 -0
- package/dist/toc-labels-B2apPfXG.d.ts +14 -0
- package/dist/toc.cjs +10 -9
- package/dist/toc.d.cts +3 -2
- package/dist/toc.d.ts +3 -2
- package/dist/toc.js +7 -6
- package/dist/{types-DXF9p4qV.d.cts → types-Bzhq5AXj.d.cts} +1 -0
- package/dist/{types-BjLcmV00.d.ts → types-DMuuDBVh.d.ts} +1 -0
- package/dist/view.cjs +4 -4
- package/dist/view.js +2 -2
- package/dist/yjs.cjs +121 -121
- package/dist/yjs.d.cts +2 -2
- package/dist/yjs.d.ts +2 -2
- package/dist/yjs.js +5 -5
- package/package.json +71 -1
- package/dist/chunk-5JEQZIRI.js.map +0 -1
- package/dist/chunk-7GU25Z6L.js.map +0 -1
- package/dist/chunk-BJTOLCRR.js.map +0 -1
- package/dist/chunk-HSLOPJVT.js.map +0 -1
- package/dist/chunk-IJKGF6SC.js.map +0 -1
- package/dist/chunk-MNA7MBCH.js.map +0 -1
- package/dist/chunk-OJ4O6HWC.js.map +0 -1
- package/dist/chunk-PLUMKN4B.js.map +0 -1
- package/dist/chunk-PWUFFHAQ.js.map +0 -1
- package/dist/chunk-RQXJKJ5S.js.map +0 -1
- package/dist/chunk-UZS3TW75.js.map +0 -1
- package/dist/chunk-XFEDJEJF.js.map +0 -1
- package/dist/toc-extension-CI6jNOYl.d.cts +0 -26
- package/dist/toc-extension-CTHWjNJC.d.ts +0 -26
- /package/dist/{chunk-WZA5S5EJ.cjs → chunk-I7X7B3WD.cjs} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -4,192 +4,20 @@ import { C as CodeHighlighter } from './code-highlighter-BQDxhRrv.js';
|
|
|
4
4
|
export { a as CodeToken } from './code-highlighter-BQDxhRrv.js';
|
|
5
5
|
import { Q as QuoinBlock, P as Pos } from './types-CQ8Vw_7N.js';
|
|
6
6
|
export { d as Assoc, c as AtomNode, e as AtomSpec, A as Attrs, B as BlockAttrs, f as BlockContent, g as BlockFlow, h as BlockRangeSelection, i as BlockSpec, C as CodecContext, j as CreatedBlock, k as EngineBlock, E as EngineDoc, I as Inline, l as InlineCodec, m as InlineNode, M as Mark, n as MarkSpec, o as MarkdownExportContext, N as NodeSelection, p as ParseInlineOptions, q as PosMap, S as Schema, b as Selection, r as SerializeInlineOptions, a as Step, s as StepJSON, t as StepResult, T as TextNode, u as TextSelection } from './types-CQ8Vw_7N.js';
|
|
7
|
-
import { E as Extension, a as Editor, c as EditorState, b as Command } from './types-
|
|
8
|
-
export { A as Align, B as BlockStructureOptions, e as BoundCommands, f as Chain, C as CommandFactories, g as CoreCommands, h as CoreExtensionOptions, i as DOMParserLike, D as Decoration, j as EditorOptions, F as FromHTMLOptions, I as InputRule, k as InputRuleContext, l as InputRuleRange, m as InsertTextOptions, K as KeyLike, M as MarkdownOptions, n as PasteRule, P as PluginKey, d as PluginSpec, S as Slice, o as TextStats, T as Transaction, p as TransactionOrigin, q as applyTransaction, r as coreExtensions, s as createEditor, t as createPluginKey, u as createState, v as fromHTML, w as getPluginState, x as insertBlockAfter, y as insertText, z as insertTextWithRules, G as keyName, H as normalizeKey, J as setBlockType, L as toggleMark } from './types-
|
|
9
|
-
import {
|
|
10
|
-
export { AttrsPatch, BlockChange, BlockCodec, BlockDiff, FromMarkdownOptions, InlineChange, SchemaInput, addMarkStep, atom, blockInputRules, blockRangeSelection, coreBlockSpecs, countDoc, countText, createBlockCodec, createSchema, defineExtension, diffBlocks, diffInline, fromMarkdown, insertBlocksStep, joinBlocksStep, markInputRules, moveBlocksStep, nodeSelection, normalizeInline, parseInline, redo, removeBlocksStep, removeMarkStep, replaceBlockStep, replaceDocStep, replaceInlineStep, sanitizeHref, serializeInline, setAttrsStep, setIndentStep, splitBlockStep, stepFromJSON, text, textSelection, toPlainText, typographyRules, undo } from './engine.js';
|
|
7
|
+
import { E as Extension, a as Editor, c as EditorState, b as Command } from './types-DMuuDBVh.js';
|
|
8
|
+
export { A as Align, B as BlockStructureOptions, e as BoundCommands, f as Chain, C as CommandFactories, g as CoreCommands, h as CoreExtensionOptions, i as DOMParserLike, D as Decoration, j as EditorOptions, F as FromHTMLOptions, I as InputRule, k as InputRuleContext, l as InputRuleRange, m as InsertTextOptions, K as KeyLike, M as MarkdownOptions, n as PasteRule, P as PluginKey, d as PluginSpec, S as Slice, o as TextStats, T as Transaction, p as TransactionOrigin, q as applyTransaction, r as coreExtensions, s as createEditor, t as createPluginKey, u as createState, v as fromHTML, w as getPluginState, x as insertBlockAfter, y as insertText, z as insertTextWithRules, G as keyName, H as normalizeKey, J as setBlockType, L as toggleMark } from './types-DMuuDBVh.js';
|
|
9
|
+
import { Q as QuoinLabels, S as SlashGroup } from './labels-BhRJYo46.js';
|
|
11
10
|
import { A as AnyBlockDefinition, U as UploadFn, a as UploadResult } from './registry-DZ8LIGt5.js';
|
|
12
11
|
export { B as BlockDefinition, b as BlockEditorProps, c as BlockPreviewProps, e as blockByType, d as defineBlock, p as paletteBlocks } from './registry-DZ8LIGt5.js';
|
|
13
|
-
import { V as ViewController, R as RenderOptions } from './
|
|
14
|
-
export { A as AtomRenderer, K as KeyInterceptor,
|
|
12
|
+
import { V as ViewController, R as RenderOptions } from './node-reveal-BnFcnHhz.js';
|
|
13
|
+
export { A as Announcer, a as AtomRenderer, E as Engagement, F as FocusTarget, H as HostEntry, b as HostRegistry, K as KeyInterceptor, N as NodeReveal, S as Spoken, c as ViewControllerOptions, W as WidgetRenderer, h as hostKey } from './node-reveal-BnFcnHhz.js';
|
|
15
14
|
import { BlockRenderer } from './headless.js';
|
|
16
|
-
export { BlockLabel, BlockPlaceholder, BlockRenderProps,
|
|
17
|
-
export {
|
|
15
|
+
export { BlockLabel, BlockPlaceholder, BlockRenderProps, CaretPoint, DomMap, DomPoint, EditableRegion, EditableRegionProps, EditorView, EditorViewProps, UseQuoinEditorOptions, caretFromPoint, domMapOf, renderInline, useEditorState, useQuoinEditor, useViewController } from './headless.js';
|
|
16
|
+
export { AttrsPatch, BlockChange, BlockCodec, BlockDiff, FromMarkdownOptions, InlineChange, SchemaInput, addMarkStep, atom, blockInputRules, blockRangeSelection, coreBlockSpecs, countDoc, countText, createBlockCodec, createSchema, defineExtension, diffBlocks, diffInline, fromMarkdown, insertBlocksStep, joinBlocksStep, markInputRules, moveBlocksStep, nodeSelection, normalizeInline, parseInline, redo, removeBlocksStep, removeMarkStep, replaceBlockStep, replaceDocStep, replaceInlineStep, sanitizeHref, serializeInline, setAttrsStep, setIndentStep, splitBlockStep, stepFromJSON, text, textSelection, toPlainText, typographyRules, undo } from './engine.js';
|
|
17
|
+
export { T as ToMarkdownOptions, t as toMarkdown } from './to-markdown-DC1EUye5.js';
|
|
18
|
+
export { P as PALETTE } from './palette-BrX-hEd-.js';
|
|
18
19
|
export { E as EmbedProvider, a as EmbedUrl } from './embed-provider-jXwlRmnp.js';
|
|
19
|
-
export { H as HTMLOptions, t as toHTML } from './to-html-
|
|
20
|
-
|
|
21
|
-
type PaletteName = (typeof PALETTE)[number];
|
|
22
|
-
|
|
23
|
-
type SlashGroup = 'basic' | 'lists' | 'media' | 'advanced' | 'embeds' | 'ai' | 'custom';
|
|
24
|
-
type CalloutTone = 'info' | 'tip' | 'success' | 'warning' | 'danger';
|
|
25
|
-
/** The block types the menus name. Headings are named by `heading`. */
|
|
26
|
-
type BlockName = 'text' | 'bulletedList' | 'numberedList' | 'todoList' | 'quote' | 'callout' | 'toggle' | 'code' | 'divider' | 'image' | 'file';
|
|
27
|
-
/** The slash commands that insert a block, which the menu explains under their names. */
|
|
28
|
-
type SlashBlockCommand = BlockName | 'heading1' | 'heading2' | 'heading3';
|
|
29
|
-
type ModifierKey = 'ctrl' | 'alt' | 'shift';
|
|
30
|
-
/** The keys a shortcut writes out by name rather than by the character they type. */
|
|
31
|
-
type NamedKey = 'escape' | 'tab' | 'enter' | 'space' | 'backspace' | 'delete' | 'f10';
|
|
32
|
-
type ShortcutGroupName = 'text' | 'blocks' | 'selection' | 'navigation' | 'menus';
|
|
33
|
-
/** The rows of the keyboard shortcuts dialog that no other label names. */
|
|
34
|
-
type ShortcutName = 'lineBreak' | 'flipBlock' | 'selectBlock' | 'openBlockEditor' | 'leaveBlockEditor' | 'selectAll' | 'extendUp' | 'extendDown' | 'lineUp' | 'lineDown' | 'leaveEditor' | 'blockMenu' | 'closeMenu' | 'splitBlock' | 'joinAbove' | 'joinBelow' | 'previousBlockEnd' | 'nextBlockStart';
|
|
35
|
-
/** Every string the editor shows or speaks. A label that depends on a value is a function of it. */
|
|
36
|
-
type QuoinLabels = {
|
|
37
|
-
document: string;
|
|
38
|
-
editorHint: string;
|
|
39
|
-
paragraph: string;
|
|
40
|
-
heading: (level: number) => string;
|
|
41
|
-
bulletItem: string;
|
|
42
|
-
numberedItem: (n: number) => string;
|
|
43
|
-
task: string;
|
|
44
|
-
quote: string;
|
|
45
|
-
/** The name of a callout's text, given the name of its tone from `calloutTones`, which it takes as written. */
|
|
46
|
-
callout: (tone: string) => string;
|
|
47
|
-
/** The name of each tone, on its chip and in its menus as inside the name of a callout's text. */
|
|
48
|
-
calloutTones: Record<CalloutTone, string>;
|
|
49
|
-
calloutIcon: string;
|
|
50
|
-
/** The name of the button that shows a callout's tone and opens the menu of tones, given the tone's name. */
|
|
51
|
-
calloutToneMenu: (tone: string) => string;
|
|
52
|
-
toggle: string;
|
|
53
|
-
/** The name of a toggle's chevron, given how many blocks the closed toggle hides, 0 while it is open. */
|
|
54
|
-
toggleButton: (hidden: number) => string;
|
|
55
|
-
placeholderEmpty: string;
|
|
56
|
-
placeholderHeading: (level: number) => string;
|
|
57
|
-
placeholderList: string;
|
|
58
|
-
placeholderQuote: string;
|
|
59
|
-
blockMenu: (type: string) => string;
|
|
60
|
-
blockNames: Record<BlockName, string>;
|
|
61
|
-
turnInto: string;
|
|
62
|
-
color: string;
|
|
63
|
-
textColor: string;
|
|
64
|
-
backgroundColor: string;
|
|
65
|
-
/** The submenus of a callout's block menu that set its tone and its icon. */
|
|
66
|
-
tone: string;
|
|
67
|
-
icon: string;
|
|
68
|
-
duplicate: string;
|
|
69
|
-
copy: string;
|
|
70
|
-
copyLink: string;
|
|
71
|
-
copied: string;
|
|
72
|
-
moveUp: string;
|
|
73
|
-
moveDown: string;
|
|
74
|
-
delete: string;
|
|
75
|
-
askAi: string;
|
|
76
|
-
addBelow: string;
|
|
77
|
-
dragHandle: string;
|
|
78
|
-
slashMenu: string;
|
|
79
|
-
noResults: string;
|
|
80
|
-
/** What the open slash menu says once its list settles, given how many commands match. */
|
|
81
|
-
resultCount: (n: number) => string;
|
|
82
|
-
slashDescriptions: Record<SlashBlockCommand, string>;
|
|
83
|
-
groups: Record<SlashGroup, string>;
|
|
84
|
-
bold: string;
|
|
85
|
-
italic: string;
|
|
86
|
-
underline: string;
|
|
87
|
-
strike: string;
|
|
88
|
-
code: string;
|
|
89
|
-
link: string;
|
|
90
|
-
highlight: string;
|
|
91
|
-
align: string;
|
|
92
|
-
alignLeft: string;
|
|
93
|
-
alignCenter: string;
|
|
94
|
-
alignRight: string;
|
|
95
|
-
alignJustify: string;
|
|
96
|
-
subscript: string;
|
|
97
|
-
superscript: string;
|
|
98
|
-
comment: string;
|
|
99
|
-
linkUrl: string;
|
|
100
|
-
linkApply: string;
|
|
101
|
-
linkRemove: string;
|
|
102
|
-
linkOpen: string;
|
|
103
|
-
linkEdit: string;
|
|
104
|
-
invalidLink: string;
|
|
105
|
-
colors: Record<PaletteName, string>;
|
|
106
|
-
blockMoved: (position: number, total: number) => string;
|
|
107
|
-
blockInserted: (position: number, total: number) => string;
|
|
108
|
-
blockDeleted: (n: number) => string;
|
|
109
|
-
blocksSelected: (n: number) => string;
|
|
110
|
-
/** How to bring deleted blocks back, given the platform's undo shortcut. */
|
|
111
|
-
undoHint: (shortcut: string) => string;
|
|
112
|
-
shortcuts: string;
|
|
113
|
-
shortcutGroupNames: Record<ShortcutGroupName, string>;
|
|
114
|
-
shortcutNames: Record<ShortcutName, string>;
|
|
115
|
-
/** Two keys pressed one after the other. */
|
|
116
|
-
keySequence: (first: string, then: string) => string;
|
|
117
|
-
/** Two shortcuts that do the same thing. */
|
|
118
|
-
keyAlternative: (first: string, other: string) => string;
|
|
119
|
-
/** The modifier keys a shortcut hint names away from a Mac, where it draws their symbols instead. */
|
|
120
|
-
keyNames: Record<ModifierKey, string>;
|
|
121
|
-
namedKeys: Record<NamedKey, string>;
|
|
122
|
-
formattingToolbar: string;
|
|
123
|
-
mobileToolbar: string;
|
|
124
|
-
indent: string;
|
|
125
|
-
outdent: string;
|
|
126
|
-
undo: string;
|
|
127
|
-
redo: string;
|
|
128
|
-
close: string;
|
|
129
|
-
selectedContent: string;
|
|
130
|
-
editBlock: (label: string) => string;
|
|
131
|
-
unsupportedBlock: string;
|
|
132
|
-
/** Optional so a translation written for 1.0 still compiles; English where it is missing. */
|
|
133
|
-
blockError?: string;
|
|
134
|
-
uploading: string;
|
|
135
|
-
uploaded: (name: string) => string;
|
|
136
|
-
/** What an upload field shows when the host's upload fails without a message of its own. */
|
|
137
|
-
uploadFailed: string;
|
|
138
|
-
/** What an upload field shows in place of working when the canvas was given no upload function. */
|
|
139
|
-
uploadsUnavailable: string;
|
|
140
|
-
/** An empty image block: its upload button, the link it can embed instead and what can be dropped or pasted on it. */
|
|
141
|
-
uploadImage: string;
|
|
142
|
-
embedLink: string;
|
|
143
|
-
imageLink: string;
|
|
144
|
-
dropImage: string;
|
|
145
|
-
/** An image block: its caption, its toolbar, the handles of its width with their value, and the toolbar's buttons. */
|
|
146
|
-
imageCaption: string;
|
|
147
|
-
addCaption: string;
|
|
148
|
-
imageTools: string;
|
|
149
|
-
resizeFromLeft: string;
|
|
150
|
-
resizeFromRight: string;
|
|
151
|
-
widthValue: (percent: number) => string;
|
|
152
|
-
replaceImage: string;
|
|
153
|
-
download: string;
|
|
154
|
-
/** The alt text of an image: its field, what the field asks for, its button, and the name of an image without one. */
|
|
155
|
-
altText: string;
|
|
156
|
-
altTextHint: string;
|
|
157
|
-
save: string;
|
|
158
|
-
imageNoAlt: string;
|
|
159
|
-
/**
|
|
160
|
-
* The checkbox of the alt text popover that marks an image as deliberately without a description, the visible text of
|
|
161
|
-
* the badge an editable canvas draws over an image that has neither, and the badge's name, which starts with that
|
|
162
|
-
* visible text and then says what it does. A translation that sets `noAltBadge` should set `addAltText` too; with `noAltBadge` alone the
|
|
163
|
-
* badge is named by its visible text. Optional like `blockError`.
|
|
164
|
-
*/
|
|
165
|
-
decorativeImage?: string;
|
|
166
|
-
noAltBadge?: string;
|
|
167
|
-
addAltText?: string;
|
|
168
|
-
/** An empty file block: its upload button and what can be dropped or pasted on it. */
|
|
169
|
-
uploadFile: string;
|
|
170
|
-
dropFile: string;
|
|
171
|
-
/** A file block: its toolbar and the toolbar's replace button. */
|
|
172
|
-
fileTools: string;
|
|
173
|
-
replaceFile: string;
|
|
174
|
-
/** The name of a file's download link, given the file's name. It contains `download`, the link's visible text. */
|
|
175
|
-
downloadFile: (name: string) => string;
|
|
176
|
-
/** The size of a file, given in bytes. */
|
|
177
|
-
fileSize: (bytes: number) => string;
|
|
178
|
-
/** The name of a file block selected as a whole, given the file's name. */
|
|
179
|
-
fileBlockName: (name: string) => string;
|
|
180
|
-
/** A code block: its code, its language, the name of a code in no language, and its copy button. */
|
|
181
|
-
codeText: string;
|
|
182
|
-
/** The name of a code block selected as a whole, given the name of its language. */
|
|
183
|
-
codeBlockName: (language: string) => string;
|
|
184
|
-
codeLanguage: string;
|
|
185
|
-
plainText: string;
|
|
186
|
-
copyCode: string;
|
|
187
|
-
/** What the preview of a block without content says. */
|
|
188
|
-
emptyImage: string;
|
|
189
|
-
emptyFile: string;
|
|
190
|
-
emptyMarkdown: string;
|
|
191
|
-
emptyCallout: string;
|
|
192
|
-
};
|
|
20
|
+
export { H as HTMLOptions, t as toHTML } from './to-html-CogwrQer.js';
|
|
193
21
|
|
|
194
22
|
type BlockCanvasProps = {
|
|
195
23
|
/**
|
|
@@ -250,6 +78,10 @@ type QuoinEditorHandle = {
|
|
|
250
78
|
}): string;
|
|
251
79
|
};
|
|
252
80
|
|
|
81
|
+
/**
|
|
82
|
+
* The editor with the whole canvas UI: the slash menu, the bubble toolbar, the block menu, drag handles, the mobile
|
|
83
|
+
* tools and the shortcuts dialog. The document is controlled, `blocks` in and `onChange` out, as an input's value is.
|
|
84
|
+
*/
|
|
253
85
|
declare const BlockCanvas: react.ForwardRefExoticComponent<BlockCanvasProps & react.RefAttributes<QuoinEditorHandle>>;
|
|
254
86
|
|
|
255
87
|
/** The block types Quoin ships with. Spread them alongside your own definitions. */
|
|
@@ -372,11 +204,12 @@ declare function QuoinProvider({ value, children, }: {
|
|
|
372
204
|
/** Reads the canvas configuration. Throws outside a QuoinProvider rather than returning a silent default. */
|
|
373
205
|
declare function useQuoin(): QuoinConfig;
|
|
374
206
|
|
|
207
|
+
/** Every string the canvas shows or speaks, in English. Pass `labels` to the canvas to change any of them. */
|
|
375
208
|
declare const englishLabels: Required<QuoinLabels>;
|
|
376
209
|
|
|
377
210
|
/** The English labels with the host's overrides on top. A key the host leaves out, or passes as undefined, stays
|
|
378
211
|
* English. */
|
|
379
|
-
declare
|
|
212
|
+
declare const resolveLabels: (overrides?: Partial<QuoinLabels>) => QuoinLabels;
|
|
380
213
|
|
|
381
214
|
type BlockMenuAction = {
|
|
382
215
|
id: string;
|
|
@@ -513,5 +346,5 @@ type UseAutosaveResult = {
|
|
|
513
346
|
*/
|
|
514
347
|
declare function useAutosave<T>({ deps, build, save, debounceMs, maxBackoffMs, maxRetries, isRetryable, flushOnHide, }: UseAutosaveInput<T>): UseAutosaveResult;
|
|
515
348
|
|
|
516
|
-
export { AnyBlockDefinition, BlockCanvas, BlockRenderer, CodeHighlighter, Command, Editor, EditorState, Extension, FilePickerButton,
|
|
517
|
-
export type { AutosaveStatus, BlockCanvasProps, BlockMenuAction, CalloutBlockData, CodeBlockData, CoreBlockData, ExtensionUI, FileBlockData, FilePickerButtonProps, ImageBlockData, MarkdownBlockData, QuoinConfig, QuoinConfigInput, QuoinEditorHandle,
|
|
349
|
+
export { AnyBlockDefinition, BlockCanvas, BlockRenderer, CodeHighlighter, Command, Editor, EditorState, Extension, FilePickerButton, Pos, QuoinBlock, QuoinLabels, QuoinProvider, RenderOptions, SlashGroup, UploadField, UploadFn, UploadResult, ViewController, coreBlocks, englishLabels, formatShortcut, resolveLabels, useAutosave, useLabels, useQuoin };
|
|
350
|
+
export type { AutosaveStatus, BlockCanvasProps, BlockMenuAction, CalloutBlockData, CodeBlockData, CoreBlockData, ExtensionUI, FileBlockData, FilePickerButtonProps, ImageBlockData, MarkdownBlockData, QuoinConfig, QuoinConfigInput, QuoinEditorHandle, ShortcutPlatform, SlashItem, SuggestionRange, ToolbarItem, UploadFieldProps, UseAutosaveInput, UseAutosaveResult };
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { BlockCanvas, FilePickerButton, QuoinProvider, UploadField, coreBlocks, englishLabels, formatShortcut, resolveLabels, useAutosave, useLabels, useQuoin } from './chunk-
|
|
3
|
-
export {
|
|
2
|
+
export { BlockCanvas, FilePickerButton, QuoinProvider, UploadField, coreBlocks, englishLabels, formatShortcut, resolveLabels, useAutosave, useLabels, useQuoin } from './chunk-ZN5DHNSL.js';
|
|
3
|
+
export { EditableRegion, EditorView, ViewController, caretFromPoint, domMapOf, hostKey, renderInline, useEditorState, useQuoinEditor, useViewController } from './chunk-NL5J77VD.js';
|
|
4
|
+
import './chunk-DLQCTGC3.js';
|
|
4
5
|
export { blockByType, defineBlock, paletteBlocks } from './chunk-HDJ653LM.js';
|
|
5
|
-
export { Transaction, addMarkStep, applyTransaction, blockInputRules, blockRangeSelection, coreExtensions, countDoc, countText, createEditor, createPluginKey, createState, defineExtension, fromHTML, getPluginState, insertBlockAfter, insertBlocksStep, insertText, insertTextWithRules, joinBlocksStep, keyName, markInputRules, moveBlocksStep, nodeSelection, normalizeKey, redo, removeBlocksStep, removeMarkStep, replaceBlockStep, replaceDocStep, replaceInlineStep, setAttrsStep, setBlockType, setIndentStep, splitBlockStep, stepFromJSON, textSelection, toHTML, toMarkdown, toPlainText, toggleMark, typographyRules, undo } from './chunk-
|
|
6
|
-
export { diffBlocks, diffInline } from './chunk-
|
|
7
|
-
export { PALETTE, atom, coreBlockSpecs, createBlockCodec, createSchema, fromMarkdown, normalizeInline, parseInline, sanitizeHref, serializeInline, text } from './chunk-
|
|
6
|
+
export { Transaction, addMarkStep, applyTransaction, blockInputRules, blockRangeSelection, coreExtensions, countDoc, countText, createEditor, createPluginKey, createState, defineExtension, fromHTML, getPluginState, insertBlockAfter, insertBlocksStep, insertText, insertTextWithRules, joinBlocksStep, keyName, markInputRules, moveBlocksStep, nodeSelection, normalizeKey, redo, removeBlocksStep, removeMarkStep, replaceBlockStep, replaceDocStep, replaceInlineStep, setAttrsStep, setBlockType, setIndentStep, splitBlockStep, stepFromJSON, textSelection, toHTML, toMarkdown, toPlainText, toggleMark, typographyRules, undo } from './chunk-5RBMZGKV.js';
|
|
7
|
+
export { diffBlocks, diffInline } from './chunk-CSPCDVCT.js';
|
|
8
|
+
export { PALETTE, atom, coreBlockSpecs, createBlockCodec, createSchema, fromMarkdown, normalizeInline, parseInline, sanitizeHref, serializeInline, text } from './chunk-7Y4B7NHO.js';
|
|
8
9
|
//# sourceMappingURL=index.js.map
|
|
9
10
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import { P as PALETTE } from './palette-BrX-hEd-.js';
|
|
2
|
+
|
|
3
|
+
type PaletteName = (typeof PALETTE)[number];
|
|
4
|
+
|
|
5
|
+
type SlashGroup = 'basic' | 'lists' | 'media' | 'advanced' | 'embeds' | 'ai' | 'custom';
|
|
6
|
+
type CalloutTone = 'info' | 'tip' | 'success' | 'warning' | 'danger';
|
|
7
|
+
/** The block types the menus name. Headings are named by `heading`. */
|
|
8
|
+
type BlockName = 'text' | 'bulletedList' | 'numberedList' | 'todoList' | 'quote' | 'callout' | 'toggle' | 'code' | 'divider' | 'image' | 'file';
|
|
9
|
+
/** The slash commands that insert a block, which the menu explains under their names. */
|
|
10
|
+
type SlashBlockCommand = BlockName | 'heading1' | 'heading2' | 'heading3';
|
|
11
|
+
type ModifierKey = 'ctrl' | 'alt' | 'shift';
|
|
12
|
+
/** The keys a shortcut writes out by name rather than by the character they type. */
|
|
13
|
+
type NamedKey = 'escape' | 'tab' | 'enter' | 'space' | 'backspace' | 'delete' | 'f10';
|
|
14
|
+
type ShortcutGroupName = 'text' | 'blocks' | 'selection' | 'navigation' | 'menus';
|
|
15
|
+
/** The rows of the keyboard shortcuts dialog that no other label names. */
|
|
16
|
+
type ShortcutName = 'lineBreak' | 'flipBlock' | 'selectBlock' | 'openBlockEditor' | 'leaveBlockEditor' | 'selectAll' | 'extendUp' | 'extendDown' | 'lineUp' | 'lineDown' | 'leaveEditor' | 'blockMenu' | 'closeMenu' | 'splitBlock' | 'joinAbove' | 'joinBelow' | 'previousBlockEnd' | 'nextBlockStart';
|
|
17
|
+
/** Every string the editor shows or speaks. A label that depends on a value is a function of it. */
|
|
18
|
+
type QuoinLabels = {
|
|
19
|
+
document: string;
|
|
20
|
+
editorHint: string;
|
|
21
|
+
paragraph: string;
|
|
22
|
+
heading: (level: number) => string;
|
|
23
|
+
bulletItem: string;
|
|
24
|
+
numberedItem: (n: number) => string;
|
|
25
|
+
task: string;
|
|
26
|
+
quote: string;
|
|
27
|
+
/** The name of a callout's text, given the name of its tone from `calloutTones`, which it takes as written. */
|
|
28
|
+
callout: (tone: string) => string;
|
|
29
|
+
/** The name of each tone, on its chip and in its menus as inside the name of a callout's text. */
|
|
30
|
+
calloutTones: Record<CalloutTone, string>;
|
|
31
|
+
calloutIcon: string;
|
|
32
|
+
/** The name of the button that shows a callout's tone and opens the menu of tones, given the tone's name. */
|
|
33
|
+
calloutToneMenu: (tone: string) => string;
|
|
34
|
+
toggle: string;
|
|
35
|
+
/** The name of a toggle's chevron, given how many blocks the closed toggle hides, 0 while it is open. */
|
|
36
|
+
toggleButton: (hidden: number) => string;
|
|
37
|
+
placeholderEmpty: string;
|
|
38
|
+
placeholderHeading: (level: number) => string;
|
|
39
|
+
placeholderList: string;
|
|
40
|
+
placeholderQuote: string;
|
|
41
|
+
blockMenu: (type: string) => string;
|
|
42
|
+
blockNames: Record<BlockName, string>;
|
|
43
|
+
turnInto: string;
|
|
44
|
+
color: string;
|
|
45
|
+
textColor: string;
|
|
46
|
+
backgroundColor: string;
|
|
47
|
+
/** The submenus of a callout's block menu that set its tone and its icon. */
|
|
48
|
+
tone: string;
|
|
49
|
+
icon: string;
|
|
50
|
+
duplicate: string;
|
|
51
|
+
copy: string;
|
|
52
|
+
copyLink: string;
|
|
53
|
+
copied: string;
|
|
54
|
+
moveUp: string;
|
|
55
|
+
moveDown: string;
|
|
56
|
+
delete: string;
|
|
57
|
+
askAi: string;
|
|
58
|
+
addBelow: string;
|
|
59
|
+
dragHandle: string;
|
|
60
|
+
slashMenu: string;
|
|
61
|
+
noResults: string;
|
|
62
|
+
/** What the open slash menu says once its list settles, given how many commands match. */
|
|
63
|
+
resultCount: (n: number) => string;
|
|
64
|
+
slashDescriptions: Record<SlashBlockCommand, string>;
|
|
65
|
+
groups: Record<SlashGroup, string>;
|
|
66
|
+
bold: string;
|
|
67
|
+
italic: string;
|
|
68
|
+
underline: string;
|
|
69
|
+
strike: string;
|
|
70
|
+
code: string;
|
|
71
|
+
link: string;
|
|
72
|
+
highlight: string;
|
|
73
|
+
align: string;
|
|
74
|
+
alignLeft: string;
|
|
75
|
+
alignCenter: string;
|
|
76
|
+
alignRight: string;
|
|
77
|
+
alignJustify: string;
|
|
78
|
+
subscript: string;
|
|
79
|
+
superscript: string;
|
|
80
|
+
comment: string;
|
|
81
|
+
linkUrl: string;
|
|
82
|
+
linkApply: string;
|
|
83
|
+
linkRemove: string;
|
|
84
|
+
linkOpen: string;
|
|
85
|
+
linkEdit: string;
|
|
86
|
+
invalidLink: string;
|
|
87
|
+
colors: Record<PaletteName, string>;
|
|
88
|
+
blockMoved: (position: number, total: number) => string;
|
|
89
|
+
blockInserted: (position: number, total: number) => string;
|
|
90
|
+
blockDeleted: (n: number) => string;
|
|
91
|
+
blocksSelected: (n: number) => string;
|
|
92
|
+
/** How to bring deleted blocks back, given the platform's undo shortcut. */
|
|
93
|
+
undoHint: (shortcut: string) => string;
|
|
94
|
+
shortcuts: string;
|
|
95
|
+
shortcutGroupNames: Record<ShortcutGroupName, string>;
|
|
96
|
+
shortcutNames: Record<ShortcutName, string>;
|
|
97
|
+
/** Two keys pressed one after the other. */
|
|
98
|
+
keySequence: (first: string, then: string) => string;
|
|
99
|
+
/** Two shortcuts that do the same thing. */
|
|
100
|
+
keyAlternative: (first: string, other: string) => string;
|
|
101
|
+
/** The modifier keys a shortcut hint names away from a Mac, where it draws their symbols instead. */
|
|
102
|
+
keyNames: Record<ModifierKey, string>;
|
|
103
|
+
namedKeys: Record<NamedKey, string>;
|
|
104
|
+
formattingToolbar: string;
|
|
105
|
+
mobileToolbar: string;
|
|
106
|
+
indent: string;
|
|
107
|
+
outdent: string;
|
|
108
|
+
undo: string;
|
|
109
|
+
redo: string;
|
|
110
|
+
close: string;
|
|
111
|
+
selectedContent: string;
|
|
112
|
+
editBlock: (label: string) => string;
|
|
113
|
+
unsupportedBlock: string;
|
|
114
|
+
/** Optional so a translation written for 1.0 still compiles; English where it is missing. */
|
|
115
|
+
blockError?: string;
|
|
116
|
+
uploading: string;
|
|
117
|
+
uploaded: (name: string) => string;
|
|
118
|
+
/** What an upload field shows when the host's upload fails without a message of its own. */
|
|
119
|
+
uploadFailed: string;
|
|
120
|
+
/** What an upload field shows in place of working when the canvas was given no upload function. */
|
|
121
|
+
uploadsUnavailable: string;
|
|
122
|
+
/** An empty image block: its upload button, the link it can embed instead and what can be dropped or pasted on it. */
|
|
123
|
+
uploadImage: string;
|
|
124
|
+
embedLink: string;
|
|
125
|
+
imageLink: string;
|
|
126
|
+
dropImage: string;
|
|
127
|
+
/** An image block: its caption, its toolbar, the handles of its width with their value, and the toolbar's buttons. */
|
|
128
|
+
imageCaption: string;
|
|
129
|
+
addCaption: string;
|
|
130
|
+
imageTools: string;
|
|
131
|
+
resizeFromLeft: string;
|
|
132
|
+
resizeFromRight: string;
|
|
133
|
+
widthValue: (percent: number) => string;
|
|
134
|
+
replaceImage: string;
|
|
135
|
+
download: string;
|
|
136
|
+
/** The alt text of an image: its field, what the field asks for, its button, and the name of an image without one. */
|
|
137
|
+
altText: string;
|
|
138
|
+
altTextHint: string;
|
|
139
|
+
save: string;
|
|
140
|
+
imageNoAlt: string;
|
|
141
|
+
/**
|
|
142
|
+
* The checkbox of the alt text popover that marks an image as deliberately without a description, the visible text of
|
|
143
|
+
* the badge an editable canvas draws over an image that has neither, and the badge's name, which starts with that
|
|
144
|
+
* visible text and then says what it does. A translation that sets `noAltBadge` should set `addAltText` too; with `noAltBadge` alone the
|
|
145
|
+
* badge is named by its visible text. Optional like `blockError`.
|
|
146
|
+
*/
|
|
147
|
+
decorativeImage?: string;
|
|
148
|
+
noAltBadge?: string;
|
|
149
|
+
addAltText?: string;
|
|
150
|
+
/** An empty file block: its upload button and what can be dropped or pasted on it. */
|
|
151
|
+
uploadFile: string;
|
|
152
|
+
dropFile: string;
|
|
153
|
+
/** A file block: its toolbar and the toolbar's replace button. */
|
|
154
|
+
fileTools: string;
|
|
155
|
+
replaceFile: string;
|
|
156
|
+
/** The name of a file's download link, given the file's name. It contains `download`, the link's visible text. */
|
|
157
|
+
downloadFile: (name: string) => string;
|
|
158
|
+
/** The size of a file, given in bytes. */
|
|
159
|
+
fileSize: (bytes: number) => string;
|
|
160
|
+
/** The name of a file block selected as a whole, given the file's name. */
|
|
161
|
+
fileBlockName: (name: string) => string;
|
|
162
|
+
/** A code block: its code, its language, the name of a code in no language, and its copy button. */
|
|
163
|
+
codeText: string;
|
|
164
|
+
/** The name of a code block selected as a whole, given the name of its language. */
|
|
165
|
+
codeBlockName: (language: string) => string;
|
|
166
|
+
codeLanguage: string;
|
|
167
|
+
plainText: string;
|
|
168
|
+
copyCode: string;
|
|
169
|
+
/** What the preview of a block without content says. */
|
|
170
|
+
emptyImage: string;
|
|
171
|
+
emptyFile: string;
|
|
172
|
+
emptyMarkdown: string;
|
|
173
|
+
emptyCallout: string;
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
export type { QuoinLabels as Q, SlashGroup as S };
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import { P as PALETTE } from './palette-BrX-hEd-.cjs';
|
|
2
|
+
|
|
3
|
+
type PaletteName = (typeof PALETTE)[number];
|
|
4
|
+
|
|
5
|
+
type SlashGroup = 'basic' | 'lists' | 'media' | 'advanced' | 'embeds' | 'ai' | 'custom';
|
|
6
|
+
type CalloutTone = 'info' | 'tip' | 'success' | 'warning' | 'danger';
|
|
7
|
+
/** The block types the menus name. Headings are named by `heading`. */
|
|
8
|
+
type BlockName = 'text' | 'bulletedList' | 'numberedList' | 'todoList' | 'quote' | 'callout' | 'toggle' | 'code' | 'divider' | 'image' | 'file';
|
|
9
|
+
/** The slash commands that insert a block, which the menu explains under their names. */
|
|
10
|
+
type SlashBlockCommand = BlockName | 'heading1' | 'heading2' | 'heading3';
|
|
11
|
+
type ModifierKey = 'ctrl' | 'alt' | 'shift';
|
|
12
|
+
/** The keys a shortcut writes out by name rather than by the character they type. */
|
|
13
|
+
type NamedKey = 'escape' | 'tab' | 'enter' | 'space' | 'backspace' | 'delete' | 'f10';
|
|
14
|
+
type ShortcutGroupName = 'text' | 'blocks' | 'selection' | 'navigation' | 'menus';
|
|
15
|
+
/** The rows of the keyboard shortcuts dialog that no other label names. */
|
|
16
|
+
type ShortcutName = 'lineBreak' | 'flipBlock' | 'selectBlock' | 'openBlockEditor' | 'leaveBlockEditor' | 'selectAll' | 'extendUp' | 'extendDown' | 'lineUp' | 'lineDown' | 'leaveEditor' | 'blockMenu' | 'closeMenu' | 'splitBlock' | 'joinAbove' | 'joinBelow' | 'previousBlockEnd' | 'nextBlockStart';
|
|
17
|
+
/** Every string the editor shows or speaks. A label that depends on a value is a function of it. */
|
|
18
|
+
type QuoinLabels = {
|
|
19
|
+
document: string;
|
|
20
|
+
editorHint: string;
|
|
21
|
+
paragraph: string;
|
|
22
|
+
heading: (level: number) => string;
|
|
23
|
+
bulletItem: string;
|
|
24
|
+
numberedItem: (n: number) => string;
|
|
25
|
+
task: string;
|
|
26
|
+
quote: string;
|
|
27
|
+
/** The name of a callout's text, given the name of its tone from `calloutTones`, which it takes as written. */
|
|
28
|
+
callout: (tone: string) => string;
|
|
29
|
+
/** The name of each tone, on its chip and in its menus as inside the name of a callout's text. */
|
|
30
|
+
calloutTones: Record<CalloutTone, string>;
|
|
31
|
+
calloutIcon: string;
|
|
32
|
+
/** The name of the button that shows a callout's tone and opens the menu of tones, given the tone's name. */
|
|
33
|
+
calloutToneMenu: (tone: string) => string;
|
|
34
|
+
toggle: string;
|
|
35
|
+
/** The name of a toggle's chevron, given how many blocks the closed toggle hides, 0 while it is open. */
|
|
36
|
+
toggleButton: (hidden: number) => string;
|
|
37
|
+
placeholderEmpty: string;
|
|
38
|
+
placeholderHeading: (level: number) => string;
|
|
39
|
+
placeholderList: string;
|
|
40
|
+
placeholderQuote: string;
|
|
41
|
+
blockMenu: (type: string) => string;
|
|
42
|
+
blockNames: Record<BlockName, string>;
|
|
43
|
+
turnInto: string;
|
|
44
|
+
color: string;
|
|
45
|
+
textColor: string;
|
|
46
|
+
backgroundColor: string;
|
|
47
|
+
/** The submenus of a callout's block menu that set its tone and its icon. */
|
|
48
|
+
tone: string;
|
|
49
|
+
icon: string;
|
|
50
|
+
duplicate: string;
|
|
51
|
+
copy: string;
|
|
52
|
+
copyLink: string;
|
|
53
|
+
copied: string;
|
|
54
|
+
moveUp: string;
|
|
55
|
+
moveDown: string;
|
|
56
|
+
delete: string;
|
|
57
|
+
askAi: string;
|
|
58
|
+
addBelow: string;
|
|
59
|
+
dragHandle: string;
|
|
60
|
+
slashMenu: string;
|
|
61
|
+
noResults: string;
|
|
62
|
+
/** What the open slash menu says once its list settles, given how many commands match. */
|
|
63
|
+
resultCount: (n: number) => string;
|
|
64
|
+
slashDescriptions: Record<SlashBlockCommand, string>;
|
|
65
|
+
groups: Record<SlashGroup, string>;
|
|
66
|
+
bold: string;
|
|
67
|
+
italic: string;
|
|
68
|
+
underline: string;
|
|
69
|
+
strike: string;
|
|
70
|
+
code: string;
|
|
71
|
+
link: string;
|
|
72
|
+
highlight: string;
|
|
73
|
+
align: string;
|
|
74
|
+
alignLeft: string;
|
|
75
|
+
alignCenter: string;
|
|
76
|
+
alignRight: string;
|
|
77
|
+
alignJustify: string;
|
|
78
|
+
subscript: string;
|
|
79
|
+
superscript: string;
|
|
80
|
+
comment: string;
|
|
81
|
+
linkUrl: string;
|
|
82
|
+
linkApply: string;
|
|
83
|
+
linkRemove: string;
|
|
84
|
+
linkOpen: string;
|
|
85
|
+
linkEdit: string;
|
|
86
|
+
invalidLink: string;
|
|
87
|
+
colors: Record<PaletteName, string>;
|
|
88
|
+
blockMoved: (position: number, total: number) => string;
|
|
89
|
+
blockInserted: (position: number, total: number) => string;
|
|
90
|
+
blockDeleted: (n: number) => string;
|
|
91
|
+
blocksSelected: (n: number) => string;
|
|
92
|
+
/** How to bring deleted blocks back, given the platform's undo shortcut. */
|
|
93
|
+
undoHint: (shortcut: string) => string;
|
|
94
|
+
shortcuts: string;
|
|
95
|
+
shortcutGroupNames: Record<ShortcutGroupName, string>;
|
|
96
|
+
shortcutNames: Record<ShortcutName, string>;
|
|
97
|
+
/** Two keys pressed one after the other. */
|
|
98
|
+
keySequence: (first: string, then: string) => string;
|
|
99
|
+
/** Two shortcuts that do the same thing. */
|
|
100
|
+
keyAlternative: (first: string, other: string) => string;
|
|
101
|
+
/** The modifier keys a shortcut hint names away from a Mac, where it draws their symbols instead. */
|
|
102
|
+
keyNames: Record<ModifierKey, string>;
|
|
103
|
+
namedKeys: Record<NamedKey, string>;
|
|
104
|
+
formattingToolbar: string;
|
|
105
|
+
mobileToolbar: string;
|
|
106
|
+
indent: string;
|
|
107
|
+
outdent: string;
|
|
108
|
+
undo: string;
|
|
109
|
+
redo: string;
|
|
110
|
+
close: string;
|
|
111
|
+
selectedContent: string;
|
|
112
|
+
editBlock: (label: string) => string;
|
|
113
|
+
unsupportedBlock: string;
|
|
114
|
+
/** Optional so a translation written for 1.0 still compiles; English where it is missing. */
|
|
115
|
+
blockError?: string;
|
|
116
|
+
uploading: string;
|
|
117
|
+
uploaded: (name: string) => string;
|
|
118
|
+
/** What an upload field shows when the host's upload fails without a message of its own. */
|
|
119
|
+
uploadFailed: string;
|
|
120
|
+
/** What an upload field shows in place of working when the canvas was given no upload function. */
|
|
121
|
+
uploadsUnavailable: string;
|
|
122
|
+
/** An empty image block: its upload button, the link it can embed instead and what can be dropped or pasted on it. */
|
|
123
|
+
uploadImage: string;
|
|
124
|
+
embedLink: string;
|
|
125
|
+
imageLink: string;
|
|
126
|
+
dropImage: string;
|
|
127
|
+
/** An image block: its caption, its toolbar, the handles of its width with their value, and the toolbar's buttons. */
|
|
128
|
+
imageCaption: string;
|
|
129
|
+
addCaption: string;
|
|
130
|
+
imageTools: string;
|
|
131
|
+
resizeFromLeft: string;
|
|
132
|
+
resizeFromRight: string;
|
|
133
|
+
widthValue: (percent: number) => string;
|
|
134
|
+
replaceImage: string;
|
|
135
|
+
download: string;
|
|
136
|
+
/** The alt text of an image: its field, what the field asks for, its button, and the name of an image without one. */
|
|
137
|
+
altText: string;
|
|
138
|
+
altTextHint: string;
|
|
139
|
+
save: string;
|
|
140
|
+
imageNoAlt: string;
|
|
141
|
+
/**
|
|
142
|
+
* The checkbox of the alt text popover that marks an image as deliberately without a description, the visible text of
|
|
143
|
+
* the badge an editable canvas draws over an image that has neither, and the badge's name, which starts with that
|
|
144
|
+
* visible text and then says what it does. A translation that sets `noAltBadge` should set `addAltText` too; with `noAltBadge` alone the
|
|
145
|
+
* badge is named by its visible text. Optional like `blockError`.
|
|
146
|
+
*/
|
|
147
|
+
decorativeImage?: string;
|
|
148
|
+
noAltBadge?: string;
|
|
149
|
+
addAltText?: string;
|
|
150
|
+
/** An empty file block: its upload button and what can be dropped or pasted on it. */
|
|
151
|
+
uploadFile: string;
|
|
152
|
+
dropFile: string;
|
|
153
|
+
/** A file block: its toolbar and the toolbar's replace button. */
|
|
154
|
+
fileTools: string;
|
|
155
|
+
replaceFile: string;
|
|
156
|
+
/** The name of a file's download link, given the file's name. It contains `download`, the link's visible text. */
|
|
157
|
+
downloadFile: (name: string) => string;
|
|
158
|
+
/** The size of a file, given in bytes. */
|
|
159
|
+
fileSize: (bytes: number) => string;
|
|
160
|
+
/** The name of a file block selected as a whole, given the file's name. */
|
|
161
|
+
fileBlockName: (name: string) => string;
|
|
162
|
+
/** A code block: its code, its language, the name of a code in no language, and its copy button. */
|
|
163
|
+
codeText: string;
|
|
164
|
+
/** The name of a code block selected as a whole, given the name of its language. */
|
|
165
|
+
codeBlockName: (language: string) => string;
|
|
166
|
+
codeLanguage: string;
|
|
167
|
+
plainText: string;
|
|
168
|
+
copyCode: string;
|
|
169
|
+
/** What the preview of a block without content says. */
|
|
170
|
+
emptyImage: string;
|
|
171
|
+
emptyFile: string;
|
|
172
|
+
emptyMarkdown: string;
|
|
173
|
+
emptyCallout: string;
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
export type { QuoinLabels as Q, SlashGroup as S };
|