impact-nova 3.0.0-alpha.0 → 3.0.0-alpha.2

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 (212) hide show
  1. package/dist/_virtual/_commonjsHelpers.js +6 -0
  2. package/dist/_virtual/index.js +7 -0
  3. package/dist/_virtual/index2.js +7 -0
  4. package/dist/_virtual/index3.js +4 -0
  5. package/dist/_virtual/utilities.js +4 -0
  6. package/dist/components/data/ag-grid-react/ag-grid.types.d.ts +5 -0
  7. package/dist/components/data/ag-grid-react/cell-renderers/cell-renderer-utils.js +12 -10
  8. package/dist/components/data/ag-grid-react/cell-renderers/select-display-renderer.d.ts +8 -0
  9. package/dist/components/data/ag-grid-react/cell-renderers/select-display-renderer.js +56 -42
  10. package/dist/components/data/ag-grid-react/cell-renderers/types.d.ts +4 -0
  11. package/dist/components/data/ag-grid-react/index.d.ts +1 -1
  12. package/dist/components/data/ag-grid-react/index.js +115 -111
  13. package/dist/components/flows/iris-chat/iris-chat-markdown.js +17 -17
  14. package/dist/components/forms/select/components/SelectTriggerValue.js +6 -6
  15. package/dist/impact-nova-components.css +85 -0
  16. package/dist/impact-nova.css +1 -1
  17. package/dist/lib/overflow/is-text-overflowing.js +24 -6
  18. package/dist/llms/rules/installation.js +1 -1
  19. package/dist/llms/rules/requirements.js +1 -1
  20. package/dist/node_modules/@ungap/structured-clone/esm/deserialize.js +85 -0
  21. package/dist/node_modules/@ungap/structured-clone/esm/index.js +11 -0
  22. package/dist/node_modules/@ungap/structured-clone/esm/serialize.js +110 -0
  23. package/dist/node_modules/@ungap/structured-clone/esm/types.js +13 -0
  24. package/dist/node_modules/bail/index.js +7 -0
  25. package/dist/node_modules/ccount/index.js +12 -0
  26. package/dist/node_modules/comma-separated-tokens/index.js +9 -0
  27. package/dist/node_modules/decode-named-character-reference/index.dom.js +10 -0
  28. package/dist/node_modules/devlop/lib/default.js +8 -0
  29. package/dist/node_modules/estree-util-is-identifier-name/lib/index.js +7 -0
  30. package/dist/node_modules/extend/index.js +43 -0
  31. package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.js +302 -0
  32. package/dist/node_modules/hast-util-whitespace/lib/index.js +10 -0
  33. package/dist/node_modules/html-url-attributes/lib/index.js +26 -0
  34. package/dist/node_modules/inline-style-parser/cjs/index.js +93 -0
  35. package/dist/node_modules/is-plain-obj/index.js +9 -0
  36. package/dist/node_modules/longest-streak/index.js +12 -0
  37. package/dist/node_modules/markdown-table/index.js +75 -0
  38. package/dist/node_modules/mdast-util-find-and-replace/lib/index.js +78 -0
  39. package/dist/node_modules/mdast-util-find-and-replace/node_modules/escape-string-regexp/index.js +8 -0
  40. package/dist/node_modules/mdast-util-from-markdown/lib/index.js +632 -0
  41. package/dist/node_modules/mdast-util-gfm/lib/index.js +29 -0
  42. package/dist/node_modules/mdast-util-gfm-autolink-literal/lib/index.js +130 -0
  43. package/dist/node_modules/mdast-util-gfm-footnote/lib/index.js +95 -0
  44. package/dist/node_modules/mdast-util-gfm-strikethrough/lib/index.js +54 -0
  45. package/dist/node_modules/mdast-util-gfm-table/lib/index.js +135 -0
  46. package/dist/node_modules/mdast-util-gfm-task-list-item/lib/index.js +58 -0
  47. package/dist/node_modules/mdast-util-phrasing/lib/index.js +30 -0
  48. package/dist/node_modules/mdast-util-to-hast/lib/footer.js +90 -0
  49. package/dist/node_modules/mdast-util-to-hast/lib/handlers/blockquote.js +12 -0
  50. package/dist/node_modules/mdast-util-to-hast/lib/handlers/break.js +8 -0
  51. package/dist/node_modules/mdast-util-to-hast/lib/handlers/code.js +15 -0
  52. package/dist/node_modules/mdast-util-to-hast/lib/handlers/delete.js +12 -0
  53. package/dist/node_modules/mdast-util-to-hast/lib/handlers/emphasis.js +12 -0
  54. package/dist/node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.js +28 -0
  55. package/dist/node_modules/mdast-util-to-hast/lib/handlers/heading.js +12 -0
  56. package/dist/node_modules/mdast-util-to-hast/lib/handlers/html.js +9 -0
  57. package/dist/node_modules/mdast-util-to-hast/lib/handlers/image-reference.js +14 -0
  58. package/dist/node_modules/mdast-util-to-hast/lib/handlers/image.js +10 -0
  59. package/dist/node_modules/mdast-util-to-hast/lib/handlers/index.js +58 -0
  60. package/dist/node_modules/mdast-util-to-hast/lib/handlers/inline-code.js +14 -0
  61. package/dist/node_modules/mdast-util-to-hast/lib/handlers/link-reference.js +19 -0
  62. package/dist/node_modules/mdast-util-to-hast/lib/handlers/link.js +15 -0
  63. package/dist/node_modules/mdast-util-to-hast/lib/handlers/list-item.js +42 -0
  64. package/dist/node_modules/mdast-util-to-hast/lib/handlers/list.js +21 -0
  65. package/dist/node_modules/mdast-util-to-hast/lib/handlers/paragraph.js +12 -0
  66. package/dist/node_modules/mdast-util-to-hast/lib/handlers/root.js +7 -0
  67. package/dist/node_modules/mdast-util-to-hast/lib/handlers/strong.js +12 -0
  68. package/dist/node_modules/mdast-util-to-hast/lib/handlers/table-cell.js +13 -0
  69. package/dist/node_modules/mdast-util-to-hast/lib/handlers/table-row.js +21 -0
  70. package/dist/node_modules/mdast-util-to-hast/lib/handlers/table.js +32 -0
  71. package/dist/node_modules/mdast-util-to-hast/lib/handlers/text.js +8 -0
  72. package/dist/node_modules/mdast-util-to-hast/lib/handlers/thematic-break.js +12 -0
  73. package/dist/node_modules/mdast-util-to-hast/lib/index.js +10 -0
  74. package/dist/node_modules/mdast-util-to-hast/lib/revert.js +13 -0
  75. package/dist/node_modules/mdast-util-to-hast/lib/state.js +104 -0
  76. package/dist/node_modules/mdast-util-to-markdown/lib/handle/blockquote.js +15 -0
  77. package/dist/node_modules/mdast-util-to-markdown/lib/handle/break.js +15 -0
  78. package/dist/node_modules/mdast-util-to-markdown/lib/handle/code.js +44 -0
  79. package/dist/node_modules/mdast-util-to-markdown/lib/handle/definition.js +34 -0
  80. package/dist/node_modules/mdast-util-to-markdown/lib/handle/emphasis.js +20 -0
  81. package/dist/node_modules/mdast-util-to-markdown/lib/handle/heading.js +35 -0
  82. package/dist/node_modules/mdast-util-to-markdown/lib/handle/html.js +10 -0
  83. package/dist/node_modules/mdast-util-to-markdown/lib/handle/image-reference.js +29 -0
  84. package/dist/node_modules/mdast-util-to-markdown/lib/handle/image.js +33 -0
  85. package/dist/node_modules/mdast-util-to-markdown/lib/handle/index.js +44 -0
  86. package/dist/node_modules/mdast-util-to-markdown/lib/handle/inline-code.js +22 -0
  87. package/dist/node_modules/mdast-util-to-markdown/lib/handle/link-reference.js +29 -0
  88. package/dist/node_modules/mdast-util-to-markdown/lib/handle/link.js +52 -0
  89. package/dist/node_modules/mdast-util-to-markdown/lib/handle/list-item.js +22 -0
  90. package/dist/node_modules/mdast-util-to-markdown/lib/handle/list.js +35 -0
  91. package/dist/node_modules/mdast-util-to-markdown/lib/handle/paragraph.js +7 -0
  92. package/dist/node_modules/mdast-util-to-markdown/lib/handle/root.js +11 -0
  93. package/dist/node_modules/mdast-util-to-markdown/lib/handle/strong.js +20 -0
  94. package/dist/node_modules/mdast-util-to-markdown/lib/handle/text.js +11 -0
  95. package/dist/node_modules/mdast-util-to-markdown/lib/handle/thematic-break.js +9 -0
  96. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-bullet-ordered.js +11 -0
  97. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-bullet-other.js +18 -0
  98. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-bullet.js +11 -0
  99. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-emphasis.js +11 -0
  100. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-fence.js +11 -0
  101. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.js +11 -0
  102. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-quote.js +11 -0
  103. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-rule-repetition.js +11 -0
  104. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-rule.js +11 -0
  105. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-strong.js +11 -0
  106. package/dist/node_modules/mdast-util-to-markdown/lib/util/encode-character-reference.js +6 -0
  107. package/dist/node_modules/mdast-util-to-markdown/lib/util/format-code-as-indented.js +9 -0
  108. package/dist/node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.js +13 -0
  109. package/dist/node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.js +15 -0
  110. package/dist/node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.js +15 -0
  111. package/dist/node_modules/mdast-util-to-string/lib/index.js +29 -0
  112. package/dist/node_modules/micromark/lib/constructs.js +85 -0
  113. package/dist/node_modules/micromark/lib/create-tokenizer.js +225 -0
  114. package/dist/node_modules/micromark/lib/initialize/content.js +37 -0
  115. package/dist/node_modules/micromark/lib/initialize/document.js +128 -0
  116. package/dist/node_modules/micromark/lib/initialize/flow.js +33 -0
  117. package/dist/node_modules/micromark/lib/initialize/text.js +98 -0
  118. package/dist/node_modules/micromark/lib/parse.js +32 -0
  119. package/dist/node_modules/micromark/lib/postprocess.js +9 -0
  120. package/dist/node_modules/micromark/lib/preprocess.js +44 -0
  121. package/dist/node_modules/micromark-core-commonmark/lib/attention.js +87 -0
  122. package/dist/node_modules/micromark-core-commonmark/lib/autolink.js +43 -0
  123. package/dist/node_modules/micromark-core-commonmark/lib/blank-line.js +18 -0
  124. package/dist/node_modules/micromark-core-commonmark/lib/block-quote.js +42 -0
  125. package/dist/node_modules/micromark-core-commonmark/lib/character-escape.js +17 -0
  126. package/dist/node_modules/micromark-core-commonmark/lib/character-reference.js +30 -0
  127. package/dist/node_modules/micromark-core-commonmark/lib/code-fenced.js +82 -0
  128. package/dist/node_modules/micromark-core-commonmark/lib/code-indented.js +37 -0
  129. package/dist/node_modules/micromark-core-commonmark/lib/code-text.js +45 -0
  130. package/dist/node_modules/micromark-core-commonmark/lib/content.js +50 -0
  131. package/dist/node_modules/micromark-core-commonmark/lib/definition.js +80 -0
  132. package/dist/node_modules/micromark-core-commonmark/lib/hard-break-escape.js +17 -0
  133. package/dist/node_modules/micromark-core-commonmark/lib/heading-atx.js +50 -0
  134. package/dist/node_modules/micromark-core-commonmark/lib/html-flow.js +132 -0
  135. package/dist/node_modules/micromark-core-commonmark/lib/html-text.js +102 -0
  136. package/dist/node_modules/micromark-core-commonmark/lib/label-end.js +154 -0
  137. package/dist/node_modules/micromark-core-commonmark/lib/label-start-image.js +23 -0
  138. package/dist/node_modules/micromark-core-commonmark/lib/label-start-link.js +20 -0
  139. package/dist/node_modules/micromark-core-commonmark/lib/line-ending.js +14 -0
  140. package/dist/node_modules/micromark-core-commonmark/lib/list.js +90 -0
  141. package/dist/node_modules/micromark-core-commonmark/lib/partial-non-lazy-continuation.js +17 -0
  142. package/dist/node_modules/micromark-core-commonmark/lib/setext-underline.js +59 -0
  143. package/dist/node_modules/micromark-core-commonmark/lib/thematic-break.js +25 -0
  144. package/dist/node_modules/micromark-extension-gfm/index.js +18 -0
  145. package/dist/node_modules/micromark-extension-gfm-autolink-literal/lib/syntax.js +193 -0
  146. package/dist/node_modules/micromark-extension-gfm-footnote/lib/syntax.js +192 -0
  147. package/dist/node_modules/micromark-extension-gfm-strikethrough/lib/syntax.js +67 -0
  148. package/dist/node_modules/micromark-extension-gfm-table/lib/edit-map.js +75 -0
  149. package/dist/node_modules/micromark-extension-gfm-table/lib/infer.js +23 -0
  150. package/dist/node_modules/micromark-extension-gfm-table/lib/syntax.js +149 -0
  151. package/dist/node_modules/micromark-extension-gfm-task-list-item/lib/syntax.js +45 -0
  152. package/dist/node_modules/micromark-factory-destination/index.js +31 -0
  153. package/dist/node_modules/micromark-factory-label/index.js +28 -0
  154. package/dist/node_modules/micromark-factory-space/index.js +29 -0
  155. package/dist/node_modules/micromark-factory-title/index.js +26 -0
  156. package/dist/node_modules/micromark-factory-whitespace/index.js +12 -0
  157. package/dist/node_modules/micromark-util-character/index.js +39 -0
  158. package/dist/node_modules/micromark-util-chunked/index.js +16 -0
  159. package/dist/node_modules/micromark-util-classify-character/index.js +10 -0
  160. package/dist/node_modules/micromark-util-combine-extensions/index.js +36 -0
  161. package/dist/node_modules/micromark-util-decode-numeric-character-reference/index.js +16 -0
  162. package/dist/node_modules/micromark-util-decode-string/index.js +18 -0
  163. package/dist/node_modules/micromark-util-edit-map/index.js +82 -0
  164. package/dist/node_modules/micromark-util-html-tag-name/index.js +68 -0
  165. package/dist/node_modules/micromark-util-normalize-identifier/index.js +6 -0
  166. package/dist/node_modules/micromark-util-resolve-all/index.js +12 -0
  167. package/dist/node_modules/micromark-util-sanitize-uri/index.js +23 -0
  168. package/dist/node_modules/micromark-util-subtokenize/index.js +55 -0
  169. package/dist/node_modules/micromark-util-subtokenize/lib/splice-buffer.js +175 -0
  170. package/dist/node_modules/property-information/index.js +12 -0
  171. package/dist/node_modules/property-information/lib/aria.js +61 -0
  172. package/dist/node_modules/property-information/lib/find.js +33 -0
  173. package/dist/node_modules/property-information/lib/hast-to-react.js +22 -0
  174. package/dist/node_modules/property-information/lib/html.js +378 -0
  175. package/dist/node_modules/property-information/lib/normalize.js +6 -0
  176. package/dist/node_modules/property-information/lib/svg.js +568 -0
  177. package/dist/node_modules/property-information/lib/util/case-insensitive-transform.js +7 -0
  178. package/dist/node_modules/property-information/lib/util/case-sensitive-transform.js +6 -0
  179. package/dist/node_modules/property-information/lib/util/create.js +19 -0
  180. package/dist/node_modules/property-information/lib/util/defined-info.js +36 -0
  181. package/dist/node_modules/property-information/lib/util/info.js +28 -0
  182. package/dist/node_modules/property-information/lib/util/merge.js +10 -0
  183. package/dist/node_modules/property-information/lib/util/schema.js +21 -0
  184. package/dist/node_modules/property-information/lib/util/types.js +14 -0
  185. package/dist/node_modules/property-information/lib/xlink.js +19 -0
  186. package/dist/node_modules/property-information/lib/xml.js +11 -0
  187. package/dist/node_modules/property-information/lib/xmlns.js +11 -0
  188. package/dist/node_modules/react-markdown/lib/index.js +102 -0
  189. package/dist/node_modules/remark-gfm/lib/index.js +13 -0
  190. package/dist/node_modules/remark-parse/lib/index.js +19 -0
  191. package/dist/node_modules/remark-rehype/lib/index.js +18 -0
  192. package/dist/node_modules/space-separated-tokens/index.js +6 -0
  193. package/dist/node_modules/style-to-js/cjs/index.js +20 -0
  194. package/dist/node_modules/style-to-js/cjs/utilities.js +19 -0
  195. package/dist/node_modules/style-to-object/cjs/index.js +28 -0
  196. package/dist/node_modules/trim-lines/index.js +28 -0
  197. package/dist/node_modules/trough/lib/index.js +60 -0
  198. package/dist/node_modules/unified/lib/callable-instance.js +25 -0
  199. package/dist/node_modules/unified/lib/index.js +529 -0
  200. package/dist/node_modules/unist-util-is/lib/index.js +91 -0
  201. package/dist/node_modules/unist-util-position/lib/index.js +23 -0
  202. package/dist/node_modules/unist-util-stringify-position/lib/index.js +15 -0
  203. package/dist/node_modules/unist-util-visit/lib/index.js +16 -0
  204. package/dist/node_modules/unist-util-visit-parents/lib/color.js +6 -0
  205. package/dist/node_modules/unist-util-visit-parents/lib/index.js +56 -0
  206. package/dist/node_modules/vfile/lib/index.js +406 -0
  207. package/dist/node_modules/vfile/lib/minpath.browser.js +112 -0
  208. package/dist/node_modules/vfile/lib/minproc.browser.js +7 -0
  209. package/dist/node_modules/vfile/lib/minurl.browser.js +41 -0
  210. package/dist/node_modules/vfile/lib/minurl.shared.js +7 -0
  211. package/dist/node_modules/vfile-message/lib/index.js +91 -0
  212. package/package.json +1 -1
