@rytass/wms-map-react-components 0.1.10 → 0.2.0

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 (97) hide show
  1. package/components/breadcrumb/breadcrumb-edit-modal.cjs +92 -0
  2. package/components/breadcrumb/breadcrumb-edit-modal.d.cts +9 -0
  3. package/components/breadcrumb/breadcrumb-edit-modal.module.scss.cjs +5 -0
  4. package/components/breadcrumb/breadcrumb.cjs +171 -0
  5. package/components/breadcrumb/breadcrumb.d.cts +11 -0
  6. package/components/breadcrumb/breadcrumb.d.ts +1 -1
  7. package/components/breadcrumb/breadcrumb.module.scss.cjs +5 -0
  8. package/components/canvas/react-flow-canvas.cjs +321 -0
  9. package/components/canvas/react-flow-canvas.d.cts +38 -0
  10. package/components/canvas/react-flow-canvas.d.ts +1 -1
  11. package/components/canvas/react-flow-canvas.module.scss.cjs +5 -0
  12. package/components/modal/wms-map-content.cjs +808 -0
  13. package/components/modal/wms-map-content.d.cts +4 -0
  14. package/components/modal/wms-map-content.d.ts +1 -1
  15. package/components/modal/wms-map-modal-container.cjs +130 -0
  16. package/components/modal/wms-map-modal-container.d.cts +5 -0
  17. package/components/modal/wms-map-modal-container.d.ts +1 -1
  18. package/components/modal/wms-map-modal-container.module.scss.cjs +5 -0
  19. package/components/nodes/base-node.d.cts +12 -0
  20. package/components/nodes/base-node.d.ts +1 -1
  21. package/components/nodes/image-node.cjs +236 -0
  22. package/components/nodes/image-node.d.cts +17 -0
  23. package/components/nodes/image-node.d.ts +1 -1
  24. package/components/nodes/image-node.module.scss.cjs +5 -0
  25. package/components/nodes/path-node.cjs +553 -0
  26. package/components/nodes/path-node.d.cts +19 -0
  27. package/components/nodes/path-node.d.ts +1 -1
  28. package/components/nodes/path-node.module.scss.cjs +5 -0
  29. package/components/nodes/rectangle-node.cjs +239 -0
  30. package/components/nodes/rectangle-node.d.cts +11 -0
  31. package/components/nodes/rectangle-node.d.ts +1 -1
  32. package/components/nodes/rectangle-node.module.scss.cjs +5 -0
  33. package/components/ui/context-menu.cjs +171 -0
  34. package/components/ui/context-menu.d.cts +25 -0
  35. package/components/ui/context-menu.module.scss.cjs +5 -0
  36. package/components/ui/toolbar.cjs +286 -0
  37. package/components/ui/toolbar.d.cts +23 -0
  38. package/components/ui/toolbar.d.ts +1 -1
  39. package/components/ui/toolbar.module.scss.cjs +5 -0
  40. package/components/ui/view-mode-toolbar.cjs +44 -0
  41. package/components/ui/view-mode-toolbar.d.cts +9 -0
  42. package/components/ui/view-mode-toolbar.d.ts +1 -1
  43. package/components/ui/view-mode-toolbar.module.scss.cjs +5 -0
  44. package/constants/index.cjs +54 -0
  45. package/constants/index.d.cts +45 -0
  46. package/constants/index.d.ts +2 -2
  47. package/constants/text-mappings.cjs +46 -0
  48. package/constants/text-mappings.d.cts +181 -0
  49. package/hooks/use-context-menu.cjs +231 -0
  50. package/hooks/use-context-menu.d.cts +37 -0
  51. package/hooks/use-context-menu.d.ts +1 -1
  52. package/hooks/use-direct-state-history.cjs +217 -0
  53. package/hooks/use-direct-state-history.d.cts +58 -0
  54. package/hooks/use-direct-state-history.d.ts +2 -2
  55. package/hooks/use-pen-drawing.cjs +366 -0
  56. package/hooks/use-pen-drawing.d.cts +30 -0
  57. package/hooks/use-pen-drawing.d.ts +1 -1
  58. package/hooks/use-rectangle-drawing.cjs +139 -0
  59. package/hooks/use-rectangle-drawing.d.cts +19 -0
  60. package/hooks/use-rectangle-drawing.d.ts +1 -1
  61. package/hooks/use-text-editing.cjs +156 -0
  62. package/hooks/use-text-editing.d.cts +19 -0
  63. package/icons/index.cjs +233 -0
  64. package/icons/index.d.cts +16 -0
  65. package/index.cjs +26 -0
  66. package/index.d.cts +5 -0
  67. package/index.d.ts +5 -5
  68. package/package.json +68 -3
  69. package/types/callback.types.d.cts +7 -0
  70. package/types/callback.types.d.ts +1 -1
  71. package/types/canvas.types.d.cts +35 -0
  72. package/types/canvas.types.d.ts +1 -1
  73. package/types/component-props.types.d.cts +45 -0
  74. package/types/component-props.types.d.ts +2 -2
  75. package/types/history.types.d.cts +24 -0
  76. package/types/history.types.d.ts +2 -2
  77. package/types/index.d.cts +5 -0
  78. package/types/index.d.ts +5 -5
  79. package/types/react-flow.types.d.cts +30 -0
  80. package/typings.cjs +44 -0
  81. package/typings.d.cts +136 -0
  82. package/utils/api-data-transform.cjs +221 -0
  83. package/utils/api-data-transform.d.cts +33 -0
  84. package/utils/api-data-transform.d.ts +1 -1
  85. package/utils/color-utils.cjs +58 -0
  86. package/utils/color-utils.d.cts +17 -0
  87. package/utils/debug-logger.cjs +45 -0
  88. package/utils/debug-logger.d.cts +33 -0
  89. package/utils/map-data-transform.cjs +360 -0
  90. package/utils/map-data-transform.d.cts +18 -0
  91. package/utils/map-data-transform.d.ts +1 -1
  92. package/utils/node-operations.cjs +88 -0
  93. package/utils/node-operations.d.cts +26 -0
  94. package/utils/node-utils.cjs +40 -0
  95. package/utils/node-utils.d.cts +10 -0
  96. package/index.cjs.css +0 -1
  97. package/index.cjs.js +0 -5128
