blockly 9.1.0 → 9.2.0

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 (120) hide show
  1. package/blockly.min.js +395 -349
  2. package/blockly_compressed.js +392 -346
  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 +7 -3
  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/workspace_comment_svg.d.ts +18 -17
  102. package/core/workspace_svg.d.ts +13 -15
  103. package/core.js +4 -3
  104. package/msg/bs.js +12 -12
  105. package/msg/de.js +6 -6
  106. package/msg/diq.js +6 -6
  107. package/msg/es.js +15 -15
  108. package/msg/fr.js +2 -2
  109. package/msg/he.js +1 -1
  110. package/msg/hy.js +43 -43
  111. package/msg/is.js +17 -17
  112. package/msg/ja.js +1 -1
  113. package/msg/ko.js +3 -3
  114. package/msg/nb.js +1 -1
  115. package/msg/oc.js +2 -2
  116. package/msg/smn.js +24 -24
  117. package/msg/zh-hant.js +10 -10
  118. package/package.json +7 -6
  119. package/core/interfaces/i_registrable_field.d.ts +0 -19
  120. package/core/touch_gesture.d.ts +0 -130
@@ -7,6 +7,7 @@ import type { WorkspaceComment } from '../workspace_comment.js';
7
7
  import { Abstract as AbstractEvent, AbstractEventJson } from './events_abstract.js';
8
8
  import type { CommentCreate } from './events_comment_create.js';
9
9
  import type { CommentDelete } from './events_comment_delete.js';
10
+ import type { Workspace } from '../workspace.js';
10
11
  /**
11
12
  * Abstract class for a comment event.
12
13
  *
@@ -32,6 +33,16 @@ export declare class CommentBase extends AbstractEvent {
32
33
  * @param json JSON representation.
33
34
  */
34
35
  fromJson(json: CommentBaseJson): void;
36
+ /**
37
+ * Deserializes the JSON event.
38
+ *
39
+ * @param event The event to append new properties to. Should be a subclass
40
+ * of CommentBase, but we can't specify that due to the fact that
41
+ * parameters to static methods in subclasses must be supertypes of
42
+ * parameters to static methods in superclasses.
43
+ * @internal
44
+ */
45
+ static fromJson(json: CommentBaseJson, workspace: Workspace, event?: any): CommentBase;
35
46
  /**
36
47
  * Helper function for Comment[Create|Delete]
37
48
  *
@@ -5,6 +5,7 @@
5
5
  */
6
6
  import type { WorkspaceComment } from '../workspace_comment.js';
7
7
  import { CommentBase, CommentBaseJson } from './events_comment_base.js';
8
+ import type { Workspace } from '../workspace.js';
8
9
  /**
9
10
  * Class for a comment change event.
10
11
  *
@@ -33,6 +34,16 @@ export declare class CommentChange extends CommentBase {
33
34
  * @param json JSON representation.
34
35
  */
35
36
  fromJson(json: CommentChangeJson): void;
37
+ /**
38
+ * Deserializes the JSON event.
39
+ *
40
+ * @param event The event to append new properties to. Should be a subclass
41
+ * of CommentChange, but we can't specify that due to the fact that
42
+ * parameters to static methods in subclasses must be supertypes of
43
+ * parameters to static methods in superclasses.
44
+ * @internal
45
+ */
46
+ static fromJson(json: CommentChangeJson, workspace: Workspace, event?: any): CommentChange;
36
47
  /**
37
48
  * Does this event record any change of state?
38
49
  *
@@ -5,6 +5,7 @@
5
5
  */
6
6
  import type { WorkspaceComment } from '../workspace_comment.js';
7
7
  import { CommentBase, CommentBaseJson } from './events_comment_base.js';
8
+ import type { Workspace } from '../workspace.js';
8
9
  /**
9
10
  * Class for a comment creation event.
10
11
  *
@@ -30,6 +31,16 @@ export declare class CommentCreate extends CommentBase {
30
31
  * @param json JSON representation.
31
32
  */
32
33
  fromJson(json: CommentCreateJson): void;