@@ -0,0 +1,130 @@
1
+ import { ccount as f } from "../../ccount/index.js";
2
+ import { ok as k } from "../../devlop/lib/default.js";
3
+ import { unicodeWhitespace as p, unicodePunctuation as d } from "../../micromark-util-character/index.js";
4
+ import { findAndReplace as g } from "../../mdast-util-find-and-replace/lib/index.js";
5
+ const a = "phrasing", u = ["autolink", "link", "image", "label"];
6
+ function b() {
7
+ return {
8
+ transforms: [y],
9
+ enter: {
10
+ literalAutolink: w,
11
+ literalAutolinkEmail: s,
12
+ literalAutolinkHttp: s,
13
+ literalAutolinkWww: s
14
+ },
15
+ exit: {
16
+ literalAutolink: L,
17
+ literalAutolinkEmail: m,
18
+ literalAutolinkHttp: x,
19
+ literalAutolinkWww: A
20
+ }
21
+ };
22
+ }
23
+ function I() {
24
+ return {
25
+ unsafe: [
26
+ {
27
+ character: "@",
28
+ before: "[+\\-.\\w]",
29
+ after: "[\\-.\\w]",
30
+ inConstruct: a,
31
+ notInConstruct: u
32
+ },
33
+ {
34
+ character: ".",
35
+ before: "[Ww]",
36
+ after: "[\\-.\\w]",
37
+ inConstruct: a,
38
+ notInConstruct: u
39
+ },
40
+ {
41
+ character: ":",
42
+ before: "[ps]",
43
+ after: "\\/",
44
+ inConstruct: a,
45
+ notInConstruct: u
46
+ }
47
+ ]
48
+ };
49
+ }
50
+ function w(t) {
51
+ this.enter({ type: "link", title: null, url: "", children: [] }, t);
52
+ }
53
+ function s(t) {
54
+ this.config.enter.autolinkProtocol.call(this, t);
55
+ }
56
+ function x(t) {
57
+ this.config.exit.autolinkProtocol.call(this, t);
58
+ }
59
+ function A(t) {
60
+ this.config.exit.data.call(this, t);
61
+ const e = this.stack[this.stack.length - 1];
62
+ k(e.type === "link"), e.url = "http://" + this.sliceSerialize(t);
63
+ }
64
+ function m(t) {
65
+ this.config.exit.autolinkEmail.call(this, t);
66
+ }
67
+ function L(t) {
68
+ this.exit(t);
69
+ }
70
+ function y(t) {
71
+ g(
72
+ t,
73
+ [
74
+ [/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi, P],
75
+ [new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)", "gu"), E]
76
+ ],
77
+ { ignore: ["link", "linkReference"] }
78
+ );
79
+ }
80
+ function P(t, e, i, n, o) {
81
+ let l = "";
82
+ if (!h(o) || (/^w/i.test(e) && (i = e + i, e = "", l = "http://"), !W(i)))
83
+ return !1;
84
+ const r = _(i + n);
85
+ if (!r[0]) return !1;
86
+ const c = {
87
+ type: "link",
88
+ title: null,
89
+ url: l + e + r[0],
90
+ children: [{ type: "text", value: e + r[0] }]
91
+ };
92
+ return r[1] ? [c, { type: "text", value: r[1] }] : c;
93
+ }
94
+ function E(t, e, i, n) {
95
+ return (
96
+ // Not an expected previous character.
97
+ !h(n, !0) || // Label ends in not allowed character.
98
+ /[-\d_]$/.test(i) ? !1 : {
99
+ type: "link",
100
+ title: null,
101
+ url: "mailto:" + e + "@" + i,
102
+ children: [{ type: "text", value: e + "@" + i }]
103
+ }
104
+ );
105
+ }
106
+ function W(t) {
107
+ const e = t.split(".");
108
+ return !(e.length < 2 || e[e.length - 1] && (/_/.test(e[e.length - 1]) || !/[a-zA-Z\d]/.test(e[e.length - 1])) || e[e.length - 2] && (/_/.test(e[e.length - 2]) || !/[a-zA-Z\d]/.test(e[e.length - 2])));
109
+ }
110
+ function _(t) {
111
+ const e = /[!"&'),.:;<>?\]}]+$/.exec(t);
112
+ if (!e)
113
+ return [t, void 0];
114
+ t = t.slice(0, e.index);
115
+ let i = e[0], n = i.indexOf(")");
116
+ const o = f(t, "(");
117
+ let l = f(t, ")");
118
+ for (; n !== -1 && o > l; )
119
+ t += i.slice(0, n + 1), i = i.slice(n + 1), n = i.indexOf(")"), l++;
120
+ return [t, i];
121
+ }
122
+ function h(t, e) {
123
+ const i = t.input.charCodeAt(t.index - 1);
124
+ return (t.index === 0 || p(i) || d(i)) && // If it’s an email, the previous character should not be a slash.
125
+ (!e || i !== 47);
126
+ }
127
+ export {
128
+ b as gfmAutolinkLiteralFromMarkdown,
129
+ I as gfmAutolinkLiteralToMarkdown
130
+ };
@@ -0,0 +1,95 @@
1
+ import { ok as a } from "../../devlop/lib/default.js";
2
+ import { normalizeIdentifier as s } from "../../micromark-util-normalize-identifier/index.js";
3
+ u.peek = S;
4
+ function F() {
5
+ this.buffer();
6
+ }
7
+ function b(e) {
8
+ this.enter({ type: "footnoteReference", identifier: "", label: "" }, e);
9
+ }
10
+ function k() {
11
+ this.buffer();
12
+ }
13
+ function d(e) {
14
+ this.enter(
15
+ { type: "footnoteDefinition", identifier: "", label: "", children: [] },
16
+ e
17
+ );
18
+ }
19
+ function x(e) {
20
+ const n = this.resume(), t = this.stack[this.stack.length - 1];
21
+ a(t.type === "footnoteReference"), t.identifier = s(
22
+ this.sliceSerialize(e)
23
+ ).toLowerCase(), t.label = n;
24
+ }
25
+ function D(e) {
26
+ this.exit(e);
27
+ }
28
+ function p(e) {
29
+ const n = this.resume(), t = this.stack[this.stack.length - 1];
30
+ a(t.type === "footnoteDefinition"), t.identifier = s(
31
+ this.sliceSerialize(e)
32
+ ).toLowerCase(), t.label = n;
33
+ }
34
+ function C(e) {
35
+ this.exit(e);
36
+ }
37
+ function S() {
38
+ return "[";
39
+ }
40
+ function u(e, n, t, r) {
41
+ const l = t.createTracker(r);
42
+ let o = l.move("[^");
43
+ const c = t.enter("footnoteReference"), i = t.enter("reference");
44
+ return o += l.move(
45
+ t.safe(t.associationId(e), { after: "]", before: o })
46
+ ), i(), c(), o += l.move("]"), o;
47
+ }
48
+ function R() {
49
+ return {
50
+ enter: {
51
+ gfmFootnoteCallString: F,
52
+ gfmFootnoteCall: b,
53
+ gfmFootnoteDefinitionLabelString: k,
54
+ gfmFootnoteDefinition: d
55
+ },
56
+ exit: {
57
+ gfmFootnoteCallString: x,
58
+ gfmFootnoteCall: D,
59
+ gfmFootnoteDefinitionLabelString: p,
60
+ gfmFootnoteDefinition: C
61
+ }
62
+ };
63
+ }
64
+ function y(e) {
65
+ let n = !1;
66
+ return e && e.firstLineBlank && (n = !0), {
67
+ handlers: { footnoteDefinition: t, footnoteReference: u },
68
+ // This is on by default already.
69
+ unsafe: [{ character: "[", inConstruct: ["label", "phrasing", "reference"] }]
70
+ };
71
+ function t(r, l, o, c) {
72
+ const i = o.createTracker(c);
73
+ let f = i.move("[^");
74
+ const h = o.enter("footnoteDefinition"), g = o.enter("label");
75
+ return f += i.move(
76
+ o.safe(o.associationId(r), { before: f, after: "]" })
77
+ ), g(), f += i.move("]:"), r.children && r.children.length > 0 && (i.shift(4), f += i.move(
78
+ (n ? `
79
+ ` : " ") + o.indentLines(
80
+ o.containerFlow(r, i.current()),
81
+ n ? m : v
82
+ )
83
+ )), h(), f;
84
+ }
85
+ }
86
+ function v(e, n, t) {
87
+ return n === 0 ? e : m(e, n, t);
88
+ }
89
+ function m(e, n, t) {
90
+ return (t ? "" : " ") + e;
91
+ }
92
+ export {
93
+ R as gfmFootnoteFromMarkdown,
94
+ y as gfmFootnoteToMarkdown
95
+ };
@@ -0,0 +1,54 @@
1
+ const h = [
2
+ "autolink",
3
+ "destinationLiteral",
4
+ "destinationRaw",
5
+ "reference",
6
+ "titleQuote",
7
+ "titleApostrophe"
8
+ ];
9
+ o.attention = k;
10
+ o.peek = l;
11
+ function g() {
12
+ return {
13
+ canContainEols: ["delete"],
14
+ enter: { strikethrough: s },
15
+ exit: { strikethrough: a }
16
+ };
17
+ }
18
+ function d() {
19
+ return {
20
+ handlers: { delete: o },
21
+ unsafe: [
22
+ {
23
+ character: "~",
24
+ inConstruct: "phrasing",
25
+ notInConstruct: h
26
+ }
27
+ ]
28
+ };
29
+ }
30
+ function s(e) {
31
+ this.enter({ type: "delete", children: [], position: void 0 }, e);
32
+ }
33
+ function a(e) {
34
+ this.exit(e);
35
+ }
36
+ function o(e, f, t, u) {
37
+ const n = t.createTracker(u), i = t.stack.includes("strikethrough") ? "~" : "~~", c = t.enter("strikethrough");
38
+ let r = n.move(i);
39
+ return r += t.containerPhrasing(e, {
40
+ ...n.current(),
41
+ before: r,
42
+ after: "~"
43
+ }), r += n.move(i), c(), r;
44
+ }
45
+ function k() {
46
+ return { construct: "strikethrough", markers: ["~"], sizes: [2, 1] };
47
+ }
48
+ function l() {
49
+ return "~";
50
+ }
51
+ export {
52
+ g as gfmStrikethroughFromMarkdown,
53
+ d as gfmStrikethroughToMarkdown
54
+ };
@@ -0,0 +1,135 @@
1
+ import { ok as k } from "../../devlop/lib/default.js";
2
+ import { markdownTable as R } from "../../markdown-table/index.js";
3
+ import { handle as D } from "../../mdast-util-to-markdown/lib/handle/index.js";
4
+ function M() {
5
+ return {
6
+ enter: {
7
+ table: v,
8
+ tableData: g,
9
+ tableHeader: g,
10
+ tableRow: _
11
+ },
12
+ exit: {
13
+ codeText: A,
14
+ table: y,
15
+ tableData: u,
16
+ tableHeader: u,
17
+ tableRow: u
18
+ }
19
+ };
20
+ }
21
+ function v(e) {
22
+ const l = e._align;
23
+ this.enter(
24
+ {
25
+ type: "table",
26
+ align: l.map(function(c) {
27
+ return c === "none" ? null : c;
28
+ }),
29
+ children: []
30
+ },
31
+ e
32
+ ), this.data.inTable = !0;
33
+ }
34
+ function y(e) {
35
+ this.exit(e), this.data.inTable = void 0;
36
+ }
37
+ function _(e) {
38
+ this.enter({ type: "tableRow", children: [] }, e);
39
+ }
40
+ function u(e) {
41
+ this.exit(e);
42
+ }
43
+ function g(e) {
44
+ this.enter({ type: "tableCell", children: [] }, e);
45
+ }
46
+ function A(e) {
47
+ let l = this.resume();
48
+ this.data.inTable && (l = l.replace(/\\([\\|])/g, B));
49
+ const c = this.stack[this.stack.length - 1];
50
+ k(c.type === "inlineCode"), c.value = l, this.exit(e);
51
+ }
52
+ function B(e, l) {
53
+ return l === "|" ? l : e;
54
+ }
55
+ function z(e) {
56
+ const l = e || {}, c = l.tableCellPadding, C = l.tablePipeAlign, x = l.stringLength, h = c ? " " : "|";
57
+ return {
58
+ unsafe: [
59
+ { character: "\r", inConstruct: "tableCell" },
60
+ { character: `
61
+ `, inConstruct: "tableCell" },
62
+ // A pipe, when followed by a tab or space (padding), or a dash or colon
63
+ // (unpadded delimiter row), could result in a table.
64
+ { atBreak: !0, character: "|", after: "[ :-]" },
65
+ // A pipe in a cell must be encoded.
66
+ { character: "|", inConstruct: "tableCell" },
67
+ // A colon must be followed by a dash, in which case it could start a
68
+ // delimiter row.
69
+ { atBreak: !0, character: ":", after: "-" },
70
+ // A delimiter row can also start with a dash, when followed by more
71
+ // dashes, a colon, or a pipe.
72
+ // This is a stricter version than the built in check for lists, thematic
73
+ // breaks, and setex heading underlines though:
74
+ // <https://github.com/syntax-tree/mdast-util-to-markdown/blob/51a2038/lib/unsafe.js#L57>
75
+ { atBreak: !0, character: "-", after: "[:|-]" }
76
+ ],
77
+ handlers: {
78
+ inlineCode: m,
79
+ table: T,
80
+ tableCell: b,
81
+ tableRow: p
82
+ }
83
+ };
84
+ function T(t, r, a, n) {
85
+ return d(w(t, a, n), t.align);
86
+ }
87
+ function p(t, r, a, n) {
88
+ const i = f(t, a, n), o = d([i]);
89
+ return o.slice(0, o.indexOf(`
90
+ `));
91
+ }
92
+ function b(t, r, a, n) {
93
+ const i = a.enter("tableCell"), o = a.enter("phrasing"), s = a.containerPhrasing(t, {
94
+ ...n,
95
+ before: h,
96
+ after: h
97
+ });
98
+ return o(), i(), s;
99
+ }
100
+ function d(t, r) {
101
+ return R(t, {
102
+ align: r,
103
+ // @ts-expect-error: `markdown-table` types should support `null`.
104
+ alignDelimiters: C,
105
+ // @ts-expect-error: `markdown-table` types should support `null`.
106
+ padding: c,
107
+ // @ts-expect-error: `markdown-table` types should support `null`.
108
+ stringLength: x
109
+ });
110
+ }
111
+ function w(t, r, a) {
112
+ const n = t.children;
113
+ let i = -1;
114
+ const o = [], s = r.enter("table");
115
+ for (; ++i < n.length; )
116
+ o[i] = f(n[i], r, a);
117
+ return s(), o;
118
+ }
119
+ function f(t, r, a) {
120
+ const n = t.children;
121
+ let i = -1;
122
+ const o = [], s = r.enter("tableRow");
123
+ for (; ++i < n.length; )
124
+ o[i] = b(n[i], t, r, a);
125
+ return s(), o;
126
+ }
127
+ function m(t, r, a) {
128
+ let n = D.inlineCode(t, r, a);
129
+ return a.stack.includes("tableCell") && (n = n.replace(/\|/g, "\\$&")), n;
130
+ }
131
+ }
132
+ export {
133
+ M as gfmTableFromMarkdown,
134
+ z as gfmTableToMarkdown
135
+ };
@@ -0,0 +1,58 @@
1
+ import { ok as l } from "../../devlop/lib/default.js";
2
+ import { handle as f } from "../../mdast-util-to-markdown/lib/handle/index.js";
3
+ function y() {
4
+ return {
5
+ exit: {
6
+ taskListCheckValueChecked: h,
7
+ taskListCheckValueUnchecked: h,
8
+ paragraph: u
9
+ }
10
+ };
11
+ }
12
+ function b() {
13
+ return {
14
+ unsafe: [{ atBreak: !0, character: "-", after: "[:|-]" }],
15
+ handlers: { listItem: m }
16
+ };
17
+ }
18
+ function h(s) {
19
+ const e = this.stack[this.stack.length - 2];
20
+ l(e.type === "listItem"), e.checked = s.type === "taskListCheckValueChecked";
21
+ }
22
+ function u(s) {
23
+ const e = this.stack[this.stack.length - 2];
24
+ if (e && e.type === "listItem" && typeof e.checked == "boolean") {
25
+ const i = this.stack[this.stack.length - 1];
26
+ l(i.type === "paragraph");
27
+ const t = i.children[0];
28
+ if (t && t.type === "text") {
29
+ const a = e.children;
30
+ let c = -1, n;
31
+ for (; ++c < a.length; ) {
32
+ const r = a[c];
33
+ if (r.type === "paragraph") {
34
+ n = r;
35
+ break;
36
+ }
37
+ }
38
+ n === i && (t.value = t.value.slice(1), t.value.length === 0 ? i.children.shift() : i.position && t.position && typeof t.position.start.offset == "number" && (t.position.start.column++, t.position.start.offset++, i.position.start = Object.assign({}, t.position.start)));
39
+ }
40
+ }
41
+ this.exit(s);
42
+ }
43
+ function m(s, e, i, t) {
44
+ const a = s.children[0], c = typeof s.checked == "boolean" && a && a.type === "paragraph", n = "[" + (s.checked ? "x" : " ") + "] ", r = i.createTracker(t);
45
+ c && r.move(n);
46
+ let o = f.listItem(s, e, i, {
47
+ ...t,
48
+ ...r.current()
49
+ });
50
+ return c && (o = o.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/, k)), o;
51
+ function k(p) {
52
+ return p + n;
53
+ }
54
+ }
55
+ export {
56
+ y as gfmTaskListItemFromMarkdown,
57
+ b as gfmTaskListItemToMarkdown
58
+ };
@@ -0,0 +1,30 @@
1
+ import { convert as e } from "../../unist-util-is/lib/index.js";
2
+ const n = (
3
+ /** @type {(node?: unknown) => node is Exclude<PhrasingContent, Html>} */
4
+ e([
5
+ "break",
6
+ "delete",
7
+ "emphasis",
8
+ // To do: next major: removed since footnotes were added to GFM.
9
+ "footnote",
10
+ "footnoteReference",
11
+ "image",
12
+ "imageReference",
13
+ "inlineCode",
14
+ // Enabled by `mdast-util-math`:
15
+ "inlineMath",
16
+ "link",
17
+ "linkReference",
18
+ // Enabled by `mdast-util-mdx`:
19
+ "mdxJsxTextElement",
20
+ // Enabled by `mdast-util-mdx`:
21
+ "mdxTextExpression",
22
+ "strong",
23
+ "text",
24
+ // Enabled by `mdast-util-directive`:
25
+ "textDirective"
26
+ ])
27
+ );
28
+ export {
29
+ n as phrasing
30
+ };
@@ -0,0 +1,90 @@
1
+ import x from "../../@ungap/structured-clone/esm/index.js";
2
+ import { normalizeUri as N } from "../../micromark-util-sanitize-uri/index.js";
3
+ function L(e, o) {
4
+ const r = [{ type: "text", value: "↩" }];
5
+ return o > 1 && r.push({
6
+ type: "element",
7
+ tagName: "sup",
8
+ properties: {},
9
+ children: [{ type: "text", value: String(o) }]
10
+ }), r;
11
+ }
12
+ function k(e, o) {
13
+ return "Back to reference " + (e + 1) + (o > 1 ? "-" + o : "");
14
+ }
15
+ function C(e) {
16
+ const o = typeof e.options.clobberPrefix == "string" ? e.options.clobberPrefix : "user-content-", r = e.options.footnoteBackContent || L, s = e.options.footnoteBackLabel || k, y = e.options.footnoteLabel || "Footnotes", g = e.options.footnoteLabelTagName || "h2", b = e.options.footnoteLabelProperties || {
17
+ className: ["sr-only"]
18
+ }, f = [];
19
+ let a = -1;
20
+ for (; ++a < e.footnoteOrder.length; ) {
21
+ const p = e.footnoteById.get(
22
+ e.footnoteOrder[a]
23
+ );
24
+ if (!p)
25
+ continue;
26
+ const c = e.all(p), u = String(p.identifier).toUpperCase(), d = N(u.toLowerCase());
27
+ let l = 0;
28
+ const i = [], h = e.footnoteCounts.get(u);
29
+ for (; h !== void 0 && ++l <= h; ) {
30
+ i.length > 0 && i.push({ type: "text", value: " " });
31
+ let t = typeof r == "string" ? r : r(a, l);
32
+ typeof t == "string" && (t = { type: "text", value: t }), i.push({
33
+ type: "element",
34
+ tagName: "a",
35
+ properties: {
36
+ href: "#" + o + "fnref-" + d + (l > 1 ? "-" + l : ""),
37
+ dataFootnoteBackref: "",
38
+ ariaLabel: typeof s == "string" ? s : s(a, l),
39
+ className: ["data-footnote-backref"]
40
+ },
41
+ children: Array.isArray(t) ? t : [t]
42
+ });
43
+ }
44
+ const n = c[c.length - 1];
45
+ if (n && n.type === "element" && n.tagName === "p") {
46
+ const t = n.children[n.children.length - 1];
47
+ t && t.type === "text" ? t.value += " " : n.children.push({ type: "text", value: " " }), n.children.push(...i);
48
+ } else
49
+ c.push(...i);
50
+ const m = {
51
+ type: "element",
52
+ tagName: "li",
53
+ properties: { id: o + "fn-" + d },
54
+ children: e.wrap(c, !0)
55
+ };
56
+ e.patch(p, m), f.push(m);
57
+ }
58
+ if (f.length !== 0)
59
+ return {
60
+ type: "element",
61
+ tagName: "section",
62
+ properties: { dataFootnotes: !0, className: ["footnotes"] },
63
+ children: [
64
+ {
65
+ type: "element",
66
+ tagName: g,
67
+ properties: {
68
+ ...x(b),
69
+ id: "footnote-label"
70
+ },
71
+ children: [{ type: "text", value: y }]
72
+ },
73
+ { type: "text", value: `
74
+ ` },
75
+ {
76
+ type: "element",
77
+ tagName: "ol",
78
+ properties: {},
79
+ children: e.wrap(f, !0)
80
+ },
81
+ { type: "text", value: `
82
+ ` }
83
+ ]
84
+ };
85
+ }
86
+ export {
87
+ L as defaultFootnoteBackContent,
88
+ k as defaultFootnoteBackLabel,
89
+ C as footer
90
+ };
@@ -0,0 +1,12 @@
1
+ function p(e, r) {
2
+ const l = {
3
+ type: "element",
4
+ tagName: "blockquote",
5
+ properties: {},
6
+ children: e.wrap(e.all(r), !0)
7
+ };
8
+ return e.patch(r, l), e.applyData(r, l);
9
+ }
10
+ export {
11
+ p as blockquote
12
+ };
@@ -0,0 +1,8 @@
1
+ function a(e, t) {
2
+ const r = { type: "element", tagName: "br", properties: {}, children: [] };
3
+ return e.patch(t, r), [e.applyData(t, r), { type: "text", value: `
4
+ ` }];
5
+ }
6
+ export {
7
+ a as hardBreak
8
+ };
@@ -0,0 +1,15 @@
1
+ function r(a, e) {
2
+ const c = e.value ? e.value + `
3
+ ` : "", l = {}, p = e.lang ? e.lang.split(/\s+/) : [];
4
+ p.length > 0 && (l.className = ["language-" + p[0]]);
5
+ let t = {
6
+ type: "element",
7
+ tagName: "code",
8
+ properties: l,
9
+ children: [{ type: "text", value: c }]
10
+ };
11
+ return e.meta && (t.data = { meta: e.meta }), a.patch(e, t), t = a.applyData(e, t), t = { type: "element", tagName: "pre", properties: {}, children: [t] }, a.patch(e, t), t;
12
+ }
13
+ export {
14
+ r as code
15
+ };
@@ -0,0 +1,12 @@
1
+ function l(e, r) {
2
+ const t = {
3
+ type: "element",
4
+ tagName: "del",
5
+ properties: {},
6
+ children: e.all(r)
7
+ };
8
+ return e.patch(r, t), e.applyData(r, t);
9
+ }
10
+ export {
11
+ l as strikethrough
12
+ };
@@ -0,0 +1,12 @@
1
+ function t(e, p) {
2
+ const r = {
3
+ type: "element",
4
+ tagName: "em",
5
+ properties: {},
6
+ children: e.all(p)
7
+ };
8
+ return e.patch(p, r), e.applyData(p, r);
9
+ }
10
+ export {
11
+ t as emphasis
12
+ };
@@ -0,0 +1,28 @@
1
+ import { normalizeUri as s } from "../../../micromark-util-sanitize-uri/index.js";
2
+ function d(e, r) {
3
+ const i = typeof e.options.clobberPrefix == "string" ? e.options.clobberPrefix : "user-content-", t = String(r.identifier).toUpperCase(), f = s(t.toLowerCase()), l = e.footnoteOrder.indexOf(t);
4
+ let n, o = e.footnoteCounts.get(t);
5
+ o === void 0 ? (o = 0, e.footnoteOrder.push(t), n = e.footnoteOrder.length) : n = l + 1, o += 1, e.footnoteCounts.set(t, o);
6
+ const p = {
7
+ type: "element",
8
+ tagName: "a",
9
+ properties: {
10
+ href: "#" + i + "fn-" + f,
11
+ id: i + "fnref-" + f + (o > 1 ? "-" + o : ""),
12
+ dataFootnoteRef: !0,
13
+ ariaDescribedBy: ["footnote-label"]
14
+ },
15
+ children: [{ type: "text", value: String(n) }]
16
+ };
17
+ e.patch(r, p);
18
+ const c = {
19
+ type: "element",
20
+ tagName: "sup",
21
+ properties: {},
22
+ children: [p]
23
+ };
24
+ return e.patch(r, c), e.applyData(r, c);
25
+ }
26
+ export {
27
+ d as footnoteReference
28
+ };