myst-to-react 0.1.32 → 0.1.34

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.
@@ -6,6 +6,7 @@ export declare function FootnoteDefinition({ identifier }: {
6
6
  export declare const FootnoteReference: NodeRenderer;
7
7
  declare const FOOTNOTE_RENDERERS: {
8
8
  footnoteReference: NodeRenderer<any>;
9
+ footnoteDefinition: () => null;
9
10
  };
10
11
  export default FOOTNOTE_RENDERERS;
11
12
  //# sourceMappingURL=footnotes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"footnotes.d.ts","sourceRoot":"","sources":["../../src/footnotes.tsx"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAK1D,wBAAgB,kBAAkB,CAAC,EAAE,UAAU,EAAE,EAAE;IAAE,UAAU,EAAE,MAAM,CAAA;CAAE,eAKxE;AAED,eAAO,MAAM,iBAAiB,EAAE,YAU/B,CAAC;AAEF,QAAA,MAAM,kBAAkB;;CAEvB,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
1
+ {"version":3,"file":"footnotes.d.ts","sourceRoot":"","sources":["../../src/footnotes.tsx"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAM1D,wBAAgB,kBAAkB,CAAC,EAAE,UAAU,EAAE,EAAE;IAAE,UAAU,EAAE,MAAM,CAAA;CAAE,eAOxE;AAED,eAAO,MAAM,iBAAiB,EAAE,YAU/B,CAAC;AAEF,QAAA,MAAM,kBAAkB;;;CAIvB,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
@@ -5,10 +5,11 @@ const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const providers_1 = require("@myst-theme/providers");
6
6
  const _1 = require(".");
7
7
  const ClickPopover_1 = require("./components/ClickPopover");
8
+ const unist_util_select_1 = require("unist-util-select");
8
9
  function FootnoteDefinition({ identifier }) {
9
- var _a;
10
+ var _a, _b;
10
11
  const references = (0, providers_1.useReferences)();
11
- const node = (_a = references === null || references === void 0 ? void 0 : references.footnotes) === null || _a === void 0 ? void 0 : _a[identifier];
12
+ const node = (_b = (_a = references === null || references === void 0 ? void 0 : references.footnotes) === null || _a === void 0 ? void 0 : _a[identifier]) !== null && _b !== void 0 ? _b : (0, unist_util_select_1.select)(`footnoteDefinition[identifier=${identifier}]`, references === null || references === void 0 ? void 0 : references.article);
12
13
  const children = (0, _1.useParse)(node);
13
14
  return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: children });
14
15
  }
@@ -20,5 +21,7 @@ const FootnoteReference = (node) => {
20
21
  exports.FootnoteReference = FootnoteReference;
21
22
  const FOOTNOTE_RENDERERS = {
22
23
  footnoteReference: exports.FootnoteReference,
24
+ // Do not render the definitions, they get pulled in by a handler
25
+ footnoteDefinition: () => null,
23
26
  };
24
27
  exports.default = FOOTNOTE_RENDERERS;
@@ -6,6 +6,7 @@ export declare function FootnoteDefinition({ identifier }: {
6
6
  export declare const FootnoteReference: NodeRenderer;
7
7
  declare const FOOTNOTE_RENDERERS: {
8
8
  footnoteReference: NodeRenderer<any>;
9
+ footnoteDefinition: () => null;
9
10
  };
10
11
  export default FOOTNOTE_RENDERERS;
11
12
  //# sourceMappingURL=footnotes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"footnotes.d.ts","sourceRoot":"","sources":["../../src/footnotes.tsx"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAK1D,wBAAgB,kBAAkB,CAAC,EAAE,UAAU,EAAE,EAAE;IAAE,UAAU,EAAE,MAAM,CAAA;CAAE,eAKxE;AAED,eAAO,MAAM,iBAAiB,EAAE,YAU/B,CAAC;AAEF,QAAA,MAAM,kBAAkB;;CAEvB,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
1
+ {"version":3,"file":"footnotes.d.ts","sourceRoot":"","sources":["../../src/footnotes.tsx"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAM1D,wBAAgB,kBAAkB,CAAC,EAAE,UAAU,EAAE,EAAE;IAAE,UAAU,EAAE,MAAM,CAAA;CAAE,eAOxE;AAED,eAAO,MAAM,iBAAiB,EAAE,YAU/B,CAAC;AAEF,QAAA,MAAM,kBAAkB;;;CAIvB,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "myst-to-react",
3
- "version": "0.1.32",
3
+ "version": "0.1.34",
4
4
  "main": "dist/cjs/index.js",
5
5
  "types": "dist/types/index.d.ts",
6
6
  "files": [
@@ -17,20 +17,20 @@
17
17
  "build": "npm-run-all -l clean -p build:cjs build:types"
18
18
  },
19
19
  "dependencies": {
20
- "@myst-theme/providers": "^0.1.32",
20
+ "@myst-theme/providers": "^0.1.34",
21
21
  "@headlessui/react": "^1.7.13",
22
22
  "@heroicons/react": "^2.0.13",
23
23
  "@popperjs/core": "^2.11.6",
24
24
  "buffer": "^6.0.3",
25
25
  "classnames": "^2.3.2",
26
- "myst-common": "^0.0.14",
27
- "myst-config": "^0.0.10",
26
+ "myst-common": "^0.0.15",
27
+ "myst-config": "^0.0.11",
28
28
  "myst-spec": "^0.0.4",
29
29
  "nanoid": "^4.0.0",
30
30
  "react-popper": "^2.3.0",
31
31
  "react-syntax-highlighter": "^15.5.0",
32
32
  "swr": "^1.3.0",
33
- "unist-util-select": "^4.0.1"
33
+ "unist-util-select": "^4.0.3"
34
34
  },
35
35
  "peerDependencies": {
36
36
  "@types/react": "^16.8 || ^17.0 || ^18.0",