raffel 1.1.97 → 1.1.98

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 (97) hide show
  1. package/dist/docs/try-it-proxy.d.ts +15 -0
  2. package/dist/docs/try-it-proxy.d.ts.map +1 -1
  3. package/dist/docs/try-it-proxy.js +54 -0
  4. package/dist/docs/try-it-proxy.js.map +1 -1
  5. package/dist/docs/ui/assets/protocol-console.js +13 -1
  6. package/dist/docs/ui/assets/raffel-docs.js +167 -1
  7. package/dist/docs/ui/client-script/index.d.ts.map +1 -1
  8. package/dist/docs/ui/client-script/index.js +3 -95
  9. package/dist/docs/ui/client-script/index.js.map +1 -1
  10. package/dist/docs/ui/html-builder.d.ts.map +1 -1
  11. package/dist/docs/ui/html-builder.js +6 -3
  12. package/dist/docs/ui/html-builder.js.map +1 -1
  13. package/dist/docs/ui/runtime/index.js +167 -1
  14. package/dist/docs/ui/runtime/index.js.map +1 -1
  15. package/dist/docs/ui/runtime/protocol-console.d.ts +2 -0
  16. package/dist/docs/ui/runtime/protocol-console.d.ts.map +1 -1
  17. package/dist/docs/ui/runtime/protocol-console.js +13 -1
  18. package/dist/docs/ui/runtime/protocol-console.js.map +1 -1
  19. package/dist/docs/usd-middleware.d.ts +2 -0
  20. package/dist/docs/usd-middleware.d.ts.map +1 -1
  21. package/dist/docs/usd-middleware.js +37 -1
  22. package/dist/docs/usd-middleware.js.map +1 -1
  23. package/dist/server/builder/execution-http-docs.d.ts.map +1 -1
  24. package/dist/server/builder/execution-http-docs.js +8 -0
  25. package/dist/server/builder/execution-http-docs.js.map +1 -1
  26. package/dist/server/rest-middleware.d.ts.map +1 -1
  27. package/dist/server/rest-middleware.js +26 -0
  28. package/dist/server/rest-middleware.js.map +1 -1
  29. package/dist/ui/docs/try-it-proxy.d.ts +15 -0
  30. package/dist/ui/docs/try-it-proxy.d.ts.map +1 -1
  31. package/dist/ui/docs/ui/client-script/index.d.ts.map +1 -1
  32. package/dist/ui/docs/ui/html-builder.d.ts.map +1 -1
  33. package/dist/ui/docs/ui/runtime/protocol-console.d.ts +2 -0
  34. package/dist/ui/docs/ui/runtime/protocol-console.d.ts.map +1 -1
  35. package/dist/ui/docs/usd-middleware.d.ts +2 -0
  36. package/dist/ui/docs/usd-middleware.d.ts.map +1 -1
  37. package/package.json +1 -1
  38. package/dist/docs/ui/client-script/cards-and-code.d.ts +0 -5
  39. package/dist/docs/ui/client-script/cards-and-code.d.ts.map +0 -1
  40. package/dist/docs/ui/client-script/cards-and-code.js +0 -5
  41. package/dist/docs/ui/client-script/cards-and-code.js.map +0 -1
  42. package/dist/docs/ui/client-script/content.d.ts +0 -5
  43. package/dist/docs/ui/client-script/content.d.ts.map +0 -1
  44. package/dist/docs/ui/client-script/content.js +0 -412
  45. package/dist/docs/ui/client-script/content.js.map +0 -1
  46. package/dist/docs/ui/client-script/docs-pages.d.ts +0 -5
  47. package/dist/docs/ui/client-script/docs-pages.d.ts.map +0 -1
  48. package/dist/docs/ui/client-script/docs-pages.js +0 -153
  49. package/dist/docs/ui/client-script/docs-pages.js.map +0 -1
  50. package/dist/docs/ui/client-script/endpoint-details.d.ts +0 -5
  51. package/dist/docs/ui/client-script/endpoint-details.d.ts.map +0 -1
  52. package/dist/docs/ui/client-script/endpoint-details.js +0 -5
  53. package/dist/docs/ui/client-script/endpoint-details.js.map +0 -1
  54. package/dist/docs/ui/client-script/init.d.ts +0 -5
  55. package/dist/docs/ui/client-script/init.d.ts.map +0 -1
  56. package/dist/docs/ui/client-script/init.js +0 -227
  57. package/dist/docs/ui/client-script/init.js.map +0 -1
  58. package/dist/docs/ui/client-script/markdown.d.ts +0 -5
  59. package/dist/docs/ui/client-script/markdown.d.ts.map +0 -1
  60. package/dist/docs/ui/client-script/markdown.js +0 -438
  61. package/dist/docs/ui/client-script/markdown.js.map +0 -1
  62. package/dist/docs/ui/client-script/navigation.d.ts +0 -5
  63. package/dist/docs/ui/client-script/navigation.d.ts.map +0 -1
  64. package/dist/docs/ui/client-script/navigation.js +0 -548
  65. package/dist/docs/ui/client-script/navigation.js.map +0 -1
  66. package/dist/docs/ui/client-script/protocols.d.ts +0 -5
  67. package/dist/docs/ui/client-script/protocols.d.ts.map +0 -1
  68. package/dist/docs/ui/client-script/protocols.js +0 -5
  69. package/dist/docs/ui/client-script/protocols.js.map +0 -1
  70. package/dist/docs/ui/client-script/schema-rendering.d.ts +0 -5
  71. package/dist/docs/ui/client-script/schema-rendering.d.ts.map +0 -1
  72. package/dist/docs/ui/client-script/schema-rendering.js +0 -5
  73. package/dist/docs/ui/client-script/schema-rendering.js.map +0 -1
  74. package/dist/docs/ui/client-script/try-it.d.ts +0 -5
  75. package/dist/docs/ui/client-script/try-it.d.ts.map +0 -1
  76. package/dist/docs/ui/client-script/try-it.js +0 -5
  77. package/dist/docs/ui/client-script/try-it.js.map +0 -1
  78. package/dist/ui/docs/ui/client-script/cards-and-code.d.ts +0 -5
  79. package/dist/ui/docs/ui/client-script/cards-and-code.d.ts.map +0 -1
  80. package/dist/ui/docs/ui/client-script/content.d.ts +0 -5
  81. package/dist/ui/docs/ui/client-script/content.d.ts.map +0 -1
  82. package/dist/ui/docs/ui/client-script/docs-pages.d.ts +0 -5
  83. package/dist/ui/docs/ui/client-script/docs-pages.d.ts.map +0 -1
  84. package/dist/ui/docs/ui/client-script/endpoint-details.d.ts +0 -5
  85. package/dist/ui/docs/ui/client-script/endpoint-details.d.ts.map +0 -1
  86. package/dist/ui/docs/ui/client-script/init.d.ts +0 -5
  87. package/dist/ui/docs/ui/client-script/init.d.ts.map +0 -1
  88. package/dist/ui/docs/ui/client-script/markdown.d.ts +0 -5
  89. package/dist/ui/docs/ui/client-script/markdown.d.ts.map +0 -1
  90. package/dist/ui/docs/ui/client-script/navigation.d.ts +0 -5
  91. package/dist/ui/docs/ui/client-script/navigation.d.ts.map +0 -1
  92. package/dist/ui/docs/ui/client-script/protocols.d.ts +0 -5
  93. package/dist/ui/docs/ui/client-script/protocols.d.ts.map +0 -1
  94. package/dist/ui/docs/ui/client-script/schema-rendering.d.ts +0 -5
  95. package/dist/ui/docs/ui/client-script/schema-rendering.d.ts.map +0 -1
  96. package/dist/ui/docs/ui/client-script/try-it.d.ts +0 -5
  97. package/dist/ui/docs/ui/client-script/try-it.d.ts.map +0 -1
