@myst-theme/site 0.0.20 → 0.1.23

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.20",
3
+ "version": "0.1.23",
4
4
  "main": "./src/index.ts",
5
5
  "types": "./src/index.ts",
6
6
  "files": [
@@ -14,21 +14,18 @@
14
14
  "lint:format": "prettier --check \"src/**/*.{ts,tsx,md}\""
15
15
  },
16
16
  "dependencies": {
17
- "@curvenote/connect": "^0.0.7",
18
- "@curvenote/icons": "^0.0.3",
19
- "@curvenote/runtime": "^0.2.9",
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",
17
+ "@headlessui/react": "^1.7.8",
18
+ "@heroicons/react": "^2.0.14",
19
+ "@myst-theme/diagrams": "^0.1.23",
20
+ "@myst-theme/frontmatter": "^0.1.23",
21
+ "@myst-theme/jupyter": "^0.1.23",
22
+ "@myst-theme/providers": "^0.1.23",
26
23
  "classnames": "^2.3.2",
27
24
  "lodash.throttle": "^4.1.1",
28
25
  "myst-common": "^0.0.12",
29
- "myst-config": "^0.0.7",
30
- "myst-demo": "^0.1.21",
31
- "myst-to-react": "^0.1.21",
26
+ "myst-config": "^0.0.9",
27
+ "myst-demo": "^0.1.23",
28
+ "myst-to-react": "^0.1.23",
32
29
  "mystjs": "^0.0.15",
33
30
  "nbtx": "^0.2.3",
34
31
  "node-cache": "^5.1.2",
@@ -36,8 +33,8 @@
36
33
  "unist-util-select": "^4.0.1"
37
34
  },
38
35
  "peerDependencies": {
39
- "@remix-run/node": "^1.10.0",
40
- "@remix-run/react": "^1.10.0",
36
+ "@remix-run/node": "^1.12.0",
37
+ "@remix-run/react": "^1.12.0",
41
38
  "@types/react": "^16.8 || ^17.0 || ^18.0",
42
39
  "@types/react-dom": "^16.8 || ^17.0 || ^18.0",
43
40
  "react": "^16.8 || ^17.0 || ^18.0",
@@ -7,12 +7,14 @@ export function Navigation({
7
7
  top,
8
8
  height,
9
9
  hide_toc,
10
+ footer,
10
11
  }: {
11
12
  children?: React.ReactNode;
12
13
  projectSlug?: string;
13
14
  top?: number;
14
15
  height?: number;
15
16
  hide_toc?: boolean;
17
+ footer?: React.ReactNode;
16
18
  }) {
17
19
  const [open, setOpen] = useNavOpen();
18
20
  if (hide_toc) return <>{children}</>;
@@ -25,7 +27,7 @@ export function Navigation({
25
27
  ></div>
26
28
  )}
27
29
  {children}
28
- <TableOfContents projectSlug={projectSlug} top={top} height={height} />
30
+ <TableOfContents projectSlug={projectSlug} top={top} height={height} footer={footer} />
29
31
  </>
30
32
  );
31
33
  }
@@ -2,7 +2,6 @@ import React from 'react';
2
2
  import classNames from 'classnames';
3
3
  import { NavLink, useParams, useLocation } from '@remix-run/react';
4
4
  import type { SiteManifest } from 'myst-config';
5
- import { CreatedInCurvenote } from '@curvenote/icons';
6
5
  import { useNavOpen, useSiteManifest, useUrlbase, withUrlbase } from '@myst-theme/providers';
7
6
  import { getProjectHeadings } from '../../loaders';
8
7
  import type { Heading } from '../../types';
@@ -106,12 +105,12 @@ export const TableOfContents = ({
106
105
  projectSlug,
107
106
  top,
108
107
  height,
109
- showFooter = true,
108
+ footer,
110
109
  }: {
111
110
  top?: number;
112
111
  height?: number;
113
112
  projectSlug?: string;
114
- showFooter?: boolean;
113
+ footer?: React.ReactNode;
115
114
  }) => {
116
115
  const [open] = useNavOpen();
117
116
  const config = useSiteManifest();
@@ -145,11 +144,7 @@ export const TableOfContents = ({
145
144
  >
146
145
  <Headings folder={resolvedProjectSlug} headings={headings} sections={config?.projects} />
147
146
  </nav>
148
- {showFooter && (
149
- <div className="flex-none py-4">
150
- <CreatedInCurvenote />
151
- </div>
152
- )}
147
+ {footer && <div className="flex-none py-4">{footer}</div>}
153
148
  </div>
154
149
  );
155
150
  };
@@ -10,7 +10,6 @@ import {
10
10
  import type { SiteManifest, SiteNavItem } from 'myst-config';
11
11
  import { ThemeButton } from './ThemeButton';
12
12
  import { useNavOpen, useSiteManifest } from '@myst-theme/providers';
13
- import { CurvenoteLogo } from '@curvenote/icons';
14
13
  import { LoadingBar } from './Loading';
15
14
 
16
15
  export const DEFAULT_NAV_HEIGHT = 60;
@@ -109,7 +108,7 @@ function NavItem({ item }: { item: SiteNavItem }) {
109
108
  to={action.url || ''}
110
109
  className={({ isActive }) =>
111
110
  classNames(
112
- 'block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 hover:text-black',
111
+ ' block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 hover:text-black ',
113
112
  {
114
113
  'text-black font-bold': isActive,
115
114
  },
@@ -190,13 +189,12 @@ function HomeLink({ logo, logoText, name }: { logo?: string; logoText?: string;
190
189
  prefetch="intent"
191
190
  >
192
191
  {logo && <img src={logo} className="h-9 mr-3" alt={logoText || name} height="2.25rem"></img>}
193
- {nothingSet && <CurvenoteLogo className="mr-3" fill="#FFF" size={30} />}
194
192
  <span
195
193
  className={classNames('text-md sm:text-xl tracking-tight sm:mr-5', {
196
194
  'sr-only': !(logoText || nothingSet),
197
195
  })}
198
196
  >
199
- {logoText || 'Curvenote'}
197
+ {logoText || 'Made with MyST'}
200
198
  </span>
201
199
  </Link>
202
200
  );
package/src/index.ts CHANGED
@@ -5,4 +5,3 @@ export * from './components';
5
5
  export * from './pages';
6
6
  export * from './seo';
7
7
  export * from './hooks';
8
- export * from './store';
package/src/store.ts DELETED
@@ -1,21 +0,0 @@
1
- import { applyMiddleware, createStore, combineReducers } from 'redux';
2
- import thunkMiddleware from 'redux-thunk';
3
- import type { types } from '@curvenote/runtime';
4
- import runtime from '@curvenote/runtime';
5
- import type { HostState } from '@curvenote/connect';
6
- import { host } from '@curvenote/connect';
7
-
8
- export interface State {
9
- runtime: types.State;
10
- app: HostState;
11
- }
12
-
13
- export function createCurvenoteReduxStore() {
14
- return createStore(
15
- combineReducers({
16
- runtime: runtime.reducer,
17
- app: host.reducer,
18
- }),
19
- applyMiddleware(thunkMiddleware, runtime.triggerEvaluate, runtime.dangerousEvaluatation),
20
- );
21
- }