Version Packages - #1154
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
hyperbook@0.101.0
Minor Changes
#1153
20de8feThanks @mikebarkmin! - Rework how bookmarks store their label, so bookmarks show what the page shows.A bookmark label used to be baked into an
onclickattribute of the bookmarkbutton and rendered with
innerHTML. Labels are now read from the renderedheading when a bookmark is saved, and stored as parts instead of markup:
The bookmark list builds its entries from those parts with the DOM, so nothing
that was stored is parsed as HTML, and an emoji that is rendered as an image
stays an image in the bookmark list. Emojis are stored by id, never by URL, so
bookmarks survive a change of the
basePath.This also fixes bookmarking a heading that contains a quote or a backslash.
Those characters ended up inside a JavaScript string in the
onclickattribute and made the button throw a syntax error.
The bookmark indicator is no longer the 🔖 emoji. Both the button on a heading
and the marker in the bookmark list are drawn from the stylesheet with a mask,
so the control looks the same on every platform, takes the color of the
heading it belongs to in light and dark mode, and does not change when the
emoji style changes. A bookmarked heading now shows a filled icon instead of only a less
transparent one.
Breaking:
hyperbook.ui.toggleBookmark(key, label)no longer takes a label:hyperbook.ui.toggleBookmark(key). The label comes from the heading.onclick. They are handled by adelegated listener and carry
data-key,data-label,aria-labelandaria-pressed..bookmarkin thestylesheet, so a custom style that replaced the emoji has to be updated.
the new shape, and a plain label is still rendered, so nothing is lost.
Patch Changes
#1153
20de8feThanks @mikebarkmin! - Fixmailto:andtel:links in markdown.makeUrlonly passed through URLscontaining
://or starting withdata:, so[Write us](mailto:a@b.c)wasresolved against the base path and became
href="/mailto:a@b.c". Any URL witha scheme is now passed through untouched.
#1153
20de8feThanks @mikebarkmin! - Addelements.emoji.style. Emojis are drawn by the reader's operating system,so the same emoji looks different on Windows, macOS, Android and Linux. Setting
the style to
twemojireplaces them with Twemoji images at build time, so ahyperbook looks the same on every platform. This covers emojis in the content
as well as icons from the config, leaves code untouched, and only copies the
emojis a book actually uses into its output. The default stays
native.@hyperbook/markdown@0.72.0
Minor Changes
#1153
20de8feThanks @mikebarkmin! - Rework how bookmarks store their label, so bookmarks show what the page shows.A bookmark label used to be baked into an
onclickattribute of the bookmarkbutton and rendered with
innerHTML. Labels are now read from the renderedheading when a bookmark is saved, and stored as parts instead of markup:
The bookmark list builds its entries from those parts with the DOM, so nothing
that was stored is parsed as HTML, and an emoji that is rendered as an image
stays an image in the bookmark list. Emojis are stored by id, never by URL, so
bookmarks survive a change of the
basePath.This also fixes bookmarking a heading that contains a quote or a backslash.
Those characters ended up inside a JavaScript string in the
onclickattribute and made the button throw a syntax error.
The bookmark indicator is no longer the 🔖 emoji. Both the button on a heading
and the marker in the bookmark list are drawn from the stylesheet with a mask,
so the control looks the same on every platform, takes the color of the
heading it belongs to in light and dark mode, and does not change when the
emoji style changes. A bookmarked heading now shows a filled icon instead of only a less
transparent one.
Breaking:
hyperbook.ui.toggleBookmark(key, label)no longer takes a label:hyperbook.ui.toggleBookmark(key). The label comes from the heading.onclick. They are handled by adelegated listener and carry
data-key,data-label,aria-labelandaria-pressed..bookmarkin thestylesheet, so a custom style that replaced the emoji has to be updated.
the new shape, and a plain label is still rendered, so nothing is lost.
Patch Changes
20de8feThanks @mikebarkmin! - Addelements.emoji.style. Emojis are drawn by the reader's operating system,so the same emoji looks different on Windows, macOS, Android and Linux. Setting
the style to
twemojireplaces them with Twemoji images at build time, so ahyperbook looks the same on every platform. This covers emojis in the content
as well as icons from the config, leaves code untouched, and only copies the
emojis a book actually uses into its output. The default stays
native.create-hyperbook@0.3.9
Patch Changes
20de8fe,20de8fe]:@hyperbook/types@0.23.2
Patch Changes
#1153
20de8feThanks @mikebarkmin! - Fixmailto:andtel:links in markdown.makeUrlonly passed through URLscontaining
://or starting withdata:, so[Write us](mailto:a@b.c)wasresolved against the base path and became
href="/mailto:a@b.c". Any URL witha scheme is now passed through untouched.
#1153
20de8feThanks @mikebarkmin! - Addelements.emoji.style. Emojis are drawn by the reader's operating system,so the same emoji looks different on Windows, macOS, Android and Linux. Setting
the style to
twemojireplaces them with Twemoji images at build time, so ahyperbook looks the same on every platform. This covers emojis in the content
as well as icons from the config, leaves code untouched, and only copies the
emojis a book actually uses into its output. The default stays
native.hyperbook-studio@0.52.0
Minor Changes
#1153
20de8feThanks @mikebarkmin! - Rework how bookmarks store their label, so bookmarks show what the page shows.A bookmark label used to be baked into an
onclickattribute of the bookmarkbutton and rendered with
innerHTML. Labels are now read from the renderedheading when a bookmark is saved, and stored as parts instead of markup:
The bookmark list builds its entries from those parts with the DOM, so nothing
that was stored is parsed as HTML, and an emoji that is rendered as an image
stays an image in the bookmark list. Emojis are stored by id, never by URL, so
bookmarks survive a change of the
basePath.This also fixes bookmarking a heading that contains a quote or a backslash.
Those characters ended up inside a JavaScript string in the
onclickattribute and made the button throw a syntax error.
The bookmark indicator is no longer the 🔖 emoji. Both the button on a heading
and the marker in the bookmark list are drawn from the stylesheet with a mask,
so the control looks the same on every platform, takes the color of the
heading it belongs to in light and dark mode, and does not change when the
emoji style changes. A bookmarked heading now shows a filled icon instead of only a less
transparent one.
Breaking:
hyperbook.ui.toggleBookmark(key, label)no longer takes a label:hyperbook.ui.toggleBookmark(key). The label comes from the heading.onclick. They are handled by adelegated listener and carry
data-key,data-label,aria-labelandaria-pressed..bookmarkin thestylesheet, so a custom style that replaced the emoji has to be updated.
the new shape, and a plain label is still rendered, so nothing is lost.
Patch Changes
#1153
20de8feThanks @mikebarkmin! - Fixmailto:andtel:links in markdown.makeUrlonly passed through URLscontaining
://or starting withdata:, so[Write us](mailto:a@b.c)wasresolved against the base path and became
href="/mailto:a@b.c". Any URL witha scheme is now passed through untouched.
#1153
20de8feThanks @mikebarkmin! - Addelements.emoji.style. Emojis are drawn by the reader's operating system,so the same emoji looks different on Windows, macOS, Android and Linux. Setting
the style to
twemojireplaces them with Twemoji images at build time, so ahyperbook looks the same on every platform. This covers emojis in the content
as well as icons from the config, leaves code untouched, and only copies the
emojis a book actually uses into its output. The default stays
native.Updated dependencies [
20de8fe,20de8fe]: