orz-slides-browser 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -5,9 +5,9 @@ The browser engine and editor component of
5
5
  Markdown that present, edit and save themselves: the very bundle every
6
6
  `.slides.html` file carries, and the same editor for web apps (orz family
7
7
  contract FC-19). Built on the carrier kit of
8
- [orz-markdown](https://www.npmjs.com/package/orz-markdown) 2.5.0 and
8
+ [orz-markdown](https://www.npmjs.com/package/orz-markdown) 2.7.1 and
9
9
  [reveal.js](https://revealjs.com/) 5.2.1 (both bundled: this release embeds
10
- orz-markdown 2.5.0), with the 14 slide themes inside.
10
+ orz-markdown 2.7.1), with the 14 slide themes inside.
11
11
 
12
12
  ```sh
13
13
  npm i orz-slides-browser@1
@@ -16,7 +16,7 @@ npm i orz-slides-browser@1
16
16
  | File | What |
17
17
  |---|---|
18
18
  | `orz-slides.browser.js` | the IIFE. Sets `globalThis.OrzCarrier` = `{ kind: 'slides', version, formats, assemble, extract, readDocument, mountEditor, renderPreview, includeTargets, linkTargets, printDocument, printDeck, standalone, layout }` — `layout` holds the layout editor's pure layout ops (`parseDeck`, `applyOp`, `applyEdits`, `slideMap`, `LayoutOpError`, `PRESET_CHOICES`, `SLIDE_SIZE`). Inside an assembled `.slides.html` it also starts that file (orz-markdown `carrier/app`): the read view — the deck, at 1280 × 720 (16:9) or 960 × 720 (4:3), every box fitted —, Present, Print, Print with notes, Speaker view, Overview, Edit (the whole deck beside a flattened preview, with the live slide card that enlarges into single-slide editing), Save, Download a copy, New document, Save as new copy, the header settings (theme, ratio, slide numbers, progress, section numbers), host protocols and the quiet update; `OrzCarrier.standalone` is then the file's handle, `null` elsewhere. Anywhere else it only sets the global. |
19
- | `esm/orz-slides.browser.mjs` | ES module exports: `kind`, `version`, `formats`, `assemble`, `extract`, `readDocument`, `renderPreview`, `mountEditor`, `OrzCarrier` (the same object without `standalone`), `includeTargets` / `linkTargets` (a text's include directives and links, orz-markdown 2.5.0), `printDeck` (print a deck from your page, one slide per page) and `printDocument` (the kit's), `THEMES`, `DEFAULT_THEME`, `themeSwatch`, `TEMPLATES`, `TEMPLATE_IDS`, `DEFAULT_TEMPLATE`, `newDocument`, `parseDeck`, `editHeader(text, changes)` — change header keys in a text the way the pencil's settings do (one line per key, the rest of the text untouched; `null` removes a key) — and the layout editor's pure layout ops (`applyOp`, `applyEdits`, `slideMap`, `LayoutOpError`, `PRESET_CHOICES`, `SLIDE_SIZE`). Sets no global and boots nothing. |
19
+ | `esm/orz-slides.browser.mjs` | ES module exports: `kind`, `version`, `formats`, `assemble`, `extract`, `readDocument`, `renderPreview`, `mountEditor`, `OrzCarrier` (the same object without `standalone`), `includeTargets` / `linkTargets` (a text's include directives and links, since orz-markdown 2.5), `printDeck` (print a deck from your page, one slide per page) and `printDocument` (the kit's), `THEMES`, `DEFAULT_THEME`, `themeSwatch`, `TEMPLATES`, `TEMPLATE_IDS`, `DEFAULT_TEMPLATE`, `newDocument`, `parseDeck`, `editHeader(text, changes)` — change header keys in a text the way the pencil's settings do (one line per key, the rest of the text untouched; `null` removes a key) — and the layout editor's pure layout ops (`applyOp`, `applyEdits`, `slideMap`, `LayoutOpError`, `PRESET_CHOICES`, `SLIDE_SIZE`). Sets no global and boots nothing. |
20
20
  | `release.json` | the release manifest the quiet update reads: `kind`, `version`, `formats`, `notes`, and `bundle.path` / `bundle.integrity` (the SHA-384 of `orz-slides.browser.js`'s exact bytes). |
21
21
  | `index.d.ts` | types (`Editor`, `EditorOptions`, `EditorHooks`, `SlidesTools`, `LayoutOp`, …). |
22
22
 
@@ -26,7 +26,7 @@ const editor = mountEditor(element, { text, nonce, hooks: { async save(text) { /
26
26
  ```
27
27
 
28
28
  ```html
29
- <script src="https://cdn.jsdelivr.net/npm/orz-slides-browser@1.1.0/orz-slides.browser.js"></script>
29
+ <script src="https://cdn.jsdelivr.net/npm/orz-slides-browser@1.2.0/orz-slides.browser.js"></script>
30
30
  <script>const editor = OrzCarrier.mountEditor(element, { text, hooks: { save } });</script>
31
31
  ```
32
32
 
package/docs/embedding.md CHANGED
@@ -29,7 +29,7 @@ npm install orz-slides-browser@1 # or: npm i orz-slides-browser@1
29
29
  | a bundler (Vite, esbuild, webpack) | `import { mountEditor } from 'orz-slides-browser'` | `esm/orz-slides.browser.mjs` (`exports` → `import`) |
30
30
  | a plain `<script>` | `<script src=".../orz-slides.browser.js">` → `globalThis.OrzCarrier` | `orz-slides.browser.js` (`exports` → `default`) |
31
31
  | `require()` | not supported: it throws, pointing to `import` or `<script>` | `require.cjs` (`exports` → `require`) |
32
- | the CDN | `https://cdn.jsdelivr.net/npm/orz-slides-browser@<version>/orz-slides.browser.js` (e.g. `@1.1.0`; pin an exact version) | the same IIFE |
32
+ | the CDN | `https://cdn.jsdelivr.net/npm/orz-slides-browser@<version>/orz-slides.browser.js` (e.g. `@1.2.0`; pin an exact version) | the same IIFE |
33
33
 
34
34
  Types: `orz-slides-browser/index.d.ts` (`Editor`, `EditorOptions`,
35
35
  `EditorHooks`, `SlidesTools`, `LayoutOp`, …). The ES module sets no global
@@ -84,7 +84,7 @@ the same tools as icons. Keyboard: Cmd/Ctrl+S saves, Cmd/Ctrl+\ cycles the
84
84
  modes, Cmd/Ctrl+Shift+Enter enlarges the live slide card into single-slide
85
85
  editing and back, Esc leaves the text for the toolbar.
86
86
 
87
- **Your site's link names** (1.1, orz-markdown 2.5.0, FC-18 §8.2). A link to
87
+ **Your site's link names** (1.1, since orz-markdown 2.5, FC-18 §8.2). A link to
88
88
  another text — `[week 2](week2.slides.md)`, `[notes](notes.md)` — points at
89
89
  its assembled twin: `week2.slides.html`, `notes.md.html`. A site that
90
90
  publishes under other names passes a naming, per kind a file-name template
@@ -316,7 +316,7 @@ builds its own preview frame with the kit (`orz-markdown/carrier/editor`'s
316
316
  `PREVIEW_BRIDGE_HASH`, `previewScriptHashes`) must take the hash from the
317
317
  same orz-markdown version its frame runs: the bridge, and so its hash,
318
318
  differs between kit versions (2.3.0 and 2.4.0 differ; orz-slides 1.0 embeds
319
- 2.4.0, 1.1 embeds 2.5.0). Tested in Chrome: the editor (CodeMirror 6), math,
319
+ 2.4.0, 1.1 embeds 2.5.0, 1.2 embeds 2.7.1). Tested in Chrome: the editor (CodeMirror 6), math,
320
320
  code highlighting, Mermaid, Chart.js and SMILES render in the preview with
