rapier-embed 1.2.67 → 1.2.69

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
@@ -7,6 +7,15 @@ Install: `npm install rapier-embed`.
7
7
 
8
8
  ## Start here
9
9
 
10
+ ```js
11
+ import {Rapier} from 'rapier-embed';
12
+ let revision = 1;
13
+ const editor = Rapier.mount(document.querySelector('#editor'), { // the element needs a height
14
+ load: {content: '# Notes\n', filename: 'notes.md', revision},
15
+ async save({content}) { await myStore.put('notes.md', content); return {revision: ++revision}; },
16
+ });
17
+ ```
18
+
10
19
  For embed-only work, start with the supplied application code and the published embed contract below. Use the declared helper release or packaged helper, keeping source, permissions and storage under the host application. Do not create a hosted document. Keep the embed's own WebMCP contract; do not substitute connector calls for its browser API.
11
20
 
12
21
  For an explanation-only request, answer in chat without creating a document. If required content or integration details are missing, ask for them; do not create an empty hosted workspace.
@@ -156,10 +165,10 @@ length and SHA-384 before it runs it, and keeps on the device. A file that fails
156
165
  | Plug-in | Adds | Size | Pages |
157
166
  | --- | --- | --- | --- |
158
167
  | `flowchart` | Draws Mermaid flowcharts and graphs natively, in the editor's own style. | 0.36 MB | The reader |
159
- | `docx` | Opens a Word document (.docx) as a Markdown document: headings, lists, tables, pictures and comments. | 0.94 MB | The reader |
168
+ | `docx` | Opens a Word document (.docx) as a Markdown document: headings, lists, tables, pictures and comments. | 0.95 MB | The reader |
160
169
  | `math` | Typesets TeX math ($...$ and $$...$$) as SVG. | 0.74 MB | Both |
161
170
  | `diagrams` | Draws every other Mermaid diagram: sequence, class, state, ER, Gantt, pie and more. | 1.14 MB (2 files) | Both |
162
- | `pdf` | Opens a PDF as a Markdown document: its text layer, or each page as a picture. Fetches the pdf.js files itself. | 6.16 MB (198 files) | Both |
171
+ | `pdf` | Opens a PDF as a Markdown document: its text layer, or each page as a picture. Fetches the pdf.js files itself. | 6.17 MB (198 files) | Both |
163
172
  | `ocr` | Reads the words in pictures on the device (PP-OCRv6 tiny on ONNX Runtime Web), so search finds them. About 21 MB. | 21.7 MB (10 files) | Both (the reader: only with `--with ocr`) |
164
173
  | `font-subset` | Keeps the used characters in fonts embedded in exported pages. | 1.21 MB | `rapier.html` |
165
174
  | `letters` | Draw's ornamental letter sets: Field, Relief, Leaf, Arabesque, Silhouette, Gothic, Sugar, Illuminated 1490, Tuscan 1845, Renaissance alphabet. | 1.31 MB (10 files) | `rapier.html` |
@@ -167,7 +176,7 @@ length and SHA-384 before it runs it, and keeps on the device. A file that fails
167
176
  | `elements` | The Elements sheet's traced ornaments: 3,155 pieces from the ornament book. | 16.2 MB (51 files) | `rapier.html` |
168
177
  | `lettersets` | The Gallery's letter sets: 31 sets of ornamental capitals. | 2.82 MB (31 files) | `rapier.html` |
169
178
 
170
- Totals: the reader, 9.35 MB (31.0 MB with `ocr`); `rapier.html`, 57.2 MB. Release 1.2.67.
179
+ Totals: the reader, 9.37 MB (31.0 MB with `ocr`); `rapier.html`, 57.2 MB. Release 1.2.69.
171
180
  <!-- PLUGIN_TABLE_END -->
172
181
 
173
182
  The manifest lists every plug-in file and, in `builds`, the pages that use it. `rapier.html` has flowcharts and Word import
package/embed.mjs CHANGED
@@ -274,7 +274,7 @@ function pictureBase(value) {
274
274
  return {FEATURES, LIMITS, ASSET_TYPES, refusal, coded, normalizeSettings, snapshotSettings, pickDeviceFile, createFilePicker, assetURL, assetBytes, bytesHash, externalImage, createAssetBroker, pictureBase};
275
275
  })();
276
276
  const BUILDS = Object.freeze({full: 'https://rapier.website/embed/rapier.html', reader: 'https://rapier.website/embed/rapier-reader.html'});
277
- const PACKAGE_VERSION = '1.2.67';
277
+ const PACKAGE_VERSION = '1.2.69';
278
278
  const OPTIONS = ['build', 'src', 'plugins', 'approvePlugins', 'sessionId', 'documentId', 'agent', 'agentName', 'theme', 'save', 'assets', 'openFile', 'load',
279
279
  'onState', 'compare', 'onClose', 'settings', 'style', 'title', 'onError', 'timeout'];
280
280
  const READER_FEATURES = ['find', 'readAloud', 'share'];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rapier-embed",
3
- "version": "1.2.67",
3
+ "version": "1.2.69",
4
4
  "description": "Embed the Rapier Markdown editor or its lightweight reader (about 360 kB) in your web app. Runs offline from your own copy, saves to your storage, and takes your CSS and fonts. Your app's AI agent edits directly over WebMCP under the Will. MIT, no dependencies.",
5
5
  "keywords": [
6
6
  "markdown",