@svadmin/ai-elements 0.7.4 → 0.8.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.
Files changed (214) hide show
  1. package/README.md +20 -4
  2. package/THIRD_PARTY_NOTICES.md +67 -6
  3. package/dist/ai.css +1 -5
  4. package/dist/ai.theme.css +1 -0
  5. package/dist/class-properties.generated.d.ts +1 -0
  6. package/dist/class-properties.generated.js +2 -0
  7. package/dist/classnames.d.ts +8 -0
  8. package/dist/classnames.js +26 -0
  9. package/dist/components/Response.svelte +2 -2
  10. package/dist/components/Response.svelte.d.ts +1 -1
  11. package/dist/components/code/index.d.ts +9 -18
  12. package/dist/components/code/index.js +8 -11
  13. package/dist/components/code-block/highlight.js +1 -1
  14. package/dist/utilities.css +3172 -0
  15. package/dist/utils.d.ts +1 -1
  16. package/dist/utils.js +1 -1
  17. package/package.json +36 -11
  18. package/vendor/streamdown/AnimatedText.svelte +93 -0
  19. package/vendor/streamdown/AnimatedText.svelte.d.ts +6 -0
  20. package/vendor/streamdown/Block.svelte +96 -0
  21. package/vendor/streamdown/Block.svelte.d.ts +11 -0
  22. package/vendor/streamdown/Elements/Alert.svelte +69 -0
  23. package/vendor/streamdown/Elements/Alert.svelte.d.ts +10 -0
  24. package/vendor/streamdown/Elements/Citation.svelte +260 -0
  25. package/vendor/streamdown/Elements/Citation.svelte.d.ts +7 -0
  26. package/vendor/streamdown/Elements/Code.svelte +226 -0
  27. package/vendor/streamdown/Elements/Code.svelte.d.ts +9 -0
  28. package/vendor/streamdown/Elements/Element.svelte +574 -0
  29. package/vendor/streamdown/Elements/Element.svelte.d.ts +10 -0
  30. package/vendor/streamdown/Elements/FootnoteRef.svelte +30 -0
  31. package/vendor/streamdown/Elements/FootnoteRef.svelte.d.ts +7 -0
  32. package/vendor/streamdown/Elements/Footnotes.svelte +54 -0
  33. package/vendor/streamdown/Elements/Footnotes.svelte.d.ts +7 -0
  34. package/vendor/streamdown/Elements/Image.svelte +200 -0
  35. package/vendor/streamdown/Elements/Image.svelte.d.ts +10 -0
  36. package/vendor/streamdown/Elements/Link.svelte +220 -0
  37. package/vendor/streamdown/Elements/Link.svelte.d.ts +10 -0
  38. package/vendor/streamdown/Elements/LinkSafetyModal.svelte +121 -0
  39. package/vendor/streamdown/Elements/LinkSafetyModal.svelte.d.ts +4 -0
  40. package/vendor/streamdown/Elements/Math.svelte +100 -0
  41. package/vendor/streamdown/Elements/Math.svelte.d.ts +9 -0
  42. package/vendor/streamdown/Elements/Mermaid.svelte +455 -0
  43. package/vendor/streamdown/Elements/Mermaid.svelte.d.ts +9 -0
  44. package/vendor/streamdown/Elements/MermaidDownload.svelte +145 -0
  45. package/vendor/streamdown/Elements/MermaidDownload.svelte.d.ts +8 -0
  46. package/vendor/streamdown/Elements/Slot.svelte +23 -0
  47. package/vendor/streamdown/Elements/Slot.svelte.d.ts +10 -0
  48. package/vendor/streamdown/Elements/Table.svelte +195 -0
  49. package/vendor/streamdown/Elements/Table.svelte.d.ts +9 -0
  50. package/vendor/streamdown/Elements/TableDownload.svelte +221 -0
  51. package/vendor/streamdown/Elements/TableDownload.svelte.d.ts +8 -0
  52. package/vendor/streamdown/Elements/fallbacks/CodeFallback.svelte +41 -0
  53. package/vendor/streamdown/Elements/fallbacks/CodeFallback.svelte.d.ts +9 -0
  54. package/vendor/streamdown/Elements/fallbacks/MathFallback.svelte +35 -0
  55. package/vendor/streamdown/Elements/fallbacks/MathFallback.svelte.d.ts +8 -0
  56. package/vendor/streamdown/Elements/fallbacks/MermaidFallback.svelte +36 -0
  57. package/vendor/streamdown/Elements/fallbacks/MermaidFallback.svelte.d.ts +9 -0
  58. package/vendor/streamdown/Elements/fallbacks/index.d.ts +3 -0
  59. package/vendor/streamdown/Elements/fallbacks/index.js +3 -0
  60. package/vendor/streamdown/Elements/icons.d.ts +31 -0
  61. package/vendor/streamdown/Elements/icons.js +200 -0
  62. package/vendor/streamdown/Elements/index.d.ts +8 -0
  63. package/vendor/streamdown/Elements/index.js +8 -0
  64. package/vendor/streamdown/Elements/popover.svelte.d.ts +8 -0
  65. package/vendor/streamdown/Elements/popover.svelte.js +45 -0
  66. package/vendor/streamdown/Elements/stepperState.svelte.d.ts +36 -0
  67. package/vendor/streamdown/Elements/stepperState.svelte.js +92 -0
  68. package/vendor/streamdown/IconProvider.svelte +11 -0
  69. package/vendor/streamdown/IconProvider.svelte.d.ts +30 -0
  70. package/vendor/streamdown/LICENSE +202 -0
  71. package/vendor/streamdown/PluginProvider.svelte +11 -0
  72. package/vendor/streamdown/PluginProvider.svelte.d.ts +30 -0
  73. package/vendor/streamdown/README.svadmin.md +5 -0
  74. package/vendor/streamdown/Streamdown.svelte +447 -0
  75. package/vendor/streamdown/Streamdown.svelte.d.ts +25 -0
  76. package/vendor/streamdown/block/BlockTokens.svelte +45 -0
  77. package/vendor/streamdown/block/BlockTokens.svelte.d.ts +9 -0
  78. package/vendor/streamdown/block/html.d.ts +14 -0
  79. package/vendor/streamdown/block/html.js +27 -0
  80. package/vendor/streamdown/block/text.d.ts +10 -0
  81. package/vendor/streamdown/block/text.js +31 -0
  82. package/vendor/streamdown/context-key.d.ts +1 -0
  83. package/vendor/streamdown/context-key.js +1 -0
  84. package/vendor/streamdown/context.svelte.d.ts +24 -0
  85. package/vendor/streamdown/context.svelte.js +75 -0
  86. package/vendor/streamdown/contracts/plugins.d.ts +26 -0
  87. package/vendor/streamdown/contracts/plugins.js +1 -0
  88. package/vendor/streamdown/contracts/streamdown.d.ts +374 -0
  89. package/vendor/streamdown/contracts/streamdown.js +29 -0
  90. package/vendor/streamdown/detect-direction.d.ts +1 -0
  91. package/vendor/streamdown/detect-direction.js +1 -0
  92. package/vendor/streamdown/icon-context.d.ts +36 -0
  93. package/vendor/streamdown/icon-context.js +52 -0
  94. package/vendor/streamdown/incomplete-code.d.ts +6 -0
  95. package/vendor/streamdown/incomplete-code.js +23 -0
  96. package/vendor/streamdown/index.d.ts +22 -0
  97. package/vendor/streamdown/index.js +20 -0
  98. package/vendor/streamdown/markdown-parse-cache.d.ts +37 -0
  99. package/vendor/streamdown/markdown-parse-cache.js +109 -0
  100. package/vendor/streamdown/markdown.d.ts +21 -0
  101. package/vendor/streamdown/markdown.js +214 -0
  102. package/vendor/streamdown/marked/index.d.ts +44 -0
  103. package/vendor/streamdown/marked/index.js +228 -0
  104. package/vendor/streamdown/marked/marked-alert.d.ts +13 -0
  105. package/vendor/streamdown/marked/marked-alert.js +47 -0
  106. package/vendor/streamdown/marked/marked-align.d.ts +10 -0
  107. package/vendor/streamdown/marked/marked-align.js +45 -0
  108. package/vendor/streamdown/marked/marked-br.d.ts +6 -0
  109. package/vendor/streamdown/marked/marked-br.js +15 -0
  110. package/vendor/streamdown/marked/marked-citations.d.ts +8 -0
  111. package/vendor/streamdown/marked/marked-citations.js +53 -0
  112. package/vendor/streamdown/marked/marked-cjk.d.ts +2 -0
  113. package/vendor/streamdown/marked/marked-cjk.js +165 -0
  114. package/vendor/streamdown/marked/marked-dl.d.ts +23 -0
  115. package/vendor/streamdown/marked/marked-dl.js +44 -0
  116. package/vendor/streamdown/marked/marked-footnotes.d.ts +26 -0
  117. package/vendor/streamdown/marked/marked-footnotes.js +101 -0
  118. package/vendor/streamdown/marked/marked-hr.d.ts +6 -0
  119. package/vendor/streamdown/marked/marked-hr.js +18 -0
  120. package/vendor/streamdown/marked/marked-list.d.ts +31 -0
  121. package/vendor/streamdown/marked/marked-list.js +330 -0
  122. package/vendor/streamdown/marked/marked-math.d.ts +13 -0
  123. package/vendor/streamdown/marked/marked-math.js +129 -0
  124. package/vendor/streamdown/marked/marked-mdx.d.ts +12 -0
  125. package/vendor/streamdown/marked/marked-mdx.js +124 -0
  126. package/vendor/streamdown/marked/marked-subsup.d.ts +22 -0
  127. package/vendor/streamdown/marked/marked-subsup.js +40 -0
  128. package/vendor/streamdown/marked/marked-table.d.ts +80 -0
  129. package/vendor/streamdown/marked/marked-table.js +527 -0
  130. package/vendor/streamdown/plugin-context.d.ts +19 -0
  131. package/vendor/streamdown/plugin-context.js +40 -0
  132. package/vendor/streamdown/plugins/cjk-shared.d.ts +1 -0
  133. package/vendor/streamdown/plugins/cjk-shared.js +1 -0
  134. package/vendor/streamdown/plugins.d.ts +19 -0
  135. package/vendor/streamdown/plugins.js +107 -0
  136. package/vendor/streamdown/provenance.json +229 -0
  137. package/vendor/streamdown/remend.d.ts +2 -0
  138. package/vendor/streamdown/remend.js +1 -0
  139. package/vendor/streamdown/security/html.d.ts +19 -0
  140. package/vendor/streamdown/security/html.js +329 -0
  141. package/vendor/streamdown/security/preprocess-custom-tags.d.ts +1 -0
  142. package/vendor/streamdown/security/preprocess-custom-tags.js +20 -0
  143. package/vendor/streamdown/security/preprocess-literal-tag-content.d.ts +1 -0
  144. package/vendor/streamdown/security/preprocess-literal-tag-content.js +16 -0
  145. package/vendor/streamdown/security/types.d.ts +1 -0
  146. package/vendor/streamdown/security/types.js +1 -0
  147. package/vendor/streamdown/site/SiteHeader.svelte +94 -0
  148. package/vendor/streamdown/site/SiteHeader.svelte.d.ts +6 -0
  149. package/vendor/streamdown/site/home/HomeDemo.svelte +122 -0
  150. package/vendor/streamdown/site/home/HomeDemo.svelte.d.ts +3 -0
  151. package/vendor/streamdown/site/home/HomePage.svelte +293 -0
  152. package/vendor/streamdown/site/home/HomePage.svelte.d.ts +3 -0
  153. package/vendor/streamdown/site/home/content.d.ts +69 -0
  154. package/vendor/streamdown/site/home/content.js +144 -0
  155. package/vendor/streamdown/site/metadata.d.ts +4 -0
  156. package/vendor/streamdown/site/metadata.js +4 -0
  157. package/vendor/streamdown/site/navigation.d.ts +6 -0
  158. package/vendor/streamdown/site/navigation.js +22 -0
  159. package/vendor/streamdown/streamdown/config.d.ts +41 -0
  160. package/vendor/streamdown/streamdown/config.js +125 -0
  161. package/vendor/streamdown/streamdown/context.d.ts +12 -0
  162. package/vendor/streamdown/streamdown/context.js +2 -0
  163. package/vendor/streamdown/streamdown/incomplete-markdown.d.ts +5 -0
  164. package/vendor/streamdown/streamdown/incomplete-markdown.js +79 -0
  165. package/vendor/streamdown/streamdown/pipeline.d.ts +95 -0
  166. package/vendor/streamdown/streamdown/pipeline.js +138 -0
  167. package/vendor/streamdown/streamdown/runtime.d.ts +59 -0
  168. package/vendor/streamdown/streamdown/runtime.js +112 -0
  169. package/vendor/streamdown/streaming.d.ts +5 -0
  170. package/vendor/streamdown/streaming.js +5 -0
  171. package/vendor/streamdown/theme.d.ts +486 -0
  172. package/vendor/streamdown/theme.js +370 -0
  173. package/vendor/streamdown/translations.d.ts +43 -0
  174. package/vendor/streamdown/translations.js +54 -0
  175. package/vendor/streamdown/url-policy.d.ts +1 -0
  176. package/vendor/streamdown/url-policy.js +1 -0
  177. package/vendor/streamdown/utils/bind.d.ts +8 -0
  178. package/vendor/streamdown/utils/bind.js +26 -0
  179. package/vendor/streamdown/utils/bundledLanguages.d.ts +1 -0
  180. package/vendor/streamdown/utils/bundledLanguages.js +1 -0
  181. package/vendor/streamdown/utils/code-block.d.ts +8 -0
  182. package/vendor/streamdown/utils/code-block.js +38 -0
  183. package/vendor/streamdown/utils/copy.svelte.d.ts +7 -0
  184. package/vendor/streamdown/utils/copy.svelte.js +38 -0
  185. package/vendor/streamdown/utils/darkMode.svelte.d.ts +3 -0
  186. package/vendor/streamdown/utils/darkMode.svelte.js +49 -0
  187. package/vendor/streamdown/utils/detectDirection.d.ts +1 -0
  188. package/vendor/streamdown/utils/detectDirection.js +19 -0
  189. package/vendor/streamdown/utils/get.d.ts +1 -0
  190. package/vendor/streamdown/utils/get.js +25 -0
  191. package/vendor/streamdown/utils/hightlighter.svelte.d.ts +30 -0
  192. package/vendor/streamdown/utils/hightlighter.svelte.js +524 -0
  193. package/vendor/streamdown/utils/index.d.ts +3 -0
  194. package/vendor/streamdown/utils/index.js +3 -0
  195. package/vendor/streamdown/utils/mermaid.d.ts +13 -0
  196. package/vendor/streamdown/utils/mermaid.js +49 -0
  197. package/vendor/streamdown/utils/panzoom.svelte.d.ts +35 -0
  198. package/vendor/streamdown/utils/panzoom.svelte.js +556 -0
  199. package/vendor/streamdown/utils/parse-incomplete-markdown.d.ts +2 -0
  200. package/vendor/streamdown/utils/parse-incomplete-markdown.js +2 -0
  201. package/vendor/streamdown/utils/runtime-env.d.ts +1 -0
  202. package/vendor/streamdown/utils/runtime-env.js +13 -0
  203. package/vendor/streamdown/utils/save.d.ts +1 -0
  204. package/vendor/streamdown/utils/save.js +14 -0
  205. package/vendor/streamdown/utils/scroll-lock.d.ts +2 -0
  206. package/vendor/streamdown/utils/scroll-lock.js +35 -0
  207. package/vendor/streamdown/utils/table.d.ts +8 -0
  208. package/vendor/streamdown/utils/table.js +176 -0
  209. package/vendor/streamdown/utils/url.d.ts +22 -0
  210. package/vendor/streamdown/utils/url.js +98 -0
  211. package/vendor/streamdown/utils/useClickOutside.svelte.d.ts +8 -0
  212. package/vendor/streamdown/utils/useClickOutside.svelte.js +41 -0
  213. package/vendor/streamdown/utils/useKeyDown.svelte.d.ts +5 -0
  214. package/vendor/streamdown/utils/useKeyDown.svelte.js +23 -0
