build-dxf 0.0.19-11 → 0.0.19-13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "build-dxf",
3
- "version": "0.0.19-11",
3
+ "version": "0.0.19-13",
4
4
  "description": "线段构建双线墙壁的dxf版本",
5
5
  "main": "./src/index.js",
6
6
  "types": "./src/index.d.ts",
package/src/index.css CHANGED
@@ -24,8 +24,6 @@
24
24
 
25
25
  @layer theme {
26
26
  :root, :host {
27
- --font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
28
- --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
29
27
  --color-black: #000;
30
28
  --color-white: #fff;
31
29
  --spacing: .25rem;
@@ -33,8 +31,6 @@
33
31
  --radius-lg: .5rem;
34
32
  --default-transition-duration: .15s;
35
33
  --default-transition-timing-function: cubic-bezier(.4, 0, .2, 1);
36
- --default-font-family: var(--font-sans);
37
- --default-mono-font-family: var(--font-mono);
38
34
  }
39
35
  }
40
36
 
@@ -46,400 +42,442 @@
46
42
  }
47
43
  }
48
44
 
49
- @layer components;
45
+ @layer components, utilities;
50
46
 
51
- @layer utilities {
52
- .pointer-events-auto {
53
- pointer-events: auto;
54
- }
47
+ .pointer-events-auto {
48
+ pointer-events: auto;
49
+ }
55
50
 
56
- .pointer-events-none {
57
- pointer-events: none;
58
- }
51
+ .pointer-events-none {
52
+ pointer-events: none;
53
+ }
59
54
 
60
- .visible {
61
- visibility: visible;
62
- }
55
+ .visible {
56
+ visibility: visible;
57
+ }
63
58
 
64
- .absolute {
65
- position: absolute;
66
- }
59
+ .absolute {
60
+ position: absolute;
61
+ }
67
62
 
68
- .fixed {
69
- position: fixed;
70
- }
63
+ .fixed {
64
+ position: fixed;
65
+ }
71
66
 
72
- .relative {
73
- position: relative;
74
- }
67
+ .relative {
68
+ position: relative;
69
+ }
75
70
 
76
- .static {
77
- position: static;
78
- }
71
+ .static {
72
+ position: static;
73
+ }
79
74
 
80
- .top-0 {
81
- top: calc(var(--spacing) * 0);
82
- }
75
+ .top-0 {
76
+ top: calc(var(--spacing) * 0);
77
+ }
83
78
 
84
- .top-\[50px\] {
85
- top: 50px;
86
- }
79
+ .top-\[50px\] {
80
+ top: 50px;
81
+ }
87
82
 
88
- .bottom-\[10px\] {
89
- bottom: 10px;
90
- }
83
+ .bottom-\[10px\] {
84
+ bottom: 10px;
85
+ }
91
86
 
92
- .left-0 {
93
- left: calc(var(--spacing) * 0);
94
- }
87
+ .left-0 {
88
+ left: calc(var(--spacing) * 0);
89
+ }
95
90
 
96
- .left-\[10px\] {
97
- left: 10px;
98
- }
91
+ .left-\[10px\] {
92
+ left: 10px;
93
+ }
99
94
 
100
- .z-\[1000\] {
101
- z-index: 1000;
102
- }
95
+ .z-\[11\] {
96
+ z-index: 11;
97
+ }
103
98
 
104
- .z-\[10000\] {
105
- z-index: 10000;
106
- }
99
+ .z-\[1000\] {
100
+ z-index: 1000;
101
+ }
102
+
103
+ .z-\[10000\] {
104
+ z-index: 10000;
105
+ }
107
106
 
107
+ .container {
108
+ width: 100%;
109
+ }
110
+
111
+ @media (min-width: 40rem) {
108
112
  .container {
109
- width: 100%;
113
+ max-width: 40rem;
110
114
  }
115
+ }
111
116
 
112
- @media (min-width: 40rem) {
113
- .container {
114
- max-width: 40rem;
115
- }
117
+ @media (min-width: 48rem) {
118
+ .container {
119
+ max-width: 48rem;
116
120
  }
121
+ }
117
122
 
118
- @media (min-width: 48rem) {
119
- .container {
120
- max-width: 48rem;
121
- }
123
+ @media (min-width: 64rem) {
124
+ .container {
125
+ max-width: 64rem;
122
126
  }
127
+ }
123
128
 
124
- @media (min-width: 64rem) {
125
- .container {
126
- max-width: 64rem;
127
- }
129
+ @media (min-width: 80rem) {
130
+ .container {
131
+ max-width: 80rem;
128
132
  }
133
+ }
129
134
 
130
- @media (min-width: 80rem) {
131
- .container {
132
- max-width: 80rem;
133
- }
135
+ @media (min-width: 96rem) {
136
+ .container {
137
+ max-width: 96rem;
134
138
  }
139
+ }
135
140
 
136
- @media (min-width: 96rem) {
137
- .container {
138
- max-width: 96rem;
139
- }
140
- }
141
+ .m-\[0px_5px\] {
142
+ margin: 0 5px;
143
+ }
141
144
 
142
- .m-\[0px_5px\] {
143
- margin: 0 5px;
144
- }
145
+ .mt-\[5px\] {
146
+ margin-top: 5px;
147
+ }
145
148
 
146
- .mt-\[5px\] {
147
- margin-top: 5px;
148
- }
149
+ .mt-\[10px\] {
150
+ margin-top: 10px;
151
+ }
149
152
 
150
- .mt-\[10px\] {
151
- margin-top: 10px;
152
- }
153
+ .mr-\[10px\] {
154
+ margin-right: 10px;
155
+ }
153
156
 
154
- .mr-\[10px\] {
155
- margin-right: 10px;
156
- }
157
+ .ml-\[1\.4em\] {
158
+ margin-left: 1.4em;
159
+ }
157
160
 
158
- .ml-\[1\.4em\] {
159
- margin-left: 1.4em;
160
- }
161
+ .ml-\[10px\] {
162
+ margin-left: 10px;
163
+ }
161
164
 
162
- .ml-\[10px\] {
163
- margin-left: 10px;
164
- }
165
+ .box-border {
166
+ box-sizing: border-box;
167
+ }
165
168
 
166
- .box-border {
167
- box-sizing: border-box;
168
- }
169
+ .block {
170
+ display: block;
171
+ }
169
172
 
170
- .flex {
171
- display: flex;
172
- }
173
+ .flex {
174
+ display: flex;
175
+ }
173
176
 
174
- .grid {
175
- display: grid;
176
- }
177
+ .grid {
178
+ display: grid;
179
+ }
177
180
 
178
- .hidden {
179
- display: none;
180
- }
181
+ .hidden {
182
+ display: none;
183
+ }
181
184
 
182
- .inline-block {
183
- display: inline-block;
184
- }
185
+ .inline-block {
186
+ display: inline-block;
187
+ }
185
188
 
186
- .table {
187
- display: table;
188
- }
189
+ .table {
190
+ display: table;
191
+ }
189
192
 
190
- .size-\[1\.4em\] {
191
- width: 1.4em;
192
- height: 1.4em;
193
- }
193
+ .size-\[1\.4em\] {
194
+ width: 1.4em;
195
+ height: 1.4em;
196
+ }
194
197
 
195
- .size-\[6px\] {
196
- width: 6px;
197
- height: 6px;
198
- }
198
+ .size-\[6px\] {
199
+ width: 6px;
200
+ height: 6px;
201
+ }
199
202
 
200
- .h-\[20px\] {
201
- height: 20px;
202
- }
203
+ .h-\[10px\] {
204
+ height: 10px;
205
+ }
203
206
 
204
- .h-\[100vh\] {
205
- height: 100vh;
206
- }
207
+ .h-\[20px\] {
208
+ height: 20px;
209
+ }
207
210
 
208
- .h-fit {
209
- height: fit-content;
210
- }
211
+ .h-\[100vh\] {
212
+ height: 100vh;
213
+ }
211
214
 
212
- .h-full {
213
- height: 100%;
214
- }
215
+ .h-fit {
216
+ height: fit-content;
217
+ }
215
218
 
216
- .w-\[20px\] {
217
- width: 20px;
218
- }
219
+ .h-full {
220
+ height: 100%;
221
+ }
219
222
 
220
- .w-\[100vw\] {
221
- width: 100vw;
222
- }
223
+ .w-\[10px\] {
224
+ width: 10px;
225
+ }
223
226
 
224
- .w-\[110px\] {
225
- width: 110px;
226
- }
227
+ .w-\[20px\] {
228
+ width: 20px;
229
+ }
227
230
 
228
- .w-\[200px\] {
229
- width: 200px;
230
- }
231
+ .w-\[100vw\] {
232
+ width: 100vw;
233
+ }
231
234
 
232
- .w-full {
233
- width: 100%;
234
- }
235
+ .w-\[110px\] {
236
+ width: 110px;
237
+ }
235
238
 
236
- .min-w-\[100px\] {
237
- min-width: 100px;
238
- }
239
+ .w-\[200px\] {
240
+ width: 200px;
241
+ }
239
242
 
240
- .min-w-\[140px\] {
241
- min-width: 140px;
242
- }
243
+ .w-full {
244
+ width: 100%;
245
+ }
243
246
 
244
- .min-w-\[150px\] {
245
- min-width: 150px;
246
- }
247
+ .min-w-\[100px\] {
248
+ min-width: 100px;
249
+ }
247
250
 
248
- .cursor-pointer {
249
- cursor: pointer;
250
- }
251
+ .min-w-\[140px\] {
252
+ min-width: 140px;
253
+ }
251
254
 
252
- .resize {
253
- resize: both;
254
- }
255
+ .min-w-\[150px\] {
256
+ min-width: 150px;
257
+ }
255
258
 
256
- .flex-col {
257
- flex-direction: column;
258
- }
259
+ .rotate-90 {
260
+ rotate: 90deg;
261
+ }
259
262
 
260
- .flex-row {
261
- flex-direction: row;
262
- }
263
+ .cursor-pointer {
264
+ cursor: pointer;
265
+ }
263
266
 
264
- .items-center {
265
- align-items: center;
266
- }
267
+ .resize {
268
+ resize: both;
269
+ }
267
270
 
268
- .justify-between {
269
- justify-content: space-between;
270
- }
271
+ .flex-col {
272
+ flex-direction: column;
273
+ }
271
274
 
272
- .justify-center {
273
- justify-content: center;
274
- }
275
+ .flex-row {
276
+ flex-direction: row;
277
+ }
275
278
 
276
- .gap-\[5px\] {
277
- gap: 5px;
278
- }
279
+ .items-center {
280
+ align-items: center;
281
+ }
279
282
 
280
- .gap-\[10px\] {
281
- gap: 10px;
282
- }
283
+ .justify-between {
284
+ justify-content: space-between;
285
+ }
283
286
 
284
- .overflow-hidden {
285
- overflow: hidden;
286
- }
287
+ .justify-center {
288
+ justify-content: center;
289
+ }
287
290
 
288
- .rounded-\[6px\] {
289
- border-radius: 6px;
290
- }
291
+ .gap-\[5px\] {
292
+ gap: 5px;
293
+ }
291
294
 
292
- .rounded-\[8px\] {
293
- border-radius: 8px;
294
- }
295
+ .gap-\[10px\] {
296
+ gap: 10px;
297
+ }
295
298
 
296
- .rounded-\[10px\] {
297
- border-radius: 10px;
298
- }
299
+ .overflow-hidden {
300
+ overflow: hidden;
301
+ }
299
302
 
300
- .rounded-\[50px\] {
301
- border-radius: 50px;
302
- }
303
+ .rounded-\[2px\] {
304
+ border-radius: 2px;
305
+ }
303
306
 
304
- .rounded-lg {
305
- border-radius: var(--radius-lg);
306
- }
307
+ .rounded-\[6px\] {
308
+ border-radius: 6px;
309
+ }
307
310
 
308
- .border {
309
- border-style: var(--tw-border-style);
310
- border-width: 1px;
311
- }
311
+ .rounded-\[8px\] {
312
+ border-radius: 8px;
313
+ }
312
314
 
313
- .border-b-1 {
314
- border-bottom-style: var(--tw-border-style);
315
- border-bottom-width: 1px;
316
- }
315
+ .rounded-\[10px\] {
316
+ border-radius: 10px;
317
+ }
317
318
 
318
- .border-b-\[\#eee\] {
319
- border-bottom-color: #eee;
320
- }
319
+ .rounded-\[50px\] {
320
+ border-radius: 50px;
321
+ }
321
322
 
322
- .border-b-\[rgba\(255\,255\,255\,0\.1\)\] {
323
- border-bottom-color: #ffffff1a;
324
- }
323
+ .rounded-lg {
324
+ border-radius: var(--radius-lg);
325
+ }
325
326
 
326
- .bg-\[\#f0f0f0\] {
327
- background-color: #f0f0f0;
328
- }
327
+ .border {
328
+ border-style: var(--tw-border-style);
329
+ border-width: 1px;
330
+ }
329
331
 
330
- .bg-\[rgba\(255\,255\,255\,1\)\] {
331
- background-color: #fff;
332
- }
332
+ .border-b-1 {
333
+ border-bottom-style: var(--tw-border-style);
334
+ border-bottom-width: 1px;
335
+ }
333
336
 
334
- .bg-\[var\(--el-color-primary\)\] {
335
- background-color: var(--el-color-primary);
336
- }
337
+ .border-b-\[\#eee\] {
338
+ border-bottom-color: #eee;
339
+ }
337
340
 
338
- .bg-black {
339
- background-color: var(--color-black);
340
- }
341
+ .border-b-\[rgba\(255\,255\,255\,0\.1\)\] {
342
+ border-bottom-color: #ffffff1a;
343
+ }
344
+
345
+ .\!bg-\[\#409eff\] {
346
+ background-color: #409eff !important;
347
+ }
348
+
349
+ .bg-\[\#f0f0f0\] {
350
+ background-color: #f0f0f0;
351
+ }
352
+
353
+ .bg-\[rgba\(255\,255\,255\,1\)\] {
354
+ background-color: #fff;
355
+ }
356
+
357
+ .bg-\[var\(--el-color-primary\)\] {
358
+ background-color: var(--el-color-primary);
359
+ }
360
+
361
+ .bg-black {
362
+ background-color: var(--color-black);
363
+ }
364
+
365
+ .bg-black\/15 {
366
+ background-color: #00000026;
367
+ }
341
368
 
369
+ @supports (color: color-mix(in lab, red, red)) {
342
370
  .bg-black\/15 {
343
- background-color: #00000026;
371
+ background-color: color-mix(in oklab, var(--color-black) 15%, transparent);
344
372
  }
373
+ }
345
374
 
346
- @supports (color: color-mix(in lab, red, red)) {
347
- .bg-black\/15 {
348
- background-color: color-mix(in oklab, var(--color-black) 15%, transparent);
349
- }
350
- }
375
+ .bg-white {
376
+ background-color: var(--color-white);
377
+ }
351
378
 
352
- .bg-white {
353
- background-color: var(--color-white);
354
- }
379
+ .p-\[0px_5px\] {
380
+ padding: 0 5px;
381
+ }
355
382
 
356
- .p-\[0px_10px\] {
357
- padding: 0 10px;
358
- }
383
+ .p-\[0px_10px\] {
384
+ padding: 0 10px;
385
+ }
359
386
 
360
- .p-\[2px_0px\] {
361
- padding: 2px 0;
362
- }
387
+ .p-\[2px\] {
388
+ padding: 2px;
389
+ }
363
390
 
364
- .p-\[5px\] {
365
- padding: 5px;
366
- }
391
+ .p-\[2px_0px\] {
392
+ padding: 2px 0;
393
+ }
367
394
 
368
- .p-\[5px_0px\] {
369
- padding: 5px 0;
370
- }
395
+ .p-\[2px_5px\] {
396
+ padding: 2px 5px;
397
+ }
371
398
 
372
- .p-\[5px_20px\] {
373
- padding: 5px 20px;
374
- }
399
+ .p-\[5px\] {
400
+ padding: 5px;
401
+ }
375
402
 
376
- .p-\[10px\] {
377
- padding: 10px;
378
- }
403
+ .p-\[5px_0px\] {
404
+ padding: 5px 0;
405
+ }
379
406
 
380
- .text-right {
381
- text-align: right;
382
- }
407
+ .p-\[5px_20px\] {
408
+ padding: 5px 20px;
409
+ }
383
410
 
384
- .text-\[10px\] {
385
- font-size: 10px;
386
- }
411
+ .p-\[10px\] {
412
+ padding: 10px;
413
+ }
387
414
 
388
- .text-\[14px\] {
389
- font-size: 14px;
390
- }
415
+ .text-right {
416
+ text-align: right;
417
+ }
391
418
 
392
- .leading-\[1\.4em\] {
393
- --tw-leading: 1.4em;
394
- line-height: 1.4em;
395
- }
419
+ .text-\[10px\] {
420
+ font-size: 10px;
421
+ }
396
422
 
397
- .font-bold {
398
- --tw-font-weight: var(--font-weight-bold);
399
- font-weight: var(--font-weight-bold);
400
- }
423
+ .text-\[12px\] {
424
+ font-size: 12px;
425
+ }
401
426
 
402
- .text-\[\#333\] {
403
- color: #333;
404
- }
427
+ .text-\[14px\] {
428
+ font-size: 14px;
429
+ }
405
430
 
406
- .text-\[\#888\] {
407
- color: #888;
408
- }
431
+ .leading-\[1\.4em\] {
432
+ --tw-leading: 1.4em;
433
+ line-height: 1.4em;
434
+ }
409
435
 
410
- .text-\[\#c9c9c9\] {
411
- color: #c9c9c9;
412
- }
436
+ .font-bold {
437
+ --tw-font-weight: var(--font-weight-bold);
438
+ font-weight: var(--font-weight-bold);
439
+ }
413
440
 
414
- .text-\[\#fff\] {
415
- color: #fff;
416
- }
441
+ .text-\[\#333\] {
442
+ color: #333;
443
+ }
417
444
 
418
- .blur {
419
- --tw-blur: blur(8px);
420
- filter: var(--tw-blur, ) var(--tw-brightness, ) var(--tw-contrast, ) var(--tw-grayscale, ) var(--tw-hue-rotate, ) var(--tw-invert, ) var(--tw-saturate, ) var(--tw-sepia, ) var(--tw-drop-shadow, );
421
- }
445
+ .text-\[\#888\] {
446
+ color: #888;
447
+ }
422
448
 
423
- .transition-all {
424
- transition-property: all;
425
- transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
426
- transition-duration: var(--tw-duration, var(--default-transition-duration));
427
- }
449
+ .text-\[\#c9c9c9\] {
450
+ color: #c9c9c9;
451
+ }
428
452
 
429
- .select-none {
430
- -webkit-user-select: none;
431
- user-select: none;
432
- }
453
+ .text-\[\#fff\] {
454
+ color: #fff;
455
+ }
433
456
 
434
- .last-of-type\:border-b-0:last-of-type {
435
- border-bottom-style: var(--tw-border-style);
436
- border-bottom-width: 0;
437
- }
457
+ .blur {
458
+ --tw-blur: blur(8px);
459
+ filter: var(--tw-blur, ) var(--tw-brightness, ) var(--tw-contrast, ) var(--tw-grayscale, ) var(--tw-hue-rotate, ) var(--tw-invert, ) var(--tw-saturate, ) var(--tw-sepia, ) var(--tw-drop-shadow, );
460
+ }
438
461
 
439
- @media (hover: hover) {
440
- .hover\:bg-\[\#ddd\]:hover {
441
- background-color: #ddd;
442
- }
462
+ .transition-all {
463
+ transition-property: all;
464
+ transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
465
+ transition-duration: var(--tw-duration, var(--default-transition-duration));
466
+ }
467
+
468
+ .select-none {
469
+ -webkit-user-select: none;
470
+ user-select: none;
471
+ }
472
+
473
+ .last-of-type\:border-b-0:last-of-type {
474
+ border-bottom-style: var(--tw-border-style);
475
+ border-bottom-width: 0;
476
+ }
477
+
478
+ @media (hover: hover) {
479
+ .hover\:bg-\[\#ddd\]:hover {
480
+ background-color: #ddd;
443
481
  }
444
482
  }
445
483
 
@@ -524,3 +562,7 @@
524
562
  syntax: "*";
525
563
  inherits: false
526
564
  }
565
+
566
+ [data-v-3634b508] {
567
+ font-family: 宋体;
568
+ }
package/src/index3.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as THREE from "three";
2
- import { O as isString, P as noop, Q as resolveUnref, T as tryOnScopeDispose, U as isClient, V as tryOnMounted, W as identity, m as buildProps, q as definePropType, _ as _export_sfc, x as useNamespace, B as isNumber, X as addUnit, y as withInstall, Y as useEmptyValuesProps, w as useSizeProp, Z as provideGlobalConfig, v as iconPropType, $ as useGlobalComponentSettings, a0 as TypeComponentsMap, E as ElIcon, a1 as TypeComponents, a2 as useTimeoutFn, A as isString$1, a3 as isFunction, C as isBoolean, a4 as isElement, a5 as withInstallFunction, I as Lines, J as DomEventRegister } from "./selectLocalFile.js";
2
+ import { O as isString, P as noop, Q as resolveUnref, T as tryOnScopeDispose, U as isClient, V as tryOnMounted, W as identity, m as buildProps, q as definePropType, _ as _export_sfc$1, x as useNamespace, B as isNumber, X as addUnit, y as withInstall, Y as useEmptyValuesProps, w as useSizeProp, Z as provideGlobalConfig, v as iconPropType, $ as useGlobalComponentSettings, a0 as TypeComponentsMap, E as ElIcon, a1 as TypeComponents, a2 as useTimeoutFn, A as isString$1, a3 as isFunction, C as isBoolean, a4 as isElement, a5 as withInstallFunction, I as Lines, J as DomEventRegister } from "./selectLocalFile.js";
3
3
  import { C as Component, L as LineSegment, P as Point, B as Box2, E as EventDispatcher, b as PointVirtualGrid, Q as Quadtree } from "./build.js";
4
- import { watch, ref, defineComponent, computed, createElementBlock, openBlock, normalizeClass, unref, renderSlot, createVNode, Transition, withCtx, withDirectives, createElementVNode, normalizeStyle, createTextVNode, toDisplayString, vShow, shallowReactive, onMounted, createBlock, createCommentVNode, resolveDynamicComponent, Fragment, withModifiers, nextTick, isVNode, render, toRaw, watchEffect, onUnmounted, renderList, createApp } from "vue";
4
+ import { watch, ref, defineComponent, computed, createElementBlock, openBlock, normalizeClass, unref, renderSlot, createVNode, Transition, withCtx, withDirectives, createElementVNode, normalizeStyle, createTextVNode, toDisplayString, vShow, shallowReactive, onMounted, createBlock, createCommentVNode, resolveDynamicComponent, Fragment, withModifiers, nextTick, isVNode, render, toRaw, onUnmounted, renderList, createApp } from "vue";
5
5
  import "clipper-lib";
6
6
  import "dxf-writer";
7
7
  import "three/addons/controls/OrbitControls.js";
@@ -258,7 +258,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
258
258
  };
259
259
  }
260
260
  });
261
- var Badge = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__file", "badge.vue"]]);
261
+ var Badge = /* @__PURE__ */ _export_sfc$1(_sfc_main$2, [["__file", "badge.vue"]]);
262
262
  const ElBadge = withInstall(Badge);
263
263
  const configProviderProps = buildProps({
264
264
  a11y: {
@@ -565,7 +565,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
565
565
  };
566
566
  }
567
567
  });
