blockly 13.2.2-beta.2 → 13.4.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.
- package/README.md +1 -1
- package/blockly.min.js +785 -749
- package/blockly_compressed.js +669 -656
- package/blockly_compressed.js.map +1 -1
- package/blocks_compressed.js +68 -68
- package/blocks_compressed.js.map +1 -1
- package/core/block.d.ts +2 -2
- package/core/block_aria_composer.d.ts +1 -1
- package/core/block_svg.d.ts +7 -8
- package/core/bubbles/bubble.d.ts +4 -4
- package/core/bubbles/mini_workspace_bubble.d.ts +2 -2
- package/core/bubbles/text_bubble.d.ts +3 -3
- package/core/bubbles/textinput_bubble.d.ts +1 -1
- package/core/clipboard/block_paster.d.ts +5 -5
- package/core/clipboard/registry.d.ts +1 -1
- package/core/clipboard/workspace_comment_paster.d.ts +4 -4
- package/core/clipboard.d.ts +1 -1
- package/core/comments/collapse_comment_bar_button.d.ts +0 -4
- package/core/comments/comment_bar_button.d.ts +1 -1
- package/core/comments/comment_editor.d.ts +6 -6
- package/core/comments/comment_view.d.ts +3 -3
- package/core/comments/delete_comment_bar_button.d.ts +0 -4
- package/core/comments/rendered_workspace_comment.d.ts +11 -11
- package/core/comments/workspace_comment.d.ts +2 -2
- package/core/common.d.ts +2 -2
- package/core/config.d.ts +37 -11
- package/core/contextmenu_registry.d.ts +2 -2
- package/core/dragging/block_drag_strategy.d.ts +25 -7
- package/core/dragging/dragger.d.ts +2 -1
- package/core/events/events_block_base.d.ts +2 -1
- package/core/events/events_block_change.d.ts +3 -2
- 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 +2 -2
- package/core/events/events_block_field_intermediate_change.d.ts +3 -2
- package/core/events/events_block_move.d.ts +2 -1
- package/core/events/events_click.d.ts +2 -2
- package/core/events/events_comment_base.d.ts +2 -1
- package/core/events/events_comment_change.d.ts +2 -1
- package/core/events/events_comment_collapse.d.ts +3 -2
- package/core/events/events_comment_create.d.ts +2 -1
- package/core/events/events_comment_delete.d.ts +2 -1
- package/core/events/events_comment_drag.d.ts +2 -2
- package/core/events/events_comment_move.d.ts +2 -1
- package/core/events/events_comment_resize.d.ts +2 -1
- package/core/events/events_selected.d.ts +1 -1
- package/core/events/events_theme_change.d.ts +1 -1
- package/core/events/events_toolbox_item_select.d.ts +1 -1
- package/core/events/events_trashcan_open.d.ts +1 -1
- package/core/events/events_var_base.d.ts +2 -1
- package/core/events/events_var_create.d.ts +2 -1
- package/core/events/events_var_delete.d.ts +2 -1
- package/core/events/events_var_rename.d.ts +2 -1
- package/core/events/events_var_type_change.d.ts +2 -1
- package/core/events/events_viewport.d.ts +1 -1
- package/core/field.d.ts +4 -4
- package/core/field_checkbox.d.ts +4 -3
- package/core/field_dropdown.d.ts +4 -3
- package/core/field_image.d.ts +3 -2
- package/core/field_input.d.ts +7 -6
- package/core/field_label.d.ts +3 -2
- package/core/field_label_serializable.d.ts +3 -2
- package/core/field_number.d.ts +4 -3
- package/core/field_textinput.d.ts +5 -4
- package/core/field_variable.d.ts +7 -5
- package/core/flyout_base.d.ts +1 -1
- package/core/flyout_metrics_manager.d.ts +2 -1
- package/core/generator.d.ts +2 -2
- package/core/gesture.d.ts +2 -2
- package/core/grid.d.ts +2 -2
- package/core/icons/icon_types.d.ts +4 -4
- package/core/icons/registry.d.ts +1 -1
- package/core/insertion_marker.d.ts +1 -1
- package/core/insertion_marker_previewer.d.ts +3 -3
- package/core/interfaces/i_bubble.d.ts +2 -2
- package/core/interfaces/i_comment_icon.d.ts +6 -6
- package/core/interfaces/i_drag_target.d.ts +2 -2
- package/core/interfaces/i_icon.d.ts +1 -1
- package/core/interfaces/i_json_block_definition.d.ts +7 -7
- package/core/interfaces/i_keyboard_accessible.d.ts +1 -1
- package/core/interfaces/i_parameter_model.d.ts +2 -2
- package/core/interfaces/i_paster.d.ts +3 -3
- package/core/interfaces/i_procedure_block.d.ts +1 -1
- package/core/interfaces/i_procedure_map.d.ts +1 -1
- package/core/interfaces/i_procedure_model.d.ts +2 -2
- package/core/interfaces/i_selectable.d.ts +1 -1
- package/core/interfaces/i_variable_backed_parameter_model.d.ts +1 -1
- package/core/keyboard_nav/keyboard_mover.d.ts +2 -0
- package/core/keyboard_nav/navigators/navigator.d.ts +12 -0
- package/core/layer_manager.d.ts +3 -3
- package/core/observable_procedure_map.d.ts +1 -1
- package/core/options.d.ts +4 -4
- package/core/procedures.d.ts +1 -1
- package/core/render_management.d.ts +1 -1
- package/core/rendered_connection.d.ts +1 -1
- package/core/renderers/common/info.d.ts +1 -1
- package/core/renderers/common/path_object.d.ts +2 -2
- package/core/renderers/zelos/drawer.d.ts +1 -1
- package/core/renderers/zelos/info.d.ts +1 -1
- package/core/serialization/procedures.d.ts +2 -2
- package/core/serialization/workspace_comments.d.ts +2 -2
- package/core/shortcut_items.d.ts +25 -2
- package/core/shortcut_registry.d.ts +3 -3
- package/core/tooltip.d.ts +3 -2
- package/core/trashcan.d.ts +7 -8
- package/core/utils/aria.d.ts +3 -1
- package/core/utils/focusable_tree_traverser.d.ts +2 -2
- package/core/utils/style.d.ts +14 -0
- package/core/utils/toolbox.d.ts +0 -8
- package/core/variable_map.d.ts +1 -1
- package/core/variable_model.d.ts +1 -1
- package/core/variables.d.ts +1 -1
- package/core/workspace.d.ts +2 -2
- package/core/workspace_focus_target.d.ts +6 -1
- package/core/workspace_svg.d.ts +5 -4
- package/core/xml.d.ts +1 -1
- package/dart_compressed.js +20 -20
- package/javascript_compressed.js +25 -25
- package/lua_compressed.js +24 -24
- package/msg/ab.js +23 -0
- package/msg/ab.mjs +23 -0
- package/msg/ace.js +23 -0
- package/msg/ace.mjs +23 -0
- package/msg/af.js +23 -0
- package/msg/af.mjs +23 -0
- package/msg/am.js +23 -0
- package/msg/am.mjs +23 -0
- package/msg/ar.js +23 -0
- package/msg/ar.mjs +23 -0
- package/msg/ast.js +23 -0
- package/msg/ast.mjs +23 -0
- package/msg/az.js +23 -0
- package/msg/az.mjs +23 -0
- package/msg/ba.js +23 -0
- package/msg/ba.mjs +23 -0
- package/msg/bcc.js +23 -0
- package/msg/bcc.mjs +23 -0
- package/msg/be-tarask.js +40 -17
- package/msg/be-tarask.mjs +23 -0
- package/msg/be.js +23 -0
- package/msg/be.mjs +23 -0
- package/msg/bg.js +23 -0
- package/msg/bg.mjs +23 -0
- package/msg/bn.js +23 -0
- package/msg/bn.mjs +23 -0
- package/msg/br.js +23 -0
- package/msg/br.mjs +23 -0
- package/msg/bs.js +23 -0
- package/msg/bs.mjs +23 -0
- package/msg/ca.js +23 -0
- package/msg/ca.mjs +23 -0
- package/msg/ce.js +23 -0
- package/msg/ce.mjs +23 -0
- package/msg/cs.js +23 -0
- package/msg/cs.mjs +23 -0
- package/msg/csb.js +180 -157
- package/msg/csb.mjs +23 -0
- package/msg/da.js +49 -26
- package/msg/da.mjs +23 -0
- package/msg/de.js +23 -0
- package/msg/de.mjs +23 -0
- package/msg/diq.js +24 -1
- package/msg/diq.mjs +23 -0
- package/msg/dtp.js +23 -0
- package/msg/dtp.mjs +23 -0
- package/msg/dty.js +23 -0
- package/msg/dty.mjs +23 -0
- package/msg/ee.js +23 -0
- package/msg/ee.mjs +23 -0
- package/msg/el.js +23 -0
- package/msg/el.mjs +23 -0
- package/msg/en-gb.js +26 -3
- package/msg/en-gb.mjs +23 -0
- package/msg/en.js +23 -0
- package/msg/en.mjs +23 -0
- package/msg/eo.js +23 -0
- package/msg/eo.mjs +23 -0
- package/msg/es.js +23 -0
- package/msg/es.mjs +23 -0
- package/msg/et.js +23 -0
- package/msg/et.mjs +23 -0
- package/msg/eu.js +23 -0
- package/msg/eu.mjs +23 -0
- package/msg/fa.js +23 -0
- package/msg/fa.mjs +23 -0
- package/msg/fi.js +23 -0
- package/msg/fi.mjs +23 -0
- package/msg/fo.js +23 -0
- package/msg/fo.mjs +23 -0
- package/msg/fr.js +24 -1
- package/msg/fr.mjs +23 -0
- package/msg/frr.js +23 -0
- package/msg/frr.mjs +23 -0
- package/msg/ga.js +50 -27
- package/msg/ga.mjs +23 -0
- package/msg/gl.js +23 -0
- package/msg/gl.mjs +23 -0
- package/msg/gn.js +23 -0
- package/msg/gn.mjs +23 -0
- package/msg/gor.js +23 -0
- package/msg/gor.mjs +23 -0
- package/msg/ha.js +23 -0
- package/msg/ha.mjs +23 -0
- package/msg/he.js +29 -6
- package/msg/he.mjs +23 -0
- package/msg/hi.js +23 -0
- package/msg/hi.mjs +23 -0
- package/msg/hr.js +23 -0
- package/msg/hr.mjs +23 -0
- package/msg/hrx.js +23 -0
- package/msg/hrx.mjs +23 -0
- package/msg/hsb.js +23 -0
- package/msg/hsb.mjs +23 -0
- package/msg/hu.js +24 -1
- package/msg/hu.mjs +23 -0
- package/msg/hy.js +23 -0
- package/msg/hy.mjs +23 -0
- package/msg/ia.js +23 -0
- package/msg/ia.mjs +23 -0
- package/msg/id.js +23 -0
- package/msg/id.mjs +23 -0
- package/msg/ig.js +23 -0
- package/msg/ig.mjs +23 -0
- package/msg/inh.js +23 -0
- package/msg/inh.mjs +23 -0
- package/msg/is.js +23 -0
- package/msg/is.mjs +23 -0
- package/msg/it.js +23 -0
- package/msg/it.mjs +23 -0
- package/msg/ja.js +269 -246
- package/msg/ja.mjs +23 -0
- package/msg/ka.js +23 -0
- package/msg/ka.mjs +23 -0
- package/msg/kab.js +23 -0
- package/msg/kab.mjs +23 -0
- package/msg/kbd-cyrl.js +23 -0
- package/msg/kbd-cyrl.mjs +23 -0
- package/msg/km.js +23 -0
- package/msg/km.mjs +23 -0
- package/msg/kn.js +52 -29
- package/msg/kn.mjs +23 -0
- package/msg/ko.js +23 -0
- package/msg/ko.mjs +23 -0
- package/msg/krc.js +23 -0
- package/msg/krc.mjs +23 -0
- package/msg/ksh.js +23 -0
- package/msg/ksh.mjs +23 -0
- package/msg/ku-latn.js +23 -0
- package/msg/ku-latn.mjs +23 -0
- package/msg/ky.js +23 -0
- package/msg/ky.mjs +23 -0
- package/msg/la.js +23 -0
- package/msg/la.mjs +23 -0
- package/msg/lb.js +30 -7
- package/msg/lb.mjs +23 -0
- package/msg/lki.js +23 -0
- package/msg/lki.mjs +23 -0
- package/msg/lo.js +23 -0
- package/msg/lo.mjs +23 -0
- package/msg/lrc.js +23 -0
- package/msg/lrc.mjs +23 -0
- package/msg/lt.js +23 -0
- package/msg/lt.mjs +23 -0
- package/msg/lv.js +23 -0
- package/msg/lv.mjs +23 -0
- package/msg/mg.js +23 -0
- package/msg/mg.mjs +23 -0
- package/msg/mk.js +23 -0
- package/msg/mk.mjs +23 -0
- package/msg/ml.js +23 -0
- package/msg/ml.mjs +23 -0
- package/msg/mnw.js +23 -0
- package/msg/mnw.mjs +23 -0
- package/msg/ms.js +23 -0
- package/msg/ms.mjs +23 -0
- package/msg/mt.js +23 -0
- package/msg/mt.mjs +23 -0
- package/msg/my.js +23 -0
- package/msg/my.mjs +23 -0
- package/msg/mzn.js +23 -0
- package/msg/mzn.mjs +23 -0
- package/msg/nb.js +23 -0
- package/msg/nb.mjs +23 -0
- package/msg/ne.js +24 -1
- package/msg/ne.mjs +23 -0
- package/msg/nl.js +23 -0
- package/msg/nl.mjs +23 -0
- package/msg/oc.js +23 -0
- package/msg/oc.mjs +23 -0
- package/msg/olo.js +23 -0
- package/msg/olo.mjs +23 -0
- package/msg/pa.js +23 -0
- package/msg/pa.mjs +23 -0
- package/msg/pl.js +23 -0
- package/msg/pl.mjs +23 -0
- package/msg/pms.js +23 -0
- package/msg/pms.mjs +23 -0
- package/msg/ps.js +39 -16
- package/msg/ps.mjs +23 -0
- package/msg/pt-br.js +23 -0
- package/msg/pt-br.mjs +23 -0
- package/msg/pt.js +23 -0
- package/msg/pt.mjs +23 -0
- package/msg/ro.js +31 -8
- package/msg/ro.mjs +23 -0
- package/msg/ru.js +23 -0
- package/msg/ru.mjs +23 -0
- package/msg/sc.js +23 -0
- package/msg/sc.mjs +23 -0
- package/msg/sco.js +23 -0
- package/msg/sco.mjs +23 -0
- package/msg/sd.js +23 -0
- package/msg/sd.mjs +23 -0
- package/msg/shn.js +23 -0
- package/msg/shn.mjs +23 -0
- package/msg/si.js +23 -0
- package/msg/si.mjs +23 -0
- package/msg/sk.js +23 -0
- package/msg/sk.mjs +23 -0
- package/msg/skr-arab.js +23 -0
- package/msg/skr-arab.mjs +23 -0
- package/msg/sl.js +23 -0
- package/msg/sl.mjs +23 -0
- package/msg/smn.js +23 -0
- package/msg/smn.mjs +23 -0
- package/msg/sq.js +23 -0
- package/msg/sq.mjs +23 -0
- package/msg/sr-latn.js +23 -0
- package/msg/sr-latn.mjs +23 -0
- package/msg/sr.js +23 -0
- package/msg/sr.mjs +23 -0
- package/msg/sv.js +23 -0
- package/msg/sv.mjs +23 -0
- package/msg/sw.js +23 -0
- package/msg/sw.mjs +23 -0
- package/msg/ta.js +23 -0
- package/msg/ta.mjs +23 -0
- package/msg/tcy.js +24 -1
- package/msg/tcy.mjs +23 -0
- package/msg/tdd.js +23 -0
- package/msg/tdd.mjs +23 -0
- package/msg/te.js +23 -0
- package/msg/te.mjs +23 -0
- package/msg/th.js +23 -0
- package/msg/th.mjs +23 -0
- package/msg/ti.js +23 -0
- package/msg/ti.mjs +23 -0
- package/msg/tl.js +23 -0
- package/msg/tl.mjs +23 -0
- package/msg/tlh.js +23 -0
- package/msg/tlh.mjs +23 -0
- package/msg/tr.js +23 -0
- package/msg/tr.mjs +23 -0
- package/msg/ug-arab.js +23 -0
- package/msg/ug-arab.mjs +23 -0
- package/msg/uk.js +23 -0
- package/msg/uk.mjs +23 -0
- package/msg/ur.js +23 -0
- package/msg/ur.mjs +23 -0
- package/msg/uz.js +42 -19
- package/msg/uz.mjs +23 -0
- package/msg/vi.js +24 -1
- package/msg/vi.mjs +23 -0
- package/msg/xmf.js +23 -0
- package/msg/xmf.mjs +23 -0
- package/msg/yo.js +23 -0
- package/msg/yo.mjs +23 -0
- package/msg/zgh.js +23 -0
- package/msg/zgh.mjs +23 -0
- package/msg/zh-hans.js +23 -0
- package/msg/zh-hans.mjs +23 -0
- package/msg/zh-hant.js +59 -36
- package/msg/zh-hant.mjs +23 -0
- package/package.json +30 -27
- package/php_compressed.js +16 -16
- package/python_compressed.js +40 -40
- package/python_compressed.js.map +1 -1
package/core/block.d.ts
CHANGED
|
@@ -9,12 +9,12 @@ import type { Abstract } from './events/events_abstract.js';
|
|
|
9
9
|
import type { Field } from './field.js';
|
|
10
10
|
import { IconType } from './icons/icon_types.js';
|
|
11
11
|
import type { MutatorIcon } from './icons/mutator_icon.js';
|
|
12
|
-
import { Input } from './inputs/input.js';
|
|
12
|
+
import type { Input } from './inputs/input.js';
|
|
13
13
|
import { type IIcon } from './interfaces/i_icon.js';
|
|
14
14
|
import type { IVariableModel, IVariableState } from './interfaces/i_variable_model.js';
|
|
15
15
|
import * as Tooltip from './tooltip.js';
|
|
16
16
|
import { Coordinate } from './utils/coordinate.js';
|
|
17
|
-
import { Size } from './utils/size.js';
|
|
17
|
+
import type { Size } from './utils/size.js';
|
|
18
18
|
import type { Workspace } from './workspace.js';
|
|
19
19
|
/**
|
|
20
20
|
* Class for one block.
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import type { BlockSvg } from './block_svg.js';
|
|
7
7
|
import type { Input } from './inputs/input.js';
|
|
8
|
-
import { RenderedConnection } from './rendered_connection.js';
|
|
8
|
+
import type { RenderedConnection } from './rendered_connection.js';
|
|
9
9
|
import { Verbosity } from './utils/aria.js';
|
|
10
10
|
/**
|
|
11
11
|
* Prepositions to use when describing the relationship between two blocks based
|
package/core/block_svg.d.ts
CHANGED
|
@@ -9,28 +9,28 @@
|
|
|
9
9
|
* @class
|
|
10
10
|
*/
|
|
11
11
|
import { Block } from './block.js';
|
|
12
|
-
import { BlockCopyData } from './clipboard/block_paster.js';
|
|
12
|
+
import type { BlockCopyData } from './clipboard/block_paster.js';
|
|
13
13
|
import type { Connection } from './connection.js';
|
|
14
14
|
import { ConnectionType } from './connection_type.js';
|
|
15
|
-
import { ContextMenuOption, LegacyContextMenuOption } from './contextmenu_registry.js';
|
|
16
|
-
import { IconType } from './icons/icon_types.js';
|
|
15
|
+
import type { ContextMenuOption, LegacyContextMenuOption } from './contextmenu_registry.js';
|
|
16
|
+
import type { IconType } from './icons/icon_types.js';
|
|
17
17
|
import { MutatorIcon } from './icons/mutator_icon.js';
|
|
18
18
|
import type { Input } from './inputs/input.js';
|
|
19
19
|
import type { IBoundedElement } from './interfaces/i_bounded_element.js';
|
|
20
|
-
import { IContextMenu } from './interfaces/i_contextmenu.js';
|
|
20
|
+
import type { IContextMenu } from './interfaces/i_contextmenu.js';
|
|
21
21
|
import type { ICopyable } from './interfaces/i_copyable.js';
|
|
22
|
-
import { IDeletable } from './interfaces/i_deletable.js';
|
|
22
|
+
import type { IDeletable } from './interfaces/i_deletable.js';
|
|
23
23
|
import type { DragDisposition, IDragStrategy, IDraggable } from './interfaces/i_draggable.js';
|
|
24
24
|
import type { IFocusableNode } from './interfaces/i_focusable_node.js';
|
|
25
25
|
import type { IFocusableTree } from './interfaces/i_focusable_tree.js';
|
|
26
|
-
import { IIcon } from './interfaces/i_icon.js';
|
|
26
|
+
import type { IIcon } from './interfaces/i_icon.js';
|
|
27
27
|
import { RenderedConnection } from './rendered_connection.js';
|
|
28
28
|
import type { IPathObject } from './renderers/common/i_path_object.js';
|
|
29
29
|
import type { BlockStyle } from './theme.js';
|
|
30
30
|
import * as aria from './utils/aria.js';
|
|
31
31
|
import { Coordinate } from './utils/coordinate.js';
|
|
32
32
|
import { Rect } from './utils/rect.js';
|
|
33
|
-
import { FlyoutItemInfo } from './utils/toolbox.js';
|
|
33
|
+
import type { FlyoutItemInfo } from './utils/toolbox.js';
|
|
34
34
|
import type { Workspace } from './workspace.js';
|
|
35
35
|
import type { WorkspaceSvg } from './workspace_svg.js';
|
|
36
36
|
/**
|
|
@@ -544,7 +544,6 @@ export declare class BlockSvg extends Block implements IBoundedElement, IContext
|
|
|
544
544
|
* @param refIndex Index of input that should be after the moved input.
|
|
545
545
|
*/
|
|
546
546
|
moveNumberedInputBefore(inputIndex: number, refIndex: number): void;
|
|
547
|
-
/** @override */
|
|
548
547
|
appendInput(input: Input): Input;
|
|
549
548
|
/**
|
|
550
549
|
* Sets whether this block's connections are tracked in the database or not.
|
package/core/bubbles/bubble.d.ts
CHANGED
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
* Copyright 2023 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { IBoundedElement } from '../interfaces/i_bounded_element.js';
|
|
7
|
-
import { IBubble } from '../interfaces/i_bubble.js';
|
|
6
|
+
import type { IBoundedElement } from '../interfaces/i_bounded_element.js';
|
|
7
|
+
import type { IBubble } from '../interfaces/i_bubble.js';
|
|
8
8
|
import type { IFocusableNode } from '../interfaces/i_focusable_node.js';
|
|
9
9
|
import type { IFocusableTree } from '../interfaces/i_focusable_tree.js';
|
|
10
10
|
import type { IHasBubble } from '../interfaces/i_has_bubble.js';
|
|
11
|
-
import { ISelectable } from '../interfaces/i_selectable.js';
|
|
11
|
+
import type { ISelectable } from '../interfaces/i_selectable.js';
|
|
12
12
|
import { Coordinate } from '../utils/coordinate.js';
|
|
13
13
|
import { Rect } from '../utils/rect.js';
|
|
14
14
|
import { Size } from '../utils/size.js';
|
|
15
|
-
import { WorkspaceSvg } from '../workspace_svg.js';
|
|
15
|
+
import type { WorkspaceSvg } from '../workspace_svg.js';
|
|
16
16
|
/**
|
|
17
17
|
* Represents a either a string or a function that, when called, can provide a
|
|
18
18
|
* custom ARIA string to represent a bubble, or null if the default fallback
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import type { BlocklyOptions } from '../blockly_options.js';
|
|
7
|
-
import { Abstract as AbstractEvent } from '../events/events_abstract.js';
|
|
7
|
+
import type { Abstract as AbstractEvent } from '../events/events_abstract.js';
|
|
8
8
|
import type { IFocusableNode } from '../interfaces/i_focusable_node.js';
|
|
9
9
|
import type { IHasBubble } from '../interfaces/i_has_bubble.js';
|
|
10
10
|
import { Options } from '../options.js';
|
|
11
|
-
import { Coordinate } from '../utils/coordinate.js';
|
|
11
|
+
import type { Coordinate } from '../utils/coordinate.js';
|
|
12
12
|
import type { Rect } from '../utils/rect.js';
|
|
13
13
|
import type { WorkspaceSvg } from '../workspace_svg.js';
|
|
14
14
|
import { Bubble } from './bubble.js';
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import type { IFocusableNode } from '../interfaces/i_focusable_node.js';
|
|
7
7
|
import type { IHasBubble } from '../interfaces/i_has_bubble.js';
|
|
8
|
-
import { Coordinate } from '../utils/coordinate.js';
|
|
9
|
-
import { Rect } from '../utils/rect.js';
|
|
10
|
-
import { WorkspaceSvg } from '../workspace_svg.js';
|
|
8
|
+
import type { Coordinate } from '../utils/coordinate.js';
|
|
9
|
+
import type { Rect } from '../utils/rect.js';
|
|
10
|
+
import type { WorkspaceSvg } from '../workspace_svg.js';
|
|
11
11
|
import { Bubble } from './bubble.js';
|
|
12
12
|
/**
|
|
13
13
|
* A bubble that displays non-editable text. Used by the warning icon.
|
|
@@ -9,7 +9,7 @@ import type { IHasBubble } from '../interfaces/i_has_bubble.js';
|
|
|
9
9
|
import { Coordinate } from '../utils/coordinate.js';
|
|
10
10
|
import { Rect } from '../utils/rect.js';
|
|
11
11
|
import { Size } from '../utils/size.js';
|
|
12
|
-
import { WorkspaceSvg } from '../workspace_svg.js';
|
|
12
|
+
import type { WorkspaceSvg } from '../workspace_svg.js';
|
|
13
13
|
import { Bubble } from './bubble.js';
|
|
14
14
|
/**
|
|
15
15
|
* A bubble that displays editable text. It can also be resized by the user.
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
* Copyright 2023 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { BlockSvg } from '../block_svg.js';
|
|
7
|
-
import { ICopyData } from '../interfaces/i_copyable.js';
|
|
8
|
-
import { IPaster } from '../interfaces/i_paster.js';
|
|
9
|
-
import { State } from '../serialization/blocks.js';
|
|
6
|
+
import type { BlockSvg } from '../block_svg.js';
|
|
7
|
+
import type { ICopyData } from '../interfaces/i_copyable.js';
|
|
8
|
+
import type { IPaster } from '../interfaces/i_paster.js';
|
|
9
|
+
import type { State } from '../serialization/blocks.js';
|
|
10
10
|
import { Coordinate } from '../utils/coordinate.js';
|
|
11
|
-
import { WorkspaceSvg } from '../workspace_svg.js';
|
|
11
|
+
import type { WorkspaceSvg } from '../workspace_svg.js';
|
|
12
12
|
export declare class BlockPaster implements IPaster<BlockCopyData, BlockSvg> {
|
|
13
13
|
static TYPE: string;
|
|
14
14
|
paste(copyData: BlockCopyData, workspace: WorkspaceSvg, coordinate?: Coordinate): BlockSvg | null;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2023 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { ICopyable, ICopyData } from '../interfaces/i_copyable.js';
|
|
6
|
+
import type { ICopyable, ICopyData } from '../interfaces/i_copyable.js';
|
|
7
7
|
import type { IPaster } from '../interfaces/i_paster.js';
|
|
8
8
|
/**
|
|
9
9
|
* Registers the given paster so that it cna be used for pasting.
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
* Copyright 2023 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { RenderedWorkspaceComment } from '../comments/rendered_workspace_comment.js';
|
|
7
|
-
import { ICopyData } from '../interfaces/i_copyable.js';
|
|
8
|
-
import { IPaster } from '../interfaces/i_paster.js';
|
|
6
|
+
import type { RenderedWorkspaceComment } from '../comments/rendered_workspace_comment.js';
|
|
7
|
+
import type { ICopyData } from '../interfaces/i_copyable.js';
|
|
8
|
+
import type { IPaster } from '../interfaces/i_paster.js';
|
|
9
9
|
import * as commentSerialiation from '../serialization/workspace_comments.js';
|
|
10
10
|
import { Coordinate } from '../utils/coordinate.js';
|
|
11
|
-
import { WorkspaceSvg } from '../workspace_svg.js';
|
|
11
|
+
import type { WorkspaceSvg } from '../workspace_svg.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
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { BlockCopyData, BlockPaster } from './clipboard/block_paster.js';
|
|
7
7
|
import * as registry from './clipboard/registry.js';
|
|
8
8
|
import type { ICopyData, ICopyable } from './interfaces/i_copyable.js';
|
|
9
|
-
import { Coordinate } from './utils/coordinate.js';
|
|
9
|
+
import type { Coordinate } from './utils/coordinate.js';
|
|
10
10
|
import { WorkspaceSvg } from './workspace_svg.js';
|
|
11
11
|
/**
|
|
12
12
|
* Copy a copyable item, and record its data and the workspace it was
|
|
@@ -14,10 +14,6 @@ export declare const COMMENT_COLLAPSE_BAR_BUTTON_FOCUS_IDENTIFIER = "_collapse_b
|
|
|
14
14
|
* Button that toggles the collapsed state of a comment.
|
|
15
15
|
*/
|
|
16
16
|
export declare class CollapseCommentBarButton extends CommentBarButton {
|
|
17
|
-
protected readonly id: string;
|
|
18
|
-
protected readonly workspace: WorkspaceSvg;
|
|
19
|
-
protected readonly container: SVGGElement;
|
|
20
|
-
protected readonly commentView: CommentView;
|
|
21
17
|
/**
|
|
22
18
|
* Opaque ID used to unbind event handlers during disposal.
|
|
23
19
|
*/
|
|
@@ -11,7 +11,7 @@ import type { CommentView } from './comment_view.js';
|
|
|
11
11
|
* Button displayed on a comment's top bar.
|
|
12
12
|
*/
|
|
13
13
|
export declare abstract class CommentBarButton implements IFocusableNode {
|
|
14
|
-
|
|
14
|
+
readonly id: string;
|
|
15
15
|
protected readonly workspace: WorkspaceSvg;
|
|
16
16
|
protected readonly container: SVGGElement;
|
|
17
17
|
protected readonly commentView: CommentView;
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
* Copyright 2024 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { BlockSvg } from '../block_svg.js';
|
|
7
|
-
import { IFocusableNode } from '../interfaces/i_focusable_node.js';
|
|
8
|
-
import { IFocusableTree } from '../interfaces/i_focusable_tree.js';
|
|
9
|
-
import { Size } from '../utils/size.js';
|
|
10
|
-
import { WorkspaceSvg } from '../workspace_svg.js';
|
|
11
|
-
import { RenderedWorkspaceComment } from './rendered_workspace_comment.js';
|
|
6
|
+
import type { BlockSvg } from '../block_svg.js';
|
|
7
|
+
import type { IFocusableNode } from '../interfaces/i_focusable_node.js';
|
|
8
|
+
import type { IFocusableTree } from '../interfaces/i_focusable_tree.js';
|
|
9
|
+
import type { Size } from '../utils/size.js';
|
|
10
|
+
import type { WorkspaceSvg } from '../workspace_svg.js';
|
|
11
|
+
import type { RenderedWorkspaceComment } from './rendered_workspace_comment.js';
|
|
12
12
|
/**
|
|
13
13
|
* String added to the ID of a workspace comment to identify
|
|
14
14
|
* the focusable node for the comment editor.
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
* Copyright 2024 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { IRenderedElement } from '../interfaces/i_rendered_element.js';
|
|
6
|
+
import type { IRenderedElement } from '../interfaces/i_rendered_element.js';
|
|
7
7
|
import { Coordinate } from '../utils/coordinate.js';
|
|
8
8
|
import { Size } from '../utils/size.js';
|
|
9
|
-
import { WorkspaceSvg } from '../workspace_svg.js';
|
|
10
|
-
import { CommentBarButton } from './comment_bar_button.js';
|
|
9
|
+
import type { WorkspaceSvg } from '../workspace_svg.js';
|
|
10
|
+
import type { CommentBarButton } from './comment_bar_button.js';
|
|
11
11
|
import { CommentEditor } from './comment_editor.js';
|
|
12
12
|
export declare class CommentView implements IRenderedElement {
|
|
13
13
|
readonly workspace: WorkspaceSvg;
|
|
@@ -14,10 +14,6 @@ export declare const COMMENT_DELETE_BAR_BUTTON_FOCUS_IDENTIFIER = "_delete_bar_b
|
|
|
14
14
|
* Button that deletes a comment.
|
|
15
15
|
*/
|
|
16
16
|
export declare class DeleteCommentBarButton extends CommentBarButton {
|
|
17
|
-
protected readonly id: string;
|
|
18
|
-
protected readonly workspace: WorkspaceSvg;
|
|
19
|
-
protected readonly container: SVGGElement;
|
|
20
|
-
protected readonly commentView: CommentView;
|
|
21
17
|
/**
|
|
22
18
|
* Opaque ID used to unbind event handlers during disposal.
|
|
23
19
|
*/
|
|
@@ -3,20 +3,20 @@
|
|
|
3
3
|
* Copyright 2024 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { WorkspaceCommentCopyData } from '../clipboard/workspace_comment_paster.js';
|
|
7
|
-
import { IBoundedElement } from '../interfaces/i_bounded_element.js';
|
|
8
|
-
import { IContextMenu } from '../interfaces/i_contextmenu.js';
|
|
9
|
-
import { ICopyable } from '../interfaces/i_copyable.js';
|
|
10
|
-
import { IDeletable } from '../interfaces/i_deletable.js';
|
|
11
|
-
import { IDraggable } from '../interfaces/i_draggable.js';
|
|
12
|
-
import { IFocusableNode } from '../interfaces/i_focusable_node.js';
|
|
6
|
+
import type { WorkspaceCommentCopyData } from '../clipboard/workspace_comment_paster.js';
|
|
7
|
+
import type { IBoundedElement } from '../interfaces/i_bounded_element.js';
|
|
8
|
+
import type { IContextMenu } from '../interfaces/i_contextmenu.js';
|
|
9
|
+
import type { ICopyable } from '../interfaces/i_copyable.js';
|
|
10
|
+
import type { IDeletable } from '../interfaces/i_deletable.js';
|
|
11
|
+
import type { IDraggable } from '../interfaces/i_draggable.js';
|
|
12
|
+
import type { IFocusableNode } from '../interfaces/i_focusable_node.js';
|
|
13
13
|
import type { IFocusableTree } from '../interfaces/i_focusable_tree.js';
|
|
14
|
-
import { IRenderedElement } from '../interfaces/i_rendered_element.js';
|
|
15
|
-
import { ISelectable } from '../interfaces/i_selectable.js';
|
|
14
|
+
import type { IRenderedElement } from '../interfaces/i_rendered_element.js';
|
|
15
|
+
import type { ISelectable } from '../interfaces/i_selectable.js';
|
|
16
16
|
import { Coordinate } from '../utils/coordinate.js';
|
|
17
17
|
import { Rect } from '../utils/rect.js';
|
|
18
|
-
import { Size } from '../utils/size.js';
|
|
19
|
-
import { WorkspaceSvg } from '../workspace_svg.js';
|
|
18
|
+
import type { Size } from '../utils/size.js';
|
|
19
|
+
import type { WorkspaceSvg } from '../workspace_svg.js';
|
|
20
20
|
import { CommentView } from './comment_view.js';
|
|
21
21
|
import { WorkspaceComment } from './workspace_comment.js';
|
|
22
22
|
export declare class RenderedWorkspaceComment extends WorkspaceComment implements IBoundedElement, IRenderedElement, IDraggable, ISelectable, IDeletable, ICopyable<WorkspaceCommentCopyData>, IContextMenu, IFocusableNode {
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { Coordinate } from '../utils/coordinate.js';
|
|
7
|
-
import { Size } from '../utils/size.js';
|
|
8
|
-
import { Workspace } from '../workspace.js';
|
|
7
|
+
import type { Size } from '../utils/size.js';
|
|
8
|
+
import type { Workspace } from '../workspace.js';
|
|
9
9
|
export declare class WorkspaceComment {
|
|
10
10
|
readonly workspace: Workspace;
|
|
11
11
|
/** The unique identifier for this comment. */
|
package/core/common.d.ts
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import type { Block } from './block.js';
|
|
7
|
-
import { BlockDefinition } from './blocks.js';
|
|
7
|
+
import type { BlockDefinition } from './blocks.js';
|
|
8
8
|
import type { Connection } from './connection.js';
|
|
9
|
-
import { ISelectable } from './interfaces/i_selectable.js';
|
|
9
|
+
import type { ISelectable } from './interfaces/i_selectable.js';
|
|
10
10
|
import type { Workspace } from './workspace.js';
|
|
11
11
|
import type { WorkspaceSvg } from './workspace_svg.js';
|
|
12
12
|
/**
|
package/core/config.d.ts
CHANGED
|
@@ -4,21 +4,47 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
8
|
-
*
|
|
7
|
+
* Object holding all the values on Blockly that we expect developers to be
|
|
8
|
+
* able to change.
|
|
9
9
|
*/
|
|
10
|
-
|
|
10
|
+
export declare const config: {
|
|
11
|
+
/**
|
|
12
|
+
* Number of pixels the mouse must move before a drag starts.
|
|
13
|
+
*
|
|
14
|
+
*/
|
|
11
15
|
dragRadius: number;
|
|
16
|
+
/**
|
|
17
|
+
* Number of pixels the mouse must move before a drag/scroll starts from the
|
|
18
|
+
* flyout. Because the drag-intention is determined when this is reached, it
|
|
19
|
+
* is larger than dragRadius so that the drag-direction is clearer.
|
|
20
|
+
*
|
|
21
|
+
*/
|
|
12
22
|
flyoutDragRadius: number;
|
|
23
|
+
/**
|
|
24
|
+
* Maximum misalignment between connections for them to snap together.
|
|
25
|
+
* Default is 28.
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
13
28
|
snapRadius: number;
|
|
29
|
+
/**
|
|
30
|
+
* Maximum misalignment between connections for them to snap together.
|
|
31
|
+
* This should be the same as the snap radius.
|
|
32
|
+
* Default is 28.
|
|
33
|
+
*
|
|
34
|
+
*/
|
|
35
|
+
connectingSnapRadius: number;
|
|
36
|
+
/**
|
|
37
|
+
* How much to prefer staying connected to the current connection over moving
|
|
38
|
+
* to a new connection. The current previewed connection is considered to be
|
|
39
|
+
* this much closer to the matching connection on the block than it actually
|
|
40
|
+
* is.
|
|
41
|
+
*
|
|
42
|
+
*/
|
|
14
43
|
currentConnectionPreference: number;
|
|
44
|
+
/**
|
|
45
|
+
* Delay in ms between trigger and bumping unconnected block out of alignment.
|
|
46
|
+
*
|
|
47
|
+
*/
|
|
15
48
|
bumpDelay: number;
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Object holding all the values on Blockly that we expect developers to be
|
|
20
|
-
* able to change.
|
|
21
|
-
*/
|
|
22
|
-
export declare const config: Config;
|
|
23
|
-
export {};
|
|
49
|
+
};
|
|
24
50
|
//# sourceMappingURL=config.d.ts.map
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
* @class
|
|
10
10
|
*/
|
|
11
11
|
import type { BlockSvg } from './block_svg.js';
|
|
12
|
-
import { RenderedWorkspaceComment } from './comments/rendered_workspace_comment.js';
|
|
12
|
+
import type { RenderedWorkspaceComment } from './comments/rendered_workspace_comment.js';
|
|
13
13
|
import type { IFocusableNode } from './interfaces/i_focusable_node.js';
|
|
14
|
-
import { Coordinate } from './utils/coordinate.js';
|
|
14
|
+
import type { Coordinate } from './utils/coordinate.js';
|
|
15
15
|
import type { WorkspaceSvg } from './workspace_svg.js';
|
|
16
16
|
/**
|
|
17
17
|
* Class for the registry of context menu items. This is intended to be a
|
|
@@ -4,10 +4,12 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import type { BlockSvg } from '../block_svg.js';
|
|
7
|
+
import type { IConnectionPreviewer } from '../interfaces/i_connection_previewer.js';
|
|
7
8
|
import type { IDragStrategy } from '../interfaces/i_draggable.js';
|
|
8
9
|
import { DragDisposition } from '../interfaces/i_draggable.js';
|
|
9
10
|
import type { RenderedConnection } from '../rendered_connection.js';
|
|
10
11
|
import { Coordinate } from '../utils.js';
|
|
12
|
+
import type { WorkspaceSvg } from '../workspace_svg.js';
|
|
11
13
|
/** Represents a valid pair of connections between the dragging block and a block on the workspace. */
|
|
12
14
|
interface ConnectionPair {
|
|
13
15
|
/** A connection on the dragging stack that is compatible with neighbour. */
|
|
@@ -20,9 +22,18 @@ interface ConnectionCandidate extends ConnectionPair {
|
|
|
20
22
|
/** The distance between the local connection and the neighbour connection. */
|
|
21
23
|
distance: number;
|
|
22
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* Represents a block movement paradigm; constrained moves only to valid
|
|
27
|
+
* connections, while unconstrained allows free movement to anywhere on the
|
|
28
|
+
* workspace.
|
|
29
|
+
*/
|
|
30
|
+
declare enum MoveMode {
|
|
31
|
+
CONSTRAINED = 1,
|
|
32
|
+
UNCONSTRAINED = 2
|
|
33
|
+
}
|
|
23
34
|
export declare class BlockDragStrategy implements IDragStrategy {
|
|
24
|
-
|
|
25
|
-
|
|
35
|
+
protected block: BlockSvg;
|
|
36
|
+
protected workspace: WorkspaceSvg;
|
|
26
37
|
/** The parent block at the start of the drag. */
|
|
27
38
|
private startParentConn;
|
|
28
39
|
/**
|
|
@@ -30,16 +41,23 @@ export declare class BlockDragStrategy implements IDragStrategy {
|
|
|
30
41
|
* `healStack` is true.
|
|
31
42
|
*/
|
|
32
43
|
private startChildConn;
|
|
33
|
-
|
|
44
|
+
protected startLoc: Coordinate | null;
|
|
34
45
|
private connectionCandidate;
|
|
35
|
-
|
|
46
|
+
protected connectionPreviewer: IConnectionPreviewer | null;
|
|
36
47
|
private dragging;
|
|
37
48
|
/** List of all connections available on the workspace. */
|
|
38
49
|
private allConnectionPairs;
|
|
39
50
|
/** The current movement mode. */
|
|
40
|
-
|
|
51
|
+
protected moveMode: MoveMode;
|
|
41
52
|
/** Used to persist an event group when snapping is done async. */
|
|
42
53
|
private originalEventGroup;
|
|
54
|
+
/**
|
|
55
|
+
* Half of the connection of the last announced candidate, or null if that
|
|
56
|
+
* announcement was for the workspace. Undefined if nothing has been
|
|
57
|
+
* announced yet this drag.
|
|
58
|
+
*/
|
|
59
|
+
private lastAnnouncedLocal;
|
|
60
|
+
private lastAnnouncedNeighbour;
|
|
43
61
|
/**
|
|
44
62
|
* Map from block IDs to reason(s) why it was disabled, used to restore
|
|
45
63
|
* disabled state post-drag.
|
|
@@ -59,7 +77,7 @@ export declare class BlockDragStrategy implements IDragStrategy {
|
|
|
59
77
|
* @param oldBlock The flyout block that was cloned.
|
|
60
78
|
* @param newBlock The new block to position.
|
|
61
79
|
*/
|
|
62
|
-
|
|
80
|
+
protected positionNewBlock(oldBlock: BlockSvg, newBlock: BlockSvg): void;
|
|
63
81
|
/**
|
|
64
82
|
* Returns the block to use for the current drag operation. This may create
|
|
65
83
|
* and return a newly instantiated block when e.g. dragging from a flyout.
|
|
@@ -116,7 +134,7 @@ export declare class BlockDragStrategy implements IDragStrategy {
|
|
|
116
134
|
* @param healStack Whether or not to heal the stack after disconnecting.
|
|
117
135
|
* @returns True to disconnect the block, false otherwise.
|
|
118
136
|
*/
|
|
119
|
-
|
|
137
|
+
protected shouldDisconnect(healStack: boolean): boolean;
|
|
120
138
|
/**
|
|
121
139
|
* Disconnects the block from any parents. If `healStack` is true and this is
|
|
122
140
|
* a stack block, we also disconnect from any next blocks and attempt to
|
|
@@ -12,6 +12,7 @@ export declare class Dragger implements IDragger {
|
|
|
12
12
|
protected draggable: IDraggable;
|
|
13
13
|
protected startLoc: Coordinate;
|
|
14
14
|
protected dragTarget: IDragTarget | null;
|
|
15
|
+
protected revertShouldDelete: boolean;
|
|
15
16
|
constructor(draggable: IDraggable);
|
|
16
17
|
/** Handles any drag startup. */
|
|
17
18
|
onDragStart(e?: PointerEvent | KeyboardEvent): IDraggable;
|
|
@@ -37,7 +38,7 @@ export declare class Dragger implements IDragger {
|
|
|
37
38
|
/** Handles any drag cleanup. */
|
|
38
39
|
onDragEnd(e?: PointerEvent | KeyboardEvent): void;
|
|
39
40
|
/** Handles a drag being reverted. */
|
|
40
|
-
onDragRevert(): void;
|
|
41
|
+
onDragRevert(e?: PointerEvent | KeyboardEvent): void;
|
|
41
42
|
/**
|
|
42
43
|
* Returns true if we should return the draggable to its original location
|
|
43
44
|
* at the end of the drag.
|
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import type { Block } from '../block.js';
|
|
12
12
|
import type { Workspace } from '../workspace.js';
|
|
13
|
-
import {
|
|
13
|
+
import type { AbstractEventJson } from './events_abstract.js';
|
|
14
|
+
import { Abstract as AbstractEvent } from './events_abstract.js';
|
|
14
15
|
/**
|
|
15
16
|
* Abstract class for any event related to blocks.
|
|
16
17
|
*/
|
|
@@ -10,8 +10,9 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import type { Block } from '../block.js';
|
|
12
12
|
import type { BlockSvg } from '../block_svg.js';
|
|
13
|
-
import { Workspace } from '../workspace.js';
|
|
14
|
-
import {
|
|
13
|
+
import type { Workspace } from '../workspace.js';
|
|
14
|
+
import type { BlockBaseJson } from './events_block_base.js';
|
|
15
|
+
import { BlockBase } from './events_block_base.js';
|
|
15
16
|
import { EventType } from './type.js';
|
|
16
17
|
/**
|
|
17
18
|
* Notifies listeners when some element of a block has changed (e.g.
|
|
@@ -10,8 +10,9 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import type { Block } from '../block.js';
|
|
12
12
|
import * as blocks from '../serialization/blocks.js';
|
|
13
|
-
import { Workspace } from '../workspace.js';
|
|
14
|
-
import {
|
|
13
|
+
import type { Workspace } from '../workspace.js';
|
|
14
|
+
import type { BlockBaseJson } from './events_block_base.js';
|
|
15
|
+
import { BlockBase } from './events_block_base.js';
|
|
15
16
|
import { EventType } from './type.js';
|
|
16
17
|
/**
|
|
17
18
|
* Notifies listeners when a block (or connected stack of blocks) is
|
|
@@ -10,8 +10,9 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import type { Block } from '../block.js';
|
|
12
12
|
import * as blocks from '../serialization/blocks.js';
|
|
13
|
-
import { Workspace } from '../workspace.js';
|
|
14
|
-
import {
|
|
13
|
+
import type { Workspace } from '../workspace.js';
|
|
14
|
+
import type { BlockBaseJson } from './events_block_base.js';
|
|
15
|
+
import { BlockBase } from './events_block_base.js';
|
|
15
16
|
import { EventType } from './type.js';
|
|
16
17
|
/**
|
|
17
18
|
* Notifies listeners when a block (or connected stack of blocks) is
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
* @class
|
|
10
10
|
*/
|
|
11
11
|
import type { Block } from '../block.js';
|
|
12
|
-
import { Workspace } from '../workspace.js';
|
|
13
|
-
import { AbstractEventJson } from './events_abstract.js';
|
|
12
|
+
import type { Workspace } from '../workspace.js';
|
|
13
|
+
import type { AbstractEventJson } from './events_abstract.js';
|
|
14
14
|
import { UiBase } from './events_ui_base.js';
|
|
15
15
|
import { EventType } from './type.js';
|
|
16
16
|
/**
|
|
@@ -10,8 +10,9 @@
|
|
|
10
10
|
* @class
|
|
11
11
|
*/
|
|
12
12
|
import type { Block } from '../block.js';
|
|
13
|
-
import { Workspace } from '../workspace.js';
|
|
14
|
-
import {
|
|
13
|
+
import type { Workspace } from '../workspace.js';
|
|
14
|
+
import type { BlockBaseJson } from './events_block_base.js';
|
|
15
|
+
import { BlockBase } from './events_block_base.js';
|
|
15
16
|
import { EventType } from './type.js';
|
|
16
17
|
/**
|
|
17
18
|
* Notifies listeners when the value of a block's field has changed but the
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
import type { Block } from '../block.js';
|
|
12
12
|
import { Coordinate } from '../utils/coordinate.js';
|
|
13
13
|
import type { Workspace } from '../workspace.js';
|
|
14
|
-
import {
|
|
14
|
+
import type { BlockBaseJson } from './events_block_base.js';
|
|
15
|
+
import { BlockBase } from './events_block_base.js';
|
|
15
16
|
import { EventType } from './type.js';
|
|
16
17
|
/**
|
|
17
18
|
* Notifies listeners when a block is moved. This could be from one
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
* @class
|
|
10
10
|
*/
|
|
11
11
|
import type { Block } from '../block.js';
|
|
12
|
-
import { Workspace } from '../workspace.js';
|
|
13
|
-
import { AbstractEventJson } from './events_abstract.js';
|
|
12
|
+
import type { Workspace } from '../workspace.js';
|
|
13
|
+
import type { AbstractEventJson } from './events_abstract.js';
|
|
14
14
|
import { UiBase } from './events_ui_base.js';
|
|
15
15
|
import { EventType } from './type.js';
|
|
16
16
|
/**
|
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import type { WorkspaceComment } from '../comments/workspace_comment.js';
|
|
12
12
|
import type { Workspace } from '../workspace.js';
|
|
13
|
-
import {
|
|
13
|
+
import type { AbstractEventJson } from './events_abstract.js';
|
|
14
|
+
import { Abstract as AbstractEvent } from './events_abstract.js';
|
|
14
15
|
import type { CommentCreate } from './events_comment_create.js';
|
|
15
16
|
import type { CommentDelete } from './events_comment_delete.js';
|
|
16
17
|
/**
|
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import type { WorkspaceComment } from '../comments/workspace_comment.js';
|
|
12
12
|
import type { Workspace } from '../workspace.js';
|
|
13
|
-
import {
|
|
13
|
+
import type { CommentBaseJson } from './events_comment_base.js';
|
|
14
|
+
import { CommentBase } from './events_comment_base.js';
|
|
14
15
|
import { EventType } from './type.js';
|
|
15
16
|
/**
|
|
16
17
|
* Notifies listeners that the contents of a workspace comment has changed.
|
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
* Copyright 2024 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { WorkspaceComment } from '../comments/workspace_comment.js';
|
|
6
|
+
import type { WorkspaceComment } from '../comments/workspace_comment.js';
|
|
7
7
|
import type { Workspace } from '../workspace.js';
|
|
8
|
-
import {
|
|
8
|
+
import type { CommentBaseJson } from './events_comment_base.js';
|
|
9
|
+
import { CommentBase } from './events_comment_base.js';
|
|
9
10
|
import { EventType } from './type.js';
|
|
10
11
|
export declare class CommentCollapse extends CommentBase {
|
|
11
12
|
newCollapsed?: boolean | undefined;
|