34
+ /**
35
+ * Deserializes the JSON event.
36
+ *
37
+ * @param event The event to append new properties to. Should be a subclass
38
+ * of CommentCreate, but we can't specify that due to the fact that
39
+ * parameters to static methods in subclasses must be supertypes of
40
+ * parameters to static methods in superclasses.
41
+ * @internal
42
+ */
43
+ static fromJson(json: CommentCreateJson, workspace: Workspace, event?: any): CommentCreate;
33
44
  /**
34
45
  * Run a creation event.
35
46
  *
@@ -4,7 +4,8 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
  import type { WorkspaceComment } from '../workspace_comment.js';
7
- import { CommentBase } from './events_comment_base.js';
7
+ import { CommentBase, CommentBaseJson } from './events_comment_base.js';
8
+ import type { Workspace } from '../workspace.js';
8
9
  /**
9
10
  * Class for a comment deletion event.
10
11
  *
@@ -24,5 +25,24 @@ export declare class CommentDelete extends CommentBase {
24
25
  * @param forward True if run forward, false if run backward (undo).
25
26
  */
26
27
  run(forward: boolean): void;
28
+ /**
29
+ * Encode the event as JSON.
30
+ *
31
+ * @returns JSON representation.
32
+ */
33
+ toJson(): CommentDeleteJson;
34
+ /**
35
+ * Deserializes the JSON event.
36
+ *
37
+ * @param event The event to append new properties to. Should be a subclass
38
+ * of CommentDelete, but we can't specify that due to the fact that
39
+ * parameters to static methods in subclasses must be supertypes of
40
+ * parameters to static methods in superclasses.
41
+ * @internal
42
+ */
43
+ static fromJson(json: CommentDeleteJson, workspace: Workspace, event?: any): CommentDelete;
44
+ }
45
+ export interface CommentDeleteJson extends CommentBaseJson {
46
+ xml: string;
27
47
  }
28
48
  //# sourceMappingURL=events_comment_delete.d.ts.map
@@ -6,6 +6,7 @@
6
6
  import { Coordinate } from '../utils/coordinate.js';
7
7
  import type { WorkspaceComment } from '../workspace_comment.js';
8
8
  import { CommentBase, CommentBaseJson } from './events_comment_base.js';
9
+ import type { Workspace } from '../workspace.js';
9
10
  /**
10
11
  * Class for a comment move event. Created before the move.
11
12
  *
@@ -46,6 +47,16 @@ export declare class CommentMove extends CommentBase {
46
47
  * @param json JSON representation.
47
48
  */
48
49
  fromJson(json: CommentMoveJson): void;
50
+ /**
51
+ * Deserializes the JSON event.
52
+ *
53
+ * @param event The event to append new properties to. Should be a subclass
54
+ * of CommentMove, but we can't specify that due to the fact that
55
+ * parameters to static methods in subclasses must be supertypes of
56
+ * parameters to static methods in superclasses.
57
+ * @internal
58
+ */
59
+ static fromJson(json: CommentMoveJson, workspace: Workspace, event?: any): CommentMove;
49
60
  /**
50
61
  * Does this event record any change of state?
51
62
  *
@@ -5,6 +5,7 @@
5
5
  */
6
6
  import type { Block } from '../block.js';
7
7
  import { ASTNode } from '../keyboard_nav/ast_node.js';
8
+ import type { Workspace } from '../workspace.js';
8
9
  import { AbstractEventJson } from './events_abstract.js';
9
10
  import { UiBase } from './events_ui_base.js';
10
11
  /**
@@ -41,6 +42,16 @@ export declare class MarkerMove extends UiBase {
41
42
  * @param json JSON representation.
42
43
  */
43
44
  fromJson(json: MarkerMoveJson): void;
45
+ /**
46
+ * Deserializes the JSON event.
47
+ *
48
+ * @param event The event to append new properties to. Should be a subclass
49
+ * of MarkerMove, but we can't specify that due to the fact that
50
+ * parameters to static methods in subclasses must be supertypes of
51
+ * parameters to static methods in superclasses.
52
+ * @internal
53
+ */
54
+ static fromJson(json: MarkerMoveJson, workspace: Workspace, event?: any): MarkerMove;
44
55
  }
