@vanduo-oss/vd3-cbun 1.0.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 (45) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/LICENSE +22 -0
  3. package/README.md +160 -0
  4. package/SKILL.md +119 -0
  5. package/dist/charts/core.d.ts +273 -0
  6. package/dist/charts/index.cjs +1828 -0
  7. package/dist/charts/index.cjs.map +7 -0
  8. package/dist/charts/index.d.ts +65 -0
  9. package/dist/charts/index.js +1805 -0
  10. package/dist/charts/index.js.map +7 -0
  11. package/dist/charts/vd3-charts.css +51 -0
  12. package/dist/charts/vue.d.ts +86 -0
  13. package/dist/flowchart/core.d.ts +288 -0
  14. package/dist/flowchart/index.cjs +3447 -0
  15. package/dist/flowchart/index.cjs.map +7 -0
  16. package/dist/flowchart/index.d.ts +54 -0
  17. package/dist/flowchart/index.js +3424 -0
  18. package/dist/flowchart/index.js.map +7 -0
  19. package/dist/flowchart/vd3-flowchart.css +600 -0
  20. package/dist/flowchart/vue.d.ts +66 -0
  21. package/dist/hex-grid/core.d.ts +200 -0
  22. package/dist/hex-grid/hex-math.cjs +162 -0
  23. package/dist/hex-grid/hex-math.cjs.map +7 -0
  24. package/dist/hex-grid/hex-math.d.ts +119 -0
  25. package/dist/hex-grid/hex-math.js +141 -0
  26. package/dist/hex-grid/hex-math.js.map +7 -0
  27. package/dist/hex-grid/index.cjs +915 -0
  28. package/dist/hex-grid/index.cjs.map +7 -0
  29. package/dist/hex-grid/index.d.ts +15 -0
  30. package/dist/hex-grid/index.js +894 -0
  31. package/dist/hex-grid/index.js.map +7 -0
  32. package/dist/hex-grid/vue.d.ts +14 -0
  33. package/dist/index.d.ts +13 -0
  34. package/dist/index.js +11 -0
  35. package/dist/index.js.map +7 -0
  36. package/dist/meta.json +551 -0
  37. package/dist/music-player/core.d.ts +88 -0
  38. package/dist/music-player/index.cjs +1227 -0
  39. package/dist/music-player/index.cjs.map +7 -0
  40. package/dist/music-player/index.d.ts +12 -0
  41. package/dist/music-player/index.js +1204 -0
  42. package/dist/music-player/index.js.map +7 -0
  43. package/dist/music-player/vd3-music-player.css +829 -0
  44. package/dist/music-player/vue.d.ts +32 -0
  45. package/package.json +105 -0
