@livo-tv/blocks 1.30.0 → 1.30.2

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/index.cjs CHANGED
@@ -2386,29 +2386,36 @@ var SHADER_LIGHT_TYPES = ["3d", "env"];
2386
2386
  var SHADER_ENV_PRESETS = ["city", "dawn", "lobby"];
2387
2387
  var SHADER_ON_OFF = ["on", "off"];
2388
2388
  var SHADER_RANGE = ["enabled", "disabled"];
2389
- var DEFAULT_SHADER_CURTAIN_CONFIG = {
2390
- type: "plane",
2389
+ var PRESET_BASE = {
2391
2390
  shader: "defaults",
2392
2391
  animate: "on",
2393
- uTime: 0,
2394
- uSpeed: 0.4,
2395
- uStrength: 2,
2396
- uDensity: 1.2,
2397
- uFrequency: 5.5,
2398
- uAmplitude: 1,
2399
2392
  wireframe: false,
2400
2393
  loop: "on",
2401
2394
  loopDuration: 10,
2402
2395
  range: "disabled",
2403
2396
  rangeStart: 0,
2404
- rangeEnd: 10,
2405
- positionX: 0,
2397
+ rangeEnd: 40,
2398
+ fov: 45,
2399
+ zoomOut: false,
2400
+ grainBlending: 0.3,
2401
+ pixelDensity: 1
2402
+ };
2403
+ var DEFAULT_SHADER_CURTAIN_CONFIG = {
2404
+ ...PRESET_BASE,
2405
+ type: "plane",
2406
+ uTime: 0,
2407
+ uSpeed: 0.4,
2408
+ uStrength: 4,
2409
+ uDensity: 1.3,
2410
+ uFrequency: 5.5,
2411
+ uAmplitude: 1,
2412
+ positionX: -1.4,
2406
2413
  positionY: 0,
2407
2414
  positionZ: 0,
2408
2415
  rotationX: 0,
2409
- rotationY: 0,
2410
- rotationZ: 0,
2411
- color1: "#52ff89",
2416
+ rotationY: 10,
2417
+ rotationZ: 50,
2418
+ color1: "#ff5005",
2412
2419
  color2: "#dbba95",
2413
2420
  color3: "#d0bce1",
2414
2421
  reflection: 0.1,
@@ -2417,13 +2424,9 @@ var DEFAULT_SHADER_CURTAIN_CONFIG = {
2417
2424
  cPolarAngle: 90,
2418
2425
  cDistance: 3.6,
2419
2426
  cameraZoom: 1,
2420
- fov: 45,
2421
- zoomOut: false,
2422
2427
  lightType: "3d",
2423
2428
  envPreset: "city",
2424
- grain: "off",
2425
- grainBlending: 0.3,
2426
- pixelDensity: 1
2429
+ grain: "on"
2427
2430
  };
2428
2431
  var SHADER_CURTAIN_PRESETS = [
2429
2432
  { id: "halo", title: "Halo", config: { ...DEFAULT_SHADER_CURTAIN_CONFIG } },
@@ -2431,52 +2434,127 @@ var SHADER_CURTAIN_PRESETS = [
2431
2434
  id: "pensive",
2432
2435
  title: "Pensive",
2433
2436
  config: {
2434
- ...DEFAULT_SHADER_CURTAIN_CONFIG,
2435
- type: "waterPlane",
2437
+ ...PRESET_BASE,
2438
+ type: "sphere",
2439
+ uTime: 0,
2440
+ uSpeed: 0.3,
2441
+ uStrength: 0.4,
2442
+ uDensity: 0.8,
2443
+ uFrequency: 5.5,
2444
+ uAmplitude: 7,
2445
+ positionX: 0,
2446
+ positionY: 0,
2447
+ positionZ: 0,
2448
+ rotationX: 0,
2449
+ rotationY: 0,
2450
+ rotationZ: 140,
2436
2451
  color1: "#809bd6",
2437
2452
  color2: "#910aff",
2438
2453
  color3: "#af38ff",
2439
- uSpeed: 0.3,
2440
- uStrength: 0.3,
2441
- uDensity: 0.8
2454
+ reflection: 0.5,
2455
+ brightness: 1.5,
2456
+ cAzimuthAngle: 250,
2457
+ cPolarAngle: 140,
2458
+ cDistance: 1.5,
2459
+ cameraZoom: 12.5,
2460
+ lightType: "3d",
2461
+ envPreset: "city",
2462
+ grain: "on"
2442
2463
  }
2443
2464
  },
2444
2465
  {
2445
2466
  id: "mint",
2446
2467
  title: "Mint",
2447
2468
  config: {
2448
- ...DEFAULT_SHADER_CURTAIN_CONFIG,
2469
+ ...PRESET_BASE,
2449
2470
  type: "waterPlane",
2450
- color1: "#73bfc4",
2451
- color2: "#ffcc81",
2452
- color3: "#c9f5d3",
2471
+ uTime: 0,
2453
2472
  uSpeed: 0.2,
2454
- uStrength: 1.1
2473
+ uStrength: 3.4,
2474
+ uDensity: 1.2,
2475
+ uFrequency: 0,
2476
+ uAmplitude: 0,
2477
+ positionX: 0,
2478
+ positionY: 0.9,
2479
+ positionZ: -0.3,
2480
+ rotationX: 45,
2481
+ rotationY: 0,
2482
+ rotationZ: 0,
2483
+ color1: "#94ffd1",
2484
+ color2: "#6bf5ff",
2485
+ color3: "#ffffff",
2486
+ reflection: 0.1,
2487
+ brightness: 1.2,
2488
+ cAzimuthAngle: 170,
2489
+ cPolarAngle: 70,
2490
+ cDistance: 4.4,
2491
+ cameraZoom: 1,
2492
+ lightType: "3d",
2493
+ envPreset: "city",
2494
+ grain: "off"
2455
2495
  }
2456
2496
  },
2457
2497
  {
2458
2498
  id: "interstella",
2459
2499
  title: "Interstella",
2460
2500
  config: {
2461
- ...DEFAULT_SHADER_CURTAIN_CONFIG,
2501
+ ...PRESET_BASE,
2462
2502
  type: "sphere",
2463
- color1: "#000000",
2464
- color2: "#0d57c8",
2465
- color3: "#7a2150",
2466
- uDensity: 1.8,
2467
- cDistance: 7.1,
2468
- cameraZoom: 15
2503
+ uTime: 0,
2504
+ uSpeed: 0.3,
2505
+ uStrength: 0.3,
2506
+ uDensity: 0.8,
2507
+ uFrequency: 5.5,
2508
+ uAmplitude: 3.2,
2509
+ positionX: -0.1,
2510
+ positionY: 0,
2511
+ positionZ: 0,
2512
+ rotationX: 0,
2513
+ rotationY: 130,
2514
+ rotationZ: 70,
2515
+ color1: "#73bfc4",
2516
+ color2: "#ff810a",
2517
+ color3: "#8da0ce",
2518
+ reflection: 0.4,
2519
+ brightness: 0.8,
2520
+ cAzimuthAngle: 270,
2521
+ cPolarAngle: 180,
2522
+ cDistance: 0.5,
2523
+ cameraZoom: 15.1,
2524
+ lightType: "env",
2525
+ envPreset: "city",
2526
+ grain: "on"
2469
2527
  }
2470
2528
  },
2471
2529
  {
2472
2530
  id: "nightyNight",
2473
2531
  title: "Nighty night",
2474
2532
  config: {
2475
- ...DEFAULT_SHADER_CURTAIN_CONFIG,
2533
+ ...PRESET_BASE,
2476
2534
  type: "waterPlane",
2477
- color1: "#1a1a2e",
2478
- color2: "#16213e",
2479
- color3: "#0f3460",
2535
+ uTime: 8,
2536
+ uSpeed: 0.3,
2537
+ uStrength: 1.5,
2538
+ uDensity: 1.5,
2539
+ uFrequency: 0,
2540
+ uAmplitude: 0,
2541
+ positionX: 0,
2542
+ positionY: 0,
2543
+ positionZ: 0,
2544
+ rotationX: 50,
2545
+ rotationY: 0,
2546
+ rotationZ: -60,
2547
+ color1: "#606080",
2548
+ color2: "#8d7dca",
2549
+ color3: "#212121",
2550
+ reflection: 0.1,
2551
+ brightness: 1,
2552
+ cAzimuthAngle: 180,
2553
+ cPolarAngle: 80,
2554
+ cDistance: 2.8,
2555
+ cameraZoom: 9.1,
2556
+ lightType: "3d",
2557
+ envPreset: "city",
2480
2558
  grain: "on"
2481
2559
  }
2482
2560
  },
@@ -2484,67 +2562,160 @@ var SHADER_CURTAIN_PRESETS = [
2484
2562
  id: "violaOrientalis",
2485
2563
  title: "Viola orientalis",
2486
2564
  config: {
2487
- ...DEFAULT_SHADER_CURTAIN_CONFIG,
2488
- type: "plane",
2489
- color1: "#611e69",
2490
- color2: "#ff7eb3",
2491
- color3: "#c9b1ff",
2492
- uStrength: 3.2
2565
+ ...PRESET_BASE,
2566
+ type: "sphere",
2567
+ uTime: 0,
2568
+ uSpeed: 0.1,
2569
+ uStrength: 1,
2570
+ uDensity: 1.1,
2571
+ uFrequency: 5.5,
2572
+ uAmplitude: 1.4,
2573
+ positionX: 0,
2574
+ positionY: 0,
2575
+ positionZ: 0,
2576
+ rotationX: 0,
2577
+ rotationY: 0,
2578
+ rotationZ: 0,
2579
+ color1: "#ffffff",
2580
+ color2: "#ffbb00",
2581
+ color3: "#0700ff",
2582
+ reflection: 0.1,
2583
+ brightness: 1.1,
2584
+ cAzimuthAngle: 0,
2585
+ cPolarAngle: 140,
2586
+ cDistance: 7.1,
2587
+ cameraZoom: 17.3,
2588
+ lightType: "3d",
2589
+ envPreset: "city",
2590
+ grain: "off"
2493
2591
  }
2494
2592
  },
2495
2593
  {
2496
2594
  id: "universe",
2497
2595
  title: "Universe",
2498
2596
  config: {
2499
- ...DEFAULT_SHADER_CURTAIN_CONFIG,
2597
+ ...PRESET_BASE,
2500
2598
  type: "waterPlane",
2501
- color1: "#0b1026",
2502
- color2: "#3d5afe",
2503
- color3: "#00e5ff",
2504
- uDensity: 2.2,
2505
- lightType: "env",
2506
- envPreset: "city"
2599
+ uTime: 0.2,
2600
+ uSpeed: 0.1,
2601
+ uStrength: 2.4,
2602
+ uDensity: 1.1,
2603
+ uFrequency: 5.5,
2604
+ uAmplitude: 0,
2605
+ positionX: -0.5,
2606
+ positionY: 0.1,
2607
+ positionZ: 0,
2608
+ rotationX: 0,
2609
+ rotationY: 0,
2610
+ rotationZ: 235,
2611
+ color1: "#5606ff",
2612
+ color2: "#fe8989",
2613
+ color3: "#000000",
2614
+ reflection: 0.1,
2615
+ brightness: 1.1,
2616
+ cAzimuthAngle: 180,
2617
+ cPolarAngle: 115,
2618
+ cDistance: 3.9,
2619
+ cameraZoom: 1,
2620
+ lightType: "3d",
2621
+ envPreset: "city",
2622
+ grain: "off"
2507
2623
  }
2508
2624
  },
2509
2625
  {
2510
2626
  id: "sunset",
2511
2627
  title: "Sunset",
2512
2628
  config: {
2513
- ...DEFAULT_SHADER_CURTAIN_CONFIG,
2514
- type: "plane",
2515
- color1: "#ff6a1a",
2516
- color2: "#ffb347",
2517
- color3: "#fd4912",
2518
- cPolarAngle: 125,
2519
- cDistance: 5
2629
+ ...PRESET_BASE,
2630
+ type: "sphere",
2631
+ uTime: 0,
2632
+ uSpeed: 0.1,
2633
+ uStrength: 0.4,
2634
+ uDensity: 1.1,
2635
+ uFrequency: 5.5,
2636
+ uAmplitude: 1.4,
2637
+ positionX: 0,
2638
+ positionY: -0.15,
2639
+ positionZ: 0,
2640
+ rotationX: 0,
2641
+ rotationY: 0,
2642
+ rotationZ: 0,
2643
+ color1: "#ff7a33",
2644
+ color2: "#33a0ff",
2645
+ color3: "#ffc53d",
2646
+ reflection: 0.1,
2647
+ brightness: 1.5,
2648
+ cAzimuthAngle: 60,
2649
+ cPolarAngle: 90,
2650
+ cDistance: 7.1,
2651
+ cameraZoom: 15.3,
2652
+ lightType: "3d",
2653
+ envPreset: "dawn",
2654
+ grain: "off"
2520
2655
  }
2521
2656
  },
2522
2657
  {
2523
2658
  id: "mandarin",
2524
2659
  title: "Mandarin",
2525
2660
  config: {
2526
- ...DEFAULT_SHADER_CURTAIN_CONFIG,
2527
- type: "sphere",
2528
- color1: "#ff7a33",
2529
- color2: "#33a0ff",
2530
- color3: "#ffc53d",
2531
- uSpeed: 0.1,
2532
- uStrength: 0.4,
2533
- uDensity: 1.1,
2534
- uAmplitude: 1.4
2661
+ ...PRESET_BASE,
2662
+ type: "waterPlane",
2663
+ uTime: 0.2,
2664
+ uSpeed: 0.2,
2665
+ uStrength: 3,
2666
+ uDensity: 1.8,
2667
+ uFrequency: 5.5,
2668
+ uAmplitude: 0,
2669
+ positionX: 0,
2670
+ positionY: -2.1,
2671
+ positionZ: 0,
2672
+ rotationX: 0,
2673
+ rotationY: 0,
2674
+ rotationZ: 225,
2675
+ color1: "#ff6a1a",
2676
+ color2: "#c73c00",
2677
+ color3: "#fd4912",
2678
+ reflection: 0.1,
2679
+ brightness: 1.2,
2680
+ cAzimuthAngle: 180,
2681
+ cPolarAngle: 95,
2682
+ cDistance: 2.4,
2683
+ cameraZoom: 1,
2684
+ lightType: "3d",
2685
+ envPreset: "city",
2686
+ grain: "off"
2535
2687
  }
2536
2688
  },
2537
2689
  {
2538
2690
  id: "cottonCandy",
2539
2691
  title: "Cotton candy",
2540
2692
  config: {
2541
- ...DEFAULT_SHADER_CURTAIN_CONFIG,
2542
- type: "sphere",
2543
- color1: "#ffd1dc",
2544
- color2: "#c5e1ff",
2545
- color3: "#fff5ba",
2546
- uSpeed: 0.15,
2547
- grain: "on"
2693
+ ...PRESET_BASE,
2694
+ type: "waterPlane",
2695
+ uTime: 0.2,
2696
+ uSpeed: 0.3,
2697
+ uStrength: 3,
2698
+ uDensity: 1,
2699
+ uFrequency: 5.5,
2700
+ uAmplitude: 0,
2701
+ positionX: 0,
2702
+ positionY: 1.8,
2703
+ positionZ: 0,
2704
+ rotationX: 0,
2705
+ rotationY: 0,
2706
+ rotationZ: -90,
2707
+ color1: "#ebedff",
2708
+ color2: "#f3f2f8",
2709
+ color3: "#dbf8ff",
2710
+ reflection: 0.1,
2711
+ brightness: 1.2,
2712
+ cAzimuthAngle: 180,
2713
+ cPolarAngle: 120,
2714
+ cDistance: 2.9,
2715
+ cameraZoom: 1,
2716
+ lightType: "3d",
2717
+ envPreset: "city",
2718
+ grain: "off"
2548
2719
  }
2549
2720
  }
2550
2721
  ];
@@ -2627,9 +2798,9 @@ function parseShaderGradientUrl(input) {
2627
2798
  positionX: numberParam(q.get("positionX"), base.positionX, -20, 20),
2628
2799
  positionY: numberParam(q.get("positionY"), base.positionY, -20, 20),
2629
2800
  positionZ: numberParam(q.get("positionZ"), base.positionZ, -20, 20),
2630
- rotationX: numberParam(q.get("rotationX"), base.rotationX, 0, 360),
2631
- rotationY: numberParam(q.get("rotationY"), base.rotationY, 0, 360),
2632
- rotationZ: numberParam(q.get("rotationZ"), base.rotationZ, 0, 360),
2801
+ rotationX: numberParam(q.get("rotationX"), base.rotationX, -360, 360),
2802
+ rotationY: numberParam(q.get("rotationY"), base.rotationY, -360, 360),
2803
+ rotationZ: numberParam(q.get("rotationZ"), base.rotationZ, -360, 360),
2633
2804
  color1: hexParam(q.get("color1"), base.color1),
2634
2805
  color2: hexParam(q.get("color2"), base.color2),
2635
2806
  color3: hexParam(q.get("color3"), base.color3),
@@ -2739,57 +2910,66 @@ function ShaderCurtain({
2739
2910
  }
2740
2911
  const { ShaderGradientCanvas, ShaderGradient } = module;
2741
2912
  const animate = resolved.animate === "off" || reducedMotion ? "off" : "on";
2742
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("relative h-full w-full overflow-hidden", className), children: /* @__PURE__ */ jsxRuntime.jsx(
2743
- ShaderGradientCanvas,
2913
+ return /* @__PURE__ */ jsxRuntime.jsx(
2914
+ "div",
2744
2915
  {
2745
- style: { position: "absolute", inset: 0 },
2746
- pixelDensity: resolved.pixelDensity,
2747
- fov: resolved.fov,
2748
- envBasePath,
2749
- preserveDrawingBuffer,
2750
- children: /* @__PURE__ */ jsxRuntime.jsx(
2751
- ShaderGradient,
2916
+ className: cn(
2917
+ "relative h-full w-full overflow-hidden [container-type:size]",
2918
+ className
2919
+ ),
2920
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute top-1/2 left-1/2 h-[max(100cqh,56.25cqw)] w-[max(100cqw,177.778cqh)] -translate-x-1/2 -translate-y-1/2", children: /* @__PURE__ */ jsxRuntime.jsx(
2921
+ ShaderGradientCanvas,
2752
2922
  {
2753
- control: "props",
2754
- type: resolved.type,
2755
- shader: resolved.shader,
2756
- animate,
2757
- uTime: resolved.uTime,
2758
- uSpeed: resolved.uSpeed,
2759
- uStrength: resolved.uStrength,
2760
- uDensity: resolved.uDensity,
2761
- uFrequency: resolved.uFrequency,
2762
- uAmplitude: resolved.uAmplitude,
2763
- wireframe: resolved.wireframe,
2764
- loop: resolved.loop,
2765
- loopDuration: resolved.loopDuration,
2766
- range: resolved.range,
2767
- rangeStart: resolved.rangeStart,
2768
- rangeEnd: resolved.rangeEnd,
2769
- positionX: resolved.positionX,
2770
- positionY: resolved.positionY,
2771
- positionZ: resolved.positionZ,
2772
- rotationX: resolved.rotationX,
2773
- rotationY: resolved.rotationY,
2774
- rotationZ: resolved.rotationZ,
2775
- color1: resolved.color1,
2776
- color2: resolved.color2,
2777
- color3: resolved.color3,
2778
- reflection: resolved.reflection,
2779
- brightness: resolved.brightness,
2780
- cAzimuthAngle: resolved.cAzimuthAngle,
2781
- cPolarAngle: resolved.cPolarAngle,
2782
- cDistance: resolved.cDistance,
2783
- cameraZoom: resolved.cameraZoom,
2784
- zoomOut: resolved.zoomOut,
2785
- lightType: resolved.lightType,
2786
- envPreset: resolved.envPreset,
2787
- grain: resolved.grain,
2788
- grainBlending: resolved.grainBlending
2923
+ style: { position: "absolute", inset: 0 },
2924
+ pixelDensity: resolved.pixelDensity,
2925
+ fov: resolved.fov,
2926
+ envBasePath,
2927
+ preserveDrawingBuffer,
2928
+ children: /* @__PURE__ */ jsxRuntime.jsx(
2929
+ ShaderGradient,
2930
+ {
2931
+ control: "props",
2932
+ type: resolved.type,
2933
+ shader: resolved.shader,
2934
+ animate,
2935
+ uTime: resolved.uTime,
2936
+ uSpeed: resolved.uSpeed,
2937
+ uStrength: resolved.uStrength,
2938
+ uDensity: resolved.uDensity,
2939
+ uFrequency: resolved.uFrequency,
2940
+ uAmplitude: resolved.uAmplitude,
2941
+ wireframe: resolved.wireframe,
2942
+ loop: resolved.loop,
2943
+ loopDuration: resolved.loopDuration,
2944
+ range: resolved.range,
2945
+ rangeStart: resolved.rangeStart,
2946
+ rangeEnd: resolved.rangeEnd,
2947
+ positionX: resolved.positionX,
2948
+ positionY: resolved.positionY,
2949
+ positionZ: resolved.positionZ,
2950
+ rotationX: resolved.rotationX,
2951
+ rotationY: resolved.rotationY,
2952
+ rotationZ: resolved.rotationZ,
2953
+ color1: resolved.color1,
2954
+ color2: resolved.color2,
2955
+ color3: resolved.color3,
2956
+ reflection: resolved.reflection,
2957
+ brightness: resolved.brightness,
2958
+ cAzimuthAngle: resolved.cAzimuthAngle,
2959
+ cPolarAngle: resolved.cPolarAngle,
2960
+ cDistance: resolved.cDistance,
2961
+ cameraZoom: resolved.cameraZoom,
2962
+ zoomOut: resolved.zoomOut,
2963
+ lightType: resolved.lightType,
2964
+ envPreset: resolved.envPreset,
2965
+ grain: resolved.grain,
2966
+ grainBlending: resolved.grainBlending
2967
+ }
2968
+ )
2789
2969
  }
2790
- )
2970
+ ) })
2791
2971
  }
2792
- ) });
2972
+ );
2793
2973
  }
