marimo-jupyter-extension 0.1.0__py3-none-any.whl
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.
- marimo_jupyter_extension/__init__.py +58 -0
- marimo_jupyter_extension/config.py +82 -0
- marimo_jupyter_extension/convert.py +31 -0
- marimo_jupyter_extension/etc/jupyter_server_config.d/marimo_jupyter_extension.json +7 -0
- marimo_jupyter_extension/executable.py +63 -0
- marimo_jupyter_extension/exporter.py +70 -0
- marimo_jupyter_extension/handlers.py +179 -0
- marimo_jupyter_extension/icon.svg +84 -0
- marimo_jupyter_extension/labextension/package.json +86 -0
- marimo_jupyter_extension/labextension/schemas/@marimo-team/jupyter-extension/package.json.orig +77 -0
- marimo_jupyter_extension/labextension/schemas/@marimo-team/jupyter-extension/plugin.json +7 -0
- marimo_jupyter_extension/labextension/static/510.5a6289689ce7a0453fc4.js +1 -0
- marimo_jupyter_extension/labextension/static/remoteEntry.705371d091b7d314fd9e.js +1 -0
- marimo_jupyter_extension/labextension/static/style.js +4 -0
- marimo_jupyter_extension/labextension/static/third-party-licenses.json +16 -0
- marimo_jupyter_extension-0.1.0.data/data/etc/jupyter/jupyter_server_config.d/marimo_jupyter_extension.json +7 -0
- marimo_jupyter_extension-0.1.0.data/data/share/jupyter/labextensions/@marimo-team/jupyter-extension/install.json +5 -0
- marimo_jupyter_extension-0.1.0.data/data/share/jupyter/labextensions/@marimo-team/jupyter-extension/package.json +86 -0
- marimo_jupyter_extension-0.1.0.data/data/share/jupyter/labextensions/@marimo-team/jupyter-extension/schemas/@marimo-team/jupyter-extension/package.json.orig +77 -0
- marimo_jupyter_extension-0.1.0.data/data/share/jupyter/labextensions/@marimo-team/jupyter-extension/schemas/@marimo-team/jupyter-extension/plugin.json +7 -0
- marimo_jupyter_extension-0.1.0.data/data/share/jupyter/labextensions/@marimo-team/jupyter-extension/static/510.5a6289689ce7a0453fc4.js +1 -0
- marimo_jupyter_extension-0.1.0.data/data/share/jupyter/labextensions/@marimo-team/jupyter-extension/static/remoteEntry.705371d091b7d314fd9e.js +1 -0
- marimo_jupyter_extension-0.1.0.data/data/share/jupyter/labextensions/@marimo-team/jupyter-extension/static/style.js +4 -0
- marimo_jupyter_extension-0.1.0.data/data/share/jupyter/labextensions/@marimo-team/jupyter-extension/static/third-party-licenses.json +16 -0
- marimo_jupyter_extension-0.1.0.dist-info/METADATA +174 -0
- marimo_jupyter_extension-0.1.0.dist-info/RECORD +30 -0
- marimo_jupyter_extension-0.1.0.dist-info/WHEEL +4 -0
- marimo_jupyter_extension-0.1.0.dist-info/entry_points.txt +5 -0
- marimo_jupyter_extension-0.1.0.dist-info/licenses/LICENSE +201 -0
- marimo_jupyter_extension-0.1.0.dist-info/licenses/NOTICE +21 -0
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@marimo-team/jupyter-extension",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "JupyterLab extension for Marimo integration",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"jupyter",
|
|
7
|
+
"jupyterlab",
|
|
8
|
+
"jupyterlab-extension",
|
|
9
|
+
"marimo"
|
|
10
|
+
],
|
|
11
|
+
"homepage": "https://github.com/marimo-team/marimo-jupyter-extension",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/marimo-team/marimo-jupyter-extension/issues"
|
|
14
|
+
},
|
|
15
|
+
"license": "Apache-2.0",
|
|
16
|
+
"author": {
|
|
17
|
+
"name": "Marimo Team"
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"lib/**/*.{d.ts,eot,gif,html,jpg,js,js.map,json,png,svg,woff2,ttf}",
|
|
21
|
+
"style/**/*.{css,js,eot,gif,html,jpg,json,png,svg,woff2,ttf}"
|
|
22
|
+
],
|
|
23
|
+
"main": "lib/index.js",
|
|
24
|
+
"types": "lib/index.d.ts",
|
|
25
|
+
"repository": {
|
|
26
|
+
"type": "git",
|
|
27
|
+
"url": "https://github.com/marimo-team/marimo-jupyter-extension.git"
|
|
28
|
+
},
|
|
29
|
+
"scripts": {
|
|
30
|
+
"build": "npm run build:lib && npm run build:labextension:dev",
|
|
31
|
+
"build:prod": "npm run clean && npm run build:lib:prod && npm run build:labextension",
|
|
32
|
+
"build:labextension": "scripts/jupyter labextension build .",
|
|
33
|
+
"build:labextension:dev": "scripts/jupyter labextension build --development True .",
|
|
34
|
+
"build:lib": "tsc --sourceMap",
|
|
35
|
+
"build:lib:prod": "tsc",
|
|
36
|
+
"clean": "npm run clean:lib && npm run clean:labextension",
|
|
37
|
+
"clean:lib": "rimraf lib tsconfig.tsbuildinfo",
|
|
38
|
+
"clean:labextension": "rimraf ../marimo_jupyter_extension/labextension",
|
|
39
|
+
"watch": "run-p watch:src watch:labextension",
|
|
40
|
+
"watch:src": "tsc -w --sourceMap",
|
|
41
|
+
"watch:labextension": "scripts/jupyter labextension watch .",
|
|
42
|
+
"lint": "run-s2 lint:biome lint:eslint",
|
|
43
|
+
"lint:biome": "biome lint --config-path .. --diagnostic-level=warn --write .",
|
|
44
|
+
"lint:eslint": "eslint src --fix",
|
|
45
|
+
"lint:check": "biome lint --config-path .. --diagnostic-level=warn . && eslint src",
|
|
46
|
+
"format": "biome format --config-path .. --write .",
|
|
47
|
+
"format:check": "biome format --config-path .. .",
|
|
48
|
+
"typecheck": "tsc --noEmit"
|
|
49
|
+
},
|
|
50
|
+
"dependencies": {
|
|
51
|
+
"@jupyterlab/application": "^4.0.0",
|
|
52
|
+
"@jupyterlab/apputils": "^4.0.0",
|
|
53
|
+
"@jupyterlab/coreutils": "^6.0.0",
|
|
54
|
+
"@jupyterlab/docregistry": "^4.0.0",
|
|
55
|
+
"@jupyterlab/filebrowser": "^4.0.0",
|
|
56
|
+
"@jupyterlab/launcher": "^4.0.0",
|
|
57
|
+
"@jupyterlab/services": "^7.0.0",
|
|
58
|
+
"@jupyterlab/ui-components": "^4.0.0",
|
|
59
|
+
"@lumino/coreutils": "^2.0.0",
|
|
60
|
+
"@lumino/widgets": "^2.0.0"
|
|
61
|
+
},
|
|
62
|
+
"devDependencies": {
|
|
63
|
+
"@biomejs/biome": "^1.9.0",
|
|
64
|
+
"@jupyterlab/builder": "^4.0.0",
|
|
65
|
+
"@types/node": "^20.0.0",
|
|
66
|
+
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
67
|
+
"@typescript-eslint/parser": "^8.0.0",
|
|
68
|
+
"eslint": "^8.57.0",
|
|
69
|
+
"eslint-config-prettier": "^9.1.0",
|
|
70
|
+
"eslint-plugin-react": "^7.37.0",
|
|
71
|
+
"eslint-plugin-react-hooks": "^5.0.0",
|
|
72
|
+
"npm-run-all": "^4.1.5",
|
|
73
|
+
"npm-run-all2": "^6.2.0",
|
|
74
|
+
"rimraf": "^5.0.0",
|
|
75
|
+
"typescript": "~5.3.0"
|
|
76
|
+
},
|
|
77
|
+
"jupyterlab": {
|
|
78
|
+
"extension": true,
|
|
79
|
+
"outputDir": "../marimo_jupyter_extension/labextension",
|
|
80
|
+
"schemaDir": "schema",
|
|
81
|
+
"_build": {
|
|
82
|
+
"load": "static/remoteEntry.705371d091b7d314fd9e.js",
|
|
83
|
+
"extension": "./extension"
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
marimo_jupyter_extension/labextension/schemas/@marimo-team/jupyter-extension/package.json.orig
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@marimo-team/jupyter-extension",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "JupyterLab extension for Marimo integration",
|
|
5
|
+
"keywords": ["jupyter", "jupyterlab", "jupyterlab-extension", "marimo"],
|
|
6
|
+
"homepage": "https://github.com/marimo-team/marimo-jupyter-extension",
|
|
7
|
+
"bugs": {
|
|
8
|
+
"url": "https://github.com/marimo-team/marimo-jupyter-extension/issues"
|
|
9
|
+
},
|
|
10
|
+
"license": "Apache-2.0",
|
|
11
|
+
"author": {
|
|
12
|
+
"name": "Marimo Team"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"lib/**/*.{d.ts,eot,gif,html,jpg,js,js.map,json,png,svg,woff2,ttf}",
|
|
16
|
+
"style/**/*.{css,js,eot,gif,html,jpg,json,png,svg,woff2,ttf}"
|
|
17
|
+
],
|
|
18
|
+
"main": "lib/index.js",
|
|
19
|
+
"types": "lib/index.d.ts",
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "https://github.com/marimo-team/marimo-jupyter-extension.git"
|
|
23
|
+
},
|
|
24
|
+
"scripts": {
|
|
25
|
+
"build": "npm run build:lib && npm run build:labextension:dev",
|
|
26
|
+
"build:prod": "npm run clean && npm run build:lib:prod && npm run build:labextension",
|
|
27
|
+
"build:labextension": "scripts/jupyter labextension build .",
|
|
28
|
+
"build:labextension:dev": "scripts/jupyter labextension build --development True .",
|
|
29
|
+
"build:lib": "tsc --sourceMap",
|
|
30
|
+
"build:lib:prod": "tsc",
|
|
31
|
+
"clean": "npm run clean:lib && npm run clean:labextension",
|
|
32
|
+
"clean:lib": "rimraf lib tsconfig.tsbuildinfo",
|
|
33
|
+
"clean:labextension": "rimraf ../marimo_jupyter_extension/labextension",
|
|
34
|
+
"watch": "run-p watch:src watch:labextension",
|
|
35
|
+
"watch:src": "tsc -w --sourceMap",
|
|
36
|
+
"watch:labextension": "scripts/jupyter labextension watch .",
|
|
37
|
+
"lint": "run-s2 lint:biome lint:eslint",
|
|
38
|
+
"lint:biome": "biome lint --config-path .. --diagnostic-level=warn --write .",
|
|
39
|
+
"lint:eslint": "eslint src --fix",
|
|
40
|
+
"lint:check": "biome lint --config-path .. --diagnostic-level=warn . && eslint src",
|
|
41
|
+
"format": "biome format --config-path .. --write .",
|
|
42
|
+
"format:check": "biome format --config-path .. .",
|
|
43
|
+
"typecheck": "tsc --noEmit"
|
|
44
|
+
},
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"@jupyterlab/application": "^4.0.0",
|
|
47
|
+
"@jupyterlab/apputils": "^4.0.0",
|
|
48
|
+
"@jupyterlab/coreutils": "^6.0.0",
|
|
49
|
+
"@jupyterlab/docregistry": "^4.0.0",
|
|
50
|
+
"@jupyterlab/filebrowser": "^4.0.0",
|
|
51
|
+
"@jupyterlab/launcher": "^4.0.0",
|
|
52
|
+
"@jupyterlab/services": "^7.0.0",
|
|
53
|
+
"@jupyterlab/ui-components": "^4.0.0",
|
|
54
|
+
"@lumino/coreutils": "^2.0.0",
|
|
55
|
+
"@lumino/widgets": "^2.0.0"
|
|
56
|
+
},
|
|
57
|
+
"devDependencies": {
|
|
58
|
+
"@biomejs/biome": "^1.9.0",
|
|
59
|
+
"@jupyterlab/builder": "^4.0.0",
|
|
60
|
+
"@types/node": "^20.0.0",
|
|
61
|
+
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
62
|
+
"@typescript-eslint/parser": "^8.0.0",
|
|
63
|
+
"eslint": "^8.57.0",
|
|
64
|
+
"eslint-config-prettier": "^9.1.0",
|
|
65
|
+
"eslint-plugin-react": "^7.37.0",
|
|
66
|
+
"eslint-plugin-react-hooks": "^5.0.0",
|
|
67
|
+
"npm-run-all": "^4.1.5",
|
|
68
|
+
"npm-run-all2": "^6.2.0",
|
|
69
|
+
"rimraf": "^5.0.0",
|
|
70
|
+
"typescript": "~5.3.0"
|
|
71
|
+
},
|
|
72
|
+
"jupyterlab": {
|
|
73
|
+
"extension": true,
|
|
74
|
+
"outputDir": "../marimo_jupyter_extension/labextension",
|
|
75
|
+
"schemaDir": "schema"
|
|
76
|
+
}
|
|
77
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_marimo_team_jupyter_extension=self.webpackChunk_marimo_team_jupyter_extension||[]).push([[510],{56(e,t,n){e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},72(e){var t=[];function n(e){for(var n=-1,o=0;o<t.length;o++)if(t[o].identifier===e){n=o;break}return n}function o(e,o){for(var r={},i=[],s=0;s<e.length;s++){var c=e[s],l=o.base?c[0]+o.base:c[0],d=r[l]||0,p="".concat(l," ").concat(d);r[l]=d+1;var m=n(p),u={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==m)t[m].references++,t[m].updater(u);else{var h=a(u,o);o.byIndex=s,t.splice(s,0,{identifier:p,updater:h,references:1})}i.push(p)}return i}function a(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,a){var r=o(e=e||[],a=a||{});return function(e){e=e||[];for(var i=0;i<r.length;i++){var s=n(r[i]);t[s].references--}for(var c=o(e,a),l=0;l<r.length;l++){var d=n(r[l]);0===t[d].references&&(t[d].updater(),t.splice(d,1))}r=c}}},113(e){e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},314(e){e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n="",o=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),o&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),o&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n}).join("")},t.i=function(e,n,o,a,r){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(o)for(var s=0;s<this.length;s++){var c=this[s][0];null!=c&&(i[c]=!0)}for(var l=0;l<e.length;l++){var d=[].concat(e[l]);o&&i[d[0]]||(void 0!==r&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=r),n&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=n):d[2]=n),a&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=a):d[4]="".concat(a)),t.push(d))}},t}},475(e,t,n){n.d(t,{A:()=>s});var o=n(601),a=n.n(o),r=n(314),i=n.n(r)()(a());i.push([e.id,"/* Marimo Widget Styles */\n.jp-MarimoWidget {\n background: var(--jp-layout-color1);\n}\n\n.jp-MarimoWidget iframe {\n width: 100%;\n height: 100%;\n border: none;\n}\n\n/* Marimo Sidebar Styles */\n.jp-MarimoSidebar {\n background: var(--jp-layout-color1);\n min-width: 200px;\n overflow: auto;\n}\n\n.jp-MarimoSidebar-content {\n padding: 12px;\n}\n\n.jp-MarimoSidebar-header {\n margin-bottom: 16px;\n padding-bottom: 8px;\n border-bottom: 1px solid var(--jp-border-color2);\n}\n\n.jp-MarimoSidebar-title {\n font-size: 14px;\n font-weight: 600;\n color: var(--jp-ui-font-color0);\n}\n\n.jp-MarimoSidebar-section {\n margin-bottom: 16px;\n}\n\n.jp-MarimoSidebar-sectionTitle {\n margin-bottom: 8px;\n font-size: 11px;\n font-weight: 600;\n text-transform: uppercase;\n color: var(--jp-ui-font-color2);\n letter-spacing: 0.5px;\n}\n\n/* Status indicator */\n.jp-MarimoSidebar-status {\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 13px;\n color: var(--jp-ui-font-color1);\n}\n\n.jp-MarimoSidebar-statusDot {\n width: 8px;\n height: 8px;\n border-radius: 50%;\n flex-shrink: 0;\n}\n\n.jp-MarimoSidebar-statusDot.jp-mod-ready {\n background: var(--jp-success-color1);\n}\n\n.jp-MarimoSidebar-statusDot.jp-mod-error {\n background: var(--jp-error-color1);\n}\n\n.jp-MarimoSidebar-statusDot.jp-mod-warning {\n background: var(--jp-warn-color1);\n}\n\n/* Action buttons */\n.jp-MarimoSidebar-actions {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.jp-MarimoSidebar-button {\n display: flex;\n align-items: center;\n justify-content: flex-start;\n gap: 8px;\n padding: 8px 12px;\n border: 1px solid var(--jp-border-color1);\n border-radius: 4px;\n background: var(--jp-layout-color2);\n color: var(--jp-ui-font-color0);\n cursor: pointer;\n font-size: 13px;\n font-family: var(--jp-ui-font-family);\n transition: background 0.15s ease;\n}\n\n.jp-MarimoSidebar-button:hover {\n background: var(--jp-layout-color3);\n}\n\n.jp-MarimoSidebar-button:active {\n background: var(--jp-layout-color4);\n}\n\n.jp-MarimoSidebar-buttonIcon {\n font-size: 14px;\n font-weight: bold;\n color: var(--jp-ui-font-color1);\n width: 16px;\n text-align: center;\n}\n\n/* Help section */\n.jp-MarimoSidebar-help {\n font-size: 12px;\n color: var(--jp-ui-font-color2);\n line-height: 1.5;\n}\n\n.jp-MarimoSidebar-help p {\n margin: 0 0 8px 0;\n}\n\n.jp-MarimoSidebar-help p:last-child {\n margin-bottom: 0;\n}\n\n.jp-MarimoSidebar-help code {\n background: var(--jp-layout-color2);\n padding: 1px 4px;\n border-radius: 2px;\n font-family: var(--jp-code-font-family);\n font-size: 11px;\n}\n\n/* Running Sessions section */\n.jp-MarimoSidebar-sectionTitleRow {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 8px;\n}\n\n.jp-MarimoSidebar-refreshButton {\n background: none;\n border: none;\n color: var(--jp-ui-font-color2);\n cursor: pointer;\n font-size: 14px;\n padding: 2px 6px;\n border-radius: 4px;\n}\n\n.jp-MarimoSidebar-refreshButton:hover {\n background: var(--jp-layout-color2);\n color: var(--jp-ui-font-color0);\n}\n\n.jp-MarimoSidebar-sessions {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n\n.jp-MarimoSidebar-sessionItem {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 6px 8px;\n background: var(--jp-layout-color2);\n border-radius: 4px;\n border: 1px solid var(--jp-border-color2);\n}\n\n.jp-MarimoSidebar-sessionInfo {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n}\n\n.jp-MarimoSidebar-sessionName {\n font-size: 12px;\n color: var(--jp-ui-font-color0);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n display: block;\n}\n\n.jp-MarimoSidebar-killButton {\n background: none;\n border: none;\n color: var(--jp-ui-font-color2);\n cursor: pointer;\n font-size: 16px;\n font-weight: bold;\n padding: 0 4px;\n line-height: 1;\n border-radius: 4px;\n flex-shrink: 0;\n}\n\n.jp-MarimoSidebar-killButton:hover {\n background: var(--jp-error-color2);\n color: var(--jp-ui-inverse-font-color0);\n}\n\n.jp-MarimoSidebar-emptyMessage {\n font-size: 12px;\n color: var(--jp-ui-font-color2);\n font-style: italic;\n padding: 8px 0;\n}\n\n/* Server controls */\n.jp-MarimoSidebar-serverControls {\n display: flex;\n gap: 8px;\n margin-top: 8px;\n}\n\n.jp-MarimoSidebar-serverButton {\n flex: 1;\n padding: 4px 8px;\n border: 1px solid var(--jp-border-color1);\n border-radius: 4px;\n background: var(--jp-layout-color2);\n color: var(--jp-ui-font-color1);\n cursor: pointer;\n font-size: 11px;\n font-family: var(--jp-ui-font-family);\n transition: background 0.15s ease, border-color 0.15s ease;\n}\n\n.jp-MarimoSidebar-serverButton:hover {\n background: var(--jp-layout-color3);\n}\n\n.jp-MarimoSidebar-serverButton.jp-mod-restart:hover {\n border-color: var(--jp-brand-color1);\n color: var(--jp-brand-color1);\n}\n\n.jp-MarimoSidebar-serverButton.jp-mod-start {\n width: 100%;\n}\n\n.jp-MarimoSidebar-serverButton.jp-mod-start:hover {\n border-color: var(--jp-success-color1);\n color: var(--jp-success-color1);\n}\n",""]);const s=i},510(e,t,n){n.r(t),n.d(t,{default:()=>z});var o=n(489),a=n(14),r=n(830),i=n(581),s=n(83),c=n(469),l=n(262),d=n(840);const p='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 73.234231 75.653891">\n <g transform="matrix(0.32633463,0,0,0.32633463,-159.18374,-120.45361)">\n <path fill="#1c7361" d="m 517.37109,413.55859 c 1.51172,-1.78125 3.1875,-4.15625 2.10547,-6.26172 6.04688,-3.5625 11.39063,-8.26171 15.76172,-13.76562 -2.375,1.89062 -4.96484,3.40234 -7.71875,4.58984 20.67578,-20.40625 51.76953,-29.6914 80.32422,-23.96875 -22.99609,-0.86328 -46.42188,5.23438 -65.42578,18.19141 -19.05469,12.90234 -33.51953,32.71094 -39.07813,55.05859 8.41797,-24.45312 26.17969,-45.55859 48.85157,-57.97265 -1.78125,1.83593 -3.56641,3.72265 -5.39844,5.55859 8.63672,-3.5625 16.46094,-8.90625 25.04687,-12.63281 25.20703,-11.01172 55.54297,-6.85547 79.02344,7.5039 23.48047,14.35938 40.37891,37.89454 50.20313,63.58985 4.3164,11.22656 7.33984,23.69531 3.50781,35.08594 -0.86328,-14.84375 -5.72266,-29.14844 -12.03906,-42.58985 -10.47266,-22.40234 -25.47657,-43.39844 -46.58204,-56.24609 -21.10546,-12.79297 -49.01562,-16.19531 -70.60546,-4.15625 11.0664,-1.1875 22.23828,-1.83594 33.19531,-0.26953 20.62109,2.91406 39.67578,13.71093 54.14062,28.66015 14.41407,15.00782 24.40235,33.95313 30.28516,53.8711 5.72266,19.48828 7.60937,40.97265 0.26953,59.97265 21.42969,-34.65625 17.86719,-82.91015 -8.3125,-114.05859 -10.95703,-13.00781 -25.15625,-22.99609 -40.48437,-30.22656 -17.70704,-8.3125 -37.14063,-13.11719 -56.67969,-12.57813 -19.53906,0.53906 -39.08203,6.64063 -54.67969,18.40625 12.95313,-11.44531 29.84766,-17.92187 47.01563,-19.70312 17.21875,-1.72657 34.65234,1.08203 51.01171,6.58593 34.00391,11.55079 64.98829,37.03125 74.97657,71.52344 2.53515,8.85156 3.66797,18.02735 4.69531,27.20703 0.86328,7.9336 1.56641,15.86719 1.40234,23.85547 -0.7539,39.46094 -25.96484,78.00391 -62.72265,92.41406 -10.41797,4.05079 -21.42969,6.26172 -32.4961,7.82813 -17.70703,2.48047 -36.05859,3.23828 -53.11718,-2.05078 -8.79688,-2.75391 -17.00391,-7.01953 -24.61329,-12.25391 -31.52343,-21.59375 -51.4414,-59.21484 -51.4414,-97.43359 0,-6.80078 0.59375,-13.54688 1.51172,-20.24219 0.80859,-6.15234 1.88672,-12.25391 3.66797,-18.19141 2.69921,-8.74609 6.91015,-17.0039 12.47265,-24.28906 0.96875,-0.59375 1.94141,-1.24219 2.85938,-1.89062 -12.79297,27.04297 -20.40625,59 -8.69141,86.58203 -4.21094,-17.97266 -4.48047,-36.8125 -0.75391,-54.84375 1.1875,-0.42969 2.375,-0.91406 3.50782,-1.40235 0.0547,-1.1875 0.10547,-2.32031 0.16015,-3.50781 -0.86328,0.97266 -1.67187,1.94141 -2.53515,2.85938 1.99609,-14.30469 8.14843,-27.85157 17.3789,-38.8086 m 8.69141,-0.70312 c 3.34766,-2.26563 6.69531,-4.53516 10.04297,-6.80078 -2.10547,4.26562 -5.99219,7.60937 -10.52735,9.12109 -21.05078,21.75391 -27.53125,54.19531 -25.04687,84.31641 0.97266,11.39062 3.29297,23.21093 10.63281,31.95703 -5.125,-21.05469 -5.39844,-43.29297 -0.69922,-64.45313 0.91797,-0.0547 1.23828,1.13282 1.23828,2.05078 0.37891,14.19922 -2.05078,28.39454 -1.02343,42.58985 1.02343,14.14453 6.3164,29.09765 18.1914,36.8164 9.28516,6.04297 18.51563,12.08985 27.7461,18.13672 -21.59375,-6.91015 -40.4336,-21.91797 -52.08985,-41.34765 3.12891,8.47265 7.5,16.51562 12.89844,23.75 -0.69922,-1.94532 -1.34766,-3.94141 -2.05078,-5.9375 5.45312,5.1289 10.95703,10.14843 16.41016,15.22265 3.99609,3.72266 10.25781,7.5 14.35937,3.9375 0.64844,1.35157 -0.53906,3.02344 -1.99609,3.40235 -1.46094,0.43359 -3.02344,0 -4.48047,-0.4336 6.53125,4.69922 13.33203,9.01563 20.34765,12.95703 -1.02343,0.16016 -1.34765,1.67188 -0.69921,2.53516 0.64453,0.86719 1.72656,1.08203 2.75,1.35156 25.75,5.5586 53.17187,3.50782 77.78515,-5.99218 -21.16015,4.96484 -43.72265,6.10156 -64.23437,-1.07813 -17.32813,-6.04687 -32.4961,-17.97656 -42.42969,-33.35937 -3.18359,-4.96875 -5.82813,-10.20313 -8.25781,-15.54688 -7.82813,-17.59766 -12.79297,-36.8125 -11.39063,-56.03125 1.40625,-19.21484 9.82422,-38.37891 24.94141,-50.25391 1.5625,-1.24218 3.50781,-2.42968 5.44922,-1.94531 -14.89844,10.79688 -23.75,28.66406 -26.07032,46.91016 -2.32031,18.29687 1.45704,36.86719 8.09766,54.03125 4.75,12.14844 11.0625,23.91406 19.75391,33.6289 3.72656,4.15625 7.9375,7.9375 12.73828,10.79688 8.80078,5.28906 19.21875,7.28906 29.42187,8.58203 13.8711,1.78125 27.85157,2.53906 41.83203,2.21484 -17.65234,4.15625 -36.11328,1.1875 -53.98046,-1.78125 30.33984,11.39063 65.91015,4.42579 91.98437,-14.73828 5.17969,-3.83203 10.09375,-8.09375 14.03125,-13.22265 6.04688,-7.88282 9.66406,-17.48828 11.5,-27.26172 4.75,-25.47656 -2.05078,-52.08985 -14.41406,-74.92188 -8.58203,-15.87109 -19.97266,-30.55078 -34.97656,-40.53906 -14.03516,-9.28516 -30.71485,-14.19531 -47.50391,-15.11328 -25.80078,-1.51172 -53.11328,7.01562 -70.28125,26.44922 m 576.75,588.17969 c 11.60547,2.91406 23.32031,5.01953 35.19531,6.42578 -14.57422,3.34375 -29.58203,-1.78125 -43.66797,-6.80078 -8.3164,-2.91797 -16.73437,-5.94141 -24.45312,-10.25782 -18.67969,-10.36328 -32.71485,-28.125 -40.86328,-47.8789 -1.40235,-3.50781 -2.69922,-7.01953 -3.77735,-10.58203 -0.10937,-0.42969 -0.43359,0.59375 0,0.3789 0.42969,-0.16015 0.375,-0.80859 0.16016,-1.24218 -4.85938,-11.71094 -7.82813,-24.28907 -8.74609,-36.92188 -0.91797,19.10938 3.83203,38.32422 12.46875,55.4375 9.39453,18.62109 23.48437,34.98047 41.1875,46.04297 17.65234,11.06641 38.91796,16.67969 59.64843,14.68359 29.14844,-2.85937 54.73438,-19.86328 78.21485,-37.30078 -10.36328,13.71094 -26.07032,22.1875 -41.34766,30.17578 26.39453,-7.39453 47.55469,-28.28515 60.29688,-52.57422 -6.31641,10.79297 -16.19532,19.26954 -26.9375,25.63672 -10.79688,6.3711 -22.61719,10.79688 -34.4375,15.0625 -5.1836,1.89063 -10.41797,3.72266 -15.76172,5.23438 -15.27735,4.375 -31.36328,5.88672 -47.17969,4.48047 m 107.95703,-36.48828 c 2.69922,-2.53907 5.34766,-5.12891 7.50391,-8.04297 3.40234,-4.69532 5.66797,-10.14844 7.82812,-15.54688 2.91406,-7.33984 5.88281,-14.73828 6.64063,-22.61719 -1.40625,1.24219 -1.89063,3.07813 -2.42969,4.85938 -7.17969,24.88281 -24.9375,46.58203 -47.98828,58.45703 10.85156,-2.42969 20.1875,-9.5 28.44531,-17.10937 m -131.92187,26.44921 c 1.13281,0.26954 2.53515,0.75391 2.58984,1.89063 0.42969,-0.75781 1.72656,-0.75781 2.21094,0 0.21875,-0.0547 0.0547,-0.43359 -0.21485,-0.54297 -1.61718,-0.86328 -3.23828,-1.72656 -4.80468,-2.58984 -6.53125,-3.50782 -12.52344,-7.87891 -17.86719,-12.95313 -0.64844,1.40235 -0.16016,3.1836 1.08203,4.04688 2.375,1.72656 4.75,3.45312 7.125,5.18359 2.85937,2.375 6.26172,4.10156 9.87891,4.96484 m 155.89062,-81.61718 c -0.21484,3.99609 -0.43359,8.04297 -0.70312,12.03906 -0.0508,0.53906 -0.0508,1.07812 -0.0508,1.61719 -0.0547,0.97265 -0.10937,1.94531 -0.21875,2.86328 -0.0547,1.1875 -0.10546,2.26562 -0.10546,3.45312 2.26562,-9.17578 3.07421,-18.78515 2.375,-28.17578 -0.26954,-0.10937 -0.54297,-0.26953 -0.75782,-0.43359 -0.16015,2.85937 -0.3789,5.72265 -0.53906,8.63672 m -209.8164,-59.16016 c -0.3789,0.69922 -0.70312,1.40234 -1.02734,2.10547 0.37891,0.48437 1.07813,-0.10938 1.24219,-0.70313 0.16015,-0.53906 0.32422,-1.29687 0.91797,-1.34765 -0.26953,-0.27344 -0.53907,-0.54297 -0.8086,-0.8125 -0.10937,0.21875 -0.21875,0.53906 -0.10937,0.75781 m 39.02734,-44.80469 c 0.53906,-0.42968 1.07813,-0.86328 1.61719,-1.34765 -0.91797,-0.37891 -2.10547,0.10547 -2.48047,1.07812 0.26953,0.10938 0.53906,0.21485 0.86328,0.26953 m 1.67188,-2.53515 c 1.1875,0.26953 2.53906,-0.0547 3.50781,-0.86328 -1.23828,-0.0547 -2.48047,0.21484 -3.50781,0.86328 m -42.96485,54.78906 c -0.0547,-0.26953 -0.10937,-0.53906 -0.10937,-0.75781 -1.02735,0.3789 -1.51172,1.78125 -0.91797,2.69922 0.21484,-0.69922 0.53906,-1.34766 1.02734,-1.94141 m -6.10156,27.52734 c -0.26953,0.37891 -0.0547,1.02735 0.43359,1.08203 0.26954,-0.86328 0.21485,-1.78125 -0.0547,-2.69921 -0.53907,0.26953 -0.70313,1.02343 -0.37891,1.51171"/>\n <path fill="#1c7361" d="m 527.08984,398.39062 c 0.10547,0.16016 0.21485,0.375 0.32422,0.53907 -0.48828,0.69922 -1.40625,1.02343 -2.21484,0.80859 0.43359,-0.59375 1.08203,-1.02344 1.78125,-1.1875"/>\n <path fill="#1c7361" d="m 522.82422,401.84375 c 0.75781,-0.26953 1.5664,-0.43359 2.375,-0.37891 -0.16016,1.1875 -2.16016,1.51172 -2.64453,0.37891"/>\n <path fill="#1c7361" d="m 520.125,399.35937 c 0.48828,-0.7539 1.40234,-1.29296 2.375,-1.1875 0.21484,0.54297 0.0547,1.1875 -0.37891,1.56641 -0.7539,0.10938 -1.67187,0.21484 -2.21093,-0.37891"/>\n <path fill="#1c7361" d="m 671.42969,402.92187 c 0.32422,-0.0508 0.64843,0.26954 0.59375,0.59375 -0.0547,0.32422 -0.42969,0.54297 -0.75391,0.4336 -0.48828,-0.53906 -0.97266,-1.13281 -1.45703,-1.72656 0.53906,-0.4336 1.50781,-0.0547 1.61719,0.59375"/>\n <path fill="#1c7361" d="m 524.98437,394.93359 c 0.37891,-0.42968 1.13282,-0.42968 1.56641,-0.0547 -0.70312,0.70312 -1.62109,1.1875 -2.59375,1.51171 -0.10547,-0.59375 0.43359,-1.29296 1.02734,-1.24218"/>\n <path fill="#1c7361" d="m 516.13281,445.13672 c 0.48438,-0.70313 1.78125,-0.4336 1.94141,0.42969 -0.64844,-0.10547 -1.34766,0.10937 -1.78125,0.59375 -0.26953,0.10937 -0.70313,-0.10547 -0.70313,-0.42969 -0.0508,-0.26953 0.27344,-0.59375 0.59375,-0.54297"/>\n <path fill="#1c7361" d="m 547.00781,410.58984 c 0.26953,-0.10937 0.64844,-0.21875 0.91797,-0.10937 0.32422,0.10937 0.48438,0.59375 0.26953,0.80859 -1.02734,0.64844 -2.21484,1.02735 -3.40234,1.08203 0.54297,-0.75781 1.35156,-1.35156 2.21484,-1.78125"/>\n <path fill="#1c7361" d="m 562.92969,579.27344 c 0.54297,0.3789 1.13672,0.75781 1.67578,1.13281 -1.1875,0.48828 -2.58985,0.21875 -3.5625,-0.64453 -0.21485,-0.37891 0.21484,-0.91797 0.59375,-0.91797 0.48437,-0.0547 0.91797,0.21484 1.29297,0.42969"/>\n <path fill="#1c7361" d="m 538.26172,405.62109 c -0.26953,-0.80859 -0.0547,-1.78125 0.59375,-2.375 0.43359,-0.10547 0.86328,-0.42968 1.02734,-0.91797 0.69922,0.26954 1.34766,0.54297 2.05078,0.8125 -1.1875,0.8086 -2.42968,1.61719 -3.67187,2.48047"/>\n <path fill="#1c7361" d="m 511.92187,463.59766 c 0,-0.32422 0,-0.64844 0,-0.97266 0.53907,-0.26953 1.13282,-0.26953 1.61719,-0.0547 -0.96875,1.02735 -1.51172,2.42969 -1.40234,3.83203 -0.59375,-0.42968 -1.24219,-0.91797 -1.89063,-1.34765 0.54297,-0.4336 1.13672,-0.91797 1.73047,-1.40625"/>\n <path fill="#1c7361" d="m 508.35937,415.93359 c 0.21485,-1.67578 1.1875,-3.1875 2.53516,-4.21093 0.37891,-0.26954 0.97266,-0.4336 1.1875,-0.0547 -1.1875,1.1875 -2.16016,2.53515 -2.85937,4.04687 -0.16407,0.27344 -0.59375,0.4336 -0.86329,0.21875"/>\n <path fill="#1c7361" d="m 513.91797,449.39844 c 1.07812,-0.8086 2.10547,-1.61719 3.18359,-2.42969 -0.26953,1.02734 -0.53906,1.94531 -0.80859,2.96875 -0.37891,0.21875 -0.64844,0.59766 -1.02344,0.8125 -0.37891,0.21484 -0.91797,0.26953 -1.1875,-0.10938 -0.21875,-0.3789 0.375,-0.91796 0.59375,-0.53906 -0.21875,-0.21484 -0.48828,-0.43359 -0.75781,-0.70312"/>\n <path fill="#1c7361" d="m 555.05078,407.56641 c -0.10937,0.26953 -0.21484,0.53906 -0.10937,0.86328 -0.86329,0.16015 -1.67188,0.32422 -2.42969,0.48437 -0.10547,0.32422 -0.21485,0.64844 -0.32031,0.97266 -0.64844,-0.0547 -1.29688,-0.0547 -1.89063,-0.0547 -0.53906,-0.26953 0,-1.02344 0.53906,-1.29297 1.07813,-0.54297 2.21485,-0.86719 3.40235,-1.02734 -0.16407,-0.26953 -0.32422,-0.48438 -0.48828,-0.75391 0.86328,-0.70312 1.89062,-1.1875 3.02343,-1.51172 0.21485,0.375 0.26953,0.8086 0.16407,1.23828 -0.37891,0.16407 -0.75782,0.21875 -1.13672,0.10938 0.0547,0.26953 0.10937,0.53906 0.16406,0.86328 -0.37891,0.10938 -0.64844,0.16406 -0.91797,0.10938"/>\n <path fill="#1c7361" d="m 512.83984,412.64062 c 0.42969,-0.26953 1.02344,-0.3789 1.51172,-0.26953 -0.21875,-0.26953 -0.3789,-0.54297 -0.54297,-0.8125 0.54297,-0.10547 1.08203,-0.21484 1.67578,-0.26953 0.21485,-0.53906 0.21485,-1.1875 0,-1.72656 0.59375,-0.0547 1.24219,0.0547 1.78125,0.26953 0.16016,0.21484 0.21485,0.53906 0.16016,0.80859 -0.26953,0.10938 -0.59375,0.21875 -0.91797,0.32422 -0.10547,0.54297 -0.26953,1.08203 -0.375,1.6211 -0.26953,0.16015 -0.70312,0.21484 -1.02734,0.10937 -0.48438,2.91406 -3.67188,4.58594 -4.80469,7.28516 -0.37891,0.91797 -0.75391,2.10547 -1.72656,2.10547 -0.26953,-0.32422 -0.21485,-0.91797 0.16015,-1.1875 -0.375,-0.10938 -0.69921,-0.21485 -1.02343,-0.32422 -0.0547,-0.59375 0.91797,-0.42969 1.40234,-0.0547 0.43359,-0.375 0.0547,-1.24219 -0.48437,-1.24219 0.59375,-0.48437 0.97265,-1.23828 1.07812,-1.99609 0.59375,0.0547 1.1875,-0.16016 1.56641,-0.59375 -0.4336,0.10937 -0.91797,-0.21484 -1.02735,-0.69922 0.86328,0.16016 1.73047,-0.64844 1.67578,-1.51172 0.64844,-0.3789 1.29297,-0.75781 1.94141,-1.13672 -0.26953,-0.16015 -0.64844,-0.42968 -1.02344,-0.69922"/>\n <path fill="#1c7361" d="m 682.38672,415.5 c -1.1875,-1.61719 -2.42969,-3.18359 -3.9375,-4.53516 -2.10547,-1.88672 -4.80469,-3.5625 -5.23828,-6.36718 12.6875,10.74218 22.45703,24.9375 27.90625,40.64453 0.48828,0.43359 -0.0508,1.40625 -0.64453,1.24218 -4.75,-10.95703 -10.85157,-21.42968 -18.08594,-30.98437"/>\n <path fill="#1c7361" d="m 539.88281,406.97266 c 2.21094,-1.78125 4.75,-3.45704 5.66797,-6.15625 0.26953,-0.75391 1.02344,-1.34766 1.72656,-1.78125 10.90235,-6.85547 23.64453,-10.63282 36.48828,-10.84766 -6.42187,1.72656 -12.79296,3.39844 -19.21484,5.12891 -9.98437,2.64453 -17.32812,10.90234 -24.07422,18.78515 -5.83203,6.85547 -11.71484,13.71094 -17.54297,20.61719 -0.70312,1.89062 -1.35156,3.83203 -2.05078,5.72266 -0.26953,0.86328 -0.59375,1.72656 -1.35156,2.26562 -0.69922,0.54297 -1.88672,0.54297 -2.32031,-0.26953 2.58984,-4.53125 5.18359,-9.12109 7.82812,-13.71094 4.21094,-7.125 8.41797,-14.46484 14.84375,-19.7539"/>\n </g>\n</svg>\n',m=new d.LabIcon({name:"@marimo-team/jupyter-extension:marimo",svgstr:p}),u=`data:image/svg+xml,${encodeURIComponent(p)}`,h='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">\n <text x="50" y="75" font-size="80" text-anchor="middle" font-family="Apple Color Emoji, Segoe UI Emoji, Noto Color Emoji, sans-serif">🍃</text>\n</svg>',f=new d.LabIcon({name:"@marimo-team/jupyter-extension:leaf",svgstr:h}),v=`data:image/svg+xml,${encodeURIComponent(h)}`,b=new Map;function g(e,t={}){const{filePath:n,label:o}=t,r=new a.IFrame({sandbox:["allow-same-origin","allow-scripts","allow-forms","allow-modals","allow-popups","allow-downloads"]}),i=n?null:`__new__${l.UUID.uuid4()}`,s=n?e:`${e}?file=${i}`;r.url=s,r.addClass("jp-MarimoWidget");const c=new a.MainAreaWidget({content:r});if(c.id=`marimo-${l.UUID.uuid4()}`,o)c.title.label=o;else if(n){const e=n.split("/");c.title.label=e[e.length-1]||"marimo"}else c.title.label="marimo";return c.title.closable=!0,c.title.icon=f,c.title.caption=n?`marimo: ${n}`:"marimo Editor",i&&(b.set(i,c),c.disposed.connect(()=>{b.delete(i)})),c}var S=n(247);class j extends S.Widget{constructor(e){super(),this._sessionsContainer=null,this._refreshInterval=null,this._statusDot=null,this._statusText=null,this._serverControlsContainer=null,this._startServerContainer=null,this._commands=e,this.id="marimo-sidebar",this.addClass("jp-MarimoSidebar"),this.title.icon=m,this.title.caption="marimo",this._buildUI(),this._startPolling()}dispose(){null!==this._refreshInterval&&window.clearInterval(this._refreshInterval),super.dispose()}_getMarimoBaseUrl(){return`${c.PageConfig.getBaseUrl()}marimo/`}_startPolling(){this._refreshStatus(),this._refreshInterval=window.setInterval(()=>{this._refreshStatus()},5e3)}async _refreshStatus(){const e=await this._checkServerStatus();this._updateServerStatus(e),e?await this._refreshSessions():this._updateSessionsList([])}async _refreshSessions(){try{const e=this._getMarimoBaseUrl(),t=await fetch(`${e}api/home/running_notebooks`,{method:"POST",credentials:"same-origin"});if(t.ok){const e=(await t.json()).files??[];this._updateSessionsList(e),function(e){for(const t of e){const e=b.get(t.initializationId);e&&t.name&&t.path&&e.title.label!==t.name&&(e.title.label=t.name,e.title.caption=`marimo: ${t.path}`)}}(e)}}catch{}}async _shutdownSession(e){try{const t=this._getMarimoBaseUrl();(await fetch(`${t}api/home/shutdown_session`,{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:e})})).ok&&await this._refreshSessions()}catch{}}async _isServerHealthy(){try{const e=this._getMarimoBaseUrl(),t=await fetch(`${e}health`,{method:"GET",credentials:"same-origin"});return!!t.ok&&"healthy"===(await t.json()).status}catch{return!1}}async _checkServerStatus(){return this._isServerHealthy()}_updateServerStatus(e){this._statusDot&&this._statusText&&(e?(this._statusDot.className="jp-MarimoSidebar-statusDot jp-mod-ready",this._statusText.textContent="Running"):(this._statusDot.className="jp-MarimoSidebar-statusDot jp-mod-error",this._statusText.textContent="Stopped")),this._serverControlsContainer&&(this._serverControlsContainer.style.display=e?"flex":"none"),this._startServerContainer&&(this._startServerContainer.style.display=e?"none":"flex")}async _startServer(){this._statusText&&(this._statusText.textContent="Starting...");try{const e=15;for(let t=0;t<e;t++){if(await this._isServerHealthy())return this._updateServerStatus(!0),void await this._refreshSessions();await new Promise(e=>setTimeout(e,1e3))}this._updateServerStatus(!1)}catch{this._updateServerStatus(!1)}}async _restartServer(){if(window.confirm("Are you sure you want to restart the marimo server? All running sessions will be interrupted.")){this._statusText&&(this._statusText.textContent="Restarting..."),this._statusDot&&(this._statusDot.className="jp-MarimoSidebar-statusDot jp-mod-warning"),this._updateSessionsList([]);try{const e=c.PageConfig.getBaseUrl();if(!(await fetch(`${e}marimo-tools/restart`,{method:"POST",credentials:"same-origin"})).ok)throw new Error("Restart request failed");await this._waitForServer()}catch{this._updateServerStatus(!1)}}}async _waitForServer(){for(let e=0;e<20;e++)if(await new Promise(e=>setTimeout(e,1e3)),await this._isServerHealthy())return this._updateServerStatus(!0),void await this._refreshSessions();this._updateServerStatus(!1)}_updateSessionsList(e){if(this._sessionsContainer){if(this._sessionsContainer.innerHTML="",0===e.length){const e=document.createElement("div");return e.className="jp-MarimoSidebar-emptyMessage",e.textContent="No running sessions",void this._sessionsContainer.appendChild(e)}for(const t of e){const e=document.createElement("div");e.className="jp-MarimoSidebar-sessionItem";const n=document.createElement("div");n.className="jp-MarimoSidebar-sessionInfo";const o=document.createElement("span");o.className="jp-MarimoSidebar-sessionName",o.textContent=t.name,o.title=t.path,n.appendChild(o);const a=document.createElement("button");a.className="jp-MarimoSidebar-killButton",a.innerHTML="×",a.title="Shutdown session",a.addEventListener("click",()=>{this._shutdownSession(t.sessionId)}),e.appendChild(n),e.appendChild(a),this._sessionsContainer.appendChild(e)}}}_buildUI(){const e=document.createElement("div");e.className="jp-MarimoSidebar-content";const t=document.createElement("div");t.className="jp-MarimoSidebar-header",t.innerHTML='<span class="jp-MarimoSidebar-title">marimo</span>',e.appendChild(t);const n=document.createElement("div");n.className="jp-MarimoSidebar-section";const o=document.createElement("div");o.className="jp-MarimoSidebar-sectionTitle",o.textContent="Server Status",n.appendChild(o);const a=document.createElement("div");a.className="jp-MarimoSidebar-status",this._statusDot=document.createElement("span"),this._statusDot.className="jp-MarimoSidebar-statusDot jp-mod-ready",a.appendChild(this._statusDot),this._statusText=document.createElement("span"),this._statusText.textContent="Running",a.appendChild(this._statusText),n.appendChild(a),this._serverControlsContainer=document.createElement("div"),this._serverControlsContainer.className="jp-MarimoSidebar-serverControls";const r=document.createElement("button");r.className="jp-MarimoSidebar-serverButton jp-mod-restart",r.innerHTML="↻ Restart",r.title="Restart the marimo server",r.addEventListener("click",()=>{this._restartServer()}),this._serverControlsContainer.appendChild(r),n.appendChild(this._serverControlsContainer),this._startServerContainer=document.createElement("div"),this._startServerContainer.className="jp-MarimoSidebar-serverControls",this._startServerContainer.style.display="none";const i=document.createElement("button");i.className="jp-MarimoSidebar-serverButton jp-mod-start",i.innerHTML="▶ Start Server",i.title="Start the marimo server",i.addEventListener("click",()=>{this._startServer()}),this._startServerContainer.appendChild(i),n.appendChild(this._startServerContainer),e.appendChild(n);const s=document.createElement("div");s.className="jp-MarimoSidebar-section";const c=document.createElement("div");c.className="jp-MarimoSidebar-sectionTitleRow";const l=document.createElement("div");l.className="jp-MarimoSidebar-sectionTitle",l.textContent="Running Sessions",c.appendChild(l);const d=document.createElement("button");d.className="jp-MarimoSidebar-refreshButton",d.innerHTML="↻",d.title="Refresh sessions",d.addEventListener("click",()=>{this._refreshSessions()}),c.appendChild(d),s.appendChild(c),this._sessionsContainer=document.createElement("div"),this._sessionsContainer.className="jp-MarimoSidebar-sessions",s.appendChild(this._sessionsContainer),e.appendChild(s);const p=document.createElement("div");p.className="jp-MarimoSidebar-section";const m=document.createElement("div");m.className="jp-MarimoSidebar-sectionTitle",m.textContent="Quick Actions",p.appendChild(m);const u=document.createElement("div");u.className="jp-MarimoSidebar-actions";const h=document.createElement("button");h.className="jp-MarimoSidebar-button",h.innerHTML='<span class="jp-MarimoSidebar-buttonIcon">+</span> New Notebook',h.addEventListener("click",()=>{this._commands.execute("marimo:new-notebook")}),u.appendChild(h);const f=document.createElement("button");f.className="jp-MarimoSidebar-button",f.innerHTML='<span class="jp-MarimoSidebar-buttonIcon">↗</span> Open Editor',f.addEventListener("click",()=>{this._commands.execute("marimo:open-editor")}),u.appendChild(f),p.appendChild(u),e.appendChild(p);const v=document.createElement("div");v.className="jp-MarimoSidebar-section",v.innerHTML='\n <div class="jp-MarimoSidebar-sectionTitle">Help</div>\n <div class="jp-MarimoSidebar-help">\n <p>Right-click on <code>.py</code> files to open them with marimo.</p>\n <p>Right-click on <code>.ipynb</code> files to convert them to marimo format.</p>\n </div>\n ',e.appendChild(v),this.node.appendChild(e)}}var x=n(19);class y extends x.DocumentWidget{}class w extends x.ABCWidgetFactory{createNewWidget(e){const t=`${c.PageConfig.getBaseUrl()}marimo/`,n=e.path,o=new a.IFrame({sandbox:["allow-same-origin","allow-scripts","allow-forms","allow-modals","allow-popups","allow-downloads"]});o.url=`${t}?file=${encodeURIComponent(n)}`,o.addClass("jp-MarimoWidget");const r=new y({content:o,context:e});return r.title.icon=f,r.title.caption=`marimo: ${n}`,r}}var C=n(72),_=n.n(C),M=n(825),k=n.n(M),N=n(659),I=n.n(N),E=n(56),T=n.n(E),B=n(540),$=n.n(B),L=n(113),D=n.n(L),U=n(475),R={};R.styleTagTransform=D(),R.setAttributes=T(),R.insert=I().bind(null,"head"),R.domAPI=k(),R.insertStyleElement=$(),_()(U.A,R),U.A&&U.A.locals&&U.A.locals;const P="marimo:open-file",A="marimo:convert-notebook",H="marimo:new-notebook",W="marimo:open-editor";function O(e){const t=e.tracker.currentWidget;if(!t)return null;const n=t.selectedItems().next();return n.done||!n.value?null:n.value.path}const z={id:"@marimo-team/jupyter-extension:plugin",description:"JupyterLab extension for marimo notebook integration",autoStart:!0,requires:[i.IFileBrowserFactory],optional:[s.ILauncher,o.ILayoutRestorer],activate:(e,t,n,o)=>{const{commands:i,shell:s}=e,l=`${c.PageConfig.getBaseUrl()}marimo/`;i.addCommand(P,{label:"Edit with marimo",caption:"Edit this Python file in the marimo editor",icon:m,isVisible:()=>{const e=O(t);return null!==e&&function(e){return e.endsWith(".py")}(e)},execute:()=>{const e=O(t);if(!e)return;const n=g(`${l}?file=${encodeURIComponent(e)}`,{filePath:e});s.add(n,"main"),s.activateById(n.id)}}),i.addCommand(A,{label:"Convert to marimo",caption:"Convert this Jupyter notebook to marimo format",icon:m,isVisible:()=>{const e=O(t);return null!==e&&function(e){return e.endsWith(".ipynb")}(e)},execute:async()=>{const e=O(t);if(!e)return;const n=e.replace(/\.ipynb$/,".py"),o=await a.InputDialog.getText({title:"Convert to marimo",label:"Output filename:",text:n});if(!o.button.accept||!o.value)return;const i=o.value;try{const n=r.ServerConnection.makeSettings(),o=await r.ServerConnection.makeRequest(`${n.baseUrl}marimo-tools/convert`,{method:"POST",body:JSON.stringify({input:e,output:i})},n),a=await o.json();if(!o.ok||!a.success)throw new Error(a.error??"Conversion failed");const c=t.tracker.currentWidget;c&&await c.model.refresh();const d=g(`${l}?file=${encodeURIComponent(i)}`,{filePath:i});s.add(d,"main"),s.activateById(d.id)}catch(e){(0,a.showErrorMessage)("Conversion failed",`Failed to convert notebook: ${e}`)}}}),i.addCommand(H,{label:"New marimo Notebook",caption:"Create a new marimo notebook",execute:async()=>{try{const e=await r.KernelSpecAPI.getSpecs(),n=[];if(e?.kernelspecs)for(const[t,o]of Object.entries(e.kernelspecs)){if(!o)continue;const e=o.argv??[];if(e.length>0){const a=e[0];if(!a.includes("/")&&!a.includes("\\"))continue;n.push({name:t,displayName:o.display_name??t,argv:e})}}if(0===n.length){const e=g(l,{label:"New Notebook"});return s.add(e,"main"),void s.activateById(e.id)}const o=["Default (no venv)",...n.map(e=>e.displayName)],i=await a.InputDialog.getItem({title:"Select Python Environment",label:"Kernel:",items:o,current:0});if(!i.button.accept||null===i.value)return;if("Default (no venv)"===i.value){const e=g(l,{label:"New Notebook"});return s.add(e,"main"),void s.activateById(e.id)}const c=n.find(e=>e.displayName===i.value),d=c?.argv[0],p=await a.InputDialog.getText({title:"New marimo Notebook",label:"Notebook name:",text:"untitled.py"});if(!p.button.accept||!p.value)return;let m=p.value;m.endsWith(".py")||(m+=".py");const u=t.tracker.currentWidget,h=u?.model.path||"",f=h?`${h}/${m}`:m,v=r.ServerConnection.makeSettings(),b=await r.ServerConnection.makeRequest(`${v.baseUrl}marimo-tools/create-stub`,{method:"POST",body:JSON.stringify({path:f,venv:d})},v),S=await b.json();if(!b.ok||!S.success)throw new Error(S.error??"Failed to create notebook");u&&await u.model.refresh();const j=g(`${l}?file=${encodeURIComponent(f)}`,{filePath:f});s.add(j,"main"),s.activateById(j.id)}catch{const e=g(l,{label:"New Notebook"});s.add(e,"main"),s.activateById(e.id)}}}),i.addCommand(W,{label:"Open marimo Editor",caption:"Open the marimo editor in a new tab",icon:m,execute:()=>{window.open(l,"_blank")}}),e.contextMenu.addItem({command:P,selector:'.jp-DirListing-item[data-isdir="false"]',rank:50}),e.contextMenu.addItem({command:A,selector:'.jp-DirListing-item[data-isdir="false"]',rank:51}),n&&(n.add({command:H,category:"Notebook",rank:3,kernelIconUrl:v}),n.add({command:W,category:"Other",rank:1,kernelIconUrl:u}));const d=new j(i);s.add(d,"left",{rank:200}),o&&o.add(d,"marimo-sidebar");const p=new w({name:"marimo",fileTypes:["python"],defaultFor:[]});e.docRegistry.addWidgetFactory(p)}}},540(e){e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},601(e){e.exports=function(e){return e[1]}},659(e){var t={};e.exports=function(e,n){var o=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(n)}},825(e){e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var o="";n.supports&&(o+="@supports (".concat(n.supports,") {")),n.media&&(o+="@media ".concat(n.media," {"));var a=void 0!==n.layer;a&&(o+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),o+=n.css,a&&(o+="}"),n.media&&(o+="}"),n.supports&&(o+="}");var r=n.sourceMap;r&&"undefined"!=typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),t.styleTagTransform(o,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var _JUPYTERLAB;(()=>{"use strict";var e,r,t,n,o,a,i,u,l,s,f,d,p,c,h,v,m,b,y,g,j,w,S,x,k={321(e,r,t){var n={"./index":()=>t.e(510).then(()=>()=>t(510)),"./extension":()=>t.e(510).then(()=>()=>t(510))},o=(e,r)=>(t.R=r,r=t.o(n,e)?n[e]():Promise.resolve().then(()=>{throw new Error('Module "'+e+'" does not exist in container.')}),t.R=void 0,r),a=(e,r)=>{if(t.S){var n="default",o=t.S[n];if(o&&o!==e)throw new Error("Container initialization failed as it has already been initialized with a different share scope");return t.S[n]=e,t.I(n,r)}};t.d(r,{get:()=>o,init:()=>a})}},E={};function _(e){var r=E[e];if(void 0!==r)return r.exports;var t=E[e]={id:e,exports:{}};return k[e](t,t.exports,_),t.exports}_.m=k,_.c=E,_.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return _.d(r,{a:r}),r},_.d=(e,r)=>{for(var t in r)_.o(r,t)&&!_.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},_.f={},_.e=e=>Promise.all(Object.keys(_.f).reduce((r,t)=>(_.f[t](e,r),r),[])),_.u=e=>e+".5a6289689ce7a0453fc4.js?v=5a6289689ce7a0453fc4",_.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),_.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),e={},r="@marimo-team/jupyter-extension:",_.l=(t,n,o,a)=>{if(e[t])e[t].push(n);else{var i,u;if(void 0!==o)for(var l=document.getElementsByTagName("script"),s=0;s<l.length;s++){var f=l[s];if(f.getAttribute("src")==t||f.getAttribute("data-webpack")==r+o){i=f;break}}i||(u=!0,(i=document.createElement("script")).charset="utf-8",_.nc&&i.setAttribute("nonce",_.nc),i.setAttribute("data-webpack",r+o),i.src=t),e[t]=[n];var d=(r,n)=>{i.onerror=i.onload=null,clearTimeout(p);var o=e[t];if(delete e[t],i.parentNode&&i.parentNode.removeChild(i),o&&o.forEach(e=>e(n)),r)return r(n)},p=setTimeout(d.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=d.bind(null,i.onerror),i.onload=d.bind(null,i.onload),u&&document.head.appendChild(i)}},_.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{_.S={};var e={},r={};_.I=(t,n)=>{n||(n=[]);var o=r[t];if(o||(o=r[t]={}),!(n.indexOf(o)>=0)){if(n.push(o),e[t])return e[t];_.o(_.S,t)||(_.S[t]={});var a=_.S[t],i="@marimo-team/jupyter-extension",u=[];return"default"===t&&((e,r,t,n)=>{var o=a[e]=a[e]||{},u=o[r];(!u||!u.loaded&&(1!=!u.eager?n:i>u.from))&&(o[r]={get:()=>_.e(510).then(()=>()=>_(510)),from:i,eager:!1})})("@marimo-team/jupyter-extension","0.1.0"),e[t]=u.length?Promise.all(u).then(()=>e[t]=1):1}}})(),(()=>{var e;_.g.importScripts&&(e=_.g.location+"");var r=_.g.document;if(!e&&r&&(r.currentScript&&"SCRIPT"===r.currentScript.tagName.toUpperCase()&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");if(t.length)for(var n=t.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=t[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),_.p=e})(),t=e=>{var r=e=>e.split(".").map(e=>+e==e?+e:e),t=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(e),n=t[1]?r(t[1]):[];return t[2]&&(n.length++,n.push.apply(n,r(t[2]))),t[3]&&(n.push([]),n.push.apply(n,r(t[3]))),n},n=(e,r)=>{e=t(e),r=t(r);for(var n=0;;){if(n>=e.length)return n<r.length&&"u"!=(typeof r[n])[0];var o=e[n],a=(typeof o)[0];if(n>=r.length)return"u"==a;var i=r[n],u=(typeof i)[0];if(a!=u)return"o"==a&&"n"==u||"s"==u||"u"==a;if("o"!=a&&"u"!=a&&o!=i)return o<i;n++}},o=e=>{var r=e[0],t="";if(1===e.length)return"*";if(r+.5){t+=0==r?">=":-1==r?"<":1==r?"^":2==r?"~":r>0?"=":"!=";for(var n=1,a=1;a<e.length;a++)n--,t+="u"==(typeof(u=e[a]))[0]?"-":(n>0?".":"")+(n=2,u);return t}var i=[];for(a=1;a<e.length;a++){var u=e[a];i.push(0===u?"not("+l()+")":1===u?"("+l()+" || "+l()+")":2===u?i.pop()+" "+i.pop():o(u))}return l();function l(){return i.pop().replace(/^\((.+)\)$/,"$1")}},a=(e,r)=>{if(0 in e){r=t(r);var n=e[0],o=n<0;o&&(n=-n-1);for(var i=0,u=1,l=!0;;u++,i++){var s,f,d=u<e.length?(typeof e[u])[0]:"";if(i>=r.length||"o"==(f=(typeof(s=r[i]))[0]))return!l||("u"==d?u>n&&!o:""==d!=o);if("u"==f){if(!l||"u"!=d)return!1}else if(l)if(d==f)if(u<=n){if(s!=e[u])return!1}else{if(o?s>e[u]:s<e[u])return!1;s!=e[u]&&(l=!1)}else if("s"!=d&&"n"!=d){if(o||u<=n)return!1;l=!1,u--}else{if(u<=n||f<d!=o)return!1;l=!1}else"s"!=d&&"n"!=d&&(l=!1,u--)}}var p=[],c=p.pop.bind(p);for(i=1;i<e.length;i++){var h=e[i];p.push(1==h?c()|c():2==h?c()&c():h?a(h,r):!c())}return!!c()},i=(e,r)=>e&&_.o(e,r),u=e=>(e.loaded=1,e.get()),l=e=>Object.keys(e).reduce((r,t)=>(e[t].eager&&(r[t]=e[t]),r),{}),s=(e,r,t)=>{var o=t?l(e[r]):e[r];return(r=Object.keys(o).reduce((e,r)=>!e||n(e,r)?r:e,0))&&o[r]},f=(e,r,t,o)=>{var i=o?l(e[r]):e[r];return(r=Object.keys(i).reduce((e,r)=>!a(t,r)||e&&!n(e,r)?e:r,0))&&i[r]},d=(e,r,t)=>{var o=t?l(e[r]):e[r];return Object.keys(o).reduce((e,r)=>!e||!o[e].loaded&&n(e,r)?r:e,0)},p=(e,r,t,n)=>"Unsatisfied version "+t+" from "+(t&&e[r][t].from)+" of shared singleton module "+r+" (required "+o(n)+")",c=(e,r,t,n,a)=>{var i=e[t];return"No satisfying version ("+o(n)+")"+(a?" for eager consumption":"")+" of shared module "+t+" found in shared scope "+r+".\nAvailable versions: "+Object.keys(i).map(e=>e+" from "+i[e].from).join(", ")},h=e=>{throw new Error(e)},v=e=>{"undefined"!=typeof console&&console.warn&&console.warn(e)},b=(e,r,t)=>t?t():((e,r)=>h("Shared module "+r+" doesn't exist in shared scope "+e))(e,r),y=(m=e=>function(r,t,n,o,a){var i=_.I(r);return i&&i.then&&!n?i.then(e.bind(e,r,_.S[r],t,!1,o,a)):e(r,_.S[r],t,n,o,a)})((e,r,t,n,o,a)=>{if(!i(r,t))return b(e,t,a);var l=f(r,t,o,n);return l?u(l):(v(c(r,e,t,o,n)),u(s(r,t,n)))}),g=m((e,r,t,n,o,l)=>{if(!i(r,t))return b(e,t,l);var s=d(r,t,n);return a(o,s)||v(p(r,t,s,o)),u(r[t][s])}),j={},w={489:()=>g("default","@jupyterlab/application",!1,[1,4,5,2]),14:()=>g("default","@jupyterlab/apputils",!1,[1,4,6,2]),830:()=>g("default","@jupyterlab/services",!1,[1,7,5,2]),581:()=>g("default","@jupyterlab/filebrowser",!1,[1,4,5,2]),83:()=>g("default","@jupyterlab/launcher",!1,[1,4,5,2]),469:()=>g("default","@jupyterlab/coreutils",!1,[1,6,5,2]),262:()=>g("default","@lumino/coreutils",!1,[1,2,0,0]),840:()=>g("default","@jupyterlab/ui-components",!1,[1,4,5,2]),247:()=>g("default","@lumino/widgets",!1,[1,2,3,1,,"alpha",1]),19:()=>y("default","@jupyterlab/docregistry",!1,[1,4,5,2])},S={510:[489,14,830,581,83,469,262,840,247,19]},x={},_.f.consumes=(e,r)=>{_.o(S,e)&&S[e].forEach(e=>{if(_.o(j,e))return r.push(j[e]);if(!x[e]){var t=r=>{j[e]=0,_.m[e]=t=>{delete _.c[e],t.exports=r()}};x[e]=!0;var n=r=>{delete j[e],_.m[e]=t=>{throw delete _.c[e],r}};try{var o=w[e]();o.then?r.push(j[e]=o.then(t).catch(n)):t(o)}catch(e){n(e)}}})},(()=>{var e={764:0};_.f.j=(r,t)=>{var n=_.o(e,r)?e[r]:void 0;if(0!==n)if(n)t.push(n[2]);else{var o=new Promise((t,o)=>n=e[r]=[t,o]);t.push(n[2]=o);var a=_.p+_.u(r),i=new Error;_.l(a,t=>{if(_.o(e,r)&&(0!==(n=e[r])&&(e[r]=void 0),n)){var o=t&&("load"===t.type?"missing":t.type),a=t&&t.target&&t.target.src;i.message="Loading chunk "+r+" failed.\n("+o+": "+a+")",i.name="ChunkLoadError",i.type=o,i.request=a,n[1](i)}},"chunk-"+r,r)}};var r=(r,t)=>{var n,o,[a,i,u]=t,l=0;if(a.some(r=>0!==e[r])){for(n in i)_.o(i,n)&&(_.m[n]=i[n]);u&&u(_)}for(r&&r(t);l<a.length;l++)o=a[l],_.o(e,o)&&e[o]&&e[o][0](),e[o]=0},t=self.webpackChunk_marimo_team_jupyter_extension=self.webpackChunk_marimo_team_jupyter_extension||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})(),_.nc=void 0;var P=_(321);(_JUPYTERLAB=void 0===_JUPYTERLAB?{}:_JUPYTERLAB)["@marimo-team/jupyter-extension"]=P})();
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"packages": [
|
|
3
|
+
{
|
|
4
|
+
"name": "css-loader",
|
|
5
|
+
"versionInfo": "6.11.0",
|
|
6
|
+
"licenseId": "MIT",
|
|
7
|
+
"extractedText": "Copyright JS Foundation and other contributors\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n"
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"name": "style-loader",
|
|
11
|
+
"versionInfo": "3.3.4",
|
|
12
|
+
"licenseId": "MIT",
|
|
13
|
+
"extractedText": "Copyright JS Foundation and other contributors\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n"
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@marimo-team/jupyter-extension",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "JupyterLab extension for Marimo integration",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"jupyter",
|
|
7
|
+
"jupyterlab",
|
|
8
|
+
"jupyterlab-extension",
|
|
9
|
+
"marimo"
|
|
10
|
+
],
|
|
11
|
+
"homepage": "https://github.com/marimo-team/marimo-jupyter-extension",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/marimo-team/marimo-jupyter-extension/issues"
|
|
14
|
+
},
|
|
15
|
+
"license": "Apache-2.0",
|
|
16
|
+
"author": {
|
|
17
|
+
"name": "Marimo Team"
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"lib/**/*.{d.ts,eot,gif,html,jpg,js,js.map,json,png,svg,woff2,ttf}",
|
|
21
|
+
"style/**/*.{css,js,eot,gif,html,jpg,json,png,svg,woff2,ttf}"
|
|
22
|
+
],
|
|
23
|
+
"main": "lib/index.js",
|
|
24
|
+
"types": "lib/index.d.ts",
|
|
25
|
+
"repository": {
|
|
26
|
+
"type": "git",
|
|
27
|
+
"url": "https://github.com/marimo-team/marimo-jupyter-extension.git"
|
|
28
|
+
},
|
|
29
|
+
"scripts": {
|
|
30
|
+
"build": "npm run build:lib && npm run build:labextension:dev",
|
|
31
|
+
"build:prod": "npm run clean && npm run build:lib:prod && npm run build:labextension",
|
|
32
|
+
"build:labextension": "scripts/jupyter labextension build .",
|
|
33
|
+
"build:labextension:dev": "scripts/jupyter labextension build --development True .",
|
|
34
|
+
"build:lib": "tsc --sourceMap",
|
|
35
|
+
"build:lib:prod": "tsc",
|
|
36
|
+
"clean": "npm run clean:lib && npm run clean:labextension",
|
|
37
|
+
"clean:lib": "rimraf lib tsconfig.tsbuildinfo",
|
|
38
|
+
"clean:labextension": "rimraf ../marimo_jupyter_extension/labextension",
|
|
39
|
+
"watch": "run-p watch:src watch:labextension",
|
|
40
|
+
"watch:src": "tsc -w --sourceMap",
|
|
41
|
+
"watch:labextension": "scripts/jupyter labextension watch .",
|
|
42
|
+
"lint": "run-s2 lint:biome lint:eslint",
|
|
43
|
+
"lint:biome": "biome lint --config-path .. --diagnostic-level=warn --write .",
|
|
44
|
+
"lint:eslint": "eslint src --fix",
|
|
45
|
+
"lint:check": "biome lint --config-path .. --diagnostic-level=warn . && eslint src",
|
|
46
|
+
"format": "biome format --config-path .. --write .",
|
|
47
|
+
"format:check": "biome format --config-path .. .",
|
|
48
|
+
"typecheck": "tsc --noEmit"
|
|
49
|
+
},
|
|
50
|
+
"dependencies": {
|
|
51
|
+
"@jupyterlab/application": "^4.0.0",
|
|
52
|
+
"@jupyterlab/apputils": "^4.0.0",
|
|
53
|
+
"@jupyterlab/coreutils": "^6.0.0",
|
|
54
|
+
"@jupyterlab/docregistry": "^4.0.0",
|
|
55
|
+
"@jupyterlab/filebrowser": "^4.0.0",
|
|
56
|
+
"@jupyterlab/launcher": "^4.0.0",
|
|
57
|
+
"@jupyterlab/services": "^7.0.0",
|
|
58
|
+
"@jupyterlab/ui-components": "^4.0.0",
|
|
59
|
+
"@lumino/coreutils": "^2.0.0",
|
|
60
|
+
"@lumino/widgets": "^2.0.0"
|
|
61
|
+
},
|
|
62
|
+
"devDependencies": {
|
|
63
|
+
"@biomejs/biome": "^1.9.0",
|
|
64
|
+
"@jupyterlab/builder": "^4.0.0",
|
|
65
|
+
"@types/node": "^20.0.0",
|
|
66
|
+
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
67
|
+
"@typescript-eslint/parser": "^8.0.0",
|
|
68
|
+
"eslint": "^8.57.0",
|
|
69
|
+
"eslint-config-prettier": "^9.1.0",
|
|
70
|
+
"eslint-plugin-react": "^7.37.0",
|
|
71
|
+
"eslint-plugin-react-hooks": "^5.0.0",
|
|
72
|
+
"npm-run-all": "^4.1.5",
|
|
73
|
+
"npm-run-all2": "^6.2.0",
|
|
74
|
+
"rimraf": "^5.0.0",
|
|
75
|
+
"typescript": "~5.3.0"
|
|
76
|
+
},
|
|
77
|
+
"jupyterlab": {
|
|
78
|
+
"extension": true,
|
|
79
|
+
"outputDir": "../marimo_jupyter_extension/labextension",
|
|
80
|
+
"schemaDir": "schema",
|
|
81
|
+
"_build": {
|
|
82
|
+
"load": "static/remoteEntry.705371d091b7d314fd9e.js",
|
|
83
|
+
"extension": "./extension"
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@marimo-team/jupyter-extension",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "JupyterLab extension for Marimo integration",
|
|
5
|
+
"keywords": ["jupyter", "jupyterlab", "jupyterlab-extension", "marimo"],
|
|
6
|
+
"homepage": "https://github.com/marimo-team/marimo-jupyter-extension",
|
|
7
|
+
"bugs": {
|
|
8
|
+
"url": "https://github.com/marimo-team/marimo-jupyter-extension/issues"
|
|
9
|
+
},
|
|
10
|
+
"license": "Apache-2.0",
|
|
11
|
+
"author": {
|
|
12
|
+
"name": "Marimo Team"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"lib/**/*.{d.ts,eot,gif,html,jpg,js,js.map,json,png,svg,woff2,ttf}",
|
|
16
|
+
"style/**/*.{css,js,eot,gif,html,jpg,json,png,svg,woff2,ttf}"
|
|
17
|
+
],
|
|
18
|
+
"main": "lib/index.js",
|
|
19
|
+
"types": "lib/index.d.ts",
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "https://github.com/marimo-team/marimo-jupyter-extension.git"
|
|
23
|
+
},
|
|
24
|
+
"scripts": {
|
|
25
|
+
"build": "npm run build:lib && npm run build:labextension:dev",
|
|
26
|
+
"build:prod": "npm run clean && npm run build:lib:prod && npm run build:labextension",
|
|
27
|
+
"build:labextension": "scripts/jupyter labextension build .",
|
|
28
|
+
"build:labextension:dev": "scripts/jupyter labextension build --development True .",
|
|
29
|
+
"build:lib": "tsc --sourceMap",
|
|
30
|
+
"build:lib:prod": "tsc",
|
|
31
|
+
"clean": "npm run clean:lib && npm run clean:labextension",
|
|
32
|
+
"clean:lib": "rimraf lib tsconfig.tsbuildinfo",
|
|
33
|
+
"clean:labextension": "rimraf ../marimo_jupyter_extension/labextension",
|
|
34
|
+
"watch": "run-p watch:src watch:labextension",
|
|
35
|
+
"watch:src": "tsc -w --sourceMap",
|
|
36
|
+
"watch:labextension": "scripts/jupyter labextension watch .",
|
|
37
|
+
"lint": "run-s2 lint:biome lint:eslint",
|
|
38
|
+
"lint:biome": "biome lint --config-path .. --diagnostic-level=warn --write .",
|
|
39
|
+
"lint:eslint": "eslint src --fix",
|
|
40
|
+
"lint:check": "biome lint --config-path .. --diagnostic-level=warn . && eslint src",
|
|
41
|
+
"format": "biome format --config-path .. --write .",
|
|
42
|
+
"format:check": "biome format --config-path .. .",
|
|
43
|
+
"typecheck": "tsc --noEmit"
|
|
44
|
+
},
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"@jupyterlab/application": "^4.0.0",
|
|
47
|
+
"@jupyterlab/apputils": "^4.0.0",
|
|
48
|
+
"@jupyterlab/coreutils": "^6.0.0",
|
|
49
|
+
"@jupyterlab/docregistry": "^4.0.0",
|
|
50
|
+
"@jupyterlab/filebrowser": "^4.0.0",
|
|
51
|
+
"@jupyterlab/launcher": "^4.0.0",
|
|
52
|
+
"@jupyterlab/services": "^7.0.0",
|
|
53
|
+
"@jupyterlab/ui-components": "^4.0.0",
|
|
54
|
+
"@lumino/coreutils": "^2.0.0",
|
|
55
|
+
"@lumino/widgets": "^2.0.0"
|
|
56
|
+
},
|
|
57
|
+
"devDependencies": {
|
|
58
|
+
"@biomejs/biome": "^1.9.0",
|
|
59
|
+
"@jupyterlab/builder": "^4.0.0",
|
|
60
|
+
"@types/node": "^20.0.0",
|
|
61
|
+
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
62
|
+
"@typescript-eslint/parser": "^8.0.0",
|
|
63
|
+
"eslint": "^8.57.0",
|
|
64
|
+
"eslint-config-prettier": "^9.1.0",
|
|
65
|
+
"eslint-plugin-react": "^7.37.0",
|
|
66
|
+
"eslint-plugin-react-hooks": "^5.0.0",
|
|
67
|
+
"npm-run-all": "^4.1.5",
|
|
68
|
+
"npm-run-all2": "^6.2.0",
|
|
69
|
+
"rimraf": "^5.0.0",
|
|
70
|
+
"typescript": "~5.3.0"
|
|
71
|
+
},
|
|
72
|
+
"jupyterlab": {
|
|
73
|
+
"extension": true,
|
|
74
|
+
"outputDir": "../marimo_jupyter_extension/labextension",
|
|
75
|
+
"schemaDir": "schema"
|
|
76
|
+
}
|
|
77
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_marimo_team_jupyter_extension=self.webpackChunk_marimo_team_jupyter_extension||[]).push([[510],{56(e,t,n){e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},72(e){var t=[];function n(e){for(var n=-1,o=0;o<t.length;o++)if(t[o].identifier===e){n=o;break}return n}function o(e,o){for(var r={},i=[],s=0;s<e.length;s++){var c=e[s],l=o.base?c[0]+o.base:c[0],d=r[l]||0,p="".concat(l," ").concat(d);r[l]=d+1;var m=n(p),u={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==m)t[m].references++,t[m].updater(u);else{var h=a(u,o);o.byIndex=s,t.splice(s,0,{identifier:p,updater:h,references:1})}i.push(p)}return i}function a(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,a){var r=o(e=e||[],a=a||{});return function(e){e=e||[];for(var i=0;i<r.length;i++){var s=n(r[i]);t[s].references--}for(var c=o(e,a),l=0;l<r.length;l++){var d=n(r[l]);0===t[d].references&&(t[d].updater(),t.splice(d,1))}r=c}}},113(e){e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},314(e){e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n="",o=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),o&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),o&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n}).join("")},t.i=function(e,n,o,a,r){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(o)for(var s=0;s<this.length;s++){var c=this[s][0];null!=c&&(i[c]=!0)}for(var l=0;l<e.length;l++){var d=[].concat(e[l]);o&&i[d[0]]||(void 0!==r&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=r),n&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=n):d[2]=n),a&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=a):d[4]="".concat(a)),t.push(d))}},t}},475(e,t,n){n.d(t,{A:()=>s});var o=n(601),a=n.n(o),r=n(314),i=n.n(r)()(a());i.push([e.id,"/* Marimo Widget Styles */\n.jp-MarimoWidget {\n background: var(--jp-layout-color1);\n}\n\n.jp-MarimoWidget iframe {\n width: 100%;\n height: 100%;\n border: none;\n}\n\n/* Marimo Sidebar Styles */\n.jp-MarimoSidebar {\n background: var(--jp-layout-color1);\n min-width: 200px;\n overflow: auto;\n}\n\n.jp-MarimoSidebar-content {\n padding: 12px;\n}\n\n.jp-MarimoSidebar-header {\n margin-bottom: 16px;\n padding-bottom: 8px;\n border-bottom: 1px solid var(--jp-border-color2);\n}\n\n.jp-MarimoSidebar-title {\n font-size: 14px;\n font-weight: 600;\n color: var(--jp-ui-font-color0);\n}\n\n.jp-MarimoSidebar-section {\n margin-bottom: 16px;\n}\n\n.jp-MarimoSidebar-sectionTitle {\n margin-bottom: 8px;\n font-size: 11px;\n font-weight: 600;\n text-transform: uppercase;\n color: var(--jp-ui-font-color2);\n letter-spacing: 0.5px;\n}\n\n/* Status indicator */\n.jp-MarimoSidebar-status {\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 13px;\n color: var(--jp-ui-font-color1);\n}\n\n.jp-MarimoSidebar-statusDot {\n width: 8px;\n height: 8px;\n border-radius: 50%;\n flex-shrink: 0;\n}\n\n.jp-MarimoSidebar-statusDot.jp-mod-ready {\n background: var(--jp-success-color1);\n}\n\n.jp-MarimoSidebar-statusDot.jp-mod-error {\n background: var(--jp-error-color1);\n}\n\n.jp-MarimoSidebar-statusDot.jp-mod-warning {\n background: var(--jp-warn-color1);\n}\n\n/* Action buttons */\n.jp-MarimoSidebar-actions {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.jp-MarimoSidebar-button {\n display: flex;\n align-items: center;\n justify-content: flex-start;\n gap: 8px;\n padding: 8px 12px;\n border: 1px solid var(--jp-border-color1);\n border-radius: 4px;\n background: var(--jp-layout-color2);\n color: var(--jp-ui-font-color0);\n cursor: pointer;\n font-size: 13px;\n font-family: var(--jp-ui-font-family);\n transition: background 0.15s ease;\n}\n\n.jp-MarimoSidebar-button:hover {\n background: var(--jp-layout-color3);\n}\n\n.jp-MarimoSidebar-button:active {\n background: var(--jp-layout-color4);\n}\n\n.jp-MarimoSidebar-buttonIcon {\n font-size: 14px;\n font-weight: bold;\n color: var(--jp-ui-font-color1);\n width: 16px;\n text-align: center;\n}\n\n/* Help section */\n.jp-MarimoSidebar-help {\n font-size: 12px;\n color: var(--jp-ui-font-color2);\n line-height: 1.5;\n}\n\n.jp-MarimoSidebar-help p {\n margin: 0 0 8px 0;\n}\n\n.jp-MarimoSidebar-help p:last-child {\n margin-bottom: 0;\n}\n\n.jp-MarimoSidebar-help code {\n background: var(--jp-layout-color2);\n padding: 1px 4px;\n border-radius: 2px;\n font-family: var(--jp-code-font-family);\n font-size: 11px;\n}\n\n/* Running Sessions section */\n.jp-MarimoSidebar-sectionTitleRow {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 8px;\n}\n\n.jp-MarimoSidebar-refreshButton {\n background: none;\n border: none;\n color: var(--jp-ui-font-color2);\n cursor: pointer;\n font-size: 14px;\n padding: 2px 6px;\n border-radius: 4px;\n}\n\n.jp-MarimoSidebar-refreshButton:hover {\n background: var(--jp-layout-color2);\n color: var(--jp-ui-font-color0);\n}\n\n.jp-MarimoSidebar-sessions {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n\n.jp-MarimoSidebar-sessionItem {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 6px 8px;\n background: var(--jp-layout-color2);\n border-radius: 4px;\n border: 1px solid var(--jp-border-color2);\n}\n\n.jp-MarimoSidebar-sessionInfo {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n}\n\n.jp-MarimoSidebar-sessionName {\n font-size: 12px;\n color: var(--jp-ui-font-color0);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n display: block;\n}\n\n.jp-MarimoSidebar-killButton {\n background: none;\n border: none;\n color: var(--jp-ui-font-color2);\n cursor: pointer;\n font-size: 16px;\n font-weight: bold;\n padding: 0 4px;\n line-height: 1;\n border-radius: 4px;\n flex-shrink: 0;\n}\n\n.jp-MarimoSidebar-killButton:hover {\n background: var(--jp-error-color2);\n color: var(--jp-ui-inverse-font-color0);\n}\n\n.jp-MarimoSidebar-emptyMessage {\n font-size: 12px;\n color: var(--jp-ui-font-color2);\n font-style: italic;\n padding: 8px 0;\n}\n\n/* Server controls */\n.jp-MarimoSidebar-serverControls {\n display: flex;\n gap: 8px;\n margin-top: 8px;\n}\n\n.jp-MarimoSidebar-serverButton {\n flex: 1;\n padding: 4px 8px;\n border: 1px solid var(--jp-border-color1);\n border-radius: 4px;\n background: var(--jp-layout-color2);\n color: var(--jp-ui-font-color1);\n cursor: pointer;\n font-size: 11px;\n font-family: var(--jp-ui-font-family);\n transition: background 0.15s ease, border-color 0.15s ease;\n}\n\n.jp-MarimoSidebar-serverButton:hover {\n background: var(--jp-layout-color3);\n}\n\n.jp-MarimoSidebar-serverButton.jp-mod-restart:hover {\n border-color: var(--jp-brand-color1);\n color: var(--jp-brand-color1);\n}\n\n.jp-MarimoSidebar-serverButton.jp-mod-start {\n width: 100%;\n}\n\n.jp-MarimoSidebar-serverButton.jp-mod-start:hover {\n border-color: var(--jp-success-color1);\n color: var(--jp-success-color1);\n}\n",""]);const s=i},510(e,t,n){n.r(t),n.d(t,{default:()=>z});var o=n(489),a=n(14),r=n(830),i=n(581),s=n(83),c=n(469),l=n(262),d=n(840);const p='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 73.234231 75.653891">\n <g transform="matrix(0.32633463,0,0,0.32633463,-159.18374,-120.45361)">\n <path fill="#1c7361" d="m 517.37109,413.55859 c 1.51172,-1.78125 3.1875,-4.15625 2.10547,-6.26172 6.04688,-3.5625 11.39063,-8.26171 15.76172,-13.76562 -2.375,1.89062 -4.96484,3.40234 -7.71875,4.58984 20.67578,-20.40625 51.76953,-29.6914 80.32422,-23.96875 -22.99609,-0.86328 -46.42188,5.23438 -65.42578,18.19141 -19.05469,12.90234 -33.51953,32.71094 -39.07813,55.05859 8.41797,-24.45312 26.17969,-45.55859 48.85157,-57.97265 -1.78125,1.83593 -3.56641,3.72265 -5.39844,5.55859 8.63672,-3.5625 16.46094,-8.90625 25.04687,-12.63281 25.20703,-11.01172 55.54297,-6.85547 79.02344,7.5039 23.48047,14.35938 40.37891,37.89454 50.20313,63.58985 4.3164,11.22656 7.33984,23.69531 3.50781,35.08594 -0.86328,-14.84375 -5.72266,-29.14844 -12.03906,-42.58985 -10.47266,-22.40234 -25.47657,-43.39844 -46.58204,-56.24609 -21.10546,-12.79297 -49.01562,-16.19531 -70.60546,-4.15625 11.0664,-1.1875 22.23828,-1.83594 33.19531,-0.26953 20.62109,2.91406 39.67578,13.71093 54.14062,28.66015 14.41407,15.00782 24.40235,33.95313 30.28516,53.8711 5.72266,19.48828 7.60937,40.97265 0.26953,59.97265 21.42969,-34.65625 17.86719,-82.91015 -8.3125,-114.05859 -10.95703,-13.00781 -25.15625,-22.99609 -40.48437,-30.22656 -17.70704,-8.3125 -37.14063,-13.11719 -56.67969,-12.57813 -19.53906,0.53906 -39.08203,6.64063 -54.67969,18.40625 12.95313,-11.44531 29.84766,-17.92187 47.01563,-19.70312 17.21875,-1.72657 34.65234,1.08203 51.01171,6.58593 34.00391,11.55079 64.98829,37.03125 74.97657,71.52344 2.53515,8.85156 3.66797,18.02735 4.69531,27.20703 0.86328,7.9336 1.56641,15.86719 1.40234,23.85547 -0.7539,39.46094 -25.96484,78.00391 -62.72265,92.41406 -10.41797,4.05079 -21.42969,6.26172 -32.4961,7.82813 -17.70703,2.48047 -36.05859,3.23828 -53.11718,-2.05078 -8.79688,-2.75391 -17.00391,-7.01953 -24.61329,-12.25391 -31.52343,-21.59375 -51.4414,-59.21484 -51.4414,-97.43359 0,-6.80078 0.59375,-13.54688 1.51172,-20.24219 0.80859,-6.15234 1.88672,-12.25391 3.66797,-18.19141 2.69921,-8.74609 6.91015,-17.0039 12.47265,-24.28906 0.96875,-0.59375 1.94141,-1.24219 2.85938,-1.89062 -12.79297,27.04297 -20.40625,59 -8.69141,86.58203 -4.21094,-17.97266 -4.48047,-36.8125 -0.75391,-54.84375 1.1875,-0.42969 2.375,-0.91406 3.50782,-1.40235 0.0547,-1.1875 0.10547,-2.32031 0.16015,-3.50781 -0.86328,0.97266 -1.67187,1.94141 -2.53515,2.85938 1.99609,-14.30469 8.14843,-27.85157 17.3789,-38.8086 m 8.69141,-0.70312 c 3.34766,-2.26563 6.69531,-4.53516 10.04297,-6.80078 -2.10547,4.26562 -5.99219,7.60937 -10.52735,9.12109 -21.05078,21.75391 -27.53125,54.19531 -25.04687,84.31641 0.97266,11.39062 3.29297,23.21093 10.63281,31.95703 -5.125,-21.05469 -5.39844,-43.29297 -0.69922,-64.45313 0.91797,-0.0547 1.23828,1.13282 1.23828,2.05078 0.37891,14.19922 -2.05078,28.39454 -1.02343,42.58985 1.02343,14.14453 6.3164,29.09765 18.1914,36.8164 9.28516,6.04297 18.51563,12.08985 27.7461,18.13672 -21.59375,-6.91015 -40.4336,-21.91797 -52.08985,-41.34765 3.12891,8.47265 7.5,16.51562 12.89844,23.75 -0.69922,-1.94532 -1.34766,-3.94141 -2.05078,-5.9375 5.45312,5.1289 10.95703,10.14843 16.41016,15.22265 3.99609,3.72266 10.25781,7.5 14.35937,3.9375 0.64844,1.35157 -0.53906,3.02344 -1.99609,3.40235 -1.46094,0.43359 -3.02344,0 -4.48047,-0.4336 6.53125,4.69922 13.33203,9.01563 20.34765,12.95703 -1.02343,0.16016 -1.34765,1.67188 -0.69921,2.53516 0.64453,0.86719 1.72656,1.08203 2.75,1.35156 25.75,5.5586 53.17187,3.50782 77.78515,-5.99218 -21.16015,4.96484 -43.72265,6.10156 -64.23437,-1.07813 -17.32813,-6.04687 -32.4961,-17.97656 -42.42969,-33.35937 -3.18359,-4.96875 -5.82813,-10.20313 -8.25781,-15.54688 -7.82813,-17.59766 -12.79297,-36.8125 -11.39063,-56.03125 1.40625,-19.21484 9.82422,-38.37891 24.94141,-50.25391 1.5625,-1.24218 3.50781,-2.42968 5.44922,-1.94531 -14.89844,10.79688 -23.75,28.66406 -26.07032,46.91016 -2.32031,18.29687 1.45704,36.86719 8.09766,54.03125 4.75,12.14844 11.0625,23.91406 19.75391,33.6289 3.72656,4.15625 7.9375,7.9375 12.73828,10.79688 8.80078,5.28906 19.21875,7.28906 29.42187,8.58203 13.8711,1.78125 27.85157,2.53906 41.83203,2.21484 -17.65234,4.15625 -36.11328,1.1875 -53.98046,-1.78125 30.33984,11.39063 65.91015,4.42579 91.98437,-14.73828 5.17969,-3.83203 10.09375,-8.09375 14.03125,-13.22265 6.04688,-7.88282 9.66406,-17.48828 11.5,-27.26172 4.75,-25.47656 -2.05078,-52.08985 -14.41406,-74.92188 -8.58203,-15.87109 -19.97266,-30.55078 -34.97656,-40.53906 -14.03516,-9.28516 -30.71485,-14.19531 -47.50391,-15.11328 -25.80078,-1.51172 -53.11328,7.01562 -70.28125,26.44922 m 576.75,588.17969 c 11.60547,2.91406 23.32031,5.01953 35.19531,6.42578 -14.57422,3.34375 -29.58203,-1.78125 -43.66797,-6.80078 -8.3164,-2.91797 -16.73437,-5.94141 -24.45312,-10.25782 -18.67969,-10.36328 -32.71485,-28.125 -40.86328,-47.8789 -1.40235,-3.50781 -2.69922,-7.01953 -3.77735,-10.58203 -0.10937,-0.42969 -0.43359,0.59375 0,0.3789 0.42969,-0.16015 0.375,-0.80859 0.16016,-1.24218 -4.85938,-11.71094 -7.82813,-24.28907 -8.74609,-36.92188 -0.91797,19.10938 3.83203,38.32422 12.46875,55.4375 9.39453,18.62109 23.48437,34.98047 41.1875,46.04297 17.65234,11.06641 38.91796,16.67969 59.64843,14.68359 29.14844,-2.85937 54.73438,-19.86328 78.21485,-37.30078 -10.36328,13.71094 -26.07032,22.1875 -41.34766,30.17578 26.39453,-7.39453 47.55469,-28.28515 60.29688,-52.57422 -6.31641,10.79297 -16.19532,19.26954 -26.9375,25.63672 -10.79688,6.3711 -22.61719,10.79688 -34.4375,15.0625 -5.1836,1.89063 -10.41797,3.72266 -15.76172,5.23438 -15.27735,4.375 -31.36328,5.88672 -47.17969,4.48047 m 107.95703,-36.48828 c 2.69922,-2.53907 5.34766,-5.12891 7.50391,-8.04297 3.40234,-4.69532 5.66797,-10.14844 7.82812,-15.54688 2.91406,-7.33984 5.88281,-14.73828 6.64063,-22.61719 -1.40625,1.24219 -1.89063,3.07813 -2.42969,4.85938 -7.17969,24.88281 -24.9375,46.58203 -47.98828,58.45703 10.85156,-2.42969 20.1875,-9.5 28.44531,-17.10937 m -131.92187,26.44921 c 1.13281,0.26954 2.53515,0.75391 2.58984,1.89063 0.42969,-0.75781 1.72656,-0.75781 2.21094,0 0.21875,-0.0547 0.0547,-0.43359 -0.21485,-0.54297 -1.61718,-0.86328 -3.23828,-1.72656 -4.80468,-2.58984 -6.53125,-3.50782 -12.52344,-7.87891 -17.86719,-12.95313 -0.64844,1.40235 -0.16016,3.1836 1.08203,4.04688 2.375,1.72656 4.75,3.45312 7.125,5.18359 2.85937,2.375 6.26172,4.10156 9.87891,4.96484 m 155.89062,-81.61718 c -0.21484,3.99609 -0.43359,8.04297 -0.70312,12.03906 -0.0508,0.53906 -0.0508,1.07812 -0.0508,1.61719 -0.0547,0.97265 -0.10937,1.94531 -0.21875,2.86328 -0.0547,1.1875 -0.10546,2.26562 -0.10546,3.45312 2.26562,-9.17578 3.07421,-18.78515 2.375,-28.17578 -0.26954,-0.10937 -0.54297,-0.26953 -0.75782,-0.43359 -0.16015,2.85937 -0.3789,5.72265 -0.53906,8.63672 m -209.8164,-59.16016 c -0.3789,0.69922 -0.70312,1.40234 -1.02734,2.10547 0.37891,0.48437 1.07813,-0.10938 1.24219,-0.70313 0.16015,-0.53906 0.32422,-1.29687 0.91797,-1.34765 -0.26953,-0.27344 -0.53907,-0.54297 -0.8086,-0.8125 -0.10937,0.21875 -0.21875,0.53906 -0.10937,0.75781 m 39.02734,-44.80469 c 0.53906,-0.42968 1.07813,-0.86328 1.61719,-1.34765 -0.91797,-0.37891 -2.10547,0.10547 -2.48047,1.07812 0.26953,0.10938 0.53906,0.21485 0.86328,0.26953 m 1.67188,-2.53515 c 1.1875,0.26953 2.53906,-0.0547 3.50781,-0.86328 -1.23828,-0.0547 -2.48047,0.21484 -3.50781,0.86328 m -42.96485,54.78906 c -0.0547,-0.26953 -0.10937,-0.53906 -0.10937,-0.75781 -1.02735,0.3789 -1.51172,1.78125 -0.91797,2.69922 0.21484,-0.69922 0.53906,-1.34766 1.02734,-1.94141 m -6.10156,27.52734 c -0.26953,0.37891 -0.0547,1.02735 0.43359,1.08203 0.26954,-0.86328 0.21485,-1.78125 -0.0547,-2.69921 -0.53907,0.26953 -0.70313,1.02343 -0.37891,1.51171"/>\n <path fill="#1c7361" d="m 527.08984,398.39062 c 0.10547,0.16016 0.21485,0.375 0.32422,0.53907 -0.48828,0.69922 -1.40625,1.02343 -2.21484,0.80859 0.43359,-0.59375 1.08203,-1.02344 1.78125,-1.1875"/>\n <path fill="#1c7361" d="m 522.82422,401.84375 c 0.75781,-0.26953 1.5664,-0.43359 2.375,-0.37891 -0.16016,1.1875 -2.16016,1.51172 -2.64453,0.37891"/>\n <path fill="#1c7361" d="m 520.125,399.35937 c 0.48828,-0.7539 1.40234,-1.29296 2.375,-1.1875 0.21484,0.54297 0.0547,1.1875 -0.37891,1.56641 -0.7539,0.10938 -1.67187,0.21484 -2.21093,-0.37891"/>\n <path fill="#1c7361" d="m 671.42969,402.92187 c 0.32422,-0.0508 0.64843,0.26954 0.59375,0.59375 -0.0547,0.32422 -0.42969,0.54297 -0.75391,0.4336 -0.48828,-0.53906 -0.97266,-1.13281 -1.45703,-1.72656 0.53906,-0.4336 1.50781,-0.0547 1.61719,0.59375"/>\n <path fill="#1c7361" d="m 524.98437,394.93359 c 0.37891,-0.42968 1.13282,-0.42968 1.56641,-0.0547 -0.70312,0.70312 -1.62109,1.1875 -2.59375,1.51171 -0.10547,-0.59375 0.43359,-1.29296 1.02734,-1.24218"/>\n <path fill="#1c7361" d="m 516.13281,445.13672 c 0.48438,-0.70313 1.78125,-0.4336 1.94141,0.42969 -0.64844,-0.10547 -1.34766,0.10937 -1.78125,0.59375 -0.26953,0.10937 -0.70313,-0.10547 -0.70313,-0.42969 -0.0508,-0.26953 0.27344,-0.59375 0.59375,-0.54297"/>\n <path fill="#1c7361" d="m 547.00781,410.58984 c 0.26953,-0.10937 0.64844,-0.21875 0.91797,-0.10937 0.32422,0.10937 0.48438,0.59375 0.26953,0.80859 -1.02734,0.64844 -2.21484,1.02735 -3.40234,1.08203 0.54297,-0.75781 1.35156,-1.35156 2.21484,-1.78125"/>\n <path fill="#1c7361" d="m 562.92969,579.27344 c 0.54297,0.3789 1.13672,0.75781 1.67578,1.13281 -1.1875,0.48828 -2.58985,0.21875 -3.5625,-0.64453 -0.21485,-0.37891 0.21484,-0.91797 0.59375,-0.91797 0.48437,-0.0547 0.91797,0.21484 1.29297,0.42969"/>\n <path fill="#1c7361" d="m 538.26172,405.62109 c -0.26953,-0.80859 -0.0547,-1.78125 0.59375,-2.375 0.43359,-0.10547 0.86328,-0.42968 1.02734,-0.91797 0.69922,0.26954 1.34766,0.54297 2.05078,0.8125 -1.1875,0.8086 -2.42968,1.61719 -3.67187,2.48047"/>\n <path fill="#1c7361" d="m 511.92187,463.59766 c 0,-0.32422 0,-0.64844 0,-0.97266 0.53907,-0.26953 1.13282,-0.26953 1.61719,-0.0547 -0.96875,1.02735 -1.51172,2.42969 -1.40234,3.83203 -0.59375,-0.42968 -1.24219,-0.91797 -1.89063,-1.34765 0.54297,-0.4336 1.13672,-0.91797 1.73047,-1.40625"/>\n <path fill="#1c7361" d="m 508.35937,415.93359 c 0.21485,-1.67578 1.1875,-3.1875 2.53516,-4.21093 0.37891,-0.26954 0.97266,-0.4336 1.1875,-0.0547 -1.1875,1.1875 -2.16016,2.53515 -2.85937,4.04687 -0.16407,0.27344 -0.59375,0.4336 -0.86329,0.21875"/>\n <path fill="#1c7361" d="m 513.91797,449.39844 c 1.07812,-0.8086 2.10547,-1.61719 3.18359,-2.42969 -0.26953,1.02734 -0.53906,1.94531 -0.80859,2.96875 -0.37891,0.21875 -0.64844,0.59766 -1.02344,0.8125 -0.37891,0.21484 -0.91797,0.26953 -1.1875,-0.10938 -0.21875,-0.3789 0.375,-0.91796 0.59375,-0.53906 -0.21875,-0.21484 -0.48828,-0.43359 -0.75781,-0.70312"/>\n <path fill="#1c7361" d="m 555.05078,407.56641 c -0.10937,0.26953 -0.21484,0.53906 -0.10937,0.86328 -0.86329,0.16015 -1.67188,0.32422 -2.42969,0.48437 -0.10547,0.32422 -0.21485,0.64844 -0.32031,0.97266 -0.64844,-0.0547 -1.29688,-0.0547 -1.89063,-0.0547 -0.53906,-0.26953 0,-1.02344 0.53906,-1.29297 1.07813,-0.54297 2.21485,-0.86719 3.40235,-1.02734 -0.16407,-0.26953 -0.32422,-0.48438 -0.48828,-0.75391 0.86328,-0.70312 1.89062,-1.1875 3.02343,-1.51172 0.21485,0.375 0.26953,0.8086 0.16407,1.23828 -0.37891,0.16407 -0.75782,0.21875 -1.13672,0.10938 0.0547,0.26953 0.10937,0.53906 0.16406,0.86328 -0.37891,0.10938 -0.64844,0.16406 -0.91797,0.10938"/>\n <path fill="#1c7361" d="m 512.83984,412.64062 c 0.42969,-0.26953 1.02344,-0.3789 1.51172,-0.26953 -0.21875,-0.26953 -0.3789,-0.54297 -0.54297,-0.8125 0.54297,-0.10547 1.08203,-0.21484 1.67578,-0.26953 0.21485,-0.53906 0.21485,-1.1875 0,-1.72656 0.59375,-0.0547 1.24219,0.0547 1.78125,0.26953 0.16016,0.21484 0.21485,0.53906 0.16016,0.80859 -0.26953,0.10938 -0.59375,0.21875 -0.91797,0.32422 -0.10547,0.54297 -0.26953,1.08203 -0.375,1.6211 -0.26953,0.16015 -0.70312,0.21484 -1.02734,0.10937 -0.48438,2.91406 -3.67188,4.58594 -4.80469,7.28516 -0.37891,0.91797 -0.75391,2.10547 -1.72656,2.10547 -0.26953,-0.32422 -0.21485,-0.91797 0.16015,-1.1875 -0.375,-0.10938 -0.69921,-0.21485 -1.02343,-0.32422 -0.0547,-0.59375 0.91797,-0.42969 1.40234,-0.0547 0.43359,-0.375 0.0547,-1.24219 -0.48437,-1.24219 0.59375,-0.48437 0.97265,-1.23828 1.07812,-1.99609 0.59375,0.0547 1.1875,-0.16016 1.56641,-0.59375 -0.4336,0.10937 -0.91797,-0.21484 -1.02735,-0.69922 0.86328,0.16016 1.73047,-0.64844 1.67578,-1.51172 0.64844,-0.3789 1.29297,-0.75781 1.94141,-1.13672 -0.26953,-0.16015 -0.64844,-0.42968 -1.02344,-0.69922"/>\n <path fill="#1c7361" d="m 682.38672,415.5 c -1.1875,-1.61719 -2.42969,-3.18359 -3.9375,-4.53516 -2.10547,-1.88672 -4.80469,-3.5625 -5.23828,-6.36718 12.6875,10.74218 22.45703,24.9375 27.90625,40.64453 0.48828,0.43359 -0.0508,1.40625 -0.64453,1.24218 -4.75,-10.95703 -10.85157,-21.42968 -18.08594,-30.98437"/>\n <path fill="#1c7361" d="m 539.88281,406.97266 c 2.21094,-1.78125 4.75,-3.45704 5.66797,-6.15625 0.26953,-0.75391 1.02344,-1.34766 1.72656,-1.78125 10.90235,-6.85547 23.64453,-10.63282 36.48828,-10.84766 -6.42187,1.72656 -12.79296,3.39844 -19.21484,5.12891 -9.98437,2.64453 -17.32812,10.90234 -24.07422,18.78515 -5.83203,6.85547 -11.71484,13.71094 -17.54297,20.61719 -0.70312,1.89062 -1.35156,3.83203 -2.05078,5.72266 -0.26953,0.86328 -0.59375,1.72656 -1.35156,2.26562 -0.69922,0.54297 -1.88672,0.54297 -2.32031,-0.26953 2.58984,-4.53125 5.18359,-9.12109 7.82812,-13.71094 4.21094,-7.125 8.41797,-14.46484 14.84375,-19.7539"/>\n </g>\n</svg>\n',m=new d.LabIcon({name:"@marimo-team/jupyter-extension:marimo",svgstr:p}),u=`data:image/svg+xml,${encodeURIComponent(p)}`,h='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">\n <text x="50" y="75" font-size="80" text-anchor="middle" font-family="Apple Color Emoji, Segoe UI Emoji, Noto Color Emoji, sans-serif">🍃</text>\n</svg>',f=new d.LabIcon({name:"@marimo-team/jupyter-extension:leaf",svgstr:h}),v=`data:image/svg+xml,${encodeURIComponent(h)}`,b=new Map;function g(e,t={}){const{filePath:n,label:o}=t,r=new a.IFrame({sandbox:["allow-same-origin","allow-scripts","allow-forms","allow-modals","allow-popups","allow-downloads"]}),i=n?null:`__new__${l.UUID.uuid4()}`,s=n?e:`${e}?file=${i}`;r.url=s,r.addClass("jp-MarimoWidget");const c=new a.MainAreaWidget({content:r});if(c.id=`marimo-${l.UUID.uuid4()}`,o)c.title.label=o;else if(n){const e=n.split("/");c.title.label=e[e.length-1]||"marimo"}else c.title.label="marimo";return c.title.closable=!0,c.title.icon=f,c.title.caption=n?`marimo: ${n}`:"marimo Editor",i&&(b.set(i,c),c.disposed.connect(()=>{b.delete(i)})),c}var S=n(247);class j extends S.Widget{constructor(e){super(),this._sessionsContainer=null,this._refreshInterval=null,this._statusDot=null,this._statusText=null,this._serverControlsContainer=null,this._startServerContainer=null,this._commands=e,this.id="marimo-sidebar",this.addClass("jp-MarimoSidebar"),this.title.icon=m,this.title.caption="marimo",this._buildUI(),this._startPolling()}dispose(){null!==this._refreshInterval&&window.clearInterval(this._refreshInterval),super.dispose()}_getMarimoBaseUrl(){return`${c.PageConfig.getBaseUrl()}marimo/`}_startPolling(){this._refreshStatus(),this._refreshInterval=window.setInterval(()=>{this._refreshStatus()},5e3)}async _refreshStatus(){const e=await this._checkServerStatus();this._updateServerStatus(e),e?await this._refreshSessions():this._updateSessionsList([])}async _refreshSessions(){try{const e=this._getMarimoBaseUrl(),t=await fetch(`${e}api/home/running_notebooks`,{method:"POST",credentials:"same-origin"});if(t.ok){const e=(await t.json()).files??[];this._updateSessionsList(e),function(e){for(const t of e){const e=b.get(t.initializationId);e&&t.name&&t.path&&e.title.label!==t.name&&(e.title.label=t.name,e.title.caption=`marimo: ${t.path}`)}}(e)}}catch{}}async _shutdownSession(e){try{const t=this._getMarimoBaseUrl();(await fetch(`${t}api/home/shutdown_session`,{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:e})})).ok&&await this._refreshSessions()}catch{}}async _isServerHealthy(){try{const e=this._getMarimoBaseUrl(),t=await fetch(`${e}health`,{method:"GET",credentials:"same-origin"});return!!t.ok&&"healthy"===(await t.json()).status}catch{return!1}}async _checkServerStatus(){return this._isServerHealthy()}_updateServerStatus(e){this._statusDot&&this._statusText&&(e?(this._statusDot.className="jp-MarimoSidebar-statusDot jp-mod-ready",this._statusText.textContent="Running"):(this._statusDot.className="jp-MarimoSidebar-statusDot jp-mod-error",this._statusText.textContent="Stopped")),this._serverControlsContainer&&(this._serverControlsContainer.style.display=e?"flex":"none"),this._startServerContainer&&(this._startServerContainer.style.display=e?"none":"flex")}async _startServer(){this._statusText&&(this._statusText.textContent="Starting...");try{const e=15;for(let t=0;t<e;t++){if(await this._isServerHealthy())return this._updateServerStatus(!0),void await this._refreshSessions();await new Promise(e=>setTimeout(e,1e3))}this._updateServerStatus(!1)}catch{this._updateServerStatus(!1)}}async _restartServer(){if(window.confirm("Are you sure you want to restart the marimo server? All running sessions will be interrupted.")){this._statusText&&(this._statusText.textContent="Restarting..."),this._statusDot&&(this._statusDot.className="jp-MarimoSidebar-statusDot jp-mod-warning"),this._updateSessionsList([]);try{const e=c.PageConfig.getBaseUrl();if(!(await fetch(`${e}marimo-tools/restart`,{method:"POST",credentials:"same-origin"})).ok)throw new Error("Restart request failed");await this._waitForServer()}catch{this._updateServerStatus(!1)}}}async _waitForServer(){for(let e=0;e<20;e++)if(await new Promise(e=>setTimeout(e,1e3)),await this._isServerHealthy())return this._updateServerStatus(!0),void await this._refreshSessions();this._updateServerStatus(!1)}_updateSessionsList(e){if(this._sessionsContainer){if(this._sessionsContainer.innerHTML="",0===e.length){const e=document.createElement("div");return e.className="jp-MarimoSidebar-emptyMessage",e.textContent="No running sessions",void this._sessionsContainer.appendChild(e)}for(const t of e){const e=document.createElement("div");e.className="jp-MarimoSidebar-sessionItem";const n=document.createElement("div");n.className="jp-MarimoSidebar-sessionInfo";const o=document.createElement("span");o.className="jp-MarimoSidebar-sessionName",o.textContent=t.name,o.title=t.path,n.appendChild(o);const a=document.createElement("button");a.className="jp-MarimoSidebar-killButton",a.innerHTML="×",a.title="Shutdown session",a.addEventListener("click",()=>{this._shutdownSession(t.sessionId)}),e.appendChild(n),e.appendChild(a),this._sessionsContainer.appendChild(e)}}}_buildUI(){const e=document.createElement("div");e.className="jp-MarimoSidebar-content";const t=document.createElement("div");t.className="jp-MarimoSidebar-header",t.innerHTML='<span class="jp-MarimoSidebar-title">marimo</span>',e.appendChild(t);const n=document.createElement("div");n.className="jp-MarimoSidebar-section";const o=document.createElement("div");o.className="jp-MarimoSidebar-sectionTitle",o.textContent="Server Status",n.appendChild(o);const a=document.createElement("div");a.className="jp-MarimoSidebar-status",this._statusDot=document.createElement("span"),this._statusDot.className="jp-MarimoSidebar-statusDot jp-mod-ready",a.appendChild(this._statusDot),this._statusText=document.createElement("span"),this._statusText.textContent="Running",a.appendChild(this._statusText),n.appendChild(a),this._serverControlsContainer=document.createElement("div"),this._serverControlsContainer.className="jp-MarimoSidebar-serverControls";const r=document.createElement("button");r.className="jp-MarimoSidebar-serverButton jp-mod-restart",r.innerHTML="↻ Restart",r.title="Restart the marimo server",r.addEventListener("click",()=>{this._restartServer()}),this._serverControlsContainer.appendChild(r),n.appendChild(this._serverControlsContainer),this._startServerContainer=document.createElement("div"),this._startServerContainer.className="jp-MarimoSidebar-serverControls",this._startServerContainer.style.display="none";const i=document.createElement("button");i.className="jp-MarimoSidebar-serverButton jp-mod-start",i.innerHTML="▶ Start Server",i.title="Start the marimo server",i.addEventListener("click",()=>{this._startServer()}),this._startServerContainer.appendChild(i),n.appendChild(this._startServerContainer),e.appendChild(n);const s=document.createElement("div");s.className="jp-MarimoSidebar-section";const c=document.createElement("div");c.className="jp-MarimoSidebar-sectionTitleRow";const l=document.createElement("div");l.className="jp-MarimoSidebar-sectionTitle",l.textContent="Running Sessions",c.appendChild(l);const d=document.createElement("button");d.className="jp-MarimoSidebar-refreshButton",d.innerHTML="↻",d.title="Refresh sessions",d.addEventListener("click",()=>{this._refreshSessions()}),c.appendChild(d),s.appendChild(c),this._sessionsContainer=document.createElement("div"),this._sessionsContainer.className="jp-MarimoSidebar-sessions",s.appendChild(this._sessionsContainer),e.appendChild(s);const p=document.createElement("div");p.className="jp-MarimoSidebar-section";const m=document.createElement("div");m.className="jp-MarimoSidebar-sectionTitle",m.textContent="Quick Actions",p.appendChild(m);const u=document.createElement("div");u.className="jp-MarimoSidebar-actions";const h=document.createElement("button");h.className="jp-MarimoSidebar-button",h.innerHTML='<span class="jp-MarimoSidebar-buttonIcon">+</span> New Notebook',h.addEventListener("click",()=>{this._commands.execute("marimo:new-notebook")}),u.appendChild(h);const f=document.createElement("button");f.className="jp-MarimoSidebar-button",f.innerHTML='<span class="jp-MarimoSidebar-buttonIcon">↗</span> Open Editor',f.addEventListener("click",()=>{this._commands.execute("marimo:open-editor")}),u.appendChild(f),p.appendChild(u),e.appendChild(p);const v=document.createElement("div");v.className="jp-MarimoSidebar-section",v.innerHTML='\n <div class="jp-MarimoSidebar-sectionTitle">Help</div>\n <div class="jp-MarimoSidebar-help">\n <p>Right-click on <code>.py</code> files to open them with marimo.</p>\n <p>Right-click on <code>.ipynb</code> files to convert them to marimo format.</p>\n </div>\n ',e.appendChild(v),this.node.appendChild(e)}}var x=n(19);class y extends x.DocumentWidget{}class w extends x.ABCWidgetFactory{createNewWidget(e){const t=`${c.PageConfig.getBaseUrl()}marimo/`,n=e.path,o=new a.IFrame({sandbox:["allow-same-origin","allow-scripts","allow-forms","allow-modals","allow-popups","allow-downloads"]});o.url=`${t}?file=${encodeURIComponent(n)}`,o.addClass("jp-MarimoWidget");const r=new y({content:o,context:e});return r.title.icon=f,r.title.caption=`marimo: ${n}`,r}}var C=n(72),_=n.n(C),M=n(825),k=n.n(M),N=n(659),I=n.n(N),E=n(56),T=n.n(E),B=n(540),$=n.n(B),L=n(113),D=n.n(L),U=n(475),R={};R.styleTagTransform=D(),R.setAttributes=T(),R.insert=I().bind(null,"head"),R.domAPI=k(),R.insertStyleElement=$(),_()(U.A,R),U.A&&U.A.locals&&U.A.locals;const P="marimo:open-file",A="marimo:convert-notebook",H="marimo:new-notebook",W="marimo:open-editor";function O(e){const t=e.tracker.currentWidget;if(!t)return null;const n=t.selectedItems().next();return n.done||!n.value?null:n.value.path}const z={id:"@marimo-team/jupyter-extension:plugin",description:"JupyterLab extension for marimo notebook integration",autoStart:!0,requires:[i.IFileBrowserFactory],optional:[s.ILauncher,o.ILayoutRestorer],activate:(e,t,n,o)=>{const{commands:i,shell:s}=e,l=`${c.PageConfig.getBaseUrl()}marimo/`;i.addCommand(P,{label:"Edit with marimo",caption:"Edit this Python file in the marimo editor",icon:m,isVisible:()=>{const e=O(t);return null!==e&&function(e){return e.endsWith(".py")}(e)},execute:()=>{const e=O(t);if(!e)return;const n=g(`${l}?file=${encodeURIComponent(e)}`,{filePath:e});s.add(n,"main"),s.activateById(n.id)}}),i.addCommand(A,{label:"Convert to marimo",caption:"Convert this Jupyter notebook to marimo format",icon:m,isVisible:()=>{const e=O(t);return null!==e&&function(e){return e.endsWith(".ipynb")}(e)},execute:async()=>{const e=O(t);if(!e)return;const n=e.replace(/\.ipynb$/,".py"),o=await a.InputDialog.getText({title:"Convert to marimo",label:"Output filename:",text:n});if(!o.button.accept||!o.value)return;const i=o.value;try{const n=r.ServerConnection.makeSettings(),o=await r.ServerConnection.makeRequest(`${n.baseUrl}marimo-tools/convert`,{method:"POST",body:JSON.stringify({input:e,output:i})},n),a=await o.json();if(!o.ok||!a.success)throw new Error(a.error??"Conversion failed");const c=t.tracker.currentWidget;c&&await c.model.refresh();const d=g(`${l}?file=${encodeURIComponent(i)}`,{filePath:i});s.add(d,"main"),s.activateById(d.id)}catch(e){(0,a.showErrorMessage)("Conversion failed",`Failed to convert notebook: ${e}`)}}}),i.addCommand(H,{label:"New marimo Notebook",caption:"Create a new marimo notebook",execute:async()=>{try{const e=await r.KernelSpecAPI.getSpecs(),n=[];if(e?.kernelspecs)for(const[t,o]of Object.entries(e.kernelspecs)){if(!o)continue;const e=o.argv??[];if(e.length>0){const a=e[0];if(!a.includes("/")&&!a.includes("\\"))continue;n.push({name:t,displayName:o.display_name??t,argv:e})}}if(0===n.length){const e=g(l,{label:"New Notebook"});return s.add(e,"main"),void s.activateById(e.id)}const o=["Default (no venv)",...n.map(e=>e.displayName)],i=await a.InputDialog.getItem({title:"Select Python Environment",label:"Kernel:",items:o,current:0});if(!i.button.accept||null===i.value)return;if("Default (no venv)"===i.value){const e=g(l,{label:"New Notebook"});return s.add(e,"main"),void s.activateById(e.id)}const c=n.find(e=>e.displayName===i.value),d=c?.argv[0],p=await a.InputDialog.getText({title:"New marimo Notebook",label:"Notebook name:",text:"untitled.py"});if(!p.button.accept||!p.value)return;let m=p.value;m.endsWith(".py")||(m+=".py");const u=t.tracker.currentWidget,h=u?.model.path||"",f=h?`${h}/${m}`:m,v=r.ServerConnection.makeSettings(),b=await r.ServerConnection.makeRequest(`${v.baseUrl}marimo-tools/create-stub`,{method:"POST",body:JSON.stringify({path:f,venv:d})},v),S=await b.json();if(!b.ok||!S.success)throw new Error(S.error??"Failed to create notebook");u&&await u.model.refresh();const j=g(`${l}?file=${encodeURIComponent(f)}`,{filePath:f});s.add(j,"main"),s.activateById(j.id)}catch{const e=g(l,{label:"New Notebook"});s.add(e,"main"),s.activateById(e.id)}}}),i.addCommand(W,{label:"Open marimo Editor",caption:"Open the marimo editor in a new tab",icon:m,execute:()=>{window.open(l,"_blank")}}),e.contextMenu.addItem({command:P,selector:'.jp-DirListing-item[data-isdir="false"]',rank:50}),e.contextMenu.addItem({command:A,selector:'.jp-DirListing-item[data-isdir="false"]',rank:51}),n&&(n.add({command:H,category:"Notebook",rank:3,kernelIconUrl:v}),n.add({command:W,category:"Other",rank:1,kernelIconUrl:u}));const d=new j(i);s.add(d,"left",{rank:200}),o&&o.add(d,"marimo-sidebar");const p=new w({name:"marimo",fileTypes:["python"],defaultFor:[]});e.docRegistry.addWidgetFactory(p)}}},540(e){e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},601(e){e.exports=function(e){return e[1]}},659(e){var t={};e.exports=function(e,n){var o=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(n)}},825(e){e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var o="";n.supports&&(o+="@supports (".concat(n.supports,") {")),n.media&&(o+="@media ".concat(n.media," {"));var a=void 0!==n.layer;a&&(o+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),o+=n.css,a&&(o+="}"),n.media&&(o+="}"),n.supports&&(o+="}");var r=n.sourceMap;r&&"undefined"!=typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),t.styleTagTransform(o,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var _JUPYTERLAB;(()=>{"use strict";var e,r,t,n,o,a,i,u,l,s,f,d,p,c,h,v,m,b,y,g,j,w,S,x,k={321(e,r,t){var n={"./index":()=>t.e(510).then(()=>()=>t(510)),"./extension":()=>t.e(510).then(()=>()=>t(510))},o=(e,r)=>(t.R=r,r=t.o(n,e)?n[e]():Promise.resolve().then(()=>{throw new Error('Module "'+e+'" does not exist in container.')}),t.R=void 0,r),a=(e,r)=>{if(t.S){var n="default",o=t.S[n];if(o&&o!==e)throw new Error("Container initialization failed as it has already been initialized with a different share scope");return t.S[n]=e,t.I(n,r)}};t.d(r,{get:()=>o,init:()=>a})}},E={};function _(e){var r=E[e];if(void 0!==r)return r.exports;var t=E[e]={id:e,exports:{}};return k[e](t,t.exports,_),t.exports}_.m=k,_.c=E,_.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return _.d(r,{a:r}),r},_.d=(e,r)=>{for(var t in r)_.o(r,t)&&!_.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},_.f={},_.e=e=>Promise.all(Object.keys(_.f).reduce((r,t)=>(_.f[t](e,r),r),[])),_.u=e=>e+".5a6289689ce7a0453fc4.js?v=5a6289689ce7a0453fc4",_.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),_.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),e={},r="@marimo-team/jupyter-extension:",_.l=(t,n,o,a)=>{if(e[t])e[t].push(n);else{var i,u;if(void 0!==o)for(var l=document.getElementsByTagName("script"),s=0;s<l.length;s++){var f=l[s];if(f.getAttribute("src")==t||f.getAttribute("data-webpack")==r+o){i=f;break}}i||(u=!0,(i=document.createElement("script")).charset="utf-8",_.nc&&i.setAttribute("nonce",_.nc),i.setAttribute("data-webpack",r+o),i.src=t),e[t]=[n];var d=(r,n)=>{i.onerror=i.onload=null,clearTimeout(p);var o=e[t];if(delete e[t],i.parentNode&&i.parentNode.removeChild(i),o&&o.forEach(e=>e(n)),r)return r(n)},p=setTimeout(d.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=d.bind(null,i.onerror),i.onload=d.bind(null,i.onload),u&&document.head.appendChild(i)}},_.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{_.S={};var e={},r={};_.I=(t,n)=>{n||(n=[]);var o=r[t];if(o||(o=r[t]={}),!(n.indexOf(o)>=0)){if(n.push(o),e[t])return e[t];_.o(_.S,t)||(_.S[t]={});var a=_.S[t],i="@marimo-team/jupyter-extension",u=[];return"default"===t&&((e,r,t,n)=>{var o=a[e]=a[e]||{},u=o[r];(!u||!u.loaded&&(1!=!u.eager?n:i>u.from))&&(o[r]={get:()=>_.e(510).then(()=>()=>_(510)),from:i,eager:!1})})("@marimo-team/jupyter-extension","0.1.0"),e[t]=u.length?Promise.all(u).then(()=>e[t]=1):1}}})(),(()=>{var e;_.g.importScripts&&(e=_.g.location+"");var r=_.g.document;if(!e&&r&&(r.currentScript&&"SCRIPT"===r.currentScript.tagName.toUpperCase()&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");if(t.length)for(var n=t.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=t[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),_.p=e})(),t=e=>{var r=e=>e.split(".").map(e=>+e==e?+e:e),t=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(e),n=t[1]?r(t[1]):[];return t[2]&&(n.length++,n.push.apply(n,r(t[2]))),t[3]&&(n.push([]),n.push.apply(n,r(t[3]))),n},n=(e,r)=>{e=t(e),r=t(r);for(var n=0;;){if(n>=e.length)return n<r.length&&"u"!=(typeof r[n])[0];var o=e[n],a=(typeof o)[0];if(n>=r.length)return"u"==a;var i=r[n],u=(typeof i)[0];if(a!=u)return"o"==a&&"n"==u||"s"==u||"u"==a;if("o"!=a&&"u"!=a&&o!=i)return o<i;n++}},o=e=>{var r=e[0],t="";if(1===e.length)return"*";if(r+.5){t+=0==r?">=":-1==r?"<":1==r?"^":2==r?"~":r>0?"=":"!=";for(var n=1,a=1;a<e.length;a++)n--,t+="u"==(typeof(u=e[a]))[0]?"-":(n>0?".":"")+(n=2,u);return t}var i=[];for(a=1;a<e.length;a++){var u=e[a];i.push(0===u?"not("+l()+")":1===u?"("+l()+" || "+l()+")":2===u?i.pop()+" "+i.pop():o(u))}return l();function l(){return i.pop().replace(/^\((.+)\)$/,"$1")}},a=(e,r)=>{if(0 in e){r=t(r);var n=e[0],o=n<0;o&&(n=-n-1);for(var i=0,u=1,l=!0;;u++,i++){var s,f,d=u<e.length?(typeof e[u])[0]:"";if(i>=r.length||"o"==(f=(typeof(s=r[i]))[0]))return!l||("u"==d?u>n&&!o:""==d!=o);if("u"==f){if(!l||"u"!=d)return!1}else if(l)if(d==f)if(u<=n){if(s!=e[u])return!1}else{if(o?s>e[u]:s<e[u])return!1;s!=e[u]&&(l=!1)}else if("s"!=d&&"n"!=d){if(o||u<=n)return!1;l=!1,u--}else{if(u<=n||f<d!=o)return!1;l=!1}else"s"!=d&&"n"!=d&&(l=!1,u--)}}var p=[],c=p.pop.bind(p);for(i=1;i<e.length;i++){var h=e[i];p.push(1==h?c()|c():2==h?c()&c():h?a(h,r):!c())}return!!c()},i=(e,r)=>e&&_.o(e,r),u=e=>(e.loaded=1,e.get()),l=e=>Object.keys(e).reduce((r,t)=>(e[t].eager&&(r[t]=e[t]),r),{}),s=(e,r,t)=>{var o=t?l(e[r]):e[r];return(r=Object.keys(o).reduce((e,r)=>!e||n(e,r)?r:e,0))&&o[r]},f=(e,r,t,o)=>{var i=o?l(e[r]):e[r];return(r=Object.keys(i).reduce((e,r)=>!a(t,r)||e&&!n(e,r)?e:r,0))&&i[r]},d=(e,r,t)=>{var o=t?l(e[r]):e[r];return Object.keys(o).reduce((e,r)=>!e||!o[e].loaded&&n(e,r)?r:e,0)},p=(e,r,t,n)=>"Unsatisfied version "+t+" from "+(t&&e[r][t].from)+" of shared singleton module "+r+" (required "+o(n)+")",c=(e,r,t,n,a)=>{var i=e[t];return"No satisfying version ("+o(n)+")"+(a?" for eager consumption":"")+" of shared module "+t+" found in shared scope "+r+".\nAvailable versions: "+Object.keys(i).map(e=>e+" from "+i[e].from).join(", ")},h=e=>{throw new Error(e)},v=e=>{"undefined"!=typeof console&&console.warn&&console.warn(e)},b=(e,r,t)=>t?t():((e,r)=>h("Shared module "+r+" doesn't exist in shared scope "+e))(e,r),y=(m=e=>function(r,t,n,o,a){var i=_.I(r);return i&&i.then&&!n?i.then(e.bind(e,r,_.S[r],t,!1,o,a)):e(r,_.S[r],t,n,o,a)})((e,r,t,n,o,a)=>{if(!i(r,t))return b(e,t,a);var l=f(r,t,o,n);return l?u(l):(v(c(r,e,t,o,n)),u(s(r,t,n)))}),g=m((e,r,t,n,o,l)=>{if(!i(r,t))return b(e,t,l);var s=d(r,t,n);return a(o,s)||v(p(r,t,s,o)),u(r[t][s])}),j={},w={489:()=>g("default","@jupyterlab/application",!1,[1,4,5,2]),14:()=>g("default","@jupyterlab/apputils",!1,[1,4,6,2]),830:()=>g("default","@jupyterlab/services",!1,[1,7,5,2]),581:()=>g("default","@jupyterlab/filebrowser",!1,[1,4,5,2]),83:()=>g("default","@jupyterlab/launcher",!1,[1,4,5,2]),469:()=>g("default","@jupyterlab/coreutils",!1,[1,6,5,2]),262:()=>g("default","@lumino/coreutils",!1,[1,2,0,0]),840:()=>g("default","@jupyterlab/ui-components",!1,[1,4,5,2]),247:()=>g("default","@lumino/widgets",!1,[1,2,3,1,,"alpha",1]),19:()=>y("default","@jupyterlab/docregistry",!1,[1,4,5,2])},S={510:[489,14,830,581,83,469,262,840,247,19]},x={},_.f.consumes=(e,r)=>{_.o(S,e)&&S[e].forEach(e=>{if(_.o(j,e))return r.push(j[e]);if(!x[e]){var t=r=>{j[e]=0,_.m[e]=t=>{delete _.c[e],t.exports=r()}};x[e]=!0;var n=r=>{delete j[e],_.m[e]=t=>{throw delete _.c[e],r}};try{var o=w[e]();o.then?r.push(j[e]=o.then(t).catch(n)):t(o)}catch(e){n(e)}}})},(()=>{var e={764:0};_.f.j=(r,t)=>{var n=_.o(e,r)?e[r]:void 0;if(0!==n)if(n)t.push(n[2]);else{var o=new Promise((t,o)=>n=e[r]=[t,o]);t.push(n[2]=o);var a=_.p+_.u(r),i=new Error;_.l(a,t=>{if(_.o(e,r)&&(0!==(n=e[r])&&(e[r]=void 0),n)){var o=t&&("load"===t.type?"missing":t.type),a=t&&t.target&&t.target.src;i.message="Loading chunk "+r+" failed.\n("+o+": "+a+")",i.name="ChunkLoadError",i.type=o,i.request=a,n[1](i)}},"chunk-"+r,r)}};var r=(r,t)=>{var n,o,[a,i,u]=t,l=0;if(a.some(r=>0!==e[r])){for(n in i)_.o(i,n)&&(_.m[n]=i[n]);u&&u(_)}for(r&&r(t);l<a.length;l++)o=a[l],_.o(e,o)&&e[o]&&e[o][0](),e[o]=0},t=self.webpackChunk_marimo_team_jupyter_extension=self.webpackChunk_marimo_team_jupyter_extension||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})(),_.nc=void 0;var P=_(321);(_JUPYTERLAB=void 0===_JUPYTERLAB?{}:_JUPYTERLAB)["@marimo-team/jupyter-extension"]=P})();
|