321
321
  no violation but one — Mermaid's run-time `<style>` (below).
322
322
 
@@ -352,7 +352,7 @@ readDocument(text) // header + derived facts (title, auth
352
352
  parseDeck(text) // the deck: config, slides (kind, template, title, layout, regions, notes, footer), lint
353
353
  await renderPreview(text, { includes, fetchInclude }) // the flattened deck's HTML (dividers, region labels), not the slides
354
354
  await renderPreview(text, { document: true, nonce }) // a whole HTML document of it: the slide theme and the flattened styles inline (<style> stamped with your nonce), no script (iframe srcdoc, thumbnails)
355
- includeTargets(text) // (1.1) the include directives' targets, as written (orz-markdown 2.5.0, browser-safe)
355
+ includeTargets(text) // (1.1) the include directives' targets, as written (since orz-markdown 2.5, browser-safe)
356
356
  linkTargets(text) // (1.1) every link and image: { href, line, kind: 'twin' | 'asset' | 'other', image, raw } — a site builder's link check
357
357
  newDocument({ template: 'talk', title, theme: 'nocturne', ratio: '4:3' }) // a new text from a deck template (TEMPLATE_IDS: starter, talk, minimal): carrier slides, a fresh uid
358
358
  await assemble(text, { delivery: 'cdn' }) // a small .slides.html that loads the engine from jsDelivr