@blogmcp/sdk 0.6.0 → 0.7.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 (208) hide show
  1. package/dist/consultations/channel-text.d.ts +118 -0
  2. package/dist/consultations/channel-text.js +40 -0
  3. package/dist/consultations/index.d.ts +28 -0
  4. package/dist/consultations/index.js +60 -0
  5. package/dist/consultations/messages.cs.d.ts +149 -0
  6. package/dist/consultations/messages.cs.js +143 -0
  7. package/dist/consultations/messages.d.ts +34 -0
  8. package/dist/consultations/messages.en.d.ts +143 -0
  9. package/dist/consultations/messages.en.js +141 -0
  10. package/dist/consultations/messages.js +48 -0
  11. package/dist/consultations/outcome.d.ts +121 -0
  12. package/dist/consultations/outcome.js +161 -0
  13. package/dist/consultations/public-config.d.ts +71 -0
  14. package/dist/consultations/public-config.js +104 -0
  15. package/dist/consultations/reader.d.ts +83 -0
  16. package/dist/consultations/reader.js +128 -0
  17. package/dist/consultations/routes.d.ts +214 -0
  18. package/dist/consultations/routes.js +149 -0
  19. package/dist/consultations/server/client-ip.d.ts +50 -0
  20. package/dist/consultations/server/client-ip.js +44 -0
  21. package/dist/consultations/server/contact.d.ts +23 -0
  22. package/dist/consultations/server/contact.js +138 -0
  23. package/dist/consultations/server/context.d.ts +246 -0
  24. package/dist/consultations/server/context.js +152 -0
  25. package/dist/consultations/server/cookie.d.ts +60 -0
  26. package/dist/consultations/server/cookie.js +57 -0
  27. package/dist/consultations/server/env.d.ts +20 -0
  28. package/dist/consultations/server/env.js +35 -0
  29. package/dist/consultations/server/http.d.ts +59 -0
  30. package/dist/consultations/server/http.js +64 -0
  31. package/dist/consultations/server/index.d.ts +37 -0
  32. package/dist/consultations/server/index.js +19 -0
  33. package/dist/consultations/server/origin.d.ts +39 -0
  34. package/dist/consultations/server/origin.js +31 -0
  35. package/dist/consultations/server/server.d.ts +106 -0
  36. package/dist/consultations/server/server.js +122 -0
  37. package/dist/consultations/server/session.d.ts +38 -0
  38. package/dist/consultations/server/session.js +210 -0
  39. package/dist/consultations/server/transport.d.ts +69 -0
  40. package/dist/consultations/server/transport.js +117 -0
  41. package/dist/consultations/server/turnstile.d.ts +44 -0
  42. package/dist/consultations/server/turnstile.js +31 -0
  43. package/dist/consultations/site.d.ts +100 -0
  44. package/dist/consultations/site.js +60 -0
  45. package/dist/consultations/submit-new.d.ts +103 -0
  46. package/dist/consultations/submit-new.js +72 -0
  47. package/dist/core/auth.d.ts +2 -2
  48. package/dist/core/client.d.ts +25 -4
  49. package/dist/core/client.js +35 -30
  50. package/dist/core/consultation-adapter.d.ts +2 -2
  51. package/dist/core/consultations.d.ts +1 -1
  52. package/dist/core/errors.d.ts +1 -1
  53. package/dist/core/errors.js +16 -15
  54. package/dist/core/index.d.ts +31 -31
  55. package/dist/core/index.js +35 -34
  56. package/dist/core/markdown.d.ts +1 -1
  57. package/dist/core/queries.d.ts +4 -1
  58. package/dist/core/queries.js +131 -86
  59. package/dist/core/review/format.d.ts +1 -1
  60. package/dist/core/review/index.d.ts +2 -2
  61. package/dist/core/seo.d.ts +1 -1
  62. package/dist/core/translations/cs.json.js +1 -1
  63. package/dist/core/translations/en.json.js +1 -1
  64. package/dist/core/types.d.ts +50 -1
  65. package/dist/core/view-model.d.ts +12 -2
  66. package/dist/core/view-model.js +40 -34
  67. package/dist/{packages/tripmap-core/node_modules → node_modules}/pmtiles/dist/esm/index.js +1 -1
  68. package/dist/nuxt/composables/useAsyncKb.d.ts +4 -4
  69. package/dist/nuxt/index.d.ts +1 -1
  70. package/dist/packages/mdx-render-vue/dist/composables/useGallery.js +12 -11
  71. package/dist/packages/mdx-render-vue/dist/composables/useTripMap.js +16 -16
  72. package/dist/packages/mdx-render-vue/dist/edit/TripMapEdit.vue.js +1 -1
  73. package/dist/packages/mdx-render-vue/dist/registry.js +21 -22
  74. package/dist/packages/mdx-render-vue/dist/render/alert/Alert.vue2.js +1 -1
  75. package/dist/packages/mdx-render-vue/dist/render/badge/Badge.vue2.js +1 -1
  76. package/dist/packages/mdx-render-vue/dist/render/button/Button.vue2.js +1 -1
  77. package/dist/packages/mdx-render-vue/dist/render/callout/CalloutDefault.vue.js +1 -1
  78. package/dist/packages/mdx-render-vue/dist/render/callout/CalloutMinimal.vue.js +1 -1
  79. package/dist/packages/mdx-render-vue/dist/render/tripmap/TripMapDefault.vue.js +2 -2
  80. package/dist/packages/tripmap-core/dist/engine.js +3 -3
  81. package/dist/packages/tripmap-core/dist/generated/maplibre-worker.bundle.js +1 -1
  82. package/dist/react/KbMdxContent.d.ts +1 -1
  83. package/dist/react/KbMdxContent.js +7 -8
  84. package/dist/react/context.d.ts +4 -4
  85. package/dist/react/hooks/useImageRenderer.d.ts +1 -1
  86. package/dist/react/hooks/useKbClient.d.ts +1 -1
  87. package/dist/react/hooks/useKbContext.d.ts +1 -1
  88. package/dist/react/hooks/useKbI18n.d.ts +1 -1
  89. package/dist/react/hooks/useKbLanguage.d.ts +1 -1
  90. package/dist/react/hooks/useKbSearch.d.ts +1 -1
  91. package/dist/react/hooks/useMdxContent.d.ts +1 -1
  92. package/dist/react/index.d.ts +15 -15
  93. package/dist/react/provider.d.ts +2 -2
  94. package/dist/react/server/index.d.ts +2 -2
  95. package/dist/vue/components/KbAccessGate.vue.d.ts +4 -1
  96. package/dist/vue/components/KbAccessGate.vue.js +42 -32
  97. package/dist/vue/components/KbArticleCard.vue.d.ts +3 -1
  98. package/dist/vue/components/KbArticleCard.vue.js +67 -39
  99. package/dist/vue/components/KbMdxContent.vue2.js +6 -7
  100. package/dist/vue/composables/useArticles.d.ts +1 -1
  101. package/dist/vue/composables/useImageRenderer.d.ts +1 -1
  102. package/dist/vue/composables/useKbAuth.d.ts +1 -1
  103. package/dist/vue/composables/useKbClient.d.ts +1 -1
  104. package/dist/vue/composables/useKbComments.d.ts +1 -1
  105. package/dist/vue/composables/useKbI18n.d.ts +1 -1
  106. package/dist/vue/composables/useKbLanguage.d.ts +1 -1
  107. package/dist/vue/composables/useNavigation.d.ts +1 -1
  108. package/dist/vue/composables/useSearch.d.ts +1 -1
  109. package/dist/vue/composables/useTags.d.ts +1 -1
  110. package/dist/vue/index.d.ts +19 -19
  111. package/dist/vue/plugin.d.ts +4 -4
  112. package/package.json +15 -5
  113. package/src/consultations/channel-text.ts +168 -0
  114. package/src/consultations/index.ts +87 -0
  115. package/src/consultations/messages.cs.ts +175 -0
  116. package/src/consultations/messages.en.ts +171 -0
  117. package/src/consultations/messages.ts +91 -0
  118. package/src/consultations/outcome.ts +278 -0
  119. package/src/consultations/public-config.ts +246 -0
  120. package/src/consultations/reader.ts +281 -0
  121. package/src/consultations/routes.ts +341 -0
  122. package/src/consultations/server/client-ip.ts +106 -0
  123. package/src/consultations/server/contact.ts +267 -0
  124. package/src/consultations/server/context.ts +403 -0
  125. package/src/consultations/server/cookie.ts +129 -0
  126. package/src/consultations/server/env.ts +66 -0
  127. package/src/consultations/server/http.ts +148 -0
  128. package/src/consultations/server/index.ts +55 -0
  129. package/src/consultations/server/origin.ts +71 -0
  130. package/src/consultations/server/server.ts +322 -0
  131. package/src/consultations/server/session.ts +414 -0
  132. package/src/consultations/server/transport.ts +196 -0
  133. package/src/consultations/server/turnstile.ts +98 -0
  134. package/src/consultations/site.ts +183 -0
  135. package/src/consultations/submit-new.ts +266 -0
  136. package/src/core/auth.ts +1 -1
  137. package/src/core/client.ts +32 -1
  138. package/src/core/errors.ts +5 -2
  139. package/src/core/index.ts +3 -0
  140. package/src/core/queries.ts +56 -0
  141. package/src/core/translations/cs.json +2 -1
  142. package/src/core/translations/en.json +2 -1
  143. package/src/core/types.ts +51 -0
  144. package/src/core/view-model.ts +18 -0
  145. package/src/vue/components/KbAccessGate.vue +14 -1
  146. package/src/vue/components/KbArticleCard.vue +25 -0
  147. package/dist/_virtual/constants.js +0 -4
  148. package/dist/_virtual/index.js +0 -2
  149. package/dist/_virtual/index2.js +0 -4
  150. package/dist/_virtual/index3.js +0 -2
  151. package/dist/_virtual/re.js +0 -4
  152. package/dist/node_modules/@braintree/sanitize-url/dist/constants.js +0 -8
  153. package/dist/node_modules/@braintree/sanitize-url/dist/index.js +0 -60
  154. package/dist/node_modules/dompurify/dist/purify.es.js +0 -662
  155. package/dist/node_modules/semver/classes/comparator.js +0 -56
  156. package/dist/node_modules/semver/classes/range.js +0 -148
  157. package/dist/node_modules/semver/classes/semver.js +0 -169
  158. package/dist/node_modules/semver/functions/clean.js +0 -14
  159. package/dist/node_modules/semver/functions/cmp.js +0 -39
  160. package/dist/node_modules/semver/functions/coerce.js +0 -33
  161. package/dist/node_modules/semver/functions/compare-build.js +0 -14
  162. package/dist/node_modules/semver/functions/compare-loose.js +0 -11
  163. package/dist/node_modules/semver/functions/compare.js +0 -11
  164. package/dist/node_modules/semver/functions/diff.js +0 -24
  165. package/dist/node_modules/semver/functions/eq.js +0 -11
  166. package/dist/node_modules/semver/functions/gt.js +0 -11
  167. package/dist/node_modules/semver/functions/gte.js +0 -11
  168. package/dist/node_modules/semver/functions/inc.js +0 -21
  169. package/dist/node_modules/semver/functions/lt.js +0 -11
  170. package/dist/node_modules/semver/functions/lte.js +0 -11
  171. package/dist/node_modules/semver/functions/major.js +0 -11
  172. package/dist/node_modules/semver/functions/minor.js +0 -11
  173. package/dist/node_modules/semver/functions/neq.js +0 -11
  174. package/dist/node_modules/semver/functions/parse.js +0 -21
  175. package/dist/node_modules/semver/functions/patch.js +0 -11
  176. package/dist/node_modules/semver/functions/prerelease.js +0 -14
  177. package/dist/node_modules/semver/functions/rcompare.js +0 -11
  178. package/dist/node_modules/semver/functions/rsort.js +0 -11
  179. package/dist/node_modules/semver/functions/satisfies.js +0 -18
  180. package/dist/node_modules/semver/functions/sort.js +0 -11
  181. package/dist/node_modules/semver/functions/valid.js +0 -14
  182. package/dist/node_modules/semver/index.js +0 -97
  183. package/dist/node_modules/semver/internal/constants.js +0 -28
  184. package/dist/node_modules/semver/internal/debug.js +0 -8
  185. package/dist/node_modules/semver/internal/identifiers.js +0 -18
  186. package/dist/node_modules/semver/internal/lrucache.js +0 -32
  187. package/dist/node_modules/semver/internal/parse-options.js +0 -10
  188. package/dist/node_modules/semver/internal/re.js +0 -32
  189. package/dist/node_modules/semver/ranges/gtr.js +0 -11
  190. package/dist/node_modules/semver/ranges/intersects.js +0 -11
  191. package/dist/node_modules/semver/ranges/ltr.js +0 -11
  192. package/dist/node_modules/semver/ranges/max-satisfying.js +0 -22
  193. package/dist/node_modules/semver/ranges/min-satisfying.js +0 -22
  194. package/dist/node_modules/semver/ranges/min-version.js +0 -42
  195. package/dist/node_modules/semver/ranges/outside.js +0 -44
  196. package/dist/node_modules/semver/ranges/simplify.js +0 -24
  197. package/dist/node_modules/semver/ranges/subset.js +0 -94
  198. package/dist/node_modules/semver/ranges/to-comparators.js +0 -11
  199. package/dist/node_modules/semver/ranges/valid.js +0 -17
  200. package/dist/packages/mdx-schema/dist/composables/useMdxParsing.js +0 -389
  201. package/dist/packages/mdx-schema/dist/metadata/index.js +0 -526
  202. package/dist/packages/mdx-schema/dist/prepareProps.js +0 -46
  203. package/dist/packages/mdx-schema/dist/styles/index.js +0 -147
  204. package/dist/packages/mdx-schema/dist/tripmap.js +0 -101
  205. package/dist/packages/mdx-schema/dist/types/index.js +0 -26
  206. package/dist/packages/sanitize/dist/html.js +0 -89
  207. /package/dist/{packages/tripmap-core/node_modules → node_modules}/maplibre-gl/dist/maplibre-gl-shared.js +0 -0
  208. /package/dist/{packages/tripmap-core/node_modules → node_modules}/maplibre-gl/dist/maplibre-gl.js +0 -0