@@ -0,0 +1,600 @@
1
+ :root {
2
+ --vd-flowchart-surface: var(--vd-bg-primary, #fcfbf7);
3
+ --vd-flowchart-panel: color-mix(in srgb, var(--vd-bg-primary, #ffffff) 90%, #efe7d4);
4
+ --vd-flowchart-panel-alt: color-mix(in srgb, var(--vd-bg-secondary, #f4efe2) 82%, #ffffff);
5
+ --vd-flowchart-border: color-mix(in srgb, var(--vd-border-color, #d5ccba) 78%, #ffffff);
6
+ --vd-flowchart-accent: var(--vd-color-primary, #245f52);
7
+ --vd-flowchart-accent-soft: color-mix(in srgb, var(--vd-color-primary, #245f52) 16%, transparent);
8
+ --vd-flowchart-text: var(--vd-text-primary, #1f2720);
9
+ --vd-flowchart-muted: var(--vd-text-muted, #67746a);
10
+ --vd-flowchart-node-fill: color-mix(in srgb, var(--vd-bg-primary, #ffffff) 95%, #f1e7cf);
11
+ --vd-flowchart-node-stroke: color-mix(in srgb, var(--vd-border-color, #d5ccba) 86%, #ffffff);
12
+ /* Selected/hover node + edge state. Set these (and --vd-flowchart-node-fill)
13
+ directly to retheme without `!important`; the cream blend above is only the
14
+ default and is fully overridable. */
15
+ --vd-flowchart-node-fill-selected: color-mix(in srgb, var(--vd-flowchart-accent) 86%, #ffffff);
16
+ --vd-flowchart-node-stroke-selected: var(--vd-flowchart-accent);
17
+ --vd-flowchart-edge-stroke: color-mix(in srgb, var(--vd-flowchart-accent) 70%, var(--vd-flowchart-text));
18
+ --vd-flowchart-edge-stroke-selected: var(--vd-flowchart-accent);
19
+ --vd-flowchart-edge-label: var(--vd-flowchart-muted);
20
+ /* Surfaces. Defaults reproduce the original gradient/mixes exactly. */
21
+ --vd-flowchart-shell-bg:
22
+ radial-gradient(circle at top left, color-mix(in srgb, var(--vd-flowchart-accent) 10%, transparent), transparent 38%),
23
+ linear-gradient(180deg, color-mix(in srgb, var(--vd-flowchart-surface) 92%, #f5ecd8), var(--vd-flowchart-surface));
24
+ --vd-flowchart-canvas-bg: transparent;
25
+ --vd-flowchart-toolbar-bg: color-mix(in srgb, var(--vd-flowchart-panel) 92%, transparent);
26
+ --vd-flowchart-panel-bg: color-mix(in srgb, var(--vd-flowchart-panel-alt) 88%, transparent);
27
+ /* Font for SVG text + UI chrome (SVG <text> does not inherit reliably). */
28
+ --vd-flowchart-font: inherit;
29
+ }
30
+
31
+ .vd-flowchart-host {
32
+ /* A definite height (not just min-height) so the editor's internal grid can
33
+ size its body row deterministically. Consumers that set a larger min-height
34
+ or height still win — the used height is the larger of the two and stays
35
+ definite, which keeps the canvas from resizing when the inspector fills in. */
36
+ height: 560px;
37
+ font-family: var(--vd-flowchart-font);
38
+ }
39
+
40
+ .vd-flowchart-shell {
41
+ display: grid;
42
+ grid-template-rows: auto minmax(0, 1fr);
43
+ height: 100%;
44
+ min-height: 560px;
45
+ border: 1px solid var(--vd-flowchart-border);
46
+ border-radius: 8px;
47
+ background: var(--vd-flowchart-shell-bg);
48
+ color: var(--vd-flowchart-text);
49
+ overflow: hidden;
50
+ }
51
+
52
+ .vd-flowchart-toolbar {
53
+ display: flex;
54
+ align-items: center;
55
+ justify-content: space-between;
56
+ gap: 0.75rem;
57
+ padding: 0.75rem 0.9rem;
58
+ border-bottom: 1px solid var(--vd-flowchart-border);
59
+ background: var(--vd-flowchart-toolbar-bg);
60
+ backdrop-filter: blur(16px);
61
+ }
62
+
63
+ .vd-flowchart-toolbar-group {
64
+ display: flex;
65
+ align-items: center;
66
+ gap: 0.5rem;
67
+ flex-wrap: wrap;
68
+ }
69
+
70
+ .vd-flowchart-toolbar-label {
71
+ font-size: 0.8rem;
72
+ color: var(--vd-flowchart-muted);
73
+ letter-spacing: 0;
74
+ }
75
+
76
+ .vd-flowchart-body {
77
+ display: grid;
78
+ grid-template-columns: 220px minmax(0, 1fr) 300px;
79
+ min-height: 0;
80
+ }
81
+
82
+ .vd-flowchart-panel {
83
+ display: flex;
84
+ flex-direction: column;
85
+ gap: 0.9rem;
86
+ padding: 0.95rem;
87
+ background: var(--vd-flowchart-panel-bg);
88
+ /* Scroll the panel's own content instead of growing the shell (and with it
89
+ the canvas) when a selection populates the inspector. */
90
+ min-height: 0;
91
+ overflow-y: auto;
92
+ }
93
+
94
+ .vd-flowchart-panel--palette {
95
+ border-right: 1px solid var(--vd-flowchart-border);
96
+ }
97
+
98
+ .vd-flowchart-panel--inspector {
99
+ border-left: 1px solid var(--vd-flowchart-border);
100
+ }
101
+
102
+ .vd-flowchart-panel-title {
103
+ margin: 0;
104
+ font-size: 0.85rem;
105
+ font-weight: 700;
106
+ text-transform: uppercase;
107
+ color: var(--vd-flowchart-muted);
108
+ }
109
+
110
+ .vd-flowchart-palette {
111
+ display: grid;
112
+ grid-template-columns: repeat(2, minmax(0, 1fr));
113
+ gap: 0.55rem;
114
+ }
115
+
116
+ .vd-flowchart-btn,
117
+ .vd-flowchart-palette-btn,
118
+ .vd-flowchart-field input,
119
+ .vd-flowchart-field select,
120
+ .vd-flowchart-field textarea,
121
+ .vd-flowchart-json textarea {
122
+ font: inherit;
123
+ }
124
+
125
+ .vd-flowchart-btn,
126
+ .vd-flowchart-palette-btn,
127
+ .vd-flowchart-json-btn {
128
+ appearance: none;
129
+ border: 1px solid var(--vd-flowchart-border);
130
+ border-radius: 6px;
131
+ background: color-mix(in srgb, var(--vd-flowchart-panel) 90%, #ffffff);
132
+ color: var(--vd-flowchart-text);
133
+ cursor: pointer;
134
+ transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
135
+ }
136
+
137
+ .vd-flowchart-btn,
138
+ .vd-flowchart-json-btn {
139
+ min-height: 2rem;
140
+ padding: 0.45rem 0.75rem;
141
+ }
142
+
143
+ .vd-flowchart-palette-btn {
144
+ display: flex;
145
+ flex-direction: column;
146
+ align-items: center;
147
+ justify-content: center;
148
+ gap: 0.35rem;
149
+ min-height: 4.35rem;
150
+ padding: 0.55rem 0.45rem;
151
+ text-align: center;
152
+ font-size: 0.82rem;
153
+ }
154
+
155
+ .vd-flowchart-palette-preview {
156
+ display: block;
157
+ width: 4.5rem;
158
+ max-width: 100%;
159
+ height: 2.75rem;
160
+ overflow: visible;
161
+ }
162
+
163
+ .vd-flowchart-palette-shape {
164
+ fill: var(--vd-flowchart-node-fill);
165
+ stroke: var(--vd-flowchart-node-stroke);
166
+ stroke-width: 2;
167
+ }
168
+
169
+ .vd-flowchart-palette-shape--textbox {
170
+ stroke-dasharray: 5 4;
171
+ }
172
+
173
+ .vd-flowchart-palette-shape--junction {
174
+ fill: var(--vd-flowchart-accent);
175
+ stroke: color-mix(in srgb, var(--vd-flowchart-accent) 74%, var(--vd-flowchart-text));
176
+ }
177
+
178
+ .vd-flowchart-palette-lines {
179
+ fill: none;
180
+ stroke: var(--vd-flowchart-muted);
181
+ stroke-width: 2;
182
+ stroke-linecap: round;
183
+ }
184
+
185
+ .vd-flowchart-palette-arrow {
186
+ fill: none;
187
+ stroke: color-mix(in srgb, var(--vd-flowchart-accent) 72%, var(--vd-flowchart-text));
188
+ stroke-width: 3;
189
+ stroke-linecap: round;
190
+ }
191
+
192
+ .vd-flowchart-palette-arrowhead {
193
+ fill: var(--vd-flowchart-accent);
194
+ }
195
+
196
+ .vd-flowchart-palette-junction-lines {
197
+ fill: none;
198
+ stroke: color-mix(in srgb, var(--vd-flowchart-accent) 42%, var(--vd-flowchart-muted));
199
+ stroke-width: 2;
200
+ stroke-linecap: round;
201
+ }
202
+
203
+ .vd-flowchart-palette-label-mark {
204
+ fill: var(--vd-flowchart-text);
205
+ font-family: var(--vd-flowchart-font);
206
+ font-size: 18px;
207
+ font-weight: 700;
208
+ }
209
+
210
+ .vd-flowchart-palette-label {
211
+ display: block;
212
+ line-height: 1.15;
213
+ }
214
+
215
+ .vd-flowchart-btn:hover,
216
+ .vd-flowchart-palette-btn:hover,
217
+ .vd-flowchart-json-btn:hover {
218
+ border-color: color-mix(in srgb, var(--vd-flowchart-accent) 42%, var(--vd-flowchart-border));
219
+ transform: translateY(-1px);
220
+ }
221
+
222
+ .vd-flowchart-palette-btn.is-active {
223
+ border-color: color-mix(in srgb, var(--vd-flowchart-accent) 68%, var(--vd-flowchart-border));
224
+ background: color-mix(in srgb, var(--vd-flowchart-accent) 10%, var(--vd-flowchart-panel));
225
+ box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--vd-flowchart-accent) 24%, transparent);
226
+ }
227
+
228
+ .vd-flowchart-btn:focus-visible,
229
+ .vd-flowchart-palette-btn:focus-visible,
230
+ .vd-flowchart-json-btn:focus-visible,
231
+ .vd-flowchart-field input:focus-visible,
232
+ .vd-flowchart-field select:focus-visible,
233
+ .vd-flowchart-field textarea:focus-visible,
234
+ .vd-flowchart-json textarea:focus-visible,
235
+ .vd-flowchart-canvas:focus-visible {
236
+ outline: 2px solid color-mix(in srgb, var(--vd-flowchart-accent) 72%, transparent);
237
+ outline-offset: 2px;
238
+ }
239
+
240
+ .vd-flowchart-btn:disabled,
241
+ .vd-flowchart-json-btn:disabled {
242
+ cursor: not-allowed;
243
+ opacity: 0.5;
244
+ transform: none;
245
+ }
246
+
247
+ .vd-flowchart-canvas {
248
+ position: relative;
249
+ min-width: 0;
250
+ min-height: 0;
251
+ background: var(--vd-flowchart-canvas-bg);
252
+ }
253
+
254
+ .vd-flowchart-svg {
255
+ display: block;
256
+ width: 100%;
257
+ height: 100%;
258
+ min-height: 0;
259
+ touch-action: none;
260
+ }
261
+
262
+ .vd-flowchart-grid {
263
+ pointer-events: none;
264
+ }
265
+
266
+ .vd-flowchart-edge-path,
267
+ .vd-flowchart-edge-selection,
268
+ .vd-flowchart-edge-hit,
269
+ .vd-flowchart-preview-path {
270
+ fill: none;
271
+ }
272
+
273
+ .vd-flowchart-edge-selection {
274
+ stroke: color-mix(in srgb, var(--vd-flowchart-accent) 28%, transparent);
275
+ stroke-linecap: round;
276
+ stroke-linejoin: round;
277
+ pointer-events: none;
278
+ }
279
+
280
+ .vd-flowchart-edge-path {
281
+ stroke: var(--vd-flowchart-edge-stroke);
282
+ stroke-linecap: round;
283
+ stroke-linejoin: round;
284
+ }
285
+
286
+ .vd-flowchart-edge.is-selected .vd-flowchart-edge-path {
287
+ stroke: var(--vd-flowchart-edge-stroke-selected);
288
+ }
289
+
290
+ .vd-flowchart-edge-hit {
291
+ stroke: transparent;
292
+ cursor: pointer;
293
+ }
294
+
295
+ .vd-flowchart-preview-path {
296
+ stroke: color-mix(in srgb, var(--vd-flowchart-accent) 55%, transparent);
297
+ stroke-dasharray: 8 7;
298
+ stroke-linecap: round;
299
+ stroke-linejoin: round;
300
+ }
301
+
302
+ .vd-flowchart-edge-label {
303
+ font-family: var(--vd-flowchart-font);
304
+ font-size: 12px;
305
+ fill: var(--vd-flowchart-edge-label);
306
+ paint-order: stroke;
307
+ stroke: color-mix(in srgb, var(--vd-flowchart-surface) 94%, transparent);
308
+ stroke-width: 5px;
309
+ stroke-linejoin: round;
310
+ }
311
+
312
+ .vd-flowchart-node {
313
+ cursor: grab;
314
+ }
315
+
316
+ .vd-flowchart-node.is-dragging,
317
+ .vd-flowchart-node.is-resizing {
318
+ cursor: grabbing;
319
+ }
320
+
321
+ .vd-flowchart-node-shape {
322
+ fill: var(--vd-flowchart-node-fill);
323
+ stroke: var(--vd-flowchart-node-stroke);
324
+ stroke-width: 1.5;
325
+ transition: stroke 120ms ease, filter 120ms ease, fill 120ms ease;
326
+ }
327
+
328
+ .vd-flowchart-node-shape--textbox {
329
+ stroke-dasharray: 8 5;
330
+ }
331
+
332
+ .vd-flowchart-node-shape--label {
333
+ fill: transparent;
334
+ stroke: transparent;
335
+ }
336
+
337
+ .vd-flowchart-node-shape--junction {
338
+ fill: var(--vd-flowchart-accent);
339
+ stroke: color-mix(in srgb, var(--vd-flowchart-accent) 72%, var(--vd-flowchart-text));
340
+ stroke-width: 1.25;
341
+ }
342
+
343
+ .vd-flowchart-node.is-selected .vd-flowchart-node-shape,
344
+ .vd-flowchart-node:hover .vd-flowchart-node-shape {
345
+ stroke: var(--vd-flowchart-node-stroke-selected);
346
+ filter: drop-shadow(0 10px 18px color-mix(in srgb, var(--vd-flowchart-accent) 12%, transparent));
347
+ }
348
+
349
+ .vd-flowchart-node:hover .vd-flowchart-node-shape--junction,
350
+ .vd-flowchart-node.is-selected .vd-flowchart-node-shape--junction {
351
+ fill: var(--vd-flowchart-node-fill-selected);
352
+ }
353
+
354
+ .vd-flowchart-node-text {
355
+ fill: var(--vd-flowchart-text);
356
+ font-family: var(--vd-flowchart-font);
357
+ font-size: 14px;
358
+ font-weight: 600;
359
+ pointer-events: none;
360
+ dominant-baseline: middle;
361
+ text-anchor: middle;
362
+ }
363
+
364
+ .vd-flowchart-node-text--textbox {
365
+ font-size: 13px;
366
+ font-weight: 500;
367
+ dominant-baseline: auto;
368
+ text-anchor: start;
369
+ }
370
+
371
+ .vd-flowchart-node-text--label {
372
+ font-size: 18px;
373
+ font-weight: 700;
374
+ }
375
+
376
+ .vd-flowchart-port-group {
377
+ pointer-events: none;
378
+ }
379
+
380
+ .vd-flowchart-port-hit {
381
+ fill: transparent;
382
+ }
383
+
384
+ .vd-flowchart-port {
385
+ opacity: 0;
386
+ fill: color-mix(in srgb, var(--vd-flowchart-panel) 88%, #ffffff);
387
+ stroke: var(--vd-flowchart-accent);
388
+ stroke-width: 2;
389
+ vector-effect: non-scaling-stroke;
390
+ transition: opacity 120ms ease, transform 120ms ease, fill 120ms ease;
391
+ }
392
+
393
+ .vd-flowchart-port-group.is-visible {
394
+ pointer-events: auto;
395
+ cursor: crosshair;
396
+ }
397
+
398
+ .vd-flowchart-port-group.is-visible .vd-flowchart-port {
399
+ opacity: 1;
400
+ }
401
+
402
+ .vd-flowchart-port-group.is-visible:hover .vd-flowchart-port {
403
+ transform: scale(1.08);
404
+ fill: color-mix(in srgb, var(--vd-flowchart-accent) 12%, #ffffff);
405
+ }
406
+
407
+ .vd-flowchart-canvas.is-connecting .vd-flowchart-node:hover .vd-flowchart-node-shape {
408
+ stroke: var(--vd-flowchart-node-stroke);
409
+ filter: none;
410
+ }
411
+
412
+ .vd-flowchart-canvas.is-connecting .vd-flowchart-port-group.is-visible .vd-flowchart-port,
413
+ .vd-flowchart-canvas.is-arrow-tool .vd-flowchart-port-group.is-visible .vd-flowchart-port {
414
+ opacity: 1;
415
+ }
416
+
417
+ .vd-flowchart-canvas.is-connecting .vd-flowchart-port-group.is-visible:hover .vd-flowchart-port,
418
+ .vd-flowchart-canvas.is-arrow-tool .vd-flowchart-port-group.is-visible:hover .vd-flowchart-port {
419
+ transform: none;
420
+ }
421
+
422
+ .vd-flowchart-edge-endpoint-hit {
423
+ fill: transparent;
424
+ cursor: crosshair;
425
+ }
426
+
427
+ .vd-flowchart-edge-endpoint {
428
+ fill: color-mix(in srgb, var(--vd-flowchart-panel) 88%, #ffffff);
429
+ stroke: var(--vd-flowchart-accent);
430
+ stroke-width: 2;
431
+ cursor: crosshair;
432
+ vector-effect: non-scaling-stroke;
433
+ pointer-events: none;
434
+ }
435
+
436
+ .vd-flowchart-edge.is-reconnecting .vd-flowchart-edge-path {
437
+ stroke-dasharray: 6 4;
438
+ }
439
+
440
+ .vd-flowchart-node.is-editing .vd-flowchart-node-text {
441
+ opacity: 0;
442
+ }
443
+
444
+ .vd-flowchart-resize-zone {
445
+ fill: transparent;
446
+ pointer-events: all;
447
+ }
448
+
449
+ .vd-flowchart-resize-handle {
450
+ fill: color-mix(in srgb, var(--vd-flowchart-panel) 92%, #ffffff);
451
+ stroke: var(--vd-flowchart-accent);
452
+ stroke-width: 1.5;
453
+ vector-effect: non-scaling-stroke;
454
+ pointer-events: all;
455
+ }
456
+
457
+ .vd-flowchart-text-editor {
458
+ position: absolute;
459
+ z-index: 5;
460
+ box-sizing: border-box;
461
+ min-width: 0;
462
+ min-height: 0;
463
+ border: 1px solid color-mix(in srgb, var(--vd-flowchart-accent) 78%, var(--vd-flowchart-border));
464
+ border-radius: 8px;
465
+ background: color-mix(in srgb, var(--vd-flowchart-panel) 92%, #ffffff);
466
+ color: var(--vd-flowchart-text);
467
+ box-shadow: 0 12px 26px color-mix(in srgb, var(--vd-flowchart-accent) 16%, transparent);
468
+ font: inherit;
469
+ font-weight: 600;
470
+ outline: none;
471
+ overflow: hidden;
472
+ resize: none;
473
+ text-align: center;
474
+ }
475
+
476
+ .vd-flowchart-text-editor--textbox {
477
+ border-style: dashed;
478
+ font-weight: 500;
479
+ text-align: left;
480
+ }
481
+
482
+ .vd-flowchart-text-editor--label {
483
+ border-color: transparent;
484
+ background: color-mix(in srgb, var(--vd-flowchart-panel) 82%, transparent);
485
+ font-weight: 700;
486
+ }
487
+
488
+ .vd-flowchart-selection-meta {
489
+ font-size: 0.86rem;
490
+ color: var(--vd-flowchart-muted);
491
+ }
492
+
493
+ .vd-flowchart-selection-empty {
494
+ margin: 0;
495
+ font-size: 0.92rem;
496
+ color: var(--vd-flowchart-muted);
497
+ }
498
+
499
+ .vd-flowchart-fields {
500
+ display: flex;
501
+ flex-direction: column;
502
+ gap: 0.75rem;
503
+ }
504
+
505
+ .vd-flowchart-field-grid {
506
+ display: grid;
507
+ grid-template-columns: repeat(2, minmax(0, 1fr));
508
+ gap: 0.7rem;
509
+ }
510
+
511
+ .vd-flowchart-field {
512
+ display: flex;
513
+ flex-direction: column;
514
+ gap: 0.35rem;
515
+ }
516
+
517
+ .vd-flowchart-field label {
518
+ font-size: 0.78rem;
519
+ color: var(--vd-flowchart-muted);
520
+ }
521
+
522
+ .vd-flowchart-field input,
523
+ .vd-flowchart-field select,
524
+ .vd-flowchart-field textarea,
525
+ .vd-flowchart-json textarea {
526
+ border: 1px solid var(--vd-flowchart-border);
527
+ border-radius: 6px;
528
+ background: color-mix(in srgb, var(--vd-flowchart-panel) 94%, #ffffff);
529
+ color: var(--vd-flowchart-text);
530
+ padding: 0.55rem 0.65rem;
531
+ }
532
+
533
+ .vd-flowchart-field textarea,
534
+ .vd-flowchart-json textarea {
535
+ resize: vertical;
536
+ min-height: 5.5rem;
537
+ }
538
+
539
+ .vd-flowchart-delete {
540
+ width: 100%;
541
+ }
542
+
543
+ .vd-flowchart-json {
544
+ display: flex;
545
+ flex-direction: column;
546
+ gap: 0.65rem;
547
+ min-height: 0;
548
+ }
549
+
550
+ .vd-flowchart-json-actions {
551
+ display: flex;
552
+ gap: 0.55rem;
553
+ }
554
+
555
+ .vd-flowchart-json textarea {
556
+ min-height: 13rem;
557
+ font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
558
+ font-size: 0.78rem;
559
+ line-height: 1.45;
560
+ }
561
+
562
+ .vd-flowchart-readonly .vd-flowchart-panel--palette,
563
+ .vd-flowchart-readonly .vd-flowchart-panel--inspector {
564
+ display: none;
565
+ }
566
+
567
+ .vd-flowchart-readonly .vd-flowchart-body {
568
+ grid-template-columns: minmax(0, 1fr);
569
+ }
570
+
571
+ @media (max-width: 1180px) {
572
+ .vd-flowchart-body {
573
+ grid-template-columns: 200px minmax(0, 1fr);
574
+ /* Cap the stacked inspector so it scrolls rather than stealing canvas
575
+ height (which would make the canvas jump on selection). */
576
+ grid-template-rows: minmax(0, 1fr) minmax(0, 16rem);
577
+ }
578
+
579
+ .vd-flowchart-panel--inspector {
580
+ grid-column: 1 / -1;
581
+ border-left: 0;
582
+ border-top: 1px solid var(--vd-flowchart-border);
583
+ }
584
+ }
585
+
586
+ @media (max-width: 840px) {
587
+ .vd-flowchart-body {
588
+ grid-template-columns: 1fr;
589
+ grid-template-rows: auto minmax(280px, 1fr) minmax(0, 16rem);
590
+ }
591
+
592
+ .vd-flowchart-panel--palette {
593
+ border-right: 0;
594
+ border-bottom: 1px solid var(--vd-flowchart-border);
595
+ }
596
+
597
+ .vd-flowchart-palette {
598
+ grid-template-columns: repeat(3, minmax(0, 1fr));
599
+ }
600
+ }
@@ -0,0 +1,66 @@
1
+ import type { DefineComponent } from 'vue';
2
+ import type {
3
+ FlowchartDocument,
4
+ FlowchartChangeEvent,
5
+ FlowchartSelectEvent,
6
+ FlowchartViewportEvent,
7
+ FlowchartConnectEvent,
8
+ VdFlowchart as VdFlowchartCore,
9
+ LayoutMode,
10
+ LayoutOptions,
11
+ } from './core';
12
+
13
+ /** Loosely-typed document accepted by the `data` prop. */
14
+ export interface VdFlowchartDocument extends Partial<FlowchartDocument> {
15
+ nodes?: Array<Record<string, unknown>>;
16
+ edges?: Array<Record<string, unknown>>;
17
+ [key: string]: unknown;
18
+ }
19
+
20
+ export interface VdFlowchartProps {
21
+ /** Flowchart document ({ nodes, edges }). */
22
+ data?: VdFlowchartDocument;
23
+ /** Render as a non-editable viewer. */
24
+ readonly?: boolean;
25
+ /** Background grid size in px. */
26
+ gridSize?: number;
27
+ /** Keep the current selection across data-driven reloads when possible. */
28
+ preserveSelection?: boolean;
29
+ /** Fit the view to content once the editor reports a measurable size. */
30
+ autoFit?: boolean;
31
+ /** Enable the built-in undo/redo history (default true). */
32
+ history?: boolean;
33
+ /** Maximum number of history entries to retain. */
34
+ historyLimit?: number;
35
+ }
36
+
37
+ export interface VdFlowchartEmits {
38
+ (event: 'change', payload: FlowchartChangeEvent): void;
39
+ (event: 'select', payload: FlowchartSelectEvent): void;
40
+ (event: 'viewport', payload: FlowchartViewportEvent): void;
41
+ (event: 'connect', payload: FlowchartConnectEvent): void;
42
+ (event: 'ready', instance: VdFlowchartCore): void;
43
+ }
44
+
45
+ /** Methods exposed via a template ref. */
46
+ export interface VdFlowchartExposed {
47
+ getInstance(): VdFlowchartCore | null;
48
+ undo(): void;
49
+ redo(): void;
50
+ canUndo(): boolean;
51
+ canRedo(): boolean;
52
+ layout(mode?: LayoutMode, options?: LayoutOptions): void;
53
+ }
54
+
55
+ /* eslint-disable @typescript-eslint/no-empty-object-type -- DefineComponent filler params */
56
+ export declare const VdFlowchart: DefineComponent<
57
+ VdFlowchartProps,
58
+ VdFlowchartExposed,
59
+ {},
60
+ {},
61
+ {},
62
+ {},
63
+ {},
64
+ VdFlowchartEmits
65
+ >;
66
+ /* eslint-enable @typescript-eslint/no-empty-object-type */