@valkyrianlabs/payload-markdown 1.3.1

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 (204) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +222 -0
  3. package/dist/blocks/MarkdownBlock/Component.d.ts +2 -0
  4. package/dist/blocks/MarkdownBlock/Component.js +13 -0
  5. package/dist/blocks/MarkdownBlock/Component.js.map +1 -0
  6. package/dist/blocks/MarkdownBlock/config.d.ts +2 -0
  7. package/dist/blocks/MarkdownBlock/config.js +20 -0
  8. package/dist/blocks/MarkdownBlock/config.js.map +1 -0
  9. package/dist/blocks/MarkdownBlock/types.d.js +3 -0
  10. package/dist/blocks/MarkdownBlock/types.d.js.map +1 -0
  11. package/dist/components/MarkdownRenderer/Component.client.d.ts +5 -0
  12. package/dist/components/MarkdownRenderer/Component.client.js +163 -0
  13. package/dist/components/MarkdownRenderer/Component.client.js.map +1 -0
  14. package/dist/components/MarkdownRenderer/Component.d.ts +3 -0
  15. package/dist/components/MarkdownRenderer/Component.js +87 -0
  16. package/dist/components/MarkdownRenderer/Component.js.map +1 -0
  17. package/dist/components/MarkdownRenderer/index.css +69 -0
  18. package/dist/components/MarkdownRenderer/index.module.css +45 -0
  19. package/dist/components/MarkdownRenderer/index.module.scss +43 -0
  20. package/dist/components/MarkdownRenderer/index.scss +83 -0
  21. package/dist/components/MarkdownRenderer/types.d.js +5 -0
  22. package/dist/components/MarkdownRenderer/types.d.js.map +1 -0
  23. package/dist/core/codeConfig.d.ts +6 -0
  24. package/dist/core/codeConfig.js +45 -0
  25. package/dist/core/codeConfig.js.map +1 -0
  26. package/dist/core/codeToHtml.d.ts +5 -0
  27. package/dist/core/codeToHtml.js +180 -0
  28. package/dist/core/codeToHtml.js.map +1 -0
  29. package/dist/core/plugins/rehypeApplyLayoutClasses.d.ts +4 -0
  30. package/dist/core/plugins/rehypeApplyLayoutClasses.js +72 -0
  31. package/dist/core/plugins/rehypeApplyLayoutClasses.js.map +1 -0
  32. package/dist/core/plugins/rehypeStripAuthoredInlineStyles.d.ts +3 -0
  33. package/dist/core/plugins/rehypeStripAuthoredInlineStyles.js +17 -0
  34. package/dist/core/plugins/rehypeStripAuthoredInlineStyles.js.map +1 -0
  35. package/dist/core/plugins/remarkCompileLayouts.d.ts +3 -0
  36. package/dist/core/plugins/remarkCompileLayouts.js +169 -0
  37. package/dist/core/plugins/remarkCompileLayouts.js.map +1 -0
  38. package/dist/core/plugins/remarkHeadingAnchorsAndToc.d.ts +3 -0
  39. package/dist/core/plugins/remarkHeadingAnchorsAndToc.js +68 -0
  40. package/dist/core/plugins/remarkHeadingAnchorsAndToc.js.map +1 -0
  41. package/dist/core/plugins/remarkLayoutDirectives.d.ts +3 -0
  42. package/dist/core/plugins/remarkLayoutDirectives.js +26 -0
  43. package/dist/core/plugins/remarkLayoutDirectives.js.map +1 -0
  44. package/dist/core/plugins/remarkLayoutSentinels.d.ts +3 -0
  45. package/dist/core/plugins/remarkLayoutSentinels.js +184 -0
  46. package/dist/core/plugins/remarkLayoutSentinels.js.map +1 -0
  47. package/dist/core/plugins/remarkLiftLayoutDirectives.d.ts +3 -0
  48. package/dist/core/plugins/remarkLiftLayoutDirectives.js +93 -0
  49. package/dist/core/plugins/remarkLiftLayoutDirectives.js.map +1 -0
  50. package/dist/core/plugins/remarkNormalizeLayoutSyntax.d.ts +3 -0
  51. package/dist/core/plugins/remarkValidateDirectiveThemes.d.ts +4 -0
  52. package/dist/core/plugins/remarkValidateDirectiveThemes.js +28 -0
  53. package/dist/core/plugins/remarkValidateDirectiveThemes.js.map +1 -0
  54. package/dist/core/renderMarkdown.d.ts +2 -0
  55. package/dist/core/renderMarkdown.js +270 -0
  56. package/dist/core/renderMarkdown.js.map +1 -0
  57. package/dist/core/types.d.js +7 -0
  58. package/dist/core/types.d.js.map +1 -0
  59. package/dist/core/types.d.ts +238 -0
  60. package/dist/core/types.js +5 -0
  61. package/dist/core/types.js.map +1 -0
  62. package/dist/directives/attributes.d.ts +14 -0
  63. package/dist/directives/attributes.js +121 -0
  64. package/dist/directives/attributes.js.map +1 -0
  65. package/dist/directives/definitions/callout.d.ts +6 -0
  66. package/dist/directives/definitions/callout.js +107 -0
  67. package/dist/directives/definitions/callout.js.map +1 -0
  68. package/dist/directives/definitions/card.d.ts +4 -0
  69. package/dist/directives/definitions/card.js +120 -0
  70. package/dist/directives/definitions/card.js.map +1 -0
  71. package/dist/directives/definitions/cards.d.ts +7 -0
  72. package/dist/directives/definitions/cards.js +72 -0
  73. package/dist/directives/definitions/cards.js.map +1 -0
  74. package/dist/directives/definitions/cell.d.ts +4 -0
  75. package/dist/directives/definitions/cell.js +44 -0
  76. package/dist/directives/definitions/cell.js.map +1 -0
  77. package/dist/directives/definitions/columns.d.ts +4 -0
  78. package/dist/directives/definitions/columns.js +89 -0
  79. package/dist/directives/definitions/columns.js.map +1 -0
  80. package/dist/directives/definitions/details.d.ts +2 -0
  81. package/dist/directives/definitions/details.js +76 -0
  82. package/dist/directives/definitions/details.js.map +1 -0
  83. package/dist/directives/definitions/section.d.ts +2 -0
  84. package/dist/directives/definitions/section.js +32 -0
  85. package/dist/directives/definitions/section.js.map +1 -0
  86. package/dist/directives/definitions/steps.d.ts +2 -0
  87. package/dist/directives/definitions/steps.js +242 -0
  88. package/dist/directives/definitions/steps.js.map +1 -0
  89. package/dist/directives/definitions/tab.d.ts +8 -0
  90. package/dist/directives/definitions/tab.js +59 -0
  91. package/dist/directives/definitions/tab.js.map +1 -0
  92. package/dist/directives/definitions/tabs.d.ts +2 -0
  93. package/dist/directives/definitions/tabs.js +197 -0
  94. package/dist/directives/definitions/tabs.js.map +1 -0
  95. package/dist/directives/definitions/toc.d.ts +7 -0
  96. package/dist/directives/definitions/toc.js +59 -0
  97. package/dist/directives/definitions/toc.js.map +1 -0
  98. package/dist/directives/diagnostics.d.ts +8 -0
  99. package/dist/directives/diagnostics.js +167 -0
  100. package/dist/directives/diagnostics.js.map +1 -0
  101. package/dist/directives/headingAnchors.d.ts +9 -0
  102. package/dist/directives/headingAnchors.js +54 -0
  103. package/dist/directives/headingAnchors.js.map +1 -0
  104. package/dist/directives/index.d.ts +5 -0
  105. package/dist/directives/index.js +6 -0
  106. package/dist/directives/index.js.map +1 -0
  107. package/dist/directives/registry.d.ts +20 -0
  108. package/dist/directives/registry.js +152 -0
  109. package/dist/directives/registry.js.map +1 -0
  110. package/dist/directives/renderData.d.ts +3 -0
  111. package/dist/directives/renderData.js +11 -0
  112. package/dist/directives/renderData.js.map +1 -0
  113. package/dist/directives/themes.d.ts +25 -0
  114. package/dist/directives/themes.js +274 -0
  115. package/dist/directives/themes.js.map +1 -0
  116. package/dist/directives/types.d.ts +72 -0
  117. package/dist/directives/types.js +3 -0
  118. package/dist/directives/types.js.map +1 -0
  119. package/dist/editor/MarkdownCodeMirror/Component.client.d.ts +8 -0
  120. package/dist/editor/MarkdownCodeMirror/Component.client.js +78 -0
  121. package/dist/editor/MarkdownCodeMirror/Component.client.js.map +1 -0
  122. package/dist/editor/MarkdownCodeMirror/Component.d.ts +9 -0
  123. package/dist/editor/MarkdownCodeMirror/Component.js +10 -0
  124. package/dist/editor/MarkdownCodeMirror/Component.js.map +1 -0
  125. package/dist/editor/MarkdownCodeMirror.d.ts +8 -0
  126. package/dist/editor/MarkdownCodeMirror.js +74 -0
  127. package/dist/editor/MarkdownCodeMirror.js.map +1 -0
  128. package/dist/editor/MarkdownEditor.d.ts +10 -0
  129. package/dist/editor/MarkdownEditor.js +22 -0
  130. package/dist/editor/MarkdownEditor.js.map +1 -0
  131. package/dist/editor/directives/completions.d.ts +5 -0
  132. package/dist/editor/directives/completions.js +93 -0
  133. package/dist/editor/directives/completions.js.map +1 -0
  134. package/dist/editor/directives/diagnostics.d.ts +1 -0
  135. package/dist/editor/directives/diagnostics.js +12 -0
  136. package/dist/editor/directives/diagnostics.js.map +1 -0
  137. package/dist/editor/themes/payload.d.ts +27 -0
  138. package/dist/editor/themes/payload.js +269 -0
  139. package/dist/editor/themes/payload.js.map +1 -0
  140. package/dist/editor/themes/support/highlighters.d.ts +20 -0
  141. package/dist/editor/themes/support/highlighters.js +1141 -0
  142. package/dist/editor/themes/support/highlighters.js.map +1 -0
  143. package/dist/editor/themes/support/lang.d.ts +40 -0
  144. package/dist/editor/themes/support/lang.js +201 -0
  145. package/dist/editor/themes/support/lang.js.map +1 -0
  146. package/dist/exports/advanced.d.ts +3 -0
  147. package/dist/exports/advanced.js +5 -0
  148. package/dist/exports/advanced.js.map +1 -0
  149. package/dist/exports/client.d.ts +1 -0
  150. package/dist/exports/client.js +2 -0
  151. package/dist/exports/client.js.map +1 -0
  152. package/dist/exports/server.d.ts +3 -0
  153. package/dist/exports/server.js +5 -0
  154. package/dist/exports/server.js.map +1 -0
  155. package/dist/field/BlocksParams/config.d.ts +7 -0
  156. package/dist/field/BlocksParams/config.js +149 -0
  157. package/dist/field/BlocksParams/config.js.map +1 -0
  158. package/dist/field/CodeBlock/config.d.ts +7 -0
  159. package/dist/field/CodeBlock/config.js +321 -0
  160. package/dist/field/CodeBlock/config.js.map +1 -0
  161. package/dist/field/CodeBlockConfig/config.d.ts +7 -0
  162. package/dist/field/CodeBlockConfig/config.js +306 -0
  163. package/dist/field/CodeBlockConfig/config.js.map +1 -0
  164. package/dist/field/CodeBlockParams/config.d.ts +7 -0
  165. package/dist/field/CodeBlockParams/config.js +321 -0
  166. package/dist/field/CodeBlockParams/config.js.map +1 -0
  167. package/dist/field/Config/config.d.ts +7 -0
  168. package/dist/field/Config/config.js +149 -0
  169. package/dist/field/Config/config.js.map +1 -0
  170. package/dist/field/MarkdownField/Component.d.ts +2 -0
  171. package/dist/field/MarkdownField/Component.js +42 -0
  172. package/dist/field/MarkdownField/Component.js.map +1 -0
  173. package/dist/field/MarkdownField/config.d.ts +3 -0
  174. package/dist/field/MarkdownField/config.js +20 -0
  175. package/dist/field/MarkdownField/config.js.map +1 -0
  176. package/dist/field/Tailwind/config.d.ts +9 -0
  177. package/dist/field/Tailwind/config.js +13 -0
  178. package/dist/field/Tailwind/config.js.map +1 -0
  179. package/dist/field/TailwindField/config.d.ts +9 -0
  180. package/dist/field/TailwindField/config.js +13 -0
  181. package/dist/field/TailwindField/config.js.map +1 -0
  182. package/dist/index.d.ts +10 -0
  183. package/dist/index.js +91 -0
  184. package/dist/index.js.map +1 -0
  185. package/dist/runtime/index.d.ts +36 -0
  186. package/dist/runtime/index.js +124 -0
  187. package/dist/runtime/index.js.map +1 -0
  188. package/dist/styles/directiveSurface.d.ts +11 -0
  189. package/dist/styles/directiveSurface.js +38 -0
  190. package/dist/styles/directiveSurface.js.map +1 -0
  191. package/dist/types/core.d.ts +285 -0
  192. package/dist/types/core.js +5 -0
  193. package/dist/types/core.js.map +1 -0
  194. package/dist/types/layoutToken.d.ts +1 -0
  195. package/dist/types/layoutToken.js +3 -0
  196. package/dist/types/layoutToken.js.map +1 -0
  197. package/dist/types/mdast.d.js +5 -0
  198. package/dist/types/mdast.d.js.map +1 -0
  199. package/dist/types.d.js +3 -0
  200. package/dist/types.d.js.map +1 -0
  201. package/dist/types.d.ts +80 -0
  202. package/dist/types.js +3 -0
  203. package/dist/types.js.map +1 -0
  204. package/package.json +181 -0
