@likec4/core 1.46.4 → 1.48.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 (181) hide show
  1. package/LICENSE +1 -1
  2. package/dist/_chunks/Builder.view-element.mjs +3284 -0
  3. package/dist/_chunks/LikeC4Model.d.mts +1287 -0
  4. package/dist/_chunks/LikeC4Styles.mjs +691 -0
  5. package/dist/_chunks/RichText.d.mts +84 -0
  6. package/dist/_chunks/RichText.mjs +148 -0
  7. package/dist/_chunks/_aux.d.mts +289 -0
  8. package/dist/_chunks/_aux.mjs +18 -0
  9. package/dist/_chunks/_types.d.mts +781 -0
  10. package/dist/_chunks/_types2.d.mts +38 -0
  11. package/dist/_chunks/assignTagColors.mjs +24 -0
  12. package/dist/_chunks/calcDriftsFromSnapshot.mjs +379 -0
  13. package/dist/_chunks/connection.mjs +0 -0
  14. package/dist/_chunks/const.d.mts +43 -0
  15. package/dist/_chunks/const.mjs +33 -0
  16. package/dist/_chunks/expression-model.d.mts +192 -0
  17. package/dist/_chunks/expression-model.mjs +103 -0
  18. package/dist/_chunks/expression.d.mts +347 -0
  19. package/dist/_chunks/expression.mjs +107 -0
  20. package/dist/_chunks/find.d.mts +82 -0
  21. package/dist/_chunks/find.mjs +646 -0
  22. package/dist/_chunks/find2.d.mts +78 -0
  23. package/dist/_chunks/find2.mjs +287 -0
  24. package/dist/_chunks/fqnRef.d.mts +58 -0
  25. package/dist/_chunks/fqnRef.mjs +41 -0
  26. package/dist/_chunks/geometry.mjs +335 -0
  27. package/dist/_chunks/index.d.mts +169 -0
  28. package/dist/_chunks/index2.d.mts +937 -0
  29. package/dist/_chunks/index3.d.mts +146 -0
  30. package/dist/_chunks/index4.d.mts +62 -0
  31. package/dist/_chunks/index5.d.mts +42 -0
  32. package/dist/_chunks/index6.d.mts +43 -0
  33. package/dist/{shared/core.OtRNdMxy.d.mts → _chunks/index7.d.mts} +113 -197
  34. package/dist/_chunks/index8.d.mts +144 -0
  35. package/dist/_chunks/invariant.mjs +18 -0
  36. package/dist/_chunks/iterable.mjs +146 -0
  37. package/dist/_chunks/libs/@mantine/colors-generator.mjs +3416 -0
  38. package/dist/_chunks/libs/@ungap/structured-clone.mjs +213 -0
  39. package/dist/_chunks/libs/bail.mjs +14 -0
  40. package/dist/_chunks/libs/ccount.mjs +25 -0
  41. package/dist/_chunks/libs/character-entities-html4.mjs +263 -0
  42. package/dist/_chunks/libs/character-entities-legacy.mjs +117 -0
  43. package/dist/_chunks/libs/character-entities.mjs +2136 -0
  44. package/dist/_chunks/libs/comma-separated-tokens.mjs +18 -0
  45. package/dist/_chunks/libs/decode-named-character-reference.mjs +21 -0
  46. package/dist/_chunks/libs/defu.mjs +42 -0
  47. package/dist/_chunks/libs/devlop.mjs +5 -0
  48. package/dist/_chunks/libs/escape-string-regexp.mjs +8 -0
  49. package/dist/_chunks/libs/extend.mjs +77 -0
  50. package/dist/_chunks/libs/graphology-dag.mjs +703 -0
  51. package/dist/_chunks/libs/graphology-types.d.mts +601 -0
  52. package/dist/_chunks/libs/graphology.d.mts +6 -0
  53. package/dist/_chunks/libs/graphology.mjs +4565 -0
  54. package/dist/_chunks/libs/hast-util-sanitize.mjs +863 -0
  55. package/dist/_chunks/libs/hast-util-to-html.mjs +2696 -0
  56. package/dist/_chunks/libs/is-plain-obj.mjs +9 -0
  57. package/dist/_chunks/libs/longest-streak.mjs +30 -0
  58. package/dist/_chunks/libs/markdown-table.mjs +290 -0
  59. package/dist/_chunks/libs/mdast-util-find-and-replace.mjs +653 -0
  60. package/dist/_chunks/libs/mdast-util-from-markdown.mjs +8522 -0
  61. package/dist/_chunks/libs/mdast-util-gfm.mjs +2393 -0
  62. package/dist/_chunks/libs/mdast-util-to-hast.mjs +1803 -0
  63. package/dist/_chunks/libs/micromark-extension-gfm.mjs +2243 -0
  64. package/dist/_chunks/libs/mnemonist.d.mts +254 -0
  65. package/dist/_chunks/libs/mnemonist.mjs +1978 -0
  66. package/dist/_chunks/libs/natural-compare-lite.mjs +42 -0
  67. package/dist/_chunks/libs/rehype-sanitize.mjs +29 -0
  68. package/dist/_chunks/libs/rehype-stringify.mjs +34 -0
  69. package/dist/_chunks/libs/remark-gfm.mjs +36 -0
  70. package/dist/_chunks/libs/remark-github-blockquote-alert.mjs +100 -0
  71. package/dist/_chunks/libs/remark-parse.mjs +39 -0
  72. package/dist/_chunks/libs/remark-rehype.mjs +171 -0
  73. package/dist/_chunks/libs/remeda.mjs +702 -0
  74. package/dist/_chunks/libs/trough.mjs +158 -0
  75. package/dist/_chunks/libs/unified.mjs +2212 -0
  76. package/dist/_chunks/mnemonist.d.mts +1 -0
  77. package/dist/_chunks/mnemonist.mjs +0 -0
  78. package/dist/_chunks/model.mjs +1898 -0
  79. package/dist/_chunks/model2.mjs +0 -0
  80. package/dist/_chunks/relationships-view.mjs +132 -0
  81. package/dist/_chunks/rolldown-runtime.mjs +42 -0
  82. package/dist/{shared/core.C_3y3eqV.d.mts → _chunks/scalar.d.mts} +13 -43
  83. package/dist/_chunks/scalar.mjs +84 -0
  84. package/dist/_chunks/utils.mjs +483 -0
  85. package/dist/builder/index.d.mts +11 -773
  86. package/dist/builder/index.mjs +631 -978
  87. package/dist/compute-view/index.d.mts +90 -27
  88. package/dist/compute-view/index.mjs +253 -83
  89. package/dist/compute-view/relationships-view/index.d.mts +16 -51
  90. package/dist/compute-view/relationships-view/index.mjs +6 -184
  91. package/dist/geometry/index.d.mts +2 -109
  92. package/dist/geometry/index.mjs +2 -327
  93. package/dist/index.d.mts +18 -20
  94. package/dist/index.mjs +27 -18
  95. package/dist/model/connection/deployment/index.d.mts +12 -15
  96. package/dist/model/connection/deployment/index.mjs +9 -2
  97. package/dist/model/connection/index.d.mts +14 -75
  98. package/dist/model/connection/index.mjs +10 -3
  99. package/dist/model/connection/model/index.d.mts +12 -15
  100. package/dist/model/connection/model/index.mjs +8 -2
  101. package/dist/model/index.d.mts +15 -57
  102. package/dist/model/index.mjs +11 -4
  103. package/dist/styles/index.d.mts +9 -117
  104. package/dist/styles/index.mjs +26 -59
  105. package/dist/types/RichText.d.mts +3 -0
  106. package/dist/types/RichText.mjs +7 -0
  107. package/dist/types/_aux.d.mts +3 -4
  108. package/dist/types/_aux.mjs +2 -7
  109. package/dist/types/expression-model.d.mts +6 -190
  110. package/dist/types/expression-model.mjs +6 -108
  111. package/dist/types/expression.d.mts +5 -6
  112. package/dist/types/expression.mjs +6 -112
  113. package/dist/types/fqnRef.d.mts +4 -60
  114. package/dist/types/fqnRef.mjs +6 -44
  115. package/dist/types/index.d.mts +9 -47
  116. package/dist/types/index.mjs +14 -16
  117. package/dist/types/scalar.d.mts +2 -2
  118. package/dist/types/scalar.mjs +7 -4
  119. package/dist/utils/graphology/index.d.mts +2 -1864
  120. package/dist/utils/graphology/index.mjs +3 -1
  121. package/dist/utils/index.d.mts +11 -124
  122. package/dist/utils/index.mjs +16 -43
  123. package/dist/utils/iterable/index.d.mts +9 -132
  124. package/dist/utils/iterable/index.mjs +2 -61
  125. package/dist/utils/mnemonist.d.mts +2 -0
  126. package/dist/utils/mnemonist.mjs +12 -0
  127. package/package.json +18 -22
  128. package/compute-view/relationships/package.json +0 -4
  129. package/dist/shared/core.3ZhnKAlZ.mjs +0 -106
  130. package/dist/shared/core.78IWAHAE.mjs +0 -332
  131. package/dist/shared/core.B85MJLTf.mjs +0 -5
  132. package/dist/shared/core.BFd1lU9R.mjs +0 -29
  133. package/dist/shared/core.BKlholso.mjs +0 -3
  134. package/dist/shared/core.BPGOjone.d.mts +0 -46
  135. package/dist/shared/core.BYdtmqY5.mjs +0 -1255
  136. package/dist/shared/core.BZCgljZd.d.mts +0 -83
  137. package/dist/shared/core.BbE4y-yl.mjs +0 -177
  138. package/dist/shared/core.BhNcrwzK.mjs +0 -7
  139. package/dist/shared/core.BkVA6gjl.mjs +0 -5
  140. package/dist/shared/core.BoYfZOBm.mjs +0 -3
  141. package/dist/shared/core.BsSXS-_R.mjs +0 -7
  142. package/dist/shared/core.BspBF3SJ.mjs +0 -3944
  143. package/dist/shared/core.BvPm_-u3.d.mts +0 -334
  144. package/dist/shared/core.C-Jdx7xo.d.mts +0 -1263
  145. package/dist/shared/core.C3JowhaZ.mjs +0 -32
  146. package/dist/shared/core.C4x8aaWa.mjs +0 -27
  147. package/dist/shared/core.CBLX4mT8.mjs +0 -28411
  148. package/dist/shared/core.CLSZtnFh.mjs +0 -69
  149. package/dist/shared/core.CRhT4Iio.mjs +0 -785
  150. package/dist/shared/core.CbT8JVYL.mjs +0 -5
  151. package/dist/shared/core.CdNCAwq7.mjs +0 -176
  152. package/dist/shared/core.ClTP6-TN.d.mts +0 -87
  153. package/dist/shared/core.CmGY9blO.mjs +0 -6717
  154. package/dist/shared/core.CmPXpJ8l.mjs +0 -21
  155. package/dist/shared/core.Coi_LOUZ.mjs +0 -7
  156. package/dist/shared/core.CqAJJpK_.mjs +0 -3
  157. package/dist/shared/core.Ctj2S3bD.d.mts +0 -466
  158. package/dist/shared/core.CywrQs86.d.mts +0 -31
  159. package/dist/shared/core.D00YbOhQ.d.mts +0 -300
  160. package/dist/shared/core.D0WZutNd.mjs +0 -94
  161. package/dist/shared/core.D4npX2q8.mjs +0 -18
  162. package/dist/shared/core.DB0Ue5Wx.d.mts +0 -70
  163. package/dist/shared/core.DEK-BO3_.mjs +0 -1206
  164. package/dist/shared/core.DH7TXqXf.mjs +0 -136
  165. package/dist/shared/core.DRJma0Ol.mjs +0 -22
  166. package/dist/shared/core.DSalPD6v.mjs +0 -1352
  167. package/dist/shared/core.DVfPJPJj.mjs +0 -2200
  168. package/dist/shared/core.DXhDWKFZ.d.mts +0 -3
  169. package/dist/shared/core.DbfO90vF.mjs +0 -434
  170. package/dist/shared/core.DcS-0zys.mjs +0 -10
  171. package/dist/shared/core.DeDCYTDR.d.mts +0 -98
  172. package/dist/shared/core.DpKY_3NF.d.mts +0 -504
  173. package/dist/shared/core.Dt0v3djy.d.mts +0 -41
  174. package/dist/shared/core.FZ305VYd.mjs +0 -21
  175. package/dist/shared/core.RfnaEmgA.mjs +0 -7
  176. package/dist/shared/core.oSV6SRfk.mjs +0 -13
  177. package/dist/shared/core.om36dXXW.mjs +0 -41
  178. package/dist/shared/core.q10OP9oJ.mjs +0 -5
  179. package/dist/shared/core.uFk_o9X6.mjs +0 -13
  180. package/dist/shared/core.xeuDd__E.mjs +0 -300
  181. package/dist/shared/core.xgoPk2RG.mjs +0 -4989
