@jvs-milkdown/crepe 1.2.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/lib/cjs/builder.js +55 -2
  2. package/lib/cjs/builder.js.map +1 -1
  3. package/lib/cjs/feature/block-edit/index.js +73 -5
  4. package/lib/cjs/feature/block-edit/index.js.map +1 -1
  5. package/lib/cjs/feature/code-mirror/index.js +65 -3
  6. package/lib/cjs/feature/code-mirror/index.js.map +1 -1
  7. package/lib/cjs/feature/cursor/index.js +55 -2
  8. package/lib/cjs/feature/cursor/index.js.map +1 -1
  9. package/lib/cjs/feature/image-block/index.js +76 -8
  10. package/lib/cjs/feature/image-block/index.js.map +1 -1
  11. package/lib/cjs/feature/latex/index.js +55 -2
  12. package/lib/cjs/feature/latex/index.js.map +1 -1
  13. package/lib/cjs/feature/link-tooltip/index.js +55 -2
  14. package/lib/cjs/feature/link-tooltip/index.js.map +1 -1
  15. package/lib/cjs/feature/list-item/index.js +55 -2
  16. package/lib/cjs/feature/list-item/index.js.map +1 -1
  17. package/lib/cjs/feature/placeholder/index.js +55 -2
  18. package/lib/cjs/feature/placeholder/index.js.map +1 -1
  19. package/lib/cjs/feature/table/index.js +55 -2
  20. package/lib/cjs/feature/table/index.js.map +1 -1
  21. package/lib/cjs/feature/toolbar/index.js +73 -5
  22. package/lib/cjs/feature/toolbar/index.js.map +1 -1
  23. package/lib/cjs/index.js +451 -30
  24. package/lib/cjs/index.js.map +1 -1
  25. package/lib/esm/builder.js +55 -2
  26. package/lib/esm/builder.js.map +1 -1
  27. package/lib/esm/feature/block-edit/index.js +73 -5
  28. package/lib/esm/feature/block-edit/index.js.map +1 -1
  29. package/lib/esm/feature/code-mirror/index.js +65 -3
  30. package/lib/esm/feature/code-mirror/index.js.map +1 -1
  31. package/lib/esm/feature/cursor/index.js +55 -2
  32. package/lib/esm/feature/cursor/index.js.map +1 -1
  33. package/lib/esm/feature/image-block/index.js +76 -8
  34. package/lib/esm/feature/image-block/index.js.map +1 -1
  35. package/lib/esm/feature/latex/index.js +55 -2
  36. package/lib/esm/feature/latex/index.js.map +1 -1
  37. package/lib/esm/feature/link-tooltip/index.js +55 -2
  38. package/lib/esm/feature/link-tooltip/index.js.map +1 -1
  39. package/lib/esm/feature/list-item/index.js +55 -2
  40. package/lib/esm/feature/list-item/index.js.map +1 -1
  41. package/lib/esm/feature/placeholder/index.js +55 -2
  42. package/lib/esm/feature/placeholder/index.js.map +1 -1
  43. package/lib/esm/feature/table/index.js +55 -2
  44. package/lib/esm/feature/table/index.js.map +1 -1
  45. package/lib/esm/feature/toolbar/index.js +73 -5
  46. package/lib/esm/feature/toolbar/index.js.map +1 -1
  47. package/lib/esm/index.js +452 -31
  48. package/lib/esm/index.js.map +1 -1
  49. package/lib/theme/common/code-mirror.css +13 -0
  50. package/lib/theme/common/image-block.css +321 -22
  51. package/lib/theme/common/reset.css +3 -0
  52. package/lib/theme/common/toolbar.css +27 -2
  53. package/lib/tsconfig.tsbuildinfo +1 -1
  54. package/package.json +4 -4
  55. package/src/core/locale.ts +55 -0
  56. package/src/feature/block-edit/menu/config.ts +19 -3
  57. package/src/feature/code-mirror/index.ts +3 -0
  58. package/src/feature/fixed-toolbar/component.tsx +31 -2
  59. package/src/feature/fixed-toolbar/config.ts +18 -3
  60. package/src/feature/fixed-toolbar/document-header.tsx +8 -4
  61. package/src/feature/fixed-toolbar/index.ts +18 -1
  62. package/src/feature/fixed-toolbar/menu-bar.tsx +83 -2
  63. package/src/feature/fixed-toolbar/shortcut-help-modal.tsx +244 -0
  64. package/src/feature/fixed-toolbar/view-menu-state.ts +9 -0
  65. package/src/feature/image-block/index.ts +11 -1
  66. package/src/icons/border.ts +5 -0
  67. package/src/icons/close.ts +3 -0
  68. package/src/icons/crop.ts +6 -0
  69. package/src/icons/index.ts +5 -0
  70. package/src/icons/keyboard.ts +3 -0
  71. package/src/icons/word-wrap.ts +6 -0
  72. package/src/theme/common/code-mirror.css +13 -0
  73. package/src/theme/common/image-block.css +364 -23
  74. package/src/theme/common/reset.css +3 -0
  75. package/src/theme/common/toolbar.css +30 -2
package/lib/cjs/index.js CHANGED
@@ -18,6 +18,7 @@ var utils = require('@jvs-milkdown/kit/utils');
18
18
  var unistUtilVisit = require('unist-util-visit');
19
19
  var imageBlock$1 = require('@jvs-milkdown/kit/component/image-block');
20
20
  var commands = require('@jvs-milkdown/kit/prose/commands');
21
+ var schemaList = require('@jvs-milkdown/kit/prose/schema-list');
21
22
  var katex = require('katex');
22
23
  var commands$1 = require('@codemirror/commands');
23
24
  var view = require('@codemirror/view');
@@ -216,6 +217,10 @@ const clearIcon = `
216
217
  </svg>
217
218
  `;
218
219
 
