seat-editor 3.5.17 → 3.5.19

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 (90) hide show
  1. package/dist/app/graph-view/page.d.ts +1 -1
  2. package/dist/app/graph-view-new/page.d.ts +1 -1
  3. package/dist/app/layout.d.ts +1 -1
  4. package/dist/app/new-board/page.d.ts +1 -1
  5. package/dist/app/new-board/page.js +5 -1
  6. package/dist/app/new-board/page.jsx +5 -1
  7. package/dist/app/old-board/page.d.ts +2 -1
  8. package/dist/app/only-view/chair.d.ts +1 -1
  9. package/dist/app/only-view/chair.js +10 -2
  10. package/dist/app/only-view/page.d.ts +1 -1
  11. package/dist/app/only-view/user.d.ts +1 -1
  12. package/dist/app/only-view/user.js +10 -2
  13. package/dist/app/page.d.ts +1 -1
  14. package/dist/app/test/page.d.ts +2 -1
  15. package/dist/app/v2/page.d.ts +1 -1
  16. package/dist/components/button-tools/index.d.ts +1 -1
  17. package/dist/components/button-tools/index.jsx +1 -11
  18. package/dist/components/form-tools/label.d.ts +1 -1
  19. package/dist/components/form-tools/label.js +1 -1
  20. package/dist/components/form-tools/label.jsx +1 -1
  21. package/dist/components/form-tools/shape.d.ts +2 -2
  22. package/dist/components/form-tools/shape.js +1 -1
  23. package/dist/components/form-tools/shape.jsx +1 -1
  24. package/dist/components/icons/camera.d.ts +2 -1
  25. package/dist/components/icons/circle.d.ts +2 -1
  26. package/dist/components/icons/square.d.ts +2 -1
  27. package/dist/components/icons/type-1.d.ts +2 -1
  28. package/dist/components/icons/type-2.d.ts +2 -1
  29. package/dist/components/icons/type-3.d.ts +2 -1
  30. package/dist/components/icons/type-4.d.ts +2 -1
  31. package/dist/components/icons/type-5.d.ts +2 -1
  32. package/dist/components/input/number-indicator.d.ts +1 -1
  33. package/dist/components/joystick/index.d.ts +2 -1
  34. package/dist/components/layer/index.d.ts +1 -1
  35. package/dist/components/layer-v2/index.d.ts +1 -1
  36. package/dist/components/layer-v3/index.d.ts +1 -1
  37. package/dist/components/layer-v3/index.js +1 -1
  38. package/dist/components/layer-v3/index.jsx +2 -2
  39. package/dist/components/layer-v4/index.d.ts +1 -1
  40. package/dist/components/layer-v5/index.d.ts +1 -1
  41. package/dist/components/lib/index.d.ts +1 -1
  42. package/dist/components/modal-preview/index.d.ts +1 -1
  43. package/dist/features/board/index.d.ts +1 -1
  44. package/dist/features/board-v2/index.d.ts +2 -1
  45. package/dist/features/board-v3/index.d.ts +1 -1
  46. package/dist/features/board-v3/index.js +25 -17
  47. package/dist/features/board-v3/index.jsx +25 -17
  48. package/dist/features/board-v3/resize-element.d.ts +1 -0
  49. package/dist/features/board-v3/resize-element.js +3 -1
  50. package/dist/features/board-v3/utils.d.ts +1 -1
  51. package/dist/features/board-v3/utils.js +18 -4
  52. package/dist/features/navbar/index.d.ts +1 -1
  53. package/dist/features/package/index.d.ts +9 -7
  54. package/dist/features/package/index.js +25 -2
  55. package/dist/features/package/index.jsx +25 -2
  56. package/dist/features/panel/index.d.ts +1 -1
  57. package/dist/features/panel/index.js +5 -1
  58. package/dist/features/panel/index.jsx +5 -1
  59. package/dist/features/panel/polygon.d.ts +1 -1
  60. package/dist/features/panel/polygon.js +1 -1
  61. package/dist/features/panel/polygon.jsx +1 -1
  62. package/dist/features/panel/select-tool.d.ts +1 -1
  63. package/dist/features/panel/selected-group.d.ts +1 -1
  64. package/dist/features/panel/selected-group.js +1 -1
  65. package/dist/features/panel/selected-group.jsx +1 -1
  66. package/dist/features/panel/square-circle-tool.d.ts +1 -1
  67. package/dist/features/panel/table-seat-circle.d.ts +1 -1
  68. package/dist/features/panel/table-seat-square.d.ts +1 -1
  69. package/dist/features/panel/text-tool.d.ts +1 -1
  70. package/dist/features/panel/text-tool.js +9 -2
  71. package/dist/features/panel/text-tool.jsx +9 -2
  72. package/dist/features/panel/upload-group-tool.d.ts +1 -1
  73. package/dist/features/panel/upload-group-tool.js +2 -0
  74. package/dist/features/panel/upload-group-tool.jsx +2 -0
  75. package/dist/features/panel/upload-tool.d.ts +1 -1
  76. package/dist/features/panel/upload-tool.js +6 -3
  77. package/dist/features/panel/upload-tool.jsx +23 -20
  78. package/dist/features/side-tool/index.d.ts +1 -1
  79. package/dist/features/side-tool/index.js +30 -4
  80. package/dist/features/side-tool/index.jsx +46 -5
  81. package/dist/features/view-only/index.d.ts +1 -1
  82. package/dist/features/view-only-2/index.d.ts +1 -1
  83. package/dist/features/view-only-3/index.d.ts +1 -1
  84. package/dist/features/view-only-4/index.d.ts +1 -1
  85. package/dist/features/view-only-5/index.d.ts +1 -1
  86. package/dist/features/view-only-6/index.d.ts +1 -1
  87. package/dist/features/view-only-7/index.d.ts +1 -1
  88. package/dist/provider/redux-provider.d.ts +1 -1
  89. package/dist/provider/store-provider.d.ts +1 -1
  90. package/package.json +1 -1
@@ -1 +1 @@
1
- export default function DrawIO(): import("react/jsx-runtime").JSX.Element;
1
+ export default function DrawIO(): import("react").JSX.Element;
@@ -1 +1 @@
1
- export default function GraphView(): import("react/jsx-runtime").JSX.Element;
1
+ export default function GraphView(): import("react").JSX.Element;
@@ -3,4 +3,4 @@ import "./globals.css";
3
3
  export declare const metadata: Metadata;
