blockly 9.1.1 → 9.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (121) hide show
  1. package/blockly.min.js +395 -347
  2. package/blockly_compressed.js +392 -344
  3. package/blockly_compressed.js.map +1 -1
  4. package/blocks_compressed.js +3 -3
  5. package/blocks_compressed.js.map +1 -1
  6. package/core/any_aliases.d.ts +1 -1
  7. package/core/block.d.ts +3 -1
  8. package/core/block_dragger.d.ts +3 -3
  9. package/core/block_svg.d.ts +2 -2
  10. package/core/blockly.d.ts +21 -26
  11. package/core/blockly_options.d.ts +1 -0
  12. package/core/blocks.d.ts +2 -2
  13. package/core/browser_events.d.ts +2 -4
  14. package/core/bubble.d.ts +8 -8
  15. package/core/bubble_dragger.d.ts +3 -3
  16. package/core/component_manager.d.ts +1 -1
  17. package/core/contextmenu_registry.d.ts +5 -5
  18. package/core/dropdowndiv.d.ts +8 -4
  19. package/core/events/events.d.ts +21 -1
  20. package/core/events/events_abstract.d.ts +14 -1
  21. package/core/events/events_block_base.d.ts +12 -1
  22. package/core/events/events_block_change.d.ts +11 -0
  23. package/core/events/events_block_create.d.ts +11 -0
  24. package/core/events/events_block_delete.d.ts +11 -0
  25. package/core/events/events_block_drag.d.ts +11 -0
  26. package/core/events/events_block_move.d.ts +14 -0
  27. package/core/events/events_bubble_open.d.ts +11 -0
  28. package/core/events/events_click.d.ts +11 -0
  29. package/core/events/events_comment_base.d.ts +11 -0
  30. package/core/events/events_comment_change.d.ts +11 -0
  31. package/core/events/events_comment_create.d.ts +11 -0
  32. package/core/events/events_comment_delete.d.ts +21 -1
  33. package/core/events/events_comment_move.d.ts +11 -0
  34. package/core/events/events_marker_move.d.ts +11 -0
  35. package/core/events/events_procedure_base.d.ts +26 -0
  36. package/core/events/events_procedure_change_return.d.ts +40 -0
  37. package/core/events/events_procedure_create.d.ts +34 -0
  38. package/core/events/events_procedure_delete.d.ts +32 -0
  39. package/core/events/events_procedure_enable.d.ts +34 -0
  40. package/core/events/events_procedure_parameter_base.d.ts +26 -0
  41. package/core/events/events_procedure_parameter_create.d.ts +42 -0
  42. package/core/events/events_procedure_parameter_delete.d.ts +41 -0
  43. package/core/events/events_procedure_parameter_rename.d.ts +36 -0
  44. package/core/events/events_procedure_rename.d.ts +35 -0
  45. package/core/events/events_selected.d.ts +11 -0
  46. package/core/events/events_theme_change.d.ts +11 -0
  47. package/core/events/events_toolbox_item_select.d.ts +11 -0
  48. package/core/events/events_trashcan_open.d.ts +11 -0
  49. package/core/events/events_var_base.d.ts +11 -0
  50. package/core/events/events_var_create.d.ts +11 -0
  51. package/core/events/events_var_delete.d.ts +11 -0
  52. package/core/events/events_var_rename.d.ts +11 -0
  53. package/core/events/events_viewport.d.ts +11 -0
  54. package/core/events/utils.d.ts +17 -1
  55. package/core/field.d.ts +20 -9
  56. package/core/field_angle.d.ts +6 -6
  57. package/core/field_checkbox.d.ts +4 -3
  58. package/core/field_colour.d.ts +4 -3
  59. package/core/field_dropdown.d.ts +7 -6
  60. package/core/field_image.d.ts +2 -2
  61. package/core/field_input.d.ts +229 -0
  62. package/core/field_label.d.ts +2 -2
  63. package/core/field_label_serializable.d.ts +1 -1
  64. package/core/field_multilineinput.d.ts +3 -2
  65. package/core/field_number.d.ts +7 -4
  66. package/core/field_registry.d.ts +8 -5
  67. package/core/field_textinput.d.ts +6 -201
  68. package/core/field_variable.d.ts +3 -2
  69. package/core/flyout_base.d.ts +3 -4
  70. package/core/flyout_button.d.ts +1 -1
  71. package/core/gesture.d.ts +127 -50
  72. package/core/icon.d.ts +4 -4
  73. package/core/input.d.ts +8 -7
  74. package/core/insertion_marker_manager.d.ts +80 -63
  75. package/core/interfaces/i_copyable.d.ts +1 -1
  76. package/core/interfaces/i_observable.d.ts +21 -0
  77. package/core/interfaces/i_parameter_model.d.ts +3 -5
  78. package/core/keyboard_nav/ast_node.d.ts +1 -1
  79. package/core/metrics_manager.d.ts +5 -5
  80. package/core/mutator.d.ts +1 -1
  81. package/core/names.d.ts +1 -1
  82. package/core/options.d.ts +5 -4
  83. package/core/procedures/observable_parameter_model.d.ts +17 -0
  84. package/core/procedures/observable_procedure_map.d.ts +1 -1
  85. package/core/procedures/observable_procedure_model.d.ts +13 -0
  86. package/core/procedures.d.ts +1 -1
  87. package/core/registry.d.ts +1 -1
  88. package/core/rendered_connection.d.ts +1 -1
  89. package/core/renderers/common/constants.d.ts +3 -3
  90. package/core/serialization/procedures.d.ts +26 -2
  91. package/core/shortcut_registry.d.ts +1 -1
  92. package/core/theme.d.ts +4 -4
  93. package/core/theme_manager.d.ts +1 -1
  94. package/core/toolbox/category.d.ts +1 -1
  95. package/core/toolbox/collapsible_category.d.ts +1 -1
  96. package/core/toolbox/separator.d.ts +1 -1
  97. package/core/toolbox/toolbox.d.ts +1 -1
  98. package/core/tooltip.d.ts +2 -2
  99. package/core/touch.d.ts +12 -17
  100. package/core/utils/toolbox.d.ts +7 -7
  101. package/core/utils/xml.d.ts +44 -2
  102. package/core/workspace_comment_svg.d.ts +18 -17
  103. package/core/workspace_svg.d.ts +13 -15
  104. package/core.js +3 -6
  105. package/msg/bs.js +12 -12
  106. package/msg/de.js +6 -6
  107. package/msg/diq.js +6 -6
  108. package/msg/es.js +15 -15
  109. package/msg/fr.js +2 -2
  110. package/msg/he.js +1 -1
  111. package/msg/hy.js +43 -43
  112. package/msg/is.js +17 -17
  113. package/msg/ja.js +1 -1
  114. package/msg/ko.js +3 -3
  115. package/msg/nb.js +1 -1
  116. package/msg/oc.js +2 -2
  117. package/msg/smn.js +24 -24
  118. package/msg/zh-hant.js +10 -10
  119. package/package.json +7 -6
  120. package/core/interfaces/i_registrable_field.d.ts +0 -19
  121. package/core/touch_gesture.d.ts +0 -130