220
+ const closeIcon = `
221
+ <svg viewBox="0 0 1024 1024" width="20" height="20"><path d="M619.52 544.448l324.672-324.928a53.632 53.632 0 0 0 0-75.776 53.376 53.376 0 0 0-75.712 0L543.872 468.672l-324.48-324.928a53.376 53.376 0 0 0-75.712 0 53.632 53.632 0 0 0 0 75.776l324.48 324.8-324.48 324.928a53.632 53.632 0 0 0 75.776 75.776l324.416-324.8 324.48 324.8a53.184 53.184 0 0 0 37.952 15.744 53.696 53.696 0 0 0 37.76-91.52l-324.48-324.8z" fill="#6F7588"></path></svg>
222
+ `;
223
+
219
224
  const codeIcon = `
220
225
  <svg viewBox="0 0 1024 1024" width="24" height="24">
221
226
  <path d="M64 830.848V193.152q0-53.504 37.76-91.328Q139.712 64 193.216 64h637.696q53.504 0 91.328 37.76 37.824 37.888 37.824 91.392v637.696q0 53.504-37.76 91.328-37.888 37.824-91.392 37.824H193.152q-53.504 0-91.328-37.76Q64 884.288 64 830.784z m94.72 0q0 34.432 34.432 34.432h637.696q34.432 0 34.432-34.432V193.152q0-34.432-34.432-34.432H193.152q-34.432 0-34.432 34.432v637.696zM278.144 432q-6.592-6.592-10.24-15.296-3.584-8.704-3.584-18.176 0-4.608 0.896-9.216t2.688-8.832q1.792-4.288 4.416-8.192 2.56-3.904 5.824-7.232 3.392-3.2 7.232-5.888 3.84-2.56 8.192-4.352 4.224-1.792 8.896-2.688 4.544-0.96 9.216-0.96 9.408 0 18.112 3.584 8.704 3.648 15.36 10.304L491.968 512q6.72 6.656 10.24 15.36 3.648 8.64 3.648 18.112 0 9.408-3.584 18.112-3.584 8.704-10.24 15.36L345.216 725.76q-6.72 6.72-15.36 10.304-8.768 3.584-18.24 3.584-4.608 0-9.216-0.896-4.48-0.896-8.832-2.688-4.288-1.728-8.192-4.416-3.84-2.56-7.168-5.888-3.328-3.264-5.888-7.104-2.624-3.904-4.416-8.192-1.792-4.288-2.688-8.96-0.96-4.48-0.96-9.216 0-9.408 3.648-18.112 3.584-8.64 10.24-15.36L391.68 545.408 278.144 432z m440.832 299.2H585.472q-4.672 0-9.28-0.896-4.544-0.832-8.832-2.688-4.352-1.792-8.256-4.352-3.84-2.56-7.104-5.952-3.264-3.2-5.952-7.04-2.56-3.968-4.352-8.256-1.728-4.352-2.688-8.896-0.896-4.544-0.896-9.28 0-4.608 0.896-9.216 0.96-4.544 2.688-8.832 1.792-4.352 4.352-8.32 2.688-3.84 5.952-7.04 3.2-3.328 7.168-5.952 3.904-2.56 8.192-4.352 4.288-1.792 8.832-2.688 4.608-0.96 9.28-0.96h133.504q4.736 0 9.28 0.96 4.608 0.896 8.96 2.688 4.224 1.792 8.128 4.352 3.84 2.624 7.104 5.888 3.392 3.328 5.952 7.232 2.624 3.904 4.416 8.192 1.792 4.288 2.624 8.832 0.896 4.608 0.896 9.216 0 4.736-0.896 9.28-0.832 4.608-2.624 8.96-1.792 4.224-4.48 8.128-2.56 3.84-5.888 7.104-3.2 3.392-7.04 5.952-3.968 2.56-8.256 4.352-4.352 1.856-8.896 2.688-4.544 0.896-9.28 0.896z" fill="#363B4C" p-id="16577"></path></svg>
@@ -612,6 +617,30 @@ const splitCellIcon = `
612
617
  </svg>
