@gantfdt/semiword 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 (33) hide show
  1. package/dist-lib/{FlowchartEditor-LT6T7ZQV.mjs → FlowchartEditor-OSHXJZQC.mjs} +3 -3
  2. package/dist-lib/{FlowchartEditor-LT6T7ZQV.mjs.map → FlowchartEditor-OSHXJZQC.mjs.map} +1 -1
  3. package/dist-lib/{MindmapEditor-TMXT2VG3.mjs → MindmapEditor-LHYQNYU2.mjs} +3 -3
  4. package/dist-lib/{MindmapEditor-TMXT2VG3.mjs.map → MindmapEditor-LHYQNYU2.mjs.map} +1 -1
  5. package/dist-lib/{WhiteboardEditor-FSYK6RVN.mjs → WhiteboardEditor-ZNZ7DSSC.mjs} +9 -457
  6. package/dist-lib/WhiteboardEditor-ZNZ7DSSC.mjs.map +1 -0
  7. package/dist-lib/ai.mjs +6 -6
  8. package/dist-lib/{chunk-76EFOMJ3.mjs → chunk-3S2IK47C.mjs} +4 -4
  9. package/dist-lib/{chunk-76EFOMJ3.mjs.map → chunk-3S2IK47C.mjs.map} +1 -1
  10. package/dist-lib/{chunk-YMND7XVN.mjs → chunk-7SGGGLSR.mjs} +7 -7
  11. package/dist-lib/{chunk-YMND7XVN.mjs.map → chunk-7SGGGLSR.mjs.map} +1 -1
  12. package/dist-lib/{chunk-6JRQONYS.mjs → chunk-7SGW66XT.mjs} +33 -22
  13. package/dist-lib/chunk-7SGW66XT.mjs.map +1 -0
  14. package/dist-lib/{chunk-G7P3OSVI.mjs → chunk-ADBRQOSQ.mjs} +4 -4
  15. package/dist-lib/{chunk-G7P3OSVI.mjs.map → chunk-ADBRQOSQ.mjs.map} +1 -1
  16. package/dist-lib/{chunk-MEI6FU7P.mjs → chunk-FGUTLPFA.mjs} +6 -6
  17. package/dist-lib/{chunk-MEI6FU7P.mjs.map → chunk-FGUTLPFA.mjs.map} +1 -1
  18. package/dist-lib/{chunk-INIR3SZ3.mjs → chunk-NRXQ5SSE.mjs} +5 -5
  19. package/dist-lib/{chunk-INIR3SZ3.mjs.map → chunk-NRXQ5SSE.mjs.map} +1 -1
  20. package/dist-lib/{chunk-WT7ZJINB.mjs → chunk-Q72ADACC.mjs} +31 -4
  21. package/dist-lib/chunk-Q72ADACC.mjs.map +1 -0
  22. package/dist-lib/{chunk-ERWBH53C.mjs → chunk-UB5DIRWL.mjs} +4 -4
  23. package/dist-lib/{chunk-ERWBH53C.mjs.map → chunk-UB5DIRWL.mjs.map} +1 -1
  24. package/dist-lib/designer.mjs +7 -7
  25. package/dist-lib/editor.mjs +7 -7
  26. package/dist-lib/gant-ai.mjs +6 -6
  27. package/dist-lib/index.mjs +7 -7
  28. package/dist-lib/io.mjs +3 -3
  29. package/dist-lib/sdk.mjs +4 -4
  30. package/package.json +4 -4
  31. package/dist-lib/WhiteboardEditor-FSYK6RVN.mjs.map +0 -1
  32. package/dist-lib/chunk-6JRQONYS.mjs.map +0 -1
  33. package/dist-lib/chunk-WT7ZJINB.mjs.map +0 -1
@@ -1,4 +1,4 @@
1
- import { createStyles, useBlockStyles, Button, IconEdit, IconDelete, IconVideo, IconAttachment, createGraphicBlockView, createGraphicBlockNode, IconUndo, IconRedo, IconParagraph, IconQuote, IconCode, IconDivider, IconBulletList, IconOrderedList, IconTaskList, IconBold, IconItalic, IconStrikethrough, IconUnderline, IconTextColor, IconAlignLeft, IconAlignCenter, IconAlignRight, IconClearFormat, IconFormatPainter, IconBackgroundColor, IconTable, IconImage, IconFlowchart, IconWhiteboard, IconMindmap, IconMention, Tooltip, IconLink, Modal as Modal$1, Input, DatePicker } from './chunk-WT7ZJINB.mjs';
1
+ import { createStyles, useBlockStyles, Button, IconEdit, IconDelete, IconVideo, IconAttachment, createGraphicBlockView, createGraphicBlockNode, IconUndo, IconRedo, IconParagraph, IconQuote, IconCode, IconDivider, IconBulletList, IconOrderedList, IconTaskList, IconBold, IconItalic, IconStrikethrough, IconUnderline, IconTextColor, IconAlignLeft, IconAlignCenter, IconAlignRight, IconClearFormat, IconFormatPainter, IconBackgroundColor, IconTable, IconImage, IconFlowchart, IconWhiteboard, IconMindmap, IconMention, Tooltip, IconLink, Modal as Modal$1, Input, DatePicker } from './chunk-Q72ADACC.mjs';
2
2
  import { sanitizeSvg, DATA_MEDIA_URI_PATTERN } from './chunk-7D6NMYFG.mjs';
3
3
  import { readTemplateBlockMeta, renderTemplateBlockMeta, parseTemplateBlockMeta, getTemplateBlockRegistry, effectivePin, createTemplateController, getRegisteredTemplateBlockExtensions, createIntegrityExtension } from './chunk-EOUNN3NA.mjs';