@@ -0,0 +1,285 @@
1
+ import type { JSX, ReactNode } from 'react';
2
+ export type MarkdownRendererScope = 'blocks' | 'field';
3
+ /**
4
+ * Options that control how fenced code blocks are rendered inside markdown content.
5
+ *
6
+ * By default, code blocks use the plugin's enhanced rendering mode:
7
+ * - `enhancedCodeBlocks` defaults to `true`
8
+ * - `lineNumbers` defaults to `true`
9
+ * - `theme` defaults to `'github-dark'`
10
+ *
11
+ * When enhanced rendering is enabled, the plugin applies its normalized code block
12
+ * pipeline on top of Shiki output. This includes layout cleanup, background
13
+ * normalization, and support for features like line numbers.
14
+ *
15
+ * When enhanced rendering is disabled, code blocks are rendered closer to raw
16
+ * Shiki output and plugin-specific enhancements are bypassed.
17
+ *
18
+ * These options are passed through the markdown rendering pipeline and primarily
19
+ * affect Shiki-rendered code fences.
20
+ */
21
+ export type RenderMarkdownOptions = {
22
+ /**
23
+ * Whether to apply the plugin's enhanced code block rendering pipeline.
24
+ *
25
+ * Defaults to `true`.
26
+ *
27
+ * When enabled, the renderer performs structural and visual normalization on
28
+ * Shiki output to produce a consistent, content-focused appearance.
29
+ *
30
+ * When disabled, code blocks are rendered closer to raw Shiki output.
31
+ */
32
+ enhancedCodeBlocks?: boolean;
33
+ /**
34
+ * An optional list of language identifiers to load for Shiki syntax highlighting.
35
+ *
36
+ * By default, the plugin loads a core set of popular languages. You can replace
37
+ * that set entirely or extend it using spread syntax:
38
+ *
39
+ * ```ts
40
+ * options: {
41
+ * langs: [...DEFAULT_CODE_LANGS, 'latex']
42
+ * }
43
+ * ```
44
+ */
45
+ langs?: string[];
46
+ /**
47
+ * Whether to show line numbers for fenced code blocks.
48
+ *
49
+ * Defaults to `true` when `enhancedCodeBlocks` is enabled.
50
+ *
51
+ * Line numbers require the enhanced rendering pipeline and are automatically
52
+ * disabled when `enhancedCodeBlocks` is set to `false`.
53
+ */
54
+ lineNumbers?: boolean;
55
+ /**
56
+ * The Shiki theme to use for syntax highlighting.
57
+ *
58
+ * Defaults to `'github-dark'`.
59
+ *
60
+ * The plugin's enhanced renderer is tuned around its default theme. When using a
61
+ * non-default theme:
62
+ *
63
+ * - `enhancedCodeBlocks: true` opts into the plugin's normalized rendering pipeline
64
+ * - `enhancedCodeBlocks: false` preserves the theme's native appearance more closely
65
+ *
66
+ * This allows you to choose between a more controlled presentation and a more
67
+ * theme-faithful rendering mode.
68
+ */
69
+ theme?: string;
70
+ };
71
+ export type MarkdownCodeConfig = {
72
+ /**
73
+ * Whether to apply the plugin's enhanced code block rendering pipeline.
74
+ */
75
+ enhanced?: boolean;
76
+ /**
77
+ * Whether fenced code blocks should extend beyond the normal content width
78
+ * on larger screens.
79
+ */
80
+ fullBleed?: boolean;
81
+ /**
82
+ * Optional list of language identifiers to load for Shiki syntax highlighting.
83
+ */
84
+ langs?: string[];
85
+ /**
86
+ * Whether to show line numbers for fenced code blocks.
87
+ */
88
+ lineNumbers?: boolean;
89
+ /**
90
+ * The Shiki theme to use for syntax highlighting.
91
+ */
92
+ shikiTheme?: string;
93
+ };
94
+ export type MarkdownDirectiveTheme = {
95
+ classes: string;
96
+ label?: string;
97
+ name: string;
98
+ };
99
+ export type MarkdownDirectiveThemeGroup = {
100
+ extendDefaults?: boolean;
101
+ items?: MarkdownDirectiveTheme[];
102
+ } | MarkdownDirectiveTheme[];
103
+ export type MarkdownDirectiveThemes = {
104
+ callout?: MarkdownDirectiveThemeGroup;
105
+ card?: MarkdownDirectiveThemeGroup;
106
+ cards?: MarkdownDirectiveThemeGroup;
107
+ cell?: MarkdownDirectiveThemeGroup;
108
+ columns?: MarkdownDirectiveThemeGroup;
109
+ details?: MarkdownDirectiveThemeGroup;
110
+ section?: MarkdownDirectiveThemeGroup;
111
+ steps?: MarkdownDirectiveThemeGroup;
112
+ tab?: MarkdownDirectiveThemeGroup;
113
+ tabs?: MarkdownDirectiveThemeGroup;
114
+ toc?: MarkdownDirectiveThemeGroup;
115
+ };
116
+ /**
117
+ * The result of compiling markdown into sanitized HTML.
118
+ */
119
+ export type RenderMarkdownResult = {
120
+ /**
121
+ * The rendered HTML output.
122
+ */
123
+ html: string;
124
+ /**
125
+ * Non-fatal warnings produced during rendering.
126
+ */
127
+ warnings: string[];
128
+ };
129
+ /**
130
+ * Preset visual styles for rendered markdown content.
131
+ */
132
+ export type MarkdownVariant = 'blog' | 'compact' | 'docs' | 'unstyled';
133
+ /**
134
+ * Preset typography sizes for rendered markdown content.
135
+ */
136
+ export type MarkdownSize = 'lg' | 'md' | 'sm';
137
+ /**
138
+ * Core markdown presentation configuration.
139
+ *
140
+ * This type represents the configurable styling and behavior layer that can be
141
+ * sourced from plugin defaults, globals, collection defaults, or block-level
142
+ * overrides. It intentionally excludes runtime-only renderer props such as
143
+ * `markdown`, `as`, and fallback nodes.
144
+ */
145
+ export type MarkdownConfig = {
146
+ /**
147
+ * Additional classes applied to the rendered markdown element itself.
148
+ */
149
+ className?: string;
150
+ /**
151
+ * Additional classes applied to column elements within the rendered markdown, if applicable.
152
+ *
153
+ * @deprecated Use directive themes instead.
154
+ */
155
+ columnClassName?: string;
156
+ /**
157
+ * Whether to apply horizontal gutter padding to the outer wrapper.
158
+ *
159
+ * Defaults to `false`.
160
+ */
161
+ enableGutter?: boolean;
162
+ /**
163
+ * Whether fenced code blocks should extend beyond the normal content width
164
+ * on larger screens.
165
+ *
166
+ * Defaults to `false`.
167
+ *
168
+ * @deprecated Use top-level or renderer-level `code.fullBleed` instead.
169
+ */
170
+ fullBleedCode?: boolean;
171
+ /**
172
+ * Optional content rendered above the markdown body.
173
+ */
174
+ lead?: ReactNode;
175
+ /**
176
+ * Whether heading colors should be slightly muted.
177
+ *
178
+ * Defaults to `false`.
179
+ */
180
+ mutedHeadings?: boolean;
181
+ /**
182
+ * Options that control fenced code block rendering.
183
+ *
184
+ * @deprecated Use top-level or renderer-level `code` instead.
185
+ */
186
+ options?: RenderMarkdownOptions;
187
+ /**
188
+ * Additional classes applied to section elements within the rendered markdown, if applicable.
189
+ *
190
+ * @deprecated Use directive themes instead.
191
+ */
192
+ sectionClassName?: string;
193
+ /**
194
+ * Typography size preset for the rendered markdown.
195
+ *
196
+ * Defaults to `'lg'`.
197
+ */
198
+ size?: MarkdownSize;
199
+ /**
200
+ * Visual style preset for the rendered markdown.
201
+ *
202
+ * Defaults to `'blog'`.
203
+ */
204
+ variant?: MarkdownVariant;
205
+ /**
206
+ * Additional classes applied to the outer wrapper element.
207
+ */
208
+ wrapperClassName?: string;
209
+ };
210
+ export type MarkdownRenderConfig = {
211
+ code?: MarkdownCodeConfig;
212
+ themes?: MarkdownDirectiveThemes;
213
+ } & MarkdownConfig;
214
+ /**
215
+ * Runtime-only props shared by markdown renderer components.
216
+ */
217
+ export type BaseMarkdownRendererProps = {
218
+ /**
219
+ * The HTML tag used for the rendered markdown container.
220
+ *
221
+ * Defaults to `'article'`.
222
+ */
223
+ as?: keyof JSX.IntrinsicElements;
224
+ /**
225
+ * Content rendered when the markdown input is empty or missing.
226
+ */
227
+ emptyFallback?: ReactNode;
228
+ /**
229
+ * Content rendered when markdown compilation fails and a fallback is desired.
230
+ */
231
+ errorFallback?: ReactNode;
232
+ /**
233
+ * The markdown source string to render.
234
+ */
235
+ markdown?: null | string;
236
+ };
237
+ /**
238
+ * Props for the main markdown renderer component.
239
+ *
240
+ * This merges persisted/configurable markdown presentation settings with the
241
+ * runtime-only rendering props required by the component itself.
242
+ */
243
+ export type MarkdownRendererProps = {
244
+ collectionSlug?: string;
245
+ scope?: MarkdownRendererScope;
246
+ } & BaseMarkdownRendererProps & MarkdownRenderConfig;
247
+ /**
248
+ * Options available while rendering an individual fenced code block.
249
+ */
250
+ export interface CodeBlockOptions extends RenderMarkdownOptions {
251
+ /**
252
+ * The parsed language identifier for the fenced code block, if present.
253
+ */
254
+ lang?: string;
255
+ }
256
+ /**
257
+ * Stored Payload block data for a markdown block instance.
258
+ */
259
+ export interface MarkdownBlockData {
260
+ /**
261
+ * Optional block display name assigned by Payload.
262
+ */
263
+ blockName?: null | string;
264
+ /**
265
+ * The Payload block slug.
266
+ */
267
+ blockType: 'vlMdBlock';
268
+ /**
269
+ * Markdown source content for this block.
270
+ */
271
+ content: string;
272
+ /**
273
+ * Optional Payload-generated block identifier.
274
+ */
275
+ id?: null | string;
276
+ }
277
+ /**
278
+ * Props for the markdown block component wrapper.
279
+ */
280
+ export interface MarkdownBlockProps extends MarkdownBlockData {
281
+ /**
282
+ * The slug of the collection this block is rendered within, if applicable.
283
+ */
284
+ collectionSlug?: string;
285
+ }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Props for the markdown block component wrapper.
3
+ */ export { };
4
+
5
+ //# sourceMappingURL=core.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/types/core.ts"],"sourcesContent":["import type { JSX, ReactNode } from 'react'\n\nexport type MarkdownRendererScope = 'blocks' | 'field'\n\n/**\n * Options that control how fenced code blocks are rendered inside markdown content.\n *\n * By default, code blocks use the plugin's enhanced rendering mode:\n * - `enhancedCodeBlocks` defaults to `true`\n * - `lineNumbers` defaults to `true`\n * - `theme` defaults to `'github-dark'`\n *\n * When enhanced rendering is enabled, the plugin applies its normalized code block\n * pipeline on top of Shiki output. This includes layout cleanup, background\n * normalization, and support for features like line numbers.\n *\n * When enhanced rendering is disabled, code blocks are rendered closer to raw\n * Shiki output and plugin-specific enhancements are bypassed.\n *\n * These options are passed through the markdown rendering pipeline and primarily\n * affect Shiki-rendered code fences.\n */\nexport type RenderMarkdownOptions = {\n /**\n * Whether to apply the plugin's enhanced code block rendering pipeline.\n *\n * Defaults to `true`.\n *\n * When enabled, the renderer performs structural and visual normalization on\n * Shiki output to produce a consistent, content-focused appearance.\n *\n * When disabled, code blocks are rendered closer to raw Shiki output.\n */\n enhancedCodeBlocks?: boolean\n\n /**\n * An optional list of language identifiers to load for Shiki syntax highlighting.\n *\n * By default, the plugin loads a core set of popular languages. You can replace\n * that set entirely or extend it using spread syntax:\n *\n * ```ts\n * options: {\n * langs: [...DEFAULT_CODE_LANGS, 'latex']\n * }\n * ```\n */\n langs?: string[]\n\n /**\n * Whether to show line numbers for fenced code blocks.\n *\n * Defaults to `true` when `enhancedCodeBlocks` is enabled.\n *\n * Line numbers require the enhanced rendering pipeline and are automatically\n * disabled when `enhancedCodeBlocks` is set to `false`.\n */\n lineNumbers?: boolean\n\n /**\n * The Shiki theme to use for syntax highlighting.\n *\n * Defaults to `'github-dark'`.\n *\n * The plugin's enhanced renderer is tuned around its default theme. When using a\n * non-default theme:\n *\n * - `enhancedCodeBlocks: true` opts into the plugin's normalized rendering pipeline\n * - `enhancedCodeBlocks: false` preserves the theme's native appearance more closely\n *\n * This allows you to choose between a more controlled presentation and a more\n * theme-faithful rendering mode.\n */\n theme?: string\n}\n\nexport type MarkdownCodeConfig = {\n /**\n * Whether to apply the plugin's enhanced code block rendering pipeline.\n */\n enhanced?: boolean\n\n /**\n * Whether fenced code blocks should extend beyond the normal content width\n * on larger screens.\n */\n fullBleed?: boolean\n\n /**\n * Optional list of language identifiers to load for Shiki syntax highlighting.\n */\n langs?: string[]\n\n /**\n * Whether to show line numbers for fenced code blocks.\n */\n lineNumbers?: boolean\n\n /**\n * The Shiki theme to use for syntax highlighting.\n */\n shikiTheme?: string\n}\n\nexport type MarkdownDirectiveTheme = {\n classes: string\n label?: string\n name: string\n}\n\nexport type MarkdownDirectiveThemeGroup = {\n extendDefaults?: boolean\n items?: MarkdownDirectiveTheme[]\n} | MarkdownDirectiveTheme[]\n\nexport type MarkdownDirectiveThemes = {\n callout?: MarkdownDirectiveThemeGroup\n card?: MarkdownDirectiveThemeGroup\n cards?: MarkdownDirectiveThemeGroup\n cell?: MarkdownDirectiveThemeGroup\n columns?: MarkdownDirectiveThemeGroup\n details?: MarkdownDirectiveThemeGroup\n section?: MarkdownDirectiveThemeGroup\n steps?: MarkdownDirectiveThemeGroup\n tab?: MarkdownDirectiveThemeGroup\n tabs?: MarkdownDirectiveThemeGroup\n toc?: MarkdownDirectiveThemeGroup\n}\n\n/**\n * The result of compiling markdown into sanitized HTML.\n */\nexport type RenderMarkdownResult = {\n /**\n * The rendered HTML output.\n */\n html: string\n\n /**\n * Non-fatal warnings produced during rendering.\n */\n warnings: string[]\n}\n\n/**\n * Preset visual styles for rendered markdown content.\n */\nexport type MarkdownVariant = 'blog' | 'compact' | 'docs' | 'unstyled'\n\n/**\n * Preset typography sizes for rendered markdown content.\n */\nexport type MarkdownSize = 'lg' | 'md' | 'sm'\n\n/**\n * Core markdown presentation configuration.\n *\n * This type represents the configurable styling and behavior layer that can be\n * sourced from plugin defaults, globals, collection defaults, or block-level\n * overrides. It intentionally excludes runtime-only renderer props such as\n * `markdown`, `as`, and fallback nodes.\n */\nexport type MarkdownConfig = {\n /**\n * Additional classes applied to the rendered markdown element itself.\n */\n className?: string\n\n /**\n * Additional classes applied to column elements within the rendered markdown, if applicable.\n *\n * @deprecated Use directive themes instead.\n */\n columnClassName?: string\n\n /**\n * Whether to apply horizontal gutter padding to the outer wrapper.\n *\n * Defaults to `false`.\n */\n enableGutter?: boolean\n\n /**\n * Whether fenced code blocks should extend beyond the normal content width\n * on larger screens.\n *\n * Defaults to `false`.\n *\n * @deprecated Use top-level or renderer-level `code.fullBleed` instead.\n */\n fullBleedCode?: boolean\n\n /**\n * Optional content rendered above the markdown body.\n */\n lead?: ReactNode\n\n /**\n * Whether heading colors should be slightly muted.\n *\n * Defaults to `false`.\n */\n mutedHeadings?: boolean\n\n /**\n * Options that control fenced code block rendering.\n *\n * @deprecated Use top-level or renderer-level `code` instead.\n */\n options?: RenderMarkdownOptions\n\n /**\n * Additional classes applied to section elements within the rendered markdown, if applicable.\n *\n * @deprecated Use directive themes instead.\n */\n sectionClassName?: string\n\n /**\n * Typography size preset for the rendered markdown.\n *\n * Defaults to `'lg'`.\n */\n size?: MarkdownSize\n\n /**\n * Visual style preset for the rendered markdown.\n *\n * Defaults to `'blog'`.\n */\n variant?: MarkdownVariant\n\n /**\n * Additional classes applied to the outer wrapper element.\n */\n wrapperClassName?: string\n}\n\nexport type MarkdownRenderConfig = {\n code?: MarkdownCodeConfig\n themes?: MarkdownDirectiveThemes\n} & MarkdownConfig\n\n/**\n * Runtime-only props shared by markdown renderer components.\n */\nexport type BaseMarkdownRendererProps = {\n /**\n * The HTML tag used for the rendered markdown container.\n *\n * Defaults to `'article'`.\n */\n as?: keyof JSX.IntrinsicElements\n\n /**\n * Content rendered when the markdown input is empty or missing.\n */\n emptyFallback?: ReactNode\n\n /**\n * Content rendered when markdown compilation fails and a fallback is desired.\n */\n errorFallback?: ReactNode\n\n /**\n * The markdown source string to render.\n */\n markdown?: null | string\n}\n\n/**\n * Props for the main markdown renderer component.\n *\n * This merges persisted/configurable markdown presentation settings with the\n * runtime-only rendering props required by the component itself.\n */\nexport type MarkdownRendererProps = {\n collectionSlug?: string\n scope?: MarkdownRendererScope\n} & BaseMarkdownRendererProps & MarkdownRenderConfig\n\n/**\n * Options available while rendering an individual fenced code block.\n */\nexport interface CodeBlockOptions extends RenderMarkdownOptions {\n /**\n * The parsed language identifier for the fenced code block, if present.\n */\n lang?: string\n}\n\n/**\n * Stored Payload block data for a markdown block instance.\n */\nexport interface MarkdownBlockData {\n /**\n * Optional block display name assigned by Payload.\n */\n blockName?: null | string\n\n /**\n * The Payload block slug.\n */\n blockType: 'vlMdBlock'\n\n /**\n * Markdown source content for this block.\n */\n content: string\n\n /**\n * Optional Payload-generated block identifier.\n */\n id?: null | string\n}\n\n/**\n * Props for the markdown block component wrapper.\n */\nexport interface MarkdownBlockProps extends MarkdownBlockData {\n /**\n * The slug of the collection this block is rendered within, if applicable.\n */\n collectionSlug?: string\n}\n"],"names":[],"mappings":"AA4TA;;CAEC,GACD,WAKC"}
@@ -0,0 +1 @@
1
+ export type { LayoutName, LayoutToken } from '../directives/types.js';
@@ -0,0 +1,3 @@
1
+ export { };
2
+
3
+ //# sourceMappingURL=layoutToken.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/types/layoutToken.ts"],"sourcesContent":["export type { LayoutName, LayoutToken } from '../directives/types.js'\n"],"names":[],"mappings":"AAAA,WAAqE"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * @import {} from 'mdast-util-directive'
3
+ */ import 'mdast-util-directive';
4
+
5
+ //# sourceMappingURL=mdast.d.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/types/mdast.d.ts"],"sourcesContent":["/**\n * @import {} from 'mdast-util-directive'\n */\n\nimport 'mdast-util-directive'\n\nimport type { LayoutToken } from './layoutToken'\n\ndeclare module 'mdast-util-directive' {\n interface ContainerDirectiveData {\n vlCellHeadingDepth?: number\n vlParentHeadingDepth?: number\n }\n}\n\ndeclare module 'mdast' {\n interface RootContentMap {\n vlLayoutToken: LayoutToken\n }\n}\n"],"names":[],"mappings":"AAAA;;CAEC,GAED,OAAO,uBAAsB"}
@@ -0,0 +1,3 @@
1
+ export { };
2
+
3
+ //# sourceMappingURL=types.d.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/types.d.ts"],"sourcesContent":["import type { CollectionSlug } from 'payload'\n\nimport type { MarkdownConfig } from './core/types.d.js'\n\nexport type DualMarkdownFieldConfig = {\n blocks?: MarkdownConfig\n field?: MarkdownConfig\n}\n\nexport type ConfigOptions = DualMarkdownFieldConfig | MarkdownConfig\n\nexport type PayloadMarkdownCollectionConfig = {\n /**\n * Styling options for markdown fields added to the collection, and/or markdown fields added within blocks to the collection.\n */\n config?: ConfigOptions\n\n /**\n * Options for the markdown field.\n */\n field?: Omit<MarkdownFieldOptions, 'name'>\n\n /**\n * The name of the markdown field to add to the collection. Defaults to 'content'.\n */\n fieldName?: string\n\n /**\n * Whether to add a standalone markdown field to the collection.\n *\n * If not specified, this is inferred automatically:\n * - `true` when the collection does not contain any `blocks` fields\n * - `false` when the collection does contain `blocks` fields\n */\n installField?: boolean\n\n /**\n * Whether to install the markdown block into any `blocks` fields in the collection.\n *\n * If not specified, this is inferred automatically:\n * - `true` when the collection contains one or more `blocks` fields\n * - `false` when the collection does not contain any `blocks` fields\n *\n * Note: You must still add the MarkdownBlockComponent to your RenderBlocks.tsx\n * or equivalent for the block to render properly.\n */\n installIntoBlocks?: boolean\n}\n\nexport interface PayloadMarkdownConfig {\n /**\n * Add markdown field to collections.\n * Set to `true` to add a field with default options, or an object to configure the field.\n */\n collections?: Partial<Record<CollectionSlug, PayloadMarkdownCollectionConfig | true>>\n\n /**\n * Add a global for markdown block settings, which can be used to provide default configuration values for all markdown in the project.\n */\n config?: ConfigOptions\n\n /**\n * Enable or disable plugin\n * @default false\n */\n enabled?: boolean\n}\n"],"names":[],"mappings":"AAiDA,WAiBC"}
@@ -0,0 +1,80 @@
1
+ import type { CollectionSlug, TextField } from 'payload';
2
+ import type { MarkdownCodeConfig, MarkdownConfig, MarkdownDirectiveThemes } from './types/core.js';
3
+ export type DualMarkdownFieldConfig = {
4
+ blocks?: MarkdownConfig;
5
+ field?: MarkdownConfig;
6
+ };
7
+ export type ConfigOptions = DualMarkdownFieldConfig | MarkdownConfig;
8
+ export type MarkdownFieldOptions = {
9
+ admin?: Partial<TextField['admin']>;
10
+ defaultValue?: string;
11
+ label?: string;
12
+ localized?: boolean;
13
+ name?: string;
14
+ required?: boolean;
15
+ };
16
+ export type PayloadMarkdownCollectionConfig = {
17
+ /**
18
+ * Code fence / Shiki rendering options for markdown in this collection.
19
+ */
20
+ code?: MarkdownCodeConfig;
21
+ /**
22
+ * Styling options for markdown fields added to the collection, and/or markdown fields added within blocks to the collection.
23
+ */
24
+ config?: ConfigOptions;
25
+ /**
26
+ * Options for the markdown field.
27
+ */
28
+ field?: Omit<MarkdownFieldOptions, 'name'>;
29
+ /**
30
+ * The name of the markdown field to add to the collection. Defaults to 'content'.
31
+ */
32
+ fieldName?: string;
33
+ /**
34
+ * Whether to add a standalone markdown field to the collection.
35
+ *
36
+ * If not specified, this is inferred automatically:
37
+ * - `true` when the collection does not contain any `blocks` fields
38
+ * - `false` when the collection does contain `blocks` fields
39
+ */
40
+ installField?: boolean;
41
+ /**
42
+ * Whether to install the markdown block into any `blocks` fields in the collection.
43
+ *
44
+ * If not specified, this is inferred automatically:
45
+ * - `true` when the collection contains one or more `blocks` fields
46
+ * - `false` when the collection does not contain any `blocks` fields
47
+ *
48
+ * Note: You must still add the MarkdownBlockComponent to your RenderBlocks.tsx
49
+ * or equivalent for the block to render properly.
50
+ */
51
+ installIntoBlocks?: boolean;
52
+ /**
53
+ * Directive theme registry extensions for markdown in this collection.
54
+ */
55
+ themes?: MarkdownDirectiveThemes;
56
+ };
57
+ export interface PayloadMarkdownConfig {
58
+ /**
59
+ * Code fence / Shiki rendering options.
60
+ */
61
+ code?: MarkdownCodeConfig;
62
+ /**
63
+ * Add markdown field to collections.
64
+ * Set to `true` to add a field with default options, or an object to configure the field.
65
+ */
66
+ collections?: Partial<Record<CollectionSlug, PayloadMarkdownCollectionConfig | true>>;
67
+ /**
68
+ * Add a global for markdown block settings, which can be used to provide default configuration values for all markdown in the project.
69
+ */
70
+ config?: ConfigOptions;
71
+ /**
72
+ * Enable or disable plugin
73
+ * @default false
74
+ */
75
+ enabled?: boolean;
76
+ /**
77
+ * Directive theme registry extensions.
78
+ */
79
+ themes?: MarkdownDirectiveThemes;
80
+ }
package/dist/types.js ADDED
@@ -0,0 +1,3 @@
1
+ export { };
2
+
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/types.ts"],"sourcesContent":["import type { CollectionSlug, TextField } from 'payload'\n\nimport type { MarkdownCodeConfig, MarkdownConfig, MarkdownDirectiveThemes } from './types/core.js'\n\nexport type DualMarkdownFieldConfig = {\n blocks?: MarkdownConfig\n field?: MarkdownConfig\n}\n\nexport type ConfigOptions = DualMarkdownFieldConfig | MarkdownConfig\n\nexport type MarkdownFieldOptions = {\n admin?: Partial<TextField['admin']>\n defaultValue?: string\n label?: string\n localized?: boolean\n name?: string\n required?: boolean\n}\n\nexport type PayloadMarkdownCollectionConfig = {\n /**\n * Code fence / Shiki rendering options for markdown in this collection.\n */\n code?: MarkdownCodeConfig\n\n /**\n * Styling options for markdown fields added to the collection, and/or markdown fields added within blocks to the collection.\n */\n config?: ConfigOptions\n\n /**\n * Options for the markdown field.\n */\n field?: Omit<MarkdownFieldOptions, 'name'>\n\n /**\n * The name of the markdown field to add to the collection. Defaults to 'content'.\n */\n fieldName?: string\n\n /**\n * Whether to add a standalone markdown field to the collection.\n *\n * If not specified, this is inferred automatically:\n * - `true` when the collection does not contain any `blocks` fields\n * - `false` when the collection does contain `blocks` fields\n */\n installField?: boolean\n\n /**\n * Whether to install the markdown block into any `blocks` fields in the collection.\n *\n * If not specified, this is inferred automatically:\n * - `true` when the collection contains one or more `blocks` fields\n * - `false` when the collection does not contain any `blocks` fields\n *\n * Note: You must still add the MarkdownBlockComponent to your RenderBlocks.tsx\n * or equivalent for the block to render properly.\n */\n installIntoBlocks?: boolean\n\n /**\n * Directive theme registry extensions for markdown in this collection.\n */\n themes?: MarkdownDirectiveThemes\n}\n\nexport interface PayloadMarkdownConfig {\n /**\n * Code fence / Shiki rendering options.\n */\n code?: MarkdownCodeConfig\n\n /**\n * Add markdown field to collections.\n * Set to `true` to add a field with default options, or an object to configure the field.\n */\n collections?: Partial<Record<CollectionSlug, PayloadMarkdownCollectionConfig | true>>\n\n /**\n * Add a global for markdown block settings, which can be used to provide default configuration values for all markdown in the project.\n */\n config?: ConfigOptions\n\n /**\n * Enable or disable plugin\n * @default false\n */\n enabled?: boolean\n\n /**\n * Directive theme registry extensions.\n */\n themes?: MarkdownDirectiveThemes\n}\n"],"names":[],"mappings":"AAoEA,WA2BC"}
package/package.json ADDED
@@ -0,0 +1,181 @@
1
+ {
2
+ "name": "@valkyrianlabs/payload-markdown",
3
+ "version": "1.3.1",
4
+ "description": "Structured Markdown editing and rendering for Payload CMS with CodeMirror, Shiki, directives, themes, and server-first output.",
5
+ "repository": {
6
+ "url": "https://github.com/valkyrianlabs/payload-markdown"
7
+ },
8
+ "license": "MIT",
9
+ "type": "module",
10
+ "main": "./dist/index.js",
11
+ "types": "./dist/index.d.ts",
12
+ "exports": {
13
+ ".": {
14
+ "import": "./dist/index.js",
15
+ "types": "./dist/index.d.ts",
16
+ "default": "./dist/index.js"
17
+ },
18
+ "./client": {
19
+ "import": "./dist/exports/client.js",
20
+ "types": "./dist/exports/client.d.ts",
21
+ "default": "./dist/exports/client.js"
22
+ },
23
+ "./server": {
24
+ "import": "./dist/exports/server.js",
25
+ "types": "./dist/exports/server.d.ts",
26
+ "default": "./dist/exports/server.js"
27
+ },
28
+ "./advanced": {
29
+ "import": "./dist/exports/advanced.js",
30
+ "types": "./dist/exports/advanced.d.ts",
31
+ "default": "./dist/exports/advanced.js"
32
+ }
33
+ },
34
+ "files": [
35
+ "dist"
36
+ ],
37
+ "scripts": {
38
+ "build": "pnpm copyfiles && pnpm build:types && pnpm build:swc",
39
+ "build:swc": "swc ./src -d ./dist --config-file .swcrc --strip-leading-paths",
40
+ "build:types": "tsc --outDir dist --rootDir ./src",
41
+ "clean": "rimraf {dist,*.tsbuildinfo}",
42
+ "copyfiles": "copyfiles -u 1 \"src/**/*.{html,css,scss,ttf,woff,woff2,eot,svg,jpg,png,json}\" dist/",
43
+ "dev": "next dev dev --turbo --no-server-fast-refresh",
44
+ "dev:generate-importmap": "pnpm dev:payload generate:importmap",
45
+ "dev:generate-types": "pnpm dev:payload generate:types",
46
+ "dev:payload": "cross-env PAYLOAD_CONFIG_PATH=./dev/payload.config.ts payload",
47
+ "generate:importmap": "pnpm dev:generate-importmap",
48
+ "generate:types": "pnpm dev:generate-types",
49
+ "lint": "eslint",
50
+ "lint:fix": "eslint ./src --fix",
51
+ "test": "pnpm test:int && pnpm test:e2e",
52
+ "test:e2e": "playwright test",
53
+ "test:int": "vitest"
54
+ },
55
+ "devDependencies": {
56
+ "@eslint/eslintrc": "^3.3.5",
57
+ "@payloadcms/db-mongodb": "latest",
58
+ "@payloadcms/db-postgres": "latest",
59
+ "@payloadcms/db-sqlite": "latest",
60
+ "@payloadcms/eslint-config": "latest",
61
+ "@payloadcms/live-preview-react": "latest",
62
+ "@payloadcms/next": "latest",
63
+ "@payloadcms/richtext-lexical": "latest",
64
+ "@payloadcms/ui": "latest",
65
+ "@playwright/test": "1.58.2",
66
+ "@swc-node/register": "1.10.9",
67
+ "@swc/cli": "0.6.0",
68
+ "@tailwindcss/postcss": "^4.2.4",
69
+ "@tailwindcss/typography": "^0.5.19",
70
+ "@types/hast": "^3.0.4",
71
+ "@types/mdast": "^4.0.4",
72
+ "@types/node": "22.19.9",
73
+ "@types/react": "19.2.14",
74
+ "@types/react-dom": "19.2.3",
75
+ "@types/unist": "^3.0.3",
76
+ "copyfiles": "2.4.1",
77
+ "cross-env": "^7.0.3",
78
+ "eslint": "^9.39.4",
79
+ "eslint-config-next": "16.2.1",
80
+ "graphql": "^16.13.2",
81
+ "mongodb-memory-server": "10.1.4",
82
+ "next": "^16.2.4",
83
+ "open": "^10.2.0",
84
+ "payload": "latest",
85
+ "postcss": "^8.5.12",
86
+ "prettier": "^3.8.3",
87
+ "qs-esm": "7.0.2",
88
+ "react": "19.2.4",
89
+ "react-dom": "19.2.4",
90
+ "rimraf": "3.0.2",
91
+ "sharp": "0.34.2",
92
+ "sort-package-json": "^2.15.1",
93
+ "tailwindcss": "^4.2.4",
94
+ "typescript": "5.7.3",
95
+ "vite-tsconfig-paths": "6.0.5",
96
+ "vitest": "4.0.18"
97
+ },
98
+ "peerDependencies": {
99
+ "payload": "^3.0.0"
100
+ },
101
+ "engines": {
102
+ "node": "^18.20.2 || >=20.9.0",
103
+ "pnpm": "^9 || ^10"
104
+ },
105
+ "publishConfig": {
106
+ "exports": {
107
+ ".": {
108
+ "import": "./dist/index.js",
109
+ "types": "./dist/index.d.ts",
110
+ "default": "./dist/index.js"
111
+ },
112
+ "./client": {
113
+ "import": "./dist/exports/client.js",
114
+ "types": "./dist/exports/client.d.ts",
115
+ "default": "./dist/exports/client.js"
116
+ },
117
+ "./server": {
118
+ "import": "./dist/exports/server.js",
119
+ "types": "./dist/exports/server.d.ts",
120
+ "default": "./dist/exports/server.js"
121
+ },
122
+ "./advanced": {
123
+ "import": "./dist/exports/advanced.js",
124
+ "types": "./dist/exports/advanced.d.ts",
125
+ "default": "./dist/exports/advanced.js"
126
+ }
127
+ },
128
+ "main": "./dist/index.js",
129
+ "types": "./dist/index.d.ts"
130
+ },
131
+ "pnpm": {
132
+ "onlyBuiltDependencies": [
133
+ "@swc/core",
134
+ "esbuild",
135
+ "mongodb-memory-server",
136
+ "sharp",
137
+ "unrs-resolver"
138
+ ]
139
+ },
140
+ "registry": "https://registry.npmjs.org/",
141
+ "dependencies": {
142
+ "@codemirror/autocomplete": "^6.20.1",
143
+ "@codemirror/commands": "^6.10.3",
144
+ "@codemirror/lang-angular": "^0.1.4",
145
+ "@codemirror/lang-cpp": "^6.0.3",
146
+ "@codemirror/lang-css": "^6.3.1",
147
+ "@codemirror/lang-go": "^6.0.1",
148
+ "@codemirror/lang-html": "^6.4.11",
149
+ "@codemirror/lang-java": "^6.0.2",
150
+ "@codemirror/lang-javascript": "^6.2.5",
151
+ "@codemirror/lang-json": "^6.0.2",
152
+ "@codemirror/lang-markdown": "^6.5.0",
153
+ "@codemirror/lang-php": "^6.0.2",
154
+ "@codemirror/lang-python": "^6.2.1",
155
+ "@codemirror/lang-rust": "^6.0.2",
156
+ "@codemirror/lang-sass": "^6.0.2",
157
+ "@codemirror/lang-sql": "^6.10.0",
158
+ "@codemirror/lang-vue": "^0.1.3",
159
+ "@codemirror/lang-xml": "^6.1.0",
160
+ "@codemirror/lang-yaml": "^6.1.3",
161
+ "@codemirror/language": "^6.12.3",
162
+ "@codemirror/lint": "^6.9.5",
163
+ "@codemirror/state": "^6.6.0",
164
+ "@codemirror/view": "^6.41.1",
165
+ "@lezer/highlight": "^1.2.3",
166
+ "hast-util-from-html": "^2.0.3",
167
+ "hast-util-sanitize": "^5.0.2",
168
+ "hast-util-to-string": "^3.0.1",
169
+ "mdast-util-directive": "^3.1.0",
170
+ "rehype-raw": "^7.0.0",
171
+ "rehype-sanitize": "^6.0.0",
172
+ "rehype-stringify": "^10.0.1",
173
+ "remark-gfm": "^4.0.1",
174
+ "remark-parse": "^11.0.0",
175
+ "remark-rehype": "^11.1.2",
176
+ "shiki": "^4.0.2",
177
+ "unified": "^11.0.5",
178
+ "unist-util-visit": "^5.1.0"
179
+ },
180
+ "packageManager": "pnpm@10.33.0"
181
+ }