@livo-tv/blocks 1.30.0 → 1.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.
package/dist/index.js CHANGED
@@ -3648,29 +3648,32 @@ function NumberField({
3648
3648
  }) {
3649
3649
  return /* @__PURE__ */ jsxs("label", { className: "grid gap-1 text-xs", children: [
3650
3650
  /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: label }),
3651
- /* @__PURE__ */ jsx(
3652
- "input",
3653
- {
3654
- type: "range",
3655
- min,
3656
- max,
3657
- step,
3658
- value,
3659
- onChange: (event) => onChange(Number(event.target.value))
3660
- }
3661
- ),
3662
- /* @__PURE__ */ jsx(
3663
- "input",
3664
- {
3665
- type: "number",
3666
- min,
3667
- max,
3668
- step,
3669
- value,
3670
- onChange: (event) => onChange(Number(event.target.value)),
3671
- className: "border-input bg-background rounded-md border px-2 py-1"
3672
- }
3673
- )
3651
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
3652
+ /* @__PURE__ */ jsx(
3653
+ "input",
3654
+ {
3655
+ type: "range",
3656
+ min,
3657
+ max,
3658
+ step,
3659
+ value,
3660
+ onChange: (event) => onChange(Number(event.target.value)),
3661
+ className: "min-w-0 flex-1"
3662
+ }
3663
+ ),
3664
+ /* @__PURE__ */ jsx(
3665
+ "input",
3666
+ {
3667
+ type: "number",
3668
+ min,
3669
+ max,
3670
+ step,
3671
+ value,
3672
+ onChange: (event) => onChange(Number(event.target.value)),
3673
+ className: "border-input bg-background w-16 shrink-0 rounded-md border px-2 py-1"
3674
+ }
3675
+ )
3676
+ ] })
3674
3677
  ] });
3675
3678
  }