4
4
  export default function RootLayout({ children, }: Readonly<{
5
5
  children: React.ReactNode;
6
- }>): import("react/jsx-runtime").JSX.Element;
6
+ }>): import("react").JSX.Element;
@@ -1 +1 @@
1
- export default function NewBoard(): import("react/jsx-runtime").JSX.Element;
1
+ export default function NewBoard(): import("react").JSX.Element;
@@ -83,6 +83,7 @@ export default function NewBoard() {
83
83
  extraComponent: true,
84
84
  }, action: handleUploadImage, mappingKey: "properties", onCurrentStateChange: (setState) => {
85
85
  var _a, _b, _c;
86
+ console.log("setState", setState);
86
87
  if (((_a = setState === null || setState === void 0 ? void 0 : setState.components) === null || _a === void 0 ? void 0 : _a.length) > 0) {
87
88
  setInitialValue((_b = setState.components) !== null && _b !== void 0 ? _b : []);
88
89
  }
@@ -100,5 +101,8 @@ export default function NewBoard() {
100
101
  // console.log({ action });
101
102
  // return null
102
103
  // }}
103
- defaultSeatCountKey: "capacity" }) })] }) }));
104
+ defaultSeatCountKey: "capacity", hiddenStatusKey: {
105
+ key: "status",
106
+ value: 0,
107
+ } }) })] }) }));
104
108
  }
