@realflow/compat 0.1.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.
package/dist/style.css ADDED
@@ -0,0 +1,642 @@
1
+ /* ReFlow default theme — beautiful out of the box, light & dark. */
2
+
3
+ .rf-container {
4
+ /* ── design tokens (light) ─────────────────────────────────────────── */
5
+ --rf-accent: #6366f1;
6
+ --rf-accent-soft: rgba(99, 102, 241, 0.14);
7
+ --rf-danger: #f43f5e;
8
+ --rf-bg: #fafafa;
9
+ --rf-pattern: #c9c9d2;
10
+ --rf-node-bg: #ffffff;
11
+ --rf-node-border: #e4e4e7;
12
+ --rf-node-border-hover: #c7c7d1;
13
+ --rf-node-text: #18181b;
14
+ --rf-node-text-dim: #71717a;
15
+ --rf-node-shadow: 0 1px 2px rgba(24, 24, 27, 0.06), 0 4px 12px rgba(24, 24, 27, 0.05);
16
+ --rf-node-shadow-hover: 0 2px 4px rgba(24, 24, 27, 0.08), 0 8px 24px rgba(24, 24, 27, 0.1);
17
+ --rf-node-radius: 10px;
18
+ --rf-edge: #9ca3af;
19
+ --rf-edge-hover: #6b7280;
20
+ --rf-edge-selected: var(--rf-accent);
21
+ --rf-edge-width: 1.5px;
22
+ --rf-edge-label-bg: rgba(255, 255, 255, 0.92);
23
+ --rf-edge-label-text: #52525b;
24
+ --rf-handle-bg: #ffffff;
25
+ --rf-handle-border: #a1a1aa;
26
+ --rf-panel-bg: rgba(255, 255, 255, 0.85);
27
+ --rf-panel-border: rgba(24, 24, 27, 0.08);
28
+ --rf-panel-shadow: 0 4px 20px rgba(24, 24, 27, 0.1);
29
+ --rf-minimap-node: rgba(24, 24, 27, 0.14);
30
+ --rf-minimap-mask: rgba(99, 102, 241, 0.08);
31
+ --rf-group-bg: rgba(99, 102, 241, 0.05);
32
+ --rf-group-border: rgba(99, 102, 241, 0.35);
33
+
34
+ position: relative;
35
+ width: 100%;
36
+ height: 100%;
37
+ overflow: hidden;
38
+ outline: none;
39
+ background: var(--rf-bg);
40
+ font-family:
41
+ ui-sans-serif,
42
+ system-ui,
43
+ -apple-system,
44
+ 'Segoe UI',
45
+ Roboto,
46
+ 'Helvetica Neue',
47
+ sans-serif;
48
+ -webkit-font-smoothing: antialiased;
49
+ user-select: none;
50
+ -webkit-user-select: none;
51
+ touch-action: none;
52
+ color: var(--rf-node-text);
53
+ }
54
+
55
+ .rf-container[data-rf-theme='dark'] {
56
+ color-scheme: dark;
57
+ }
58
+
59
+ @media (prefers-color-scheme: dark) {
60
+ .rf-container:not([data-rf-theme='light']) {
61
+ color-scheme: dark;
62
+ }
63
+ }
64
+
65
+ .rf-container[data-rf-theme='dark'],
66
+ :root[data-theme='dark'] .rf-container:not([data-rf-theme='light']) {
67
+ --rf-accent: #818cf8;
68
+ --rf-accent-soft: rgba(129, 140, 248, 0.18);
69
+ --rf-bg: #0b0b0f;
70
+ --rf-pattern: #2e2e38;
71
+ --rf-node-bg: #17171c;
72
+ --rf-node-border: #26262e;
73
+ --rf-node-border-hover: #3d3d49;
74
+ --rf-node-text: #e6e6ea;
75
+ --rf-node-text-dim: #86868f;
76
+ --rf-node-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 6px 16px rgba(0, 0, 0, 0.35);
77
+ --rf-node-shadow-hover: 0 2px 4px rgba(0, 0, 0, 0.5), 0 10px 28px rgba(0, 0, 0, 0.5);
78
+ --rf-edge: #4b5563;
79
+ --rf-edge-hover: #7b8494;
80
+ --rf-edge-label-bg: rgba(23, 23, 28, 0.92);
81
+ --rf-edge-label-text: #a1a1aa;
82
+ --rf-handle-bg: #17171c;
83
+ --rf-handle-border: #52525f;
84
+ --rf-panel-bg: rgba(23, 23, 28, 0.85);
85
+ --rf-panel-border: rgba(255, 255, 255, 0.09);
86
+ --rf-panel-shadow: 0 4px 24px rgba(0, 0, 0, 0.55);
87
+ --rf-minimap-node: rgba(230, 230, 234, 0.22);
88
+ --rf-minimap-mask: rgba(129, 140, 248, 0.12);
89
+ --rf-group-bg: rgba(129, 140, 248, 0.07);
90
+ --rf-group-border: rgba(129, 140, 248, 0.4);
91
+ }
92
+
93
+ @media (prefers-color-scheme: dark) {
94
+ .rf-container:not([data-rf-theme='light']) {
95
+ --rf-accent: #818cf8;
96
+ --rf-accent-soft: rgba(129, 140, 248, 0.18);
97
+ --rf-bg: #0b0b0f;
98
+ --rf-pattern: #2e2e38;
99
+ --rf-node-bg: #17171c;
100
+ --rf-node-border: #26262e;
101
+ --rf-node-border-hover: #3d3d49;
102
+ --rf-node-text: #e6e6ea;
103
+ --rf-node-text-dim: #86868f;
104
+ --rf-node-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 6px 16px rgba(0, 0, 0, 0.35);
105
+ --rf-node-shadow-hover: 0 2px 4px rgba(0, 0, 0, 0.5), 0 10px 28px rgba(0, 0, 0, 0.5);
106
+ --rf-edge: #4b5563;
107
+ --rf-edge-hover: #7b8494;
108
+ --rf-edge-label-bg: rgba(23, 23, 28, 0.92);
109
+ --rf-edge-label-text: #a1a1aa;
110
+ --rf-handle-bg: #17171c;
111
+ --rf-handle-border: #52525f;
112
+ --rf-panel-bg: rgba(23, 23, 28, 0.85);
113
+ --rf-panel-border: rgba(255, 255, 255, 0.09);
114
+ --rf-panel-shadow: 0 4px 24px rgba(0, 0, 0, 0.55);
115
+ --rf-minimap-node: rgba(230, 230, 234, 0.22);
116
+ --rf-minimap-mask: rgba(129, 140, 248, 0.12);
117
+ --rf-group-bg: rgba(129, 140, 248, 0.07);
118
+ --rf-group-border: rgba(129, 140, 248, 0.4);
119
+ }
120
+ }
121
+
122
+ /* Explicit light override wins over page-level dark. */
123
+ .rf-container[data-rf-theme='light'] {
124
+ color-scheme: light;
125
+ }
126
+
127
+ /* ── layers ──────────────────────────────────────────────────────────── */
128
+
129
+ .rf-viewport {
130
+ position: absolute;
131
+ top: 0;
132
+ left: 0;
133
+ transform-origin: 0 0;
134
+ will-change: transform;
135
+ z-index: 1;
136
+ }
137
+
138
+ .rf-background {
139
+ position: absolute;
140
+ inset: 0;
141
+ width: 100%;
142
+ height: 100%;
143
+ z-index: 0;
144
+ pointer-events: none;
145
+ }
146
+
147
+ .rf-bg-dot {
148
+ fill: var(--rf-pattern);
149
+ }
150
+
151
+ .rf-bg-line,
152
+ .rf-bg-cross {
153
+ stroke: var(--rf-pattern);
154
+ }
155
+
156
+ /* ── nodes ───────────────────────────────────────────────────────────── */
157
+
158
+ .rf-nodes {
159
+ position: absolute;
160
+ top: 0;
161
+ left: 0;
162
+ }
163
+
164
+ .rf-node {
165
+ position: absolute;
166
+ top: 0;
167
+ left: 0;
168
+ will-change: transform;
169
+ }
170
+
171
+ .rf-node.rf-draggable {
172
+ cursor: grab;
173
+ }
174
+
175
+ .rf-node.rf-draggable:active {
176
+ cursor: grabbing;
177
+ }
178
+
179
+ .rf-node-content {
180
+ position: relative;
181
+ width: max-content;
182
+ }
183
+
184
+ /* Built-in node look */
185
+ .rf-default-node {
186
+ display: flex;
187
+ align-items: center;
188
+ gap: 10px;
189
+ min-width: 130px;
190
+ padding: 10px 14px;
191
+ background: var(--rf-node-bg);
192
+ border: 1px solid var(--rf-node-border);
193
+ border-radius: var(--rf-node-radius);
194
+ box-shadow: var(--rf-node-shadow);
195
+ color: var(--rf-node-text);
196
+ font-size: 13px;
197
+ line-height: 1.35;
198
+ transition:
199
+ border-color 120ms ease,
200
+ box-shadow 160ms ease;
201
+ }
202
+
203
+ .rf-default-node::before {
204
+ content: '';
205
+ position: absolute;
206
+ left: 0;
207
+ top: 10px;
208
+ bottom: 10px;
209
+ width: 3px;
210
+ border-radius: 0 3px 3px 0;
211
+ background: var(--rf-node-accent, transparent);
212
+ }
213
+
214
+ .rf-node:hover > .rf-node-content > .rf-default-node {
215
+ border-color: var(--rf-node-border-hover);
216
+ box-shadow: var(--rf-node-shadow-hover);
217
+ }
218
+
219
+ .rf-node.rf-selected > .rf-node-content > .rf-default-node,
220
+ .rf-node.rf-selected > .rf-node-content > .rf-group-node {
221
+ border-color: var(--rf-accent);
222
+ box-shadow:
223
+ 0 0 0 3px var(--rf-accent-soft),
224
+ var(--rf-node-shadow-hover);
225
+ }
226
+
227
+ .rf-default-node-icon {
228
+ font-size: 16px;
229
+ line-height: 1;
230
+ }
231
+
232
+ .rf-default-node-body {
233
+ display: flex;
234
+ flex-direction: column;
235
+ gap: 2px;
236
+ min-width: 0;
237
+ }
238
+
239
+ .rf-default-node-label {
240
+ font-weight: 600;
241
+ letter-spacing: -0.01em;
242
+ white-space: nowrap;
243
+ overflow: hidden;
244
+ text-overflow: ellipsis;
245
+ }
246
+
247
+ .rf-default-node-desc {
248
+ font-size: 11px;
249
+ color: var(--rf-node-text-dim);
250
+ white-space: nowrap;
251
+ overflow: hidden;
252
+ text-overflow: ellipsis;
253
+ }
254
+
255
+ .rf-group-node {
256
+ width: 100%;
257
+ height: 100%;
258
+ min-width: 100%;
259
+ min-height: 100%;
260
+ background: var(--rf-group-bg);
261
+ border: 1.5px dashed var(--rf-group-border);
262
+ border-radius: 14px;
263
+ box-sizing: border-box;
264
+ }
265
+
266
+ .rf-group-node-label {
267
+ position: absolute;
268
+ top: 8px;
269
+ left: 12px;
270
+ font-size: 11px;
271
+ font-weight: 600;
272
+ text-transform: uppercase;
273
+ letter-spacing: 0.06em;
274
+ color: var(--rf-node-text-dim);
275
+ }
276
+
277
+ /* Group nodes need explicit sizes; make the content div honor them. */
278
+ .rf-node[data-type='group'] > .rf-node-content {
279
+ width: 100%;
280
+ height: 100%;
281
+ }
282
+
283
+ /* ── handles ─────────────────────────────────────────────────────────── */
284
+
285
+ .rf-handle {
286
+ position: absolute;
287
+ width: 10px;
288
+ height: 10px;
289
+ border-radius: 999px;
290
+ background: var(--rf-handle-bg);
291
+ border: 1.5px solid var(--rf-handle-border);
292
+ z-index: 2;
293
+ cursor: crosshair;
294
+ transition:
295
+ transform 100ms ease,
296
+ border-color 100ms ease,
297
+ background 100ms ease;
298
+ touch-action: none;
299
+ }
300
+
301
+ .rf-handle:hover {
302
+ transform: scale(1.35);
303
+ border-color: var(--rf-accent);
304
+ background: var(--rf-accent-soft);
305
+ }
306
+
307
+ .rf-handle-left {
308
+ left: -6px;
309
+ top: 50%;
310
+ margin-top: -5px;
311
+ }
312
+
313
+ .rf-handle-right {
314
+ right: -6px;
315
+ top: 50%;
316
+ margin-top: -5px;
317
+ }
318
+
319
+ .rf-handle-top {
320
+ top: -6px;
321
+ left: 50%;
322
+ margin-left: -5px;
323
+ }
324
+
325
+ .rf-handle-bottom {
326
+ bottom: -6px;
327
+ left: 50%;
328
+ margin-left: -5px;
329
+ }
330
+
331
+ /* ── edges ───────────────────────────────────────────────────────────── */
332
+
333
+ .rf-edges {
334
+ position: absolute;
335
+ top: 0;
336
+ left: 0;
337
+ width: 2px;
338
+ height: 2px;
339
+ overflow: visible;
340
+ pointer-events: none;
341
+ }
342
+
343
+ .rf-edge-hit {
344
+ fill: none;
345
+ stroke: transparent;
346
+ stroke-width: 16;
347
+ pointer-events: stroke;
348
+ cursor: pointer;
349
+ }
350
+
351
+ .rf-edge-path {
352
+ fill: none;
353
+ stroke: var(--rf-edge);
354
+ stroke-width: var(--rf-edge-width);
355
+ transition: stroke 120ms ease;
356
+ }
357
+
358
+ .rf-edge:hover .rf-edge-path {
359
+ stroke: var(--rf-edge-hover);
360
+ }
361
+
362
+ .rf-edge.rf-selected .rf-edge-path {
363
+ stroke: var(--rf-edge-selected);
364
+ stroke-width: 2px;
365
+ }
366
+
367
+ .rf-edge.rf-animated .rf-edge-path {
368
+ stroke-dasharray: 6 4;
369
+ animation: rf-dash 0.6s linear infinite;
370
+ }
371
+
372
+ @keyframes rf-dash {
373
+ to {
374
+ stroke-dashoffset: -10;
375
+ }
376
+ }
377
+
378
+ .rf-edge-label text {
379
+ font-size: 11px;
380
+ fill: var(--rf-edge-label-text);
381
+ font-weight: 500;
382
+ }
383
+
384
+ .rf-edge-label-bg {
385
+ fill: var(--rf-edge-label-bg);
386
+ x: -26px;
387
+ y: -11px;
388
+ width: 52px;
389
+ height: 22px;
390
+ }
391
+
392
+ .rf-connection-line {
393
+ fill: none;
394
+ stroke: var(--rf-accent);
395
+ stroke-width: 2;
396
+ stroke-dasharray: 7 5;
397
+ animation: rf-dash 0.5s linear infinite;
398
+ pointer-events: none;
399
+ }
400
+
401
+ .rf-connection-line.rf-invalid {
402
+ stroke: var(--rf-danger);
403
+ }
404
+
405
+ .rf-guide {
406
+ stroke: var(--rf-danger);
407
+ stroke-width: 1;
408
+ vector-effect: non-scaling-stroke;
409
+ pointer-events: none;
410
+ }
411
+
412
+ /* ── level of detail: hide fine detail when zoomed far out ───────────── */
413
+
414
+ .rf-container[data-rf-lod='1'] .rf-handle {
415
+ display: none;
416
+ }
417
+
418
+ .rf-container[data-rf-lod='1'] .rf-edge-label {
419
+ display: none;
420
+ }
421
+
422
+ /* ── selection box ───────────────────────────────────────────────────── */
423
+
424
+ .rf-selection-box {
425
+ position: absolute;
426
+ z-index: 4;
427
+ background: var(--rf-accent-soft);
428
+ border: 1px solid var(--rf-accent);
429
+ border-radius: 2px;
430
+ pointer-events: none;
431
+ }
432
+
433
+ /* ── panels / controls / minimap ─────────────────────────────────────── */
434
+
435
+ .rf-panel {
436
+ position: absolute;
437
+ z-index: 5;
438
+ margin: 14px;
439
+ display: flex;
440
+ gap: 6px;
441
+ }
442
+
443
+ .rf-panel-top-left {
444
+ top: 0;
445
+ left: 0;
446
+ }
447
+
448
+ .rf-panel-top-center {
449
+ top: 0;
450
+ left: 50%;
451
+ transform: translateX(-50%);
452
+ }
453
+
454
+ .rf-panel-top-right {
455
+ top: 0;
456
+ right: 0;
457
+ }
458
+
459
+ .rf-panel-bottom-left {
460
+ bottom: 0;
461
+ left: 0;
462
+ }
463
+
464
+ .rf-panel-bottom-center {
465
+ bottom: 0;
466
+ left: 50%;
467
+ transform: translateX(-50%);
468
+ }
469
+
470
+ .rf-panel-bottom-right {
471
+ bottom: 0;
472
+ right: 0;
473
+ }
474
+
475
+ .rf-controls {
476
+ flex-direction: column;
477
+ gap: 0;
478
+ background: var(--rf-panel-bg);
479
+ border: 1px solid var(--rf-panel-border);
480
+ border-radius: 10px;
481
+ box-shadow: var(--rf-panel-shadow);
482
+ backdrop-filter: blur(12px);
483
+ -webkit-backdrop-filter: blur(12px);
484
+ overflow: hidden;
485
+ }
486
+
487
+ .rf-control-btn {
488
+ display: flex;
489
+ align-items: center;
490
+ justify-content: center;
491
+ width: 30px;
492
+ height: 30px;
493
+ border: none;
494
+ background: transparent;
495
+ color: var(--rf-node-text);
496
+ cursor: pointer;
497
+ transition: background 100ms ease;
498
+ }
499
+
500
+ .rf-control-btn:hover:not(:disabled) {
501
+ background: var(--rf-accent-soft);
502
+ color: var(--rf-accent);
503
+ }
504
+
505
+ .rf-control-btn:disabled {
506
+ opacity: 0.32;
507
+ cursor: default;
508
+ }
509
+
510
+ .rf-minimap-panel {
511
+ padding: 0;
512
+ }
513
+
514
+ .rf-minimap {
515
+ display: block;
516
+ background: var(--rf-panel-bg);
517
+ border: 1px solid var(--rf-panel-border);
518
+ border-radius: 12px;
519
+ box-shadow: var(--rf-panel-shadow);
520
+ backdrop-filter: blur(12px);
521
+ -webkit-backdrop-filter: blur(12px);
522
+ cursor: pointer;
523
+ }
524
+
525
+ .rf-minimap-node {
526
+ fill: var(--rf-minimap-node);
527
+ }
528
+
529
+ .rf-minimap-node.rf-selected {
530
+ fill: var(--rf-accent);
531
+ }
532
+
533
+ .rf-minimap-viewport {
534
+ fill: var(--rf-minimap-mask);
535
+ stroke: var(--rf-accent);
536
+ stroke-width: 1.2;
537
+ }
538
+
539
+ /* ── node toolbar ─────────────────────────────────────────────────────── */
540
+
541
+ .rf-node-toolbar {
542
+ display: flex;
543
+ gap: 4px;
544
+ padding: 4px;
545
+ background: var(--rf-panel-bg);
546
+ border: 1px solid var(--rf-panel-border);
547
+ border-radius: 9px;
548
+ box-shadow: var(--rf-panel-shadow);
549
+ backdrop-filter: blur(12px);
550
+ -webkit-backdrop-filter: blur(12px);
551
+ white-space: nowrap;
552
+ }
553
+
554
+ /* ── node resizer ─────────────────────────────────────────────────────── */
555
+
556
+ .rf-resizer-outline {
557
+ position: absolute;
558
+ inset: 0;
559
+ border: 1px solid var(--rf-resizer, var(--rf-accent));
560
+ border-radius: inherit;
561
+ pointer-events: none;
562
+ }
563
+
564
+ .rf-resizer-handle {
565
+ width: 9px;
566
+ height: 9px;
567
+ background: var(--rf-node-bg);
568
+ border: 1.5px solid var(--rf-resizer, var(--rf-accent));
569
+ border-radius: 2px;
570
+ z-index: 21;
571
+ touch-action: none;
572
+ }
573
+
574
+ .rf-resizer-n,
575
+ .rf-resizer-s {
576
+ border-radius: 3px;
577
+ }
578
+
579
+ /* ── edge reconnect endpoints ─────────────────────────────────────────── */
580
+
581
+ .rf-edge-reconnect {
582
+ fill: var(--rf-node-bg);
583
+ stroke: var(--rf-accent);
584
+ stroke-width: 1.5;
585
+ cursor: grab;
586
+ pointer-events: all;
587
+ }
588
+
589
+ .rf-edge-reconnect:hover {
590
+ fill: var(--rf-accent-soft);
591
+ r: 6;
592
+ }
593
+
594
+ /* ── accessibility: keyboard focus ring ───────────────────────────────── */
595
+
596
+ .rf-node:focus-visible {
597
+ outline: none;
598
+ }
599
+
600
+ .rf-node:focus-visible > .rf-node-content::after {
601
+ content: '';
602
+ position: absolute;
603
+ inset: -4px;
604
+ border-radius: 12px;
605
+ box-shadow: 0 0 0 2px var(--rf-bg), 0 0 0 4px var(--rf-accent);
606
+ pointer-events: none;
607
+ }
608
+
609
+ .rf-container:focus-visible {
610
+ box-shadow: inset 0 0 0 2px var(--rf-accent);
611
+ }
612
+
613
+ /* ── remote collaborator cursors ──────────────────────────────────────── */
614
+
615
+ .rf-remote-cursors {
616
+ position: absolute;
617
+ inset: 0;
618
+ pointer-events: none;
619
+ z-index: 15;
620
+ overflow: hidden;
621
+ }
622
+
623
+ .rf-remote-cursor {
624
+ position: absolute;
625
+ top: 0;
626
+ left: 0;
627
+ will-change: transform;
628
+ display: flex;
629
+ align-items: flex-start;
630
+ gap: 2px;
631
+ }
632
+
633
+ .rf-remote-cursor-label {
634
+ margin-top: 12px;
635
+ padding: 1px 6px;
636
+ border-radius: 6px;
637
+ font-size: 11px;
638
+ font-weight: 600;
639
+ color: #fff;
640
+ white-space: nowrap;
641
+ transform: translateX(6px);
642
+ }