@@ -0,0 +1,125 @@
1
+ import { normalizeMermaidControls } from '../context.svelte.js';
2
+ import { getThemeName } from '../plugins.js';
3
+ import { createCn, mergeTheme, prefixThemeClasses, shadcnTheme, theme as tailwindTheme } from '../theme.js';
4
+ const animationNameMap = {
5
+ blurIn: 'blur',
6
+ fadeIn: 'fade',
7
+ slideUp: 'slideUp'
8
+ };
9
+ export const defaultLinkSafetyConfig = {
10
+ enabled: true
11
+ };
12
+ export const defaultShikiTheme = ['github-light', 'github-dark'];
13
+ export const footnoteDefinitionPattern = /\[\^[\w-]{1,200}\]:/;
14
+ export const resolveShikiThemePair = (theme) => {
15
+ if (Array.isArray(theme)) {
16
+ return [theme[0] ?? defaultShikiTheme[0], theme[1] ?? theme[0] ?? defaultShikiTheme[1]];
17
+ }
18
+ if (theme) {
19
+ return [theme, theme];
20
+ }
21
+ return defaultShikiTheme;
22
+ };
23
+ export const collectThemeRegistrations = (themes) => Object.fromEntries(themes
24
+ .filter((theme) => typeof theme !== 'string')
25
+ .map((theme) => [getThemeName(theme), theme]));
26
+ export const resolveCompatAnimation = (animated, isAnimating, mode) => {
27
+ if (!animated || !isAnimating || mode === 'static') {
28
+ return {
29
+ enabled: false
30
+ };
31
+ }
32
+ if (animated === true) {
33
+ return {
34
+ enabled: true,
35
+ animateOnMount: true,
36
+ type: 'fade',
37
+ duration: 150,
38
+ timingFunction: 'ease',
39
+ tokenize: 'word',
40
+ stagger: 40
41
+ };
42
+ }
43
+ const animationName = (typeof animated.animation === 'string' && animated.animation.length > 0
44
+ ? (animationNameMap[animated.animation] ??
45
+ animated.animation)
46
+ : undefined) ?? 'fade';
47
+ const timingFunction = typeof animated.easing === 'string' && animated.easing.trim().length > 0
48
+ ? animated.easing
49
+ : 'ease';
50
+ return {
51
+ enabled: true,
52
+ animateOnMount: true,
53
+ type: animationName,
54
+ duration: animated.duration ?? 150,
55
+ timingFunction,
56
+ tokenize: animated.sep ?? 'word',
57
+ stagger: animated.stagger ?? 40
58
+ };
59
+ };
60
+ export const resolveControls = (controls) => {
61
+ if (controls === false) {
62
+ return {
63
+ controls: {
64
+ code: false,
65
+ mermaid: normalizeMermaidControls(false),
66
+ table: false
67
+ },
68
+ codeControls: {
69
+ copy: false,
70
+ download: false
71
+ }
72
+ };
73
+ }
74
+ const codeControls = controls === true || controls === undefined ? true : (controls.code ?? true);
75
+ const tableControls = controls === true || controls === undefined ? true : (controls.table ?? true);
76
+ const mermaidControls = controls === true || controls === undefined ? undefined : controls.mermaid;
77
+ return {
78
+ controls: {
79
+ code: codeControls !== false,
80
+ mermaid: normalizeMermaidControls(mermaidControls),
81
+ table: tableControls
82
+ },
83
+ codeControls: codeControls === false
84
+ ? {
85
+ copy: false,
86
+ download: false
87
+ }
88
+ : codeControls === true
89
+ ? {
90
+ copy: true,
91
+ download: true
92
+ }
93
+ : {
94
+ copy: codeControls.copy ?? true,
95
+ download: codeControls.download ?? true
96
+ }
97
+ };
98
+ };
99
+ export const resolveAnimationConfig = ({ animation, animated, isAnimating, mode }) => {
100
+ if (animation) {
101
+ if (!animation.enabled) {
102
+ return {
103
+ enabled: false
104
+ };
105
+ }
106
+ return {
107
+ enabled: true,
108
+ animateOnMount: animation.animateOnMount ?? false,
109
+ type: animation.type || 'blur',
110
+ duration: animation.duration ?? 500,
111
+ timingFunction: animation.timingFunction || 'ease-in',
112
+ tokenize: animation.tokenize || 'word',
113
+ stagger: animation.stagger ?? 0
114
+ };
115
+ }
116
+ return resolveCompatAnimation(animated, isAnimating, mode);
117
+ };
118
+ export const resolveThemeClassMap = ({ theme, baseTheme, shouldMergeTheme, prefix }) => {
119
+ const fallbackTheme = baseTheme === 'shadcn' ? shadcnTheme : tailwindTheme;
120
+ const mergedTheme = shouldMergeTheme || theme ? mergeTheme(theme, baseTheme) : fallbackTheme;
121
+ return prefixThemeClasses(prefix, mergedTheme);
122
+ };
123
+ export const resolveRootClassName = ({ className, futureClassName, prefix, shouldShowCaret, shouldHideCaret }) => createCn(prefix)('whitespace-normal', [className, futureClassName].filter((value) => Boolean(value)).join(' '), shouldShowCaret &&
124
+ !shouldHideCaret &&
125
+ '[&>*:last-child]:after:inline [&>*:last-child]:after:align-baseline [&>*:last-child]:after:content-[var(--streamdown-caret)]');
@@ -0,0 +1,12 @@
1
+ import { StreamdownContext } from '../context.svelte.js';
2
+ import type { StreamdownContext as StreamdownContextContract } from '../contracts/streamdown.js';
3
+ import type { StreamdownParseRuntimeInit, StreamdownRenderRuntimeInit, StreamdownSecurityRuntimeInit, StreamdownUiConfigRuntimeInit } from './runtime.js';
4
+ export type StreamdownRuntimeContextArgs<Source extends Record<string, any>> = {
5
+ parse: StreamdownParseRuntimeInit<Source> & {
6
+ remend: () => StreamdownContextContract<Source>['remend'];
7
+ };
8
+ security: StreamdownSecurityRuntimeInit<Source>;
9
+ render: StreamdownRenderRuntimeInit<Source>;
10
+ uiConfig: StreamdownUiConfigRuntimeInit<Source>;
11
+ };
12
+ export declare const createStreamdownRuntimeContext: <Source extends Record<string, any>>(args: StreamdownRuntimeContextArgs<Source>) => StreamdownContext<Source>;
@@ -0,0 +1,2 @@
1
+ import { StreamdownContext } from '../context.svelte.js';
2
+ export const createStreamdownRuntimeContext = (args) => new StreamdownContext(args);
@@ -0,0 +1,5 @@
1
+ import { IncompleteMarkdownParser, type RemendOptions } from '../remend.js';
2
+ export declare const createStreamdownIncompleteMarkdownParser: (options?: RemendOptions) => IncompleteMarkdownParser;
3
+ export declare const repairIncompleteMarkdown: (text: string, options?: RemendOptions) => string;
4
+ export declare const parseStreamdownIncompleteMarkdown: (text: string, options?: RemendOptions) => string;
5
+ export declare const repairStreamdownRenderedMarkdown: (text: string, options?: RemendOptions) => string;
@@ -0,0 +1,79 @@
1
+ import remend from '@streamdown-svelte/remend';
2
+ import { IncompleteMarkdownParser } from '../remend.js';
3
+ const LOCAL_RECOVERY_PLUGIN_NAMES = [
4
+ 'strikethrough',
5
+ 'doubleUnderscoreItalic',
6
+ 'singleAsteriskItalic',
7
+ 'singleUnderscoreItalic',
8
+ 'inlineCode',
9
+ 'links'
10
+ ];
11
+ const NON_DEFAULT_DISABLED_OPTIONS = [
12
+ 'bold',
13
+ 'boldItalic',
14
+ 'comparisonOperators',
15
+ 'htmlTags',
16
+ 'images',
17
+ 'inlineCode',
18
+ 'italic',
19
+ 'katex',
20
+ 'links',
21
+ 'setextHeadings',
22
+ 'singleTilde',
23
+ 'strikethrough'
24
+ ];
25
+ const createStreamdownDefaultPlugins = () => {
26
+ const plugins = IncompleteMarkdownParser.createDefaultPlugins();
27
+ const localPluginNames = new Set(LOCAL_RECOVERY_PLUGIN_NAMES);
28
+ const localPlugins = new Map(plugins
29
+ .filter((plugin) => localPluginNames.has(plugin.name))
30
+ .map((plugin) => [plugin.name, plugin]));
31
+ const basePlugins = plugins.filter((plugin) => !localPluginNames.has(plugin.name));
32
+ const boldPluginIndex = basePlugins.findIndex((plugin) => plugin.name === 'bold');
33
+ if (boldPluginIndex === -1) {
34
+ return plugins;
35
+ }
36
+ basePlugins.splice(boldPluginIndex + 1, 0, ...LOCAL_RECOVERY_PLUGIN_NAMES.map((pluginName) => localPlugins.get(pluginName)).filter((plugin) => plugin != null));
37
+ return basePlugins;
38
+ };
39
+ const defaultParser = new IncompleteMarkdownParser(createStreamdownDefaultPlugins());
40
+ const hasNonDefaultRemendConfiguration = (options) => {
41
+ if (!options) {
42
+ return false;
43
+ }
44
+ if ((options.handlers?.length ?? 0) > 0) {
45
+ return true;
46
+ }
47
+ if (options.inlineKatex === true) {
48
+ return true;
49
+ }
50
+ if (options.linkMode && options.linkMode !== 'protocol') {
51
+ return true;
52
+ }
53
+ return NON_DEFAULT_DISABLED_OPTIONS.some((optionKey) => options[optionKey] === false);
54
+ };
55
+ export const createStreamdownIncompleteMarkdownParser = (options) => hasNonDefaultRemendConfiguration(options)
56
+ ? new IncompleteMarkdownParser(IncompleteMarkdownParser.createDefaultPlugins())
57
+ : new IncompleteMarkdownParser(createStreamdownDefaultPlugins());
58
+ export const repairIncompleteMarkdown = (text, options) => {
59
+ if (!text || typeof text !== 'string') {
60
+ return text;
61
+ }
62
+ if (text.trim().length === 0) {
63
+ return '';
64
+ }
65
+ if (hasNonDefaultRemendConfiguration(options)) {
66
+ return remend(text, options);
67
+ }
68
+ return defaultParser.parse(text);
69
+ };
70
+ export const parseStreamdownIncompleteMarkdown = repairIncompleteMarkdown;
71
+ export const repairStreamdownRenderedMarkdown = (text, options) => {
72
+ if (!text || typeof text !== 'string') {
73
+ return text;
74
+ }
75
+ if (text.trim().length === 0) {
76
+ return '';
77
+ }
78
+ return remend(text, options);
79
+ };
@@ -0,0 +1,95 @@
1
+ import type { MarkdownBlockCacheScope, MarkdownBlockParseResult } from '../markdown-parse-cache.js';
2
+ import type { RemendOptions } from '@streamdown-svelte/remend';
3
+ import type { Footnote, FootnoteRef } from '../marked/marked-footnotes.js';
4
+ import type { Extension, FootnoteState, StreamdownToken } from '../marked/index.js';
5
+ import { type MarkdownFilteringOptions } from '../markdown.js';
6
+ import { carets } from '../streaming.js';
7
+ export type ParsedBlock = {
8
+ raw: string;
9
+ tokens: StreamdownToken[];
10
+ footnotes: FootnoteState;
11
+ isIncomplete: boolean;
12
+ };
13
+ export declare const preprocessStreamdownContent: ({ content, shouldNormalizeHtmlIndentation, literalTagContent, allowedTagNames }: {
14
+ content: string;
15
+ shouldNormalizeHtmlIndentation: boolean;
16
+ literalTagContent?: string[];
17
+ allowedTagNames: string[];
18
+ }) => string;
19
+ export declare const preserveStreamingFootnoteLiterals: ({ tokens, mode, isAnimating }: {
20
+ tokens: StreamdownToken[];
21
+ mode: "static" | "streaming";
22
+ isAnimating: boolean;
23
+ }) => StreamdownToken[];
24
+ export declare const shouldResolveFootnotes: ({ markdown, mode, parseIncompleteMarkdown }: {
25
+ markdown: string;
26
+ mode: "static" | "streaming";
27
+ parseIncompleteMarkdown: boolean;
28
+ }) => boolean;
29
+ export declare const parseMarkdownWithOptionalFootnotes: ({ markdown, cache, extensions, mode, parseIncompleteMarkdown, remend, cacheScope }: {
30
+ markdown: string;
31
+ cache: {
32
+ parseBlock: (request: {
33
+ markdown: string;
34
+ extensions?: Extension[];
35
+ resolveFootnotes: boolean;
36
+ cacheScope?: MarkdownBlockCacheScope;
37
+ }) => MarkdownBlockParseResult;
38
+ };
39
+ extensions: Extension[] | undefined;
40
+ mode: "static" | "streaming";
41
+ parseIncompleteMarkdown: boolean;
42
+ remend?: RemendOptions;
43
+ cacheScope?: MarkdownBlockCacheScope;
44
+ }) => MarkdownBlockParseResult;
45
+ export declare const buildParsedBlocks: ({ resolvedStatic, normalizedContent, parsedMarkdownDocument, rawBlocks, blockIsIncomplete, mode, isAnimating, parseMarkdownWithFootnotes }: {
46
+ resolvedStatic: boolean;
47
+ normalizedContent: string;
48
+ parsedMarkdownDocument: {
49
+ staticBlock: MarkdownBlockParseResult | null;
50
+ };
51
+ rawBlocks: string[];
52
+ blockIsIncomplete: boolean[];
53
+ mode: "static" | "streaming";
54
+ isAnimating: boolean;
55
+ parseMarkdownWithFootnotes: (markdown: string, cacheScope?: MarkdownBlockCacheScope) => MarkdownBlockParseResult;
56
+ }) => {
57
+ raw: string;
58
+ tokens: StreamdownToken[];
59
+ footnotes: FootnoteState;
60
+ isIncomplete: boolean;
61
+ }[];
62
+ export declare const mergeFootnoteState: ({ documentFootnotes, parsedBlocks }: {
63
+ documentFootnotes: FootnoteState;
64
+ parsedBlocks: ParsedBlock[];
65
+ }) => {
66
+ refs: Map<string, FootnoteRef>;
67
+ footnotes: Map<string, Footnote>;
68
+ };
69
+ export declare const buildFootnoteEntries: ({ footnoteState, parseMarkdownWithFootnotes, filtering }: {
70
+ footnoteState: FootnoteState;
71
+ parseMarkdownWithFootnotes: (markdown: string) => MarkdownBlockParseResult;
72
+ filtering: MarkdownFilteringOptions;
73
+ }) => {
74
+ lines: string[];
75
+ tokens: StreamdownToken[];
76
+ type: "footnote";
77
+ raw: string;
78
+ label: string;
79
+ }[];
80
+ export declare const resolveCaretPresentation: ({ caret, className, futureClassName, prefix, rawBlocks, shouldShowCaret }: {
81
+ caret: keyof typeof carets | undefined;
82
+ className: string | undefined;
83
+ futureClassName: string | undefined;
84
+ prefix: string | undefined;
85
+ rawBlocks: string[];
86
+ shouldShowCaret: boolean;
87
+ }) => {
88
+ shouldHideCaret: boolean;
89
+ rootStyle: string | undefined;
90
+ rootClassName: string;
91
+ };
92
+ export declare const resolveBlockDirection: ({ block, dir }: {
93
+ block: string;
94
+ dir: "auto" | "ltr" | "rtl" | undefined;
95
+ }) => "ltr" | "rtl" | undefined;
@@ -0,0 +1,138 @@
1
+ import { filterMarkdownTokens } from '../markdown.js';
2
+ import { carets, hasIncompleteCodeFence, hasTable } from '../streaming.js';
3
+ import { detectTextDirection } from '../utils/detectDirection.js';
4
+ import { normalizeHtmlIndentation } from '../security/html.js';
5
+ import { preprocessCustomTags } from '../security/preprocess-custom-tags.js';
6
+ import { preprocessLiteralTagContent } from '../security/preprocess-literal-tag-content.js';
7
+ import { repairIncompleteMarkdown } from './incomplete-markdown.js';
8
+ import { footnoteDefinitionPattern, resolveRootClassName } from './config.js';
9
+ export const preprocessStreamdownContent = ({ content, shouldNormalizeHtmlIndentation, literalTagContent, allowedTagNames }) => {
10
+ let result = shouldNormalizeHtmlIndentation ? normalizeHtmlIndentation(content) : content;
11
+ if (literalTagContent && literalTagContent.length > 0) {
12
+ result = preprocessLiteralTagContent(result, literalTagContent);
13
+ }
14
+ if (allowedTagNames.length > 0) {
15
+ result = preprocessCustomTags(result, allowedTagNames);
16
+ }
17
+ return result;
18
+ };
19
+ export const preserveStreamingFootnoteLiterals = ({ tokens, mode, isAnimating }) => tokens.map((token) => {
20
+ if (mode === 'streaming' &&
21
+ token.type === 'footnoteRef') {
22
+ return {
23
+ type: 'text',
24
+ raw: token.raw,
25
+ text: token.raw
26
+ };
27
+ }
28
+ if ('tokens' in token && Array.isArray(token.tokens)) {
29
+ return {
30
+ ...token,
31
+ tokens: preserveStreamingFootnoteLiterals({
32
+ tokens: token.tokens,
33
+ mode,
34
+ isAnimating
35
+ })
36
+ };
37
+ }
38
+ return token;
39
+ });
40
+ export const shouldResolveFootnotes = ({ markdown, mode, parseIncompleteMarkdown }) => !(mode === 'streaming' && parseIncompleteMarkdown && !footnoteDefinitionPattern.test(markdown));
41
+ export const parseMarkdownWithOptionalFootnotes = ({ markdown, cache, extensions, mode, parseIncompleteMarkdown, remend, cacheScope = 'stable' }) => cache.parseBlock({
42
+ markdown: mode === 'streaming' && parseIncompleteMarkdown
43
+ ? repairIncompleteMarkdown(markdown, remend)
44
+ : markdown,
45
+ extensions,
46
+ resolveFootnotes: shouldResolveFootnotes({
47
+ markdown,
48
+ mode,
49
+ parseIncompleteMarkdown
50
+ }),
51
+ cacheScope
52
+ });
53
+ export const buildParsedBlocks = ({ resolvedStatic, normalizedContent, parsedMarkdownDocument, rawBlocks, blockIsIncomplete, mode, isAnimating, parseMarkdownWithFootnotes }) => {
54
+ if (resolvedStatic && parsedMarkdownDocument.staticBlock) {
55
+ return [
56
+ {
57
+ raw: normalizedContent,
58
+ tokens: preserveStreamingFootnoteLiterals({
59
+ tokens: parsedMarkdownDocument.staticBlock.tokens,
60
+ mode,
61
+ isAnimating
62
+ }),
63
+ footnotes: parsedMarkdownDocument.staticBlock.footnotes,
64
+ isIncomplete: blockIsIncomplete[0] ?? false
65
+ }
66
+ ];
67
+ }
68
+ return rawBlocks.map((raw, index) => {
69
+ const isIncomplete = blockIsIncomplete[index] ?? false;
70
+ const parsed = parseMarkdownWithFootnotes(raw, isIncomplete ? 'transient' : 'stable');
71
+ return {
72
+ raw,
73
+ tokens: preserveStreamingFootnoteLiterals({
74
+ tokens: parsed.tokens,
75
+ mode,
76
+ isAnimating
77
+ }),
78
+ footnotes: parsed.footnotes,
79
+ isIncomplete
80
+ };
81
+ });
82
+ };
83
+ export const mergeFootnoteState = ({ documentFootnotes, parsedBlocks }) => {
84
+ const refs = new Map(documentFootnotes.refs);
85
+ const footnotes = new Map(documentFootnotes.footnotes);
86
+ for (const parsedBlock of parsedBlocks) {
87
+ for (const [label, ref] of parsedBlock.footnotes.refs) {
88
+ refs.set(label, ref);
89
+ }
90
+ for (const [label, entry] of parsedBlock.footnotes.footnotes) {
91
+ footnotes.set(label, entry);
92
+ }
93
+ }
94
+ return {
95
+ refs,
96
+ footnotes
97
+ };
98
+ };
99
+ export const buildFootnoteEntries = ({ footnoteState, parseMarkdownWithFootnotes, filtering }) => Array.from(footnoteState.footnotes.values()).map((entry) => {
100
+ const content = entry.lines.join('\n').trim();
101
+ return {
102
+ ...entry,
103
+ lines: [...entry.lines],
104
+ tokens: content.length === 0
105
+ ? []
106
+ : filterMarkdownTokens(parseMarkdownWithFootnotes(content).tokens, filtering)
107
+ };
108
+ });
109
+ export const resolveCaretPresentation = ({ caret, className, futureClassName, prefix, rawBlocks, shouldShowCaret }) => {
110
+ const shouldHideCaret = !shouldShowCaret || rawBlocks.length === 0
111
+ ? false
112
+ : (() => {
113
+ const lastBlock = rawBlocks.at(-1);
114
+ return hasIncompleteCodeFence(lastBlock) || hasTable(lastBlock);
115
+ })();
116
+ return {
117
+ shouldHideCaret,
118
+ rootStyle: shouldShowCaret && !shouldHideCaret && caret
119
+ ? `--streamdown-caret: "${carets[caret]}";`
120
+ : undefined,
121
+ rootClassName: resolveRootClassName({
122
+ className,
123
+ futureClassName,
124
+ prefix,
125
+ shouldShowCaret,
126
+ shouldHideCaret
127
+ })
128
+ };
129
+ };
130
+ export const resolveBlockDirection = ({ block, dir }) => {
131
+ if (!dir) {
132
+ return undefined;
133
+ }
134
+ if (dir === 'auto') {
135
+ return detectTextDirection(block);
136
+ }
137
+ return dir;
138
+ };
@@ -0,0 +1,59 @@
1
+ import type { StreamdownContext as StreamdownContextContract } from '../contracts/streamdown.js';
2
+ type RuntimeGetter<T> = () => T;
3
+ type RuntimeSectionGetters<T extends object> = {
4
+ [K in keyof T]-?: RuntimeGetter<T[K]>;
5
+ };
6
+ type ParseRuntimeShape<Source extends Record<string, any>> = Pick<StreamdownContextContract<Source>, 'content' | 'remend' | 'parseIncompleteMarkdown' | 'parseMarkdownIntoBlocksFn' | 'mode' | 'dir' | 'sources' | 'inlineCitationsMode' | 'extensions'>;
7
+ type SecurityRuntimeShape<Source extends Record<string, any>> = Pick<StreamdownContextContract<Source>, 'defaultOrigin' | 'allowedLinkPrefixes' | 'allowedImagePrefixes' | 'linkSafety' | 'allowedTags' | 'allowedElements' | 'allowElement' | 'disallowedElements' | 'literalTagContent' | 'normalizeHtmlIndentation' | 'skipHtml' | 'unwrapDisallowed' | 'urlTransform' | 'renderHtml'>;
8
+ type RenderRuntimeShape<Source extends Record<string, any>> = Pick<StreamdownContextContract<Source>, 'BlockComponent' | 'prefix' | 'lineNumbers' | 'shikiTheme' | 'snippets' | 'theme' | 'baseTheme' | 'mermaidConfig' | 'mermaid' | 'katexConfig' | 'plugins' | 'translations' | 'shikiLanguages' | 'shikiThemes' | 'children' | 'mdxComponents' | 'components'>;
9
+ type UiConfigRuntimeShape<Source extends Record<string, any>> = Pick<StreamdownContextContract<Source>, 'element' | 'animation' | 'isAnimating' | 'animated' | 'caret' | 'onAnimationStart' | 'onAnimationEnd' | 'controls' | 'codeControls' | 'icons'>;
10
+ export declare const parseRuntimeKeys: readonly ["content", "remend", "parseIncompleteMarkdown", "parseMarkdownIntoBlocksFn", "mode", "dir", "sources", "inlineCitationsMode", "extensions"];
11
+ export declare const securityRuntimeKeys: readonly ["defaultOrigin", "allowedLinkPrefixes", "allowedImagePrefixes", "linkSafety", "allowedTags", "allowedElements", "allowElement", "disallowedElements", "literalTagContent", "normalizeHtmlIndentation", "skipHtml", "unwrapDisallowed", "urlTransform", "renderHtml"];
12
+ export declare const renderRuntimeKeys: readonly ["BlockComponent", "prefix", "lineNumbers", "shikiTheme", "snippets", "theme", "baseTheme", "mermaidConfig", "mermaid", "katexConfig", "plugins", "translations", "shikiLanguages", "shikiThemes", "children", "mdxComponents", "components"];
13
+ export declare const uiConfigRuntimeKeys: readonly ["element", "animation", "isAnimating", "animated", "caret", "onAnimationStart", "onAnimationEnd", "controls", "codeControls", "icons"];
14
+ export type StreamdownParseRuntimeInit<Source extends Record<string, any>> = RuntimeSectionGetters<ParseRuntimeShape<Source>>;
15
+ export type StreamdownSecurityRuntimeInit<Source extends Record<string, any>> = RuntimeSectionGetters<SecurityRuntimeShape<Source>>;
16
+ export type StreamdownRenderRuntimeInit<Source extends Record<string, any>> = RuntimeSectionGetters<RenderRuntimeShape<Source>>;
17
+ export type StreamdownUiConfigRuntimeInit<Source extends Record<string, any>> = RuntimeSectionGetters<UiConfigRuntimeShape<Source>>;
18
+ export type StreamdownRuntimeSectionName = 'parse' | 'security' | 'render' | 'uiConfig';
19
+ export type StreamdownRuntimeSections<Source extends Record<string, any>> = {
20
+ parse: StreamdownParseRuntimeInit<Source>;
21
+ security: StreamdownSecurityRuntimeInit<Source>;
22
+ render: StreamdownRenderRuntimeInit<Source>;
23
+ uiConfig: StreamdownUiConfigRuntimeInit<Source>;
24
+ };
25
+ export declare const streamdownRuntimeSectionKeys: {
26
+ readonly parse: readonly ["content", "remend", "parseIncompleteMarkdown", "parseMarkdownIntoBlocksFn", "mode", "dir", "sources", "inlineCitationsMode", "extensions"];
27
+ readonly security: readonly ["defaultOrigin", "allowedLinkPrefixes", "allowedImagePrefixes", "linkSafety", "allowedTags", "allowedElements", "allowElement", "disallowedElements", "literalTagContent", "normalizeHtmlIndentation", "skipHtml", "unwrapDisallowed", "urlTransform", "renderHtml"];
28
+ readonly render: readonly ["BlockComponent", "prefix", "lineNumbers", "shikiTheme", "snippets", "theme", "baseTheme", "mermaidConfig", "mermaid", "katexConfig", "plugins", "translations", "shikiLanguages", "shikiThemes", "children", "mdxComponents", "components"];
29
+ readonly uiConfig: readonly ["element", "animation", "isAnimating", "animated", "caret", "onAnimationStart", "onAnimationEnd", "controls", "codeControls", "icons"];
30
+ };
31
+ export declare function defineRuntimeSectionBridge<Source extends Record<string, any>>(target: object, sectionName: 'parse', getSection: () => ParseRuntimeShape<Source>): void;
32
+ export declare function defineRuntimeSectionBridge<Source extends Record<string, any>>(target: object, sectionName: 'security', getSection: () => SecurityRuntimeShape<Source>): void;
33
+ export declare function defineRuntimeSectionBridge<Source extends Record<string, any>>(target: object, sectionName: 'render', getSection: () => RenderRuntimeShape<Source>): void;
34
+ export declare function defineRuntimeSectionBridge<Source extends Record<string, any>>(target: object, sectionName: 'uiConfig', getSection: () => UiConfigRuntimeShape<Source>): void;
35
+ export interface StreamdownParseRuntime<Source extends Record<string, any> = Record<string, any>> extends ParseRuntimeShape<Source> {
36
+ }
37
+ export declare class StreamdownParseRuntime<Source extends Record<string, any> = Record<string, any>> {
38
+ private readonly getters;
39
+ constructor(getters: StreamdownParseRuntimeInit<Source>);
40
+ }
41
+ export interface StreamdownSecurityRuntime<Source extends Record<string, any> = Record<string, any>> extends SecurityRuntimeShape<Source> {
42
+ }
43
+ export declare class StreamdownSecurityRuntime<Source extends Record<string, any> = Record<string, any>> {
44
+ private readonly getters;
45
+ constructor(getters: StreamdownSecurityRuntimeInit<Source>);
46
+ }
47
+ export interface StreamdownRenderRuntime<Source extends Record<string, any> = Record<string, any>> extends RenderRuntimeShape<Source> {
48
+ }
49
+ export declare class StreamdownRenderRuntime<Source extends Record<string, any> = Record<string, any>> {
50
+ private readonly getters;
51
+ constructor(getters: StreamdownRenderRuntimeInit<Source>);
52
+ }
53
+ export interface StreamdownUiConfigRuntime<Source extends Record<string, any> = Record<string, any>> extends UiConfigRuntimeShape<Source> {
54
+ }
55
+ export declare class StreamdownUiConfigRuntime<Source extends Record<string, any> = Record<string, any>> {
56
+ private readonly getters;
57
+ constructor(getters: StreamdownUiConfigRuntimeInit<Source>);
58
+ }
59
+ export {};
@@ -0,0 +1,112 @@
1
+ import { defineGetterBackedProperties, defineForwardedProperties } from '../utils/bind.js';
2
+ const defineRuntimeSectionProperties = (target, getters, keys) => {
3
+ defineGetterBackedProperties(target, getters, keys);
4
+ };
5
+ export const parseRuntimeKeys = [
6
+ 'content',
7
+ 'remend',
8
+ 'parseIncompleteMarkdown',
9
+ 'parseMarkdownIntoBlocksFn',
10
+ 'mode',
11
+ 'dir',
12
+ 'sources',
13
+ 'inlineCitationsMode',
14
+ 'extensions'
15
+ ];
16
+ export const securityRuntimeKeys = [
17
+ 'defaultOrigin',
18
+ 'allowedLinkPrefixes',
19
+ 'allowedImagePrefixes',
20
+ 'linkSafety',
21
+ 'allowedTags',
22
+ 'allowedElements',
23
+ 'allowElement',
24
+ 'disallowedElements',
25
+ 'literalTagContent',
26
+ 'normalizeHtmlIndentation',
27
+ 'skipHtml',
28
+ 'unwrapDisallowed',
29
+ 'urlTransform',
30
+ 'renderHtml'
31
+ ];
32
+ export const renderRuntimeKeys = [
33
+ 'BlockComponent',
34
+ 'prefix',
35
+ 'lineNumbers',
36
+ 'shikiTheme',
37
+ 'snippets',
38
+ 'theme',
39
+ 'baseTheme',
40
+ 'mermaidConfig',
41
+ 'mermaid',
42
+ 'katexConfig',
43
+ 'plugins',
44
+ 'translations',
45
+ 'shikiLanguages',
46
+ 'shikiThemes',
47
+ 'children',
48
+ 'mdxComponents',
49
+ 'components'
50
+ ];
51
+ export const uiConfigRuntimeKeys = [
52
+ 'element',
53
+ 'animation',
54
+ 'isAnimating',
55
+ 'animated',
56
+ 'caret',
57
+ 'onAnimationStart',
58
+ 'onAnimationEnd',
59
+ 'controls',
60
+ 'codeControls',
61
+ 'icons'
62
+ ];
63
+ export const streamdownRuntimeSectionKeys = {
64
+ parse: parseRuntimeKeys,
65
+ security: securityRuntimeKeys,
66
+ render: renderRuntimeKeys,
67
+ uiConfig: uiConfigRuntimeKeys
68
+ };
69
+ export function defineRuntimeSectionBridge(target, sectionName, getSection) {
70
+ switch (sectionName) {
71
+ case 'parse':
72
+ defineForwardedProperties(target, () => getSection(), parseRuntimeKeys);
73
+ return;
74
+ case 'security':
75
+ defineForwardedProperties(target, () => getSection(), securityRuntimeKeys);
76
+ return;
77
+ case 'render':
78
+ defineForwardedProperties(target, () => getSection(), renderRuntimeKeys);
79
+ return;
80
+ case 'uiConfig':
81
+ defineForwardedProperties(target, () => getSection(), uiConfigRuntimeKeys);
82
+ return;
83
+ }
84
+ }
85
+ export class StreamdownParseRuntime {
86
+ getters;
87
+ constructor(getters) {
88
+ this.getters = getters;
89
+ defineRuntimeSectionProperties(this, getters, parseRuntimeKeys);
90
+ }
91
+ }
92
+ export class StreamdownSecurityRuntime {
93
+ getters;
94
+ constructor(getters) {
95
+ this.getters = getters;
96
+ defineRuntimeSectionProperties(this, getters, securityRuntimeKeys);
97
+ }
98
+ }
99
+ export class StreamdownRenderRuntime {
100
+ getters;
101
+ constructor(getters) {
102
+ this.getters = getters;
103
+ defineRuntimeSectionProperties(this, getters, renderRuntimeKeys);
104
+ }
105
+ }
106
+ export class StreamdownUiConfigRuntime {
107
+ getters;
108
+ constructor(getters) {
109
+ this.getters = getters;
110
+ defineRuntimeSectionProperties(this, getters, uiConfigRuntimeKeys);
111
+ }
112
+ }
@@ -0,0 +1,5 @@
1
+ export declare const carets: {
2
+ readonly block: " ▋";
3
+ readonly circle: " ●";
4
+ };
5
+ export { hasIncompleteCodeFence, hasTable } from './incomplete-code.js';
@@ -0,0 +1,5 @@
1
+ export const carets = {
2
+ block: ' ▋',
3
+ circle: ' ●'
4
+ };
5
+ export { hasIncompleteCodeFence, hasTable } from './incomplete-code.js';