@@ -91,6 +91,7 @@ export default function NewBoard() {
91
91
  extraComponent: true,
92
92
  }} action={handleUploadImage} mappingKey="properties" onCurrentStateChange={(setState) => {
93
93
  var _a, _b, _c;
94
+ console.log("setState", setState);
94
95
  if (((_a = setState === null || setState === void 0 ? void 0 : setState.components) === null || _a === void 0 ? void 0 : _a.length) > 0) {
95
96
  setInitialValue((_b = setState.components) !== null && _b !== void 0 ? _b : []);
96
97
  }
@@ -108,7 +109,10 @@ export default function NewBoard() {
108
109
  // console.log({ action });
109
110
  // return null
110
111
  // }}
111
- defaultSeatCountKey="capacity"/>
112
+ defaultSeatCountKey="capacity" hiddenStatusKey={{
113
+ key: "status",
114
+ value: 0,
115
+ }}/>
112
116
  </div>
113
117
  </div>
114
118
  </>);
@@ -1,2 +1,3 @@
1
- declare const SeatEditor: () => import("react/jsx-runtime").JSX.Element;
1
+ import React from "react";
2
+ declare const SeatEditor: () => React.JSX.Element;
2
3
  export default SeatEditor;
@@ -1 +1 @@
1
- export function ChairIcon(): import("react/jsx-runtime").JSX.Element;
1
+ export function ChairIcon(): import("react").JSX.Element;
@@ -1,4 +1,12 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
1
  export const ChairIcon = () => {
3
- return (_jsxs("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("g", { "clip-path": "url(#clip0_3019_14165)", children: _jsx("path", { d: "M15.9717 7.5339V4.70339C15.9717 3.07627 14.7076 2.5 13.5189 2.5H6.46226C5.27359 2.5 4.00943 3.07627 4.00943 4.70339V7.5339C3.14151 7.73729 2.5 8.4322 2.5 9.27966V13.822C2.5 15.161 3.5 15.6864 4.48113 15.7373V16.8898C4.48113 17.2288 4.78302 17.5 5.16038 17.5H5.85849C6.23585 17.5 6.53774 17.2288 6.53774 16.8898V15.7373H13.4623V16.8898C13.4623 17.2288 13.7642 17.5 14.1415 17.5H14.8396C15.217 17.5 15.5189 17.2288 15.5189 16.8898V15.7373C16.9717 15.6695 17.5 14.7203 17.5 13.822V9.26271C17.4623 8.4322 16.8208 7.72034 15.9717 7.5339ZM4.68868 4.70339C4.68868 3.31356 5.80189 3.09322 6.46226 3.09322H13.5189C14.1792 3.09322 15.2925 3.29661 15.2925 4.68644V7.4661C14.2736 7.55085 13.4623 8.31356 13.4623 9.26271V9.68644H6.51887V9.26271C6.51887 8.31356 5.70755 7.55085 4.68868 7.4661V4.70339ZM13.4434 10.2966V12.3983H6.51887V10.2966H13.4434ZM5.85849 16.8898H5.16038V15.7373H5.85849V16.8898ZM14.8208 16.8898H14.1226V15.7373H14.8208V16.8898ZM16.8208 13.822H16.8019C16.8019 14.4153 16.5566 15.1441 15.3302 15.1441H14.8208H14.1226H5.85849H5.16038H4.65094C3.99057 15.1441 3.17925 14.9237 3.17925 13.822V9.26271C3.17925 8.6017 3.78302 8.05932 4.51887 8.05932C5.25472 8.05932 5.85849 8.6017 5.85849 9.26271V12.7034C5.85849 12.8729 6.00943 13.0085 6.19811 13.0085H13.8019C13.9906 13.0085 14.1415 12.8729 14.1415 12.7034V9.26271C14.1415 8.6017 14.7453 8.05932 15.4811 8.05932C16.217 8.05932 16.8208 8.6017 16.8208 9.26271V13.822Z", fill: "#347ADB", stroke: "#347ADB", "stroke-width": "0.8" }) }), _jsx("defs", { children: _jsx("clipPath", { id: "clip0_3019_14165", children: _jsx("rect", { width: "16.6667", height: "16.6667", fill: "white", transform: "translate(1.66675 1.6665)" }) }) })] }));
2
+ return (<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
3
+ <g clip-path="url(#clip0_3019_14165)">
4
+ <path d="M15.9717 7.5339V4.70339C15.9717 3.07627 14.7076 2.5 13.5189 2.5H6.46226C5.27359 2.5 4.00943 3.07627 4.00943 4.70339V7.5339C3.14151 7.73729 2.5 8.4322 2.5 9.27966V13.822C2.5 15.161 3.5 15.6864 4.48113 15.7373V16.8898C4.48113 17.2288 4.78302 17.5 5.16038 17.5H5.85849C6.23585 17.5 6.53774 17.2288 6.53774 16.8898V15.7373H13.4623V16.8898C13.4623 17.2288 13.7642 17.5 14.1415 17.5H14.8396C15.217 17.5 15.5189 17.2288 15.5189 16.8898V15.7373C16.9717 15.6695 17.5 14.7203 17.5 13.822V9.26271C17.4623 8.4322 16.8208 7.72034 15.9717 7.5339ZM4.68868 4.70339C4.68868 3.31356 5.80189 3.09322 6.46226 3.09322H13.5189C14.1792 3.09322 15.2925 3.29661 15.2925 4.68644V7.4661C14.2736 7.55085 13.4623 8.31356 13.4623 9.26271V9.68644H6.51887V9.26271C6.51887 8.31356 5.70755 7.55085 4.68868 7.4661V4.70339ZM13.4434 10.2966V12.3983H6.51887V10.2966H13.4434ZM5.85849 16.8898H5.16038V15.7373H5.85849V16.8898ZM14.8208 16.8898H14.1226V15.7373H14.8208V16.8898ZM16.8208 13.822H16.8019C16.8019 14.4153 16.5566 15.1441 15.3302 15.1441H14.8208H14.1226H5.85849H5.16038H4.65094C3.99057 15.1441 3.17925 14.9237 3.17925 13.822V9.26271C3.17925 8.6017 3.78302 8.05932 4.51887 8.05932C5.25472 8.05932 5.85849 8.6017 5.85849 9.26271V12.7034C5.85849 12.8729 6.00943 13.0085 6.19811 13.0085H13.8019C13.9906 13.0085 14.1415 12.8729 14.1415 12.7034V9.26271C14.1415 8.6017 14.7453 8.05932 15.4811 8.05932C16.217 8.05932 16.8208 8.6017 16.8208 9.26271V13.822Z" fill="#347ADB" stroke="#347ADB" stroke-width="0.8"/>
5
+ </g>
6
+ <defs>
7
+ <clipPath id="clip0_3019_14165">
8
+ <rect width="16.6667" height="16.6667" fill="white" transform="translate(1.66675 1.6665)"/>
9
+ </clipPath>
10
+ </defs>
11
+ </svg>);
4
12
  };
@@ -17,5 +17,5 @@ export declare const dummyImage: {
17
17
  y: number;
18
18
  }[];
19
19
  }[];
20
- declare const TouchScrollDetect: () => import("react/jsx-runtime").JSX.Element;
20
+ declare const TouchScrollDetect: () => import("react").JSX.Element;
21
21
  export default TouchScrollDetect;
@@ -1 +1 @@
1
- export function UserIcon(): import("react/jsx-runtime").JSX.Element;
1
+ export function UserIcon(): import("react").JSX.Element;
@@ -1,4 +1,12 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
1
  export const UserIcon = () => {
3
- return (_jsxs("svg", { width: "15", height: "15", viewBox: "0 0 15 15", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("path", { d: "M7.61992 10.1625C9.00754 10.1625 10.1324 9.03757 10.1324 7.64995C10.1324 6.26234 9.00754 5.13745 7.61992 5.13745C6.23231 5.13745 5.10742 6.26234 5.10742 7.64995C5.10742 9.03757 6.23231 10.1625 7.61992 10.1625Z", fill: "#5E6278" }), _jsx("path", { d: "M7.62 14.9999C9.34313 14.9999 10.74 14.1168 10.74 13.0274C10.74 11.9381 9.34313 11.0549 7.62 11.0549C5.89687 11.0549 4.5 11.9381 4.5 13.0274C4.5 14.1168 5.89687 14.9999 7.62 14.9999Z", fill: "#5E6278" }), _jsx("path", { opacity: "0.3", d: "M11.595 4.23C12.7631 4.23 13.71 3.28308 13.71 2.115C13.71 0.946918 12.7631 0 11.595 0C10.4269 0 9.47998 0.946918 9.47998 2.115C9.47998 3.28308 10.4269 4.23 11.595 4.23Z", fill: "#5E6278" }), _jsx("path", { opacity: "0.3", d: "M3.62257 4.23C4.79065 4.23 5.73757 3.28308 5.73757 2.115C5.73757 0.946918 4.79065 0 3.62257 0C2.45449 0 1.50757 0.946918 1.50757 2.115C1.50757 3.28308 2.45449 4.23 3.62257 4.23Z", fill: "#5E6278" }), _jsxs("g", { opacity: "0.3", children: [_jsx("path", { d: "M11.4749 5.87256C11.2349 5.87256 11.0024 5.87256 10.7699 5.91006C11.1229 6.52313 11.2825 7.22856 11.2276 7.93388C11.1727 8.63919 10.906 9.31147 10.4624 9.86256C10.7984 9.92909 11.1399 9.96424 11.4824 9.96756C13.3874 9.96756 14.9249 9.04506 14.9249 7.92006C14.9249 6.79506 13.3799 5.87256 11.4749 5.87256Z", fill: "#5E6278" }), _jsx("path", { d: "M3.4499 6C3.6899 6 3.9224 6 4.1549 6.0375C3.80187 6.65057 3.64233 7.356 3.6972 8.06132C3.75208 8.76664 4.0188 9.43891 4.4624 9.99C4.12639 10.0565 3.78492 10.0917 3.4424 10.095C1.5374 10.095 -9.77516e-05 9.1725 -9.77516e-05 8.0475C-9.77516e-05 6.9225 1.5449 6 3.4499 6Z", fill: "#5E6278" })] })] }));
2
+ return (<svg width="15" height="15" viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg">
3
+ <path d="M7.61992 10.1625C9.00754 10.1625 10.1324 9.03757 10.1324 7.64995C10.1324 6.26234 9.00754 5.13745 7.61992 5.13745C6.23231 5.13745 5.10742 6.26234 5.10742 7.64995C5.10742 9.03757 6.23231 10.1625 7.61992 10.1625Z" fill="#5E6278"/>
4
+ <path d="M7.62 14.9999C9.34313 14.9999 10.74 14.1168 10.74 13.0274C10.74 11.9381 9.34313 11.0549 7.62 11.0549C5.89687 11.0549 4.5 11.9381 4.5 13.0274C4.5 14.1168 5.89687 14.9999 7.62 14.9999Z" fill="#5E6278"/>
5
+ <path opacity="0.3" d="M11.595 4.23C12.7631 4.23 13.71 3.28308 13.71 2.115C13.71 0.946918 12.7631 0 11.595 0C10.4269 0 9.47998 0.946918 9.47998 2.115C9.47998 3.28308 10.4269 4.23 11.595 4.23Z" fill="#5E6278"/>
6
+ <path opacity="0.3" d="M3.62257 4.23C4.79065 4.23 5.73757 3.28308 5.73757 2.115C5.73757 0.946918 4.79065 0 3.62257 0C2.45449 0 1.50757 0.946918 1.50757 2.115C1.50757 3.28308 2.45449 4.23 3.62257 4.23Z" fill="#5E6278"/>
7
+ <g opacity="0.3">
8
+ <path d="M11.4749 5.87256C11.2349 5.87256 11.0024 5.87256 10.7699 5.91006C11.1229 6.52313 11.2825 7.22856 11.2276 7.93388C11.1727 8.63919 10.906 9.31147 10.4624 9.86256C10.7984 9.92909 11.1399 9.96424 11.4824 9.96756C13.3874 9.96756 14.9249 9.04506 14.9249 7.92006C14.9249 6.79506 13.3799 5.87256 11.4749 5.87256Z" fill="#5E6278"/>
9
+ <path d="M3.4499 6C3.6899 6 3.9224 6 4.1549 6.0375C3.80187 6.65057 3.64233 7.356 3.6972 8.06132C3.75208 8.76664 4.0188 9.43891 4.4624 9.99C4.12639 10.0565 3.78492 10.0917 3.4424 10.095C1.5374 10.095 -9.77516e-05 9.1725 -9.77516e-05 8.0475C-9.77516e-05 6.9225 1.5449 6 3.4499 6Z" fill="#5E6278"/>
10
+ </g>
11
+ </svg>);
4
12
  };
@@ -1,2 +1,2 @@
1
- declare const TableEditor: () => import("react/jsx-runtime").JSX.Element;
1
+ declare const TableEditor: () => import("react").JSX.Element;
2
2
  export default TableEditor;
@@ -1 +1,2 @@
1
- export default function DraggableRect(): import("react/jsx-runtime").JSX.Element;
1
+ import React from "react";
2
+ export default function DraggableRect(): React.JSX.Element;
@@ -1,2 +1,2 @@
1
- declare const TableEditor: () => import("react/jsx-runtime").JSX.Element;
1
+ declare const TableEditor: () => import("react").JSX.Element;
2
2
  export default TableEditor;
@@ -7,5 +7,5 @@ interface ButtonToolsProps {
7
7
  }>;
8
8
  popoverProps?: PopoverProps;
9
9
  }
10
- declare const ButtonTools: (props: ButtonToolsProps) => import("react/jsx-runtime").JSX.Element;
10
+ declare const ButtonTools: (props: ButtonToolsProps) => import("react").JSX.Element;
11
11
  export default ButtonTools;
@@ -12,18 +12,8 @@ const ButtonTools = (props) => {
12
12
  maxWidth: "fit-content",
13
13
  },
14
14
  }} {...popoverProps}>
