@aiquants/markdown 13.5.0 → 13.6.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
@@ -165,7 +165,7 @@ const parseResult = await parseMarkdown(
165
165
 
166
166
  | Option | Required | Meaning |
167
167
  | --- | --- | --- |
168
- | `deniedPathSegments` | ✅ | Deny rules applied to every target the conversion resolves: `@import` targets, images and links. A pattern matches one whole path segment (`*` matches any run of characters within it), compared after NFKC normalization and case folding at every percent-decoding level (the semantics of `@aiquants/markdown-explorer`'s deny rules). Local targets must also stay inside `workspaceRoot`, also once symbolic links are resolved. A refused image renders without `src`, a refused link without a destination (with `validateExistence`, both are marked like a missing target, whether or not the target exists), and a refused import rejects the call. |
168
+ | `deniedPathSegments` | ✅ | Deny rules applied to every target the conversion resolves: `@import` targets, images and links. A pattern matches one whole path segment (`*` matches any run of characters within it), compared after NFKC normalization and case folding at every percent-decoding level (the semantics of `@aiquants/markdown-explorer`'s deny rules). Local targets must also stay inside `workspaceRoot`, also once symbolic links are resolved; a name holding NUL as the file system reads it cannot be examined and is refused, while a further decoding level that holds NUL (`docs/%2500.png` names the file `docs/%00.png`, whose next decoding holds NUL) names no file, so the rules read its text and no link is looked up for it. A refused image renders without `src`, a refused link without a destination (with `validateExistence`, both are marked like a missing target, whether or not the target exists), and a refused import rejects the call. |
169
169
  | `maxHtmlBytes` | ✅ | The largest HTML in bytes, a positive integer up to `MAX_HTML_BYTES_LIMIT`; with `includeStreamingHints`, the HTML and its block offsets together, 5 bytes an offset. The service stops while it renders and the call rejects with `MarkdownResourceExhaustedError`, as it does for an answer with a longer HTML. |
170
170
  | `resolveImports` | | Expand `<!-- @import "path" -->` directives (default `false`: a directive stays an HTML comment and nothing is read). Only Markdown (`.md`) targets the deny rules admit are read, nested imports included; a refused target rejects the call with `permission_denied`. Imports nest at most 100 deep, one inside the next; a deeper chain rejects with `MarkdownResourceExhaustedError` before the import past the limit is read. |
171
171
  | `validateExistence` | | Probe local targets (default `true`): a local storage image also gets `data-asset-exists` (`"true"` or `"false"`) and a local doc link `data-doc-exists` (`"true"` or `"false"`). Cloud targets are never probed, and `data-asset-src` is written for every admitted storage image either way. |
@@ -189,7 +189,7 @@ An image destination is a URL decoded once: `![](a%2541.png)` names the file `a%
189
189
 
190
190
  - **Storage images** (a local file inside `workspaceRoot`, or a `gcs://` / `gdrive://` object) have no `src`. Their document path is in `data-asset-src`, unescaped: the path from `workspaceRoot` for a local file (`資料/進捗100%.png`, `x.data`), the URI decoded once for a cloud object (`gcs://bucket/reports/fig 1.png`). The host writes the `src` from it, encoding the path for its own route; no URL is signed.
191
191
  - **Existence**: with `validateExistence`, a local storage image also carries `data-asset-exists` (`"true"` or `"false"`); a cloud image is never probed.
192
- - **Refused targets** (the deny rules, or outside `workspaceRoot`) have neither a `src` nor `data-asset-src`; with `validateExistence` they carry `data-asset-exists="false"` whether or not they exist.
192
+ - **Refused targets** (the deny rules, outside `workspaceRoot`, or a name the file system cannot examine, such as one holding NUL: `![](docs/%00.png)`) have neither a `src` nor `data-asset-src`; with `validateExistence` they carry `data-asset-exists="false"` whether or not they exist.
193
193
  - **Storage links** are `data-link-kind="doc"`: they keep the authored `href` (its fragment is what a host reads) and carry the document path in `data-doc-path`; a local one also gets `data-doc-exists` under `validateExistence`.
194
194
  - The asset markers (`data-asset-src`, `data-asset-exists`) and the link markers (`data-link-kind`, `data-doc-path`, `data-doc-exists`) come only from the converter: those written in the document's raw HTML (on any element, an `a` without an `href` included) or added by an HTML plugin are removed, and one a plugin rewrote gets the converter's value back.
195
195
  - Of an element's duplicate attributes only the first counts, as in a browser: the converter drops the rest, so the HTML carries no duplicate attribute and a repeated `src` or marker cannot make the converter and the browser read different values.
Binary file
@@ -2,7 +2,7 @@
2
2
 
3
3
  `frame.js` next to this file (`@aiquants/markdown/mermaid-frame`) bundles the drawing place's script of this package with Mermaid. It contains code of the following npm packages.
4
4
 
5
- ## @aiquants/markdown 13.5.0
5
+ ## @aiquants/markdown 13.6.0
6
6
 
7
7
  ```text
8
8
  MIT License
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiquants/markdown",
3
- "version": "13.5.0",
3
+ "version": "13.6.0",
4
4
  "description": "Markdown renderer for React with advanced features",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -127,15 +127,15 @@
127
127
  "zenn-content-css": "^0.1.162"
128
128
  },
129
129
  "peerDependencies": {
130
- "@aiquants/spreadsheet": "^0.20.0",
130
+ "@aiquants/spreadsheet": "^0.21.0",
131
131
  "react": "^19.2.7",
132
132
  "react-dom": "^19.2.7",
133
133
  "vite": "^7.0.6"
134
134
  },
135
135
  "devDependencies": {
136
136
  "@aiquants/platform-packaging": "0.1.1",
137
- "@aiquants/spreadsheet": "0.20.1",
138
- "@aiquants/virtualscroll": "3.27.0",
137
+ "@aiquants/spreadsheet": "0.21.0",
138
+ "@aiquants/virtualscroll": "3.28.0",
139
139
  "@bufbuild/protoc-gen-es": "^1.10.1",
140
140
  "@connectrpc/connect-node": "^1.7.0",
141
141
  "@connectrpc/connect-web": "^1.7.0",
@@ -184,10 +184,10 @@
184
184
  "access": "public"
185
185
  },
186
186
  "optionalDependencies": {
187
- "@aiquants/markdown-linux-x64": "13.5.0",
188
- "@aiquants/markdown-linux-arm64": "13.5.0",
189
- "@aiquants/markdown-darwin-x64": "13.5.0",
190
- "@aiquants/markdown-darwin-arm64": "13.5.0"
187
+ "@aiquants/markdown-linux-x64": "13.6.0",
188
+ "@aiquants/markdown-linux-arm64": "13.6.0",
189
+ "@aiquants/markdown-darwin-x64": "13.6.0",
190
+ "@aiquants/markdown-darwin-arm64": "13.6.0"
191
191
  },
192
192
  "scripts": {
193
193
  "build": "pnpm -w run workspace:build \"$PNPM_SCRIPT_SRC_DIR\"",