drawui-core 0.3.5 → 0.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -18,7 +18,7 @@ interface ShapeStyle {
18
18
  /** 描边色透明度(0-1),缺省为 1;与 strokeColor 叠加使用 */
19
19
  strokeOpacity?: number;
20
20
  }
21
- type ShapeType = 'rectangle' | 'rounded-rectangle' | 'circle' | 'ellipse' | 'diamond' | 'triangle' | 'hexagon' | 'parallelogram' | 'trapezoid' | 'pentagon' | 'octagon' | 'star' | 'cylinder' | 'cloud' | 'heart' | 'block-arrow-right' | 'block-arrow-left' | 'block-arrow-up' | 'block-arrow-down' | 'block-arrow-double' | 'right-triangle' | 'cross' | 'speech-rect' | 'speech-round' | 'cube' | 'sector' | 'delay' | 'predefined-process' | 'document' | 'stadium' | 'class-catalog' | 'chevron' | 'brace-left' | 'brace-right' | 'uml-class' | 'uml-interface' | 'mind-map' | 'line' | 'arrow' | 'text' | 'draw';
21
+ type ShapeType = 'rectangle' | 'rounded-rectangle' | 'circle' | 'ellipse' | 'diamond' | 'triangle' | 'hexagon' | 'parallelogram' | 'trapezoid' | 'pentagon' | 'octagon' | 'star' | 'cylinder' | 'cloud' | 'heart' | 'block-arrow-right' | 'block-arrow-left' | 'block-arrow-up' | 'block-arrow-down' | 'block-arrow-double' | 'right-triangle' | 'cross' | 'speech-rect' | 'speech-round' | 'cube' | 'sector' | 'delay' | 'predefined-process' | 'document' | 'stadium' | 'class-catalog' | 'chevron' | 'brace-left' | 'brace-right' | 'envelope' | 'checkbox' | 'triangular-pyramid' | 'quadrangular-pyramid' | 'cuboid' | 'sphere' | 'ellipsoid' | 'pie' | 'hollow-pie' | 'uml-class' | 'uml-interface' | 'mind-map' | 'line' | 'arrow' | 'text' | 'draw';
22
22
  interface BaseShape {
23
23
  id: string;
24
24
  type: ShapeType;
@@ -129,7 +129,7 @@ interface StadiumShape extends BaseShape {
129
129
  * 轮廓定义见 `shapePaths.ts`,canvas 与 SVG 导出共用。
130
130
  */
131
131
  interface PathShape extends BaseShape {
132
- type: 'block-arrow-double' | 'right-triangle' | 'cross' | 'speech-rect' | 'speech-round' | 'cube' | 'sector' | 'delay' | 'predefined-process' | 'document' | 'class-catalog' | 'chevron' | 'brace-left' | 'brace-right';
132
+ type: 'block-arrow-double' | 'right-triangle' | 'cross' | 'speech-rect' | 'speech-round' | 'cube' | 'sector' | 'delay' | 'predefined-process' | 'document' | 'class-catalog' | 'chevron' | 'brace-left' | 'brace-right' | 'envelope' | 'checkbox' | 'triangular-pyramid' | 'quadrangular-pyramid' | 'cuboid' | 'sphere' | 'ellipsoid' | 'pie' | 'hollow-pie';
133
133
  width: number;
134
134
  height: number;
135
135
  }
@@ -290,7 +290,7 @@ interface MindMapShape extends BaseShape {
290
290
  root: MindMapNode;
291
291
  }
292
292
  type Shape = RectangleShape | RoundedRectangleShape | CircleShape | EllipseShape | DiamondShape | TriangleShape | HexagonShape | ParallelogramShape | TrapezoidShape | PentagonShape | OctagonShape | StarShape | CylinderShape | CloudShape | HeartShape | BlockArrowShape | StadiumShape | PathShape | UmlClassShape | UmlInterfaceShape | LineShape | ArrowShape | TextShape | DrawShape | MindMapShape;
293
- type ToolType = 'select' | 'hand' | 'rectangle' | 'rounded-rectangle' | 'circle' | 'ellipse' | 'diamond' | 'triangle' | 'hexagon' | 'parallelogram' | 'trapezoid' | 'pentagon' | 'octagon' | 'star' | 'cylinder' | 'cloud' | 'heart' | 'block-arrow-right' | 'block-arrow-left' | 'block-arrow-up' | 'block-arrow-down' | 'block-arrow-double' | 'right-triangle' | 'cross' | 'speech-rect' | 'speech-round' | 'cube' | 'sector' | 'delay' | 'predefined-process' | 'document' | 'stadium' | 'class-catalog' | 'chevron' | 'brace-left' | 'brace-right' | 'uml-class' | 'uml-interface' | 'line' | 'arrow' | 'text' | 'draw' | 'pen' | 'highlighter' | 'eraser' | 'mind-map';
293
+ type ToolType = 'select' | 'hand' | 'rectangle' | 'rounded-rectangle' | 'circle' | 'ellipse' | 'diamond' | 'triangle' | 'hexagon' | 'parallelogram' | 'trapezoid' | 'pentagon' | 'octagon' | 'star' | 'cylinder' | 'cloud' | 'heart' | 'block-arrow-right' | 'block-arrow-left' | 'block-arrow-up' | 'block-arrow-down' | 'block-arrow-double' | 'right-triangle' | 'cross' | 'speech-rect' | 'speech-round' | 'cube' | 'sector' | 'delay' | 'predefined-process' | 'document' | 'stadium' | 'class-catalog' | 'chevron' | 'brace-left' | 'brace-right' | 'envelope' | 'checkbox' | 'triangular-pyramid' | 'quadrangular-pyramid' | 'cuboid' | 'sphere' | 'ellipsoid' | 'pie' | 'hollow-pie' | 'uml-class' | 'uml-interface' | 'line' | 'arrow' | 'text' | 'draw' | 'pen' | 'highlighter' | 'eraser' | 'mind-map';
294
294
  interface CameraState {
295
295
  x: number;
296
296
  y: number;
@@ -411,338 +411,188 @@ declare function shadeColor(hex: string, percent: number): string;
411
411
  * 国际化:框架无关的轻量字典 + 语言切换。
412
412
  * React 侧通过 useLanguage() 订阅语言变化自动重渲染。
413
413
  */
414
- type Language = 'zh-CN' | 'en-US';
415
- declare const dictionaries: {
416
- readonly 'zh-CN': {
417
- readonly 'save.success': "已保存";
418
- readonly 'save.fail': "保存失败";
419
- readonly 'tool.select': "选择工具";
420
- readonly 'tool.hand': "拖拽视口";
421
- readonly 'tool.rectangle': "矩形";
422
- readonly 'tool.rounded-rectangle': "圆角矩形";
423
- readonly 'tool.circle': "圆形";
424
- readonly 'tool.ellipse': "椭圆";
425
- readonly 'tool.diamond': "菱形";
426
- readonly 'tool.triangle': "三角形";
427
- readonly 'tool.hexagon': "六边形";
428
- readonly 'tool.parallelogram': "平行四边形";
429
- readonly 'tool.trapezoid': "梯形";
430
- readonly 'tool.pentagon': "五边形";
431
- readonly 'tool.octagon': "八边形";
432
- readonly 'tool.star': "星形";
433
- readonly 'tool.cylinder': "圆柱体";
434
- readonly 'tool.cloud': "云形";
435
- readonly 'tool.heart': "心形";
436
- readonly 'tool.block-arrow-right': "右箭头";
437
- readonly 'tool.block-arrow-left': "左箭头";
438
- readonly 'tool.block-arrow-up': "上箭头";
439
- readonly 'tool.block-arrow-down': "下箭头";
440
- readonly 'tool.block-arrow-double': "双向箭头";
441
- readonly 'tool.right-triangle': "直角三角形";
442
- readonly 'tool.cross': "十字";
443
- readonly 'tool.speech-rect': "方形对话框";
444
- readonly 'tool.speech-round': "圆形对话框";
445
- readonly 'tool.cube': "立方体";
446
- readonly 'tool.sector': "扇形";
447
- readonly 'tool.delay': "D 形";
448
- readonly 'tool.predefined-process': "预定义流程";
449
- readonly 'tool.document': "文档";
450
- readonly 'tool.stadium': "全圆角矩形";
451
- readonly 'tool.class-catalog': "类目";
452
- readonly 'class.plain': "类";
453
- readonly 'flow.process': "处理";
454
- readonly 'flow.step': "流程";
455
- readonly 'flow.startEnd': "开始/结束";
456
- readonly 'flow.decision': "判定";
457
- readonly 'flow.data': "数据";
458
- readonly 'flow.manual': "手动操作";
459
- readonly 'flow.preparation': "准备";
460
- readonly 'flow.database': "数据库";
461
- readonly 'flow.delay': "延时";
462
- readonly 'shapeGroup.basic': "基础";
463
- readonly 'shapeGroup.flowchart': "流程图";
464
- readonly 'shapeGroup.other': "其他";
465
- readonly 'shapeGroup.uml': "类图";
466
- readonly 'shapeMenu.hint': "悬停查看名称";
467
- readonly 'tool.chevron': "尖角";
468
- readonly 'tool.brace-left': "左括号";
469
- readonly 'tool.brace-right': "右括号";
470
- readonly 'tool.uml-class': "UML 类图";
471
- readonly 'tool.uml-interface': "UML 接口";
472
- readonly 'tool.line': "直线";
473
- readonly 'tool.arrow': "线条";
474
- readonly 'tool.text': "文本";
475
- readonly 'tool.draw': "画笔";
476
- readonly 'tool.pen': "画笔";
477
- readonly 'tool.highlighter': "荧光笔";
478
- readonly 'tool.eraser': "橡皮擦";
479
- readonly 'status.none': "未选择";
480
- readonly 'status.selected': "已选择 {n} 个图形";
481
- readonly 'toolbar.select': "选择 (V)";
482
- readonly 'toolbar.hand': "拖拽视口 (H)";
483
- readonly 'toolbar.shapes': "形状";
484
- readonly 'toolbar.grid': "网格";
485
- readonly 'toolbar.undo': "撤销 (Ctrl+Z)";
486
- readonly 'toolbar.redo': "重做 (Ctrl+Shift+Z)";
487
- readonly 'toolbar.arrow': "箭头";
488
- readonly 'toolbar.text': "文本";
489
- readonly 'toolbar.pen': "画笔";
490
- readonly 'toolbar.highlighter': "荧光笔";
491
- readonly 'toolbar.eraser': "橡皮擦";
492
- readonly 'toolbar.uml-class': "UML 类图";
493
- readonly 'toolbar.uml-interface': "UML 接口";
494
- readonly 'zoom.in': "放大";
495
- readonly 'zoom.out': "缩小";
496
- readonly 'zoom.reset': "重置";
497
- readonly 'style.stroke': "边框";
498
- readonly 'style.line': "线条";
499
- readonly 'style.fill': "填充";
500
- readonly 'style.text': "文字";
501
- readonly 'style.highlight': "高亮";
502
- readonly 'style.prefix': "前缀符号";
503
- readonly 'style.prefix.soon': "前缀符号开发中,敬请期待";
504
- readonly 'style.none': "无";
505
- readonly 'style.addColor': "添加颜色";
506
- readonly 'style.connection': "连线";
507
- readonly 'style.arrow': "箭头";
508
- readonly 'style.dashed': "虚线";
509
- readonly 'style.solid': "实线";
510
- readonly 'style.opacity': "不透明度";
511
- readonly 'style.connection.straight': "直线";
512
- readonly 'style.connection.polyline': "折线";
513
- readonly 'style.connection.orthogonal': "直角折线";
514
- readonly 'style.connection.curve': "曲线";
515
- readonly 'style.arrowhead.none': "无箭头";
516
- readonly 'style.arrowhead.end': "终点箭头";
517
- readonly 'style.arrowhead.start': "起点箭头";
518
- readonly 'style.arrowhead.both': "双箭头";
519
- readonly 'style.arrowhead.none-dashed': "无箭头虚线";
520
- readonly 'style.arrowhead.both-dashed': "双箭头虚线";
521
- readonly 'style.uml': "UML";
522
- readonly 'style.arrowhead.inheritance': "继承";
523
- readonly 'style.arrowhead.composition': "组合";
524
- readonly 'style.arrowhead.aggregation': "聚合";
525
- readonly 'style.arrowhead.dependency': "依赖";
526
- readonly 'style.arrowhead.realization': "实现";
527
- readonly 'menu.title': "选择新图形";
528
- readonly 'menu.cancel': "点击空白处取消";
529
- readonly 'shape.rectangle': "矩形";
530
- readonly 'shape.rounded-rectangle': "圆角";
531
- readonly 'shape.circle': "圆形";
532
- readonly 'shape.ellipse': "椭圆";
533
- readonly 'shape.diamond': "菱形";
534
- readonly 'shape.triangle': "三角";
535
- readonly 'shape.hexagon': "六边形";
536
- readonly 'shape.parallelogram': "平行";
537
- readonly 'shape.trapezoid': "梯形";
538
- readonly 'shape.pentagon': "五边形";
539
- readonly 'shape.octagon': "八边形";
540
- readonly 'shape.star': "星形";
541
- readonly 'shape.uml-class': "类图";
542
- readonly 'shape.uml-interface': "接口";
543
- readonly 'uml.drag': "拖拽排序";
544
- readonly 'uml.delete': "删除该行";
545
- readonly 'uml.textColor': "文字颜色";
546
- readonly 'uml.defaultColor': "默认颜色";
547
- readonly 'uml.fontSize': "字号";
548
- readonly 'uml.strikethrough': "删除线";
549
- readonly 'uml.attribute': "属性";
550
- readonly 'uml.method': "方法";
551
- readonly 'minimap.title': "小地图";
552
- readonly 'minimap.expand': "展开小地图";
553
- readonly 'minimap.collapse': "收起小地图";
554
- readonly 'tool.mind-map': "思维导图";
555
- readonly 'toolbar.mind-map': "思维导图";
556
- readonly 'toolbar.export': "导出";
557
- readonly 'toolbar.export.png': "PNG 图片";
558
- readonly 'toolbar.export.svg': "SVG 矢量图";
559
- readonly 'toolbar.export.pdf': "PDF 文档";
560
- readonly 'shape.mind-map': "思维导图";
561
- readonly 'mindmap.defaultRoot': "中心主题";
562
- readonly 'mindmap.defaultBranch': "分支主题";
563
- readonly 'mindmap.nodeText': "节点文本";
564
- readonly 'mindmap.addChild': "子节点";
565
- readonly 'mindmap.addSibling': "兄弟节点";
566
- readonly 'mindmap.deleteNode': "删除节点";
567
- readonly 'mindmap.color': "颜色";
568
- readonly 'mindmap.levelColor': "默认层级色";
569
- readonly 'mindmap.icon': "图标";
570
- readonly 'mindmap.noIcon': "无图标";
571
- readonly 'mindmap.note': "属性说明";
572
- readonly 'mindmap.notePlaceholder': "说明内容(可选)";
573
- readonly 'mindmap.noteColor': "说明颜色";
574
- readonly 'mindmap.noteColorDefault': "同节点色";
575
- readonly 'mindmap.collapse': "折叠";
576
- readonly 'mindmap.expand': "展开";
577
- readonly 'mindmap.close': "关闭编辑";
578
- readonly 'mindmap.more': "更多设置";
579
- };
580
- readonly 'en-US': {
581
- readonly 'save.success': "Saved";
582
- readonly 'save.fail': "Save failed";
583
- readonly 'tool.select': "Select tool";
584
- readonly 'tool.hand': "Pan view";
585
- readonly 'tool.rectangle': "Rectangle";
586
- readonly 'tool.rounded-rectangle': "Rounded rectangle";
587
- readonly 'tool.circle': "Circle";
588
- readonly 'tool.ellipse': "Ellipse";
589
- readonly 'tool.diamond': "Diamond";
590
- readonly 'tool.triangle': "Triangle";
591
- readonly 'tool.hexagon': "Hexagon";
592
- readonly 'tool.parallelogram': "Parallelogram";
593
- readonly 'tool.trapezoid': "Trapezoid";
594
- readonly 'tool.pentagon': "Pentagon";
595
- readonly 'tool.octagon': "Octagon";
596
- readonly 'tool.star': "Star";
597
- readonly 'tool.cylinder': "Cylinder";
598
- readonly 'tool.cloud': "Cloud";
599
- readonly 'tool.heart': "Heart";
600
- readonly 'tool.block-arrow-right': "Arrow right";
601
- readonly 'tool.block-arrow-left': "Arrow left";
602
- readonly 'tool.block-arrow-up': "Arrow up";
603
- readonly 'tool.block-arrow-down': "Arrow down";
604
- readonly 'tool.block-arrow-double': "Double arrow";
605
- readonly 'tool.right-triangle': "Right triangle";
606
- readonly 'tool.cross': "Cross";
607
- readonly 'tool.speech-rect': "Speech bubble";
608
- readonly 'tool.speech-round': "Round bubble";
609
- readonly 'tool.cube': "Cube";
610
- readonly 'tool.sector': "Sector";
611
- readonly 'tool.delay': "Delay";
612
- readonly 'tool.predefined-process': "Predefined process";
613
- readonly 'tool.document': "Document";
614
- readonly 'tool.stadium': "Stadium";
615
- readonly 'tool.class-catalog': "Category";
616
- readonly 'class.plain': "Class";
617
- readonly 'flow.process': "Process";
618
- readonly 'flow.step': "Step";
619
- readonly 'flow.startEnd': "Start / End";
620
- readonly 'flow.decision': "Decision";
621
- readonly 'flow.data': "Data";
622
- readonly 'flow.manual': "Manual operation";
623
- readonly 'flow.preparation': "Preparation";
624
- readonly 'flow.database': "Database";
625
- readonly 'flow.delay': "Delay";
626
- readonly 'shapeGroup.basic': "Basic";
627
- readonly 'shapeGroup.flowchart': "Flowchart";
628
- readonly 'shapeGroup.other': "Other";
629
- readonly 'shapeGroup.uml': "Class diagram";
630
- readonly 'shapeMenu.hint': "Hover to see name";
631
- readonly 'tool.chevron': "Chevron";
632
- readonly 'tool.brace-left': "Left brace";
633
- readonly 'tool.brace-right': "Right brace";
634
- readonly 'tool.uml-class': "UML class";
635
- readonly 'tool.uml-interface': "UML interface";
636
- readonly 'tool.line': "Line";
637
- readonly 'tool.arrow': "Line";
638
- readonly 'tool.text': "Text";
639
- readonly 'tool.draw': "Pen";
640
- readonly 'tool.pen': "Pen";
641
- readonly 'tool.highlighter': "Highlighter";
642
- readonly 'tool.eraser': "Eraser";
643
- readonly 'status.none': "Nothing selected";
644
- readonly 'status.selected': "{n} shapes selected";
645
- readonly 'toolbar.select': "Select (V)";
646
- readonly 'toolbar.hand': "Pan view (H)";
647
- readonly 'toolbar.shapes': "Shapes";
648
- readonly 'toolbar.grid': "Grid";
649
- readonly 'toolbar.undo': "Undo (Ctrl+Z)";
650
- readonly 'toolbar.redo': "Redo (Ctrl+Shift+Z)";
651
- readonly 'toolbar.arrow': "Arrow";
652
- readonly 'toolbar.text': "Text";
653
- readonly 'toolbar.pen': "Pen";
654
- readonly 'toolbar.highlighter': "Highlighter";
655
- readonly 'toolbar.eraser': "Eraser";
656
- readonly 'toolbar.uml-class': "UML class";
657
- readonly 'toolbar.uml-interface': "UML interface";
658
- readonly 'zoom.in': "Zoom in";
659
- readonly 'zoom.out': "Zoom out";
660
- readonly 'zoom.reset': "Reset";
661
- readonly 'style.stroke': "Border";
662
- readonly 'style.line': "Line";
663
- readonly 'style.fill': "Fill";
664
- readonly 'style.text': "Text";
665
- readonly 'style.highlight': "Highlight";
666
- readonly 'style.prefix': "Prefix";
667
- readonly 'style.prefix.soon': "Prefix symbols are coming soon";
668
- readonly 'style.none': "None";
669
- readonly 'style.addColor': "Add color";
670
- readonly 'style.connection': "Connection";
671
- readonly 'style.arrow': "Arrow head";
672
- readonly 'style.dashed': "Dashed";
673
- readonly 'style.solid': "Solid";
674
- readonly 'style.opacity': "Opacity";
675
- readonly 'style.connection.straight': "Straight";
676
- readonly 'style.connection.polyline': "Polyline";
677
- readonly 'style.connection.orthogonal': "Orthogonal";
678
- readonly 'style.connection.curve': "Curve";
679
- readonly 'style.arrowhead.none': "None";
680
- readonly 'style.arrowhead.end': "End";
681
- readonly 'style.arrowhead.start': "Start";
682
- readonly 'style.arrowhead.both': "Both";
683
- readonly 'style.arrowhead.none-dashed': "Dashed";
684
- readonly 'style.arrowhead.both-dashed': "Dashed both";
685
- readonly 'style.uml': "UML";
686
- readonly 'style.arrowhead.inheritance': "Inheritance";
687
- readonly 'style.arrowhead.composition': "Composition";
688
- readonly 'style.arrowhead.aggregation': "Aggregation";
689
- readonly 'style.arrowhead.dependency': "Dependency";
690
- readonly 'style.arrowhead.realization': "Realization";
691
- readonly 'menu.title': "Create shape";
692
- readonly 'menu.cancel': "Click empty space to cancel";
693
- readonly 'shape.rectangle': "Rectangle";
694
- readonly 'shape.rounded-rectangle': "Rounded";
695
- readonly 'shape.circle': "Circle";
696
- readonly 'shape.ellipse': "Ellipse";
697
- readonly 'shape.diamond': "Diamond";
698
- readonly 'shape.triangle': "Triangle";
699
- readonly 'shape.hexagon': "Hexagon";
700
- readonly 'shape.parallelogram': "Parallelogram";
701
- readonly 'shape.trapezoid': "Trapezoid";
702
- readonly 'shape.pentagon': "Pentagon";
703
- readonly 'shape.octagon': "Octagon";
704
- readonly 'shape.star': "Star";
705
- readonly 'shape.uml-class': "Class";
706
- readonly 'shape.uml-interface': "Interface";
707
- readonly 'uml.drag': "Drag to reorder";
708
- readonly 'uml.delete': "Delete row";
709
- readonly 'uml.textColor': "Text color";
710
- readonly 'uml.defaultColor': "Default color";
711
- readonly 'uml.fontSize': "Font size";
712
- readonly 'uml.strikethrough': "Strikethrough";
713
- readonly 'uml.attribute': "Attributes";
714
- readonly 'uml.method': "Methods";
715
- readonly 'minimap.title': "Minimap";
716
- readonly 'minimap.expand': "Expand minimap";
717
- readonly 'minimap.collapse': "Collapse minimap";
718
- readonly 'tool.mind-map': "Mind map";
719
- readonly 'toolbar.mind-map': "Mind map";
720
- readonly 'toolbar.export': "Export";
721
- readonly 'toolbar.export.png': "PNG image";
722
- readonly 'toolbar.export.svg': "SVG vector";
723
- readonly 'toolbar.export.pdf': "PDF document";
724
- readonly 'shape.mind-map': "Mind map";
725
- readonly 'mindmap.defaultRoot': "Central topic";
726
- readonly 'mindmap.defaultBranch': "Branch topic";
727
- readonly 'mindmap.nodeText': "Node text";
728
- readonly 'mindmap.addChild': "Child";
729
- readonly 'mindmap.addSibling': "Sibling";
730
- readonly 'mindmap.deleteNode': "Delete node";
731
- readonly 'mindmap.color': "Color";
732
- readonly 'mindmap.levelColor': "Default level color";
733
- readonly 'mindmap.icon': "Icon";
734
- readonly 'mindmap.noIcon': "No icon";
735
- readonly 'mindmap.note': "Note";
736
- readonly 'mindmap.notePlaceholder': "Note content (optional)";
737
- readonly 'mindmap.noteColor': "Note color";
738
- readonly 'mindmap.noteColorDefault': "Same as node";
739
- readonly 'mindmap.collapse': "Collapse";
740
- readonly 'mindmap.expand': "Expand";
741
- readonly 'mindmap.close': "Close editor";
742
- readonly 'mindmap.more': "More settings";
743
- };
414
+ type Language = 'zh-CN' | 'zh-TW' | 'en-US' | 'ja-JP' | 'ko-KR' | 'de-DE' | 'fr-FR';
415
+ /** 已支持的语言清单(code + 本族语名称),方便宿主直接用来渲染语言切换 UI */
416
+ declare const LANGUAGES: {
417
+ code: Language;
418
+ label: string;
419
+ }[];
420
+ /** 简体中文为基准字典:其 key 集合即是 MessageKey 的唯一来源 */
421
+ declare const zhCN: {
422
+ readonly 'save.success': "已保存";
423
+ readonly 'save.fail': "保存失败";
424
+ readonly 'tool.select': "选择工具";
425
+ readonly 'tool.hand': "拖拽视口";
426
+ readonly 'tool.rectangle': "矩形";
427
+ readonly 'tool.rounded-rectangle': "圆角矩形";
428
+ readonly 'tool.circle': "圆形";
429
+ readonly 'tool.ellipse': "椭圆";
430
+ readonly 'tool.diamond': "菱形";
431
+ readonly 'tool.triangle': "三角形";
432
+ readonly 'tool.hexagon': "六边形";
433
+ readonly 'tool.parallelogram': "平行四边形";
434
+ readonly 'tool.trapezoid': "梯形";
435
+ readonly 'tool.pentagon': "五边形";
436
+ readonly 'tool.octagon': "八边形";
437
+ readonly 'tool.star': "星形";
438
+ readonly 'tool.cylinder': "圆柱体";
439
+ readonly 'tool.cloud': "云形";
440
+ readonly 'tool.heart': "心形";
441
+ readonly 'tool.block-arrow-right': "右箭头";
442
+ readonly 'tool.block-arrow-left': "左箭头";
443
+ readonly 'tool.block-arrow-up': "上箭头";
444
+ readonly 'tool.block-arrow-down': "下箭头";
445
+ readonly 'tool.block-arrow-double': "双向箭头";
446
+ readonly 'tool.right-triangle': "直角三角形";
447
+ readonly 'tool.cross': "十字";
448
+ readonly 'tool.speech-rect': "方形对话框";
449
+ readonly 'tool.speech-round': "圆形对话框";
450
+ readonly 'tool.cube': "立方体";
451
+ readonly 'tool.sector': "扇形";
452
+ readonly 'tool.delay': "D 形";
453
+ readonly 'tool.predefined-process': "预定义流程";
454
+ readonly 'tool.document': "文档";
455
+ readonly 'tool.stadium': "全圆角矩形";
456
+ readonly 'tool.class-catalog': "类目";
457
+ readonly 'tool.envelope': "信封";
458
+ readonly 'tool.checkbox': "复选框";
459
+ readonly 'tool.triangular-pyramid': "三棱锥";
460
+ readonly 'tool.quadrangular-pyramid': "四棱锥";
461
+ readonly 'tool.cuboid': "长方体";
462
+ readonly 'tool.sphere': "球";
463
+ readonly 'tool.ellipsoid': "椭球";
464
+ readonly 'tool.pie': "饼状";
465
+ readonly 'tool.hollow-pie': "空心饼状";
466
+ readonly 'class.plain': "类";
467
+ readonly 'flow.process': "处理";
468
+ readonly 'flow.step': "流程";
469
+ readonly 'flow.startEnd': "开始/结束";
470
+ readonly 'flow.decision': "判定";
471
+ readonly 'flow.data': "数据";
472
+ readonly 'flow.manual': "手动操作";
473
+ readonly 'flow.preparation': "准备";
474
+ readonly 'flow.database': "数据库";
475
+ readonly 'flow.delay': "延时";
476
+ readonly 'shapeGroup.basic': "基础";
477
+ readonly 'shapeGroup.flowchart': "流程图";
478
+ readonly 'shapeGroup.other': "其他";
479
+ readonly 'shapeGroup.solid': "立体";
480
+ readonly 'shapeGroup.uml': "类图";
481
+ readonly 'shapeMenu.hint': "悬停查看名称";
482
+ readonly 'tool.chevron': "尖角";
483
+ readonly 'tool.brace-left': "左括号";
484
+ readonly 'tool.brace-right': "右括号";
485
+ readonly 'tool.uml-class': "UML 类图";
486
+ readonly 'tool.uml-interface': "UML 接口";
487
+ readonly 'tool.line': "直线";
488
+ readonly 'tool.arrow': "线条";
489
+ readonly 'tool.text': "文本";
490
+ readonly 'tool.draw': "画笔";
491
+ readonly 'tool.pen': "画笔";
492
+ readonly 'tool.highlighter': "荧光笔";
493
+ readonly 'tool.eraser': "橡皮擦";
494
+ readonly 'status.none': "未选择";
495
+ readonly 'status.selected': "已选择 {n} 个图形";
496
+ readonly 'toolbar.select': "选择 (V)";
497
+ readonly 'toolbar.hand': "拖拽视口 (H)";
498
+ readonly 'toolbar.shapes': "形状";
499
+ readonly 'toolbar.grid': "网格";
500
+ readonly 'toolbar.undo': "撤销 (Ctrl+Z)";
501
+ readonly 'toolbar.redo': "重做 (Ctrl+Shift+Z)";
502
+ readonly 'toolbar.arrow': "箭头";
503
+ readonly 'toolbar.text': "文本";
504
+ readonly 'toolbar.pen': "画笔";
505
+ readonly 'toolbar.highlighter': "荧光笔";
506
+ readonly 'toolbar.eraser': "橡皮擦";
507
+ readonly 'toolbar.uml-class': "UML 类图";
508
+ readonly 'toolbar.uml-interface': "UML 接口";
509
+ readonly 'zoom.in': "放大";
510
+ readonly 'zoom.out': "缩小";
511
+ readonly 'zoom.reset': "重置";
512
+ readonly 'style.stroke': "边框";
513
+ readonly 'style.line': "线条";
514
+ readonly 'style.fill': "填充";
515
+ readonly 'style.text': "文字";
516
+ readonly 'style.highlight': "高亮";
517
+ readonly 'style.prefix': "前缀符号";
518
+ readonly 'style.prefix.soon': "前缀符号开发中,敬请期待";
519
+ readonly 'style.none': "无";
520
+ readonly 'style.addColor': "添加颜色";
521
+ readonly 'style.connection': "连线";
522
+ readonly 'style.arrow': "箭头";
523
+ readonly 'style.dashed': "虚线";
524
+ readonly 'style.solid': "实线";
525
+ readonly 'style.opacity': "不透明度";
526
+ readonly 'style.connection.straight': "直线";
527
+ readonly 'style.connection.polyline': "折线";
528
+ readonly 'style.connection.orthogonal': "直角折线";
529
+ readonly 'style.connection.curve': "曲线";
530
+ readonly 'style.arrowhead.none': "无箭头";
531
+ readonly 'style.arrowhead.end': "终点箭头";
532
+ readonly 'style.arrowhead.start': "起点箭头";
533
+ readonly 'style.arrowhead.both': "双箭头";
534
+ readonly 'style.arrowhead.none-dashed': "无箭头虚线";
535
+ readonly 'style.arrowhead.both-dashed': "双箭头虚线";
536
+ readonly 'style.uml': "UML";
537
+ readonly 'style.arrowhead.inheritance': "继承";
538
+ readonly 'style.arrowhead.composition': "组合";
539
+ readonly 'style.arrowhead.aggregation': "聚合";
540
+ readonly 'style.arrowhead.dependency': "依赖";
541
+ readonly 'style.arrowhead.realization': "实现";
542
+ readonly 'menu.title': "选择新图形";
543
+ readonly 'menu.cancel': "点击空白处取消";
544
+ readonly 'shape.rectangle': "矩形";
545
+ readonly 'shape.rounded-rectangle': "圆角";
546
+ readonly 'shape.circle': "圆形";
547
+ readonly 'shape.ellipse': "椭圆";
548
+ readonly 'shape.diamond': "菱形";
549
+ readonly 'shape.triangle': "三角";
550
+ readonly 'shape.hexagon': "六边形";
551
+ readonly 'shape.parallelogram': "平行";
552
+ readonly 'shape.trapezoid': "梯形";
553
+ readonly 'shape.pentagon': "五边形";
554
+ readonly 'shape.octagon': "八边形";
555
+ readonly 'shape.star': "星形";
556
+ readonly 'shape.uml-class': "类图";
557
+ readonly 'shape.uml-interface': "接口";
558
+ readonly 'uml.drag': "拖拽排序";
559
+ readonly 'uml.delete': "删除该行";
560
+ readonly 'uml.textColor': "文字颜色";
561
+ readonly 'uml.defaultColor': "默认颜色";
562
+ readonly 'uml.fontSize': "字号";
563
+ readonly 'uml.strikethrough': "删除线";
564
+ readonly 'uml.attribute': "属性";
565
+ readonly 'uml.method': "方法";
566
+ readonly 'minimap.title': "小地图";
567
+ readonly 'minimap.expand': "展开小地图";
568
+ readonly 'minimap.collapse': "收起小地图";
569
+ readonly 'tool.mind-map': "思维导图";
570
+ readonly 'toolbar.mind-map': "思维导图";
571
+ readonly 'toolbar.export': "导出";
572
+ readonly 'toolbar.export.png': "PNG 图片";
573
+ readonly 'toolbar.export.svg': "SVG 矢量图";
574
+ readonly 'toolbar.export.pdf': "PDF 文档";
575
+ readonly 'shape.mind-map': "思维导图";
576
+ readonly 'mindmap.defaultRoot': "中心主题";
577
+ readonly 'mindmap.defaultBranch': "分支主题";
578
+ readonly 'mindmap.nodeText': "节点文本";
579
+ readonly 'mindmap.addChild': "子节点";
580
+ readonly 'mindmap.addSibling': "兄弟节点";
581
+ readonly 'mindmap.deleteNode': "删除节点";
582
+ readonly 'mindmap.color': "颜色";
583
+ readonly 'mindmap.levelColor': "默认层级色";
584
+ readonly 'mindmap.icon': "图标";
585
+ readonly 'mindmap.noIcon': "无图标";
586
+ readonly 'mindmap.note': "属性说明";
587
+ readonly 'mindmap.notePlaceholder': "说明内容(可选)";
588
+ readonly 'mindmap.noteColor': "说明颜色";
589
+ readonly 'mindmap.noteColorDefault': "同节点色";
590
+ readonly 'mindmap.collapse': "折叠";
591
+ readonly 'mindmap.expand': "展开";
592
+ readonly 'mindmap.close': "关闭编辑";
593
+ readonly 'mindmap.more': "更多设置";
744
594
  };
745
- type MessageKey = keyof typeof dictionaries['zh-CN'];
595
+ type MessageKey = keyof typeof zhCN;
746
596
  type LanguageListener = () => void;
747
597
  declare function setLanguage(language: Language): void;
748
598
  declare function getLanguage(): Language;
@@ -1917,4 +1767,4 @@ declare function countMindMapNodes(root: MindMapNode): number;
1917
1767
  */
1918
1768
  declare function layoutMindMap(root: MindMapNode): MindMapLayoutResult;
1919
1769
 
1920
- export { type ArrowBinding, type ArrowHeadType, type ArrowShape, type ArrowStyle, ArrowTool, Camera, type CameraState, type CircleShape, type ConnectionType, DEFAULT_HIGHLIGHTER_COLOR, type DiamondShape, type DrawShape, type DrawuiTheme, type DrawuiThemeSelection, Editor, type EditorData, type EditorOptions, type EditorState, type EllipseShape, type ExportFormat, type ExportOptions, type FreehandMode, FreehandTool, type GenerationContext, HandTool, type HexagonShape, type Language, type LineShape, LineTool, MINDMAP_COLORS, MINDMAP_FONT_SIZE, MINDMAP_MAX_WIDTH, MINDMAP_MIN_WIDTH, MINDMAP_NODE_HEIGHT, MIN_HANDLE_SEGMENT, MIN_JOG, Mat2d, type MessageKey, type MindMapLayoutResult, type MindMapNode, type MindMapNodePos, type MindMapShape, type OctagonShape, type ParallelogramShape, type PentagonShape, type Rect, type RectangleShape, Renderer, type RoundedRectangleShape, type SegmentHandle, SelectTool, type Shape, type ShapeStyle, ShapeTool, type ShapeType, type SnapGuide, type StarShape, THEME, type TextShape, type ToolType, type TrapezoidShape, type TriangleShape, UML_FONT_SIZE, UML_HEADER_HEIGHT, UML_LINE_HEIGHT, UML_MIN_WIDTH, UML_PADDING_X, UML_PADDING_Y, type UiEvent, type UmlAttribute, type UmlClassShape, type UmlInterfaceShape, type UmlMethod, type UmlVisibility, Vec, type Vec2 as Vec2Type, calcUmlClassSize, cloneMindMapNode, collapseRoute, connectorSegmentHandles, countMindMapNodes, downloadBlob, exportToBlob, findMindMapNode, getContentBounds, getLanguage, getMindMapNodeDepth, getMindMapParent, getTheme, hexToRgba, layoutMindMap, mindMapNodeColor, mindMapNodeSize, offsetConnectorSegment, pickSegmentHandle, pointToSegmentDistance, renderSVGString, renderToCanvas, routeToUserPoints, setLanguage, setTheme, shadeColor, subscribeLanguage, subscribeTheme, t };
1770
+ export { type ArrowBinding, type ArrowHeadType, type ArrowShape, type ArrowStyle, ArrowTool, Camera, type CameraState, type CircleShape, type ConnectionType, DEFAULT_HIGHLIGHTER_COLOR, type DiamondShape, type DrawShape, type DrawuiTheme, type DrawuiThemeSelection, Editor, type EditorData, type EditorOptions, type EditorState, type EllipseShape, type ExportFormat, type ExportOptions, type FreehandMode, FreehandTool, type GenerationContext, HandTool, type HexagonShape, LANGUAGES, type Language, type LineShape, LineTool, MINDMAP_COLORS, MINDMAP_FONT_SIZE, MINDMAP_MAX_WIDTH, MINDMAP_MIN_WIDTH, MINDMAP_NODE_HEIGHT, MIN_HANDLE_SEGMENT, MIN_JOG, Mat2d, type MessageKey, type MindMapLayoutResult, type MindMapNode, type MindMapNodePos, type MindMapShape, type OctagonShape, type ParallelogramShape, type PentagonShape, type Rect, type RectangleShape, Renderer, type RoundedRectangleShape, type SegmentHandle, SelectTool, type Shape, type ShapeStyle, ShapeTool, type ShapeType, type SnapGuide, type StarShape, THEME, type TextShape, type ToolType, type TrapezoidShape, type TriangleShape, UML_FONT_SIZE, UML_HEADER_HEIGHT, UML_LINE_HEIGHT, UML_MIN_WIDTH, UML_PADDING_X, UML_PADDING_Y, type UiEvent, type UmlAttribute, type UmlClassShape, type UmlInterfaceShape, type UmlMethod, type UmlVisibility, Vec, type Vec2 as Vec2Type, calcUmlClassSize, cloneMindMapNode, collapseRoute, connectorSegmentHandles, countMindMapNodes, downloadBlob, exportToBlob, findMindMapNode, getContentBounds, getLanguage, getMindMapNodeDepth, getMindMapParent, getTheme, hexToRgba, layoutMindMap, mindMapNodeColor, mindMapNodeSize, offsetConnectorSegment, pickSegmentHandle, pointToSegmentDistance, renderSVGString, renderToCanvas, routeToUserPoints, setLanguage, setTheme, shadeColor, subscribeLanguage, subscribeTheme, t };