A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.
Python artificial-intelligencedagdata-sciencedata-visualizationdataflowdeveloper-toolsmachine-learningnotebookspipelinepythonreactivesqlweb-app
cleanup: remove mode "island" (#1250)
Myles Scolnick6dae7b301bf3
diff --git a/frontend/islands/__demo__/index.html b/frontend/islands/__demo__/index.htmlindex 0ebb5682c5..77357a76d1 100644--- a/frontend/islands/__demo__/index.html+++ b/frontend/islands/__demo__/index.html@@ -1,13 +1,23 @@<!doctype html>-<html lang="en">+<html><head><meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" /><meta name="theme-color" content="#000000" /><meta name="description" content="a marimo app" />- <title>my demo app</title>+ <title>🏝️</title>++ <script+ type="module"+ src="https://cdn.jsdelivr.net/npm/@marimo-team/[email protected]/dist/main.js"+ ></script>+ <link+ href="https://cdn.jsdelivr.net/npm/@marimo-team/[email protected]/dist/style.css"+ rel="stylesheet"+ crossorigin="anonymous"+ /><link rel="preconnect" href="https://fonts.googleapis.com" />- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin="" />+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /><linkhref="https://fonts.googleapis.com/css2?family=Fira+Mono:wght@400;500;700&family=Lora&family=PT+Sans:wght@400;700&display=swap"rel="stylesheet"@@ -18,28 +28,12 @@integrity="sha384-wcIxkf4k558AjM3Yz3BBFQUbk/zgIYC2R0QpeeYb+TwlBVMrlgLqwRjRtGZiK7ww"crossorigin="anonymous"/>- <script type="module" src="../src/core/islands/main.ts"></script>-- <style type="text/css">- marimo-island {- display: block;- margin: 2rem;- }- </style></head><body><marimo-island data-app-id="main" data-cell-id="Hbol"><marimo-cell-output> </marimo-cell-output><marimo-cell-code hidden> import%20marimo%20as%20mo </marimo-cell-code></marimo-island>- <marimo-island data-app-id="main" data-cell-id="1234">- <marimo-cell-output>- <marimo-json-output data-json-data="["text/plain:null", "text/plain:1", "text/plain:2", "text/plain:3", "text/plain:4", "text/plain:5"]"></marimo-json-output>- </marimo-cell-output>- <marimo-cell-code hidden="">- None%2C%201%2C%202%2C%203%2C%204%2C%205- </marimo-cell-code>- </marimo-island><marimo-island data-app-id="main" data-cell-id="MJUe"><marimo-cell-output><span class="markdown"@@ -52,41 +46,39 @@<marimo-cell-output><marimo-ui-elementobject-id="vblA-0"- random-id="3fa4b908-82a9-40b2-af66-f7ba633f5f9e"- >- <marimo-slider+ random-id="f9c89741-c82c-4139-90a7-5a7408c73a0d"+ ><marimo-sliderdata-initial-value="0"data-label="null"data-start="0"data-stop="100"data-step="2"+ data-steps="[]"data-debounce="false"data-orientation='"horizontal"'data-show-value="false"data-full-width="false"- ></marimo-slider>- </marimo-ui-element>+ ></marimo-slider+ ></marimo-ui-element></marimo-cell-output><marimo-cell-code hidden>- %0A%20%20%20%20slider%20%3D%20mo.ui.slider(0%2C%20100%2C%202)%0A%20%20%20%20slider%0A%20%20%20%20+ %0Aslider%20%3D%20mo.ui.slider(0%2C%20100%2C%202)%0Aslider%0A</marimo-cell-code></marimo-island><marimo-island data-app-id="main" data-cell-id="bkHC"><marimo-cell-output>- <span class="markdown">- <span class="paragraph">- Slider value: <span class="code">0</span>- </span>- </span>+ <span class="markdown"+ ><span class="paragraph">Slider value: 0</span></span+ ></marimo-cell-output><marimo-cell-code hidden>- %0A%20%20%20%20mo.md(f%22Slider%20value%3A%20%7Bslider.value%7D%22)%0A%20%20%20%20+ %0Amo.md(f%22Slider%20value%3A%20%7Bslider.value%7D%22)%0A</marimo-cell-code></marimo-island><marimo-island data-app-id="main" data-cell-id="lEQa"><marimo-cell-output>- <span class="markdown">- <h1 id="hello-markdown">Hello, Markdown!</h1>+ <span class="markdown"+ ><h1 id="hello-markdown">Hello, Markdown!</h1><span class="paragraph">Use marimo's "<code>md</code>" function to embed rich text intoyour marimo apps. This function compiles Markdown into HTML that@@ -106,30 +98,29 @@<span class="sd"> '''</span><span class="p">)</span></code></pre>- </div>- </span>+ </div></span+ ></marimo-cell-output><marimo-cell-code hidden>- %0A%20%20%20%20mo.md(%0A%20%20%20%20%20%20%20%20%22%22%22%0A%20%20%20%20%20%20%20%20%23%20Hello%2C%20Markdown!%0A%0A%20%20%20%20%20%20%20%20Use%20marimo's%20%22%60md%60%22%20function%20to%20embed%20rich%20text%20into%20your%20marimo%0A%20%20%20%20%20%20%20%20apps.%20This%20function%20compiles%20Markdown%20into%20HTML%20that%20marimo%0A%20%20%20%20%20%20%20%20can%20display.%0A%0A%20%20%20%20%20%20%20%20For%20example%2C%20here's%20the%20code%20that%20rendered%20the%20above%20title%20and%0A%20%20%20%20%20%20%20%20paragraph%3A%0A%0A%20%20%20%20%20%20%20%20%60%60%60python3%0A%20%20%20%20%20%20%20%20mo.md(%0A%20%20%20%20%20%20%20%20%20%20%20%20'''%0A%20%20%20%20%20%20%20%20%20%20%20%20%23%20Hello%2C%20Markdown!%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20Use%20marimo's%20%22%60md%60%22%20function%20to%20embed%20rich%20text%20into%20your%20marimo%0A%20%20%20%20%20%20%20%20%20%20%20%20apps.%20This%20function%20compiles%20your%20Markdown%20into%20HTML%20that%20marimo%0A%20%20%20%20%20%20%20%20%20%20%20%20can%20display.%0A%20%20%20%20%20%20%20%20%20%20%20%20'''%0A%20%20%20%20%20%20%20%20)%0A%20%20%20%20%20%20%20%20%60%60%60%0A%20%20%20%20%20%20%20%20%22%22%22%0A%20%20%20%20)%0A%20%20%20%20+ %0Amo.md(%0A%20%20%20%20%22%22%22%0A%20%20%20%20%23%20Hello%2C%20Markdown!%0A%0A%20%20%20%20Use%20marimo's%20%22%60md%60%22%20function%20to%20embed%20rich%20text%20into%20your%20marimo%0A%20%20%20%20apps.%20This%20function%20compiles%20Markdown%20into%20HTML%20that%20marimo%0A%20%20%20%20can%20display.%0A%0A%20%20%20%20For%20example%2C%20here's%20the%20code%20that%20rendered%20the%20above%20title%20and%0A%20%20%20%20paragraph%3A%0A%0A%20%20%20%20%60%60%60python3%0A%20%20%20%20mo.md(%0A%20%20%20%20%20%20%20%20'''%0A%20%20%20%20%20%20%20%20%23%20Hello%2C%20Markdown!%0A%0A%20%20%20%20%20%20%20%20Use%20marimo's%20%22%60md%60%22%20function%20to%20embed%20rich%20text%20into%20your%20marimo%0A%20%20%20%20%20%20%20%20apps.%20This%20function%20compiles%20your%20Markdown%20into%20HTML%20that%20marimo%0A%20%20%20%20%20%20%20%20can%20display.%0A%20%20%20%20%20%20%20%20'''%0A%20%20%20%20)%0A%20%20%20%20%60%60%60%0A%20%20%20%20%22%22%22%0A)%0A</marimo-cell-code></marimo-island><marimo-island data-app-id="main" data-cell-id="PKri"><marimo-cell-output>- <span class="markdown">- <h2 id="latex">LaTeX</h2>+ <span class="markdown"+ ><h2 id="latex">LaTeX</h2><span class="paragraph">You can embed LaTeX in Markdown.</span><span class="paragraph">For example,</span><div class="codehilite"><pre><span></span><code><span class="n">mo</span><span class="o">.</span><span class="n">md</span><span class="p">(</span><span class="sa">r</span><span class="s1">'$f : \mathbf</span><span class="si">{R}</span><span class="s1"> o \mathbf</span><span class="si">{R}</span><span class="s1">$'</span><span class="p">)</span></code></pre></div>- <span class="paragraph">- renders+ <span class="paragraph"+ >renders<marimo-tex class="arithmatex">||(f : \mathbf{R} o \mathbf{R}||)</marimo-tex- >- , while- </span>+ >, while</span+ ><div class="codehilite"><pre><span></span><code><span class="n">mo</span><span class="o">.</span><span class="n">md</span><span class="p">(</span><span class="w"> </span><span class="sa">r</span><span class="sd">'''</span>@@ -143,13 +134,14 @@<span class="paragraph">renders the display math</span><marimo-tex class="arithmatex">||[ f: \mathbf{R} o \mathbf{R}. ||]</marimo-tex- >- </span>+ ></span+ ></marimo-cell-output><marimo-cell-code hidden>- %0A%20%20%20%20mo.md(%0A%20%20%20%20%20%20%20%20r%22%22%22%0A%20%20%20%20%20%20%20%20%23%23%20LaTeX%0A%20%20%20%20%20%20%20%20You%20can%20embed%20LaTeX%20in%20Markdown.%0A%0A%20%20%20%20%20%20%20%20For%20example%2C%0A%0A%20%20%20%20%20%20%20%20%60%60%60python3%0A%20%20%20%20%20%20%20%20mo.md(r'%24f%20%3A%20%5Cmathbf%7BR%7D%20%09o%20%5Cmathbf%7BR%7D%24')%0A%20%20%20%20%20%20%20%20%60%60%60%0A%0A%20%20%20%20%20%20%20%20renders%20%24f%20%3A%20%5Cmathbf%7BR%7D%20%09o%20%5Cmathbf%7BR%7D%24%2C%20while%0A%0A%20%20%20%20%20%20%20%20%60%60%60python3%0A%20%20%20%20%20%20%20%20mo.md(%0A%20%20%20%20%20%20%20%20%20%20%20%20r'''%0A%20%20%20%20%20%20%20%20%20%20%20%20%5C%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20f%3A%20%5Cmathbf%7BR%7D%20%09o%20%5Cmathbf%7BR%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%5C%5D%0A%20%20%20%20%20%20%20%20%20%20%20%20'''%0A%20%20%20%20%20%20%20%20)%0A%20%20%20%20%20%20%20%20%60%60%60%0A%0A%20%20%20%20%20%20%20%20renders%20the%20display%20math%0A%0A%20%20%20%20%20%20%20%20%5C%5B%0A%20%20%20%20%20%20%20%20f%3A%20%5Cmathbf%7BR%7D%20%09o%20%5Cmathbf%7BR%7D.%0A%20%20%20%20%20%20%20%20%5C%5D%0A%20%20%20%20%20%20%20%20%22%22%22%0A%20%20%20%20)%0A%20%20%20%20+ %0Amo.md(%0A%20%20%20%20r%22%22%22%0A%20%20%20%20%23%23%20LaTeX%0A%20%20%20%20You%20can%20embed%20LaTeX%20in%20Markdown.%0A%0A%20%20%20%20For%20example%2C%0A%0A%20%20%20%20%60%60%60python3%0A%20%20%20%20mo.md(r'%24f%20%3A%20%5Cmathbf%7BR%7D%20%09o%20%5Cmathbf%7BR%7D%24')%0A%20%20%20%20%60%60%60%0A%0A%20%20%20%20renders%20%24f%20%3A%20%5Cmathbf%7BR%7D%20%09o%20%5Cmathbf%7BR%7D%24%2C%20while%0A%0A%20%20%20%20%60%60%60python3%0A%20%20%20%20mo.md(%0A%20%20%20%20%20%20%20%20r'''%0A%20%20%20%20%20%20%20%20%5C%5B%0A%20%20%20%20%20%20%20%20f%3A%20%5Cmathbf%7BR%7D%20%09o%20%5Cmathbf%7BR%7D%0A%20%20%20%20%20%20%20%20%5C%5D%0A%20%20%20%20%20%20%20%20'''%0A%20%20%20%20)%0A%20%20%20%20%60%60%60%0A%0A%20%20%20%20renders%20the%20display%20math%0A%0A%20%20%20%20%5C%5B%0A%20%20%20%20f%3A%20%5Cmathbf%7BR%7D%20%09o%20%5Cmathbf%7BR%7D.%0A%20%20%20%20%5C%5D%0A%20%20%20%20%22%22%22%0A)%0A</marimo-cell-code></marimo-island>+<br /><br /><br />diff --git a/frontend/islands/generate.py b/frontend/islands/generate.pyindex a0bea1f4d1..ae5aff5080 100644--- a/frontend/islands/generate.py+++ b/frontend/islands/generate.py@@ -1,133 +1,139 @@+#!/usr/bin/env python3+import asynciofrom textwrap import dedent-import marimo-import sys+from marimo import experimental_MarimoIslandGenerator++generator = experimental_MarimoIslandGenerator()-generator = marimo.experimental_MarimoIslandGenerator()-development = "--development" in sys.argv+def run():-stubs = [- generator.add_code("import marimo as mo"),- generator.add_code("mo.md('Hello, islands!')"),- generator.add_code(+ stubs = [+ generator.add_code("import marimo as mo"),+ generator.add_code("mo.md('Hello, islands!')"),+ generator.add_code(+ """+ slider = mo.ui.slider(0, 100, 2)+ slider"""- slider = mo.ui.slider(0, 100, 2)- slider- """- ),- generator.add_code(+ ),+ generator.add_code(+ """+ mo.md(f"Slider value: {slider.value}")"""- mo.md(f"Slider value: {slider.value}")- """- ),- generator.add_code(- """- mo.md(- \"\"\"- # Hello, Markdown!-- Use marimo's "`md`" function to embed rich text into your marimo- apps. This function compiles Markdown into HTML that marimo- can display.-- For example, here's the code that rendered the above title and- paragraph:-- ```python3+ ),+ generator.add_code(+ """mo.md(- '''+ \"\"\"# Hello, Markdown!Use marimo's "`md`" function to embed rich text into your marimo- apps. This function compiles your Markdown into HTML that marimo+ apps. This function compiles Markdown into HTML that marimocan display.- '''++ For example, here's the code that rendered the above title and+ paragraph:++ ```python3+ mo.md(+ '''+ # Hello, Markdown!++ Use marimo's "`md`" function to embed rich text into your marimo+ apps. This function compiles your Markdown into HTML that marimo+ can display.+ '''+ )+ ```+ \"\"\")- ```- \"\"\"- )- """- ),- generator.add_code("""- mo.md(- r\"\"\"- ## LaTeX- You can embed LaTeX in Markdown.+ ),+ generator.add_code(+ """+ mo.md(+ r\"\"\"+ ## LaTeX+ You can embed LaTeX in Markdown.- For example,+ For example,- ```python3- mo.md(r'$f : \mathbf{R} \to \mathbf{R}$')- ```+ ```python3+ mo.md(r'$f : \mathbf{R} \to \mathbf{R}$')+ ```- renders $f : \mathbf{R} \to \mathbf{R}$, while+ renders $f : \mathbf{R} \to \mathbf{R}$, while++ ```python3+ mo.md(+ r'''+ \[+ f: \mathbf{R} \to \mathbf{R}+ \]+ '''+ )+ ```++ renders the display math- ```python3- mo.md(- r'''\[- f: \mathbf{R} \to \mathbf{R}+ f: \mathbf{R} \to \mathbf{R}.\]- '''+ \"\"\")- ```-- renders the display math-- \[- f: \mathbf{R} \to \mathbf{R}.- \]- \"\"\"- )- """- ),-]--app = asyncio.run(generator.build())--NEW_LINE = "\n"-output = f"""-<!doctype html>-<html>- <head>- <meta charset="utf-8" />- <meta name="viewport" content="width=device-width, initial-scale=1" />- <meta name="theme-color" content="#000000" />- <meta name="description" content="a marimo app" />- <title>🏝️</title>-- {generator.render_head(_development_url=development)}- </head>- <body>--{dedent(NEW_LINE.join([stub.render() for stub in stubs]))}--- <br />- <br />- <br />- <br />- <hr />- <div class="bg-blue-500 p-4 border-2 border-red-500 bg-background">- this should not be affected by global tailwind styles- </div>- <div class="marimo">- <div class="bg-background p-4 border-2 border-red-500 text-foreground">- this should be affected by global tailwind styles- </div>- </div>- <div class="marimo">- <div class="dark">+ """+ ),+ ]++ app = asyncio.run(generator.build())++ NEW_LINE = "\n"+ output = f"""+ <!doctype html>+ <html>+ <head>+ <meta charset="utf-8" />+ <meta name="viewport" content="width=device-width, initial-scale=1" />+ <meta name="theme-color" content="#000000" />+ <meta name="description" content="a marimo app" />+ <title>🏝️</title>++ {generator.render_head()}+ </head>+ <body>++ {dedent(NEW_LINE.join([stub.render() for stub in stubs]))}+++ <br />+ <br />+ <br />+ <br />+ <hr />+ <div class="bg-blue-500 p-4 border-2 border-red-500 bg-background">+ this should not be affected by global tailwind styles+ </div>+ <div class="marimo"><div class="bg-background p-4 border-2 border-red-500 text-foreground">- this should be affected by global tailwind styles (dark)+ this should be affected by global tailwind styles</div>- </div>- </div>+ </div>+ <div class="marimo">+ <div class="dark">+ <div class="bg-background p-4 border-2 border-red-500 text-foreground">+ this should be affected by global tailwind styles (dark)+ </div>+ </div>+ </div>++ </body>+ </html>+ """++ print(output)- </body>-</html>-"""-print(output)+if __name__ == "__main__":+ run()diff --git a/frontend/islands/vite.config.mts b/frontend/islands/vite.config.mtsindex d57117758f..f4d0ff2afe 100644--- a/frontend/islands/vite.config.mts+++ b/frontend/islands/vite.config.mts@@ -34,8 +34,10 @@ export default defineConfig({NODE_ENV: JSON.stringify(process.env.NODE_ENV),},"import.meta.env.VITE_MARIMO_ISLANDS": JSON.stringify(true),- "import.meta.env.VITE_MARIMO_VERSION":- process.env.NODE_ENV === "production"+ // Precedence: VITE_MARIMO_VERSION > package.json version > "latest"+ "import.meta.env.VITE_MARIMO_VERSION": process.env.VITE_MARIMO_VERSION+ ? JSON.stringify(process.env.VITE_MARIMO_VERSION)+ : process.env.NODE_ENV === "production"? JSON.stringify(packageJson.version): JSON.stringify("latest"),},diff --git a/frontend/package.json b/frontend/package.jsonindex fb1b8213a4..aeecab8765 100644--- a/frontend/package.json+++ b/frontend/package.json@@ -148,6 +148,7 @@"preview": "vite preview","dev:islands": "VITE_MARIMO_ISLANDS=true vite --config islands/vite.config.mts","build:islands": "VITE_MARIMO_ISLANDS=true vite --config islands/vite.config.mts build",+ "preview:islands": "VITE_MARIMO_VERSION='0.4.6' VITE_MARIMO_ISLANDS=true vite --config islands/vite.config.mts preview","storybook": "storybook dev -p 6006","build-storybook": "storybook build"},diff --git a/frontend/src/core/dom/marimo-tag.ts b/frontend/src/core/dom/marimo-tag.tsindex cd44e3565d..2275769f57 100644--- a/frontend/src/core/dom/marimo-tag.ts+++ b/frontend/src/core/dom/marimo-tag.ts@@ -32,13 +32,8 @@ const domBasedMarimoSettings: MarimoSettings = {},};-// We have limited access to the DOM, so defaults are provided.const islandsBasedMarimoSettings: MarimoSettings = {getMarimoVersion: () => {- if (import.meta.env.VITE_MARIMO_VERSION === undefined) {- // Version set by export, but can be overridden by ENV.- return getMarimoDOMValue("marimo-version", "version");- }assertExists(import.meta.env.VITE_MARIMO_VERSION);return import.meta.env.VITE_MARIMO_VERSION;},@@ -56,41 +51,13 @@ const islandsBasedMarimoSettings: MarimoSettings = {},};-function getMarimoSettingLookup<T extends keyof MarimoSettings>(- settingName: T,-): () => ReturnType<MarimoSettings[T]> {- return () => {- // DOM isn't accessible at time of lookup, so defer to callback- const result = isIslands()- ? islandsBasedMarimoSettings[settingName]()- : domBasedMarimoSettings[settingName]();- return result as ReturnType<MarimoSettings[T]>;- };-}--const MarimoSettingsWrapper: MarimoSettings = {- getMarimoVersion: getMarimoSettingLookup("getMarimoVersion"),- getMarimoServerToken: getMarimoSettingLookup("getMarimoServerToken"),- getMarimoAppConfig: getMarimoSettingLookup("getMarimoAppConfig"),- getMarimoUserConfig: getMarimoSettingLookup("getMarimoUserConfig"),- getMarimoCode: getMarimoSettingLookup("getMarimoCode"),-};--const {+export const {getMarimoVersion,getMarimoServerToken,getMarimoAppConfig,getMarimoUserConfig,getMarimoCode,-} = MarimoSettingsWrapper;--export {- getMarimoVersion,- getMarimoServerToken,- getMarimoAppConfig,- getMarimoUserConfig,- getMarimoCode,-};+} = isIslands() ? islandsBasedMarimoSettings : domBasedMarimoSettings;function getMarimoDOMValue(tagName: string, key: string) {const tag = document.querySelector(tagName);diff --git a/frontend/src/core/islands/bridge.ts b/frontend/src/core/islands/bridge.tsindex eadf8ee5a1..25897c294e 100644--- a/frontend/src/core/islands/bridge.ts+++ b/frontend/src/core/islands/bridge.ts@@ -15,6 +15,7 @@ import { JsonString } from "@/utils/json/base64";import { CellId } from "@/core/cells/ids";import { throwNotImplemented } from "@/utils/functions";import type { WorkerSchema } from "./worker/worker";+import workerUrl from "./worker/worker.tsx?worker&url";import { createMarimoFile, parseMarimoIslandApps } from "./parse";import { Logger } from "@/utils/Logger";@@ -40,7 +41,8 @@ export class IslandsPyodideBridge implements RunRequests, EditRequests {private constructor() {// TODO: abstract out into a worker constructor- const js = `import ${JSON.stringify(new URL("worker/worker.tsx", import.meta.url))}`;++ const js = `import ${JSON.stringify(new URL(workerUrl, import.meta.url))}`;const blob = new Blob([js], { type: "application/javascript" });const objURL = URL.createObjectURL(blob);const worker = new Worker(diff --git a/frontend/src/core/islands/utils.ts b/frontend/src/core/islands/utils.tsindex 2127815712..831bada8c2 100644--- a/frontend/src/core/islands/utils.ts+++ b/frontend/src/core/islands/utils.ts@@ -1,12 +1,5 @@/* Copyright 2024 Marimo. All rights reserved. */export function isIslands() {- // importing "@/core/mode" has the expectation of a valid mode,- // which is not the case during testing.- const tag = document.querySelector("marimo-mode");- const initialMode =- tag === null || !(tag instanceof HTMLElement) ? null : tag.dataset.mode;- return (- import.meta.env.VITE_MARIMO_ISLANDS === true || initialMode === "island"- );+ return import.meta.env.VITE_MARIMO_ISLANDS === true;}diff --git a/frontend/src/core/mode.ts b/frontend/src/core/mode.tsindex 5e86e93439..df71e7faf0 100644--- a/frontend/src/core/mode.ts+++ b/frontend/src/core/mode.ts@@ -13,7 +13,7 @@ import { assertNever } from "@/utils/assertNever";* - `home`: A user is in the home page.* - `island`: A user is interacting with marimo from an external application.*/-export type AppMode = "read" | "edit" | "present" | "home" | "island";+export type AppMode = "read" | "edit" | "present" | "home";export function getInitialAppMode(): AppMode {const tag = document.querySelector("marimo-mode");@@ -29,8 +29,6 @@ export function getInitialAppMode(): AppMode {return "edit";case "home":return "home";- case "island":- return "island";case "present":throw new Error("internal-error: present mode is not supported");case undefined:diff --git a/marimo/_islands/island_generator.py b/marimo/_islands/island_generator.pyindex 51be8c15d8..a0393c106f 100644--- a/marimo/_islands/island_generator.py+++ b/marimo/_islands/island_generator.py@@ -239,10 +239,6 @@ class MarimoIslandGenerator:integrity="sha384-wcIxkf4k558AjM3Yz3BBFQUbk/zgIYC2R0QpeeYb+TwlBVMrlgLqwRjRtGZiK7ww"crossorigin="anonymous"/>-- <marimo-version data-version="{version_override}" hidden="">- </marimo-version>- <marimo-mode data-mode="island" hidden=""></marimo-mode>""".strip()if _development_url:diff --git a/tests/_islands/snapshots/header.txt b/tests/_islands/snapshots/header.txtindex 3afce503e6..a53b19bfa1 100644--- a/tests/_islands/snapshots/header.txt+++ b/tests/_islands/snapshots/header.txt@@ -16,8 +16,4 @@href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css"integrity="sha384-wcIxkf4k558AjM3Yz3BBFQUbk/zgIYC2R0QpeeYb+TwlBVMrlgLqwRjRtGZiK7ww"crossorigin="anonymous"-/>--<marimo-version data-version="0.0.0" hidden="">-</marimo-version>-<marimo-mode data-mode="island" hidden=""></marimo-mode>\ No newline at end of file+/>\ No newline at end of file