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