15
- {/* <Popover
16
- title={buttonProps?.name}
17
- trigger={"hover"}
18
- placement="right"
19
- styles={{
20
- body: {
21
- minWidth: "max-content",
22
- },
23
- }}
24
- > */}
15
+
25
16
  <Button {...buttonProps}/>
26
- {/* </Popover> */}
27
17
  </Popover>);
28
18
  };
29
19
  export default ButtonTools;
@@ -1,2 +1,2 @@
1
- declare const SectionLabel: () => import("react/jsx-runtime").JSX.Element;
1
+ declare const SectionLabel: () => import("react").JSX.Element;
2
2
  export default SectionLabel;
@@ -9,6 +9,6 @@ const SectionLabel = () => {
9
9
  if (Number.isNaN(num))
10
10
  return 0;
11
11
  return Math.min(360, Math.max(0, num));
12
- } }) })] }), _jsxs(Flex, { gap: 5, children: [_jsx(Form.Item, { name: [field.name, "fontSize"], label: "Size", children: _jsx(InputNumber, { suffix: "px" }) }), _jsx(Form.Item, { name: [field.name, "fontColor"], label: "Color", getValueFromEvent: (color) => color.toHexString(), children: _jsx(ColorPicker, { allowClear: true, format: "hex", defaultFormat: "hex" }) })] })] }, field.key))) })) }) }), _jsx("div", { className: "divider-dashed" })] }));
12
+ } }) })] }), _jsxs(Flex, { gap: 5, children: [_jsx(Form.Item, { name: [field.name, "fontSize"], label: "Size", children: _jsx(InputNumber, { suffix: "px" }) }), _jsx(Form.Item, { name: [field.name, "fontColor"], label: "Text Color", getValueFromEvent: (color) => color.toHexString(), children: _jsx(ColorPicker, { allowClear: true, format: "hex", defaultFormat: "hex" }) })] })] }, field.key))) })) }) }), _jsx("div", { className: "divider-dashed" })] }));
13
13
  };
14
14
  export default SectionLabel;
@@ -36,7 +36,7 @@ const SectionLabel = () => {
36
36
  <Form.Item name={[field.name, "fontSize"]} label="Size">
37
37
  <InputNumber suffix="px"/>
38
38
  </Form.Item>
39
- <Form.Item name={[field.name, "fontColor"]} label="Color" getValueFromEvent={(color) => color.toHexString()}>
39
+ <Form.Item name={[field.name, "fontColor"]} label="Text Color" getValueFromEvent={(color) => color.toHexString()}>
40
40
  <ColorPicker allowClear format="hex" defaultFormat="hex"/>
41
41
  </Form.Item>
42
42
  </Flex>
@@ -1,9 +1,9 @@
1
1
  export declare const optionsShape: {
2
2
  value: string;
3
3
  label: string;
4
- icon: import("react/jsx-runtime").JSX.Element;
4
+ icon: import("react").JSX.Element;
5
5
  }[];
6
6
  declare const SectionShape: ({ allowChangeShape, }: {
7
7
  allowChangeShape?: boolean;
8
- }) => import("react/jsx-runtime").JSX.Element;
8
+ }) => import("react").JSX.Element;
9
9
  export default SectionShape;
