tldraw/packages/store/CHANGELOG.md
2024-06-11 12:53:15 +00:00

22 KiB

v2.2.0 (Tue Jun 11 2024)

Release Notes

Snapshots pit of success (#3811)

  • Add a brief release note for your PR here.

focus: rework and untangle existing focus management logic in the sdk (#3718)

  • Focus: rework and untangle existing focus management logic in the SDK

Store-level "operation end" event (#3748)

Breaking changes

editor.registerBatchCompleteHandler has been replaced with editor.registerOperationCompleteHandler

Move arrow helpers from editor to tldraw (#3721)

Breaking changes

  • editor.getArrowInfo(shape) has been replaced with getArrowInfo(editor, shape)
  • editor.getArrowsBoundTo(shape) has been removed. Instead, use editor.getBindingsToShape(shape, 'arrow') and follow the fromId of each binding to the corresponding arrow shape
  • These types have moved from @tldraw/editor to tldraw:
    • TLArcInfo
    • TLArrowInfo
    • TLArrowPoint
  • WeakMapCache has been removed

Bindings (#3326)

Breaking changes

  • The start and end properties on TLArrowShape no longer have type: point | binding. Instead, they're always a point, which may be out of date if a binding exists. To check for & retrieve arrow bindings, use getArrowBindings(editor, shape) instead.
  • getArrowTerminalsInArrowSpace must be passed a TLArrowBindings as a third argument: getArrowTerminalsInArrowSpace(editor, shape, getArrowBindings(editor, shape))
  • The following types have been renamed:
    • ShapeProps -> RecordProps
    • ShapePropsType -> RecordPropsType
    • TLShapePropsMigrations -> TLPropsMigrations
    • SchemaShapeInfo -> SchemaPropsInfo

📚 SDK Changes

📖 Documentation changes

  • make sure everything marked @public gets documented #3892 (@SomeHats)

🏠 Internal

Authors: 4


v2.1.0 (Tue Apr 23 2024)

Release Notes

New migrations again (#3220)

BREAKING CHANGES

  • The Migrations type is now called LegacyMigrations.

  • The serialized schema format (e.g. returned by StoreSchema.serialize() and Store.getSnapshot()) has changed. You don't need to do anything about it unless you were reading data directly from the schema for some reason. In which case it'd be best to avoid that in the future! We have no plans to change the schema format again (this time was traumatic enough) but you never know.

  • compareRecordVersions and the RecordVersion type have both disappeared. There is no replacement. These were public by mistake anyway, so hopefully nobody had been using it.

  • compareSchemas is gone. Comparing the schemas directly is no longer really possible since we introduced some fuzziness. The best thing to do now to check compatibility is to call schema.getMigraitonsSince(prevSchema) and it will return an error if the schemas are not compatible, an empty array if there are no migrations to apply since the prev schema, and a nonempty array otherwise.

    Generally speaking, the best way to check schema compatibility now is to call store.schema.getMigrationsSince(persistedSchema). This will throw an error if there is no upgrade path from the persistedSchema to the current version.

  • defineMigrations has been deprecated and will be removed in a future release. For upgrade instructions see https://tldraw.dev/docs/persistence#Updating-legacy-shape-migrations-defineMigrations

  • migrate has been removed. Nobody should have been using this but if you were you'll need to find an alternative. For migrating tldraw data, you should stick to using schema.migrateStoreSnapshot and, if you are building a nuanced sync engine that supports some amount of backwards compatibility, also feel free to use schema.migratePersistedRecord.

  • the Migration type has changed. If you need the old one for some reason it has been renamed to LegacyMigration. It will be removed in a future release.

  • the Migrations type has been renamed to LegacyMigrations and will be removed in a future release.

  • the SerializedSchema type has been augmented. If you need the old version specifically you can use SerializedSchemaV1

Perf: (slightly) faster min dist checks (#3401)

  • Performance: small improvements to hit testing.

Don't double squash (#3182)

  • Minor improvement when modifying multiple shapes at once.

Performance improvements (#2977)

  • Improves the performance of rendering.

💥 Breaking Change

📚 SDK Changes

📖 Documentation changes

Authors: 6


v2.0.0-beta.5 (Thu Feb 29 2024)

🔩 Dependency Updates

Authors: 1


v2.0.0-beta.4 (Wed Feb 21 2024)

Release Notes

Faster validations + record reference stability at the same time (#2848)

  • Add a brief release note for your PR here.

🐛 Bug Fix

  • Faster validations + record reference stability at the same time #2848 (@ds300)

🏠 Internal

Authors: 2


v2.0.0-beta.3 (Tue Feb 13 2024)

Release Notes

dev: add test-dev command for easier testing of packages (#2627)

  • Adds easier testing command for individual packages.

🚀 Enhancement

  • [dx] use Biome instead of Prettier, part 2 #2731 (@si14)

🏠 Internal

🧪 Tests

🔩 Dependency Updates

  • Bump Yarn to 4.0.2 and add version constraints #2481 (@si14)

Authors: 4


v2.0.0-beta.2 (Wed Jan 10 2024)

🐛 Bug Fix

Authors: 1


v2.0.0-beta.1 (Wed Dec 20 2023)

Release Notes

Prevent diff mutation (#2336)

  • Fix squashRecordDiffs to prevent a bug where it mutates the 'updated' entires

💥 Breaking Change

🐛 Bug Fix

Authors: 2


v2.0.0-alpha.19 (Tue Dec 12 2023)

💥 Breaking Change

🐛 Bug Fix

Authors: 2


v2.0.0-alpha.18 (Fri Nov 10 2023)

🏠 Internal

  • Revert "bump prerelease from alpha to beta" #2192 (@ds300)
  • bump prerelease from alpha to beta #2148 (@ds300)

Authors: 1


v2.0.0-alpha.17 (Tue Oct 17 2023)

🔩 Dependency Updates

Authors: 1


v2.0.0-alpha.16 (Wed Oct 11 2023)

🏠 Internal

Authors: 1


v2.0.0-alpha.15 (Fri Oct 06 2023)

Release Notes

Fix shape drag perf (#1932)

  • Fixes a perf regression for dragging shapes around

Migrate snapshot (#1843)

  • [editor] add Store.migrateSnapshot

Editor commands API / effects (#1778)

  • tbd

tldraw zero - package shuffle (#1710)

  • [@tldraw/editor] lots, wip
  • [@tldraw/ui] gone, merged to tldraw/tldraw
  • [@tldraw/polyfills] gone, merged to tldraw/editor
  • [@tldraw/primitives] gone, merged to tldraw/editor / tldraw/tldraw
  • [@tldraw/indices] gone, merged to tldraw/editor
  • [@tldraw/file-format] gone, merged to tldraw/tldraw

💥 Breaking Change

🚀 Enhancement

🐛 Bug Fix

Authors: 3


v2.0.0-alpha.14 (Tue Jul 04 2023)

Release Notes

[fix] mutating snapshot in migrateStoreSnapshot (#1663)

  • [@tldraw/store] Fixed a bug that would cause Store.migrateStoreSnapshot to mutate its snapshot argument.

🐛 Bug Fix

Authors: 1


v2.0.0-alpha.13 (Wed Jun 28 2023)

Release Notes

[improvement] store snapshot types (#1657)

  • [dev] Rename StoreSnapshot to SerializedStore
  • [dev] Create new StoreSnapshot as type related to getSnapshot/loadSnapshot

tlschema cleanup (#1509)

  • [editor] Remove app.createShapeId
  • [tlschema] Cleans up exports

Rename tlstore to store (#1507)

  • Replace @tldraw/tlstore with @tldraw/store

💥 Breaking Change

⚠️ Pushed to main

🔩 Dependency Updates

Authors: 2


v2.0.0-alpha.12 (Mon Apr 03 2023)

🐛 Bug Fix

Authors: 5


@tldraw/tlstore

2.0.0-alpha.11

Patch Changes

  • fix some package build scripting
  • Updated dependencies
    • @tldraw/utils@2.0.0-alpha.10

2.0.0-alpha.10

Patch Changes

  • 4b4399b6e: redeploy with yarn to prevent package version issues
  • Updated dependencies [4b4399b6e]
    • @tldraw/utils@2.0.0-alpha.9

2.0.0-alpha.9

Patch Changes

  • Release day!
  • Updated dependencies
    • @tldraw/utils@2.0.0-alpha.8

2.0.0-alpha.8

Patch Changes

  • 23dd81cfe: Make signia a peer dependency

2.0.0-alpha.7

Patch Changes

  • Bug fixes.
  • Updated dependencies
    • @tldraw/utils@2.0.0-alpha.7

2.0.0-alpha.6

Patch Changes

  • Add licenses.
  • Updated dependencies
    • @tldraw/utils@2.0.0-alpha.6

2.0.0-alpha.5

Patch Changes

  • Add CSS files to tldraw/tldraw.
  • Updated dependencies
    • @tldraw/utils@2.0.0-alpha.5

2.0.0-alpha.4

Patch Changes

  • Add children to tldraw/tldraw
  • Updated dependencies
    • @tldraw/utils@2.0.0-alpha.4

2.0.0-alpha.3

Patch Changes

  • Change permissions.
  • Updated dependencies
    • @tldraw/utils@2.0.0-alpha.3

2.0.0-alpha.2

Patch Changes

  • Add tldraw, editor
  • Updated dependencies
    • @tldraw/utils@2.0.0-alpha.2

0.1.0-alpha.11

Patch Changes

  • Fix stale reactors.
  • Updated dependencies
    • @tldraw/utils@0.1.0-alpha.11

0.1.0-alpha.10

Patch Changes

  • Fix type export bug.
  • Updated dependencies
    • @tldraw/utils@0.1.0-alpha.10

0.1.0-alpha.9

Patch Changes

  • Fix import bugs.
  • Updated dependencies
    • @tldraw/utils@0.1.0-alpha.9

0.1.0-alpha.8

Patch Changes

  • Changes validation requirements, exports validation helpers.
  • Updated dependencies
    • @tldraw/utils@0.1.0-alpha.8

0.1.0-alpha.7

Patch Changes

    • Pre-pre-release update
  • Updated dependencies
    • @tldraw/utils@0.1.0-alpha.7

0.0.2-alpha.1

Patch Changes

  • Fix error with HMR
  • Updated dependencies
    • @tldraw/utils@0.0.2-alpha.1

0.0.2-alpha.0

Patch Changes

  • Initial release
  • Updated dependencies
    • @tldraw/utils@0.0.2-alpha.0