@stream-mdx/react 0.5.0 → 1.0.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/CHANGELOG.md +371 -0
- package/README.md +79 -4
- package/dist/blocks-renderer-DAOBFBfi.d.ts +29 -0
- package/dist/blocks-renderer-DQEL1kJW.d.cts +29 -0
- package/dist/components/bottom-stick-scroll-area.cjs +117 -193
- package/dist/components/bottom-stick-scroll-area.mjs +112 -183
- package/dist/components/diff-renderer.cjs +86 -0
- package/dist/components/diff-renderer.d.cts +11 -0
- package/dist/components/diff-renderer.d.ts +11 -0
- package/dist/components/diff-renderer.mjs +66 -0
- package/dist/components/index.cjs +2761 -1508
- package/dist/components/index.d.cts +7 -2
- package/dist/components/index.d.ts +7 -2
- package/dist/components/index.mjs +2730 -1493
- package/dist/components/katex-math.cjs +220 -0
- package/dist/components/katex-math.d.cts +10 -0
- package/dist/components/katex-math.d.ts +10 -0
- package/dist/components/katex-math.mjs +188 -0
- package/dist/contexts/math-tracker.cjs +240 -521
- package/dist/contexts/math-tracker.mjs +235 -513
- package/dist/index-Cmne1yUK.d.cts +723 -0
- package/dist/index-D7dyyu3q.d.ts +723 -0
- package/dist/index.cjs +13029 -6475
- package/dist/index.d.cts +69 -39
- package/dist/index.d.ts +69 -39
- package/dist/index.mjs +13007 -6442
- package/dist/math/display-wrapper.cjs +7 -15
- package/dist/math/display-wrapper.d.cts +2 -2
- package/dist/math/display-wrapper.d.ts +2 -2
- package/dist/math/display-wrapper.mjs +2 -6
- package/dist/node-views-Bpc6Gkgl.d.cts +13 -0
- package/dist/node-views-DpnYdaAS.d.ts +13 -0
- package/dist/renderer/hooks.cjs +35 -20
- package/dist/renderer/hooks.d.cts +22 -1
- package/dist/renderer/hooks.d.ts +22 -1
- package/dist/renderer/hooks.mjs +27 -12
- package/dist/renderer/patch-batching.cjs +5 -8
- package/dist/renderer/patch-coalescing.cjs +5 -8
- package/dist/renderer/patch-commit-scheduler.cjs +138 -356
- package/dist/renderer/patch-commit-scheduler.d.cts +13 -1
- package/dist/renderer/patch-commit-scheduler.d.ts +13 -1
- package/dist/renderer/patch-commit-scheduler.mjs +133 -348
- package/dist/renderer/store.cjs +3775 -1373
- package/dist/renderer/store.d.cts +108 -3
- package/dist/renderer/store.d.ts +108 -3
- package/dist/renderer/store.mjs +3778 -1362
- package/dist/renderer/virtualized-code.cjs +415 -71
- package/dist/renderer/virtualized-code.d.cts +24 -23
- package/dist/renderer/virtualized-code.d.ts +24 -23
- package/dist/renderer/virtualized-code.mjs +409 -62
- package/dist/renderer.cjs +10655 -4334
- package/dist/renderer.d.cts +98 -29
- package/dist/renderer.d.ts +98 -29
- package/dist/renderer.mjs +10582 -4212
- package/dist/server-regions-CPLHGli0.d.cts +32 -0
- package/dist/server-regions-mUhyoKi7.d.ts +32 -0
- package/dist/server.cjs +10195 -3872
- package/dist/server.d.cts +17 -252
- package/dist/server.d.ts +17 -252
- package/dist/server.mjs +9997 -3649
- package/dist/{streaming-markdown-CEI9eDZm.d.ts → streaming-markdown-yELbJxyH.d.ts} +49 -55
- package/dist/{streaming-markdown-DRisClXb.d.cts → streaming-markdown-zVwFuaJG.d.cts} +49 -55
- package/dist/streaming-markdown.cjs +11660 -5378
- package/dist/streaming-markdown.d.cts +7 -2
- package/dist/streaming-markdown.d.ts +7 -2
- package/dist/streaming-markdown.mjs +11679 -5347
- package/dist/trusted-mdx/index.cjs +833 -0
- package/dist/trusted-mdx/index.d.cts +11 -0
- package/dist/trusted-mdx/index.d.ts +11 -0
- package/dist/trusted-mdx/index.mjs +807 -0
- package/dist/trusted-mdx/native-children-slot.cjs +45 -0
- package/dist/trusted-mdx/native-children-slot.d.cts +11 -0
- package/dist/trusted-mdx/native-children-slot.d.ts +11 -0
- package/dist/trusted-mdx/native-children-slot.mjs +24 -0
- package/dist/trusted-mdx/server.cjs +752 -0
- package/dist/trusted-mdx/server.d.cts +24 -0
- package/dist/trusted-mdx/server.d.ts +24 -0
- package/dist/trusted-mdx/server.mjs +724 -0
- package/dist/trusted-mdx-contract-ElKpkDI5.d.cts +113 -0
- package/dist/trusted-mdx-contract-ElKpkDI5.d.ts +113 -0
- package/dist/utils/inline-html.cjs +246 -147
- package/dist/utils/inline-html.d.cts +37 -6
- package/dist/utils/inline-html.d.ts +37 -6
- package/dist/utils/inline-html.mjs +237 -134
- package/package.json +41 -18
- package/dist/index-BVhp_pcF.d.ts +0 -251
- package/dist/index-EaeouYp2.d.cts +0 -251
- package/dist/mdx-client.cjs +0 -408
- package/dist/mdx-client.d.cts +0 -113
- package/dist/mdx-client.d.ts +0 -113
- package/dist/mdx-client.mjs +0 -369
- package/dist/mdx-coordinator.cjs +0 -584
- package/dist/mdx-coordinator.d.cts +0 -21
- package/dist/mdx-coordinator.d.ts +0 -21
- package/dist/mdx-coordinator.mjs +0 -550
- package/dist/renderer/node-views.cjs +0 -1887
- package/dist/renderer/node-views.d.cts +0 -14
- package/dist/renderer/node-views.d.ts +0 -14
- package/dist/renderer/node-views.mjs +0 -1861
package/dist/index.d.cts
CHANGED
|
@@ -1,53 +1,83 @@
|
|
|
1
|
-
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
import { CompiledMdxModule } from '@stream-mdx/core';
|
|
5
|
-
export { CoalesceConfig, CoalescingMetrics, DEFAULT_COALESCE_CONFIG, coalescePatches, coalescePatchesLinear, coalescePatchesQuadratic, coalescePatchesWithMetrics } from '@stream-mdx/core';
|
|
6
|
-
import { D as DeferredRenderConfig } from './streaming-markdown-DRisClXb.cjs';
|
|
7
|
-
export { a as DeferredRenderContext, L as LinkSafetyCheck, f as LinkSafetyConfig, M as MdxHydrationOptions, R as RendererMetrics, c as RendererStateSnapshot, e as StreamingCaret, b as StreamingFeatureFlags, h as StreamingMarkdown, d as StreamingMarkdownHandle, g as StreamingMarkdownProps, S as StreamingSchedulerOptions } from './streaming-markdown-DRisClXb.cjs';
|
|
1
|
+
import { a0 as NodeHandle, a3 as NodeHandleMetadata, a4 as NodeChildRange } from './index-Cmne1yUK.cjs';
|
|
2
|
+
export { A as AllowElementFn, u as AnimatedAnimationName, v as AnimatedOptions, w as AnimatedProp, an as AnimationTimeline, B as BroadContentComponentOptions, z as CodeBlockCopyButton, aJ as CodeBlockCopyButtonProps, F as CodeBlockDownloadButton, aK as CodeBlockDownloadButtonProps, x as CodeControlsBar, aG as CodeControlsBarProps, d as ComponentRegistry, g as ContentComponentHostProps, h as ContentComponentProps, i as ContentComponentPropsGuard, j as ContentComponentRegistration, C as ContentComponentsMap, D as DEFAULT_ANIMATED_OPTIONS, Z as DEFAULT_CONTROLS_LABELS, a5 as DEFAULT_TABLE_VIRTUALIZATION_CONFIG, as as DefaultLinkSafetyModal, au as DocumentMathMacroScope, av as DocumentMathMacroScopeContext, E as ElementFilterContext, k as ElementFilterDescriptor, l as ElementFilterOptions, a8 as HeadlessNodeViewProps, a9 as HtmlNodeViewProps, aa as InlineNodeViewProps, az as KaTeXBlockMath, ay as KaTeXInlineMath, ax as KaTeXMathProps, aA as LANGUAGE_EXTENSION_MAP, a1 as LinkSafetyModalProps, a2 as MathEngine, a6 as MathEngineOutput, aw as MathExpressionCompletenessContext, M as MathOptions, $ as MermaidEngine, a7 as MermaidEngineProps, ae as NativeActionSlot, ab as NativeNodeKey, ac as NodePresentation, ad as NodePresentationKey, _ as NodePresentations, af as NodeViewActions, ag as NodeViewMetadata, ah as NodeViewProps, ai as PresentationProps, ar as RenderInlineAnimationContext, R as Renderer, a as RendererConfig, aD as ResolvedCodeControls, aF as ResolvedMermaidControls, aE as ResolvedTableControls, S as STREAM_MDX_ANIMATION_CSS, y as TableControlsBar, aI as TableControlsBarProps, aH as TableControlsData, T as TableVirtualizationOptions, V as ValidatedContentComponentOptions, aB as copyToClipboard, ak as defaultInlineComponents, f as defineContentComponent, aC as downloadFile, G as escapeCsvCell, J as escapeTsvCell, P as getCodeSnippetFilename, Q as getExtensionForLanguage, O as inlineToPlainText, at as loadKaTeX, al as mapHtmlToReact, aj as renderInlineNodes, am as renderParagraphMixedSegments, aq as resolveAnimatedOptions, W as resolveCodeControls, U as resolveControlsConfig, Y as resolveMermaidControls, X as resolveTableControls, ao as splitTextSegments, ap as splitWordSegments, K as tableToCsv, N as tableToMarkdown, L as tableToTsv } from './index-Cmne1yUK.cjs';
|
|
3
|
+
export { b as TrustedMdxBlockProjection, c as TrustedMdxDocument, d as TrustedMdxDocumentSnapshot, a as TrustedMdxEngine, T as TrustedMdxEngineOptions, e as TrustedMdxRenderProps, f as TrustedMdxRevision } from './trusted-mdx-contract-ElKpkDI5.cjs';
|
|
8
4
|
export { DisplayMathWrapper, renderDisplayMathWithHtml } from './math/display-wrapper.cjs';
|
|
9
|
-
export {
|
|
10
|
-
|
|
5
|
+
export { MarkdownRenderer, MarkdownRenderer2, createMarkdownRenderer, useMarkdownRenderer } from './renderer.cjs';
|
|
6
|
+
import { D as DeferredRenderConfig } from './streaming-markdown-zVwFuaJG.cjs';
|
|
7
|
+
export { a as DeferredRenderContext, E as EngineCompatibilityError, L as LinkSafetyCheck, f as LinkSafetyConfig, M as MarkdownEngineMode, R as RendererMetrics, c as RendererStateSnapshot, e as StreamingCaret, b as StreamingFeatureFlags, h as StreamingMarkdown, d as StreamingMarkdownHandle, g as StreamingMarkdownProps, S as StreamingSchedulerOptions } from './streaming-markdown-zVwFuaJG.cjs';
|
|
8
|
+
export { RenderConfigVersionContext, useRendererBlocks, useRendererChildren, useRendererHasProvisionalBlocks, useRendererNode, useRendererNodeSnapshot } from './renderer/hooks.cjs';
|
|
9
|
+
export { N as NativeNodeView, r as renderNodePresentation } from './node-views-Bpc6Gkgl.cjs';
|
|
10
|
+
import React__default, { RefObject } from 'react';
|
|
11
|
+
import { CodeNodeHandle, CodeBlockMetadata, CodeLineRange, CodeLineRecord, TableNodeHandle, TableBlockMetadata, TableRowRange, TableRowRecord } from '@stream-mdx/core';
|
|
12
|
+
export { CoalesceConfig, CoalescingMetrics, DEFAULT_COALESCE_CONFIG, SyntaxRuleSpec, UrlTransform, UrlTransformContext, coalescePatches, coalescePatchesLinear, coalescePatchesQuadratic, coalescePatchesWithMetrics, defaultUrlTransform } from '@stream-mdx/core';
|
|
11
13
|
export { getPatchKind, isHeavyPatch, splitPatchBatch } from '@stream-mdx/core/perf/patch-batching';
|
|
12
14
|
export { AdaptiveBudgetState, PatchBatchInput, PatchBatchMeta, PatchCommitScheduler, PatchCommitSchedulerOptions, PatchFlushBatchResult, PatchFlushResult } from './renderer/patch-commit-scheduler.cjs';
|
|
13
|
-
export { ApplyPatchesOptions, NodeRecord, RendererStore, createRendererStore, isListPatchDebugEnabled } from './renderer/store.cjs';
|
|
14
|
-
|
|
15
|
-
export {
|
|
15
|
+
export { ApplyPatchesOptions, CodeBlockViewState, NodeRecord, ParagraphSegmentPlanEvent, ParagraphSegmentProjection, ParagraphSegmentProjectionBranch, ParagraphSegmentProjectionLeaf, ParagraphSegmentProjectionNode, RendererStore, RendererStoreOptions, capturePreparedRendererStore, createRendererStore, isListPatchDebugEnabled } from './renderer/store.cjs';
|
|
16
|
+
export { DEFAULT_VIRTUALIZED_CODE_CONFIG, VirtualizedCodeConfig, VirtualizedCodeRange, calculateCodeWindow, resolveVirtualizedCodeConfig, useVirtualizedCode } from './renderer/virtualized-code.cjs';
|
|
17
|
+
export { CodeEngine } from '@stream-mdx/worker/engine';
|
|
16
18
|
export { BottomStickDebugState, BottomStickJumpButtonRenderState, BottomStickMode, BottomStickScrollArea, BottomStickScrollAreaProps } from './components/bottom-stick-scroll-area.cjs';
|
|
19
|
+
export { DefaultDiffRenderer, DiffRendererProps } from './components/diff-renderer.cjs';
|
|
20
|
+
export { M as MarkdownBlocksRenderer } from './blocks-renderer-DQEL1kJW.cjs';
|
|
21
|
+
export { AppendResult, FinalizeResult, SourceCapacityError, StreamSessionError, WaitForCapacityOptions } from '@stream-mdx/protocol';
|
|
17
22
|
import 'react/jsx-runtime';
|
|
18
23
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
24
|
+
/** Observe stable metadata from one generation-bound node handle. */
|
|
25
|
+
declare function useNode(handle: NodeHandle): NodeHandleMetadata;
|
|
26
|
+
/** Observe an explicit half-open child range from one generation-bound node handle. */
|
|
27
|
+
declare function useNodeChildren(handle: NodeHandle, range: NodeChildRange): readonly NodeHandle[];
|
|
28
|
+
|
|
29
|
+
/** Immutable identity and revision state for one generation-bound node. */
|
|
30
|
+
interface NodeRevisionSnapshot {
|
|
31
|
+
readonly id: string;
|
|
32
|
+
readonly type: string;
|
|
33
|
+
readonly generation: number;
|
|
34
|
+
readonly revision: number;
|
|
35
|
+
readonly isFinalized: boolean;
|
|
36
|
+
}
|
|
37
|
+
/** Revision observation and an explicit cold read of the node's authored source. */
|
|
38
|
+
interface NodeRevisionFeed {
|
|
39
|
+
readonly getSnapshot: () => NodeRevisionSnapshot;
|
|
40
|
+
readonly subscribe: (listener: () => void) => () => void;
|
|
41
|
+
readonly readSource: () => string;
|
|
42
|
+
}
|
|
43
|
+
interface PreviewRuntime {
|
|
44
|
+
readonly id: string;
|
|
45
|
+
readonly view: React__default.ComponentType<{
|
|
46
|
+
readonly feed: NodeRevisionFeed;
|
|
47
|
+
readonly snapshot: NodeRevisionSnapshot;
|
|
48
|
+
readonly fallback: React__default.ReactNode;
|
|
49
|
+
}>;
|
|
50
|
+
}
|
|
51
|
+
type NodeRevisionHandle = NodeHandle | CodeNodeHandle;
|
|
52
|
+
/** Subscribe to one node revision and receive its stable feed plus current snapshot. */
|
|
53
|
+
declare function useNodeRevisionFeed(handle: NodeRevisionHandle): {
|
|
54
|
+
readonly feed: NodeRevisionFeed;
|
|
55
|
+
readonly snapshot: NodeRevisionSnapshot;
|
|
22
56
|
};
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
57
|
+
/** An inert native presentation unless the host supplies an explicit runtime. */
|
|
58
|
+
declare function PreviewSlot({ handle, runtime, children, }: {
|
|
59
|
+
readonly handle: NodeRevisionHandle;
|
|
60
|
+
readonly runtime?: PreviewRuntime;
|
|
61
|
+
readonly children?: React__default.ReactNode;
|
|
62
|
+
}): React__default.ReactElement;
|
|
63
|
+
|
|
64
|
+
/** Observe stable, bounded metadata from a live code owner. */
|
|
65
|
+
declare function useCodeBlock(handle: CodeNodeHandle): CodeBlockMetadata;
|
|
66
|
+
declare function useCodeLines(handle: CodeNodeHandle, range: CodeLineRange): readonly CodeLineRecord[];
|
|
67
|
+
/** Observe diff status and prepared rows within an explicit half-open range. */
|
|
68
|
+
declare function useCodeDiff(handle: CodeNodeHandle, range: CodeLineRange): {
|
|
69
|
+
readonly diffStatus: CodeBlockMetadata["diffStatus"];
|
|
70
|
+
readonly lines: readonly CodeLineRecord[];
|
|
26
71
|
};
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
private scheduled;
|
|
33
|
-
private idleId;
|
|
34
|
-
private options;
|
|
35
|
-
constructor(options?: MdxPrefetchQueueOptions);
|
|
36
|
-
enqueue(request: MdxPrefetchRequest): void;
|
|
37
|
-
cancel(id: string): void;
|
|
38
|
-
cancelAll(): void;
|
|
39
|
-
private schedule;
|
|
40
|
-
private clearIdle;
|
|
41
|
-
private drain;
|
|
42
|
-
private runRequest;
|
|
43
|
-
}
|
|
44
|
-
declare function prefetchMdxBundle(request: MdxPrefetchRequest & {
|
|
45
|
-
signal?: AbortSignal;
|
|
46
|
-
}): Promise<void>;
|
|
72
|
+
|
|
73
|
+
/** Observe stable, bounded metadata from a live table owner. */
|
|
74
|
+
declare function useTableBlock(handle: TableNodeHandle): TableBlockMetadata;
|
|
75
|
+
/** Observe a bounded half-open range of body rows without subscribing to the whole table. */
|
|
76
|
+
declare function useTableRows(handle: TableNodeHandle, range: TableRowRange): readonly TableRowRecord[];
|
|
47
77
|
|
|
48
78
|
type DeferredRenderOptions = DeferredRenderConfig & {
|
|
49
79
|
enabled?: boolean;
|
|
50
80
|
};
|
|
51
81
|
declare function useDeferredRender(ref: RefObject<Element>, options?: DeferredRenderOptions): boolean;
|
|
52
82
|
|
|
53
|
-
export { DeferredRenderConfig,
|
|
83
|
+
export { DeferredRenderConfig, NodeChildRange, NodeHandle, NodeHandleMetadata, type NodeRevisionFeed, type NodeRevisionSnapshot, type PreviewRuntime, PreviewSlot, useCodeBlock, useCodeDiff, useCodeLines, useDeferredRender, useNode, useNodeChildren, useNodeRevisionFeed, useTableBlock, useTableRows };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,53 +1,83 @@
|
|
|
1
|
-
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
import { CompiledMdxModule } from '@stream-mdx/core';
|
|
5
|
-
export { CoalesceConfig, CoalescingMetrics, DEFAULT_COALESCE_CONFIG, coalescePatches, coalescePatchesLinear, coalescePatchesQuadratic, coalescePatchesWithMetrics } from '@stream-mdx/core';
|
|
6
|
-
import { D as DeferredRenderConfig } from './streaming-markdown-CEI9eDZm.js';
|
|
7
|
-
export { a as DeferredRenderContext, L as LinkSafetyCheck, f as LinkSafetyConfig, M as MdxHydrationOptions, R as RendererMetrics, c as RendererStateSnapshot, e as StreamingCaret, b as StreamingFeatureFlags, h as StreamingMarkdown, d as StreamingMarkdownHandle, g as StreamingMarkdownProps, S as StreamingSchedulerOptions } from './streaming-markdown-CEI9eDZm.js';
|
|
1
|
+
import { a0 as NodeHandle, a3 as NodeHandleMetadata, a4 as NodeChildRange } from './index-D7dyyu3q.js';
|
|
2
|
+
export { A as AllowElementFn, u as AnimatedAnimationName, v as AnimatedOptions, w as AnimatedProp, an as AnimationTimeline, B as BroadContentComponentOptions, z as CodeBlockCopyButton, aJ as CodeBlockCopyButtonProps, F as CodeBlockDownloadButton, aK as CodeBlockDownloadButtonProps, x as CodeControlsBar, aG as CodeControlsBarProps, d as ComponentRegistry, g as ContentComponentHostProps, h as ContentComponentProps, i as ContentComponentPropsGuard, j as ContentComponentRegistration, C as ContentComponentsMap, D as DEFAULT_ANIMATED_OPTIONS, Z as DEFAULT_CONTROLS_LABELS, a5 as DEFAULT_TABLE_VIRTUALIZATION_CONFIG, as as DefaultLinkSafetyModal, au as DocumentMathMacroScope, av as DocumentMathMacroScopeContext, E as ElementFilterContext, k as ElementFilterDescriptor, l as ElementFilterOptions, a8 as HeadlessNodeViewProps, a9 as HtmlNodeViewProps, aa as InlineNodeViewProps, az as KaTeXBlockMath, ay as KaTeXInlineMath, ax as KaTeXMathProps, aA as LANGUAGE_EXTENSION_MAP, a1 as LinkSafetyModalProps, a2 as MathEngine, a6 as MathEngineOutput, aw as MathExpressionCompletenessContext, M as MathOptions, $ as MermaidEngine, a7 as MermaidEngineProps, ae as NativeActionSlot, ab as NativeNodeKey, ac as NodePresentation, ad as NodePresentationKey, _ as NodePresentations, af as NodeViewActions, ag as NodeViewMetadata, ah as NodeViewProps, ai as PresentationProps, ar as RenderInlineAnimationContext, R as Renderer, a as RendererConfig, aD as ResolvedCodeControls, aF as ResolvedMermaidControls, aE as ResolvedTableControls, S as STREAM_MDX_ANIMATION_CSS, y as TableControlsBar, aI as TableControlsBarProps, aH as TableControlsData, T as TableVirtualizationOptions, V as ValidatedContentComponentOptions, aB as copyToClipboard, ak as defaultInlineComponents, f as defineContentComponent, aC as downloadFile, G as escapeCsvCell, J as escapeTsvCell, P as getCodeSnippetFilename, Q as getExtensionForLanguage, O as inlineToPlainText, at as loadKaTeX, al as mapHtmlToReact, aj as renderInlineNodes, am as renderParagraphMixedSegments, aq as resolveAnimatedOptions, W as resolveCodeControls, U as resolveControlsConfig, Y as resolveMermaidControls, X as resolveTableControls, ao as splitTextSegments, ap as splitWordSegments, K as tableToCsv, N as tableToMarkdown, L as tableToTsv } from './index-D7dyyu3q.js';
|
|
3
|
+
export { b as TrustedMdxBlockProjection, c as TrustedMdxDocument, d as TrustedMdxDocumentSnapshot, a as TrustedMdxEngine, T as TrustedMdxEngineOptions, e as TrustedMdxRenderProps, f as TrustedMdxRevision } from './trusted-mdx-contract-ElKpkDI5.js';
|
|
8
4
|
export { DisplayMathWrapper, renderDisplayMathWithHtml } from './math/display-wrapper.js';
|
|
9
|
-
export {
|
|
10
|
-
|
|
5
|
+
export { MarkdownRenderer, MarkdownRenderer2, createMarkdownRenderer, useMarkdownRenderer } from './renderer.js';
|
|
6
|
+
import { D as DeferredRenderConfig } from './streaming-markdown-yELbJxyH.js';
|
|
7
|
+
export { a as DeferredRenderContext, E as EngineCompatibilityError, L as LinkSafetyCheck, f as LinkSafetyConfig, M as MarkdownEngineMode, R as RendererMetrics, c as RendererStateSnapshot, e as StreamingCaret, b as StreamingFeatureFlags, h as StreamingMarkdown, d as StreamingMarkdownHandle, g as StreamingMarkdownProps, S as StreamingSchedulerOptions } from './streaming-markdown-yELbJxyH.js';
|
|
8
|
+
export { RenderConfigVersionContext, useRendererBlocks, useRendererChildren, useRendererHasProvisionalBlocks, useRendererNode, useRendererNodeSnapshot } from './renderer/hooks.js';
|
|
9
|
+
export { N as NativeNodeView, r as renderNodePresentation } from './node-views-DpnYdaAS.js';
|
|
10
|
+
import React__default, { RefObject } from 'react';
|
|
11
|
+
import { CodeNodeHandle, CodeBlockMetadata, CodeLineRange, CodeLineRecord, TableNodeHandle, TableBlockMetadata, TableRowRange, TableRowRecord } from '@stream-mdx/core';
|
|
12
|
+
export { CoalesceConfig, CoalescingMetrics, DEFAULT_COALESCE_CONFIG, SyntaxRuleSpec, UrlTransform, UrlTransformContext, coalescePatches, coalescePatchesLinear, coalescePatchesQuadratic, coalescePatchesWithMetrics, defaultUrlTransform } from '@stream-mdx/core';
|
|
11
13
|
export { getPatchKind, isHeavyPatch, splitPatchBatch } from '@stream-mdx/core/perf/patch-batching';
|
|
12
14
|
export { AdaptiveBudgetState, PatchBatchInput, PatchBatchMeta, PatchCommitScheduler, PatchCommitSchedulerOptions, PatchFlushBatchResult, PatchFlushResult } from './renderer/patch-commit-scheduler.js';
|
|
13
|
-
export { ApplyPatchesOptions, NodeRecord, RendererStore, createRendererStore, isListPatchDebugEnabled } from './renderer/store.js';
|
|
14
|
-
|
|
15
|
-
export {
|
|
15
|
+
export { ApplyPatchesOptions, CodeBlockViewState, NodeRecord, ParagraphSegmentPlanEvent, ParagraphSegmentProjection, ParagraphSegmentProjectionBranch, ParagraphSegmentProjectionLeaf, ParagraphSegmentProjectionNode, RendererStore, RendererStoreOptions, capturePreparedRendererStore, createRendererStore, isListPatchDebugEnabled } from './renderer/store.js';
|
|
16
|
+
export { DEFAULT_VIRTUALIZED_CODE_CONFIG, VirtualizedCodeConfig, VirtualizedCodeRange, calculateCodeWindow, resolveVirtualizedCodeConfig, useVirtualizedCode } from './renderer/virtualized-code.js';
|
|
17
|
+
export { CodeEngine } from '@stream-mdx/worker/engine';
|
|
16
18
|
export { BottomStickDebugState, BottomStickJumpButtonRenderState, BottomStickMode, BottomStickScrollArea, BottomStickScrollAreaProps } from './components/bottom-stick-scroll-area.js';
|
|
19
|
+
export { DefaultDiffRenderer, DiffRendererProps } from './components/diff-renderer.js';
|
|
20
|
+
export { M as MarkdownBlocksRenderer } from './blocks-renderer-DAOBFBfi.js';
|
|
21
|
+
export { AppendResult, FinalizeResult, SourceCapacityError, StreamSessionError, WaitForCapacityOptions } from '@stream-mdx/protocol';
|
|
17
22
|
import 'react/jsx-runtime';
|
|
18
23
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
24
|
+
/** Observe stable metadata from one generation-bound node handle. */
|
|
25
|
+
declare function useNode(handle: NodeHandle): NodeHandleMetadata;
|
|
26
|
+
/** Observe an explicit half-open child range from one generation-bound node handle. */
|
|
27
|
+
declare function useNodeChildren(handle: NodeHandle, range: NodeChildRange): readonly NodeHandle[];
|
|
28
|
+
|
|
29
|
+
/** Immutable identity and revision state for one generation-bound node. */
|
|
30
|
+
interface NodeRevisionSnapshot {
|
|
31
|
+
readonly id: string;
|
|
32
|
+
readonly type: string;
|
|
33
|
+
readonly generation: number;
|
|
34
|
+
readonly revision: number;
|
|
35
|
+
readonly isFinalized: boolean;
|
|
36
|
+
}
|
|
37
|
+
/** Revision observation and an explicit cold read of the node's authored source. */
|
|
38
|
+
interface NodeRevisionFeed {
|
|
39
|
+
readonly getSnapshot: () => NodeRevisionSnapshot;
|
|
40
|
+
readonly subscribe: (listener: () => void) => () => void;
|
|
41
|
+
readonly readSource: () => string;
|
|
42
|
+
}
|
|
43
|
+
interface PreviewRuntime {
|
|
44
|
+
readonly id: string;
|
|
45
|
+
readonly view: React__default.ComponentType<{
|
|
46
|
+
readonly feed: NodeRevisionFeed;
|
|
47
|
+
readonly snapshot: NodeRevisionSnapshot;
|
|
48
|
+
readonly fallback: React__default.ReactNode;
|
|
49
|
+
}>;
|
|
50
|
+
}
|
|
51
|
+
type NodeRevisionHandle = NodeHandle | CodeNodeHandle;
|
|
52
|
+
/** Subscribe to one node revision and receive its stable feed plus current snapshot. */
|
|
53
|
+
declare function useNodeRevisionFeed(handle: NodeRevisionHandle): {
|
|
54
|
+
readonly feed: NodeRevisionFeed;
|
|
55
|
+
readonly snapshot: NodeRevisionSnapshot;
|
|
22
56
|
};
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
57
|
+
/** An inert native presentation unless the host supplies an explicit runtime. */
|
|
58
|
+
declare function PreviewSlot({ handle, runtime, children, }: {
|
|
59
|
+
readonly handle: NodeRevisionHandle;
|
|
60
|
+
readonly runtime?: PreviewRuntime;
|
|
61
|
+
readonly children?: React__default.ReactNode;
|
|
62
|
+
}): React__default.ReactElement;
|
|
63
|
+
|
|
64
|
+
/** Observe stable, bounded metadata from a live code owner. */
|
|
65
|
+
declare function useCodeBlock(handle: CodeNodeHandle): CodeBlockMetadata;
|
|
66
|
+
declare function useCodeLines(handle: CodeNodeHandle, range: CodeLineRange): readonly CodeLineRecord[];
|
|
67
|
+
/** Observe diff status and prepared rows within an explicit half-open range. */
|
|
68
|
+
declare function useCodeDiff(handle: CodeNodeHandle, range: CodeLineRange): {
|
|
69
|
+
readonly diffStatus: CodeBlockMetadata["diffStatus"];
|
|
70
|
+
readonly lines: readonly CodeLineRecord[];
|
|
26
71
|
};
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
private scheduled;
|
|
33
|
-
private idleId;
|
|
34
|
-
private options;
|
|
35
|
-
constructor(options?: MdxPrefetchQueueOptions);
|
|
36
|
-
enqueue(request: MdxPrefetchRequest): void;
|
|
37
|
-
cancel(id: string): void;
|
|
38
|
-
cancelAll(): void;
|
|
39
|
-
private schedule;
|
|
40
|
-
private clearIdle;
|
|
41
|
-
private drain;
|
|
42
|
-
private runRequest;
|
|
43
|
-
}
|
|
44
|
-
declare function prefetchMdxBundle(request: MdxPrefetchRequest & {
|
|
45
|
-
signal?: AbortSignal;
|
|
46
|
-
}): Promise<void>;
|
|
72
|
+
|
|
73
|
+
/** Observe stable, bounded metadata from a live table owner. */
|
|
74
|
+
declare function useTableBlock(handle: TableNodeHandle): TableBlockMetadata;
|
|
75
|
+
/** Observe a bounded half-open range of body rows without subscribing to the whole table. */
|
|
76
|
+
declare function useTableRows(handle: TableNodeHandle, range: TableRowRange): readonly TableRowRecord[];
|
|
47
77
|
|
|
48
78
|
type DeferredRenderOptions = DeferredRenderConfig & {
|
|
49
79
|
enabled?: boolean;
|
|
50
80
|
};
|
|
51
81
|
declare function useDeferredRender(ref: RefObject<Element>, options?: DeferredRenderOptions): boolean;
|
|
52
82
|
|
|
53
|
-
export { DeferredRenderConfig,
|
|
83
|
+
export { DeferredRenderConfig, NodeChildRange, NodeHandle, NodeHandleMetadata, type NodeRevisionFeed, type NodeRevisionSnapshot, type PreviewRuntime, PreviewSlot, useCodeBlock, useCodeDiff, useCodeLines, useDeferredRender, useNode, useNodeChildren, useNodeRevisionFeed, useTableBlock, useTableRows };
|