@owomark/core 0.1.7 → 0.1.9
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/.build-manifest.json +9 -8
- package/dist/browser.d.ts +9 -5
- package/dist/browser.js +3 -1
- package/dist/{chunk-GA5EFGSZ.js → chunk-WV2K5MNU.js} +123 -16
- package/dist/{chunk-CJSBFWKS.js → chunk-YS3HGP3M.js} +38 -38
- package/dist/{editor-core-DbPhn6aI.d.ts → editor-core-edBvPqBi.d.ts} +1 -1
- package/dist/index.d.ts +7 -7
- package/dist/index.js +1 -1
- package/dist/internal/dom-adapter.d.ts +3 -3
- package/dist/internal/dom-adapter.js +2 -2
- package/dist/{public-zMo7BR9l.d.ts → public-BjF6yWIR.d.ts} +5 -1
- package/dist/{registry-C849sxCo.d.ts → registry-DI94xf3v.d.ts} +1 -1
- package/dist/semantic/components/index.d.ts +3 -3
- package/dist/semantic/editor/index.d.ts +2 -2
- package/dist/semantic/index.d.ts +2 -2
- package/dist/semantic/runtime/index.d.ts +2 -2
- package/dist/semantic/shared/index.d.ts +3 -3
- package/dist/semantic/syntax/index.d.ts +2 -2
- package/dist/{types-DMqYF6Zn.d.ts → types-0QKyuzQy.d.ts} +1 -1
- package/package.json +1 -1
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"packageName": "@owomark/core",
|
|
4
4
|
"packagePath": "owomark/packages/owomark-core",
|
|
5
|
-
"packageFingerprint": "
|
|
6
|
-
"workspaceFingerprint": "
|
|
7
|
-
"builtAt": "2026-04-
|
|
5
|
+
"packageFingerprint": "8db4cbc05bde390fdc26e52f8d57f3f0fd5bfbf27af1ef9991bf015a3f7b5f69",
|
|
6
|
+
"workspaceFingerprint": "947c542dce3fedf4a242f46f580a35ff336c5a64ac6448d24339650ad9dac6a1",
|
|
7
|
+
"builtAt": "2026-04-23T10:30:21.564Z",
|
|
8
8
|
"builderVersion": "2026-04-22-industrialization-v1",
|
|
9
9
|
"inputFiles": [
|
|
10
10
|
"owomark/package.json",
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"owomark/packages/owomark-core/src/core/core-types.ts",
|
|
31
31
|
"owomark/packages/owomark-core/src/core/editor-core.ts",
|
|
32
32
|
"owomark/packages/owomark-core/src/core/index.ts",
|
|
33
|
+
"owomark/packages/owomark-core/src/custom/cards-family.ts",
|
|
33
34
|
"owomark/packages/owomark-core/src/index.ts",
|
|
34
35
|
"owomark/packages/owomark-core/src/internal/clipboard/paste.ts",
|
|
35
36
|
"owomark/packages/owomark-core/src/internal/commands/word-boundary.ts",
|
|
@@ -97,11 +98,11 @@
|
|
|
97
98
|
"dist/chunk-MPIWZLI3.js",
|
|
98
99
|
"dist/chunk-OOH46GIF.js",
|
|
99
100
|
"dist/chunk-ROJILHRQ.js",
|
|
100
|
-
"dist/chunk-SHVM2TPY.js",
|
|
101
101
|
"dist/chunk-WFPUIPWU.js",
|
|
102
102
|
"dist/chunk-WXVKSKP3.js",
|
|
103
|
+
"dist/chunk-Y7X2CZZ7.js",
|
|
103
104
|
"dist/chunk-YZYJIXGO.js",
|
|
104
|
-
"dist/editor-core-
|
|
105
|
+
"dist/editor-core-BSoeizSI.d.ts",
|
|
105
106
|
"dist/index.d.ts",
|
|
106
107
|
"dist/index.js",
|
|
107
108
|
"dist/internal/clipboard/paste.d.ts",
|
|
@@ -110,8 +111,8 @@
|
|
|
110
111
|
"dist/internal/commands/word-boundary.js",
|
|
111
112
|
"dist/internal/dom-adapter.d.ts",
|
|
112
113
|
"dist/internal/dom-adapter.js",
|
|
113
|
-
"dist/public-
|
|
114
|
-
"dist/registry-
|
|
114
|
+
"dist/public-cCK3rvQc.d.ts",
|
|
115
|
+
"dist/registry-6IkGJsLt.d.ts",
|
|
115
116
|
"dist/semantic/components/index.d.ts",
|
|
116
117
|
"dist/semantic/components/index.js",
|
|
117
118
|
"dist/semantic/editor/index.d.ts",
|
|
@@ -124,7 +125,7 @@
|
|
|
124
125
|
"dist/semantic/shared/index.js",
|
|
125
126
|
"dist/semantic/syntax/index.d.ts",
|
|
126
127
|
"dist/semantic/syntax/index.js",
|
|
127
|
-
"dist/types-
|
|
128
|
+
"dist/types-BdOo-u1R.d.ts"
|
|
128
129
|
],
|
|
129
130
|
"localDependencyFingerprints": {}
|
|
130
131
|
}
|
package/dist/browser.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { O as OwoMarkSelection, a as OwoMarkDocument, D as DirtyRange, I as InlineTokenType, e as InlineToken, f as PreviewBlock } from './public-
|
|
2
|
-
import { O as OwoMarkScrollProjectionSnapshot, a as OwoMarkSurfaceGeometrySnapshot, b as OwoMarkScrollController } from './types-
|
|
1
|
+
import { O as OwoMarkSelection, a as OwoMarkDocument, D as DirtyRange, I as InlineTokenType, e as InlineToken, f as ContainerFrame, g as PreviewBlock } from './public-BjF6yWIR.js';
|
|
2
|
+
import { O as OwoMarkScrollProjectionSnapshot, a as OwoMarkSurfaceGeometrySnapshot, b as OwoMarkScrollController } from './types-0QKyuzQy.js';
|
|
3
3
|
|
|
4
4
|
declare function invalidateBlockCache(root: HTMLElement): void;
|
|
5
5
|
|
|
@@ -41,12 +41,12 @@ declare function detectAndRenderDirty(root: HTMLElement, oldDoc: OwoMarkDocument
|
|
|
41
41
|
declare const TOKEN_CLASS_EXEMPTIONS: Set<"text" | "strong-marker" | "strong" | "emphasis-marker" | "emphasis" | "custom-inline-marker" | "custom-inline" | "code-marker" | "code" | "link-bracket" | "link-text" | "link-url" | "reference-bracket" | "reference-label" | "image-marker" | "image-alt" | "image-url" | "heading-marker" | "list-marker" | "task-marker" | "task-marker-checked" | "table-separator" | "blockquote-marker" | "fence-marker" | "fence-lang" | "code-block-text" | "strikethrough-marker" | "strikethrough" | "math-marker" | "math-text" | "hr" | "html">;
|
|
42
42
|
declare const TOKEN_TO_CLASS: Record<InlineTokenType, string>;
|
|
43
43
|
declare const BLOCK_TYPE_TO_CLASS: Record<string, string>;
|
|
44
|
-
declare function createBlockElement(doc: Document, tokens: InlineToken[], blockIndex: number, blockType: string, headingLevel?: number, depth?: number): HTMLDivElement;
|
|
44
|
+
declare function createBlockElement(doc: Document, tokens: InlineToken[], blockIndex: number, blockType: string, headingLevel?: number, depth?: number, ancestry?: readonly ContainerFrame[]): HTMLDivElement;
|
|
45
45
|
/**
|
|
46
46
|
* Update an existing block element's content with new tokens.
|
|
47
47
|
* Returns true if the block was modified.
|
|
48
48
|
*/
|
|
49
|
-
declare function updateBlockElement(doc: Document, existing: HTMLDivElement, tokens: InlineToken[], blockType: string, headingLevel?: number, depth?: number): boolean;
|
|
49
|
+
declare function updateBlockElement(doc: Document, existing: HTMLDivElement, tokens: InlineToken[], blockType: string, headingLevel?: number, depth?: number, ancestry?: readonly ContainerFrame[]): boolean;
|
|
50
50
|
|
|
51
51
|
declare const BQ_STEP: number;
|
|
52
52
|
/**
|
|
@@ -54,6 +54,10 @@ declare const BQ_STEP: number;
|
|
|
54
54
|
* Returns null when depth <= 1 (no extra bars needed — the first bar is
|
|
55
55
|
* rendered by the block's own border/class styling).
|
|
56
56
|
*/
|
|
57
|
+
declare function getBlockquoteDepthFromAncestry(ancestry: readonly {
|
|
58
|
+
kind: string;
|
|
59
|
+
depth: number;
|
|
60
|
+
}[]): number;
|
|
57
61
|
declare function buildBlockquoteBarsBoxShadow(depth: number): string | null;
|
|
58
62
|
|
|
59
63
|
declare function measureEditorSurfaceGeometry(projection: OwoMarkScrollProjectionSnapshot, editorRoot: HTMLElement, _body?: string): OwoMarkSurfaceGeometrySnapshot;
|
|
@@ -63,4 +67,4 @@ declare function createScrollController(): OwoMarkScrollController & {
|
|
|
63
67
|
updateProjection(previewBlocks: readonly PreviewBlock[], documentRevision: number): void;
|
|
64
68
|
};
|
|
65
69
|
|
|
66
|
-
export { BLOCK_TYPE_TO_CLASS, BQ_STEP, TOKEN_CLASS_EXEMPTIONS, TOKEN_TO_CLASS, buildBlockquoteBarsBoxShadow, createBlockElement, createScrollController, detectAndRenderDirty, domRangeToOffset, fullRender, invalidateBlockCache, measureEditorSurfaceGeometry, measurePreviewSurfaceGeometry, offsetToDomRange, patchDirtyBlocks, readSelection, restoreSelection, updateBlockElement };
|
|
70
|
+
export { BLOCK_TYPE_TO_CLASS, BQ_STEP, TOKEN_CLASS_EXEMPTIONS, TOKEN_TO_CLASS, buildBlockquoteBarsBoxShadow, createBlockElement, createScrollController, detectAndRenderDirty, domRangeToOffset, fullRender, getBlockquoteDepthFromAncestry, invalidateBlockCache, measureEditorSurfaceGeometry, measurePreviewSurfaceGeometry, offsetToDomRange, patchDirtyBlocks, readSelection, restoreSelection, updateBlockElement };
|
package/dist/browser.js
CHANGED
|
@@ -14,13 +14,14 @@ import {
|
|
|
14
14
|
detectAndRenderDirty,
|
|
15
15
|
domRangeToOffset,
|
|
16
16
|
fullRender,
|
|
17
|
+
getBlockquoteDepthFromAncestry,
|
|
17
18
|
invalidateBlockCache,
|
|
18
19
|
offsetToDomRange,
|
|
19
20
|
patchDirtyBlocks,
|
|
20
21
|
readSelection,
|
|
21
22
|
restoreSelection,
|
|
22
23
|
updateBlockElement
|
|
23
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-YS3HGP3M.js";
|
|
24
25
|
import {
|
|
25
26
|
deriveSourceKey
|
|
26
27
|
} from "./chunk-WFPUIPWU.js";
|
|
@@ -385,6 +386,7 @@ export {
|
|
|
385
386
|
detectAndRenderDirty,
|
|
386
387
|
domRangeToOffset,
|
|
387
388
|
fullRender,
|
|
389
|
+
getBlockquoteDepthFromAncestry,
|
|
388
390
|
invalidateBlockCache,
|
|
389
391
|
measureEditorSurfaceGeometry,
|
|
390
392
|
measurePreviewSurfaceGeometry,
|
|
@@ -470,6 +470,25 @@ function matchDelimitedRange(raw, index, baseOffset, delimiter, markerType, cont
|
|
|
470
470
|
]
|
|
471
471
|
};
|
|
472
472
|
}
|
|
473
|
+
function matchDisplayMathInline(raw, index, baseOffset) {
|
|
474
|
+
if (raw[index] !== "$" || raw[index + 1] !== "$" || isEscaped(raw, index)) return null;
|
|
475
|
+
const contentStart = index + 2;
|
|
476
|
+
if (contentStart >= raw.length) return null;
|
|
477
|
+
for (let cursor = contentStart; cursor < raw.length - 1; cursor += 1) {
|
|
478
|
+
if (raw[cursor] === "$" && raw[cursor + 1] === "$" && !isEscaped(raw, cursor)) {
|
|
479
|
+
if (cursor === contentStart) return null;
|
|
480
|
+
return {
|
|
481
|
+
end: cursor + 2,
|
|
482
|
+
tokens: [
|
|
483
|
+
tok("math-marker", "$$", baseOffset + index),
|
|
484
|
+
tok("math-text", raw.slice(contentStart, cursor), baseOffset + contentStart),
|
|
485
|
+
tok("math-marker", "$$", baseOffset + cursor)
|
|
486
|
+
]
|
|
487
|
+
};
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
return null;
|
|
491
|
+
}
|
|
473
492
|
function matchInlineMath(raw, index, baseOffset) {
|
|
474
493
|
if (raw[index] !== "$" || isEscaped(raw, index)) return null;
|
|
475
494
|
if (raw[index + 1] === "$") return null;
|
|
@@ -565,7 +584,7 @@ function tryMatch(raw, index, baseOffset, extensions, options) {
|
|
|
565
584
|
return match;
|
|
566
585
|
}
|
|
567
586
|
}
|
|
568
|
-
return matchCodeSpan(raw, index, baseOffset) ?? resolvePriorityMatch(raw, index, baseOffset, extensions, "before-link", blockType) ?? matchLinkLike(raw, index, baseOffset, true, options) ?? matchLinkLike(raw, index, baseOffset, false, options) ?? matchDelimitedRange(raw, index, baseOffset, "~~", "strikethrough-marker", "strikethrough") ?? matchInlineMath(raw, index, baseOffset) ?? matchHtml(raw, index, baseOffset) ?? resolvePriorityMatch(raw, index, baseOffset, extensions, "before-emphasis", blockType) ?? matchStrong(raw, index, baseOffset) ?? matchEmphasis(raw, index, baseOffset);
|
|
587
|
+
return matchCodeSpan(raw, index, baseOffset) ?? resolvePriorityMatch(raw, index, baseOffset, extensions, "before-link", blockType) ?? matchLinkLike(raw, index, baseOffset, true, options) ?? matchLinkLike(raw, index, baseOffset, false, options) ?? matchDelimitedRange(raw, index, baseOffset, "~~", "strikethrough-marker", "strikethrough") ?? matchDisplayMathInline(raw, index, baseOffset) ?? matchInlineMath(raw, index, baseOffset) ?? matchHtml(raw, index, baseOffset) ?? resolvePriorityMatch(raw, index, baseOffset, extensions, "before-emphasis", blockType) ?? matchStrong(raw, index, baseOffset) ?? matchEmphasis(raw, index, baseOffset);
|
|
569
588
|
}
|
|
570
589
|
function resolvePriorityMatch(raw, index, baseOffset, extensions, priority, blockType) {
|
|
571
590
|
for (const matcher of resolveExtensionMatchers(extensions, priority, blockType)) {
|
|
@@ -1634,10 +1653,73 @@ function blockToConformance(block, referenceDefinitions) {
|
|
|
1634
1653
|
return null;
|
|
1635
1654
|
}
|
|
1636
1655
|
}
|
|
1656
|
+
function sameConformanceAncestry(left, right) {
|
|
1657
|
+
return left.length === right.length && left.every((frame, index) => frame.kind === right[index]?.kind && frame.depth === right[index]?.depth);
|
|
1658
|
+
}
|
|
1659
|
+
function isSoftBreakMergeCandidate(block) {
|
|
1660
|
+
return (block.type === "paragraph" || block.type === "blockquote") && block.raw.trim() !== "";
|
|
1661
|
+
}
|
|
1662
|
+
function mergeSoftBreakConformanceBlocks(blocks, startIndex, referenceDefinitions) {
|
|
1663
|
+
const firstBlock = blocks[startIndex];
|
|
1664
|
+
if (!isSoftBreakMergeCandidate(firstBlock)) {
|
|
1665
|
+
return null;
|
|
1666
|
+
}
|
|
1667
|
+
const firstConformance = blockToConformance(firstBlock, referenceDefinitions);
|
|
1668
|
+
if (firstConformance == null || firstConformance.kind !== "paragraph" && firstConformance.kind !== "blockquote") {
|
|
1669
|
+
return null;
|
|
1670
|
+
}
|
|
1671
|
+
const inline = [...firstConformance.inline];
|
|
1672
|
+
let sourceBlockCount = 1;
|
|
1673
|
+
let nextIndex = startIndex + 1;
|
|
1674
|
+
while (nextIndex < blocks.length) {
|
|
1675
|
+
const nextBlock = blocks[nextIndex];
|
|
1676
|
+
if (!isSoftBreakMergeCandidate(nextBlock) || (firstBlock.type === "paragraph" && nextBlock.type !== "paragraph" || firstBlock.type === "blockquote" && nextBlock.type !== "blockquote")) {
|
|
1677
|
+
break;
|
|
1678
|
+
}
|
|
1679
|
+
const nextConformance = blockToConformance(nextBlock, referenceDefinitions);
|
|
1680
|
+
if (nextConformance == null || nextConformance.kind !== firstConformance.kind || !sameConformanceAncestry(firstConformance.ancestry, nextConformance.ancestry)) {
|
|
1681
|
+
break;
|
|
1682
|
+
}
|
|
1683
|
+
if (firstConformance.kind === "blockquote" && nextConformance.kind === "blockquote" && nextConformance.depth !== firstConformance.depth) {
|
|
1684
|
+
break;
|
|
1685
|
+
}
|
|
1686
|
+
inline.push({ kind: "softBreak" });
|
|
1687
|
+
inline.push(...nextConformance.inline);
|
|
1688
|
+
sourceBlockCount += 1;
|
|
1689
|
+
nextIndex += 1;
|
|
1690
|
+
}
|
|
1691
|
+
return {
|
|
1692
|
+
block: sourceBlockCount === 1 ? firstConformance : {
|
|
1693
|
+
...firstConformance,
|
|
1694
|
+
inline,
|
|
1695
|
+
sourceBlockCount
|
|
1696
|
+
},
|
|
1697
|
+
nextIndex
|
|
1698
|
+
};
|
|
1699
|
+
}
|
|
1637
1700
|
function buildConformanceDocument(blocks) {
|
|
1638
1701
|
const referenceDefinitions = [...collectReferenceDefinitionMap(blocks).values()];
|
|
1702
|
+
const conformanceBlocks = [];
|
|
1703
|
+
for (let index = 0; index < blocks.length; ) {
|
|
1704
|
+
const block = blocks[index];
|
|
1705
|
+
if (block.type === "paragraph" && block.raw.trim() === "") {
|
|
1706
|
+
index += 1;
|
|
1707
|
+
continue;
|
|
1708
|
+
}
|
|
1709
|
+
const merged = mergeSoftBreakConformanceBlocks(blocks, index, referenceDefinitions);
|
|
1710
|
+
if (merged) {
|
|
1711
|
+
conformanceBlocks.push(merged.block);
|
|
1712
|
+
index = merged.nextIndex;
|
|
1713
|
+
continue;
|
|
1714
|
+
}
|
|
1715
|
+
const conformance = blockToConformance(block, referenceDefinitions);
|
|
1716
|
+
if (conformance) {
|
|
1717
|
+
conformanceBlocks.push(conformance);
|
|
1718
|
+
}
|
|
1719
|
+
index += 1;
|
|
1720
|
+
}
|
|
1639
1721
|
return {
|
|
1640
|
-
blocks:
|
|
1722
|
+
blocks: conformanceBlocks
|
|
1641
1723
|
};
|
|
1642
1724
|
}
|
|
1643
1725
|
function hydrateOwoMarkDocument(blocks) {
|
|
@@ -1662,6 +1744,8 @@ function inlineToMdast(nodes) {
|
|
|
1662
1744
|
switch (node.kind) {
|
|
1663
1745
|
case "text":
|
|
1664
1746
|
return { type: "text", value: node.text };
|
|
1747
|
+
case "softBreak":
|
|
1748
|
+
return { type: "text", value: "\n" };
|
|
1665
1749
|
case "strong":
|
|
1666
1750
|
return { type: "strong", children: inlineToMdast(node.children) };
|
|
1667
1751
|
case "emphasis":
|
|
@@ -1796,7 +1880,39 @@ function tokensToDecorators(tokens, raw, baseOffset) {
|
|
|
1796
1880
|
}
|
|
1797
1881
|
return decorators;
|
|
1798
1882
|
}
|
|
1799
|
-
function
|
|
1883
|
+
function emitPrefixTokens(prefixText, start, ancestry) {
|
|
1884
|
+
if (!prefixText) return [];
|
|
1885
|
+
const hasBqAncestry = ancestry.some((f) => f.kind === "blockquote");
|
|
1886
|
+
if (hasBqAncestry) {
|
|
1887
|
+
const bqMatch = prefixText.match(/^((?:>\s?)+)/);
|
|
1888
|
+
if (bqMatch) {
|
|
1889
|
+
const markerText = bqMatch[1];
|
|
1890
|
+
const tokens = [{
|
|
1891
|
+
type: "blockquote-marker",
|
|
1892
|
+
text: markerText,
|
|
1893
|
+
start,
|
|
1894
|
+
end: start + markerText.length
|
|
1895
|
+
}];
|
|
1896
|
+
if (markerText.length < prefixText.length) {
|
|
1897
|
+
const rest = prefixText.slice(markerText.length);
|
|
1898
|
+
tokens.push({
|
|
1899
|
+
type: "text",
|
|
1900
|
+
text: rest,
|
|
1901
|
+
start: start + markerText.length,
|
|
1902
|
+
end: start + prefixText.length
|
|
1903
|
+
});
|
|
1904
|
+
}
|
|
1905
|
+
return tokens;
|
|
1906
|
+
}
|
|
1907
|
+
}
|
|
1908
|
+
return [{
|
|
1909
|
+
type: "text",
|
|
1910
|
+
text: prefixText,
|
|
1911
|
+
start,
|
|
1912
|
+
end: start + prefixText.length
|
|
1913
|
+
}];
|
|
1914
|
+
}
|
|
1915
|
+
function buildStructuredDecorators(lines, blockType, baseOffset, options, ancestry = []) {
|
|
1800
1916
|
if (lines.length === 1 && lines[0].prefixLength === 0 && lines[0].raw === lines[0].syntax) {
|
|
1801
1917
|
return tokensToDecorators(tokenizeBlock(lines[0].raw, blockType, baseOffset, options), lines[0].raw, baseOffset);
|
|
1802
1918
|
}
|
|
@@ -1810,12 +1926,7 @@ function buildStructuredDecorators(lines, blockType, baseOffset, options) {
|
|
|
1810
1926
|
rawCursor += 1;
|
|
1811
1927
|
}
|
|
1812
1928
|
if (line.prefixLength > 0) {
|
|
1813
|
-
tokens.push(
|
|
1814
|
-
type: "text",
|
|
1815
|
-
text: line.raw.slice(0, line.prefixLength),
|
|
1816
|
-
start: rawCursor,
|
|
1817
|
-
end: rawCursor + line.prefixLength
|
|
1818
|
-
});
|
|
1929
|
+
tokens.push(...emitPrefixTokens(line.raw.slice(0, line.prefixLength), rawCursor, ancestry));
|
|
1819
1930
|
}
|
|
1820
1931
|
const syntaxOffset = rawCursor + line.prefixLength;
|
|
1821
1932
|
if (index === 0) {
|
|
@@ -1869,12 +1980,7 @@ function buildStructuredDecorators(lines, blockType, baseOffset, options) {
|
|
|
1869
1980
|
rawCursor += 1;
|
|
1870
1981
|
}
|
|
1871
1982
|
if (line.prefixLength > 0) {
|
|
1872
|
-
tokens.push(
|
|
1873
|
-
type: "text",
|
|
1874
|
-
text: line.raw.slice(0, line.prefixLength),
|
|
1875
|
-
start: rawCursor,
|
|
1876
|
-
end: rawCursor + line.prefixLength
|
|
1877
|
-
});
|
|
1983
|
+
tokens.push(...emitPrefixTokens(line.raw.slice(0, line.prefixLength), rawCursor, ancestry));
|
|
1878
1984
|
}
|
|
1879
1985
|
const syntaxOffset = rawCursor + line.prefixLength;
|
|
1880
1986
|
tokens.push(...tokenizeBlock(line.syntax, blockType, syntaxOffset, options));
|
|
@@ -1914,7 +2020,8 @@ function createBlock(input) {
|
|
|
1914
2020
|
input.lines ?? [{ raw: input.raw, syntax: input.syntaxRaw, prefixLength: input.raw.length - input.syntaxRaw.length }],
|
|
1915
2021
|
input.type,
|
|
1916
2022
|
input.offset,
|
|
1917
|
-
input.tokenizeOptions ?? {}
|
|
2023
|
+
input.tokenizeOptions ?? {},
|
|
2024
|
+
input.ancestry
|
|
1918
2025
|
);
|
|
1919
2026
|
const base = {
|
|
1920
2027
|
raw: input.raw,
|
|
@@ -250,6 +250,15 @@ function readSelection(root) {
|
|
|
250
250
|
var BQ_BAR_WIDTH = 3;
|
|
251
251
|
var BQ_GAP = 12;
|
|
252
252
|
var BQ_STEP = BQ_BAR_WIDTH + BQ_GAP;
|
|
253
|
+
function getBlockquoteDepthFromAncestry(ancestry) {
|
|
254
|
+
let maxDepth = 0;
|
|
255
|
+
for (const frame of ancestry) {
|
|
256
|
+
if (frame.kind === "blockquote" && frame.depth > maxDepth) {
|
|
257
|
+
maxDepth = frame.depth;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
return maxDepth;
|
|
261
|
+
}
|
|
253
262
|
function buildBlockquoteBarsBoxShadow(depth) {
|
|
254
263
|
if (depth <= 1) return null;
|
|
255
264
|
const shadows = [];
|
|
@@ -269,6 +278,20 @@ function applyBlockquoteBarsStyle(el, depth) {
|
|
|
269
278
|
el.style.paddingLeft = `${depth * BQ_STEP}px`;
|
|
270
279
|
el.style.boxShadow = shadow;
|
|
271
280
|
}
|
|
281
|
+
function applyBlockquoteVisuals(el, blockType, depth, ancestry) {
|
|
282
|
+
const bqDepth = blockType === "blockquote" ? depth && depth > 0 ? depth : 0 : ancestry ? getBlockquoteDepthFromAncestry(ancestry) : 0;
|
|
283
|
+
if (bqDepth > 0) {
|
|
284
|
+
el.setAttribute("data-owo-depth", String(bqDepth));
|
|
285
|
+
if (blockType !== "blockquote") {
|
|
286
|
+
el.className += " owo-block-blockquote";
|
|
287
|
+
}
|
|
288
|
+
applyBlockquoteBarsStyle(el, bqDepth);
|
|
289
|
+
} else {
|
|
290
|
+
el.removeAttribute("data-owo-depth");
|
|
291
|
+
el.style.paddingLeft = "";
|
|
292
|
+
el.style.boxShadow = "";
|
|
293
|
+
}
|
|
294
|
+
}
|
|
272
295
|
var TOKEN_TO_CLASS = {
|
|
273
296
|
"text": "",
|
|
274
297
|
"strong-marker": "owo-syntax-marker",
|
|
@@ -318,17 +341,14 @@ var BLOCK_TYPE_TO_CLASS = {
|
|
|
318
341
|
"math-block": "owo-block-math",
|
|
319
342
|
"table": "owo-block-table"
|
|
320
343
|
};
|
|
321
|
-
function createBlockElement(doc, tokens, blockIndex, blockType, headingLevel, depth) {
|
|
344
|
+
function createBlockElement(doc, tokens, blockIndex, blockType, headingLevel, depth, ancestry) {
|
|
322
345
|
const div = doc.createElement("div");
|
|
323
346
|
div.setAttribute("data-owo-block", String(blockIndex));
|
|
324
347
|
div.className = BLOCK_TYPE_TO_CLASS[blockType] || "owo-block-paragraph";
|
|
325
348
|
if (blockType === "heading" && headingLevel) {
|
|
326
349
|
div.setAttribute("data-owo-heading", String(headingLevel));
|
|
327
350
|
}
|
|
328
|
-
|
|
329
|
-
div.setAttribute("data-owo-depth", String(depth));
|
|
330
|
-
applyBlockquoteBarsStyle(div, depth);
|
|
331
|
-
}
|
|
351
|
+
applyBlockquoteVisuals(div, blockType, depth, ancestry);
|
|
332
352
|
renderTokensInto(doc, div, tokens);
|
|
333
353
|
return div;
|
|
334
354
|
}
|
|
@@ -399,60 +419,37 @@ function renderDecoratorsInto(doc, container, decorators) {
|
|
|
399
419
|
container.appendChild(doc.createElement("br"));
|
|
400
420
|
}
|
|
401
421
|
}
|
|
402
|
-
function createBlockElementFromDecorators(doc, decorators, blockIndex, blockType, headingLevel, depth) {
|
|
422
|
+
function createBlockElementFromDecorators(doc, decorators, blockIndex, blockType, headingLevel, depth, ancestry) {
|
|
403
423
|
const div = doc.createElement("div");
|
|
404
424
|
div.setAttribute("data-owo-block", String(blockIndex));
|
|
405
425
|
div.className = BLOCK_TYPE_TO_CLASS[blockType] || "owo-block-paragraph";
|
|
406
426
|
if (blockType === "heading" && headingLevel) {
|
|
407
427
|
div.setAttribute("data-owo-heading", String(headingLevel));
|
|
408
428
|
}
|
|
409
|
-
|
|
410
|
-
div.setAttribute("data-owo-depth", String(depth));
|
|
411
|
-
applyBlockquoteBarsStyle(div, depth);
|
|
412
|
-
}
|
|
429
|
+
applyBlockquoteVisuals(div, blockType, depth, ancestry);
|
|
413
430
|
renderDecoratorsInto(doc, div, decorators);
|
|
414
431
|
return div;
|
|
415
432
|
}
|
|
416
|
-
function updateBlockElementFromDecorators(doc, existing, decorators, blockType, headingLevel, depth) {
|
|
417
|
-
|
|
418
|
-
if (existing.className !== newClass) {
|
|
419
|
-
existing.className = newClass;
|
|
420
|
-
}
|
|
433
|
+
function updateBlockElementFromDecorators(doc, existing, decorators, blockType, headingLevel, depth, ancestry) {
|
|
434
|
+
existing.className = BLOCK_TYPE_TO_CLASS[blockType] || "owo-block-paragraph";
|
|
421
435
|
if (blockType === "heading" && headingLevel) {
|
|
422
436
|
existing.setAttribute("data-owo-heading", String(headingLevel));
|
|
423
437
|
} else {
|
|
424
438
|
existing.removeAttribute("data-owo-heading");
|
|
425
439
|
}
|
|
426
|
-
|
|
427
|
-
existing.setAttribute("data-owo-depth", String(depth));
|
|
428
|
-
applyBlockquoteBarsStyle(existing, depth);
|
|
429
|
-
} else {
|
|
430
|
-
existing.removeAttribute("data-owo-depth");
|
|
431
|
-
existing.style.paddingLeft = "";
|
|
432
|
-
existing.style.boxShadow = "";
|
|
433
|
-
}
|
|
440
|
+
applyBlockquoteVisuals(existing, blockType, depth, ancestry);
|
|
434
441
|
existing.textContent = "";
|
|
435
442
|
renderDecoratorsInto(doc, existing, decorators);
|
|
436
443
|
return true;
|
|
437
444
|
}
|
|
438
|
-
function updateBlockElement(doc, existing, tokens, blockType, headingLevel, depth) {
|
|
439
|
-
|
|
440
|
-
if (existing.className !== newClass) {
|
|
441
|
-
existing.className = newClass;
|
|
442
|
-
}
|
|
445
|
+
function updateBlockElement(doc, existing, tokens, blockType, headingLevel, depth, ancestry) {
|
|
446
|
+
existing.className = BLOCK_TYPE_TO_CLASS[blockType] || "owo-block-paragraph";
|
|
443
447
|
if (blockType === "heading" && headingLevel) {
|
|
444
448
|
existing.setAttribute("data-owo-heading", String(headingLevel));
|
|
445
449
|
} else {
|
|
446
450
|
existing.removeAttribute("data-owo-heading");
|
|
447
451
|
}
|
|
448
|
-
|
|
449
|
-
existing.setAttribute("data-owo-depth", String(depth));
|
|
450
|
-
applyBlockquoteBarsStyle(existing, depth);
|
|
451
|
-
} else {
|
|
452
|
-
existing.removeAttribute("data-owo-depth");
|
|
453
|
-
existing.style.paddingLeft = "";
|
|
454
|
-
existing.style.boxShadow = "";
|
|
455
|
-
}
|
|
452
|
+
applyBlockquoteVisuals(existing, blockType, depth, ancestry);
|
|
456
453
|
existing.textContent = "";
|
|
457
454
|
renderTokensInto(doc, existing, tokens);
|
|
458
455
|
return true;
|
|
@@ -471,7 +468,8 @@ function fullRender(root, doc) {
|
|
|
471
468
|
i,
|
|
472
469
|
block.type,
|
|
473
470
|
block.type === "heading" ? block.headingLevel : void 0,
|
|
474
|
-
block.depth
|
|
471
|
+
block.depth,
|
|
472
|
+
block.ancestry
|
|
475
473
|
);
|
|
476
474
|
root.appendChild(el);
|
|
477
475
|
offset += block.raw.length + 1;
|
|
@@ -495,7 +493,8 @@ function patchDirtyBlocks(root, doc, dirty) {
|
|
|
495
493
|
block.decorators,
|
|
496
494
|
block.type,
|
|
497
495
|
block.type === "heading" ? block.headingLevel : void 0,
|
|
498
|
-
block.depth
|
|
496
|
+
block.depth,
|
|
497
|
+
block.ancestry
|
|
499
498
|
);
|
|
500
499
|
}
|
|
501
500
|
}
|
|
@@ -537,6 +536,7 @@ export {
|
|
|
537
536
|
restoreSelection,
|
|
538
537
|
readSelection,
|
|
539
538
|
BQ_STEP,
|
|
539
|
+
getBlockquoteDepthFromAncestry,
|
|
540
540
|
buildBlockquoteBarsBoxShadow,
|
|
541
541
|
TOKEN_CLASS_EXEMPTIONS,
|
|
542
542
|
TOKEN_TO_CLASS,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as OwoMarkDocument, O as OwoMarkSelection, V as VirtualSelection, C as CompositionState, B as BlockType, b as BlockContext, c as BlockInsertType, d as BlockContextListener } from './public-
|
|
1
|
+
import { a as OwoMarkDocument, O as OwoMarkSelection, V as VirtualSelection, C as CompositionState, B as BlockType, b as BlockContext, c as BlockInsertType, d as BlockContextListener } from './public-BjF6yWIR.js';
|
|
2
2
|
|
|
3
3
|
type CoreSelectionSnapshot = {
|
|
4
4
|
linear: OwoMarkSelection | null;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { C as CoreStateSnapshot, S as SlashState, a as CommandRegistry } from './editor-core-
|
|
2
|
-
export { B as BeforeInputIntent, b as CommandContext, c as CommandDefinition, d as CoreApplyAction, e as CoreApplyResult, f as CoreSelectionSnapshot, g as CreateOwoMarkCoreOptions, D as DocumentChangeCallback, I as IndentMode, h as IndentResult, K as KeyDownIntent, O as OwoMarkCore, P as PasteIntent, i as SlashStateListener, j as SlashTriggerInfo, k as applyMarkdownIndent, l as createOwoMarkCore, r as resolveIndentSize } from './editor-core-
|
|
3
|
-
import {
|
|
4
|
-
export { b as BlockContext, d as BlockContextListener,
|
|
5
|
-
export { O as OwoComponentDescriptor, d as OwoEditorEntryDescriptor, f as OwoFeatureFlagKey, g as OwoRuntimeBlockDescriptor, h as OwoSyntaxDescriptor } from './registry-
|
|
1
|
+
import { C as CoreStateSnapshot, S as SlashState, a as CommandRegistry } from './editor-core-edBvPqBi.js';
|
|
2
|
+
export { B as BeforeInputIntent, b as CommandContext, c as CommandDefinition, d as CoreApplyAction, e as CoreApplyResult, f as CoreSelectionSnapshot, g as CreateOwoMarkCoreOptions, D as DocumentChangeCallback, I as IndentMode, h as IndentResult, K as KeyDownIntent, O as OwoMarkCore, P as PasteIntent, i as SlashStateListener, j as SlashTriggerInfo, k as applyMarkdownIndent, l as createOwoMarkCore, r as resolveIndentSize } from './editor-core-edBvPqBi.js';
|
|
3
|
+
import { h as BlockNode, i as BlockContextType, O as OwoMarkSelection, j as ContainerBlockSyntaxExtension, J as JsonValue, k as ParseMarkdownOptions, a as OwoMarkDocument, l as ConformanceDocument, D as DirtyRange, P as PreviewBlockKind, g as PreviewBlock, m as BlockTransform, n as OwoMarkSharedStateController, o as InlineExtensionPriority, p as InlineSyntaxExtension, T as TokenizeInlineOptions, e as InlineToken, q as TokenizeBlockOptions } from './public-BjF6yWIR.js';
|
|
4
|
+
export { b as BlockContext, d as BlockContextListener, r as BlockExtensionPriority, c as BlockInsertType, s as BlockSyntaxExtension, B as BlockType, t as CLASSLESS_INLINE_TOKEN_TYPES, C as CompositionState, u as ConformanceBlockNode, v as ConformanceContainerNode, w as ConformanceInlineNode, x as ConformanceTableCell, y as ConformanceTableRow, z as ContainerBlockExtensionPriority, f as ContainerFrame, A as ContainerKind, E as CustomBlockRuntimeBinding, F as Decorator, G as DecoratorType, H as HeadingLevel, K as HistoryEntry, L as INLINE_TOKEN_TYPES, M as InlineExtensionHostBlockType, N as InlineScannerMatch, I as InlineTokenType, Q as JsonPrimitive, R as Leaf, S as OwoMarkCommands, U as OwoMarkDocumentTrace, W as OwoMarkEditorLike, X as OwoMarkSharedState, Y as OwoMarkSharedStateStore, Z as ParserDiffScope, _ as ParserExtensionConsumer, $ as ParserExtensionParent, a0 as ParserExtensionScope, a1 as PreviewDirtyReason, a2 as SideAnnotationMemberBlock, a3 as SideAnnotationMemberBlockType, a4 as SideAnnotationSourceKind, a5 as TokenizeBlockExtensionOptions, a6 as VirtualPosition, V as VirtualSelection, a7 as getBlockIndexForPosition, a8 as isVirtualSelectionCollapsed, a9 as linearToVirtual, aa as linearToVirtualPosition, ab as virtualPositionToLinear, ac as virtualPositionsEqual, ad as virtualToLinear } from './public-BjF6yWIR.js';
|
|
5
|
+
export { O as OwoComponentDescriptor, d as OwoEditorEntryDescriptor, f as OwoFeatureFlagKey, g as OwoRuntimeBlockDescriptor, h as OwoSyntaxDescriptor } from './registry-DI94xf3v.js';
|
|
6
6
|
export { getSyntaxDescriptor, parseInlineSideAnnotationFromText, stripInlineSideAnnotationTail, stripSideContinuationTail, syntaxRegistry } from './semantic/syntax/index.js';
|
|
7
7
|
export { componentRegistry, getComponentDescriptor, getComponentDescriptorByDirective } from './semantic/components/index.js';
|
|
8
8
|
export { getRuntimeBlockDescriptor, getRuntimeBlockDescriptorByBlockType, getRuntimeBlockDescriptorByPreviewKind, runtimeBlockRegistry } from './semantic/runtime/index.js';
|
|
@@ -10,8 +10,8 @@ export { editorEntryRegistry, getEditorEntryDescriptor, getEditorEntryDescriptor
|
|
|
10
10
|
export { WordBoundaryResult, deleteToLineEnd, deleteToLineStart, deleteWordBackward, deleteWordForward } from './internal/commands/word-boundary.js';
|
|
11
11
|
export { normalizeMarkdownPaste } from './internal/clipboard/paste.js';
|
|
12
12
|
export { enableMapSet, produce } from 'immer';
|
|
13
|
-
import { O as OwoMarkScrollProjectionSnapshot, c as OwoMarkScrollProjectionSegment, S as SourceKey, a as OwoMarkSurfaceGeometrySnapshot, V as ViewportMetrics, G as GlobalScrollPosition } from './types-
|
|
14
|
-
export { C as ContentId, d as Geometry, b as OwoMarkScrollController, e as OwoMarkScrollDegradedReason, f as OwoMarkSurfaceGeometrySegment, g as OwoMarkSurfaceGeometrySnapshotStatus, h as ScrollProjectionSegmentKind, i as ScrollResolutionResult, j as ScrollSurface, k as ScrollToScrollPositionOptions, l as ScrollToScrollPositionResult } from './types-
|
|
13
|
+
import { O as OwoMarkScrollProjectionSnapshot, c as OwoMarkScrollProjectionSegment, S as SourceKey, a as OwoMarkSurfaceGeometrySnapshot, V as ViewportMetrics, G as GlobalScrollPosition } from './types-0QKyuzQy.js';
|
|
14
|
+
export { C as ContentId, d as Geometry, b as OwoMarkScrollController, e as OwoMarkScrollDegradedReason, f as OwoMarkSurfaceGeometrySegment, g as OwoMarkSurfaceGeometrySnapshotStatus, h as ScrollProjectionSegmentKind, i as ScrollResolutionResult, j as ScrollSurface, k as ScrollToScrollPositionOptions, l as ScrollToScrollPositionResult } from './types-0QKyuzQy.js';
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* Resolve the extended BlockContextType from a BlockNode.
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { O as OwoMarkSelection, a as OwoMarkDocument, V as VirtualSelection } from '../public-
|
|
2
|
-
import { O as OwoMarkCore } from '../editor-core-
|
|
3
|
-
export { D as DocumentChangeCallback } from '../editor-core-
|
|
1
|
+
import { O as OwoMarkSelection, a as OwoMarkDocument, V as VirtualSelection } from '../public-BjF6yWIR.js';
|
|
2
|
+
import { O as OwoMarkCore } from '../editor-core-edBvPqBi.js';
|
|
3
|
+
export { D as DocumentChangeCallback } from '../editor-core-edBvPqBi.js';
|
|
4
4
|
|
|
5
5
|
type OwoMarkEditorInstance = {
|
|
6
6
|
mount(root: HTMLElement): void;
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
fullRender,
|
|
4
4
|
readSelection,
|
|
5
5
|
restoreSelection
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-YS3HGP3M.js";
|
|
7
7
|
import {
|
|
8
8
|
createOwoMarkCore
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-WV2K5MNU.js";
|
|
10
10
|
import "../chunk-WFPUIPWU.js";
|
|
11
11
|
import "../chunk-ROJILHRQ.js";
|
|
12
12
|
import "../chunk-BKJCBEI7.js";
|
|
@@ -121,6 +121,8 @@ type BlockNode = (BlockBase & {
|
|
|
121
121
|
type ConformanceInlineNode = {
|
|
122
122
|
kind: 'text';
|
|
123
123
|
text: string;
|
|
124
|
+
} | {
|
|
125
|
+
kind: 'softBreak';
|
|
124
126
|
} | {
|
|
125
127
|
kind: 'strong';
|
|
126
128
|
children: ConformanceInlineNode[];
|
|
@@ -161,6 +163,7 @@ type ConformanceContainerNode = {
|
|
|
161
163
|
type ConformanceBlockNode = {
|
|
162
164
|
kind: 'paragraph';
|
|
163
165
|
ancestry: ConformanceContainerNode[];
|
|
166
|
+
sourceBlockCount?: number;
|
|
164
167
|
inline: ConformanceInlineNode[];
|
|
165
168
|
} | {
|
|
166
169
|
kind: 'heading';
|
|
@@ -171,6 +174,7 @@ type ConformanceBlockNode = {
|
|
|
171
174
|
kind: 'blockquote';
|
|
172
175
|
ancestry: ConformanceContainerNode[];
|
|
173
176
|
depth: number;
|
|
177
|
+
sourceBlockCount?: number;
|
|
174
178
|
inline: ConformanceInlineNode[];
|
|
175
179
|
} | {
|
|
176
180
|
kind: 'listItem';
|
|
@@ -466,4 +470,4 @@ type HistoryEntry = {
|
|
|
466
470
|
selection: OwoMarkSelection;
|
|
467
471
|
};
|
|
468
472
|
|
|
469
|
-
export { type ParserExtensionParent as $, type ContainerKind as A, type BlockType as B, type CompositionState as C, type DirtyRange as D, type CustomBlockRuntimeBinding as E, type Decorator as F, type DecoratorType as G, type HeadingLevel as H, type InlineTokenType as I, type JsonValue as J, type HistoryEntry as K, INLINE_TOKEN_TYPES as L, type InlineExtensionHostBlockType as M, type InlineScannerMatch as N, type OwoMarkSelection as O, type PreviewBlockKind as P, type JsonPrimitive as Q, type Leaf as R, type OwoMarkCommands as S, type TokenizeInlineOptions as T, type OwoMarkDocumentTrace as U, type VirtualSelection as V, type OwoMarkEditorLike as W, type OwoMarkSharedState as X, type OwoMarkSharedStateStore as Y, type ParserDiffScope as Z, type ParserExtensionConsumer as _, type OwoMarkDocument as a, type ParserExtensionScope as a0, type PreviewDirtyReason as a1, type SideAnnotationMemberBlock as a2, type SideAnnotationMemberBlockType as a3, type SideAnnotationSourceKind as a4, type TokenizeBlockExtensionOptions as a5, type VirtualPosition as a6, getBlockIndexForPosition as a7, isVirtualSelectionCollapsed as a8, linearToVirtual as a9, linearToVirtualPosition as aa, virtualPositionToLinear as ab, virtualPositionsEqual as ac, virtualToLinear as ad, type BlockContext as b, type BlockInsertType as c, type BlockContextListener as d, type InlineToken as e, type
|
|
473
|
+
export { type ParserExtensionParent as $, type ContainerKind as A, type BlockType as B, type CompositionState as C, type DirtyRange as D, type CustomBlockRuntimeBinding as E, type Decorator as F, type DecoratorType as G, type HeadingLevel as H, type InlineTokenType as I, type JsonValue as J, type HistoryEntry as K, INLINE_TOKEN_TYPES as L, type InlineExtensionHostBlockType as M, type InlineScannerMatch as N, type OwoMarkSelection as O, type PreviewBlockKind as P, type JsonPrimitive as Q, type Leaf as R, type OwoMarkCommands as S, type TokenizeInlineOptions as T, type OwoMarkDocumentTrace as U, type VirtualSelection as V, type OwoMarkEditorLike as W, type OwoMarkSharedState as X, type OwoMarkSharedStateStore as Y, type ParserDiffScope as Z, type ParserExtensionConsumer as _, type OwoMarkDocument as a, type ParserExtensionScope as a0, type PreviewDirtyReason as a1, type SideAnnotationMemberBlock as a2, type SideAnnotationMemberBlockType as a3, type SideAnnotationSourceKind as a4, type TokenizeBlockExtensionOptions as a5, type VirtualPosition as a6, getBlockIndexForPosition as a7, isVirtualSelectionCollapsed as a8, linearToVirtual as a9, linearToVirtualPosition as aa, virtualPositionToLinear as ab, virtualPositionsEqual as ac, virtualToLinear as ad, type BlockContext as b, type BlockInsertType as c, type BlockContextListener as d, type InlineToken as e, type ContainerFrame as f, type PreviewBlock as g, type BlockNode as h, type BlockContextType as i, type ContainerBlockSyntaxExtension as j, type ParseMarkdownOptions as k, type ConformanceDocument as l, type BlockTransform as m, type OwoMarkSharedStateController as n, type InlineExtensionPriority as o, type InlineSyntaxExtension as p, type TokenizeBlockOptions as q, type BlockExtensionPriority as r, type BlockSyntaxExtension as s, CLASSLESS_INLINE_TOKEN_TYPES as t, type ConformanceBlockNode as u, type ConformanceContainerNode as v, type ConformanceInlineNode as w, type ConformanceTableCell as x, type ConformanceTableRow as y, type ContainerBlockExtensionPriority as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as PreviewBlockKind } from './public-
|
|
1
|
+
import { P as PreviewBlockKind } from './public-BjF6yWIR.js';
|
|
2
2
|
|
|
3
3
|
type OwoFeatureFlagKey = 'enableSideAnnotation' | 'enableMath' | 'enableComponents';
|
|
4
4
|
type OwoSemanticDescriptorFamily = 'syntax' | 'component' | 'runtime' | 'editor';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c as OwoDescriptorRegistry, O as OwoComponentDescriptor } from '../../registry-
|
|
2
|
-
export { a as OwoComponentKind, b as OwoComponentPayloadStrategy } from '../../registry-
|
|
3
|
-
import '../../public-
|
|
1
|
+
import { c as OwoDescriptorRegistry, O as OwoComponentDescriptor } from '../../registry-DI94xf3v.js';
|
|
2
|
+
export { a as OwoComponentKind, b as OwoComponentPayloadStrategy } from '../../registry-DI94xf3v.js';
|
|
3
|
+
import '../../public-BjF6yWIR.js';
|
|
4
4
|
|
|
5
5
|
declare const componentRegistry: OwoDescriptorRegistry<OwoComponentDescriptor>;
|
|
6
6
|
declare function getComponentDescriptor(key: string): OwoComponentDescriptor;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as OwoDescriptorRegistry, d as OwoEditorEntryDescriptor, e as OwoEditorEntryPresentation } from '../../registry-
|
|
2
|
-
import '../../public-
|
|
1
|
+
import { c as OwoDescriptorRegistry, d as OwoEditorEntryDescriptor, e as OwoEditorEntryPresentation } from '../../registry-DI94xf3v.js';
|
|
2
|
+
import '../../public-BjF6yWIR.js';
|
|
3
3
|
|
|
4
4
|
declare const editorEntryRegistry: OwoDescriptorRegistry<OwoEditorEntryDescriptor>;
|
|
5
5
|
declare function getEditorEntryDescriptor(key: string): OwoEditorEntryDescriptor;
|
package/dist/semantic/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { O as OwoComponentDescriptor, a as OwoComponentKind, b as OwoComponentPayloadStrategy, c as OwoDescriptorRegistry, d as OwoEditorEntryDescriptor, e as OwoEditorEntryPresentation, f as OwoFeatureFlagKey, g as OwoRuntimeBlockDescriptor, h as OwoSyntaxDescriptor, i as createDescriptorRegistry, r as requireDescriptor } from '../registry-
|
|
1
|
+
export { O as OwoComponentDescriptor, a as OwoComponentKind, b as OwoComponentPayloadStrategy, c as OwoDescriptorRegistry, d as OwoEditorEntryDescriptor, e as OwoEditorEntryPresentation, f as OwoFeatureFlagKey, g as OwoRuntimeBlockDescriptor, h as OwoSyntaxDescriptor, i as createDescriptorRegistry, r as requireDescriptor } from '../registry-DI94xf3v.js';
|
|
2
2
|
export { validateComponentDescriptors, validateEditorEntryDescriptors, validateRuntimeDescriptors, validateSyntaxDescriptors } from './shared/index.js';
|
|
3
3
|
export { MATH_FENCE_RE, MULTI_LINE_MATH_BLOCK_CLOSE_RE, MULTI_LINE_MATH_BLOCK_OPEN_RE, MathFenceNormalizationLineMapping, MathFenceNormalizationRewrite, SIDE_ANNOTATION_RENDERER_KEY_BY_TYPE, SIDE_ANNOTATION_SYMBOL_BY_KEYWORD, SIDE_ANNOTATION_TAIL_RE, SIDE_ANNOTATION_TYPE_SYMBOLS, SIDE_ANNOTATION_TYPE_SYMBOLS_SORTED, SIDE_ANNOTATION_TYPE_TABLE, SIDE_CONTINUATION_TAIL_RE, SIDE_NOTE_DEFINITION_RE, SIDE_NOTE_REF_RE, SINGLE_LINE_MATH_BLOCK_RE, SideAnnotationType, SideAnnotationTypeDescriptor, SideAnnotationTypeSymbol, collectMathFenceNormalizationRewrites, getSyntaxDescriptor, isFenceOnlyMathLine, isMultiLineMathBlockClose, isMultiLineMathBlockOpen, isSingleLineMathBlock, mathSyntaxDescriptor, parseInlineSideAnnotationFromText, parseInlineSideAnnotationText, parseSideDirectiveLabel, parseSideNoteDefinitionRaw, sideAnnotationSyntaxDescriptors, sideAnnotationTypeDescriptors, stripInlineSideAnnotationTail, stripSideContinuationTail, syntaxRegistry } from './syntax/index.js';
|
|
4
4
|
export { componentRegistry, getComponentDescriptor, getComponentDescriptorByDirective } from './components/index.js';
|
|
5
5
|
export { getRuntimeBlockDescriptor, getRuntimeBlockDescriptorByBlockType, getRuntimeBlockDescriptorByPreviewKind, runtimeBlockRegistry } from './runtime/index.js';
|
|
6
6
|
export { editorEntryRegistry, getEditorEntryDescriptor, getEditorEntryDescriptorByCommandId, resolveEditorEntryPresentation } from './editor/index.js';
|
|
7
|
-
import '../public-
|
|
7
|
+
import '../public-BjF6yWIR.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { g as OwoRuntimeBlockDescriptor, c as OwoDescriptorRegistry } from '../../registry-
|
|
2
|
-
import '../../public-
|
|
1
|
+
import { g as OwoRuntimeBlockDescriptor, c as OwoDescriptorRegistry } from '../../registry-DI94xf3v.js';
|
|
2
|
+
import '../../public-BjF6yWIR.js';
|
|
3
3
|
|
|
4
4
|
declare const runtimeBlockRegistry: OwoDescriptorRegistry<OwoRuntimeBlockDescriptor>;
|
|
5
5
|
declare function getRuntimeBlockDescriptor(key: string): OwoRuntimeBlockDescriptor;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { O as OwoComponentDescriptor, d as OwoEditorEntryDescriptor, g as OwoRuntimeBlockDescriptor, h as OwoSyntaxDescriptor } from '../../registry-
|
|
2
|
-
export { a as OwoComponentKind, b as OwoComponentPayloadStrategy, c as OwoDescriptorRegistry, e as OwoEditorEntryPresentation, f as OwoFeatureFlagKey, i as createDescriptorRegistry, r as requireDescriptor } from '../../registry-
|
|
3
|
-
import '../../public-
|
|
1
|
+
import { O as OwoComponentDescriptor, d as OwoEditorEntryDescriptor, g as OwoRuntimeBlockDescriptor, h as OwoSyntaxDescriptor } from '../../registry-DI94xf3v.js';
|
|
2
|
+
export { a as OwoComponentKind, b as OwoComponentPayloadStrategy, c as OwoDescriptorRegistry, e as OwoEditorEntryPresentation, f as OwoFeatureFlagKey, i as createDescriptorRegistry, r as requireDescriptor } from '../../registry-DI94xf3v.js';
|
|
3
|
+
import '../../public-BjF6yWIR.js';
|
|
4
4
|
|
|
5
5
|
declare function validateSyntaxDescriptors(descriptors: readonly OwoSyntaxDescriptor[]): void;
|
|
6
6
|
declare function validateComponentDescriptors(descriptors: readonly OwoComponentDescriptor[]): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { h as OwoSyntaxDescriptor, c as OwoDescriptorRegistry } from '../../registry-
|
|
2
|
-
import '../../public-
|
|
1
|
+
import { h as OwoSyntaxDescriptor, c as OwoDescriptorRegistry } from '../../registry-DI94xf3v.js';
|
|
2
|
+
import '../../public-BjF6yWIR.js';
|
|
3
3
|
|
|
4
4
|
/** Fence-only display math line, e.g. `$$`. */
|
|
5
5
|
declare const MATH_FENCE_RE: RegExp;
|