@@ -77,7 +77,7 @@ const SectionShape = ({ allowChangeShape = true, }) => {
77
77
  if (Number.isNaN(num))
78
78
  return 0;
79
79
  return Math.min(360, Math.max(0, num));
80
- } }) })] }), _jsxs(Flex, { gap: 2, children: [_jsx(Form.Item, { label: "Fill", name: "fill", getValueFromEvent: (color) => color.toHexString(), className: "w-full ", children: _jsx(ColorPicker, { allowClear: true, format: "hex", defaultFormat: "hex" }) }), _jsx(Form.Item, { label: "Stroke Fill", name: "stroke", getValueFromEvent: (color) => color.toHexString(), className: "w-full ", children: _jsx(ColorPicker, { allowClear: true, format: "hex", defaultFormat: "hex" }) }), _jsx(Form.Item, { label: "Stroke Size", name: "strokeWidth", className: "w-full", children: _jsx(InputNumber, {}) })] }), _jsx(Flex, { children: _jsx(Form.Item, { label: "opacity", name: "opacity", className: "w-full", children: _jsx(InputNumber, { step: 10, max: 100, min: 0, name: "opacity", parser: (value) => {
80
+ } }) })] }), _jsxs(Flex, { gap: 2, children: [_jsx(Form.Item, { label: "Fill", name: "fill", getValueFromEvent: (color) => color.toHexString(), className: "w-full ", children: _jsx(ColorPicker, { allowClear: true, format: "hex", defaultFormat: "hex" }) }), _jsx(Form.Item, { label: "Stroke Fill", name: "stroke", getValueFromEvent: (color) => color.toHexString(), className: "w-full ", children: _jsx(ColorPicker, { allowClear: true, format: "hex", defaultFormat: "hex" }) }), _jsx(Form.Item, { label: "Stroke Size", name: "strokeWidth", className: "w-full", children: _jsx(InputNumber, {}) })] }), _jsx(Flex, { children: _jsx(Form.Item, { label: "Opacity Fill", name: "opacity", className: "w-full", children: _jsx(InputNumber, { step: 10, max: 100, min: 0, name: "opacity", parser: (value) => {
81
81
  if (value === undefined || value === null || value === "")
82
82
  return null;
83
83
  const cleaned = value.replace(/[^0-9.]/g, "");
@@ -126,7 +126,7 @@ const SectionShape = ({ allowChangeShape = true, }) => {
126
126
  </Form.Item>
127
127
  </Flex>
128
128
  <Flex>
129
- <Form.Item label="opacity" name={"opacity"} className="w-full">
129
+ <Form.Item label="Opacity Fill" name={"opacity"} className="w-full">
130
130
  <InputNumber step={10} max={100} min={0} name="opacity" parser={(value) => {
131
131
  if (value === undefined || value === null || value === "")
132
132
  return null;
@@ -1 +1,2 @@
1
- export declare const Camera: () => import("react/jsx-runtime").JSX.Element;
1
+ import React from "react";
2
+ export declare const Camera: () => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const Circle: () => import("react/jsx-runtime").JSX.Element;
1
+ import React from "react";
2
+ export declare const Circle: () => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const Square: () => import("react/jsx-runtime").JSX.Element;
1
+ import React from "react";
2
+ export declare const Square: () => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const Type1Icon: () => import("react/jsx-runtime").JSX.Element;
1
+ import React from "react";
2
+ export declare const Type1Icon: () => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const Type2Icon: () => import("react/jsx-runtime").JSX.Element;
1
+ import React from "react";
2
+ export declare const Type2Icon: () => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const Type3Icon: () => import("react/jsx-runtime").JSX.Element;
1
+ import React from "react";
2
+ export declare const Type3Icon: () => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const Type4Icon: () => import("react/jsx-runtime").JSX.Element;
1
+ import React from "react";
2
+ export declare const Type4Icon: () => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const Type5Icon: () => import("react/jsx-runtime").JSX.Element;
1
+ import React from "react";
2
+ export declare const Type5Icon: () => React.JSX.Element;
@@ -3,5 +3,5 @@ interface NumberIndicatorProps {
3
3
  defaultValue?: number;
4
4
  onChange: (value: number) => void;
5
5
  }
6
- declare const NumberIndicator: ({ name, defaultValue, onChange }: NumberIndicatorProps) => import("react/jsx-runtime").JSX.Element;
6
+ declare const NumberIndicator: ({ name, defaultValue, onChange }: NumberIndicatorProps) => import("react").JSX.Element;
7
7
  export default NumberIndicator;
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  type JoystickPosition = {
2
3
  x: number;
3
4
  y: number;
@@ -7,5 +8,5 @@ type JoystickProps = {
7
8
  onMove?: (pos: JoystickPosition) => void;
8
9
  onEnd?: () => void;
9
10
  };
10
- export declare const Joystick: ({ size, onMove, onEnd, }: JoystickProps) => import("react/jsx-runtime").JSX.Element;
11
+ export declare const Joystick: ({ size, onMove, onEnd, }: JoystickProps) => React.JSX.Element;
11
12
  export {};
@@ -15,5 +15,5 @@ interface LayersProps {
15
15
  onTouchMove?: (e: React.TouchEvent<SVGRectElement | SVGCircleElement | SVGTextElement | SVGImageElement>) => void;
16
16
  onTouchEnd?: (e: React.TouchEvent<SVGRectElement | SVGCircleElement | SVGTextElement | SVGImageElement>) => void;
17
17
  }
18
- declare const Layers: ({ shadowShape, components, onClick, selectedComponent, selectedTable, activeTool, onMouseDown, onMouseUp, onBlur, selectedTableColor, mode, style, onTouchEnd, onTouchMove, onTouchStart }: LayersProps) => import("react/jsx-runtime").JSX.Element;
18
+ declare const Layers: ({ shadowShape, components, onClick, selectedComponent, selectedTable, activeTool, onMouseDown, onMouseUp, onBlur, selectedTableColor, mode, style, onTouchEnd, onTouchMove, onTouchStart }: LayersProps) => import("react").JSX.Element;
19
19
  export default Layers;
@@ -15,5 +15,5 @@ interface LayersProps {
15
15
  onTouchMove?: (e: React.TouchEvent<SVGRectElement | SVGCircleElement | SVGTextElement | SVGImageElement>) => void;
16
16
  onTouchEnd?: (e: React.TouchEvent<SVGRectElement | SVGCircleElement | SVGTextElement | SVGImageElement>) => void;
17
17
  }
18
- declare const Layers: ({ shadowShape, components, onClick, selectedComponent, selectedTable, activeTool, onMouseDown, onMouseUp, onBlur, selectedTableColor, mode, style, onTouchStart }: LayersProps) => import("react/jsx-runtime").JSX.Element;
18
+ declare const Layers: ({ shadowShape, components, onClick, selectedComponent, selectedTable, activeTool, onMouseDown, onMouseUp, onBlur, selectedTableColor, mode, style, onTouchStart }: LayersProps) => import("react").JSX.Element;
19
19
  export default Layers;
@@ -9,5 +9,5 @@ interface LayersProps {
9
9
  activeTool?: string;
10
10
  selectionLines?: SelectionLines;
11
11
  }
12
- declare const Layers: ({ components, selectedComponent, activeTool, selectionLines, }: LayersProps) => import("react/jsx-runtime").JSX.Element;
12
+ declare const Layers: ({ components, selectedComponent, activeTool, selectionLines, }: LayersProps) => import("react").JSX.Element;
13
13
  export default Layers;
@@ -439,7 +439,7 @@ const Layers = ({ components, selectedComponent, activeTool, selectionLines, })
439
439
  }) })] }) }, id));
440
440
  }