@@ -0,0 +1,42 @@
1
+ import { t as __commonJSMin } from "../rolldown-runtime.mjs";
2
+
3
+ //#region ../../node_modules/.pnpm/natural-compare-lite@1.4.0/node_modules/natural-compare-lite/index.js
4
+ var require_natural_compare_lite = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5
+ /*
6
+ * @version 1.4.0
7
+ * @date 2015-10-26
8
+ * @stability 3 - Stable
9
+ * @author Lauri Rooden (https://github.com/litejs/natural-compare-lite)
10
+ * @license MIT License
11
+ */
12
+ var naturalCompare = function(a, b) {
13
+ var i, codeA, codeB = 1, posA = 0, posB = 0, alphabet = String.alphabet;
14
+ function getCode(str, pos, code) {
15
+ if (code) {
16
+ for (i = pos; code = getCode(str, i), code < 76 && code > 65;) ++i;
17
+ return +str.slice(pos - 1, i);
18
+ }
19
+ code = alphabet && alphabet.indexOf(str.charAt(pos));
20
+ return code > -1 ? code + 76 : (code = str.charCodeAt(pos) || 0, code < 45 || code > 127) ? code : code < 46 ? 65 : code < 48 ? code - 1 : code < 58 ? code + 18 : code < 65 ? code - 11 : code < 91 ? code + 11 : code < 97 ? code - 37 : code < 123 ? code + 5 : code - 63;
21
+ }
22
+ if ((a += "") != (b += "")) for (; codeB;) {
23
+ codeA = getCode(a, posA++);
24
+ codeB = getCode(b, posB++);
25
+ if (codeA < 76 && codeB < 76 && codeA > 66 && codeB > 66) {
26
+ codeA = getCode(a, posA, posA);
27
+ codeB = getCode(b, posB, posA = i);
28
+ posB = i;
29
+ }
30
+ if (codeA != codeB) return codeA < codeB ? -1 : 1;
31
+ }
32
+ return 0;
33
+ };
34
+ try {
35
+ module.exports = naturalCompare;
36
+ } catch (e) {
37
+ String.naturalCompare = naturalCompare;
38
+ }
39
+ }));
40
+
41
+ //#endregion
42
+ export { require_natural_compare_lite as t };
@@ -0,0 +1,29 @@
1
+ import { t as sanitize } from "./hast-util-sanitize.mjs";
2
+
3
+ //#region ../../node_modules/.pnpm/rehype-sanitize@6.0.0/node_modules/rehype-sanitize/lib/index.js
4
+ /**
5
+ * @typedef {import('hast').Root} Root
6
+ * @typedef {import('hast-util-sanitize').Schema} Schema
7
+ */
8
+ /**
9
+ * Sanitize HTML.
10
+ *
11
+ * @param {Schema | null | undefined} [options]
12
+ * Configuration (optional).
13
+ * @returns
14
+ * Transform.
15
+ */
16
+ function rehypeSanitize(options) {
17
+ /**
18
+ * @param {Root} tree
19
+ * Tree.
20
+ * @returns {Root}
21
+ * New tree.
22
+ */
23
+ return function(tree) {
24
+ return sanitize(tree, options);
25
+ };
26
+ }
27
+
28
+ //#endregion
29
+ export { rehypeSanitize as t };
@@ -0,0 +1,34 @@
1
+ import { t as toHtml } from "./hast-util-to-html.mjs";
2
+
3
+ //#region ../../node_modules/.pnpm/rehype-stringify@10.0.1/node_modules/rehype-stringify/lib/index.js
4
+ /**
5
+ * @import {Root} from 'hast'
6
+ * @import {Options} from 'hast-util-to-html'
7
+ * @import {Compiler, Processor} from 'unified'
8
+ */
9
+ /**
10
+ * Plugin to add support for serializing as HTML.
11
+ *
12
+ * @param {Options | null | undefined} [options]
13
+ * Configuration (optional).
14
+ * @returns {undefined}
15
+ * Nothing.
16
+ */
17
+ function rehypeStringify(options) {
18
+ /** @type {Processor<undefined, undefined, undefined, Root, string>} */
19
+ const self = this;
20
+ const settings = {
21
+ ...self.data("settings"),
22
+ ...options
23
+ };
24
+ self.compiler = compiler;
25
+ /**
26
+ * @type {Compiler<Root, string>}
27
+ */
28
+ function compiler(tree) {
29
+ return toHtml(tree, settings);
30
+ }
31
+ }
32
+
33
+ //#endregion
34
+ export { rehypeStringify as t };
@@ -0,0 +1,36 @@
1
+ import { n as gfmToMarkdown, t as gfmFromMarkdown } from "./mdast-util-gfm.mjs";
2
+ import { t as gfm } from "./micromark-extension-gfm.mjs";
3
+
4
+ //#region ../../node_modules/.pnpm/remark-gfm@4.0.1/node_modules/remark-gfm/lib/index.js
5
+ /**
6
+ * @import {Root} from 'mdast'
7
+ * @import {Options} from 'remark-gfm'
8
+ * @import {} from 'remark-parse'
9
+ * @import {} from 'remark-stringify'
10
+ * @import {Processor} from 'unified'
11
+ */
12
+ /** @type {Options} */
13
+ const emptyOptions = {};
14
+ /**
15
+ * Add support GFM (autolink literals, footnotes, strikethrough, tables,
16
+ * tasklists).
17
+ *
18
+ * @param {Options | null | undefined} [options]
19
+ * Configuration (optional).
20
+ * @returns {undefined}
21
+ * Nothing.
22
+ */
23
+ function remarkGfm(options) {
24
+ const self = this;
25
+ const settings = options || emptyOptions;
26
+ const data = self.data();
27
+ const micromarkExtensions = data.micromarkExtensions || (data.micromarkExtensions = []);
28
+ const fromMarkdownExtensions = data.fromMarkdownExtensions || (data.fromMarkdownExtensions = []);
29
+ const toMarkdownExtensions = data.toMarkdownExtensions || (data.toMarkdownExtensions = []);
30
+ micromarkExtensions.push(gfm(settings));
31
+ fromMarkdownExtensions.push(gfmFromMarkdown());
32
+ toMarkdownExtensions.push(gfmToMarkdown(settings));
33
+ }
34
+
35
+ //#endregion
36
+ export { remarkGfm as t };
@@ -0,0 +1,100 @@
1
+ import { r as visit } from "./mdast-util-gfm.mjs";
2
+
3
+ //#region ../../node_modules/.pnpm/remark-github-blockquote-alert@2.0.1/node_modules/remark-github-blockquote-alert/lib/index.js
4
+ const alertRegex = /^\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\]/i;
5
+ const alertLegacyRegex = /^\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)(\/.*)?\]/i;
6
+ /**
7
+ * Alerts are a Markdown extension based on the blockquote syntax that you can use to emphasize critical information.
8
+ * On GitHub, they are displayed with distinctive colors and icons to indicate the significance of the content.
9
+ * https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#alerts
10
+ */
11
+ const remarkAlert = ({ legacyTitle = false, tagName = "div" } = {}) => {
12
+ return (tree) => {
13
+ visit(tree, "blockquote", (node, index, parent) => {
14
+ let alertType = "";
15
+ let title = "";
16
+ let isNext = true;
17
+ let child = node.children.map((item) => {
18
+ if (isNext && item.type === "paragraph") {
19
+ const firstNode = item.children[0];
20
+ const text = firstNode.type === "text" ? firstNode.value : "";
21
+ const reg = legacyTitle ? alertLegacyRegex : alertRegex;
22
+ const match = text.match(reg);
23
+ if (match) {
24
+ isNext = false;
25
+ alertType = match[1].toLocaleLowerCase();
26
+ title = legacyTitle ? match[2] || alertType.toLocaleUpperCase() : alertType.toLocaleUpperCase();
27
+ if (text.includes("\n")) item.children[0] = {
28
+ type: "text",
29
+ value: text.replace(reg, "").replace(/^\n+/, "")
30
+ };
31
+ if (!text.includes("\n")) {
32
+ const itemChild = [];
33
+ item.children.forEach((item, idx) => {
34
+ if (idx == 0) return;
35
+ if (idx == 1 && item.type === "break") return;
36
+ itemChild.push(item);
37
+ });
38
+ item.children = [...itemChild];
39
+ }
40
+ }
41
+ }
42
+ return item;
43
+ });
44
+ if (!!alertType) {
45
+ node.data = {
46
+ hName: tagName,
47
+ hProperties: {
48
+ className: ["markdown-alert", `markdown-alert-${alertType}`],
49
+ dir: "auto"
50
+ }
51
+ };
52
+ child.unshift({
53
+ type: "paragraph",
54
+ children: [getAlertIcon(alertType), {
55
+ type: "text",
56
+ value: title.replace(/^\//, "")
57
+ }],
58
+ data: { hProperties: {
59
+ className: "markdown-alert-title",
60
+ dir: "auto"
61
+ } }
62
+ });
63
+ }
64
+ node.children = [...child];
65
+ });
66
+ };
67
+ };
68
+ function getAlertIcon(type) {
69
+ return {
70
+ type: "emphasis",
71
+ data: {
72
+ hName: "svg",
73
+ hProperties: {
74
+ className: ["octicon"],
75
+ viewBox: "0 0 16 16",
76
+ width: "16",
77
+ height: "16",
78
+ ariaHidden: "true"
79
+ }
80
+ },
81
+ children: [{
82
+ type: "emphasis",
83
+ data: {
84
+ hName: "path",
85
+ hProperties: { d: pathData[type] ?? "" }
86
+ },
87
+ children: []
88
+ }]
89
+ };
90
+ }
91
+ const pathData = {
92
+ note: "M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13ZM6.5 7.75A.75.75 0 0 1 7.25 7h1a.75.75 0 0 1 .75.75v2.75h.25a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1 0-1.5h.25v-2h-.25a.75.75 0 0 1-.75-.75ZM8 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z",
93
+ tip: "M8 1.5c-2.363 0-4 1.69-4 3.75 0 .984.424 1.625.984 2.304l.214.253c.223.264.47.556.673.848.284.411.537.896.621 1.49a.75.75 0 0 1-1.484.211c-.04-.282-.163-.547-.37-.847a8.456 8.456 0 0 0-.542-.68c-.084-.1-.173-.205-.268-.32C3.201 7.75 2.5 6.766 2.5 5.25 2.5 2.31 4.863 0 8 0s5.5 2.31 5.5 5.25c0 1.516-.701 2.5-1.328 3.259-.095.115-.184.22-.268.319-.207.245-.383.453-.541.681-.208.3-.33.565-.37.847a.751.751 0 0 1-1.485-.212c.084-.593.337-1.078.621-1.489.203-.292.45-.584.673-.848.075-.088.147-.173.213-.253.561-.679.985-1.32.985-2.304 0-2.06-1.637-3.75-4-3.75ZM5.75 12h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1 0-1.5ZM6 15.25a.75.75 0 0 1 .75-.75h2.5a.75.75 0 0 1 0 1.5h-2.5a.75.75 0 0 1-.75-.75Z",
94
+ important: "M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v9.5A1.75 1.75 0 0 1 14.25 13H8.06l-2.573 2.573A1.458 1.458 0 0 1 3 14.543V13H1.75A1.75 1.75 0 0 1 0 11.25Zm1.75-.25a.25.25 0 0 0-.25.25v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25Zm7 2.25v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 9a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z",
95
+ warning: "M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z",
96
+ caution: "M4.47.22A.749.749 0 0 1 5 0h6c.199 0 .389.079.53.22l4.25 4.25c.141.14.22.331.22.53v6a.749.749 0 0 1-.22.53l-4.25 4.25A.749.749 0 0 1 11 16H5a.749.749 0 0 1-.53-.22L.22 11.53A.749.749 0 0 1 0 11V5c0-.199.079-.389.22-.53Zm.84 1.28L1.5 5.31v5.38l3.81 3.81h5.38l3.81-3.81V5.31L10.69 1.5ZM8 4a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 4Zm0 8a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"
97
+ };
98
+
99
+ //#endregion
100
+ export { remarkAlert as t };
@@ -0,0 +1,39 @@
1
+ import { t as fromMarkdown } from "./mdast-util-from-markdown.mjs";
2
+
3
+ //#region ../../node_modules/.pnpm/remark-parse@11.0.0/node_modules/remark-parse/lib/index.js
4
+ /**
5
+ * @typedef {import('mdast').Root} Root
6
+ * @typedef {import('mdast-util-from-markdown').Options} FromMarkdownOptions
7
+ * @typedef {import('unified').Parser<Root>} Parser
8
+ * @typedef {import('unified').Processor<Root>} Processor
9
+ */
10
+ /**
11
+ * @typedef {Omit<FromMarkdownOptions, 'extensions' | 'mdastExtensions'>} Options
12
+ */
13
+ /**
14
+ * Aadd support for parsing from markdown.
15
+ *
16
+ * @param {Readonly<Options> | null | undefined} [options]
17
+ * Configuration (optional).
18
+ * @returns {undefined}
19
+ * Nothing.
20
+ */
21
+ function remarkParse(options) {
22
+ /** @type {Processor} */
23
+ const self = this;
24
+ self.parser = parser;
25
+ /**
26
+ * @type {Parser}
27
+ */
28
+ function parser(doc) {
29
+ return fromMarkdown(doc, {
30
+ ...self.data("settings"),
31
+ ...options,
32
+ extensions: self.data("micromarkExtensions") || [],
33
+ mdastExtensions: self.data("fromMarkdownExtensions") || []
34
+ });
35
+ }
36
+ }
37
+
38
+ //#endregion
39
+ export { remarkParse as t };
@@ -0,0 +1,171 @@
1
+ import { t as toHast } from "./mdast-util-to-hast.mjs";
2
+
3
+ //#region ../../node_modules/.pnpm/remark-rehype@11.1.2/node_modules/remark-rehype/lib/index.js
4
+ /**
5
+ * @import {Root as HastRoot} from 'hast'
6
+ * @import {Root as MdastRoot} from 'mdast'
7
+ * @import {Options as ToHastOptions} from 'mdast-util-to-hast'
8
+ * @import {Processor} from 'unified'
9
+ * @import {VFile} from 'vfile'
10
+ */
11
+ /**
12
+ * @typedef {Omit<ToHastOptions, 'file'>} Options
13
+ *
14
+ * @callback TransformBridge
15
+ * Bridge-mode.
16
+ *
17
+ * Runs the destination with the new hast tree.
18
+ * Discards result.
19
+ * @param {MdastRoot} tree
20
+ * Tree.
21
+ * @param {VFile} file
22
+ * File.
23
+ * @returns {Promise<undefined>}
24
+ * Nothing.
25
+ *
26
+ * @callback TransformMutate
27
+ * Mutate-mode.
28
+ *
29
+ * Further transformers run on the hast tree.
30
+ * @param {MdastRoot} tree
31
+ * Tree.
32
+ * @param {VFile} file
33
+ * File.
34
+ * @returns {HastRoot}
35
+ * Tree (hast).
36
+ */
37
+ /**
38
+ * Turn markdown into HTML.
39
+ *
40
+ * ##### Notes
41
+ *
42
+ * ###### Signature
43
+ *
44
+ * * if a processor is given,
45
+ * runs the (rehype) plugins used on it with a hast tree,
46
+ * then discards the result (*bridge mode*)
47
+ * * otherwise,
48
+ * returns a hast tree,
49
+ * the plugins used after `remarkRehype` are rehype plugins (*mutate mode*)
50
+ *
51
+ * > 👉 **Note**:
52
+ * > It’s highly unlikely that you want to pass a `processor`.
53
+ *
54
+ * ###### HTML
55
+ *
56
+ * Raw HTML is available in mdast as `html` nodes and can be embedded in hast
57
+ * as semistandard `raw` nodes.
58
+ * Most plugins ignore `raw` nodes but two notable ones don’t:
59
+ *
60
+ * * `rehype-stringify` also has an option `allowDangerousHtml` which will
61
+ * output the raw HTML.
62
+ * This is typically discouraged as noted by the option name but is useful if
63
+ * you completely trust authors
64
+ * * `rehype-raw` can handle the raw embedded HTML strings by parsing them
65
+ * into standard hast nodes (`element`, `text`, etc);
66
+ * this is a heavy task as it needs a full HTML parser,
67
+ * but it is the only way to support untrusted content
68
+ *
69
+ * ###### Footnotes
70
+ *
71
+ * Many options supported here relate to footnotes.
72
+ * Footnotes are not specified by CommonMark,
73
+ * which we follow by default.
74
+ * They are supported by GitHub,
75
+ * so footnotes can be enabled in markdown with `remark-gfm`.
76
+ *
77
+ * The options `footnoteBackLabel` and `footnoteLabel` define natural language
78
+ * that explains footnotes,
79
+ * which is hidden for sighted users but shown to assistive technology.
80
+ * When your page is not in English,
81
+ * you must define translated values.
82
+ *
83
+ * Back references use ARIA attributes,
84
+ * but the section label itself uses a heading that is hidden with an
85
+ * `sr-only` class.
86
+ * To show it to sighted users,
87
+ * define different attributes in `footnoteLabelProperties`.
88
+ *
89
+ * ###### Clobbering
90
+ *
91
+ * Footnotes introduces a problem,
92
+ * as it links footnote calls to footnote definitions on the page through `id`
93
+ * attributes generated from user content,
94
+ * which results in DOM clobbering.
95
+ *
96
+ * DOM clobbering is this:
97
+ *
98
+ * ```html
99
+ * <p id=x></p>
100
+ * <script>alert(x) // `x` now refers to the DOM `p#x` element<\/script>
101
+ * ```
102
+ *
103
+ * Elements by their ID are made available by browsers on the `window` object,
104
+ * which is a security risk.
105
+ * Using a prefix solves this problem.
106
+ *
107
+ * More information on how to handle clobbering and the prefix is explained in
108
+ * *Example: headings (DOM clobbering)* in `rehype-sanitize`.
109
+ *
110
+ * ###### Unknown nodes
111
+ *
112
+ * Unknown nodes are nodes with a type that isn’t in `handlers` or `passThrough`.
113
+ * The default behavior for unknown nodes is:
114
+ *
115
+ * * when the node has a `value`
116
+ * (and doesn’t have `data.hName`, `data.hProperties`, or `data.hChildren`,
117
+ * see later),
118
+ * create a hast `text` node
119
+ * * otherwise,
120
+ * create a `<div>` element (which could be changed with `data.hName`),
121
+ * with its children mapped from mdast to hast as well
122
+ *
123
+ * This behavior can be changed by passing an `unknownHandler`.
124
+ *
125
+ * @overload
126
+ * @param {Processor} processor
127
+ * @param {Readonly<Options> | null | undefined} [options]
128
+ * @returns {TransformBridge}
129
+ *
130
+ * @overload
131
+ * @param {Readonly<Options> | null | undefined} [options]
132
+ * @returns {TransformMutate}
133
+ *
134
+ * @overload
135
+ * @param {Readonly<Options> | Processor | null | undefined} [destination]
136
+ * @param {Readonly<Options> | null | undefined} [options]
137
+ * @returns {TransformBridge | TransformMutate}
138
+ *
139
+ * @param {Readonly<Options> | Processor | null | undefined} [destination]
140
+ * Processor or configuration (optional).
141
+ * @param {Readonly<Options> | null | undefined} [options]
142
+ * When a processor was given,
143
+ * configuration (optional).
144
+ * @returns {TransformBridge | TransformMutate}
145
+ * Transform.
146
+ */
147
+ function remarkRehype(destination, options) {
148
+ if (destination && "run" in destination)
149
+ /**
150
+ * @type {TransformBridge}
151
+ */
152
+ return async function(tree, file) {
153
+ const hastTree = toHast(tree, {
154
+ file,
155
+ ...options
156
+ });
157
+ await destination.run(hastTree, file);
158
+ };
159
+ /**
160
+ * @type {TransformMutate}
161
+ */
162
+ return function(tree, file) {
163
+ return toHast(tree, {
164
+ file,
165
+ ...destination || options
166
+ });
167
+ };
168
+ }
169
+
170
+ //#endregion
171
+ export { remarkRehype as t };