@aiquants/markdown-explorer 0.37.0 → 0.37.1

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/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("./index-BmOU3xcK.cjs"),e=require("./storage-BpYsprog.cjs"),E=require("./location-DrOP6t1F.cjs"),_=require("./ownUrls-BTPGNhBt.cjs");exports.DEFAULT_MARKDOWN_EXPLORER_LOCALE=L.DEFAULT_MARKDOWN_EXPLORER_LOCALE;exports.EXPLORER_HOST_CHANGE_POLICIES=L.EXPLORER_HOST_CHANGE_POLICIES;exports.EXPLORER_THEMES=L.EXPLORER_THEMES;exports.MARKDOWN_EXPLORER_LABEL_CATALOGS=L.MARKDOWN_EXPLORER_LABEL_CATALOGS;exports.MARKDOWN_EXPLORER_LABEL_KEYS=L.MARKDOWN_EXPLORER_LABEL_KEYS;exports.MARKDOWN_EXPLORER_LABEL_TEMPLATES=L.MARKDOWN_EXPLORER_LABEL_TEMPLATES;exports.MARKDOWN_EXPLORER_LOCALES=L.MARKDOWN_EXPLORER_LOCALES;exports.MarkdownExplorer=L.MarkdownExplorer;exports.draftAnswerOf=L.draftAnswerOf;exports.draftConversionOf=L.draftConversionOf;exports.resolveMarkdownExplorerLabels=L.resolveMarkdownExplorerLabels;exports.shouldRevalidateExplorer=L.shouldRevalidateExplorer;exports.clearExplorerStorage=e.clearExplorerStorage;exports.COLUMN_MIN_MEASURE=E.COLUMN_MIN_MEASURE;exports.DEFAULT_TREE_SETTINGS=E.DEFAULT_TREE_SETTINGS;exports.DEFAULT_VIEW_SLUGS=E.DEFAULT_VIEW_SLUGS;exports.EXPAND_ALL_DEPTH_LIMITS=E.EXPAND_ALL_DEPTH_LIMITS;exports.EXPAND_ALL_FOLDER_LIMITS=E.EXPAND_ALL_FOLDER_LIMITS;exports.EXPLORER_DEFAULT_PERCENT=E.EXPLORER_DEFAULT_PERCENT;exports.EXPLORER_MAX_PERCENT=E.EXPLORER_MAX_PERCENT;exports.EXPLORER_MIN_REM=E.EXPLORER_MIN_REM;exports.EXPLORER_MULTI_DEFAULT_PERCENT=E.EXPLORER_MULTI_DEFAULT_PERCENT;exports.GOLDEN_RATIO=E.GOLDEN_RATIO;exports.MULTI_VIEW_COLUMN_LIMITS=E.MULTI_VIEW_COLUMN_LIMITS;exports.MULTI_VIEW_PANEL_LIMITS=E.MULTI_VIEW_PANEL_LIMITS;exports.REVEAL_DOCUMENT_DEPTH_LIMITS=E.REVEAL_DOCUMENT_DEPTH_LIMITS;exports.SPREADSHEET_BYTE_LIMITS=E.SPREADSHEET_BYTE_LIMITS;exports.WORKBOOK_BYTE_LIMITS=E.WORKBOOK_BYTE_LIMITS;exports.defineExplorerConfig=E.defineExplorerConfig;exports.explorerHref=E.explorerHref;exports.isExplorerSourceId=E.isExplorerSourceId;exports.resolveExplorerLocation=E.resolveExplorerLocation;exports.withExplorerSources=E.withExplorerSources;exports.DEFAULT_DENIED_PATH_SEGMENTS=_.DEFAULT_DENIED_PATH_SEGMENTS;exports.DOCUMENT_ID_ALPHABET=_.DOCUMENT_ID_ALPHABET;exports.DOCUMENT_ID_LENGTH=_.DOCUMENT_ID_LENGTH;exports.EXPLORER_EDIT_TOKEN_MAX_LENGTH=_.EXPLORER_EDIT_TOKEN_MAX_LENGTH;exports.EXPLORER_FAILURE_REASONS=_.EXPLORER_FAILURE_REASONS;exports.EXPLORER_MAX_HEADINGS=_.EXPLORER_MAX_HEADINGS;exports.MAX_DOCUMENT_PATH_LENGTH=_.MAX_DOCUMENT_PATH_LENGTH;exports.failureDocument=_.failureDocument;exports.failureOf=_.failureOf;exports.groupDocumentId=_.groupDocumentId;exports.isAcceptableDocumentPath=_.isAcceptableDocumentPath;exports.isCanonicalDocumentId=_.isCanonicalDocumentId;exports.isDeniedPath=_.isDeniedPath;exports.isExplorerChildrenResult=_.isExplorerChildrenResult;exports.isExplorerDocumentLang=_.isExplorerDocumentLang;exports.isExplorerFailureCode=_.isExplorerFailureCode;exports.isExplorerFailureReason=_.isExplorerFailureReason;exports.parseDocumentId=_.parseDocumentId;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("./index-Bz-n0dl1.cjs"),e=require("./storage-BpYsprog.cjs"),E=require("./location-DrOP6t1F.cjs"),_=require("./ownUrls-BTPGNhBt.cjs");exports.DEFAULT_MARKDOWN_EXPLORER_LOCALE=L.DEFAULT_MARKDOWN_EXPLORER_LOCALE;exports.EXPLORER_HOST_CHANGE_POLICIES=L.EXPLORER_HOST_CHANGE_POLICIES;exports.EXPLORER_THEMES=L.EXPLORER_THEMES;exports.MARKDOWN_EXPLORER_LABEL_CATALOGS=L.MARKDOWN_EXPLORER_LABEL_CATALOGS;exports.MARKDOWN_EXPLORER_LABEL_KEYS=L.MARKDOWN_EXPLORER_LABEL_KEYS;exports.MARKDOWN_EXPLORER_LABEL_TEMPLATES=L.MARKDOWN_EXPLORER_LABEL_TEMPLATES;exports.MARKDOWN_EXPLORER_LOCALES=L.MARKDOWN_EXPLORER_LOCALES;exports.MarkdownExplorer=L.MarkdownExplorer;exports.draftAnswerOf=L.draftAnswerOf;exports.draftConversionOf=L.draftConversionOf;exports.resolveMarkdownExplorerLabels=L.resolveMarkdownExplorerLabels;exports.shouldRevalidateExplorer=L.shouldRevalidateExplorer;exports.clearExplorerStorage=e.clearExplorerStorage;exports.COLUMN_MIN_MEASURE=E.COLUMN_MIN_MEASURE;exports.DEFAULT_TREE_SETTINGS=E.DEFAULT_TREE_SETTINGS;exports.DEFAULT_VIEW_SLUGS=E.DEFAULT_VIEW_SLUGS;exports.EXPAND_ALL_DEPTH_LIMITS=E.EXPAND_ALL_DEPTH_LIMITS;exports.EXPAND_ALL_FOLDER_LIMITS=E.EXPAND_ALL_FOLDER_LIMITS;exports.EXPLORER_DEFAULT_PERCENT=E.EXPLORER_DEFAULT_PERCENT;exports.EXPLORER_MAX_PERCENT=E.EXPLORER_MAX_PERCENT;exports.EXPLORER_MIN_REM=E.EXPLORER_MIN_REM;exports.EXPLORER_MULTI_DEFAULT_PERCENT=E.EXPLORER_MULTI_DEFAULT_PERCENT;exports.GOLDEN_RATIO=E.GOLDEN_RATIO;exports.MULTI_VIEW_COLUMN_LIMITS=E.MULTI_VIEW_COLUMN_LIMITS;exports.MULTI_VIEW_PANEL_LIMITS=E.MULTI_VIEW_PANEL_LIMITS;exports.REVEAL_DOCUMENT_DEPTH_LIMITS=E.REVEAL_DOCUMENT_DEPTH_LIMITS;exports.SPREADSHEET_BYTE_LIMITS=E.SPREADSHEET_BYTE_LIMITS;exports.WORKBOOK_BYTE_LIMITS=E.WORKBOOK_BYTE_LIMITS;exports.defineExplorerConfig=E.defineExplorerConfig;exports.explorerHref=E.explorerHref;exports.isExplorerSourceId=E.isExplorerSourceId;exports.resolveExplorerLocation=E.resolveExplorerLocation;exports.withExplorerSources=E.withExplorerSources;exports.DEFAULT_DENIED_PATH_SEGMENTS=_.DEFAULT_DENIED_PATH_SEGMENTS;exports.DOCUMENT_ID_ALPHABET=_.DOCUMENT_ID_ALPHABET;exports.DOCUMENT_ID_LENGTH=_.DOCUMENT_ID_LENGTH;exports.EXPLORER_EDIT_TOKEN_MAX_LENGTH=_.EXPLORER_EDIT_TOKEN_MAX_LENGTH;exports.EXPLORER_FAILURE_REASONS=_.EXPLORER_FAILURE_REASONS;exports.EXPLORER_MAX_HEADINGS=_.EXPLORER_MAX_HEADINGS;exports.MAX_DOCUMENT_PATH_LENGTH=_.MAX_DOCUMENT_PATH_LENGTH;exports.failureDocument=_.failureDocument;exports.failureOf=_.failureOf;exports.groupDocumentId=_.groupDocumentId;exports.isAcceptableDocumentPath=_.isAcceptableDocumentPath;exports.isCanonicalDocumentId=_.isCanonicalDocumentId;exports.isDeniedPath=_.isDeniedPath;exports.isExplorerChildrenResult=_.isExplorerChildrenResult;exports.isExplorerDocumentLang=_.isExplorerDocumentLang;exports.isExplorerFailureCode=_.isExplorerFailureCode;exports.isExplorerFailureReason=_.isExplorerFailureReason;exports.parseDocumentId=_.parseDocumentId;
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { ak as _, al as s, am as L, an as e, ao as r, ap as R, aq as T, ar as o, as as A, at as O, au as I, av as D } from "./index-dtjghDWY.js";
1
+ import { ak as _, al as s, am as L, an as e, ao as r, ap as R, aq as T, ar as o, as as A, at as O, au as I, av as D } from "./index-CVnGqEmh.js";
2
2
  import { c as N } from "./storage-D1uSw-xj.js";