2794
2974
  var DEFAULT_LABELS2 = {
2795
2975
  play: "Play",
@@ -3672,29 +3852,42 @@ function NumberField({
3672
3852
  step,
3673
3853
  onChange
3674
3854
  }) {
3675
- return /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "grid gap-1 text-xs", children: [
3676
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: label }),
3855
+ const rangeId = React11__namespace.useId();
3856
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid min-w-0 gap-1 text-xs", children: [
3857
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-2", children: [
3858
+ /* @__PURE__ */ jsxRuntime.jsx(
3859
+ "label",
3860
+ {
3861
+ htmlFor: rangeId,
3862
+ className: "text-muted-foreground min-w-0 truncate",
3863
+ children: label
3864
+ }
3865
+ ),
3866
+ /* @__PURE__ */ jsxRuntime.jsx(
3867
+ "input",
3868
+ {
3869
+ type: "number",
3870
+ min,
3871
+ max,
3872
+ step,
3873
+ value,
3874
+ "aria-label": label,
3875
+ onChange: (event) => onChange(Number(event.target.value)),
3876
+ className: "border-input bg-background w-14 shrink-0 rounded-md border px-1.5 py-0.5 text-right tabular-nums"
3877
+ }
3878
+ )
3879
+ ] }),
3677
3880
  /* @__PURE__ */ jsxRuntime.jsx(
3678
3881
  "input",
3679
3882
  {
3883
+ id: rangeId,
3680
3884
  type: "range",
3681
3885
  min,
3682
3886
  max,
3683
3887
  step,
3684
3888
  value,
3685
- onChange: (event) => onChange(Number(event.target.value))
3686
- }
3687
- ),
3688
- /* @__PURE__ */ jsxRuntime.jsx(
3689
- "input",
3690
- {
3691
- type: "number",
3692
- min,
3693
- max,
3694
- step,
3695
- value,
3696
3889
  onChange: (event) => onChange(Number(event.target.value)),
3697
- className: "border-input bg-background rounded-md border px-2 py-1"
3890
+ className: "w-full min-w-0"
3698
3891
  }
3699
3892
  )