package/core/gesture.d.ts CHANGED
@@ -11,12 +11,9 @@ import type { Field } from './field.js';
11
11
  import type { IBlockDragger } from './interfaces/i_block_dragger.js';
12
12
  import type { IBubble } from './interfaces/i_bubble.js';
13
13
  import type { IFlyout } from './interfaces/i_flyout.js';
14
+ import { Coordinate } from './utils/coordinate.js';
14
15
  import { WorkspaceDragger } from './workspace_dragger.js';
15
16
  import type { WorkspaceSvg } from './workspace_svg.js';
16
- /**
17
- * Note: In this file "start" refers to touchstart, mousedown, and pointerstart
18
- * events. "End" refers to touchend, mouseup, and pointerend events.
19
- */
20
17
  /**
21
18
  * Class for one gesture.
22
19
  *
@@ -25,8 +22,8 @@ import type { WorkspaceSvg } from './workspace_svg.js';
25
22
  export declare class Gesture {
26
23
  private readonly creatorWorkspace;
27
24
  /**
28
- * The position of the mouse when the gesture started. Units are CSS
29
- * pixels, with (0, 0) at the top left of the browser window (mouseEvent
25
+ * The position of the pointer when the gesture started. Units are CSS
26
+ * pixels, with (0, 0) at the top left of the browser window (pointer event
30
27
  * clientX/Y).
31
28
  */
32
29
  private mouseDownXY_;
