@world-engines/authoring-ui 0.1.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/LICENSE +46 -0
  2. package/dist/DesktopAuthoringShell.d.ts +178 -0
  3. package/dist/DesktopAuthoringShell.js +235 -0
  4. package/dist/index.d.ts +23 -0
  5. package/dist/index.js +12 -0
  6. package/dist/ladybug/BrowserGraphCanvasAdapter.d.ts +12 -0
  7. package/dist/ladybug/BrowserGraphCanvasAdapter.js +8 -0
  8. package/dist/ladybug/GraphCanvas.d.ts +121 -0
  9. package/dist/ladybug/GraphCanvas.js +1439 -0
  10. package/dist/ladybug/GraphEdge.d.ts +26 -0
  11. package/dist/ladybug/GraphEdge.js +41 -0
  12. package/dist/ladybug/LadybugExplorer.d.ts +58 -0
  13. package/dist/ladybug/LadybugExplorer.js +83 -0
  14. package/dist/ladybug/LadybugSurfaces.d.ts +25 -0
  15. package/dist/ladybug/LadybugSurfaces.js +9 -0
  16. package/dist/ladybug/LadybugTable.d.ts +15 -0
  17. package/dist/ladybug/LadybugTable.js +26 -0
  18. package/dist/ladybug/entity-props.d.ts +98 -0
  19. package/dist/ladybug/entity-props.js +363 -0
  20. package/dist/ladybug/graph-edge-geometry.d.ts +19 -0
  21. package/dist/ladybug/graph-edge-geometry.js +78 -0
  22. package/dist/ladybug/graph-edge-mask.d.ts +21 -0
  23. package/dist/ladybug/graph-edge-mask.js +52 -0
  24. package/dist/ladybug/graph-groups.d.ts +47 -0
  25. package/dist/ladybug/graph-groups.js +245 -0
  26. package/dist/ladybug/graph-layout-contract.d.ts +34 -0
  27. package/dist/ladybug/graph-layout-contract.js +55 -0
  28. package/dist/ladybug/graph-layout-solver.d.ts +16 -0
  29. package/dist/ladybug/graph-layout-solver.js +96 -0
  30. package/dist/ladybug/graph-layout-wasm.d.ts +9 -0
  31. package/dist/ladybug/graph-layout-wasm.js +88 -0
  32. package/dist/ladybug/graph-layout-worker-protocol.d.ts +18 -0
  33. package/dist/ladybug/graph-layout-worker-protocol.js +1 -0
  34. package/dist/ladybug/graph-layout-worker.d.ts +1 -0
  35. package/dist/ladybug/graph-layout-worker.js +66 -0
  36. package/dist/ladybug/graph-layout.d.ts +2 -0
  37. package/dist/ladybug/graph-layout.js +1 -0
  38. package/dist/ladybug/graph-layout.wasm +0 -0
  39. package/dist/ladybug/graph-node-metrics.d.ts +33 -0
  40. package/dist/ladybug/graph-node-metrics.js +173 -0
  41. package/dist/ladybug/graph-physics.d.ts +49 -0
  42. package/dist/ladybug/graph-physics.js +266 -0
  43. package/dist/ladybug/graph-placement.d.ts +33 -0
  44. package/dist/ladybug/graph-placement.js +253 -0
  45. package/dist/ladybug/graph.css +530 -0
  46. package/dist/ladybug/graph.d.ts +18 -0
  47. package/dist/ladybug/graph.js +9 -0
  48. package/dist/ladybug/score-tags.d.ts +11 -0
  49. package/dist/ladybug/score-tags.js +1 -0
  50. package/dist/map/MapWorkspace.d.ts +14 -0
  51. package/dist/map/MapWorkspace.js +9 -0
  52. package/dist/score/ScoreRadar.d.ts +10 -0
  53. package/dist/score/ScoreRadar.js +66 -0
  54. package/dist/score/index.d.ts +3 -0
  55. package/dist/score/index.js +3 -0
  56. package/dist/score/radar-index.d.ts +3 -0
  57. package/dist/score/radar-index.js +2 -0
  58. package/dist/score/scenario-scoring-features.d.ts +90 -0
  59. package/dist/score/scenario-scoring-features.js +380 -0
  60. package/dist/score/scenario-structural-score.d.ts +76 -0
  61. package/dist/score/scenario-structural-score.js +211 -0
  62. package/dist/score/score-presentation.d.ts +51 -0
  63. package/dist/score/score-presentation.js +44 -0
  64. package/dist/score/score-radar.css +1 -0
  65. package/dist/sync/DownloadPanel.d.ts +42 -0
  66. package/dist/sync/DownloadPanel.js +22 -0
  67. package/dist/sync/SyncSidebar.d.ts +47 -0
  68. package/dist/sync/SyncSidebar.js +31 -0
  69. package/dist/sync/UploadPanel.d.ts +64 -0
  70. package/dist/sync/UploadPanel.js +36 -0
  71. package/dist/trigger/TriggerBlueprint.d.ts +37 -0
  72. package/dist/trigger/TriggerBlueprint.js +26 -0
  73. package/dist/trigger/tmw/TmwBlueprint.d.ts +71 -0
  74. package/dist/trigger/tmw/TmwBlueprint.js +206 -0
  75. package/dist/trigger/tmw/TmwFlowLane.d.ts +22 -0
  76. package/dist/trigger/tmw/TmwFlowLane.js +44 -0
  77. package/dist/trigger/tmw/TmwSourceLane.d.ts +17 -0
  78. package/dist/trigger/tmw/TmwSourceLane.js +38 -0
  79. package/dist/trigger/tmw/TmwTabs.d.ts +20 -0
  80. package/dist/trigger/tmw/TmwTabs.js +8 -0
  81. package/dist/trigger/tmw/TmwTraceLane.d.ts +9 -0
  82. package/dist/trigger/tmw/TmwTraceLane.js +6 -0
  83. package/dist/trigger/tmw/TriggerDebugTab.d.ts +9 -0
  84. package/dist/trigger/tmw/TriggerDebugTab.js +25 -0
  85. package/dist/trigger/tmw/translate.d.ts +3 -0
  86. package/dist/trigger/tmw/translate.js +2 -0
  87. package/dist/view/ViewWorkspace.d.ts +19 -0
  88. package/dist/view/ViewWorkspace.js +8 -0
  89. package/package.json +89 -0
