@easyv/biz-components 0.0.3 → 0.0.4
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.
- package/dist/_virtual/index.es2.js +2 -2
- package/dist/_virtual/index.es3.js +2 -2
- package/dist/_virtual/index.es4.js +2 -2
- package/dist/_virtual/index.es5.js +2 -2
- package/dist/components/AiMessageRender/AiMessageRender.d.ts +4 -0
- package/dist/components/AiMessageRender/AiMessageRender.es.js +33 -27
- package/dist/components/AiMessageRender/AiMessageRender.es.js.map +1 -1
- package/dist/components/AiMessageRender/index.less.es.js +196 -0
- package/dist/components/AiMessageRender/index.less.es.js.map +1 -0
- package/dist/components/ShadowDom/ShadowDom.d.ts +1 -0
- package/dist/components/ShadowDom/ShadowDom.es.js +16 -16
- package/dist/components/ShadowDom/ShadowDom.es.js.map +1 -1
- package/dist/node_modules/.pnpm/@easyv_react-icons@6.3.0/node_modules/@easyv/react-icons/dist/index.esm.es.js +64 -89
- package/dist/node_modules/.pnpm/@easyv_react-icons@6.3.0/node_modules/@easyv/react-icons/dist/index.esm.es.js.map +1 -1
- package/dist/node_modules/.pnpm/ccount@2.0.1/node_modules/ccount/index.es.js +13 -0
- package/dist/node_modules/.pnpm/ccount@2.0.1/node_modules/ccount/index.es.js.map +1 -0
- package/dist/node_modules/.pnpm/classnames@2.3.2/node_modules/classnames/index.es.js +1 -1
- package/dist/node_modules/.pnpm/escape-string-regexp@5.0.0/node_modules/escape-string-regexp/index.es.js +9 -0
- package/dist/node_modules/.pnpm/escape-string-regexp@5.0.0/node_modules/escape-string-regexp/index.es.js.map +1 -0
- package/dist/node_modules/.pnpm/longest-streak@3.1.0/node_modules/longest-streak/index.es.js +13 -0
- package/dist/node_modules/.pnpm/longest-streak@3.1.0/node_modules/longest-streak/index.es.js.map +1 -0
- package/dist/node_modules/.pnpm/markdown-table@3.0.4/node_modules/markdown-table/index.es.js +76 -0
- package/dist/node_modules/.pnpm/markdown-table@3.0.4/node_modules/markdown-table/index.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-find-and-replace@3.0.2/node_modules/mdast-util-find-and-replace/lib/index.es.js +71 -0
- package/dist/node_modules/.pnpm/mdast-util-find-and-replace@3.0.2/node_modules/mdast-util-find-and-replace/lib/index.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-gfm-autolink-literal@2.0.1/node_modules/mdast-util-gfm-autolink-literal/lib/index.es.js +131 -0
- package/dist/node_modules/.pnpm/mdast-util-gfm-autolink-literal@2.0.1/node_modules/mdast-util-gfm-autolink-literal/lib/index.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-gfm-footnote@2.1.0/node_modules/mdast-util-gfm-footnote/lib/index.es.js +96 -0
- package/dist/node_modules/.pnpm/mdast-util-gfm-footnote@2.1.0/node_modules/mdast-util-gfm-footnote/lib/index.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-gfm-strikethrough@2.0.0/node_modules/mdast-util-gfm-strikethrough/lib/index.es.js +51 -0
- package/dist/node_modules/.pnpm/mdast-util-gfm-strikethrough@2.0.0/node_modules/mdast-util-gfm-strikethrough/lib/index.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-gfm-table@2.0.0/node_modules/mdast-util-gfm-table/lib/index.es.js +136 -0
- package/dist/node_modules/.pnpm/mdast-util-gfm-table@2.0.0/node_modules/mdast-util-gfm-table/lib/index.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-gfm-task-list-item@2.0.0/node_modules/mdast-util-gfm-task-list-item/lib/index.es.js +59 -0
- package/dist/node_modules/.pnpm/mdast-util-gfm-task-list-item@2.0.0/node_modules/mdast-util-gfm-task-list-item/lib/index.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-gfm@3.1.0/node_modules/mdast-util-gfm/lib/index.es.js +30 -0
- package/dist/node_modules/.pnpm/mdast-util-gfm@3.1.0/node_modules/mdast-util-gfm/lib/index.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-phrasing@4.1.0/node_modules/mdast-util-phrasing/lib/index.es.js +31 -0
- package/dist/node_modules/.pnpm/mdast-util-phrasing@4.1.0/node_modules/mdast-util-phrasing/lib/index.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/blockquote.es.js +16 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/blockquote.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/break.es.js +14 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/break.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/code.es.js +45 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/code.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/definition.es.js +35 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/definition.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/emphasis.es.js +34 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/emphasis.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/heading.es.js +35 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/heading.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/html.es.js +11 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/html.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/image-reference.es.js +28 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/image-reference.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/image.es.js +34 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/image.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/index.es.js +45 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/index.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/inline-code.es.js +23 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/inline-code.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/link-reference.es.js +28 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/link-reference.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/link.es.js +51 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/link.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/list-item.es.js +23 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/list-item.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/list.es.js +36 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/list.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/paragraph.es.js +8 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/paragraph.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/root.es.js +10 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/root.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/strong.es.js +34 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/strong.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/text.es.js +7 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/text.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/thematic-break.es.js +10 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/thematic-break.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-bullet-ordered.es.js +12 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-bullet-ordered.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-bullet-other.es.js +19 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-bullet-other.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-bullet.es.js +12 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-bullet.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-emphasis.es.js +12 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-emphasis.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-fence.es.js +12 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-fence.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.es.js +12 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-quote.es.js +12 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-quote.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-rule-repetition.es.js +12 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-rule-repetition.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-rule.es.js +12 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-rule.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-strong.es.js +12 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-strong.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/encode-character-reference.es.js +7 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/encode-character-reference.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/encode-info.es.js +38 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/encode-info.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/format-code-as-indented.es.js +10 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/format-code-as-indented.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.es.js +14 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.es.js +16 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.es.js +16 -0
- package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.es.js.map +1 -0
- package/dist/node_modules/.pnpm/micromark-extension-gfm-autolink-literal@2.1.0/node_modules/micromark-extension-gfm-autolink-literal/lib/syntax.es.js +194 -0
- package/dist/node_modules/.pnpm/micromark-extension-gfm-autolink-literal@2.1.0/node_modules/micromark-extension-gfm-autolink-literal/lib/syntax.es.js.map +1 -0
- package/dist/node_modules/.pnpm/micromark-extension-gfm-footnote@2.1.0/node_modules/micromark-extension-gfm-footnote/lib/syntax.es.js +193 -0
- package/dist/node_modules/.pnpm/micromark-extension-gfm-footnote@2.1.0/node_modules/micromark-extension-gfm-footnote/lib/syntax.es.js.map +1 -0
- package/dist/node_modules/.pnpm/micromark-extension-gfm-strikethrough@2.1.0/node_modules/micromark-extension-gfm-strikethrough/lib/syntax.es.js +68 -0
- package/dist/node_modules/.pnpm/micromark-extension-gfm-strikethrough@2.1.0/node_modules/micromark-extension-gfm-strikethrough/lib/syntax.es.js.map +1 -0
- package/dist/node_modules/.pnpm/micromark-extension-gfm-table@2.1.1/node_modules/micromark-extension-gfm-table/lib/edit-map.es.js +72 -0
- package/dist/node_modules/.pnpm/micromark-extension-gfm-table@2.1.1/node_modules/micromark-extension-gfm-table/lib/edit-map.es.js.map +1 -0
- package/dist/node_modules/.pnpm/micromark-extension-gfm-table@2.1.1/node_modules/micromark-extension-gfm-table/lib/infer.es.js +24 -0
- package/dist/node_modules/.pnpm/micromark-extension-gfm-table@2.1.1/node_modules/micromark-extension-gfm-table/lib/infer.es.js.map +1 -0
- package/dist/node_modules/.pnpm/micromark-extension-gfm-table@2.1.1/node_modules/micromark-extension-gfm-table/lib/syntax.es.js +146 -0
- package/dist/node_modules/.pnpm/micromark-extension-gfm-table@2.1.1/node_modules/micromark-extension-gfm-table/lib/syntax.es.js.map +1 -0
- package/dist/node_modules/.pnpm/micromark-extension-gfm-task-list-item@2.1.0/node_modules/micromark-extension-gfm-task-list-item/lib/syntax.es.js +46 -0
- package/dist/node_modules/.pnpm/micromark-extension-gfm-task-list-item@2.1.0/node_modules/micromark-extension-gfm-task-list-item/lib/syntax.es.js.map +1 -0
- package/dist/node_modules/.pnpm/micromark-extension-gfm@3.0.0/node_modules/micromark-extension-gfm/index.es.js +19 -0
- package/dist/node_modules/.pnpm/micromark-extension-gfm@3.0.0/node_modules/micromark-extension-gfm/index.es.js.map +1 -0
- package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.es.js +1 -1
- package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.es.js +1 -1
- package/dist/node_modules/.pnpm/remark-gfm@4.0.1/node_modules/remark-gfm/lib/index.es.js +14 -0
- package/dist/node_modules/.pnpm/remark-gfm@4.0.1/node_modules/remark-gfm/lib/index.es.js.map +1 -0
- package/dist/node_modules/.pnpm/style-to-js@1.1.16/node_modules/style-to-js/cjs/index.es.js +1 -1
- package/dist/node_modules/.pnpm/style-to-object@1.0.8/node_modules/style-to-object/cjs/index.es.js +1 -1
- package/package.json +5 -2
- package/dist/components/AiMessageRender/index.css.es.js +0 -17
- package/dist/components/AiMessageRender/index.css.es.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check-rule.es.js","sources":["../../../../../../../../../../node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-rule.js"],"sourcesContent":["/**\n * @import {Options, State} from 'mdast-util-to-markdown'\n */\n\n/**\n * @param {State} state\n * @returns {Exclude<Options['rule'], null | undefined>}\n */\nexport function checkRule(state) {\n const marker = state.options.rule || '*'\n\n if (marker !== '*' && marker !== '-' && marker !== '_') {\n throw new Error(\n 'Cannot serialize rules with `' +\n marker +\n '` for `options.rule`, expected `*`, `-`, or `_`'\n )\n }\n\n return marker\n}\n"],"names":["checkRule","state","marker"],"mappings":"AAQO,SAASA,EAAUC,GAAO;AAC/B,QAAMC,IAASD,EAAM,QAAQ,QAAQ;AAErC,MAAIC,MAAW,OAAOA,MAAW,OAAOA,MAAW;AACjD,UAAM,IAAI;AAAA,MACR,kCACEA,IACA;AAAA,IACR;AAGE,SAAOA;AACT;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
function t(r) {
|
|
2
|
+
const o = r.options.strong || "*";
|
|
3
|
+
if (o !== "*" && o !== "_")
|
|
4
|
+
throw new Error(
|
|
5
|
+
"Cannot serialize strong with `" + o + "` for `options.strong`, expected `*`, or `_`"
|
|
6
|
+
);
|
|
7
|
+
return o;
|
|
8
|
+
}
|
|
9
|
+
export {
|
|
10
|
+
t as checkStrong
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=check-strong.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check-strong.es.js","sources":["../../../../../../../../../../node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-strong.js"],"sourcesContent":["/**\n * @import {Options, State} from 'mdast-util-to-markdown'\n */\n\n/**\n * @param {State} state\n * @returns {Exclude<Options['strong'], null | undefined>}\n */\nexport function checkStrong(state) {\n const marker = state.options.strong || '*'\n\n if (marker !== '*' && marker !== '_') {\n throw new Error(\n 'Cannot serialize strong with `' +\n marker +\n '` for `options.strong`, expected `*`, or `_`'\n )\n }\n\n return marker\n}\n"],"names":["checkStrong","state","marker"],"mappings":"AAQO,SAASA,EAAYC,GAAO;AACjC,QAAMC,IAASD,EAAM,QAAQ,UAAU;AAEvC,MAAIC,MAAW,OAAOA,MAAW;AAC/B,UAAM,IAAI;AAAA,MACR,mCACEA,IACA;AAAA,IACR;AAGE,SAAOA;AACT;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"encode-character-reference.es.js","sources":["../../../../../../../../../../node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/encode-character-reference.js"],"sourcesContent":["/**\n * Encode a code point as a character reference.\n *\n * @param {number} code\n * Code point to encode.\n * @returns {string}\n * Encoded character reference.\n */\nexport function encodeCharacterReference(code) {\n return '&#x' + code.toString(16).toUpperCase() + ';'\n}\n"],"names":["encodeCharacterReference","code"],"mappings":"AAQO,SAASA,EAAyBC,GAAM;AAC7C,SAAO,QAAQA,EAAK,SAAS,EAAE,EAAE,YAAW,IAAK;AACnD;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { classifyCharacter as s } from "../../../../../micromark-util-classify-character@2.0.1/node_modules/micromark-util-classify-character/index.es.js";
|
|
2
|
+
function f(d, n, t) {
|
|
3
|
+
const i = s(d), e = s(n);
|
|
4
|
+
return i === void 0 ? e === void 0 ? (
|
|
5
|
+
// Letter inside:
|
|
6
|
+
// we have to encode *both* letters for `_` as it is looser.
|
|
7
|
+
// it already forms for `*` (and GFMs `~`).
|
|
8
|
+
t === "_" ? { inside: !0, outside: !0 } : { inside: !1, outside: !1 }
|
|
9
|
+
) : e === 1 ? (
|
|
10
|
+
// Whitespace inside: encode both (letter, whitespace).
|
|
11
|
+
{ inside: !0, outside: !0 }
|
|
12
|
+
) : (
|
|
13
|
+
// Punctuation inside: encode outer (letter)
|
|
14
|
+
{ inside: !1, outside: !0 }
|
|
15
|
+
) : i === 1 ? e === void 0 ? (
|
|
16
|
+
// Letter inside: already forms.
|
|
17
|
+
{ inside: !1, outside: !1 }
|
|
18
|
+
) : e === 1 ? (
|
|
19
|
+
// Whitespace inside: encode both (whitespace).
|
|
20
|
+
{ inside: !0, outside: !0 }
|
|
21
|
+
) : (
|
|
22
|
+
// Punctuation inside: already forms.
|
|
23
|
+
{ inside: !1, outside: !1 }
|
|
24
|
+
) : e === void 0 ? (
|
|
25
|
+
// Letter inside: already forms.
|
|
26
|
+
{ inside: !1, outside: !1 }
|
|
27
|
+
) : e === 1 ? (
|
|
28
|
+
// Whitespace inside: encode inner (whitespace).
|
|
29
|
+
{ inside: !0, outside: !1 }
|
|
30
|
+
) : (
|
|
31
|
+
// Punctuation inside: already forms.
|
|
32
|
+
{ inside: !1, outside: !1 }
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
export {
|
|
36
|
+
f as encodeInfo
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=encode-info.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"encode-info.es.js","sources":["../../../../../../../../../../node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/encode-info.js"],"sourcesContent":["/**\n * @import {EncodeSides} from '../types.js'\n */\n\nimport {classifyCharacter} from 'micromark-util-classify-character'\n\n/**\n * Check whether to encode (as a character reference) the characters\n * surrounding an attention run.\n *\n * Which characters are around an attention run influence whether it works or\n * not.\n *\n * See <https://github.com/orgs/syntax-tree/discussions/60> for more info.\n * See this markdown in a particular renderer to see what works:\n *\n * ```markdown\n * | | A (letter inside) | B (punctuation inside) | C (whitespace inside) | D (nothing inside) |\n * | ----------------------- | ----------------- | ---------------------- | --------------------- | ------------------ |\n * | 1 (letter outside) | x*y*z | x*.*z | x* *z | x**z |\n * | 2 (punctuation outside) | .*y*. | .*.*. | .* *. | .**. |\n * | 3 (whitespace outside) | x *y* z | x *.* z | x * * z | x ** z |\n * | 4 (nothing outside) | *x* | *.* | * * | ** |\n * ```\n *\n * @param {number} outside\n * Code point on the outer side of the run.\n * @param {number} inside\n * Code point on the inner side of the run.\n * @param {'*' | '_'} marker\n * Marker of the run.\n * Underscores are handled more strictly (they form less often) than\n * asterisks.\n * @returns {EncodeSides}\n * Whether to encode characters.\n */\n// Important: punctuation must never be encoded.\n// Punctuation is solely used by markdown constructs.\n// And by encoding itself.\n// Encoding them will break constructs or double encode things.\nexport function encodeInfo(outside, inside, marker) {\n const outsideKind = classifyCharacter(outside)\n const insideKind = classifyCharacter(inside)\n\n // Letter outside:\n if (outsideKind === undefined) {\n return insideKind === undefined\n ? // Letter inside:\n // we have to encode *both* letters for `_` as it is looser.\n // it already forms for `*` (and GFMs `~`).\n marker === '_'\n ? {inside: true, outside: true}\n : {inside: false, outside: false}\n : insideKind === 1\n ? // Whitespace inside: encode both (letter, whitespace).\n {inside: true, outside: true}\n : // Punctuation inside: encode outer (letter)\n {inside: false, outside: true}\n }\n\n // Whitespace outside:\n if (outsideKind === 1) {\n return insideKind === undefined\n ? // Letter inside: already forms.\n {inside: false, outside: false}\n : insideKind === 1\n ? // Whitespace inside: encode both (whitespace).\n {inside: true, outside: true}\n : // Punctuation inside: already forms.\n {inside: false, outside: false}\n }\n\n // Punctuation outside:\n return insideKind === undefined\n ? // Letter inside: already forms.\n {inside: false, outside: false}\n : insideKind === 1\n ? // Whitespace inside: encode inner (whitespace).\n {inside: true, outside: false}\n : // Punctuation inside: already forms.\n {inside: false, outside: false}\n}\n"],"names":["encodeInfo","outside","inside","marker","outsideKind","classifyCharacter","insideKind"],"mappings":";AAwCO,SAASA,EAAWC,GAASC,GAAQC,GAAQ;AAClD,QAAMC,IAAcC,EAAkBJ,CAAO,GACvCK,IAAaD,EAAkBH,CAAM;AAG3C,SAAIE,MAAgB,SACXE,MAAe;AAAA;AAAA;AAAA;AAAA,IAIlBH,MAAW,MACT,EAAC,QAAQ,IAAM,SAAS,GAAI,IAC5B,EAAC,QAAQ,IAAO,SAAS,GAAK;AAAA,MAChCG,MAAe;AAAA;AAAA,IAEb,EAAC,QAAQ,IAAM,SAAS,GAAI;AAAA;AAAA;AAAA,IAE5B,EAAC,QAAQ,IAAO,SAAS,GAAI;AAAA,MAIjCF,MAAgB,IACXE,MAAe;AAAA;AAAA,IAElB,EAAC,QAAQ,IAAO,SAAS,GAAK;AAAA,MAC9BA,MAAe;AAAA;AAAA,IAEb,EAAC,QAAQ,IAAM,SAAS,GAAI;AAAA;AAAA;AAAA,IAE5B,EAAC,QAAQ,IAAO,SAAS,GAAK;AAAA,MAI/BA,MAAe;AAAA;AAAA,IAElB,EAAC,QAAQ,IAAO,SAAS,GAAK;AAAA,MAC9BA,MAAe;AAAA;AAAA,IAEb,EAAC,QAAQ,IAAM,SAAS,GAAK;AAAA;AAAA;AAAA,IAE7B,EAAC,QAAQ,IAAO,SAAS,GAAK;AAAA;AACtC;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
function n(t, e) {
|
|
2
|
+
return !!(e.options.fences === !1 && t.value && // If there’s no info…
|
|
3
|
+
!t.lang && // And there’s a non-whitespace character…
|
|
4
|
+
/[^ \r\n]/.test(t.value) && // And the value doesn’t start or end in a blank…
|
|
5
|
+
!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(t.value));
|
|
6
|
+
}
|
|
7
|
+
export {
|
|
8
|
+
n as formatCodeAsIndented
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=format-code-as-indented.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format-code-as-indented.es.js","sources":["../../../../../../../../../../node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/format-code-as-indented.js"],"sourcesContent":["/**\n * @import {State} from 'mdast-util-to-markdown'\n * @import {Code} from 'mdast'\n */\n\n/**\n * @param {Code} node\n * @param {State} state\n * @returns {boolean}\n */\nexport function formatCodeAsIndented(node, state) {\n return Boolean(\n state.options.fences === false &&\n node.value &&\n // If there’s no info…\n !node.lang &&\n // And there’s a non-whitespace character…\n /[^ \\r\\n]/.test(node.value) &&\n // And the value doesn’t start or end in a blank…\n !/^[\\t ]*(?:[\\r\\n]|$)|(?:^|[\\r\\n])[\\t ]*$/.test(node.value)\n )\n}\n"],"names":["formatCodeAsIndented","node","state"],"mappings":"AAUO,SAASA,EAAqBC,GAAMC,GAAO;AAChD,SAAO,GACLA,EAAM,QAAQ,WAAW,MACvBD,EAAK;AAAA,EAEL,CAACA,EAAK;AAAA,EAEN,WAAW,KAAKA,EAAK,KAAK;AAAA,EAE1B,CAAC,0CAA0C,KAAKA,EAAK,KAAK;AAEhE;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { visit as o } from "../../../../../unist-util-visit@5.0.0/node_modules/unist-util-visit/lib/index.es.js";
|
|
2
|
+
import { toString as a } from "../../../../../mdast-util-to-string@4.0.0/node_modules/mdast-util-to-string/lib/index.es.js";
|
|
3
|
+
import { EXIT as f } from "../../../../../unist-util-visit-parents@6.0.1/node_modules/unist-util-visit-parents/lib/index.es.js";
|
|
4
|
+
function n(t, i) {
|
|
5
|
+
let e = !1;
|
|
6
|
+
return o(t, function(r) {
|
|
7
|
+
if ("value" in r && /\r?\n|\r/.test(r.value) || r.type === "break")
|
|
8
|
+
return e = !0, f;
|
|
9
|
+
}), !!((!t.depth || t.depth < 3) && a(t) && (i.options.setext || e));
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
n as formatHeadingAsSetext
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=format-heading-as-setext.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format-heading-as-setext.es.js","sources":["../../../../../../../../../../node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.js"],"sourcesContent":["/**\n * @import {State} from 'mdast-util-to-markdown'\n * @import {Heading} from 'mdast'\n */\n\nimport {EXIT, visit} from 'unist-util-visit'\nimport {toString} from 'mdast-util-to-string'\n\n/**\n * @param {Heading} node\n * @param {State} state\n * @returns {boolean}\n */\nexport function formatHeadingAsSetext(node, state) {\n let literalWithBreak = false\n\n // Look for literals with a line break.\n // Note that this also\n visit(node, function (node) {\n if (\n ('value' in node && /\\r?\\n|\\r/.test(node.value)) ||\n node.type === 'break'\n ) {\n literalWithBreak = true\n return EXIT\n }\n })\n\n return Boolean(\n (!node.depth || node.depth < 3) &&\n toString(node) &&\n (state.options.setext || literalWithBreak)\n )\n}\n"],"names":["formatHeadingAsSetext","node","state","literalWithBreak","visit","EXIT","toString"],"mappings":";;;AAaO,SAASA,EAAsBC,GAAMC,GAAO;AACjD,MAAIC,IAAmB;AAIvB,SAAAC,EAAMH,GAAM,SAAUA,GAAM;AAC1B,QACG,WAAWA,KAAQ,WAAW,KAAKA,EAAK,KAAK,KAC9CA,EAAK,SAAS;AAEd,aAAAE,IAAmB,IACZE;AAAA,EAEV,CAAA,GAEM,IACJ,CAACJ,EAAK,SAASA,EAAK,QAAQ,MAC3BK,EAASL,CAAI,MACZC,EAAM,QAAQ,UAAUC;AAE/B;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { toString as l } from "../../../../../mdast-util-to-string@4.0.0/node_modules/mdast-util-to-string/lib/index.es.js";
|
|
2
|
+
function a(t, i) {
|
|
3
|
+
const r = l(t);
|
|
4
|
+
return !!(!i.options.resourceLink && // If there’s a url…
|
|
5
|
+
t.url && // And there’s a no title…
|
|
6
|
+
!t.title && // And the content of `node` is a single text node…
|
|
7
|
+
t.children && t.children.length === 1 && t.children[0].type === "text" && // And if the url is the same as the content…
|
|
8
|
+
(r === t.url || "mailto:" + r === t.url) && // And that starts w/ a protocol…
|
|
9
|
+
/^[a-z][a-z+.-]+:/i.test(t.url) && // And that doesn’t contain ASCII control codes (character escapes and
|
|
10
|
+
// references don’t work), space, or angle brackets…
|
|
11
|
+
!/[\0- <>\u007F]/.test(t.url));
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
a as formatLinkAsAutolink
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=format-link-as-autolink.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format-link-as-autolink.es.js","sources":["../../../../../../../../../../node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.js"],"sourcesContent":["/**\n * @import {State} from 'mdast-util-to-markdown'\n * @import {Link} from 'mdast'\n */\n\nimport {toString} from 'mdast-util-to-string'\n\n/**\n * @param {Link} node\n * @param {State} state\n * @returns {boolean}\n */\nexport function formatLinkAsAutolink(node, state) {\n const raw = toString(node)\n\n return Boolean(\n !state.options.resourceLink &&\n // If there’s a url…\n node.url &&\n // And there’s a no title…\n !node.title &&\n // And the content of `node` is a single text node…\n node.children &&\n node.children.length === 1 &&\n node.children[0].type === 'text' &&\n // And if the url is the same as the content…\n (raw === node.url || 'mailto:' + raw === node.url) &&\n // And that starts w/ a protocol…\n /^[a-z][a-z+.-]+:/i.test(node.url) &&\n // And that doesn’t contain ASCII control codes (character escapes and\n // references don’t work), space, or angle brackets…\n !/[\\0- <>\\u007F]/.test(node.url)\n )\n}\n"],"names":["formatLinkAsAutolink","node","state","raw","toString"],"mappings":";AAYO,SAASA,EAAqBC,GAAMC,GAAO;AAChD,QAAMC,IAAMC,EAASH,CAAI;AAEzB,SAAO,GACL,CAACC,EAAM,QAAQ;AAAA,EAEbD,EAAK;AAAA,EAEL,CAACA,EAAK;AAAA,EAENA,EAAK,YACLA,EAAK,SAAS,WAAW,KACzBA,EAAK,SAAS,CAAC,EAAE,SAAS;AAAA,GAEzBE,MAAQF,EAAK,OAAO,YAAYE,MAAQF,EAAK;AAAA,EAE9C,oBAAoB,KAAKA,EAAK,GAAG;AAAA;AAAA,EAGjC,CAAC,iBAAiB,KAAKA,EAAK,GAAG;AAErC;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
function o(e, n) {
|
|
2
|
+
return t(e, n.inConstruct, !0) && !t(e, n.notInConstruct, !1);
|
|
3
|
+
}
|
|
4
|
+
function t(e, n, u) {
|
|
5
|
+
if (typeof n == "string" && (n = [n]), !n || n.length === 0)
|
|
6
|
+
return u;
|
|
7
|
+
let r = -1;
|
|
8
|
+
for (; ++r < n.length; )
|
|
9
|
+
if (e.includes(n[r]))
|
|
10
|
+
return !0;
|
|
11
|
+
return !1;
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
o as patternInScope
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=pattern-in-scope.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pattern-in-scope.es.js","sources":["../../../../../../../../../../node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.js"],"sourcesContent":["/**\n * @import {ConstructName, Unsafe} from 'mdast-util-to-markdown'\n */\n\n/**\n * @param {Array<ConstructName>} stack\n * @param {Unsafe} pattern\n * @returns {boolean}\n */\nexport function patternInScope(stack, pattern) {\n return (\n listInScope(stack, pattern.inConstruct, true) &&\n !listInScope(stack, pattern.notInConstruct, false)\n )\n}\n\n/**\n * @param {Array<ConstructName>} stack\n * @param {Unsafe['inConstruct']} list\n * @param {boolean} none\n * @returns {boolean}\n */\nfunction listInScope(stack, list, none) {\n if (typeof list === 'string') {\n list = [list]\n }\n\n if (!list || list.length === 0) {\n return none\n }\n\n let index = -1\n\n while (++index < list.length) {\n if (stack.includes(list[index])) {\n return true\n }\n }\n\n return false\n}\n"],"names":["patternInScope","stack","pattern","listInScope","list","none","index"],"mappings":"AASO,SAASA,EAAeC,GAAOC,GAAS;AAC7C,SACEC,EAAYF,GAAOC,EAAQ,aAAa,EAAI,KAC5C,CAACC,EAAYF,GAAOC,EAAQ,gBAAgB,EAAK;AAErD;AAQA,SAASC,EAAYF,GAAOG,GAAMC,GAAM;AAKtC,MAJI,OAAOD,KAAS,aAClBA,IAAO,CAACA,CAAI,IAGV,CAACA,KAAQA,EAAK,WAAW;AAC3B,WAAOC;AAGT,MAAIC,IAAQ;AAEZ,SAAO,EAAEA,IAAQF,EAAK;AACpB,QAAIH,EAAM,SAASG,EAAKE,CAAK,CAAC;AAC5B,aAAO;AAIX,SAAO;AACT;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import { asciiAlphanumeric as g, asciiAlpha as A, markdownLineEndingOrSpace as w, unicodeWhitespace as h, unicodePunctuation as v, asciiControl as _ } from "../../../../micromark-util-character@2.1.1/node_modules/micromark-util-character/index.es.js";
|
|
2
|
+
const y = {
|
|
3
|
+
tokenize: U,
|
|
4
|
+
partial: !0
|
|
5
|
+
}, D = {
|
|
6
|
+
tokenize: j,
|
|
7
|
+
partial: !0
|
|
8
|
+
}, L = {
|
|
9
|
+
tokenize: q,
|
|
10
|
+
partial: !0
|
|
11
|
+
}, S = {
|
|
12
|
+
tokenize: F,
|
|
13
|
+
partial: !0
|
|
14
|
+
}, H = {
|
|
15
|
+
tokenize: G,
|
|
16
|
+
partial: !0
|
|
17
|
+
}, W = {
|
|
18
|
+
name: "wwwAutolink",
|
|
19
|
+
tokenize: R,
|
|
20
|
+
previous: C
|
|
21
|
+
}, b = {
|
|
22
|
+
name: "protocolAutolink",
|
|
23
|
+
tokenize: B,
|
|
24
|
+
previous: E
|
|
25
|
+
}, f = {
|
|
26
|
+
name: "emailAutolink",
|
|
27
|
+
tokenize: O,
|
|
28
|
+
previous: T
|
|
29
|
+
}, s = {};
|
|
30
|
+
function K() {
|
|
31
|
+
return {
|
|
32
|
+
text: s
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
let k = 48;
|
|
36
|
+
for (; k < 123; )
|
|
37
|
+
s[k] = f, k++, k === 58 ? k = 65 : k === 91 && (k = 97);
|
|
38
|
+
s[43] = f;
|
|
39
|
+
s[45] = f;
|
|
40
|
+
s[46] = f;
|
|
41
|
+
s[95] = f;
|
|
42
|
+
s[72] = [f, b];
|
|
43
|
+
s[104] = [f, b];
|
|
44
|
+
s[87] = [f, W];
|
|
45
|
+
s[119] = [f, W];
|
|
46
|
+
function O(t, m, l) {
|
|
47
|
+
const u = this;
|
|
48
|
+
let a, e;
|
|
49
|
+
return n;
|
|
50
|
+
function n(i) {
|
|
51
|
+
return !x(i) || !T.call(u, u.previous) || P(u.events) ? l(i) : (t.enter("literalAutolink"), t.enter("literalAutolinkEmail"), r(i));
|
|
52
|
+
}
|
|
53
|
+
function r(i) {
|
|
54
|
+
return x(i) ? (t.consume(i), r) : i === 64 ? (t.consume(i), p) : l(i);
|
|
55
|
+
}
|
|
56
|
+
function p(i) {
|
|
57
|
+
return i === 46 ? t.check(H, z, o)(i) : i === 45 || i === 95 || g(i) ? (e = !0, t.consume(i), p) : z(i);
|
|
58
|
+
}
|
|
59
|
+
function o(i) {
|
|
60
|
+
return t.consume(i), a = !0, p;
|
|
61
|
+
}
|
|
62
|
+
function z(i) {
|
|
63
|
+
return e && a && A(u.previous) ? (t.exit("literalAutolinkEmail"), t.exit("literalAutolink"), m(i)) : l(i);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
function R(t, m, l) {
|
|
67
|
+
const u = this;
|
|
68
|
+
return a;
|
|
69
|
+
function a(n) {
|
|
70
|
+
return n !== 87 && n !== 119 || !C.call(u, u.previous) || P(u.events) ? l(n) : (t.enter("literalAutolink"), t.enter("literalAutolinkWww"), t.check(y, t.attempt(D, t.attempt(L, e), l), l)(n));
|
|
71
|
+
}
|
|
72
|
+
function e(n) {
|
|
73
|
+
return t.exit("literalAutolinkWww"), t.exit("literalAutolink"), m(n);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
function B(t, m, l) {
|
|
77
|
+
const u = this;
|
|
78
|
+
let a = "", e = !1;
|
|
79
|
+
return n;
|
|
80
|
+
function n(i) {
|
|
81
|
+
return (i === 72 || i === 104) && E.call(u, u.previous) && !P(u.events) ? (t.enter("literalAutolink"), t.enter("literalAutolinkHttp"), a += String.fromCodePoint(i), t.consume(i), r) : l(i);
|
|
82
|
+
}
|
|
83
|
+
function r(i) {
|
|
84
|
+
if (A(i) && a.length < 5)
|
|
85
|
+
return a += String.fromCodePoint(i), t.consume(i), r;
|
|
86
|
+
if (i === 58) {
|
|
87
|
+
const I = a.toLowerCase();
|
|
88
|
+
if (I === "http" || I === "https")
|
|
89
|
+
return t.consume(i), p;
|
|
90
|
+
}
|
|
91
|
+
return l(i);
|
|
92
|
+
}
|
|
93
|
+
function p(i) {
|
|
94
|
+
return i === 47 ? (t.consume(i), e ? o : (e = !0, p)) : l(i);
|
|
95
|
+
}
|
|
96
|
+
function o(i) {
|
|
97
|
+
return i === null || _(i) || w(i) || h(i) || v(i) ? l(i) : t.attempt(D, t.attempt(L, z), l)(i);
|
|
98
|
+
}
|
|
99
|
+
function z(i) {
|
|
100
|
+
return t.exit("literalAutolinkHttp"), t.exit("literalAutolink"), m(i);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
function U(t, m, l) {
|
|
104
|
+
let u = 0;
|
|
105
|
+
return a;
|
|
106
|
+
function a(n) {
|
|
107
|
+
return (n === 87 || n === 119) && u < 3 ? (u++, t.consume(n), a) : n === 46 && u === 3 ? (t.consume(n), e) : l(n);
|
|
108
|
+
}
|
|
109
|
+
function e(n) {
|
|
110
|
+
return n === null ? l(n) : m(n);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
function j(t, m, l) {
|
|
114
|
+
let u, a, e;
|
|
115
|
+
return n;
|
|
116
|
+
function n(o) {
|
|
117
|
+
return o === 46 || o === 95 ? t.check(S, p, r)(o) : o === null || w(o) || h(o) || o !== 45 && v(o) ? p(o) : (e = !0, t.consume(o), n);
|
|
118
|
+
}
|
|
119
|
+
function r(o) {
|
|
120
|
+
return o === 95 ? u = !0 : (a = u, u = void 0), t.consume(o), n;
|
|
121
|
+
}
|
|
122
|
+
function p(o) {
|
|
123
|
+
return a || u || !e ? l(o) : m(o);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
function q(t, m) {
|
|
127
|
+
let l = 0, u = 0;
|
|
128
|
+
return a;
|
|
129
|
+
function a(n) {
|
|
130
|
+
return n === 40 ? (l++, t.consume(n), a) : n === 41 && u < l ? e(n) : n === 33 || n === 34 || n === 38 || n === 39 || n === 41 || n === 42 || n === 44 || n === 46 || n === 58 || n === 59 || n === 60 || n === 63 || n === 93 || n === 95 || n === 126 ? t.check(S, m, e)(n) : n === null || w(n) || h(n) ? m(n) : (t.consume(n), a);
|
|
131
|
+
}
|
|
132
|
+
function e(n) {
|
|
133
|
+
return n === 41 && u++, t.consume(n), a;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
function F(t, m, l) {
|
|
137
|
+
return u;
|
|
138
|
+
function u(r) {
|
|
139
|
+
return r === 33 || r === 34 || r === 39 || r === 41 || r === 42 || r === 44 || r === 46 || r === 58 || r === 59 || r === 63 || r === 95 || r === 126 ? (t.consume(r), u) : r === 38 ? (t.consume(r), e) : r === 93 ? (t.consume(r), a) : (
|
|
140
|
+
// `<` is an end.
|
|
141
|
+
r === 60 || // So is whitespace.
|
|
142
|
+
r === null || w(r) || h(r) ? m(r) : l(r)
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
function a(r) {
|
|
146
|
+
return r === null || r === 40 || r === 91 || w(r) || h(r) ? m(r) : u(r);
|
|
147
|
+
}
|
|
148
|
+
function e(r) {
|
|
149
|
+
return A(r) ? n(r) : l(r);
|
|
150
|
+
}
|
|
151
|
+
function n(r) {
|
|
152
|
+
return r === 59 ? (t.consume(r), u) : A(r) ? (t.consume(r), n) : l(r);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
function G(t, m, l) {
|
|
156
|
+
return u;
|
|
157
|
+
function u(e) {
|
|
158
|
+
return t.consume(e), a;
|
|
159
|
+
}
|
|
160
|
+
function a(e) {
|
|
161
|
+
return g(e) ? l(e) : m(e);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
function C(t) {
|
|
165
|
+
return t === null || t === 40 || t === 42 || t === 95 || t === 91 || t === 93 || t === 126 || w(t);
|
|
166
|
+
}
|
|
167
|
+
function E(t) {
|
|
168
|
+
return !A(t);
|
|
169
|
+
}
|
|
170
|
+
function T(t) {
|
|
171
|
+
return !(t === 47 || x(t));
|
|
172
|
+
}
|
|
173
|
+
function x(t) {
|
|
174
|
+
return t === 43 || t === 45 || t === 46 || t === 95 || g(t);
|
|
175
|
+
}
|
|
176
|
+
function P(t) {
|
|
177
|
+
let m = t.length, l = !1;
|
|
178
|
+
for (; m--; ) {
|
|
179
|
+
const u = t[m][1];
|
|
180
|
+
if ((u.type === "labelLink" || u.type === "labelImage") && !u._balanced) {
|
|
181
|
+
l = !0;
|
|
182
|
+
break;
|
|
183
|
+
}
|
|
184
|
+
if (u._gfmAutolinkLiteralWalkedInto) {
|
|
185
|
+
l = !1;
|
|
186
|
+
break;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
return t.length > 0 && !l && (t[t.length - 1][1]._gfmAutolinkLiteralWalkedInto = !0), l;
|
|
190
|
+
}
|
|
191
|
+
export {
|
|
192
|
+
K as gfmAutolinkLiteral
|
|
193
|
+
};
|
|
194
|
+
//# sourceMappingURL=syntax.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"syntax.es.js","sources":["../../../../../../../../../node_modules/.pnpm/micromark-extension-gfm-autolink-literal@2.1.0/node_modules/micromark-extension-gfm-autolink-literal/lib/syntax.js"],"sourcesContent":["/**\n * @import {Code, ConstructRecord, Event, Extension, Previous, State, TokenizeContext, Tokenizer} from 'micromark-util-types'\n */\n\nimport { asciiAlpha, asciiAlphanumeric, asciiControl, markdownLineEndingOrSpace, unicodePunctuation, unicodeWhitespace } from 'micromark-util-character';\nconst wwwPrefix = {\n tokenize: tokenizeWwwPrefix,\n partial: true\n};\nconst domain = {\n tokenize: tokenizeDomain,\n partial: true\n};\nconst path = {\n tokenize: tokenizePath,\n partial: true\n};\nconst trail = {\n tokenize: tokenizeTrail,\n partial: true\n};\nconst emailDomainDotTrail = {\n tokenize: tokenizeEmailDomainDotTrail,\n partial: true\n};\nconst wwwAutolink = {\n name: 'wwwAutolink',\n tokenize: tokenizeWwwAutolink,\n previous: previousWww\n};\nconst protocolAutolink = {\n name: 'protocolAutolink',\n tokenize: tokenizeProtocolAutolink,\n previous: previousProtocol\n};\nconst emailAutolink = {\n name: 'emailAutolink',\n tokenize: tokenizeEmailAutolink,\n previous: previousEmail\n};\n\n/** @type {ConstructRecord} */\nconst text = {};\n\n/**\n * Create an extension for `micromark` to support GitHub autolink literal\n * syntax.\n *\n * @returns {Extension}\n * Extension for `micromark` that can be passed in `extensions` to enable GFM\n * autolink literal syntax.\n */\nexport function gfmAutolinkLiteral() {\n return {\n text\n };\n}\n\n/** @type {Code} */\nlet code = 48;\n\n// Add alphanumerics.\nwhile (code < 123) {\n text[code] = emailAutolink;\n code++;\n if (code === 58) code = 65;else if (code === 91) code = 97;\n}\ntext[43] = emailAutolink;\ntext[45] = emailAutolink;\ntext[46] = emailAutolink;\ntext[95] = emailAutolink;\ntext[72] = [emailAutolink, protocolAutolink];\ntext[104] = [emailAutolink, protocolAutolink];\ntext[87] = [emailAutolink, wwwAutolink];\ntext[119] = [emailAutolink, wwwAutolink];\n\n// To do: perform email autolink literals on events, afterwards.\n// That’s where `markdown-rs` and `cmark-gfm` perform it.\n// It should look for `@`, then for atext backwards, and then for a label\n// forwards.\n// To do: `mailto:`, `xmpp:` protocol as prefix.\n\n/**\n * Email autolink literal.\n *\n * ```markdown\n * > | a contact@example.org b\n * ^^^^^^^^^^^^^^^^^^^\n * ```\n *\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeEmailAutolink(effects, ok, nok) {\n const self = this;\n /** @type {boolean | undefined} */\n let dot;\n /** @type {boolean} */\n let data;\n return start;\n\n /**\n * Start of email autolink literal.\n *\n * ```markdown\n * > | a contact@example.org b\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n if (!gfmAtext(code) || !previousEmail.call(self, self.previous) || previousUnbalanced(self.events)) {\n return nok(code);\n }\n effects.enter('literalAutolink');\n effects.enter('literalAutolinkEmail');\n return atext(code);\n }\n\n /**\n * In email atext.\n *\n * ```markdown\n * > | a contact@example.org b\n * ^\n * ```\n *\n * @type {State}\n */\n function atext(code) {\n if (gfmAtext(code)) {\n effects.consume(code);\n return atext;\n }\n if (code === 64) {\n effects.consume(code);\n return emailDomain;\n }\n return nok(code);\n }\n\n /**\n * In email domain.\n *\n * The reference code is a bit overly complex as it handles the `@`, of which\n * there may be just one.\n * Source: <https://github.com/github/cmark-gfm/blob/ef1cfcb/extensions/autolink.c#L318>\n *\n * ```markdown\n * > | a contact@example.org b\n * ^\n * ```\n *\n * @type {State}\n */\n function emailDomain(code) {\n // Dot followed by alphanumerical (not `-` or `_`).\n if (code === 46) {\n return effects.check(emailDomainDotTrail, emailDomainAfter, emailDomainDot)(code);\n }\n\n // Alphanumerical, `-`, and `_`.\n if (code === 45 || code === 95 || asciiAlphanumeric(code)) {\n data = true;\n effects.consume(code);\n return emailDomain;\n }\n\n // To do: `/` if xmpp.\n\n // Note: normally we’d truncate trailing punctuation from the link.\n // However, email autolink literals cannot contain any of those markers,\n // except for `.`, but that can only occur if it isn’t trailing.\n // So we can ignore truncating!\n return emailDomainAfter(code);\n }\n\n /**\n * In email domain, on dot that is not a trail.\n *\n * ```markdown\n * > | a contact@example.org b\n * ^\n * ```\n *\n * @type {State}\n */\n function emailDomainDot(code) {\n effects.consume(code);\n dot = true;\n return emailDomain;\n }\n\n /**\n * After email domain.\n *\n * ```markdown\n * > | a contact@example.org b\n * ^\n * ```\n *\n * @type {State}\n */\n function emailDomainAfter(code) {\n // Domain must not be empty, must include a dot, and must end in alphabetical.\n // Source: <https://github.com/github/cmark-gfm/blob/ef1cfcb/extensions/autolink.c#L332>.\n if (data && dot && asciiAlpha(self.previous)) {\n effects.exit('literalAutolinkEmail');\n effects.exit('literalAutolink');\n return ok(code);\n }\n return nok(code);\n }\n}\n\n/**\n * `www` autolink literal.\n *\n * ```markdown\n * > | a www.example.org b\n * ^^^^^^^^^^^^^^^\n * ```\n *\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeWwwAutolink(effects, ok, nok) {\n const self = this;\n return wwwStart;\n\n /**\n * Start of www autolink literal.\n *\n * ```markdown\n * > | www.example.com/a?b#c\n * ^\n * ```\n *\n * @type {State}\n */\n function wwwStart(code) {\n if (code !== 87 && code !== 119 || !previousWww.call(self, self.previous) || previousUnbalanced(self.events)) {\n return nok(code);\n }\n effects.enter('literalAutolink');\n effects.enter('literalAutolinkWww');\n // Note: we *check*, so we can discard the `www.` we parsed.\n // If it worked, we consider it as a part of the domain.\n return effects.check(wwwPrefix, effects.attempt(domain, effects.attempt(path, wwwAfter), nok), nok)(code);\n }\n\n /**\n * After a www autolink literal.\n *\n * ```markdown\n * > | www.example.com/a?b#c\n * ^\n * ```\n *\n * @type {State}\n */\n function wwwAfter(code) {\n effects.exit('literalAutolinkWww');\n effects.exit('literalAutolink');\n return ok(code);\n }\n}\n\n/**\n * Protocol autolink literal.\n *\n * ```markdown\n * > | a https://example.org b\n * ^^^^^^^^^^^^^^^^^^^\n * ```\n *\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeProtocolAutolink(effects, ok, nok) {\n const self = this;\n let buffer = '';\n let seen = false;\n return protocolStart;\n\n /**\n * Start of protocol autolink literal.\n *\n * ```markdown\n * > | https://example.com/a?b#c\n * ^\n * ```\n *\n * @type {State}\n */\n function protocolStart(code) {\n if ((code === 72 || code === 104) && previousProtocol.call(self, self.previous) && !previousUnbalanced(self.events)) {\n effects.enter('literalAutolink');\n effects.enter('literalAutolinkHttp');\n buffer += String.fromCodePoint(code);\n effects.consume(code);\n return protocolPrefixInside;\n }\n return nok(code);\n }\n\n /**\n * In protocol.\n *\n * ```markdown\n * > | https://example.com/a?b#c\n * ^^^^^\n * ```\n *\n * @type {State}\n */\n function protocolPrefixInside(code) {\n // `5` is size of `https`\n if (asciiAlpha(code) && buffer.length < 5) {\n // @ts-expect-error: definitely number.\n buffer += String.fromCodePoint(code);\n effects.consume(code);\n return protocolPrefixInside;\n }\n if (code === 58) {\n const protocol = buffer.toLowerCase();\n if (protocol === 'http' || protocol === 'https') {\n effects.consume(code);\n return protocolSlashesInside;\n }\n }\n return nok(code);\n }\n\n /**\n * In slashes.\n *\n * ```markdown\n * > | https://example.com/a?b#c\n * ^^\n * ```\n *\n * @type {State}\n */\n function protocolSlashesInside(code) {\n if (code === 47) {\n effects.consume(code);\n if (seen) {\n return afterProtocol;\n }\n seen = true;\n return protocolSlashesInside;\n }\n return nok(code);\n }\n\n /**\n * After protocol, before domain.\n *\n * ```markdown\n * > | https://example.com/a?b#c\n * ^\n * ```\n *\n * @type {State}\n */\n function afterProtocol(code) {\n // To do: this is different from `markdown-rs`:\n // https://github.com/wooorm/markdown-rs/blob/b3a921c761309ae00a51fe348d8a43adbc54b518/src/construct/gfm_autolink_literal.rs#L172-L182\n return code === null || asciiControl(code) || markdownLineEndingOrSpace(code) || unicodeWhitespace(code) || unicodePunctuation(code) ? nok(code) : effects.attempt(domain, effects.attempt(path, protocolAfter), nok)(code);\n }\n\n /**\n * After a protocol autolink literal.\n *\n * ```markdown\n * > | https://example.com/a?b#c\n * ^\n * ```\n *\n * @type {State}\n */\n function protocolAfter(code) {\n effects.exit('literalAutolinkHttp');\n effects.exit('literalAutolink');\n return ok(code);\n }\n}\n\n/**\n * `www` prefix.\n *\n * ```markdown\n * > | a www.example.org b\n * ^^^^\n * ```\n *\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeWwwPrefix(effects, ok, nok) {\n let size = 0;\n return wwwPrefixInside;\n\n /**\n * In www prefix.\n *\n * ```markdown\n * > | www.example.com\n * ^^^^\n * ```\n *\n * @type {State}\n */\n function wwwPrefixInside(code) {\n if ((code === 87 || code === 119) && size < 3) {\n size++;\n effects.consume(code);\n return wwwPrefixInside;\n }\n if (code === 46 && size === 3) {\n effects.consume(code);\n return wwwPrefixAfter;\n }\n return nok(code);\n }\n\n /**\n * After www prefix.\n *\n * ```markdown\n * > | www.example.com\n * ^\n * ```\n *\n * @type {State}\n */\n function wwwPrefixAfter(code) {\n // If there is *anything*, we can link.\n return code === null ? nok(code) : ok(code);\n }\n}\n\n/**\n * Domain.\n *\n * ```markdown\n * > | a https://example.org b\n * ^^^^^^^^^^^\n * ```\n *\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeDomain(effects, ok, nok) {\n /** @type {boolean | undefined} */\n let underscoreInLastSegment;\n /** @type {boolean | undefined} */\n let underscoreInLastLastSegment;\n /** @type {boolean | undefined} */\n let seen;\n return domainInside;\n\n /**\n * In domain.\n *\n * ```markdown\n * > | https://example.com/a\n * ^^^^^^^^^^^\n * ```\n *\n * @type {State}\n */\n function domainInside(code) {\n // Check whether this marker, which is a trailing punctuation\n // marker, optionally followed by more trailing markers, and then\n // followed by an end.\n if (code === 46 || code === 95) {\n return effects.check(trail, domainAfter, domainAtPunctuation)(code);\n }\n\n // GH documents that only alphanumerics (other than `-`, `.`, and `_`) can\n // occur, which sounds like ASCII only, but they also support `www.點看.com`,\n // so that’s Unicode.\n // Instead of some new production for Unicode alphanumerics, markdown\n // already has that for Unicode punctuation and whitespace, so use those.\n // Source: <https://github.com/github/cmark-gfm/blob/ef1cfcb/extensions/autolink.c#L12>.\n if (code === null || markdownLineEndingOrSpace(code) || unicodeWhitespace(code) || code !== 45 && unicodePunctuation(code)) {\n return domainAfter(code);\n }\n seen = true;\n effects.consume(code);\n return domainInside;\n }\n\n /**\n * In domain, at potential trailing punctuation, that was not trailing.\n *\n * ```markdown\n * > | https://example.com\n * ^\n * ```\n *\n * @type {State}\n */\n function domainAtPunctuation(code) {\n // There is an underscore in the last segment of the domain\n if (code === 95) {\n underscoreInLastSegment = true;\n }\n // Otherwise, it’s a `.`: save the last segment underscore in the\n // penultimate segment slot.\n else {\n underscoreInLastLastSegment = underscoreInLastSegment;\n underscoreInLastSegment = undefined;\n }\n effects.consume(code);\n return domainInside;\n }\n\n /**\n * After domain.\n *\n * ```markdown\n * > | https://example.com/a\n * ^\n * ```\n *\n * @type {State} */\n function domainAfter(code) {\n // Note: that’s GH says a dot is needed, but it’s not true:\n // <https://github.com/github/cmark-gfm/issues/279>\n if (underscoreInLastLastSegment || underscoreInLastSegment || !seen) {\n return nok(code);\n }\n return ok(code);\n }\n}\n\n/**\n * Path.\n *\n * ```markdown\n * > | a https://example.org/stuff b\n * ^^^^^^\n * ```\n *\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizePath(effects, ok) {\n let sizeOpen = 0;\n let sizeClose = 0;\n return pathInside;\n\n /**\n * In path.\n *\n * ```markdown\n * > | https://example.com/a\n * ^^\n * ```\n *\n * @type {State}\n */\n function pathInside(code) {\n if (code === 40) {\n sizeOpen++;\n effects.consume(code);\n return pathInside;\n }\n\n // To do: `markdown-rs` also needs this.\n // If this is a paren, and there are less closings than openings,\n // we don’t check for a trail.\n if (code === 41 && sizeClose < sizeOpen) {\n return pathAtPunctuation(code);\n }\n\n // Check whether this trailing punctuation marker is optionally\n // followed by more trailing markers, and then followed\n // by an end.\n if (code === 33 || code === 34 || code === 38 || code === 39 || code === 41 || code === 42 || code === 44 || code === 46 || code === 58 || code === 59 || code === 60 || code === 63 || code === 93 || code === 95 || code === 126) {\n return effects.check(trail, ok, pathAtPunctuation)(code);\n }\n if (code === null || markdownLineEndingOrSpace(code) || unicodeWhitespace(code)) {\n return ok(code);\n }\n effects.consume(code);\n return pathInside;\n }\n\n /**\n * In path, at potential trailing punctuation, that was not trailing.\n *\n * ```markdown\n * > | https://example.com/a\"b\n * ^\n * ```\n *\n * @type {State}\n */\n function pathAtPunctuation(code) {\n // Count closing parens.\n if (code === 41) {\n sizeClose++;\n }\n effects.consume(code);\n return pathInside;\n }\n}\n\n/**\n * Trail.\n *\n * This calls `ok` if this *is* the trail, followed by an end, which means\n * the entire trail is not part of the link.\n * It calls `nok` if this *is* part of the link.\n *\n * ```markdown\n * > | https://example.com\").\n * ^^^\n * ```\n *\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeTrail(effects, ok, nok) {\n return trail;\n\n /**\n * In trail of domain or path.\n *\n * ```markdown\n * > | https://example.com\").\n * ^\n * ```\n *\n * @type {State}\n */\n function trail(code) {\n // Regular trailing punctuation.\n if (code === 33 || code === 34 || code === 39 || code === 41 || code === 42 || code === 44 || code === 46 || code === 58 || code === 59 || code === 63 || code === 95 || code === 126) {\n effects.consume(code);\n return trail;\n }\n\n // `&` followed by one or more alphabeticals and then a `;`, is\n // as a whole considered as trailing punctuation.\n // In all other cases, it is considered as continuation of the URL.\n if (code === 38) {\n effects.consume(code);\n return trailCharacterReferenceStart;\n }\n\n // Needed because we allow literals after `[`, as we fix:\n // <https://github.com/github/cmark-gfm/issues/278>.\n // Check that it is not followed by `(` or `[`.\n if (code === 93) {\n effects.consume(code);\n return trailBracketAfter;\n }\n if (\n // `<` is an end.\n code === 60 ||\n // So is whitespace.\n code === null || markdownLineEndingOrSpace(code) || unicodeWhitespace(code)) {\n return ok(code);\n }\n return nok(code);\n }\n\n /**\n * In trail, after `]`.\n *\n * > 👉 **Note**: this deviates from `cmark-gfm` to fix a bug.\n * > See end of <https://github.com/github/cmark-gfm/issues/278> for more.\n *\n * ```markdown\n * > | https://example.com](\n * ^\n * ```\n *\n * @type {State}\n */\n function trailBracketAfter(code) {\n // Whitespace or something that could start a resource or reference is the end.\n // Switch back to trail otherwise.\n if (code === null || code === 40 || code === 91 || markdownLineEndingOrSpace(code) || unicodeWhitespace(code)) {\n return ok(code);\n }\n return trail(code);\n }\n\n /**\n * In character-reference like trail, after `&`.\n *\n * ```markdown\n * > | https://example.com&).\n * ^\n * ```\n *\n * @type {State}\n */\n function trailCharacterReferenceStart(code) {\n // When non-alpha, it’s not a trail.\n return asciiAlpha(code) ? trailCharacterReferenceInside(code) : nok(code);\n }\n\n /**\n * In character-reference like trail.\n *\n * ```markdown\n * > | https://example.com&).\n * ^\n * ```\n *\n * @type {State}\n */\n function trailCharacterReferenceInside(code) {\n // Switch back to trail if this is well-formed.\n if (code === 59) {\n effects.consume(code);\n return trail;\n }\n if (asciiAlpha(code)) {\n effects.consume(code);\n return trailCharacterReferenceInside;\n }\n\n // It’s not a trail.\n return nok(code);\n }\n}\n\n/**\n * Dot in email domain trail.\n *\n * This calls `ok` if this *is* the trail, followed by an end, which means\n * the trail is not part of the link.\n * It calls `nok` if this *is* part of the link.\n *\n * ```markdown\n * > | contact@example.org.\n * ^\n * ```\n *\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeEmailDomainDotTrail(effects, ok, nok) {\n return start;\n\n /**\n * Dot.\n *\n * ```markdown\n * > | contact@example.org.\n * ^ ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n // Must be dot.\n effects.consume(code);\n return after;\n }\n\n /**\n * After dot.\n *\n * ```markdown\n * > | contact@example.org.\n * ^ ^\n * ```\n *\n * @type {State}\n */\n function after(code) {\n // Not a trail if alphanumeric.\n return asciiAlphanumeric(code) ? nok(code) : ok(code);\n }\n}\n\n/**\n * See:\n * <https://github.com/github/cmark-gfm/blob/ef1cfcb/extensions/autolink.c#L156>.\n *\n * @type {Previous}\n */\nfunction previousWww(code) {\n return code === null || code === 40 || code === 42 || code === 95 || code === 91 || code === 93 || code === 126 || markdownLineEndingOrSpace(code);\n}\n\n/**\n * See:\n * <https://github.com/github/cmark-gfm/blob/ef1cfcb/extensions/autolink.c#L214>.\n *\n * @type {Previous}\n */\nfunction previousProtocol(code) {\n return !asciiAlpha(code);\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Previous}\n */\nfunction previousEmail(code) {\n // Do not allow a slash “inside” atext.\n // The reference code is a bit weird, but that’s what it results in.\n // Source: <https://github.com/github/cmark-gfm/blob/ef1cfcb/extensions/autolink.c#L307>.\n // Other than slash, every preceding character is allowed.\n return !(code === 47 || gfmAtext(code));\n}\n\n/**\n * @param {Code} code\n * @returns {boolean}\n */\nfunction gfmAtext(code) {\n return code === 43 || code === 45 || code === 46 || code === 95 || asciiAlphanumeric(code);\n}\n\n/**\n * @param {Array<Event>} events\n * @returns {boolean}\n */\nfunction previousUnbalanced(events) {\n let index = events.length;\n let result = false;\n while (index--) {\n const token = events[index][1];\n if ((token.type === 'labelLink' || token.type === 'labelImage') && !token._balanced) {\n result = true;\n break;\n }\n\n // If we’ve seen this token, and it was marked as not having any unbalanced\n // bracket before it, we can exit.\n if (token._gfmAutolinkLiteralWalkedInto) {\n result = false;\n break;\n }\n }\n if (events.length > 0 && !result) {\n // Mark the last token as “walked into” w/o finding\n // anything.\n events[events.length - 1][1]._gfmAutolinkLiteralWalkedInto = true;\n }\n return result;\n}"],"names":["wwwPrefix","tokenizeWwwPrefix","domain","tokenizeDomain","path","tokenizePath","trail","tokenizeTrail","emailDomainDotTrail","tokenizeEmailDomainDotTrail","wwwAutolink","tokenizeWwwAutolink","previousWww","protocolAutolink","tokenizeProtocolAutolink","previousProtocol","emailAutolink","tokenizeEmailAutolink","previousEmail","text","gfmAutolinkLiteral","code","effects","ok","nok","self","dot","data","start","gfmAtext","previousUnbalanced","atext","emailDomain","emailDomainAfter","emailDomainDot","asciiAlphanumeric","asciiAlpha","wwwStart","wwwAfter","buffer","seen","protocolStart","protocolPrefixInside","protocol","protocolSlashesInside","afterProtocol","asciiControl","markdownLineEndingOrSpace","unicodeWhitespace","unicodePunctuation","protocolAfter","size","wwwPrefixInside","wwwPrefixAfter","underscoreInLastSegment","underscoreInLastLastSegment","domainInside","domainAfter","domainAtPunctuation","sizeOpen","sizeClose","pathInside","pathAtPunctuation","trailCharacterReferenceStart","trailBracketAfter","trailCharacterReferenceInside","after","events","index","result","token"],"mappings":";AAKA,MAAMA,IAAY;AAAA,EAChB,UAAUC;AAAA,EACV,SAAS;AACX,GACMC,IAAS;AAAA,EACb,UAAUC;AAAA,EACV,SAAS;AACX,GACMC,IAAO;AAAA,EACX,UAAUC;AAAA,EACV,SAAS;AACX,GACM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ACE,SAAIF,EAAO,SAAS,KAAK,CAACE,MAGxBF,EAAOA,EAAO,SAAS,CAAC,EAAE,CAAC,EAAE,gCAAgC,KAExDE;AACT;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import { factorySpace as b } from "../../../../micromark-factory-space@2.0.1/node_modules/micromark-factory-space/index.es.js";
|
|
2
|
+
import { markdownLineEndingOrSpace as s } from "../../../../micromark-util-character@2.1.1/node_modules/micromark-util-character/index.es.js";
|
|
3
|
+
import { normalizeIdentifier as p } from "../../../../micromark-util-normalize-identifier@2.0.1/node_modules/micromark-util-normalize-identifier/index.es.js";
|
|
4
|
+
import { blankLine as D } from "../../../../micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/blank-line.es.js";
|
|
5
|
+
const x = {
|
|
6
|
+
tokenize: d,
|
|
7
|
+
partial: !0
|
|
8
|
+
};
|
|
9
|
+
function P() {
|
|
10
|
+
return {
|
|
11
|
+
document: {
|
|
12
|
+
91: {
|
|
13
|
+
name: "gfmFootnoteDefinition",
|
|
14
|
+
tokenize: L,
|
|
15
|
+
continuation: {
|
|
16
|
+
tokenize: z
|
|
17
|
+
},
|
|
18
|
+
exit: c
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
text: {
|
|
22
|
+
91: {
|
|
23
|
+
name: "gfmFootnoteCall",
|
|
24
|
+
tokenize: y
|
|
25
|
+
},
|
|
26
|
+
93: {
|
|
27
|
+
name: "gfmPotentialFootnoteCall",
|
|
28
|
+
add: "after",
|
|
29
|
+
tokenize: M,
|
|
30
|
+
resolveTo: S
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
function M(t, r, n) {
|
|
36
|
+
const o = this;
|
|
37
|
+
let u = o.events.length;
|
|
38
|
+
const l = o.parser.gfmFootnotes || (o.parser.gfmFootnotes = []);
|
|
39
|
+
let a;
|
|
40
|
+
for (; u--; ) {
|
|
41
|
+
const m = o.events[u][1];
|
|
42
|
+
if (m.type === "labelImage") {
|
|
43
|
+
a = m;
|
|
44
|
+
break;
|
|
45
|
+
}
|
|
46
|
+
if (m.type === "gfmFootnoteCall" || m.type === "labelLink" || m.type === "label" || m.type === "image" || m.type === "link")
|
|
47
|
+
break;
|
|
48
|
+
}
|
|
49
|
+
return f;
|
|
50
|
+
function f(m) {
|
|
51
|
+
if (!a || !a._balanced)
|
|
52
|
+
return n(m);
|
|
53
|
+
const g = p(o.sliceSerialize({
|
|
54
|
+
start: a.end,
|
|
55
|
+
end: o.now()
|
|
56
|
+
}));
|
|
57
|
+
return g.codePointAt(0) !== 94 || !l.includes(g.slice(1)) ? n(m) : (t.enter("gfmFootnoteCallLabelMarker"), t.consume(m), t.exit("gfmFootnoteCallLabelMarker"), r(m));
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
function S(t, r) {
|
|
61
|
+
let n = t.length;
|
|
62
|
+
for (; n--; )
|
|
63
|
+
if (t[n][1].type === "labelImage" && t[n][0] === "enter") {
|
|
64
|
+
t[n][1];
|
|
65
|
+
break;
|
|
66
|
+
}
|
|
67
|
+
t[n + 1][1].type = "data", t[n + 3][1].type = "gfmFootnoteCallLabelMarker";
|
|
68
|
+
const o = {
|
|
69
|
+
type: "gfmFootnoteCall",
|
|
70
|
+
start: Object.assign({}, t[n + 3][1].start),
|
|
71
|
+
end: Object.assign({}, t[t.length - 1][1].end)
|
|
72
|
+
}, u = {
|
|
73
|
+
type: "gfmFootnoteCallMarker",
|
|
74
|
+
start: Object.assign({}, t[n + 3][1].end),
|
|
75
|
+
end: Object.assign({}, t[n + 3][1].end)
|
|
76
|
+
};
|
|
77
|
+
u.end.column++, u.end.offset++, u.end._bufferIndex++;
|
|
78
|
+
const l = {
|
|
79
|
+
type: "gfmFootnoteCallString",
|
|
80
|
+
start: Object.assign({}, u.end),
|
|
81
|
+
end: Object.assign({}, t[t.length - 1][1].start)
|
|
82
|
+
}, a = {
|
|
83
|
+
type: "chunkString",
|
|
84
|
+
contentType: "string",
|
|
85
|
+
start: Object.assign({}, l.start),
|
|
86
|
+
end: Object.assign({}, l.end)
|
|
87
|
+
}, f = [
|
|
88
|
+
// Take the `labelImageMarker` (now `data`, the `!`)
|
|
89
|
+
t[n + 1],
|
|
90
|
+
t[n + 2],
|
|
91
|
+
["enter", o, r],
|
|
92
|
+
// The `[`
|
|
93
|
+
t[n + 3],
|
|
94
|
+
t[n + 4],
|
|
95
|
+
// The `^`.
|
|
96
|
+
["enter", u, r],
|
|
97
|
+
["exit", u, r],
|
|
98
|
+
// Everything in between.
|
|
99
|
+
["enter", l, r],
|
|
100
|
+
["enter", a, r],
|
|
101
|
+
["exit", a, r],
|
|
102
|
+
["exit", l, r],
|
|
103
|
+
// The ending (`]`, properly parsed and labelled).
|
|
104
|
+
t[t.length - 2],
|
|
105
|
+
t[t.length - 1],
|
|
106
|
+
["exit", o, r]
|
|
107
|
+
];
|
|
108
|
+
return t.splice(n, t.length - n + 1, ...f), t;
|
|
109
|
+
}
|
|
110
|
+
function y(t, r, n) {
|
|
111
|
+
const o = this, u = o.parser.gfmFootnotes || (o.parser.gfmFootnotes = []);
|
|
112
|
+
let l = 0, a;
|
|
113
|
+
return f;
|
|
114
|
+
function f(i) {
|
|
115
|
+
return t.enter("gfmFootnoteCall"), t.enter("gfmFootnoteCallLabelMarker"), t.consume(i), t.exit("gfmFootnoteCallLabelMarker"), m;
|
|
116
|
+
}
|
|
117
|
+
function m(i) {
|
|
118
|
+
return i !== 94 ? n(i) : (t.enter("gfmFootnoteCallMarker"), t.consume(i), t.exit("gfmFootnoteCallMarker"), t.enter("gfmFootnoteCallString"), t.enter("chunkString").contentType = "string", g);
|
|
119
|
+
}
|
|
120
|
+
function g(i) {
|
|
121
|
+
if (
|
|
122
|
+
// Too long.
|
|
123
|
+
l > 999 || // Closing brace with nothing.
|
|
124
|
+
i === 93 && !a || // Space or tab is not supported by GFM for some reason.
|
|
125
|
+
// `\n` and `[` not being supported makes sense.
|
|
126
|
+
i === null || i === 91 || s(i)
|
|
127
|
+
)
|
|
128
|
+
return n(i);
|
|
129
|
+
if (i === 93) {
|
|
130
|
+
t.exit("chunkString");
|
|
131
|
+
const k = t.exit("gfmFootnoteCallString");
|
|
132
|
+
return u.includes(p(o.sliceSerialize(k))) ? (t.enter("gfmFootnoteCallLabelMarker"), t.consume(i), t.exit("gfmFootnoteCallLabelMarker"), t.exit("gfmFootnoteCall"), r) : n(i);
|
|
133
|
+
}
|
|
134
|
+
return s(i) || (a = !0), l++, t.consume(i), i === 92 ? F : g;
|
|
135
|
+
}
|
|
136
|
+
function F(i) {
|
|
137
|
+
return i === 91 || i === 92 || i === 93 ? (t.consume(i), l++, g) : g(i);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
function L(t, r, n) {
|
|
141
|
+
const o = this, u = o.parser.gfmFootnotes || (o.parser.gfmFootnotes = []);
|
|
142
|
+
let l, a = 0, f;
|
|
143
|
+
return m;
|
|
144
|
+
function m(e) {
|
|
145
|
+
return t.enter("gfmFootnoteDefinition")._container = !0, t.enter("gfmFootnoteDefinitionLabel"), t.enter("gfmFootnoteDefinitionLabelMarker"), t.consume(e), t.exit("gfmFootnoteDefinitionLabelMarker"), g;
|
|
146
|
+
}
|
|
147
|
+
function g(e) {
|
|
148
|
+
return e === 94 ? (t.enter("gfmFootnoteDefinitionMarker"), t.consume(e), t.exit("gfmFootnoteDefinitionMarker"), t.enter("gfmFootnoteDefinitionLabelString"), t.enter("chunkString").contentType = "string", F) : n(e);
|
|
149
|
+
}
|
|
150
|
+
function F(e) {
|
|
151
|
+
if (
|
|
152
|
+
// Too long.
|
|
153
|
+
a > 999 || // Closing brace with nothing.
|
|
154
|
+
e === 93 && !f || // Space or tab is not supported by GFM for some reason.
|
|
155
|
+
// `\n` and `[` not being supported makes sense.
|
|
156
|
+
e === null || e === 91 || s(e)
|
|
157
|
+
)
|
|
158
|
+
return n(e);
|
|
159
|
+
if (e === 93) {
|
|
160
|
+
t.exit("chunkString");
|
|
161
|
+
const C = t.exit("gfmFootnoteDefinitionLabelString");
|
|
162
|
+
return l = p(o.sliceSerialize(C)), t.enter("gfmFootnoteDefinitionLabelMarker"), t.consume(e), t.exit("gfmFootnoteDefinitionLabelMarker"), t.exit("gfmFootnoteDefinitionLabel"), k;
|
|
163
|
+
}
|
|
164
|
+
return s(e) || (f = !0), a++, t.consume(e), e === 92 ? i : F;
|
|
165
|
+
}
|
|
166
|
+
function i(e) {
|
|
167
|
+
return e === 91 || e === 92 || e === 93 ? (t.consume(e), a++, F) : F(e);
|
|
168
|
+
}
|
|
169
|
+
function k(e) {
|
|
170
|
+
return e === 58 ? (t.enter("definitionMarker"), t.consume(e), t.exit("definitionMarker"), u.includes(l) || u.push(l), b(t, h, "gfmFootnoteDefinitionWhitespace")) : n(e);
|
|
171
|
+
}
|
|
172
|
+
function h(e) {
|
|
173
|
+
return r(e);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
function z(t, r, n) {
|
|
177
|
+
return t.check(D, r, t.attempt(x, r, n));
|
|
178
|
+
}
|
|
179
|
+
function c(t) {
|
|
180
|
+
t.exit("gfmFootnoteDefinition");
|
|
181
|
+
}
|
|
182
|
+
function d(t, r, n) {
|
|
183
|
+
const o = this;
|
|
184
|
+
return b(t, u, "gfmFootnoteDefinitionIndent", 5);
|
|
185
|
+
function u(l) {
|
|
186
|
+
const a = o.events[o.events.length - 1];
|
|
187
|
+
return a && a[1].type === "gfmFootnoteDefinitionIndent" && a[2].sliceSerialize(a[1], !0).length === 4 ? r(l) : n(l);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
export {
|
|
191
|
+
P as gfmFootnote
|
|
192
|
+
};
|
|
193
|
+
//# sourceMappingURL=syntax.es.js.map
|