@pipelex/mthds-ui 0.29.1 → 0.30.1

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 (33) hide show
  1. package/README.md +14 -8
  2. package/dist/{chunk-ZTXSDTVF.js → chunk-3BXB6HSF.js} +1304 -31
  3. package/dist/chunk-3BXB6HSF.js.map +1 -0
  4. package/dist/{chunk-Y46574OW.js → chunk-GAOBB3UT.js} +5 -2
  5. package/dist/chunk-GAOBB3UT.js.map +1 -0
  6. package/dist/chunk-KB2DIEVF.js +1 -0
  7. package/dist/{chunk-3I3ZPYMW.js → chunk-PJTYQURQ.js} +33 -1
  8. package/dist/chunk-PJTYQURQ.js.map +1 -0
  9. package/dist/form/react/index.d.ts +1 -1
  10. package/dist/form/react/index.js +2 -2
  11. package/dist/graph/index.d.ts +336 -9
  12. package/dist/graph/index.js +98 -4
  13. package/dist/graph/react/index.d.ts +26 -2
  14. package/dist/graph/react/index.js +975 -371
  15. package/dist/graph/react/index.js.map +1 -1
  16. package/dist/graph/react/styles/simple/SimpleStyle.css +434 -0
  17. package/dist/graph/react/viewer/GraphToolbar.css +114 -0
  18. package/dist/index.d.ts +2 -2
  19. package/dist/index.js +98 -4
  20. package/dist/standalone/graph-standalone.html +714 -165
  21. package/dist/standalone/graph-viewer.css +549 -0
  22. package/dist/standalone/graph-viewer.js +164 -164
  23. package/dist/static-graph/index.d.ts +1 -1
  24. package/dist/static-graph/index.js +1 -1
  25. package/dist/{types-BaFWy56P.d.ts → types-BNqjYF_x.d.ts} +152 -1
  26. package/package.json +3 -2
  27. package/dist/chunk-3I3ZPYMW.js.map +0 -1
  28. package/dist/chunk-F6TZIJ7A.js +0 -1
  29. package/dist/chunk-Y46574OW.js.map +0 -1
  30. package/dist/chunk-ZTXSDTVF.js.map +0 -1
  31. package/dist/graph/react/index.css +0 -749
  32. package/dist/graph/react/index.css.map +0 -1
  33. /package/dist/{chunk-F6TZIJ7A.js.map → chunk-KB2DIEVF.js.map} +0 -0
@@ -2245,6 +2245,555 @@ button.node-validation-badge {
2245
2245
  font-weight: 600;
2246
2246
  }
2247
2247
 
