@operato/slot-layout-editor 10.29.82 → 10.29.84

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
@@ -2,7 +2,7 @@
2
2
  "name": "@operato/slot-layout-editor",
3
3
  "description": "Editor for a holder's tiers and slots (things-scene slot layout): edit, validate, preview",
4
4
  "author": "heartyoh",
5
- "version": "10.29.82",
5
+ "version": "10.29.84",
6
6
  "type": "module",
7
7
  "main": "dist/src/index.js",
8
8
  "module": "dist/src/index.js",
@@ -31,9 +31,22 @@
31
31
  "./ox-property-editor-slot-layout.js": "./dist/src/ox-property-editor-slot-layout.js",
32
32
  "./package.json": "./package.json"
33
33
  },
34
+ "files": [
35
+ "LICENSE",
36
+ "dist",
37
+ "translations",
38
+ "!**/*.map",
39
+ "!**/*.test.*",
40
+ "!**/*.spec.*",
41
+ "!**/test/**",
42
+ "!**/tests/**",
43
+ "!**/__tests__/**",
44
+ "!**/*.tsbuildinfo",
45
+ "!**/.DS_Store"
46
+ ],
34
47
  "dependencies": {
35
- "@operato/i18n": "^10.29.27",
36
- "@operato/property-editor": "^10.29.81",
48
+ "@operato/i18n": "^10.29.83",
49
+ "@operato/property-editor": "^10.29.84",
37
50
  "lit": "^3.1.2"
38
51
  },
39
52
  "peerDependencies": {
@@ -53,5 +66,5 @@
53
66
  "typescript": "^5.0.4"
54
67
  },
55
68
  "prettier": "@hatiolab/prettier-config",
56
- "gitHead": "86421ea77856243064ace518c5cf0e3480826af2"
69
+ "gitHead": "a6c30e4a03a2a71b4aba24f09853d8be78655147"
57
70
  }