441
441
  case "text":
442
- return (_jsx("g", { "data-id": id, transform: `translate(${x}, ${y})`, children: _jsxs("g", { transform: `rotate(${rotation}, 0, 0)`, children: [_jsx("rect", { width: width, height: height, fill: "transparent", opacity: opacity }), _jsx("text", Object.assign({ x: width / 2, y: height / 2, textAnchor: "middle", dominantBaseline: "middle", fill: fill !== null && fill !== void 0 ? fill : fontColor, fontSize: fontSize !== null && fontSize !== void 0 ? fontSize : height * 0.6, opacity: opacity }, omit(commonProps, ["fill", "opacity"]), { children: text }))] }) }, id));
442
+ return (_jsx("g", { "data-id": id, transform: `translate(${x}, ${y})`, children: _jsxs("g", { transform: `rotate(${rotation}, 0, 0)`, children: [_jsx("rect", Object.assign({ width: width, height: height, fill: "transparent", opacity: opacity }, omit(commonProps, ["fill", "opacity"]))), _jsx("text", Object.assign({ "data-text-raw": `${id}-text`, x: width / 2, y: height / 2, textAnchor: "middle", dominantBaseline: "middle", fill: fill !== null && fill !== void 0 ? fill : fontColor, fontSize: fontSize !== null && fontSize !== void 0 ? fontSize : height * 0.6, opacity: opacity }, omit(commonProps, ["fill", "opacity", "stroke", "strokeWidth"]), { children: text }))] }) }, id));
443
443
  case "image-table":
444
444
  case "background":
445
445
  return (_jsx("g", { id: `${id}`, "data-id": id, transform: `translate(${x}, ${y})`, style: {
@@ -547,8 +547,8 @@ const Layers = ({ components, selectedComponent, activeTool, selectionLines, })
547
547
  case "text":
548
548
  return (<g key={id} data-id={id} transform={`translate(${x}, ${y})`}>
549
549
  <g transform={`rotate(${rotation}, 0, 0)`}>
550
- <rect width={width} height={height} fill="transparent" opacity={opacity}/>
551
- <text x={width / 2} y={height / 2} textAnchor="middle" dominantBaseline="middle" fill={fill !== null && fill !== void 0 ? fill : fontColor} fontSize={fontSize !== null && fontSize !== void 0 ? fontSize : height * 0.6} opacity={opacity} {...omit(commonProps, ["fill", "opacity"])}>
550
+ <rect width={width} height={height} fill="transparent" opacity={opacity} {...omit(commonProps, ["fill", "opacity"])}/>
551
+ <text data-text-raw={`${id}-text`} x={width / 2} y={height / 2} textAnchor="middle" dominantBaseline="middle" fill={fill !== null && fill !== void 0 ? fill : fontColor} fontSize={fontSize !== null && fontSize !== void 0 ? fontSize : height * 0.6} opacity={opacity} {...omit(commonProps, ["fill", "opacity", "stroke", "strokeWidth"])}>
552
552
  {text}
553
553
  </text>
554
554
  </g>
@@ -20,5 +20,5 @@ interface LayersProps {
20
20
  items: string[];
21
21
  }[];
22
22
  }
23
- declare const Layers: ({ components, selectedTable, iconTags, eventMatchTable, onHighlightGroup, onForceRestoreGroup, selectedTableColor, privilegedTags, }: LayersProps) => import("react/jsx-runtime").JSX.Element;
23
+ declare const Layers: ({ components, selectedTable, iconTags, eventMatchTable, onHighlightGroup, onForceRestoreGroup, selectedTableColor, privilegedTags, }: LayersProps) => import("react").JSX.Element;
24
24
  export default Layers;
@@ -20,5 +20,5 @@ interface LayersProps {
20
20
  items: string[];
21
21
  }[];
22
22
  }
23
- declare const Layers: ({ components, selectedTable, iconTags, eventMatchTable, onHighlightGroup, onForceRestoreGroup, selectedTableColor, privilegedTags, }: LayersProps) => import("react/jsx-runtime").JSX.Element;
23
+ declare const Layers: ({ components, selectedTable, iconTags, eventMatchTable, onHighlightGroup, onForceRestoreGroup, selectedTableColor, privilegedTags, }: LayersProps) => import("react").JSX.Element;
24
24
  export default Layers;
@@ -3,6 +3,6 @@ export interface LayerViewProps {
3
3
  componentProps: any[];
4
4
  extraComponentProps: any[];
5
5
  }
6
- declare const TableEditor: ({ componentProps, extraComponentProps, }: LayerViewProps) => import("react/jsx-runtime").JSX.Element;
6
+ declare const TableEditor: ({ componentProps, extraComponentProps, }: LayerViewProps) => import("react").JSX.Element;
7
7
  export default TableEditor;
8
8
  export { LayerView };
@@ -1,4 +1,4 @@
1
1
  declare const ModalPreview: ({ children }: {
2
2
  children: React.ReactNode;
3
- }) => import("react/jsx-runtime").JSX.Element;
3
+ }) => import("react").JSX.Element;
4
4
  export default ModalPreview;
@@ -2,5 +2,5 @@ interface BoardTemplateProps {
2
2
  onSelectComponent?: (items: any) => void;
3
3
  mappingKey?: string;
4
4
  }
5
- declare const BoardTemplate: ({ onSelectComponent }: BoardTemplateProps) => import("react/jsx-runtime").JSX.Element;
5
+ declare const BoardTemplate: ({ onSelectComponent }: BoardTemplateProps) => import("react").JSX.Element;
6
6
  export default BoardTemplate;
@@ -1,7 +1,8 @@
1
+ import React from "react";
1
2
  interface BoardTemplateProps {
2
3
  onSelectComponent?: (items: any) => void;
3
4
  mappingKey?: string;
4
5
  viewOnly?: boolean;
5
6
  }
6
- declare const BoardTemplate: ({ onSelectComponent, viewOnly }: BoardTemplateProps) => import("react/jsx-runtime").JSX.Element;
7
+ declare const BoardTemplate: ({ onSelectComponent, viewOnly }: BoardTemplateProps) => React.JSX.Element;
7
8
  export default BoardTemplate;
@@ -13,5 +13,5 @@ interface BoardTemplateProps {
13
13
  };
14
14
  disabled?: boolean;
15
15
  }
