tldraw/packages/tlschema/CHANGELOG.md
2024-06-25 13:27:57 +00:00

49 KiB

v2.3.0 (Tue Jun 25 2024)

Release Notes

Dynamic size mode + fill fill (#3835)

  • Adds a dynamic size user preferences.
  • Removes double click to reset scale on text shapes.
  • Removes double click to reset autosize on text shapes.

assets: make option to transform urls dynamically / LOD (#3827)

  • Assets: make option to transform urls dynamically to provide different sized images on demand.

📚 SDK Changes

Authors: 4


v2.2.0 (Tue Jun 11 2024)

Release Notes

bookmark: fix up double request and rework extractor (#3856)

  • Bookmarks: fix up double request and rework extractor code.

Snapshots pit of success (#3811)

  • Add a brief release note for your PR here.

Add heart geo shape (#3787)

  • Adds a heart shape to the geo shape set.

rework canBind callback (#3797)

Breaking changes

The canBind flag now accepts an options object instead of just the shape in question. If you're relying on its arguments, you need to change from canBind(shape) {} to canBind({shape}) {}.

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

Camera options (#3282)

  • SDK: Adds camera options.
  • Embeds: fix being able to click on links that go back to the embed's site (e.g. YouTube)

Separate text-align property for shapes (#3627)

  • Separates the text align property for text shapes and labels.

Add desmos graph embed type (#3608)

  • (feature) add desmos embed

Expose migrations, validators, and versions from tlschema (#3613)

Previously, we weren't exporting migrations & validators for our default shapes. This meant that it wasn't possible to make your own tlschema with both our default shapes and some of your own (e.g. for custom multiplayer). This fixes that by exposing all the migrations, validators, and versions from tlschema, plus defaultShapeSchemas which can be passed directly to createTLSchema

fix migration exports (#3586)

  • Expose createShapePropsMigrationIds, defaultEditorAssetUrls, PORTRAIT_BREAKPOINT, useDefaultColorTheme, & getPerfectDashProps

🐛 Bug Fix

📚 SDK Changes

🖥️ tldraw.com Changes

📖 Documentation changes

🏠 Internal

Authors: 8


v2.1.0 (Tue Apr 23 2024)

Release Notes

Color tweaks (light and dark mode) (#3486)

  • Adjusts colors

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

Stickies: release candidate (#3249)

  • Improves sticky notes (see list)

Add white (#3321)

  • Adds secret white color.

📚 SDK Changes

🏠 Internal

🧪 Tests

Authors: 7


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

Release Notes

Setup papercuts (#2987)

  • Add a brief release note for your PR here.

fix structured clone reference in drawing (#2945)

  • Fixes a reference to structuredClone that caused a crash on older browsers.

🐛 Bug Fix

🔩 Dependency Updates

Authors: 2


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.

[Snapping 2/5] Fix line-handle mid-point snapping (#2831)

  • Simplify the contents of TLLineShape.props.handles

💥 Breaking Change

🚀 Enhancement

🐛 Bug Fix

  • Faster validations + record reference stability at the same time #2848 (@ds300)
  • [Snapping 1/5] Validation & strict types for fractional indexes #2827 (@SomeHats)

🏠 Internal

Authors: 6


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

Release Notes

i18n: add HR 🇭🇷 (#2778)

  • i18n: add Croatian / Hrvatski.

arrows: separate out handle behavior from labels (#2621)

  • Arrow labels: provide more polish on label placement

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

  • Adds easier testing command for individual packages.

Improved duplication (#2480)

  • Add a brief release note for your PR here.

i18n: sort languages by name, not by locale code (#2625)

  • Sorts the locale list by locale name, not code.

arrows: add ability to change label placement (#2557)

  • Adds ability to change label position on arrows.

[hot take] Make dark mode colours pop more (#2478)

  • Tweaked dark mode colour styles to make them pop more.

[fix] disable vertical edge resizing for text on mobile (#2456)

  • Add a brief release note for your PR here.

[Minor] change Simplified Chinese label to Chinese (#2434)

  • Changed the label for the Simplified Chinese language from Chinese - Simplified to 简体中文, following the convention of other languages.
  • Updated the API and relevant documentation through build scripts.

[improvement] account for coarse pointers / insets in edge scrolling (#2401)

  • Add instanceState.insets to track which edges of the component are inset from the edges of the document body.
  • Improve behavior around edge scrolling

🚀 Enhancement

🐛 Bug Fix

🏠 Internal

🔩 Dependency Updates

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

Authors: 10


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

Release Notes

Fix validation when pasting images. (#2436)

  • Fixes url validations.

Add url validation (#2428)

  • Add validation to urls.

[tech debt] Primitives renaming party / cleanup (#2396)

  • renames Vec2d to Vec
  • renames Vec2dModel to VecModel
  • renames Box2d to Box
  • renames Box2dModel to BoxModel
  • renames Matrix2d to Mat
  • renames Matrix2dModel to MatModel
  • removes unused primitive helpers
  • Fixes broken links in a number of docs files.

💥 Breaking Change

🐛 Bug Fix

📝 Documentation

Authors: 4


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

Release Notes

Lokalise: Translations update (#2342)

Added Czech translations. Updated translations for German, Korean, Russian, Ukrainian, Traditional Chinese.


💥 Breaking Change

🐛 Bug Fix

Authors: 2


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

Release Notes

Fix migrations. (#2302)

  • Fix migrations of instance_page_state.

[improvements] arrows x enclosing shapes x precision. (#2265)

  • Improves the logic about when to draw "precise" arrows between the center of bound shapes.

Add prettier caching (#2212)

  • Speed up formatting of files via yarn format.

💥 Breaking Change

🚀 Enhancement

🐛 Bug Fix

🏠 Internal

Authors: 3


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

Release Notes

[feature] multi-scribbles (#2125)

  • [feature] multi scribbles

🚀 Enhancement

🏠 Internal

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

Authors: 2


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

🚀 Enhancement

🔩 Dependency Updates

Authors: 2


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

🚀 Enhancement

🐛 Bug Fix

🏠 Internal

Authors: 2


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

Release Notes

Migrate snapshot (#1843)

  • [editor] add Store.migrateSnapshot

[fix] embeds switching / tldraw embed (#1792)

  • [fix] tldraw embeds

Editor commands API / effects (#1778)

  • tbd

[feature] Add val town embed (#1777)

  • (feature) val town

ShapeUtil.getGeometry, selection rewrite (#1751)

  • [editor] Remove ShapeUtil.getBounds, ShapeUtil.getOutline, ShapeUtil.hitTestPoint, ShapeUtil.hitTestLineSegment
  • [editor] Add ShapeUtil.getGeometry
  • [editor] Add Editor.getShapeGeometry

[fix] dark mode (#1754)

  • [fix] dark mode colors not updating

Remove helpers / extraneous API methods. (#1745)

  • [tldraw] rename useReadonly to useReadOnly
  • [editor] remove Editor.isDarkMode
  • [editor] remove Editor.isChangingStyle
  • [editor] remove Editor.isCoarsePointer
  • [editor] remove Editor.isDarkMode
  • [editor] remove Editor.isFocused
  • [editor] remove Editor.isGridMode
  • [editor] remove Editor.isPenMode
  • [editor] remove Editor.isReadOnly
  • [editor] remove Editor.isSnapMode
  • [editor] remove Editor.isToolLocked
  • [editor] remove Editor.locale
  • [editor] rename Editor.pageState to Editor.currentPageState
  • [editor] add Editor.pageStates
  • [editor] add Editor.setErasingIds
  • [editor] add Editor.setEditingId
  • [editor] add several new component overrides

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

Add cloud shape (#1708)

  • Adds a cloud shape.

💥 Breaking Change

🚀 Enhancement

🐛 Bug Fix

Authors: 3


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

Release Notes

[feature] add meta property to records (#1627)

  • todo

🚀 Enhancement

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

Styles API docs (#1641)

--

Styles API follow-ups (#1636)

--

ShapeUtil refactor, Editor cleanup (#1611)

  • [editor] renames defaultProps to getDefaultProps
  • [editor] removes outline, outlineSegments, handles, bounds
  • [editor] renames renderBackground to backgroundComponent

Styles API (#1580)

(1/2) Timeout collaborator cursors (#1525)

  • Brought back cursor timeouts. Collaborator cursors now disappear after 3 seconds of inactivity.

(1/2) Cursor Chat - Presence (#1487)

  • [dev] Added support for cursor chat presence.

[improvement] Embed shape cleanup (#1569)

  • [editor] Remove unused props for TLEditorShape
  • [editor] Adds canUnmount property to embed definitions

mini defineShape API (#1563)

[dev-facing, notes to come]

hoist opacity out of props (#1526)

[internal only for now]

[feature] add vertical align to note shape (#1539)

  • Adds vertical align prop to note shapes

tlschema cleanup (#1509)

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

Rename tlstore to store (#1507)

  • Replace @tldraw/tlstore with @tldraw/store

Rename tlvalidate to validate (#1508)

  • Rename tlvalidate to validate

Cleanup @tldraw/ui types / exports (#1504)

  • [editor] clean up / unify types

[1/3] initial highlighter shape/tool (#1401)

[internal only change layout ground work for highlighter]

[tiny] add isPageId (#1482)

  • [tlschema] Add isPageId

[refactor] update record names (#1473)

  • [editor] rename record types

[chore] refactor user preferences (#1435)

  • Add a brief release note for your PR here.

Add migration for horizontal alignment (#1443)

  • Add support for legacy alignment options.

Stricter ID types (#1439)

[internal only, covered by #1432 changelog]

[refactor] restore createTLSchema (#1444)

  • [editor] Simplifies custom shape definition
  • [tldraw] Updates props for component to require a TldrawEditorConfig.

[refactor] remove createTLSchema (#1440)

  • [tlschema] Removes createTLSchema in favor of TldrawEditorConfig

[refactor] Remove TLShapeDef, getShapeUtilByType. (#1432)

  • [tlschema] Update props of createTLSchema
  • [editor] Update props of TldrawEditorConfig
  • [editor] Remove App.getShapeUtilByType
  • [editor] Update App.getShapeUtil to take a type rather than a shape

[refactor] record migrations (#1430)

  • [tlschema] Improve defineMigrations
  • [editor] Simplify migration definitions

[feature] add laser pointer (#1412)

  • Adds the laser pointer tool.

Vertical text alignment for geo shapes (#1414)

  • This adds vertical text alignment property to geo shapes.

[fix] Don't synchronize isReadOnly (#1396)

  • Removes the isReadOnly value from the user_document_settings record type.

avoid lazy race conditions (#1364)

[internal only]

[perf] make ensureStoreIsUsable scale better (#1362)

  • Add a brief release note for your PR here.

[chore] Bump nanoid (#1349)

  • Remove unused userId and instanceId props from AppOptions

Rework the assets package for strategy-specific imports (#1341)

  • [dev] If you're using the @tldraw/assets package, you need to update your code to import { getAssetUrlsByImport } from '@tldraw/assets/imports' instead of import { getBundlerAssetUrls } from '@tldraw/assets

💥 Breaking Change

🚀 Enhancement

🐛 Bug Fix

⚠️ Pushed to main

🏠 Internal

📝 Documentation

🔩 Dependency Updates

Authors: 5


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

🐛 Bug Fix

Authors: 6


@tldraw/tlschema

2.0.0-alpha.11

Patch Changes

  • fix some package build scripting
  • Updated dependencies
    • @tldraw/tlstore@2.0.0-alpha.11
    • @tldraw/tlvalidate@2.0.0-alpha.10
    • @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/tlstore@2.0.0-alpha.10
    • @tldraw/tlvalidate@2.0.0-alpha.9
    • @tldraw/utils@2.0.0-alpha.9

2.0.0-alpha.9

Patch Changes

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

2.0.0-alpha.8

Patch Changes

  • Updated dependencies [23dd81cfe]
    • @tldraw/tlstore@2.0.0-alpha.8

2.0.0-alpha.7

Patch Changes

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

2.0.0-alpha.6

Patch Changes

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

2.0.0-alpha.5

Patch Changes

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

2.0.0-alpha.4

Patch Changes

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

2.0.0-alpha.3

Patch Changes

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

2.0.0-alpha.2

Patch Changes

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

0.1.0-alpha.11

Patch Changes

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

0.1.0-alpha.10

Patch Changes

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

0.1.0-alpha.9

Patch Changes

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

0.1.0-alpha.8

Patch Changes

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

0.1.0-alpha.7

Patch Changes

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

0.0.2-alpha.1

Patch Changes

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

0.0.2-alpha.0

Patch Changes

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