4
4
  import { tr } from './chunk-W627LLF4.mjs';
@@ -429,28 +429,39 @@ function pickFile(accept) {
429
429
  input.style.left = "-9999px";
430
430
  document.body.appendChild(input);
431
431
  let settled = false;
432
- let handleFocus = null;
433
- const finish = (file) => {
434
- if (settled) return;
435
- settled = true;
436
- if (handleFocus) {
437
- window.removeEventListener("focus", handleFocus);
438
- }
432
+ let fallbackTimer = null;
433
+ function dispose() {
434
+ if (fallbackTimer) clearTimeout(fallbackTimer);
435
+ window.removeEventListener("focus", handleFocus);
436
+ input.removeEventListener("cancel", handleCancel);
439
437
  input.onchange = null;
440
438
  input.remove();
439
+ }
440
+ function finish(file) {
441
+ if (settled) return;
442
+ settled = true;
443
+ dispose();
441
444
  resolve(file);
442
- };
445
+ }
446
+ function handleCancel() {
447
+ finish(null);
448
+ }
449
+ function handleFocus() {
450
+ if (settled) return;
451
+ if (fallbackTimer) clearTimeout(fallbackTimer);
452
+ fallbackTimer = setTimeout(() => {
453
+ if (settled || !document.hasFocus()) return;
454
+ const files = input.files;
455
+ if (!files || files.length === 0) finish(null);
456
+ }, 500);
457
+ }
443
458
  input.onchange = (e) => {
444
459
  finish(e.target.files?.[0] ?? null);
445
460
  };
446
- handleFocus = () => {
447
- setTimeout(() => {
448
- if (!settled && (!input.files || input.files.length === 0)) {
449
- finish(null);
450
- }
451
- }, 200);
452
- };
453
- window.addEventListener("focus", handleFocus);
461
+ input.addEventListener("cancel", handleCancel);
462
+ if (!("oncancel" in input)) {
463
+ window.addEventListener("focus", handleFocus);
464
+ }
454
465
  input.click();
455
466
  });
456
467
  }
@@ -5520,7 +5531,7 @@ var FlowchartView = createGraphicBlockView({
5520
5531
  loadingText: () => tr("\u52A0\u8F7D\u6D41\u7A0B\u56FE\u7F16\u8F91\u5668\u2026"),
5521
5532
  alt: "flowchart",
5522
5533
  // x6 画布较重,仅在进入编辑态时懒加载,不拖累编辑器初始包体
5523
- editorLoader: () => import('./FlowchartEditor-LT6T7ZQV.mjs')
5534
+ editorLoader: () => import('./FlowchartEditor-OSHXJZQC.mjs')
5524
5535
  });
5525
5536
  var FlowchartView_default = FlowchartView;
5526
5537
  var FlowchartBlock = createGraphicBlockNode({
@@ -5589,7 +5600,7 @@ var WhiteboardView = createGraphicBlockView({
5589
5600
  placeholderText: () => tr("\u70B9\u51FB\u7F16\u8F91\u753B\u677F"),
5590
5601
  loadingText: () => tr("\u52A0\u8F7D\u753B\u677F\u7F16\u8F91\u5668\u2026"),
5591
5602
  // Excalidraw 体积较大,仅在进入编辑态时懒加载
5592
- editorLoader: () => import('./WhiteboardEditor-FSYK6RVN.mjs')
5603
+ editorLoader: () => import('./WhiteboardEditor-ZNZ7DSSC.mjs')
5593
5604
  });
5594
5605
  var WhiteboardView_default = WhiteboardView;
5595
5606
  var WhiteboardBlock = createGraphicBlockNode({
@@ -5636,7 +5647,7 @@ var MindmapView = createGraphicBlockView({
5636
5647
  placeholderText: () => tr("\u70B9\u51FB\u7F16\u8F91\u601D\u7EF4\u5BFC\u56FE"),
5637
5648
  loadingText: () => tr("\u52A0\u8F7D\u601D\u7EF4\u5BFC\u56FE\u7F16\u8F91\u5668\u2026"),
5638
5649
  // simple-mind-map 体积较大,仅在进入编辑态时懒加载
5639
- editorLoader: () => import('./MindmapEditor-TMXT2VG3.mjs')
5650
+ editorLoader: () => import('./MindmapEditor-LHYQNYU2.mjs')
5640
5651
  });
5641
5652
  var MindmapView_default = MindmapView;
5642
5653
  var MindmapBlock = createGraphicBlockNode({
@@ -7420,5 +7431,5 @@ function fixedTableCss({ token, pa, borderRadius, mode, sel: s }) {
7420
7431
  }
7421
7432
 
7422
7433
  export { BUILTIN_PLUGINS, DEFAULT_TOOLBAR_GROUP_ORDER, FIXED_CELL_BG, HIGHLIGHT_THEME_CSS, MINIMAL_PLUGINS, PluginRegistry, codeBlockCss, configureEditorFeedback, configureEditorLocale, createCssScope, downloadFile, escapeHtml, findAncestor, fixedTableCss, getDefaultPlaceholder, glassSurfaceCss, headerControlForCol, isPlainObject, isSafeCssColor, lowlight, normalizeFixedTableBackgroundColor, outlinePlugin, parseFormula, pickFile, readFileAsText, readFixedCellControl, resolveCellControl, sanitizeJsonContent, showConfirmModal, showMessage, tableCss, templateCss, templatePlugin, typographyCss, validateFormula };
7423
- //# sourceMappingURL=chunk-6JRQONYS.mjs.map
7424
- //# sourceMappingURL=chunk-6JRQONYS.mjs.map
7434
+ //# sourceMappingURL=chunk-7SGW66XT.mjs.map
7435
+ //# sourceMappingURL=chunk-7SGW66XT.mjs.map