Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

📦 thebe-* v0.4.10 #464

Merged
merged 4 commits into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/thick-ligers-count.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'myst-to-react': patch
'@myst-theme/jupyter': patch
'@myst-theme/site': patch
---

Bumping `thebe-*` dependencies
23,812 changes: 12,607 additions & 11,205 deletions package-lock.json

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions packages/jupyter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@
"@headlessui/react": "^1.7.15",
"@heroicons/react": "^2.0.18",
"@myst-theme/providers": "^0.11.0",
"@scienceicons/react": "^0.0.6",
"@scienceicons/react": "^0.0.11",
"buffer": "^6.0.3",
"classnames": "^2.3.2",
"jupyterlab-plotly": "^5.18.0",
"classnames": "^2.5.1",
"jupyterlab-plotly": "^5.24.0",
"myst-common": "^1.6.0",
"myst-config": "^1.5.0",
"myst-config": "^1.6.0",
"myst-frontmatter": "^1.6.0",
"myst-spec": "^0.0.5",
"myst-spec-ext": "^1.6.0",
Expand All @@ -40,9 +40,9 @@
"nbtx": "^0.2.3",
"react-syntax-highlighter": "^15.5.0",
"swr": "^2.1.5",
"thebe-core": "0.4.7",
"thebe-lite": "0.4.7",
"thebe-react": "0.4.7",
"thebe-core": "0.4.10",
"thebe-lite": "0.4.10",
"thebe-react": "0.4.10",
"unist-util-select": "^4.0.3"
},
"peerDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/jupyter/src/ConnectionStatusTray.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ export function ConnectionStatusTray({ waitForSessions }: { waitForSessions?: bo
const host = options?.thebe?.useBinder
? 'Jupyter'
: options?.thebe?.useJupyterLite
? 'JupyterLite'
: 'Local Server';
? 'JupyterLite'
: 'Local Server';

// TODO radix ui toast!
if (show && error) {
Expand Down
2 changes: 1 addition & 1 deletion packages/jupyter/src/execute/busy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ export function reducer(state: BusyScopeState, action: BusyScopeAction): BusySco
error: {
...state.error,
[pageSlug]: {
...state.error[pageSlug],
...(state.error[pageSlug] as any),
[notebookSlug]: errors,
},
},
Expand Down
2 changes: 1 addition & 1 deletion packages/jupyter/src/execute/selectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export function selectAreExecutionScopesBuilding(state: ExecuteScopeState, slug:
}

export function selectExecutionScopeStatus(state: ExecuteScopeState, slug: string) {
return state.pages[slug]?.ready ? 'ready' : state.builds[slug]?.status ?? 'unknown';
return state.pages[slug]?.ready ? 'ready' : (state.builds[slug]?.status ?? 'unknown');
}

//
Expand Down
2 changes: 1 addition & 1 deletion packages/myst-to-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"myst-config": "^1.5.0",
"myst-spec": "^0.0.5",
"nanoid": "^4.0.2",
"react-syntax-highlighter": "^15.5.0",
"react-syntax-highlighter": "15.5.0",
"swr": "^2.1.5",
"unist-util-select": "^4.0.3",
"unist-util-visit": "^4.1.2"
Expand Down
5 changes: 2 additions & 3 deletions packages/myst-to-react/src/code.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import type { Code, InlineCode } from 'myst-spec';
import type { NodeRenderer } from '@myst-theme/providers';
import { useTheme } from '@myst-theme/providers';
import { LightAsync as SyntaxHighlighter } from 'react-syntax-highlighter';
Expand Down Expand Up @@ -111,7 +110,7 @@ export function CodeBlock(props: Props) {
);
}

