@johnoscott/isometric-engine 0.10.1 → 0.12.6
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/EDITOR-GUIDE.md +12 -1
- package/README.md +1 -1
- package/assets/app.css +37 -0
- package/assets/icons.svg +1 -1
- package/iso-editor.js +182 -182
- package/iso-render.js +105 -105
- package/iso-systems.js +108 -108
- package/js/iso-editor/commands.js +7 -0
- package/js/iso-editor/connections.js +24 -0
- package/js/iso-editor/doc.js +4 -0
- package/js/iso-editor/model.js +17 -3
- package/js/iso-editor/ui/actions.js +22 -24
- package/js/iso-editor/ui/canvas.js +277 -20
- package/js/iso-editor/ui/mount.js +2 -1
- package/js/iso-editor/ui/plain-icons.js +2 -0
- package/js/iso-editor/ui/props.js +2 -2
- package/js/iso-editor/ui/rename.js +114 -0
- package/js/iso-editor/ui/setup.js +3 -1
- package/js/iso-objects/board.js +6 -1
- package/js/iso-objects/scene.js +3 -2
- package/js/iso-viewer/index.js +4 -1
- package/js/iso-viewer/viewport.js +17 -5
- package/package.json +92 -92
- package/src/iso-core/compile-schema.ts +3 -1
- package/src/iso-editor/commands.ts +9 -0
- package/src/iso-editor/connections.ts +28 -0
- package/src/iso-editor/doc.ts +6 -0
- package/src/iso-editor/model.ts +17 -3
- package/src/iso-editor/ui/actions.ts +20 -23
- package/src/iso-editor/ui/app.css +37 -0
- package/src/iso-editor/ui/canvas.ts +214 -25
- package/src/iso-editor/ui/mount.ts +4 -3
- package/src/iso-editor/ui/plain-icons.ts +2 -0
- package/src/iso-editor/ui/props.ts +3 -3
- package/src/iso-editor/ui/rename.ts +105 -0
- package/src/iso-editor/ui/setup.ts +9 -2
- package/src/iso-objects/board.ts +6 -2
- package/src/iso-objects/scene.ts +4 -2
- package/src/iso-viewer/index.ts +2 -2
- package/src/iso-viewer/morph.ts +5 -2
- package/src/iso-viewer/viewport.ts +25 -5
- package/types/iso-core/compile-schema.d.ts +2 -2
- package/types/iso-editor/connections.d.ts +8 -0
- package/types/iso-editor/model.d.ts +8 -2
- package/types/iso-editor/ui/actions.d.ts +5 -2
- package/types/iso-editor/ui/canvas.d.ts +18 -1
- package/types/iso-editor/ui/monaco-entry.d.ts +2 -0
- package/types/iso-editor/ui/mount.d.ts +6 -2
- package/types/iso-editor/ui/props.d.ts +1 -1
- package/types/iso-editor/ui/rename.d.ts +43 -0
- package/types/iso-editor/ui/setup.d.ts +6 -0
- package/types/iso-systems/validate.d.ts +4 -0
- package/types/iso-viewer/bundle.d.ts +1 -0
- package/types/iso-viewer/index.d.ts +2 -2
- package/types/iso-viewer/morph.d.ts +6 -3
- package/types/iso-viewer/viewport.d.ts +13 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@johnoscott/isometric-engine",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.6",
|
|
4
4
|
"description": "A generic isometric diagram engine: render (L0–L2) and editor (L0–L3), with a 2D view and a YAML diagram format.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -50,460 +50,460 @@
|
|
|
50
50
|
"default": "./iso-systems.js"
|
|
51
51
|
},
|
|
52
52
|
"./modules/iso-core/compile-schema": {
|
|
53
|
-
"types": "./
|
|
53
|
+
"types": "./types/iso-core/compile-schema.d.ts",
|
|
54
54
|
"source": "./src/iso-core/compile-schema.ts",
|
|
55
55
|
"default": "./js/iso-core/compile-schema.js"
|
|
56
56
|
},
|
|
57
57
|
"./modules/iso-core/depth": {
|
|
58
|
-
"types": "./
|
|
58
|
+
"types": "./types/iso-core/depth.d.ts",
|
|
59
59
|
"source": "./src/iso-core/depth.ts",
|
|
60
60
|
"default": "./js/iso-core/depth.js"
|
|
61
61
|
},
|
|
62
62
|
"./modules/iso-core/errors": {
|
|
63
|
-
"types": "./
|
|
63
|
+
"types": "./types/iso-core/errors.d.ts",
|
|
64
64
|
"source": "./src/iso-core/errors.ts",
|
|
65
65
|
"default": "./js/iso-core/errors.js"
|
|
66
66
|
},
|
|
67
67
|
"./modules/iso-core/glyphs": {
|
|
68
|
-
"types": "./
|
|
68
|
+
"types": "./types/iso-core/glyphs.d.ts",
|
|
69
69
|
"source": "./src/iso-core/glyphs.ts",
|
|
70
70
|
"default": "./js/iso-core/glyphs.js"
|
|
71
71
|
},
|
|
72
72
|
"./modules/iso-core/index": {
|
|
73
|
-
"types": "./
|
|
73
|
+
"types": "./types/iso-core/index.d.ts",
|
|
74
74
|
"source": "./src/iso-core/index.ts",
|
|
75
75
|
"default": "./js/iso-core/index.js"
|
|
76
76
|
},
|
|
77
77
|
"./modules/iso-core/kernel": {
|
|
78
|
-
"types": "./
|
|
78
|
+
"types": "./types/iso-core/kernel.d.ts",
|
|
79
79
|
"source": "./src/iso-core/kernel.ts",
|
|
80
80
|
"default": "./js/iso-core/kernel.js"
|
|
81
81
|
},
|
|
82
82
|
"./modules/iso-core/parse": {
|
|
83
|
-
"types": "./
|
|
83
|
+
"types": "./types/iso-core/parse.d.ts",
|
|
84
84
|
"source": "./src/iso-core/parse.ts",
|
|
85
85
|
"default": "./js/iso-core/parse.js"
|
|
86
86
|
},
|
|
87
87
|
"./modules/iso-core/schema-errors": {
|
|
88
|
-
"types": "./
|
|
88
|
+
"types": "./types/iso-core/schema-errors.d.ts",
|
|
89
89
|
"source": "./src/iso-core/schema-errors.ts",
|
|
90
90
|
"default": "./js/iso-core/schema-errors.js"
|
|
91
91
|
},
|
|
92
92
|
"./modules/iso-core/shims/crypto": {
|
|
93
|
-
"types": "./
|
|
93
|
+
"types": "./types/iso-core/shims/crypto.d.ts",
|
|
94
94
|
"source": "./src/iso-core/shims/crypto.ts",
|
|
95
95
|
"default": "./js/iso-core/shims/crypto.js"
|
|
96
96
|
},
|
|
97
97
|
"./modules/iso-core/svg-dom": {
|
|
98
|
-
"types": "./
|
|
98
|
+
"types": "./types/iso-core/svg-dom.d.ts",
|
|
99
99
|
"source": "./src/iso-core/svg-dom.ts",
|
|
100
100
|
"default": "./js/iso-core/svg-dom.js"
|
|
101
101
|
},
|
|
102
102
|
"./modules/iso-core/theme": {
|
|
103
|
-
"types": "./
|
|
103
|
+
"types": "./types/iso-core/theme.d.ts",
|
|
104
104
|
"source": "./src/iso-core/theme.ts",
|
|
105
105
|
"default": "./js/iso-core/theme.js"
|
|
106
106
|
},
|
|
107
107
|
"./modules/iso-core/vdom": {
|
|
108
|
-
"types": "./
|
|
108
|
+
"types": "./types/iso-core/vdom.d.ts",
|
|
109
109
|
"source": "./src/iso-core/vdom.ts",
|
|
110
110
|
"default": "./js/iso-core/vdom.js"
|
|
111
111
|
},
|
|
112
112
|
"./modules/iso-objects/assemble": {
|
|
113
|
-
"types": "./
|
|
113
|
+
"types": "./types/iso-objects/assemble.d.ts",
|
|
114
114
|
"source": "./src/iso-objects/assemble.ts",
|
|
115
115
|
"default": "./js/iso-objects/assemble.js"
|
|
116
116
|
},
|
|
117
117
|
"./modules/iso-objects/assets": {
|
|
118
|
-
"types": "./
|
|
118
|
+
"types": "./types/iso-objects/assets.d.ts",
|
|
119
119
|
"source": "./src/iso-objects/assets.ts",
|
|
120
120
|
"default": "./js/iso-objects/assets.js"
|
|
121
121
|
},
|
|
122
122
|
"./modules/iso-objects/board": {
|
|
123
|
-
"types": "./
|
|
123
|
+
"types": "./types/iso-objects/board.d.ts",
|
|
124
124
|
"source": "./src/iso-objects/board.ts",
|
|
125
125
|
"default": "./js/iso-objects/board.js"
|
|
126
126
|
},
|
|
127
127
|
"./modules/iso-objects/compile": {
|
|
128
|
-
"types": "./
|
|
128
|
+
"types": "./types/iso-objects/compile.d.ts",
|
|
129
129
|
"source": "./src/iso-objects/compile.ts",
|
|
130
130
|
"default": "./js/iso-objects/compile.js"
|
|
131
131
|
},
|
|
132
132
|
"./modules/iso-objects/css": {
|
|
133
|
-
"types": "./
|
|
133
|
+
"types": "./types/iso-objects/css.d.ts",
|
|
134
134
|
"source": "./src/iso-objects/css.ts",
|
|
135
135
|
"default": "./js/iso-objects/css.js"
|
|
136
136
|
},
|
|
137
137
|
"./modules/iso-objects/flat": {
|
|
138
|
-
"types": "./
|
|
138
|
+
"types": "./types/iso-objects/flat.d.ts",
|
|
139
139
|
"source": "./src/iso-objects/flat.ts",
|
|
140
140
|
"default": "./js/iso-objects/flat.js"
|
|
141
141
|
},
|
|
142
142
|
"./modules/iso-objects/focus": {
|
|
143
|
-
"types": "./
|
|
143
|
+
"types": "./types/iso-objects/focus.d.ts",
|
|
144
144
|
"source": "./src/iso-objects/focus.ts",
|
|
145
145
|
"default": "./js/iso-objects/focus.js"
|
|
146
146
|
},
|
|
147
147
|
"./modules/iso-objects/geometry": {
|
|
148
|
-
"types": "./
|
|
148
|
+
"types": "./types/iso-objects/geometry.d.ts",
|
|
149
149
|
"source": "./src/iso-objects/geometry.ts",
|
|
150
150
|
"default": "./js/iso-objects/geometry.js"
|
|
151
151
|
},
|
|
152
152
|
"./modules/iso-objects/index": {
|
|
153
|
-
"types": "./
|
|
153
|
+
"types": "./types/iso-objects/index.d.ts",
|
|
154
154
|
"source": "./src/iso-objects/index.ts",
|
|
155
155
|
"default": "./js/iso-objects/index.js"
|
|
156
156
|
},
|
|
157
157
|
"./modules/iso-objects/kinds": {
|
|
158
|
-
"types": "./
|
|
158
|
+
"types": "./types/iso-objects/kinds.d.ts",
|
|
159
159
|
"source": "./src/iso-objects/kinds.ts",
|
|
160
160
|
"default": "./js/iso-objects/kinds.js"
|
|
161
161
|
},
|
|
162
162
|
"./modules/iso-objects/labels": {
|
|
163
|
-
"types": "./
|
|
163
|
+
"types": "./types/iso-objects/labels.d.ts",
|
|
164
164
|
"source": "./src/iso-objects/labels.ts",
|
|
165
165
|
"default": "./js/iso-objects/labels.js"
|
|
166
166
|
},
|
|
167
167
|
"./modules/iso-objects/place": {
|
|
168
|
-
"types": "./
|
|
168
|
+
"types": "./types/iso-objects/place.d.ts",
|
|
169
169
|
"source": "./src/iso-objects/place.ts",
|
|
170
170
|
"default": "./js/iso-objects/place.js"
|
|
171
171
|
},
|
|
172
172
|
"./modules/iso-objects/route": {
|
|
173
|
-
"types": "./
|
|
173
|
+
"types": "./types/iso-objects/route.d.ts",
|
|
174
174
|
"source": "./src/iso-objects/route.ts",
|
|
175
175
|
"default": "./js/iso-objects/route.js"
|
|
176
176
|
},
|
|
177
177
|
"./modules/iso-objects/scene": {
|
|
178
|
-
"types": "./
|
|
178
|
+
"types": "./types/iso-objects/scene.d.ts",
|
|
179
179
|
"source": "./src/iso-objects/scene.ts",
|
|
180
180
|
"default": "./js/iso-objects/scene.js"
|
|
181
181
|
},
|
|
182
182
|
"./modules/iso-objects/steps": {
|
|
183
|
-
"types": "./
|
|
183
|
+
"types": "./types/iso-objects/steps.d.ts",
|
|
184
184
|
"source": "./src/iso-objects/steps.ts",
|
|
185
185
|
"default": "./js/iso-objects/steps.js"
|
|
186
186
|
},
|
|
187
187
|
"./modules/iso-objects/types": {
|
|
188
|
-
"types": "./
|
|
188
|
+
"types": "./types/iso-objects/types.d.ts",
|
|
189
189
|
"source": "./src/iso-objects/types.ts",
|
|
190
190
|
"default": "./js/iso-objects/types.js"
|
|
191
191
|
},
|
|
192
192
|
"./modules/iso-viewer/bundle": {
|
|
193
|
-
"types": "./
|
|
193
|
+
"types": "./types/iso-viewer/bundle.d.ts",
|
|
194
194
|
"source": "./src/iso-viewer/bundle.ts",
|
|
195
195
|
"default": "./js/iso-viewer/bundle.js"
|
|
196
196
|
},
|
|
197
197
|
"./modules/iso-viewer/card-motion": {
|
|
198
|
-
"types": "./
|
|
198
|
+
"types": "./types/iso-viewer/card-motion.d.ts",
|
|
199
199
|
"source": "./src/iso-viewer/card-motion.ts",
|
|
200
200
|
"default": "./js/iso-viewer/card-motion.js"
|
|
201
201
|
},
|
|
202
202
|
"./modules/iso-viewer/dom": {
|
|
203
|
-
"types": "./
|
|
203
|
+
"types": "./types/iso-viewer/dom.d.ts",
|
|
204
204
|
"source": "./src/iso-viewer/dom.ts",
|
|
205
205
|
"default": "./js/iso-viewer/dom.js"
|
|
206
206
|
},
|
|
207
207
|
"./modules/iso-viewer/dual-view": {
|
|
208
|
-
"types": "./
|
|
208
|
+
"types": "./types/iso-viewer/dual-view.d.ts",
|
|
209
209
|
"source": "./src/iso-viewer/dual-view.ts",
|
|
210
210
|
"default": "./js/iso-viewer/dual-view.js"
|
|
211
211
|
},
|
|
212
212
|
"./modules/iso-viewer/flat-view": {
|
|
213
|
-
"types": "./
|
|
213
|
+
"types": "./types/iso-viewer/flat-view.d.ts",
|
|
214
214
|
"source": "./src/iso-viewer/flat-view.ts",
|
|
215
215
|
"default": "./js/iso-viewer/flat-view.js"
|
|
216
216
|
},
|
|
217
217
|
"./modules/iso-viewer/history": {
|
|
218
|
-
"types": "./
|
|
218
|
+
"types": "./types/iso-viewer/history.d.ts",
|
|
219
219
|
"source": "./src/iso-viewer/history.ts",
|
|
220
220
|
"default": "./js/iso-viewer/history.js"
|
|
221
221
|
},
|
|
222
222
|
"./modules/iso-viewer/index": {
|
|
223
|
-
"types": "./
|
|
223
|
+
"types": "./types/iso-viewer/index.d.ts",
|
|
224
224
|
"source": "./src/iso-viewer/index.ts",
|
|
225
225
|
"default": "./js/iso-viewer/index.js"
|
|
226
226
|
},
|
|
227
227
|
"./modules/iso-viewer/morph": {
|
|
228
|
-
"types": "./
|
|
228
|
+
"types": "./types/iso-viewer/morph.d.ts",
|
|
229
229
|
"source": "./src/iso-viewer/morph.ts",
|
|
230
230
|
"default": "./js/iso-viewer/morph.js"
|
|
231
231
|
},
|
|
232
232
|
"./modules/iso-viewer/overlay": {
|
|
233
|
-
"types": "./
|
|
233
|
+
"types": "./types/iso-viewer/overlay.d.ts",
|
|
234
234
|
"source": "./src/iso-viewer/overlay.ts",
|
|
235
235
|
"default": "./js/iso-viewer/overlay.js"
|
|
236
236
|
},
|
|
237
237
|
"./modules/iso-viewer/page": {
|
|
238
|
-
"types": "./
|
|
238
|
+
"types": "./types/iso-viewer/page.d.ts",
|
|
239
239
|
"source": "./src/iso-viewer/page.ts",
|
|
240
240
|
"default": "./js/iso-viewer/page.js"
|
|
241
241
|
},
|
|
242
242
|
"./modules/iso-viewer/still": {
|
|
243
|
-
"types": "./
|
|
243
|
+
"types": "./types/iso-viewer/still.d.ts",
|
|
244
244
|
"source": "./src/iso-viewer/still.ts",
|
|
245
245
|
"default": "./js/iso-viewer/still.js"
|
|
246
246
|
},
|
|
247
247
|
"./modules/iso-viewer/timeline-contract": {
|
|
248
|
-
"types": "./
|
|
248
|
+
"types": "./types/iso-viewer/timeline-contract.d.ts",
|
|
249
249
|
"source": "./src/iso-viewer/timeline-contract.ts",
|
|
250
250
|
"default": "./js/iso-viewer/timeline-contract.js"
|
|
251
251
|
},
|
|
252
252
|
"./modules/iso-viewer/timeline-engine": {
|
|
253
|
-
"types": "./
|
|
253
|
+
"types": "./types/iso-viewer/timeline-engine.d.ts",
|
|
254
254
|
"source": "./src/iso-viewer/timeline-engine.ts",
|
|
255
255
|
"default": "./js/iso-viewer/timeline-engine.js"
|
|
256
256
|
},
|
|
257
257
|
"./modules/iso-viewer/timeline-export": {
|
|
258
|
-
"types": "./
|
|
258
|
+
"types": "./types/iso-viewer/timeline-export.d.ts",
|
|
259
259
|
"source": "./src/iso-viewer/timeline-export.ts",
|
|
260
260
|
"default": "./js/iso-viewer/timeline-export.js"
|
|
261
261
|
},
|
|
262
262
|
"./modules/iso-viewer/timeline-scale": {
|
|
263
|
-
"types": "./
|
|
263
|
+
"types": "./types/iso-viewer/timeline-scale.d.ts",
|
|
264
264
|
"source": "./src/iso-viewer/timeline-scale.ts",
|
|
265
265
|
"default": "./js/iso-viewer/timeline-scale.js"
|
|
266
266
|
},
|
|
267
267
|
"./modules/iso-viewer/timeline-scope": {
|
|
268
|
-
"types": "./
|
|
268
|
+
"types": "./types/iso-viewer/timeline-scope.d.ts",
|
|
269
269
|
"source": "./src/iso-viewer/timeline-scope.ts",
|
|
270
270
|
"default": "./js/iso-viewer/timeline-scope.js"
|
|
271
271
|
},
|
|
272
272
|
"./modules/iso-viewer/timeline-search": {
|
|
273
|
-
"types": "./
|
|
273
|
+
"types": "./types/iso-viewer/timeline-search.d.ts",
|
|
274
274
|
"source": "./src/iso-viewer/timeline-search.ts",
|
|
275
275
|
"default": "./js/iso-viewer/timeline-search.js"
|
|
276
276
|
},
|
|
277
277
|
"./modules/iso-viewer/timeline-time": {
|
|
278
|
-
"types": "./
|
|
278
|
+
"types": "./types/iso-viewer/timeline-time.d.ts",
|
|
279
279
|
"source": "./src/iso-viewer/timeline-time.ts",
|
|
280
280
|
"default": "./js/iso-viewer/timeline-time.js"
|
|
281
281
|
},
|
|
282
282
|
"./modules/iso-viewer/view-css": {
|
|
283
|
-
"types": "./
|
|
283
|
+
"types": "./types/iso-viewer/view-css.d.ts",
|
|
284
284
|
"source": "./src/iso-viewer/view-css.ts",
|
|
285
285
|
"default": "./js/iso-viewer/view-css.js"
|
|
286
286
|
},
|
|
287
287
|
"./modules/iso-viewer/viewport": {
|
|
288
|
-
"types": "./
|
|
288
|
+
"types": "./types/iso-viewer/viewport.d.ts",
|
|
289
289
|
"source": "./src/iso-viewer/viewport.ts",
|
|
290
290
|
"default": "./js/iso-viewer/viewport.js"
|
|
291
291
|
},
|
|
292
292
|
"./modules/iso-editor/adapter": {
|
|
293
|
-
"types": "./
|
|
293
|
+
"types": "./types/iso-editor/adapter.d.ts",
|
|
294
294
|
"source": "./src/iso-editor/adapter.ts",
|
|
295
295
|
"default": "./js/iso-editor/adapter.js"
|
|
296
296
|
},
|
|
297
297
|
"./modules/iso-editor/clipboard": {
|
|
298
|
-
"types": "./
|
|
298
|
+
"types": "./types/iso-editor/clipboard.d.ts",
|
|
299
299
|
"source": "./src/iso-editor/clipboard.ts",
|
|
300
300
|
"default": "./js/iso-editor/clipboard.js"
|
|
301
301
|
},
|
|
302
302
|
"./modules/iso-editor/commands": {
|
|
303
|
-
"types": "./
|
|
303
|
+
"types": "./types/iso-editor/commands.d.ts",
|
|
304
304
|
"source": "./src/iso-editor/commands.ts",
|
|
305
305
|
"default": "./js/iso-editor/commands.js"
|
|
306
306
|
},
|
|
307
307
|
"./modules/iso-editor/complete": {
|
|
308
|
-
"types": "./
|
|
308
|
+
"types": "./types/iso-editor/complete.d.ts",
|
|
309
309
|
"source": "./src/iso-editor/complete.ts",
|
|
310
310
|
"default": "./js/iso-editor/complete.js"
|
|
311
311
|
},
|
|
312
312
|
"./modules/iso-editor/doc": {
|
|
313
|
-
"types": "./
|
|
313
|
+
"types": "./types/iso-editor/doc.d.ts",
|
|
314
314
|
"source": "./src/iso-editor/doc.ts",
|
|
315
315
|
"default": "./js/iso-editor/doc.js"
|
|
316
316
|
},
|
|
317
317
|
"./modules/iso-editor/index": {
|
|
318
|
-
"types": "./
|
|
318
|
+
"types": "./types/iso-editor/index.d.ts",
|
|
319
319
|
"source": "./src/iso-editor/index.ts",
|
|
320
320
|
"default": "./js/iso-editor/index.js"
|
|
321
321
|
},
|
|
322
322
|
"./modules/iso-editor/model": {
|
|
323
|
-
"types": "./
|
|
323
|
+
"types": "./types/iso-editor/model.d.ts",
|
|
324
324
|
"source": "./src/iso-editor/model.ts",
|
|
325
325
|
"default": "./js/iso-editor/model.js"
|
|
326
326
|
},
|
|
327
327
|
"./modules/iso-editor/outline": {
|
|
328
|
-
"types": "./
|
|
328
|
+
"types": "./types/iso-editor/outline.d.ts",
|
|
329
329
|
"source": "./src/iso-editor/outline.ts",
|
|
330
330
|
"default": "./js/iso-editor/outline.js"
|
|
331
331
|
},
|
|
332
332
|
"./modules/iso-editor/path": {
|
|
333
|
-
"types": "./
|
|
333
|
+
"types": "./types/iso-editor/path.d.ts",
|
|
334
334
|
"source": "./src/iso-editor/path.ts",
|
|
335
335
|
"default": "./js/iso-editor/path.js"
|
|
336
336
|
},
|
|
337
337
|
"./modules/iso-editor/providers": {
|
|
338
|
-
"types": "./
|
|
338
|
+
"types": "./types/iso-editor/providers.d.ts",
|
|
339
339
|
"source": "./src/iso-editor/providers.ts",
|
|
340
340
|
"default": "./js/iso-editor/providers.js"
|
|
341
341
|
},
|
|
342
342
|
"./modules/iso-editor/schema-nav": {
|
|
343
|
-
"types": "./
|
|
343
|
+
"types": "./types/iso-editor/schema-nav.d.ts",
|
|
344
344
|
"source": "./src/iso-editor/schema-nav.ts",
|
|
345
345
|
"default": "./js/iso-editor/schema-nav.js"
|
|
346
346
|
},
|
|
347
347
|
"./modules/iso-editor/splice": {
|
|
348
|
-
"types": "./
|
|
348
|
+
"types": "./types/iso-editor/splice.d.ts",
|
|
349
349
|
"source": "./src/iso-editor/splice.ts",
|
|
350
350
|
"default": "./js/iso-editor/splice.js"
|
|
351
351
|
},
|
|
352
352
|
"./modules/iso-editor/storage-keys": {
|
|
353
|
-
"types": "./
|
|
353
|
+
"types": "./types/iso-editor/storage-keys.d.ts",
|
|
354
354
|
"source": "./src/iso-editor/storage-keys.ts",
|
|
355
355
|
"default": "./js/iso-editor/storage-keys.js"
|
|
356
356
|
},
|
|
357
357
|
"./modules/iso-editor/ui/actions": {
|
|
358
|
-
"types": "./
|
|
358
|
+
"types": "./types/iso-editor/ui/actions.d.ts",
|
|
359
359
|
"source": "./src/iso-editor/ui/actions.ts",
|
|
360
360
|
"default": "./js/iso-editor/ui/actions.js"
|
|
361
361
|
},
|
|
362
362
|
"./modules/iso-editor/ui/app.css": "./src/iso-editor/ui/app.css",
|
|
363
363
|
"./modules/iso-editor/ui/canvas-layer": {
|
|
364
|
-
"types": "./
|
|
364
|
+
"types": "./types/iso-editor/ui/canvas-layer.d.ts",
|
|
365
365
|
"source": "./src/iso-editor/ui/canvas-layer.ts",
|
|
366
366
|
"default": "./js/iso-editor/ui/canvas-layer.js"
|
|
367
367
|
},
|
|
368
368
|
"./modules/iso-editor/ui/canvas": {
|
|
369
|
-
"types": "./
|
|
369
|
+
"types": "./types/iso-editor/ui/canvas.d.ts",
|
|
370
370
|
"source": "./src/iso-editor/ui/canvas.ts",
|
|
371
371
|
"default": "./js/iso-editor/ui/canvas.js"
|
|
372
372
|
},
|
|
373
373
|
"./modules/iso-editor/ui/clip": {
|
|
374
|
-
"types": "./
|
|
374
|
+
"types": "./types/iso-editor/ui/clip.d.ts",
|
|
375
375
|
"source": "./src/iso-editor/ui/clip.ts",
|
|
376
376
|
"default": "./js/iso-editor/ui/clip.js"
|
|
377
377
|
},
|
|
378
378
|
"./modules/iso-editor/ui/dialog": {
|
|
379
|
-
"types": "./
|
|
379
|
+
"types": "./types/iso-editor/ui/dialog.d.ts",
|
|
380
380
|
"source": "./src/iso-editor/ui/dialog.ts",
|
|
381
381
|
"default": "./js/iso-editor/ui/dialog.js"
|
|
382
382
|
},
|
|
383
383
|
"./modules/iso-editor/ui/flat-canvas": {
|
|
384
|
-
"types": "./
|
|
384
|
+
"types": "./types/iso-editor/ui/flat-canvas.d.ts",
|
|
385
385
|
"source": "./src/iso-editor/ui/flat-canvas.ts",
|
|
386
386
|
"default": "./js/iso-editor/ui/flat-canvas.js"
|
|
387
387
|
},
|
|
388
388
|
"./modules/iso-editor/ui/icons": {
|
|
389
|
-
"types": "./
|
|
389
|
+
"types": "./types/iso-editor/ui/icons.d.ts",
|
|
390
390
|
"source": "./src/iso-editor/ui/icons.ts",
|
|
391
391
|
"default": "./js/iso-editor/ui/icons.js"
|
|
392
392
|
},
|
|
393
393
|
"./modules/iso-editor/ui/keys": {
|
|
394
|
-
"types": "./
|
|
394
|
+
"types": "./types/iso-editor/ui/keys.d.ts",
|
|
395
395
|
"source": "./src/iso-editor/ui/keys.ts",
|
|
396
396
|
"default": "./js/iso-editor/ui/keys.js"
|
|
397
397
|
},
|
|
398
398
|
"./modules/iso-editor/ui/later": {
|
|
399
|
-
"types": "./
|
|
399
|
+
"types": "./types/iso-editor/ui/later.d.ts",
|
|
400
400
|
"source": "./src/iso-editor/ui/later.ts",
|
|
401
401
|
"default": "./js/iso-editor/ui/later.js"
|
|
402
402
|
},
|
|
403
403
|
"./modules/iso-editor/ui/layer": {
|
|
404
|
-
"types": "./
|
|
404
|
+
"types": "./types/iso-editor/ui/layer.d.ts",
|
|
405
405
|
"source": "./src/iso-editor/ui/layer.ts",
|
|
406
406
|
"default": "./js/iso-editor/ui/layer.js"
|
|
407
407
|
},
|
|
408
408
|
"./modules/iso-editor/ui/marks.css": "./src/iso-editor/ui/marks.css",
|
|
409
409
|
"./modules/iso-editor/ui/menu": {
|
|
410
|
-
"types": "./
|
|
410
|
+
"types": "./types/iso-editor/ui/menu.d.ts",
|
|
411
411
|
"source": "./src/iso-editor/ui/menu.ts",
|
|
412
412
|
"default": "./js/iso-editor/ui/menu.js"
|
|
413
413
|
},
|
|
414
414
|
"./modules/iso-editor/ui/monaco-entry": {
|
|
415
|
-
"types": "./
|
|
415
|
+
"types": "./types/iso-editor/ui/monaco-entry.d.ts",
|
|
416
416
|
"source": "./src/iso-editor/ui/monaco-entry.ts",
|
|
417
417
|
"default": "./js/iso-editor/ui/monaco-entry.js"
|
|
418
418
|
},
|
|
419
419
|
"./modules/iso-editor/ui/mount-kit": {
|
|
420
|
-
"types": "./
|
|
420
|
+
"types": "./types/iso-editor/ui/mount-kit.d.ts",
|
|
421
421
|
"source": "./src/iso-editor/ui/mount-kit.ts",
|
|
422
422
|
"default": "./js/iso-editor/ui/mount-kit.js"
|
|
423
423
|
},
|
|
424
424
|
"./modules/iso-editor/ui/mount": {
|
|
425
|
-
"types": "./
|
|
425
|
+
"types": "./types/iso-editor/ui/mount.d.ts",
|
|
426
426
|
"source": "./src/iso-editor/ui/mount.ts",
|
|
427
427
|
"default": "./js/iso-editor/ui/mount.js"
|
|
428
428
|
},
|
|
429
429
|
"./modules/iso-editor/ui/pane": {
|
|
430
|
-
"types": "./
|
|
430
|
+
"types": "./types/iso-editor/ui/pane.d.ts",
|
|
431
431
|
"source": "./src/iso-editor/ui/pane.ts",
|
|
432
432
|
"default": "./js/iso-editor/ui/pane.js"
|
|
433
433
|
},
|
|
434
434
|
"./modules/iso-editor/ui/part": {
|
|
435
|
-
"types": "./
|
|
435
|
+
"types": "./types/iso-editor/ui/part.d.ts",
|
|
436
436
|
"source": "./src/iso-editor/ui/part.ts",
|
|
437
437
|
"default": "./js/iso-editor/ui/part.js"
|
|
438
438
|
},
|
|
439
439
|
"./modules/iso-editor/ui/plain-icons": {
|
|
440
|
-
"types": "./
|
|
440
|
+
"types": "./types/iso-editor/ui/plain-icons.d.ts",
|
|
441
441
|
"source": "./src/iso-editor/ui/plain-icons.ts",
|
|
442
442
|
"default": "./js/iso-editor/ui/plain-icons.js"
|
|
443
443
|
},
|
|
444
444
|
"./modules/iso-editor/ui/props": {
|
|
445
|
-
"types": "./
|
|
445
|
+
"types": "./types/iso-editor/ui/props.d.ts",
|
|
446
446
|
"source": "./src/iso-editor/ui/props.ts",
|
|
447
447
|
"default": "./js/iso-editor/ui/props.js"
|
|
448
448
|
},
|
|
449
449
|
"./modules/iso-editor/ui/scope-css": {
|
|
450
|
-
"types": "./
|
|
450
|
+
"types": "./types/iso-editor/ui/scope-css.d.ts",
|
|
451
451
|
"source": "./src/iso-editor/ui/scope-css.ts",
|
|
452
452
|
"default": "./js/iso-editor/ui/scope-css.js"
|
|
453
453
|
},
|
|
454
454
|
"./modules/iso-editor/ui/setup": {
|
|
455
|
-
"types": "./
|
|
455
|
+
"types": "./types/iso-editor/ui/setup.d.ts",
|
|
456
456
|
"source": "./src/iso-editor/ui/setup.ts",
|
|
457
457
|
"default": "./js/iso-editor/ui/setup.js"
|
|
458
458
|
},
|
|
459
459
|
"./modules/iso-editor/ui/skin.css": "./src/iso-editor/ui/skin.css",
|
|
460
460
|
"./modules/iso-editor/ui/text": {
|
|
461
|
-
"types": "./
|
|
461
|
+
"types": "./types/iso-editor/ui/text.d.ts",
|
|
462
462
|
"source": "./src/iso-editor/ui/text.ts",
|
|
463
463
|
"default": "./js/iso-editor/ui/text.js"
|
|
464
464
|
},
|
|
465
465
|
"./modules/iso-editor/ui/tree": {
|
|
466
|
-
"types": "./
|
|
466
|
+
"types": "./types/iso-editor/ui/tree.d.ts",
|
|
467
467
|
"source": "./src/iso-editor/ui/tree.ts",
|
|
468
468
|
"default": "./js/iso-editor/ui/tree.js"
|
|
469
469
|
},
|
|
470
470
|
"./modules/iso-editor/validate": {
|
|
471
|
-
"types": "./
|
|
471
|
+
"types": "./types/iso-editor/validate.d.ts",
|
|
472
472
|
"source": "./src/iso-editor/validate.ts",
|
|
473
473
|
"default": "./js/iso-editor/validate.js"
|
|
474
474
|
},
|
|
475
475
|
"./modules/iso-editor/window/protocol": {
|
|
476
|
-
"types": "./
|
|
476
|
+
"types": "./types/iso-editor/window/protocol.d.ts",
|
|
477
477
|
"source": "./src/iso-editor/window/protocol.ts",
|
|
478
478
|
"default": "./js/iso-editor/window/protocol.js"
|
|
479
479
|
},
|
|
480
480
|
"./modules/iso-systems/catalog": {
|
|
481
|
-
"types": "./
|
|
481
|
+
"types": "./types/iso-systems/catalog.d.ts",
|
|
482
482
|
"source": "./src/iso-systems/catalog.ts",
|
|
483
483
|
"default": "./js/iso-systems/catalog.js"
|
|
484
484
|
},
|
|
485
485
|
"./modules/iso-systems/compile": {
|
|
486
|
-
"types": "./
|
|
486
|
+
"types": "./types/iso-systems/compile.d.ts",
|
|
487
487
|
"source": "./src/iso-systems/compile.ts",
|
|
488
488
|
"default": "./js/iso-systems/compile.js"
|
|
489
489
|
},
|
|
490
490
|
"./modules/iso-systems/css": {
|
|
491
|
-
"types": "./
|
|
491
|
+
"types": "./types/iso-systems/css.d.ts",
|
|
492
492
|
"source": "./src/iso-systems/css.ts",
|
|
493
493
|
"default": "./js/iso-systems/css.js"
|
|
494
494
|
},
|
|
495
495
|
"./modules/iso-systems/index": {
|
|
496
|
-
"types": "./
|
|
496
|
+
"types": "./types/iso-systems/index.d.ts",
|
|
497
497
|
"source": "./src/iso-systems/index.ts",
|
|
498
498
|
"default": "./js/iso-systems/index.js"
|
|
499
499
|
},
|
|
500
500
|
"./modules/iso-systems/nodes": {
|
|
501
|
-
"types": "./
|
|
501
|
+
"types": "./types/iso-systems/nodes.d.ts",
|
|
502
502
|
"source": "./src/iso-systems/nodes.ts",
|
|
503
503
|
"default": "./js/iso-systems/nodes.js"
|
|
504
504
|
},
|
|
505
505
|
"./modules/iso-systems/validate": {
|
|
506
|
-
"types": "./
|
|
506
|
+
"types": "./types/iso-systems/validate.d.ts",
|
|
507
507
|
"source": "./src/iso-systems/validate.ts",
|
|
508
508
|
"default": "./js/iso-systems/validate.js"
|
|
509
509
|
},
|
|
@@ -3,10 +3,12 @@
|
|
|
3
3
|
// code at build time (ajv standalone), keyed by the schema's fingerprint. Both use these options.
|
|
4
4
|
|
|
5
5
|
import Ajv2020Mod from 'ajv/dist/2020.js';
|
|
6
|
+
// the class by its name: its type is the same under every moduleResolution (a default import's isn't)
|
|
7
|
+
import type { Ajv2020 as Ajv2020Class } from 'ajv/dist/2020.js';
|
|
6
8
|
import type { ValidateFunction } from 'ajv';
|
|
7
9
|
|
|
8
10
|
// ajv is CommonJS; under Node's ESM loader the class may sit on `.default`.
|
|
9
|
-
export const Ajv2020 = ((Ajv2020Mod as unknown as { default?: unknown }).default ?? Ajv2020Mod) as typeof
|
|
11
|
+
export const Ajv2020 = ((Ajv2020Mod as unknown as { default?: unknown }).default ?? Ajv2020Mod) as typeof Ajv2020Class;
|
|
10
12
|
export const AJV_OPTIONS = { allErrors: true, verbose: true, strict: false } as const;
|
|
11
13
|
const ajv = new Ajv2020(AJV_OPTIONS);
|
|
12
14
|
|
|
@@ -132,6 +132,15 @@ export function commandsFor(a: CommandsAdapter) {
|
|
|
132
132
|
const quote = now[0] === '"' || now[0] === "'" ? now[0] : undefined;
|
|
133
133
|
edits.push({ start: range[0], end: range[1], text: quote === '"' ? JSON.stringify(v) : quote === "'" ? `'${v}'` : scalarText(v, { flow: true, indent: 0 }) });
|
|
134
134
|
}
|
|
135
|
+
// (0.12.5) its pin is keyed by its name: it follows (a domain whose references include the pins has done it), so the
|
|
136
|
+
// thing stays where it was put. Not over a pin there already.
|
|
137
|
+
const data = dataOf(t) as Record<string, { layout?: Record<string, unknown> } | null> | undefined;
|
|
138
|
+
for (const k of [a.pins.key, a.pins.legacyKey]) {
|
|
139
|
+
const layout = k === undefined ? undefined : data?.[k]?.layout;
|
|
140
|
+
if (!layout || typeof layout !== 'object' || !Object.hasOwn(layout, from) || Object.hasOwn(layout, to)) continue;
|
|
141
|
+
const range = d.rangeOf([k!, 'layout', from], 'key');
|
|
142
|
+
if (range && !edits.some(e => e.start < range[1] && range[0] < e.end)) edits.push({ start: range[0], end: range[1], text: scalarText(to, { flow: true, indent: 0 }) });
|
|
143
|
+
}
|
|
135
144
|
return { steps: [edits] };
|
|
136
145
|
},
|
|
137
146
|
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// Which of a drawing's routes are connections of the file's own: a route whose path is an entry of its own (not an object,
|
|
2
|
+
// not a key inside one, not a whole section), that nothing else in the drawing stands for. Only these are offered as
|
|
3
|
+
// connections (a wider place to click, the keyboard): elsewhere a route shows an object, or one of its settings. Pure.
|
|
4
|
+
|
|
5
|
+
import { fromPointer } from './path.ts';
|
|
6
|
+
|
|
7
|
+
/** path → route id, in the file's order as the drawing maps it */
|
|
8
|
+
export function connectionsOf(pathOf: ReadonlyMap<string, string>, isRoute: (id: string) => boolean, objectOf: (ptr: string) => unknown): Map<string, string> {
|
|
9
|
+
const uses = new Map<string, number>();
|
|
10
|
+
for (const p of pathOf.values()) uses.set(p, (uses.get(p) ?? 0) + 1);
|
|
11
|
+
const out = new Map<string, string>();
|
|
12
|
+
for (const [id, p] of pathOf) if (isRoute(id) && uses.get(p) === 1 && fromPointer(p).length >= 2 && objectOf(p) === undefined) out.set(p, id);
|
|
13
|
+
return out;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/** the nearest point of a polyline path ("M x,y L x,y …", the numbers taken in pairs) to a point */
|
|
17
|
+
export function nearestOn(d: string, x: number, y: number): { x: number; y: number; dist: number } | undefined {
|
|
18
|
+
const n = (d.match(/-?\d*\.?\d+(?:e-?\d+)?/gi) ?? []).map(Number), pts: [number, number][] = [];
|
|
19
|
+
for (let i = 0; i + 1 < n.length; i += 2) pts.push([n[i], n[i + 1]]);
|
|
20
|
+
let best: { x: number; y: number; dist: number } | undefined;
|
|
21
|
+
for (let i = 0; i + 1 < pts.length; i++) {
|
|
22
|
+
const [ax, ay] = pts[i], [bx, by] = pts[i + 1], l2 = (bx - ax) ** 2 + (by - ay) ** 2;
|
|
23
|
+
const t = l2 ? Math.max(0, Math.min(1, ((x - ax) * (bx - ax) + (y - ay) * (by - ay)) / l2)) : 0;
|
|
24
|
+
const px = ax + (bx - ax) * t, py = ay + (by - ay) * t, dist = Math.hypot(px - x, py - y);
|
|
25
|
+
if (!best || dist < best.dist) best = { x: px, y: py, dist };
|
|
26
|
+
}
|
|
27
|
+
return best;
|
|
28
|
+
}
|