45
56
  export interface MarkerMoveJson extends AbstractEventJson {
46
57
  isCursor: boolean;
@@ -0,0 +1,26 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { Abstract as AbstractEvent, AbstractEventJson } from './events_abstract.js';
7
+ import type { IProcedureModel } from '../interfaces/i_procedure_model.js';
8
+ import type { Workspace } from '../workspace.js';
9
+ /**
10
+ * The base event for an event associated with a procedure.
11
+ */
12
+ export declare abstract class ProcedureBase extends AbstractEvent {
13
+ readonly model: IProcedureModel;
14
+ isBlank: boolean;
15
+ constructor(workspace: Workspace, model: IProcedureModel);
16
+ /**
17
+ * Encode the event as JSON.
18
+ *
19
+ * @returns JSON representation.
20
+ */
21
+ toJson(): ProcedureBaseJson;
22
+ }
23
+ export interface ProcedureBaseJson extends AbstractEventJson {
24
+ procedureId: string;
25
+ }
26
+ //# sourceMappingURL=events_procedure_base.d.ts.map
@@ -0,0 +1,40 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import type { IProcedureModel } from '../interfaces/i_procedure_model.js';
7
+ import type { Workspace } from '../workspace.js';
8
+ import { ProcedureBase, ProcedureBaseJson } from './events_procedure_base.js';
9
+ /**
10
+ * Represents a procedure's return type/status changing.
11
+ */
12
+ export declare class ProcedureChangeReturn extends ProcedureBase {
13
+ readonly oldTypes: string[] | null;
14
+ /** A string used to check the type of the event. */
15
+ type: string;
16
+ /** The new type(s) the procedure's return has been set to. */
17
+ private newTypes;
18
+ /**
19
+ * @param oldTypes The type(s) the procedure's return was set to before it
20
+ * changed.
21
+ */
22
+ constructor(workpace: Workspace, model: IProcedureModel, oldTypes: string[] | null);
23
+ run(forward: boolean): void;
24
+ /**
25
+ * Encode the event as JSON.
26
+ *
27
+ * @returns JSON representation.
28
+ */
29
+ toJson(): ProcedureChangeReturnJson;
30
+ /**
31
+ * Deserializes the JSON event.
32
+ *
33
+ * @internal
34
+ */
35
+ static fromJson(json: ProcedureChangeReturnJson, workspace: Workspace): ProcedureChangeReturn;
36
+ }
37
+ export interface ProcedureChangeReturnJson extends ProcedureBaseJson {
38
+ oldTypes: string[] | null;
39
+ }
40
+ //# sourceMappingURL=events_procedure_change_return.d.ts.map
@@ -0,0 +1,34 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import type { IProcedureModel } from '../interfaces/i_procedure_model.js';
7
+ import { State as ProcedureState } from '../serialization/procedures.js';
8
+ import type { Workspace } from '../workspace.js';
9
+ import { ProcedureBase, ProcedureBaseJson } from './events_procedure_base.js';
10
+ /**
11
+ * Represents a procedure data model being created.
12
+ */
13
+ export declare class ProcedureCreate extends ProcedureBase {
14
+ /** A string used to check the type of the event. */
15
+ type: string;
16
+ constructor(workspace: Workspace, model: IProcedureModel);
17
+ run(forward: boolean): void;
18
+ /**
19
+ * Encode the event as JSON.
20
+ *
21
+ * @returns JSON representation.
22
+ */
23
+ toJson(): ProcedureCreateJson;
24
+ /**
25
+ * Deserializes the JSON event.
26
+ *
27
+ * @internal
28
+ */
29
+ static fromJson(json: ProcedureCreateJson, workspace: Workspace): ProcedureCreate;
30
+ }
31
+ export interface ProcedureCreateJson extends ProcedureBaseJson {
32
+ model: ProcedureState;
33
+ }
34
+ //# sourceMappingURL=events_procedure_create.d.ts.map
@@ -0,0 +1,32 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import type { IProcedureModel } from '../interfaces/i_procedure_model.js';
7
+ import type { Workspace } from '../workspace.js';
8
+ import { ProcedureBase, ProcedureBaseJson } from './events_procedure_base.js';
9
+ /**
10
+ * Represents a procedure data model being deleted.
11
+ */
12
+ export declare class ProcedureDelete extends ProcedureBase {
13
+ /** A string used to check the type of the event. */
14
+ type: string;
15
+ constructor(workspace: Workspace, model: IProcedureModel);
16
+ run(forward: boolean): void;
17
+ /**
18
+ * Encode the event as JSON.
19
+ *
20
+ * @returns JSON representation.
21
+ */
22
+ toJson(): ProcedureDeleteJson;
23
+ /**
24
+ * Deserializes the JSON event.
25
+ *
26
+ * @internal
27
+ */
28
+ static fromJson(json: ProcedureDeleteJson, workspace: Workspace): ProcedureDelete;
29
+ }
30
+ export interface ProcedureDeleteJson extends ProcedureBaseJson {
31
+ }
32
+ //# sourceMappingURL=events_procedure_delete.d.ts.map
@@ -0,0 +1,34 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import type { IProcedureModel } from '../interfaces/i_procedure_model.js';
7
+ import type { Workspace } from '../workspace.js';
8
+ import { ProcedureBase, ProcedureBaseJson } from './events_procedure_base.js';
9
+ /**
10
+ * Represents a procedure data model being enabled or disabled.
11
+ */
12
+ export declare class ProcedureEnable extends ProcedureBase {
13
+ /** A string used to check the type of the event. */
14
+ type: string;
15
+ private oldState;
16
+ private newState;
17
+ constructor(workspace: Workspace, model: IProcedureModel);
18
+ run(forward: boolean): void;
19
+ /**
20
+ * Encode the event as JSON.
21
+ *
22
+ * @returns JSON representation.
23
+ */
24
+ toJson(): ProcedureEnableJson;
25
+ /**
26
+ * Deserializes the JSON event.
27
+ *
28
+ * @internal
29
+ */
30
+ static fromJson(json: ProcedureEnableJson, workspace: Workspace): ProcedureEnable;
31
+ }
32
+ export interface ProcedureEnableJson extends ProcedureBaseJson {
33
+ }
34
+ //# sourceMappingURL=events_procedure_enable.d.ts.map
@@ -0,0 +1,26 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { IParameterModel } from '../interfaces/i_parameter_model.js';
7
+ import { IProcedureModel } from '../interfaces/i_procedure_model.js';
8
+ import { ProcedureBase, ProcedureBaseJson } from './events_procedure_base.js';
9
+ import type { Workspace } from '../workspace.js';
10
+ /**
11
+ * The base event for an event associated with a procedure parameter.
12
+ */
13
+ export declare abstract class ProcedureParameterBase extends ProcedureBase {
14
+ readonly parameter: IParameterModel;
15
+ constructor(workspace: Workspace, model: IProcedureModel, parameter: IParameterModel);
16
+ /**
17
+ * Encode the event as JSON.
18
+ *
19
+ * @returns JSON representation.
20
+ */
21
+ toJson(): ProcedureParameterBaseJson;
22
+ }
23
+ export interface ProcedureParameterBaseJson extends ProcedureBaseJson {
24
+ parameterId: string;
25
+ }
26
+ //# sourceMappingURL=events_procedure_parameter_base.d.ts.map
@@ -0,0 +1,42 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import type { IParameterModel } from '../interfaces/i_parameter_model.js';
7
+ import type { IProcedureModel } from '../interfaces/i_procedure_model.js';
8
+ import { ParameterState } from '../serialization/procedures.js';
9
+ import type { Workspace } from '../workspace.js';
10
+ import { ProcedureParameterBase, ProcedureParameterBaseJson } from './events_procedure_parameter_base.js';
11
+ /**
12
+ * Represents a parameter being added to a procedure.
13
+ */
14
+ export declare class ProcedureParameterCreate extends ProcedureParameterBase {
15
+ readonly index: number;
16
+ /** A string used to check the type of the event. */
17
+ type: string;
18
+ /**
19
+ * @param parameter The parameter model that was just added to the procedure.
20
+ * @param index The index the parameter was inserted at.
21
+ */
22
+ constructor(workspace: Workspace, procedure: IProcedureModel, parameter: IParameterModel, index: number);
23
+ run(forward: boolean): void;
24
+ parameterMatches(param: IParameterModel): boolean;
25
+ /**
26
+ * Encode the event as JSON.
27
+ *
28
+ * @returns JSON representation.
29
+ */
30
+ toJson(): ProcedureParameterCreateJson;
31
+ /**
32
+ * Deserializes the JSON event.
33
+ *
34
+ * @internal
35
+ */
36
+ static fromJson(json: ProcedureParameterCreateJson, workspace: Workspace): ProcedureParameterCreate;
37
+ }
38
+ export interface ProcedureParameterCreateJson extends ProcedureParameterBaseJson {
39
+ parameter: ParameterState;
40
+ index: number;
41
+ }
42
+ //# sourceMappingURL=events_procedure_parameter_create.d.ts.map
@@ -0,0 +1,41 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import type { IParameterModel } from '../interfaces/i_parameter_model.js';
7
+ import type { IProcedureModel } from '../interfaces/i_procedure_model.js';
8
+ import type { Workspace } from '../workspace.js';
9
+ import { ProcedureParameterBase, ProcedureParameterBaseJson } from './events_procedure_parameter_base.js';
10
+ /**
11
+ * Represents a parameter being removed from a procedure.
12
+ */
13
+ export declare class ProcedureParameterDelete extends ProcedureParameterBase {
14
+ readonly index: number;
15
+ /** A string used to check the type of the event. */
16
+ type: string;
17
+ /**
18
+ * @param parameter The parameter model that was just removed from the
19
+ * procedure.
20
+ * @param index The index the parameter was at before it was removed.
21
+ */
22
+ constructor(workspace: Workspace, procedure: IProcedureModel, parameter: IParameterModel, index: number);
23
+ run(forward: boolean): void;
24
+ parameterMatches(param: IParameterModel): boolean;
25
+ /**
26
+ * Encode the event as JSON.
27
+ *
28
+ * @returns JSON representation.
29
+ */
30
+ toJson(): ProcedureParameterDeleteJson;
31
+ /**
32
+ * Deserializes the JSON event.
33
+ *
34
+ * @internal
35
+ */
36
+ static fromJson(json: ProcedureParameterDeleteJson, workspace: Workspace): ProcedureParameterDelete;
37
+ }
38
+ export interface ProcedureParameterDeleteJson extends ProcedureParameterBaseJson {
39
+ index: number;
40
+ }
41
+ //# sourceMappingURL=events_procedure_parameter_delete.d.ts.map
@@ -0,0 +1,36 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import type { IParameterModel } from '../interfaces/i_parameter_model.js';
7
+ import type { IProcedureModel } from '../interfaces/i_procedure_model.js';
8
+ import type { Workspace } from '../workspace.js';
9
+ import { ProcedureParameterBase, ProcedureParameterBaseJson } from './events_procedure_parameter_base.js';
10
+ /**
11
+ * Represents a parameter of a procedure being renamed.
12
+ */
13
+ export declare class ProcedureParameterRename extends ProcedureParameterBase {
14
+ readonly oldName: string;
15
+ /** A string used to check the type of the event. */
16
+ type: string;
17
+ private readonly newName;
18
+ constructor(workspace: Workspace, procedure: IProcedureModel, parameter: IParameterModel, oldName: string);
19
+ run(forward: boolean): void;
20
+ /**
21
+ * Encode the event as JSON.
22
+ *
23
+ * @returns JSON representation.
24
+ */
25
+ toJson(): ProcedureParameterRenameJson;
26
+ /**
27
+ * Deserializes the JSON event.
28
+ *
29
+ * @internal
30
+ */
31
+ static fromJson(json: ProcedureParameterRenameJson, workspace: Workspace): ProcedureParameterRename;
32
+ }
33
+ export interface ProcedureParameterRenameJson extends ProcedureParameterBaseJson {
34
+ oldName: string;
35
+ }
36
+ //# sourceMappingURL=events_procedure_parameter_rename.d.ts.map
@@ -0,0 +1,35 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import type { IProcedureModel } from '../interfaces/i_procedure_model.js';
7
+ import type { Workspace } from '../workspace.js';
8
+ import { ProcedureBase, ProcedureBaseJson } from './events_procedure_base.js';
9
+ /**
10
+ * Represents a procedure being renamed.
11
+ */
12
+ export declare class ProcedureRename extends ProcedureBase {
13
+ readonly oldName: string;
14
+ /** A string used to check the type of the event. */
15
+ type: string;
16
+ private newName;
17
+ constructor(workspace: Workspace, model: IProcedureModel, oldName: string);
18
+ run(forward: boolean): void;
19
+ /**
20
+ * Encode the event as JSON.
21
+ *
22
+ * @returns JSON representation.
23
+ */
24
+ toJson(): ProcedureRenameJson;
25
+ /**
26
+ * Deserializes the JSON event.
27
+ *
28
+ * @internal
29
+ */
30
+ static fromJson(json: ProcedureRenameJson, workspace: Workspace): ProcedureRename;
31
+ }
32
+ export interface ProcedureRenameJson extends ProcedureBaseJson {
33
+ oldName: string;
34
+ }
35
+ //# sourceMappingURL=events_procedure_rename.d.ts.map
@@ -5,6 +5,7 @@
5
5
  */
6
6
  import { AbstractEventJson } from './events_abstract.js';
7
7
  import { UiBase } from './events_ui_base.js';
8
+ import type { Workspace } from '../workspace.js';
8
9
  /**
9
10
  * Class for a selected event.
10
11
  *
@@ -35,6 +36,16 @@ export declare class Selected extends UiBase {
35
36
  * @param json JSON representation.
36
37
  */
37
38
  fromJson(json: SelectedJson): void;
39
+ /**
40
+ * Deserializes the JSON event.
41
+ *
42
+ * @param event The event to append new properties to. Should be a subclass
43
+ * of Selected, but we can't specify that due to the fact that parameters
44
+ * to static methods in subclasses must be supertypes of parameters to
45
+ * static methods in superclasses.
46
+ * @internal
47
+ */
48
+ static fromJson(json: SelectedJson, workspace: Workspace, event?: any): Selected;
38
49
  }
