diff --git a/Makefile b/Makefile index 0f5b048ac..d83b158d0 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ desktop := packages/desktop/build/* kernel := packages/kernel/dist/* stlite-lib-wheel := packages/kernel/py/stlite-lib/dist/stlite_lib-0.1.0-py3-none-any.whl streamlit_proto := streamlit/frontend/lib/src/proto.d.ts -streamlit_wheel := packages/kernel/py/streamlit/lib/dist/streamlit-1.40.1-cp312-none-any.whl +streamlit_wheel := packages/kernel/py/streamlit/lib/dist/streamlit-1.41.0-cp312-none-any.whl streamlit_frontend_lib_prod := streamlit/frontend/lib/dist/* export USE_CONSTRAINTS_FILE := false # https://github.com/streamlit/streamlit/blob/1.27.0/.github/workflows/release.yml#L67-L68 @@ -138,7 +138,7 @@ $(streamlit_wheel): venv $(streamlit_proto) streamlit/lib/streamlit/**/*.py stre SNOWPARK_CONDA_BUILD=true $(MAKE) -C streamlit distribution && \ mv $$TEMP_DIR/*.pyi ./streamlit/lib/streamlit/proto/ && \ rmdir $$TEMP_DIR && \ - pyodide py-compile --keep streamlit/lib/dist/streamlit-1.40.1-py2.py3-none-any.whl && \ + pyodide py-compile --keep streamlit/lib/dist/streamlit-1.41.0-py2.py3-none-any.whl && \ mkdir -p $(dir $(streamlit_wheel)) && \ cp streamlit/lib/dist/$(notdir $(streamlit_wheel)) $(streamlit_wheel) diff --git a/packages/common-react/package.json b/packages/common-react/package.json index 4f5fdc8fd..22e1bd4fa 100644 --- a/packages/common-react/package.json +++ b/packages/common-react/package.json @@ -14,7 +14,7 @@ "check:prettier": "prettier --check ." }, "dependencies": { - "@streamlit/lib": "1.40.1" + "@streamlit/lib": "1.41.0" }, "devDependencies": { "react": "^18.2.0", diff --git a/packages/common-react/tsconfig.json b/packages/common-react/tsconfig.json index af619224d..d1034ec2e 100644 --- a/packages/common-react/tsconfig.json +++ b/packages/common-react/tsconfig.json @@ -31,7 +31,7 @@ // "paths": {} /* Specify a set of entries that re-map imports to additional lookup locations. */, // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ // "typeRoots": [], /* Specify multiple folders that act like `./node_modules/@types`. */ - // "types": [], /* Specify type package names to be included without being referenced in a source file. */ + "types": ["vite/client"], /* Specify type package names to be included without being referenced in a source file. */ // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ // "resolveJsonModule": true, /* Enable importing .json files */ // "noResolve": true, /* Disallow `import`s, `require`s or ``s from expanding the number of files TypeScript should add to a project. */ diff --git a/packages/desktop/bin-src/dump_artifacts/index.ts b/packages/desktop/bin-src/dump_artifacts/index.ts index 98505eac3..9e7fb8643 100755 --- a/packages/desktop/bin-src/dump_artifacts/index.ts +++ b/packages/desktop/bin-src/dump_artifacts/index.ts @@ -148,7 +148,7 @@ async function installPackages( requirements.push(stliteLibWheel); const streamlitWheel = await prepareLocalWheel( pyodide, - path.join(wheelsDir, "streamlit-1.40.1-cp312-none-any.whl"), + path.join(wheelsDir, "streamlit-1.41.0-cp312-none-any.whl"), ); requirements.push(streamlitWheel); diff --git a/packages/desktop/package.json b/packages/desktop/package.json index debc83691..2aa8d9a4b 100644 --- a/packages/desktop/package.json +++ b/packages/desktop/package.json @@ -72,7 +72,7 @@ "@stlite/common": "^0.73.1", "@stlite/common-react": "^0.73.1", "@stlite/kernel": "^0.73.1", - "@streamlit/app": "1.40.1", + "@streamlit/app": "1.41.0", "@testing-library/react": "^14.1.2", "@testing-library/user-event": "^14.0.0", "@types/jest": "^27.4.3", diff --git a/packages/desktop/scripts/copy_wheels.js b/packages/desktop/scripts/copy_wheels.js index dd82f683f..a3a8d45d9 100755 --- a/packages/desktop/scripts/copy_wheels.js +++ b/packages/desktop/scripts/copy_wheels.js @@ -22,7 +22,7 @@ async function main() { ); const streamlitWheelPath = path.join( stliteKernelPyDir, - "streamlit/lib/dist/streamlit-1.40.1-cp312-none-any.whl", + "streamlit/lib/dist/streamlit-1.41.0-cp312-none-any.whl", ); // Create the `wheels` directory diff --git a/packages/kernel/package.json b/packages/kernel/package.json index 8ed6c8aaf..24be90bc3 100644 --- a/packages/kernel/package.json +++ b/packages/kernel/package.json @@ -29,7 +29,7 @@ "dependencies": { "@jupyterlab/coreutils": "^5.4.2", "@stlite/common": "^0.73.1", - "@streamlit/lib": "1.40.1", + "@streamlit/lib": "1.41.0", "@tinyhttp/content-disposition": "^2.2.2", "path-browserify": "^1.0.1", "react": "^18.2.0" diff --git a/packages/kernel/src/kernel.ts b/packages/kernel/src/kernel.ts index a8d6e0385..701087bca 100644 --- a/packages/kernel/src/kernel.ts +++ b/packages/kernel/src/kernel.ts @@ -32,7 +32,7 @@ import { assertStreamlitConfig } from "./types"; // https://github.com/pyodide/pyodide/pull/1859 // https://pyodide.org/en/stable/project/changelog.html#micropip import STLITE_LIB_WHEEL from "!!file-loader?name=pypi/[name].[ext]&context=.!../py/stlite-lib/dist/stlite_lib-0.1.0-py3-none-any.whl"; // TODO: Extract the import statement to an auto-generated file like `_pypi.ts` in JupyterLite: https://github.com/jupyterlite/jupyterlite/blob/f2ecc9cf7189cb19722bec2f0fc7ff5dfd233d47/packages/pyolite-kernel/src/_pypi.ts -import STREAMLIT_WHEEL from "!!file-loader?name=pypi/[name].[ext]&context=.!../py/streamlit/lib/dist/streamlit-1.40.1-cp312-none-any.whl"; +import STREAMLIT_WHEEL from "!!file-loader?name=pypi/[name].[ext]&context=.!../py/streamlit/lib/dist/streamlit-1.41.0-cp312-none-any.whl"; // Ref: https://github.com/streamlit/streamlit/blob/1.12.2/frontend/src/lib/UriUtil.ts#L32-L33 const FINAL_SLASH_RE = /\/+$/; diff --git a/packages/kernel/src/pyodide-loader.ts b/packages/kernel/src/pyodide-loader.ts index 806678c35..1639fa573 100644 --- a/packages/kernel/src/pyodide-loader.ts +++ b/packages/kernel/src/pyodide-loader.ts @@ -1,3 +1,5 @@ +/// + import type Pyodide from "pyodide"; interface ResolvePyodideUrlResult { diff --git a/packages/kernel/src/react-helpers/CustomComponentIFrame/index.spec.tsx b/packages/kernel/src/react-helpers/CustomComponentIFrame/index.spec.tsx index b8751d43c..e207d62d5 100644 --- a/packages/kernel/src/react-helpers/CustomComponentIFrame/index.spec.tsx +++ b/packages/kernel/src/react-helpers/CustomComponentIFrame/index.spec.tsx @@ -76,9 +76,12 @@ describe("", () => { requirements: [], prebuiltPackageNames: [], }); + function CustomIframe(props: JSX.IntrinsicElements["iframe"]) { + return