@@ -1,389 +0,0 @@
1
- const d = /<[A-Z][a-zA-Z]*[\s/>]/, A = /<([A-Z][a-zA-Z]*)\s*([^>]*)>([\s\S]*?)<\/\1>|<([A-Z][a-zA-Z]*)\s*((?:[^/]|\/(?!>))*)\/>/g;
2
- function g(t, i) {
3
- if (t[i] !== "{")
4
- return null;
5
- let e = 0, n = null;
6
- for (let u = i; u < t.length; u++) {
7
- const s = t[u];
8
- if (n) {
9
- if (s === "\\") {
10
- u++;
11
- continue;
12
- }
13
- s === n && (n = null);
14
- continue;
15
- }
16
- if (s === '"' || s === "'") {
17
- n = s;
18
- continue;
19
- }
20
- if (s === "{") {
21
- e++;
22
- continue;
23
- }
24
- if (s === "}" && (e--, e === 0))
25
- return { content: t.slice(i + 1, u), endIndex: u + 1 };
26
- }
27
- return null;
28
- }
29
- function x(t) {
30
- const i = {};
31
- if (!t.trim())
32
- return i;
33
- let e = 0;
34
- const n = t;
35
- for (; e < n.length; ) {
36
- for (; e < n.length && /\s/.test(n[e]); )
37
- e++;
38
- if (e >= n.length)
39
- break;
40
- const u = n.slice(e).match(/^(\w+)/);
41
- if (!u) {
42
- e++;
43
- continue;
44
- }
45
- const s = u[1];
46
- for (e += s.length; e < n.length && /\s/.test(n[e]); )
47
- e++;
48
- if (n[e] !== "=") {
49
- i[s] = !0;
50
- continue;
51
- }
52
- for (e++; e < n.length && /\s/.test(n[e]); )
53
- e++;
54
- if (n[e] === '"') {
55
- const l = n.indexOf('"', e + 1);
56
- if (l === -1) {
57
- i[s] = "";
58
- break;
59
- }
60
- i[s] = n.slice(e + 1, l), e = l + 1;
61
- } else if (n[e] === "{") {
62
- const l = g(n, e);
63
- if (l) {
64
- try {
65
- i[s] = JSON.parse(l.content);
66
- } catch {
67
- try {
68
- i[s] = JSON.parse(l.content.replace(/'/g, '"'));
69
- } catch {
70
- i[s] = l.content;
71
- }
72
- }
73
- e = l.endIndex;
74
- } else
75
- e++;
76
- } else
77
- e++;
78
- }
79
- return i;
80
- }
81
- function O(t) {
82
- const i = [];
83
- for (const [e, n] of Object.entries(t))
84
- n != null && (n === !0 ? i.push(e) : typeof n == "string" ? i.push(n.includes('"') ? `${e}={${JSON.stringify(n)}}` : `${e}="${n}"`) : typeof n == "number" ? i.push(`${e}={${n}}`) : typeof n == "boolean" ? i.push(`${e}={${n}}`) : i.push(`${e}={${JSON.stringify(n)}}`));
85
- return i.join(" ");
86
- }
87
- function b(t, i, e) {
88
- const n = O(i), u = n ? ` ${n}` : "";
89
- return e ? `<${t}${u}>
90
- ${e}
91
- </${t}>` : `<${t}${u} />`;
92
- }
93
- function _(t) {
94
- if (t.startsWith("---")) {
95
- const i = t.indexOf("---", 3);
96
- if (i !== -1)
97
- return t.substring(i + 3).trim();
98
- }
99
- return t;
100
- }
101
- function Z(t) {
102
- if (t.startsWith("---")) {
103
- const i = t.indexOf("---", 3);
104
- if (i !== -1)
105
- return t.substring(3, i).trim();
106
- }
107
- return null;
108
- }
109
- function M(t) {
110
- if (!t || !t.startsWith("---"))
111
- return 0;
112
- const i = t.indexOf("---", 3);
113
- if (i === -1)
114
- return 0;
115
- const e = i + 3, n = t.slice(e);
116
- return e + (n.length - n.trimStart().length);
117
- }
118
- function z(t, i) {
119
- if (i <= 0)
120
- return 1;
121
- const e = Math.min(i, t.length);
122
- let n = 1;
123
- for (let u = 0; u < e; u++)
124
- t[u] === `
125
- ` && n++;
126
- return n;
127
- }
128
- const m = 0, E = 1, w = 2, y = /^ {0,3}(`{3,}|~{3,})(.*)$/, S = /^ {0,3}(`{3,}|~{3,})[ \t]*$/;
129
- function $(t) {
130
- const i = new Uint8Array(t.length);
131
- if (!t || !t.includes("`") && !t.includes("~"))
132
- return i;
133
- const e = [], n = [];
134
- for (let l = 0; l <= t.length; ) {
135
- const o = t.indexOf(`
136
- `, l);
137
- if (e.push(l), n.push(o === -1 ? t.length : o), o === -1)
138
- break;
139
- l = o + 1;
140
- }
141
- const u = (l) => {
142
- const o = t.slice(e[l], n[l]);
143
- return o.endsWith("\r") ? o.slice(0, -1) : o;
144
- }, s = new Array(e.length).fill(!1);
145
- for (let l = 0; l < e.length; ) {
146
- const o = y.exec(u(l));
147
- if (!o) {
148
- l++;
149
- continue;
150
- }
151
- const c = o[1], f = c[0];
152
- if (f === "`" && o[2].includes("`")) {
153
- l++;
154
- continue;
155
- }
156
- let r = -1;
157
- for (let h = l + 1; h < e.length; h++) {
158
- const a = S.exec(u(h));
159
- if (a && a[1][0] === f && a[1].length >= c.length) {
160
- r = h;
161
- break;
162
- }
163
- }
164
- if (r === -1) {
165
- l++;
166
- continue;
167
- }
168
- i.fill(E, e[l], n[r]);
169
- for (let h = l; h <= r; h++)
170
- s[h] = !0;
171
- l = r + 1;
172
- }
173
- for (let l = 0; l < e.length; l++) {
174
- if (s[l])
175
- continue;
176
- const o = e[l], c = n[l];
177
- let f = o;
178
- for (; f < c; ) {
179
- if (t[f] !== "`") {
180
- f++;
181
- continue;
182
- }
183
- let r = 0;
184
- for (; f + r < c && t[f + r] === "`"; )
185
- r++;
186
- if (r >= 3 && t.slice(o, f).trim() === "") {
187
- f += r;
188
- continue;
189
- }
190
- let h = f + r, a = -1;
191
- for (; h < c; ) {
192
- if (t[h] !== "`") {
193
- h++;
194
- continue;
195
- }
196
- let p = 0;
197
- for (; h + p < c && t[h + p] === "`"; )
198
- p++;
199
- if (p === r) {
200
- a = h;
201
- break;
202
- }
203
- h += p;
204
- }
205
- if (a === -1) {
206
- f += r;
207
- continue;
208
- }
209
- i.fill(w, f, a + r), f = a + r;
210
- }
211
- }
212
- return i;
213
- }
214
- function k(t, i) {
215
- if (t[i] !== "<")
216
- return null;
217
- const e = t[i + 1];
218
- if (e === void 0 || e < "A" || e > "Z")
219
- return null;
220
- let n = i + 2;
221
- for (; n < t.length && /[a-zA-Z]/.test(t[n]); )
222
- n++;
223
- const u = t.slice(i + 1, n), s = t[n];
224
- if (s === void 0 || s !== ">" && s !== "/" && !/\s/.test(s))
225
- return null;
226
- for (; n < t.length && /\s/.test(t[n]); )
227
- n++;
228
- const l = n, o = (f) => {
229
- let r = f + 1;
230
- for (; r < t.length && (t[r] === " " || t[r] === " " || t[r] === "\r"); )
231
- r++;
232
- return r >= t.length || t[r] === `
233
- `;
234
- };
235
- let c = null;
236
- for (; n < t.length; ) {
237
- const f = t[n];
238
- if (c) {
239
- if (f === `
240
- ` && o(n))
241
- return null;
242
- f === c && (c = null), n++;
243
- continue;
244
- }
245
- if (f === '"' || f === "'") {
246
- c = f, n++;
247
- continue;
248
- }
249
- if (f === "{") {
250
- const r = g(t, n);
251
- if (!r)
252
- return null;
253
- n = r.endIndex;
254
- continue;
255
- }
256
- if (f === "/" && t[n + 1] === ">")
257
- return { name: u, propsSource: t.slice(l, n), tagEnd: n + 2, selfClosing: !0 };
258
- if (f === ">")
259
- return { name: u, propsSource: t.slice(l, n), tagEnd: n + 1, selfClosing: !1 };
260
- if (f === "<")
261
- return null;
262
- if (f === `
263
- `) {
264
- if (o(n)) {
265
- let r = n - 1;
266
- for (; r >= i && /\s/.test(t[r]); )
267
- r--;
268
- if (t[r] === "=")
269
- return null;
270
- }
271
- n++;
272
- continue;
273
- }
274
- n++;
275
- }
276
- return null;
277
- }
278
- function C(t, i, e, n, u) {
279
- const s = `</${i}`;
280
- let l = null;
281
- const o = u?.has(i) ?? !1, c = (r) => {
282
- const h = `<${i}`;
283
- let a = t.indexOf(h, e);
284
- for (; a !== -1 && a < r; ) {
285
- const p = t[a + h.length];
286
- if (p === void 0 || !/[a-zA-Z]/.test(p))
287
- return !0;
288
- a = t.indexOf(h, a + 1);
289
- }
290
- return !1;
291
- };
292
- let f = e;
293
- for (; f < t.length; ) {
294
- const r = t.indexOf(s, f);
295
- if (r === -1)
296
- break;
297
- let h = r + s.length;
298
- for (; h < t.length && /\s/.test(t[h]); )
299
- h++;
300
- if (t[h] === ">") {
301
- const a = { start: r, end: h + 1 };
302
- if (n[r] === m && !c(r))
303
- return a;
304
- if (!l && (l = a, o))
305
- return l;
306
- }
307
- f = r + s.length;
308
- }
309
- return l && u?.add(i), l;
310
- }
311
- function N(t) {
312
- if (!t)
313
- return [];
314
- if (!d.test(t))
315
- return [{ type: "html", content: t, start: 0, end: t.length }];
316
- const i = $(t), e = [], n = /* @__PURE__ */ new Set();
317
- let u = 0, s = 0, l = !1;
318
- for (; s < t.length; ) {
319
- const o = t.indexOf("<", s);
320
- if (o === -1)
321
- break;
322
- if (i[o] !== m) {
323
- s = o + 1;
324
- continue;
325
- }
326
- const c = k(t, o);
327
- if (!c) {
328
- s = o + 1;
329
- continue;
330
- }
331
- if (i[c.tagEnd - 1] === E) {
332
- s = o + 1;
333
- continue;
334
- }
335
- let f, r;
336
- if (c.selfClosing)
337
- f = c.tagEnd;
338
- else {
339
- const h = C(t, c.name, c.tagEnd, i, n);
340
- if (!h) {
341
- s = c.tagEnd;
342
- continue;
343
- }
344
- r = t.slice(c.tagEnd, h.start).trim(), f = h.end;
345
- }
346
- if (o > u) {
347
- const h = t.slice(u, o);
348
- h.trim() && e.push({ type: "html", content: h, start: u, end: o });
349
- }
350
- e.push({
351
- type: "component",
352
- name: c.name,
353
- propsSource: c.propsSource,
354
- props: x(c.propsSource),
355
- children: r,
356
- start: o,
357
- end: f
358
- }), l = !0, u = f, s = f;
359
- }
360
- if (u < t.length) {
361
- const o = t.slice(u);
362
- o.trim() && e.push({ type: "html", content: o, start: u, end: t.length });
363
- }
364
- return l ? e : t.trim() ? [{ type: "html", content: t, start: 0, end: t.length }] : [];
365
- }
366
- function I(t) {
367
- if (!d.test(t))
368
- return [{ type: "html", content: t }];
369
- const i = N(t).map((e) => e.type === "html" ? { type: "html", content: e.content } : { type: "component", name: e.name, props: e.props, children: e.children });
370
- return i.length === 0 && t.trim() ? [{ type: "html", content: t }] : i;
371
- }
372
- export {
373
- E as CODE_FENCE,
374
- w as CODE_INLINE,
375
- m as CODE_NONE,
376
- d as HAS_MDX_RE,
377
- A as MDX_COMPONENT_PATTERN,
378
- M as computeBodyOffset,
379
- $ as computeCodeMask,
380
- g as extractBraceExpression,
381
- Z as extractFrontmatter,
382
- I as extractMdxComponents,
383
- z as lineAtOffset,
384
- x as parseJsxProps,
385
- N as scanMdxNodes,
386
- b as serializeComponent,
387
- O as serializeProps,
388
- _ as stripFrontmatter
389
- };