@plait/mind 0.27.0-next.1 → 0.27.0-next.3

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 (113) hide show
  1. package/base/emoji-base.component.d.ts +1 -1
  2. package/base/image-base.component.d.ts +1 -1
  3. package/constants/node-topic-style.d.ts +4 -0
  4. package/{esm2020 → esm2022}/base/emoji-base.component.mjs +4 -4
  5. package/esm2022/base/image-base.component.mjs +75 -0
  6. package/esm2022/constants/node-topic-style.mjs +12 -0
  7. package/esm2022/interfaces/element-data.mjs +2 -0
  8. package/{esm2020 → esm2022}/mind.component.mjs +6 -6
  9. package/{esm2020 → esm2022}/mind.module.mjs +5 -5
  10. package/esm2022/node.component.mjs +251 -0
  11. package/esm2022/plugins/with-mind-create.mjs +112 -0
  12. package/esm2022/utils/draw/abstract-outline.mjs +117 -0
  13. package/esm2022/utils/node/create-node.mjs +55 -0
  14. package/esm2022/utils/position/node.mjs +36 -0
  15. package/{fesm2020 → fesm2022}/plait-mind.mjs +241 -225
  16. package/fesm2022/plait-mind.mjs.map +1 -0
  17. package/interfaces/element-data.d.ts +2 -2
  18. package/package.json +7 -13
  19. package/utils/abstract/common.d.ts +2 -2
  20. package/utils/node/create-node.d.ts +4 -4
  21. package/utils/position/node.d.ts +1 -1
  22. package/esm2020/base/image-base.component.mjs +0 -72
  23. package/esm2020/constants/node-topic-style.mjs +0 -8
  24. package/esm2020/interfaces/element-data.mjs +0 -2
  25. package/esm2020/node.component.mjs +0 -248
  26. package/esm2020/plugins/with-mind-create.mjs +0 -109
  27. package/esm2020/utils/draw/abstract-outline.mjs +0 -117
  28. package/esm2020/utils/node/create-node.mjs +0 -52
  29. package/esm2020/utils/position/node.mjs +0 -34
  30. package/fesm2015/plait-mind.mjs +0 -4382
  31. package/fesm2015/plait-mind.mjs.map +0 -1
  32. package/fesm2020/plait-mind.mjs.map +0 -1
  33. /package/{esm2020 → esm2022}/base/base.drawer.mjs +0 -0
  34. /package/{esm2020 → esm2022}/base/index.mjs +0 -0
  35. /package/{esm2020 → esm2022}/constants/abstract-node.mjs +0 -0
  36. /package/{esm2020 → esm2022}/constants/default.mjs +0 -0
  37. /package/{esm2020 → esm2022}/constants/image.mjs +0 -0
  38. /package/{esm2020 → esm2022}/constants/index.mjs +0 -0
  39. /package/{esm2020 → esm2022}/constants/node-style.mjs +0 -0
  40. /package/{esm2020 → esm2022}/constants/theme.mjs +0 -0
  41. /package/{esm2020 → esm2022}/drawer/node-active.drawer.mjs +0 -0
  42. /package/{esm2020 → esm2022}/drawer/node-collapse.drawer.mjs +0 -0
  43. /package/{esm2020 → esm2022}/drawer/node-emojis.drawer.mjs +0 -0
  44. /package/{esm2020 → esm2022}/drawer/node-image.drawer.mjs +0 -0
  45. /package/{esm2020 → esm2022}/drawer/node-insert.drawer.mjs +0 -0
  46. /package/{esm2020 → esm2022}/interfaces/element.mjs +0 -0
  47. /package/{esm2020 → esm2022}/interfaces/index.mjs +0 -0
  48. /package/{esm2020 → esm2022}/interfaces/layout.mjs +0 -0
  49. /package/{esm2020 → esm2022}/interfaces/node.mjs +0 -0
  50. /package/{esm2020 → esm2022}/interfaces/options.mjs +0 -0
  51. /package/{esm2020 → esm2022}/interfaces/pointer.mjs +0 -0
  52. /package/{esm2020 → esm2022}/interfaces/theme-color.mjs +0 -0
  53. /package/{esm2020 → esm2022}/interfaces/types.mjs +0 -0
  54. /package/{esm2020 → esm2022}/plait-mind.mjs +0 -0
  55. /package/{esm2020 → esm2022}/plugins/with-abstract-resize.board.mjs +0 -0
  56. /package/{esm2020 → esm2022}/plugins/with-abstract-resize.mjs +0 -0
  57. /package/{esm2020 → esm2022}/plugins/with-mind-extend.mjs +0 -0
  58. /package/{esm2020 → esm2022}/plugins/with-mind-hotkey.mjs +0 -0
  59. /package/{esm2020 → esm2022}/plugins/with-mind.board.mjs +0 -0
  60. /package/{esm2020 → esm2022}/plugins/with-mind.mjs +0 -0
  61. /package/{esm2020 → esm2022}/plugins/with-node-dnd.mjs +0 -0
  62. /package/{esm2020 → esm2022}/plugins/with-node-hover-detect.mjs +0 -0
  63. /package/{esm2020 → esm2022}/plugins/with-node-image-resize.mjs +0 -0
  64. /package/{esm2020 → esm2022}/plugins/with-node-image.mjs +0 -0
  65. /package/{esm2020 → esm2022}/plugins/with-node-resize.mjs +0 -0
  66. /package/{esm2020 → esm2022}/public-api.mjs +0 -0
  67. /package/{esm2020 → esm2022}/queries/get-available-sublayouts-by-element.mjs +0 -0
  68. /package/{esm2020 → esm2022}/queries/get-branch-layouts.mjs +0 -0
  69. /package/{esm2020 → esm2022}/queries/get-correct-layout-by-element.mjs +0 -0
  70. /package/{esm2020 → esm2022}/queries/get-layout-by-element.mjs +0 -0
  71. /package/{esm2020 → esm2022}/queries/index.mjs +0 -0
  72. /package/{esm2020 → esm2022}/transforms/abstract-node.mjs +0 -0
  73. /package/{esm2020 → esm2022}/transforms/emoji.mjs +0 -0
  74. /package/{esm2020 → esm2022}/transforms/image.mjs +0 -0
  75. /package/{esm2020 → esm2022}/transforms/index.mjs +0 -0
  76. /package/{esm2020 → esm2022}/transforms/layout.mjs +0 -0
  77. /package/{esm2020 → esm2022}/transforms/node.mjs +0 -0
  78. /package/{esm2020 → esm2022}/utils/abstract/common.mjs +0 -0
  79. /package/{esm2020 → esm2022}/utils/abstract/resize.mjs +0 -0
  80. /package/{esm2020 → esm2022}/utils/clipboard.mjs +0 -0
  81. /package/{esm2020 → esm2022}/utils/dnd/common.mjs +0 -0
  82. /package/{esm2020 → esm2022}/utils/dnd/detector.mjs +0 -0
  83. /package/{esm2020 → esm2022}/utils/draw/node-dnd.mjs +0 -0
  84. /package/{esm2020 → esm2022}/utils/draw/node-link/abstract-link.mjs +0 -0
  85. /package/{esm2020 → esm2022}/utils/draw/node-link/draw-link.mjs +0 -0
  86. /package/{esm2020 → esm2022}/utils/draw/node-link/indented-link.mjs +0 -0
  87. /package/{esm2020 → esm2022}/utils/draw/node-link/logic-link.mjs +0 -0
  88. /package/{esm2020 → esm2022}/utils/draw/node-shape.mjs +0 -0
  89. /package/{esm2020 → esm2022}/utils/index.mjs +0 -0
  90. /package/{esm2020 → esm2022}/utils/layout.mjs +0 -0
  91. /package/{esm2020 → esm2022}/utils/mind.mjs +0 -0
  92. /package/{esm2020 → esm2022}/utils/node/adjust-node.mjs +0 -0
  93. /package/{esm2020 → esm2022}/utils/node/common.mjs +0 -0
  94. /package/{esm2020 → esm2022}/utils/node/dynamic-width.mjs +0 -0
  95. /package/{esm2020 → esm2022}/utils/node/image.mjs +0 -0
  96. /package/{esm2020 → esm2022}/utils/node/index.mjs +0 -0
  97. /package/{esm2020 → esm2022}/utils/node/right-node-count.mjs +0 -0
  98. /package/{esm2020 → esm2022}/utils/node-hover/extend.mjs +0 -0
  99. /package/{esm2020 → esm2022}/utils/node-style/branch.mjs +0 -0
  100. /package/{esm2020 → esm2022}/utils/node-style/common.mjs +0 -0
  101. /package/{esm2020 → esm2022}/utils/node-style/index.mjs +0 -0
  102. /package/{esm2020 → esm2022}/utils/node-style/shape.mjs +0 -0
  103. /package/{esm2020 → esm2022}/utils/path.mjs +0 -0
  104. /package/{esm2020 → esm2022}/utils/point-placement.mjs +0 -0
  105. /package/{esm2020 → esm2022}/utils/position/emoji.mjs +0 -0
  106. /package/{esm2020 → esm2022}/utils/position/image.mjs +0 -0
  107. /package/{esm2020 → esm2022}/utils/position/index.mjs +0 -0
  108. /package/{esm2020 → esm2022}/utils/position/topic.mjs +0 -0
  109. /package/{esm2020 → esm2022}/utils/space/emoji.mjs +0 -0
  110. /package/{esm2020 → esm2022}/utils/space/index.mjs +0 -0
  111. /package/{esm2020 → esm2022}/utils/space/layout-options.mjs +0 -0
  112. /package/{esm2020 → esm2022}/utils/space/node-space.mjs +0 -0
  113. /package/{esm2020 → esm2022}/utils/weak-maps.mjs +0 -0