@@ -66,12 +63,12 @@ export declare class Gesture {
66
63
  */
67
64
  private hasExceededDragRadius_;
68
65
  /**
69
- * A handle to use to unbind a mouse move listener at the end of a drag.
66
+ * A handle to use to unbind a pointermove listener at the end of a drag.
70
67
  * Opaque data returned from Blockly.bindEventWithChecks_.
71
68
  */
72
69
  protected onMoveWrapper_: browserEvents.Data | null;
73
70
  /**
74
- * A handle to use to unbind a mouse up listener at the end of a drag.
71
+ * A handle to use to unbind a pointerup listener at the end of a drag.
75
72
  * Opaque data returned from Blockly.bindEventWithChecks_.
76
73
  */
77
74
  protected onUpWrapper_: browserEvents.Data | null;
@@ -95,12 +92,40 @@ export declare class Gesture {
95
92
  private healStack_;
96
93
  /** The event that most recently updated this gesture. */
97
94
  private mostRecentEvent_;
95
+ /** Boolean for whether or not this gesture is a multi-touch gesture. */
96
+ private isMultiTouch_;
97
+ /** A map of cached points used for tracking multi-touch gestures. */
98
+ private cachedPoints;
99
+ /**
100
+ * This is the ratio between the starting distance between the touch points
101
+ * and the most recent distance between the touch points.
102
+ * Scales between 0 and 1 mean the most recent zoom was a zoom out.
103
+ * Scales above 1.0 mean the most recent zoom was a zoom in.
104
+ */
105
+ private previousScale_;
106
+ /** The starting distance between two touch points. */
107
+ private startDistance_;
108
+ /**
109
+ * A handle to use to unbind the second pointerdown listener
110
+ * at the end of a drag.
111
+ * Opaque data returned from Blockly.bindEventWithChecks_.
112
+ */
113
+ private onStartWrapper_;
114
+ /** Boolean for whether or not the workspace supports pinch-zoom. */
115
+ private isPinchZoomEnabled_;
116
+ /**
117
+ * The owner of the dropdownDiv when this gesture first starts.
118
+ * Needed because we'll close the dropdown before fields get to
119
+ * act on their events, and some fields care about who owns
120
+ * the dropdown.
121
+ */
122
+ currentDropdownOwner: Field | null;
98
123
  /**
99
124
  * @param e The event that kicked off this gesture.
100
125
  * @param creatorWorkspace The workspace that created this gesture and has a
101
126
  * reference to it.
102
127
  */
103
- constructor(e: Event, creatorWorkspace: WorkspaceSvg);
128
+ constructor(e: PointerEvent, creatorWorkspace: WorkspaceSvg);
104
129
  /**
105
130
  * Sever all links from this object.
106
131
  *
@@ -110,13 +135,14 @@ export declare class Gesture {
110
135
  /**
111
136
  * Update internal state based on an event.
112
137
  *
113
- * @param e The most recent mouse or touch event.
138
+ * @param e The most recent pointer event.
114
139
  */
115
140
  private updateFromEvent_;
116
141
  /**
117
- * DO MATH to set currentDragDeltaXY_ based on the most recent mouse position.
142
+ * DO MATH to set currentDragDeltaXY_ based on the most recent pointer
143
+ * position.
118
144
  *
119
- * @param currentXY The most recent mouse/pointer position, in pixel units,
145
+ * @param currentXY The most recent pointer position, in pixel units,
120
146
  * with (0, 0) at the window's top left corner.
121
147
  * @returns True if the drag just exceeded the drag radius for the first time.
122
148
  */
@@ -124,7 +150,7 @@ export declare class Gesture {
124
150
  /**
125
151
  * Update this gesture to record whether a block is being dragged from the
126
152
  * flyout.
127
- * This function should be called on a mouse/touch move event the first time
153
+ * This function should be called on a pointermove event the first time
128
154
  * the drag radius is exceeded. It should be called no more than once per
129
155
  * gesture. If a block should be dragged from the flyout this function creates
130
156
  * the new block on the main workspace and updates targetBlock_ and
@@ -135,7 +161,7 @@ export declare class Gesture {
135
161
  private updateIsDraggingFromFlyout_;
136
162
  /**
137
163
  * Update this gesture to record whether a bubble is being dragged.
138
- * This function should be called on a mouse/touch move event the first time
164
+ * This function should be called on a pointermove event the first time
139
165
  * the drag radius is exceeded. It should be called no more than once per
140
166
  * gesture. If a bubble should be dragged this function creates the necessary
141
167
  * BubbleDragger and starts the drag.
@@ -148,7 +174,7 @@ export declare class Gesture {
148
174
  * from the flyout or in the workspace, create the necessary BlockDragger and
149
175
  * start the drag.
150
176
  *
151
- * This function should be called on a mouse/touch move event the first time
177
+ * This function should be called on a pointermove event the first time
152
178
  * the drag radius is exceeded. It should be called no more than once per
153
179
  * gesture. If a block should be dragged, either from the flyout or in the
154
180
  * workspace, this function creates the necessary BlockDragger and starts the
@@ -161,7 +187,7 @@ export declare class Gesture {
161
187
  * Check whether to start a workspace drag. If a workspace is being dragged,
162
188
  * create the necessary WorkspaceDragger and start the drag.
163
189
  *
164
- * This function should be called on a mouse/touch move event the first time
190
+ * This function should be called on a pointermove event the first time
165
191
  * the drag radius is exceeded. It should be called no more than once per
166
192
  * gesture. If a workspace is being dragged this function creates the
167
193
  * necessary WorkspaceDragger and starts the drag.
@@ -169,7 +195,7 @@ export declare class Gesture {
169
195
  private updateIsDraggingWorkspace_;
170
196
  /**
171
197
  * Update this gesture to record whether anything is being dragged.
172
- * This function should be called on a mouse/touch move event the first time
198
+ * This function should be called on a pointermove event the first time
173
199
  * the drag radius is exceeded. It should be called no more than once per
174
200
  * gesture.
175
201
  */
@@ -180,33 +206,84 @@ export declare class Gesture {
180
206
  private startDraggingBubble_;
181
207
  /**
182
208
  * Start a gesture: update the workspace to indicate that a gesture is in
183
- * progress and bind mousemove and mouseup handlers.
209
+ * progress and bind pointermove and pointerup handlers.
184
210
  *
185
- * @param e A mouse down or touch start event.
211
+ * @param e A pointerdown event.
186
212
  * @internal
187
213
  */
188
- doStart(e: MouseEvent): void;
214
+ doStart(e: PointerEvent): void;
189
215
  /**
190
216
  * Bind gesture events.
191
217
  *
192
- * @param e A mouse down or touch start event.
218
+ * @param e A pointerdown event.
219
+ * @internal
220
+ */
221
+ bindMouseEvents(e: PointerEvent): void;
222
+ /**
223
+ * Handle a pointerdown event.
224
+ *
225
+ * @param e A pointerdown event.
226
+ * @internal
227
+ */
228
+ handleStart(e: PointerEvent): void;
229
+ /**
230
+ * Handle a pointermove event.
231
+ *
232
+ * @param e A pointermove event.
233
+ * @internal
234
+ */
235
+ handleMove(e: PointerEvent): void;
236
+ /**
237
+ * Handle a pointerup event.
238
+ *
239
+ * @param e A pointerup event.
240
+ * @internal
241
+ */
242
+ handleUp(e: PointerEvent): void;
243
+ /**
244
+ * Handle a pointerdown event and keep track of current
245
+ * pointers.
246
+ *
247
+ * @param e A pointerdown event.
248
+ * @internal
249
+ */
250
+ handleTouchStart(e: PointerEvent): void;
251
+ /**
252
+ * Handle a pointermove event and zoom in/out if two pointers
253
+ * are on the screen.
254
+ *
255
+ * @param e A pointermove event.
256
+ * @internal
257
+ */
258
+ handleTouchMove(e: PointerEvent): void;
259
+ /**
260
+ * Handle pinch zoom gesture.
261
+ *
262
+ * @param e A pointermove event.
263
+ */
264
+ private handlePinch_;
265
+ /**
266
+ * Handle a pointerup event and end the gesture.
267
+ *
268
+ * @param e A pointerup event.
193
269
  * @internal
194
270
  */
195
- bindMouseEvents(e: Event): void;
271
+ handleTouchEnd(e: PointerEvent): void;
196
272
  /**
197
- * Handle a mouse move or touch move event.
273
+ * Helper function returning the current touch point coordinate.
198
274
  *
199
- * @param e A mouse move or touch move event.
275
+ * @param e A pointer event.
276
+ * @returns The current touch point coordinate
200
277
  * @internal
201
278
  */
202
- handleMove(e: Event): void;
279
+ getTouchPoint(e: PointerEvent): Coordinate | null;
203
280
  /**
204
- * Handle a mouse up or touch end event.
281
+ * Whether this gesture is part of a multi-touch gesture.
205
282
  *
206
- * @param e A mouse up or touch end event.
283
+ * @returns Whether this gesture is part of a multi-touch gesture.
207
284
  * @internal
208
285
  */
209
- handleUp(e: Event): void;
286
+ isMultiTouch(): boolean;
210
287
  /**
211
288
  * Cancel an in-progress gesture. If a workspace or block drag is in
212
289
  * progress, end the drag at the most recent location.
@@ -217,18 +294,18 @@ export declare class Gesture {
217
294
  /**
218
295
  * Handle a real or faked right-click event by showing a context menu.
219
296
  *
220
- * @param e A mouse move or touch move event.
297
+ * @param e A pointerdown event.
221
298
  * @internal
222
299
  */
223
- handleRightClick(e: Event): void;
300
+ handleRightClick(e: PointerEvent): void;
224
301
  /**
225
- * Handle a mousedown/touchstart event on a workspace.
302
+ * Handle a pointerdown event on a workspace.
226
303
  *
227
- * @param e A mouse down or touch start event.
304
+ * @param e A pointerdown event.
228
305
  * @param ws The workspace the event hit.
229
306
  * @internal
230
307
  */
231
- handleWsStart(e: MouseEvent, ws: WorkspaceSvg): void;
308
+ handleWsStart(e: PointerEvent, ws: WorkspaceSvg): void;
232
309
  /**
233
310
  * Fires a workspace click event.
234
311
  *
@@ -236,29 +313,29 @@ export declare class Gesture {
236
313
  */
237
314
  private fireWorkspaceClick_;
238
315
  /**
239
- * Handle a mousedown/touchstart event on a flyout.
316
+ * Handle a pointerdown event on a flyout.
240
317
  *
241
- * @param e A mouse down or touch start event.
318
+ * @param e A pointerdown event.
242
319
  * @param flyout The flyout the event hit.
243
320
  * @internal
244
321
  */
245
- handleFlyoutStart(e: MouseEvent, flyout: IFlyout): void;
322
+ handleFlyoutStart(e: PointerEvent, flyout: IFlyout): void;
246
323
  /**
247
- * Handle a mousedown/touchstart event on a block.
324
+ * Handle a pointerdown event on a block.
248
325
  *
249
- * @param e A mouse down or touch start event.
326
+ * @param e A pointerdown event.
250
327
  * @param block The block the event hit.
251
328
  * @internal
252
329
  */
253
- handleBlockStart(e: Event, block: BlockSvg): void;
330
+ handleBlockStart(e: PointerEvent, block: BlockSvg): void;
254
331
  /**
255
- * Handle a mousedown/touchstart event on a bubble.
332
+ * Handle a pointerdown event on a bubble.
256
333
  *
257
- * @param e A mouse down or touch start event.
334
+ * @param e A pointerdown event.
258
335
  * @param bubble The bubble the event hit.
259
336
  * @internal
260
337
  */
261
- handleBubbleStart(e: Event, bubble: IBubble): void;
338
+ handleBubbleStart(e: PointerEvent, bubble: IBubble): void;
262
339
  /** Execute a bubble click. */
263
340
  private doBubbleClick_;
264
341
  /** Execute a field click. */
@@ -269,7 +346,7 @@ export declare class Gesture {
269
346
  * Execute a workspace click. When in accessibility mode shift clicking will
270
347
  * move the cursor.
271
348
  *
272
- * @param _e A mouse up or touch end event.
349
+ * @param _e A pointerup event.
273
350
  */
274
351
  private doWorkspaceClick_;
275
352
  /**
@@ -321,28 +398,28 @@ export declare class Gesture {
321
398
  private setStartFlyout_;
322
399
  /**
323
400
  * Whether this gesture is a click on a bubble. This should only be called
324
- * when ending a gesture (mouse up, touch end).
401
+ * when ending a gesture (pointerup).
325
402
  *
326
403
  * @returns Whether this gesture was a click on a bubble.
327
404
  */
328
405
  private isBubbleClick_;
329
406
  /**
330
407
  * Whether this gesture is a click on a block. This should only be called
331
- * when ending a gesture (mouse up, touch end).
408
+ * when ending a gesture (pointerup).
332
409
  *
333
410
  * @returns Whether this gesture was a click on a block.
334
411
  */
335
412
  private isBlockClick_;
336
413
  /**
337
414
  * Whether this gesture is a click on a field. This should only be called
338
- * when ending a gesture (mouse up, touch end).
415
+ * when ending a gesture (pointerup).
339
416
  *
340
417
  * @returns Whether this gesture was a click on a field.
341
418
  */
342
419
  private isFieldClick_;
343
420
  /**
344
421
  * Whether this gesture is a click on a workspace. This should only be called
345
- * when ending a gesture (mouse up, touch end).
422
+ * when ending a gesture (pointerup).
346
423
  *
347
424
  * @returns Whether this gesture was a click on a workspace.
348
425
  */
@@ -357,9 +434,9 @@ export declare class Gesture {
357
434
  */
358
435
  isDragging(): boolean;
359
436
  /**
360
- * Whether this gesture has already been started. In theory every mouse down
361
- * has a corresponding mouse up, but in reality it is possible to lose a
362
- * mouse up, leaving an in-process gesture hanging.
437
+ * Whether this gesture has already been started. In theory every pointerdown
438
+ * has a corresponding pointerup, but in reality it is possible to lose a
439
+ * pointerup, leaving an in-process gesture hanging.
363
440
  *
364
441
  * @returns Whether this gesture was a click on a workspace.
365
442
  * @internal
package/core/icon.d.ts CHANGED
@@ -43,7 +43,7 @@ export declare abstract class Icon {
43
43
  *
44
44
  * @param e Mouse click event.
45
45
  */
46
- protected iconClick_(e: MouseEvent): void;
46
+ protected iconClick_(e: PointerEvent): void;
47
47
  /** Change the colour of the associated bubble to match its block. */
48
48
  applyColour(): void;
49
49
  /**
@@ -78,13 +78,13 @@ export declare abstract class Icon {
78
78
  */
79
79
  protected drawIcon_(_group: Element): void;
80
80
  /**
81
- * Show or hide the icon.
81
+ * Show or hide the bubble.
82
82
  *
83
- * @param _visible True if the icon should be visible.
83
+ * @param _visible True if the bubble should be visible.
84
84
  */
85
85
  setVisible(_visible: boolean): void;
86
86
  /**
87
- * Returns the block this icon is attached to.
87
+ * @returns The block this icon is attached to.
88
88
  */
89
89
  protected getBlock(): BlockSvg;
90
90
  }
package/core/input.d.ts CHANGED
@@ -17,11 +17,12 @@ export declare class Input {
17
17
  type: number;
18
18
  name: string;
19
19
  connection: Connection | null;
20
- private sourceBlock_;
20
+ private sourceBlock;
21
21
  fieldRow: Field[];
22
- align: Align;
22
+ /** Alignment of input's fields (left, right or centre). */
23
+ align: Input.Align;
23
24
  /** Is the input visible? */
24
- private visible_;
25
+ private visible;
25
26
  /**
26
27
  * @param type The type of the input.
27
28
  * @param name Language-neutral identifier which may used to find this input
@@ -33,7 +34,7 @@ export declare class Input {
33
34
  /**
34
35
  * Get the source block for this input.
35
36
  *
36
- * @returns The source block, or null if there is none.
37
+ * @returns The block this input is part of.
37
38
  */
38
39
  getSourceBlock(): Block;
39
40
  /**
@@ -45,7 +46,7 @@ export declare class Input {
45
46
  * field again. Should be unique to the host block.
46
47
  * @returns The input being append to (to allow chaining).
47
48
  */
48
- appendField(field: string | Field, opt_name?: string): Input;
49
+ appendField<T>(field: string | Field<T>, opt_name?: string): Input;
49
50
  /**
50
51
  * Inserts a field (or label from string), and all prefix and suffix fields,
51
52
  * at the location of the input's field row.
@@ -56,7 +57,7 @@ export declare class Input {
56
57
  * field again. Should be unique to the host block.
57
58
  * @returns The index following the last inserted field.
58
59
  */
59
- insertFieldAt(index: number, field: string | Field, opt_name?: string): number;
60
+ insertFieldAt<T>(index: number, field: string | Field<T>, opt_name?: string): number;
60
61
  /**
61
62
  * Remove a field from this input.
62
63
  *
@@ -138,6 +139,6 @@ export declare namespace Input {
138
139
  RIGHT = 1
139
140
  }
140
141
  }
141
- export declare type Align = Input.Align;
142
+ export type Align = Input.Align;
142
143
  export declare const Align: typeof Input.Align;
143
144
  //# sourceMappingURL=input.d.ts.map