568
- var MessageConstructor = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__file", "message.vue"]]);
568
+ var MessageConstructor = /* @__PURE__ */ _export_sfc$1(_sfc_main$1, [["__file", "message.vue"]]);
569
569
  let seed = 1;
570
570
  const normalizeOptions = (params) => {
571
571
  const options = !params || isString$1(params) || isVNode(params) || isFunction(params) ? { message: params } : params;
@@ -1248,8 +1248,15 @@ class CommandManager extends EventDispatcher {
1248
1248
  }
1249
1249
  }
1250
1250
  }
1251
+ const _imports_0 = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1757902422799'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='1735'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M843.2%20726.4c-20.2%200-39.2%205.2-55.8%2014.3L283.8%20237.2c9-16.5%2014.1-35.4%2014.1-55.5%200-64.2-52.3-116.5-116.5-116.5S65%20117.4%2065%20181.6s52.3%20116.5%20116.5%20116.5c20.2%200%2039.2-5.2%2055.8-14.2l503.5%20503.5c-9%2016.5-14.1%2035.4-14.1%2055.5%200%2064.2%2052.3%20116.5%20116.5%20116.5s116.5-52.3%20116.5-116.5-52.3-116.5-116.5-116.5zM181.4%20232.1c-27.8%200-50.5-22.6-50.5-50.5s22.6-50.5%2050.5-50.5%2050.5%2022.6%2050.5%2050.5-22.6%2050.5-50.5%2050.5z%20m661.8%20661.3c-27.8%200-50.5-22.6-50.5-50.5%200-27.8%2022.6-50.5%2050.5-50.5s50.5%2022.6%2050.5%2050.5c0%2027.8-22.7%2050.5-50.5%2050.5z'%20fill='%23231815'%20p-id='1736'%3e%3c/path%3e%3c/svg%3e";
1251
1252
  const _hoisted_1 = { class: "mt-[5px] text-[#888] text-[10px] absolute left-[10px] bottom-[10px] rounded-[8px] min-w-[150px] bg-black/15 p-[10px]" };