16
- declare const BoardTemplate: ({ refs, loadingRender, disabled, }: BoardTemplateProps) => import("react/jsx-runtime").JSX.Element;
16
+ declare const BoardTemplate: ({ refs, loadingRender, disabled, }: BoardTemplateProps) => React.JSX.Element;
17
17
  export default BoardTemplate;
@@ -13,6 +13,7 @@ import { Button, Flex, Radio, Slider, Tag, } from "antd";
13
13
  import { getAttributeElement, getAttributeElements } from "./resize-element";
14
14
  import { applyResizeToSvgElement, arrayToSvgPointsAttr, createTableGhost, getGlobalBBox, getRotation, getSvgElementSize, getTranslate, isClosingPolygon, normalizeAngle, pointsStringToArray, resizeBox, resizeSeatCircle, resizeSeatRectCircle, resizeSeatRectSquare, resizeSeatSide, resizeSeatSquare, stabilizeRotation, stabilizeTranslateOnRotate, updateManyComponents, updateSelectionBox, updateSelectionGuides, updateSingleComponent, } from "./utils";
15
15
  import { getOS } from "../../utils/agent";
16
+ import { MIN_HEIGHT, MIN_WIDTH } from "./constant";
16
17
  const toolElement = ["square", "circle", "table-seat-circle"];
17
18
  const idSelectionBoxGhost = "selection-box-ghost";
18
19
  const nameShapeSelectionBoxGhost = "selection-box";