const code: NodeRenderer<Code & { executable: boolean }> = ({ node }) => {
const code: NodeRenderer = ({ node }) => {
return (
<CodeBlock
identifier={node.html_id}
Expand Down Expand Up @@ -141,7 +140,7 @@ function isColor(maybeColorHash: string): string | undefined {
return color;
}

const inlineCode: NodeRenderer<InlineCode> = ({ node }) => {
const inlineCode: NodeRenderer = ({ node }) => {
if (isColor(node.value)) {
return (
<code className="px-1 rounded bg-slate-100 text-slate-700 dark:bg-slate-800 dark:text-slate-100">
Expand Down
4 changes: 2 additions & 2 deletions packages/myst-to-react/src/crossReference.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ export function CrossReferenceHover({
const parent = useXRefState();
const remoteBaseUrl = remoteBaseUrlIn ?? parent.remoteBaseUrl;
const remote = !!remoteBaseUrl || parent.remote || remoteIn;
const url = parent.remote ? urlIn ?? parent.url : urlIn;
const dataUrl = parent.remote ? dataUrlIn ?? parent.dataUrl : dataUrlIn;
const url = parent.remote ? (urlIn ?? parent.url) : urlIn;
const dataUrl = parent.remote ? (dataUrlIn ?? parent.dataUrl) : dataUrlIn;
const external = !!remoteBaseUrl || (url?.startsWith('http') ?? false);
const scroll: React.MouseEventHandler<HTMLAnchorElement> = (e) => {
e.preventDefault();
Expand Down
3 changes: 1 addition & 2 deletions packages/myst-to-react/src/heading.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { Heading } from 'myst-spec';
import type { NodeRenderer } from '@myst-theme/providers';
import { createElement as e } from 'react';
import { MyST } from './MyST.js';
import { HashLink } from './hashLink.js';

const Heading: NodeRenderer<Heading> = ({ node }) => {
const Heading: NodeRenderer = ({ node }) => {
const { enumerator, depth, key, identifier, html_id } = node;
const id = html_id || identifier || key;
const textContent = (
Expand Down
2 changes: 1 addition & 1 deletion packages/site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"nbtx": "^0.2.3",
"node-cache": "^5.1.2",
"node-fetch": "^2.6.11",
"thebe-react": "0.4.7",
"thebe-react": "0.4.10",
"unist-util-select": "^4.0.1"
},
"peerDependencies": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/node_modules/@jupyter-widgets/controls/css/widgets-base.css b/node_modules/@jupyter-widgets/controls/css/widgets-base.css
index b5c14f8..4f481fa 100644
index 6a16589..ba9d1bf 100644
--- a/node_modules/@jupyter-widgets/controls/css/widgets-base.css
+++ b/node_modules/@jupyter-widgets/controls/css/widgets-base.css
@@ -8,8 +8,8 @@
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/node_modules/@types/react-syntax-highlighter/index.d.ts b/node_modules/@types/react-syntax-highlighter/index.d.ts
index 413c917..4a9c465 100755
index 49590f0..92a6e76 100644
--- a/node_modules/@types/react-syntax-highlighter/index.d.ts
+++ b/node_modules/@types/react-syntax-highlighter/index.d.ts
@@ -696,11 +696,21 @@ declare module 'react-syntax-highlighter/dist/esm/styles/hljs/vs2015' {
@@ -688,11 +688,21 @@ declare module "react-syntax-highlighter/dist/esm/styles/hljs/vs2015" {
export default style;
}

Expand All @@ -11,7 +11,7 @@ index 413c917..4a9c465 100755
+ export default style;
+}
+
declare module 'react-syntax-highlighter/dist/esm/styles/hljs/xcode' {
declare module "react-syntax-highlighter/dist/esm/styles/hljs/xcode" {
const style: { [key: string]: React.CSSProperties };
export default style;
}
Expand All @@ -21,6 +21,6 @@ index 413c917..4a9c465 100755
+ export default style;
+}
+
declare module 'react-syntax-highlighter/dist/esm/styles/hljs/xt256' {
declare module "react-syntax-highlighter/dist/esm/styles/hljs/xt256" {
const style: { [key: string]: React.CSSProperties };
export default style;
2 changes: 1 addition & 1 deletion turbo.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://turborepo.org/schema.json",
"pipeline": {
"tasks": {
"compile": {
"dependsOn": ["^compile"],
"outputs": ["dist/**"]
Expand Down
Loading