1252
1253
  const _hoisted_2 = { class: "inline-block ml-[10px]" };
1254
+ const _hoisted_3 = {
1255
+ key: 0,
1256
+ class: "p-[5px] min-w-[140px]"
1257
+ };
1258
+ const _hoisted_4 = { class: "text-[14px] flex flex-col" };
1259
+ const _hoisted_5 = ["onClick"];
1253
1260
  const _sfc_main = /* @__PURE__ */ defineComponent({
1254
1261
  __name: "EditorTool",
1255
1262
  props: {
@@ -1257,9 +1264,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1257
1264
  },
1258
1265
  setup(__props) {
1259
1266
  const props = __props;
1260
- const originalLineVisible = ref(true), dxfVisible = ref(true), whiteModelVisible = ref(true), isLook = ref(false), elRef = ref();
1261
- ref();
1262
- const dxfSystem = toRaw(props.dxfSystem), domEventRegister = dxfSystem.findComponentByType(DomEventRegister), toolBarPosition = ref({ left: 10, top: 10 }), shortcutKeys = [
1267
+ const originalLineVisible = ref(true), dxfVisible = ref(true), whiteModelVisible = ref(true), isLook = ref(false), elRef = ref(), toolBarRef = ref(), toolBarExpand = ref(true), currentCommand = ref(""), dxfSystem = toRaw(props.dxfSystem), domEventRegister = dxfSystem.findComponentByType(DomEventRegister), editor = dxfSystem.findComponentByType(Editor$1), toolBarPosition = ref({ left: 10, top: 10 }), shortcutKeys = [
1263
1268
  { "name": "绘制连续线段", "shortcut": "Ctrl + L" },
1264
1269
  { "name": "绘制线段确认", "shortcut": "Enter" },
1265
1270
  { "name": "绘制门线", "shortcut": "Ctrl + M" },
@@ -1275,14 +1280,62 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1275
1280
  { "name": "线段连接", "shortcut": "选中 + Shift + L" },
1276
1281
  { "name": "线段交点连接", "shortcut": "选中 + Ctrl + Shift + L" },
1277
1282
  { "name": "取消命令", "shortcut": "Esc" }
1283
+ ], commandList = [
1284
+ {
1285
+ command: "default",
1286
+ name: "默认",
1287
+ show: false
1288
+ },
1289
+ {
1290
+ command: "draw-line",
1291
+ name: "绘制线段",
1292
+ show: true
1293
+ },
1294
+ {
1295
+ command: "draw-door-line",
1296
+ name: "绘制门线",
1297
+ show: true
1298
+ },
1299
+ {
1300
+ command: "draw-window-line",
1301
+ name: "绘制窗户线",
1302
+ show: true
1303
+ }
1278
1304
  ];
1279
- watchEffect(() => localStorage.setItem("EditorToolPosition", JSON.stringify(toolBarPosition.value)));
1280
- function setEditorToolPosition(left, top) {
1281
- const dom = elRef.value, toolBarDom = elRef.value, rect = dom.getBoundingClientRect(), toolBarRect = toolBarDom.getBoundingClientRect(), minX = 0, maxX = toolBarRect.width - rect.width, minY = 0, maxY = toolBarRect.height - rect.height;
1305
+ watch(toolBarPosition, () => localStorage.setItem("EditorToolPosition", JSON.stringify(toolBarPosition.value)));
1306
+ function setEditorToolPosition(left, top, rect = elRef.value.getBoundingClientRect(), toolBarRect = toolBarRef.value.getBoundingClientRect()) {
1307
+ const minX = 0, maxX = rect.width - toolBarRect.width, minY = 0, maxY = rect.height - toolBarRect.height;
1282
1308
  left = Math.max(minX, Math.min(left, maxX));
1283
1309
  top = Math.max(minY, Math.min(top, maxY));
1284
1310
  toolBarPosition.value = { left, top };
1285
- console.log(left, top);
1311
+ }
1312
+ function startCurrentCommandItem(item) {
1313
+ if (currentCommand.value === item.command) return;
1314
+ editor.commandManager.start(item.command);
1315
+ }
1316
+ function dragMoveHelper({ offsetX, offsetY }) {
1317
+ domEventRegister.mouseMoveEventProxylock = true;
1318
+ const cusor = document.body.style.cursor;
1319
+ document.body.style.cursor = "move";
1320
+ const move = (e) => {
1321
+ const rect = elRef.value.getBoundingClientRect(), toolBarRect = toolBarRef.value.getBoundingClientRect();
1322
+ setEditorToolPosition(
1323
+ e.pageX - rect.left - offsetX,
1324
+ e.pageY - rect.top - offsetY,
1325
+ rect,
1326
+ toolBarRect
1327
+ );
1328
+ e.stopPropagation();
1329
+ document.body.style.cursor = "move";
1330
+ };
1331
+ const end = () => {
1332
+ document.body.removeEventListener("mousemove", move);
1333
+ document.removeEventListener("mouseup", end);
1334
+ document.body.style.cursor = cusor;
1335
+ domEventRegister.mouseMoveEventProxylock = false;
1336
+ };
1337
+ document.body.addEventListener("mousemove", move);
1338
+ document.addEventListener("mouseup", end);
1286
1339
  }
1287
1340
  watch(originalLineVisible, () => dxfSystem.Variable.set("originalLineVisible", originalLineVisible.value));
1288
1341
  watch(dxfVisible, () => dxfSystem.Variable.set("dxfVisible", dxfVisible.value));
@@ -1291,14 +1344,22 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1291
1344
  dxfSystem.Variable.addEventListener("originalLineVisible", (e) => originalLineVisible.value = e.value);
1292
1345
  dxfSystem.Variable.addEventListener("dxfVisible", (e) => dxfVisible.value = e.value);
1293
1346
  dxfSystem.Variable.addEventListener("whiteModelVisible", (e) => whiteModelVisible.value = e.value);
1347
+ const startedEventCancel = editor.commandManager.addEventListener("started", (e) => {
1348
+ currentCommand.value = e.name;
1349
+ });
1294
1350
  onMounted(() => {
1295
- if (localStorage.getItem("EditorToolPosition")) {
1296
- const { left, top } = JSON.parse(localStorage.getItem("EditorToolPosition") ?? "{}");
1297
- setEditorToolPosition(left, top);
1298
- }
1351
+ toolBarRef.value.style.display = "none";
1352
+ setTimeout(() => {
1353
+ toolBarRef.value.style.display = "block";
1354
+ if (localStorage.getItem("EditorToolPosition")) {
1355
+ const { left, top } = JSON.parse(localStorage.getItem("EditorToolPosition") ?? "{}");
1356
+ setEditorToolPosition(left, top);
1357
+ }
1358
+ }, 20);
1299
1359
  });
1300
1360
  onUnmounted(() => {
1301
1361
  domEventRegister.mouseMoveEventProxylock = false;
1362
+ startedEventCancel();
1302
1363
  });
1303
1364
  return (_ctx, _cache) => {
1304
1365
  return openBlock(), createElementBlock("div", {
@@ -1316,11 +1377,90 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1316
1377
  createElementVNode("span", _hoisted_2, toDisplayString(item.shortcut), 1)
1317
1378
  ]);
1318
1379
  }), 64))
1319
- ])
1380
+ ]),
1381
+ createElementVNode("div", {
1382
+ ref_key: "toolBarRef",
1383
+ ref: toolBarRef,
1384
+ style: normalizeStyle({ left: toolBarPosition.value.left + "px", top: toolBarPosition.value.top + "px" }),
1385
+ class: "pointer-events-auto text-[#333] absolute rounded-[8px] z-[11] bg-white select-none"
1386
+ }, [
1387
+ createElementVNode("div", {
1388
+ class: normalizeClass([{ "border-b-[#eee]": toolBarExpand.value }, "flex flex-row justify-between header text-[14px] font-bold p-[10px 0px] border-b-1"])
1389
+ }, [
1390
+ createElementVNode("div", {
1391
+ class: "flex flex-row",
1392
+ onMousedown: dragMoveHelper
1393
+ }, _cache[3] || (_cache[3] = [
1394
+ createElementVNode("div", { class: "p-[2px_5px] flex items-center pointer-events-none" }, [
1395
+ createElementVNode("svg", {
1396
+ fill: "#aaa",
1397
+ width: "20",
1398
+ height: "20",
1399
+ viewBox: "0 0 1024 1024",
1400
+ version: "1.1",
1401
+ xmlns: "http://www.w3.org/2000/svg"
1402
+ }, [
1403
+ createElementVNode("path", { d: "M341.333333 298.666667a85.333333 85.333333 0 1 0 0-170.666667 85.333333 85.333333 0 0 0 0 170.666667z m0 298.666666a85.333333 85.333333 0 1 0 0-170.666666 85.333333 85.333333 0 0 0 0 170.666666z m85.333334 213.333334a85.333333 85.333333 0 1 1-170.666667 0 85.333333 85.333333 0 0 1 170.666667 0z m256-512a85.333333 85.333333 0 1 0 0-170.666667 85.333333 85.333333 0 0 0 0 170.666667z m85.333333 213.333333a85.333333 85.333333 0 1 1-170.666667 0 85.333333 85.333333 0 0 1 170.666667 0z m-85.333333 384a85.333333 85.333333 0 1 0 0-170.666667 85.333333 85.333333 0 0 0 0 170.666667z" })
1404
+ ])
1405
+ ], -1),
1406
+ createElementVNode("h5", { class: "flex items-center pointer-events-none" }, "绘制窗户线", -1)
1407
+ ]), 32),
1408
+ createElementVNode("div", {
1409
+ onClick: _cache[0] || (_cache[0] = ($event) => toolBarExpand.value = !toolBarExpand.value),
1410
+ class: "cursor-pointer flex items-center p-[0px_5px]"
1411
+ }, [
1412
+ (openBlock(), createElementBlock("svg", {
1413
+ fill: "#666",
1414
+ class: normalizeClass([{ "rotate-90": toolBarExpand.value }, "transition-all"]),
1415
+ viewBox: "0 0 1024 1024",
1416
+ version: "1.1",
1417
+ xmlns: "http://www.w3.org/2000/svg",
1418
+ width: "12",
1419
+ height: "12"
1420
+ }, _cache[4] || (_cache[4] = [
1421
+ createElementVNode("path", { d: "M315.050667 938.666667a60.757333 60.757333 0 0 0 41.813333-16.298667L750.933333 551.338667a53.418667 53.418667 0 0 0 0-78.677334L356.864 101.632a61.696 61.696 0 0 0-83.541333 0 53.418667 53.418667 0 0 0-0.256 78.677333L625.408 512 273.066667 843.690667a53.418667 53.418667 0 0 0 0 78.677333 60.757333 60.757333 0 0 0 41.984 16.298667z" }, null, -1)
1422
+ ]), 2))
1423
+ ])
1424
+ ], 2),
1425
+ toolBarExpand.value ? (openBlock(), createElementBlock("div", _hoisted_3, [
1426
+ createElementVNode("ul", _hoisted_4, [
1427
+ (openBlock(), createElementBlock(Fragment, null, renderList(commandList, (item) => {
1428
+ return openBlock(), createElementBlock(Fragment, {
1429
+ key: item.command
1430
+ }, [
1431
+ item.show ? (openBlock(), createElementBlock("li", {
1432
+ key: 0,
1433
+ onClick: ($event) => startCurrentCommandItem(item),
1434
+ class: normalizeClass([{ "!bg-[#409eff] text-[#fff]": currentCommand.value === item.command }, "text-[12px] hover:bg-[#ddd] transition-all rounded-[6px] p-[5px] flex flex-row items-center cursor-pointer"])
1435
+ }, [
1436
+ _cache[5] || (_cache[5] = createElementVNode("div", { class: "p-[2px] h-fit bg-[#f0f0f0] rounded-[2px] mr-[10px]" }, [
1437
+ createElementVNode("img", {
1438
+ class: "w-[10px] h-[10px]",
1439
+ src: _imports_0,
1440
+ alt: "",
1441
+ srcset: ""
1442
+ })
1443
+ ], -1)),
1444
+ createElementVNode("span", null, toDisplayString(item.name), 1)
1445
+ ], 10, _hoisted_5)) : createCommentVNode("", true)
1446
+ ], 64);
1447
+ }), 64))
1448
+ ]),
1449
+ createCommentVNode("", true)
1450
+ ])) : createCommentVNode("", true)
1451
+ ], 4)
1320
1452
  ], 512);