3676
3679
  function SelectField({
@@ -3755,13 +3758,16 @@ var ShaderCurtainEditor = React11.forwardRef(function ShaderCurtainEditor2({ val
3755
3758
  return /* @__PURE__ */ jsxs(
3756
3759
  "div",
3757
3760
  {
3758
- className: cn("grid gap-4 lg:grid-cols-[minmax(0,1fr)_20rem]", className),
3761
+ className: cn(
3762
+ "grid min-h-0 gap-4 md:grid-cols-2 md:items-start",
3763
+ className
3764
+ ),
3759
3765
  children: [
3760
3766
  /* @__PURE__ */ jsx(
3761
3767
  "div",
3762
3768
  {
3763
3769
  ref: previewRef,
3764
- className: "relative aspect-video overflow-hidden rounded-lg bg-zinc-950",
3770
+ className: "relative aspect-video overflow-hidden rounded-lg bg-zinc-950 md:sticky md:top-0",
3765
3771
  children: /* @__PURE__ */ jsx(
3766
3772
  ShaderCurtain,
3767
3773
  {
@@ -3773,7 +3779,7 @@ var ShaderCurtainEditor = React11.forwardRef(function ShaderCurtainEditor2({ val
3773
3779
  )
3774
3780
  }
3775
3781
  ),
3776
- /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
3782
+ /* @__PURE__ */ jsxs("div", { className: "flex min-h-0 flex-col gap-3", children: [
3777
3783
  /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1", children: [
3778
3784
  ["shape", copy.shape],
3779
3785
  ["colors", copy.colors],
@@ -3790,396 +3796,398 @@ var ShaderCurtainEditor = React11.forwardRef(function ShaderCurtainEditor2({ val
3790
3796
  },
3791
3797
  id
3792
3798
  )) }),
3793
- tab === "shape" ? /* @__PURE__ */ jsxs("div", { className: "grid gap-3", children: [
3794
- /* @__PURE__ */ jsx(
3795
- SelectField,
3796
- {
3797
- label: "Type",
3798
- value: config.type,
3799
- options: SHADER_CURTAIN_TYPES,
3800
- onChange: (type) => update({ type })
3801
- }
3802
- ),
3803
- /* @__PURE__ */ jsx(
3804
- SelectField,
3805
- {
3806
- label: "Shader",
3807
- value: config.shader,
3808
- options: SHADER_VARIANTS,
3809
- onChange: (shader) => update({ shader })
3810
- }
3811
- ),
3812
- /* @__PURE__ */ jsx(
3813
- SelectField,
3814
- {
3815
- label: "Animate",
3816
- value: config.animate,
3817
- options: ["on", "off"],
3818
- onChange: (animate) => update({ animate })
3819
- }
3820
- ),
3821
- /* @__PURE__ */ jsx(
3822
- SelectField,
3823
- {
3824
- label: "Loop",
3825
- value: config.loop,
3826
- options: ["on", "off"],
3827
- onChange: (loop) => update({ loop })
3828
- }
3829
- ),
3830
- /* @__PURE__ */ jsx(
3831
- NumberField,
3832
- {
3833
- label: "Speed",
3834
- value: config.uSpeed,
3835
- min: 0,
3836
- max: 4,
3837
- step: 0.05,
3838
- onChange: (uSpeed) => update({ uSpeed })
3839
- }
3840
- ),
3841
- /* @__PURE__ */ jsx(
3842
- NumberField,
3843
- {
3844
- label: "Strength",
3845
- value: config.uStrength,
3846
- min: 0,
3847
- max: 10,
3848
- step: 0.1,
3849
- onChange: (uStrength) => update({ uStrength })
3850
- }
3851
- ),
3852
- /* @__PURE__ */ jsx(
3853
- NumberField,
3854
- {
3855
- label: "Density",
3856
- value: config.uDensity,
3857
- min: 0,
3858
- max: 8,
3859
- step: 0.1,
3860
- onChange: (uDensity) => update({ uDensity })
3861
- }
3862
- ),
3863
- /* @__PURE__ */ jsx(
3864
- NumberField,
3865
- {
3866
- label: "Frequency",
3867
- value: config.uFrequency,
3868
- min: 0,
3869
- max: 12,
3870
- step: 0.1,
3871
- onChange: (uFrequency) => update({ uFrequency })
3872
- }
3873
- ),
3874
- /* @__PURE__ */ jsx(
3875
- NumberField,
3876
- {
3877
- label: "Amplitude",
3878
- value: config.uAmplitude,
3879
- min: 0,
3880
- max: 8,
3881
- step: 0.1,
3882
- onChange: (uAmplitude) => update({ uAmplitude })
3883
- }
3884
- ),
3885
- /* @__PURE__ */ jsx(
3886
- NumberField,
3887
- {
3888
- label: "Time",
3889
- value: config.uTime,
3890
- min: 0,
3891
- max: 40,
3892
- step: 0.1,
3893
- onChange: (uTime) => update({ uTime })
3894
- }
3895
- ),
3896
- /* @__PURE__ */ jsx(
3897
- NumberField,
3898
- {
3899
- label: "Loop duration",
3900
- value: config.loopDuration,
3901
- min: 1,
3902
- max: 60,
3903
- step: 1,
3904
- onChange: (loopDuration) => update({ loopDuration })
3905
- }
3906
- ),
3907
- /* @__PURE__ */ jsx(
3908
- SelectField,
3909
- {
3910
- label: "Range",
3911
- value: config.range,
3912
- options: ["enabled", "disabled"],
3913
- onChange: (range) => update({ range })
3914
- }
3915
- ),
3916
- /* @__PURE__ */ jsx(
3917
- NumberField,
3918
- {
3919
- label: "Range start",
3920
- value: config.rangeStart,
3921
- min: 0,
3922
- max: 40,
3923
- step: 0.1,
3924
- onChange: (rangeStart) => update({ rangeStart })
3925
- }
3926
- ),
3927
- /* @__PURE__ */ jsx(
3928
- NumberField,
3929
- {
3930
- label: "Range end",
3931
- value: config.rangeEnd,
3932
- min: 0,
3933
- max: 40,
3934
- step: 0.1,
3935
- onChange: (rangeEnd) => update({ rangeEnd })
3936
- }
3937
- ),
3938
- /* @__PURE__ */ jsxs("label", { className: "flex items-center gap-2 text-xs", children: [
3799
+ /* @__PURE__ */ jsxs("div", { className: "min-h-0 max-h-[min(22rem,40dvh)] overflow-y-auto pr-1", children: [
3800
+ tab === "shape" ? /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-2", children: [
3939
3801
  /* @__PURE__ */ jsx(
3940
- "input",
3802
+ SelectField,
3941
3803
  {
3942
- type: "checkbox",
3943
- checked: config.wireframe,
3944
- onChange: (event) => update({ wireframe: event.target.checked })
3804
+ label: "Type",
3805
+ value: config.type,
3806
+ options: SHADER_CURTAIN_TYPES,
3807
+ onChange: (type) => update({ type })
3945
3808
  }
3946
3809
  ),
3947
- "Wireframe"
3948
- ] })
3949
- ] }) : null,
3950
- tab === "colors" ? /* @__PURE__ */ jsxs("div", { className: "grid gap-3", children: [
3951
- /* @__PURE__ */ jsx(
3952
- ColorField,
3953
- {
3954
- label: "Color 1",
3955
- value: config.color1,
3956
- onChange: (color1) => update({ color1 })
3957
- }
3958
- ),
3959
- /* @__PURE__ */ jsx(
3960
- ColorField,
3961
- {
3962
- label: "Color 2",
3963
- value: config.color2,
3964
- onChange: (color2) => update({ color2 })
3965
- }
3966
- ),
3967
- /* @__PURE__ */ jsx(
3968
- ColorField,
3969
- {
3970
- label: "Color 3",
3971
- value: config.color3,
3972
- onChange: (color3) => update({ color3 })
3973
- }
3974
- ),
3975
- /* @__PURE__ */ jsx(
3976
- NumberField,
3977
- {
3978
- label: "Reflection",
3979
- value: config.reflection,
3980
- min: 0,
3981
- max: 1,
3982
- step: 0.05,
3983
- onChange: (reflection) => update({ reflection })
3984
- }
3985
- ),
3986
- /* @__PURE__ */ jsx(
3987
- NumberField,
3988
- {
3989
- label: "Brightness",
3990
- value: config.brightness,
3991
- min: 0,
3992
- max: 4,
3993
- step: 0.05,
3994
- onChange: (brightness) => update({ brightness })
3995
- }
3996
- )
3997
- ] }) : null,
3998
- tab === "light" ? /* @__PURE__ */ jsxs("div", { className: "grid gap-3", children: [
3999
- /* @__PURE__ */ jsx(
4000
- SelectField,
4001
- {
4002
- label: "Light",
4003
- value: config.lightType,
4004
- options: SHADER_LIGHT_TYPES,
4005
- onChange: (lightType) => update({ lightType })
4006
- }
4007
- ),
4008
- /* @__PURE__ */ jsx(
4009
- SelectField,
4010
- {
4011
- label: "Environment",
4012
- value: config.envPreset,
4013
- options: SHADER_ENV_PRESETS,
4014
- onChange: (envPreset) => update({ envPreset })
4015
- }
4016
- ),
4017
- /* @__PURE__ */ jsx(
4018
- SelectField,
4019
- {
4020
- label: "Grain",
4021
- value: config.grain,
4022
- options: ["on", "off"],
4023
- onChange: (grain) => update({ grain })
4024
- }
4025
- ),
4026
- /* @__PURE__ */ jsx(
4027
- NumberField,
4028
- {
4029
- label: "Grain blending",
4030
- value: config.grainBlending,
4031
- min: 0,
4032
- max: 1,
4033
- step: 0.05,
4034
- onChange: (grainBlending) => update({ grainBlending })
4035
- }
4036
- )
4037
- ] }) : null,
4038
- tab === "camera" ? /* @__PURE__ */ jsxs("div", { className: "grid gap-3", children: [
4039
- /* @__PURE__ */ jsx(
4040
- NumberField,
4041
- {
4042
- label: "Azimuth",
4043
- value: config.cAzimuthAngle,
4044
- min: 0,
4045
- max: 360,
4046
- step: 1,
4047
- onChange: (cAzimuthAngle) => update({ cAzimuthAngle })
4048
- }
4049
- ),
4050
- /* @__PURE__ */ jsx(
4051
- NumberField,
4052
- {
4053
- label: "Polar",
4054
- value: config.cPolarAngle,
4055
- min: 0,
4056
- max: 180,
4057
- step: 1,
4058
- onChange: (cPolarAngle) => update({ cPolarAngle })
4059
- }
4060
- ),
4061
- /* @__PURE__ */ jsx(
4062
- NumberField,
4063
- {
4064
- label: "Distance",
4065
- value: config.cDistance,
4066
- min: 0.1,
4067
- max: 40,
4068
- step: 0.1,
4069
- onChange: (cDistance) => update({ cDistance })
4070
- }
4071
- ),
4072
- /* @__PURE__ */ jsx(
4073
- NumberField,
4074
- {
4075
- label: "Zoom",
4076
- value: config.cameraZoom,
4077
- min: 0.1,
4078
- max: 50,
4079
- step: 0.1,
4080
- onChange: (cameraZoom) => update({ cameraZoom })
4081
- }
4082
- ),
4083
- /* @__PURE__ */ jsx(
4084
- NumberField,
4085
- {
4086
- label: "FOV",
4087
- value: config.fov,
4088
- min: 10,
4089
- max: 120,
4090
- step: 1,
4091
- onChange: (fov) => update({ fov })
4092
- }
4093
- ),
4094
- /* @__PURE__ */ jsx(
4095
- NumberField,
4096
- {
4097
- label: "Pixel density",
4098
- value: config.pixelDensity,
4099
- min: 0.5,
4100
- max: 2,
4101
- step: 0.1,
4102
- onChange: (pixelDensity) => update({ pixelDensity })
4103
- }
4104
- ),
4105
- /* @__PURE__ */ jsx(
4106
- NumberField,
4107
- {
4108
- label: "Position X",
4109
- value: config.positionX,
4110
- min: -20,
4111
- max: 20,
4112
- step: 0.1,
4113
- onChange: (positionX) => update({ positionX })
4114
- }
4115
- ),
4116
- /* @__PURE__ */ jsx(
4117
- NumberField,
4118
- {
4119
- label: "Position Y",
4120
- value: config.positionY,
4121
- min: -20,
4122
- max: 20,
4123
- step: 0.1,
4124
- onChange: (positionY) => update({ positionY })
4125
- }
4126
- ),
4127
- /* @__PURE__ */ jsx(
4128
- NumberField,
4129
- {
4130
- label: "Position Z",
4131
- value: config.positionZ,
4132
- min: -20,
4133
- max: 20,
4134
- step: 0.1,
4135
- onChange: (positionZ) => update({ positionZ })
4136
- }
4137
- ),
4138
- /* @__PURE__ */ jsx(
4139
- NumberField,
4140
- {
4141
- label: "Rotation X",
4142
- value: config.rotationX,
4143
- min: 0,
4144
- max: 360,
4145
- step: 1,
4146
- onChange: (rotationX) => update({ rotationX })
4147
- }
4148
- ),
4149
- /* @__PURE__ */ jsx(
4150
- NumberField,
4151
- {
4152
- label: "Rotation Y",
4153
- value: config.rotationY,
4154
- min: 0,
4155
- max: 360,
4156
- step: 1,
4157
- onChange: (rotationY) => update({ rotationY })
4158
- }
4159
- ),
4160
- /* @__PURE__ */ jsx(
4161
- NumberField,
4162
- {
4163
- label: "Rotation Z",
4164
- value: config.rotationZ,
4165
- min: 0,
4166
- max: 360,
4167
- step: 1,
4168
- onChange: (rotationZ) => update({ rotationZ })
4169
- }
4170
- ),
4171
- /* @__PURE__ */ jsxs("label", { className: "flex items-center gap-2 text-xs", children: [
4172
3810
  /* @__PURE__ */ jsx(
4173
- "input",
3811
+ SelectField,
4174
3812
  {
4175
- type: "checkbox",
4176
- checked: config.zoomOut,
4177
- onChange: (event) => update({ zoomOut: event.target.checked })
3813
+ label: "Shader",
3814
+ value: config.shader,
3815
+ options: SHADER_VARIANTS,
3816
+ onChange: (shader) => update({ shader })
4178
3817
  }
4179
3818
  ),
4180
- "Zoom out"
4181
- ] })
4182
- ] }) : null,
3819
+ /* @__PURE__ */ jsx(
3820
+ SelectField,
3821
+ {
3822
+ label: "Animate",
3823
+ value: config.animate,
3824
+ options: ["on", "off"],
3825
+ onChange: (animate) => update({ animate })
3826
+ }
3827
+ ),
3828
+ /* @__PURE__ */ jsx(
3829
+ SelectField,
3830
+ {
3831
+ label: "Loop",
3832
+ value: config.loop,
3833
+ options: ["on", "off"],
3834
+ onChange: (loop) => update({ loop })
3835
+ }
3836
+ ),
3837
+ /* @__PURE__ */ jsx(
3838
+ NumberField,
3839
+ {
3840
+ label: "Speed",
3841
+ value: config.uSpeed,
3842
+ min: 0,
3843
+ max: 4,
3844
+ step: 0.05,
3845
+ onChange: (uSpeed) => update({ uSpeed })
3846
+ }
3847
+ ),
3848
+ /* @__PURE__ */ jsx(
3849
+ NumberField,
3850
+ {
3851
+ label: "Strength",
3852
+ value: config.uStrength,
3853
+ min: 0,
3854
+ max: 10,
3855
+ step: 0.1,
3856
+ onChange: (uStrength) => update({ uStrength })
3857
+ }
3858
+ ),
3859
+ /* @__PURE__ */ jsx(
3860
+ NumberField,
3861
+ {
3862
+ label: "Density",
3863
+ value: config.uDensity,
3864
+ min: 0,
3865
+ max: 8,
3866
+ step: 0.1,
3867
+ onChange: (uDensity) => update({ uDensity })
3868
+ }
3869
+ ),
3870
+ /* @__PURE__ */ jsx(
3871
+ NumberField,
3872
+ {
3873
+ label: "Frequency",
3874
+ value: config.uFrequency,
3875
+ min: 0,
3876
+ max: 12,
3877
+ step: 0.1,
3878
+ onChange: (uFrequency) => update({ uFrequency })
3879
+ }
3880
+ ),
3881
+ /* @__PURE__ */ jsx(
3882
+ NumberField,
3883
+ {
3884
+ label: "Amplitude",
3885
+ value: config.uAmplitude,
3886
+ min: 0,
3887
+ max: 8,
3888
+ step: 0.1,
3889
+ onChange: (uAmplitude) => update({ uAmplitude })
3890
+ }
3891
+ ),
3892
+ /* @__PURE__ */ jsx(
3893
+ NumberField,
3894
+ {
3895
+ label: "Time",
3896
+ value: config.uTime,
3897
+ min: 0,
3898
+ max: 40,
3899
+ step: 0.1,
3900
+ onChange: (uTime) => update({ uTime })
3901
+ }
3902
+ ),
3903
+ /* @__PURE__ */ jsx(
3904
+ NumberField,
3905
+ {
3906
+ label: "Loop duration",
3907
+ value: config.loopDuration,
3908
+ min: 1,
3909
+ max: 60,
3910
+ step: 1,
3911
+ onChange: (loopDuration) => update({ loopDuration })
3912
+ }
3913
+ ),
3914
+ /* @__PURE__ */ jsx(
3915
+ SelectField,
3916
+ {
3917
+ label: "Range",
3918
+ value: config.range,
3919
+ options: ["enabled", "disabled"],
3920
+ onChange: (range) => update({ range })
3921
+ }
3922
+ ),
3923
+ /* @__PURE__ */ jsx(
3924
+ NumberField,
3925
+ {
3926
+ label: "Range start",
3927
+ value: config.rangeStart,
3928
+ min: 0,
3929
+ max: 40,
3930
+ step: 0.1,
3931
+ onChange: (rangeStart) => update({ rangeStart })
3932
+ }
3933
+ ),
3934
+ /* @__PURE__ */ jsx(
3935
+ NumberField,
3936
+ {
3937
+ label: "Range end",
3938
+ value: config.rangeEnd,
3939
+ min: 0,
3940
+ max: 40,
3941
+ step: 0.1,
3942
+ onChange: (rangeEnd) => update({ rangeEnd })
3943
+ }
3944
+ ),
3945
+ /* @__PURE__ */ jsxs("label", { className: "col-span-2 flex items-center gap-2 text-xs", children: [
3946
+ /* @__PURE__ */ jsx(
3947
+ "input",
3948
+ {
3949
+ type: "checkbox",
3950
+ checked: config.wireframe,
3951
+ onChange: (event) => update({ wireframe: event.target.checked })
3952
+ }
3953
+ ),
3954
+ "Wireframe"
3955
+ ] })
3956
+ ] }) : null,
3957
+ tab === "colors" ? /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-2", children: [
3958
+ /* @__PURE__ */ jsx(
3959
+ ColorField,
3960
+ {
3961
+ label: "Color 1",
3962
+ value: config.color1,
3963
+ onChange: (color1) => update({ color1 })
3964
+ }
3965
+ ),
3966
+ /* @__PURE__ */ jsx(
3967
+ ColorField,
3968
+ {
3969
+ label: "Color 2",
3970
+ value: config.color2,
3971
+ onChange: (color2) => update({ color2 })
3972
+ }
3973
+ ),
3974
+ /* @__PURE__ */ jsx(
3975
+ ColorField,
3976
+ {
3977
+ label: "Color 3",
3978
+ value: config.color3,
3979
+ onChange: (color3) => update({ color3 })
3980
+ }
3981
+ ),
3982
+ /* @__PURE__ */ jsx(
3983
+ NumberField,
3984
+ {
3985
+ label: "Reflection",
3986
+ value: config.reflection,
3987
+ min: 0,
3988
+ max: 1,
3989
+ step: 0.05,
3990
+ onChange: (reflection) => update({ reflection })
3991
+ }
3992
+ ),
3993
+ /* @__PURE__ */ jsx(
3994
+ NumberField,
3995
+ {
3996
+ label: "Brightness",
3997
+ value: config.brightness,
3998
+ min: 0,
3999
+ max: 4,
4000
+ step: 0.05,
4001
+ onChange: (brightness) => update({ brightness })
4002
+ }
4003
+ )
4004
+ ] }) : null,
4005
+ tab === "light" ? /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-2", children: [
4006
+ /* @__PURE__ */ jsx(
4007
+ SelectField,
4008
+ {
4009
+ label: "Light",
4010
+ value: config.lightType,
4011
+ options: SHADER_LIGHT_TYPES,
4012
+ onChange: (lightType) => update({ lightType })
4013
+ }
4014
+ ),
4015
+ /* @__PURE__ */ jsx(
4016
+ SelectField,
4017
+ {
4018
+ label: "Environment",
4019
+ value: config.envPreset,
4020
+ options: SHADER_ENV_PRESETS,
4021
+ onChange: (envPreset) => update({ envPreset })
4022
+ }
4023
+ ),
4024
+ /* @__PURE__ */ jsx(
4025
+ SelectField,
4026
+ {
4027
+ label: "Grain",
4028
+ value: config.grain,
4029
+ options: ["on", "off"],
4030
+ onChange: (grain) => update({ grain })
4031
+ }
4032
+ ),
4033
+ /* @__PURE__ */ jsx(
4034
+ NumberField,
4035
+ {
4036
+ label: "Grain blending",
4037
+ value: config.grainBlending,
4038
+ min: 0,
4039
+ max: 1,
4040
+ step: 0.05,
4041
+ onChange: (grainBlending) => update({ grainBlending })
4042
+ }
4043
+ )
4044
+ ] }) : null,
4045
+ tab === "camera" ? /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-2", children: [
4046
+ /* @__PURE__ */ jsx(
4047
+ NumberField,
4048
+ {
4049
+ label: "Azimuth",
4050
+ value: config.cAzimuthAngle,
4051
+ min: 0,
4052
+ max: 360,
4053
+ step: 1,
4054
+ onChange: (cAzimuthAngle) => update({ cAzimuthAngle })
4055
+ }
4056
+ ),
4057
+ /* @__PURE__ */ jsx(
4058
+ NumberField,
4059
+ {
4060
+ label: "Polar",
4061
+ value: config.cPolarAngle,
4062
+ min: 0,
4063
+ max: 180,
4064
+ step: 1,
4065
+ onChange: (cPolarAngle) => update({ cPolarAngle })
4066
+ }
4067
+ ),
4068
+ /* @__PURE__ */ jsx(
4069
+ NumberField,
4070
+ {
4071
+ label: "Distance",
4072
+ value: config.cDistance,
4073
+ min: 0.1,
4074
+ max: 40,
4075
+ step: 0.1,
4076
+ onChange: (cDistance) => update({ cDistance })
4077
+ }
4078
+ ),
4079
+ /* @__PURE__ */ jsx(
4080
+ NumberField,
4081
+ {
4082
+ label: "Zoom",
4083
+ value: config.cameraZoom,
4084
+ min: 0.1,
4085
+ max: 50,
4086
+ step: 0.1,
4087
+ onChange: (cameraZoom) => update({ cameraZoom })
4088
+ }
4089
+ ),
4090
+ /* @__PURE__ */ jsx(
4091
+ NumberField,
4092
+ {
4093
+ label: "FOV",
4094
+ value: config.fov,
4095
+ min: 10,
4096
+ max: 120,
4097
+ step: 1,
4098
+ onChange: (fov) => update({ fov })
4099
+ }
4100
+ ),
4101
+ /* @__PURE__ */ jsx(
4102
+ NumberField,
4103
+ {
4104
+ label: "Pixel density",
4105
+ value: config.pixelDensity,
4106
+ min: 0.5,
4107
+ max: 2,
4108
+ step: 0.1,
4109
+ onChange: (pixelDensity) => update({ pixelDensity })
4110
+ }
4111
+ ),
4112
+ /* @__PURE__ */ jsx(
4113
+ NumberField,
4114
+ {
4115
+ label: "Position X",
4116
+ value: config.positionX,
4117
+ min: -20,
4118
+ max: 20,
4119
+ step: 0.1,
4120
+ onChange: (positionX) => update({ positionX })
4121
+ }
4122
+ ),
4123
+ /* @__PURE__ */ jsx(
4124
+ NumberField,
4125
+ {
4126
+ label: "Position Y",
4127
+ value: config.positionY,
4128
+ min: -20,
4129
+ max: 20,
4130
+ step: 0.1,
4131
+ onChange: (positionY) => update({ positionY })
4132
+ }
4133
+ ),
4134
+ /* @__PURE__ */ jsx(
4135
+ NumberField,
4136
+ {
4137
+ label: "Position Z",
4138
+ value: config.positionZ,
4139
+ min: -20,
4140
+ max: 20,
4141
+ step: 0.1,
4142
+ onChange: (positionZ) => update({ positionZ })
4143
+ }
4144
+ ),
4145
+ /* @__PURE__ */ jsx(
4146
+ NumberField,
4147
+ {
4148
+ label: "Rotation X",
4149
+ value: config.rotationX,
4150
+ min: 0,
4151
+ max: 360,
4152
+ step: 1,
4153
+ onChange: (rotationX) => update({ rotationX })
4154
+ }
4155
+ ),
4156
+ /* @__PURE__ */ jsx(
4157
+ NumberField,
4158
+ {
4159
+ label: "Rotation Y",
4160
+ value: config.rotationY,
4161
+ min: 0,
4162
+ max: 360,
4163
+ step: 1,
4164
+ onChange: (rotationY) => update({ rotationY })
4165
+ }
4166
+ ),
4167
+ /* @__PURE__ */ jsx(
4168
+ NumberField,
4169
+ {
4170
+ label: "Rotation Z",
4171
+ value: config.rotationZ,
4172
+ min: 0,
4173
+ max: 360,
4174
+ step: 1,
4175
+ onChange: (rotationZ) => update({ rotationZ })
4176
+ }
4177
+ ),
4178
+ /* @__PURE__ */ jsxs("label", { className: "col-span-2 flex items-center gap-2 text-xs", children: [
4179
+ /* @__PURE__ */ jsx(
4180
+ "input",
4181
+ {
4182
+ type: "checkbox",
4183
+ checked: config.zoomOut,
4184
+ onChange: (event) => update({ zoomOut: event.target.checked })
4185
+ }
4186
+ ),
4187
+ "Zoom out"
4188
+ ] })
4189
+ ] }) : null
4190
+ ] }),
4183
4191
  /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
4184
4192
  /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-xs", children: copy.presets }),
4185
4193
  /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1", children: SHADER_CURTAIN_PRESETS.map((preset) => /* @__PURE__ */ jsx(
@@ -4197,25 +4205,27 @@ var ShaderCurtainEditor = React11.forwardRef(function ShaderCurtainEditor2({ val
4197
4205
  /* @__PURE__ */ jsxs("div", { className: "grid gap-2", children: [
4198
4206
  /* @__PURE__ */ jsxs("label", { className: "grid gap-1 text-xs", children: [
4199
4207
  /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: copy.importUrl }),
4200
- /* @__PURE__ */ jsx(
4201
- "input",
4202
- {
4203
- value: url,
4204
- onChange: (event) => setUrl(event.target.value),
4205
- className: "border-input bg-background rounded-md border px-2 py-1"
4206
- }
4207
- )
4208
+ /* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
4209
+ /* @__PURE__ */ jsx(
4210
+ "input",
4211
+ {
4212
+ value: url,
4213
+ onChange: (event) => setUrl(event.target.value),
4214
+ className: "border-input bg-background min-w-0 flex-1 rounded-md border px-2 py-1"
4215
+ }
4216
+ ),
4217
+ /* @__PURE__ */ jsx(
4218
+ Button,
4219
+ {
4220
+ type: "button",
4221
+ size: "sm",
4222
+ variant: "secondary",
4223
+ onClick: applyUrl,
4224
+ children: copy.importApply
4225
+ }
4226
+ )
4227
+ ] })
4208
4228
  ] }),
4209
- /* @__PURE__ */ jsx(
4210
- Button,
4211
- {
4212
- type: "button",
4213
- size: "sm",
4214
- variant: "secondary",
4215
- onClick: applyUrl,
4216
- children: copy.importApply
4217
- }
4218
- ),
4219
4229
  urlError ? /* @__PURE__ */ jsx("p", { className: "text-destructive text-xs", role: "alert", children: urlError }) : null
4220
4230
  ] })
4221
4231
  ] })