3700
3893
  ] });
@@ -3705,14 +3898,14 @@ function SelectField({
3705
3898
  options,
3706
3899
  onChange
3707
3900
  }) {
3708
- return /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "grid gap-1 text-xs", children: [
3709
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: label }),
3901
+ return /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "grid min-w-0 gap-1 text-xs", children: [
3902
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground truncate", children: label }),
3710
3903
  /* @__PURE__ */ jsxRuntime.jsx(
3711
3904
  "select",
3712
3905
  {
3713
3906
  value,
3714
3907
  onChange: (event) => onChange(event.target.value),
3715
- className: "border-input bg-background rounded-md border px-2 py-1",
3908
+ className: "border-input bg-background min-w-0 w-full rounded-md border px-2 py-1",
3716
3909
  children: options.map((option) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: option, children: option }, option))
3717
3910
  }
3718
3911
  )
@@ -3781,13 +3974,16 @@ var ShaderCurtainEditor = React11__namespace.forwardRef(function ShaderCurtainEd
3781
3974
  return /* @__PURE__ */ jsxRuntime.jsxs(
3782
3975
  "div",
3783
3976
  {
3784
- className: cn("grid gap-4 lg:grid-cols-[minmax(0,1fr)_20rem]", className),
3977
+ className: cn(
3978
+ "grid min-h-0 gap-4 md:grid-cols-2 md:items-start",
3979
+ className
3980
+ ),
3785
3981
  children: [
3786
3982
  /* @__PURE__ */ jsxRuntime.jsx(
3787
3983
  "div",
3788
3984
  {
3789
3985
  ref: previewRef,
3790
- className: "relative aspect-video overflow-hidden rounded-lg bg-zinc-950",
3986
+ className: "relative aspect-video overflow-hidden rounded-lg bg-zinc-950 md:sticky md:top-0",
3791
3987
  children: /* @__PURE__ */ jsxRuntime.jsx(
3792
3988
  ShaderCurtain,
3793
3989
  {
@@ -3799,7 +3995,7 @@ var ShaderCurtainEditor = React11__namespace.forwardRef(function ShaderCurtainEd
3799
3995
  )
3800
3996
  }
3801
3997
  ),
3802
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
3998
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-h-0 flex-col gap-3", children: [
3803
3999
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1", children: [
3804
4000
  ["shape", copy.shape],
3805
4001
  ["colors", copy.colors],
@@ -3816,396 +4012,398 @@ var ShaderCurtainEditor = React11__namespace.forwardRef(function ShaderCurtainEd
3816
4012
  },
3817
4013
  id
3818
4014
  )) }),
3819
- tab === "shape" ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid gap-3", children: [
3820
- /* @__PURE__ */ jsxRuntime.jsx(
3821
- SelectField,
3822
- {
3823
- label: "Type",
3824
- value: config.type,
3825
- options: SHADER_CURTAIN_TYPES,
3826
- onChange: (type) => update({ type })
3827
- }
3828
- ),
3829
- /* @__PURE__ */ jsxRuntime.jsx(
3830
- SelectField,
3831
- {
3832
- label: "Shader",
3833
- value: config.shader,
3834
- options: SHADER_VARIANTS,
3835
- onChange: (shader) => update({ shader })
3836
- }
3837
- ),
3838
- /* @__PURE__ */ jsxRuntime.jsx(
3839
- SelectField,
3840
- {
3841
- label: "Animate",
3842
- value: config.animate,
3843
- options: ["on", "off"],
3844
- onChange: (animate) => update({ animate })
3845
- }
3846
- ),
3847
- /* @__PURE__ */ jsxRuntime.jsx(
3848
- SelectField,
3849
- {
3850
- label: "Loop",
3851
- value: config.loop,
3852
- options: ["on", "off"],
3853
- onChange: (loop) => update({ loop })
3854
- }
3855
- ),
3856
- /* @__PURE__ */ jsxRuntime.jsx(
3857
- NumberField,
3858
- {
3859
- label: "Speed",
3860
- value: config.uSpeed,
3861
- min: 0,
3862
- max: 4,
3863
- step: 0.05,
3864
- onChange: (uSpeed) => update({ uSpeed })
3865
- }
3866
- ),
3867
- /* @__PURE__ */ jsxRuntime.jsx(
3868
- NumberField,
3869
- {
3870
- label: "Strength",
3871
- value: config.uStrength,
3872
- min: 0,
3873
- max: 10,
3874
- step: 0.1,
3875
- onChange: (uStrength) => update({ uStrength })
3876
- }
3877
- ),
3878
- /* @__PURE__ */ jsxRuntime.jsx(
3879
- NumberField,
3880
- {
3881
- label: "Density",
3882
- value: config.uDensity,
3883
- min: 0,
3884
- max: 8,
3885
- step: 0.1,
3886
- onChange: (uDensity) => update({ uDensity })
3887
- }
3888
- ),
3889
- /* @__PURE__ */ jsxRuntime.jsx(
3890
- NumberField,
3891
- {
3892
- label: "Frequency",
3893
- value: config.uFrequency,
3894
- min: 0,
3895
- max: 12,
3896
- step: 0.1,
3897
- onChange: (uFrequency) => update({ uFrequency })
3898
- }
3899
- ),
3900
- /* @__PURE__ */ jsxRuntime.jsx(
3901
- NumberField,
3902
- {
3903
- label: "Amplitude",
3904
- value: config.uAmplitude,
3905
- min: 0,
3906
- max: 8,
3907
- step: 0.1,
3908
- onChange: (uAmplitude) => update({ uAmplitude })
3909
- }
3910
- ),
3911
- /* @__PURE__ */ jsxRuntime.jsx(
3912
- NumberField,
3913
- {
3914
- label: "Time",
3915
- value: config.uTime,
3916
- min: 0,
3917
- max: 40,
3918
- step: 0.1,
3919
- onChange: (uTime) => update({ uTime })
3920
- }
3921
- ),
3922
- /* @__PURE__ */ jsxRuntime.jsx(
3923
- NumberField,
3924
- {
3925
- label: "Loop duration",
3926
- value: config.loopDuration,
3927
- min: 1,
3928
- max: 60,
3929
- step: 1,
3930
- onChange: (loopDuration) => update({ loopDuration })
3931
- }
3932
- ),
3933
- /* @__PURE__ */ jsxRuntime.jsx(
3934
- SelectField,
3935
- {
3936
- label: "Range",
3937
- value: config.range,
3938
- options: ["enabled", "disabled"],
3939
- onChange: (range) => update({ range })
3940
- }
3941
- ),
3942
- /* @__PURE__ */ jsxRuntime.jsx(
3943
- NumberField,
3944
- {
3945
- label: "Range start",
3946
- value: config.rangeStart,
3947
- min: 0,
3948
- max: 40,
3949
- step: 0.1,
3950
- onChange: (rangeStart) => update({ rangeStart })
3951
- }
3952
- ),
3953
- /* @__PURE__ */ jsxRuntime.jsx(
3954
- NumberField,
3955
- {
3956
- label: "Range end",
3957
- value: config.rangeEnd,
3958
- min: 0,
3959
- max: 40,
3960
- step: 0.1,
3961
- onChange: (rangeEnd) => update({ rangeEnd })
3962
- }
3963
- ),
3964
- /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-2 text-xs", children: [
4015
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-h-0 max-h-[min(22rem,40dvh)] overflow-x-hidden overflow-y-auto pr-1", children: [
4016
+ tab === "shape" ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-2", children: [
3965
4017
  /* @__PURE__ */ jsxRuntime.jsx(
3966
- "input",
4018
+ SelectField,
3967
4019
  {
3968
- type: "checkbox",
3969
- checked: config.wireframe,
3970
- onChange: (event) => update({ wireframe: event.target.checked })
4020
+ label: "Type",
4021
+ value: config.type,
4022
+ options: SHADER_CURTAIN_TYPES,
4023
+ onChange: (type) => update({ type })
3971
4024
  }
3972
4025
  ),
3973
- "Wireframe"
3974
- ] })
3975
- ] }) : null,
3976
- tab === "colors" ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid gap-3", children: [
3977
- /* @__PURE__ */ jsxRuntime.jsx(
3978
- ColorField,
3979
- {
3980
- label: "Color 1",
3981
- value: config.color1,
3982
- onChange: (color1) => update({ color1 })
3983
- }
3984
- ),
3985
- /* @__PURE__ */ jsxRuntime.jsx(
3986
- ColorField,
3987
- {
3988
- label: "Color 2",
3989
- value: config.color2,
3990
- onChange: (color2) => update({ color2 })
3991
- }
3992
- ),
3993
- /* @__PURE__ */ jsxRuntime.jsx(
3994
- ColorField,
3995
- {
3996
- label: "Color 3",
3997
- value: config.color3,
3998
- onChange: (color3) => update({ color3 })
3999
- }
4000
- ),
4001
- /* @__PURE__ */ jsxRuntime.jsx(
4002
- NumberField,
4003
- {
4004
- label: "Reflection",
4005
- value: config.reflection,
4006
- min: 0,
4007
- max: 1,
4008
- step: 0.05,
4009
- onChange: (reflection) => update({ reflection })
4010
- }
4011
- ),
4012
- /* @__PURE__ */ jsxRuntime.jsx(
4013
- NumberField,
4014
- {
4015
- label: "Brightness",
4016
- value: config.brightness,
4017
- min: 0,
4018
- max: 4,
4019
- step: 0.05,
4020
- onChange: (brightness) => update({ brightness })
4021
- }
4022
- )
4023
- ] }) : null,
4024
- tab === "light" ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid gap-3", children: [
4025
- /* @__PURE__ */ jsxRuntime.jsx(
4026
- SelectField,
4027
- {
4028
- label: "Light",
4029
- value: config.lightType,
4030
- options: SHADER_LIGHT_TYPES,
4031
- onChange: (lightType) => update({ lightType })
4032
- }
4033
- ),
4034
- /* @__PURE__ */ jsxRuntime.jsx(
4035
- SelectField,
4036
- {
4037
- label: "Environment",
4038
- value: config.envPreset,
4039
- options: SHADER_ENV_PRESETS,
4040
- onChange: (envPreset) => update({ envPreset })
4041
- }
4042
- ),
4043
- /* @__PURE__ */ jsxRuntime.jsx(
4044
- SelectField,
4045
- {
4046
- label: "Grain",
4047
- value: config.grain,
4048
- options: ["on", "off"],
4049
- onChange: (grain) => update({ grain })
4050
- }
4051
- ),
4052
- /* @__PURE__ */ jsxRuntime.jsx(
4053
- NumberField,
4054
- {
4055
- label: "Grain blending",
4056
- value: config.grainBlending,
4057
- min: 0,
4058
- max: 1,
4059
- step: 0.05,
4060
- onChange: (grainBlending) => update({ grainBlending })
4061
- }
4062
- )
4063
- ] }) : null,
4064
- tab === "camera" ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid gap-3", children: [
4065
- /* @__PURE__ */ jsxRuntime.jsx(
4066
- NumberField,
4067
- {
4068
- label: "Azimuth",
4069
- value: config.cAzimuthAngle,
4070
- min: 0,
4071
- max: 360,
4072
- step: 1,
4073
- onChange: (cAzimuthAngle) => update({ cAzimuthAngle })
4074
- }
4075
- ),
4076
- /* @__PURE__ */ jsxRuntime.jsx(
4077
- NumberField,
4078
- {
4079
- label: "Polar",
4080
- value: config.cPolarAngle,
4081
- min: 0,
4082
- max: 180,
4083
- step: 1,
4084
- onChange: (cPolarAngle) => update({ cPolarAngle })
4085
- }
4086
- ),
4087
- /* @__PURE__ */ jsxRuntime.jsx(
4088
- NumberField,
4089
- {
4090
- label: "Distance",
4091
- value: config.cDistance,
4092
- min: 0.1,
4093
- max: 40,
4094
- step: 0.1,
4095
- onChange: (cDistance) => update({ cDistance })
4096
- }
4097
- ),
4098
- /* @__PURE__ */ jsxRuntime.jsx(
4099
- NumberField,
4100
- {
4101
- label: "Zoom",
4102
- value: config.cameraZoom,
4103
- min: 0.1,
4104
- max: 50,
4105
- step: 0.1,
4106
- onChange: (cameraZoom) => update({ cameraZoom })
4107
- }
4108
- ),
4109
- /* @__PURE__ */ jsxRuntime.jsx(
4110
- NumberField,
4111
- {
4112
- label: "FOV",
4113
- value: config.fov,
4114
- min: 10,
4115
- max: 120,
4116
- step: 1,
4117
- onChange: (fov) => update({ fov })
4118
- }
4119
- ),
4120
- /* @__PURE__ */ jsxRuntime.jsx(
4121
- NumberField,
4122
- {
4123
- label: "Pixel density",
4124
- value: config.pixelDensity,
4125
- min: 0.5,
4126
- max: 2,
4127
- step: 0.1,
4128
- onChange: (pixelDensity) => update({ pixelDensity })
4129
- }
4130
- ),
4131
- /* @__PURE__ */ jsxRuntime.jsx(
4132
- NumberField,
4133
- {
4134
- label: "Position X",
4135
- value: config.positionX,
4136
- min: -20,
4137
- max: 20,
4138
- step: 0.1,
4139
- onChange: (positionX) => update({ positionX })
4140
- }
4141
- ),
4142
- /* @__PURE__ */ jsxRuntime.jsx(
4143
- NumberField,
4144
- {
4145
- label: "Position Y",
4146
- value: config.positionY,
4147
- min: -20,
4148
- max: 20,
4149
- step: 0.1,
4150
- onChange: (positionY) => update({ positionY })
4151
- }
4152
- ),
4153
- /* @__PURE__ */ jsxRuntime.jsx(
4154
- NumberField,
4155
- {
4156
- label: "Position Z",
4157
- value: config.positionZ,
4158
- min: -20,
4159
- max: 20,
4160
- step: 0.1,
4161
- onChange: (positionZ) => update({ positionZ })
4162
- }
4163
- ),
4164
- /* @__PURE__ */ jsxRuntime.jsx(
4165
- NumberField,
4166
- {
4167
- label: "Rotation X",
4168
- value: config.rotationX,
4169
- min: 0,
4170
- max: 360,
4171
- step: 1,
4172
- onChange: (rotationX) => update({ rotationX })
4173
- }
4174
- ),
4175
- /* @__PURE__ */ jsxRuntime.jsx(
4176
- NumberField,
4177
- {
4178
- label: "Rotation Y",
4179
- value: config.rotationY,
4180
- min: 0,
4181
- max: 360,
4182
- step: 1,
4183
- onChange: (rotationY) => update({ rotationY })
4184
- }
4185
- ),
4186
- /* @__PURE__ */ jsxRuntime.jsx(
4187
- NumberField,
4188
- {
4189
- label: "Rotation Z",
4190
- value: config.rotationZ,
4191
- min: 0,
4192
- max: 360,
4193
- step: 1,
4194
- onChange: (rotationZ) => update({ rotationZ })
4195
- }
4196
- ),
4197
- /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-2 text-xs", children: [
4198
4026
  /* @__PURE__ */ jsxRuntime.jsx(
4199
- "input",
4027
+ SelectField,
4200
4028
  {
4201
- type: "checkbox",
4202
- checked: config.zoomOut,
4203
- onChange: (event) => update({ zoomOut: event.target.checked })
4029
+ label: "Shader",
4030
+ value: config.shader,
4031
+ options: SHADER_VARIANTS,
4032
+ onChange: (shader) => update({ shader })
4204
4033
  }
4205
4034
  ),
