Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 0 additions & 43 deletions .changeset/olive-rules-repeat.md

This file was deleted.

10 changes: 0 additions & 10 deletions .changeset/tricky-donuts-smile.md

This file was deleted.

13 changes: 0 additions & 13 deletions .changeset/wild-pugs-invite.md

This file was deleted.

7 changes: 7 additions & 0 deletions packages/create/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# create-hyperbook

## 0.3.9

### Patch Changes

- Updated dependencies [[`20de8fe`](https://github.com/openpatch/hyperbook/commit/20de8fe89fdb753246c8f15b713a40b6f3682b1f), [`20de8fe`](https://github.com/openpatch/hyperbook/commit/20de8fe89fdb753246c8f15b713a40b6f3682b1f)]:
- @hyperbook/types@0.23.2

## 0.3.8

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/create/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-hyperbook",
"version": "0.3.8",
"version": "0.3.9",
"description": "Shared logic for creating new Hyperbook projects",
"platform": "node",
"main": "./dist/index.js",
Expand Down
56 changes: 56 additions & 0 deletions packages/hyperbook/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,61 @@
# hyperbook

## 0.101.0

### Minor Changes

- [#1153](https://github.com/openpatch/hyperbook/pull/1153) [`20de8fe`](https://github.com/openpatch/hyperbook/commit/20de8fe89fdb753246c8f15b713a40b6f3682b1f) Thanks [@mikebarkmin](https://github.com/mikebarkmin)! - Rework how bookmarks store their label, so bookmarks show what the page shows.

A bookmark label used to be baked into an `onclick` attribute of the bookmark
button and rendered with `innerHTML`. Labels are now read from the rendered
heading when a bookmark is saved, and stored as parts instead of markup:

```js
[{ text: "Getting started " }, { text: "🐧", emoji: "1f427" }];
```

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 `onclick`
attribute 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.
- Bookmark buttons no longer carry an inline `onclick`. They are handled by a
delegated listener and carry `data-key`, `data-label`, `aria-label` and
`aria-pressed`.
- Bookmark buttons are empty. The icon comes from `.bookmark` in the
stylesheet, so a custom style that replaced the emoji has to be updated.
- The store moves to version 6. Labels of existing bookmarks are migrated to
the new shape, and a plain label is still rendered, so nothing is lost.

### Patch Changes

- [#1153](https://github.com/openpatch/hyperbook/pull/1153) [`20de8fe`](https://github.com/openpatch/hyperbook/commit/20de8fe89fdb753246c8f15b713a40b6f3682b1f) Thanks [@mikebarkmin](https://github.com/mikebarkmin)! - Fix `mailto:` and `tel:` links in markdown. `makeUrl` only passed through URLs
containing `://` or starting with `data:`, so `[Write us](mailto:a@b.c)` was
resolved against the base path and became `href="/mailto:a@b.c"`. Any URL with
a scheme is now passed through untouched.

- [#1153](https://github.com/openpatch/hyperbook/pull/1153) [`20de8fe`](https://github.com/openpatch/hyperbook/commit/20de8fe89fdb753246c8f15b713a40b6f3682b1f) Thanks [@mikebarkmin](https://github.com/mikebarkmin)! - Add `elements.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 `twemoji` replaces them with Twemoji images at build time, so a
hyperbook 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`.

## 0.100.6

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/hyperbook/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hyperbook",
"version": "0.100.6",
"version": "0.101.0",
"author": "Mike Barkmin",
"homepage": "https://github.com/openpatch/hyperbook#readme",
"license": "MIT",
Expand Down
51 changes: 51 additions & 0 deletions packages/markdown/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,56 @@
# @hyperbook/markdown

## 0.72.0

### Minor Changes

- [#1153](https://github.com/openpatch/hyperbook/pull/1153) [`20de8fe`](https://github.com/openpatch/hyperbook/commit/20de8fe89fdb753246c8f15b713a40b6f3682b1f) Thanks [@mikebarkmin](https://github.com/mikebarkmin)! - Rework how bookmarks store their label, so bookmarks show what the page shows.

A bookmark label used to be baked into an `onclick` attribute of the bookmark
button and rendered with `innerHTML`. Labels are now read from the rendered
heading when a bookmark is saved, and stored as parts instead of markup:

```js
[{ text: "Getting started " }, { text: "🐧", emoji: "1f427" }];
```

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 `onclick`
attribute 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.
- Bookmark buttons no longer carry an inline `onclick`. They are handled by a
delegated listener and carry `data-key`, `data-label`, `aria-label` and
`aria-pressed`.
- Bookmark buttons are empty. The icon comes from `.bookmark` in the
stylesheet, so a custom style that replaced the emoji has to be updated.
- The store moves to version 6. Labels of existing bookmarks are migrated to
the new shape, and a plain label is still rendered, so nothing is lost.

### Patch Changes

- [#1153](https://github.com/openpatch/hyperbook/pull/1153) [`20de8fe`](https://github.com/openpatch/hyperbook/commit/20de8fe89fdb753246c8f15b713a40b6f3682b1f) Thanks [@mikebarkmin](https://github.com/mikebarkmin)! - Add `elements.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 `twemoji` replaces them with Twemoji images at build time, so a
hyperbook 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`.

## 0.71.6

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/markdown/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hyperbook/markdown",
"version": "0.71.6",
"version": "0.72.0",
"author": "Mike Barkmin",
"homepage": "https://github.com/openpatch/hyperbook#readme",
"license": "MIT",
Expand Down
16 changes: 16 additions & 0 deletions packages/types/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# @hyperbook/types

## 0.23.2

### Patch Changes

- [#1153](https://github.com/openpatch/hyperbook/pull/1153) [`20de8fe`](https://github.com/openpatch/hyperbook/commit/20de8fe89fdb753246c8f15b713a40b6f3682b1f) Thanks [@mikebarkmin](https://github.com/mikebarkmin)! - Fix `mailto:` and `tel:` links in markdown. `makeUrl` only passed through URLs
containing `://` or starting with `data:`, so `[Write us](mailto:a@b.c)` was
resolved against the base path and became `href="/mailto:a@b.c"`. Any URL with
a scheme is now passed through untouched.

- [#1153](https://github.com/openpatch/hyperbook/pull/1153) [`20de8fe`](https://github.com/openpatch/hyperbook/commit/20de8fe89fdb753246c8f15b713a40b6f3682b1f) Thanks [@mikebarkmin](https://github.com/mikebarkmin)! - Add `elements.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 `twemoji` replaces them with Twemoji images at build time, so a
hyperbook 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`.

## 0.23.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/types/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hyperbook/types",
"version": "0.23.1",
"version": "0.23.2",
"author": "Mike Barkmin",
"homepage": "https://github.com/openpatch/hyperbook#readme",
"license": "MIT",
Expand Down
60 changes: 60 additions & 0 deletions platforms/vscode/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,65 @@
# @hyperbook/vscode-extension

## 0.52.0

### Minor Changes

- [#1153](https://github.com/openpatch/hyperbook/pull/1153) [`20de8fe`](https://github.com/openpatch/hyperbook/commit/20de8fe89fdb753246c8f15b713a40b6f3682b1f) Thanks [@mikebarkmin](https://github.com/mikebarkmin)! - Rework how bookmarks store their label, so bookmarks show what the page shows.

A bookmark label used to be baked into an `onclick` attribute of the bookmark
button and rendered with `innerHTML`. Labels are now read from the rendered
heading when a bookmark is saved, and stored as parts instead of markup:

```js
[{ text: "Getting started " }, { text: "🐧", emoji: "1f427" }];
```

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 `onclick`
attribute 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.
- Bookmark buttons no longer carry an inline `onclick`. They are handled by a
delegated listener and carry `data-key`, `data-label`, `aria-label` and
`aria-pressed`.
- Bookmark buttons are empty. The icon comes from `.bookmark` in the
stylesheet, so a custom style that replaced the emoji has to be updated.
- The store moves to version 6. Labels of existing bookmarks are migrated to
the new shape, and a plain label is still rendered, so nothing is lost.

### Patch Changes

- [#1153](https://github.com/openpatch/hyperbook/pull/1153) [`20de8fe`](https://github.com/openpatch/hyperbook/commit/20de8fe89fdb753246c8f15b713a40b6f3682b1f) Thanks [@mikebarkmin](https://github.com/mikebarkmin)! - Fix `mailto:` and `tel:` links in markdown. `makeUrl` only passed through URLs
containing `://` or starting with `data:`, so `[Write us](mailto:a@b.c)` was
resolved against the base path and became `href="/mailto:a@b.c"`. Any URL with
a scheme is now passed through untouched.

- [#1153](https://github.com/openpatch/hyperbook/pull/1153) [`20de8fe`](https://github.com/openpatch/hyperbook/commit/20de8fe89fdb753246c8f15b713a40b6f3682b1f) Thanks [@mikebarkmin](https://github.com/mikebarkmin)! - Add `elements.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 `twemoji` replaces them with Twemoji images at build time, so a
hyperbook 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`](https://github.com/openpatch/hyperbook/commit/20de8fe89fdb753246c8f15b713a40b6f3682b1f), [`20de8fe`](https://github.com/openpatch/hyperbook/commit/20de8fe89fdb753246c8f15b713a40b6f3682b1f)]:
- @hyperbook/markdown@0.72.0
- create-hyperbook@0.3.9
- @hyperbook/fs@0.25.1

## 0.51.9

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion platforms/vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"homepage": "https://hyperbook.openpatch.org",
"main": "./out/extension.js",
"version": "0.51.9",
"version": "0.52.0",
"engines": {
"vscode": "^1.71.0"
},
Expand Down