@@ -1,11 +1,11 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { Component, ChangeDetectionStrategy, NgModule, NgZone, Directive, Input, HostListener } from '@angular/core';
3
3
  import * as i2 from '@plait/core';
4
- import { DefaultThemeColor, ColorfulThemeColor, SoftThemeColor, RetroThemeColor, DarkThemeColor, StarryThemeColor, RectangleClient, PlaitElement, PlaitPluginKey, getSelectedElements, idCreator, isNullOrUndefined, Transforms, clearSelectedElement, addSelectedElement, PlaitBoard, Path, PlaitNode, PlaitContextService, depthFirstRecursion, getIsRecursionFunc, drawLinearPath, drawBezierPath, createG, updateForeignObject, drawRoundRectangle, getRectangleByElements, NODE_TO_PARENT, distanceBetweenPointAndRectangle, createForeignObject, createText, PlaitPointerType, PlaitPluginElementComponent, NODE_TO_INDEX, PlaitModule, isMainPointer, transformPoint, toPoint, getHitElements, distanceBetweenPointAndPoint, setClipboardData, setClipboardDataByText, BOARD_TO_HOST, throttleRAF, BoardTransforms, removeSelectedElement, PlaitHistoryBoard, hotkeys, setClipboardDataByMedia, getClipboardDataByMedia, ResizeCursorClass, preventTouchMove, PRESS_AND_MOVE_BUFFER, MERGING, getDataFromClipboard } from '@plait/core';
5
- import { MindLayoutType, isIndentedLayout, AbstractNode, isStandardLayout, isHorizontalLogicLayout, isVerticalLogicLayout, getNonAbstractChildren, isLeftLayout, isRightLayout, isTopLayout, isBottomLayout, isHorizontalLayout, getCorrectStartEnd, ConnectingPosition, getAbstractLayout, GlobalLayout } from '@plait/layouts';
4
+ import { DefaultThemeColor, ColorfulThemeColor, SoftThemeColor, RetroThemeColor, DarkThemeColor, StarryThemeColor, RectangleClient, PlaitElement, PlaitPluginKey, getSelectedElements, idCreator, isNullOrUndefined, Transforms, clearSelectedElement, addSelectedElement, PlaitBoard, Path, PlaitNode, PlaitContextService, depthFirstRecursion, getIsRecursionFunc, drawLinearPath, drawBezierPath, createG, updateForeignObject, drawRoundRectangle, getRectangleByElements, NODE_TO_PARENT, distanceBetweenPointAndRectangle, createForeignObject, setStrokeLinecap, createText, PlaitPointerType, PlaitPluginElementComponent, NODE_TO_INDEX, PlaitModule, isMainPointer, transformPoint, toPoint, getHitElements, distanceBetweenPointAndPoint, setClipboardData, setClipboardDataByText, BOARD_TO_HOST, BoardTransforms, throttleRAF, removeSelectedElement, PlaitHistoryBoard, hotkeys, setClipboardDataByMedia, getClipboardDataByMedia, ResizeCursorClass, preventTouchMove, PRESS_AND_MOVE_BUFFER, MERGING, getDataFromClipboard } from '@plait/core';
5
+ import { MindLayoutType, isIndentedLayout, isHorizontalLayout, isHorizontalLogicLayout, ConnectingPosition, AbstractNode, isStandardLayout, isVerticalLogicLayout, getNonAbstractChildren, isLeftLayout, isRightLayout, isTopLayout, isBottomLayout, getCorrectStartEnd, getAbstractLayout, GlobalLayout } from '@plait/layouts';
6
6
  import { PlaitMarkEditor, MarkTypes, DEFAULT_FONT_SIZE, TEXT_DEFAULT_HEIGHT, buildText, getTextSize, TextManage, ExitOrigin, TextModule, getTextFromClipboard } from '@plait/text';
7
7
  import { fromEvent, Subject } from 'rxjs';
8
- import { RESIZE_HANDLE_DIAMETER, getRectangleResizeHandleRefs, isExpandHotkey, isTabHotkey, isEnterHotkey, isVirtualKey, isSpaceHotkey, MediaKeys, ResizeHandle, withResize, ActiveGenerator } from '@plait/common';
8
+ import { RESIZE_HANDLE_DIAMETER, getRectangleResizeHandleRefs, isDrawingMode, isDndMode, setCreationMode, BoardCreationMode, isExpandHotkey, isTabHotkey, isEnterHotkey, isVirtualKey, isSpaceHotkey, MediaKeys, ResizeHandle, withResize, ActiveGenerator } from '@plait/common';
9
9
  import { Node as Node$1, Path as Path$1 } from 'slate';
10
10
  import { pointsOnBezierCurves } from 'points-on-curve';
11
11
  import { take, filter } from 'rxjs/operators';
@@ -214,9 +214,13 @@ const TOPIC_COLOR = '#333';
214
214
  const TOPIC_FONT_SIZE = 14;
215
215
  const ROOT_TOPIC_FONT_SIZE = 18;
216
216
  const ROOT_TOPIC_HEIGHT = 25;
217
+ const ROOT_TOPIC_WIDTH = 72;
217
218
  const TOPIC_DEFAULT_MAX_WORD_COUNT = 34;
218
219
  const DEFAULT_FONT_FAMILY = 'PingFangSC-Regular, "PingFang SC"';
219
220
  const BRANCH_FONT_FAMILY = 'PingFangSC-Medium, "PingFang SC"';
221
+ const NodeTopicThreshold = {
222
+ defaultTextMaxWidth: 34 * 14,
223
+ };
220
224
 
