blockly 11.1.1 → 11.2.0-beta.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/blockly.min.js +551 -525
- package/blockly.mjs +1 -0
- package/blockly_compressed.js +519 -493
- package/blockly_compressed.js.map +1 -1
- package/blocks_compressed.js +32 -32
- package/blocks_compressed.js.map +1 -1
- package/core/block.d.ts +20 -14
- package/core/block_svg.d.ts +42 -9
- package/core/blockly.d.ts +11 -147
- package/core/blockly_options.d.ts +2 -2
- package/core/browser_events.d.ts +2 -2
- package/core/bubbles/bubble.d.ts +2 -2
- package/core/bubbles/mini_workspace_bubble.d.ts +3 -3
- package/core/bubbles/text_bubble.d.ts +1 -1
- package/core/bubbles/textinput_bubble.d.ts +6 -1
- package/core/bubbles.d.ts +2 -2
- package/core/clipboard/workspace_comment_paster.d.ts +3 -3
- package/core/clipboard.d.ts +2 -2
- package/core/comments/comment_view.d.ts +10 -3
- package/core/comments/rendered_workspace_comment.d.ts +10 -10
- package/core/comments/workspace_comment.d.ts +2 -2
- package/core/comments.d.ts +1 -1
- package/core/component_manager.d.ts +8 -0
- package/core/connection.d.ts +3 -3
- package/core/dragging/block_drag_strategy.d.ts +3 -1
- package/core/dragging/bubble_drag_strategy.d.ts +3 -1
- package/core/dragging/comment_drag_strategy.d.ts +8 -1
- package/core/dragging/dragger.d.ts +2 -2
- package/core/dragging.d.ts +2 -2
- package/core/dropdowndiv.d.ts +3 -3
- package/core/events/events.d.ts +67 -127
- package/core/events/events_abstract.d.ts +0 -1
- package/core/events/events_block_change.d.ts +2 -1
- package/core/events/events_block_create.d.ts +3 -2
- package/core/events/events_block_delete.d.ts +3 -2
- package/core/events/events_block_drag.d.ts +3 -2
- package/core/events/events_block_field_intermediate_change.d.ts +2 -1
- package/core/events/events_block_move.d.ts +3 -2
- package/core/events/events_bubble_open.d.ts +4 -3
- package/core/events/events_click.d.ts +3 -2
- package/core/events/events_comment_base.d.ts +1 -1
- package/core/events/events_comment_change.d.ts +8 -2
- package/core/events/events_comment_collapse.d.ts +3 -2
- package/core/events/events_comment_create.d.ts +8 -2
- package/core/events/events_comment_delete.d.ts +8 -2
- package/core/events/events_comment_drag.d.ts +51 -0
- package/core/events/events_comment_move.d.ts +9 -3
- package/core/events/events_comment_resize.d.ts +68 -0
- package/core/events/events_marker_move.d.ts +2 -1
- package/core/events/events_selected.d.ts +3 -2
- package/core/events/events_theme_change.d.ts +3 -2
- package/core/events/events_toolbox_item_select.d.ts +3 -2
- package/core/events/events_trashcan_open.d.ts +3 -2
- package/core/events/events_var_base.d.ts +1 -1
- package/core/events/events_var_create.d.ts +3 -2
- package/core/events/events_var_delete.d.ts +3 -2
- package/core/events/events_var_rename.d.ts +3 -2
- package/core/events/events_viewport.d.ts +3 -2
- package/core/events/predicates.d.ts +90 -0
- package/core/events/type.d.ts +79 -0
- package/core/events/utils.d.ts +93 -125
- package/core/events/workspace_events.d.ts +2 -1
- package/core/extensions.d.ts +1 -1
- package/core/field.d.ts +1 -1
- package/core/field_dropdown.d.ts +34 -0
- package/core/field_input.d.ts +1 -1
- package/core/field_label.d.ts +6 -0
- package/core/flyout_base.d.ts +1 -1
- package/core/flyout_button.d.ts +6 -1
- package/core/generator.d.ts +3 -2
- package/core/gesture.d.ts +3 -3
- package/core/grid.d.ts +7 -1
- package/core/icons/comment_icon.d.ts +5 -6
- package/core/icons/icon.d.ts +1 -1
- package/core/icons/mutator_icon.d.ts +3 -3
- package/core/icons/warning_icon.d.ts +2 -2
- package/core/icons.d.ts +5 -5
- package/core/inputs/input.d.ts +1 -1
- package/core/inputs.d.ts +3 -3
- package/core/interfaces/i_ast_node_location_with_block.d.ts +1 -1
- package/core/interfaces/i_comment_icon.d.ts +2 -2
- package/core/interfaces/i_drag_target.d.ts +1 -1
- package/core/interfaces/i_flyout.d.ts +3 -3
- package/core/interfaces/i_legacy_procedure_blocks.d.ts +2 -2
- package/core/interfaces/i_metrics_manager.d.ts +2 -2
- package/core/interfaces/i_positionable.d.ts +1 -1
- package/core/interfaces/i_selectable.d.ts +1 -1
- package/core/interfaces/i_serializer.d.ts +2 -2
- package/core/interfaces/i_toolbox.d.ts +3 -3
- package/core/keyboard_nav/ast_node.d.ts +1 -1
- package/core/layer_manager.d.ts +1 -1
- package/core/layers.d.ts +0 -2
- package/core/procedures.d.ts +3 -3
- package/core/registry.d.ts +6 -6
- package/core/rendered_connection.d.ts +10 -5
- package/core/renderers/common/block_rendering.d.ts +3 -30
- package/core/renderers/common/i_path_object.d.ts +2 -2
- package/core/renderers/common/info.d.ts +1 -1
- package/core/renderers/common/marker_svg.d.ts +5 -5
- package/core/renderers/zelos/constants.d.ts +1 -1
- package/core/serialization/procedures.d.ts +2 -2
- package/core/serialization/workspace_comments.d.ts +1 -1
- package/core/serialization.d.ts +3 -3
- package/core/shortcut_registry.d.ts +70 -10
- package/core/toolbox/toolbox.d.ts +1 -6
- package/core/tooltip.d.ts +1 -1
- package/core/trashcan.d.ts +1 -6
- package/core/utils/drag.d.ts +33 -0
- package/core/utils/rect.d.ts +26 -0
- package/core/utils/size.d.ts +1 -1
- package/core/variables_dynamic.d.ts +1 -1
- package/core/workspace.d.ts +4 -5
- package/core/workspace_svg.d.ts +4 -6
- package/core/xml.d.ts +1 -1
- package/dart_compressed.js.map +1 -1
- package/generators/dart/dart_generator.d.ts +4 -0
- package/generators/dart/lists.d.ts +0 -3
- package/generators/dart/procedures.d.ts +0 -3
- package/generators/dart/text.d.ts +0 -3
- package/generators/javascript/javascript_generator.d.ts +4 -0
- package/generators/javascript/lists.d.ts +0 -3
- package/generators/javascript/procedures.d.ts +0 -3
- package/generators/javascript/text.d.ts +0 -3
- package/generators/lua/lists.d.ts +0 -3
- package/generators/lua/lua_generator.d.ts +6 -0
- package/generators/lua/procedures.d.ts +0 -3
- package/generators/lua/text.d.ts +0 -3
- package/generators/lua.d.ts +0 -4
- package/generators/php/lists.d.ts +1 -1
- package/generators/php/logic.d.ts +1 -1
- package/generators/php/math.d.ts +1 -1
- package/generators/php/php_generator.d.ts +4 -0
- package/generators/php/procedures.d.ts +1 -1
- package/generators/php/text.d.ts +1 -4
- package/generators/php/variables.d.ts +1 -1
- package/generators/php.d.ts +0 -5
- package/generators/python/lists.d.ts +1 -1
- package/generators/python/procedures.d.ts +1 -1
- package/generators/python/python_generator.d.ts +4 -0
- package/generators/python/text.d.ts +1 -1
- package/generators/python.d.ts +0 -5
- package/index.mjs +1 -0
- package/javascript_compressed.js.map +1 -1
- package/lua_compressed.js.map +1 -1
- package/media/1x1.gif +0 -0
- package/media/click.mp3 +0 -0
- package/media/click.ogg +0 -0
- package/media/click.wav +0 -0
- package/media/delete.mp3 +0 -0
- package/media/delete.ogg +0 -0
- package/media/delete.wav +0 -0
- package/media/disconnect.mp3 +0 -0
- package/media/disconnect.ogg +0 -0
- package/media/disconnect.wav +0 -0
- package/media/handclosed.cur +0 -0
- package/media/handdelete.cur +0 -0
- package/media/handopen.cur +0 -0
- package/media/pilcrow.png +0 -0
- package/media/quote0.png +0 -0
- package/media/quote1.png +0 -0
- package/media/sprites.png +0 -0
- package/package.json +16 -13
- package/php_compressed.js.map +1 -1
- package/python_compressed.js.map +1 -1
package/core/block.d.ts
CHANGED
|
@@ -15,16 +15,16 @@ import { Connection } from './connection.js';
|
|
|
15
15
|
import { ConnectionType } from './connection_type.js';
|
|
16
16
|
import type { Abstract } from './events/events_abstract.js';
|
|
17
17
|
import type { Field } from './field.js';
|
|
18
|
+
import { IconType } from './icons/icon_types.js';
|
|
19
|
+
import type { MutatorIcon } from './icons/mutator_icon.js';
|
|
18
20
|
import { Input } from './inputs/input.js';
|
|
19
21
|
import type { IASTNodeLocation } from './interfaces/i_ast_node_location.js';
|
|
20
22
|
import { type IIcon } from './interfaces/i_icon.js';
|
|
21
|
-
import type { MutatorIcon } from './icons/mutator_icon.js';
|
|
22
23
|
import * as Tooltip from './tooltip.js';
|
|
23
24
|
import { Coordinate } from './utils/coordinate.js';
|
|
24
25
|
import { Size } from './utils/size.js';
|
|
25
26
|
import type { VariableModel } from './variable_model.js';
|
|
26
27
|
import type { Workspace } from './workspace.js';
|
|
27
|
-
import { IconType } from './icons/icon_types.js';
|
|
28
28
|
/**
|
|
29
29
|
* Class for one block.
|
|
30
30
|
* Not normally called directly, workspace.newBlock() is preferred.
|
|
@@ -100,22 +100,28 @@ export declare class Block implements IASTNodeLocation {
|
|
|
100
100
|
*/
|
|
101
101
|
suppressPrefixSuffix: boolean | null;
|
|
102
102
|
/**
|
|
103
|
-
* An optional
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
*
|
|
103
|
+
* An optional method for declaring developer variables, to be used
|
|
104
|
+
* by generators. Developer variables are never shown to the user,
|
|
105
|
+
* but are declared as global variables in the generated code.
|
|
106
|
+
*
|
|
107
|
+
* @returns a list of developer variable names.
|
|
107
108
|
*/
|
|
108
109
|
getDeveloperVariables?: () => string[];
|
|
109
110
|
/**
|
|
110
|
-
* An optional
|
|
111
|
-
* the mutator dialog.
|
|
111
|
+
* An optional method that reconfigures the block based on the
|
|
112
|
+
* contents of the mutator dialog.
|
|
113
|
+
*
|
|
114
|
+
* @param rootBlock The root block in the mutator flyout.
|
|
112
115
|
*/
|
|
113
|
-
compose?: (
|
|
116
|
+
compose?: (rootBlock: Block) => void;
|
|
114
117
|
/**
|
|
115
|
-
* An optional function that populates the mutator
|
|
116
|
-
* this block's
|
|
118
|
+
* An optional function that populates the mutator flyout with
|
|
119
|
+
* blocks representing this block's configuration.
|
|
120
|
+
*
|
|
121
|
+
* @param workspace The mutator flyout's workspace.
|
|
122
|
+
* @returns The root block created in the flyout's workspace.
|
|
117
123
|
*/
|
|
118
|
-
decompose?: (
|
|
124
|
+
decompose?: (workspace: Workspace) => Block;
|
|
119
125
|
id: string;
|
|
120
126
|
outputConnection: Connection | null;
|
|
121
127
|
nextConnection: Connection | null;
|
|
@@ -157,7 +163,7 @@ export declare class Block implements IASTNodeLocation {
|
|
|
157
163
|
/**
|
|
158
164
|
* String for block help, or function that returns a URL. Null for no help.
|
|
159
165
|
*/
|
|
160
|
-
helpUrl: string |
|
|
166
|
+
helpUrl: string | (() => string) | null;
|
|
161
167
|
/** A bound callback function to use when the parent workspace changes. */
|
|
162
168
|
private onchangeWrapper_;
|
|
163
169
|
/**
|
|
@@ -471,7 +477,7 @@ export declare class Block implements IASTNodeLocation {
|
|
|
471
477
|
* @param url URL string for block help, or function that returns a URL. Null
|
|
472
478
|
* for no help.
|
|
473
479
|
*/
|
|
474
|
-
setHelpUrl(url: string |
|
|
480
|
+
setHelpUrl(url: string | (() => string)): void;
|
|
475
481
|
/**
|
|
476
482
|
* Sets the tooltip for this block.
|
|
477
483
|
*
|
package/core/block_svg.d.ts
CHANGED
|
@@ -10,28 +10,28 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import './events/events_selected.js';
|
|
12
12
|
import { Block } from './block.js';
|
|
13
|
+
import { IDeletable } from './blockly.js';
|
|
14
|
+
import { BlockCopyData } from './clipboard/block_paster.js';
|
|
13
15
|
import type { Connection } from './connection.js';
|
|
14
16
|
import { ConnectionType } from './connection_type.js';
|
|
15
17
|
import { ContextMenuOption, LegacyContextMenuOption } from './contextmenu_registry.js';
|
|
16
18
|
import type { Field } from './field.js';
|
|
19
|
+
import { IconType } from './icons/icon_types.js';
|
|
20
|
+
import { MutatorIcon } from './icons/mutator_icon.js';
|
|
17
21
|
import type { Input } from './inputs/input.js';
|
|
18
22
|
import type { IASTNodeLocationSvg } from './interfaces/i_ast_node_location_svg.js';
|
|
19
23
|
import type { IBoundedElement } from './interfaces/i_bounded_element.js';
|
|
20
24
|
import type { ICopyable } from './interfaces/i_copyable.js';
|
|
21
25
|
import type { IDragStrategy, IDraggable } from './interfaces/i_draggable.js';
|
|
22
26
|
import { IIcon } from './interfaces/i_icon.js';
|
|
23
|
-
import { MutatorIcon } from './icons/mutator_icon.js';
|
|
24
27
|
import { RenderedConnection } from './rendered_connection.js';
|
|
25
28
|
import type { IPathObject } from './renderers/common/i_path_object.js';
|
|
26
29
|
import type { BlockStyle } from './theme.js';
|
|
27
30
|
import { Coordinate } from './utils/coordinate.js';
|
|
28
31
|
import { Rect } from './utils/rect.js';
|
|
32
|
+
import { FlyoutItemInfo } from './utils/toolbox.js';
|
|
29
33
|
import type { Workspace } from './workspace.js';
|
|
30
34
|
import type { WorkspaceSvg } from './workspace_svg.js';
|
|
31
|
-
import { IconType } from './icons/icon_types.js';
|
|
32
|
-
import { BlockCopyData } from './clipboard/block_paster.js';
|
|
33
|
-
import { IDeletable } from './blockly.js';
|
|
34
|
-
import { FlyoutItemInfo } from './utils/toolbox.js';
|
|
35
35
|
/**
|
|
36
36
|
* Class for a block's SVG representation.
|
|
37
37
|
* Not normally called directly, workspace.newBlock() is preferred.
|
|
@@ -49,7 +49,23 @@ export declare class BlockSvg extends Block implements IASTNodeLocationSvg, IBou
|
|
|
49
49
|
*/
|
|
50
50
|
static readonly COLLAPSED_WARNING_ID = "TEMP_COLLAPSED_WARNING_";
|
|
51
51
|
decompose?: (p1: Workspace) => BlockSvg;
|
|
52
|
-
|
|
52
|
+
/**
|
|
53
|
+
* An optional method which saves a record of blocks connected to
|
|
54
|
+
* this block so they can be later restored after this block is
|
|
55
|
+
* recoomposed (reconfigured). Typically records the connected
|
|
56
|
+
* blocks on properties on blocks in the mutator flyout, so that
|
|
57
|
+
* rearranging those component blocks will automatically rearrange
|
|
58
|
+
* the corresponding connected blocks on this block after this block
|
|
59
|
+
* is recomposed.
|
|
60
|
+
*
|
|
61
|
+
* To keep the saved connection information up-to-date, MutatorIcon
|
|
62
|
+
* arranges for an event listener to call this method any time the
|
|
63
|
+
* mutator flyout is open and a change occurs on this block's
|
|
64
|
+
* workspace.
|
|
65
|
+
*
|
|
66
|
+
* @param rootBlock The root block in the mutator flyout.
|
|
67
|
+
*/
|
|
68
|
+
saveConnections?: (rootBlock: BlockSvg) => void;
|
|
53
69
|
customContextMenu?: (p1: Array<ContextMenuOption | LegacyContextMenuOption>) => void;
|
|
54
70
|
/**
|
|
55
71
|
* Height of this block, not including any statement blocks above or below.
|
|
@@ -61,6 +77,13 @@ export declare class BlockSvg extends Block implements IASTNodeLocationSvg, IBou
|
|
|
61
77
|
* Width is in workspace units.
|
|
62
78
|
*/
|
|
63
79
|
width: number;
|
|
80
|
+
/**
|
|
81
|
+
* Width of this block, not including any connected value blocks.
|
|
82
|
+
* Width is in workspace units.
|
|
83
|
+
*
|
|
84
|
+
* @internal
|
|
85
|
+
*/
|
|
86
|
+
childlessWidth: number;
|
|
64
87
|
/**
|
|
65
88
|
* Map from IDs for warnings text to PIDs of functions to apply them.
|
|
66
89
|
* Used to be able to maintain multiple warnings.
|
|
@@ -125,7 +148,7 @@ export declare class BlockSvg extends Block implements IASTNodeLocationSvg, IBou
|
|
|
125
148
|
getColourTertiary(): string | undefined;
|
|
126
149
|
/** Selects this block. Highlights the block visually. */
|
|
127
150
|
select(): void;
|
|
128
|
-
/** Unselects this block. Unhighlights the
|
|
151
|
+
/** Unselects this block. Unhighlights the block visually. */
|
|
129
152
|
unselect(): void;
|
|
130
153
|
/**
|
|
131
154
|
* Sets the parent of this block to be a new block or null.
|
|
@@ -191,6 +214,15 @@ export declare class BlockSvg extends Block implements IASTNodeLocationSvg, IBou
|
|
|
191
214
|
* @returns Object with coordinates of the bounding box.
|
|
192
215
|
*/
|
|
193
216
|
getBoundingRectangle(): Rect;
|
|
217
|
+
/**
|
|
218
|
+
* Returns the coordinates of a bounding box describing the dimensions of this
|
|
219
|
+
* block alone.
|
|
220
|
+
* Coordinate system: workspace coordinates.
|
|
221
|
+
*
|
|
222
|
+
* @returns Object with coordinates of the bounding box.
|
|
223
|
+
*/
|
|
224
|
+
getBoundingRectangleWithoutChildren(): Rect;
|
|
225
|
+
private getBoundingRectangleWithDimensions;
|
|
194
226
|
/**
|
|
195
227
|
* Notify every input on this block to mark its fields as dirty.
|
|
196
228
|
* A dirty field is a field that needs to be re-rendered.
|
|
@@ -433,10 +465,11 @@ export declare class BlockSvg extends Block implements IASTNodeLocationSvg, IBou
|
|
|
433
465
|
* <g> tags do not respect z-index so SVG renders them in the
|
|
434
466
|
* order that they are in the DOM. By placing this block first within the
|
|
435
467
|
* block group's <g>, it will render on top of any other blocks.
|
|
468
|
+
* Use sparingly, this method is expensive because it reorders the DOM
|
|
469
|
+
* nodes.
|
|
436
470
|
*
|
|
437
|
-
* @param blockOnly
|
|
471
|
+
* @param blockOnly True to only move this block to the front without
|
|
438
472
|
* adjusting its parents.
|
|
439
|
-
* @internal
|
|
440
473
|
*/
|
|
441
474
|
bringToFront(blockOnly?: boolean): void;
|
|
442
475
|
/**
|
package/core/blockly.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ import * as browserEvents from './browser_events.js';
|
|
|
16
16
|
import * as bubbles from './bubbles.js';
|
|
17
17
|
import * as bumpObjects from './bump_objects.js';
|
|
18
18
|
import * as clipboard from './clipboard.js';
|
|
19
|
+
import * as comments from './comments.js';
|
|
19
20
|
import * as common from './common.js';
|
|
20
21
|
import { ComponentManager } from './component_manager.js';
|
|
21
22
|
import { config } from './config.js';
|
|
@@ -23,15 +24,15 @@ import { Connection } from './connection.js';
|
|
|
23
24
|
import { ConnectionChecker } from './connection_checker.js';
|
|
24
25
|
import { ConnectionDB } from './connection_db.js';
|
|
25
26
|
import { ConnectionType } from './connection_type.js';
|
|
27
|
+
import * as constants from './constants.js';
|
|
26
28
|
import * as ContextMenu from './contextmenu.js';
|
|
27
29
|
import * as ContextMenuItems from './contextmenu_items.js';
|
|
28
30
|
import { ContextMenuRegistry } from './contextmenu_registry.js';
|
|
29
|
-
import * as comments from './comments.js';
|
|
30
31
|
import * as Css from './css.js';
|
|
31
32
|
import { DeleteArea } from './delete_area.js';
|
|
32
33
|
import * as dialog from './dialog.js';
|
|
33
|
-
import * as dragging from './dragging.js';
|
|
34
34
|
import { DragTarget } from './drag_target.js';
|
|
35
|
+
import * as dragging from './dragging.js';
|
|
35
36
|
import * as dropDownDiv from './dropdowndiv.js';
|
|
36
37
|
import * as Events from './events/events.js';
|
|
37
38
|
import * as Extensions from './extensions.js';
|
|
@@ -55,8 +56,8 @@ import { Gesture } from './gesture.js';
|
|
|
55
56
|
import { Grid } from './grid.js';
|
|
56
57
|
import * as icons from './icons.js';
|
|
57
58
|
import { inject } from './inject.js';
|
|
58
|
-
import { Input } from './inputs/input.js';
|
|
59
59
|
import * as inputs from './inputs.js';
|
|
60
|
+
import { Input } from './inputs/input.js';
|
|
60
61
|
import { InsertionMarkerManager } from './insertion_marker_manager.js';
|
|
61
62
|
import { InsertionMarkerPreviewer } from './insertion_marker_previewer.js';
|
|
62
63
|
import { IASTNodeLocation } from './interfaces/i_ast_node_location.js';
|
|
@@ -70,12 +71,12 @@ import { IComponent } from './interfaces/i_component.js';
|
|
|
70
71
|
import { IConnectionChecker } from './interfaces/i_connection_checker.js';
|
|
71
72
|
import { IConnectionPreviewer } from './interfaces/i_connection_previewer.js';
|
|
72
73
|
import { IContextMenu } from './interfaces/i_contextmenu.js';
|
|
73
|
-
import { ICopyable, isCopyable
|
|
74
|
+
import { ICopyData, ICopyable, isCopyable } from './interfaces/i_copyable.js';
|
|
74
75
|
import { IDeletable, isDeletable } from './interfaces/i_deletable.js';
|
|
75
76
|
import { IDeleteArea } from './interfaces/i_delete_area.js';
|
|
76
77
|
import { IDragTarget } from './interfaces/i_drag_target.js';
|
|
78
|
+
import { IDragStrategy, IDraggable, isDraggable } from './interfaces/i_draggable.js';
|
|
77
79
|
import { IDragger } from './interfaces/i_dragger.js';
|
|
78
|
-
import { IDraggable, isDraggable, IDragStrategy } from './interfaces/i_draggable.js';
|
|
79
80
|
import { IFlyout } from './interfaces/i_flyout.js';
|
|
80
81
|
import { IHasBubble, hasBubble } from './interfaces/i_has_bubble.js';
|
|
81
82
|
import { IIcon, isIcon } from './interfaces/i_icon.js';
|
|
@@ -99,8 +100,9 @@ import { BasicCursor } from './keyboard_nav/basic_cursor.js';
|
|
|
99
100
|
import { Cursor } from './keyboard_nav/cursor.js';
|
|
100
101
|
import { Marker } from './keyboard_nav/marker.js';
|
|
101
102
|
import { TabNavigateCursor } from './keyboard_nav/tab_navigate_cursor.js';
|
|
102
|
-
import { MarkerManager } from './marker_manager.js';
|
|
103
103
|
import type { LayerManager } from './layer_manager.js';
|
|
104
|
+
import * as layers from './layers.js';
|
|
105
|
+
import { MarkerManager } from './marker_manager.js';
|
|
104
106
|
import { Menu } from './menu.js';
|
|
105
107
|
import { MenuItem } from './menuitem.js';
|
|
106
108
|
import { MetricsManager } from './metrics_manager.js';
|
|
@@ -110,10 +112,9 @@ import { Options } from './options.js';
|
|
|
110
112
|
import * as uiPosition from './positionable_helpers.js';
|
|
111
113
|
import * as Procedures from './procedures.js';
|
|
112
114
|
import * as registry from './registry.js';
|
|
113
|
-
import { RenderedConnection } from './rendered_connection.js';
|
|
114
115
|
import * as renderManagement from './render_management.js';
|
|
116
|
+
import { RenderedConnection } from './rendered_connection.js';
|
|
115
117
|
import * as blockRendering from './renderers/common/block_rendering.js';
|
|
116
|
-
import * as constants from './constants.js';
|
|
117
118
|
import * as geras from './renderers/geras/geras.js';
|
|
118
119
|
import * as thrasos from './renderers/thrasos/thrasos.js';
|
|
119
120
|
import * as zelos from './renderers/zelos/zelos.js';
|
|
@@ -261,144 +262,7 @@ export declare const VARIABLE_DYNAMIC_CATEGORY_NAME: string;
|
|
|
261
262
|
* procedure blocks.
|
|
262
263
|
*/
|
|
263
264
|
export declare const PROCEDURE_CATEGORY_NAME: string;
|
|
264
|
-
export { browserEvents };
|
|
265
|
-
export { ContextMenu };
|
|
266
|
-
export { ContextMenuItems };
|
|
267
|
-
export { Css };
|
|
268
|
-
export { Events };
|
|
269
|
-
export { Extensions };
|
|
270
|
-
export { Procedures };
|
|
271
|
-
export { Procedures as procedures };
|
|
272
|
-
export { ShortcutItems };
|
|
273
|
-
export { Themes };
|
|
274
|
-
export { Tooltip };
|
|
275
|
-
export { Touch };
|
|
276
|
-
export { Variables };
|
|
277
|
-
export { VariablesDynamic };
|
|
278
|
-
export { WidgetDiv };
|
|
279
|
-
export { Xml };
|
|
280
|
-
export { blockAnimations };
|
|
281
|
-
export { blockRendering };
|
|
282
|
-
export { bumpObjects };
|
|
283
|
-
export { clipboard };
|
|
284
|
-
export { common };
|
|
285
|
-
export { constants };
|
|
286
|
-
export { dialog };
|
|
287
|
-
export { fieldRegistry };
|
|
288
|
-
export { geras };
|
|
289
|
-
export { registry };
|
|
290
|
-
export { thrasos };
|
|
291
|
-
export { uiPosition };
|
|
292
|
-
export { utils };
|
|
293
|
-
export { zelos };
|
|
294
|
-
export { ASTNode };
|
|
295
|
-
export { BasicCursor };
|
|
296
|
-
export { Block };
|
|
297
|
-
export { BlocklyOptions };
|
|
298
|
-
export { BlockSvg };
|
|
299
|
-
export { Blocks };
|
|
300
|
-
export { bubbles };
|
|
301
|
-
export { CollapsibleToolboxCategory };
|
|
302
|
-
export { ComponentManager };
|
|
303
|
-
export { Connection };
|
|
304
|
-
export { ConnectionType };
|
|
305
|
-
export { ConnectionChecker };
|
|
306
|
-
export { ConnectionDB };
|
|
307
|
-
export { ContextMenuRegistry };
|
|
308
|
-
export { comments };
|
|
309
|
-
export { Cursor };
|
|
310
|
-
export { DeleteArea };
|
|
311
|
-
export { dragging };
|
|
312
|
-
export { DragTarget };
|
|
265
|
+
export { ASTNode, BasicCursor, Block, BlockSvg, BlocklyOptions, Blocks, CollapsibleToolboxCategory, ComponentManager, Connection, ConnectionChecker, ConnectionDB, ConnectionType, ContextMenu, ContextMenuItems, ContextMenuRegistry, Css, Cursor, DeleteArea, DragTarget, Events, Extensions, Procedures, ShortcutItems, Themes, Tooltip, Touch, Variables, VariablesDynamic, WidgetDiv, Xml, blockAnimations, blockRendering, browserEvents, bubbles, bumpObjects, clipboard, comments, common, constants, dialog, dragging, fieldRegistry, geras, Procedures as procedures, registry, thrasos, uiPosition, utils, zelos, };
|
|
313
266
|
export declare const DropDownDiv: typeof dropDownDiv;
|
|
314
|
-
export { Field, FieldConfig, FieldValidator, UnattachedFieldError };
|
|
315
|
-
export { FieldCheckbox, FieldCheckboxConfig, FieldCheckboxFromJsonConfig, FieldCheckboxValidator, };
|
|
316
|
-
export { FieldDropdown, FieldDropdownConfig, FieldDropdownFromJsonConfig, FieldDropdownValidator, MenuGenerator, MenuGeneratorFunction, MenuOption, };
|
|
317
|
-
export { FieldImage, FieldImageConfig, FieldImageFromJsonConfig };
|
|
318
|
-
export { FieldLabel, FieldLabelConfig, FieldLabelFromJsonConfig };
|
|
319
|
-
export { FieldLabelSerializable };
|
|
320
|
-
export { FieldNumber, FieldNumberConfig, FieldNumberFromJsonConfig, FieldNumberValidator, };
|
|
321
|
-
export { FieldTextInput, FieldTextInputConfig, FieldTextInputFromJsonConfig, FieldTextInputValidator, };
|
|
322
|
-
export { FieldVariable, FieldVariableConfig, FieldVariableFromJsonConfig, FieldVariableValidator, };
|
|
323
|
-
export { Flyout };
|
|
324
|
-
export { FlyoutButton };
|
|
325
|
-
export { FlyoutMetricsManager };
|
|
326
|
-
export { CodeGenerator };
|
|
327
|
-
export { CodeGenerator as Generator };
|
|
328
|
-
export { Gesture };
|
|
329
|
-
export { Grid };
|
|
330
|
-
export { HorizontalFlyout };
|
|
331
|
-
export { IASTNodeLocation };
|
|
332
|
-
export { IASTNodeLocationSvg };
|
|
333
|
-
export { IASTNodeLocationWithBlock };
|
|
334
|
-
export { IAutoHideable };
|
|
335
|
-
export { IBoundedElement };
|
|
336
|
-
export { IBubble };
|
|
337
|
-
export { ICollapsibleToolboxItem };
|
|
338
|
-
export { IComponent };
|
|
339
|
-
export { IConnectionChecker };
|
|
340
|
-
export { IConnectionPreviewer };
|
|
341
|
-
export { IContextMenu };
|
|
342
|
-
export { icons };
|
|
343
|
-
export { ICopyable, isCopyable, ICopyData };
|
|
344
|
-
export { IDeletable, isDeletable };
|
|
345
|
-
export { IDeleteArea };
|
|
346
|
-
export { IDragTarget };
|
|
347
|
-
export { IDragger };
|
|
348
|
-
export { IDraggable, isDraggable, IDragStrategy };
|
|
349
|
-
export { IFlyout };
|
|
350
|
-
export { IHasBubble, hasBubble };
|
|
351
|
-
export { IIcon, isIcon };
|
|
352
|
-
export { IKeyboardAccessible };
|
|
353
|
-
export { IMetricsManager };
|
|
354
|
-
export { IMovable };
|
|
355
|
-
export { Input };
|
|
356
|
-
export { inputs };
|
|
357
|
-
export { InsertionMarkerManager };
|
|
358
|
-
export { InsertionMarkerPreviewer };
|
|
359
|
-
export { IObservable, isObservable };
|
|
360
|
-
export { IPaster, isPaster };
|
|
361
|
-
export { IPositionable };
|
|
362
|
-
export { IRegistrable };
|
|
363
|
-
export { IRenderedElement, isRenderedElement };
|
|
364
|
-
export { ISelectable, isSelectable };
|
|
365
|
-
export { ISelectableToolboxItem };
|
|
366
|
-
export { ISerializable, isSerializable };
|
|
367
|
-
export { IStyleable };
|
|
368
|
-
export { IToolbox };
|
|
369
|
-
export { IToolboxItem };
|
|
370
|
-
export { IVariableBackedParameterModel, isVariableBackedParameterModel };
|
|
371
|
-
export { Marker };
|
|
372
|
-
export { MarkerManager };
|
|
373
|
-
export { LayerManager };
|
|
374
|
-
export { Menu };
|
|
375
|
-
export { MenuItem };
|
|
376
|
-
export { MetricsManager };
|
|
377
|
-
export { Msg, setLocale };
|
|
378
|
-
export { Names };
|
|
379
|
-
export { Options };
|
|
380
|
-
export { RenderedConnection };
|
|
381
|
-
export { renderManagement };
|
|
382
|
-
export { Scrollbar };
|
|
383
|
-
export { ScrollbarPair };
|
|
384
|
-
export { ShortcutRegistry };
|
|
385
|
-
export { TabNavigateCursor };
|
|
386
|
-
export { Theme };
|
|
387
|
-
export { ThemeManager };
|
|
388
|
-
export { Toolbox };
|
|
389
|
-
export { ToolboxCategory };
|
|
390
|
-
export { ToolboxItem };
|
|
391
|
-
export { ToolboxSeparator };
|
|
392
|
-
export { Trashcan };
|
|
393
|
-
export { VariableMap };
|
|
394
|
-
export { VariableModel };
|
|
395
|
-
export { VerticalFlyout };
|
|
396
|
-
export { Workspace };
|
|
397
|
-
export { WorkspaceAudio };
|
|
398
|
-
export { WorkspaceDragger };
|
|
399
|
-
export { WorkspaceSvg };
|
|
400
|
-
export { ZoomControls };
|
|
401
|
-
export { config };
|
|
402
|
-
export { inject };
|
|
403
|
-
export { serialization };
|
|
267
|
+
export { CodeGenerator, Field, FieldCheckbox, FieldCheckboxConfig, FieldCheckboxFromJsonConfig, FieldCheckboxValidator, FieldConfig, FieldDropdown, FieldDropdownConfig, FieldDropdownFromJsonConfig, FieldDropdownValidator, FieldImage, FieldImageConfig, FieldImageFromJsonConfig, FieldLabel, FieldLabelConfig, FieldLabelFromJsonConfig, FieldLabelSerializable, FieldNumber, FieldNumberConfig, FieldNumberFromJsonConfig, FieldNumberValidator, FieldTextInput, FieldTextInputConfig, FieldTextInputFromJsonConfig, FieldTextInputValidator, FieldValidator, FieldVariable, FieldVariableConfig, FieldVariableFromJsonConfig, FieldVariableValidator, Flyout, FlyoutButton, FlyoutMetricsManager, CodeGenerator as Generator, Gesture, Grid, HorizontalFlyout, IASTNodeLocation, IASTNodeLocationSvg, IASTNodeLocationWithBlock, IAutoHideable, IBoundedElement, IBubble, ICollapsibleToolboxItem, IComponent, IConnectionChecker, IConnectionPreviewer, IContextMenu, ICopyData, ICopyable, IDeletable, IDeleteArea, IDragStrategy, IDragTarget, IDraggable, IDragger, IFlyout, IHasBubble, IIcon, IKeyboardAccessible, IMetricsManager, IMovable, IObservable, IPaster, IPositionable, IRegistrable, IRenderedElement, ISelectable, ISelectableToolboxItem, ISerializable, IStyleable, IToolbox, IToolboxItem, IVariableBackedParameterModel, Input, InsertionMarkerManager, InsertionMarkerPreviewer, LayerManager, Marker, MarkerManager, Menu, MenuGenerator, MenuGeneratorFunction, MenuItem, MenuOption, MetricsManager, Msg, Names, Options, RenderedConnection, Scrollbar, ScrollbarPair, ShortcutRegistry, TabNavigateCursor, Theme, ThemeManager, Toolbox, ToolboxCategory, ToolboxItem, ToolboxSeparator, Trashcan, UnattachedFieldError, VariableMap, VariableModel, VerticalFlyout, Workspace, WorkspaceAudio, WorkspaceDragger, WorkspaceSvg, ZoomControls, config, hasBubble, icons, inject, inputs, isCopyable, isDeletable, isDraggable, isIcon, isObservable, isPaster, isRenderedElement, isSelectable, isSerializable, isVariableBackedParameterModel, layers, renderManagement, serialization, setLocale, };
|
|
404
268
|
//# sourceMappingURL=blockly.d.ts.map
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* Copyright 2016 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import type {
|
|
7
|
-
import type { WorkspaceSvg } from './workspace_svg.js';
|
|
6
|
+
import type { ITheme, Theme } from './theme.js';
|
|
8
7
|
import type { ToolboxDefinition } from './utils/toolbox.js';
|
|
8
|
+
import type { WorkspaceSvg } from './workspace_svg.js';
|
|
9
9
|
/**
|
|
10
10
|
* Blockly options.
|
|
11
11
|
*/
|
package/core/browser_events.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ export type Data = [EventTarget, string, (e: Event) => void][];
|
|
|
23
23
|
* simultaneous touches. False by default.
|
|
24
24
|
* @returns Opaque data that can be passed to unbindEvent_.
|
|
25
25
|
*/
|
|
26
|
-
export declare function conditionalBind(node: EventTarget, name: string, thisObject:
|
|
26
|
+
export declare function conditionalBind(node: EventTarget, name: string, thisObject: object | null, func: Function, opt_noCaptureIdentifier?: boolean): Data;
|
|
27
27
|
/**
|
|
28
28
|
* Bind an event handler that should be called regardless of whether it is part
|
|
29
29
|
* of the active touch stream.
|
|
@@ -36,7 +36,7 @@ export declare function conditionalBind(node: EventTarget, name: string, thisObj
|
|
|
36
36
|
* @param func Function to call when event is triggered.
|
|
37
37
|
* @returns Opaque data that can be passed to unbindEvent_.
|
|
38
38
|
*/
|
|
39
|
-
export declare function bind(node: EventTarget, name: string, thisObject:
|
|
39
|
+
export declare function bind(node: EventTarget, name: string, thisObject: object | null, func: Function): Data;
|
|
40
40
|
/**
|
|
41
41
|
* Unbind one or more events event from a function call.
|
|
42
42
|
*
|
package/core/bubbles/bubble.d.ts
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
* Copyright 2023 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
+
import { ISelectable } from '../blockly.js';
|
|
6
7
|
import { IBubble } from '../interfaces/i_bubble.js';
|
|
7
8
|
import { Coordinate } from '../utils/coordinate.js';
|
|
8
9
|
import { Rect } from '../utils/rect.js';
|
|
9
10
|
import { Size } from '../utils/size.js';
|
|
10
11
|
import { WorkspaceSvg } from '../workspace_svg.js';
|
|
11
|
-
import { ISelectable } from '../blockly.js';
|
|
12
12
|
/**
|
|
13
13
|
* The abstract pop-up bubble class. This creates a UI that looks like a speech
|
|
14
14
|
* bubble, where it has a "tail" that points to the block, and a "head" that
|
|
@@ -96,7 +96,7 @@ export declare abstract class Bubble implements IBubble, ISelectable {
|
|
|
96
96
|
protected getColour(): string;
|
|
97
97
|
/** Sets the colour of the background and tail of this bubble. */
|
|
98
98
|
setColour(colour: string): void;
|
|
99
|
-
/**
|
|
99
|
+
/** Brings the bubble to the front and passes the pointer event off to the gesture system. */
|
|
100
100
|
private onMouseDown;
|
|
101
101
|
/** Positions the bubble relative to its anchor. Does not render its tail. */
|
|
102
102
|
protected positionRelativeToAnchor(): void;
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
* Copyright 2023 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { Abstract as AbstractEvent } from '../events/events_abstract.js';
|
|
7
6
|
import type { BlocklyOptions } from '../blockly_options.js';
|
|
8
|
-
import {
|
|
9
|
-
import { Coordinate } from '../utils/coordinate.js';
|
|
7
|
+
import { Abstract as AbstractEvent } from '../events/events_abstract.js';
|
|
10
8
|
import { Options } from '../options.js';
|
|
9
|
+
import { Coordinate } from '../utils/coordinate.js';
|
|
11
10
|
import type { Rect } from '../utils/rect.js';
|
|
12
11
|
import type { WorkspaceSvg } from '../workspace_svg.js';
|
|
12
|
+
import { Bubble } from './bubble.js';
|
|
13
13
|
/**
|
|
14
14
|
* A bubble that contains a mini-workspace which can hold arbitrary blocks.
|
|
15
15
|
* Used by the mutator icon.
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
* Copyright 2023 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { Bubble } from './bubble.js';
|
|
7
6
|
import { Coordinate } from '../utils/coordinate.js';
|
|
8
7
|
import { Rect } from '../utils/rect.js';
|
|
9
8
|
import { WorkspaceSvg } from '../workspace_svg.js';
|
|
9
|
+
import { Bubble } from './bubble.js';
|
|
10
10
|
/**
|
|
11
11
|
* A bubble that displays non-editable text. Used by the warning icon.
|
|
12
12
|
*/
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
* Copyright 2023 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { Bubble } from './bubble.js';
|
|
7
6
|
import { Coordinate } from '../utils/coordinate.js';
|
|
8
7
|
import { Rect } from '../utils/rect.js';
|
|
9
8
|
import { Size } from '../utils/size.js';
|
|
10
9
|
import { WorkspaceSvg } from '../workspace_svg.js';
|
|
10
|
+
import { Bubble } from './bubble.js';
|
|
11
11
|
/**
|
|
12
12
|
* A bubble that displays editable text. It can also be resized by the user.
|
|
13
13
|
* Used by the comment icon.
|
|
@@ -42,6 +42,7 @@ export declare class TextInputBubble extends Bubble {
|
|
|
42
42
|
private readonly DEFAULT_SIZE;
|
|
43
43
|
/** The minimum size of this bubble, including borders. */
|
|
44
44
|
private readonly MIN_SIZE;
|
|
45
|
+
private editable;
|
|
45
46
|
/**
|
|
46
47
|
* @param workspace The workspace this bubble belongs to.
|
|
47
48
|
* @param anchor The anchor location of the thing this bubble is attached to.
|
|
@@ -54,6 +55,10 @@ export declare class TextInputBubble extends Bubble {
|
|
|
54
55
|
getText(): string;
|
|
55
56
|
/** Sets the text of this bubble. Calls change listeners. */
|
|
56
57
|
setText(text: string): void;
|
|
58
|
+
/** Sets whether or not the text in the bubble is editable. */
|
|
59
|
+
setEditable(editable: boolean): void;
|
|
60
|
+
/** Returns whether or not the text in the bubble is editable. */
|
|
61
|
+
isEditable(): boolean;
|
|
57
62
|
/** Adds a change listener to be notified when this bubble's text changes. */
|
|
58
63
|
addTextChangeListener(listener: () => void): void;
|
|
59
64
|
/** Adds a change listener to be notified when this bubble's size changes. */
|
package/core/bubbles.d.ts
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { Bubble } from './bubbles/bubble.js';
|
|
7
|
+
import { MiniWorkspaceBubble } from './bubbles/mini_workspace_bubble.js';
|
|
7
8
|
import { TextBubble } from './bubbles/text_bubble.js';
|
|
8
9
|
import { TextInputBubble } from './bubbles/textinput_bubble.js';
|
|
9
|
-
|
|
10
|
-
export { Bubble, TextBubble, TextInputBubble, MiniWorkspaceBubble };
|
|
10
|
+
export { Bubble, MiniWorkspaceBubble, TextBubble, TextInputBubble };
|
|
11
11
|
//# sourceMappingURL=bubbles.d.ts.map
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
* Copyright 2023 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import {
|
|
6
|
+
import { RenderedWorkspaceComment } from '../comments/rendered_workspace_comment.js';
|
|
7
7
|
import { ICopyData } from '../interfaces/i_copyable.js';
|
|
8
|
+
import { IPaster } from '../interfaces/i_paster.js';
|
|
9
|
+
import * as commentSerialiation from '../serialization/workspace_comments.js';
|
|
8
10
|
import { Coordinate } from '../utils/coordinate.js';
|
|
9
11
|
import { WorkspaceSvg } from '../workspace_svg.js';
|
|
10
|
-
import * as commentSerialiation from '../serialization/workspace_comments.js';
|
|
11
|
-
import { RenderedWorkspaceComment } from '../comments/rendered_workspace_comment.js';
|
|
12
12
|
export declare class WorkspaceCommentPaster implements IPaster<WorkspaceCommentCopyData, RenderedWorkspaceComment> {
|
|
13
13
|
static TYPE: string;
|
|
14
14
|
paste(copyData: WorkspaceCommentCopyData, workspace: WorkspaceSvg, coordinate?: Coordinate): RenderedWorkspaceComment | null;
|
package/core/clipboard.d.ts
CHANGED
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
* Copyright 2021 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import type { ICopyData, ICopyable } from './interfaces/i_copyable.js';
|
|
7
6
|
import { BlockPaster } from './clipboard/block_paster.js';
|
|
8
|
-
import { WorkspaceSvg } from './workspace_svg.js';
|
|
9
7
|
import * as registry from './clipboard/registry.js';
|
|
8
|
+
import type { ICopyData, ICopyable } from './interfaces/i_copyable.js';
|
|
10
9
|
import { Coordinate } from './utils/coordinate.js';
|
|
10
|
+
import { WorkspaceSvg } from './workspace_svg.js';
|
|
11
11
|
/**
|
|
12
12
|
* Private version of copy for stubbing in tests.
|
|
13
13
|
*/
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { IRenderedElement } from '../interfaces/i_rendered_element.js';
|
|
7
|
-
import { WorkspaceSvg } from '../workspace_svg.js';
|
|
8
7
|
import { Coordinate } from '../utils/coordinate.js';
|
|
9
8
|
import { Size } from '../utils/size.js';
|
|
9
|
+
import { WorkspaceSvg } from '../workspace_svg.js';
|
|
10
10
|
export declare class CommentView implements IRenderedElement {
|
|
11
11
|
private readonly workspace;
|
|
12
12
|
/** The root group element of the comment view. */
|
|
@@ -65,6 +65,8 @@ export declare class CommentView implements IRenderedElement {
|
|
|
65
65
|
private disposing;
|
|
66
66
|
/** Whether this comment view has been disposed or not. */
|
|
67
67
|
private disposed;
|
|
68
|
+
/** Size of this comment when the resize drag was initiated. */
|
|
69
|
+
private preResizeSize?;
|
|
68
70
|
constructor(workspace: WorkspaceSvg);
|
|
69
71
|
/**
|
|
70
72
|
* Creates the rect we use for highlighting the comment when it's selected.
|
|
@@ -92,6 +94,11 @@ export declare class CommentView implements IRenderedElement {
|
|
|
92
94
|
* Sets the size of the comment in workspace units, and updates the view
|
|
93
95
|
* elements to reflect the new size.
|
|
94
96
|
*/
|
|
97
|
+
setSizeWithoutFiringEvents(size: Size): void;
|
|
98
|
+
/**
|
|
99
|
+
* Sets the size of the comment in workspace units, updates the view
|
|
100
|
+
* elements to reflect the new size, and triggers size change listeners.
|
|
101
|
+
*/
|
|
95
102
|
setSize(size: Size): void;
|
|
96
103
|
/**
|
|
97
104
|
* Calculates the minimum size for the uncollapsed comment based on text
|
|
@@ -128,7 +135,7 @@ export declare class CommentView implements IRenderedElement {
|
|
|
128
135
|
private updateResizeHandlePosition;
|
|
129
136
|
/**
|
|
130
137
|
* Triggers listeners when the size of the comment changes, either
|
|
131
|
-
*
|
|
138
|
+
* programmatically or manually by the user.
|
|
132
139
|
*/
|
|
133
140
|
private onSizeChange;
|
|
134
141
|
/**
|
|
@@ -189,7 +196,7 @@ export declare class CommentView implements IRenderedElement {
|
|
|
189
196
|
removeTextChangeListener(listener: () => void): void;
|
|
190
197
|
/**
|
|
191
198
|
* Triggers listeners when the text of the comment changes, either
|
|
192
|
-
*
|
|
199
|
+
* programmatically or manually by the user.
|
|
193
200
|
*/
|
|
194
201
|
private onTextChange;
|
|
195
202
|
/** Updates the preview text element to reflect the given text. */
|
|
@@ -3,19 +3,19 @@
|
|
|
3
3
|
* Copyright 2024 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import {
|
|
7
|
-
import { WorkspaceSvg } from '../workspace_svg.js';
|
|
8
|
-
import { Coordinate } from '../utils/coordinate.js';
|
|
9
|
-
import { Rect } from '../utils/rect.js';
|
|
10
|
-
import { Size } from '../utils/size.js';
|
|
6
|
+
import { WorkspaceCommentCopyData } from '../clipboard/workspace_comment_paster.js';
|
|
11
7
|
import { IBoundedElement } from '../interfaces/i_bounded_element.js';
|
|
12
|
-
import {
|
|
8
|
+
import { IContextMenu } from '../interfaces/i_contextmenu.js';
|
|
9
|
+
import { ICopyable } from '../interfaces/i_copyable.js';
|
|
10
|
+
import { IDeletable } from '../interfaces/i_deletable.js';
|
|
13
11
|
import { IDraggable } from '../interfaces/i_draggable.js';
|
|
12
|
+
import { IRenderedElement } from '../interfaces/i_rendered_element.js';
|
|
14
13
|
import { ISelectable } from '../interfaces/i_selectable.js';
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
14
|
+
import { Coordinate } from '../utils/coordinate.js';
|
|
15
|
+
import { Rect } from '../utils/rect.js';
|
|
16
|
+
import { Size } from '../utils/size.js';
|
|
17
|
+
import { WorkspaceSvg } from '../workspace_svg.js';
|
|
18
|
+
import { WorkspaceComment } from './workspace_comment.js';
|
|
19
19
|
export declare class RenderedWorkspaceComment extends WorkspaceComment implements IBoundedElement, IRenderedElement, IDraggable, ISelectable, IDeletable, ICopyable<WorkspaceCommentCopyData>, IContextMenu {
|
|
20
20
|
/** The class encompassing the svg elements making up the workspace comment. */
|
|
21
21
|
private view;
|