@@ -0,0 +1,530 @@
1
+ :root {
2
+ --we-graph-bg: #161516;
3
+ --we-graph-accent: #32d551;
4
+ --we-graph-text: #e7e7e7;
5
+ --we-graph-muted: #8c8c8c;
6
+ --we-graph-line: #707070;
7
+ --we-graph-line-soft: #454545;
8
+ --we-graph-panel: #202020;
9
+ --we-graph-danger: #ff453a;
10
+ --we-graph-pending: #64d2ff;
11
+ --we-graph-search: #ffd60a;
12
+ }
13
+
14
+ .shared-graph-canvas {
15
+ position: relative;
16
+ display: flex;
17
+ flex-direction: column;
18
+ width: 100%;
19
+ height: 100%;
20
+ min-height: 28rem;
21
+ overflow: hidden;
22
+ color: var(--we-graph-text);
23
+ background: var(--we-graph-bg);
24
+ }
25
+
26
+ .shared-graph-canvas__toolbar {
27
+ position: absolute;
28
+ inset-block-start: 0.75rem;
29
+ inset-inline: 0.75rem;
30
+ z-index: 5;
31
+ display: flex;
32
+ justify-content: space-between;
33
+ gap: 0.75rem;
34
+ pointer-events: none;
35
+ color: var(--we-graph-muted);
36
+ font: 500 0.6875rem/1.25 system-ui, sans-serif;
37
+ }
38
+
39
+ .shared-graph-canvas__error {
40
+ position: absolute;
41
+ inset-block-start: 2.25rem;
42
+ inset-inline-start: 50%;
43
+ z-index: 8;
44
+ max-width: min(32rem, calc(100% - 2rem));
45
+ padding: 0.4rem 0.65rem;
46
+ border: 1px solid var(--we-graph-danger);
47
+ border-radius: 0.4rem;
48
+ background: var(--we-graph-bg);
49
+ color: var(--we-graph-danger);
50
+ font: 500 0.75rem/1.3 system-ui, sans-serif;
51
+ transform: translateX(-50%);
52
+ pointer-events: none;
53
+ }
54
+
55
+ .shared-graph-context-menu {
56
+ position: fixed;
57
+ z-index: 40;
58
+ display: grid;
59
+ width: 11.5rem;
60
+ padding: 0.35rem;
61
+ border: 1px solid var(--we-graph-line-soft);
62
+ border-radius: 0.45rem;
63
+ background: var(--we-graph-panel);
64
+ box-shadow: 0 0.5rem 1.4rem rgba(0, 0, 0, 0.38);
65
+ }
66
+
67
+ .shared-graph-context-menu button {
68
+ min-height: 2.125rem;
69
+ padding: 0.35rem 0.6rem;
70
+ border: 0;
71
+ border-radius: 0.3rem;
72
+ background: transparent;
73
+ color: var(--we-graph-text);
74
+ font: 500 0.75rem/1.25 system-ui, sans-serif;
75
+ text-align: start;
76
+ cursor: pointer;
77
+ }
78
+
79
+ .shared-graph-context-menu button:hover,
80
+ .shared-graph-context-menu button:focus-visible {
81
+ outline: 0;
82
+ background: color-mix(in srgb, var(--we-graph-accent) 16%, transparent);
83
+ color: var(--we-graph-accent);
84
+ }
85
+
86
+ .shared-graph-context-menu button.is-danger {
87
+ color: var(--we-graph-danger);
88
+ }
89
+
90
+ .shared-graph-canvas__flow,
91
+ .shared-graph-canvas__flow .react-flow {
92
+ width: 100%;
93
+ height: 100%;
94
+ min-height: inherit;
95
+ background: var(--we-graph-bg);
96
+ }
97
+
98
+ .shared-graph-canvas__flow .react-flow__background-pattern.dots {
99
+ fill: var(--we-graph-line-soft);
100
+ }
101
+
102
+ .shared-graph-mask-defs {
103
+ position: absolute;
104
+ width: 0;
105
+ height: 0;
106
+ pointer-events: none;
107
+ }
108
+
109
+ .shared-graph-defs {
110
+ position: absolute;
111
+ width: 0;
112
+ height: 0;
113
+ }
114
+
115
+ .shared-graph-defs marker path {
116
+ stroke: var(--we-graph-line);
117
+ stroke-width: 1;
118
+ stroke-linecap: round;
119
+ stroke-linejoin: round;
120
+ }
121
+
122
+ .shared-graph-group {
123
+ position: relative;
124
+ width: 100%;
125
+ height: 100%;
126
+ box-sizing: border-box;
127
+ border: 1px solid color-mix(in srgb, var(--we-graph-group-color, var(--we-graph-line)) 66%, transparent);
128
+ border-radius: 0.35rem;
129
+ background: color-mix(in srgb, var(--we-graph-group-color, var(--we-graph-line)) 14%, transparent);
130
+ color: color-mix(in srgb, var(--we-graph-group-color, var(--we-graph-text)) 60%, var(--we-graph-text));
131
+ cursor: grab;
132
+ transition: background-color 100ms ease, border-color 120ms ease, box-shadow 120ms ease;
133
+ }
134
+
135
+ .shared-graph-group:hover {
136
+ background: color-mix(in srgb, var(--we-graph-group-color, var(--we-graph-line)) 20%, transparent);
137
+ }
138
+
139
+ .shared-graph-group.is-selected {
140
+ border-color: var(--we-graph-accent);
141
+ background: color-mix(in srgb, var(--we-graph-group-color, var(--we-graph-line)) 22%, transparent);
142
+ box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--we-graph-accent) 38%, transparent);
143
+ }
144
+
145
+ .shared-graph-group.is-drop-target {
146
+ border-color: var(--we-graph-group-color, var(--we-graph-accent));
147
+ background: color-mix(in srgb, var(--we-graph-group-color, var(--we-graph-accent)) 38%, transparent);
148
+ box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--we-graph-group-color, var(--we-graph-accent)) 62%, transparent);
149
+ }
150
+
151
+ .shared-graph-group.is-draft {
152
+ border-style: dashed;
153
+ pointer-events: none;
154
+ }
155
+
156
+ .shared-graph-group.is-blocked {
157
+ border-color: var(--we-graph-danger);
158
+ box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--we-graph-danger) 38%, transparent);
159
+ }
160
+
161
+ .shared-graph-group__label {
162
+ position: absolute;
163
+ inset-block-start: 0.3rem;
164
+ inset-inline-start: 0.4rem;
165
+ max-width: calc(100% - 0.8rem);
166
+ overflow: hidden;
167
+ font: 600 calc(11px * var(--we-graph-inverse-zoom, 1))/1.2 system-ui, sans-serif;
168
+ text-overflow: ellipsis;
169
+ white-space: nowrap;
170
+ cursor: text;
171
+ pointer-events: auto;
172
+ }
173
+
174
+ .shared-graph-group__name-input {
175
+ position: absolute;
176
+ inset-block-start: 0.2rem;
177
+ inset-inline-start: 0.3rem;
178
+ z-index: 3;
179
+ width: calc(100% - 0.6rem);
180
+ min-width: 0;
181
+ box-sizing: border-box;
182
+ padding: 0.1rem 0.2rem;
183
+ border: 1px solid var(--we-graph-accent);
184
+ border-radius: 0.2rem;
185
+ outline: 0;
186
+ background: var(--we-graph-bg);
187
+ color: var(--we-graph-text);
188
+ font: 600 calc(11px * var(--we-graph-inverse-zoom, 1))/1.2 system-ui, sans-serif;
189
+ }
190
+
191
+ .shared-graph-group__resize {
192
+ position: absolute;
193
+ z-index: 2;
194
+ display: block;
195
+ }
196
+
197
+ .shared-graph-group__resize--top,
198
+ .shared-graph-group__resize--bottom {
199
+ inset-inline: 0.75rem;
200
+ height: 10px;
201
+ cursor: ns-resize;
202
+ }
203
+
204
+ .shared-graph-group__resize--top { inset-block-start: -5px; }
205
+ .shared-graph-group__resize--bottom { inset-block-end: -5px; }
206
+
207
+ .shared-graph-group__resize--left,
208
+ .shared-graph-group__resize--right {
209
+ inset-block: 0.75rem;
210
+ width: 10px;
211
+ cursor: ew-resize;
212
+ }
213
+
214
+ .shared-graph-group__resize--left { inset-inline-start: -5px; }
215
+ .shared-graph-group__resize--right { inset-inline-end: -5px; }
216
+
217
+ .shared-graph-node {
218
+ position: relative;
219
+ display: flex;
220
+ align-items: center;
221
+ justify-content: center;
222
+ width: var(--we-graph-node-size, 48px);
223
+ height: var(--we-graph-node-size, 48px);
224
+ padding: 0;
225
+ border: 0;
226
+ outline: 0;
227
+ background: transparent;
228
+ cursor: grab;
229
+ }
230
+
231
+ .shared-graph-node:active {
232
+ cursor: grabbing;
233
+ }
234
+
235
+ .shared-graph-node:focus-visible .shared-graph-node__circle {
236
+ outline: 1px solid var(--we-graph-accent);
237
+ outline-offset: 4px;
238
+ }
239
+
240
+ .shared-graph-node__circle {
241
+ position: relative;
242
+ display: flex;
243
+ align-items: center;
244
+ justify-content: center;
245
+ width: 100%;
246
+ height: 100%;
247
+ box-sizing: border-box;
248
+ border: 1px solid color-mix(in srgb, var(--we-graph-accent) 68%, var(--we-graph-line));
249
+ border-radius: 50%;
250
+ background: transparent;
251
+ color: var(--we-graph-accent);
252
+ transition: border-color 140ms ease, color 140ms ease, opacity 140ms ease;
253
+ }
254
+
255
+ .shared-graph-node:hover .shared-graph-node__circle,
256
+ .shared-graph-node.is-adjacent .shared-graph-node__circle {
257
+ border-color: color-mix(in srgb, var(--we-graph-accent) 72%, var(--we-graph-line));
258
+ color: var(--we-graph-accent);
259
+ }
260
+
261
+ .shared-graph-node.is-selected .shared-graph-node__circle {
262
+ border-color: var(--we-graph-accent);
263
+ background: var(--we-graph-accent);
264
+ color: var(--we-graph-bg);
265
+ }
266
+
267
+ .shared-graph-node.is-search-match:not(.is-selected) .shared-graph-node__circle,
268
+ .shared-graph-node.is-highlighted:not(.is-selected) .shared-graph-node__circle {
269
+ border-color: var(--we-graph-accent);
270
+ background: transparent;
271
+ color: var(--we-graph-accent);
272
+ }
273
+
274
+ .shared-graph-node.is-muted:not(.is-search-match):not(.is-highlighted):not(.is-pending) {
275
+ opacity: 0.74;
276
+ }
277
+
278
+ .shared-graph-node.is-pending:not(.is-selected) .shared-graph-node__circle {
279
+ border-color: var(--we-graph-pending);
280
+ border-style: dashed;
281
+ color: var(--we-graph-pending);
282
+ }
283
+
284
+ .shared-graph-node.is-disabled {
285
+ opacity: 0.38;
286
+ cursor: not-allowed;
287
+ }
288
+
289
+ .shared-graph-node.is-remote-highlighted {
290
+ opacity: 1;
291
+ }
292
+
293
+ .shared-graph-node.is-remote-highlighted .shared-graph-node__circle {
294
+ border-color: #0a84ff;
295
+ background: rgba(10, 132, 255, 0.86);
296
+ color: var(--we-graph-bg);
297
+ box-shadow: 0 0 0 2px rgba(10, 132, 255, 0.45);
298
+ animation: we-graph-remote-pulse 1.35s ease-in-out infinite;
299
+ }
300
+
301
+ @keyframes we-graph-remote-pulse {
302
+ 0%, 100% {
303
+ background: rgba(10, 132, 255, 0.58);
304
+ box-shadow: 0 0 0 2px rgba(10, 132, 255, 0.4);
305
+ }
306
+ 50% {
307
+ background: rgba(10, 132, 255, 0.94);
308
+ box-shadow: 0 0 0 5px rgba(10, 132, 255, 0.14);
309
+ }
310
+ }
311
+
312
+ @media (prefers-reduced-motion: reduce) {
313
+ .shared-graph-node.is-remote-highlighted .shared-graph-node__circle {
314
+ animation: none;
315
+ background: #0a84ff;
316
+ box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.42);
317
+ }
318
+ }
319
+
320
+ .shared-graph-node--vec-ready:not(.is-selected):not(.is-remote-highlighted) .shared-graph-node__circle {
321
+ border-color: var(--we-graph-accent);
322
+ color: var(--we-graph-accent);
323
+ }
324
+
325
+ .shared-graph-node__glyph {
326
+ width: clamp(29px, calc(var(--we-graph-node-size, 48px) * 0.6), 43px);
327
+ height: clamp(29px, calc(var(--we-graph-node-size, 48px) * 0.6), 43px);
328
+ overflow: visible;
329
+ fill: none;
330
+ stroke: currentColor;
331
+ stroke-width: 1.6;
332
+ stroke-linecap: round;
333
+ stroke-linejoin: round;
334
+ pointer-events: none;
335
+ }
336
+
337
+ .shared-graph-node__label {
338
+ position: absolute;
339
+ inset-block-start: calc(100% + 5px);
340
+ inset-inline-start: 50%;
341
+ max-width: calc(10rem * var(--we-graph-inverse-zoom, 1));
342
+ overflow: hidden;
343
+ color: var(--we-graph-text);
344
+ font-family: system-ui, sans-serif;
345
+ font-size: clamp(
346
+ calc(12px * var(--we-graph-inverse-zoom, 1)),
347
+ calc(var(--we-graph-node-size, 48px) * 0.22),
348
+ calc(16px * var(--we-graph-inverse-zoom, 1))
349
+ );
350
+ font-weight: 500;
351
+ line-height: 1.2;
352
+ text-align: center;
353
+ text-overflow: ellipsis;
354
+ white-space: nowrap;
355
+ opacity: 1;
356
+ transition: opacity 120ms ease;
357
+ transform: translateX(-50%);
358
+ pointer-events: none;
359
+ user-select: none;
360
+ }
361
+
362
+ .shared-graph-canvas[data-we-graph-distant="true"]
363
+ .shared-graph-node:not(.is-selected):not(.is-remote-highlighted):not(.is-search-match):not(.is-highlighted)
364
+ .shared-graph-node__label {
365
+ opacity: 0;
366
+ }
367
+
368
+ .shared-graph-node__handle {
369
+ position: absolute;
370
+ inset: calc(50% + 0.5px) auto auto 50%;
371
+ width: 1px;
372
+ height: 1px;
373
+ min-width: 0;
374
+ min-height: 0;
375
+ box-sizing: border-box;
376
+ border: 0;
377
+ border-radius: 50%;
378
+ background: var(--we-graph-bg);
379
+ opacity: 0;
380
+ pointer-events: none;
381
+ transform: translate(-50%, -50%);
382
+ transition: opacity 120ms ease;
383
+ }
384
+
385
+ .shared-graph-edge {
386
+ stroke: var(--we-graph-line);
387
+ stroke-width: 1.5;
388
+ opacity: 0.58;
389
+ cursor: pointer;
390
+ pointer-events: visibleStroke;
391
+ transition: opacity 140ms ease, stroke 140ms ease, stroke-width 140ms ease;
392
+ }
393
+
394
+ .shared-graph-edge:hover,
395
+ .shared-graph-edge.is-emphasized {
396
+ stroke: var(--we-graph-accent);
397
+ stroke-width: 2.25;
398
+ opacity: 0.96;
399
+ }
400
+
401
+ .shared-graph-edge.is-muted {
402
+ opacity: 0.52;
403
+ }
404
+
405
+ .shared-graph-edge--pending {
406
+ stroke: var(--we-graph-pending);
407
+ stroke-dasharray: 4 4;
408
+ }
409
+
410
+ .shared-graph-edge--search {
411
+ stroke: var(--we-graph-search);
412
+ }
413
+
414
+ .shared-graph-edge--disabled {
415
+ stroke: var(--we-graph-danger);
416
+ stroke-dasharray: 3 3;
417
+ opacity: 0.3;
418
+ }
419
+
420
+ .shared-graph-edge__label {
421
+ display: inline-flex;
422
+ align-items: center;
423
+ justify-content: center;
424
+ min-width: calc(18px * var(--we-graph-inverse-zoom, 1));
425
+ min-height: calc(18px * var(--we-graph-inverse-zoom, 1));
426
+ max-width: calc(6rem * var(--we-graph-inverse-zoom, 1));
427
+ padding:
428
+ calc(1px * var(--we-graph-inverse-zoom, 1))
429
+ calc(5px * var(--we-graph-inverse-zoom, 1));
430
+ border: 1px solid var(--we-graph-line-soft);
431
+ border-radius: 999px;
432
+ background: var(--we-graph-bg);
433
+ color: var(--we-graph-muted);
434
+ font-family: system-ui, sans-serif;
435
+ font-size: clamp(
436
+ calc(12px * var(--we-graph-inverse-zoom, 1)),
437
+ 0.75rem,
438
+ calc(16px * var(--we-graph-inverse-zoom, 1))
439
+ );
440
+ font-weight: 600;
441
+ line-height: 1;
442
+ overflow: hidden;
443
+ text-overflow: ellipsis;
444
+ white-space: nowrap;
445
+ cursor: pointer;
446
+ }
447
+
448
+ .shared-graph-edge__label:hover:not(:disabled),
449
+ .shared-graph-edge__label:focus-visible {
450
+ border-color: var(--we-graph-accent);
451
+ color: var(--we-graph-accent);
452
+ }
453
+
454
+ .shared-graph-edge__label:disabled {
455
+ pointer-events: none;
456
+ }
457
+
458
+ .shared-graph-edge__label.is-emphasized {
459
+ z-index: 1002;
460
+ border-color: var(--we-graph-accent);
461
+ color: var(--we-graph-text);
462
+ }
463
+
464
+ .shared-graph-relation-drag {
465
+ position: fixed;
466
+ inset: 0;
467
+ z-index: 20;
468
+ width: 100vw;
469
+ height: 100vh;
470
+ overflow: visible;
471
+ pointer-events: none;
472
+ }
473
+
474
+ .shared-graph-relation-drag path {
475
+ stroke: var(--we-graph-accent);
476
+ stroke-width: 1.75;
477
+ stroke-linecap: round;
478
+ stroke-dasharray: 4 4;
479
+ }
480
+
481
+ .shared-graph-controls {
482
+ position: absolute;
483
+ inset-inline-start: 0.75rem;
484
+ inset-block-end: 0.75rem;
485
+ z-index: 6;
486
+ display: grid;
487
+ grid-template-columns: repeat(5, 2rem);
488
+ border: 1px solid var(--we-graph-line-soft);
489
+ border-radius: 0.5rem;
490
+ overflow: hidden;
491
+ background: var(--we-graph-panel);
492
+ }
493
+
494
+ .shared-graph-controls button {
495
+ display: inline-flex;
496
+ align-items: center;
497
+ justify-content: center;
498
+ width: 2rem;
499
+ height: 2rem;
500
+ padding: 0;
501
+ border: 0;
502
+ border-inline-end: 1px solid var(--we-graph-line-soft);
503
+ background: transparent;
504
+ color: var(--we-graph-muted);
505
+ cursor: pointer;
506
+ }
507
+
508
+ .shared-graph-controls button:last-child {
509
+ border-inline-end: 0;
510
+ }
511
+
512
+ .shared-graph-controls button:hover:not(:disabled),
513
+ .shared-graph-controls button:focus-visible {
514
+ color: var(--we-graph-accent);
515
+ }
516
+
517
+ .shared-graph-controls button:disabled {
518
+ opacity: 0.28;
519
+ cursor: not-allowed;
520
+ }
521
+
522
+ .shared-graph-controls svg {
523
+ width: 1.125rem;
524
+ height: 1.125rem;
525
+ fill: none;
526
+ stroke: currentColor;
527
+ stroke-width: 1.25;
528
+ stroke-linecap: round;
529
+ stroke-linejoin: round;
530
+ }
@@ -0,0 +1,18 @@
1
+ export { SharedGraphCanvas, forceLayout, graphGlyphKind, graphNodeContentTitle, groupGraphRelations } from "./GraphCanvas.js";
2
+ export type { GraphPosition, GraphFocusRequest, GraphGlyphKind, GraphViewport, GraphVectorState, SharedGraphCanvasProps, SharedGraphNode, SharedGraphRelation, SharedGraphRelationGroupSelection } from "./GraphCanvas.js";
3
+ export { GraphEdge } from "./GraphEdge.js";
4
+ export type { SharedGraphEdgeData } from "./GraphEdge.js";
5
+ export { GRAPH_NODE_METRICS, constrainGraphNodeMetrics, graphNodeMetrics, measureGraphNodeContent } from "./graph-node-metrics.js";
6
+ export type { GraphContentEntity, GraphContentProp, GraphNameAttrPredicate, GraphNodeMetrics } from "./graph-node-metrics.js";
7
+ export { computeGraphEdgeGeometry } from "./graph-edge-geometry.js";
8
+ export type { GraphEdgeGeometry, GraphEdgeGeometryInput } from "./graph-edge-geometry.js";
9
+ export { GRAPH_EDGE_OCCLUSION_HALO, buildGraphEdgeOcclusionIndex, graphEdgeLabelWorldBounds, isGraphEdgeLabelOccluded } from "./graph-edge-mask.js";
10
+ export type { GraphEdgeLabelBounds, GraphEdgeOccluder, GraphEdgeOcclusionIndex } from "./graph-edge-mask.js";
11
+ export { GRAPH_GROUP_LABEL_MAX_LENGTH, GRAPH_GROUP_MIN_SIZE, graphGroupColor, graphGroupsOverlap, isGraphGroupBoundsValid, normalizeGraphGroupLabel, nodesInsideGraphGroup } from "./graph-groups.js";
12
+ export type { GraphGroupBounds, SharedGraphGroup } from "./graph-groups.js";
13
+ export { MIN_NODE_DIST, NODE_DIAMETER, NODE_RADIUS, NODE_SPACING_RADIUS_MULTIPLIER, PLACEMENT_GAP, SAFE_DIST, SAFE_ZONE_MULT, clampToSafeDistance, forcePlacement, placeEntityWithoutOverlap, requiredNodeCenterDistance, resolveOverlaps } from "./graph-placement.js";
14
+ export type { ExistingNode, ForceNode, PlaceableNode, PlacementPoint } from "./graph-placement.js";
15
+ export { PHYSICS_CELL_SIZE, PHYSICS_COLLISION_GAP, PHYSICS_EPSILON, PHYSICS_FLUSH_INTERVAL_MS, PHYSICS_GRID_SIZE, PHYSICS_IDEAL_LEN, PHYSICS_MAX_DT_MS, PHYSICS_MAX_STEP, PHYSICS_MIN_DIST, PHYSICS_MIN_DIST_SQ, PHYSICS_NODE_RADIUS, PHYSICS_OVERLAP_PUSH_FRACTION, PHYSICS_REPULSION_K, PHYSICS_SLEEP_SPEED, PHYSICS_SPRING_GAP, PHYSICS_SPRING_K, PHYSICS_STEP_SCALE, computeNodeMass, findGridSlot, initBodies, snapNodesToGrid, snapToGrid, stepPhysics, tryFindGridSlot } from "./graph-physics.js";
16
+ export type { GridPoint, PhysicsBody, PhysicsEdge, PhysicsSeedNode } from "./graph-physics.js";
17
+ export { createGraphLayoutSolver } from "./graph-layout.js";
18
+ export type { GraphLayoutEdge, GraphLayoutNode, GraphLayoutPosition, GraphLayoutRequest, GraphLayoutSolver, GraphLayoutSolverHandle } from "./graph-layout.js";
@@ -0,0 +1,9 @@
1
+ export { SharedGraphCanvas, forceLayout, graphGlyphKind, graphNodeContentTitle, groupGraphRelations } from "./GraphCanvas.js";
2
+ export { GraphEdge } from "./GraphEdge.js";
3
+ export { GRAPH_NODE_METRICS, constrainGraphNodeMetrics, graphNodeMetrics, measureGraphNodeContent } from "./graph-node-metrics.js";
4
+ export { computeGraphEdgeGeometry } from "./graph-edge-geometry.js";
5
+ export { GRAPH_EDGE_OCCLUSION_HALO, buildGraphEdgeOcclusionIndex, graphEdgeLabelWorldBounds, isGraphEdgeLabelOccluded } from "./graph-edge-mask.js";
6
+ export { GRAPH_GROUP_LABEL_MAX_LENGTH, GRAPH_GROUP_MIN_SIZE, graphGroupColor, graphGroupsOverlap, isGraphGroupBoundsValid, normalizeGraphGroupLabel, nodesInsideGraphGroup } from "./graph-groups.js";
7
+ export { MIN_NODE_DIST, NODE_DIAMETER, NODE_RADIUS, NODE_SPACING_RADIUS_MULTIPLIER, PLACEMENT_GAP, SAFE_DIST, SAFE_ZONE_MULT, clampToSafeDistance, forcePlacement, placeEntityWithoutOverlap, requiredNodeCenterDistance, resolveOverlaps } from "./graph-placement.js";
8
+ export { PHYSICS_CELL_SIZE, PHYSICS_COLLISION_GAP, PHYSICS_EPSILON, PHYSICS_FLUSH_INTERVAL_MS, PHYSICS_GRID_SIZE, PHYSICS_IDEAL_LEN, PHYSICS_MAX_DT_MS, PHYSICS_MAX_STEP, PHYSICS_MIN_DIST, PHYSICS_MIN_DIST_SQ, PHYSICS_NODE_RADIUS, PHYSICS_OVERLAP_PUSH_FRACTION, PHYSICS_REPULSION_K, PHYSICS_SLEEP_SPEED, PHYSICS_SPRING_GAP, PHYSICS_SPRING_K, PHYSICS_STEP_SCALE, computeNodeMass, findGridSlot, initBodies, snapNodesToGrid, snapToGrid, stepPhysics, tryFindGridSlot } from "./graph-physics.js";
9
+ export { createGraphLayoutSolver } from "./graph-layout.js";
@@ -0,0 +1,11 @@
1
+ export declare const SCENARIO_TAGS_V1: readonly ["角色扮演", "世界模拟器", "玩法模拟器", "萝莉", "催眠", "女生视角", "伦理", "调教&强迫", "NTL", "类NTR", "NTR", "剧情", "熟女", "顺从", "西幻", "女频(bl/4i/abo/np)", "修仙", "悬疑", "御姐", "媚黑", "唯美", "救赎", "玄幻", "武侠", "模拟经营", "人兽", "性转", "福瑞", "正太", "校园", "古风", "重口味", "恋爱&攻略", "男娘", "同人", "假小子", "扶她", "兽人", "后宫", "恋足", "工具", "游戏", "抽象", "系统", "隐奸", "露出", "反差", "百合", "情欲肉爱", "羞辱", "异能区", "都市区", "科幻区"];
2
+ export type ScenarioTag = (typeof SCENARIO_TAGS_V1)[number];
3
+ export declare const SCENARIO_TAG_ALL_CHIP: "全部";
4
+ export declare const NSFW_EXPLICIT_TAGS: ReadonlySet<ScenarioTag>;
5
+ export declare const NSFW_MILD_TAGS: ReadonlySet<ScenarioTag>;
6
+ export declare const NSFW_TAGS: ReadonlySet<ScenarioTag>;
7
+ export declare function isKnownScenarioTag(tag: string): tag is ScenarioTag;
8
+ export declare function isNsfwCategoryTag(tag: string): boolean;
9
+ export declare const SCENARIO_TAG_SLUGS: Readonly<Record<ScenarioTag, string>>;
10
+ export declare function scenarioTagI18nKey(tag: string): string;
11
+ export declare function filterTagsForSfwGate(tags: ReadonlyArray<ScenarioTag>, nsfwEnabled: boolean): ReadonlyArray<ScenarioTag>;
@@ -0,0 +1 @@
1
+ var r=["\u89D2\u8272\u626E\u6F14","\u4E16\u754C\u6A21\u62DF\u5668","\u73A9\u6CD5\u6A21\u62DF\u5668","\u841D\u8389","\u50AC\u7720","\u5973\u751F\u89C6\u89D2","\u4F26\u7406","\u8C03\u6559&\u5F3A\u8FEB","NTL","\u7C7BNTR","NTR","\u5267\u60C5","\u719F\u5973","\u987A\u4ECE","\u897F\u5E7B","\u5973\u9891(bl/4i/abo/np)","\u4FEE\u4ED9","\u60AC\u7591","\u5FA1\u59D0","\u5A9A\u9ED1","\u552F\u7F8E","\u6551\u8D4E","\u7384\u5E7B","\u6B66\u4FA0","\u6A21\u62DF\u7ECF\u8425","\u4EBA\u517D","\u6027\u8F6C","\u798F\u745E","\u6B63\u592A","\u6821\u56ED","\u53E4\u98CE","\u91CD\u53E3\u5473","\u604B\u7231&\u653B\u7565","\u7537\u5A18","\u540C\u4EBA","\u5047\u5C0F\u5B50","\u6276\u5979","\u517D\u4EBA","\u540E\u5BAB","\u604B\u8DB3","\u5DE5\u5177","\u6E38\u620F","\u62BD\u8C61","\u7CFB\u7EDF","\u9690\u5978","\u9732\u51FA","\u53CD\u5DEE","\u767E\u5408","\u60C5\u6B32\u8089\u7231","\u7F9E\u8FB1","\u5F02\u80FD\u533A","\u90FD\u5E02\u533A","\u79D1\u5E7B\u533A"],S="\u5168\u90E8";var a=new Set(["\u91CD\u53E3\u5473","\u8C03\u6559&\u5F3A\u8FEB","NTR","\u7C7BNTR","NTL","\u5A9A\u9ED1","\u4EBA\u517D","\u9690\u5978","\u9732\u51FA","\u60C5\u6B32\u8089\u7231","\u7F9E\u8FB1","\u6027\u8F6C"]),t=new Set(["\u841D\u8389","\u6B63\u592A","\u5FA1\u59D0","\u719F\u5973","\u987A\u4ECE","\u540E\u5BAB","\u604B\u8DB3","\u517D\u4EBA","\u798F\u745E","\u7537\u5A18","\u5047\u5C0F\u5B50","\u6276\u5979","\u767E\u5408","\u5A9A\u9ED1"]),n=new Set([...a,...t]);function T(e){return n.has(e)}var c=new Set(r);function g(e){return c.has(e)}var i={\u89D2\u8272\u626E\u6F14:"roleplay",\u4E16\u754C\u6A21\u62DF\u5668:"worldSim",\u73A9\u6CD5\u6A21\u62DF\u5668:"gameplaySim",\u841D\u8389:"loli",\u50AC\u7720:"hypnosis",\u5973\u751F\u89C6\u89D2:"femalePov",\u4F26\u7406:"ethics","\u8C03\u6559&\u5F3A\u8FEB":"discipline",NTL:"ntl",\u7C7BNTR:"ntrLike",NTR:"ntr",\u5267\u60C5:"story",\u719F\u5973:"mature",\u987A\u4ECE:"submissive",\u897F\u5E7B:"westernFantasy","\u5973\u9891(bl/4i/abo/np)":"femaleGenre",\u4FEE\u4ED9:"cultivation",\u60AC\u7591:"mystery",\u5FA1\u59D0:"gyaru",\u5A9A\u9ED1:"interracial",\u552F\u7F8E:"aesthetic",\u6551\u8D4E:"redemption",\u7384\u5E7B:"xuanhuan",\u6B66\u4FA0:"wuxia",\u6A21\u62DF\u7ECF\u8425:"management",\u4EBA\u517D:"bestiality",\u6027\u8F6C:"genderSwap",\u798F\u745E:"furry",\u6B63\u592A:"shota",\u6821\u56ED:"school",\u53E4\u98CE:"ancient",\u91CD\u53E3\u5473:"hardcore","\u604B\u7231&\u653B\u7565":"romance",\u7537\u5A18:"otokonoko",\u540C\u4EBA:"fanwork",\u5047\u5C0F\u5B50:"tomboy",\u6276\u5979:"futanari",\u517D\u4EBA:"beastman",\u540E\u5BAB:"harem",\u604B\u8DB3:"footFetish",\u5DE5\u5177:"tool",\u6E38\u620F:"game",\u62BD\u8C61:"abstract",\u7CFB\u7EDF:"system",\u9690\u5978:"sleepAssault",\u9732\u51FA:"exhibitionism",\u53CD\u5DEE:"contrast",\u767E\u5408:"yuri",\u60C5\u6B32\u8089\u7231:"passion",\u7F9E\u8FB1:"humiliation",\u5F02\u80FD\u533A:"superpowerZone",\u90FD\u5E02\u533A:"urbanZone",\u79D1\u5E7B\u533A:"scifiZone"};function p(e){let o=i[e];return o===void 0?e:`scenarioTag.${o}`}function l(e,o){return o?e:e.filter(s=>!n.has(s))}export{a as NSFW_EXPLICIT_TAGS,t as NSFW_MILD_TAGS,n as NSFW_TAGS,r as SCENARIO_TAGS_V1,S as SCENARIO_TAG_ALL_CHIP,i as SCENARIO_TAG_SLUGS,l as filterTagsForSfwGate,g as isKnownScenarioTag,T as isNsfwCategoryTag,p as scenarioTagI18nKey};
@@ -0,0 +1,14 @@
1
+ import type { SpatialCreateRequest, SpatialRemoveRequest, SpatialUpdateRequest, SpatialWorldSourceV1 } from "@world-engines/spatial-authoring";
2
+ export interface MapWorkspaceProps {
3
+ /** 真实空间作者源,仅从 ProjectHost adapter 读入。 */
4
+ readonly source: SpatialWorldSourceV1;
5
+ readonly selected_object_id: string | null;
6
+ /** revision/readback 围栏关闭时不得调用宿主 mutation。 */
7
+ readonly disabled: boolean;
8
+ readonly onSelectObject: (object_id: string) => void;
9
+ readonly onCreateObject?: (request: SpatialCreateRequest) => void;
10
+ readonly onUpdateObject?: (request: SpatialUpdateRequest) => void;
11
+ readonly onRemoveObject?: (request: SpatialRemoveRequest) => void;
12
+ }
13
+ /** 将 spatial-authoring 的真实编辑器嵌入桌面作者壳;持久化一律回到 adapter。 */
14
+ export declare function MapWorkspace({ source, selected_object_id, disabled, onSelectObject, onCreateObject, onUpdateObject, onRemoveObject }: MapWorkspaceProps): JSX.Element;
@@ -0,0 +1,9 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { SpatialWorldEditor } from "@world-engines/spatial-authoring";
3
+ /** 将 spatial-authoring 的真实编辑器嵌入桌面作者壳;持久化一律回到 adapter。 */
4
+ export function MapWorkspace({ source, selected_object_id, disabled, onSelectObject, onCreateObject, onUpdateObject, onRemoveObject }) {
5
+ return (_jsxs("section", { "aria-label": "Map \u5DE5\u4F5C\u533A", "data-testid": "map-workspace", children: [_jsxs("header", { children: [_jsx("h1", { children: "Map" }), _jsx("p", { children: selected_object_id === null ? "未选择空间对象" : `已选择 ${selected_object_id}` }), disabled ? _jsx("p", { role: "status", children: "\u7A7A\u95F4 source \u5F53\u524D\u53EA\u8BFB\u3002" }) : null] }), _jsx(SpatialWorldEditor, { onSelectionChange: (object) => {
6
+ if (!disabled && object !== undefined)
7
+ onSelectObject(object.id);
8
+ }, disabled: disabled, ...(onCreateObject === undefined ? {} : { onCreate: onCreateObject }), ...(onUpdateObject === undefined ? {} : { onUpdate: onUpdateObject }), ...(onRemoveObject === undefined ? {} : { onRemove: onRemoveObject }), selectedId: selected_object_id, source: source })] }));
9
+ }
@@ -0,0 +1,10 @@
1
+ import "./score-radar.css";
2
+ import { type PresentationScoreAxisKey, type ScoreAxisMap, type ScoreSource, type StoryScoreAxisKey } from "./score-presentation.js";
3
+ export interface ScoreRadarProps {
4
+ readonly story: ScoreAxisMap<StoryScoreAxisKey>;
5
+ readonly presentation: ScoreAxisMap<PresentationScoreAxisKey>;
6
+ readonly comparisonSelected: boolean;
7
+ readonly source: ScoreSource;
8
+ readonly className?: string;
9
+ }
10
+ export declare function ScoreRadar({ story, presentation, comparisonSelected, source, className }: ScoreRadarProps): JSX.Element;