@@ -78,7 +79,7 @@ const BoardTemplate = ({ refs, loadingRender, disabled = false, }) => {
78
79
  const [selectedLines, setSelectedLines] = useState(null);
79
80
  useEffect(() => {
80
81
  if (activeTool === "select" || activeTool !== "select") {
81
- handleUnSelectComponent();
82
+ (selectedComponentProps === null || selectedComponentProps === void 0 ? void 0 : selectedComponentProps.shape) !== "text" && handleUnSelectComponent();
82
83
  }
83
84
  if (activeTool !== "polygon") {
84
85
  isOnMakePolygonRef.current = false;
@@ -416,7 +417,7 @@ const BoardTemplate = ({ refs, loadingRender, disabled = false, }) => {
416
417
  };
417
418
  }, [dataElementSelectionGroupRef.current]);
418
419
  const handlePointerDown = (e) => {
419
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
420
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
420
421
  const shiftActive = e.shiftKey;
421
422
  if (activeTool === "grab") {
422
423
  return;
@@ -466,15 +467,16 @@ const BoardTemplate = ({ refs, loadingRender, disabled = false, }) => {
466
467
  isCreateElementRef.current = true;
467
468
  }
468
469
  else if (isInitialCreateText) {
469
- const tables = createTableGhost({
470
+ const [elTemp, el] = createTableGhost({
470
471
  x,
471
472
  y,
472
- width: 100 * scale,
473
- height: 50 * scale,
473
+ width: MIN_WIDTH,
474
+ height: MIN_HEIGHT,
474
475
  fill: "#000000",
475
476
  shape: activeTool,
476
477
  });
477
- (_c = svgRef.current) === null || _c === void 0 ? void 0 : _c.appendChild(tables);
478
+ (_c = svgRef.current) === null || _c === void 0 ? void 0 : _c.appendChild(elTemp);
479
+ (_d = svgRef.current) === null || _d === void 0 ? void 0 : _d.appendChild(el);
478
480
  isCreateElementRef.current = true;
479
481
  }
480
482
  const targetSelection = e.target.closest("g[id='selection-lines']");
@@ -485,14 +487,14 @@ const BoardTemplate = ({ refs, loadingRender, disabled = false, }) => {
485
487
  }
486
488
  let positionSelection = null;
487
489
  if (activeTool === "select") {
488
- positionSelection = (_e = (_d = e.target.closest(`polyline[data-position]`)) === null || _d === void 0 ? void 0 : _d.dataset) === null || _e === void 0 ? void 0 : _e.position;
490
+ positionSelection = (_f = (_e = e.target.closest(`polyline[data-position]`)) === null || _e === void 0 ? void 0 : _e.dataset) === null || _f === void 0 ? void 0 : _f.position;
489
491
  }
490
492
  // RESIZE
491
493
  const targetGroup = e.target.closest("g[data-id]");
492
494
  const targetPointPolygon = e.target.closest("circle[data-point]");
493
495
  // TARGET ELEMENT
494
496
  let idTargetElement = JSON.parse((targetGroup === null || targetGroup === void 0 ? void 0 : targetGroup.getAttribute("data-id")) || "{}");
495
- const selectionTarget = (_g = (_f = targetSelection === null || targetSelection === void 0 ? void 0 : targetSelection.dataset) === null || _f === void 0 ? void 0 : _f.selection) === null || _g === void 0 ? void 0 : _g.replace("selection-", "");
497
+ const selectionTarget = (_h = (_g = targetSelection === null || targetSelection === void 0 ? void 0 : targetSelection.dataset) === null || _g === void 0 ? void 0 : _g.selection) === null || _h === void 0 ? void 0 : _h.replace("selection-", "");
496
498
  const activeId = selectionTarget !== null && selectionTarget !== void 0 ? selectionTarget : idTargetElement;
497
499
  const isInSelectionTarget = !isUndefined(selectionTarget);
498
500
  const isInTargetElement = !isPlainObject(idTargetElement);
@@ -500,7 +502,7 @@ const BoardTemplate = ({ refs, loadingRender, disabled = false, }) => {
500
502
  const { g } = getAttributeElement(svg, activeId);
501
503
  if (targetGroup && shiftActive) {
502
504
  const findById = [...componentsState, ...extraComponentsState].find((comp) => comp.id == activeId);
503
- const currentSelection = (_h = dataElementSelectionGroupRef.current) !== null && _h !== void 0 ? _h : [];
505
+ const currentSelection = (_j = dataElementSelectionGroupRef.current) !== null && _j !== void 0 ? _j : [];
504
506
  if (currentSelection.length == 0 && selectedComponent) {
505
507
  currentSelection.push(selectedComponent);
506
508
  }
@@ -520,7 +522,7 @@ const BoardTemplate = ({ refs, loadingRender, disabled = false, }) => {
520
522
  const hitPoint = document.elementFromPoint(clientX, clientY);
521
523
  // CHECK FOR HIT ON SVG FOR SELECTION BOX
522
524
  // MAKE AND UNMAKE SELECTION BOX START ------
523
- const hadSelectionBox = ((_j = dataElementSelectionGroupRef.current) === null || _j === void 0 ? void 0 : _j.length) > 0 && !isSingleSelection;
525
+ const hadSelectionBox = ((_k = dataElementSelectionGroupRef.current) === null || _k === void 0 ? void 0 : _k.length) > 0 && !isSingleSelection;
524
526
  const downInSelectionBox = hadSelectionBox && (hitPoint === null || hitPoint === void 0 ? void 0 : hitPoint.nodeName) !== "svg";
525
527
  const downOutSelectionBox = hadSelectionBox && (hitPoint === null || hitPoint === void 0 ? void 0 : hitPoint.nodeName) === "svg";
526
528
  const downBeforeHasSelectionBox = !downInSelectionBox &&
@@ -558,7 +560,7 @@ const BoardTemplate = ({ refs, loadingRender, disabled = false, }) => {
558
560
  shape: nameShapeSelectionBoxGhost,
559
561
  id: idSelectionBoxGhost,
560
562
  });
561
- (_k = svgRef.current) === null || _k === void 0 ? void 0 : _k.appendChild(boxSelection);
563
+ (_l = svgRef.current) === null || _l === void 0 ? void 0 : _l.appendChild(boxSelection);
562
564
  }
563
565
  // MAKE AND UNMAKE SELECTION BOX END ------
564
566
  // RESIZE SELECTION BOX
@@ -830,7 +832,7 @@ const BoardTemplate = ({ refs, loadingRender, disabled = false, }) => {
830
832
  updateSelectionBox(svg, resultSelection);
831
833
  const scaleX = resultSelection.width / oldSel.width;
832
834
  const scaleY = resultSelection.height / oldSel.height;
833
- allGroupsAttribute.forEach(({ g, element, seatGroup, seats, text }, i) => {
835
+ allGroupsAttribute.forEach(({ g, element, seatGroup, seats, text, textRaw }, i) => {
834
836
  var _a, _b;
835
837
  const activeId = JSON.parse(g === null || g === void 0 ? void 0 : g.getAttribute("data-id"));
836
838
  const elementOld = allDataRealSelection === null || allDataRealSelection === void 0 ? void 0 : allDataRealSelection.find((el) => el.id == activeId);
@@ -915,7 +917,7 @@ const BoardTemplate = ({ refs, loadingRender, disabled = false, }) => {
915
917
  });
916
918
  }
917
919
  }
918
- applyResizeToSvgElement(element, g, newElement, text);
920
+ applyResizeToSvgElement(element, g, newElement, text, textRaw);
919
921
  });
920
922
  };
921
923
  if (downAtResizePositionAndHasSelectionBox)
@@ -1058,7 +1060,7 @@ const BoardTemplate = ({ refs, loadingRender, disabled = false, }) => {
1058
1060
  var _a, _b;
1059
1061
  const activeId = selectedComponent === null || selectedComponent === void 0 ? void 0 : selectedComponent.id;
1060
1062
  const svg = svgRef.current;
1061
- const { g, element, seats, seatGroup, text } = getAttributeElement(svg, activeId);
1063
+ const { g, element, seats, seatGroup, text, textRaw } = getAttributeElement(svg, activeId);
1062
1064
  const isZeroRotate = (selectedComponent === null || selectedComponent === void 0 ? void 0 : selectedComponent.rotation) === 0 &&
1063
1065
  !(selectedComponent === null || selectedComponent === void 0 ? void 0 : selectedComponent.shape.includes("circle"));
1064
1066
  const elementSelect = {
@@ -1197,7 +1199,7 @@ const BoardTemplate = ({ refs, loadingRender, disabled = false, }) => {
1197
1199
  });
1198
1200
  }
1199
1201
  }
1200
- applyResizeToSvgElement(element, g, newElement, text);
1202
+ applyResizeToSvgElement(element, g, newElement, text, textRaw);
1201
1203
  isResizeRef.current = true;
1202
1204
  };
1203
1205
  // const hasSelectedOneElement =
@@ -1605,7 +1607,8 @@ const BoardTemplate = ({ refs, loadingRender, disabled = false, }) => {
1605
1607
  if (isInitialCreateText) {
1606
1608
  const ghost = svg.querySelector("#ghost-element-create");
1607
1609
  const getBBox = getGlobalBBox(svg, ghost);
1608
- const text = Object.assign(Object.assign({}, getBBox), { id: `${Date.now()}`, shape: "text", fill: "#000000", text: "Text", fontSize: 14 });
1610
+ console.log({ getBBox });
1611
+ const text = Object.assign(Object.assign({}, getBBox), { id: `${Date.now()}`, shape: "text", fill: "#000000", text: "Text", fontSize: 14, rotation: 0 });
1609
1612
  addComponents(text);
1610
1613
  dispatch({
1611
1614
  type: "panel/setShow",
@@ -1615,6 +1618,11 @@ const BoardTemplate = ({ refs, loadingRender, disabled = false, }) => {
1615
1618
  type: "panel/setSelectedComponent",
1616
1619
  payload: text,
1617
1620
  });
1621
+ setSelectedComponent(text);
1622
+ dispatch({
1623
+ type: "tool/setActiveTool",
1624
+ payload: "select",
1625
+ });
1618
1626
  (_p = (_o = svgRef.current) === null || _o === void 0 ? void 0 : _o.querySelectorAll("#ghost-element-create")) === null || _p === void 0 ? void 0 : _p.forEach((el) => el.remove());
1619
1627
  isCreateElementRef.current = false;
1620
1628
  }
@@ -1944,7 +1952,7 @@ const BoardTemplate = ({ refs, loadingRender, disabled = false, }) => {
1944
1952
  if (activeTool === "grab") {
1945
1953
  setCursor("grabbing");
1946
1954
  }
1947
- }, doubleClick: { step: 1, disabled: activeTool === "select" }, disablePadding: true, centerOnInit: true, children: _jsx(TransformComponent, { wrapperStyle: {
1955
+ }, doubleClick: { disabled: true }, disablePadding: true, centerOnInit: true, children: _jsx(TransformComponent, { wrapperStyle: {
1948
1956
  width: "100%",
1949
1957
  height: "100%",
1950
1958
  }, contentStyle: { width: boardSize.width, height: boardSize.height }, children: _jsxs("svg", { id: "workspace", ref: svgRef, width: boardSize.width, height: boardSize.height, viewBox: `${minCoords.x} ${minCoords.y} ${boardSize.width} ${boardSize.height}`, onPointerDown: handlePointerDown, onPointerMove: handlePointerMove, xmlns: "http://www.w3.org/2000/svg", preserveAspectRatio: "xMidYMid meet", style: {