Commit Graph

9 Commits

Author SHA1 Message Date
Beka Westberg 00fc225d6b fix: touch up some deserialization behavior (#5181)
* Add parameter for recording undo.

This sets up the most common default behavior, but also makes it clear
to people that it is happening, because it might not be expected.

* Add grouping of events

* Add text width caching

* Add disabling workspace resizing

* Add performance optimizations

* Respect nulls from blocks.save

* Cleanup from rebase

* PR Comments

* Cleanup from rebase
2021-09-20 10:32:09 -07:00
Beka Westberg 8032e422c1 feat: add initialization of blocks and event firing (#5166)
* Change playground to use JSO system

* Add tests for initialization and events

* Add initialization of blocks

* PR Comments
2021-09-20 10:32:09 -07:00
Beka Westberg a6e50defdb feat: add deserialization of JSO block state (#5137)
* Fixup tests

* Add deserialization of blocks

* Cleanup

* PR commnts
2021-09-20 10:32:09 -07:00
Beka Westberg d80bf8573c feat: add top level save and load functions for JSO serialization (#5132)
* Add top-level serialization API

* Add using JSO system in serializer tests

* Make compiler happy
2021-09-20 10:32:09 -07:00
Beka Westberg 9aa0d35f68 feat: add JSO serialization and deserialization of variables (#5131)
* Add variable serialization tests

* Fix requires for new file

* Add serialization and deserialization of variables

* Remove only in tests

* Cleanup
2021-09-20 10:32:09 -07:00
Beka Westberg 1927580c0a feat: add serialization of child blocks (#5120)
* Add tests for serializing connected blocks

* Add serialization of child blocks

* Add tests for not serializing children

* Add options for not serializing children

* Fix types

* Change addNextBlocks to default to true

* Cleanup

* Fix types
2021-09-20 10:32:09 -07:00
Beka Westberg a294371ed1 Add serialization of field values (#5072)
* Add tests for field serialization

* Add field serialization

* Fixup types and tests
2021-09-20 10:32:09 -07:00
Beka Westberg 6649ac8dcf Add serialization of mutators (#5054)
* Add tests for saving extra state

* Add serializing extra state

* Fix backwards compatibility

* Switch to other function declarations

* Handle null returns from hooks

* Remove backwards compatibility

* Remove XML require, and fix type

* Fix JSDoc formatting
2021-09-20 10:32:09 -07:00
Beka Westberg d5c39b878c Add serialization of basic block attributes to JSOs (#5053)
* Add basic attribute tests

* Add basic block serialization

* Add more attribute tests

* Change save to use options dictionary

* Add obeying save options

* Add test for data attribute

* Add saving data tag

* Move to ES6 syntax

* Fixup move to es6 syntax

* Declare module

* Format and lint

* Add docs

* Add returning null on insertion markers

* Fixup for move to module

* Switch to other function declarations

* Cleanup for finalized style

* Fix lint and types

* Export State def

* Switch disabled=true to enabled=false
2021-09-20 10:32:09 -07:00