1321
1453
  };
1322
1454
  }
1323
1455
  });
1456
+ const _export_sfc = (sfc, props) => {
1457
+ const target = sfc.__vccOpts || sfc;
1458
+ for (const [key, val] of props) {
1459
+ target[key] = val;
1460
+ }
1461
+ return target;
1462
+ };
1463
+ const EditorTool = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-3634b508"]]);
1324
1464
  let Editor$1 = class Editor extends Component {
1325
1465
  static name = "Editor";
1326
1466
  container = new THREE.Group();
@@ -1357,7 +1497,7 @@ let Editor$1 = class Editor extends Component {
1357
1497
  this.container.add(grid);
1358
1498
  this.container.add(this.plane);
1359
1499
  this.plane.visible = false;
1360
- this.app = createApp(_sfc_main, { dxfSystem: this.parent });
1500
+ this.app = createApp(EditorTool, { dxfSystem: this.parent });
1361
1501
  this.app.mount(this.domElement);
1362
1502
  const cancelEvent = this.addEventListener("update", () => {
1363
1503
  if (this.domContainer.domElement.parentElement) {
@@ -4,5 +4,6 @@ type __VLS_Props = {
4
4
  };
5
5
  declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
6
6
  elRef: HTMLDivElement;
7
+ toolBarRef: HTMLDivElement;
7
8
  }, HTMLDivElement>;
8
9
  export default _default;