@@ -1,438 +0,0 @@
1
- /**
2
- * Embedded docs UI client script chunk.
3
- */
4
- export const markdownClientScript = String.raw ` // Helper to escape text for display
5
- const COMMON_EMOJI_ENTITIES = {
6
- '+1': '👍',
7
- '-1': '👎',
8
- '100': '💯',
9
- bug: '🐛',
10
- book: '📖',
11
- books: '📚',
12
- bulb: '💡',
13
- check: '✅',
14
- fire: '🔥',
15
- gear: '⚙️',
16
- grinning: '😀',
17
- heart: '❤️',
18
- info: 'ℹ️',
19
- joy: '😂',
20
- link: '🔗',
21
- lock: '🔒',
22
- memo: '📝',
23
- package: '📦',
24
- pushpin: '📌',
25
- rocket: '🚀',
26
- smile: '😄',
27
- sparkles: '✨',
28
- star: '⭐',
29
- tada: '🎉',
30
- unlock: '🔓',
31
- warning: '⚠️',
32
- white_check_mark: '✅',
33
- wrench: '🔧',
34
- x: '❌',
35
- zap: '⚡',
36
- };
37
-
38
- function esc(str) {
39
- if (!str) return '';
40
- const div = document.createElement('div');
41
- div.textContent = str;
42
- return div.innerHTML;
43
- }
44
-
45
- function escapeAttr(str) {
46
- return esc(str).replace(/"/g, '"');
47
- }
48
-
49
- function renderEmojiShorthand(value) {
50
- if (markdownConfig.noEmoji === true) return String(value || '');
51
- return String(value || '').replace(/:([a-z0-9_+-]+):/gi, function(match, name) {
52
- const entity = COMMON_EMOJI_ENTITIES[String(name).toLowerCase()];
53
- return entity ? '<span class="emoji" aria-label="' + escapeAttr(name) + '">' + entity + '</span>' : match;
54
- });
55
- }
56
-
57
- function getExternalLinkTarget() {
58
- return String(markdownConfig.externalLinkTarget || '_blank');
59
- }
60
-
61
- function getExternalLinkRel(target) {
62
- if (target !== '_blank') return '';
63
- return String(markdownConfig.externalLinkRel ?? 'noopener noreferrer');
64
- }
65
-
66
- function isNoCompileLink(href) {
67
- const patterns = Array.isArray(markdownConfig.noCompileLinks) ? markdownConfig.noCompileLinks : [];
68
- return patterns.some(function(pattern) {
69
- try {
70
- return new RegExp(String(pattern)).test(href);
71
- } catch {
72
- return false;
73
- }
74
- });
75
- }
76
-
77
- function parseMarkdownAttributes(text) {
78
- const attrs = { classes: [] };
79
- const withoutAttrs = String(text || '').replace(/:([A-Za-z-]+)(?:=([^\s:]+))?/g, function(_match, name, value) {
80
- const key = String(name).toLowerCase();
81
- if (key === 'class' && value) attrs.classes.push(value);
82
- if (key === 'id' && value) attrs.id = value;
83
- if (key === 'target' && value) attrs.target = value;
84
- if (key === 'disabled') attrs.disabled = true;
85
- if (key === 'ignore') attrs.ignore = true;
86
- if (key === 'no-zoom') attrs.noZoom = true;
87
- if (key === 'size' && value) {
88
- const parts = String(value).split('x');
89
- if (parts[0] && parts[0].endsWith('%')) attrs.widthStyle = parts[0];
90
- else if (parts[0]) attrs.width = parts[0];
91
- if (parts[1]) attrs.height = parts[1];
92
- }
93
- return '';
94
- }).trim();
95
- if (withoutAttrs) attrs.title = withoutAttrs;
96
- return attrs;
97
- }
98
-
99
- function parseMarkdownDestination(value) {
100
- const raw = String(value || '').trim()
101
- .replace(/&quot;/g, '"')
102
- .replace(/&#x27;/g, "'");
103
- if (!raw) return null;
104
- const match = raw.match(/^(\S+)(?:\s+(['"])(.*?)\2)?$/);
105
- const href = match ? match[1] : raw;
106
- const meta = match ? (match[3] || '') : '';
107
- return {
108
- href,
109
- attrs: meta.startsWith(':') ? parseMarkdownAttributes(meta) : { title: meta || undefined, classes: [] }
110
- };
111
- }
112
-
113
- function parseComponentFence(lang, body) {
114
- const match = String(lang || '').match(/^(?:raffel-component|svelte-component)\s+([A-Za-z][\w.-]*)(?:\s+(.+))?$/);
115
- if (!match) return null;
116
- return {
117
- name: match[1],
118
- props: match[2] ? match[2].trim() : String(body || '').trim(),
119
- };
120
- }
121
-
122
- function renderMarkdownAttributeString(attrs, kind) {
123
- const attributes = [];
124
- if (attrs.title) attributes.push('title="' + escapeAttr(attrs.title) + '"');
125
- if (attrs.id) attributes.push('id="' + escapeAttr(attrs.id) + '"');
126
- if (attrs.classes && attrs.classes.length > 0) {
127
- const base = kind === 'image' ? 'md-image' : '';
128
- attributes.push('class="' + escapeAttr([base].concat(attrs.classes).filter(Boolean).join(' ')) + '"');
129
- }
130
- if (kind === 'image') {
131
- if (attrs.noZoom) attributes.push('data-no-zoom="true"');
132
- if (attrs.width) attributes.push('width="' + escapeAttr(attrs.width) + '"');
133
- if (attrs.height) attributes.push('height="' + escapeAttr(attrs.height) + '"');
134
- if (attrs.widthStyle) attributes.push('style="width:' + escapeAttr(attrs.widthStyle) + '"');
135
- }
136
- return attributes.length ? ' ' + attributes.join(' ') : '';
137
- }
138
-
139
- function parseHeadingTitle(value) {
140
- const withoutClosingHashes = String(value || '').replace(/\s+#+$/, '').trim();
141
- const ignoreAll = /\{raffel-ignore-all\}/i.test(withoutClosingHashes);
142
- const ignore = ignoreAll || /\{raffel-ignore\}/i.test(withoutClosingHashes);
143
- const withoutIgnore = withoutClosingHashes
144
- .replace(/<!--\s*\{raffel-ignore(?:-all)?\}\s*-->/ig, '')
145
- .replace(/\{raffel-ignore(?:-all)?\}/ig, '')
146
- .trim();
147
- const idMatch = withoutIgnore.match(/\s+:id=([A-Za-z0-9_-]+)\s*$/);
148
- const title = idMatch ? withoutIgnore.slice(0, idMatch.index).trim() : withoutIgnore;
149
- return { title, id: idMatch ? idMatch[1] : slugifyHeading(title), ignore, ignoreAll };
150
- }
151
-
152
- function isSafeUrl(url) {
153
- return /^(https?:|mailto:|#|\/|\.\/|\.\.\/)/i.test(url);
154
- }
155
-
156
- function slugifyHeading(text) {
157
- return String(text || '')
158
- .toLowerCase()
159
- .replace(/<[^>]*>/g, '')
160
- .replace(/[^\w\s-]/g, '')
161
- .trim()
162
- .replace(/[\s_-]+/g, '-')
163
- .replace(/^-+|-+$/g, '');
164
- }
165
-
166
- function parseInlineMarkdown(value) {
167
- if (!value) return '';
168
- const codeTokens = [];
169
- const htmlTokens = [];
170
- const protectHtml = function(html) {
171
- const token = '\u0000H' + htmlTokens.length + 'H\u0000';
172
- htmlTokens.push(html);
173
- return token;
174
- };
175
- const tick = String.fromCharCode(96);
176
- const inlineCodeRe = new RegExp(tick + '([^' + tick + ']+)' + tick, 'g');
177
- let text = String(value).replace(inlineCodeRe, function(_match, code) {
178
- const token = '\u0000C' + codeTokens.length + 'C\u0000';
179
- codeTokens.push('<code class="md-inline-code">' + esc(code) + '</code>');
180
- return token;
181
- });
182
-
183
- if (markdownConfig.html === 'raw') text = text.replace(/<!--[\s\S]*?-->|<\/?[A-Za-z][^>]*>/g, protectHtml);
184
- text = esc(text);
185
- text = text.replace(/!\[([^\]]*)\]\(([^)]+)\)/g, function(match, alt, destination) {
186
- const parsed = parseMarkdownDestination(destination);
187
- if (!parsed || !isSafeUrl(parsed.href)) return match;
188
- const attrs = renderMarkdownAttributeString(parsed.attrs, 'image');
189
- const classAttr = parsed.attrs.classes.length > 0 ? '' : ' class="md-image"';
190
- return protectHtml('<img' + classAttr + ' src="' + escapeAttr(parsed.href) + '" alt="' + escapeAttr(alt) + '"' + attrs + '>');
191
- });
192
- text = text.replace(/\[([^\]]+)\]\(([^)]+)\)/g, function(match, label, destination) {
193
- const parsed = parseMarkdownDestination(destination);
194
- if (!parsed || !isSafeUrl(parsed.href)) return match;
195
- const target = parsed.attrs.target || (/^https?:\/\//i.test(parsed.href) ? getExternalLinkTarget() : '');
196
- const targetAttr = target ? ' target="' + escapeAttr(target) + '"' : '';
197
- const rel = getExternalLinkRel(target);
198
- const relAttr = rel ? ' rel="' + escapeAttr(rel) + '"' : '';
199
- const disabledAttrs = parsed.attrs.disabled ? ' aria-disabled="true" tabindex="-1"' : '';
200
- const classes = parsed.attrs.disabled ? ['markdown-disabled'].concat(parsed.attrs.classes) : parsed.attrs.classes;
201
- const attrs = renderMarkdownAttributeString(Object.assign({}, parsed.attrs, { classes }), 'link');
202
- return protectHtml('<a href="' + escapeAttr(parsed.href) + '"' + targetAttr + relAttr + disabledAttrs + attrs + '>') +
203
- label +
204
- protectHtml('</a>');
205
- });
206
- text = text.replace(/~~([^~]+)~~/g, '<del>$1</del>');
207
- text = text.replace(/\*\*([^*]+)\*\*/g, '<strong>$1</strong>');
208
- text = text.replace(/__([^_]+)__/g, '<strong>$1</strong>');
209
- text = text.replace(/\*([^*]+)\*/g, '<em>$1</em>');
210
- text = text.replace(/_([^_]+)_/g, '<em>$1</em>');
211
- text = renderEmojiShorthand(text);
212
- codeTokens.forEach(function(html, index) {
213
- text = text.replace('\u0000C' + index + 'C\u0000', html);
214
- });
215
- htmlTokens.forEach(function(html, index) {
216
- text = text.replace('\u0000H' + index + 'H\u0000', html);
217
- });
218
- return text;
219
- }
220
-
221
- function normalizeTabTitle(value) {
222
- return String(value || '')
223
- .replace(/^\*\*/, '')
224
- .replace(/\*\*$/, '')
225
- .trim();
226
- }
227
-
228
- function renderAlertBlock(lines) {
229
- const first = lines[0] || '';
230
- const match = first.match(/^\[!(NOTE|TIP|WARNING|DANGER|INFO|IMPORTANT|CAUTION)\]\s*(.*)$/i);
231
- const legacy = first.match(/^([!?])>\s*(.*)$/);
232
- if (!match && !legacy) return null;
233
- const rawKind = match ? match[1] : (legacy[1] === '?' ? 'TIP' : 'IMPORTANT');
234
- const kind = rawKind.toLowerCase();
235
- const title = (match && match[2]) || rawKind.charAt(0).toUpperCase() + rawKind.slice(1).toLowerCase();
236
- const body = (legacy ? [legacy[2] || ''].concat(lines.slice(1)) : lines.slice(1)).join('\n');
237
- return '<aside class="md-alert md-alert-' + escapeAttr(kind) + '">' +
238
- '<div class="md-alert-title">' + esc(title) + '</div>' +
239
- '<div class="md-alert-body">' + parseMarkdown(body) + '</div>' +
240
- '</aside>';
241
- }
242
-
243
- // Markdown parser for generated docs content.
244
- function parseMarkdown(md) {
245
- if (!md) return '';
246
- const pluginContext = getPluginContext();
247
- const source = applyStringHook('beforeMarkdown', String(md), pluginContext).replace(/\r\n?/g, '\n');
248
- const lines = source.split('\n');
249
- const html = [];
250
- let index = 0;
251
- const tickFence = String.fromCharCode(96).repeat(3);
252
-
253
- function readUntilBlank() {
254
- const block = [];
255
- while (index < lines.length && lines[index].trim()) {
256
- block.push(lines[index]);
257
- index += 1;
258
- }
259
- return block;
260
- }
261
-
262
- function renderList(ordered) {
263
- const items = [];
264
- const re = ordered ? /^\s*\d+\.\s+(.+)$/ : /^\s*[-*+]\s+(.+)$/;
265
- while (index < lines.length && re.test(lines[index])) {
266
- const match = lines[index].match(re);
267
- let body = match ? match[1] : '';
268
- let checkbox = '';
269
- const task = body.match(/^\[( |x|X)\]\s+(.+)$/);
270
- if (task) {
271
- const checked = task[1].toLowerCase() === 'x' ? ' checked' : '';
272
- checkbox = '<input type="checkbox" disabled' + checked + '> ';
273
- body = task[2];
274
- }
275
- items.push('<li>' + checkbox + parseInlineMarkdown(body) + '</li>');
276
- index += 1;
277
- }
278
- return '<' + (ordered ? 'ol' : 'ul') + ' class="md-list">' + items.join('') + '</' + (ordered ? 'ol' : 'ul') + '>';
279
- }
280
-
281
- function renderTable() {
282
- const header = lines[index].trim();
283
- const separator = lines[index + 1] ? lines[index + 1].trim() : '';
284
- if (!/^\|.*\|$/.test(header) || !/^\|?\s*:?-{3,}:?\s*(\|\s*:?-{3,}:?\s*)+\|?$/.test(separator)) {
285
- return null;
286
- }
287
-
288
- const headers = header.replace(/^\||\|$/g, '').split('|').map(c => c.trim());
289
- index += 2;
290
- const rows = [];
291
- while (index < lines.length && /^\|.*\|$/.test(lines[index].trim())) {
292
- rows.push(lines[index].trim().replace(/^\||\|$/g, '').split('|').map(c => c.trim()));
293
- index += 1;
294
- }
295
-
296
- return '<table class="md-table"><thead><tr>' +
297
- headers.map(c => '<th>' + parseInlineMarkdown(c) + '</th>').join('') +
298
- '</tr></thead><tbody>' +
299
- rows.map(row => '<tr>' + row.map(c => '<td>' + parseInlineMarkdown(c) + '</td>').join('') + '</tr>').join('') +
300
- '</tbody></table>';
301
- }
302
-
303
- function renderTabs() {
304
- const tabs = [];
305
- let current = null;
306
- index += 1;
307
-
308
- while (index < lines.length && lines[index].trim() !== '<!-- tabs:end -->') {
309
- const tabHeading = lines[index].trim().match(/^####\s+(.+)$/);
310
- if (tabHeading) {
311
- if (current) tabs.push(current);
312
- current = { title: normalizeTabTitle(tabHeading[1]), lines: [] };
313
- index += 1;
314
- continue;
315
- }
316
- if (current) {
317
- current.lines.push(lines[index]);
318
- }
319
- index += 1;
320
- }
321
-
322
- if (current) tabs.push(current);
323
- if (index < lines.length) index += 1;
324
- if (tabs.length === 0) return '';
325
-
326
- const buttons = tabs.map((tab, tabIndex) =>
327
- '<button type="button" class="md-tab-button' + (tabIndex === 0 ? ' active' : '') + '" data-tab-index="' + tabIndex + '">' +
328
- esc(tab.title || 'Tab ' + (tabIndex + 1)) +
329
- '</button>'
330
- ).join('');
331
- const panels = tabs.map((tab, tabIndex) =>
332
- '<div class="md-tab-panel' + (tabIndex === 0 ? ' active' : '') + '" data-tab-index="' + tabIndex + '">' +
333
- parseMarkdown(tab.lines.join('\n')) +
334
- '</div>'
335
- ).join('');
336
-
337
- return '<div class="md-tabs"><div class="md-tab-list" role="tablist">' + buttons + '</div>' + panels + '</div>';
338
- }
339
-
340
- while (index < lines.length) {
341
- const line = lines[index];
342
- const trimmed = line.trim();
343
-
344
- if (!trimmed) {
345
- index += 1;
346
- continue;
347
- }
348
-
349
- if (trimmed === '<!-- tabs:start -->') {
350
- html.push(renderTabs());
351
- continue;
352
- }
353
-
354
- if (markdownConfig.html === 'raw' && /^<\/?[A-Za-z][^>]*>$/.test(trimmed)) {
355
- html.push(readUntilBlank().join('\n'));
356
- continue;
357
- }
358
-
359
- if (trimmed.startsWith(tickFence)) {
360
- const lang = trimmed.slice(3).trim() || 'text';
361
- const code = [];
362
- index += 1;
363
- while (index < lines.length && !lines[index].trim().startsWith(tickFence)) {
364
- code.push(lines[index]);
365
- index += 1;
366
- }
367
- if (index < lines.length) index += 1;
368
- const component = parseComponentFence(lang, code.join('\n'));
369
- if (component) {
370
- html.push('<div class="docs-component-mount svelte-component-mount" data-raffel-component="' + escapeAttr(component.name) + '" data-props="' + escapeAttr(component.props) + '"></div>');
371
- } else if (lang === 'mermaid') {
372
- html.push('<div class="mermaid" data-mermaid-source="' + escapeAttr(code.join('\n')) + '">' + esc(code.join('\n')) + '</div>');
373
- } else {
374
- html.push('<div class="md-code-wrap"><button type="button" class="copy-code-btn">Copy</button><pre class="md-code-block"><code class="language-' + escapeAttr(lang) + '">' + esc(code.join('\n')) + '</code></pre></div>');
375
- }
376
- continue;
377
- }
378
-
379
- const heading = trimmed.match(/^(#{1,6})\s+(.+)$/);
380
- if (heading) {
381
- const level = heading[1].length;
382
- const parsedHeading = parseHeadingTitle(heading[2]);
383
- const ignoreAttrs = (parsedHeading.ignore ? ' data-markdown-ignore="true"' : '') +
384
- (parsedHeading.ignoreAll ? ' data-markdown-ignore-all="true"' : '');
385
- html.push('<h' + level + ' class="md-h' + level + '" id="' + escapeAttr(parsedHeading.id) + '"' + ignoreAttrs + '><a class="heading-anchor" href="#' + escapeAttr(parsedHeading.id) + '">#</a>' + parseInlineMarkdown(parsedHeading.title) + '</h' + level + '>');
386
- index += 1;
387
- continue;
388
- }
389
-
390
- if (/^---+$/.test(trimmed) || /^\*\*\*+$/.test(trimmed)) {
391
- html.push('<hr class="md-hr">');
392
- index += 1;
393
- continue;
394
- }
395
-
396
- if (/^[!?]>\s?/.test(trimmed)) {
397
- const alertHtml = renderAlertBlock([trimmed]);
398
- if (alertHtml) html.push(alertHtml);
399
- index += 1;
400
- continue;
401
- }
402
-
403
- if (/^>\s?/.test(trimmed)) {
404
- const quote = [];
405
- while (index < lines.length && /^>\s?/.test(lines[index].trim())) {
406
- quote.push(lines[index].trim().replace(/^>\s?/, ''));
407
- index += 1;
408
- }
409
- const alertHtml = renderAlertBlock(quote);
410
- html.push(alertHtml || '<blockquote class="md-blockquote">' + parseMarkdown(quote.join('\n')) + '</blockquote>');
411
- continue;
412
- }
413
-
414
- const table = renderTable();
415
- if (table) {
416
- html.push(table);
417
- continue;
418
- }
419
-
420
- if (/^\s*[-*+]\s+/.test(line)) {
421
- html.push(renderList(false));
422
- continue;
423
- }
424
-
425
- if (/^\s*\d+\.\s+/.test(line)) {
426
- html.push(renderList(true));
427
- continue;
428
- }
429
-
430
- const paragraph = readUntilBlank().join(' ');
431
- html.push('<p class="md-p">' + parseInlineMarkdown(paragraph) + '</p>');
432
- }
433
-
434
- return applyStringHook('afterMarkdown', html.join('\n'), pluginContext);
435
- }
436
-
437
- `;
438
- //# sourceMappingURL=markdown.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"markdown.js","sourceRoot":"","sources":["../../../../src/docs/ui/client-script/markdown.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAib7C,CAAA"}
@@ -1,5 +0,0 @@
1
- /**
2
- * Embedded docs UI client script chunk.
3
- */
4
- export declare const navigationClientScript: string;
5
- //# sourceMappingURL=navigation.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../../../src/docs/ui/client-script/navigation.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,sBAAsB,QA+hBlC,CAAA"}