rapier-html 1.2.19 → 1.2.21

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/dist/wrap.mjs CHANGED
@@ -1,6 +1,7 @@
1
1
  // SPDX-License-Identifier: MIT
2
2
  import {encodeCarried, decodeCarried, writeParts, takeParts, readDocument, readBase, writeBase, takeBase} from './ledger/carried.mjs';
3
3
  import {sha256} from './ledger/hash.mjs';
4
+ import {isTemplatePage} from './ledger/template-page.mjs';
4
5
  import {PAGE_SEED, returnAddress, returnExpiresAt} from './return-address.mjs';
5
6
 
6
7
  const START = '<script type="text/markdown" id="rapier-document"';
@@ -97,8 +98,7 @@ export function portableNeeds(text, {base, flowchart} = {}) {
97
98
  for (const source of [text, base]) {
98
99
  if (typeof source !== 'string') continue;
99
100
  let prose = '';
100
- const front = /^---[ \t]*\r?\n[\s\S]*?\r?\n(?:---|\.\.\.)[ \t]*(?:\r?\n|$)/.exec(source);
101
- if (front && /^template:[ \t]*page[ \t]*$/m.test(front[0])) needs.add('layout');
101
+ if (isTemplatePage(source)) needs.add('layout');
102
102
  const lines = source.split(/\r\n|\r|\n/);
103
103
  for (let at = 0; at < lines.length; at++) {
104
104
  const open = /^ {0,3}(`{3,}|~{3,})\s*([^\s`]*)/.exec(lines[at]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rapier-html",
3
- "version": "1.2.19",
3
+ "version": "1.2.21",
4
4
  "description": "One command turns a Markdown file into one offline HTML file: the whole Rapier editor with the document inside. Opens in any browser, phone or desktop, with no install or account. Write, draw and paint watercolor, then Send back the edits to your AI agent.",
5
5
  "keywords": [
6
6
  "markdown",