blockly 12.0.0-beta.6 → 12.0.0-beta.7

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.
@@ -126,10 +126,12 @@ export declare function showPositionedByField<T>(field: Field<T>, opt_onHide?: (
126
126
  * @param secondaryX Secondary/alternative origin point x, in absolute px.
127
127
  * @param secondaryY Secondary/alternative origin point y, in absolute px.
128
128
  * @param opt_onHide Optional callback for when the drop-down is hidden.
129
+ * @param manageEphemeralFocus Whether ephemeral focus should be managed
130
+ * according to the widget div's lifetime.
129
131
  * @returns True if the menu rendered at the primary origin point.
130
132
  * @internal
131
133
  */
132
- export declare function show<T>(newOwner: Field<T>, rtl: boolean, primaryX: number, primaryY: number, secondaryX: number, secondaryY: number, opt_onHide?: () => void): boolean;
134
+ export declare function show<T>(newOwner: Field<T>, rtl: boolean, primaryX: number, primaryY: number, secondaryX: number, secondaryY: number, manageEphemeralFocus: boolean, opt_onHide?: () => void): boolean;
133
135
  /**
134
136
  * Get the x positions for the left side of the DropDownDiv and the arrow,
135
137
  * accounting for the bounds of the workspace.
@@ -150,8 +150,12 @@ export declare abstract class FieldInput<T extends InputTypes> extends Field<str
150
150
  * undefined if triggered programmatically.
151
151
  * @param quietInput True if editor should be created without focus.
152
152
  * Defaults to false.
153
+ * @param manageEphemeralFocus Whether ephemeral focus should be managed as
154
+ * part of the editor's inline editor (when the inline editor is shown).
155
+ * Callers must manage ephemeral focus themselves if this is false.
156
+ * Defaults to true.
153
157
  */
154
- protected showEditor_(_e?: Event, quietInput?: boolean): void;
158
+ protected showEditor_(_e?: Event, quietInput?: boolean, manageEphemeralFocus?: boolean): void;
155
159
  /**
156
160
  * Create and show a text input editor that is a prompt (usually a popup).
157
161
  * Mobile browsers may have issues with in-line textareas (focus and
@@ -162,6 +166,8 @@ export declare abstract class FieldInput<T extends InputTypes> extends Field<str
162
166
  * Create and show a text input editor that sits directly over the text input.
163
167
  *
164
168
  * @param quietInput True if editor should be created without focus.
169
+ * @param manageEphemeralFocus Whether ephemeral focus should be managed as
170
+ * part of the field's inline editor (widget div).
165
171
  */
166
172
  private showInlineEditor;
167
173
  /**
@@ -31,8 +31,13 @@ export declare function createDom(): void;
31
31
  * @param newDispose Optional cleanup function to be run when the widget is
32
32
  * closed.
33
33
  * @param workspace The workspace associated with the widget owner.
34
+ * @param manageEphemeralFocus Whether ephemeral focus should be managed
35
+ * according to the widget div's lifetime. Note that if a false value is
36
+ * passed in here then callers should manage ephemeral focus directly
37
+ * otherwise focus may not properly restore when the widget closes. Defaults
38
+ * to true.
34
39
  */
35
- export declare function show(newOwner: unknown, rtl: boolean, newDispose: () => void, workspace?: WorkspaceSvg | null): void;
40
+ export declare function show(newOwner: unknown, rtl: boolean, newDispose: () => void, workspace?: WorkspaceSvg | null, manageEphemeralFocus?: boolean): void;
36
41
  /**
37
42
  * Destroy the widget and hide the div.
38
43
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blockly",
3
- "version": "12.0.0-beta.6",
3
+ "version": "12.0.0-beta.7",
4
4
  "description": "Blockly is a library for building visual programming editors.",
5
5
  "keywords": [
6
6
  "blockly"