@@ -0,0 +1,360 @@
1
+ 'use strict';
2
+
3
+ var typings = require('../typings.cjs');
4
+
5
+ /**
6
+ * 轉換 React Flow 節點資料為 Map 資料格式
7
+ */ const transformNodesToMapData = (nodes)=>{
8
+ const backgrounds = [];
9
+ const ranges = [];
10
+ nodes.forEach((node)=>{
11
+ switch(node.type){
12
+ case 'imageNode':
13
+ {
14
+ // ImageNode 轉換為 MapBackground
15
+ const imageData = node.data;
16
+ const background = {
17
+ id: node.id,
18
+ filename: imageData.fileName || 'unknown.jpg',
19
+ x: node.position.x,
20
+ y: node.position.y,
21
+ width: imageData.width || 300,
22
+ height: imageData.height || 200
23
+ };
24
+ backgrounds.push(background);
25
+ break;
26
+ }
27
+ case 'rectangleNode':
28
+ {
29
+ // RectangleNode 轉換為 MapRectangleRange
30
+ const rectData = node.data;
31
+ const rectangleRange = {
32
+ id: rectData.label || node.id,
33
+ type: typings.MapRangeType.RECTANGLE,
34
+ color: rectData.color || '#0000FF',
35
+ x: node.position.x,
36
+ y: node.position.y,
37
+ width: rectData.width || 100,
38
+ height: rectData.height || 100
39
+ };
40
+ ranges.push(rectangleRange);
41
+ break;
42
+ }
43
+ case 'pathNode':
44
+ {
45
+ // PathNode 轉換為 MapPolygonRange
46
+ const pathData = node.data;
47
+ const originSourcePointX = Math.min(...pathData.points.map((p)=>p.x));
48
+ const originSourcePointY = Math.min(...pathData.points.map((p)=>p.y));
49
+ const deltaX = node.position.x - originSourcePointX;
50
+ const deltaY = node.position.y - originSourcePointY;
51
+ // 將 node.position 偏移量加到每個 point 上,因為拖曳整個 node 時只更新 position 不更新 data.points
52
+ const absolutePoints = (pathData.points || []).map((p)=>({
53
+ x: p.x + deltaX,
54
+ y: p.y + deltaY
55
+ }));
56
+ const polygonRange = {
57
+ id: pathData.label || node.id,
58
+ type: typings.MapRangeType.POLYGON,
59
+ color: pathData.color || '#0000FF',
60
+ points: absolutePoints
61
+ };
62
+ ranges.push(polygonRange);
63
+ break;
64
+ }
65
+ default:
66
+ // 忽略未知的節點類型
67
+ console.warn(`Unknown node type: ${node.type}`, node);
68
+ break;
69
+ }
70
+ });
71
+ // 生成 Map 物件
72
+ const mapData = {
73
+ id: `map-${Date.now()}`,
74
+ backgrounds,
75
+ ranges
76
+ };
77
+ return mapData;
78
+ };
79
+ /**
80
+ * 轉換 React Flow 節點為點擊資訊格式
81
+ */ const transformNodeToClickInfo = (node)=>{
82
+ const baseInfo = {
83
+ id: node.id,
84
+ type: node.type,
85
+ position: node.position,
86
+ zIndex: node.zIndex,
87
+ selected: node.selected
88
+ };
89
+ switch(node.type){
90
+ case 'imageNode':
91
+ {
92
+ const imageData = node.data;
93
+ const mapBackground = {
94
+ id: node.id,
95
+ filename: imageData.fileName || 'unknown.jpg',
96
+ x: node.position.x,
97
+ y: node.position.y,
98
+ width: imageData.width || 300,
99
+ height: imageData.height || 200
100
+ };
101
+ const clickInfo = {
102
+ ...baseInfo,
103
+ type: 'imageNode',
104
+ imageData: {
105
+ filename: imageData.fileName || 'unknown.jpg',
106
+ size: {
107
+ width: imageData.width || 0,
108
+ height: imageData.height || 0
109
+ },
110
+ originalSize: {
111
+ width: imageData.originalWidth || 0,
112
+ height: imageData.originalHeight || 0
113
+ },
114
+ imageUrl: imageData.imageUrl
115
+ },
116
+ mapBackground
117
+ };
118
+ return clickInfo;
119
+ }
120
+ case 'rectangleNode':
121
+ {
122
+ const rectData = node.data;
123
+ const mapRectangleRange = {
124
+ id: rectData.label || node.id,
125
+ type: typings.MapRangeType.RECTANGLE,
126
+ color: rectData.color || '#0000FF',
127
+ x: node.position.x,
128
+ y: node.position.y,
129
+ width: rectData.width || 100,
130
+ height: rectData.height || 100
131
+ };
132
+ const clickInfo = {
133
+ ...baseInfo,
134
+ type: 'rectangleNode',
135
+ rectangleData: {
136
+ color: rectData.color || '#0000FF',
137
+ size: {
138
+ width: rectData.width || 100,
139
+ height: rectData.height || 100
140
+ }
141
+ },
142
+ mapRectangleRange
143
+ };
144
+ return clickInfo;
145
+ }
146
+ case 'pathNode':
147
+ {
148
+ const pathData = node.data;
149
+ const originSourcePointX = Math.min(...pathData.points.map((p)=>p.x));
150
+ const originSourcePointY = Math.min(...pathData.points.map((p)=>p.y));
151
+ const deltaX = node.position.x - originSourcePointX;
152
+ const deltaY = node.position.y - originSourcePointY;
153
+ const absolutePoints = (pathData.points || []).map((p)=>({
154
+ x: p.x + deltaX,
155
+ y: p.y + deltaY
156
+ }));
157
+ const mapPolygonRange = {
158
+ id: pathData.label || node.id,
159
+ type: typings.MapRangeType.POLYGON,
160
+ color: pathData.color || '#0000FF',
161
+ points: absolutePoints
162
+ };
163
+ const absoluteBounds = absolutePoints.length > 0 ? {
164
+ minX: Math.min(...absolutePoints.map((p)=>p.x)),
165
+ minY: Math.min(...absolutePoints.map((p)=>p.y)),
166
+ maxX: Math.max(...absolutePoints.map((p)=>p.x)),
167
+ maxY: Math.max(...absolutePoints.map((p)=>p.y))
168
+ } : null;
169
+ const clickInfo = {
170
+ ...baseInfo,
171
+ type: 'pathNode',
172
+ pathData: {
173
+ color: pathData.color || '#0000FF',
174
+ strokeWidth: pathData.strokeWidth || 2,
175
+ pointCount: absolutePoints.length,
176
+ points: absolutePoints,
177
+ bounds: absoluteBounds
178
+ },
179
+ mapPolygonRange
180
+ };
181
+ return clickInfo;
182
+ }
183
+ default:
184
+ console.warn(`未知的節點類型: ${node.type}`);
185
+ return null;
186
+ }
187
+ };
188
+ /**
189
+ * 格式化輸出單個節點的詳細資訊
190
+ */ const logNodeData = (node)=>{
191
+ console.group(`🎯 圖形點擊資訊 - ${node.type}`);
192
+ console.log('📋 基本資訊:', {
193
+ id: node.id,
194
+ type: node.type,
195
+ position: node.position,
196
+ zIndex: node.zIndex,
197
+ selected: node.selected
198
+ });
199
+ switch(node.type){
200
+ case 'imageNode':
201
+ {
202
+ const imageData = node.data;
203
+ console.log('🖼️ 背景圖片資訊:', {
204
+ filename: imageData.fileName || 'unknown.jpg',
205
+ position: {
206
+ x: node.position.x,
207
+ y: node.position.y
208
+ },
209
+ size: {
210
+ width: imageData.width,
211
+ height: imageData.height
212
+ },
213
+ originalSize: {
214
+ width: imageData.originalWidth,
215
+ height: imageData.originalHeight
216
+ },
217
+ imageUrl: imageData.imageUrl?.slice(0, 50) + '...'
218
+ });
219
+ // 轉換格式(對應儲存時的格式)
220
+ const background = {
221
+ id: node.id,
222
+ filename: imageData.fileName || 'unknown.jpg',
223
+ x: node.position.x,
224
+ y: node.position.y,
225
+ width: imageData.width || 300,
226
+ height: imageData.height || 200
227
+ };
228
+ console.log('💾 儲存格式 (MapBackground):', background);
229
+ break;
230
+ }
231
+ case 'rectangleNode':
232
+ {
233
+ const rectData = node.data;
234
+ console.log('📐 矩形資訊:', {
235
+ color: rectData.color,
236
+ position: {
237
+ x: node.position.x,
238
+ y: node.position.y
239
+ },
240
+ size: {
241
+ width: rectData.width || 100,
242
+ height: rectData.height || 100
243
+ }
244
+ });
245
+ // 轉換格式(對應儲存時的格式)
246
+ const rectangleRange = {
247
+ id: node.id,
248
+ type: typings.MapRangeType.RECTANGLE,
249
+ color: rectData.color || '#0000FF',
250
+ x: node.position.x,
251
+ y: node.position.y,
252
+ width: rectData.width || 100,
253
+ height: rectData.height || 100
254
+ };
255
+ console.log('💾 儲存格式 (MapRectangleRange):', rectangleRange);
256
+ break;
257
+ }
258
+ case 'pathNode':
259
+ {
260
+ const pathData = node.data;
261
+ const originSourcePointX = Math.min(...pathData.points.map((p)=>p.x));
262
+ const originSourcePointY = Math.min(...pathData.points.map((p)=>p.y));
263
+ const deltaX = node.position.x - originSourcePointX;
264
+ const deltaY = node.position.y - originSourcePointY;
265
+ // 轉換格式(對應儲存時的格式)— 加上 node.position 偏移
266
+ const absoluteLogPoints = (pathData.points || []).map((p)=>({
267
+ x: p.x + deltaX,
268
+ y: p.y + deltaY
269
+ }));
270
+ console.log('🔗 路徑資訊:', {
271
+ color: pathData.color,
272
+ strokeWidth: pathData.strokeWidth,
273
+ pointCount: pathData.points?.length || 0,
274
+ points: pathData.points,
275
+ // 計算路徑邊界
276
+ bounds: absoluteLogPoints?.length > 0 ? {
277
+ minX: Math.min(...absoluteLogPoints.map((p)=>p.x)),
278
+ minY: Math.min(...absoluteLogPoints.map((p)=>p.y)),
279
+ maxX: Math.max(...absoluteLogPoints.map((p)=>p.x)),
280
+ maxY: Math.max(...absoluteLogPoints.map((p)=>p.y))
281
+ } : null
282
+ });
283
+ const polygonRange = {
284
+ id: node.id,
285
+ type: typings.MapRangeType.POLYGON,
286
+ color: pathData.color || '#0000FF',
287
+ points: absoluteLogPoints
288
+ };
289
+ console.log('💾 儲存格式 (MapPolygonRange):', polygonRange);
290
+ break;
291
+ }
292
+ default:
293
+ console.warn(`未知的節點類型: ${node.type}`);
294
+ break;
295
+ }
296
+ console.log('🔢 完整節點資料:', node);
297
+ console.groupEnd();
298
+ };
299
+ /**
300
+ * 格式化輸出 Map 資料到 console,包含詳細資訊
301
+ */ const logMapData = (mapData)=>{
302
+ console.group('🗺️ WMS Map Data Export');
303
+ console.log('📋 Map Overview:', {
304
+ id: mapData.id,
305
+ backgroundCount: mapData.backgrounds.length,
306
+ rangeCount: mapData.ranges.length
307
+ });
308
+ if (mapData.backgrounds.length > 0) {
309
+ console.group('🖼️ Background Images');
310
+ mapData.backgrounds.forEach((bg, index)=>{
311
+ console.log(`Background ${index + 1}:`, {
312
+ id: bg.id,
313
+ filename: bg.filename,
314
+ position: {
315
+ x: bg.x,
316
+ y: bg.y
317
+ }
318
+ });
319
+ });
320
+ console.groupEnd();
321
+ }
322
+ if (mapData.ranges.length > 0) {
323
+ console.group('📐 Ranges');
324
+ mapData.ranges.forEach((range, index)=>{
325
+ if (range.type === typings.MapRangeType.RECTANGLE) {
326
+ const rect = range;
327
+ console.log(`Rectangle ${index + 1}:`, {
328
+ id: rect.id,
329
+ type: rect.type,
330
+ color: rect.color,
331
+ position: {
332
+ x: rect.x,
333
+ y: rect.y
334
+ },
335
+ size: {
336
+ width: rect.width,
337
+ height: rect.height
338
+ }
339
+ });
340
+ } else if (range.type === typings.MapRangeType.POLYGON) {
341
+ const poly = range;
342
+ console.log(`Polygon ${index + 1}:`, {
343
+ id: poly.id,
344
+ type: poly.type,
345
+ color: poly.color,
346
+ pointCount: poly.points.length,
347
+ points: poly.points
348
+ });
349
+ }
350
+ });
351
+ console.groupEnd();
352
+ }
353
+ console.log('📄 Complete Map Data:', mapData);
354
+ console.groupEnd();
355
+ };
356
+
357
+ exports.logMapData = logMapData;
358
+ exports.logNodeData = logNodeData;
359
+ exports.transformNodeToClickInfo = transformNodeToClickInfo;
360
+ exports.transformNodesToMapData = transformNodesToMapData;
@@ -0,0 +1,18 @@
1
+ import { Node } from '@xyflow/react';
2
+ import { Map, WMSNodeClickInfo } from '../typings.cjs';
3
+ /**
4
+ * 轉換 React Flow 節點資料為 Map 資料格式
5
+ */
6
+ export declare const transformNodesToMapData: (nodes: Node[]) => Map;
7
+ /**
8
+ * 轉換 React Flow 節點為點擊資訊格式
9
+ */
10
+ export declare const transformNodeToClickInfo: (node: Node) => WMSNodeClickInfo | null;
11
+ /**
12
+ * 格式化輸出單個節點的詳細資訊
13
+ */
14
+ export declare const logNodeData: (node: Node) => void;
15
+ /**
16
+ * 格式化輸出 Map 資料到 console,包含詳細資訊
17
+ */
18
+ export declare const logMapData: (mapData: Map) => void;
@@ -1,5 +1,5 @@
1
1
  import { Node } from '@xyflow/react';
