@analogjs/content 3.0.0-alpha.1 → 3.0.0-alpha.11

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 (103) hide show
  1. package/LICENSE +21 -0
  2. package/fesm2022/__vite-browser-external.mjs +9 -0
  3. package/fesm2022/analogjs-content-md4x.mjs +290 -0
  4. package/fesm2022/analogjs-content-mdc.mjs +170 -0
  5. package/fesm2022/analogjs-content-og.mjs +34 -46
  6. package/fesm2022/analogjs-content-prism-highlighter.mjs +81 -68
  7. package/fesm2022/analogjs-content-resources.mjs +115 -124
  8. package/fesm2022/analogjs-content-shiki-highlighter.mjs +9 -14
  9. package/fesm2022/analogjs-content.mjs +18538 -621
  10. package/fesm2022/api_vite.mjs +7 -0
  11. package/fesm2022/browser.mjs +6069 -0
  12. package/fesm2022/build2.mjs +5259 -0
  13. package/fesm2022/chunk.mjs +37 -0
  14. package/fesm2022/chunk2.mjs +41 -0
  15. package/fesm2022/jiti.mjs +4477 -0
  16. package/fesm2022/lib.mjs +365 -0
  17. package/fesm2022/main.mjs +2341 -0
  18. package/fesm2022/node.mjs +791 -0
  19. package/fesm2022/postcss-import.mjs +451 -0
  20. package/fesm2022/postcss.mjs +3236 -0
  21. package/fesm2022/prompt-BYQIwEjg.mjs +847 -0
  22. package/md4x/package.json +4 -0
  23. package/mdc/package.json +4 -0
  24. package/og/package.json +2 -2
  25. package/package.json +35 -9
  26. package/prism-highlighter/package.json +2 -2
  27. package/resources/package.json +2 -2
  28. package/shiki-highlighter/package.json +2 -2
  29. package/src/lib/devtools/content-devtools-client.ts +215 -0
  30. package/src/lib/devtools/content-devtools.styles.css +194 -0
  31. package/types/md4x/src/index.d.ts +5 -0
  32. package/types/md4x/src/lib/md4x-content-renderer.service.d.ts +33 -0
  33. package/types/md4x/src/lib/md4x-wasm-content-renderer.service.d.ts +16 -0
  34. package/types/md4x/src/lib/provide-md4x.d.ts +26 -0
  35. package/types/md4x/src/lib/streaming-markdown-renderer.d.ts +21 -0
  36. package/types/mdc/src/index.d.ts +2 -0
  37. package/types/mdc/src/lib/mdc-component-registry.d.ts +25 -0
  38. package/types/mdc/src/lib/mdc-renderer.directive.d.ts +33 -0
  39. package/types/og/src/index.d.ts +2 -0
  40. package/types/og/src/lib/og.d.ts +5 -0
  41. package/types/og/src/lib/options.d.ts +11 -0
  42. package/types/prism-highlighter/src/index.d.ts +8 -0
  43. package/types/prism-highlighter/src/lib/prism/angular.d.ts +1 -0
  44. package/types/prism-highlighter/src/lib/prism-highlighter.d.ts +8 -0
  45. package/types/resources/src/content-file-resource.d.ts +37 -0
  46. package/types/resources/src/content-files-resource.d.ts +3 -0
  47. package/types/resources/src/index.d.ts +2 -0
  48. package/types/shiki-highlighter/src/index.d.ts +7 -0
  49. package/types/src/index.d.ts +18 -0
  50. package/types/src/lib/anchor-navigation.directive.d.ts +9 -0
  51. package/types/src/lib/content-file-loader.d.ts +6 -0
  52. package/types/src/lib/content-file.d.ts +8 -0
  53. package/types/src/lib/content-files-list-token.d.ts +3 -0
  54. package/types/src/lib/content-files-token.d.ts +3 -0
  55. package/types/src/lib/content-list-loader.d.ts +7 -0
  56. package/types/src/lib/content-renderer.d.ts +33 -0
  57. package/types/src/lib/content.d.ts +14 -0
  58. package/types/src/lib/devtools/content-devtools-plugin.d.ts +23 -0
  59. package/types/src/lib/devtools/content-devtools-renderer.d.ts +23 -0
  60. package/types/src/lib/devtools/index.d.ts +23 -0
  61. package/types/src/lib/get-content-files.d.ts +14 -0
  62. package/types/src/lib/inject-content-files.d.ts +4 -0
  63. package/types/src/lib/markdown-content-renderer.service.d.ts +10 -0
  64. package/types/src/lib/markdown-route.component.d.ts +15 -0
  65. package/types/src/lib/markdown.component.d.ts +26 -0
  66. package/types/src/lib/marked-content-highlighter.d.ts +17 -0
  67. package/types/src/lib/marked-setup.service.d.ts +10 -0
  68. package/types/src/lib/parse-raw-content-file.d.ts +18 -0
  69. package/types/src/lib/provide-content.d.ts +7 -0
  70. package/types/src/lib/render-task.service.d.ts +8 -0
  71. package/types/src/lib/utils/zone-wait-for.d.ts +2 -0
  72. package/fesm2022/analogjs-content-og.mjs.map +0 -1
  73. package/fesm2022/analogjs-content-prism-highlighter.mjs.map +0 -1
  74. package/fesm2022/analogjs-content-resources.mjs.map +0 -1
  75. package/fesm2022/analogjs-content-shiki-highlighter.mjs.map +0 -1
  76. package/fesm2022/analogjs-content.mjs.map +0 -1
  77. package/og/README.md +0 -3
  78. package/plugin/README.md +0 -11
  79. package/plugin/migrations.json +0 -75
  80. package/plugin/package.json +0 -23
  81. package/plugin/src/index.d.ts +0 -2
  82. package/plugin/src/index.js +0 -4
  83. package/plugin/src/index.js.map +0 -1
  84. package/plugin/src/migrations/update-markdown-renderer-feature/compat.d.ts +0 -2
  85. package/plugin/src/migrations/update-markdown-renderer-feature/compat.js +0 -6
  86. package/plugin/src/migrations/update-markdown-renderer-feature/compat.js.map +0 -1
  87. package/plugin/src/migrations/update-markdown-renderer-feature/update-markdown-renderer-feature.d.ts +0 -2
  88. package/plugin/src/migrations/update-markdown-renderer-feature/update-markdown-renderer-feature.js +0 -48
  89. package/plugin/src/migrations/update-markdown-renderer-feature/update-markdown-renderer-feature.js.map +0 -1
  90. package/plugin/src/migrations/update-markdown-version/compat.d.ts +0 -2
  91. package/plugin/src/migrations/update-markdown-version/compat.js +0 -6
  92. package/plugin/src/migrations/update-markdown-version/compat.js.map +0 -1
  93. package/plugin/src/migrations/update-markdown-version/update-markdown-version.d.ts +0 -2
  94. package/plugin/src/migrations/update-markdown-version/update-markdown-version.js +0 -23
  95. package/plugin/src/migrations/update-markdown-version/update-markdown-version.js.map +0 -1
  96. package/prism-highlighter/README.md +0 -3
  97. package/resources/README.md +0 -3
  98. package/shiki-highlighter/README.md +0 -3
  99. package/types/analogjs-content-og.d.ts +0 -19
  100. package/types/analogjs-content-prism-highlighter.d.ts +0 -15
  101. package/types/analogjs-content-resources.d.ts +0 -20
  102. package/types/analogjs-content-shiki-highlighter.d.ts +0 -11
  103. package/types/analogjs-content.d.ts +0 -168
