@@ -198,7 +198,11 @@ export const ActionItem: FC<ActionItemProps> = memo(
198
198
< NumericInput2
199
199
intOnly
200
200
buttonPosition = "none"
201
- inputClassName = "!w-9 mx-px mt-1 !p-0 !leading-3 hover:!bg-gray-100 focus:!bg-gray-100 dark:hover:!bg-gray-600 dark:focus:!bg-gray-600 !border-0 !rounded [&:not(:focus)]:!shadow-none !text-inherit text-3xl font-semibold text-center"
201
+ inputClassName = "!min-w-[2ch] mx-px mt-1 !p-0 !leading-3 hover:!bg-gray-100 focus:!bg-gray-100 dark:hover:!bg-gray-600 dark:focus:!bg-gray-600 !border-0 !rounded [&:not(:focus)]:!shadow-none !text-inherit text-3xl font-semibold text-center"
202
+ style = { {
203
+ width :
204
+ String ( action . location ?. [ 0 ] ?? 0 ) . length + 'ch' ,
205
+ } }
202
206
value = { action . location ?. [ 0 ] ?? '' }
203
207
wheelStepSize = { 1 }
204
208
onValueChange = { ( v ) => {
@@ -209,7 +213,7 @@ export const ActionItem: FC<ActionItemProps> = memo(
209
213
return {
210
214
action : 'set-action-location-x-' + action . id ,
211
215
desc : i18n . actions . editor2 . set_action_location ,
212
- squash : false ,
216
+ squash : true ,
213
217
}
214
218
} )
215
219
} }
@@ -220,7 +224,11 @@ export const ActionItem: FC<ActionItemProps> = memo(
220
224
< NumericInput2
221
225
intOnly
222
226
buttonPosition = "none"
223
- inputClassName = "!w-9 mx-px mt-1 !p-0 !leading-3 hover:!bg-gray-100 focus:!bg-gray-100 dark:hover:!bg-gray-600 dark:focus:!bg-gray-600 !border-0 !rounded [&:not(:focus)]:!shadow-none !text-inherit text-3xl font-semibold text-center"
227
+ inputClassName = "!min-w-[2ch] mx-px mt-1 !p-0 !leading-3 hover:!bg-gray-100 focus:!bg-gray-100 dark:hover:!bg-gray-600 dark:focus:!bg-gray-600 !border-0 !rounded [&:not(:focus)]:!shadow-none !text-inherit text-3xl font-semibold text-center"
228
+ style = { {
229
+ width :
230
+ String ( action . location ?. [ 1 ] ?? 0 ) . length + 'ch' ,
231
+ } }
224
232
value = { action . location ?. [ 1 ] ?? '' }
225
233
wheelStepSize = { 1 }
226
234
onValueChange = { ( v ) => {
@@ -231,7 +239,7 @@ export const ActionItem: FC<ActionItemProps> = memo(
231
239
return {
232
240
action : 'set-action-location-y-' + action . id ,
233
241
desc : i18n . actions . editor2 . set_action_location ,
234
- squash : false ,
242
+ squash : true ,
235
243
}
236
244
} )
237
245
} }
@@ -247,6 +255,78 @@ export const ActionItem: FC<ActionItemProps> = memo(
247
255
</ >
248
256
) ,
249
257
) }
258
+ { renderForTypes (
259
+ [ CopilotDocV1 . Type . MoveCamera ] ,
260
+ ( { action, setAction } ) => (
261
+ < >
262
+ < div className = "grow self-stretch max-w-10 flex flex-col items-center text-xs" >
263
+ < Divider className = "grow rotate-12" />
264
+ </ div >
265
+ < div className = "shrink-0" >
266
+ < div className = "flex items-center text-3xl" >
267
+ < span className = "text-gray-300 dark:text-gray-600" >
268
+ { '(' }
269
+ </ span >
270
+ < NumericInput2
271
+ intOnly
272
+ buttonPosition = "none"
273
+ inputClassName = "!min-w-[2ch] mx-px mt-1 !p-0 !leading-3 hover:!bg-gray-100 focus:!bg-gray-100 dark:hover:!bg-gray-600 dark:focus:!bg-gray-600 !border-0 !rounded [&:not(:focus)]:!shadow-none !text-inherit text-3xl font-semibold text-center"
274
+ value = { action . distance ?. [ 0 ] ?? '' }
275
+ style = { {
276
+ width :
277
+ String ( action . distance ?. [ 0 ] ?? 0 ) . length + 'ch' ,
278
+ } }
279
+ wheelStepSize = { 1 }
280
+ onValueChange = { ( v ) => {
281
+ edit ( ( ) => {
282
+ setAction ( ( draft ) => {
283
+ draft . distance = [ v , draft . distance ?. [ 1 ] ?? 0 ]
284
+ } )
285
+ return {
286
+ action : 'set-action-distance-x-' + action . id ,
287
+ desc : i18n . actions . editor2 . set_action_distance ,
288
+ squash : true ,
289
+ }
290
+ } )
291
+ } }
292
+ />
293
+ < span className = "mt-3 text-gray-300 dark:text-gray-600 text-xl font-serif" >
294
+ ,
295
+ </ span >
296
+ < NumericInput2
297
+ intOnly
298
+ buttonPosition = "none"
299
+ inputClassName = "!min-w-[2ch] mx-px mt-1 !p-0 !leading-3 hover:!bg-gray-100 focus:!bg-gray-100 dark:hover:!bg-gray-600 dark:focus:!bg-gray-600 !border-0 !rounded [&:not(:focus)]:!shadow-none !text-inherit text-3xl font-semibold text-center"
300
+ value = { action . distance ?. [ 1 ] ?? '' }
301
+ style = { {
302
+ width :
303
+ String ( action . distance ?. [ 1 ] ?? 0 ) . length + 'ch' ,
304
+ } }
305
+ wheelStepSize = { 1 }
306
+ onValueChange = { ( v ) => {
307
+ edit ( ( ) => {
308
+ setAction ( ( draft ) => {
309
+ draft . distance = [ draft . distance ?. [ 0 ] ?? 0 , v ]
310
+ } )
311
+ return {
312
+ action : 'set-action-distance-y-' + action . id ,
313
+ desc : i18n . actions . editor2 . set_action_distance ,
314
+ squash : true ,
315
+ }
316
+ } )
317
+ } }
318
+ />
319
+ < span className = "text-gray-300 dark:text-gray-600" >
320
+ { ')' }
321
+ </ span >
322
+ </ div >
323
+ < div className = "text-xs text-gray-500" >
324
+ { t . components . editor2 . label . operation . actions . distance }
325
+ </ div >
326
+ </ div >
327
+ </ >
328
+ ) ,
329
+ ) }
250
330
{ renderForTypes (
251
331
[ CopilotDocV1 . Type . Deploy ] ,
252
332
( { action, setAction } ) => (
0 commit comments