2248
+ /* ─── Style menu ────────────────────────────────────────────────────────── */
2249
+ /* A list of the registered styles, opened from the toolbar. Placement */
2250
+ /* follows the toolbar's anchor with the validation dropdown's vocabulary. */
2251
+
2252
+ .graph-toolbar-style {
2253
+ position: relative;
2254
+ display: inline-flex;
2255
+ }
2256
+
2257
+ .graph-toolbar-btn--open {
2258
+ background: var(--surface-overlay-hover);
2259
+ color: var(--text-primary);
2260
+ border-color: var(--border-strong);
2261
+ }
2262
+
2263
+ .graph-style-menu {
2264
+ position: absolute;
2265
+ z-index: 12;
2266
+ width: max-content;
2267
+ min-width: min(240px, calc(100vw - 24px));
2268
+ max-width: min(320px, calc(100vw - 24px));
2269
+ padding: 4px;
2270
+ display: flex;
2271
+ flex-direction: column;
2272
+ gap: 2px;
2273
+ border-radius: 8px;
2274
+ background: var(--surface-overlay);
2275
+ border: 1px solid var(--border-default);
2276
+ box-shadow: var(--shadow-md);
2277
+ backdrop-filter: blur(6px);
2278
+ pointer-events: auto;
2279
+ font-family: var(--font-sans);
2280
+ cursor: default;
2281
+ }
2282
+ .graph-style-menu--down-start {
2283
+ top: calc(100% + 6px);
2284
+ left: 0;
2285
+ }
2286
+ .graph-style-menu--down-end {
2287
+ top: calc(100% + 6px);
2288
+ right: 0;
2289
+ }
2290
+ .graph-style-menu--up-start {
2291
+ bottom: calc(100% + 6px);
2292
+ left: 0;
2293
+ }
2294
+ .graph-style-menu--up-end {
2295
+ bottom: calc(100% + 6px);
2296
+ right: 0;
2297
+ }
2298
+ .graph-style-menu--side-end {
2299
+ left: calc(100% + 6px);
2300
+ top: 0;
2301
+ }
2302
+ .graph-style-menu--side-start {
2303
+ right: calc(100% + 6px);
2304
+ top: 0;
2305
+ }
2306
+
2307
+ .graph-style-menu-item {
2308
+ all: unset;
2309
+ box-sizing: border-box;
2310
+ display: flex;
2311
+ align-items: flex-start;
2312
+ gap: 10px;
2313
+ padding: 7px 8px;
2314
+ border-radius: 6px;
2315
+ cursor: pointer;
2316
+ color: var(--text-secondary);
2317
+ }
2318
+ .graph-style-menu-item:hover,
2319
+ .graph-style-menu-item:focus-visible {
2320
+ background: var(--surface-elevated-hover);
2321
+ color: var(--text-primary);
2322
+ }
2323
+ .graph-style-menu-item:focus-visible {
2324
+ outline: 2px solid var(--focus-ring);
2325
+ outline-offset: -2px;
2326
+ }
2327
+ .graph-style-menu-item--checked {
2328
+ color: var(--text-primary);
2329
+ }
2330
+ .graph-style-menu-icon {
2331
+ display: inline-flex;
2332
+ padding-top: 1px;
2333
+ color: var(--text-muted);
2334
+ }
2335
+ .graph-style-menu-item--checked .graph-style-menu-icon {
2336
+ color: var(--color-accent);
2337
+ }
2338
+ .graph-style-menu-text {
2339
+ display: flex;
2340
+ flex-direction: column;
2341
+ gap: 1px;
2342
+ flex: 1;
2343
+ min-width: 0;
2344
+ }
2345
+ .graph-style-menu-name {
2346
+ font-size: 12.5px;
2347
+ font-weight: 600;
2348
+ line-height: 16px;
2349
+ }
2350
+ .graph-style-menu-description {
2351
+ font-size: 11.5px;
2352
+ line-height: 15px;
2353
+ color: var(--text-muted);
2354
+ }
2355
+ .graph-style-menu-check {
2356
+ display: inline-flex;
2357
+ width: 14px;
2358
+ padding-top: 1px;
2359
+ color: var(--color-accent);
2360
+ }
2361
+
2362
+ /* ─── Simple style — a flowchart of the method's steps in plain words ───── */
2363
+ /* Token-only, like every component sheet here: the palette tokens on */
2364
+ /* `.react-flow-container` theme it. The box metrics mirror the constants in */
2365
+ /* `src/graph/styles/simpleStyle.ts`, which size the nodes for the layout */
2366
+ /* before the DOM exists: change them together. */
2367
+
2368
+ /* ReactFlow wrappers: the shapes draw themselves, selection included. */
2369
+ .react-flow__node-simpleStep,
2370
+ .react-flow__node-simpleTerminal,
2371
+ .react-flow__node-simpleDecision,
2372
+ .react-flow__node-simpleFrame {
2373
+ background: transparent;
2374
+ border: none;
2375
+ padding: 0;
2376
+ }
2377
+ .react-flow__node-simpleStep.selected,
2378
+ .react-flow__node-simpleTerminal.selected,
2379
+ .react-flow__node-simpleDecision.selected,
2380
+ .react-flow__node-simpleFrame.selected {
2381
+ box-shadow: none !important;
2382
+ }
2383
+ .react-flow__node-simpleFrame {
2384
+ cursor: default !important;
2385
+ }
2386
+ .simple-handle.react-flow__handle {
2387
+ opacity: 0;
2388
+ border: none;
2389
+ width: 1px;
2390
+ height: 1px;
2391
+ min-width: 0;
2392
+ min-height: 0;
2393
+ }
2394
+
2395
+ /* ─── Step ──────────────────────────────────────────────────────────────── */
2396
+
2397
+ .simple-step {
2398
+ --simple-step-accent: var(--text-muted);
2399
+ --simple-step-border: var(--border-strong);
2400
+ --simple-step-bg: var(--surface-panel);
2401
+
2402
+ box-sizing: border-box;
2403
+ width: 100%;
2404
+ height: 100%;
2405
+ padding: 10px 12px;
2406
+ display: flex;
2407
+ flex-direction: column;
2408
+ gap: 6px;
2409
+ border-radius: 10px;
2410
+ border: 1.5px solid var(--simple-step-border);
2411
+ background: var(--simple-step-bg);
2412
+ box-shadow: var(--shadow-sm);
2413
+ font-family: var(--font-sans);
2414
+ overflow: hidden;
2415
+ transition: box-shadow 0.15s;
2416
+ }
2417
+ .simple-step:hover {
2418
+ box-shadow: var(--shadow-md);
2419
+ }
2420
+ .react-flow__node-simpleStep.selected .simple-step {
2421
+ border-color: var(--color-accent);
2422
+ box-shadow:
2423
+ 0 0 0 2px var(--color-accent),
2424
+ var(--shadow-md);
2425
+ }
2426
+
2427
+ /* The steps that carry the method's judgement stand out; plumbing recedes. */
2428
+ .simple-step--ai,
2429
+ .simple-step--judge {
2430
+ --simple-step-accent: var(--color-accent);
2431
+ --simple-step-border: color-mix(in srgb, var(--color-accent) 55%, transparent);
2432
+ --simple-step-bg: color-mix(in srgb, var(--color-accent) 7%, var(--surface-panel));
2433
+ }
2434
+ .simple-step--template,
2435
+ .simple-step--code {
2436
+ --simple-step-bg: var(--surface-sunken);
2437
+ --simple-step-border: var(--border-default);
2438
+ }
2439
+ .simple-step--planned {
2440
+ border-style: dashed;
2441
+ opacity: 0.85;
2442
+ }
2443
+ /* A folded sub-method: a step that holds others, drawn as a small stack. */
2444
+ .simple-step--steps,
2445
+ .simple-step--parallel,
2446
+ .simple-step--decision,
2447
+ .simple-step--repeat {
2448
+ --simple-step-border: var(--border-strong);
2449
+ box-shadow:
2450
+ 3px 3px 0 -1px var(--simple-step-bg),
2451
+ 3px 3px 0 0 var(--border-default),
2452
+ var(--shadow-sm);
2453
+ }
2454
+ .simple-step--failed {
2455
+ --simple-step-border: var(--color-error);
2456
+ }
2457
+
2458
+ .simple-step-header {
2459
+ display: flex;
2460
+ align-items: center;
2461
+ gap: 6px;
2462
+ height: 16px;
2463
+ flex-shrink: 0;
2464
+ }
2465
+ .simple-step-category {
2466
+ display: inline-flex;
2467
+ align-items: center;
2468
+ gap: 5px;
2469
+ font-size: 11px;
2470
+ font-weight: 600;
2471
+ line-height: 16px;
2472
+ color: var(--simple-step-accent);
2473
+ white-space: nowrap;
2474
+ overflow: hidden;
2475
+ text-overflow: ellipsis;
2476
+ min-width: 0;
2477
+ }
2478
+ .simple-step-category svg {
2479
+ flex-shrink: 0;
2480
+ }
2481
+ .simple-step-header .simple-status {
2482
+ margin-left: auto;
2483
+ }
2484
+ .simple-step-header .node-validation-badge {
2485
+ margin-left: auto;
2486
+ }
2487
+ .simple-step-header .simple-status + .node-validation-badge {
2488
+ margin-left: 0;
2489
+ }
2490
+
2491
+ .simple-step-title {
2492
+ font-size: 15px;
2493
+ font-weight: 500;
2494
+ line-height: 20px;
2495
+ color: var(--text-primary);
2496
+ overflow: hidden;
2497
+ overflow-wrap: anywhere;
2498
+ display: -webkit-box;
2499
+ -webkit-line-clamp: 3;
2500
+ -webkit-box-orient: vertical;
2501
+ }
2502
+ .simple-step--template .simple-step-title,
2503
+ .simple-step--code .simple-step-title {
2504
+ color: var(--text-secondary);
2505
+ }
2506
+
2507
+ .simple-step-foreach {
2508
+ align-self: flex-start;
2509
+ display: inline-flex;
2510
+ align-items: center;
2511
+ gap: 4px;
2512
+ height: 18px;
2513
+ padding: 0 7px;
2514
+ box-sizing: border-box;
2515
+ border-radius: 9px;
2516
+ border: 1px solid var(--ctrl-batch-border);
2517
+ background: var(--ctrl-batch-bg);
2518
+ color: var(--ctrl-batch-text);
2519
+ font-size: 11px;
2520
+ font-weight: 600;
2521
+ line-height: 16px;
2522
+ white-space: nowrap;
2523
+ max-width: 100%;
2524
+ overflow: hidden;
2525
+ text-overflow: ellipsis;
2526
+ flex-shrink: 0;
2527
+ }
2528
+
2529
+ .simple-step-open {
2530
+ all: unset;
2531
+ box-sizing: border-box;
2532
+ align-self: flex-start;
2533
+ display: inline-flex;
2534
+ align-items: center;
2535
+ gap: 5px;
2536
+ height: 22px;
2537
+ padding: 0 8px;
2538
+ border-radius: 6px;
2539
+ border: 1px solid var(--border-default);
2540
+ background: var(--surface-elevated);
2541
+ color: var(--text-secondary);
2542
+ font-family: var(--font-sans);
2543
+ font-size: 11.5px;
2544
+ font-weight: 500;
2545
+ cursor: pointer;
2546
+ flex-shrink: 0;
2547
+ }
2548
+ .simple-step-open:hover:not(:disabled) {
2549
+ color: var(--text-primary);
2550
+ border-color: var(--border-strong);
2551
+ background: var(--surface-elevated-hover);
2552
+ }
2553
+ .simple-step-open:focus-visible {
2554
+ outline: 2px solid var(--focus-ring);
2555
+ outline-offset: 1px;
2556
+ }
2557
+ .simple-step-open:disabled {
2558
+ cursor: default;
2559
+ }
2560
+
2561
+ /* ─── Run status mark ───────────────────────────────────────────────────── */
2562
+
2563
+ .simple-status {
2564
+ display: inline-flex;
2565
+ align-items: center;
2566
+ justify-content: center;
2567
+ width: 16px;
2568
+ height: 16px;
2569
+ border-radius: 50%;
2570
+ flex-shrink: 0;
2571
+ color: var(--text-dim);
2572
+ border: 1.5px solid currentColor;
2573
+ box-sizing: border-box;
2574
+ }
2575
+ .simple-status--succeeded {
2576
+ color: var(--color-success);
2577
+ background: var(--color-success-bg);
2578
+ }
2579
+ .simple-status--failed {
2580
+ color: var(--color-error);
2581
+ background: var(--color-error-bg);
2582
+ }
2583
+ .simple-status--running {
2584
+ color: var(--color-accent);
2585
+ border-color: transparent;
2586
+ }
2587
+ .simple-status--running svg {
2588
+ animation: simple-status-spin 1s linear infinite;
2589
+ }
2590
+ @keyframes simple-status-spin {
2591
+ to {
2592
+ transform: rotate(360deg);
2593
+ }
2594
+ }
2595
+
2596
+ /* ─── Input and output ──────────────────────────────────────────────────── */
2597
+
2598
+ .simple-terminal {
2599
+ --simple-terminal-stroke: var(--color-stuff-border);
2600
+ --simple-terminal-fill: var(--surface-panel);
2601
+ --simple-terminal-tint: var(--color-stuff-bg);
2602
+
2603
+ position: relative;
2604
+ box-sizing: border-box;
2605
+ width: 100%;
2606
+ height: 100%;
2607
+ font-family: var(--font-sans);
2608
+ }
2609
+ .simple-terminal--output {
2610
+ --simple-terminal-stroke: var(--color-success);
2611
+ --simple-terminal-tint: var(--color-success-bg);
2612
+ }
2613
+ .simple-terminal-shape {
2614
+ position: absolute;
2615
+ inset: 0;
2616
+ width: 100%;
2617
+ height: 100%;
2618
+ overflow: visible;
2619
+ }
2620
+ .simple-terminal-shape path {
2621
+ fill: var(--simple-terminal-fill);
2622
+ stroke: var(--simple-terminal-stroke);
2623
+ stroke-width: 1.5px;
2624
+ }
2625
+ /* The tint goes over the opaque fill so stacked pages hide what is behind them. */
2626
+ .simple-terminal > .simple-terminal-shape:not([class*="--back"]) path {
2627
+ fill: color-mix(in srgb, var(--simple-terminal-stroke) 9%, var(--simple-terminal-fill));
2628
+ }
2629
+ .simple-terminal--output > .simple-terminal-shape:not([class*="--back"]) path {
2630
+ stroke-width: 2px;
2631
+ }
2632
+ /* A list: the same page twice more, offset behind. */
2633
+ .simple-terminal-shape--back1 {
2634
+ transform: translate(4px, -4px);
2635
+ }
2636
+ .simple-terminal-shape--back2 {
2637
+ transform: translate(8px, -8px);
2638
+ }
2639
+ .react-flow__node-simpleTerminal.selected .simple-terminal-shape path {
2640
+ stroke: var(--color-accent);
2641
+ stroke-width: 2.5px;
2642
+ }
2643
+ .simple-terminal-text {
2644
+ position: relative;
2645
+ box-sizing: border-box;
2646
+ height: 100%;
2647
+ padding: 10px 12px 16px;
2648
+ display: flex;
2649
+ flex-direction: column;
2650
+ justify-content: center;
2651
+ gap: 0;
2652
+ text-align: center;
2653
+ }
2654
+ .simple-terminal-title {
2655
+ font-size: 13px;
2656
+ font-weight: 600;
2657
+ line-height: 17px;
2658
+ color: var(--text-primary);
2659
+ overflow: hidden;
2660
+ overflow-wrap: anywhere;
2661
+ display: -webkit-box;
2662
+ -webkit-line-clamp: 2;
2663
+ -webkit-box-orient: vertical;
2664
+ }
2665
+ .simple-terminal-subtitle {
2666
+ font-size: 11.5px;
2667
+ line-height: 17px;
2668
+ color: var(--text-muted);
2669
+ white-space: nowrap;
2670
+ overflow: hidden;
2671
+ text-overflow: ellipsis;
2672
+ }
2673
+
2674
+ /* ─── Decision ──────────────────────────────────────────────────────────── */
2675
+
2676
+ .simple-decision {
2677
+ position: relative;
2678
+ box-sizing: border-box;
2679
+ width: 100%;
2680
+ height: 100%;
2681
+ display: flex;
2682
+ align-items: center;
2683
+ justify-content: center;
2684
+ font-family: var(--font-sans);
2685
+ }
2686
+ .simple-decision-shape {
2687
+ position: absolute;
2688
+ inset: 0;
2689
+ width: 100%;
2690
+ height: 100%;
2691
+ overflow: visible;
2692
+ }
2693
+ .simple-decision-shape path {
2694
+ fill: color-mix(in srgb, var(--ctrl-condition-text) 10%, var(--surface-panel));
2695
+ stroke: var(--ctrl-condition-text);
2696
+ stroke-width: 1.5px;
2697
+ }
2698
+ .simple-decision--failed .simple-decision-shape path {
2699
+ stroke: var(--color-error);
2700
+ }
2701
+ .react-flow__node-simpleDecision.selected .simple-decision-shape path {
2702
+ stroke: var(--color-accent);
2703
+ stroke-width: 2.5px;
2704
+ }
2705
+ .simple-decision-text {
2706
+ position: relative;
2707
+ width: 56%;
2708
+ font-size: 13px;
2709
+ font-weight: 600;
2710
+ line-height: 16px;
2711
+ text-align: center;
2712
+ color: var(--text-primary);
2713
+ overflow: hidden;
2714
+ overflow-wrap: anywhere;
2715
+ display: -webkit-box;
2716
+ -webkit-line-clamp: 3;
2717
+ -webkit-box-orient: vertical;
2718
+ }
2719
+ .simple-decision-marks {
2720
+ position: absolute;
2721
+ top: 6px;
2722
+ right: 18%;
2723
+ display: flex;
2724
+ gap: 4px;
2725
+ }
2726
+
2727
+ /* ─── "For each" frame ──────────────────────────────────────────────────── */
2728
+
2729
+ .simple-frame {
2730
+ position: relative;
2731
+ box-sizing: border-box;
2732
+ width: 100%;
2733
+ height: 100%;
2734
+ border-radius: 14px;
2735
+ border: 1.5px solid var(--ctrl-batch-border);
2736
+ background: var(--ctrl-batch-bg);
2737
+ font-family: var(--font-sans);
2738
+ }
2739
+ /* The stacked-card edge: the same frame, offset behind — "again, for each". */
2740
+ .simple-frame::before {
2741
+ content: "";
2742
+ position: absolute;
2743
+ inset: 0;
2744
+ transform: translate(6px, 6px);
2745
+ border-radius: 14px;
2746
+ border: 1.5px solid var(--ctrl-batch-border);
2747
+ opacity: 0.55;
2748
+ z-index: -1;
2749
+ pointer-events: none;
2750
+ }
2751
+ .react-flow__node-simpleFrame.selected .simple-frame {
2752
+ border-color: var(--color-accent);
2753
+ }
2754
+ .simple-frame-header {
2755
+ position: absolute;
2756
+ top: 0;
2757
+ left: 0;
2758
+ right: 0;
2759
+ display: flex;
2760
+ align-items: center;
2761
+ gap: 6px;
2762
+ padding: 10px 14px;
2763
+ pointer-events: none;
2764
+ }
2765
+ .simple-frame-title {
2766
+ display: inline-flex;
2767
+ align-items: center;
2768
+ gap: 6px;
2769
+ font-size: 13px;
2770
+ font-weight: 600;
2771
+ color: var(--ctrl-batch-text);
2772
+ white-space: nowrap;
2773
+ }
2774
+ .simple-frame-header .simple-status,
2775
+ .simple-frame-header .node-validation-badge {
2776
+ pointer-events: auto;
2777
+ }
2778
+ .simple-frame-fold {
2779
+ all: unset;
2780
+ margin-left: auto;
2781
+ display: inline-flex;
2782
+ padding: 3px 6px;
2783
+ border-radius: 6px;
2784
+ color: var(--ctrl-batch-text);
2785
+ cursor: pointer;
2786
+ pointer-events: auto;
2787
+ }
2788
+ .simple-frame-fold:hover {
2789
+ color: var(--text-primary);
2790
+ background: var(--surface-elevated);
2791
+ }
2792
+ .simple-frame-fold:focus-visible {
2793
+ outline: 2px solid var(--focus-ring);
2794
+ outline-offset: 1px;
2795
+ }
2796
+
2248
2797
  /* ─── Standalone GraphViewer chrome (toolbar, theme, layout) ─────────── */
2249
2798
 
2250
2799
  * {