myst-to-react 0.1.18 → 0.1.19

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 (242) hide show
  1. package/dist/cjs/admonitions.d.ts +32 -0
  2. package/dist/cjs/admonitions.d.ts.map +1 -0
  3. package/dist/cjs/admonitions.js +126 -0
  4. package/dist/cjs/basic.d.ts +62 -0
  5. package/dist/cjs/basic.d.ts.map +1 -0
  6. package/dist/cjs/basic.js +125 -0
  7. package/dist/cjs/card.d.ts +27 -0
  8. package/dist/cjs/card.d.ts.map +1 -0
  9. package/dist/cjs/card.js +64 -0
  10. package/dist/cjs/cite.d.ts +6 -0
  11. package/dist/cjs/cite.d.ts.map +1 -0
  12. package/dist/cjs/cite.js +36 -0
  13. package/dist/cjs/code.d.ts +20 -0
  14. package/dist/cjs/code.d.ts.map +1 -0
  15. package/dist/cjs/code.js +63 -0
  16. package/dist/cjs/components/ClickPopover.d.ts +11 -0
  17. package/dist/cjs/components/ClickPopover.d.ts.map +1 -0
  18. package/dist/cjs/components/ClickPopover.js +18 -0
  19. package/dist/cjs/components/CopyIcon.d.ts +5 -0
  20. package/dist/cjs/components/CopyIcon.d.ts.map +1 -0
  21. package/dist/cjs/components/CopyIcon.js +28 -0
  22. package/dist/cjs/components/HoverPopover.d.ts +9 -0
  23. package/dist/cjs/components/HoverPopover.d.ts.map +1 -0
  24. package/dist/cjs/components/HoverPopover.js +32 -0
  25. package/dist/cjs/components/LinkCard.d.ts +11 -0
  26. package/dist/cjs/components/LinkCard.d.ts.map +1 -0
  27. package/dist/cjs/components/LinkCard.js +15 -0
  28. package/dist/cjs/convertToReact.d.ts +6 -0
  29. package/dist/cjs/convertToReact.d.ts.map +1 -0
  30. package/dist/cjs/convertToReact.js +30 -0
  31. package/dist/cjs/crossReference.d.ts +13 -0
  32. package/dist/cjs/crossReference.d.ts.map +1 -0
  33. package/dist/cjs/crossReference.js +91 -0
  34. package/dist/cjs/dropdown.d.ts +16 -0
  35. package/dist/cjs/dropdown.d.ts.map +1 -0
  36. package/dist/cjs/dropdown.js +27 -0
  37. package/dist/cjs/extensions/chemicalFormula.d.ts +7 -0
  38. package/dist/cjs/extensions/chemicalFormula.d.ts.map +1 -0
  39. package/dist/cjs/extensions/chemicalFormula.js +39 -0
  40. package/dist/cjs/extensions/index.d.ts +4 -0
  41. package/dist/cjs/extensions/index.d.ts.map +1 -0
  42. package/dist/cjs/extensions/index.js +9 -0
  43. package/dist/cjs/extensions/siunits.d.ts +7 -0
  44. package/dist/cjs/extensions/siunits.d.ts.map +1 -0
  45. package/dist/cjs/extensions/siunits.js +12 -0
  46. package/dist/cjs/footnotes.d.ts +11 -0
  47. package/dist/cjs/footnotes.d.ts.map +1 -0
  48. package/dist/cjs/footnotes.js +24 -0
  49. package/dist/cjs/grid.d.ts +11 -0
  50. package/dist/cjs/grid.d.ts.map +1 -0
  51. package/dist/cjs/grid.js +117 -0
  52. package/dist/cjs/heading.d.ts +14 -0
  53. package/dist/cjs/heading.d.ts.map +1 -0
  54. package/dist/cjs/heading.js +40 -0
  55. package/dist/cjs/iframe.d.ts +7 -0
  56. package/dist/cjs/iframe.d.ts.map +1 -0
  57. package/dist/cjs/iframe.js +24 -0
  58. package/dist/cjs/image.d.ts +11 -0
  59. package/dist/cjs/image.d.ts.map +1 -0
  60. package/dist/cjs/image.js +52 -0
  61. package/dist/cjs/index.d.ts +10 -0
  62. package/dist/cjs/index.d.ts.map +1 -0
  63. package/dist/cjs/index.js +46 -0
  64. package/dist/cjs/inlineError.d.ts +8 -0
  65. package/dist/cjs/inlineError.d.ts.map +1 -0
  66. package/dist/cjs/inlineError.js +9 -0
  67. package/dist/cjs/links/github.d.ts +12 -0
  68. package/dist/cjs/links/github.d.ts.map +1 -0
  69. package/dist/cjs/links/github.js +63 -0
  70. package/dist/cjs/links/index.d.ts +14 -0
  71. package/dist/cjs/links/index.d.ts.map +1 -0
  72. package/dist/cjs/links/index.js +68 -0
  73. package/dist/cjs/links/rrid.d.ts +5 -0
  74. package/dist/cjs/links/rrid.d.ts.map +1 -0
  75. package/dist/cjs/links/rrid.js +35 -0
  76. package/dist/cjs/links/wiki.d.ts +8 -0
  77. package/dist/cjs/links/wiki.d.ts.map +1 -0
  78. package/dist/cjs/links/wiki.js +39 -0
  79. package/dist/cjs/math.d.ts +13 -0
  80. package/dist/cjs/math.d.ts.map +1 -0
  81. package/dist/cjs/math.js +29 -0
  82. package/dist/cjs/output/components.d.ts +10 -0
  83. package/dist/cjs/output/components.d.ts.map +1 -0
  84. package/dist/cjs/output/components.js +41 -0
  85. package/dist/cjs/output/error.d.ts +6 -0
  86. package/dist/cjs/output/error.d.ts.map +1 -0
  87. package/dist/cjs/output/error.js +15 -0
  88. package/dist/cjs/output/hooks.d.ts +67 -0
  89. package/dist/cjs/output/hooks.d.ts.map +1 -0
  90. package/dist/cjs/output/hooks.js +85 -0
  91. package/dist/cjs/output/index.d.ts +6 -0
  92. package/dist/cjs/output/index.d.ts.map +1 -0
  93. package/dist/cjs/output/index.js +7 -0
  94. package/dist/cjs/output/jupyter.d.ts +7 -0
  95. package/dist/cjs/output/jupyter.d.ts.map +1 -0
  96. package/dist/cjs/output/jupyter.js +75 -0
  97. package/dist/cjs/output/output.d.ts +7 -0
  98. package/dist/cjs/output/output.d.ts.map +1 -0
  99. package/dist/cjs/output/output.js +66 -0
  100. package/dist/cjs/output/outputBlock.d.ts +10 -0
  101. package/dist/cjs/output/outputBlock.d.ts.map +1 -0
  102. package/dist/cjs/output/outputBlock.js +13 -0
  103. package/dist/cjs/output/safe.d.ts +7 -0
  104. package/dist/cjs/output/safe.d.ts.map +1 -0
  105. package/dist/cjs/output/safe.js +77 -0
  106. package/dist/cjs/output/selectors.d.ts +10 -0
  107. package/dist/cjs/output/selectors.d.ts.map +1 -0
  108. package/dist/cjs/output/selectors.js +10 -0
  109. package/dist/cjs/output/stream.d.ts +6 -0
  110. package/dist/cjs/output/stream.d.ts.map +1 -0
  111. package/dist/cjs/output/stream.js +13 -0
  112. package/dist/cjs/reactive.d.ts +88 -0
  113. package/dist/cjs/reactive.d.ts.map +1 -0
  114. package/dist/cjs/reactive.js +64 -0
  115. package/dist/cjs/tabs.d.ts +12 -0
  116. package/dist/cjs/tabs.d.ts.map +1 -0
  117. package/dist/cjs/tabs.js +38 -0
  118. package/dist/cjs/types.d.ts +7 -0
  119. package/dist/cjs/types.d.ts.map +1 -0
  120. package/dist/cjs/types.js +2 -0
  121. package/dist/types/admonitions.d.ts +32 -0
  122. package/dist/types/admonitions.d.ts.map +1 -0
  123. package/dist/types/basic.d.ts +62 -0
  124. package/dist/types/basic.d.ts.map +1 -0
  125. package/dist/types/card.d.ts +27 -0
  126. package/dist/types/card.d.ts.map +1 -0
  127. package/dist/types/cite.d.ts +6 -0
  128. package/dist/types/cite.d.ts.map +1 -0
  129. package/dist/types/code.d.ts +20 -0
  130. package/dist/types/code.d.ts.map +1 -0
  131. package/dist/types/components/ClickPopover.d.ts +11 -0
  132. package/dist/types/components/ClickPopover.d.ts.map +1 -0
  133. package/dist/types/components/CopyIcon.d.ts +5 -0
  134. package/dist/types/components/CopyIcon.d.ts.map +1 -0
  135. package/dist/types/components/HoverPopover.d.ts +9 -0
  136. package/dist/types/components/HoverPopover.d.ts.map +1 -0
  137. package/dist/types/components/LinkCard.d.ts +11 -0
  138. package/dist/types/components/LinkCard.d.ts.map +1 -0
  139. package/dist/types/convertToReact.d.ts +6 -0
  140. package/dist/types/convertToReact.d.ts.map +1 -0
  141. package/dist/types/crossReference.d.ts +13 -0
  142. package/dist/types/crossReference.d.ts.map +1 -0
  143. package/dist/types/dropdown.d.ts +16 -0
  144. package/dist/types/dropdown.d.ts.map +1 -0
  145. package/dist/types/extensions/chemicalFormula.d.ts +7 -0
  146. package/dist/types/extensions/chemicalFormula.d.ts.map +1 -0
  147. package/dist/types/extensions/index.d.ts +4 -0
  148. package/dist/types/extensions/index.d.ts.map +1 -0
  149. package/dist/types/extensions/siunits.d.ts +7 -0
  150. package/dist/types/extensions/siunits.d.ts.map +1 -0
  151. package/dist/types/footnotes.d.ts +11 -0
  152. package/dist/types/footnotes.d.ts.map +1 -0
  153. package/dist/types/grid.d.ts +11 -0
  154. package/dist/types/grid.d.ts.map +1 -0
  155. package/dist/types/heading.d.ts +14 -0
  156. package/dist/types/heading.d.ts.map +1 -0
  157. package/dist/types/iframe.d.ts +7 -0
  158. package/dist/types/iframe.d.ts.map +1 -0
  159. package/dist/types/image.d.ts +11 -0
  160. package/dist/types/image.d.ts.map +1 -0
  161. package/dist/types/index.d.ts +10 -0
  162. package/dist/types/index.d.ts.map +1 -0
  163. package/dist/types/inlineError.d.ts +8 -0
  164. package/dist/types/inlineError.d.ts.map +1 -0
  165. package/dist/types/links/github.d.ts +12 -0
  166. package/dist/types/links/github.d.ts.map +1 -0
  167. package/dist/types/links/index.d.ts +14 -0
  168. package/dist/types/links/index.d.ts.map +1 -0
  169. package/dist/types/links/rrid.d.ts +5 -0
  170. package/dist/types/links/rrid.d.ts.map +1 -0
  171. package/dist/types/links/wiki.d.ts +8 -0
  172. package/dist/types/links/wiki.d.ts.map +1 -0
  173. package/dist/types/math.d.ts +13 -0
  174. package/dist/types/math.d.ts.map +1 -0
  175. package/dist/types/output/components.d.ts +10 -0
  176. package/dist/types/output/components.d.ts.map +1 -0
  177. package/dist/types/output/error.d.ts +6 -0
  178. package/dist/types/output/error.d.ts.map +1 -0
  179. package/dist/types/output/hooks.d.ts +67 -0
  180. package/dist/types/output/hooks.d.ts.map +1 -0
  181. package/dist/types/output/index.d.ts +6 -0
  182. package/dist/types/output/index.d.ts.map +1 -0
  183. package/dist/types/output/jupyter.d.ts +7 -0
  184. package/dist/types/output/jupyter.d.ts.map +1 -0
  185. package/dist/types/output/output.d.ts +7 -0
  186. package/dist/types/output/output.d.ts.map +1 -0
  187. package/dist/types/output/outputBlock.d.ts +10 -0
  188. package/dist/types/output/outputBlock.d.ts.map +1 -0
  189. package/dist/types/output/safe.d.ts +7 -0
  190. package/dist/types/output/safe.d.ts.map +1 -0
  191. package/dist/types/output/selectors.d.ts +10 -0
  192. package/dist/types/output/selectors.d.ts.map +1 -0
  193. package/dist/types/output/stream.d.ts +6 -0
  194. package/dist/types/output/stream.d.ts.map +1 -0
  195. package/dist/types/reactive.d.ts +88 -0
  196. package/dist/types/reactive.d.ts.map +1 -0
  197. package/dist/types/tabs.d.ts +12 -0
  198. package/dist/types/tabs.d.ts.map +1 -0
  199. package/dist/types/types.d.ts +7 -0
  200. package/dist/types/types.d.ts.map +1 -0
  201. package/package.json +20 -19
  202. package/src/admonitions.tsx +0 -183
  203. package/src/basic.tsx +0 -229
  204. package/src/card.tsx +0 -153
  205. package/src/cite.tsx +0 -43
  206. package/src/code.tsx +0 -119
  207. package/src/components/ClickPopover.tsx +0 -56
  208. package/src/components/CopyIcon.tsx +0 -40
  209. package/src/components/HoverPopover.tsx +0 -60
  210. package/src/components/LinkCard.tsx +0 -42
  211. package/src/convertToReact.ts +0 -33
  212. package/src/crossReference.tsx +0 -139
  213. package/src/dropdown.tsx +0 -69
  214. package/src/extensions/chemicalFormula.tsx +0 -42
  215. package/src/extensions/index.tsx +0 -10
  216. package/src/extensions/siunits.tsx +0 -15
  217. package/src/footnotes.tsx +0 -30
  218. package/src/grid.tsx +0 -127
  219. package/src/heading.tsx +0 -68
  220. package/src/iframe.tsx +0 -42
  221. package/src/image.tsx +0 -97
  222. package/src/index.tsx +0 -65
  223. package/src/inlineError.tsx +0 -15
  224. package/src/links/index.tsx +0 -132
  225. package/src/links/rrid.tsx +0 -81
  226. package/src/links/wiki.tsx +0 -119
  227. package/src/math.tsx +0 -81
  228. package/src/mermaid.tsx +0 -49
  229. package/src/myst.tsx +0 -226
  230. package/src/output/components.tsx +0 -34
  231. package/src/output/error.tsx +0 -20
  232. package/src/output/hooks.ts +0 -127
  233. package/src/output/index.tsx +0 -7
  234. package/src/output/jupyter.tsx +0 -86
  235. package/src/output/output.tsx +0 -79
  236. package/src/output/outputBlock.tsx +0 -21
  237. package/src/output/safe.tsx +0 -84
  238. package/src/output/selectors.ts +0 -15
  239. package/src/output/stream.tsx +0 -18
  240. package/src/reactive.tsx +0 -64
  241. package/src/tabs.tsx +0 -63
  242. package/src/types.ts +0 -6
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.HashLink = void 0;
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
+ const react_1 = require("react");
9
+ const classnames_1 = __importDefault(require("classnames"));
10
+ const providers_1 = require("@myst-theme/providers");
11
+ function getHelpHashText(kind) {
12
+ return `Link to this ${kind}`;
13
+ }
14
+ function HashLink({ id, kind, align = 'left', }) {
15
+ const { inCrossRef } = (0, providers_1.useXRefState)();
16
+ // If we are in a cross-reference popout, hide the hash links
17
+ if (inCrossRef)
18
+ return null;
19
+ const helpText = getHelpHashText(kind);
20
+ return ((0, jsx_runtime_1.jsx)("a", Object.assign({ className: (0, classnames_1.default)('select-none absolute top-0 font-normal no-underline transition-opacity opacity-0 group-hover:opacity-70', {
21
+ 'left-0 -translate-x-[100%] pr-3': align === 'left',
22
+ 'right-0 translate-x-[100%] pl-3': align === 'right',
23
+ }), href: `#${id}`, title: helpText, "aria-label": helpText }, { children: "#" })));
24
+ }
25
+ exports.HashLink = HashLink;
26
+ const Heading = (node, children) => {
27
+ const { enumerator, depth, key, identifier, html_id } = node;
28
+ const id = html_id || identifier || key;
29
+ const textContent = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(HashLink, { id: id, align: "left", kind: "Section" }), enumerator && (0, jsx_runtime_1.jsx)("span", Object.assign({ className: "select-none mr-3" }, { children: enumerator })), (0, jsx_runtime_1.jsx)("span", Object.assign({ className: "heading-text" }, { children: children }))] }));
30
+ // The `heading-text` class is picked up in the Outline to select without the enumerator and "#" link
31
+ return (0, react_1.createElement)(`h${depth}`, {
32
+ key: node.key,
33
+ id,
34
+ className: 'relative group',
35
+ }, textContent);
36
+ };
37
+ const HEADING_RENDERERS = {
38
+ heading: Heading,
39
+ };
40
+ exports.default = HEADING_RENDERERS;
@@ -0,0 +1,7 @@
1
+ import type { NodeRenderer } from './types';
2
+ export declare const IFrame: NodeRenderer;
3
+ declare const IFRAME_RENDERERS: {
4
+ iframe: NodeRenderer<any>;
5
+ };
6
+ export default IFRAME_RENDERERS;
7
+ //# sourceMappingURL=iframe.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"iframe.d.ts","sourceRoot":"","sources":["../../src/iframe.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,eAAO,MAAM,MAAM,EAAE,YAiCpB,CAAC;AAEF,QAAA,MAAM,gBAAgB;;CAErB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.IFrame = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const IFrame = (node) => {
6
+ return ((0, jsx_runtime_1.jsx)("figure", Object.assign({ id: node.label || undefined, style: { textAlign: node.align || 'center' } }, { children: (0, jsx_runtime_1.jsx)("div", Object.assign({ style: {
7
+ position: 'relative',
8
+ display: 'inline-block',
9
+ paddingBottom: '60%',
10
+ width: `min(max(${node.width || 70}%, 500px), 100%)`,
11
+ } }, { children: (0, jsx_runtime_1.jsx)("iframe", { width: "100%", height: "100%", src: node.src, allowFullScreen: true, allow: "autoplay", style: {
12
+ width: '100%',
13
+ height: '100%',
14
+ position: 'absolute',
15
+ top: 0,
16
+ left: 0,
17
+ border: 'none',
18
+ } }) })) }), node.key));
19
+ };
20
+ exports.IFrame = IFrame;
21
+ const IFRAME_RENDERERS = {
22
+ iframe: exports.IFrame,
23
+ };
24
+ exports.default = IFRAME_RENDERERS;
@@ -0,0 +1,11 @@
1
+ import type { Image as ImageNodeSpec } from 'myst-spec';
2
+ import type { NodeRenderer } from './types';
3
+ type ImageNode = ImageNodeSpec & {
4
+ height?: string;
5
+ };
6
+ export declare const Image: NodeRenderer<ImageNode>;
7
+ declare const IMAGE_RENDERERS: {
8
+ image: NodeRenderer<ImageNode>;
9
+ };
10
+ export default IMAGE_RENDERERS;
11
+ //# sourceMappingURL=image.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../src/image.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,IAAI,aAAa,EAAE,MAAM,WAAW,CAAC;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,KAAK,SAAS,GAAG,aAAa,GAAG;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAwErD,eAAO,MAAM,KAAK,EAAE,YAAY,CAAC,SAAS,CAczC,CAAC;AAEF,QAAA,MAAM,eAAe;;CAEpB,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Image = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ function getStyleValue(width) {
6
+ if (typeof width === 'number' && Number.isNaN(width)) {
7
+ // If it is nan, return undefined.
8
+ return undefined;
9
+ }
10
+ if (typeof width === 'string') {
11
+ if (width.endsWith('%')) {
12
+ return width;
13
+ }
14
+ else if (width.endsWith('px')) {
15
+ return Number(width.replace('px', ''));
16
+ }
17
+ else if (!Number.isNaN(Number(width))) {
18
+ return Number(width);
19
+ }
20
+ console.log(`Unknown width ${width} in getImageWidth`);
21
+ return undefined;
22
+ }
23
+ return width;
24
+ }
25
+ function alignToMargin(align) {
26
+ switch (align) {
27
+ case 'left':
28
+ return { marginRight: 'auto' };
29
+ case 'right':
30
+ return { marginLeft: 'auto' };
31
+ case 'center':
32
+ return { margin: '0 auto' };
33
+ default:
34
+ return {};
35
+ }
36
+ }
37
+ function Picture({ src, srcOptimized, urlSource, align = 'center', alt, width, height, }) {
38
+ const image = ((0, jsx_runtime_1.jsx)("img", { style: Object.assign({ width: getStyleValue(width), height: getStyleValue(height) }, alignToMargin(align)), src: src, alt: alt, "data-canonical-url": urlSource }));
39
+ if (!srcOptimized)
40
+ return image;
41
+ return ((0, jsx_runtime_1.jsxs)("picture", { children: [(0, jsx_runtime_1.jsx)("source", { srcSet: srcOptimized, type: "image/webp" }), image] }));
42
+ }
43
+ const Image = (node) => {
44
+ return ((0, jsx_runtime_1.jsx)(Picture, { src: node.url, srcOptimized: node.urlOptimized, alt: node.alt || node.title, width: node.width || undefined, height: node.height || undefined, align: node.align,
45
+ // Note that sourceUrl is for backwards compatibility
46
+ urlSource: node.urlSource || node.sourceUrl }, node.key));
47
+ };
48
+ exports.Image = Image;
49
+ const IMAGE_RENDERERS = {
50
+ image: exports.Image,
51
+ };
52
+ exports.default = IMAGE_RENDERERS;
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import type { NodeRenderer } from './types';
3
+ import type { GenericParent } from 'myst-common';
4
+ export type { NodeRenderer } from './types';
5
+ export { CopyIcon } from './components/CopyIcon';
6
+ export { CodeBlock } from './code';
7
+ export { Admonition, AdmonitionKind } from './admonitions';
8
+ export declare const DEFAULT_RENDERERS: Record<string, NodeRenderer>;
9
+ export declare function useParse(node: GenericParent | null, renderers?: Record<string, NodeRenderer>): import("react").ReactNode;
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAqBjD,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE3D,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAmB1D,CAAC;AAEF,wBAAgB,QAAQ,CACtB,IAAI,EAAE,aAAa,GAAG,IAAI,EAC1B,SAAS,GAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAqB,6BAU5D"}
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.useParse = exports.DEFAULT_RENDERERS = exports.AdmonitionKind = exports.Admonition = exports.CodeBlock = exports.CopyIcon = void 0;
7
+ const convertToReact_1 = require("./convertToReact");
8
+ const basic_1 = __importDefault(require("./basic"));
9
+ const admonitions_1 = __importDefault(require("./admonitions"));
10
+ const dropdown_1 = __importDefault(require("./dropdown"));
11
+ const card_1 = __importDefault(require("./card"));
12
+ const grid_1 = __importDefault(require("./grid"));
13
+ const cite_1 = __importDefault(require("./cite"));
14
+ const footnotes_1 = __importDefault(require("./footnotes"));
15
+ const code_1 = __importDefault(require("./code"));
16
+ const math_1 = __importDefault(require("./math"));
17
+ const reactive_1 = __importDefault(require("./reactive"));
18
+ const iframe_1 = __importDefault(require("./iframe"));
19
+ const image_1 = __importDefault(require("./image"));
20
+ const links_1 = __importDefault(require("./links"));
21
+ const output_1 = __importDefault(require("./output"));
22
+ const heading_1 = __importDefault(require("./heading"));
23
+ const crossReference_1 = __importDefault(require("./crossReference"));
24
+ const tabs_1 = __importDefault(require("./tabs"));
25
+ const extensions_1 = __importDefault(require("./extensions"));
26
+ var CopyIcon_1 = require("./components/CopyIcon");
27
+ Object.defineProperty(exports, "CopyIcon", { enumerable: true, get: function () { return CopyIcon_1.CopyIcon; } });
28
+ var code_2 = require("./code");
29
+ Object.defineProperty(exports, "CodeBlock", { enumerable: true, get: function () { return code_2.CodeBlock; } });
30
+ var admonitions_2 = require("./admonitions");
31
+ Object.defineProperty(exports, "Admonition", { enumerable: true, get: function () { return admonitions_2.Admonition; } });
32
+ Object.defineProperty(exports, "AdmonitionKind", { enumerable: true, get: function () { return admonitions_2.AdmonitionKind; } });
33
+ exports.DEFAULT_RENDERERS = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, basic_1.default), image_1.default), links_1.default), code_1.default), math_1.default), cite_1.default), tabs_1.default), iframe_1.default), footnotes_1.default), admonitions_1.default), reactive_1.default), output_1.default), heading_1.default), crossReference_1.default), dropdown_1.default), card_1.default), grid_1.default), extensions_1.default);
34
+ function useParse(node, renderers = exports.DEFAULT_RENDERERS) {
35
+ if (!node)
36
+ return null;
37
+ try {
38
+ const nodes = (0, convertToReact_1.mystToReact)(node, renderers);
39
+ return nodes;
40
+ }
41
+ catch (error) {
42
+ console.error(error);
43
+ return null;
44
+ }
45
+ }
46
+ exports.useParse = useParse;
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ interface Props {
3
+ value: string;
4
+ message?: string;
5
+ }
6
+ export declare function InlineError({ value, message }: Props): JSX.Element;
7
+ export {};
8
+ //# sourceMappingURL=inlineError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inlineError.d.ts","sourceRoot":"","sources":["../../src/inlineError.tsx"],"names":[],"mappings":";AAEA,UAAU,KAAK;IACb,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,WAAW,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,KAAK,eAOpD"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InlineError = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const outline_1 = require("@heroicons/react/24/outline");
6
+ function InlineError({ value, message }) {
7
+ return ((0, jsx_runtime_1.jsxs)("span", Object.assign({ className: "text-yellow-600", title: message || value }, { children: [(0, jsx_runtime_1.jsx)(outline_1.ExclamationCircleIcon, { className: "inline h-[1em] mr-1" }), value] })));
8
+ }
9
+ exports.InlineError = InlineError;
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ export declare function GithubLink({ children, url, org, repo, raw, file, from, to, }: {
3
+ children: React.ReactNode;
4
+ url: string;
5
+ raw: string;
6
+ org: string;
7
+ repo: string;
8
+ file: string;
9
+ from?: number;
10
+ to?: number;
11
+ }): JSX.Element;
12
+ //# sourceMappingURL=github.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"github.d.ts","sourceRoot":"","sources":["../../../src/links/github.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAwGnD,wBAAgB,UAAU,CAAC,EACzB,QAAQ,EACR,GAAG,EACH,GAAG,EACH,IAAI,EACJ,GAAG,EACH,IAAI,EACJ,IAAI,EACJ,EAAE,GACH,EAAE;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;CACb,eAqBA"}
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.GithubLink = void 0;
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
+ const swr_1 = __importDefault(require("swr"));
9
+ const outline_1 = require("@heroicons/react/24/outline");
10
+ const HoverPopover_1 = require("../components/HoverPopover");
11
+ const LinkCard_1 = require("../components/LinkCard");
12
+ const react_1 = require("react");
13
+ const code_1 = require("../code");
14
+ const fetcher = (...args) => fetch(...args).then((res) => {
15
+ if (res.status === 200)
16
+ return res.text();
17
+ throw new Error(`Content returned with status ${res.status}.`);
18
+ });
19
+ function extToLanguage(ext) {
20
+ var _a;
21
+ return ((_a = {
22
+ ts: 'typescript',
23
+ js: 'javascript',
24
+ py: 'python',
25
+ }[ext !== null && ext !== void 0 ? ext : '']) !== null && _a !== void 0 ? _a : ext);
26
+ }
27
+ function useLoadWhenOpen(open, url, loader) {
28
+ const [cached, setCached] = (0, react_1.useState)();
29
+ const { data, error } = (0, swr_1.default)(open ? url : null, loader);
30
+ (0, react_1.useEffect)(() => {
31
+ setCached(cached || data);
32
+ }, [cached, url, data]);
33
+ return { data: cached, error };
34
+ }
35
+ function GithubFilePreview({ url, raw, org, repo, file, from, to, open, }) {
36
+ const { data, error } = useLoadWhenOpen(open, raw, fetcher);
37
+ let code = data;
38
+ if (error) {
39
+ return ((0, jsx_runtime_1.jsxs)("span", { children: [(0, jsx_runtime_1.jsx)("a", Object.assign({ href: url, className: "block", target: "_blank", rel: "noreferrer" }, { children: (0, jsx_runtime_1.jsx)(outline_1.ArrowTopRightOnSquareIcon, { className: "w-4 h-4 float-right" }) })), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "mt-2" }, { children: ["Error loading \"", file, "\" from GitHub."] }))] }));
40
+ }
41
+ const lang = extToLanguage(file === null || file === void 0 ? void 0 : file.split('.').pop());
42
+ let startingLineNumber = 1;
43
+ let emphasizeLines = [];
44
+ const offset = 5;
45
+ if (code && from && to) {
46
+ startingLineNumber = from;
47
+ code = code === null || code === void 0 ? void 0 : code.split('\n').slice(from - 1, to).join('\n');
48
+ }
49
+ else if (code && from) {
50
+ startingLineNumber = from + 1 - offset;
51
+ emphasizeLines = [from];
52
+ code = code === null || code === void 0 ? void 0 : code.split('\n').slice(Math.max(0, from - offset), from + offset).join('\n');
53
+ }
54
+ else {
55
+ code = code === null || code === void 0 ? void 0 : code.split('\n').slice(0, 10).join('\n');
56
+ }
57
+ const description = code ? ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(code_1.CodeBlock, { value: code, lang: lang, filename: file, showLineNumbers: true, startingLineNumber: startingLineNumber, emphasizeLines: emphasizeLines, showCopy: false }) })) : null;
58
+ return ((0, jsx_runtime_1.jsx)(LinkCard_1.LinkCard, { loading: !code, url: url, title: `GitHub - ${org}/${repo}`, description: description, className: "max-w-[80vw]" }));
59
+ }
60
+ function GithubLink({ children, url, org, repo, raw, file, from, to, }) {
61
+ return ((0, jsx_runtime_1.jsx)(HoverPopover_1.HoverPopover, Object.assign({ card: ({ open }) => ((0, jsx_runtime_1.jsx)(GithubFilePreview, { url: url, raw: raw, file: file, from: from, to: to, open: open, org: org, repo: repo })) }, { children: (0, jsx_runtime_1.jsx)("a", Object.assign({ href: url, className: "italic", target: "_blank", rel: "noreferrer" }, { children: children })) })));
62
+ }
63
+ exports.GithubLink = GithubLink;
@@ -0,0 +1,14 @@
1
+ import type { Link } from 'myst-spec';
2
+ import type { NodeRenderer } from '../types';
3
+ type TransformedLink = Link & {
4
+ internal?: boolean;
5
+ protocol?: string;
6
+ };
7
+ export declare const link: NodeRenderer<TransformedLink>;
8
+ export declare const linkBlock: NodeRenderer<TransformedLink>;
9
+ declare const LINK_RENDERERS: {
10
+ link: NodeRenderer<TransformedLink>;
11
+ linkBlock: NodeRenderer<TransformedLink>;
12
+ };
13
+ export default LINK_RENDERERS;
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/links/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAOtC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAO7C,KAAK,eAAe,GAAG,IAAI,GAAG;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAiDxE,eAAO,MAAM,IAAI,EAAE,YAAY,CAAC,eAAe,CA+C9C,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,YAAY,CAAC,eAAe,CAkCnD,CAAC;AAEF,QAAA,MAAM,cAAc;;;CAGnB,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.linkBlock = exports.link = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const outline_1 = require("@heroicons/react/24/outline");
6
+ const providers_1 = require("@myst-theme/providers");
7
+ const HoverPopover_1 = require("../components/HoverPopover");
8
+ const LinkCard_1 = require("../components/LinkCard");
9
+ const wiki_1 = require("./wiki");
10
+ const rrid_1 = require("./rrid");
11
+ const github_1 = require("./github");
12
+ function getPageInfo(site, path) {
13
+ var _a;
14
+ if (!site)
15
+ return undefined;
16
+ const [projectSlug, pageSlug] = path.replace(/^\//, '').split('/');
17
+ const project = (_a = site.projects) === null || _a === void 0 ? void 0 : _a.find((p) => p.slug === projectSlug);
18
+ if (!project)
19
+ return undefined;
20
+ return project.pages.find((p) => p.slug === pageSlug);
21
+ }
22
+ function InternalLink({ url, children }) {
23
+ const Link = (0, providers_1.useLinkProvider)();
24
+ const site = (0, providers_1.useSiteManifest)();
25
+ const page = getPageInfo(site, url);
26
+ const urlbase = (0, providers_1.useUrlbase)();
27
+ const skipPreview = !page || (!page.description && !page.thumbnail);
28
+ if (!page || skipPreview) {
29
+ return ((0, jsx_runtime_1.jsx)(Link, Object.assign({ to: (0, providers_1.withUrlbase)(url, urlbase), prefetch: "intent" }, { children: children })));
30
+ }
31
+ return ((0, jsx_runtime_1.jsx)(HoverPopover_1.HoverPopover, Object.assign({ card: (0, jsx_runtime_1.jsx)(LinkCard_1.LinkCard, { internal: true, url: url, title: page.title, description: page.description, thumbnail: page.thumbnailOptimized || page.thumbnail }) }, { children: (0, jsx_runtime_1.jsx)(Link, Object.assign({ to: (0, providers_1.withUrlbase)(url, urlbase), prefetch: "intent" }, { children: children })) })));
32
+ }
33
+ const link = (node, children) => {
34
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
35
+ const internal = (_a = node.internal) !== null && _a !== void 0 ? _a : false;
36
+ const protocol = node.protocol;
37
+ switch (protocol) {
38
+ case 'wiki':
39
+ return ((0, jsx_runtime_1.jsx)(wiki_1.WikiLink, Object.assign({ url: node.url, page: (_b = node.data) === null || _b === void 0 ? void 0 : _b.page, wiki: (_c = node.data) === null || _c === void 0 ? void 0 : _c.wiki }, { children: children }), node.key));
40
+ case 'github':
41
+ return ((0, jsx_runtime_1.jsx)(github_1.GithubLink, Object.assign({ url: node.url, org: (_d = node.data) === null || _d === void 0 ? void 0 : _d.org, repo: (_e = node.data) === null || _e === void 0 ? void 0 : _e.repo, raw: (_f = node.data) === null || _f === void 0 ? void 0 : _f.raw, file: (_g = node.data) === null || _g === void 0 ? void 0 : _g.file, from: (_h = node.data) === null || _h === void 0 ? void 0 : _h.from, to: (_j = node.data) === null || _j === void 0 ? void 0 : _j.to }, { children: children }), node.key));
42
+ case 'rrid':
43
+ return (0, jsx_runtime_1.jsx)(rrid_1.RRIDLink, { rrid: (_k = node.data) === null || _k === void 0 ? void 0 : _k.rrid }, node.key);
44
+ default:
45
+ if (internal) {
46
+ return ((0, jsx_runtime_1.jsx)(InternalLink, Object.assign({ url: node.url }, { children: children }), node.key));
47
+ }
48
+ return ((0, jsx_runtime_1.jsx)("a", Object.assign({ target: "_blank", href: node.url, rel: "noreferrer" }, { children: children }), node.key));
49
+ }
50
+ };
51
+ exports.link = link;
52
+ const linkBlock = (node, children) => {
53
+ var _a;
54
+ const iconClass = 'w-6 h-6 self-center transition-transform flex-none ml-3';
55
+ const containerClass = 'flex-1 p-4 my-4 block border font-normal hover:border-blue-500 dark:hover:border-blue-400 no-underline hover:text-blue-600 dark:hover:text-blue-400 text-gray-600 dark:text-gray-100 border-gray-200 dark:border-gray-500 rounded shadow-sm hover:shadow-lg dark:shadow-neutral-700';
56
+ const internal = (_a = node.internal) !== null && _a !== void 0 ? _a : false;
57
+ const nested = ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex align-middle h-full" }, { children: [(0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex-grow" }, { children: [node.title, (0, jsx_runtime_1.jsx)("div", Object.assign({ className: "text-xs text-gray-500 dark:text-gray-400" }, { children: children }))] })), internal && (0, jsx_runtime_1.jsx)(outline_1.LinkIcon, { className: iconClass }), !internal && (0, jsx_runtime_1.jsx)(outline_1.ArrowTopRightOnSquareIcon, { className: iconClass })] })));
58
+ if (internal) {
59
+ return ((0, jsx_runtime_1.jsx)("a", Object.assign({ href: node.url, className: containerClass }, { children: nested }), node.key));
60
+ }
61
+ return ((0, jsx_runtime_1.jsx)("a", Object.assign({ className: containerClass, target: "_blank", rel: "noopener noreferrer", href: node.url }, { children: nested }), node.key));
62
+ };
63
+ exports.linkBlock = linkBlock;
64
+ const LINK_RENDERERS = {
65
+ link: exports.link,
66
+ linkBlock: exports.linkBlock,
67
+ };
68
+ exports.default = LINK_RENDERERS;
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ export declare function RRIDLink({ rrid }: {
3
+ rrid: string;
4
+ }): JSX.Element;
5
+ //# sourceMappingURL=rrid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rrid.d.ts","sourceRoot":"","sources":["../../../src/links/rrid.tsx"],"names":[],"mappings":";AAyEA,wBAAgB,QAAQ,CAAC,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,eAOlD"}
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.RRIDLink = void 0;
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
+ const swr_1 = __importDefault(require("swr"));
9
+ const outline_1 = require("@heroicons/react/24/outline");
10
+ const ClickPopover_1 = require("../components/ClickPopover");
11
+ const fetcher = (...args) => fetch(...args).then((res) => {
12
+ if (res.status === 200)
13
+ return res.json();
14
+ throw new Error(`Content returned with status ${res.status}.`);
15
+ });
16
+ function RRIDChild({ rrid }) {
17
+ var _a, _b, _c, _d, _e, _f, _g;
18
+ const { data, error } = (0, swr_1.default)(`https://scicrunch.org/resolver/${rrid}.json`, fetcher);
19
+ if (!data && !error) {
20
+ return (0, jsx_runtime_1.jsx)("span", Object.assign({ className: "animate-pulse" }, { children: "Loading..." }));
21
+ }
22
+ const hit = (_b = (_a = data === null || data === void 0 ? void 0 : data.hits) === null || _a === void 0 ? void 0 : _a.hits) === null || _b === void 0 ? void 0 : _b[0];
23
+ if (error || !hit) {
24
+ return (0, jsx_runtime_1.jsxs)("span", { children: ["Error loading ", rrid, "."] });
25
+ }
26
+ const { name: title, curie, description, supercategory, keywords, types: categories, } = (_d = (_c = hit === null || hit === void 0 ? void 0 : hit._source) === null || _c === void 0 ? void 0 : _c.item) !== null && _d !== void 0 ? _d : {};
27
+ const category = (_e = supercategory === null || supercategory === void 0 ? void 0 : supercategory[0]) === null || _e === void 0 ? void 0 : _e.name;
28
+ const types = (_f = categories === null || categories === void 0 ? void 0 : categories.map(({ name }) => name)) !== null && _f !== void 0 ? _f : [];
29
+ const tags = (_g = keywords === null || keywords === void 0 ? void 0 : keywords.map(({ keyword }) => keyword)) !== null && _g !== void 0 ? _g : [];
30
+ return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("a", Object.assign({ href: `https://scicrunch.org/resolver/${rrid}`, target: "_blank", rel: "noopener noreferrer", className: "absolute top-4 right-1 opacity-70 hover:opacity-100" }, { children: (0, jsx_runtime_1.jsx)(outline_1.ArrowTopRightOnSquareIcon, { className: "w-6 h-6" }) })), (0, jsx_runtime_1.jsxs)("p", Object.assign({ className: "text-sm font-light" }, { children: ["RRID: ", category] })), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "text-xl font-bold mb-4" }, { children: [title, " ", (0, jsx_runtime_1.jsx)("code", { children: curie })] })), (0, jsx_runtime_1.jsx)("p", Object.assign({ className: "text-md" }, { children: description })), types.length > 0 && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", Object.assign({ className: "text-xs font-thin my-2" }, { children: "Categories" })), (0, jsx_runtime_1.jsx)("div", Object.assign({ className: "flex flex-wrap ml-1" }, { children: types === null || types === void 0 ? void 0 : types.map((tag) => ((0, jsx_runtime_1.jsx)("span", Object.assign({ className: "ml-1 text-xs inline-flex items-center uppercase px-3 py-1 rounded-full border" }, { children: tag })))) }))] })), tags.length > 0 && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", Object.assign({ className: "text-xs font-thin my-2" }, { children: "Tags" })), (0, jsx_runtime_1.jsx)("div", Object.assign({ className: "flex flex-wrap ml-1" }, { children: tags === null || tags === void 0 ? void 0 : tags.map((tag) => ((0, jsx_runtime_1.jsx)("span", Object.assign({ className: "ml-1 text-xs inline-flex items-center uppercase px-3 py-1 rounded-full border" }, { children: tag })))) }))] }))] }));
31
+ }
32
+ function RRIDLink({ rrid }) {
33
+ return ((0, jsx_runtime_1.jsxs)(ClickPopover_1.ClickPopover, Object.assign({ card: (0, jsx_runtime_1.jsx)(RRIDChild, { rrid: rrid }) }, { children: [(0, jsx_runtime_1.jsx)("span", { children: "RRID: " }), (0, jsx_runtime_1.jsx)("cite", Object.assign({ className: "italic" }, { children: rrid }))] })));
34
+ }
35
+ exports.RRIDLink = RRIDLink;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ export declare function WikiLink({ children, page, url, wiki, }: {
3
+ children: React.ReactNode;
4
+ page: string;
5
+ url: string;
6
+ wiki: string;
7
+ }): JSX.Element;
8
+ //# sourceMappingURL=wiki.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wiki.d.ts","sourceRoot":"","sources":["../../../src/links/wiki.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAgG1B,wBAAgB,QAAQ,CAAC,EACvB,QAAQ,EACR,IAAI,EACJ,GAAG,EACH,IAAI,GACL,EAAE;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;CACd,eAQA"}
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.WikiLink = void 0;
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
+ const swr_1 = __importDefault(require("swr"));
9
+ const outline_1 = require("@heroicons/react/24/outline");
10
+ const HoverPopover_1 = require("../components/HoverPopover");
11
+ const LinkCard_1 = require("../components/LinkCard");
12
+ const WikiTextMark = () => ((0, jsx_runtime_1.jsx)("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", version: "1.1", id: "svg3400", viewBox: "0 0 500 85", className: "h-4" }, { children: (0, jsx_runtime_1.jsxs)("g", Object.assign({ transform: "translate(-357.71336,-784.65111)" }, { children: [(0, jsx_runtime_1.jsx)("path", { fill: "currentColor", d: "m 412.98736,806.72288 c 0,0 -1.468,-2.984 -1.968,-3.976 -3.336,-6.612 -3.264,-6.964 -6.636,-7.408 -0.944,-0.124 -1.432,-0.244 -1.432,-0.712 v -2.092 l 0.284,-0.204 c 6.092,-0.008 19.648,-0.008 19.648,-0.008 l 0.52,0.172 v 2.084 c 0,0.476 -0.34,0.72 -1.032,0.72 l -1.424,0.204 c -3.6,0.28 -3.012,1.752 -0.62,6.516 l 22.708,46.46 0.776,0.212 20.16,-47.844 c 0.7,-1.928 0.592,-3.296 -0.308,-4.1 -0.904,-0.784 -1.54,-1.248 -3.876,-1.344 l -1.892,-0.096 c -0.232,0 -0.452,-0.084 -0.664,-0.24 -0.208,-0.148 -0.316,-0.344 -0.316,-0.58 v -1.992 l 0.288,-0.204 c 5.68,0 22.776,0 22.776,0 l 0.232,0.204 v 1.992 c 0,0.54 -0.308,0.812 -0.916,0.812 -2.984,0.132 -5.196,0.78 -6.628,1.936 -1.436,1.164 -2.556,2.768 -3.36,4.852 0,0 -18.54,42.436 -24.884,56.54 -2.428,4.624 -4.816,4.2 -6.916,-0.132 -4.436,-9.136 -16.928,-36.852 -16.928,-36.852 l -7.592,-14.92 z" }), (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", d: "m 449.37136,792.29888 c 0,0 -12.812,-0.04 -18.516,0 l -0.284,0.204 v 1.984 c 0,0.244 0.104,0.436 0.312,0.584 0.212,0.156 0.428,0.236 0.66,0.236 l 0.916,0.1 c 2.332,0.096 3.404,0.708 3.724,1.092 0.556,0.68 0.832,1.416 -0.516,4.356 l -23.92,47.708 -0.628,-0.164 c 0,0 -17.132,-36.124 -22.092,-48.208 -0.516,-1.252 -0.748,-2.18 -0.748,-2.752 0,-1.228 1.108,-1.892 3.324,-1.984 l 2.584,-0.108 c 0.684,0 1.032,-0.264 1.032,-0.812 v -1.984 l -0.232,-0.204 c 0,0 -20.52,-0.024 -24.76,0 l -0.232,0.204 v 2.084 c 0,0.376 0.476,0.608 1.432,0.712 2.604,0.14 4.316,0.556 5.14,1.248 0.82,0.7 1.688,2.468 2.84,5.224 6.228,14.96 19.46,41.656 25.904,56.86 1.856,4.152 4.188,4.796 7.02,-0.128 4.904,-9.096 18.2,-36.872 18.2,-36.872 l 10.472,-19.584 c 1.22,-2.068 2.396,-3.912 2.992,-4.772 1.092,-1.572 1.704,-1.868 4.688,-2.008 0.608,0 0.916,-0.272 0.916,-0.82 v -1.984 l -0.228,-0.212 z" }), (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", d: "m 488.32736,854.23088 c 0,2.288 1.04,3.64 4.368,3.952 l 2.184,0.212 c 0.312,0 0.624,0.204 0.624,0.62 v 2.184 l -0.104,0.212 c 0,0 -7.904,-0.212 -11.128,-0.212 -2.912,0 -11.024,0.212 -11.024,0.212 l -0.208,-0.212 v -2.184 c 0,-0.416 0.312,-0.62 0.728,-0.62 l 2.08,-0.212 c 3.432,-0.312 4.472,-1.976 4.472,-3.952 v -34.632 c 0,-2.284 -1.252,-2.916 -4.472,-3.22 l -2.08,-0.216 c -0.416,0 -0.728,-0.096 -0.728,-0.416 v -2.396 l 0.104,-0.208 c 0,0 8.216,0.208 11.44,0.208 2.808,0 10.816,-0.208 10.816,-0.208 l 0.104,0.208 v 2.288 c 0,0.312 -0.208,0.52 -0.624,0.52 l -2.184,0.212 c -3.224,0.308 -4.368,1.144 -4.368,3.228 v 34.632 z" }), (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", d: "m 519.01936,854.23088 c 0,2.288 1.352,3.432 4.368,3.952 l 1.144,0.212 c 0.312,0.1 0.624,0.204 0.624,0.62 v 2.184 l -0.104,0.212 c 0,0 -6.552,-0.212 -9.672,-0.212 -2.912,0 -11.44,0.212 -11.44,0.212 l -0.208,-0.212 v -2.184 c 0,-0.416 0.312,-0.62 0.728,-0.62 l 2.08,-0.212 c 3.12,-0.312 4.472,-1.976 4.472,-3.952 v -34.632 c 0,-2.284 -1.144,-2.916 -4.472,-3.22 l -2.08,-0.216 c -0.416,0 -0.728,-0.096 -0.728,-0.416 v -2.396 l 0.104,-0.208 c 0,0 8.528,0.208 11.752,0.208 2.916,0 9.464,-0.208 9.464,-0.208 l 0.104,0.208 v 2.288 c 0,0.312 -0.208,0.416 -0.624,0.52 l -1.144,0.212 c -3.224,0.62 -4.368,1.144 -4.368,3.228 v 15.704 c 3.432,0 5.408,-1.764 9.984,-6.656 4.16,-4.58 7.384,-8.42 7.384,-10.4 0,-0.836 -0.936,-1.768 -3.016,-2.084 -0.416,-0.1 -0.624,-0.208 -0.624,-0.52 v -2.396 l 0.104,-0.1 c 0,0 8.424,0.208 11.44,0.208 2.704,0 7.28,-0.208 7.28,-0.208 l 0.312,0.1 v 2.396 c 0,0.312 -0.312,0.52 -0.832,0.52 -4.056,0.312 -6.864,0.52 -10.608,4.784 l -8.944,10.292 c -1.768,1.876 -2.392,3.016 -2.392,3.852 0,0.624 0.416,1.14 0.936,1.764 l 15.704,18.928 c 1.248,1.452 3.744,2.08 5.824,2.492 l 0.52,0.1 c 0.312,0.104 0.728,0.312 0.728,0.624 v 2.184 l -0.312,0.104 c 0,0 -5.512,-0.104 -8.424,-0.104 -2.6,0 -6.344,0.104 -6.344,0.104 l -0.104,-0.104 v -1.248 c 0,-1.356 -0.104,-2.492 -1.56,-4.156 l -11.544,-14.356 c -1.56,-2.084 -3.224,-2.596 -5.512,-2.596 v 15.404 l 0,0 z" }), (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", d: "m 575.08736,854.23088 c 0,2.288 1.04,3.64 4.368,3.952 l 2.184,0.212 c 0.312,0 0.624,0.204 0.624,0.62 v 2.184 l -0.104,0.212 c 0,0 -7.904,-0.212 -11.128,-0.212 -2.912,0 -11.024,0.212 -11.024,0.212 l -0.208,-0.212 v -2.184 c 0,-0.416 0.312,-0.62 0.728,-0.62 l 2.08,-0.212 c 3.432,-0.312 4.472,-1.976 4.472,-3.952 v -34.632 c 0,-2.284 -1.248,-2.916 -4.472,-3.22 l -2.08,-0.216 c -0.416,0 -0.728,-0.096 -0.728,-0.416 v -2.396 l 0.104,-0.208 c 0,0 8.216,0.208 11.44,0.208 2.808,0 10.816,-0.208 10.816,-0.208 l 0.104,0.208 v 2.288 c 0,0.312 -0.208,0.52 -0.624,0.52 l -2.184,0.212 c -3.224,0.308 -4.368,1.144 -4.368,3.228 v 34.632 z" }), (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", d: "m 597.55936,819.80288 c 0,-3.224 -1.352,-3.328 -6.24,-3.64 -0.624,0 -0.728,-0.308 -0.728,-0.52 v -2.392 l 0.208,-0.104 c 1.56,0 7.696,0.208 10.712,0.208 2.912,0 7.072,-0.208 10.92,-0.208 14.76,0 17.464,7.276 17.464,12.692 0,6.244 -3.016,16.016 -17.776,16.016 -2.6,0 -4.68,-0.212 -6.556,-1.04 v 13.928 c 0,2.288 1.248,2.812 4.58,3.328 l 2.084,0.312 c 0.416,0.104 0.728,0.212 0.728,0.624 v 2.184 l -0.1,0.208 c 0,0 -8.32,-0.208 -11.544,-0.208 -2.912,0 -10.712,0.208 -10.712,0.208 l -0.104,-0.208 v -2.184 c 0,-0.416 0.208,-0.52 0.624,-0.624 l 2.184,-0.312 c 3.224,-0.416 4.264,-1.352 4.264,-3.328 l -0.008,-34.94 0,0 z m 8.008,18.1 c 2.08,0.836 4.68,0.936 6.76,0.936 6.244,0 9.248,-3.752 9.248,-11.752 0,-8.944 -4.056,-10.92 -9.768,-10.92 -4.996,0 -6.244,0.936 -6.244,3.64 l 0.004,18.096 0,0 z" }), (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", d: "m 647.80736,861.19888 c -3.12,0 -10.292,0.212 -10.292,0.212 l -0.108,-0.212 v -2.288 c 0,-0.204 0.108,-0.516 0.624,-0.516 l 2.396,-0.212 c 3.228,-0.312 4.164,-2.392 4.164,-4.468 v -34.32 c 0,-2.4 -1.252,-2.812 -4.164,-3.016 l -2.396,-0.216 c -0.624,-0.096 -0.624,-0.308 -0.624,-0.416 v -2.396 l 0.108,-0.208 c 0,0 8.108,0.208 11.228,0.208 h 15.288 c 3.12,0 10.508,-0.208 10.508,-0.208 l 0.212,0.208 c 0.1,4.472 0.828,8.536 1.56,12.484 l -2.596,0.416 c -1.14,-3.852 -3.116,-9.36 -9.772,-9.36 h -8.32 c -1.976,0 -3.016,0.728 -3.016,2.492 v 15.084 h 7.796 c 2.916,0 3.64,-1.248 4.06,-3.328 l 0.62,-2.184 c 0,-0.312 0.212,-0.524 0.624,-0.524 h 1.764 c 0.212,0 0.212,0.108 0.212,0.312 -0.212,2.288 -0.624,5.204 -0.624,7.7 0,2.596 0.416,4.784 0.624,7.176 l -0.212,0.212 h -1.764 c -0.516,0 -0.732,-0.212 -0.732,-0.524 l -0.52,-2.284 c -0.416,-2.084 -1.352,-3.228 -4.064,-3.228 h -7.792 v 15.916 c 0,1.972 1.136,3.948 3.016,3.948 h 9.88 c 5.304,0 8.22,-3.328 9.464,-8.74 l 2.596,0.312 -2.084,11.956 -0.208,0.208 c 0,0 -6.136,-0.208 -9.256,-0.208 l -18.2,0.012 0,0 z" }), (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", d: "m 686.91936,858.39488 2.392,-0.212 c 3.124,-0.312 4.164,-1.248 4.164,-4.468 v -34.32 c 0,-2.712 -0.736,-2.712 -4.164,-3.016 l -2.28,-0.216 c -0.416,0 -0.736,-0.208 -0.736,-0.52 v -2.288 l 0.1,-0.208 c 0,0 9.156,0.208 11.032,0.208 1.968,0 11.024,-0.208 13.728,-0.208 17.368,0 25.9,10.816 25.9,24.648 0,18.204 -12.9,23.604 -24.44,23.604 -8.32,0 -11.956,-0.208 -15.18,-0.208 -3.124,0 -11.028,0.208 -11.028,0.208 l -0.104,-0.208 v -2.184 c -0.008,-0.3 0.204,-0.612 0.616,-0.612 z m 23.196,0 c 11.436,0 17.892,-4.26 17.892,-18.828 0,-10.812 -2.396,-23.404 -19.868,-23.404 -4.056,0 -6.656,0.624 -6.656,3.232 v 34.32 c 0,2.904 0.724,4.68 8.632,4.68 z" }), (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", d: "m 761.60736,854.23088 c 0,2.288 1.04,3.64 4.368,3.952 l 2.184,0.212 c 0.312,0 0.624,0.204 0.624,0.62 v 2.184 l -0.104,0.212 c 0,0 -7.904,-0.212 -11.124,-0.212 -2.916,0 -11.024,0.212 -11.024,0.212 l -0.212,-0.212 v -2.184 c 0,-0.416 0.312,-0.62 0.728,-0.62 l 2.084,-0.212 c 3.428,-0.312 4.472,-1.976 4.472,-3.952 v -34.632 c 0,-2.284 -1.252,-2.916 -4.472,-3.22 l -2.084,-0.216 c -0.416,0 -0.728,-0.096 -0.728,-0.416 v -2.396 l 0.104,-0.208 c 0,0 8.216,0.208 11.432,0.208 2.808,0 10.82,-0.208 10.82,-0.208 l 0.1,0.208 v 2.288 c 0,0.312 -0.212,0.52 -0.624,0.52 l -2.184,0.212 c -3.224,0.308 -4.368,1.144 -4.368,3.228 l 0.008,34.632 0,0 z" }), (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", d: "m 793.64736,858.18288 3.016,0.212 c 0.416,0 0.832,0.312 0.832,0.828 v 1.976 l -0.208,0.212 c 0,0 -11.336,-0.212 -13.832,-0.212 -2.708,0 -9.364,0.212 -9.364,0.212 l -0.212,-0.212 v -1.976 c 0,-0.516 0.312,-0.828 0.836,-0.828 4.58,-0.312 7.172,-1.148 10.084,-7.804 l 23.084,-54.084 c 1.14,-2.704 1.976,-3.748 3.54,-3.748 1.452,0 1.976,1.044 2.804,3.124 l 21.32,56.368 c 1.46,4.06 3.54,5.616 7.7,6.032 l 1.144,0.1 c 0.52,0 1.04,0.312 1.04,0.836 v 1.972 l -0.312,0.208 c 0,0 -8.008,-0.208 -12.064,-0.208 -3.64,0 -13.836,0.208 -13.836,0.208 l -0.1,-0.208 v -1.972 c 0,-0.524 0.208,-0.836 0.736,-0.836 l 2.912,-0.208 c 3.948,-0.308 5.412,-1.564 4.368,-4.472 l -6.344,-17.58 h -21.632 c -2.496,0 -3.12,0.416 -3.636,1.764 l -6.036,15.084 c -1.04,2.608 0.312,4.9 4.16,5.212 z m 25.48,-26.424 -10.088,-27.764 h -0.208 l -10.4,26.416 c -0.416,1.044 0.308,1.352 2.596,1.352 h 18.1 z" })] })) })));
13
+ const fetcher = (...args) => fetch(...args).then((res) => {
14
+ if (res.status === 200)
15
+ return res.json();
16
+ throw new Error(`Content returned with status ${res.status}.`);
17
+ });
18
+ const ENGLISH_WIKIPEDIA = 'https://en.wikipedia.org/';
19
+ function createWikiUrl(name, wiki) {
20
+ return `${wiki || ENGLISH_WIKIPEDIA}wiki/${name}`;
21
+ }
22
+ function createWikiApiUrl(name, wiki) {
23
+ return `${wiki || ENGLISH_WIKIPEDIA}api/rest_v1/page/summary/${name}`;
24
+ }
25
+ function WikiChild({ page, wiki, open }) {
26
+ var _a, _b;
27
+ const { data, error } = (0, swr_1.default)(open ? createWikiApiUrl(page, wiki) : null, fetcher);
28
+ const { thumbnail, extract, content_urls } = data !== null && data !== void 0 ? data : {};
29
+ const url = (_b = (_a = content_urls === null || content_urls === void 0 ? void 0 : content_urls.desktop) === null || _a === void 0 ? void 0 : _a.page) !== null && _b !== void 0 ? _b : createWikiUrl(page);
30
+ const image = thumbnail === null || thumbnail === void 0 ? void 0 : thumbnail.source;
31
+ if (error) {
32
+ return ((0, jsx_runtime_1.jsxs)("span", { children: [(0, jsx_runtime_1.jsxs)("a", Object.assign({ href: url, className: "block", target: "_blank", rel: "noreferrer" }, { children: [(0, jsx_runtime_1.jsx)(outline_1.ArrowTopRightOnSquareIcon, { className: "w-4 h-4 float-right" }), (0, jsx_runtime_1.jsx)(WikiTextMark, {})] })), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "mt-2" }, { children: ["Error loading \"", page, "\" from wikipedia."] }))] }));
33
+ }
34
+ return ((0, jsx_runtime_1.jsx)(LinkCard_1.LinkCard, { loading: !data, url: url, title: (0, jsx_runtime_1.jsx)(WikiTextMark, {}), thumbnail: image, description: extract }));
35
+ }
36
+ function WikiLink({ children, page, url, wiki, }) {
37
+ return ((0, jsx_runtime_1.jsx)(HoverPopover_1.HoverPopover, Object.assign({ card: ({ open }) => (0, jsx_runtime_1.jsx)(WikiChild, { wiki: wiki, page: page, open: open }) }, { children: (0, jsx_runtime_1.jsx)("a", Object.assign({ href: url, className: "italic", target: "_blank", rel: "noreferrer" }, { children: children })) })));
38
+ }
39
+ exports.WikiLink = WikiLink;
@@ -0,0 +1,13 @@
1
+ import type { InlineMath, Math } from 'myst-spec';
2
+ import type { NodeRenderer } from './types';
3
+ type MathLike = (InlineMath | Math) & {
4
+ error?: boolean;
5
+ message?: string;
6
+ html?: string;
7
+ };
8
+ declare const MATH_RENDERERS: {
9
+ math: NodeRenderer<MathLike>;
10
+ inlineMath: NodeRenderer<MathLike>;
11
+ };
12
+ export default MATH_RENDERERS;
13
+ //# sourceMappingURL=math.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"math.d.ts","sourceRoot":"","sources":["../../src/math.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAGlD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AA2B5C,KAAK,QAAQ,GAAG,CAAC,UAAU,GAAG,IAAI,CAAC,GAAG;IACpC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAuCF,QAAA,MAAM,cAAc;;;CAGnB,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const jsx_runtime_1 = require("react/jsx-runtime");
7
+ const classnames_1 = __importDefault(require("classnames"));
8
+ const outline_1 = require("@heroicons/react/24/outline");
9
+ const inlineError_1 = require("./inlineError");
10
+ const heading_1 = require("./heading");
11
+ const mathRenderer = (node) => {
12
+ if (node.type === 'math') {
13
+ if (node.error || !node.html) {
14
+ return ((0, jsx_runtime_1.jsxs)("pre", Object.assign({ title: node.message }, { children: [(0, jsx_runtime_1.jsxs)("span", Object.assign({ className: "text-red-500" }, { children: [(0, jsx_runtime_1.jsx)(outline_1.ExclamationCircleIcon, { className: "inline h-[1em] mr-1" }), node.message, '\n\n'] })), node.value] }), node.key));
15
+ }
16
+ const id = node.html_id || node.identifier || node.key;
17
+ return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ id: id, className: (0, classnames_1.default)('flex group') }, { children: [(0, jsx_runtime_1.jsx)("div", { dangerouslySetInnerHTML: { __html: node.html }, className: "overflow-x-auto flex-grow" }), node.enumerator && ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex-none text-right m-0 pl-2 self-center relative" }, { children: [(0, jsx_runtime_1.jsxs)("span", { children: ["(", node.enumerator, ")"] }), (0, jsx_runtime_1.jsx)(heading_1.HashLink, { id: id, align: "right", kind: "Equation" })] })))] }), node.key));
18
+ }
19
+ if (node.error || !node.html) {
20
+ return (0, jsx_runtime_1.jsx)(inlineError_1.InlineError, { value: node.value, message: node.message }, node.key);
21
+ }
22
+ return (0, jsx_runtime_1.jsx)("span", { dangerouslySetInnerHTML: { __html: node.html } }, node.key);
23
+ // return <Math key={node.key} html={node.html} value={node.value as string} />;
24
+ };
25
+ const MATH_RENDERERS = {
26
+ math: mathRenderer,
27
+ inlineMath: mathRenderer,
28
+ };
29
+ exports.default = MATH_RENDERERS;
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ export declare const MaybeLongContent: ({ content, path, render, }: {
3
+ content?: string | undefined;
4
+ path?: string | undefined;
5
+ render: (content: string) => JSX.Element;
6
+ }) => JSX.Element;
7
+ export declare const DangerousHTML: ({ content, ...rest }: {
8
+ content: string;
9
+ }) => JSX.Element;
10
+ //# sourceMappingURL=components.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../../src/output/components.tsx"],"names":[],"mappings":";AAGA,eAAO,MAAM,gBAAgB;;;sBAOT,MAAM,KAAK,WAAW;iBAUzC,CAAC;AAEF,eAAO,MAAM,aAAa;aAAqC,MAAM;iBAWpE,CAAC"}