39
50
  export interface SelectedJson extends AbstractEventJson {
40
51
  oldElementId?: string;
@@ -5,6 +5,7 @@
5
5
  */
6
6
  import { AbstractEventJson } from './events_abstract.js';
7
7
  import { UiBase } from './events_ui_base.js';
8
+ import type { Workspace } from '../workspace.js';
8
9
  /**
9
10
  * Class for a theme change event.
10
11
  *
@@ -31,6 +32,16 @@ export declare class ThemeChange extends UiBase {
31
32
  * @param json JSON representation.
32
33
  */
33
34
  fromJson(json: ThemeChangeJson): void;
35
+ /**
36
+ * Deserializes the JSON event.
37
+ *
38
+ * @param event The event to append new properties to. Should be a subclass
39
+ * of ThemeChange, but we can't specify that due to the fact that
40
+ * parameters to static methods in subclasses must be supertypes of
41
+ * parameters to static methods in superclasses.
42
+ * @internal
43
+ */
44
+ static fromJson(json: ThemeChangeJson, workspace: Workspace, event?: any): ThemeChange;
34
45
  }
35
46
  export interface ThemeChangeJson extends AbstractEventJson {
36
47
  themeName: string;
@@ -5,6 +5,7 @@
5
5
  */
6
6
  import { AbstractEventJson } from './events_abstract.js';
7
7
  import { UiBase } from './events_ui_base.js';
8
+ import type { Workspace } from '../workspace.js';
8
9
  /**
9
10
  * Class for a toolbox item select event.
10
11
  *
@@ -35,6 +36,16 @@ export declare class ToolboxItemSelect extends UiBase {
35
36
  * @param json JSON representation.
36
37
  */
37
38
  fromJson(json: ToolboxItemSelectJson): void;
39
+ /**
40
+ * Deserializes the JSON event.
41
+ *
42
+ * @param event The event to append new properties to. Should be a subclass
43
+ * of ToolboxItemSelect, but we can't specify that due to the fact that
44
+ * parameters to static methods in subclasses must be supertypes of
45
+ * parameters to static methods in superclasses.
46
+ * @internal
47
+ */
48
+ static fromJson(json: ToolboxItemSelectJson, workspace: Workspace, event?: any): ToolboxItemSelect;
38
49
  }