221
225
  const NodeDefaultSpace = {
222
226
  horizontal: {
@@ -443,15 +447,187 @@ const getSelectedMindElements = (board) => {
443
447
  return selectedElements;
444
448
  };
445
449
 
446
- const createEmptyMind = (point) => {
447
- const element = createMindElement('思维导图', 72, ROOT_TOPIC_HEIGHT, { layout: MindLayoutType.right });
450
+ const getBranchDirectionsByLayouts = (branchLayouts) => {
451
+ const branchDirections = [];
452
+ branchLayouts.forEach(l => {
453
+ const directions = LayoutDirectionsMap[l];
454
+ directions.forEach(d => {
455
+ if (!branchDirections.includes(d) && !branchDirections.includes(getLayoutReverseDirection(d))) {
456
+ branchDirections.push(d);
457
+ }
458
+ });
459
+ });
460
+ return branchDirections;
461
+ };
462
+ const isCorrectLayout = (root, layout) => {
463
+ const rootLayout = root.layout || getDefaultLayout();
464
+ return !getInCorrectLayoutDirection(rootLayout, layout);
465
+ };
466
+ const isMixedLayout = (parentLayout, layout) => {
467
+ return (!isIndentedLayout(parentLayout) && isIndentedLayout(layout)) || (isIndentedLayout(parentLayout) && !isIndentedLayout(layout));
468
+ };
469
+ const getInCorrectLayoutDirection = (rootLayout, layout) => {
470
+ const directions = LayoutDirectionsMap[rootLayout];
471
+ const subLayoutDirections = LayoutDirectionsMap[layout];
472
+ if (!subLayoutDirections) {
473
+ throw new Error(`unexpected layout: ${layout} on correct layout`);
474
+ }
475
+ return subLayoutDirections.find(d => directions.includes(getLayoutReverseDirection(d)));
476
+ };
477
+ const correctLayoutByDirection = (layout, direction) => {
478
+ const isHorizontal = direction === LayoutDirection.left || direction === LayoutDirection.right ? true : false;
479
+ let inverseDirectionLayout = MindLayoutType.standard;
480
+ switch (layout) {
481
+ case MindLayoutType.left:
482
+ inverseDirectionLayout = MindLayoutType.right;
483
+ break;
484
+ case MindLayoutType.right:
485
+ inverseDirectionLayout = MindLayoutType.left;
486
+ break;
487
+ case MindLayoutType.downward:
488
+ inverseDirectionLayout = MindLayoutType.upward;
489
+ break;
490
+ case MindLayoutType.upward:
491
+ inverseDirectionLayout = MindLayoutType.downward;
492
+ break;
493
+ case MindLayoutType.rightBottomIndented:
494
+ inverseDirectionLayout = isHorizontal ? MindLayoutType.leftBottomIndented : MindLayoutType.rightTopIndented;
495
+ break;
496
+ case MindLayoutType.leftBottomIndented:
497
+ inverseDirectionLayout = isHorizontal ? MindLayoutType.rightBottomIndented : MindLayoutType.leftTopIndented;
498
+ break;
499
+ case MindLayoutType.rightTopIndented:
500
+ inverseDirectionLayout = isHorizontal ? MindLayoutType.leftTopIndented : MindLayoutType.rightBottomIndented;
501
+ break;
502
+ case MindLayoutType.leftTopIndented:
503
+ inverseDirectionLayout = isHorizontal ? MindLayoutType.rightTopIndented : MindLayoutType.leftBottomIndented;
504
+ break;
505
+ }
506
+ return inverseDirectionLayout;
507
+ };
508
+ const getLayoutDirection$1 = (root) => {
509
+ const layout = root.layout || getDefaultLayout();
510
+ return LayoutDirectionsMap[layout];
511
+ };
512
+ const getDefaultLayout = () => {
513
+ return MindLayoutType.standard;
514
+ };
515
+ const getAvailableSubLayoutsByLayoutDirections = (directions) => {
516
+ const result = [];
517
+ const reverseDirections = directions.map(getLayoutReverseDirection);
518
+ for (const key in MindLayoutType) {
519
+ const layout = MindLayoutType[key];
520
+ const layoutDirections = LayoutDirectionsMap[layout];
521
+ if (layoutDirections) {
522
+ const hasSameDirection = layoutDirections.some(d => directions.includes(d));
523
+ const hasReverseDirection = layoutDirections.some(r => reverseDirections.includes(r));
524
+ if (hasSameDirection && !hasReverseDirection) {
525
+ result.push(layout);
526
+ }
527
+ }
528
+ }
529
+ return result;
530
+ };
531
+ const getLayoutReverseDirection = (layoutDirection) => {
532
+ let reverseDirection = LayoutDirection.right;
533
+ switch (layoutDirection) {
534
+ case LayoutDirection.top:
535
+ reverseDirection = LayoutDirection.bottom;
536
+ break;
537
+ case LayoutDirection.bottom:
538
+ reverseDirection = LayoutDirection.top;
539
+ break;
540
+ case LayoutDirection.right:
541
+ reverseDirection = LayoutDirection.left;
542
+ break;
543
+ case LayoutDirection.left:
544
+ reverseDirection = LayoutDirection.right;
545
+ break;
546
+ }
547
+ return reverseDirection;
548
+ };
549
+ const getRootLayout = (root) => {
550
+ return root.layout || getDefaultLayout();
551
+ };
552
+
553
+ const getLayoutOptions = (board) => {
554
+ function getMainAxle(element, parent) {
555
+ const strokeWidth = element.strokeWidth || STROKE_WIDTH;
556
+ if (element.isRoot) {
557
+ return BASE * 12;
558
+ }
559
+ if (parent && parent.isRoot()) {
560
+ return BASE * 3 + strokeWidth / 2;
561
+ }
562
+ return BASE * 3 + strokeWidth / 2;
563
+ }
564
+ function getSecondAxle(element, parent) {
565
+ const strokeWidth = element.strokeWidth || STROKE_WIDTH;
566
+ if (element.isRoot) {
567
+ return BASE * 10 + strokeWidth / 2;
568
+ }
569
+ return BASE * 6 + strokeWidth / 2;
570
+ }
571
+ return {
572
+ getHeight(element) {
573
+ return NodeSpace.getNodeHeight(board, element);
574
+ },
575
+ getWidth(element) {
576
+ return NodeSpace.getNodeWidth(board, element);
577
+ },
578
+ getHorizontalGap(element, parent) {
579
+ const _layout = (parent && parent.layout) || getRootLayout(element);
580
+ const isHorizontal = isHorizontalLayout(_layout);
581
+ const strokeWidth = element.strokeWidth || STROKE_WIDTH;
582
+ if (isIndentedLayout(_layout)) {
583
+ return BASE * 4 + strokeWidth;
584
+ }
585
+ if (!isHorizontal) {
586
+ return getMainAxle(element, parent);
587
+ }
588
+ else {
589
+ return getSecondAxle(element, parent);
590
+ }
591
+ },
592
+ getVerticalGap(element, parent) {
593
+ const _layout = (parent && parent.layout) || getRootLayout(element);
594
+ if (isIndentedLayout(_layout)) {
595
+ return BASE;
596
+ }
597
+ const isHorizontal = isHorizontalLayout(_layout);
598
+ if (isHorizontal) {
599
+ return getMainAxle(element, parent);
600
+ }
601
+ else {
602
+ return getSecondAxle(element, parent);
603
+ }
604
+ },
605
+ getVerticalConnectingPosition(element, parent) {
606
+ if (element.shape === MindElementShape.underline && parent && isHorizontalLogicLayout(parent.layout)) {
607
+ return ConnectingPosition.bottom;
608
+ }
609
+ return undefined;
610
+ },
611
+ getExtendHeight(node) {
612
+ return BASE * 6;
613
+ },
614
+ getIndentedCrossLevelGap() {
615
+ return BASE * 2;
616
+ }
617
+ };
618
+ };
619
+
620
+ const createEmptyMind = (board, point) => {
621
+ const element = createMindElement('思维导图', ROOT_TOPIC_WIDTH, ROOT_TOPIC_HEIGHT, { layout: MindLayoutType.right });
448
622
  element.isRoot = true;
449
- element.points = [point];
450
623
  element.type = 'mindmap';
624
+ const width = NodeSpace.getNodeWidth(board, element);
625
+ const height = NodeSpace.getNodeHeight(board, element);
626
+ element.points = [[point[0] - width / 2, point[1] - height / 2]];
451
627
  return element;
452
628
  };
453
629
  const createDefaultMind = (point, rightNodeCount, layout) => {
454
- const root = createMindElement('思维导图', 72, ROOT_TOPIC_HEIGHT, { layout });
630
+ const root = createMindElement('思维导图', ROOT_TOPIC_WIDTH, ROOT_TOPIC_HEIGHT, { layout });
455
631
  root.rightNodeCount = rightNodeCount;
456
632
  root.isRoot = true;
457
633
  root.type = 'mindmap';
@@ -584,109 +760,6 @@ const divideElementByParent = (elements) => {
584
760
  return { parentElements, abstractIncludedGroups };
585
761
  };
586
762
 
587
- const getBranchDirectionsByLayouts = (branchLayouts) => {
588
- const branchDirections = [];
589
- branchLayouts.forEach(l => {
590
- const directions = LayoutDirectionsMap[l];
591
- directions.forEach(d => {
592
- if (!branchDirections.includes(d) && !branchDirections.includes(getLayoutReverseDirection(d))) {
593
- branchDirections.push(d);
594
- }
595
- });
596
- });
597
- return branchDirections;
598
- };
599
- const isCorrectLayout = (root, layout) => {
600
- const rootLayout = root.layout || getDefaultLayout();
601
- return !getInCorrectLayoutDirection(rootLayout, layout);
602
- };
603
- const isMixedLayout = (parentLayout, layout) => {
604
- return (!isIndentedLayout(parentLayout) && isIndentedLayout(layout)) || (isIndentedLayout(parentLayout) && !isIndentedLayout(layout));
605
- };
606
- const getInCorrectLayoutDirection = (rootLayout, layout) => {
607
- const directions = LayoutDirectionsMap[rootLayout];
608
- const subLayoutDirections = LayoutDirectionsMap[layout];
609
- if (!subLayoutDirections) {
610
- throw new Error(`unexpected layout: ${layout} on correct layout`);
611
- }
612
- return subLayoutDirections.find(d => directions.includes(getLayoutReverseDirection(d)));
613
- };
614
- const correctLayoutByDirection = (layout, direction) => {
615
- const isHorizontal = direction === LayoutDirection.left || direction === LayoutDirection.right ? true : false;
616
- let inverseDirectionLayout = MindLayoutType.standard;
617
- switch (layout) {
618
- case MindLayoutType.left:
619
- inverseDirectionLayout = MindLayoutType.right;
620
- break;
621
- case MindLayoutType.right:
622
- inverseDirectionLayout = MindLayoutType.left;
623
- break;
624
- case MindLayoutType.downward:
625
- inverseDirectionLayout = MindLayoutType.upward;
626
- break;
627
- case MindLayoutType.upward:
628
- inverseDirectionLayout = MindLayoutType.downward;
629
- break;
630
- case MindLayoutType.rightBottomIndented:
631
- inverseDirectionLayout = isHorizontal ? MindLayoutType.leftBottomIndented : MindLayoutType.rightTopIndented;
632
- break;
633
- case MindLayoutType.leftBottomIndented:
634
- inverseDirectionLayout = isHorizontal ? MindLayoutType.rightBottomIndented : MindLayoutType.leftTopIndented;
635
- break;
636
- case MindLayoutType.rightTopIndented:
637
- inverseDirectionLayout = isHorizontal ? MindLayoutType.leftTopIndented : MindLayoutType.rightBottomIndented;
638
- break;
639
- case MindLayoutType.leftTopIndented:
640
- inverseDirectionLayout = isHorizontal ? MindLayoutType.rightTopIndented : MindLayoutType.leftBottomIndented;
641
- break;
642
- }
643
- return inverseDirectionLayout;
644
- };
645
- const getLayoutDirection$1 = (root) => {
646
- const layout = root.layout || getDefaultLayout();
647
- return LayoutDirectionsMap[layout];
648
- };
649
- const getDefaultLayout = () => {
650
- return MindLayoutType.standard;
651
- };
652
- const getAvailableSubLayoutsByLayoutDirections = (directions) => {
653
- const result = [];
654
- const reverseDirections = directions.map(getLayoutReverseDirection);
655
- for (const key in MindLayoutType) {
656
- const layout = MindLayoutType[key];
657
- const layoutDirections = LayoutDirectionsMap[layout];
658
- if (layoutDirections) {
659
- const hasSameDirection = layoutDirections.some(d => directions.includes(d));
660
- const hasReverseDirection = layoutDirections.some(r => reverseDirections.includes(r));
661
- if (hasSameDirection && !hasReverseDirection) {
662
- result.push(layout);
663
- }
664
- }
665
- }
666
- return result;
667
- };
668
- const getLayoutReverseDirection = (layoutDirection) => {
669
- let reverseDirection = LayoutDirection.right;
670
- switch (layoutDirection) {
671
- case LayoutDirection.top:
672
- reverseDirection = LayoutDirection.bottom;
673
- break;
674
- case LayoutDirection.bottom:
675
- reverseDirection = LayoutDirection.top;
676
- break;
677
- case LayoutDirection.right:
678
- reverseDirection = LayoutDirection.left;
679
- break;
680
- case LayoutDirection.left:
681
- reverseDirection = LayoutDirection.right;
682
- break;
683
- }
684
- return reverseDirection;
685
- };
686
- const getRootLayout = (root) => {
687
- return root.layout || getDefaultLayout();
688
- };
689
-
690
763
  const adjustRootToNode = (board, node) => {
691
764
  const newNode = { ...node };
692
765
  delete newNode.isRoot;
@@ -2190,73 +2263,6 @@ const deleteElementsHandleRightNodeCount = (board, deletableElements, effectedRi
2190
2263
  return effectedRightNodeCount;
2191
2264
  };
2192
2265
 
2193
- const getLayoutOptions = (board) => {
2194
- function getMainAxle(element, parent) {
2195
- const strokeWidth = element.strokeWidth || STROKE_WIDTH;
2196
- if (element.isRoot) {
2197
- return BASE * 12;
2198
- }
2199
- if (parent && parent.isRoot()) {
2200
- return BASE * 3 + strokeWidth / 2;
2201
- }
2202
- return BASE * 3 + strokeWidth / 2;
2203
- }
2204
- function getSecondAxle(element, parent) {
2205
- const strokeWidth = element.strokeWidth || STROKE_WIDTH;
2206
- if (element.isRoot) {
2207
- return BASE * 10 + strokeWidth / 2;
2208
- }
2209
- return BASE * 6 + strokeWidth / 2;
2210
- }
2211
- return {
2212
- getHeight(element) {
2213
- return NodeSpace.getNodeHeight(board, element);
2214
- },
2215
- getWidth(element) {
2216
- return NodeSpace.getNodeWidth(board, element);
2217
- },
2218
- getHorizontalGap(element, parent) {
2219
- const _layout = (parent && parent.layout) || getRootLayout(element);
2220
- const isHorizontal = isHorizontalLayout(_layout);
2221
- const strokeWidth = element.strokeWidth || STROKE_WIDTH;
2222
- if (isIndentedLayout(_layout)) {
2223
- return BASE * 4 + strokeWidth;
2224
- }
2225
- if (!isHorizontal) {
2226
- return getMainAxle(element, parent);
2227
- }
2228
- else {
2229
- return getSecondAxle(element, parent);
2230
- }
2231
- },
2232
- getVerticalGap(element, parent) {
2233
- const _layout = (parent && parent.layout) || getRootLayout(element);
2234
- if (isIndentedLayout(_layout)) {
2235
- return BASE;
2236
- }
2237
- const isHorizontal = isHorizontalLayout(_layout);
2238
- if (isHorizontal) {
2239
- return getMainAxle(element, parent);
2240
- }
2241
- else {
2242
- return getSecondAxle(element, parent);
2243
- }
2244
- },
2245
- getVerticalConnectingPosition(element, parent) {
2246
- if (element.shape === MindElementShape.underline && parent && isHorizontalLogicLayout(parent.layout)) {
2247
- return ConnectingPosition.bottom;
2248
- }
2249
- return undefined;
2250
- },
2251
- getExtendHeight(node) {
2252
- return BASE * 6;
2253
- },
2254
- getIndentedCrossLevelGap() {
2255
- return BASE * 2;
2256
- }
2257
- };
2258
- };
2259
-
2260
2266
  /**
2261
2267
  * get correctly layout:
2262
2268
  * 1. root is standard -> left or right
@@ -2478,12 +2484,14 @@ function getRectangleByNode(node) {
2478
2484
  height
2479
2485
  };
2480
2486
  }
2481
- function getRectangleByElement(board, originPoint, element) {
2487
+ function getRectangleByElement(board, element) {
2488
+ const width = NodeSpace.getNodeWidth(board, element);
2489
+ const height = NodeSpace.getNodeHeight(board, element);
2482
2490
  const nodeRectangle = {
2483
- x: originPoint[0],
2484
- y: originPoint[1],
2485
- width: NodeSpace.getNodeWidth(board, element),
2486
- height: NodeSpace.getNodeHeight(board, element)
2491
+ x: element.points[0][0],
2492
+ y: element.points[0][1],
2493
+ width,
2494
+ height
2487
2495
  };
2488
2496
  return nodeRectangle;
2489
2497
  }
@@ -2781,8 +2789,8 @@ function drawAbstractIncludedOutline(board, roughSVG, element, activeHandlePosit
2781
2789
  const startHandle = roughSVG.line(startPoint1[0], startPoint1[1], startPoint2[0], startPoint2[1], getHandleOption(activeHandlePosition === AbstractHandlePosition.start));
2782
2790
  const endHandle = roughSVG.line(endPoint1[0], endPoint1[1], endPoint2[0], endPoint2[1], getHandleOption(activeHandlePosition === AbstractHandlePosition.end));
2783
2791
  handleBoardClass(board, activeHandlePosition, isHorizontal);
2784
- startHandle.setAttribute('stroke-linecap', 'round');
2785
- endHandle.setAttribute('stroke-linecap', 'round');
2792
+ setStrokeLinecap(startHandle, 'round');
2793
+ setStrokeLinecap(endHandle, 'round');
2786
2794
  abstractIncludedG.append(startHandle);
2787
2795
  abstractIncludedG.append(endHandle);
2788
2796
  abstractIncludedG.append(rectangle);
@@ -3078,7 +3086,10 @@ class MindNodeComponent extends PlaitPluginElementComponent {
3078
3086
  MindTransforms.setTopicSize(this.board, this.element, width, height);
3079
3087
  }
3080
3088
  },
3081
- textPlugins: plugins
3089
+ textPlugins: plugins,
3090
+ getMaxWidth: () => {
3091
+ return NodeTopicThreshold.defaultTextMaxWidth;
3092
+ }
3082
3093
  });
3083
3094
  }
3084
3095
  ngOnInit() {
@@ -3236,9 +3247,8 @@ class MindNodeComponent extends PlaitPluginElementComponent {
3236
3247
  ELEMENT_TO_NODE.delete(this.element);
3237
3248
  }
3238
3249
  }
3239
- }
3240
- MindNodeComponentfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: MindNodeComponent, deps: [{ token: i0.ViewContainerRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
3241
- MindNodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.5", type: MindNodeComponent, selector: "plait-mind-node", usesInheritance: true, ngImport: i0, template: `
3250
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: MindNodeComponent, deps: [{ token: i0.ViewContainerRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
3251
+ static { thiscmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.3", type: MindNodeComponent, selector: "plait-mind-node", usesInheritance: true, ngImport: i0, template: `
3242
3252
  <plait-children
3243
3253
  *ngIf="!element.isCollapsed"
3244
3254
  [board]="board"
@@ -3246,8 +3256,9 @@ MindNodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", vers
3246
3256
  [effect]="effect"
3247
3257
  [parentG]="parentG"
3248
3258
  ></plait-children>
3249
- `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.PlaitChildrenElement, selector: "plait-children", inputs: ["board", "parent", "effect", "parentG"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3250
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: MindNodeComponent, decorators: [{
3259
+ `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.PlaitChildrenElement, selector: "plait-children", inputs: ["board", "parent", "effect", "parentG"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3260
+ }
3261
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: MindNodeComponent, decorators: [{
3251
3262
  type: Component,
3252
3263
  args: [{
3253
3264
  selector: 'plait-mind-node',
@@ -3290,12 +3301,12 @@ class PlaitMindComponent extends MindNodeComponent {
3290
3301
  ELEMENT_TO_NODE.set(node.origin, node);
3291
3302
  });
3292
3303
  }
3293
- }
3294
- PlaitMindComponentfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: PlaitMindComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
3295
- PlaitMindComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.5", type: PlaitMindComponent, selector: "plait-mind", usesInheritance: true, ngImport: i0, template: `
3304
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: PlaitMindComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3305
+ static { thiscmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.3", type: PlaitMindComponent, selector: "plait-mind", usesInheritance: true, ngImport: i0, template: `
3296
3306
  <plait-children [board]="board" [parent]="element" [effect]="effect" [parentG]="rootG"></plait-children>
3297
- `, isInline: true, dependencies: [{ kind: "component", type: i2.PlaitChildrenElement, selector: "plait-children", inputs: ["board", "parent", "effect", "parentG"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3298
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: PlaitMindComponent, decorators: [{
3307
+ `, isInline: true, dependencies: [{ kind: "component", type: i2.PlaitChildrenElement, selector: "plait-children", inputs: ["board", "parent", "effect", "parentG"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3308
+ }
3309
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: PlaitMindComponent, decorators: [{
3299
3310
  type: Component,
3300
3311
  args: [{
3301
3312
  selector: 'plait-mind',
@@ -3307,11 +3318,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImpor
3307
3318
  }] });
3308
3319
 
3309
3320
  class MindModule {
3321
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: MindModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
3322
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.3", ngImport: i0, type: MindModule, declarations: [PlaitMindComponent, MindNodeComponent], imports: [CommonModule, TextModule, PlaitModule], exports: [PlaitMindComponent, MindNodeComponent] }); }
3323
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: MindModule, imports: [CommonModule, TextModule, PlaitModule] }); }
3310
3324
  }
3311
- MindModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: MindModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3312
- MindModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.5", ngImport: i0, type: MindModule, declarations: [PlaitMindComponent, MindNodeComponent], imports: [CommonModule, TextModule, PlaitModule], exports: [PlaitMindComponent, MindNodeComponent] });
3313
- MindModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: MindModule, imports: [CommonModule, TextModule, PlaitModule] });
3314
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: MindModule, decorators: [{
3325
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: MindModule, decorators: [{
3315
3326
  type: NgModule,
3316
3327
  args: [{
3317
3328
  declarations: [PlaitMindComponent, MindNodeComponent],
@@ -3712,15 +3723,17 @@ const withCreateMind = (board) => {
3712
3723
  const newBoard = board;
3713
3724
  const { keydown, mousedown, mousemove, mouseup } = board;
3714
3725
  let fakeCreateNodeRef = null;
3726
+ let emptyMind = null;
3715
3727
  newBoard.mousedown = (event) => {
3716
- if (fakeCreateNodeRef && PlaitBoard.isPointer(board, MindPointerType.mind)) {
3717
- const currentOptions = board.getPluginOptions(PlaitPluginKey.withSelection);
3718
- board.setPluginOptions(PlaitPluginKey.withSelection, {
3719
- isDisabledSelect: true
3720
- });
3721
- setTimeout(() => {
3722
- board.setPluginOptions(PlaitPluginKey.withSelection, { ...currentOptions });
3723
- }, 0);
3728
+ const isMindPointer = PlaitBoard.isPointer(board, MindPointerType.mind);
3729
+ let movingPoint = PlaitBoard.getMovingPointInBoard(board);
3730
+ if (movingPoint && isDrawingMode(board) && isMindPointer) {
3731
+ movingPoint = transformPoint(board, toPoint(movingPoint[0], movingPoint[1], PlaitBoard.getHost(board)));
3732
+ const emptyMind = createEmptyMind(newBoard, movingPoint);
3733
+ Transforms.insertNode(board, emptyMind, [board.children.length]);
3734
+ clearSelectedElement(board);
3735
+ addSelectedElement(board, emptyMind);
3736
+ BoardTransforms.updatePointerType(board, PlaitPointerType.selection);
3724
3737
  }
3725
3738
  mousedown(event);
3726
3739
  };
@@ -3729,13 +3742,14 @@ const withCreateMind = (board) => {
3729
3742
  mousemove(event);
3730
3743
  return;
3731
3744
  }
3732
- if (PlaitBoard.isPointer(board, MindPointerType.mind)) {
3745
+ const isMindPointer = PlaitBoard.isPointer(board, MindPointerType.mind);
3746
+ if (isDndMode(board) && isMindPointer) {
3733
3747
  throttleRAF(() => {
3734
- const movingPoint = PlaitBoard.getMovingPointInBoard(board);
3748
+ let movingPoint = PlaitBoard.getMovingPointInBoard(board);
3735
3749
  if (movingPoint) {
3736
- const targetPoint = transformPoint(board, toPoint(movingPoint[0], movingPoint[1], PlaitBoard.getHost(board)));
3737
- const emptyMind = createEmptyMind(targetPoint);
3738
- const nodeRectangle = getRectangleByElement(newBoard, targetPoint, emptyMind);
3750
+ movingPoint = transformPoint(newBoard, toPoint(movingPoint[0], movingPoint[1], PlaitBoard.getHost(board)));
3751
+ emptyMind = createEmptyMind(newBoard, movingPoint);
3752
+ const nodeRectangle = getRectangleByElement(newBoard, emptyMind);
3739
3753
  const nodeG = drawRoundRectangleByElement(board, nodeRectangle, emptyMind);
3740
3754
  const topicRectangle = getTopicRectangleByElement(newBoard, nodeRectangle, emptyMind);
3741
3755
  if (!fakeCreateNodeRef) {
@@ -3775,14 +3789,12 @@ const withCreateMind = (board) => {
3775
3789
  mousemove(event);
3776
3790
  };
3777
3791
  newBoard.mouseup = (event) => {
3778
- const movingPoint = PlaitBoard.getMovingPointInBoard(board);
3779
- if (movingPoint && fakeCreateNodeRef && PlaitBoard.isPointer(board, MindPointerType.mind)) {
3780
- const targetPoint = transformPoint(board, toPoint(movingPoint[0], movingPoint[1], PlaitBoard.getHost(board)));
3781
- const emptyMind = createEmptyMind(targetPoint);
3792
+ if (emptyMind) {
3782
3793
  Transforms.insertNode(board, emptyMind, [board.children.length]);
3783
3794
  clearSelectedElement(board);
3784
3795
  addSelectedElement(board, emptyMind);
3785
3796
  BoardTransforms.updatePointerType(board, PlaitPointerType.selection);
3797
+ emptyMind = null;
3786
3798
  }
3787
3799
  destroy();
3788
3800
  mouseup(event);
@@ -3794,6 +3806,7 @@ const withCreateMind = (board) => {
3794
3806
  }
3795
3807
  if (event.key === DefaultHotkey && !PlaitBoard.isPointer(board, MindPointerType.mind)) {
3796
3808
  BoardTransforms.updatePointerType(board, MindPointerType.mind);
3809
+ setCreationMode(board, BoardCreationMode.drawing);
3797
3810
  event.preventDefault();
3798
3811
  return;
3799
3812
  }
@@ -4348,10 +4361,10 @@ class MindEmojiBaseComponent {
4348
4361
  ngOnInit() {
4349
4362
  this.elementRef.nativeElement.style.fontSize = `${this.fontSize}px`;
4350
4363
  }
4364
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: MindEmojiBaseComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
4365
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.3", type: MindEmojiBaseComponent, inputs: { fontSize: "fontSize", emojiItem: "emojiItem", board: "board", element: "element" }, host: { listeners: { "mousedown": "handleClick()" }, classAttribute: "mind-node-emoji" }, ngImport: i0 }); }
4351
4366
  }
4352
- MindEmojiBaseComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: MindEmojiBaseComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
4353
- MindEmojiBaseComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.5", type: MindEmojiBaseComponent, inputs: { fontSize: "fontSize", emojiItem: "emojiItem", board: "board", element: "element" }, host: { listeners: { "mousedown": "handleClick()" }, classAttribute: "mind-node-emoji" }, ngImport: i0 });
4354
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: MindEmojiBaseComponent, decorators: [{
4367
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: MindEmojiBaseComponent, decorators: [{
4355
4368
  type: Directive,
4356
4369
  args: [{
4357
4370
  host: {
@@ -4397,13 +4410,16 @@ class MindImageBaseComponent {
4397
4410
  }
4398
4411
  ngOnInit() {
4399
4412
  this.activeGenerator = new ActiveGenerator(this.board, {
4400
- activeStrokeWidth: 1,
4413
+ getStrokeWidth: () => {
4414
+ return 1;
4415
+ },
4401
4416
  getRectangle: (element) => {
4402
4417
  return getImageForeignRectangle(this.board, this.element);
4403
4418
  },
4404
4419
  getStrokeWidthByElement: () => {
4405
4420
  return 0;
4406
- }
4421
+ },
4422
+ hasResizeHandle: () => true
4407
4423
  });
4408
4424
  this.initialized = true;
4409
4425
  }
@@ -4418,10 +4434,10 @@ class MindImageBaseComponent {
4418
4434
  this.activeGenerator.destroy();
4419
4435
  }
4420
4436
  }
4437
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: MindImageBaseComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive }); }
4438
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.3", type: MindImageBaseComponent, inputs: { imageItem: "imageItem", board: "board", element: "element", isFocus: "isFocus" }, host: { classAttribute: "mind-node-image" }, ngImport: i0 }); }
4421
4439
  }
4422
- MindImageBaseComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: MindImageBaseComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
4423
- MindImageBaseComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.5", type: MindImageBaseComponent, inputs: { imageItem: "imageItem", board: "board", element: "element", isFocus: "isFocus" }, host: { classAttribute: "mind-node-image" }, ngImport: i0 });
4424
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: MindImageBaseComponent, decorators: [{
4440
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: MindImageBaseComponent, decorators: [{
4425
4441
  type: Directive,
4426
4442
  args: [{
4427
4443
  host: {
@@ -4446,5 +4462,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImpor
4446
4462
  * Generated bundle index. Do not edit.
4447
4463
  */
4448
4464
 
4449
- export { ABSTRACT_HANDLE_COLOR, ABSTRACT_HANDLE_LENGTH, ABSTRACT_HANDLE_MASK_WIDTH, ABSTRACT_INCLUDED_OUTLINE_OFFSET, AbstractHandlePosition, AbstractResizeState, BASE, BRANCH_FONT_FAMILY, BRANCH_WIDTH, BaseDrawer, BranchShape, DEFAULT_FONT_FAMILY, DefaultAbstractNodeStyle, DefaultNodeStyle, ELEMENT_TO_NODE, EXTEND_DIAMETER, EXTEND_OFFSET, GRAY_COLOR, INHERIT_ATTRIBUTE_KEYS, IS_DRAGGING, LayoutDirection, LayoutDirectionsMap, MindColorfulThemeColor, MindDarkThemeColor, MindDefaultThemeColor, MindElement, MindElementShape, MindEmojiBaseComponent, MindImageBaseComponent, MindModule, MindNode, MindNodeComponent, MindPointerType, MindQueries, MindRetroThemeColor, MindSoftThemeColor, MindStarryThemeColor, MindThemeColor, MindThemeColors, MindTransforms, NodeSpace, PRIMARY_COLOR, PlaitMind, PlaitMindComponent, QUICK_INSERT_CIRCLE_COLOR, QUICK_INSERT_CIRCLE_OFFSET, QUICK_INSERT_INNER_CROSS_COLOR, ROOT_TOPIC_FONT_SIZE, ROOT_TOPIC_HEIGHT, STROKE_WIDTH, TOPIC_COLOR, TOPIC_DEFAULT_MAX_WORD_COUNT, TOPIC_FONT_SIZE, TRANSPARENT, WithMindPluginKey, addActiveOnDragOrigin, addSelectedImageElement, adjustAbstractToNode, adjustNodeToRoot, adjustRootToNode, buildImage, canSetAbstract, copyNewNode, correctLayoutByDirection, createDefaultMind, createEmptyMind, createMindElement, deleteElementHandleAbstract, deleteElementsHandleRightNodeCount, detectDropTarget, directionCorrector, directionDetector, divideElementByParent, drawFakeDragNode, drawFakeDropNode, editTopic, extractNodesText, findLastChild, findLocationLeftIndex, getAbstractBranchColor, getAbstractBranchWidth, getAbstractHandleRectangle, getAllowedDirection, getAvailableSubLayoutsByLayoutDirections, getBehindAbstracts, getBranchColorByMindElement, getBranchDirectionsByLayouts, getBranchShapeByMindElement, getBranchWidthByMindElement, getChildrenCount, getCorrespondingAbstract, getDefaultBranchColor, getDefaultBranchColorByIndex, getDefaultLayout, getEmojiFontSize, getEmojiForeignRectangle, getEmojiRectangle, getEmojisWidthHeight, getFillByElement, getFirstLevelElement, getFontSizeBySlateElement, getHitAbstractHandle, getHitImageResizeHandleDirection, getImageForeignRectangle, getInCorrectLayoutDirection, getLayoutDirection$1 as getLayoutDirection, getLayoutOptions, getLayoutReverseDirection, getLocationScope, getMindThemeColor, getNewNodeHeight, getNextBranchColor, getNodeDefaultFontSize, getOverallAbstracts, getPathByDropTarget, getRectangleByElement, getRectangleByNode, getRectangleByResizingLocation, getRelativeStartEndByAbstractRef, getRootLayout, getSelectedImageElement, getSelectedMindElements, getShapeByElement, getStrokeByMindElement, getStrokeWidthByElement, getTopicRectangleByElement, getTopicRectangleByNode, getValidAbstractRefs, handleTouchedAbstract, hasAfterDraw, hasPreviousOrNextOfDropPath, insertElementHandleAbstract, insertElementHandleRightNodeCount, insertMindElement, isChildElement, isChildOfAbstract, isChildRight, isChildUp, isCorrectLayout, isDragging, isDropStandardRight, isHitEmojis, isHitImage, isHitMindElement, isInRightBranchOfStandardLayout, isMixedLayout, isSetAbstract, isValidTarget, removeActiveOnDragOrigin, removeSelectedImageElement, selectImage, separateChildren, setImageFocus, setIsDragging, temporaryDisableSelection, withMind, withMindExtend };
4465
+ export { ABSTRACT_HANDLE_COLOR, ABSTRACT_HANDLE_LENGTH, ABSTRACT_HANDLE_MASK_WIDTH, ABSTRACT_INCLUDED_OUTLINE_OFFSET, AbstractHandlePosition, AbstractResizeState, BASE, BRANCH_FONT_FAMILY, BRANCH_WIDTH, BaseDrawer, BranchShape, DEFAULT_FONT_FAMILY, DefaultAbstractNodeStyle, DefaultNodeStyle, ELEMENT_TO_NODE, EXTEND_DIAMETER, EXTEND_OFFSET, GRAY_COLOR, INHERIT_ATTRIBUTE_KEYS, IS_DRAGGING, LayoutDirection, LayoutDirectionsMap, MindColorfulThemeColor, MindDarkThemeColor, MindDefaultThemeColor, MindElement, MindElementShape, MindEmojiBaseComponent, MindImageBaseComponent, MindModule, MindNode, MindNodeComponent, MindPointerType, MindQueries, MindRetroThemeColor, MindSoftThemeColor, MindStarryThemeColor, MindThemeColor, MindThemeColors, MindTransforms, NodeSpace, NodeTopicThreshold, PRIMARY_COLOR, PlaitMind, PlaitMindComponent, QUICK_INSERT_CIRCLE_COLOR, QUICK_INSERT_CIRCLE_OFFSET, QUICK_INSERT_INNER_CROSS_COLOR, ROOT_TOPIC_FONT_SIZE, ROOT_TOPIC_HEIGHT, ROOT_TOPIC_WIDTH, STROKE_WIDTH, TOPIC_COLOR, TOPIC_DEFAULT_MAX_WORD_COUNT, TOPIC_FONT_SIZE, TRANSPARENT, WithMindPluginKey, addActiveOnDragOrigin, addSelectedImageElement, adjustAbstractToNode, adjustNodeToRoot, adjustRootToNode, buildImage, canSetAbstract, copyNewNode, correctLayoutByDirection, createDefaultMind, createEmptyMind, createMindElement, deleteElementHandleAbstract, deleteElementsHandleRightNodeCount, detectDropTarget, directionCorrector, directionDetector, divideElementByParent, drawFakeDragNode, drawFakeDropNode, editTopic, extractNodesText, findLastChild, findLocationLeftIndex, getAbstractBranchColor, getAbstractBranchWidth, getAbstractHandleRectangle, getAllowedDirection, getAvailableSubLayoutsByLayoutDirections, getBehindAbstracts, getBranchColorByMindElement, getBranchDirectionsByLayouts, getBranchShapeByMindElement, getBranchWidthByMindElement, getChildrenCount, getCorrespondingAbstract, getDefaultBranchColor, getDefaultBranchColorByIndex, getDefaultLayout, getEmojiFontSize, getEmojiForeignRectangle, getEmojiRectangle, getEmojisWidthHeight, getFillByElement, getFirstLevelElement, getFontSizeBySlateElement, getHitAbstractHandle, getHitImageResizeHandleDirection, getImageForeignRectangle, getInCorrectLayoutDirection, getLayoutDirection$1 as getLayoutDirection, getLayoutOptions, getLayoutReverseDirection, getLocationScope, getMindThemeColor, getNewNodeHeight, getNextBranchColor, getNodeDefaultFontSize, getOverallAbstracts, getPathByDropTarget, getRectangleByElement, getRectangleByNode, getRectangleByResizingLocation, getRelativeStartEndByAbstractRef, getRootLayout, getSelectedImageElement, getSelectedMindElements, getShapeByElement, getStrokeByMindElement, getStrokeWidthByElement, getTopicRectangleByElement, getTopicRectangleByNode, getValidAbstractRefs, handleTouchedAbstract, hasAfterDraw, hasPreviousOrNextOfDropPath, insertElementHandleAbstract, insertElementHandleRightNodeCount, insertMindElement, isChildElement, isChildOfAbstract, isChildRight, isChildUp, isCorrectLayout, isDragging, isDropStandardRight, isHitEmojis, isHitImage, isHitMindElement, isInRightBranchOfStandardLayout, isMixedLayout, isSetAbstract, isValidTarget, removeActiveOnDragOrigin, removeSelectedImageElement, selectImage, separateChildren, setImageFocus, setIsDragging, temporaryDisableSelection, withMind, withMindExtend };
4450
4466
  //# sourceMappingURL=plait-mind.mjs.map