package/CHANGELOG.md DELETED
@@ -1,507 +0,0 @@
1
- # Change Log
2
-
3
- All notable changes to this project will be documented in this file.
4
- See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
-
6
- ### [10.29.82](https://github.com/hatiolab/operato/compare/v10.29.81...v10.29.82) (2026-11-12)
7
-
8
-
9
- ### :bug: Bug Fix
10
-
11
- * **slot-layout-editor:** the fields stay where they are as values are typed ([2aad45f](https://github.com/hatiolab/operato/commit/2aad45f615a19f3f55bde0417cdc79a11f903b0d))
12
-
13
-
14
-
15
- ### [10.29.81](https://github.com/hatiolab/operato/compare/v10.29.80...v10.29.81) (2026-11-11)
16
-
17
- **Note:** Version bump only for package @operato/slot-layout-editor
18
-
19
-
20
-
21
-
22
-
23
- ### [10.29.80](https://github.com/hatiolab/operato/compare/v10.29.79...v10.29.80) (2026-11-11)
24
-
25
- **Note:** Version bump only for package @operato/slot-layout-editor
26
-
27
-
28
-
29
-
30
-
31
- ### [10.29.79](https://github.com/hatiolab/operato/compare/v10.29.78...v10.29.79) (2026-11-10)
32
-
33
- **Note:** Version bump only for package @operato/slot-layout-editor
34
-
35
-
36
-
37
-
38
-
39
- ### [10.29.78](https://github.com/hatiolab/operato/compare/v10.29.77...v10.29.78) (2026-11-10)
40
-
41
- **Note:** Version bump only for package @operato/slot-layout-editor
42
-
43
-
44
-
45
-
46
-
47
- ### [10.29.77](https://github.com/hatiolab/operato/compare/v10.29.76...v10.29.77) (2026-11-10)
48
-
49
- **Note:** Version bump only for package @operato/slot-layout-editor
50
-
51
-
52
-
53
-
54
-
55
- ### [10.29.76](https://github.com/hatiolab/operato/compare/v10.29.75...v10.29.76) (2026-11-09)
56
-
57
- **Note:** Version bump only for package @operato/slot-layout-editor
58
-
59
-
60
-
61
-
62
-
63
- ### [10.29.74](https://github.com/hatiolab/operato/compare/v10.29.73...v10.29.74) (2026-11-08)
64
-
65
- **Note:** Version bump only for package @operato/slot-layout-editor
66
-
67
-
68
-
69
-
70
-
71
- ### [10.29.73](https://github.com/hatiolab/operato/compare/v10.29.72...v10.29.73) (2026-11-08)
72
-
73
- **Note:** Version bump only for package @operato/slot-layout-editor
74
-
75
-
76
-
77
-
78
-
79
- ### [10.29.72](https://github.com/hatiolab/operato/compare/v10.29.71...v10.29.72) (2026-11-08)
80
-
81
- **Note:** Version bump only for package @operato/slot-layout-editor
82
-
83
-
84
-
85
-
86
-
87
- ### [10.29.71](https://github.com/hatiolab/operato/compare/v10.29.70...v10.29.71) (2026-11-08)
88
-
89
- **Note:** Version bump only for package @operato/slot-layout-editor
90
-
91
-
92
-
93
-
94
-
95
- ### [10.29.70](https://github.com/hatiolab/operato/compare/v10.29.69...v10.29.70) (2026-11-07)
96
-
97
- **Note:** Version bump only for package @operato/slot-layout-editor
98
-
99
-
100
-
101
-
102
-
103
- ### [10.29.69](https://github.com/hatiolab/operato/compare/v10.29.68...v10.29.69) (2026-11-07)
104
-
105
- **Note:** Version bump only for package @operato/slot-layout-editor
106
-
107
-
108
-
109
-
110
-
111
- ### [10.29.68](https://github.com/hatiolab/operato/compare/v10.29.67...v10.29.68) (2026-11-06)
112
-
113
- **Note:** Version bump only for package @operato/slot-layout-editor
114
-
115
-
116
-
117
-
118
-
119
- ### [10.29.67](https://github.com/hatiolab/operato/compare/v10.29.66...v10.29.67) (2026-11-02)
120
-
121
- **Note:** Version bump only for package @operato/slot-layout-editor
122
-
123
-
124
-
125
-
126
-
127
- ### [10.29.66](https://github.com/hatiolab/operato/compare/v10.29.65...v10.29.66) (2026-11-01)
128
-
129
- **Note:** Version bump only for package @operato/slot-layout-editor
130
-
131
-
132
-
133
-
134
-
135
- ### [10.29.65](https://github.com/hatiolab/operato/compare/v10.29.64...v10.29.65) (2026-11-01)
136
-
137
- **Note:** Version bump only for package @operato/slot-layout-editor
138
-
139
-
140
-
141
-
142
-
143
- ### [10.29.64](https://github.com/hatiolab/operato/compare/v10.29.63...v10.29.64) (2026-11-01)
144
-
145
- **Note:** Version bump only for package @operato/slot-layout-editor
146
-
147
-
148
-
149
-
150
-
151
- ### [10.29.63](https://github.com/hatiolab/operato/compare/v10.29.62...v10.29.63) (2026-10-31)
152
-
153
- **Note:** Version bump only for package @operato/slot-layout-editor
154
-
155
-
156
-
157
-
158
-
159
- ### [10.29.62](https://github.com/hatiolab/operato/compare/v10.29.61...v10.29.62) (2026-10-30)
160
-
161
- **Note:** Version bump only for package @operato/slot-layout-editor
162
-
163
-
164
-
165
-
166
-
167
- ### [10.29.61](https://github.com/hatiolab/operato/compare/v10.29.60...v10.29.61) (2026-10-30)
168
-
169
- **Note:** Version bump only for package @operato/slot-layout-editor
170
-
171
-
172
-
173
-
174
-
175
- ### [10.29.60](https://github.com/hatiolab/operato/compare/v10.29.59...v10.29.60) (2026-10-29)
176
-
177
- **Note:** Version bump only for package @operato/slot-layout-editor
178
-
179
-
180
-
181
-
182
-
183
- ### [10.29.59](https://github.com/hatiolab/operato/compare/v10.29.58...v10.29.59) (2026-10-28)
184
-
185
- **Note:** Version bump only for package @operato/slot-layout-editor
186
-
187
-
188
-
189
-
190
-
191
- ### [10.29.58](https://github.com/hatiolab/operato/compare/v10.29.57...v10.29.58) (2026-10-27)
192
-
193
-
194
- ### :rocket: New Features
195
-
196
- * **slot-layout-editor:** one line for a tier's slots past their face, host-set panel look ([9e7946a](https://github.com/hatiolab/operato/commit/9e7946a111e775ef40efdd88fc3d0ef5af613d8c))
197
-
198
-
199
-
200
- ### [10.29.57](https://github.com/hatiolab/operato/compare/v10.29.56...v10.29.57) (2026-10-27)
201
-
202
-
203
- ### :rocket: New Features
204
-
205
- * **slot-layout-editor:** start with no numbers to type ([fe55219](https://github.com/hatiolab/operato/commit/fe552194b9a45ea7a3fe2b16427b8a3e9805eb62))
206
-
207
-
208
- ### :bug: Bug Fix
209
-
210
- * **slot-layout-editor:** lengths are shown to three decimals ([66bd3af](https://github.com/hatiolab/operato/commit/66bd3af6e5df6860e89f3e706938081370607992))
211
- * **slot-layout-editor:** words for ACCEPTS_EMPTY, things-scene ^10.1.102 ([ca42efb](https://github.com/hatiolab/operato/commit/ca42efb8b2feb6cc917febd5a0597f6a1360aef9))
212
-
213
-
214
-
215
- ### [10.29.56](https://github.com/hatiolab/operato/compare/v10.29.55...v10.29.56) (2026-10-26)
216
-
217
-
218
- ### :rocket: New Features
219
-
220
- * **slot-layout-editor:** anchor face picture first, live editing, fit to face, type chooser ([9e0c183](https://github.com/hatiolab/operato/commit/9e0c1833cf07699ae052a53d6ed5b65d7f6ee7ae))
221
-
222
-
223
-
224
- ### [10.29.52](https://github.com/hatiolab/operato/compare/v10.29.51...v10.29.52) (2026-10-25)
225
-
226
- **Note:** Version bump only for package @operato/slot-layout-editor
227
-
228
-
229
-
230
-
231
-
232
- ### [10.29.51](https://github.com/hatiolab/operato/compare/v10.29.50...v10.29.51) (2026-10-24)
233
-
234
- **Note:** Version bump only for package @operato/slot-layout-editor
235
-
236
-
237
-
238
-
239
-
240
- ### [10.29.50](https://github.com/hatiolab/operato/compare/v10.29.49...v10.29.50) (2026-10-23)
241
-
242
- **Note:** Version bump only for package @operato/slot-layout-editor
243
-
244
-
245
-
246
-
247
-
248
- ### [10.29.49](https://github.com/hatiolab/operato/compare/v10.29.48...v10.29.49) (2026-10-23)
249
-
250
- **Note:** Version bump only for package @operato/slot-layout-editor
251
-
252
-
253
-
254
-
255
-
256
- ### [10.29.47](https://github.com/hatiolab/operato/compare/v10.29.46...v10.29.47) (2026-10-21)
257
-
258
- **Note:** Version bump only for package @operato/slot-layout-editor
259
-
260
-
261
-
262
-
263
-
264
- ### [10.29.46](https://github.com/hatiolab/operato/compare/v10.29.45...v10.29.46) (2026-10-20)
265
-
266
- **Note:** Version bump only for package @operato/slot-layout-editor
267
-
268
-
269
-
270
-
271
-
272
- ### [10.29.45](https://github.com/hatiolab/operato/compare/v10.29.44...v10.29.45) (2026-10-18)
273
-
274
- **Note:** Version bump only for package @operato/slot-layout-editor
275
-
276
-
277
-
278
-
279
-
280
- ### [10.29.44](https://github.com/hatiolab/operato/compare/v10.29.43...v10.29.44) (2026-10-18)
281
-
282
- **Note:** Version bump only for package @operato/slot-layout-editor
283
-
284
-
285
-
286
-
287
-
288
- ### [10.29.43](https://github.com/hatiolab/operato/compare/v10.29.42...v10.29.43) (2026-10-18)
289
-
290
- **Note:** Version bump only for package @operato/slot-layout-editor
291
-
292
-
293
-
294
-
295
-
296
- ### [10.29.41](https://github.com/hatiolab/operato/compare/v10.29.40...v10.29.41) (2026-10-18)
297
-
298
- **Note:** Version bump only for package @operato/slot-layout-editor
299
-
300
-
301
-
302
-
303
-
304
- ### [10.29.40](https://github.com/hatiolab/operato/compare/v10.29.39...v10.29.40) (2026-10-17)
305
-
306
- **Note:** Version bump only for package @operato/slot-layout-editor
307
-
308
-
309
-
310
-
311
-
312
- ### [10.29.39](https://github.com/hatiolab/operato/compare/v10.29.38...v10.29.39) (2026-10-17)
313
-
314
- **Note:** Version bump only for package @operato/slot-layout-editor
315
-
316
-
317
-
318
-
319
-
320
- ### [10.29.38](https://github.com/hatiolab/operato/compare/v10.29.37...v10.29.38) (2026-10-17)
321
-
322
- **Note:** Version bump only for package @operato/slot-layout-editor
323
-
324
-
325
-
326
-
327
-
328
- ### [10.29.37](https://github.com/hatiolab/operato/compare/v10.29.36...v10.29.37) (2026-10-17)
329
-
330
- **Note:** Version bump only for package @operato/slot-layout-editor
331
-
332
-
333
-
334
-
335
-
336
- ### [10.29.36](https://github.com/hatiolab/operato/compare/v10.29.35...v10.29.36) (2026-10-17)
337
-
338
- **Note:** Version bump only for package @operato/slot-layout-editor
339
-
340
-
341
-
342
-
343
-
344
- ### [10.29.34](https://github.com/hatiolab/operato/compare/v10.29.33...v10.29.34) (2026-10-16)
345
-
346
-
347
- ### :rocket: New Features
348
-
349
- * **slot-layout-editor:** the editor names the equipment presets itself ([8ba2495](https://github.com/hatiolab/operato/commit/8ba24955e173b05ae68561ae098fbff636a6014c))
350
-
351
-
352
-
353
- ### [10.29.33](https://github.com/hatiolab/operato/compare/v10.29.32...v10.29.33) (2026-10-14)
354
-
355
- **Note:** Version bump only for package @operato/slot-layout-editor
356
-
357
-
358
-
359
-
360
-
361
- ### [10.29.32](https://github.com/hatiolab/operato/compare/v10.29.31...v10.29.32) (2026-10-14)
362
-
363
- **Note:** Version bump only for package @operato/slot-layout-editor
364
-
365
-
366
-
367
-
368
-
369
- ### [10.29.31](https://github.com/hatiolab/operato/compare/v10.29.30...v10.29.31) (2026-10-14)
370
-
371
- **Note:** Version bump only for package @operato/slot-layout-editor
372
-
373
-
374
-
375
-
376
-
377
- ### [10.29.30](https://github.com/hatiolab/operato/compare/v10.29.29...v10.29.30) (2026-10-13)
378
-
379
- **Note:** Version bump only for package @operato/slot-layout-editor
380
-
381
-
382
-
383
-
384
-
385
- ### [10.29.29](https://github.com/hatiolab/operato/compare/v10.29.28...v10.29.29) (2026-10-13)
386
-
387
- **Note:** Version bump only for package @operato/slot-layout-editor
388
-
389
-
390
-
391
-
392
-
393
- ### [10.29.28](https://github.com/hatiolab/operato/compare/v10.29.27...v10.29.28) (2026-10-12)
394
-
395
- **Note:** Version bump only for package @operato/slot-layout-editor
396
-
397
-
398
-
399
-
400
-
401
- ### [10.29.27](https://github.com/hatiolab/operato/compare/v10.29.26...v10.29.27) (2026-10-11)
402
-
403
- **Note:** Version bump only for package @operato/slot-layout-editor
404
-
405
-
406
-
407
-
408
-
409
- ### [10.29.26](https://github.com/hatiolab/operato/compare/v10.29.25...v10.29.26) (2026-10-11)
410
-
411
-
412
- ### :bug: Bug Fix
413
-
414
- * **slot-layout-editor:** a host with no layout and no default still gets its preset size ([df6e8a9](https://github.com/hatiolab/operato/commit/df6e8a9498ea1106a44ed16a7a90bfd18c081a81))
415
- * **slot-layout-editor:** words for figure-model's ACCEPTS_REQUIRED ([cabaff1](https://github.com/hatiolab/operato/commit/cabaff15e8f87bfc2eb22a6335ca53cd7dccc088))
416
-
417
-
418
-
419
- ### [10.29.25](https://github.com/hatiolab/operato/compare/v10.29.24...v10.29.25) (2026-10-11)
420
-
421
- **Note:** Version bump only for package @operato/slot-layout-editor
422
-
423
-
424
-
425
-
426
-
427
- ### [10.29.24](https://github.com/hatiolab/operato/compare/v10.29.23...v10.29.24) (2026-10-11)
428
-
429
- **Note:** Version bump only for package @operato/slot-layout-editor
430
-
431
-
432
-
433
-
434
-
435
- ### [10.29.23](https://github.com/hatiolab/operato/compare/v10.29.22...v10.29.23) (2026-10-10)
436
-
437
-
438
- ### :rocket: New Features
439
-
440
- * **i18n:** add Spanish (es) translations to the web components ([e9e7b93](https://github.com/hatiolab/operato/commit/e9e7b932b7e51a9b52838dd5cc7293d6db4ec7fe))
441
-
442
-
443
-
444
- ### [10.29.22](https://github.com/hatiolab/operato/compare/v10.29.21...v10.29.22) (2026-10-10)
445
-
446
- **Note:** Version bump only for package @operato/slot-layout-editor
447
-
448
-
449
-
450
-
451
-
452
- ### [10.29.21](https://github.com/hatiolab/operato/compare/v10.29.20...v10.29.21) (2026-10-10)
453
-
454
- **Note:** Version bump only for package @operato/slot-layout-editor
455
-
456
-
457
-
458
-
459
-
460
- ### [10.29.20](https://github.com/hatiolab/operato/compare/v10.29.19...v10.29.20) (2026-10-10)
461
-
462
- **Note:** Version bump only for package @operato/slot-layout-editor
463
-
464
-
465
-
466
-
467
-
468
- ### [10.29.18](https://github.com/hatiolab/operato/compare/v10.29.17...v10.29.18) (2026-10-10)
469
-
470
- **Note:** Version bump only for package @operato/slot-layout-editor
471
-
472
-
473
-
474
-
475
-
476
- ### [10.29.17](https://github.com/hatiolab/operato/compare/v10.29.16...v10.29.17) (2026-10-10)
477
-
478
- **Note:** Version bump only for package @operato/slot-layout-editor
479
-
480
-
481
-
482
-
483
-
484
- ### [10.29.16](https://github.com/hatiolab/operato/compare/v10.29.15...v10.29.16) (2026-10-09)
485
-
486
-
487
- ### :bug: Bug Fix
488
-
489
- * **slot-layout-editor:** require things-scene 10.1.78, the first release with the anchor contract ([4c632c5](https://github.com/hatiolab/operato/commit/4c632c548d8557f4a4c69b1b5519f03d706ea301))
490
-
491
-
492
-
493
- ### [10.29.15](https://github.com/hatiolab/operato/compare/v10.29.14...v10.29.15) (2026-10-09)
494
-
495
-
496
- ### :rocket: New Features
497
-
498
- * **slot-layout-editor:** tiers stand on anchors and keep their numbers ([59b06bd](https://github.com/hatiolab/operato/commit/59b06bd8be506008cec6dadc702656fe46af675b))
499
-
500
-
501
-
502
- ### [10.29.14](https://github.com/hatiolab/operato/compare/v10.29.13...v10.29.14) (2026-10-07)
503
-
504
-
505
- ### :rocket: New Features
506
-
507
- * **slot-layout-editor:** an editor for a holder's tiers and slots ([b7a13a5](https://github.com/hatiolab/operato/commit/b7a13a50ebee71a8dfd3ca0686db410dea3fb0d8))
@@ -1 +0,0 @@
1
- {"version":3,"file":"draft.js","sourceRoot":"","sources":["../../src/draft.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,eAAe,EACf,YAAY,EACZ,WAAW,EACX,gBAAgB,EAChB,aAAa,EACb,SAAS,EACT,SAAS,EACT,QAAQ,EACR,WAAW,EAWZ,MAAM,wBAAwB,CAAA;AAE/B,uDAAuD;AACvD,MAAM,KAAK,GAAG,CAAI,CAAI,EAAK,EAAE,CAAC,eAAe,CAAC,CAAC,CAAC,CAAA;AA4BhD,6DAA6D;AAC7D,MAAM,UAAU,WAAW,CACzB,MAA2B,EAC3B,IAAyB,EACzB,SAAkC,EAAE;;IAEpC,MAAM,MAAM,GAAkB,EAAE,CAAA;IAChC,MAAM,QAAQ,GAAG,CAAC,CAAU,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;IACrF,MAAM,WAAW,GAAG,CAAC,CAAU,EAAE,EAAE,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,IAAK,CAAY,GAAG,CAAC,CAAA;IAChF,KAAK,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,YAAY,CAAU;QAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAAE,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,0BAA0B,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,CAAA;IAC7I,KAAK,MAAM,CAAC,IAAI,MAAA,MAAM,CAAC,MAAM,mCAAI,EAAE;QAC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.\n *\n * 자리 레이아웃 편집 동작. 입력 레이아웃을 바꾸지 않고 새 레이아웃을 돌려준다.\n * 레이아웃에 호스트가 덧붙인 키(예: 실시간 주소 읽기 설정)는 그대로 보존한다.\n */\n\nimport {\n addressOfSlotId,\n judgeItemFit,\n resolveSlot,\n rotatedFootprint,\n slotAddresses,\n slotCount,\n slotFrame,\n slotIdOf,\n slotNumbers,\n type FitReason,\n type FitVerdict,\n type GridOrder,\n type ItemDims,\n type LayoutIssue,\n type PatternSlot,\n type SlotLayout,\n type SlotLayoutTier,\n type SlotPattern,\n type SlotSpec\n} from '@hatiolab/things-scene'\n\n// JSON 복사는 NaN·Infinity 를 null 로 바꿔 잘못된 값을 숨기므로 쓰지 않는다\nconst clone = <T>(v: T): T => structuredClone(v)\n\n// ── 프리셋 ──────────────────────────────────────────────────────────────────\n\n/** 프리셋이 받는 크기. slotHeight 는 자리 허용 높이 */\nexport interface PresetSize {\n width: number\n depth: number\n slotHeight: number\n}\n\n/** 프리셋이 크기 외에 더 받는 값. 이름은 편집기가 키로 번역한다(label.slot-layout.preset-param.{key}) */\nexport interface PresetParam {\n key: string\n /** 양의 정수만 받는다 */\n integer?: boolean\n}\n\n/**\n * 호스트가 넘기는 프리셋. 이름은 편집기가 키로 번역한다(label.slot-layout.preset.{key}) — 기종 프리셋(figure-model)을 쓰는\n * 호스트마다 같은 이름을 따로 번역해 두지 않는다\n */\nexport interface SlotLayoutPreset<L extends SlotLayout = SlotLayout> {\n key: string\n params?: PresetParam[]\n build(size: PresetSize, params: Record<string, number>): L\n}\n\n/** 크기·값을 검사하고 프리셋으로 레이아웃을 만든다. 모자라거나 잘못되면 layout 없이 문제 목록 */\nexport function applyPreset<L extends SlotLayout>(\n preset: SlotLayoutPreset<L>,\n size: Partial<PresetSize>,\n params: Record<string, unknown> = {}\n): { layout?: L; issues: LayoutIssue[] } {\n const issues: LayoutIssue[] = []\n const positive = (v: unknown) => typeof v === 'number' && Number.isFinite(v) && v > 0\n const positiveInt = (v: unknown) => Number.isSafeInteger(v) && (v as number) > 0\n for (const k of ['width', 'depth', 'slotHeight'] as const) if (!positive(size[k])) issues.push({ code: 'POSITIVE_NUMBER_REQUIRED', path: k })\n for (const p of preset.params ?? [])\n if (!(p.integer ? positiveInt(params[p.key]) : positive(params[p.key])))\n issues.push({ code: p.integer ? 'POSITIVE_INTEGER_REQUIRED' : 'POSITIVE_NUMBER_REQUIRED', path: p.key })\n if (issues.length) return { issues }\n return { layout: preset.build(size as PresetSize, params as Record<string, number>), issues }\n}\n\n// ── Tier ───────────────────────────────────────────────────────────────────\n// Tier 번호는 홀더 안의 식별 번호다. 지우거나 정렬해도 다시 매기지 않는다 (번호가 바뀌면 놓인 Carrier 의 주소가 바뀐다).\n\n/** Tier 설정을 복사해 새 Tier 로 붙인다. 번호는 지금 가장 큰 번호 + 1, 배치는 placement 로 바꾼다. 점유는 복사하지 않는다 */\nexport function copyTier<L extends SlotLayout>(layout: L, tierNo: number, placement: TierPatch = {}): L {\n const next = clone(layout)\n const source = next.tiers.find(t => t.tierNo === tierNo)\n if (!source) return next\n const newNo = Math.max(...next.tiers.map(t => t.tierNo)) + 1\n next.tiers.push({ ...clone(source), ...clone(placement), tierNo: newNo })\n return next\n}\n\n/** Tier 를 지운다. 남은 Tier 의 번호는 그대로다. 마지막 남은 Tier 는 지우지 않는다 */\nexport function removeTier<L extends SlotLayout>(layout: L, tierNo: number): L {\n const next = clone(layout)\n if (next.tiers.length <= 1) return next\n next.tiers = next.tiers.filter(t => t.tierNo !== tierNo)\n return next\n}\n\n/** Tier 가 선 Anchor, 적재 방식, Anchor 기준 배치 */\nexport type TierPatch = Partial<Pick<SlotLayoutTier, 'anchorId' | 'mount' | 'position' | 'rotation'>>\n\nexport function updateTier<L extends SlotLayout>(layout: L, tierNo: number, patch: TierPatch): L {\n const next = clone(layout)\n const tier = next.tiers.find(t => t.tierNo === tierNo)\n if (tier) Object.assign(tier, clone(patch))\n return next\n}\n\n// ── 패턴 ───────────────────────────────────────────────────────────────────\n\nconst specOf = (l: SlotPattern): SlotSpec => {\n if (l.pattern === 'CUSTOM') {\n const first = [...l.slots].sort((a, b) => a.slotNo - b.slotNo)[0]\n const { allowed, accepts, stackLimit, rotation } = first ?? { allowed: { width: 1, depth: 1, height: 1 } }\n return clone({ allowed, accepts, stackLimit, rotation })\n }\n return clone(l.slot)\n}\n\n/**\n * 층의 패턴을 바꾼다. 자리 규격은 그대로 두고 자리 수·간격은 지금 배치를 이어받는다.\n * CUSTOM 으로 바꾸면 지금 자리들의 위치·규격을 그대로 적어 둔다.\n */\nexport function setTierPattern<L extends SlotLayout>(layout: L, tierNo: number, pattern: SlotPattern['pattern']): L {\n const next = clone(layout)\n const tier = next.tiers.find(t => t.tierNo === tierNo)\n if (!tier || tier.layout.pattern === pattern) return next\n const cur = tier.layout\n const spec = specOf(cur)\n const count = slotCount(cur)\n\n switch (pattern) {\n case 'SINGLE':\n tier.layout = { pattern, slot: spec }\n break\n case 'ROW':\n tier.layout = {\n pattern,\n count: Math.max(count, 1),\n pitch: cur.pattern === 'ROW' ? cur.pitch : cur.pattern === 'GRID' ? cur.pitch.x : spec.allowed.width,\n axis: 'X',\n origin: 'MIN',\n slot: spec\n }\n break\n case 'GRID':\n tier.layout = {\n pattern,\n rows: cur.pattern === 'GRID' ? cur.rows : 1,\n cols: cur.pattern === 'GRID' ? cur.cols : Math.max(count, 1),\n pitch: { x: cur.pattern === 'ROW' ? cur.pitch : spec.allowed.width, z: spec.allowed.depth },\n order: 'ROW_MAJOR',\n origin: { x: 'MIN', z: 'MIN' },\n slot: spec\n }\n break\n case 'CUSTOM': {\n const slots: PatternSlot[] = []\n for (const n of slotNumbers(cur)) {\n const r = resolveSlot(layout, { tier: tierNo, slot: n })!\n slots.push({\n slotNo: n,\n offset: { ...r.offset },\n allowed: { ...r.allowed },\n ...(r.accepts ? { accepts: [...r.accepts] } : {}),\n ...(r.stackLimit !== 1 ? { stackLimit: r.stackLimit } : {}),\n ...(r.rotation ? { rotation: r.rotation } : {})\n })\n }\n tier.layout = { pattern, slots }\n break\n }\n }\n return next\n}\n\nexport interface PatternPatch {\n count?: number\n pitch?: number | { x: number; z: number }\n axis?: 'X' | 'Z'\n origin?: 'MIN' | 'MAX' | { x: 'MIN' | 'MAX'; z: 'MIN' | 'MAX' }\n rows?: number\n cols?: number\n order?: GridOrder\n}\n\n/** 패턴 값(자리 수·간격·축·번호 규칙)을 고친다. 그 패턴에 없는 키는 무시한다 */\nexport function updatePattern<L extends SlotLayout>(layout: L, tierNo: number, patch: PatternPatch): L {\n const next = clone(layout)\n const tier = next.tiers.find(t => t.tierNo === tierNo)\n if (!tier) return next\n const allowedKeys: Record<string, string[]> = {\n SINGLE: [],\n ROW: ['count', 'pitch', 'axis', 'origin'],\n GRID: ['rows', 'cols', 'pitch', 'order', 'origin'],\n CUSTOM: []\n }\n for (const [k, v] of Object.entries(patch))\n if (allowedKeys[tier.layout.pattern].includes(k)) (tier.layout as unknown as Record<string, unknown>)[k] = clone(v)\n return next\n}\n\nexport type SlotSpecPatch = Partial<SlotSpec> & { offset?: { x: number; z: number }; name?: string }\n\n/** SINGLE·ROW·GRID 의 공통 자리 규격, CUSTOM 이면 slotNo 자리를 고친다. undefined 값은 키를 지운다 */\nexport function updateSlotSpec<L extends SlotLayout>(layout: L, tierNo: number, patch: SlotSpecPatch, slotNo?: number): L {\n const next = clone(layout)\n const tier = next.tiers.find(t => t.tierNo === tierNo)\n if (!tier) return next\n const target = (tier.layout.pattern === 'CUSTOM' ? tier.layout.slots.find(s => s.slotNo === slotNo) : tier.layout.slot) as\n | Record<string, unknown>\n | undefined\n if (!target) return next\n for (const [k, v] of Object.entries(patch)) {\n if (v === undefined) delete target[k]\n else target[k] = clone(v)\n }\n if (tier.layout.pattern !== 'CUSTOM') for (const k of ['offset', 'name']) delete target[k]\n return next\n}\n\n/** CUSTOM 층에 자리를 하나 더한다 (마지막 자리 규격 복사, 번호는 마지막 + 1) */\nexport function addCustomSlot<L extends SlotLayout>(layout: L, tierNo: number): L {\n const next = clone(layout)\n const tier = next.tiers.find(t => t.tierNo === tierNo)\n if (!tier || tier.layout.pattern !== 'CUSTOM') return next\n const last = [...tier.layout.slots].sort((a, b) => a.slotNo - b.slotNo).pop()\n if (last) {\n const { name: _name, ...rest } = clone(last)\n tier.layout.slots.push({ ...rest, slotNo: last.slotNo + 1 })\n } else tier.layout.slots.push({ slotNo: 1, offset: { x: 0, z: 0 }, allowed: { width: 1, depth: 1, height: 1 } })\n return next\n}\n\n/** CUSTOM Tier 의 자리를 지운다. 남은 자리의 번호는 그대로다. 마지막 남은 자리는 지우지 않는다 */\nexport function removeCustomSlot<L extends SlotLayout>(layout: L, tierNo: number, slotNo: number): L {\n const next = clone(layout)\n const tier = next.tiers.find(t => t.tierNo === tierNo)\n if (!tier || tier.layout.pattern !== 'CUSTOM' || tier.layout.slots.length <= 1) return next\n tier.layout.slots = tier.layout.slots.filter(s => s.slotNo !== slotNo)\n return next\n}\n\n// ── 주소 영향 ──────────────────────────────────────────────────────────────\n\n/** 바꾼 값을 적용하면 뜻이 바뀌는 주소: 위치가 바뀌는 자리, 없어지는 자리 (자리 id) */\nexport interface AddressImpact {\n moved: string[]\n gone: string[]\n}\n\nconst sameFrame = (a: ReturnType<typeof slotFrame>, b: ReturnType<typeof slotFrame>) =>\n a.rotation === b.rotation && a.position.x === b.position.x && a.position.y === b.position.y && a.position.z === b.position.z\n\n/**\n * 앞 레이아웃의 주소마다 새 레이아웃에서 같은 주소가 같은 Anchor 의 같은 위치인지 본다. 놓인 Carrier 는 주소로\n * 다시 읽히므로 (빈 자리로 옮겨 채우지 않는다) 여기 나온 주소의 Carrier 는 다른 곳에 그려지거나 예외가 된다.\n * 어느 쪽이든 쓸 수 없는 값이면 빈 결과.\n */\nexport function addressImpact(before: SlotLayout | undefined, after: SlotLayout | undefined): AddressImpact {\n const impact: AddressImpact = { moved: [], gone: [] }\n if (!Array.isArray(before?.tiers) || !Array.isArray(after?.tiers)) return impact\n try {\n for (const address of slotAddresses(before!)) {\n const was = resolveSlot(before!, address)\n const now = resolveSlot(after!, address)\n if (!was) continue\n const id = slotIdOf(address)\n if (!now) impact.gone.push(id)\n else if (was.anchorId !== now.anchorId || !sameFrame(slotFrame(was), slotFrame(now))) impact.moved.push(id)\n }\n } catch {\n return { moved: [], gone: [] }\n }\n return impact\n}\n\n// ── 앵커 면 위의 그림 ──────────────────────────────────────────────────────\n\n/** 앵커 면 위의 자리 하나. 위치·회전은 앵커 기준(화면 위가 -z), 크기는 돌리기 전 허용 폭·깊이 */\nexport interface FaceSlot {\n tier: number\n slotNo: number\n id: string\n name?: string\n x: number\n z: number\n /** 앵커 기준 회전(도). Tier 회전 + 자리 회전 */\n rotation: number\n width: number\n depth: number\n}\n\n/** 한 앵커 위에 선 모든 Tier 의 자리 (앵커 기준). 자리를 만들 수 없는 Tier 는 건너뛴다 */\nexport function anchorFaceSlots(layout: SlotLayout | undefined, anchorId: string): FaceSlot[] {\n const out: FaceSlot[] = []\n for (const tier of layout?.tiers ?? []) {\n if (tier?.anchorId !== anchorId) continue\n let numbers: number[]\n try {\n const count = slotCount(tier.layout)\n if (!Number.isSafeInteger(count) || count <= 0 || count > 10000) continue\n numbers = slotNumbers(tier.layout)\n } catch {\n continue\n }\n const slots: FaceSlot[] = []\n for (const n of numbers) {\n const s = resolveSlot(layout!, { tier: tier.tierNo, slot: n })\n if (!s) continue\n const f = slotFrame(s)\n const one = { tier: tier.tierNo, slotNo: n, id: slotIdOf({ tier: tier.tierNo, slot: n }), ...(s.name ? { name: s.name } : {}), x: f.position.x, z: f.position.z, rotation: f.rotation, width: s.allowed.width, depth: s.allowed.depth }\n if (![one.x, one.z, one.rotation, one.width, one.depth].every(Number.isFinite)) {\n slots.length = 0\n break\n }\n slots.push(one)\n }\n out.push(...slots)\n }\n return out\n}\n\n/**\n * ROW Tier 의 끝 자리를 앵커 면의 한 점으로 끌었을 때의 간격. 자리들은 Tier 원점을 가운데로 늘어서므로 끝 자리 중심은\n * 원점에서 (개수 − 1) ÷ 2 × 간격 떨어져 있다. 자리가 둘보다 적거나 ROW 가 아니면 null\n */\nexport function pitchToPoint(layout: SlotLayout, tierNo: number, point: { x: number; z: number }): number | null {\n const tier = layout.tiers.find(t => t.tierNo === tierNo)\n if (!tier || tier.layout.pattern !== 'ROW' || tier.layout.count < 2) return null\n const first = resolveSlot(layout, { tier: tierNo, slot: 1 })\n const last = resolveSlot(layout, { tier: tierNo, slot: tier.layout.count })\n if (!first || !last) return null\n const a = slotFrame(first).position\n const b = slotFrame(last).position\n const length = Math.hypot(b.x - a.x, b.z - a.z)\n if (!(length > 0)) return null\n const u = { x: (b.x - a.x) / length, z: (b.z - a.z) / length }\n const along = (point.x - tier.position.x) * u.x + (point.z - tier.position.z) * u.z\n return (2 * along) / (tier.layout.count - 1)\n}\n\n/** 면에 맞출 수 없는 까닭 */\nexport type FitToFaceReason = 'FACE_UNKNOWN' | 'PATTERN_UNSUPPORTED' | 'ROTATION_UNSUPPORTED' | 'SLOT_WIDER_THAN_FACE' | 'SLOTS_DO_NOT_FIT'\n\nconst round = (v: number) => Math.round(v * 10) / 10\n\n/**\n * 면에 맞춤: Tier 를 면 가운데에 두고, 같은 폭의 자리들을 면 끝에서 끝까지 고르게 놓는 간격을 한 번 계산해 숫자로 적는다.\n * 면 폭 W, 자리 폭 w(자리 회전을 반영한 외접 폭), 개수 n 이면 간격 = (W − w) ÷ (n − 1). 자리 하나면 가운데에만 둔다.\n * GRID 는 X(열)·Z(행)에 각각 같은 식을 쓴다. 크기가 바뀌어도 따라가는 규칙이 아니다(ADR-0051 4.1: 크기에 따른 간격은 미결).\n * Tier·자리 회전이 90° 단위가 아니거나 CUSTOM 이면 맞추지 않는다. 자리가 면에 다 들어가지 않으면 까닭을 돌려준다.\n */\nexport function fitTierToFace<L extends SlotLayout>(\n layout: L,\n tierNo: number,\n face: { width: number; depth: number } | undefined\n): { layout: L } | { reason: FitToFaceReason } {\n const tier = layout.tiers.find(t => t.tierNo === tierNo)\n if (!tier) return { reason: 'PATTERN_UNSUPPORTED' }\n if (!face || !(face.width > 0) || !(face.depth > 0)) return { reason: 'FACE_UNKNOWN' }\n const l = tier.layout\n if (l.pattern === 'CUSTOM') return { reason: 'PATTERN_UNSUPPORTED' }\n const quarter = (v: number) => (((v % 360) + 360) % 360) / 90\n const tierQuarter = quarter(tier.rotation ?? 0)\n if (!Number.isInteger(tierQuarter) || !Number.isInteger(quarter(l.slot.rotation ?? 0))) return { reason: 'ROTATION_UNSUPPORTED' }\n const turned = tierQuarter % 2 === 1\n // 면의 크기를 Tier 축으로: Tier 가 90° 돌면 Tier X 가 앵커 Z 를 따라간다\n const span = { x: turned ? face.depth : face.width, z: turned ? face.width : face.depth }\n const fp = rotatedFootprint(l.slot.allowed, l.slot.rotation ?? 0)\n const pitchFor = (room: number, width: number, n: number): number | FitToFaceReason => {\n if (width > room) return 'SLOT_WIDER_THAN_FACE'\n if (n <= 1) return NaN\n const pitch = (room - width) / (n - 1)\n return pitch < width ? 'SLOTS_DO_NOT_FIT' : round(pitch)\n }\n const next = clone(layout)\n const t = next.tiers.find(x => x.tierNo === tierNo)!\n t.position = { ...t.position, x: 0, z: 0 }\n const nl = t.layout\n if (nl.pattern === 'SINGLE') {\n if (fp.width > span.x || fp.depth > span.z) return { reason: 'SLOT_WIDER_THAN_FACE' }\n } else if (nl.pattern === 'ROW') {\n const alongX = nl.axis === 'X'\n const cross = alongX ? fp.depth > span.z : fp.width > span.x\n if (cross) return { reason: 'SLOT_WIDER_THAN_FACE' }\n const pitch = pitchFor(alongX ? span.x : span.z, alongX ? fp.width : fp.depth, nl.count)\n if (typeof pitch === 'string') return { reason: pitch }\n if (!Number.isNaN(pitch)) nl.pitch = pitch\n } else if (nl.pattern === 'GRID') {\n const px = pitchFor(span.x, fp.width, nl.cols)\n const pz = pitchFor(span.z, fp.depth, nl.rows)\n if (typeof px === 'string') return { reason: px }\n if (typeof pz === 'string') return { reason: pz }\n nl.pitch = { x: Number.isNaN(px) ? nl.pitch.x : px, z: Number.isNaN(pz) ? nl.pitch.z : pz }\n }\n return { layout: next }\n}\n\n// ── 실린 아이템 ────────────────────────────────────────────────────────────\n\n/** 호스트가 주는 실린 아이템 (읽기 전용). type 은 판정용 아이템 타입(표에 없으면 null), code 는 데이터가 준 값 */\nexport interface HeldItem {\n id: string\n slot?: string\n code?: string\n type?: string | null\n dims?: ItemDims | null\n}\n\n/** 편집 중인 레이아웃에서 실린 아이템이 어떻게 되는지. 판정만 하고 아이템을 옮기거나 지우지 않는다 */\nexport interface HeldItemStatus {\n item: HeldItem\n /** 그 자리가 이 레이아웃에 있는가. 없으면 미배치로 남는다 */\n placed: boolean\n /** 아이템 타입 표에 없는 코드 */\n unregistered: boolean\n verdict: FitVerdict\n reasons: FitReason[]\n}\n\n/** 같은 자리의 앞 아이템을 깔고 공통 판정(judgeItemFit)으로 본다. 모양을 자리에 맞춰 그리는 것은 판정이 아니다 */\nexport function heldItemStatuses(layout: SlotLayout | undefined, items: readonly HeldItem[] = []): HeldItemStatus[] {\n const below = new Map<string, HeldItem[]>()\n return items.map(item => {\n const address = addressOfSlotId(item.slot)\n let slot = null\n try {\n slot = address && layout ? resolveSlot(layout, address) : null\n } catch {\n slot = null\n }\n const occupants = below.get(item.slot ?? '') ?? []\n const fit = judgeItemFit(\n slot,\n { type: item.type ?? undefined, dims: item.dims ?? null },\n occupants.map(o => ({ type: o.type ?? undefined, dims: o.dims ?? null }))\n )\n below.set(item.slot ?? '', [...occupants, item])\n return { item, placed: !!slot, unregistered: item.type === null && !!item.code, verdict: fit.verdict, reasons: fit.reasons }\n })\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,4BAA4B,CAAA;AAC1C,cAAc,qCAAqC,CAAA;AAEnD,wDAAwD;AACxD,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,gCAAgC,EAAE,CAAC,CAAA","sourcesContent":["export * from './draft.js'\nexport * from './issue-text.js'\nexport * from './ox-slot-layout-editor.js'\nexport * from './ox-property-editor-slot-layout.js'\n\n/** 속성 편집기 등록용. things-scene.config 의 editors 목록에 넣는다 */\nexport const SLOT_LAYOUT_EDITORS = [{ type: 'slot-layout', element: 'ox-property-editor-slot-layout' }]\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"issue-text.js","sourceRoot":"","sources":["../../src/issue-text.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAUvC,oEAAoE;AACpE,MAAM,CAAC,MAAM,UAAU,GAAoC;IACzD,cAAc,EAAE,+BAA+B;IAC/C,aAAa,EAAE,wBAAwB;IACvC,eAAe,EAAE,eAAe;IAChC,cAAc,EAAE,oCAAoC;IACpD,qBAAqB,EAAE,6BAA6B;IACpD,sBAAsB,EAAE,sBAAsB;IAC9C,wBAAwB,EAAE,qCAAqC;IAC/D,yBAAyB,EAAE,yCAAyC;IACpE,cAAc,EAAE,oBAAoB;IACpC,eAAe,EAAE,2BAA2B;IAC5C,YAAY,EAAE,gBAAgB;IAC9B,eAAe,EAAE,kCAAkC;IACnD,cAAc,EAAE,+BAA+B;IAC/C,qBAAqB,EAAE,6BAA6B;IACpD,eAAe,EAAE,2BAA2B;IAC5C,aAAa,EAAE,yEAAyE;CACzF,CAAA;AAED,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,GAAW,EAAE,QAAgB,EAAE,OAAgC,EAAE,EAAE,EAAE,CACrF,OAAO,CAAC,CAAC,CAAC,qBAAqB,GAAG,EAAE,EAAE,EAAE,YAAY,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,CAAC,CAAA;AAE5E,0DAA0D;AAC1D,MAAM,CAAC,MAAM,UAAU,GAAkC;IACvD,YAAY,EAAE,oE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AAS,EAAE,CAAA;AACnF,CAAC;AAED,4DAA4D;AAC5D,MAAM,CAAC,MAAM,QAAQ,GAA2B;IAC9C,cAAc,EAAE,2BAA2B;IAC3C,iBAAiB,EAAE,qBAAqB;IACxC,cAAc,EAAE,qBAAqB;IACrC,cAAc,EAAE,sBAAsB;IACtC,eAAe,EAAE,sBAAsB;IACvC,oBAAoB,EAAE,sBAAsB;IAC5C,YAAY,EAAE,0BAA0B;CACzC,CAAA;AAED,MAAM,UAAU,OAAO,CAAC,MAAc;;IACpC,OAAO,CAAC,CAAC,OAAO,MAAM,EAAE,EAAE,MAAA,QAAQ,CAAC,MAAM,CAAC,mCAAI,MAAM,CAAC,CAAA;AACvD,CAAC;AAED,kEAAkE;AAClE,MAAM,CAAC,MAAM,aAAa,GAA2B;IACnD,YAAY,EAAE,4BAA4B;IAC1C,mBAAmB,EAAE,sBAAsB;IAC3C,oBAAoB,EAAE,uBAAuB;IAC7C,oBAAoB,EAAE,gCAAgC;IACtD,gBAAgB,EAAE,kCAAkC;CACrD,CAAA;AAED,MAAM,UAAU,WAAW,CAAC,MAAc;;IACxC,OAAO,CAAC,CAAC,YAAY,MAAM,EAAE,EAAE,MAAA,aAAa,CAAC,MAAM,CAAC,mCAAI,MAAM,CAAC,CAAA;AACjE,CAAC","sourcesContent":["/**\n * @license Copyright © HatioLab Inc. All rights reserved.\n *\n * 검증 문제(코드·경로·매개변수)를 화면 문구로. 번역 키는 label.slot-layout.issue.{코드} 이고,\n * 번역이 없으면 아래 영어 기본 문구를 쓴다. 호스트 고유 코드는 호스트가 번역을 넣거나 issueText 옵션으로 바꾼다.\n */\n\nimport { i18next } from '@operato/i18n'\nimport type { LayoutIssueCode, SlotSpaceCode } from '@hatiolab/things-scene'\n\n/** 문제 하나. 호스트 고유 코드도 같은 모양으로 온다 */\nexport interface EditorIssue {\n code: string\n path: string\n params?: Record<string, string | number>\n}\n\n/** things-scene 검증 코드의 기본 문구. 자리표시자가 중괄호 하나라서 문구에 중괄호 글자를 쓰지 않는다 */\nexport const ISSUE_TEXT: Record<LayoutIssueCode, string> = {\n TIERS_REQUIRED: 'At least one tier is required',\n MOUNT_INVALID: 'Must be on, in or hang',\n ANCHOR_REQUIRED: 'Choose a face',\n ANCHOR_UNKNOWN: 'This holder has no face {anchorId}',\n TIER_NUMBER_DUPLICATE: 'Tier {tierNo} is used twice',\n FINITE_NUMBER_REQUIRED: 'A number is required',\n POSITIVE_NUMBER_REQUIRED: 'A number greater than 0 is required',\n POSITIVE_INTEGER_REQUIRED: 'A whole number of 1 or more is required',\n ARRAY_REQUIRED: 'A list is required',\n OBJECT_REQUIRED: 'The value is not a layout',\n AXIS_INVALID: 'Must be X or Z',\n PATTERN_INVALID: 'Must be one, row, grid or listed',\n SLOTS_REQUIRED: 'At least one slot is required',\n SLOT_NUMBER_DUPLICATE: 'Slot {slotNo} is used twice',\n NOT_PERSISTABLE: 'Cannot be saved ({value})',\n ACCEPTS_EMPTY: 'The list of types it takes is empty; choose 「Any type」 to take any item'\n}\n\nexport const t = (key: string, fallback: string, opts: Record<string, unknown> = {}) =>\n i18next.t(`label.slot-layout.${key}`, { defaultValue: fallback, ...opts })\n\n/** 자리 공간 경고의 기본 문구. 번역 키는 label.slot-layout.space.{코드} */\nexport const SPACE_TEXT: Record<SlotSpaceCode, string> = {\n SLOT_OVERLAP: 'Tier {tier} slot {slot} overlaps tier {otherTier} slot {otherSlot}',\n SLOT_OUTSIDE_ANCHOR: 'Tier {tier} slot {slot} reaches past its face',\n ANCHOR_SPACE_UNKNOWN: 'Face {anchorId} has no size: whether slots stay on it is not checked'\n}\n\nexport function spaceWarningText(warning: EditorIssue): string {\n const fallback = (SPACE_TEXT as Record<string, string>)[warning.code] ?? warning.code\n return t(`space.${warning.code}`, fallback, { ...warning.params, interpolation: { escapeValue: false } })\n}\n\n/** Slot numbers as few words: runs of numbers as 1~8, the rest one by one. */\nexport function slotsWords(slots: readonly (string | number)[]): string {\n const numbers = slots.map(Number)\n if (!numbers.every(Number.isInteger)) return slots.join(', ')\n const sorted = [...new Set(numbers)].sort((a, b) => a - b)\n const runs: string[] = []\n for (let i = 0; i < sorted.length; ) {\n let j = i\n while (j + 1 < sorted.length && sorted[j + 1] === sorted[j]! + 1) j++\n runs.push(j - i >= 2 ? `${sorted[i]}~${sorted[j]}` : sorted.slice(i, j + 1).join(', '))\n i = j + 1\n }\n return runs.join(', ')\n}\n\n/**\n * The space warnings to show: the slots of one tier that reach past their face said in one line. Eight slots past a\n * face were eight red lines that said the same (figure modeller sweep 2026-10-27 M3).\n */\nexport function spaceWarningLines(warnings: readonly EditorIssue[]): string[] {\n const outside = new Map<string, (string | number)[]>()\n const lines: (string | { tier: string })[] = []\n for (const w of warnings) {\n if (w.code !== 'SLOT_OUTSIDE_ANCHOR') {\n lines.push(spaceWarningText(w))\n continue\n }\n const tier = String(w.params?.tier ?? '')\n if (!outside.has(tier)) {\n outside.set(tier, [])\n lines.push({ tier })\n }\n outside.get(tier)!.push(w.params?.slot ?? '')\n }\n return lines.map(line => {\n if (typeof line === 'string') return line\n const slots = outside.get(line.tier)!\n if (slots.length === 1) return spaceWarningText({ code: 'SLOT_OUTSIDE_ANCHOR', path: '', params: { tier: line.tier, slot: slots[0]! } })\n return t('space.SLOT_OUTSIDE_ANCHOR_MANY', 'Tier {tier} slots {slots} reach past their face', { tier: line.tier, slots: slotsWords(slots), interpolation: { escapeValue: false } })\n })\n}\n\n/** 문제 하나를 화면 문구로. 앞에 값의 위치를 붙인다 */\nexport function issueText(issue: EditorIssue): string {\n const fallback = (ISSUE_TEXT as Record<string, string>)[issue.code] ?? issue.code\n const text = t(`issue.${issue.code}`, fallback, { ...issue.params, interpolation: { escapeValue: false } })\n return issue.path ? `${issue.path}: ${text}` : text\n}\n\n/** 문제 하나를 화면 문구로, 위치 없이. 칸 옆에 보일 때 쓴다 */\nexport function issueMessage(issue: EditorIssue): string {\n const fallback = (ISSUE_TEXT as Record<string, string>)[issue.code] ?? issue.code\n return t(`issue.${issue.code}`, fallback, { ...issue.params, interpolation: { escapeValue: false } })\n}\n\n/** Tier 안의 경로 → 편집기 칸(data-field). 칸이 없는 경로(CUSTOM 자리 표 등)는 목록에 보인다 */\nconst FIELD_OF_PATH: Record<string, string> = {\n anchorId: 'anchor',\n mount: 'mount',\n position: 'position-x',\n 'position.x': 'position-x',\n 'position.y': 'position-y',\n 'position.z': 'position-z',\n rotation: 'tier-rotation',\n layout: 'pattern',\n 'layout.pattern': 'pattern',\n 'layout.count': 'count',\n 'layout.pitch': 'pitch',\n 'layout.pitch.x': 'pitch-x',\n 'layout.pitch.z': 'pitch-z',\n 'layout.axis': 'axis',\n 'layout.origin': 'origin',\n 'layout.origin.x': 'origin-x',\n 'layout.origin.z': 'origin-z',\n 'layout.rows': 'rows',\n 'layout.cols': 'cols',\n 'layout.order': 'order',\n 'layout.slot': 'allowed-width',\n 'layout.slot.allowed': 'allowed-width',\n 'layout.slot.allowed.width': 'allowed-width',\n 'layout.slot.allowed.depth': 'allowed-depth',\n 'layout.slot.allowed.height': 'allowed-height',\n 'layout.slot.stackLimit': 'stack-limit',\n 'layout.slot.rotation': 'rotation',\n 'layout.slot.accepts': 'accepts'\n}\n\n/** 문제가 어느 Tier(목록 순서)의 어느 칸인지. Tier 밖이거나 칸이 없으면 field 없음 */\nexport function issueField(issue: EditorIssue): { tierIndex?: number; field?: string } {\n const m = /^tiers\\[(\\d+)\\](?:\\.(.+))?$/.exec(issue.path ?? '')\n if (!m) return {}\n return { tierIndex: Number(m[1]), field: m[2] ? FIELD_OF_PATH[m[2]] : undefined }\n}\n\n/** 실린 아이템 판정 까닭의 기본 문구. 번역 키는 label.slot-layout.fit.{까닭} */\nexport const FIT_TEXT: Record<string, string> = {\n SLOT_NOT_FOUND: 'Slot gone: kept, unplaced',\n TYPE_NOT_ACCEPTED: 'Type not taken here',\n WIDTH_EXCEEDED: 'Wider than the slot',\n DEPTH_EXCEEDED: 'Deeper than the slot',\n HEIGHT_EXCEEDED: 'Taller than the slot',\n STACK_LIMIT_EXCEEDED: 'Over the stack limit',\n SPEC_UNKNOWN: 'Size unknown: not judged'\n}\n\nexport function fitText(reason: string): string {\n return t(`fit.${reason}`, FIT_TEXT[reason] ?? reason)\n}\n\n/** 면에 맞출 수 없는 까닭의 기본 문구. 번역 키는 label.slot-layout.fit-face.{까닭} */\nexport const FIT_FACE_TEXT: Record<string, string> = {\n FACE_UNKNOWN: 'The face size is not known',\n PATTERN_UNSUPPORTED: 'Not for listed slots',\n ROTATION_UNSUPPORTED: 'Only for turns of 90°',\n SLOT_WIDER_THAN_FACE: 'A slot is larger than the face',\n SLOTS_DO_NOT_FIT: 'The slots do not fit on the face'\n}\n\nexport function fitFaceText(reason: string): string {\n return t(`fit-face.${reason}`, FIT_FACE_TEXT[reason] ?? reason)\n}\n"]}