This commit is contained in:
2025-09-07 22:09:54 +02:00
parent e1b817252c
commit 2fc0d000b6
7796 changed files with 2159515 additions and 933 deletions

Binary file not shown.

View File

@ -0,0 +1,9 @@
{
"schemaVersion": 1,
"packageName": "jupyterlab-plotly",
"version": "6.0.1",
"packageManager": "python",
"jupyterlab": {
"mimeExtension": "lib/mimeExtension.js"
}
}

View File

@ -0,0 +1,39 @@
{
"name": "jupyterlab-plotly",
"main": "lib/mimeExtension.js",
"version": "6.0.1",
"repository": {
"type": "git",
"url": "https://github.com/plotly/plotly.py"
},
"description": "The plotly Jupyter extension",
"author": "The plotly.py team",
"license": "MIT",
"scripts": {
"build:widget": "esbuild --bundle --alias:plotly.js=plotly.js/dist/plotly --format=esm --minify --outfile=../plotly/package_data/widgetbundle.js src/widget.ts",
"build:mimerenderer": "esbuild --bundle --alias:plotly.js=plotly.js/dist/plotly --format=esm --minify --outfile=lib/mimeExtension.js src/mimeExtension.ts",
"build:labextension": "jupyter labextension build .",
"build": "npm run build:widget && npm run build:mimerenderer && npm run build:labextension",
"watch": "npm run build -- --watch --sourcemap=inline",
"typecheck": "tsc --noEmit"
},
"dependencies": {
"lodash-es": "^4.17.21",
"plotly.js": "3.1.0",
"@lumino/widgets": "~2.4.0"
},
"devDependencies": {
"@jupyterlab/builder": "^4.3.6 || ^3.6.8",
"@types/plotly.js": "^2.33.4",
"esbuild": "^0.23.1",
"typescript": "^5.6.2"
},
"jupyterlab": {
"mimeExtension": true,
"outputDir": "../plotly/labextension",
"_build": {
"load": "static/remoteEntry.38ea05461c254e327731.js",
"mimeExtension": "./mimeExtension"
}
}
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
var _JUPYTERLAB;(()=>{"use strict";var e,r,t={987:(e,r,t)=>{var o={"./index":()=>t.e(340).then((()=>()=>t(340))),"./mimeExtension":()=>t.e(340).then((()=>()=>t(340)))},a=(e,r)=>(t.R=r,r=t.o(o,e)?o[e]():Promise.resolve().then((()=>{throw new Error('Module "'+e+'" does not exist in container.')})),t.R=void 0,r),n=(e,r)=>{if(t.S){var o="default",a=t.S[o];if(a&&a!==e)throw new Error("Container initialization failed as it has already been initialized with a different share scope");return t.S[o]=e,t.I(o,r)}};t.d(r,{get:()=>a,init:()=>n})}},o={};function a(e){var r=o[e];if(void 0!==r)return r.exports;var n=o[e]={exports:{}};return t[e](n,n.exports,a),n.exports}a.m=t,a.c=o,a.amdO={},a.d=(e,r)=>{for(var t in r)a.o(r,t)&&!a.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce(((r,t)=>(a.f[t](e,r),r)),[])),a.u=e=>e+".e7c6cfbf008f29878868.js?v=e7c6cfbf008f29878868",a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),e={},r="jupyterlab-plotly:",a.l=(t,o,n,i)=>{if(e[t])e[t].push(o);else{var l,u;if(void 0!==n)for(var p=document.getElementsByTagName("script"),s=0;s<p.length;s++){var d=p[s];if(d.getAttribute("src")==t||d.getAttribute("data-webpack")==r+n){l=d;break}}l||(u=!0,(l=document.createElement("script")).charset="utf-8",l.timeout=120,a.nc&&l.setAttribute("nonce",a.nc),l.setAttribute("data-webpack",r+n),l.src=t),e[t]=[o];var c=(r,o)=>{l.onerror=l.onload=null,clearTimeout(f);var a=e[t];if(delete e[t],l.parentNode&&l.parentNode.removeChild(l),a&&a.forEach((e=>e(o))),r)return r(o)},f=setTimeout(c.bind(null,void 0,{type:"timeout",target:l}),12e4);l.onerror=c.bind(null,l.onerror),l.onload=c.bind(null,l.onload),u&&document.head.appendChild(l)}},a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{a.S={};var e={},r={};a.I=(t,o)=>{o||(o=[]);var n=r[t];if(n||(n=r[t]={}),!(o.indexOf(n)>=0)){if(o.push(n),e[t])return e[t];a.o(a.S,t)||(a.S[t]={});var i=a.S[t],l="jupyterlab-plotly",u=[];return"default"===t&&((e,r,t,o)=>{var n=i[e]=i[e]||{},u=n[r];(!u||!u.loaded&&(1!=!u.eager?o:l>u.from))&&(n[r]={get:()=>a.e(340).then((()=>()=>a(340))),from:l,eager:!1})})("jupyterlab-plotly","6.0.1"),e[t]=u.length?Promise.all(u).then((()=>e[t]=1)):1}}})(),(()=>{var e;a.g.importScripts&&(e=a.g.location+"");var r=a.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 o=t.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=t[o--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.p=e})(),(()=>{var e={80:0};a.f.j=(r,t)=>{var o=a.o(e,r)?e[r]:void 0;if(0!==o)if(o)t.push(o[2]);else{var n=new Promise(((t,a)=>o=e[r]=[t,a]));t.push(o[2]=n);var i=a.p+a.u(r),l=new Error;a.l(i,(t=>{if(a.o(e,r)&&(0!==(o=e[r])&&(e[r]=void 0),o)){var n=t&&("load"===t.type?"missing":t.type),i=t&&t.target&&t.target.src;l.message="Loading chunk "+r+" failed.\n("+n+": "+i+")",l.name="ChunkLoadError",l.type=n,l.request=i,o[1](l)}}),"chunk-"+r,r)}};var r=(r,t)=>{var o,n,[i,l,u]=t,p=0;if(i.some((r=>0!==e[r]))){for(o in l)a.o(l,o)&&(a.m[o]=l[o]);u&&u(a)}for(r&&r(t);p<i.length;p++)n=i[p],a.o(e,n)&&e[n]&&e[n][0](),e[n]=0},t=self.webpackChunkjupyterlab_plotly=self.webpackChunkjupyterlab_plotly||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})();var n=a(987);(_JUPYTERLAB=void 0===_JUPYTERLAB?{}:_JUPYTERLAB)["jupyterlab-plotly"]=n})();

View File

@ -0,0 +1,4 @@
/* This is a generated file of CSS imports */
/* It was generated by @jupyterlab/builder in Build.ensureAssets() */

View File

@ -0,0 +1,42 @@
// file my_extension/main.js
define([
'base/js/namespace',
'base/js/utils',
], function(Jupyter, utils){
function load_ipython_extension(){
var notebookUrl = window.location.href
var baseUrl = utils.get_body_data('baseUrl');
var baseNotebooks = baseUrl + "notebooks"
var n = notebookUrl.search(baseNotebooks)
var jupyterServerUrl = notebookUrl.slice(0, n)
var register_comm = function() {
Jupyter.notebook.kernel.comm_manager.register_target('dash',
function (comm, msg) {
// Register handlers for later messages:
comm.on_msg(function (msg) {
console.log("Dash message", msg);
var msgData = msg.content.data;
if (msgData.type === 'base_url_request') {
comm.send({
type: 'base_url_response',
server_url: jupyterServerUrl,
base_subpath: baseUrl,
frontend: "notebook"
});
} else if (msgData.type === 'show') {
}
});
});
};
Jupyter.notebook.events.on('kernel_ready.Kernel', register_comm)
}
return {
load_ipython_extension: load_ipython_extension
};
});