613
618
  `;
614
619
 
620
+ const keyboardIcon = `
621
+ <svg t="1778036070440" class="icon" viewBox="0 0 1024 1024" width="20" height="20"><path d="M934.4 190.08c0-23.68-18.048-42.88-40.192-42.88H129.856c-22.208 0-40.256 19.2-40.256 42.88v643.84c0 23.68 17.984 42.88 40.32 42.88h764.288c22.144 0 40.128-19.2 40.192-42.88V190.08z m-764.352 43.008h683.968v558.016H170.048V233.088z m603.456 343.296c11.072 0 20.16 9.728 20.16 21.44v42.944c0 11.84-9.088 21.44-20.16 21.44H250.56a20.8 20.8 0 0 1-20.16-21.44v-42.88c0-11.904 9.088-21.504 20.16-21.504h522.88z m-422.4-193.088a20.8 20.8 0 0 0-20.096-21.44H250.56a20.8 20.8 0 0 0-20.16 21.44v42.88c0 11.904 9.088 21.504 20.16 21.504h80.448c11.072 0 20.096-9.728 20.096-21.44v-42.944zM512 361.856c11.136 0 20.096 9.6 20.096 21.44v42.88c0 11.84-8.96 21.504-20.096 21.504H431.616a20.8 20.8 0 0 1-20.16-21.44v-42.944c0-11.84 9.024-21.44 20.16-21.44H512z m281.6 21.44a20.8 20.8 0 0 0-20.096-21.44H612.608a20.8 20.8 0 0 0-20.16 21.44v42.88c0 11.904 9.088 21.504 20.16 21.504h160.896a20.928 20.928 0 0 0 20.16-21.44v-42.944z" fill="#363B4C" p-id="13200"></path></svg>
622
+ `;
623
+
624
+ const wordWrapIcon = `
625
+ <svg viewBox="0 0 1024 1024" height="24px"
626
+ width="24px">
627
+ <path d="M128 850.88V173.12q0-4.48 0.896-8.832 0.832-4.352 2.56-8.448 1.664-4.096 4.16-7.808 2.432-3.648 5.568-6.848 3.2-3.136 6.848-5.568 3.712-2.496 7.808-4.16 4.096-1.728 8.448-2.56Q168.704 128 173.12 128q4.48 0 8.832 0.896 4.352 0.832 8.448 2.56 4.096 1.664 7.808 4.16 3.648 2.432 6.848 5.568 3.136 3.2 5.568 6.848 2.496 3.712 4.16 7.808 1.728 4.096 2.56 8.448 0.896 4.416 0.896 8.832v677.76q0 4.48-0.896 8.768-0.832 4.416-2.56 8.512-1.664 4.096-4.16 7.808-2.432 3.648-5.568 6.848-3.2 3.136-6.848 5.568-3.712 2.496-7.808 4.16-4.096 1.728-8.448 2.56-4.416 0.896-8.832 0.896-4.48 0-8.832-0.896-4.352-0.832-8.448-2.56-4.096-1.664-7.808-4.16-3.648-2.432-6.848-5.632-3.136-3.136-5.568-6.784-2.496-3.712-4.16-7.808-1.728-4.096-2.56-8.512Q128 855.296 128 850.88z m677.76 0a45.12 45.12 0 0 0 90.24 0V173.12a45.12 45.12 0 0 0-90.24 0v677.76zM471.232 684.8a46.208 46.208 0 0 1-4.288 0.192h-48l48 48.448c8.832 8.896 13.056 20.288 13.056 32a44.8 44.8 0 0 1-12.992 32 45.184 45.184 0 0 1-64 0L282.24 676.224A44.992 44.992 0 0 1 269.184 640a44.992 44.992 0 0 1 13.056-36.288l120.704-120.704a45.184 45.184 0 1 1 64 64l-47.744 47.744h47.744c2.176 0 4.352 0.128 6.464 0.448h70.656q47.68 0 81.472-33.728 33.728-33.792 33.728-81.472 0-47.744-33.728-81.472Q591.744 364.8 544 364.8H384a44.8 44.8 0 1 1 0-89.6h160q84.8 0 144.832 59.968 59.968 59.968 59.968 144.832 0 84.8-59.968 144.832-60.032 59.968-144.832 59.968H471.232z" fill="#363B4C"></path>
628
+ </svg>
629
+ `;
630
+
631
+ const cropIcon = `
632
+ <svg viewBox="0 0 1024 1024" height="24px" width="24px">
633
+ <path d="M192 128v128H128v64h192V128h-128z m0 0h64v128h-64V128z m512 0v128h192v64H640V128h64z m-512 640H128v-64h192v192h-128v-128z m0 128h64v-128h-64v128z m512 0v-128h192v64h-128v128h-64z m0 0h64v-128h-64v128z" fill="currentColor"/>
634
+ <path d="M256 256h512v512H256z" fill="none" stroke="currentColor" stroke-width="64"/>
635
+ </svg>
636
+ `;
637
+
638
+ const borderIcon = `
639
+ <svg viewBox="0 0 1024 1024" height="24px" width="24px">
640
+ <path d="M160 160h704v704H160z" fill="none" stroke="currentColor" stroke-width="64" stroke-dasharray="64 32"/>
641
+ </svg>
642
+ `;
643
+
615
644
  const defaultConfig = {
616
645
  [CrepeFeature.CodeMirror]: {
617
646
  theme: themeOneDark.oneDark,
@@ -647,12 +676,17 @@ const zhCN = {
647
676
  "view.docBackground": "\u6587\u6863\u80CC\u666F\u8272",
648
677
  "view.title": "\u663E\u793A\u6807\u9898",
649
678
  "view.cover": "\u663E\u793A\u5C01\u9762",
679
+ "view.editorWidth": "\u5185\u5BB9\u5BBD\u5EA6",
680
+ "view.widthDefault": "\u9ED8\u8BA4",
681
+ "view.widthWide": "\u8F83\u5BBD",
682
+ "view.widthFull": "\u5168\u5BBD",
650
683
  // code-mirror
651
684
  "codeMirror.searchPlaceholder": "\u641C\u7D22\u8BED\u8A00",
652
685
  "codeMirror.noResultText": "\u65E0\u7ED3\u679C",
653
686
  "codeMirror.previewToggleOptionEdit": "\u7F16\u8F91",
654
687
  "codeMirror.previewToggleOptionHide": "\u9690\u85CF",
655
688
  "codeMirror.previewLabel": "\u9884\u89C8",
689
+ "codeMirror.wrapText": "\u81EA\u52A8\u6362\u884C",
656
690
  // link-tooltip
657
691
  "linkTooltip.pasteLink": "\u7C98\u8D34\u94FE\u63A5...",
658
692
  // image-block
@@ -750,7 +784,29 @@ const zhCN = {
750
784
  "latex.escToExit": "\u6309 ESC \u5B8C\u6210\u8F93\u5165",
751
785
  "latex.helpDoc": "\u67E5\u770B\u5E2E\u52A9\u6587\u6863",
752
786
  "latex.emptyPlaceholder": "\u6DFB\u52A0 LaTeX \u516C\u5F0F",
753
- "latex.inputPlaceholder": "\u8BF7\u8F93\u5165\u516C\u5F0F"
787
+ "latex.inputPlaceholder": "\u8BF7\u8F93\u5165\u516C\u5F0F",
788
+ // shortcuts
789
+ "shortcuts.title": "\u952E\u76D8\u5FEB\u6377\u952E",
790
+ "shortcuts.formatting": "\u6587\u672C\u683C\u5F0F",
791
+ "shortcuts.bold": "\u52A0\u7C97",
792
+ "shortcuts.italic": "\u659C\u4F53",
793
+ "shortcuts.underline": "\u4E0B\u5212\u7EBF",
794
+ "shortcuts.strikethrough": "\u5220\u9664\u7EBF",
795
+ "shortcuts.inlineCode": "\u884C\u5185\u4EE3\u7801",
796
+ "shortcuts.highlight": "\u9AD8\u4EAE",
797
+ "shortcuts.paragraph": "\u6BB5\u843D",
798
+ "shortcuts.heading": "\u6807\u9898",
799
+ "shortcuts.block": "\u5757\u7EA7\u5143\u7D20",
800
+ "shortcuts.codeBlock": "\u4EE3\u7801\u5757",
801
+ "shortcuts.blockquote": "\u5F15\u7528",
802
+ "shortcuts.orderedList": "\u6709\u5E8F\u5217\u8868",
803
+ "shortcuts.bulletList": "\u65E0\u5E8F\u5217\u8868",
804
+ "shortcuts.indent": "\u589E\u52A0\u7F29\u8FDB",
805
+ "shortcuts.outdent": "\u51CF\u5C11\u7F29\u8FDB",
806
+ "shortcuts.hardBreak": "\u6362\u884C",
807
+ "shortcuts.history": "\u5386\u53F2\u8BB0\u5F55",
808
+ "shortcuts.undo": "\u64A4\u9500",
809
+ "shortcuts.redo": "\u91CD\u505A"
754
810
  };
755
811
  const enUS = {
756
812
  "handle.add": "Add content",
@@ -771,11 +827,16 @@ const enUS = {
771
827
  "view.docBackground": "Document Background",
772
828
  "view.title": "Show Title",
773
829
  "view.cover": "Show Cover",
830
+ "view.editorWidth": "Content Width",
831
+ "view.widthDefault": "Default",
832
+ "view.widthWide": "Wide",
833
+ "view.widthFull": "Full Width",
774
834
  "codeMirror.searchPlaceholder": "Search language",
775
835
  "codeMirror.noResultText": "No result",
776
836
  "codeMirror.previewToggleOptionEdit": "Edit",
777
837
  "codeMirror.previewToggleOptionHide": "Hide",
778
838
  "codeMirror.previewLabel": "Preview",
839
+ "codeMirror.wrapText": "Wrap",
779
840
  "linkTooltip.pasteLink": "Paste link...",
780
841
  "imageBlock.inlineUploadButton": "Upload",
781
842
  "imageBlock.inlineUploadPlaceholder": "or paste link",
@@ -865,7 +926,28 @@ const enUS = {
865
926
  "latex.escToExit": "Press ESC to finish",
866
927
  "latex.helpDoc": "Help Doc",
867
928
  "latex.emptyPlaceholder": "Add LaTeX",
868
- "latex.inputPlaceholder": "Please enter formula"
929
+ "latex.inputPlaceholder": "Please enter formula",
930
+ "shortcuts.title": "Keyboard Shortcuts",
931
+ "shortcuts.formatting": "Text Formatting",
932
+ "shortcuts.bold": "Bold",
933
+ "shortcuts.italic": "Italic",
934
+ "shortcuts.underline": "Underline",
935
+ "shortcuts.strikethrough": "Strikethrough",
936
+ "shortcuts.inlineCode": "Inline Code",
937
+ "shortcuts.highlight": "Highlight",
938
+ "shortcuts.paragraph": "Paragraph",
939
+ "shortcuts.heading": "Heading",
940
+ "shortcuts.block": "Block Elements",
941
+ "shortcuts.codeBlock": "Code Block",
942
+ "shortcuts.blockquote": "Blockquote",
943
+ "shortcuts.orderedList": "Ordered List",
944
+ "shortcuts.bulletList": "Bullet List",
945
+ "shortcuts.indent": "Indent",
946
+ "shortcuts.outdent": "Outdent",
947
+ "shortcuts.hardBreak": "Hard Break",
948
+ "shortcuts.history": "History",
949
+ "shortcuts.undo": "Undo",
950
+ "shortcuts.redo": "Redo"
869
951
  };
870
952
  const translationsCtx = ctx.createSlice(
871
953
  {
@@ -1912,10 +1994,24 @@ function getGroups$1(filter, config, ctx) {
1912
1994
  return;
1913
1995
  }
1914
1996
  convertHeadingToParagraphIfNeeded$1(ctx2);
1915
- commands.call(commonmark.wrapInBlockTypeCommand.key, {
1916
- nodeType: listItem,
1917
- attrs: { checked: false }
1997
+ const result = schemaList.wrapInList(bulletList)(view.state, (tr) => {
1998
+ tr.doc.nodesBetween(
1999
+ tr.mapping.map(from),
2000
+ tr.mapping.map(to),
2001
+ (node, pos) => {
2002
+ if (node.type === listItem) {
2003
+ tr.setNodeMarkup(pos, void 0, {
2004
+ ...node.attrs,
2005
+ checked: false,
2006
+ listType: "bullet",
2007
+ label: "\u2022"
2008
+ });
2009
+ }
2010
+ }
2011
+ );
2012
+ view.dispatch(tr);
1918
2013
  });
2014
+ if (result) return;
1919
2015
  }
1920
2016
  });
1921
2017
  }
@@ -3171,7 +3267,7 @@ var __accessCheck$5 = (obj, member, msg) => member.has(obj) || __typeError$5("Ca
3171
3267
  var __privateGet$5 = (obj, member, getter) => (__accessCheck$5(obj, member, "read from private field"), member.get(obj));
3172
3268
  var __privateAdd$5 = (obj, member, value) => member.has(obj) ? __typeError$5("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
3173
3269
  var __privateSet$5 = (obj, member, value, setter) => (__accessCheck$5(obj, member, "write to private field"), member.set(obj, value), value);
3174
- var _content$4, _app$4, _filter, _slashProvider, _activeKey, _view, _programmaticallyPos, _mode, _hideTimeout, _isMenuHovered, _keepOpenUntilClickOutside;
3270
+ var _content$4, _app$4, _filter, _slashProvider, _activeKey, _view$1, _programmaticallyPos, _mode, _hideTimeout, _isMenuHovered, _keepOpenUntilClickOutside;
3175
3271
  const menu = slash.slashFactory("CREPE_MENU");
3176
3272
  function configureMenu(ctx, config) {
3177
3273
  ctx.set(menu.key, {
@@ -3185,7 +3281,7 @@ class MenuView {
3185
3281
  __privateAdd$5(this, _filter);
3186
3282
  __privateAdd$5(this, _slashProvider);
3187
3283
  __privateAdd$5(this, _activeKey);
3188
- __privateAdd$5(this, _view);
3284
+ __privateAdd$5(this, _view$1);
3189
3285
  __privateAdd$5(this, _programmaticallyPos, null);
3190
3286
  __privateAdd$5(this, _mode, null);
3191
3287
  __privateAdd$5(this, _hideTimeout);
@@ -3214,7 +3310,7 @@ class MenuView {
3214
3310
  __privateSet$5(this, _programmaticallyPos, pos);
3215
3311
  __privateSet$5(this, _mode, mode);
3216
3312
  __privateGet$5(this, _filter).value = "";
3217
- const node = __privateGet$5(this, _view).state.doc.nodeAt(pos);
3313
+ const node = __privateGet$5(this, _view$1).state.doc.nodeAt(pos);
3218
3314
  if (node) {
3219
3315
  __privateGet$5(this, _activeKey).value = getBlockKey(node);
3220
3316
  } else {
@@ -3262,7 +3358,7 @@ class MenuView {
3262
3358
  __privateGet$5(this, _app$4).unmount();
3263
3359
  __privateGet$5(this, _content$4).remove();
3264
3360
  };
3265
- __privateSet$5(this, _view, view);
3361
+ __privateSet$5(this, _view$1, view);
3266
3362
  const content = document.createElement("div");
3267
3363
  content.classList.add("milkdown-slash-menu");
3268
3364
  const show = vue.ref(false);
@@ -3349,7 +3445,7 @@ _app$4 = new WeakMap();
3349
3445
  _filter = new WeakMap();
3350
3446
  _slashProvider = new WeakMap();
3351
3447
  _activeKey = new WeakMap();
3352
- _view = new WeakMap();
3448
+ _view$1 = new WeakMap();
3353
3449
  _programmaticallyPos = new WeakMap();
3354
3450
  _mode = new WeakMap();
3355
3451
  _hideTimeout = new WeakMap();
@@ -3801,7 +3897,9 @@ const codeMirror = (editor, config = {}) => {
3801
3897
  },
3802
3898
  previewLabel: config.previewLabel || i18n(ctx, "codeMirror.previewLabel"),
3803
3899
  previewLoading: config.previewLoading || defaultConfig.previewLoading,
3804
- previewOnlyByDefault: (_a = config.previewOnlyByDefault) != null ? _a : defaultConfig.previewOnlyByDefault
3900
+ previewOnlyByDefault: (_a = config.previewOnlyByDefault) != null ? _a : defaultConfig.previewOnlyByDefault,
3901
+ wrapText: config.wrapText || i18n(ctx, "codeMirror.wrapText"),
3902
+ wrapIcon: config.wrapIcon || wordWrapIcon
3805
3903
  };
3806
3904
  });
3807
3905
  }).use(codeBlock.codeBlockComponent);
@@ -6858,6 +6956,11 @@ function randomCover(custom) {
6858
6956
  return (_a = images[Math.floor(Math.random() * images.length)]) != null ? _a : "";
6859
6957
  }
6860
6958
 
6959
+ const editorWidthMap = {
6960
+ default: "820px",
6961
+ wide: "1020px",
6962
+ full: "none"
6963
+ };
6861
6964
  const createViewMenuState = () => vue.reactive({
6862
6965
  outlineVisible: false,
6863
6966
  outlinePosition: "left",
@@ -6865,7 +6968,8 @@ const createViewMenuState = () => vue.reactive({
6865
6968
  documentBackground: null,
6866
6969
  showTitle: false,
6867
6970
  showCover: false,
6868
- coverUrl: ""
6971
+ coverUrl: "",
6972
+ editorWidth: "default"
6869
6973
  });
6870
6974
  const viewMenuStateCtx = utils.$ctx(createViewMenuState(), "viewMenuStateCtx");
6871
6975
 
@@ -6986,7 +7090,7 @@ const MenuBar = vue.defineComponent({
6986
7090
  style: {
6987
7091
  display: "flex",
6988
7092
  alignItems: "center",
6989
- padding: "0 0px",
7093
+ padding: "0 6px 0 0",
6990
7094
  position: "relative"
6991
7095
  }
6992
7096
  },
@@ -7316,6 +7420,82 @@ const MenuBar = vue.defineComponent({
7316
7420
  )
7317
7421
  ) : null
7318
7422
  ))
7423
+ ),
7424
+ /* @__PURE__ */ vue.h(
7425
+ "div",
7426
+ {
7427
+ style: {
7428
+ height: "1px",
7429
+ background: "var(--crepe-color-outline-variant, #eee)",
7430
+ margin: "4px 0"
7431
+ }
7432
+ }
7433
+ ),
7434
+ /* @__PURE__ */ vue.h(
7435
+ "div",
7436
+ {
7437
+ style: {
7438
+ padding: "8px 16px",
7439
+ display: "flex",
7440
+ justifyContent: "space-between",
7441
+ alignItems: "center"
7442
+ }
7443
+ },
7444
+ /* @__PURE__ */ vue.h(
7445
+ "span",
7446
+ {
7447
+ style: {
7448
+ fontSize: "14px",
7449
+ color: "var(--crepe-color-on-surface, #333)"
7450
+ }
7451
+ },
7452
+ i18n(props.ctx, "view.editorWidth") || "\u5185\u5BB9\u5BBD\u5EA6"
7453
+ )
7454
+ ),
7455
+ /* @__PURE__ */ vue.h(
7456
+ "div",
7457
+ {
7458
+ style: {
7459
+ padding: "4px 16px 8px",
7460
+ display: "flex",
7461
+ gap: "6px"
7462
+ }
7463
+ },
7464
+ [
7465
+ {
7466
+ key: "default",
7467
+ labelKey: "view.widthDefault"
7468
+ },
7469
+ {
7470
+ key: "wide",
7471
+ labelKey: "view.widthWide"
7472
+ },
7473
+ {
7474
+ key: "full",
7475
+ labelKey: "view.widthFull"
7476
+ }
7477
+ ].map(({ key, labelKey }) => /* @__PURE__ */ vue.h(
7478
+ "button",
7479
+ {
7480
+ key,
7481
+ type: "button",
7482
+ onClick: (e) => {
7483
+ e.stopPropagation();
7484
+ state.editorWidth = key;
7485
+ },
7486
+ style: {
7487
+ flex: 1,
7488
+ padding: "4px 0",
7489
+ fontSize: "12px",
7490
+ cursor: "pointer",
7491
+ borderRadius: "4px",
7492
+ border: state.editorWidth === key ? "1px solid var(--crepe-color-primary, #1890ff)" : "1px solid var(--crepe-color-outline-variant, #e8e8e8)",
7493
+ background: state.editorWidth === key ? "var(--crepe-color-primary, #1890ff)" : "transparent",
7494
+ color: state.editorWidth === key ? "#fff" : "var(--crepe-color-on-surface, #333)"
7495
+ }
7496
+ },
7497
+ i18n(props.ctx, labelKey) || key
7498
+ ))
7319
7499
  )
7320
7500
  ) : null
7321
7501
  );
@@ -7326,6 +7506,191 @@ const MenuBar = vue.defineComponent({
7326
7506
  }
7327
7507
  });
7328
7508
 
7509
+ const isMac = typeof navigator !== "undefined" && /Mac|iPod|iPhone|iPad/.test(navigator.platform || navigator.userAgent);
7510
+ function fmt(shortcut) {
7511
+ return shortcut.replace(/Mod/g, isMac ? "\u2318" : "Ctrl").replace(/\+/g, isMac ? "" : "+").replace(/Shift/g, isMac ? "\u21E7" : "Shift").replace(/Alt/g, isMac ? "\u2325" : "Alt");
7512
+ }
7513
+ const leftGroups = [
7514
+ {
7515
+ titleKey: "shortcuts.formatting",
7516
+ items: [
7517
+ { labelKey: "shortcuts.bold", keys: ["Mod+b"] },
7518
+ { labelKey: "shortcuts.italic", keys: ["Mod+i"] },
7519
+ { labelKey: "shortcuts.underline", keys: ["Mod+u"] },
7520
+ { labelKey: "shortcuts.strikethrough", keys: ["Mod+Alt+x"] },
7521
+ { labelKey: "shortcuts.inlineCode", keys: ["Mod+e"] },
7522
+ { labelKey: "shortcuts.highlight", keys: ["Mod+Shift+h"] }
7523
+ ]
7524
+ },
7525
+ {
7526
+ titleKey: "shortcuts.paragraph",
7527
+ items: [
7528
+ { labelKey: "shortcuts.paragraph", keys: ["Mod+Alt+0"] },
7529
+ { labelKey: "shortcuts.heading", keys: ["Mod+Alt+1~6"] }
7530
+ ]
7531
+ }
7532
+ ];
7533
+ const rightGroups = [
7534
+ {
7535
+ titleKey: "shortcuts.block",
7536
+ items: [
7537
+ { labelKey: "shortcuts.codeBlock", keys: ["Mod+Alt+c"] },
7538
+ { labelKey: "shortcuts.blockquote", keys: ["Mod+Shift+b"] },
7539
+ { labelKey: "shortcuts.orderedList", keys: ["Mod+Alt+7"] },
7540
+ { labelKey: "shortcuts.bulletList", keys: ["Mod+Alt+8"] },
7541
+ { labelKey: "shortcuts.indent", keys: ["Tab", "Mod+]"] },
7542
+ { labelKey: "shortcuts.outdent", keys: ["Shift+Tab", "Mod+["] },
7543
+ { labelKey: "shortcuts.hardBreak", keys: ["Shift+Enter"] }
7544
+ ]
7545
+ },
7546
+ {
7547
+ titleKey: "shortcuts.history",
7548
+ items: [
7549
+ { labelKey: "shortcuts.undo", keys: ["Mod+z"] },
7550
+ { labelKey: "shortcuts.redo", keys: ["Mod+y", "Shift+Mod+z"] }
7551
+ ]
7552
+ }
7553
+ ];
7554
+ const badgeStyle = {
7555
+ display: "inline-flex",
7556
+ alignItems: "center",
7557
+ justifyContent: "center",
7558
+ minWidth: "22px",
7559
+ height: "22px",
7560
+ padding: "0 6px",
7561
+ borderRadius: "4px",
7562
+ fontSize: "11px",
7563
+ fontFamily: "var(--crepe-font-code, monospace)",
7564
+ backgroundColor: "var(--crepe-color-surface-low, color-mix(in srgb, var(--crepe-color-surface), transparent 60%))",
7565
+ border: "1px solid var(--crepe-color-outline-variant, color-mix(in srgb, var(--crepe-color-outline), transparent 80%))",
7566
+ whiteSpace: "nowrap"
7567
+ };
7568
+ const columnStyle = {
7569
+ flex: 1,
7570
+ minWidth: 0
7571
+ };
7572
+ const groupTitleStyle = {
7573
+ fontSize: "11px",
7574
+ fontWeight: 600,
7575
+ color: "var(--crepe-color-on-surface-variant, #888)",
7576
+ marginBottom: "8px",
7577
+ textTransform: "uppercase",
7578
+ letterSpacing: "0.5px"
7579
+ };
7580
+ const rowStyle = {
7581
+ display: "flex",
7582
+ alignItems: "center",
7583
+ justifyContent: "space-between",
7584
+ padding: "5px 0"
7585
+ };
7586
+ const labelStyle = {
7587
+ fontSize: "13px",
7588
+ color: "var(--crepe-color-on-surface, #333)"
7589
+ };
7590
+ function renderGroup(ctx, group) {
7591
+ return /* @__PURE__ */ vue.h("div", { style: { marginBottom: "16px" }, key: group.titleKey }, /* @__PURE__ */ vue.h("div", { style: groupTitleStyle }, i18n(ctx, group.titleKey)), /* @__PURE__ */ vue.h("div", { style: { display: "flex", flexDirection: "column" } }, group.items.map((item) => /* @__PURE__ */ vue.h("div", { key: item.labelKey, style: rowStyle }, /* @__PURE__ */ vue.h("span", { style: labelStyle }, i18n(ctx, item.labelKey)), /* @__PURE__ */ vue.h("div", { style: { display: "flex", gap: "4px", alignItems: "center" } }, item.keys.map((key, i) => /* @__PURE__ */ vue.h("span", { key: i, style: badgeStyle }, fmt(key))))))));
7592
+ }
7593
+ const ShortcutHelpModal = vue.defineComponent({
7594
+ props: {
7595
+ ctx: { type: Object, required: true },
7596
+ visible: { type: Object, required: true }
7597
+ },
7598
+ setup(props) {
7599
+ const close = () => {
7600
+ props.visible.value = false;
7601
+ };
7602
+ const onKeydown = (e) => {
7603
+ if (e.key === "Escape") close();
7604
+ };
7605
+ vue.onMounted(() => document.addEventListener("keydown", onKeydown));
7606
+ vue.onBeforeUnmount(() => document.removeEventListener("keydown", onKeydown));
7607
+ return () => /* @__PURE__ */ vue.h(
7608
+ "div",
7609
+ {
7610
+ style: {
7611
+ position: "fixed",
7612
+ inset: 0,
7613
+ zIndex: 1e4,
7614
+ background: "rgba(0, 0, 0, 0.4)",
7615
+ display: "flex",
7616
+ alignItems: "center",
7617
+ justifyContent: "center"
7618
+ },
7619
+ onClick: close
7620
+ },
7621
+ /* @__PURE__ */ vue.h(
7622
+ "div",
7623
+ {
7624
+ style: {
7625
+ position: "relative",
7626
+ width: "560px",
7627
+ maxWidth: "calc(100vw - 32px)",
7628
+ background: "var(--crepe-color-surface, #fff)",
7629
+ borderRadius: "12px",
7630
+ boxShadow: "0 8px 32px rgba(0, 0, 0, 0.15)",
7631
+ padding: "20px 24px"
7632
+ },
7633
+ onClick: (e) => e.stopPropagation()
7634
+ },
7635
+ /* @__PURE__ */ vue.h(
7636
+ "div",
7637
+ {
7638
+ style: {
7639
+ display: "flex",
7640
+ alignItems: "center",
7641
+ justifyContent: "space-between",
7642
+ marginBottom: "16px",
7643
+ paddingBottom: "12px",
7644
+ borderBottom: "1px solid var(--crepe-color-outline-variant, color-mix(in srgb, var(--crepe-color-outline), transparent 80%))"
7645
+ }
7646
+ },
7647
+ /* @__PURE__ */ vue.h(
7648
+ "span",
7649
+ {
7650
+ style: {
7651
+ fontSize: "15px",
7652
+ fontWeight: 600,
7653
+ color: "var(--crepe-color-on-surface, #1a1a1a)"
7654
+ }
7655
+ },
7656
+ i18n(props.ctx, "shortcuts.title")
7657
+ ),
7658
+ /* @__PURE__ */ vue.h(
7659
+ "button",
7660
+ {
7661
+ type: "button",
7662
+ onClick: close,
7663
+ style: {
7664
+ display: "inline-flex",
7665
+ alignItems: "center",
7666
+ justifyContent: "center",
7667
+ width: "28px",
7668
+ height: "28px",
7669
+ border: "none",
7670
+ background: "transparent",
7671
+ cursor: "pointer",
7672
+ borderRadius: "4px",
7673
+ color: "var(--crepe-color-on-surface-variant, #666)"
7674
+ }
7675
+ },
7676
+ /* @__PURE__ */ vue.h(component.Icon, { icon: closeIcon })
7677
+ )
7678
+ ),
7679
+ /* @__PURE__ */ vue.h("div", { style: { display: "flex", gap: "24px" } }, /* @__PURE__ */ vue.h("div", { style: columnStyle }, leftGroups.map((g) => renderGroup(props.ctx, g))), /* @__PURE__ */ vue.h(
7680
+ "div",
7681
+ {
7682
+ style: {
7683
+ width: "1px",
7684
+ flexShrink: 0,
7685
+ backgroundColor: "var(--crepe-color-outline-variant, color-mix(in srgb, var(--crepe-color-outline), transparent 80%))"
7686
+ }
7687
+ }
7688
+ ), /* @__PURE__ */ vue.h("div", { style: columnStyle }, rightGroups.map((g) => renderGroup(props.ctx, g))))
7689
+ )
7690
+ );
7691
+ }
7692
+ });
7693
+
7329
7694
  const FixedToolbarComponent = vue.defineComponent({
7330
7695
  props: {
7331
7696
  ctx: { type: Object, required: true },
@@ -7335,6 +7700,7 @@ const FixedToolbarComponent = vue.defineComponent({
7335
7700
  config: { type: Object, required: false }
7336
7701
  },
7337
7702
  setup(props) {
7703
+ const showShortcuts = vue.ref(false);
7338
7704
  return () => /* @__PURE__ */ vue.h(
7339
7705
  "div",
7340
7706
  {
@@ -7343,7 +7709,7 @@ const FixedToolbarComponent = vue.defineComponent({
7343
7709
  alignItems: "center",
7344
7710
  justifyContent: "center",
7345
7711
  width: "100%",
7346
- gap: "12px"
7712
+ gap: "0px"
7347
7713
  }
7348
7714
  },
7349
7715
  /* @__PURE__ */ vue.h(MenuBar, { ctx: props.ctx, config: props.config }),
@@ -7368,7 +7734,32 @@ const FixedToolbarComponent = vue.defineComponent({
7368
7734
  config: props.config,
7369
7735
  isFixed: true
7370
7736
  }
7371
- )
7737
+ ),
7738
+ /* @__PURE__ */ vue.h(
7739
+ "div",
7740
+ {
7741
+ style: {
7742
+ width: "1px",
7743
+ minWidth: "1px",
7744
+ height: "20px",
7745
+ flexShrink: 0,
7746
+ backgroundColor: "var(--crepe-color-outline-variant, color-mix(in srgb, var(--crepe-color-outline), transparent 80%))"
7747
+ }
7748
+ }
7749
+ ),
7750
+ /* @__PURE__ */ vue.h(
7751
+ "button",
7752
+ {
7753
+ type: "button",
7754
+ class: "toolbar-shortcut-btn",
7755
+ title: i18n(props.ctx, "shortcuts.title"),
7756
+ onClick: () => {
7757
+ showShortcuts.value = true;
7758
+ }
7759
+ },
7760
+ /* @__PURE__ */ vue.h(component.Icon, { icon: keyboardIcon })
7761
+ ),
7762
+ showShortcuts.value && /* @__PURE__ */ vue.h(ShortcutHelpModal, { ctx: props.ctx, visible: showShortcuts })
7372
7763
  );
7373
7764
  }
7374
7765
  });
@@ -7738,10 +8129,24 @@ function buildDefaultFixedToolbar(builder, _config, ctx) {
7738
8129
  return;
7739
8130
  }
7740
8131
  convertHeadingToParagraphIfNeeded(ctx2);
7741
- commands.call(commonmark.wrapInBlockTypeCommand.key, {
7742
- nodeType: listItem,
7743
- attrs: { checked: false }
8132
+ const result = schemaList.wrapInList(bulletList)(view.state, (tr) => {
8133
+ tr.doc.nodesBetween(
8134
+ tr.mapping.map(from),
8135
+ tr.mapping.map(to),
8136
+ (node, pos) => {
8137
+ if (node.type === listItem) {
8138
+ tr.setNodeMarkup(pos, void 0, {
8139
+ ...node.attrs,
8140
+ checked: false,
8141
+ listType: "bullet",
8142
+ label: "\u2022"
8143
+ });
8144
+ }
8145
+ }
8146
+ );
8147
+ view.dispatch(tr);
7744
8148
  });
8149
+ if (result) return;
7745
8150
  }
7746
8151
  });
7747
8152
  }
@@ -7968,10 +8373,9 @@ const DocumentHeader = vue.defineComponent({
7968
8373
  class: "milkdown-document-title-wrapper",
7969
8374
  style: {
7970
8375
  width: "100%",
7971
- // maxWidth: '900px',
7972
- // margin: '0 auto',
7973
- padding: "40px 120px 0"
7974
- // Match ProseMirror padding
8376
+ maxWidth: editorWidthMap[state.editorWidth] === "none" ? void 0 : editorWidthMap[state.editorWidth],
8377
+ margin: editorWidthMap[state.editorWidth] === "none" ? "0" : "0 auto",
8378
+ padding: `40px ${editorWidthMap[state.editorWidth] === "none" ? "80px" : "0"} 0`
7975
8379
  }
7976
8380
  },
7977
8381
  /* @__PURE__ */ vue.h("style", null, `.milkdown-document-title::placeholder { color: #BFBFBF; }`),
@@ -8396,7 +8800,7 @@ var __accessCheck$3 = (obj, member, msg) => member.has(obj) || __typeError$3("Ca
8396
8800
  var __privateGet$3 = (obj, member, getter) => (__accessCheck$3(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
8397
8801
  var __privateAdd$3 = (obj, member, value) => member.has(obj) ? __typeError$3("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
8398
8802
  var __privateSet$3 = (obj, member, value, setter) => (__accessCheck$3(obj, member, "write to private field"), member.set(obj, value), value);
8399
- var _content$2, _app$2, _headerContent, _headerApp, _outlineContent, _outlineApp, _watcher, _selection$1, _show$1, _resizeObserver, _updateOutlineGeometry, _scrollContainers;
8803
+ var _content$2, _app$2, _headerContent, _headerApp, _outlineContent, _outlineApp, _watcher, _selection$1, _show$1, _resizeObserver, _updateOutlineGeometry, _scrollContainers, _view;
8400
8804
  const fixedToolbarConfig = utils.$ctx(
8401
8805
  {},
8402
8806
  "fixedToolbarConfigCtx"
@@ -8416,6 +8820,7 @@ class FixedToolbarView {
8416
8820
  __privateAdd$3(this, _resizeObserver);
8417
8821
  __privateAdd$3(this, _updateOutlineGeometry);
8418
8822
  __privateAdd$3(this, _scrollContainers, []);
8823
+ __privateAdd$3(this, _view);
8419
8824
  this.update = (view) => {
8420
8825
  __privateGet$3(this, _selection$1).value = view.state.selection;
8421
8826
  };
@@ -8437,6 +8842,7 @@ class FixedToolbarView {
8437
8842
  if (__privateGet$3(this, _outlineApp)) __privateGet$3(this, _outlineApp).unmount();
8438
8843
  if (__privateGet$3(this, _outlineContent)) __privateGet$3(this, _outlineContent).remove();
8439
8844
  };
8845
+ __privateSet$3(this, _view, view);
8440
8846
  const config = ctx.get(fixedToolbarConfig.key);
8441
8847
  const content = document.createElement("div");
8442
8848
  content.className = "milkdown-fixed-toolbar";
@@ -8532,7 +8938,8 @@ class FixedToolbarView {
8532
8938
  viewState.outlinePosition,
8533
8939
  viewState.outlineWidth,
8534
8940
  viewState.documentBackground,
8535
- viewState.showCover
8941
+ viewState.showCover,
8942
+ viewState.editorWidth
8536
8943
  ],
8537
8944
  () => {
8538
8945
  if (viewState.documentBackground) {
@@ -8561,6 +8968,17 @@ class FixedToolbarView {
8561
8968
  __privateGet$3(this, _content$2).style.marginLeft = "0";
8562
8969
  __privateGet$3(this, _content$2).style.marginRight = "0";
8563
8970
  }
8971
+ const maxWidth = editorWidthMap[viewState.editorWidth];
8972
+ const isFull = maxWidth === "none";
8973
+ const px = isFull ? "80px" : "0";
8974
+ __privateGet$3(this, _view).dom.style.maxWidth = maxWidth;
8975
+ __privateGet$3(this, _view).dom.style.width = isFull ? "100%" : maxWidth;
8976
+ __privateGet$3(this, _view).dom.style.margin = isFull ? "0" : "0 auto";
8977
+ __privateGet$3(this, _view).dom.style.padding = `20px ${px} 0`;
8978
+ if (__privateGet$3(this, _headerContent)) {
8979
+ __privateGet$3(this, _headerContent).style.margin = isFull ? "0" : "0 auto";
8980
+ __privateGet$3(this, _headerContent).style.padding = `0px`;
8981
+ }
8564
8982
  vue.nextTick(() => {
8565
8983
  var _a;
8566
8984
  (_a = __privateGet$3(this, _updateOutlineGeometry)) == null ? void 0 : _a.call(this);
@@ -8583,6 +9001,7 @@ _show$1 = new WeakMap();
8583
9001
  _resizeObserver = new WeakMap();
8584
9002
  _updateOutlineGeometry = new WeakMap();
8585
9003
  _scrollContainers = new WeakMap();
9004
+ _view = new WeakMap();
8586
9005
  const fixedToolbarPlugin = utils.$prose((ctx) => {
8587
9006
  return new state.Plugin({
8588
9007
  key: fixedToolbarKey,
@@ -8622,17 +9041,19 @@ const imageBlock = (editor, config) => {
8622
9041
  };
8623
9042
  });
8624
9043
  ctx.update(imageBlock$1.imageBlockConfig.key, (value) => {
8625
- var _a, _b, _c, _d, _e, _f, _g, _h, _i;
9044
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
8626
9045
  return {
8627
9046
  uploadButton: (_a = config == null ? void 0 : config.blockUploadButton) != null ? _a : i18n(ctx, "imageBlock.blockUploadButton"),
8628
9047
  imageIcon: (_b = config == null ? void 0 : config.blockImageIcon) != null ? _b : imageIcon,
8629
9048
  captionIcon: (_c = config == null ? void 0 : config.blockCaptionIcon) != null ? _c : captionIcon,
8630
- confirmButton: (_d = config == null ? void 0 : config.blockConfirmButton) != null ? _d : i18n(ctx, "imageBlock.blockConfirmButton"),
8631
- captionPlaceholderText: (_e = config == null ? void 0 : config.blockCaptionPlaceholderText) != null ? _e : i18n(ctx, "imageBlock.blockCaptionPlaceholder"),
8632
- uploadPlaceholderText: (_f = config == null ? void 0 : config.blockUploadPlaceholderText) != null ? _f : i18n(ctx, "imageBlock.blockUploadPlaceholder"),
8633
- onUpload: (_h = (_g = config == null ? void 0 : config.blockOnUpload) != null ? _g : config == null ? void 0 : config.onUpload) != null ? _h : value.onUpload,
9049
+ cropIcon: (_d = config == null ? void 0 : config.blockCropIcon) != null ? _d : cropIcon,
9050
+ borderIcon: (_e = config == null ? void 0 : config.blockBorderIcon) != null ? _e : borderIcon,
9051
+ confirmButton: (_f = config == null ? void 0 : config.blockConfirmButton) != null ? _f : i18n(ctx, "imageBlock.blockConfirmButton"),
9052
+ captionPlaceholderText: (_g = config == null ? void 0 : config.blockCaptionPlaceholderText) != null ? _g : i18n(ctx, "imageBlock.blockCaptionPlaceholder"),
9053
+ uploadPlaceholderText: (_h = config == null ? void 0 : config.blockUploadPlaceholderText) != null ? _h : i18n(ctx, "imageBlock.blockUploadPlaceholder"),
9054
+ onUpload: (_j = (_i = config == null ? void 0 : config.blockOnUpload) != null ? _i : config == null ? void 0 : config.onUpload) != null ? _j : value.onUpload,
8634
9055
  proxyDomURL: config == null ? void 0 : config.proxyDomURL,
8635
- onImageLoadError: (_i = config == null ? void 0 : config.onImageLoadError) != null ? _i : value.onImageLoadError,
9056
+ onImageLoadError: (_k = config == null ? void 0 : config.onImageLoadError) != null ? _k : value.onImageLoadError,
8636
9057
  maxWidth: config == null ? void 0 : config.maxWidth,
8637
9058
  maxHeight: config == null ? void 0 : config.maxHeight
8638
9059
  };