3
3
  import { a0 as S, a1 as l, a2 as i, a3 as n, a4 as p, I as t, H as X, a5 as C, J as U, R as x, a6 as u, a7 as c, a8 as d, a9 as f, aa as H, ab as m, e as F, i as G, h as K, w as W } from "./location-Dh6K-y7w.js";
4
4
  import { D as B, ac as g, ad as v, ae as w, af as b, E as k, M as V, g as Y, k as j, Y as q, i as J, K as y, a as z, a2 as Q, b as Z, j as $, h as EE, T as aE } from "./ownUrls-DD0cSCsF.js";
@@ -1,5 +1,5 @@
1
1
  import { diff3Merge as d } from "node-diff3";
2
- import { C, a as R, b as u } from "./index-dtjghDWY.js";
2
+ import { C, a as R, b as u } from "./index-CVnGqEmh.js";
3
3
  const g = (n, o, e, l) => {
4
4
  if (o === n || o === e) return { kind: "clean", text: e };
5
5
  if (e === n) return { kind: "clean", text: o };
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("node-diff3"),r=require("./index-BmOU3xcK.cjs"),R=(n,t,i,l)=>{if(t===n||t===i)return{kind:"clean",text:i};if(i===n)return{kind:"clean",text:t};const d=g.diff3Merge(t.split(`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("node-diff3"),r=require("./index-Bz-n0dl1.cjs"),R=(n,t,i,l)=>{if(t===n||t===i)return{kind:"clean",text:i};if(i===n)return{kind:"clean",text:t};const d=g.diff3Merge(t.split(`
2
2
  `),n.split(`
3
3
  `),i.split(`
4
4
  `),{excludeFalseConflicts:!0}),o=[];let c=0;const u=s(l.ours),a=s(l.theirs);for(const e of d)e.ok!==void 0?o.push(...e.ok):e.conflict!==void 0&&(c+=1,o.push(`${r.CONFLICT_OURS_MARKER} ${u}`,...e.conflict.a,r.CONFLICT_SEPARATOR,...e.conflict.b,`${r.CONFLICT_THEIRS_MARKER} ${a}`));const f=o.join(`
@@ -1,5 +1,5 @@
1
1
  import { tapScrollCircleSampleVisual as _ } from "@aiquants/virtualscroll";
2
- import { T as L, d as r, e as l } from "./index-dtjghDWY.js";
2
+ import { T as L, d as r, e as l } from "./index-CVnGqEmh.js";
3
3
  const e = Object.freeze({
4
4
  renderVisual: _,
5
5
  ...l,
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("@aiquants/virtualscroll"),e=require("./index-BmOU3xcK.cjs"),C=Object.freeze({renderVisual:r.tapScrollCircleSampleVisual,...e.TAP_SCROLL_CIRCLE_SPEED_RANGE,size:e.TAP_SCROLL_CIRCLE_SIZE,offsetX:e.TAP_SCROLL_CIRCLE_OFFSET_X}),L=Object.freeze({...C,visibility:"scrolling"}),l=_=>_?L:C,t=Object.freeze({enabled:!1});exports.NO_TAP_SCROLL_CIRCLE=t;exports.TAP_SCROLL_CIRCLE=C;exports.TOUCH_TAP_SCROLL_CIRCLE=L;exports.tapScrollCircleFor=l;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("@aiquants/virtualscroll"),e=require("./index-Bz-n0dl1.cjs"),C=Object.freeze({renderVisual:r.tapScrollCircleSampleVisual,...e.TAP_SCROLL_CIRCLE_SPEED_RANGE,size:e.TAP_SCROLL_CIRCLE_SIZE,offsetX:e.TAP_SCROLL_CIRCLE_OFFSET_X}),L=Object.freeze({...C,visibility:"scrolling"}),l=_=>_?L:C,t=Object.freeze({enabled:!1});exports.NO_TAP_SCROLL_CIRCLE=t;exports.TAP_SCROLL_CIRCLE=C;exports.TOUCH_TAP_SCROLL_CIRCLE=L;exports.tapScrollCircleFor=l;
@@ -40,7 +40,7 @@ Tests and host styling may rely on the `data-testid` values and `data-aqmx-*` at
40
40
  | `data-testid="markdown-explorer-history"` | The revisions dialog (a modal `dialog`, named `historyTitle`) | Holds `-history-loading`, `-history-failure` or `-history-empty`, else `-history-list` of `-history-entry` buttons (`aria-pressed` for the one shown), the picked revision's text `-history-text` (focusable, so the keyboard scrolls it) or `-history-revision-failure`, and `-history-close` and `-history-restore` (`aria-disabled` until a revision's text is shown) |
41
41
  | `data-testid="markdown-explorer-document-refresh"` | The Refresh document button, in the bar | Reads that document alone again past the host's caches. The page views name it by its visible label (`refreshDocumentLabel`; tooltip `refreshDocument`); a panel's is icon-only, with `aria-label` and `title` set to `refreshDocumentNamed` (the panel title). Carries `aria-busy="true"` and `data-aqmx-busy="true"` while it runs, and `aria-disabled="true"` then and while the document loads (never `disabled`) |
42
42
  | `data-testid="markdown-explorer-document-permalink"` | The Copy permalink button, in the bar after Refresh document | Drawn with `documentIds` in the configuration while the document is not edited, from the server's render on (see [URL contract](url-contract.md#document-ids)); `aria-disabled="true"` while the document loads or failed, when it ignores presses. The page views name it by its visible label (`copyPermalinkLabel`; tooltip `copyPermalink`); a panel's is icon-only, with `aria-label` and `title` set to `copyPermalinkNamed`. Carries `data-aqmx-copy-outcome`: `idle`, then `copied` or `failed` for 2 seconds after a press, while its `title` says what happened (its name never changes; the announcer speaks the outcome). |
43
- | `data-testid="markdown-explorer-permalink-access-failure"` | The host's presenter's node for the latest Copy permalink press whose ID was refused by an access failure, in the bar below its button row | Carries `data-aqmx-failure` (`unauthorized` / `forbidden`). The place is `write`, with no retry (the reader presses again). The button keeps `data-aqmx-copy-outcome="idle"` and the announcer says nothing; the node goes at the next press and when the bar moves to another document (it does not come back on return), and while the document is edited, after which it is drawn again |
43
+ | `data-testid="markdown-explorer-permalink-access-failure"` | The host's presenter's node for the latest Copy permalink press whose ID was refused by an access failure, in the bar below its button row | Carries `data-aqmx-failure` (`unauthorized` / `forbidden`). The place is `write`, with no retry (the reader presses again). The button keeps `data-aqmx-copy-outcome="idle"` and the announcer says nothing; the node goes at the next press, when the bar moves to another document and when an edit of the document starts (it does not come back on return or once the edit ends) |
44
44
  | `data-testid="markdown-explorer-document-maximize"` | The Maximize button that ends the tree view's document bar | Icon-only, with `aria-label` and `title` naming what a press does (`documentMaximize`, or `documentRestore` while the document is maximized) and no `aria-pressed`; the same element in every state. Absent in the single view and in a multi-view panel |
45
45
  | `data-aqmx-maximized` | The tree view's document column (the bar and the document region, `data-aqmx-content-pane`) | `true` while the column covers the page — the document is maximized and has something to show, or its folder's README is being looked for — else `false` (a multi-view panel's frame carries the same attribute, see [Multi-panel view](#multi-panel-view)) |
46
46
  | `data-testid="markdown-explorer-document-refresh-failure"` | Notice of a document refresh that failed, inside the bar below its button row | No live role (the announcer speaks the same text); carries `data-aqmx-failure` (the reason). The failure is the document's answer, or the reading of the part the document's content reads itself (a table file's table, a document shown as written) when that content showed a copy of it, which stays. Shown while the copy of the document it kept stays on screen: a newer answer that replaces or confirms that copy, a move to another document (it does not come back on return), a switch between the document rendered and as written and that control's next refresh take it down. It is the one notice of a failed refresh: no notice inside the document repeats it |
@@ -194,7 +194,7 @@ In a tree or children listing, an entry with an empty name, or with a path the b
194
194
  It never keeps an empty or failed tree and never answers a tree past its time to live, counted from the moment its walk began: a page load or tree request after it waits for one new walk, which every concurrent request shares. At most one walk of a tree runs at a time per key; a walk a refresh or `forgetTree` superseded keeps running for the requests already waiting on it (they receive its tree, which is not kept) and is aborted once none waits, and the next walk starts once it settles (at once for a source that honours its signal).
195
195
  Each process keeps its own cache: `forgetTree(key)` drops a key another process refreshed, without starting a walk.
196
196
  - Each data response carries an opaque, pseudonymous scope (`X-Markdown-Explorer-Scope`): on the Node entry an HMAC of the principal's key under `scopeSecret`, which nobody without the secret can link to a principal, and on the browser runtime the one scope the host gives with the page's one principal key.
197
- When the browser sees a different scope — another reader signed in on the same browser — it drops every cached tree and document, clears the explorer's storage and reloads the page data (once per run of the loader, without cancelling a loader that is running). A 401 erases nothing and reloads the page data, whose loader answers a signed-out reader with `signedOutPage`.
197
+ When the browser sees a different scope — another reader signed in on the same browser — it drops every cached tree and document, clears the explorer's storage and reloads the page data (once per run of the loader, without cancelling a loader that is running). A 401 carries no scope, erases nothing and neither reloads the page data nor navigates: the place that met it draws the host's `accessFailure` presenter's node, whose sign-in action is the host's, and the reader's work (an unsaved draft) stays.
198
198
  - The page data carries the same scope, and the explorer records it in its storage namespace. On every page load, and whenever the page data names another reader, the recorded scope is compared during render — before any part of the explorer reads browser storage — and the namespace is erased unless it belongs to the page's reader (keys without a recorded scope are erased too).
199
199
  A new scope also clears and reseeds both browser stores in a layout effect, before the browser paints, and rebuilds the explorer's components, so no document of the previous reader is drawn and no expansion state, selection or panel arrangement survives in memory either. Each reader also has a live-region announcer of their own: the rebuilt explorer's regions (the root's and the sheet's) start empty, and neither what the previous reader was last told (a folder or document name) nor a message their work posted just before the switch reaches it.
200
200
  - The server keeps no failed tree and asks the source again for every document request (the sanitizer's cache only remembers what it made of a given HTML input). In the browser a failure is kept only until a pane has shown it: opening it again, or "Try again", asks the server again.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiquants/markdown-explorer",
3
- "version": "0.37.0",
3
+ "version": "0.37.1",
4
4
  "description": "Markdown document explorer for React Router 8 (framework mode): a source tree with a single-document view and a multi-panel reading view, storage-agnostic server ports, golden-ratio layout and an en / ja UI.",
5
5
  "sideEffects": [
6
6
  "**/*.css"