diff --git a/.changeset/ai-fence-syntax.md b/.changeset/ai-fence-syntax.md deleted file mode 100644 index 99fff4ae8..000000000 --- a/.changeset/ai-fence-syntax.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@hyperbook/cloud": patch ---- - -The editor's AI assistant writes code blocks of `:::pyide`, `:::webide`, `:::typst`, `:::openscad` and `:::p5` in the current syntax: the main file without a name, every other file with `file="…"` on the fence. It used to write the old form (`python main.py`), whose blocks a build ignores with a warning. `:::onlineide` and `:::sqlide`, which still take the file name after the language, are unchanged. diff --git a/.changeset/cloud-typst.md b/.changeset/cloud-typst.md deleted file mode 100644 index 30d3f1429..000000000 --- a/.changeset/cloud-typst.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@hyperbook/cloud": minor ---- - -Typst documents in Hyperbook Cloud. Books build `::pdf[…]{src="x.typ"}` like a local build: the sandboxed CLI lists the documents and the server compiles them with the official Typst compiler, which it downloads and checks itself, with an empty environment, no system fonts, memory and file-size limits, a timeout per document inside the build's own and a compile cache per book. The page preview shows Typst documents with the editor's unsaved text, and an open `.typ` file gets a PDF preview pane next to the editor, with Typst's errors in the editor's gutter; `#import "@…"` completes the available packages. Admins add Typst packages every book can import (e.g. `@local/assessio:0.1.0`) under Settings → Typst packages; versions are added or removed, never replaced. New settings: `TYPST_TIMEOUT_SECONDS`, `TYPST_MAX_JOBS`, `TYPST_MEMORY_MB`, `TYPST_PREVIEW_CONCURRENCY`, `TYPST_BINARY`. The `::pdf` element's runtime (pdf.js) can be served by the instance like the other element runtimes. - -The editor's `.typ` files use Hyperbook's light and dark syntax colors instead of the Typst grammar's own light-only ones, the PDF preview (and an opened PDF file) is drawn on the editor's own surface in light and dark mode instead of the browser's dark PDF viewer, keeps its scroll position and no longer flashes while it updates, Typst's errors and the syntax checks share the gutter, and the borders of the file tree, the editor's gutter, its tooltips and menus no longer appear near-black in light mode. diff --git a/.changeset/exclude-globs.md b/.changeset/exclude-globs.md deleted file mode 100644 index 991c61f24..000000000 --- a/.changeset/exclude-globs.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -"hyperbook": minor -"@hyperbook/fs": minor -"@hyperbook/types": minor -"hyperbook-studio": patch ---- - -`hyperbook.json` has a new `exclude` setting: globs for files that must not be part of the built site, for example `["intern/**", "**/*.draft.*"]`. They are matched against the address a file would have in the site and apply to the files in `public/` and to everything in `book/` and `glossary/` that is not a page. The dev server does not serve such files either, and `hyperbook check` reports links that point at them. diff --git a/.changeset/pdf-element.md b/.changeset/pdf-element.md deleted file mode 100644 index 8b565b944..000000000 --- a/.changeset/pdf-element.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -"hyperbook": minor -"@hyperbook/markdown": minor -"@hyperbook/types": minor -"hyperbook-studio": minor -"@hyperbook/cloud": minor ---- - -New `::pdf[Title]{src="file.pdf"}` element: shows a PDF document on a page. pdf.js draws the pages in the browser, so documents also work on tablets and phones, and their text can be selected, searched and read aloud. `view` chooses between `pages` (all pages below each other, the default), `slides` (one page with previous/next, arrow keys, swipe and fullscreen), `thumb` (the first page beside title and download button), `embed` (the browser's own viewer) and `button` (only a download button). `pages="1-2"` limits the pages shown, `download="false"` hides the download button, `height` sets the height of `slides` and `embed`. The viewer is a downloadable element runtime like Typst or GeoGebra (`elements.pdf.cdn`), and Hyperbook Cloud can serve it for all books. diff --git a/.changeset/publishing-lock.md b/.changeset/publishing-lock.md deleted file mode 100644 index 75e7bdc05..000000000 --- a/.changeset/publishing-lock.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@hyperbook/cloud": minor ---- - -Books have a publishing lock, for exams and other material that must never be public. An owner (or an admin) disables publishing on the book's page; from then on the book can neither be published nor rolled back, an open request to publish is dropped, and a book that is live is taken offline at once. The lock is enforced where a build goes live, so a build that was already waiting or running when the lock was set does not publish the book either. Previews, builds and downloads keep working for the book's members, the book's card shows a badge, and the change is written to the audit log. diff --git a/.changeset/typst-documents.md b/.changeset/typst-documents.md deleted file mode 100644 index 634cd6ac2..000000000 --- a/.changeset/typst-documents.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -"hyperbook": minor -"@hyperbook/markdown": minor -"@hyperbook/types": minor -"hyperbook-studio": patch ---- - -`::pdf` builds Typst documents: `::pdf[Worksheet]{src="worksheet.typ"}` compiles the document into a PDF during the build and shows it like any other. `inputs="solution=true"` passes values to the document (each set of inputs is its own PDF). Documents are compiled with the official Typst compiler, which Hyperbook downloads and checks on first use; `typst.version` in `hyperbook.json` pins it (0.15.0 and newer are supported), `typst.packagePath` names a folder of the book's own packages (`@local/…`), and `typst.fontPath` a folder of fonts. `HYPERBOOK_TYPST_PACKAGE_PATH` adds packages shared by several books. The book's root is Typst's root, so imports and images work from anywhere in the book and nothing outside it is read. An unchanged document is not compiled again, a document with errors fails the build with Typst's message, and the dev server compiles documents as pages show them. - -**Behaviour change:** `.typ` files are no longer copied into the site. A page that offers one for download with `:download[…]{src="file.typ"}` still gets it; a plain Markdown link to a `.typ` file now breaks, and `hyperbook check` reports it. `:::typst` blocks are not affected. diff --git a/.changeset/typst-ts-0-8.md b/.changeset/typst-ts-0-8.md deleted file mode 100644 index 4ed3f3b9e..000000000 --- a/.changeset/typst-ts-0-8.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -"hyperbook": minor -"@hyperbook/markdown": minor -"@hyperbook/cloud": minor ---- - -`:::typst` blocks compile with Typst 0.15.1 (typst.ts 0.8.0-rc4, up from 0.7.0 with Typst 0.14.2), and they can import packages: from Typst Universe as before, and now also the book's own packages (`typst.packagePath`, e.g. `#import "@local/template:1.0.0": *`), shared ones from `HYPERBOOK_TYPST_PACKAGE_PATH`, and on Hyperbook Cloud the instance's packages under Settings → Typst packages. The build packs every package a block imports, and the packages those import, into the site at `/__hyperbook_typst/`; readers' browsers load them from there. A new `packages` attribute offers packages that no file imports yet, for edit mode. A package the book's `exclude` matches stops the build instead of being published. - -**Note:** a document that uses something Typst 0.15 removed or changed may need an update. typst.ts 0.8.0 is still a release candidate; it is pinned by checksum. diff --git a/packages/create/CHANGELOG.md b/packages/create/CHANGELOG.md index 3b857d658..1781a091a 100644 --- a/packages/create/CHANGELOG.md +++ b/packages/create/CHANGELOG.md @@ -1,5 +1,12 @@ # create-hyperbook +## 0.4.8 + +### Patch Changes + +- Updated dependencies [[`f7957e5`](https://github.com/openpatch/hyperbook/commit/f7957e5b753d10f41d7dd2c035363741d364d8fe), [`f7957e5`](https://github.com/openpatch/hyperbook/commit/f7957e5b753d10f41d7dd2c035363741d364d8fe), [`f7957e5`](https://github.com/openpatch/hyperbook/commit/f7957e5b753d10f41d7dd2c035363741d364d8fe)]: + - @hyperbook/types@0.31.0 + ## 0.4.7 ### Patch Changes diff --git a/packages/create/package.json b/packages/create/package.json index dd93b835c..b20a56bab 100644 --- a/packages/create/package.json +++ b/packages/create/package.json @@ -1,6 +1,6 @@ { "name": "create-hyperbook", - "version": "0.4.7", + "version": "0.4.8", "description": "Shared logic for creating new Hyperbook projects", "platform": "node", "main": "./dist/index.js", diff --git a/packages/fs/CHANGELOG.md b/packages/fs/CHANGELOG.md index e237ca213..8485a737a 100644 --- a/packages/fs/CHANGELOG.md +++ b/packages/fs/CHANGELOG.md @@ -1,5 +1,11 @@ # @hyperbook/fs +## 0.31.0 + +### Minor Changes + +- [`f7957e5`](https://github.com/openpatch/hyperbook/commit/f7957e5b753d10f41d7dd2c035363741d364d8fe) Thanks [@mikebarkmin](https://github.com/mikebarkmin)! - `hyperbook.json` has a new `exclude` setting: globs for files that must not be part of the built site, for example `["intern/**", "**/*.draft.*"]`. They are matched against the address a file would have in the site and apply to the files in `public/` and to everything in `book/` and `glossary/` that is not a page. The dev server does not serve such files either, and `hyperbook check` reports links that point at them. + ## 0.30.5 ### Patch Changes diff --git a/packages/fs/package.json b/packages/fs/package.json index b6d930180..695cc185c 100644 --- a/packages/fs/package.json +++ b/packages/fs/package.json @@ -1,6 +1,6 @@ { "name": "@hyperbook/fs", - "version": "0.30.5", + "version": "0.31.0", "author": "Mike Barkmin", "homepage": "https://github.com/openpatch/hyperbook#readme", "license": "MIT", diff --git a/packages/hyperbook/CHANGELOG.md b/packages/hyperbook/CHANGELOG.md index 8cc3a2bee..30c798f3a 100644 --- a/packages/hyperbook/CHANGELOG.md +++ b/packages/hyperbook/CHANGELOG.md @@ -1,5 +1,21 @@ # hyperbook +## 0.123.0 + +### Minor Changes + +- [`f7957e5`](https://github.com/openpatch/hyperbook/commit/f7957e5b753d10f41d7dd2c035363741d364d8fe) Thanks [@mikebarkmin](https://github.com/mikebarkmin)! - `hyperbook.json` has a new `exclude` setting: globs for files that must not be part of the built site, for example `["intern/**", "**/*.draft.*"]`. They are matched against the address a file would have in the site and apply to the files in `public/` and to everything in `book/` and `glossary/` that is not a page. The dev server does not serve such files either, and `hyperbook check` reports links that point at them. + +- [`f7957e5`](https://github.com/openpatch/hyperbook/commit/f7957e5b753d10f41d7dd2c035363741d364d8fe) Thanks [@mikebarkmin](https://github.com/mikebarkmin)! - New `::pdf[Title]{src="file.pdf"}` element: shows a PDF document on a page. pdf.js draws the pages in the browser, so documents also work on tablets and phones, and their text can be selected, searched and read aloud. `view` chooses between `pages` (all pages below each other, the default), `slides` (one page with previous/next, arrow keys, swipe and fullscreen), `thumb` (the first page beside title and download button), `embed` (the browser's own viewer) and `button` (only a download button). `pages="1-2"` limits the pages shown, `download="false"` hides the download button, `height` sets the height of `slides` and `embed`. The viewer is a downloadable element runtime like Typst or GeoGebra (`elements.pdf.cdn`), and Hyperbook Cloud can serve it for all books. + +- [`f7957e5`](https://github.com/openpatch/hyperbook/commit/f7957e5b753d10f41d7dd2c035363741d364d8fe) Thanks [@mikebarkmin](https://github.com/mikebarkmin)! - `::pdf` builds Typst documents: `::pdf[Worksheet]{src="worksheet.typ"}` compiles the document into a PDF during the build and shows it like any other. `inputs="solution=true"` passes values to the document (each set of inputs is its own PDF). Documents are compiled with the official Typst compiler, which Hyperbook downloads and checks on first use; `typst.version` in `hyperbook.json` pins it (0.15.0 and newer are supported), `typst.packagePath` names a folder of the book's own packages (`@local/…`), and `typst.fontPath` a folder of fonts. `HYPERBOOK_TYPST_PACKAGE_PATH` adds packages shared by several books. The book's root is Typst's root, so imports and images work from anywhere in the book and nothing outside it is read. An unchanged document is not compiled again, a document with errors fails the build with Typst's message, and the dev server compiles documents as pages show them. + + **Behaviour change:** `.typ` files are no longer copied into the site. A page that offers one for download with `:download[…]{src="file.typ"}` still gets it; a plain Markdown link to a `.typ` file now breaks, and `hyperbook check` reports it. `:::typst` blocks are not affected. + +- [`f7957e5`](https://github.com/openpatch/hyperbook/commit/f7957e5b753d10f41d7dd2c035363741d364d8fe) Thanks [@mikebarkmin](https://github.com/mikebarkmin)! - `:::typst` blocks compile with Typst 0.15.1 (typst.ts 0.8.0-rc4, up from 0.7.0 with Typst 0.14.2), and they can import packages: from Typst Universe as before, and now also the book's own packages (`typst.packagePath`, e.g. `#import "@local/template:1.0.0": *`), shared ones from `HYPERBOOK_TYPST_PACKAGE_PATH`, and on Hyperbook Cloud the instance's packages under Settings → Typst packages. The build packs every package a block imports, and the packages those import, into the site at `/__hyperbook_typst/`; readers' browsers load them from there. A new `packages` attribute offers packages that no file imports yet, for edit mode. A package the book's `exclude` matches stops the build instead of being published. + + **Note:** a document that uses something Typst 0.15 removed or changed may need an update. typst.ts 0.8.0 is still a release candidate; it is pinned by checksum. + ## 0.122.0 ### Minor Changes diff --git a/packages/hyperbook/package.json b/packages/hyperbook/package.json index f21979a48..d3f3b96e7 100644 --- a/packages/hyperbook/package.json +++ b/packages/hyperbook/package.json @@ -1,6 +1,6 @@ { "name": "hyperbook", - "version": "0.122.0", + "version": "0.123.0", "author": "Mike Barkmin", "homepage": "https://github.com/openpatch/hyperbook#readme", "license": "MIT", diff --git a/packages/markdown/CHANGELOG.md b/packages/markdown/CHANGELOG.md index f2c10f6be..e7ee1d1a3 100644 --- a/packages/markdown/CHANGELOG.md +++ b/packages/markdown/CHANGELOG.md @@ -1,5 +1,19 @@ # @hyperbook/markdown +## 0.93.0 + +### Minor Changes + +- [`f7957e5`](https://github.com/openpatch/hyperbook/commit/f7957e5b753d10f41d7dd2c035363741d364d8fe) Thanks [@mikebarkmin](https://github.com/mikebarkmin)! - New `::pdf[Title]{src="file.pdf"}` element: shows a PDF document on a page. pdf.js draws the pages in the browser, so documents also work on tablets and phones, and their text can be selected, searched and read aloud. `view` chooses between `pages` (all pages below each other, the default), `slides` (one page with previous/next, arrow keys, swipe and fullscreen), `thumb` (the first page beside title and download button), `embed` (the browser's own viewer) and `button` (only a download button). `pages="1-2"` limits the pages shown, `download="false"` hides the download button, `height` sets the height of `slides` and `embed`. The viewer is a downloadable element runtime like Typst or GeoGebra (`elements.pdf.cdn`), and Hyperbook Cloud can serve it for all books. + +- [`f7957e5`](https://github.com/openpatch/hyperbook/commit/f7957e5b753d10f41d7dd2c035363741d364d8fe) Thanks [@mikebarkmin](https://github.com/mikebarkmin)! - `::pdf` builds Typst documents: `::pdf[Worksheet]{src="worksheet.typ"}` compiles the document into a PDF during the build and shows it like any other. `inputs="solution=true"` passes values to the document (each set of inputs is its own PDF). Documents are compiled with the official Typst compiler, which Hyperbook downloads and checks on first use; `typst.version` in `hyperbook.json` pins it (0.15.0 and newer are supported), `typst.packagePath` names a folder of the book's own packages (`@local/…`), and `typst.fontPath` a folder of fonts. `HYPERBOOK_TYPST_PACKAGE_PATH` adds packages shared by several books. The book's root is Typst's root, so imports and images work from anywhere in the book and nothing outside it is read. An unchanged document is not compiled again, a document with errors fails the build with Typst's message, and the dev server compiles documents as pages show them. + + **Behaviour change:** `.typ` files are no longer copied into the site. A page that offers one for download with `:download[…]{src="file.typ"}` still gets it; a plain Markdown link to a `.typ` file now breaks, and `hyperbook check` reports it. `:::typst` blocks are not affected. + +- [`f7957e5`](https://github.com/openpatch/hyperbook/commit/f7957e5b753d10f41d7dd2c035363741d364d8fe) Thanks [@mikebarkmin](https://github.com/mikebarkmin)! - `:::typst` blocks compile with Typst 0.15.1 (typst.ts 0.8.0-rc4, up from 0.7.0 with Typst 0.14.2), and they can import packages: from Typst Universe as before, and now also the book's own packages (`typst.packagePath`, e.g. `#import "@local/template:1.0.0": *`), shared ones from `HYPERBOOK_TYPST_PACKAGE_PATH`, and on Hyperbook Cloud the instance's packages under Settings → Typst packages. The build packs every package a block imports, and the packages those import, into the site at `/__hyperbook_typst/`; readers' browsers load them from there. A new `packages` attribute offers packages that no file imports yet, for edit mode. A package the book's `exclude` matches stops the build instead of being published. + + **Note:** a document that uses something Typst 0.15 removed or changed may need an update. typst.ts 0.8.0 is still a release candidate; it is pinned by checksum. + ## 0.92.0 ### Minor Changes diff --git a/packages/markdown/package.json b/packages/markdown/package.json index 3129a6843..031ca5c4c 100644 --- a/packages/markdown/package.json +++ b/packages/markdown/package.json @@ -1,6 +1,6 @@ { "name": "@hyperbook/markdown", - "version": "0.92.0", + "version": "0.93.0", "author": "Mike Barkmin", "homepage": "https://github.com/openpatch/hyperbook#readme", "license": "MIT", diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index 18df1c137..6bc5ed771 100644 --- a/packages/types/CHANGELOG.md +++ b/packages/types/CHANGELOG.md @@ -1,5 +1,17 @@ # @hyperbook/types +## 0.31.0 + +### Minor Changes + +- [`f7957e5`](https://github.com/openpatch/hyperbook/commit/f7957e5b753d10f41d7dd2c035363741d364d8fe) Thanks [@mikebarkmin](https://github.com/mikebarkmin)! - `hyperbook.json` has a new `exclude` setting: globs for files that must not be part of the built site, for example `["intern/**", "**/*.draft.*"]`. They are matched against the address a file would have in the site and apply to the files in `public/` and to everything in `book/` and `glossary/` that is not a page. The dev server does not serve such files either, and `hyperbook check` reports links that point at them. + +- [`f7957e5`](https://github.com/openpatch/hyperbook/commit/f7957e5b753d10f41d7dd2c035363741d364d8fe) Thanks [@mikebarkmin](https://github.com/mikebarkmin)! - New `::pdf[Title]{src="file.pdf"}` element: shows a PDF document on a page. pdf.js draws the pages in the browser, so documents also work on tablets and phones, and their text can be selected, searched and read aloud. `view` chooses between `pages` (all pages below each other, the default), `slides` (one page with previous/next, arrow keys, swipe and fullscreen), `thumb` (the first page beside title and download button), `embed` (the browser's own viewer) and `button` (only a download button). `pages="1-2"` limits the pages shown, `download="false"` hides the download button, `height` sets the height of `slides` and `embed`. The viewer is a downloadable element runtime like Typst or GeoGebra (`elements.pdf.cdn`), and Hyperbook Cloud can serve it for all books. + +- [`f7957e5`](https://github.com/openpatch/hyperbook/commit/f7957e5b753d10f41d7dd2c035363741d364d8fe) Thanks [@mikebarkmin](https://github.com/mikebarkmin)! - `::pdf` builds Typst documents: `::pdf[Worksheet]{src="worksheet.typ"}` compiles the document into a PDF during the build and shows it like any other. `inputs="solution=true"` passes values to the document (each set of inputs is its own PDF). Documents are compiled with the official Typst compiler, which Hyperbook downloads and checks on first use; `typst.version` in `hyperbook.json` pins it (0.15.0 and newer are supported), `typst.packagePath` names a folder of the book's own packages (`@local/…`), and `typst.fontPath` a folder of fonts. `HYPERBOOK_TYPST_PACKAGE_PATH` adds packages shared by several books. The book's root is Typst's root, so imports and images work from anywhere in the book and nothing outside it is read. An unchanged document is not compiled again, a document with errors fails the build with Typst's message, and the dev server compiles documents as pages show them. + + **Behaviour change:** `.typ` files are no longer copied into the site. A page that offers one for download with `:download[…]{src="file.typ"}` still gets it; a plain Markdown link to a `.typ` file now breaks, and `hyperbook check` reports it. `:::typst` blocks are not affected. + ## 0.30.0 ### Minor Changes diff --git a/packages/types/package.json b/packages/types/package.json index a2f44e2cf..72784055e 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@hyperbook/types", - "version": "0.30.0", + "version": "0.31.0", "author": "Mike Barkmin", "homepage": "https://github.com/openpatch/hyperbook#readme", "license": "MIT", diff --git a/platforms/cloud/CHANGELOG.md b/platforms/cloud/CHANGELOG.md index a24ad5d74..06e76fa6b 100644 --- a/platforms/cloud/CHANGELOG.md +++ b/platforms/cloud/CHANGELOG.md @@ -1,5 +1,25 @@ # @hyperbook/cloud +## 0.6.0 + +### Minor Changes + +- [`f7957e5`](https://github.com/openpatch/hyperbook/commit/f7957e5b753d10f41d7dd2c035363741d364d8fe) Thanks [@mikebarkmin](https://github.com/mikebarkmin)! - Typst documents in Hyperbook Cloud. Books build `::pdf[…]{src="x.typ"}` like a local build: the sandboxed CLI lists the documents and the server compiles them with the official Typst compiler, which it downloads and checks itself, with an empty environment, no system fonts, memory and file-size limits, a timeout per document inside the build's own and a compile cache per book. The page preview shows Typst documents with the editor's unsaved text, and an open `.typ` file gets a PDF preview pane next to the editor, with Typst's errors in the editor's gutter; `#import "@…"` completes the available packages. Admins add Typst packages every book can import (e.g. `@local/assessio:0.1.0`) under Settings → Typst packages; versions are added or removed, never replaced. New settings: `TYPST_TIMEOUT_SECONDS`, `TYPST_MAX_JOBS`, `TYPST_MEMORY_MB`, `TYPST_PREVIEW_CONCURRENCY`, `TYPST_BINARY`. The `::pdf` element's runtime (pdf.js) can be served by the instance like the other element runtimes. + + The editor's `.typ` files use Hyperbook's light and dark syntax colors instead of the Typst grammar's own light-only ones, the PDF preview (and an opened PDF file) is drawn on the editor's own surface in light and dark mode instead of the browser's dark PDF viewer, keeps its scroll position and no longer flashes while it updates, Typst's errors and the syntax checks share the gutter, and the borders of the file tree, the editor's gutter, its tooltips and menus no longer appear near-black in light mode. + +- [`f7957e5`](https://github.com/openpatch/hyperbook/commit/f7957e5b753d10f41d7dd2c035363741d364d8fe) Thanks [@mikebarkmin](https://github.com/mikebarkmin)! - New `::pdf[Title]{src="file.pdf"}` element: shows a PDF document on a page. pdf.js draws the pages in the browser, so documents also work on tablets and phones, and their text can be selected, searched and read aloud. `view` chooses between `pages` (all pages below each other, the default), `slides` (one page with previous/next, arrow keys, swipe and fullscreen), `thumb` (the first page beside title and download button), `embed` (the browser's own viewer) and `button` (only a download button). `pages="1-2"` limits the pages shown, `download="false"` hides the download button, `height` sets the height of `slides` and `embed`. The viewer is a downloadable element runtime like Typst or GeoGebra (`elements.pdf.cdn`), and Hyperbook Cloud can serve it for all books. + +- [`f7957e5`](https://github.com/openpatch/hyperbook/commit/f7957e5b753d10f41d7dd2c035363741d364d8fe) Thanks [@mikebarkmin](https://github.com/mikebarkmin)! - Books have a publishing lock, for exams and other material that must never be public. An owner (or an admin) disables publishing on the book's page; from then on the book can neither be published nor rolled back, an open request to publish is dropped, and a book that is live is taken offline at once. The lock is enforced where a build goes live, so a build that was already waiting or running when the lock was set does not publish the book either. Previews, builds and downloads keep working for the book's members, the book's card shows a badge, and the change is written to the audit log. + +- [`f7957e5`](https://github.com/openpatch/hyperbook/commit/f7957e5b753d10f41d7dd2c035363741d364d8fe) Thanks [@mikebarkmin](https://github.com/mikebarkmin)! - `:::typst` blocks compile with Typst 0.15.1 (typst.ts 0.8.0-rc4, up from 0.7.0 with Typst 0.14.2), and they can import packages: from Typst Universe as before, and now also the book's own packages (`typst.packagePath`, e.g. `#import "@local/template:1.0.0": *`), shared ones from `HYPERBOOK_TYPST_PACKAGE_PATH`, and on Hyperbook Cloud the instance's packages under Settings → Typst packages. The build packs every package a block imports, and the packages those import, into the site at `/__hyperbook_typst/`; readers' browsers load them from there. A new `packages` attribute offers packages that no file imports yet, for edit mode. A package the book's `exclude` matches stops the build instead of being published. + + **Note:** a document that uses something Typst 0.15 removed or changed may need an update. typst.ts 0.8.0 is still a release candidate; it is pinned by checksum. + +### Patch Changes + +- [`f7957e5`](https://github.com/openpatch/hyperbook/commit/f7957e5b753d10f41d7dd2c035363741d364d8fe) Thanks [@mikebarkmin](https://github.com/mikebarkmin)! - The editor's AI assistant writes code blocks of `:::pyide`, `:::webide`, `:::typst`, `:::openscad` and `:::p5` in the current syntax: the main file without a name, every other file with `file="…"` on the fence. It used to write the old form (`python main.py`), whose blocks a build ignores with a warning. `:::onlineide` and `:::sqlide`, which still take the file name after the language, are unchanged. + ## 0.5.7 ### Patch Changes diff --git a/platforms/cloud/package.json b/platforms/cloud/package.json index 8c1b21912..13155ab6c 100644 --- a/platforms/cloud/package.json +++ b/platforms/cloud/package.json @@ -1,6 +1,6 @@ { "name": "@hyperbook/cloud", - "version": "0.5.7", + "version": "0.6.0", "private": true, "type": "module", "engines": { diff --git a/platforms/vscode/CHANGELOG.md b/platforms/vscode/CHANGELOG.md index 6ed4c52b8..9427a0ed7 100644 --- a/platforms/vscode/CHANGELOG.md +++ b/platforms/vscode/CHANGELOG.md @@ -1,5 +1,24 @@ # @hyperbook/vscode-extension +## 0.59.0 + +### Minor Changes + +- [`f7957e5`](https://github.com/openpatch/hyperbook/commit/f7957e5b753d10f41d7dd2c035363741d364d8fe) Thanks [@mikebarkmin](https://github.com/mikebarkmin)! - New `::pdf[Title]{src="file.pdf"}` element: shows a PDF document on a page. pdf.js draws the pages in the browser, so documents also work on tablets and phones, and their text can be selected, searched and read aloud. `view` chooses between `pages` (all pages below each other, the default), `slides` (one page with previous/next, arrow keys, swipe and fullscreen), `thumb` (the first page beside title and download button), `embed` (the browser's own viewer) and `button` (only a download button). `pages="1-2"` limits the pages shown, `download="false"` hides the download button, `height` sets the height of `slides` and `embed`. The viewer is a downloadable element runtime like Typst or GeoGebra (`elements.pdf.cdn`), and Hyperbook Cloud can serve it for all books. + +### Patch Changes + +- [`f7957e5`](https://github.com/openpatch/hyperbook/commit/f7957e5b753d10f41d7dd2c035363741d364d8fe) Thanks [@mikebarkmin](https://github.com/mikebarkmin)! - `hyperbook.json` has a new `exclude` setting: globs for files that must not be part of the built site, for example `["intern/**", "**/*.draft.*"]`. They are matched against the address a file would have in the site and apply to the files in `public/` and to everything in `book/` and `glossary/` that is not a page. The dev server does not serve such files either, and `hyperbook check` reports links that point at them. + +- [`f7957e5`](https://github.com/openpatch/hyperbook/commit/f7957e5b753d10f41d7dd2c035363741d364d8fe) Thanks [@mikebarkmin](https://github.com/mikebarkmin)! - `::pdf` builds Typst documents: `::pdf[Worksheet]{src="worksheet.typ"}` compiles the document into a PDF during the build and shows it like any other. `inputs="solution=true"` passes values to the document (each set of inputs is its own PDF). Documents are compiled with the official Typst compiler, which Hyperbook downloads and checks on first use; `typst.version` in `hyperbook.json` pins it (0.15.0 and newer are supported), `typst.packagePath` names a folder of the book's own packages (`@local/…`), and `typst.fontPath` a folder of fonts. `HYPERBOOK_TYPST_PACKAGE_PATH` adds packages shared by several books. The book's root is Typst's root, so imports and images work from anywhere in the book and nothing outside it is read. An unchanged document is not compiled again, a document with errors fails the build with Typst's message, and the dev server compiles documents as pages show them. + + **Behaviour change:** `.typ` files are no longer copied into the site. A page that offers one for download with `:download[…]{src="file.typ"}` still gets it; a plain Markdown link to a `.typ` file now breaks, and `hyperbook check` reports it. `:::typst` blocks are not affected. + +- Updated dependencies [[`f7957e5`](https://github.com/openpatch/hyperbook/commit/f7957e5b753d10f41d7dd2c035363741d364d8fe), [`f7957e5`](https://github.com/openpatch/hyperbook/commit/f7957e5b753d10f41d7dd2c035363741d364d8fe), [`f7957e5`](https://github.com/openpatch/hyperbook/commit/f7957e5b753d10f41d7dd2c035363741d364d8fe), [`f7957e5`](https://github.com/openpatch/hyperbook/commit/f7957e5b753d10f41d7dd2c035363741d364d8fe)]: + - @hyperbook/fs@0.31.0 + - @hyperbook/markdown@0.93.0 + - create-hyperbook@0.4.8 + ## 0.58.19 ### Patch Changes diff --git a/platforms/vscode/package.json b/platforms/vscode/package.json index 99f1307f2..68df3d0ce 100644 --- a/platforms/vscode/package.json +++ b/platforms/vscode/package.json @@ -11,7 +11,7 @@ }, "homepage": "https://hyperbook.openpatch.org", "main": "./out/extension.js", - "version": "0.58.19", + "version": "0.59.0", "engines": { "vscode": "^1.125.0" },