@myst-theme/site 0.0.18 → 0.0.20

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myst-theme/site",
3
- "version": "0.0.18",
3
+ "version": "0.0.20",
4
4
  "main": "./src/index.ts",
5
5
  "types": "./src/index.ts",
6
6
  "files": [
@@ -14,29 +14,30 @@
14
14
  "lint:format": "prettier --check \"src/**/*.{ts,tsx,md}\""
15
15
  },
16
16
  "dependencies": {
17
- "@curvenote/blocks": "^1.5.16",
18
- "@curvenote/connect": "0.0.6",
17
+ "@curvenote/connect": "^0.0.7",
19
18
  "@curvenote/icons": "^0.0.3",
20
- "@curvenote/nbtx": "^0.1.11",
21
19
  "@curvenote/runtime": "^0.2.9",
22
- "@curvenote/ui-providers": "^0.0.16",
23
- "@headlessui/react": "^1.6.6",
24
- "@heroicons/react": "^2.0.12",
25
- "@myst-theme/frontmatter": "^0.1.20",
20
+ "@headlessui/react": "^1.7.7",
21
+ "@heroicons/react": "^2.0.13",
22
+ "@myst-theme/diagrams": "^0.1.2",
23
+ "@myst-theme/frontmatter": "^0.1.21",
24
+ "@myst-theme/jupyter": "^0.0.3",
25
+ "@myst-theme/providers": "^0.1.21",
26
26
  "classnames": "^2.3.2",
27
27
  "lodash.throttle": "^4.1.1",
28
- "myst-common": "^0.0.11",
29
- "myst-config": "^0.0.6",
30
- "myst-demo": "^0.1.20",
31
- "myst-to-react": "^0.1.20",
28
+ "myst-common": "^0.0.12",
29
+ "myst-config": "^0.0.7",
30
+ "myst-demo": "^0.1.21",
31
+ "myst-to-react": "^0.1.21",
32
32
  "mystjs": "^0.0.15",
33
+ "nbtx": "^0.2.3",
33
34
  "node-cache": "^5.1.2",
34
35
  "node-fetch": "^2.6.7",
35
36
  "unist-util-select": "^4.0.1"
36
37
  },
37
38
  "peerDependencies": {
38
- "@remix-run/node": "^1.7.5",
39
- "@remix-run/react": "^1.7.5",
39
+ "@remix-run/node": "^1.10.0",
40
+ "@remix-run/react": "^1.10.0",
40
41
  "@types/react": "^16.8 || ^17.0 || ^18.0",
41
42
  "@types/react-dom": "^16.8 || ^17.0 || ^18.0",
42
43
  "react": "^16.8 || ^17.0 || ^18.0",
@@ -82,11 +82,11 @@ const Headings = ({ folder, headings, sections }: Props) => {
82
82
  path={heading.path}
83
83
  isIndex={heading.level === 'index'}
84
84
  >
85
- {heading.title}
85
+ {heading.short_title || heading.title}
86
86
  </HeadingLink>
87
87
  ) : (
88
88
  <h5 className="text-slate-900 font-semibold my-2 text-md leading-6 dark:text-slate-100 break-words">
89
- {heading.title}
89
+ {heading.short_title || heading.title}
90
90
  </h5>
91
91
  )}
92
92
  </li>
@@ -94,7 +94,7 @@ const Headings = ({ folder, headings, sections }: Props) => {
94
94
  }
95
95
  return (
96
96
  <li key={sec.slug} className={classNames('p-1 my-2 lg:hidden', HEADING_CLASSES)}>
97
- <HeadingLink path={`/${sec.slug}`}>{sec.title}</HeadingLink>
97
+ <HeadingLink path={`/${sec.slug}`}>{sec.short_title || sec.title}</HeadingLink>
98
98
  </li>
99
99
  );
100
100
  })}
@@ -1,5 +1,5 @@
1
- import type { MinifiedOutput } from '@curvenote/nbtx';
2
- import { walkPaths } from '@curvenote/nbtx';
1
+ import type { MinifiedOutput } from 'nbtx';
2
+ import { walkOutputs } from 'nbtx';
3
3
  import type { SiteManifest } from 'myst-config';
4
4
  import { selectAll } from 'unist-util-select';
5
5
  import type { Image as ImageSpec, Link as LinkSpec } from 'myst-spec';
@@ -136,9 +136,11 @@ export function updatePageStaticLinksInplace(data: PageLoader, updateUrl: Update
136
136
  const outputs = selectAll('output', data.mdast) as Output[];
137
137
  outputs.forEach((node) => {
138
138
  if (!node.data) return;
139
- walkPaths(node.data, (path, obj) => {
140
- obj.path = updateUrl(path);
141
- obj.content = updateUrl(obj.content as string);
139
+ walkOutputs(node.data, (obj) => {
140
+ // The path will be defined from output of myst-cli
141
+ // Here we are re-asigning it to the current domain
142
+ if (!obj.path) return;
143
+ obj.path = updateUrl(obj.path);
142
144
  });
143
145
  });
144
146
  return data;
package/src/types.ts CHANGED
@@ -13,6 +13,7 @@ export type Heading = {
13
13
  slug?: string;
14
14
  path?: string;
15
15
  title: string;
16
+ short_title?: string;
16
17
  level: number | 'index';
17
18
  group?: string;
18
19
  };