blockly 10.2.0-beta.0 → 10.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/core/block.d.ts CHANGED
@@ -76,8 +76,14 @@ export declare class Block implements IASTNodeLocation, IDeletable {
76
76
  * An optional serialization method for defining how to serialize the
77
77
  * block's extra state (eg mutation state) to something JSON compatible.
78
78
  * This must be coupled with defining `loadExtraState`.
79
+ *
80
+ * @param doFullSerialization Whether or not to serialize the full state of
81
+ * the extra state (rather than possibly saving a reference to some
82
+ * state). This is used during copy-paste. See the
83
+ * {@link https://developers.devsite.google.com/blockly/guides/create-custom-blocks/extensions#full_serialization_and_backing_data | block serialization docs}
84
+ * for more information.
79
85
  */
80
- saveExtraState?: () => any;
86
+ saveExtraState?: (doFullSerialization?: boolean) => any;
81
87
  /**
82
88
  * An optional serialization method for defining how to deserialize the
83
89
  * block's extra state (eg mutation state) from something JSON compatible.
package/core/field.d.ts CHANGED
@@ -236,6 +236,9 @@ export declare abstract class Field<T = any> implements IASTNodeLocationSvg, IAS
236
236
  * @param _doFullSerialization If true, this signals to the field that if it
237
237
  * normally just saves a reference to some state (eg variable fields) it
238
238
  * should instead serialize the full state of the thing being referenced.
239
+ * See the
240
+ * {@link https://developers.devsite.google.com/blockly/guides/create-custom-blocks/fields/customizing-fields/creating#full_serialization_and_backing_data | field serialization docs}
241
+ * for more information.
239
242
  * @returns JSON serializable state.
240
243
  * @internal
241
244
  */
@@ -559,6 +559,8 @@ export declare class WorkspaceSvg extends Workspace implements IASTNodeLocationS
559
559
  *
560
560
  * @param state The representation of the thing to paste.
561
561
  * @returns The pasted thing, or null if the paste was not successful.
562
+ * @deprecated v10. Use `Blockly.clipboard.paste` instead. To be removed in
563
+ * v11.
562
564
  */
563
565
  paste(state: any | Element | DocumentFragment): ICopyable<ICopyData> | null;
564
566
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blockly",
3
- "version": "10.2.0-beta.0",
3
+ "version": "10.2.0-beta.1",
4
4
  "description": "Blockly is a library for building visual programming editors.",
5
5
  "keywords": [
6
6
  "blockly"
@@ -60,7 +60,7 @@
60
60
  "json5": "^2.2.0",
61
61
  "markdown-tables-to-json": "^0.1.7",
62
62
  "mocha": "^10.0.0",
63
- "patch-package": "^7.0.0",
63
+ "patch-package": "^8.0.0",
64
64
  "prettier": "3.0.0",
65
65
  "readline-sync": "^1.4.10",
66
66
  "rimraf": "^5.0.0",