@stream-mdx/core 0.3.0 → 0.4.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 +3 -2
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/types.d.cts +15 -1
- package/dist/types.d.ts +15 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -39,8 +39,9 @@ export function makeConfig(overrides?: Partial<typeof DEFAULT_BACKPRESSURE_CONFI
|
|
|
39
39
|
|
|
40
40
|
## Docs
|
|
41
41
|
|
|
42
|
-
- API reference:
|
|
43
|
-
- Security model:
|
|
42
|
+
- API reference: https://github.com/kmccleary3301/stream-mdx/blob/main/docs/PUBLIC_API.md
|
|
43
|
+
- Security model: https://github.com/kmccleary3301/stream-mdx/blob/main/docs/SECURITY_MODEL.md
|
|
44
|
+
- Protocol spec (for typed stream events): https://github.com/kmccleary3301/stream-mdx/blob/main/docs/STREAMMDX_JSON_DIFF_SPEC.md
|
|
44
45
|
|
|
45
46
|
## Related packages
|
|
46
47
|
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Block, NodeSnapshot, InlineNode, Patch } from './types.cjs';
|
|
2
|
-
export { ASTInlinePlugin, CoalescingMetrics, CodeHighlightOutputMode, CodeHighlightingMode, CompiledMdxModule, DiffBlock, DiffKind, DiffLine, DiffLineKind, FormatAnticipationConfig, InlineHtmlDescriptor, InlinePlugin, LANGUAGE_ALIASES, LazyTokenizationPriority, MixedContentSegment, NodePath, PATCH_ROOT_ID, PatchMetrics, PerformanceMetrics, ProtectedRange, ProtectedRangeKind, RegexAnticipationPattern, RegexInlinePlugin, SetPropsBatchEntry, ThemedLine, ThemedToken, TokenLineV1, TokenSpan, TokenStyle, WorkerErrorPayload, WorkerIn, WorkerOut, WorkerPhase } from './types.cjs';
|
|
2
|
+
export { ASTInlinePlugin, CoalescingMetrics, CodeHighlightOutputMode, CodeHighlightingMode, CompiledMdxModule, DiffBlock, DiffKind, DiffLine, DiffLineKind, FormatAnticipationConfig, InlineHtmlDescriptor, InlinePlugin, LANGUAGE_ALIASES, LazyTokenizationPriority, MixedContentSegment, NodePath, PATCH_ROOT_ID, PatchMetrics, PerformanceMetrics, ProtectedRange, ProtectedRangeKind, RegexAnticipationPattern, RegexInlinePlugin, SetPropsBatchEntry, ThemedLine, ThemedToken, TocHeading, TokenLineV1, TokenSpan, TokenStyle, WorkerErrorPayload, WorkerIn, WorkerOut, WorkerPhase } from './types.cjs';
|
|
3
3
|
export { HighlightedLine, dedentIndentedCode, extractCodeLines, extractCodeWrapperAttributes, extractHighlightedLines, getDefaultCodeWrapperAttributes, normalizeHighlightedLines, stripCodeFence } from './code-highlighting.cjs';
|
|
4
4
|
export { PerformanceTimer, StringBuffer, applyUpdate, debounce, detectMDX, generateBlockId, getBlockKey, normalizeBlockquoteText, normalizeLang, parseCodeFenceInfo, removeHeadingMarkers } from './utils.cjs';
|
|
5
5
|
export { MixedContentAutoCloseHtmlOptions, MixedContentAutoCloseMdxOptions, MixedContentOptions, extractMixedContentSegments, findClosingHtmlTag, isLikelyMdxComponent } from './mixed-content.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Block, NodeSnapshot, InlineNode, Patch } from './types.js';
|
|
2
|
-
export { ASTInlinePlugin, CoalescingMetrics, CodeHighlightOutputMode, CodeHighlightingMode, CompiledMdxModule, DiffBlock, DiffKind, DiffLine, DiffLineKind, FormatAnticipationConfig, InlineHtmlDescriptor, InlinePlugin, LANGUAGE_ALIASES, LazyTokenizationPriority, MixedContentSegment, NodePath, PATCH_ROOT_ID, PatchMetrics, PerformanceMetrics, ProtectedRange, ProtectedRangeKind, RegexAnticipationPattern, RegexInlinePlugin, SetPropsBatchEntry, ThemedLine, ThemedToken, TokenLineV1, TokenSpan, TokenStyle, WorkerErrorPayload, WorkerIn, WorkerOut, WorkerPhase } from './types.js';
|
|
2
|
+
export { ASTInlinePlugin, CoalescingMetrics, CodeHighlightOutputMode, CodeHighlightingMode, CompiledMdxModule, DiffBlock, DiffKind, DiffLine, DiffLineKind, FormatAnticipationConfig, InlineHtmlDescriptor, InlinePlugin, LANGUAGE_ALIASES, LazyTokenizationPriority, MixedContentSegment, NodePath, PATCH_ROOT_ID, PatchMetrics, PerformanceMetrics, ProtectedRange, ProtectedRangeKind, RegexAnticipationPattern, RegexInlinePlugin, SetPropsBatchEntry, ThemedLine, ThemedToken, TocHeading, TokenLineV1, TokenSpan, TokenStyle, WorkerErrorPayload, WorkerIn, WorkerOut, WorkerPhase } from './types.js';
|
|
3
3
|
export { HighlightedLine, dedentIndentedCode, extractCodeLines, extractCodeWrapperAttributes, extractHighlightedLines, getDefaultCodeWrapperAttributes, normalizeHighlightedLines, stripCodeFence } from './code-highlighting.js';
|
|
4
4
|
export { PerformanceTimer, StringBuffer, applyUpdate, debounce, detectMDX, generateBlockId, getBlockKey, normalizeBlockquoteText, normalizeLang, parseCodeFenceInfo, removeHeadingMarkers } from './utils.js';
|
|
5
5
|
export { MixedContentAutoCloseHtmlOptions, MixedContentAutoCloseMdxOptions, MixedContentOptions, extractMixedContentSegments, findClosingHtmlTag, isLikelyMdxComponent } from './mixed-content.js';
|
package/dist/types.d.cts
CHANGED
|
@@ -189,6 +189,8 @@ type WorkerIn = {
|
|
|
189
189
|
type: "FINALIZE";
|
|
190
190
|
} | {
|
|
191
191
|
type: "DEBUG_STATE";
|
|
192
|
+
} | {
|
|
193
|
+
type: "DUMP_BLOCKS";
|
|
192
194
|
} | {
|
|
193
195
|
type: "TOKENIZE_RANGE";
|
|
194
196
|
blockId: string;
|
|
@@ -216,6 +218,8 @@ interface WorkerErrorPayload {
|
|
|
216
218
|
type WorkerOut = {
|
|
217
219
|
type: "INITIALIZED";
|
|
218
220
|
blocks: Block[];
|
|
221
|
+
} | {
|
|
222
|
+
type: "FINALIZED";
|
|
219
223
|
} | {
|
|
220
224
|
type: "PATCH";
|
|
221
225
|
tx: number;
|
|
@@ -227,6 +231,10 @@ type WorkerOut = {
|
|
|
227
231
|
} | {
|
|
228
232
|
type: "METRICS";
|
|
229
233
|
metrics: PerformanceMetrics;
|
|
234
|
+
} | {
|
|
235
|
+
type: "DUMP_BLOCKS";
|
|
236
|
+
blocks: Block[];
|
|
237
|
+
tocHeadings?: TocHeading[];
|
|
230
238
|
} | {
|
|
231
239
|
type: "DEBUG_STATE";
|
|
232
240
|
state: {
|
|
@@ -348,6 +356,12 @@ interface NodePath {
|
|
|
348
356
|
nodeId?: string;
|
|
349
357
|
indexPath?: number[];
|
|
350
358
|
}
|
|
359
|
+
interface TocHeading {
|
|
360
|
+
id: string;
|
|
361
|
+
text: string;
|
|
362
|
+
level: number;
|
|
363
|
+
blockId: string;
|
|
364
|
+
}
|
|
351
365
|
type Patch = {
|
|
352
366
|
op: "insertChild";
|
|
353
367
|
at: NodePath;
|
|
@@ -423,4 +437,4 @@ interface CoalescingMetrics {
|
|
|
423
437
|
insertChildCoalesced: number;
|
|
424
438
|
}
|
|
425
439
|
|
|
426
|
-
export { type ASTInlinePlugin, type Block, type CoalescingMetrics, type CodeHighlightOutputMode, type CodeHighlightingMode, type CompiledMdxModule, type DiffBlock, type DiffKind, type DiffLine, type DiffLineKind, type FormatAnticipationConfig, type InlineHtmlDescriptor, type InlineNode, type InlinePlugin, LANGUAGE_ALIASES, type LazyTokenizationPriority, type MixedContentSegment, type NodePath, type NodeSnapshot, PATCH_ROOT_ID, type Patch, type PatchMetrics, type PerformanceMetrics, type ProtectedRange, type ProtectedRangeKind, type RegexAnticipationPattern, type RegexInlinePlugin, type SetPropsBatchEntry, type ThemedLine, type ThemedToken, type TokenLineV1, type TokenSpan, type TokenStyle, type WorkerErrorPayload, type WorkerIn, type WorkerOut, type WorkerPhase };
|
|
440
|
+
export { type ASTInlinePlugin, type Block, type CoalescingMetrics, type CodeHighlightOutputMode, type CodeHighlightingMode, type CompiledMdxModule, type DiffBlock, type DiffKind, type DiffLine, type DiffLineKind, type FormatAnticipationConfig, type InlineHtmlDescriptor, type InlineNode, type InlinePlugin, LANGUAGE_ALIASES, type LazyTokenizationPriority, type MixedContentSegment, type NodePath, type NodeSnapshot, PATCH_ROOT_ID, type Patch, type PatchMetrics, type PerformanceMetrics, type ProtectedRange, type ProtectedRangeKind, type RegexAnticipationPattern, type RegexInlinePlugin, type SetPropsBatchEntry, type ThemedLine, type ThemedToken, type TocHeading, type TokenLineV1, type TokenSpan, type TokenStyle, type WorkerErrorPayload, type WorkerIn, type WorkerOut, type WorkerPhase };
|
package/dist/types.d.ts
CHANGED
|
@@ -189,6 +189,8 @@ type WorkerIn = {
|
|
|
189
189
|
type: "FINALIZE";
|
|
190
190
|
} | {
|
|
191
191
|
type: "DEBUG_STATE";
|
|
192
|
+
} | {
|
|
193
|
+
type: "DUMP_BLOCKS";
|
|
192
194
|
} | {
|
|
193
195
|
type: "TOKENIZE_RANGE";
|
|
194
196
|
blockId: string;
|
|
@@ -216,6 +218,8 @@ interface WorkerErrorPayload {
|
|
|
216
218
|
type WorkerOut = {
|
|
217
219
|
type: "INITIALIZED";
|
|
218
220
|
blocks: Block[];
|
|
221
|
+
} | {
|
|
222
|
+
type: "FINALIZED";
|
|
219
223
|
} | {
|
|
220
224
|
type: "PATCH";
|
|
221
225
|
tx: number;
|
|
@@ -227,6 +231,10 @@ type WorkerOut = {
|
|
|
227
231
|
} | {
|
|
228
232
|
type: "METRICS";
|
|
229
233
|
metrics: PerformanceMetrics;
|
|
234
|
+
} | {
|
|
235
|
+
type: "DUMP_BLOCKS";
|
|
236
|
+
blocks: Block[];
|
|
237
|
+
tocHeadings?: TocHeading[];
|
|
230
238
|
} | {
|
|
231
239
|
type: "DEBUG_STATE";
|
|
232
240
|
state: {
|
|
@@ -348,6 +356,12 @@ interface NodePath {
|
|
|
348
356
|
nodeId?: string;
|
|
349
357
|
indexPath?: number[];
|
|
350
358
|
}
|
|
359
|
+
interface TocHeading {
|
|
360
|
+
id: string;
|
|
361
|
+
text: string;
|
|
362
|
+
level: number;
|
|
363
|
+
blockId: string;
|
|
364
|
+
}
|
|
351
365
|
type Patch = {
|
|
352
366
|
op: "insertChild";
|
|
353
367
|
at: NodePath;
|
|
@@ -423,4 +437,4 @@ interface CoalescingMetrics {
|
|
|
423
437
|
insertChildCoalesced: number;
|
|
424
438
|
}
|
|
425
439
|
|
|
426
|
-
export { type ASTInlinePlugin, type Block, type CoalescingMetrics, type CodeHighlightOutputMode, type CodeHighlightingMode, type CompiledMdxModule, type DiffBlock, type DiffKind, type DiffLine, type DiffLineKind, type FormatAnticipationConfig, type InlineHtmlDescriptor, type InlineNode, type InlinePlugin, LANGUAGE_ALIASES, type LazyTokenizationPriority, type MixedContentSegment, type NodePath, type NodeSnapshot, PATCH_ROOT_ID, type Patch, type PatchMetrics, type PerformanceMetrics, type ProtectedRange, type ProtectedRangeKind, type RegexAnticipationPattern, type RegexInlinePlugin, type SetPropsBatchEntry, type ThemedLine, type ThemedToken, type TokenLineV1, type TokenSpan, type TokenStyle, type WorkerErrorPayload, type WorkerIn, type WorkerOut, type WorkerPhase };
|
|
440
|
+
export { type ASTInlinePlugin, type Block, type CoalescingMetrics, type CodeHighlightOutputMode, type CodeHighlightingMode, type CompiledMdxModule, type DiffBlock, type DiffKind, type DiffLine, type DiffLineKind, type FormatAnticipationConfig, type InlineHtmlDescriptor, type InlineNode, type InlinePlugin, LANGUAGE_ALIASES, type LazyTokenizationPriority, type MixedContentSegment, type NodePath, type NodeSnapshot, PATCH_ROOT_ID, type Patch, type PatchMetrics, type PerformanceMetrics, type ProtectedRange, type ProtectedRangeKind, type RegexAnticipationPattern, type RegexInlinePlugin, type SetPropsBatchEntry, type ThemedLine, type ThemedToken, type TocHeading, type TokenLineV1, type TokenSpan, type TokenStyle, type WorkerErrorPayload, type WorkerIn, type WorkerOut, type WorkerPhase };
|