4206
- "Zoom out"
4207
- ] })
4208
- ] }) : null,
4035
+ /* @__PURE__ */ jsxRuntime.jsx(
4036
+ SelectField,
4037
+ {
4038
+ label: "Animate",
4039
+ value: config.animate,
4040
+ options: ["on", "off"],
4041
+ onChange: (animate) => update({ animate })
4042
+ }
4043
+ ),
4044
+ /* @__PURE__ */ jsxRuntime.jsx(
4045
+ SelectField,
4046
+ {
4047
+ label: "Loop",
4048
+ value: config.loop,
4049
+ options: ["on", "off"],
4050
+ onChange: (loop) => update({ loop })
4051
+ }
4052
+ ),
4053
+ /* @__PURE__ */ jsxRuntime.jsx(
4054
+ NumberField,
4055
+ {
4056
+ label: "Speed",
4057
+ value: config.uSpeed,
4058
+ min: 0,
4059
+ max: 4,
4060
+ step: 0.05,
4061
+ onChange: (uSpeed) => update({ uSpeed })
4062
+ }
4063
+ ),
4064
+ /* @__PURE__ */ jsxRuntime.jsx(
4065
+ NumberField,
4066
+ {
4067
+ label: "Strength",
4068
+ value: config.uStrength,
4069
+ min: 0,
4070
+ max: 10,
4071
+ step: 0.1,
4072
+ onChange: (uStrength) => update({ uStrength })
4073
+ }
4074
+ ),
4075
+ /* @__PURE__ */ jsxRuntime.jsx(
4076
+ NumberField,
4077
+ {
4078
+ label: "Density",
4079
+ value: config.uDensity,
4080
+ min: 0,
4081
+ max: 8,
4082
+ step: 0.1,
4083
+ onChange: (uDensity) => update({ uDensity })
4084
+ }
4085
+ ),
4086
+ /* @__PURE__ */ jsxRuntime.jsx(
4087
+ NumberField,
4088
+ {
4089
+ label: "Frequency",
4090
+ value: config.uFrequency,
4091
+ min: 0,
4092
+ max: 12,
4093
+ step: 0.1,
4094
+ onChange: (uFrequency) => update({ uFrequency })
4095
+ }
4096
+ ),
4097
+ /* @__PURE__ */ jsxRuntime.jsx(
4098
+ NumberField,
4099
+ {
4100
+ label: "Amplitude",
4101
+ value: config.uAmplitude,
4102
+ min: 0,
4103
+ max: 8,
4104
+ step: 0.1,
4105
+ onChange: (uAmplitude) => update({ uAmplitude })
4106
+ }
4107
+ ),
4108
+ /* @__PURE__ */ jsxRuntime.jsx(
4109
+ NumberField,
4110
+ {
4111
+ label: "Time",
4112
+ value: config.uTime,
4113
+ min: 0,
4114
+ max: 40,
4115
+ step: 0.1,
4116
+ onChange: (uTime) => update({ uTime })
4117
+ }
4118
+ ),
4119
+ /* @__PURE__ */ jsxRuntime.jsx(
4120
+ NumberField,
4121
+ {
4122
+ label: "Loop duration",
4123
+ value: config.loopDuration,
4124
+ min: 1,
4125
+ max: 60,
4126
+ step: 1,
4127
+ onChange: (loopDuration) => update({ loopDuration })
4128
+ }
4129
+ ),
4130
+ /* @__PURE__ */ jsxRuntime.jsx(
4131
+ SelectField,
4132
+ {
4133
+ label: "Range",
4134
+ value: config.range,
4135
+ options: ["enabled", "disabled"],
4136
+ onChange: (range) => update({ range })
4137
+ }
4138
+ ),
4139
+ /* @__PURE__ */ jsxRuntime.jsx(
4140
+ NumberField,
4141
+ {
4142
+ label: "Range start",
4143
+ value: config.rangeStart,
4144
+ min: 0,
4145
+ max: 40,
4146
+ step: 0.1,
4147
+ onChange: (rangeStart) => update({ rangeStart })
4148
+ }
4149
+ ),
4150
+ /* @__PURE__ */ jsxRuntime.jsx(
4151
+ NumberField,
4152
+ {
4153
+ label: "Range end",
4154
+ value: config.rangeEnd,
4155
+ min: 0,
4156
+ max: 40,
4157
+ step: 0.1,
4158
+ onChange: (rangeEnd) => update({ rangeEnd })
4159
+ }
4160
+ ),
4161
+ /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "col-span-2 flex items-center gap-2 text-xs", children: [
4162
+ /* @__PURE__ */ jsxRuntime.jsx(
4163
+ "input",
4164
+ {
4165
+ type: "checkbox",
4166
+ checked: config.wireframe,
4167
+ onChange: (event) => update({ wireframe: event.target.checked })
4168
+ }
4169
+ ),
4170
+ "Wireframe"
4171
+ ] })
4172
+ ] }) : null,
4173
+ tab === "colors" ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-2", children: [
4174
+ /* @__PURE__ */ jsxRuntime.jsx(
4175
+ ColorField,
4176
+ {
4177
+ label: "Color 1",
4178
+ value: config.color1,
4179
+ onChange: (color1) => update({ color1 })
4180
+ }
4181
+ ),
4182
+ /* @__PURE__ */ jsxRuntime.jsx(
4183
+ ColorField,
4184
+ {
4185
+ label: "Color 2",
4186
+ value: config.color2,
4187
+ onChange: (color2) => update({ color2 })
4188
+ }
4189
+ ),
4190
+ /* @__PURE__ */ jsxRuntime.jsx(
4191
+ ColorField,
4192
+ {
4193
+ label: "Color 3",
4194
+ value: config.color3,
4195
+ onChange: (color3) => update({ color3 })
4196
+ }
4197
+ ),
4198
+ /* @__PURE__ */ jsxRuntime.jsx(
4199
+ NumberField,
4200
+ {
4201
+ label: "Reflection",
4202
+ value: config.reflection,
4203
+ min: 0,
4204
+ max: 1,
4205
+ step: 0.05,
4206
+ onChange: (reflection) => update({ reflection })
4207
+ }
4208
+ ),
4209
+ /* @__PURE__ */ jsxRuntime.jsx(
4210
+ NumberField,
4211
+ {
4212
+ label: "Brightness",
4213
+ value: config.brightness,
4214
+ min: 0,
4215
+ max: 4,
4216
+ step: 0.05,
4217
+ onChange: (brightness) => update({ brightness })
4218
+ }
4219
+ )
4220
+ ] }) : null,
4221
+ tab === "light" ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-2", children: [
4222
+ /* @__PURE__ */ jsxRuntime.jsx(
4223
+ SelectField,
4224
+ {
4225
+ label: "Light",
4226
+ value: config.lightType,
4227
+ options: SHADER_LIGHT_TYPES,
4228
+ onChange: (lightType) => update({ lightType })
4229
+ }
4230
+ ),
4231
+ /* @__PURE__ */ jsxRuntime.jsx(
4232
+ SelectField,
4233
+ {
4234
+ label: "Environment",
4235
+ value: config.envPreset,
4236
+ options: SHADER_ENV_PRESETS,
4237
+ onChange: (envPreset) => update({ envPreset })
4238
+ }
4239
+ ),
4240
+ /* @__PURE__ */ jsxRuntime.jsx(
4241
+ SelectField,
4242
+ {
4243
+ label: "Grain",
4244
+ value: config.grain,
4245
+ options: ["on", "off"],
4246
+ onChange: (grain) => update({ grain })
4247
+ }
4248
+ ),
4249
+ /* @__PURE__ */ jsxRuntime.jsx(
4250
+ NumberField,
4251
+ {
4252
+ label: "Grain blending",
4253
+ value: config.grainBlending,
4254
+ min: 0,
4255
+ max: 1,
4256
+ step: 0.05,
4257
+ onChange: (grainBlending) => update({ grainBlending })
4258
+ }
4259
+ )
4260
+ ] }) : null,
4261
+ tab === "camera" ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-2", children: [
4262
+ /* @__PURE__ */ jsxRuntime.jsx(
4263
+ NumberField,
4264
+ {
4265
+ label: "Azimuth",
4266
+ value: config.cAzimuthAngle,
4267
+ min: 0,
4268
+ max: 360,
4269
+ step: 1,
4270
+ onChange: (cAzimuthAngle) => update({ cAzimuthAngle })
4271
+ }
4272
+ ),
4273
+ /* @__PURE__ */ jsxRuntime.jsx(
4274
+ NumberField,
4275
+ {
4276
+ label: "Polar",
4277
+ value: config.cPolarAngle,
4278
+ min: 0,
4279
+ max: 180,
4280
+ step: 1,
4281
+ onChange: (cPolarAngle) => update({ cPolarAngle })
4282
+ }
4283
+ ),
4284
+ /* @__PURE__ */ jsxRuntime.jsx(
4285
+ NumberField,
4286
+ {
4287
+ label: "Distance",
4288
+ value: config.cDistance,
4289
+ min: 0.1,
4290
+ max: 40,
4291
+ step: 0.1,
4292
+ onChange: (cDistance) => update({ cDistance })
4293
+ }
4294
+ ),
4295
+ /* @__PURE__ */ jsxRuntime.jsx(
4296
+ NumberField,
4297
+ {
4298
+ label: "Zoom",
4299
+ value: config.cameraZoom,
4300
+ min: 0.1,
4301
+ max: 50,
4302
+ step: 0.1,
4303
+ onChange: (cameraZoom) => update({ cameraZoom })
4304
+ }
4305
+ ),
4306
+ /* @__PURE__ */ jsxRuntime.jsx(
4307
+ NumberField,
4308
+ {
4309
+ label: "FOV",
4310
+ value: config.fov,
4311
+ min: 10,
4312
+ max: 120,
4313
+ step: 1,
4314
+ onChange: (fov) => update({ fov })
4315
+ }
4316
+ ),
4317
+ /* @__PURE__ */ jsxRuntime.jsx(
4318
+ NumberField,
4319
+ {
4320
+ label: "Pixel density",
4321
+ value: config.pixelDensity,
4322
+ min: 0.5,
4323
+ max: 2,
4324
+ step: 0.1,
4325
+ onChange: (pixelDensity) => update({ pixelDensity })
4326
+ }
4327
+ ),
4328
+ /* @__PURE__ */ jsxRuntime.jsx(
4329
+ NumberField,
4330
+ {
4331
+ label: "Position X",
4332
+ value: config.positionX,
4333
+ min: -20,
4334
+ max: 20,
4335
+ step: 0.1,
4336
+ onChange: (positionX) => update({ positionX })
4337
+ }
4338
+ ),
4339
+ /* @__PURE__ */ jsxRuntime.jsx(
4340
+ NumberField,
4341
+ {
4342
+ label: "Position Y",
4343
+ value: config.positionY,
4344
+ min: -20,
4345
+ max: 20,
4346
+ step: 0.1,
4347
+ onChange: (positionY) => update({ positionY })
4348
+ }
4349
+ ),
4350
+ /* @__PURE__ */ jsxRuntime.jsx(
4351
+ NumberField,
4352
+ {
4353
+ label: "Position Z",
4354
+ value: config.positionZ,
4355
+ min: -20,
4356
+ max: 20,
4357
+ step: 0.1,
4358
+ onChange: (positionZ) => update({ positionZ })
4359
+ }
4360
+ ),
4361
+ /* @__PURE__ */ jsxRuntime.jsx(
4362
+ NumberField,
4363
+ {
4364
+ label: "Rotation X",
4365
+ value: config.rotationX,
4366
+ min: -360,
4367
+ max: 360,
4368
+ step: 1,
4369
+ onChange: (rotationX) => update({ rotationX })
4370
+ }
4371
+ ),
4372
+ /* @__PURE__ */ jsxRuntime.jsx(
4373
+ NumberField,
4374
+ {
4375
+ label: "Rotation Y",
4376
+ value: config.rotationY,
4377
+ min: -360,
4378
+ max: 360,
4379
+ step: 1,
4380
+ onChange: (rotationY) => update({ rotationY })
4381
+ }
4382
+ ),
4383
+ /* @__PURE__ */ jsxRuntime.jsx(
4384
+ NumberField,
4385
+ {
4386
+ label: "Rotation Z",
4387
+ value: config.rotationZ,
4388
+ min: -360,
4389
+ max: 360,
4390
+ step: 1,
4391
+ onChange: (rotationZ) => update({ rotationZ })
4392
+ }
4393
+ ),
4394
+ /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "col-span-2 flex items-center gap-2 text-xs", children: [
4395
+ /* @__PURE__ */ jsxRuntime.jsx(
4396
+ "input",
4397
+ {
4398
+ type: "checkbox",
4399
+ checked: config.zoomOut,
4400
+ onChange: (event) => update({ zoomOut: event.target.checked })
4401
+ }
4402
+ ),
4403
+ "Zoom out"
4404
+ ] })
4405
+ ] }) : null
4406
+ ] }),
4209
4407
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
4210
4408
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground text-xs", children: copy.presets }),
4211
4409
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1", children: SHADER_CURTAIN_PRESETS.map((preset) => /* @__PURE__ */ jsxRuntime.jsx(
@@ -4223,25 +4421,27 @@ var ShaderCurtainEditor = React11__namespace.forwardRef(function ShaderCurtainEd
4223
4421
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid gap-2", children: [
4224
4422
  /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "grid gap-1 text-xs", children: [
4225
4423
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: copy.importUrl }),
4226
- /* @__PURE__ */ jsxRuntime.jsx(
4227
- "input",
4228
- {
4229
- value: url,
4230
- onChange: (event) => setUrl(event.target.value),
4231
- className: "border-input bg-background rounded-md border px-2 py-1"
4232
- }
4233
- )
4424
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2", children: [
4425
+ /* @__PURE__ */ jsxRuntime.jsx(
4426
+ "input",
4427
+ {
4428
+ value: url,
4429
+ onChange: (event) => setUrl(event.target.value),
4430
+ className: "border-input bg-background min-w-0 flex-1 rounded-md border px-2 py-1"
4431
+ }
4432
+ ),
4433
+ /* @__PURE__ */ jsxRuntime.jsx(
4434
+ Button,
4435
+ {
4436
+ type: "button",
4437
+ size: "sm",
4438
+ variant: "secondary",
4439
+ onClick: applyUrl,
4440
+ children: copy.importApply
4441
+ }
4442
+ )
4443
+ ] })
4234
4444
  ] }),
4235
- /* @__PURE__ */ jsxRuntime.jsx(
4236
- Button,
4237
- {
4238
- type: "button",
4239
- size: "sm",
4240
- variant: "secondary",
4241
- onClick: applyUrl,
4242
- children: copy.importApply
4243
- }
4244
- ),
4245
4445
  urlError ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-destructive text-xs", role: "alert", children: urlError }) : null
4246
4446
  ] })
4247
4447
  ] })