@@ -0,0 +1,365 @@
1
+ import { t as __commonJSMin } from "./chunk2.mjs";
2
+ //#region node_modules/.pnpm/vite@8.0.1_@types+node@24.12.0_esbuild@0.27.4_jiti@2.6.1_less@4.6.4_sass-embedded@1.98._d992f4aa5a300da161dfa1a019a26106/node_modules/vite/dist/node/chunks/lib.js
3
+ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
4
+ var openParentheses = "(".charCodeAt(0);
5
+ var closeParentheses = ")".charCodeAt(0);
6
+ var singleQuote = "'".charCodeAt(0);
7
+ var doubleQuote = "\"".charCodeAt(0);
8
+ var backslash = "\\".charCodeAt(0);
9
+ var slash = "/".charCodeAt(0);
10
+ var comma = ",".charCodeAt(0);
11
+ var colon = ":".charCodeAt(0);
12
+ var star = "*".charCodeAt(0);
13
+ var uLower = "u".charCodeAt(0);
14
+ var uUpper = "U".charCodeAt(0);
15
+ var plus = "+".charCodeAt(0);
16
+ var isUnicodeRange = /^[a-f0-9?-]+$/i;
17
+ module.exports = function(input) {
18
+ var tokens = [];
19
+ var value = input;
20
+ var next, quote, prev, token, escape, escapePos, whitespacePos, parenthesesOpenPos;
21
+ var pos = 0;
22
+ var code = value.charCodeAt(pos);
23
+ var max = value.length;
24
+ var stack = [{ nodes: tokens }];
25
+ var balanced = 0;
26
+ var parent;
27
+ var name = "";
28
+ var before = "";
29
+ var after = "";
30
+ while (pos < max) if (code <= 32) {
31
+ next = pos;
32
+ do {
33
+ next += 1;
34
+ code = value.charCodeAt(next);
35
+ } while (code <= 32);
36
+ token = value.slice(pos, next);
37
+ prev = tokens[tokens.length - 1];
38
+ if (code === closeParentheses && balanced) after = token;
39
+ else if (prev && prev.type === "div") {
40
+ prev.after = token;
41
+ prev.sourceEndIndex += token.length;
42
+ } else if (code === comma || code === colon || code === slash && value.charCodeAt(next + 1) !== star && (!parent || parent && parent.type === "function" && parent.value !== "calc")) before = token;
43
+ else tokens.push({
44
+ type: "space",
45
+ sourceIndex: pos,
46
+ sourceEndIndex: next,
47
+ value: token
48
+ });
49
+ pos = next;
50
+ } else if (code === singleQuote || code === doubleQuote) {
51
+ next = pos;
52
+ quote = code === singleQuote ? "'" : "\"";
53
+ token = {
54
+ type: "string",
55
+ sourceIndex: pos,
56
+ quote
57
+ };
58
+ do {
59
+ escape = false;
60
+ next = value.indexOf(quote, next + 1);
61
+ if (~next) {
62
+ escapePos = next;
63
+ while (value.charCodeAt(escapePos - 1) === backslash) {
64
+ escapePos -= 1;
65
+ escape = !escape;
66
+ }
67
+ } else {
68
+ value += quote;
69
+ next = value.length - 1;
70
+ token.unclosed = true;
71
+ }
72
+ } while (escape);
73
+ token.value = value.slice(pos + 1, next);
74
+ token.sourceEndIndex = token.unclosed ? next : next + 1;
75
+ tokens.push(token);
76
+ pos = next + 1;
77
+ code = value.charCodeAt(pos);
78
+ } else if (code === slash && value.charCodeAt(pos + 1) === star) {
79
+ next = value.indexOf("*/", pos);
80
+ token = {
81
+ type: "comment",
82
+ sourceIndex: pos,
83
+ sourceEndIndex: next + 2
84
+ };
85
+ if (next === -1) {
86
+ token.unclosed = true;
87
+ next = value.length;
88
+ token.sourceEndIndex = next;
89
+ }
90
+ token.value = value.slice(pos + 2, next);
91
+ tokens.push(token);
92
+ pos = next + 2;
93
+ code = value.charCodeAt(pos);
94
+ } else if ((code === slash || code === star) && parent && parent.type === "function" && parent.value === "calc") {
95
+ token = value[pos];
96
+ tokens.push({
97
+ type: "word",
98
+ sourceIndex: pos - before.length,
99
+ sourceEndIndex: pos + token.length,
100
+ value: token
101
+ });
102
+ pos += 1;
103
+ code = value.charCodeAt(pos);
104
+ } else if (code === slash || code === comma || code === colon) {
105
+ token = value[pos];
106
+ tokens.push({
107
+ type: "div",
108
+ sourceIndex: pos - before.length,
109
+ sourceEndIndex: pos + token.length,
110
+ value: token,
111
+ before,
112
+ after: ""
113
+ });
114
+ before = "";
115
+ pos += 1;
116
+ code = value.charCodeAt(pos);
117
+ } else if (openParentheses === code) {
118
+ next = pos;
119
+ do {
120
+ next += 1;
121
+ code = value.charCodeAt(next);
122
+ } while (code <= 32);
123
+ parenthesesOpenPos = pos;
124
+ token = {
125
+ type: "function",
126
+ sourceIndex: pos - name.length,
127
+ value: name,
128
+ before: value.slice(parenthesesOpenPos + 1, next)
129
+ };
130
+ pos = next;
131
+ if (name === "url" && code !== singleQuote && code !== doubleQuote) {
132
+ next -= 1;
133
+ do {
134
+ escape = false;
135
+ next = value.indexOf(")", next + 1);
136
+ if (~next) {
137
+ escapePos = next;
138
+ while (value.charCodeAt(escapePos - 1) === backslash) {
139
+ escapePos -= 1;
140
+ escape = !escape;
141
+ }
142
+ } else {
143
+ value += ")";
144
+ next = value.length - 1;
145
+ token.unclosed = true;
146
+ }
147
+ } while (escape);
148
+ whitespacePos = next;
149
+ do {
150
+ whitespacePos -= 1;
151
+ code = value.charCodeAt(whitespacePos);
152
+ } while (code <= 32);
153
+ if (parenthesesOpenPos < whitespacePos) {
154
+ if (pos !== whitespacePos + 1) token.nodes = [{
155
+ type: "word",
156
+ sourceIndex: pos,
157
+ sourceEndIndex: whitespacePos + 1,
158
+ value: value.slice(pos, whitespacePos + 1)
159
+ }];
160
+ else token.nodes = [];
161
+ if (token.unclosed && whitespacePos + 1 !== next) {
162
+ token.after = "";
163
+ token.nodes.push({
164
+ type: "space",
165
+ sourceIndex: whitespacePos + 1,
166
+ sourceEndIndex: next,
167
+ value: value.slice(whitespacePos + 1, next)
168
+ });
169
+ } else {
170
+ token.after = value.slice(whitespacePos + 1, next);
171
+ token.sourceEndIndex = next;
172
+ }
173
+ } else {
174
+ token.after = "";
175
+ token.nodes = [];
176
+ }
177
+ pos = next + 1;
178
+ token.sourceEndIndex = token.unclosed ? next : pos;
179
+ code = value.charCodeAt(pos);
180
+ tokens.push(token);
181
+ } else {
182
+ balanced += 1;
183
+ token.after = "";
184
+ token.sourceEndIndex = pos + 1;
185
+ tokens.push(token);
186
+ stack.push(token);
187
+ tokens = token.nodes = [];
188
+ parent = token;
189
+ }
190
+ name = "";
191
+ } else if (closeParentheses === code && balanced) {
192
+ pos += 1;
193
+ code = value.charCodeAt(pos);
194
+ parent.after = after;
195
+ parent.sourceEndIndex += after.length;
196
+ after = "";
197
+ balanced -= 1;
198
+ stack[stack.length - 1].sourceEndIndex = pos;
199
+ stack.pop();
200
+ parent = stack[balanced];
201
+ tokens = parent.nodes;
202
+ } else {
203
+ next = pos;
204
+ do {
205
+ if (code === backslash) next += 1;
206
+ next += 1;
207
+ code = value.charCodeAt(next);
208
+ } while (next < max && !(code <= 32 || code === singleQuote || code === doubleQuote || code === comma || code === colon || code === slash || code === openParentheses || code === star && parent && parent.type === "function" && parent.value === "calc" || code === slash && parent.type === "function" && parent.value === "calc" || code === closeParentheses && balanced));
209
+ token = value.slice(pos, next);
210
+ if (openParentheses === code) name = token;
211
+ else if ((uLower === token.charCodeAt(0) || uUpper === token.charCodeAt(0)) && plus === token.charCodeAt(1) && isUnicodeRange.test(token.slice(2))) tokens.push({
212
+ type: "unicode-range",
213
+ sourceIndex: pos,
214
+ sourceEndIndex: next,
215
+ value: token
216
+ });
217
+ else tokens.push({
218
+ type: "word",
219
+ sourceIndex: pos,
220
+ sourceEndIndex: next,
221
+ value: token
222
+ });
223
+ pos = next;
224
+ }
225
+ for (pos = stack.length - 1; pos; pos -= 1) {
226
+ stack[pos].unclosed = true;
227
+ stack[pos].sourceEndIndex = value.length;
228
+ }
229
+ return stack[0].nodes;
230
+ };
231
+ }));
232
+ var require_walk = /* @__PURE__ */ __commonJSMin(((exports, module) => {
233
+ module.exports = function walk(nodes, cb, bubble) {
234
+ var i, max, node, result;
235
+ for (i = 0, max = nodes.length; i < max; i += 1) {
236
+ node = nodes[i];
237
+ if (!bubble) result = cb(node, i, nodes);
238
+ if (result !== false && node.type === "function" && Array.isArray(node.nodes)) walk(node.nodes, cb, bubble);
239
+ if (bubble) cb(node, i, nodes);
240
+ }
241
+ };
242
+ }));
243
+ var require_stringify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
244
+ function stringifyNode(node, custom) {
245
+ var type = node.type;
246
+ var value = node.value;
247
+ var buf;
248
+ var customResult;
249
+ if (custom && (customResult = custom(node)) !== void 0) return customResult;
250
+ else if (type === "word" || type === "space") return value;
251
+ else if (type === "string") {
252
+ buf = node.quote || "";
253
+ return buf + value + (node.unclosed ? "" : buf);
254
+ } else if (type === "comment") return "/*" + value + (node.unclosed ? "" : "*/");
255
+ else if (type === "div") return (node.before || "") + value + (node.after || "");
256
+ else if (Array.isArray(node.nodes)) {
257
+ buf = stringify(node.nodes, custom);
258
+ if (type !== "function") return buf;
259
+ return value + "(" + (node.before || "") + buf + (node.after || "") + (node.unclosed ? "" : ")");
260
+ }
261
+ return value;
262
+ }
263
+ function stringify(nodes, custom) {
264
+ var result, i;
265
+ if (Array.isArray(nodes)) {
266
+ result = "";
267
+ for (i = nodes.length - 1; ~i; i -= 1) result = stringifyNode(nodes[i], custom) + result;
268
+ return result;
269
+ }
270
+ return stringifyNode(nodes, custom);
271
+ }
272
+ module.exports = stringify;
273
+ }));
274
+ var require_unit = /* @__PURE__ */ __commonJSMin(((exports, module) => {
275
+ var minus = "-".charCodeAt(0);
276
+ var plus = "+".charCodeAt(0);
277
+ var dot = ".".charCodeAt(0);
278
+ var exp = "e".charCodeAt(0);
279
+ var EXP = "E".charCodeAt(0);
280
+ function likeNumber(value) {
281
+ var code = value.charCodeAt(0);
282
+ var nextCode;
283
+ if (code === plus || code === minus) {
284
+ nextCode = value.charCodeAt(1);
285
+ if (nextCode >= 48 && nextCode <= 57) return true;
286
+ var nextNextCode = value.charCodeAt(2);
287
+ if (nextCode === dot && nextNextCode >= 48 && nextNextCode <= 57) return true;
288
+ return false;
289
+ }
290
+ if (code === dot) {
291
+ nextCode = value.charCodeAt(1);
292
+ if (nextCode >= 48 && nextCode <= 57) return true;
293
+ return false;
294
+ }
295
+ if (code >= 48 && code <= 57) return true;
296
+ return false;
297
+ }
298
+ module.exports = function(value) {
299
+ var pos = 0;
300
+ var length = value.length;
301
+ var code;
302
+ var nextCode;
303
+ var nextNextCode;
304
+ if (length === 0 || !likeNumber(value)) return false;
305
+ code = value.charCodeAt(pos);
306
+ if (code === plus || code === minus) pos++;
307
+ while (pos < length) {
308
+ code = value.charCodeAt(pos);
309
+ if (code < 48 || code > 57) break;
310
+ pos += 1;
311
+ }
312
+ code = value.charCodeAt(pos);
313
+ nextCode = value.charCodeAt(pos + 1);
314
+ if (code === dot && nextCode >= 48 && nextCode <= 57) {
315
+ pos += 2;
316
+ while (pos < length) {
317
+ code = value.charCodeAt(pos);
318
+ if (code < 48 || code > 57) break;
319
+ pos += 1;
320
+ }
321
+ }
322
+ code = value.charCodeAt(pos);
323
+ nextCode = value.charCodeAt(pos + 1);
324
+ nextNextCode = value.charCodeAt(pos + 2);
325
+ if ((code === exp || code === EXP) && (nextCode >= 48 && nextCode <= 57 || (nextCode === plus || nextCode === minus) && nextNextCode >= 48 && nextNextCode <= 57)) {
326
+ pos += nextCode === plus || nextCode === minus ? 3 : 2;
327
+ while (pos < length) {
328
+ code = value.charCodeAt(pos);
329
+ if (code < 48 || code > 57) break;
330
+ pos += 1;
331
+ }
332
+ }
333
+ return {
334
+ number: value.slice(0, pos),
335
+ unit: value.slice(pos)
336
+ };
337
+ };
338
+ }));
339
+ var require_lib = /* @__PURE__ */ __commonJSMin(((exports, module) => {
340
+ var parse = require_parse();
341
+ var walk = require_walk();
342
+ var stringify = require_stringify();
343
+ function ValueParser(value) {
344
+ if (this instanceof ValueParser) {
345
+ this.nodes = parse(value);
346
+ return this;
347
+ }
348
+ return new ValueParser(value);
349
+ }
350
+ ValueParser.prototype.toString = function() {
351
+ return Array.isArray(this.nodes) ? stringify(this.nodes) : "";
352
+ };
353
+ ValueParser.prototype.walk = function(cb, bubble) {
354
+ walk(this.nodes, cb, bubble);
355
+ return this;
356
+ };
357
+ ValueParser.unit = require_unit();
358
+ ValueParser.walk = walk;
359
+ ValueParser.stringify = stringify;
360
+ module.exports = ValueParser;
361
+ }));
362
+ //#endregion
363
+ export { require_lib as t };
364
+
365
+ //# sourceMappingURL=lib.mjs.map