39
50
  export interface ToolboxItemSelectJson extends AbstractEventJson {
40
51
  oldItem?: string;
@@ -5,6 +5,7 @@
5
5
  */
6
6
  import { AbstractEventJson } from './events_abstract.js';
7
7
  import { UiBase } from './events_ui_base.js';
8
+ import type { Workspace } from '../workspace.js';
8
9
  /**
9
10
  * Class for a trashcan open event.
10
11
  *
@@ -32,6 +33,16 @@ export declare class TrashcanOpen extends UiBase {
32
33
  * @param json JSON representation.
33
34
  */
34
35
  fromJson(json: TrashcanOpenJson): void;
36
+ /**
37
+ * Deserializes the JSON event.
38
+ *
39
+ * @param event The event to append new properties to. Should be a subclass
40
+ * of TrashcanOpen, but we can't specify that due to the fact that
41
+ * parameters to static methods in subclasses must be supertypes of
42
+ * parameters to static methods in superclasses.
43
+ * @internal
44
+ */
45
+ static fromJson(json: TrashcanOpenJson, workspace: Workspace, event?: any): TrashcanOpen;
35
46
  }
36
47
  export interface TrashcanOpenJson extends AbstractEventJson {
37
48
  isOpen: boolean;
@@ -5,6 +5,7 @@
5
5
  */
6
6
  import type { VariableModel } from '../variable_model.js';
7
7
  import { Abstract as AbstractEvent, AbstractEventJson } from './events_abstract.js';
8
+ import type { Workspace } from '../workspace.js';
8
9
  /**
9
10
  * Abstract class for a variable event.
10
11
  *
@@ -30,6 +31,16 @@ export declare class VarBase extends AbstractEvent {
30
31
  * @param json JSON representation.
31
32
  */
32
33
  fromJson(json: VarBaseJson): void;
34
+ /**
35
+ * Deserializes the JSON event.
36
+ *
37
+ * @param event The event to append new properties to. Should be a subclass
38
+ * of VarBase, but we can't specify that due to the fact that parameters
39
+ * to static methods in subclasses must be supertypes of parameters to
40
+ * static methods in superclasses.
41
+ * @internal
42
+ */
43
+ static fromJson(json: VarBaseJson, workspace: Workspace, event?: any): VarBase;
33
44
  }
34
45
  export interface VarBaseJson extends AbstractEventJson {
35
46
  varId: string;
@@ -5,6 +5,7 @@
5
5
  */
6
6
  import type { VariableModel } from '../variable_model.js';
7
7
  import { VarBase, VarBaseJson } from './events_var_base.js';
8
+ import type { Workspace } from '../workspace.js';
8
9
  /**
9
10
  * Class for a variable creation event.
10
11
  *
@@ -30,6 +31,16 @@ export declare class VarCreate extends VarBase {
30
31
  * @param json JSON representation.
31
32
  */
32
33
  fromJson(json: VarCreateJson): void;
34
+ /**
35
+ * Deserializes the JSON event.
36
+ *
37
+ * @param event The event to append new properties to. Should be a subclass
38
+ * of VarCreate, but we can't specify that due to the fact that parameters
39
+ * to static methods in subclasses must be supertypes of parameters to
40
+ * static methods in superclasses.
41
+ * @internal
42
+ */
43
+ static fromJson(json: VarCreateJson, workspace: Workspace, event?: any): VarCreate;
33
44
  /**
34
45
  * Run a variable creation event.
35
46
  *