2
- import { Map, WMSNodeClickInfo } from '../typings';
2
+ import { Map, WMSNodeClickInfo } from '../typings.js';
3
3
  /**
4
4
  * 轉換 React Flow 節點資料為 Map 資料格式
5
5
  */
@@ -0,0 +1,88 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * Calculate offset position for copied node
5
+ */ const calculateCopyOffset = (width, height, offsetPercentage = 0.25)=>{
6
+ return {
7
+ offsetX: width * offsetPercentage,
8
+ offsetY: height * offsetPercentage
9
+ };
10
+ };
11
+ /**
12
+ * Create a copy of a rectangle node
13
+ */ const createRectangleCopy = (options)=>{
14
+ const { currentNode, offsetPercentage = 0.25, data } = options;
15
+ const { offsetX, offsetY } = calculateCopyOffset(data.width, data.height, offsetPercentage);
16
+ return {
17
+ id: `rectangle-${Date.now()}`,
18
+ type: 'rectangleNode',
19
+ position: {
20
+ x: currentNode.position.x + offsetX,
21
+ y: currentNode.position.y + offsetY
22
+ },
23
+ data: {
24
+ width: data.width,
25
+ height: data.height,
26
+ color: data.color,
27
+ label: data.label
28
+ }
29
+ };
30
+ };
31
+ /**
32
+ * Create a copy of a path node
33
+ */ const createPathCopy = (options)=>{
34
+ const { currentNode, offsetPercentage = 0.25, data } = options;
35
+ // Calculate path bounds
36
+ const xs = data.points.map((p)=>p.x);
37
+ const ys = data.points.map((p)=>p.y);
38
+ const bounds = {
39
+ minX: Math.min(...xs),
40
+ minY: Math.min(...ys),
41
+ maxX: Math.max(...xs),
42
+ maxY: Math.max(...ys)
43
+ };
44
+ const pathWidth = Math.max(bounds.maxX - bounds.minX, 10);
45
+ const pathHeight = Math.max(bounds.maxY - bounds.minY, 10);
46
+ const { offsetX, offsetY } = calculateCopyOffset(pathWidth, pathHeight, offsetPercentage);
47
+ return {
48
+ id: `path-${Date.now()}`,
49
+ type: 'pathNode',
50
+ position: {
51
+ x: currentNode.position.x + offsetX,
52
+ y: currentNode.position.y + offsetY
53
+ },
54
+ data: {
55
+ points: data.points,
56
+ color: data.color,
57
+ strokeWidth: data.strokeWidth,
58
+ label: data.label
59
+ }
60
+ };
61
+ };
62
+ /**
63
+ * Create a copy of an image node
64
+ */ const createImageCopy = (options)=>{
65
+ const { currentNode, offsetPercentage = 0.25, data } = options;
66
+ const { offsetX, offsetY } = calculateCopyOffset(data.width, data.height, offsetPercentage);
67
+ return {
68
+ id: `image-${Date.now()}`,
69
+ type: 'imageNode',
70
+ position: {
71
+ x: currentNode.position.x + offsetX,
72
+ y: currentNode.position.y + offsetY
73
+ },
74
+ data: {
75
+ imageUrl: data.imageUrl,
76
+ width: data.width,
77
+ height: data.height,
78
+ fileName: data.fileName,
79
+ originalWidth: data.originalWidth,
80
+ originalHeight: data.originalHeight
81
+ }
82
+ };
83
+ };
84
+
85
+ exports.calculateCopyOffset = calculateCopyOffset;
86
+ exports.createImageCopy = createImageCopy;
87
+ exports.createPathCopy = createPathCopy;
88
+ exports.createRectangleCopy = createRectangleCopy;
@@ -0,0 +1,26 @@
1
+ import { Node } from '@xyflow/react';
2
+ export interface CopyNodeOptions {
3
+ currentNode: Node;
4
+ offsetPercentage?: number;
5
+ nodeType: 'rectangleNode' | 'pathNode' | 'imageNode';
6
+ data: any;
7
+ }
8
+ /**
9
+ * Calculate offset position for copied node
10
+ */
11
+ export declare const calculateCopyOffset: (width: number, height: number, offsetPercentage?: number) => {
12
+ offsetX: number;
13
+ offsetY: number;
14
+ };
15
+ /**
16
+ * Create a copy of a rectangle node
17
+ */
18
+ export declare const createRectangleCopy: (options: CopyNodeOptions) => Node;
19
+ /**
20
+ * Create a copy of a path node
21
+ */
22
+ export declare const createPathCopy: (options: CopyNodeOptions) => Node;
23
+ /**
24
+ * Create a copy of an image node
25
+ */
26
+ export declare const createImageCopy: (options: CopyNodeOptions) => Node;
@@ -0,0 +1,40 @@
1
+ 'use strict';
2
+
3
+ const calculateImageSize = (originalWidth, originalHeight, maxSize = 500)=>{
4
+ const needsResize = originalWidth > maxSize || originalHeight > maxSize;
5
+ if (!needsResize) {
6
+ return {
7
+ width: Math.round(originalWidth),
8
+ height: Math.round(originalHeight)
9
+ };
10
+ }
11
+ const ratio = Math.min(maxSize / originalWidth, maxSize / originalHeight);
12
+ return {
13
+ width: Math.round(originalWidth * ratio),
14
+ height: Math.round(originalHeight * ratio)
15
+ };
16
+ };
17
+ const calculateStaggeredPosition = (index, baseX = 100, baseY = 100, viewportX, viewportY, viewportZoom)=>{
18
+ // If viewport information is provided, calculate position within current viewport
19
+ if (viewportX !== undefined && viewportY !== undefined && viewportZoom !== undefined) {
20
+ // Convert viewport coordinates to canvas coordinates
21
+ // The viewport shows the center of the view, so we need to offset from the center
22
+ const centerX = -viewportX / viewportZoom + window.innerWidth / 2 / viewportZoom;
23
+ const centerY = -viewportY / viewportZoom + window.innerHeight / 2 / viewportZoom;
24
+ // Position images slightly offset from center
25
+ const offsetX = centerX - 200 + index * 30; // Start 200px left of center
26
+ const offsetY = centerY - 100 + index * 20; // Start 100px above center
27
+ return {
28
+ x: offsetX,
29
+ y: offsetY
30
+ };
31
+ }
32
+ // Fallback to original fixed positioning
33
+ return {
34
+ x: baseX + index * 30,
35
+ y: baseY + index * 20
36
+ };
37
+ };
38
+
39
+ exports.calculateImageSize = calculateImageSize;
40
+ exports.calculateStaggeredPosition = calculateStaggeredPosition;
@@ -0,0 +1,10 @@
1
+ import { Node } from '@xyflow/react';
2
+ export declare const updateNodeData: <T extends Record<string, unknown>>(nodes: Node[], nodeId: string, updates: Partial<T>) => Node[];
3
+ export declare const calculateImageSize: (originalWidth: number, originalHeight: number, maxSize?: number) => {
4
+ width: number;
5
+ height: number;
6
+ };
7
+ export declare const calculateStaggeredPosition: (index: number, baseX?: number, baseY?: number, viewportX?: number, viewportY?: number, viewportZoom?: number) => {
8
+ x: number;
9
+ y: number;
10
+ };
package/index.cjs.css DELETED
@@ -1 +0,0 @@
1
- .toolbar-module_toolbar__96rDw{background-color:#fff;border:1px solid #e0e0e0;border-radius:6px;box-shadow:0 2px 8px rgba(0,0,0,.1);height:48px;padding:0 16px;position:absolute;right:24px;top:20px;z-index:1000}.toolbar-module_toolbarLeft__PMOYv,.toolbar-module_toolbar__96rDw{align-items:center;display:flex;gap:8px}.toolbar-module_toggleSwitch__Gy2ML{background-color:#e7e7e7;border-radius:4px;display:flex;height:36px;overflow:hidden;position:relative;width:140px}.toolbar-module_toggleSlider__7a7Nh{background-color:#fff;border-radius:4px;box-shadow:0 2px 4px rgba(0,0,0,.1);height:32px;left:2px;position:absolute;top:2px;transition:transform .3s ease;width:68px;z-index:1}.toolbar-module_toggleSliderRight__w9umy{transform:translateX(68px)}.toolbar-module_toggleOption__8AIQx{align-items:center;background:transparent;border:none;color:#666;cursor:pointer;display:flex;flex:1;font-size:14px;font-weight:500;height:100%;justify-content:center;position:relative;transition:color .3s ease;z-index:2}.toolbar-module_toggleOption__8AIQx:hover{color:#465bc7}.toolbar-module_toggleOption__8AIQx:focus{outline:none}.toolbar-module_toggleOptionActive__ypvGJ{color:#465bc7;font-weight:600}.toolbar-module_toolbarButton__K8xsY{background-color:#fff!important;border:1px solid #d0d0d0;border-radius:4px;color:#666!important;font-size:14px;height:32px;min-width:auto;padding:0 16px;transform:none;transition:all .15s ease}.toolbar-module_toolbarButton__K8xsY:focus,.toolbar-module_toolbarButton__K8xsY:hover{background-color:#f8f8f8!important;border-color:#b0b0b0!important;box-shadow:none!important;color:#666!important;transform:none!important}.toolbar-module_toolbarButton__K8xsY:focus{outline:none!important}.toolbar-module_toolbarButton__K8xsY:active{background-color:#f0f0f0!important;border-color:#a0a0a0!important;box-shadow:none!important;color:#666!important;transform:translateY(.5px)!important}.toolbar-module_toolbarButton__K8xsY:focus-visible{background-color:#f8f8f8!important;border-color:#b0b0b0!important;box-shadow:none!important;color:#666!important;outline:none!important}.toolbar-module_toolbarButton__K8xsY.toolbar-module_Mui-focused__fbsGm,.toolbar-module_toolbarButton__K8xsY[data-focus-visible],.toolbar-module_toolbarButton__K8xsY[data-focused]{background-color:#f8f8f8!important;border-color:#b0b0b0!important;box-shadow:none!important;color:#666!important;outline:none!important}.toolbar-module_toolbarButton__K8xsY:not(:hover):not(:focus):not(:active):not(:focus-visible){background-color:#fff!important;border-color:#d0d0d0!important;box-shadow:none!important;color:#666!important;transform:none!important}.toolbar-module_toolbarButton__K8xsY[class*=contained],.toolbar-module_toolbarButton__K8xsY[data-variant=contained]{background-color:#5570d3;border-color:#4461c2;box-shadow:inset 0 1px 3px rgba(0,0,0,.15),0 1px 2px rgba(85,112,211,.2);color:#fff;transform:translateY(.5px)}.toolbar-module_toolbarButton__K8xsY[class*=contained]:focus,.toolbar-module_toolbarButton__K8xsY[class*=contained]:hover,.toolbar-module_toolbarButton__K8xsY[data-variant=contained]:focus,.toolbar-module_toolbarButton__K8xsY[data-variant=contained]:hover{background-color:#4461c2;border-color:#3a5bb8;box-shadow:inset 0 1px 3px rgba(0,0,0,.2),0 1px 2px rgba(68,97,194,.3);color:#fff}.toolbar-module_saveButton__eiTcG{background-color:#5570d3;border:none;border-radius:4px;color:#fff;font-size:14px;height:32px;min-width:auto;padding:0 16px}.toolbar-module_unifiedTools__s27Xt{align-items:center;background-color:#fff;border:1px solid #e0e0e0;border-radius:6px;bottom:20px;box-shadow:0 4px 12px rgba(0,0,0,.15);display:flex;gap:8px;left:24px;padding:8px;position:absolute;z-index:1000}.toolbar-module_toolButton__rQdtA{align-items:center;background-color:transparent;border:none;border-radius:8px;color:#666;display:flex;font-size:18px;height:32px;justify-content:center;min-width:32px;padding:0;width:32px}.toolbar-module_toolButton__rQdtA:hover{background-color:#f0f0f0;color:#333}.toolbar-module_toolButton__rQdtA:focus{background-color:#f0f0f0;box-shadow:none;color:#333}.toolbar-module_toolButton__rQdtA.toolbar-module_toolButtonDisabled__gc2mS{cursor:default;opacity:.5}.toolbar-module_toolButton__rQdtA:focus,.toolbar-module_toolButton__rQdtA:hover{background-color:rgba(70,91,199,.2)}.toolbar-module_toolButtonActive__iCxN8{background-color:rgba(70,91,199,.2)!important}.toolbar-module_toolButtonActive__iCxN8 .toolbar-module_toolIcon__xPmHR{color:#465bc7}.toolbar-module_colorPicker__7PQ18{align-items:center;background-color:transparent;border-radius:8px;cursor:pointer;display:flex;height:40px;justify-content:center;position:relative;transition:all .15s ease;width:40px}.toolbar-module_colorPicker__7PQ18:hover{background-color:rgba(70,91,199,.2)}.toolbar-module_colorDisplay__BEOKw{border:2px solid #e0e0e0;border-radius:50%;cursor:pointer;height:24px;transition:all .15s ease;width:24px}.toolbar-module_colorInput__TbKWG{height:0;opacity:0;pointer-events:none;position:absolute;width:0}.toolbar-module_separator__-IyrB{background-color:#d0d0d0;border-radius:.5px;box-shadow:1px 0 0 hsla(0,0%,100%,.5);height:28px;margin:0 8px;width:1px}.toolbar-module_colorMenu__Y6gOp{align-items:center;background-color:#fff;border:1px solid #e0e0e0;border-radius:6px;bottom:calc(100% + 15px);box-shadow:0 4px 12px rgba(0,0,0,.15);display:flex;gap:8px;justify-content:center;left:-15px;min-width:fit-content;padding:12px 16px;position:absolute;white-space:nowrap;z-index:1001}.toolbar-module_colorOption__7eLEp{border:2px solid #e7e7e7;border-radius:50%;cursor:pointer;flex-shrink:0;height:32px;min-height:32px;min-width:32px;position:relative;transition:all .15s ease;width:32px}.toolbar-module_colorOption__7eLEp:hover{box-shadow:0 2px 6px rgba(0,0,0,.2);transform:scale(1.05)}.toolbar-module_colorOption__7eLEp:active{transform:scale(.98)}.toolbar-module_colorOptionSelected__-Zouj .toolbar-module_checkMarkIcon__5dAqn{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:1}.toolbar-module_toolIcon__xPmHR{align-items:center;display:flex;height:24px;pointer-events:none;transition:filter .2s ease;width:24px}.toolbar-module_buttonWithIcon__-2ca5 .mzn-button__label{align-items:center;display:flex;gap:4px}.toolbar-module_uploadButtonContainer__vv0q8{display:inline-block;position:relative}.toolbar-module_uploadInput__xWb-r{cursor:pointer;height:100%;left:0;opacity:0;position:absolute;top:0;width:100%;z-index:2}.toolbar-module_uploadInput__xWb-r:disabled{cursor:not-allowed}.toolbar-module_uploadButton__SIUHi{position:relative;z-index:1}.toolbar-module_uploadButton__SIUHi.toolbar-module_uploading__uM5vV{cursor:not-allowed;opacity:.7}.toolbar-module_loadingIcon__bi-tO{animation:toolbar-module_spin__22yNN 1s linear infinite;border:2px solid #f3f3f3;border-radius:50%;border-top-color:#666;display:inline-block;height:16px;width:16px}@keyframes toolbar-module_spin__22yNN{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.toolbar-module_buttonContent__nR-Kz{align-items:center;display:flex;gap:4px}.breadcrumb-edit-modal-module_modalContent__WOycg{padding:16px 0}.breadcrumb-edit-modal-module_modalContent__WOycg .breadcrumb-edit-modal-module_fieldLabel__Qdy7y{color:#333;display:block;font-size:14px;font-weight:500;margin-bottom:8px}.breadcrumb-edit-modal-module_modalFooter__Bp6Dg{gap:16px;justify-content:end}.breadcrumb-module_breadcrumbSection__Qn8A3{left:24px;position:absolute;top:20px;z-index:1001}.breadcrumb-module_breadcrumbSection__Qn8A3 .breadcrumb-module_warehouseIdSection__7CzsY{align-items:center;background-color:#fff;border:1px solid #e0e0e0;border-radius:4px;box-shadow:0 1px 3px rgba(0,0,0,.1);display:flex;gap:4px;padding:8px 12px}.breadcrumb-module_breadcrumbSection__Qn8A3 .breadcrumb-module_warehouseIdSection__7CzsY .breadcrumb-module_separator__uLhtn{color:#999;font-size:14px;margin:0 2px}.breadcrumb-module_breadcrumbSection__Qn8A3 .breadcrumb-module_warehouseIdSection__7CzsY .breadcrumb-module_warehouseIdText__QOxRw{color:#333;font-size:14px;font-weight:400}.breadcrumb-module_breadcrumbSection__Qn8A3 .breadcrumb-module_warehouseIdSection__7CzsY .breadcrumb-module_warehouseIdText__QOxRw.breadcrumb-module_lastItem__OGKzD{color:#999;font-weight:300}.breadcrumb-module_breadcrumbSection__Qn8A3 .breadcrumb-module_warehouseIdSection__7CzsY .breadcrumb-module_warehouseIdText__QOxRw.breadcrumb-module_clickable__YD5aj{cursor:pointer;user-select:none}.breadcrumb-module_breadcrumbSection__Qn8A3 .breadcrumb-module_warehouseIdSection__7CzsY .breadcrumb-module_warehouseIdText__QOxRw.breadcrumb-module_clickable__YD5aj:hover{color:#6c7cd6;text-decoration:underline}.breadcrumb-module_breadcrumbSection__Qn8A3 .breadcrumb-module_warehouseIdSection__7CzsY .breadcrumb-module_warehouseIdText__QOxRw.breadcrumb-module_clickable__YD5aj.breadcrumb-module_lastItem__OGKzD:hover{color:#6c7cd6}.breadcrumb-module_breadcrumbSection__Qn8A3 .breadcrumb-module_warehouseIdSection__7CzsY .breadcrumb-module_ellipsisContainer__4hIiu{display:inline-block;position:relative}.breadcrumb-module_breadcrumbSection__Qn8A3 .breadcrumb-module_warehouseIdSection__7CzsY .breadcrumb-module_ellipsisContainer__4hIiu .breadcrumb-module_ellipsis__NYd8X{background-color:#e8eaf6;border-radius:3px;color:#6c7cd6;cursor:pointer;font-size:14px;font-weight:500;padding:2px 8px;user-select:none}.breadcrumb-module_breadcrumbSection__Qn8A3 .breadcrumb-module_warehouseIdSection__7CzsY .breadcrumb-module_ellipsisContainer__4hIiu .breadcrumb-module_ellipsis__NYd8X:hover{background-color:#dcdcf4}.breadcrumb-module_breadcrumbSection__Qn8A3 .breadcrumb-module_warehouseIdSection__7CzsY .breadcrumb-module_ellipsisContainer__4hIiu .breadcrumb-module_dropdown__BqvP8{background:#fff;border:1px solid #e0e0e0;border-radius:4px;box-shadow:0 2px 8px rgba(0,0,0,.15);left:0;margin-top:4px;min-width:120px;position:absolute;top:100%;z-index:1002}.breadcrumb-module_breadcrumbSection__Qn8A3 .breadcrumb-module_warehouseIdSection__7CzsY .breadcrumb-module_ellipsisContainer__4hIiu .breadcrumb-module_dropdown__BqvP8 .breadcrumb-module_dropdownItem__YdggW{color:#333;cursor:pointer;font-size:14px;padding:8px 12px;pointer-events:all;user-select:none}.breadcrumb-module_breadcrumbSection__Qn8A3 .breadcrumb-module_warehouseIdSection__7CzsY .breadcrumb-module_ellipsisContainer__4hIiu .breadcrumb-module_dropdown__BqvP8 .breadcrumb-module_dropdownItem__YdggW:hover{background-color:#f5f5f5;color:#6c7cd6}.breadcrumb-module_breadcrumbSection__Qn8A3 .breadcrumb-module_warehouseIdSection__7CzsY .breadcrumb-module_ellipsisContainer__4hIiu .breadcrumb-module_dropdown__BqvP8 .breadcrumb-module_dropdownItem__YdggW:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.breadcrumb-module_breadcrumbSection__Qn8A3 .breadcrumb-module_warehouseIdSection__7CzsY .breadcrumb-module_ellipsisContainer__4hIiu .breadcrumb-module_dropdown__BqvP8 .breadcrumb-module_dropdownItem__YdggW:last-child{border-bottom-left-radius:3px;border-bottom-right-radius:3px}.breadcrumb-module_breadcrumbSection__Qn8A3 .breadcrumb-module_warehouseIdSection__7CzsY .breadcrumb-module_editButton__Wuk8T{align-items:center;background:none;border:none;border-radius:3px;color:#666;cursor:pointer;display:flex;justify-content:center;margin-left:8px;padding:4px;transition:all .2s ease}.breadcrumb-module_breadcrumbSection__Qn8A3 .breadcrumb-module_warehouseIdSection__7CzsY .breadcrumb-module_editButton__Wuk8T:hover{background-color:#f5f5f5;color:#6c7cd6}.breadcrumb-module_breadcrumbSection__Qn8A3 .breadcrumb-module_warehouseIdSection__7CzsY .breadcrumb-module_editButton__Wuk8T:active{background-color:#e8eaf6}.context-menu-module_contextMenu__sLD6R{background:#fff;border:1px solid #e1e5e9;border-radius:6px;box-shadow:0 4px 12px rgba(0,0,0,.15);min-width:120px;padding:4px 0;user-select:none}.context-menu-module_menuItem__f0SPx{align-items:center;color:#333;cursor:default;display:flex;font-size:14px;justify-content:space-between;min-width:160px;padding:8px 16px;position:relative;transition:background-color .15s ease}.context-menu-module_menuItem__f0SPx:hover{background-color:#f5f5f5}.context-menu-module_menuItem__f0SPx:active{background-color:#e9ecef}.context-menu-module_menuItem__f0SPx.context-menu-module_disabled__08MXH{color:#999;cursor:default}.context-menu-module_menuItem__f0SPx.context-menu-module_disabled__08MXH:active,.context-menu-module_menuItem__f0SPx.context-menu-module_disabled__08MXH:hover{background-color:transparent}.context-menu-module_menuItemContent__GXixI{align-items:center;display:flex;justify-content:space-between;width:100%}.context-menu-module_menuItemText__GLxb4{flex:1}.context-menu-module_menuItemShortcut__z-DrG{color:#666;font-family:monospace;font-size:12px;margin-left:16px}.context-menu-module_hasSubmenu__JYdzl{position:relative}.context-menu-module_arrow__nLoR1{color:#666;font-size:10px;margin-left:8px}.context-menu-module_submenu__pV8AQ{background:#fff;border:1px solid #e1e5e9;border-radius:6px;box-shadow:0 4px 12px rgba(0,0,0,.15);min-width:120px;padding:4px 0;user-select:none}.context-menu-module_submenu__pV8AQ .context-menu-module_menuItem__f0SPx{padding:8px 16px}.context-menu-module_submenu__pV8AQ .context-menu-module_menuItem__f0SPx:hover{background-color:#f5f5f5}.image-node-module_imageNode__RA0Qo{background:transparent;border:2px solid transparent;border-radius:8px;position:relative;transition:border-color .2s ease;z-index:1}.image-node-module_imageNode__RA0Qo.image-node-module_selected__XB4vQ{border-color:#5570d3;z-index:10}.image-node-module_imageNode__RA0Qo:hover{border-color:#b0b0b0;z-index:5}.image-node-module_imageNode__RA0Qo.image-node-module_resizing__auG-P{cursor:default}.image-node-module_imageNode__RA0Qo.image-node-module_resizing__auG-P .image-node-module_image__GnlBw{pointer-events:none}.image-node-module_imageNode__RA0Qo.image-node-module_nonSelectable__GF-N6{border-color:transparent!important;cursor:default}.image-node-module_imageNode__RA0Qo.image-node-module_nonSelectable__GF-N6:hover{border-color:transparent!important;z-index:1}.image-node-module_imageNode__RA0Qo.image-node-module_nonSelectable__GF-N6 .image-node-module_image__GnlBw{opacity:.7;transition:opacity .2s ease}.image-node-module_imageContainer__Bs4MJ{align-items:center;display:flex;flex-direction:column;position:relative}.image-node-module_image__GnlBw{background:#fff;border:1px solid #e0e0e0;border-radius:6px;box-shadow:0 4px 12px rgba(0,0,0,.15);object-fit:contain}.image-node-module_imageLabel__BwBbB{background:rgba(0,0,0,.7);border-radius:4px;bottom:-25px;color:#fff;font-size:12px;left:50%;max-width:200px;overflow:hidden;padding:4px 8px;position:absolute;text-overflow:ellipsis;transform:translateX(-50%);white-space:nowrap}.image-node-module_customResizeHandle__wBp7h{background:#fff!important;border:2px solid #5570d3!important;border-radius:3px!important;box-shadow:0 2px 4px rgba(0,0,0,.2)!important;height:12px!important;transition:all .2s ease!important;width:12px!important}.image-node-module_customResizeHandle__wBp7h:hover{background:#5570d3!important;border-color:#3d5af1!important;box-shadow:0 4px 8px rgba(0,0,0,.3)!important;transform:scale(1.3)!important}.image-node-module_customResizeHandle__wBp7h[data-position=bottom-left],.image-node-module_customResizeHandle__wBp7h[data-position=bottom-right],.image-node-module_customResizeHandle__wBp7h[data-position=top-left],.image-node-module_customResizeHandle__wBp7h[data-position=top-right]{cursor:default!important}.rectangle-node-module_rectangleNode__gQkvp{position:relative}.rectangle-node-module_rectangleNode__gQkvp.rectangle-node-module_selected__QiPsy{z-index:1000}.rectangle-node-module_rectangleNode__gQkvp.rectangle-node-module_nonSelectable__5Fz40{cursor:default}.rectangle-node-module_rectangleNode__gQkvp.rectangle-node-module_nonSelectable__5Fz40 .rectangle-node-module_rectangleContainer__8dFeg{opacity:.5;pointer-events:none;transition:opacity .2s ease}.rectangle-node-module_rectangleNode__gQkvp.rectangle-node-module_nonSelectable__5Fz40 .rectangle-node-module_rectangleContainer__8dFeg:hover{box-shadow:none}.rectangle-node-module_rectangleContainer__8dFeg{cursor:default;position:relative;transition:all .2s ease}.rectangle-node-module_rectangleContainer__8dFeg:hover{box-shadow:0 2px 8px rgba(0,0,0,.15)}.rectangle-node-module_customResizeHandle__0ckhO{background:#fff!important;border:2px solid #5570d3!important;border-radius:3px!important;box-shadow:0 2px 4px rgba(0,0,0,.2)!important;height:12px!important;transition:all .2s ease!important;width:12px!important}.rectangle-node-module_customResizeHandle__0ckhO:hover{background:#5570d3!important;border-color:#3d5af1!important;box-shadow:0 4px 8px rgba(0,0,0,.3)!important;transform:scale(1.3)!important}.rectangle-node-module_customResizeHandle__0ckhO[data-position=bottom-left],.rectangle-node-module_customResizeHandle__0ckhO[data-position=bottom-right],.rectangle-node-module_customResizeHandle__0ckhO[data-position=top-left],.rectangle-node-module_customResizeHandle__0ckhO[data-position=top-right]{cursor:default!important}.path-node-module_pathNode__i--rx{position:relative}.path-node-module_pathNode__i--rx.path-node-module_selected__YUYXs{z-index:1000}.path-node-module_pathNode__i--rx.path-node-module_nonSelectable__YkOT9{cursor:default}.path-node-module_pathNode__i--rx.path-node-module_nonSelectable__YkOT9 .path-node-module_pathContainer__UPL49{opacity:.5;pointer-events:none;transition:opacity .2s ease}.path-node-module_pathNode__i--rx.path-node-module_nonSelectable__YkOT9 .path-node-module_pathContainer__UPL49:hover{outline:none}.path-node-module_pathContainer__UPL49{cursor:default;position:relative}.path-node-module_pathNode__i--rx:not(.path-node-module_selected__YUYXs) .path-node-module_pathContainer__UPL49:hover{outline:1px solid rgba(59,130,246,.3)}.react-flow-canvas-module_reactFlowCanvas__w-TCn,.react-flow-canvas-module_reactFlowWrapper__tOAkU{height:100%;width:100%}.react-flow-canvas-module_emptyState__5VgEA{color:#999;font-size:16px;left:50%;position:absolute;text-align:center;top:50%;transform:translate(-50%,-50%);z-index:10}.react-flow-canvas-module_emptyState__5VgEA .react-flow-canvas-module_emptyIcon__QemKW{height:48px;width:48px}.react-flow-canvas-module_emptyState__5VgEA .react-flow-canvas-module_emptyTitle__YOEpE{color:#8f8f8f;font-size:22px;font-weight:500;margin-bottom:8px}.react-flow-canvas-module_emptyState__5VgEA .react-flow-canvas-module_emptySubText__k3DUo{color:#8f8f8f;font-size:15px;margin-top:8px}.react-flow-canvas-module_zoomControls__MC-ik{align-items:center;bottom:20px;display:flex;gap:4px;position:absolute;right:20px;z-index:1000}.react-flow-canvas-module_controlButton__GLHpS{align-items:center;background-color:#fff;border:1px solid #d0d0d0;border-radius:4px;color:#666;cursor:default;display:flex;font-size:16px;height:32px;justify-content:center;width:32px}.react-flow-canvas-module_controlButton__GLHpS:hover{background-color:#f8f8f8;border-color:#b0b0b0}.react-flow-canvas-module_controlButton__GLHpS:active{background-color:#e8e8e8}.react-flow-canvas-module_controlButton__GLHpS:disabled{cursor:default;opacity:.5}.react-flow-canvas-module_zoomPercentage__Mlyal{color:#666;font-size:14px;min-width:45px;padding:0 8px;text-align:center}.view-mode-toolbar-module_viewModeToolbar__N0CZK{align-items:center;background:#fff;border:1px solid #e0e0e0;border-radius:8px;bottom:20px;box-shadow:0 4px 12px rgba(0,0,0,.15);display:flex;left:20px;min-width:120px;padding:12px 16px;position:absolute;z-index:1000}.view-mode-toolbar-module_toolbarContent__aXcnS{align-items:center;display:flex;gap:12px;width:100%}.view-mode-toolbar-module_label__NyCK5{color:#333;font-size:14px;font-weight:500;user-select:none;white-space:nowrap}.view-mode-toolbar-module_switch__RzGTA{flex-shrink:0}@media (max-width:768px){.view-mode-toolbar-module_viewModeToolbar__N0CZK{bottom:16px;left:16px;padding:10px 14px}.view-mode-toolbar-module_label__NyCK5{font-size:13px}}@media (prefers-contrast:high){.view-mode-toolbar-module_viewModeToolbar__N0CZK{border:2px solid #000;box-shadow:0 4px 12px rgba(0,0,0,.3)}.view-mode-toolbar-module_label__NyCK5{color:#000;font-weight:600}}@media (prefers-color-scheme:dark){.view-mode-toolbar-module_viewModeToolbar__N0CZK{background:#2d2d2d;border-color:#404040;box-shadow:0 4px 12px rgba(0,0,0,.3)}.view-mode-toolbar-module_label__NyCK5{color:#f0f0f0}}.wms-map-modal-container-module_modal__PKmT7{height:95vh;margin:2.5vh auto;max-height:none;max-width:none;width:95vw}.wms-map-modal-container-module_content__9p84R{height:calc(95vh - 80px);overflow:hidden;padding:0;position:relative}