From 4eec49de16db06b71dce0c20c1e9f78a08aa5982 Mon Sep 17 00:00:00 2001 From: Ian Storm Taylor Date: Thu, 1 Apr 2021 13:40:25 -0400 Subject: [PATCH] rename master to main --- .changeset/README.md | 2 +- .changeset/config.json | 2 +- .github/workflows/release.yml | 2 +- Changelog.md | 4 ++-- Readme.md | 20 ++++++++++---------- docs/Introduction.md | 4 ++-- site/pages/examples/[example].tsx | 2 +- 7 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.changeset/README.md b/.changeset/README.md index 4f3b76b09..e5b6d8d6a 100644 --- a/.changeset/README.md +++ b/.changeset/README.md @@ -5,4 +5,4 @@ with multi-package repos, or single-package repos to help you version and publis find the full documentation for it [in our repository](https://github.com/changesets/changesets) We have a quick list of common questions to get you started engaging with this project in -[our documentation](https://github.com/changesets/changesets/blob/master/docs/common-questions.md) +[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) diff --git a/.changeset/config.json b/.changeset/config.json index c0a18a9f4..79ebf5bd7 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -7,7 +7,7 @@ "commit": false, "linked": [["slate", "slate-history", "slate-hyperscript", "slate-react"]], "access": "public", - "baseBranch": "master", + "baseBranch": "main", "updateInternalDependencies": "patch", "ignore": [], "___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": { diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e69be22f7..95cb1dbf9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,7 +3,7 @@ name: Release on: push: branches: - - master + - main jobs: run: diff --git a/Changelog.md b/Changelog.md index c822490db..c3566a819 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1335,7 +1335,7 @@ This is just an attempt to make dealing with normalization errors slightly more ###### BREAKING -**The `decorate` function of schema rules has changed.** Previously, in `decorate` you would receive a text node and the matched node, and you'd need to manually add any marks you wanted to the text node's characters. Now, "decorations" have changed to just be `Selection` objects with marks in the `selection.marks` property. Instead of applying the marks yourself, you simply return selection ranges with the marks to be applied, and Slate will apply them internally. This makes it possible to write much more complex decoration behaviors. Check out the revamped [`code-highlighting`](https://github.com/ianstormtaylor/slate/blob/master/examples/code-highlighting/index.js) example and the new [`search-highlighting`](https://github.com/ianstormtaylor/slate/blob/master/examples/search-highlighting/index.js) example to see this in action. +**The `decorate` function of schema rules has changed.** Previously, in `decorate` you would receive a text node and the matched node, and you'd need to manually add any marks you wanted to the text node's characters. Now, "decorations" have changed to just be `Selection` objects with marks in the `selection.marks` property. Instead of applying the marks yourself, you simply return selection ranges with the marks to be applied, and Slate will apply them internally. This makes it possible to write much more complex decoration behaviors. Check out the revamped [`code-highlighting`](https://github.com/ianstormtaylor/slate/blob/main/examples/code-highlighting/index.js) example and the new [`search-highlighting`](https://github.com/ianstormtaylor/slate/blob/main/examples/search-highlighting/index.js) example to see this in action. **The `set_data` operation type has been replaced by `set_state`.** With the new `state.decorations` property, it doesn't make sense to have a new operation type for every property of `State` objects. Instead, the new `set_state` operation more closely mimics the existing `set_mark` and `set_node` operations. @@ -1343,7 +1343,7 @@ This is just an attempt to make dealing with normalization errors slightly more ###### NEW -**You can now set decorations based on external information.** Previously, the "decoration" logic in Slate was always based off of the text of a node, and would only re-render when that text changed. Now, there is a new `state.decorations` property that you can set via `change.setState({ decorations })`. You can use this to add presentation-only marks to arbitrary ranges of text in the document. Check out the new [`search-highlighting`](https://github.com/ianstormtaylor/slate/blob/master/examples/search-highlighting/index.js) example to see this in action. +**You can now set decorations based on external information.** Previously, the "decoration" logic in Slate was always based off of the text of a node, and would only re-render when that text changed. Now, there is a new `state.decorations` property that you can set via `change.setState({ decorations })`. You can use this to add presentation-only marks to arbitrary ranges of text in the document. Check out the new [`search-highlighting`](https://github.com/ianstormtaylor/slate/blob/main/examples/search-highlighting/index.js) example to see this in action. **The `setData` change method has been replaced by `setState`.** Previously you would call `change.setData(data)`. But as new `State` properties are introduced it doesn't make sense to need to add new change methods each time. Instead, the new `change.setState(properties)` more closesely mimics the existing `setMarkByKey` and `setNodeByKey`. To achieve the old behavior, you can do `change.setState({ data })`. diff --git a/Readme.md b/Readme.md index fdb7cec55..fb0e49310 100644 --- a/Readme.md +++ b/Readme.md @@ -103,16 +103,16 @@ Check out the [**live demo**](http://slatejs.org) of all of the examples! To get a sense for how you might use Slate, check out a few of the examples: -- [**Plain text**](https://github.com/ianstormtaylor/slate/tree/master/site/examples/plaintext.tsx) — showing the most basic case: a glorified `