oasis-editor 0.0.403 → 0.0.404
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/OasisEditorApp-DWpOSren.js +1 -0
- package/dist/assets/{importDocxWorker-gjomIN7s.js → importDocxWorker-Cza4hyf3.js} +2 -2
- package/dist/core/document/tocLinks.d.ts +13 -0
- package/dist/core/document/tocOutline.d.ts +5 -0
- package/dist/{defaultToolbar-DEdxC5tS.js → defaultToolbar-DOUMCB_G.js} +1 -1
- package/dist/oasis-editor.js +1 -1
- package/dist/oasis-editor.umd.cjs +1 -1
- package/package.json +1 -1
- package/dist/OasisEditorApp-Dy8dQUQs.js +0 -1
|
@@ -9422,9 +9422,9 @@ while (n === s[++o] && n === s[++o] && n === s[++o] && n === s[++o] && n === s[+
|
|
|
9422
9422
|
const T = ot(lt(it(e, Qe, "textDirection"), "val"));
|
|
9423
9423
|
T && (r.textDirection = T);
|
|
9424
9424
|
const I = lt(it(e, Qe, "outlineLvl"), "val");
|
|
9425
|
-
if (
|
|
9425
|
+
if (null != I && /^[0-9]$/.test(I.trim())) {
|
|
9426
9426
|
const e = Number(I);
|
|
9427
|
-
Number.
|
|
9427
|
+
Number.isInteger(e) && e >= 0 && e <= 9 && (r.outlineLevel = e);
|
|
9428
9428
|
}
|
|
9429
9429
|
const _ = pt(e, "suppressLineNumbers");
|
|
9430
9430
|
void 0 !== _ && (r.suppressLineNumbers = _);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { EditorState, EditorLayoutDocument } from '../model.js';
|
|
2
|
+
import { TocPaginate } from './tocConvergence.js';
|
|
3
|
+
export interface TocLinkResult {
|
|
4
|
+
state: EditorState;
|
|
5
|
+
status: "updated" | "unchanged" | "unsupported" | "unresolved";
|
|
6
|
+
layout?: EditorLayoutDocument;
|
|
7
|
+
}
|
|
8
|
+
/** Qualify an already-current flat TOC before adding internal links.
|
|
9
|
+
* Preserve paragraph/run identities and text offsets. Re-measure after adding
|
|
10
|
+
* links; do not publish a candidate whose page labels no longer match.
|
|
11
|
+
* This is an opt-in staging API, not a Ribbon command or automatic refresh.
|
|
12
|
+
*/
|
|
13
|
+
export declare function linkQualifiedTableOfContents(original: EditorState, paginate?: TocPaginate): TocLinkResult;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { EditorDocument, EditorParagraphNode } from '../model.js';
|
|
2
|
+
/** Return a 1-based TOC level, null for body text, or undefined when the
|
|
3
|
+
* source style graph cannot certify the level. Unlike the general rendering
|
|
4
|
+
* cascade this bounded lookup never recurses on a malformed basedOn graph. */
|
|
5
|
+
export declare function createTocOutlineResolver(document: EditorDocument): (p: EditorParagraphNode) => number | null | undefined;
|