purdue-af-shutdown-button 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.
- purdue_af_shutdown_button/__init__.py +16 -0
- purdue_af_shutdown_button/_version.py +4 -0
- purdue_af_shutdown_button-0.1.0.data/data/share/jupyter/labextensions/purdue-af-shutdown-button/install.json +5 -0
- purdue_af_shutdown_button-0.1.0.data/data/share/jupyter/labextensions/purdue-af-shutdown-button/package.json +188 -0
- purdue_af_shutdown_button-0.1.0.data/data/share/jupyter/labextensions/purdue-af-shutdown-button/static/736.bef249f8d35253354de9.js +1 -0
- purdue_af_shutdown_button-0.1.0.data/data/share/jupyter/labextensions/purdue-af-shutdown-button/static/964.682c4185b871a7f7c841.js +1 -0
- purdue_af_shutdown_button-0.1.0.data/data/share/jupyter/labextensions/purdue-af-shutdown-button/static/remoteEntry.41a875cee769200fe1e5.js +1 -0
- purdue_af_shutdown_button-0.1.0.data/data/share/jupyter/labextensions/purdue-af-shutdown-button/static/style.js +4 -0
- purdue_af_shutdown_button-0.1.0.data/data/share/jupyter/labextensions/purdue-af-shutdown-button/static/third-party-licenses.json +22 -0
- purdue_af_shutdown_button-0.1.0.dist-info/METADATA +142 -0
- purdue_af_shutdown_button-0.1.0.dist-info/RECORD +13 -0
- purdue_af_shutdown_button-0.1.0.dist-info/WHEEL +4 -0
- purdue_af_shutdown_button-0.1.0.dist-info/licenses/LICENSE +29 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
try:
|
|
2
|
+
from ._version import __version__
|
|
3
|
+
except ImportError:
|
|
4
|
+
# Fallback when using the package in dev mode without installing
|
|
5
|
+
# in editable mode with pip. It is highly recommended to install
|
|
6
|
+
# the package from a stable release or in editable mode: https://pip.pypa.io/en/stable/topics/local-project-installs/#editable-installs
|
|
7
|
+
import warnings
|
|
8
|
+
warnings.warn("Importing 'purdue_af_shutdown_button' outside a proper installation.")
|
|
9
|
+
__version__ = "dev"
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def _jupyter_labextension_paths():
|
|
13
|
+
return [{
|
|
14
|
+
"src": "labextension",
|
|
15
|
+
"dest": "purdue-af-shutdown-button"
|
|
16
|
+
}]
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "purdue-af-shutdown-button",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Adds a shutdown button to JupyterLab top-bar.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"jupyter",
|
|
7
|
+
"jupyterlab",
|
|
8
|
+
"jupyterlab-extension"
|
|
9
|
+
],
|
|
10
|
+
"license": "BSD-3-Clause",
|
|
11
|
+
"author": {
|
|
12
|
+
"name": "Dmitry Kondratyev",
|
|
13
|
+
"email": "kondratyev.d.95@gmail.com"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"lib/**/*.{d.ts,eot,gif,html,jpg,js,js.map,json,png,svg,woff2,ttf}",
|
|
17
|
+
"style/**/*.{css,js,eot,gif,html,jpg,json,png,svg,woff2,ttf}",
|
|
18
|
+
"src/**/*.{ts,tsx}"
|
|
19
|
+
],
|
|
20
|
+
"main": "lib/index.js",
|
|
21
|
+
"types": "lib/index.d.ts",
|
|
22
|
+
"style": "style/index.css",
|
|
23
|
+
"repository": {
|
|
24
|
+
"type": "git",
|
|
25
|
+
"url": "https://github.com/PurdueAF/purdue-af-extensions.git"
|
|
26
|
+
},
|
|
27
|
+
"scripts": {
|
|
28
|
+
"build": "jlpm build:lib && jlpm build:labextension:dev",
|
|
29
|
+
"build:prod": "jlpm clean && jlpm build:lib:prod && jlpm build:labextension",
|
|
30
|
+
"build:labextension": "jupyter labextension build .",
|
|
31
|
+
"build:labextension:dev": "jupyter labextension build --development True .",
|
|
32
|
+
"build:lib": "tsc --sourceMap",
|
|
33
|
+
"build:lib:prod": "tsc",
|
|
34
|
+
"clean": "jlpm clean:lib",
|
|
35
|
+
"clean:lib": "rimraf lib tsconfig.tsbuildinfo",
|
|
36
|
+
"clean:lintcache": "rimraf .eslintcache .stylelintcache",
|
|
37
|
+
"clean:labextension": "rimraf purdue_af_shutdown_button/labextension purdue_af_shutdown_button/_version.py",
|
|
38
|
+
"clean:all": "jlpm clean:lib && jlpm clean:labextension && jlpm clean:lintcache",
|
|
39
|
+
"eslint": "jlpm eslint:check --fix",
|
|
40
|
+
"eslint:check": "eslint . --cache --ext .ts,.tsx",
|
|
41
|
+
"install:extension": "jlpm build",
|
|
42
|
+
"lint": "jlpm stylelint && jlpm prettier && jlpm eslint",
|
|
43
|
+
"lint:check": "jlpm stylelint:check && jlpm prettier:check && jlpm eslint:check",
|
|
44
|
+
"prettier": "jlpm prettier:base --write --list-different",
|
|
45
|
+
"prettier:base": "prettier \"**/*{.ts,.tsx,.js,.jsx,.css,.json,.md}\"",
|
|
46
|
+
"prettier:check": "jlpm prettier:base --check",
|
|
47
|
+
"stylelint": "jlpm stylelint:check --fix",
|
|
48
|
+
"stylelint:check": "stylelint --cache \"style/**/*.css\"",
|
|
49
|
+
"watch": "run-p watch:src watch:labextension",
|
|
50
|
+
"watch:src": "tsc -w --sourceMap",
|
|
51
|
+
"watch:labextension": "jupyter labextension watch ."
|
|
52
|
+
},
|
|
53
|
+
"dependencies": {
|
|
54
|
+
"@jupyterlab/application": "^4.0.0"
|
|
55
|
+
},
|
|
56
|
+
"devDependencies": {
|
|
57
|
+
"@jupyterlab/builder": "^4.0.0",
|
|
58
|
+
"@types/json-schema": "^7.0.11",
|
|
59
|
+
"@types/react": "^18.0.26",
|
|
60
|
+
"@types/react-addons-linked-state-mixin": "^0.14.22",
|
|
61
|
+
"@typescript-eslint/eslint-plugin": "^6.1.0",
|
|
62
|
+
"@typescript-eslint/parser": "^6.1.0",
|
|
63
|
+
"css-loader": "^6.7.1",
|
|
64
|
+
"eslint": "^8.36.0",
|
|
65
|
+
"eslint-config-prettier": "^8.8.0",
|
|
66
|
+
"eslint-plugin-prettier": "^5.0.0",
|
|
67
|
+
"npm-run-all": "^4.1.5",
|
|
68
|
+
"prettier": "^3.0.0",
|
|
69
|
+
"rimraf": "^5.0.1",
|
|
70
|
+
"source-map-loader": "^1.0.2",
|
|
71
|
+
"style-loader": "^3.3.1",
|
|
72
|
+
"stylelint": "^15.10.1",
|
|
73
|
+
"stylelint-config-recommended": "^13.0.0",
|
|
74
|
+
"stylelint-config-standard": "^34.0.0",
|
|
75
|
+
"stylelint-csstree-validator": "^3.0.0",
|
|
76
|
+
"stylelint-prettier": "^4.0.0",
|
|
77
|
+
"typescript": "~5.0.2",
|
|
78
|
+
"yjs": "^13.5.0"
|
|
79
|
+
},
|
|
80
|
+
"sideEffects": [
|
|
81
|
+
"style/*.css",
|
|
82
|
+
"style/index.js"
|
|
83
|
+
],
|
|
84
|
+
"styleModule": "style/index.js",
|
|
85
|
+
"publishConfig": {
|
|
86
|
+
"access": "public"
|
|
87
|
+
},
|
|
88
|
+
"jupyterlab": {
|
|
89
|
+
"extension": true,
|
|
90
|
+
"outputDir": "purdue_af_shutdown_button/labextension",
|
|
91
|
+
"_build": {
|
|
92
|
+
"load": "static/remoteEntry.41a875cee769200fe1e5.js",
|
|
93
|
+
"extension": "./extension",
|
|
94
|
+
"style": "./style"
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
"eslintIgnore": [
|
|
98
|
+
"node_modules",
|
|
99
|
+
"dist",
|
|
100
|
+
"coverage",
|
|
101
|
+
"**/*.d.ts"
|
|
102
|
+
],
|
|
103
|
+
"eslintConfig": {
|
|
104
|
+
"extends": [
|
|
105
|
+
"eslint:recommended",
|
|
106
|
+
"plugin:@typescript-eslint/eslint-recommended",
|
|
107
|
+
"plugin:@typescript-eslint/recommended",
|
|
108
|
+
"plugin:prettier/recommended"
|
|
109
|
+
],
|
|
110
|
+
"parser": "@typescript-eslint/parser",
|
|
111
|
+
"parserOptions": {
|
|
112
|
+
"project": "tsconfig.json",
|
|
113
|
+
"sourceType": "module"
|
|
114
|
+
},
|
|
115
|
+
"plugins": [
|
|
116
|
+
"@typescript-eslint"
|
|
117
|
+
],
|
|
118
|
+
"rules": {
|
|
119
|
+
"@typescript-eslint/naming-convention": [
|
|
120
|
+
"error",
|
|
121
|
+
{
|
|
122
|
+
"selector": "interface",
|
|
123
|
+
"format": [
|
|
124
|
+
"PascalCase"
|
|
125
|
+
],
|
|
126
|
+
"custom": {
|
|
127
|
+
"regex": "^I[A-Z]",
|
|
128
|
+
"match": true
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
],
|
|
132
|
+
"@typescript-eslint/no-unused-vars": [
|
|
133
|
+
"warn",
|
|
134
|
+
{
|
|
135
|
+
"args": "none"
|
|
136
|
+
}
|
|
137
|
+
],
|
|
138
|
+
"@typescript-eslint/no-explicit-any": "off",
|
|
139
|
+
"@typescript-eslint/no-namespace": "off",
|
|
140
|
+
"@typescript-eslint/no-use-before-define": "off",
|
|
141
|
+
"@typescript-eslint/quotes": [
|
|
142
|
+
"error",
|
|
143
|
+
"single",
|
|
144
|
+
{
|
|
145
|
+
"avoidEscape": true,
|
|
146
|
+
"allowTemplateLiterals": false
|
|
147
|
+
}
|
|
148
|
+
],
|
|
149
|
+
"curly": [
|
|
150
|
+
"error",
|
|
151
|
+
"all"
|
|
152
|
+
],
|
|
153
|
+
"eqeqeq": "error",
|
|
154
|
+
"prefer-arrow-callback": "error"
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
"prettier": {
|
|
158
|
+
"singleQuote": true,
|
|
159
|
+
"trailingComma": "none",
|
|
160
|
+
"arrowParens": "avoid",
|
|
161
|
+
"endOfLine": "auto",
|
|
162
|
+
"overrides": [
|
|
163
|
+
{
|
|
164
|
+
"files": "package.json",
|
|
165
|
+
"options": {
|
|
166
|
+
"tabWidth": 4
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
]
|
|
170
|
+
},
|
|
171
|
+
"stylelint": {
|
|
172
|
+
"extends": [
|
|
173
|
+
"stylelint-config-recommended",
|
|
174
|
+
"stylelint-config-standard",
|
|
175
|
+
"stylelint-prettier/recommended"
|
|
176
|
+
],
|
|
177
|
+
"plugins": [
|
|
178
|
+
"stylelint-csstree-validator"
|
|
179
|
+
],
|
|
180
|
+
"rules": {
|
|
181
|
+
"csstree/validator": true,
|
|
182
|
+
"property-no-vendor-prefix": null,
|
|
183
|
+
"selector-class-pattern": "^([a-z][A-z\\d]*)(-[A-z\\d]+)*$",
|
|
184
|
+
"selector-no-vendor-prefix": null,
|
|
185
|
+
"value-no-vendor-prefix": null
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkpurdue_af_shutdown_button=self.webpackChunkpurdue_af_shutdown_button||[]).push([[736],{795:(e,t,n)=>{n.d(t,{c:()=>s});var r=n(500),o=n.n(r),a=n(312),c=n.n(a)()(o());c.push([e.id,"/*\n See the JupyterLab Developer Guide for useful CSS Patterns:\n\n https://jupyterlab.readthedocs.io/en/stable/developer/css.html\n*/\n",""]);const s=c},312:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,o,a){"string"==typeof e&&(e=[[null,e,void 0]]);var c={};if(r)for(var s=0;s<this.length;s++){var i=this[s][0];null!=i&&(c[i]=!0)}for(var u=0;u<e.length;u++){var p=[].concat(e[u]);r&&c[p[0]]||(void 0!==a&&(void 0===p[5]||(p[1]="@layer".concat(p[5].length>0?" ".concat(p[5]):""," {").concat(p[1],"}")),p[5]=a),n&&(p[2]?(p[1]="@media ".concat(p[2]," {").concat(p[1],"}"),p[2]=n):p[2]=n),o&&(p[4]?(p[1]="@supports (".concat(p[4],") {").concat(p[1],"}"),p[4]=o):p[4]="".concat(o)),t.push(p))}},t}},500:e=>{e.exports=function(e){return e[1]}},596:e=>{var t=[];function n(e){for(var n=-1,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var a={},c=[],s=0;s<e.length;s++){var i=e[s],u=r.base?i[0]+r.base:i[0],p=a[u]||0,l="".concat(u," ").concat(p);a[u]=p+1;var d=n(l),f={css:i[1],media:i[2],sourceMap:i[3],supports:i[4],layer:i[5]};if(-1!==d)t[d].references++,t[d].updater(f);else{var v=o(f,r);r.byIndex=s,t.splice(s,0,{identifier:l,updater:v,references:1})}c.push(l)}return c}function o(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,o){var a=r(e=e||[],o=o||{});return function(e){e=e||[];for(var c=0;c<a.length;c++){var s=n(a[c]);t[s].references--}for(var i=r(e,o),u=0;u<a.length;u++){var p=n(a[u]);0===t[p].references&&(t[p].updater(),t.splice(p,1))}a=i}}},176:e=>{var t={};e.exports=function(e,n){var r=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(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},808:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},120:(e,t,n)=>{e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},520: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 r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var o=void 0!==n.layer;o&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,o&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var a=n.sourceMap;a&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},936: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))}}},736:(e,t,n)=>{n.r(t);var r=n(596),o=n.n(r),a=n(520),c=n.n(a),s=n(176),i=n.n(s),u=n(120),p=n.n(u),l=n(808),d=n.n(l),f=n(936),v=n.n(f),h=n(795),m={};m.styleTagTransform=v(),m.setAttributes=p(),m.insert=i().bind(null,"head"),m.domAPI=c(),m.insertStyleElement=d(),o()(h.c,m),h.c&&h.c.locals&&h.c.locals}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkpurdue_af_shutdown_button=self.webpackChunkpurdue_af_shutdown_button||[]).push([[964],{964:(n,e,t)=>{t.r(e),t.d(e,{default:()=>C});var o=t(812),r=t(760),a=t(440),c=t(908),s=t(8),i=t(596),d=t.n(i),u=t(520),l=t.n(u),p=t(176),v=t.n(p),h=t(120),m=t.n(h),f=t(808),b=t.n(f),j=t(936),y=t.n(j),g=t(584),w={};w.styleTagTransform=y(),w.setAttributes=m(),w.insert=v().bind(null,"head"),w.domAPI=l(),w.insertStyleElement=b(),d()(g.c,w),g.c&&g.c.locals&&g.c.locals;var x=t(644),S={};S.styleTagTransform=y(),S.setAttributes=m(),S.insert=v().bind(null,"head"),S.domAPI=l(),S.insertStyleElement=b(),d()(x.c,S),x.c&&x.c.locals&&x.c.locals;const C={id:"purdue-af-shutdown-button:plugin",description:"Adds a button that shuts down Jupyter server",autoStart:!0,requires:[o.IRouter],activate:async(n,e)=>{console.log("JupyterLab extension purdue-af-shutdown-button is activated!");const{commands:t}=n;t.addCommand("jupyterlab-topbar:shutdown",{label:"Shut Down",caption:"Shut down user session",className:"jp-RunningSessions-shutdownAll",execute:n=>(0,c.showDialog)({title:"Shut down Analysis Facility session",body:"Warning: unsaved data will be lost!",buttons:[c.Dialog.cancelButton(),c.Dialog.warnButton({label:"Shut Down"})]}).then((async n=>{if(n.button.accept){const n=s.ServerConnection.makeSettings(),e=a.URLExt.join(n.baseUrl,"api/shutdown");return s.ServerConnection.makeRequest(e,{method:"POST"},n).then((e=>{if(!e.ok)throw new s.ServerConnection.ResponseError(e);{const e=document.createElement("div"),t=document.createElement("p");t.textContent="You have shut down the Analysis Facility session.";const o=new URL(n.baseUrl),a=document.createElement("a");a.href=o.protocol+"//"+o.hostname+"/home",a.textContent="Click here or refresh the page to restart the session.",a.style.color="var(--jp-content-link-color)",e.appendChild(t),e.appendChild(a),(0,c.showDialog)({title:"Session closed.",body:new r.Widget({node:e}),buttons:[]})}})).catch((n=>{throw new s.ServerConnection.NetworkError(n)}))}}))})}}},584:(n,e,t)=>{t.d(e,{c:()=>s});var o=t(500),r=t.n(o),a=t(312),c=t.n(a)()(r());c.push([n.id,"/*\n * Copyright (c) Jupyter Development Team.\n * Distributed under the terms of the Modified BSD License.\n */\n\n/*-----------------------------------------------------------------------------\n| Variables\n|----------------------------------------------------------------------------*/\n\n:root {\n --jp-flat-button-height: 24px;\n --jp-flat-button-padding: 8px 12px;\n}\n\n/*-----------------------------------------------------------------------------\n| Copyright (c) Jupyter Development Team.\n| Distributed under the terms of the Modified BSD License.\n|----------------------------------------------------------------------------*/\n\nbutton {\n border-radius: var(--jp-border-radius);\n}\n\nbutton:focus-visible {\n outline: 1px solid var(--jp-accept-color-active, var(--jp-brand-color1));\n outline-offset: -1px;\n}\n\nbutton.jp-mod-styled.jp-mod-accept {\n background: var(--jp-accept-color-normal, var(--md-blue-500));\n border: 0;\n color: white;\n}\n\nbutton.jp-mod-styled.jp-mod-accept:hover {\n background: var(--jp-accept-color-hover, var(--md-blue-600));\n}\n\nbutton.jp-mod-styled.jp-mod-accept:active {\n background: var(--jp-accept-color-active, var(--md-blue-700));\n}\n\nbutton.jp-mod-styled.jp-mod-accept:focus-visible {\n outline: 1px solid var(--jp-accept-color-active, var(--jp-brand-color1));\n}\n\nbutton.jp-mod-styled.jp-mod-reject {\n background: var(--jp-reject-color-normal, var(--md-grey-500));\n border: 0;\n color: white;\n}\n\nbutton.jp-mod-styled.jp-mod-reject:hover {\n background: var(--jp-reject-color-hover, var(--md-grey-600));\n}\n\nbutton.jp-mod-styled.jp-mod-reject:active {\n background: var(--jp-reject-color-active, var(--md-grey-700));\n}\n\nbutton.jp-mod-styled.jp-mod-reject:focus-visible {\n outline: 1px solid var(--jp-reject-color-active, var(--md-grey-700));\n}\n\nbutton.jp-mod-styled.jp-mod-warn {\n background: var(--jp-warn-color-normal, var(--jp-error-color1));\n border: 0;\n color: white;\n}\n\nbutton.jp-mod-styled.jp-mod-warn:hover {\n background: var(--jp-warn-color-hover, var(--md-red-600));\n}\n\nbutton.jp-mod-styled.jp-mod-warn:active {\n background: var(--jp-warn-color-active, var(--md-red-700));\n}\n\nbutton.jp-mod-styled.jp-mod-warn:focus-visible {\n outline: 1px solid var(--jp-warn-color-active, var(--md-red-700));\n}\n\n.jp-Button-flat {\n text-decoration: none;\n padding: var(--jp-flat-button-padding);\n font-weight: 500;\n background-color: transparent;\n height: var(--jp-private-running-shutdown-button-height);\n line-height: var(--jp-private-running-shutdown-button-height);\n transition: background-color 0.1s ease;\n border-radius: 2px;\n}\n\n.jp-Button-flat:focus {\n border: none;\n box-shadow: none;\n}\n",""]);const s=c},795:(n,e,t)=>{t.d(e,{c:()=>s});var o=t(500),r=t.n(o),a=t(312),c=t.n(a)()(r());c.push([n.id,"/*\n See the JupyterLab Developer Guide for useful CSS Patterns:\n\n https://jupyterlab.readthedocs.io/en/stable/developer/css.html\n*/\n",""]);const s=c},644:(n,e,t)=>{t.d(e,{c:()=>d});var o=t(500),r=t.n(o),a=t(312),c=t.n(a),s=t(795),i=c()(r());i.i(s.c),i.push([n.id,"\n",""]);const d=i},312:n=>{n.exports=function(n){var e=[];return e.toString=function(){return this.map((function(e){var t="",o=void 0!==e[5];return e[4]&&(t+="@supports (".concat(e[4],") {")),e[2]&&(t+="@media ".concat(e[2]," {")),o&&(t+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),t+=n(e),o&&(t+="}"),e[2]&&(t+="}"),e[4]&&(t+="}"),t})).join("")},e.i=function(n,t,o,r,a){"string"==typeof n&&(n=[[null,n,void 0]]);var c={};if(o)for(var s=0;s<this.length;s++){var i=this[s][0];null!=i&&(c[i]=!0)}for(var d=0;d<n.length;d++){var u=[].concat(n[d]);o&&c[u[0]]||(void 0!==a&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=a),t&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=t):u[2]=t),r&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=r):u[4]="".concat(r)),e.push(u))}},e}},500:n=>{n.exports=function(n){return n[1]}},596:n=>{var e=[];function t(n){for(var t=-1,o=0;o<e.length;o++)if(e[o].identifier===n){t=o;break}return t}function o(n,o){for(var a={},c=[],s=0;s<n.length;s++){var i=n[s],d=o.base?i[0]+o.base:i[0],u=a[d]||0,l="".concat(d," ").concat(u);a[d]=u+1;var p=t(l),v={css:i[1],media:i[2],sourceMap:i[3],supports:i[4],layer:i[5]};if(-1!==p)e[p].references++,e[p].updater(v);else{var h=r(v,o);o.byIndex=s,e.splice(s,0,{identifier:l,updater:h,references:1})}c.push(l)}return c}function r(n,e){var t=e.domAPI(e);return t.update(n),function(e){if(e){if(e.css===n.css&&e.media===n.media&&e.sourceMap===n.sourceMap&&e.supports===n.supports&&e.layer===n.layer)return;t.update(n=e)}else t.remove()}}n.exports=function(n,r){var a=o(n=n||[],r=r||{});return function(n){n=n||[];for(var c=0;c<a.length;c++){var s=t(a[c]);e[s].references--}for(var i=o(n,r),d=0;d<a.length;d++){var u=t(a[d]);0===e[u].references&&(e[u].updater(),e.splice(u,1))}a=i}}},176:n=>{var e={};n.exports=function(n,t){var o=function(n){if(void 0===e[n]){var t=document.querySelector(n);if(window.HTMLIFrameElement&&t instanceof window.HTMLIFrameElement)try{t=t.contentDocument.head}catch(n){t=null}e[n]=t}return e[n]}(n);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(t)}},808:n=>{n.exports=function(n){var e=document.createElement("style");return n.setAttributes(e,n.attributes),n.insert(e,n.options),e}},120:(n,e,t)=>{n.exports=function(n){var e=t.nc;e&&n.setAttribute("nonce",e)}},520:n=>{n.exports=function(n){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=n.insertStyleElement(n);return{update:function(t){!function(n,e,t){var o="";t.supports&&(o+="@supports (".concat(t.supports,") {")),t.media&&(o+="@media ".concat(t.media," {"));var r=void 0!==t.layer;r&&(o+="@layer".concat(t.layer.length>0?" ".concat(t.layer):""," {")),o+=t.css,r&&(o+="}"),t.media&&(o+="}"),t.supports&&(o+="}");var a=t.sourceMap;a&&"undefined"!=typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),e.styleTagTransform(o,n,e.options)}(e,n,t)},remove:function(){!function(n){if(null===n.parentNode)return!1;n.parentNode.removeChild(n)}(e)}}}},936:n=>{n.exports=function(n,e){if(e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var _JUPYTERLAB;(()=>{"use strict";var e,r,t,n,o,a,i,u,l,s,d,f,p,c,h,v,b,g={48:(e,r,t)=>{var n={"./index":()=>t.e(964).then((()=>()=>t(964))),"./extension":()=>t.e(964).then((()=>()=>t(964))),"./style":()=>t.e(736).then((()=>()=>t(736)))},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})}},m={};function y(e){var r=m[e];if(void 0!==r)return r.exports;var t=m[e]={id:e,exports:{}};return g[e](t,t.exports,y),t.exports}y.m=g,y.c=m,y.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return y.d(r,{a:r}),r},y.d=(e,r)=>{for(var t in r)y.o(r,t)&&!y.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},y.f={},y.e=e=>Promise.all(Object.keys(y.f).reduce(((r,t)=>(y.f[t](e,r),r)),[])),y.u=e=>e+"."+{736:"bef249f8d35253354de9",964:"682c4185b871a7f7c841"}[e]+".js?v="+{736:"bef249f8d35253354de9",964:"682c4185b871a7f7c841"}[e],y.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),y.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),e={},r="purdue-af-shutdown-button:",y.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 d=l[s];if(d.getAttribute("src")==t||d.getAttribute("data-webpack")==r+o){i=d;break}}i||(u=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,y.nc&&i.setAttribute("nonce",y.nc),i.setAttribute("data-webpack",r+o),i.src=t),e[t]=[n];var f=(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(f.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=f.bind(null,i.onerror),i.onload=f.bind(null,i.onload),u&&document.head.appendChild(i)}},y.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{y.S={};var e={},r={};y.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];y.o(y.S,t)||(y.S[t]={});var a=y.S[t],i="purdue-af-shutdown-button",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:()=>y.e(964).then((()=>()=>y(964))),from:i,eager:!1})})("purdue-af-shutdown-button","0.1.0"),e[t]=u.length?Promise.all(u).then((()=>e[t]=1)):1}}})(),(()=>{var e;y.g.importScripts&&(e=y.g.location+"");var r=y.g.document;if(!e&&r&&(r.currentScript&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");if(t.length)for(var n=t.length-1;n>-1&&!e;)e=t[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),y.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,d,f=u<e.length?(typeof e[u])[0]:"";if(i>=r.length||"o"==(d=(typeof(s=r[i]))[0]))return!l||("u"==f?u>n&&!o:""==f!=o);if("u"==d){if(!l||"u"!=f)return!1}else if(l)if(f==d)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"!=f&&"n"!=f){if(o||u<=n)return!1;l=!1,u--}else{if(u<=n||d<f!=o)return!1;l=!1}else"s"!=f&&"n"!=f&&(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)=>{var t=y.S[e];if(!t||!y.o(t,r))throw new Error("Shared module "+r+" doesn't exist in shared scope "+e);return t},u=(e,r)=>{var t=e[r];return Object.keys(t).reduce(((e,r)=>!e||!t[e].loaded&&n(e,r)?r:e),0)},l=(e,r,t,n)=>"Unsatisfied version "+t+" from "+(t&&e[r][t].from)+" of shared singleton module "+r+" (required "+o(n)+")",s=(e,r,t,n)=>{var o=u(e,t);return a(n,o)||d(l(e,t,o,n)),f(e[t][o])},d=e=>{"undefined"!=typeof console&&console.warn&&console.warn(e)},f=e=>(e.loaded=1,e.get()),p=(e=>function(r,t,n,o){var a=y.I(r);return a&&a.then?a.then(e.bind(e,r,y.S[r],t,n,o)):e(r,y.S[r],t,n)})(((e,r,t,n)=>(i(e,t),s(r,0,t,n)))),c={},h={8:()=>p("default","@jupyterlab/services",[1,7,1,0]),440:()=>p("default","@jupyterlab/coreutils",[1,6,1,0]),760:()=>p("default","@lumino/widgets",[1,2,3,1,,"alpha",0]),812:()=>p("default","@jupyterlab/application",[1,4,1,0]),908:()=>p("default","@jupyterlab/apputils",[1,4,2,0])},v={964:[8,440,760,812,908]},b={},y.f.consumes=(e,r)=>{y.o(v,e)&&v[e].forEach((e=>{if(y.o(c,e))return r.push(c[e]);if(!b[e]){var t=r=>{c[e]=0,y.m[e]=t=>{delete y.c[e],t.exports=r()}};b[e]=!0;var n=r=>{delete c[e],y.m[e]=t=>{throw delete y.c[e],r}};try{var o=h[e]();o.then?r.push(c[e]=o.then(t).catch(n)):t(o)}catch(e){n(e)}}}))},(()=>{var e={240:0};y.f.j=(r,t)=>{var n=y.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=y.p+y.u(r),i=new Error;y.l(a,(t=>{if(y.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)y.o(i,n)&&(y.m[n]=i[n]);u&&u(y)}for(r&&r(t);l<a.length;l++)o=a[l],y.o(e,o)&&e[o]&&e[o][0](),e[o]=0},t=self.webpackChunkpurdue_af_shutdown_button=self.webpackChunkpurdue_af_shutdown_button||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})(),y.nc=void 0;var w=y(48);(_JUPYTERLAB=void 0===_JUPYTERLAB?{}:_JUPYTERLAB)["purdue-af-shutdown-button"]=w})();
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"packages": [
|
|
3
|
+
{
|
|
4
|
+
"name": "@jupyterlab/application",
|
|
5
|
+
"versionInfo": "4.1.0",
|
|
6
|
+
"licenseId": "BSD-3-Clause",
|
|
7
|
+
"extractedText": ""
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"name": "css-loader",
|
|
11
|
+
"versionInfo": "6.10.0",
|
|
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
|
+
"name": "style-loader",
|
|
17
|
+
"versionInfo": "3.3.4",
|
|
18
|
+
"licenseId": "MIT",
|
|
19
|
+
"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"
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: purdue_af_shutdown_button
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Adds a shutdown button to JupyterLab top-bar.
|
|
5
|
+
Project-URL: Repository, https://github.com/PurdueAF/purdue-af-extensions.git
|
|
6
|
+
Author-email: Dmitry Kondratyev <kondratyev.d.95@gmail.com>
|
|
7
|
+
License: BSD 3-Clause License
|
|
8
|
+
|
|
9
|
+
Copyright (c) 2024, Dmitry Kondratyev
|
|
10
|
+
All rights reserved.
|
|
11
|
+
|
|
12
|
+
Redistribution and use in source and binary forms, with or without
|
|
13
|
+
modification, are permitted provided that the following conditions are met:
|
|
14
|
+
|
|
15
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
16
|
+
list of conditions and the following disclaimer.
|
|
17
|
+
|
|
18
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
19
|
+
this list of conditions and the following disclaimer in the documentation
|
|
20
|
+
and/or other materials provided with the distribution.
|
|
21
|
+
|
|
22
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
23
|
+
contributors may be used to endorse or promote products derived from
|
|
24
|
+
this software without specific prior written permission.
|
|
25
|
+
|
|
26
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
27
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
28
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
29
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
30
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
31
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
32
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
33
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
34
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
35
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
36
|
+
License-File: LICENSE
|
|
37
|
+
Classifier: Framework :: Jupyter
|
|
38
|
+
Classifier: Framework :: Jupyter :: JupyterLab
|
|
39
|
+
Classifier: Framework :: Jupyter :: JupyterLab :: 4
|
|
40
|
+
Classifier: Framework :: Jupyter :: JupyterLab :: Extensions
|
|
41
|
+
Classifier: Framework :: Jupyter :: JupyterLab :: Extensions :: Prebuilt
|
|
42
|
+
Classifier: License :: OSI Approved :: BSD License
|
|
43
|
+
Classifier: Programming Language :: Python
|
|
44
|
+
Classifier: Programming Language :: Python :: 3
|
|
45
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
46
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
47
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
48
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
49
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
50
|
+
Requires-Python: >=3.8
|
|
51
|
+
Description-Content-Type: text/markdown
|
|
52
|
+
|
|
53
|
+
# purdue_af_shutdown_button
|
|
54
|
+
|
|
55
|
+
Adds a shutdown button to JupyterLab top-bar.
|
|
56
|
+
|
|
57
|
+
To enable the button, the file `.jupyter/lab/user-settings/@jupyterlab/application-extension/top-bar.jupyterlab-settings` should contain the following:
|
|
58
|
+
|
|
59
|
+
```json
|
|
60
|
+
{
|
|
61
|
+
"toolbar": [
|
|
62
|
+
{
|
|
63
|
+
"name": "shutdown",
|
|
64
|
+
"command": "jupyterlab-topbar:shutdown",
|
|
65
|
+
"disabled": false,
|
|
66
|
+
"rank": 100
|
|
67
|
+
}
|
|
68
|
+
]
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Requirements
|
|
73
|
+
|
|
74
|
+
- JupyterLab >= 4.0.0
|
|
75
|
+
|
|
76
|
+
## Install
|
|
77
|
+
|
|
78
|
+
To install the extension, execute:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
pip install purdue_af_shutdown_button
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Uninstall
|
|
85
|
+
|
|
86
|
+
To remove the extension, execute:
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
pip uninstall purdue_af_shutdown_button
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Contributing
|
|
93
|
+
|
|
94
|
+
### Development install
|
|
95
|
+
|
|
96
|
+
Note: You will need NodeJS to build the extension package.
|
|
97
|
+
|
|
98
|
+
The `jlpm` command is JupyterLab's pinned version of
|
|
99
|
+
[yarn](https://yarnpkg.com/) that is installed with JupyterLab. You may use
|
|
100
|
+
`yarn` or `npm` in lieu of `jlpm` below.
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
# Clone the repo to your local environment
|
|
104
|
+
# Change directory to the purdue_af_shutdown_button directory
|
|
105
|
+
# Install package in development mode
|
|
106
|
+
pip install -e "."
|
|
107
|
+
# Link your development version of the extension with JupyterLab
|
|
108
|
+
jupyter labextension develop . --overwrite
|
|
109
|
+
# Rebuild extension Typescript source after making changes
|
|
110
|
+
jlpm build
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
You can watch the source directory and run JupyterLab at the same time in different terminals to watch for changes in the extension's source and automatically rebuild the extension.
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
# Watch the source directory in one terminal, automatically rebuilding when needed
|
|
117
|
+
jlpm watch
|
|
118
|
+
# Run JupyterLab in another terminal
|
|
119
|
+
jupyter lab
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
With the watch command running, every saved change will immediately be built locally and available in your running JupyterLab. Refresh JupyterLab to load the change in your browser (you may need to wait several seconds for the extension to be rebuilt).
|
|
123
|
+
|
|
124
|
+
By default, the `jlpm build` command generates the source maps for this extension to make it easier to debug using the browser dev tools. To also generate source maps for the JupyterLab core extensions, you can run the following command:
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
jupyter lab build --minimize=False
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### Development uninstall
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
pip uninstall purdue_af_shutdown_button
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
In development mode, you will also need to remove the symlink created by `jupyter labextension develop`
|
|
137
|
+
command. To find its location, you can run `jupyter labextension list` to figure out where the `labextensions`
|
|
138
|
+
folder is located. Then you can remove the symlink named `purdue-af-shutdown-button` within that folder.
|
|
139
|
+
|
|
140
|
+
### Packaging the extension
|
|
141
|
+
|
|
142
|
+
See [RELEASE](RELEASE.md)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
purdue_af_shutdown_button/__init__.py,sha256=WKuUk3uFbZwTZ8WcK3q01Vgw1YpFL4t5NaF8JjQiYlU,608
|
|
2
|
+
purdue_af_shutdown_button/_version.py,sha256=ac3tgjoOzsODOlacRPCwz99LbZv0NK7ZYAaBWulFo7E,171
|
|
3
|
+
purdue_af_shutdown_button-0.1.0.data/data/share/jupyter/labextensions/purdue-af-shutdown-button/package.json,sha256=z77x_u5l93fjOHe2dU6U4hTAowcukqiVHkCSBuXmL8E,5493
|
|
4
|
+
purdue_af_shutdown_button-0.1.0.data/data/share/jupyter/labextensions/purdue-af-shutdown-button/static/736.bef249f8d35253354de9.js,sha256=vvJJ-NNSUzVN6c6QMj9pIN4iFsKKxS5DsPhu8Dffdmo,4032
|
|
5
|
+
purdue_af_shutdown_button-0.1.0.data/data/share/jupyter/labextensions/purdue-af-shutdown-button/static/964.682c4185b871a7f7c841.js,sha256=aCxBhbhxp_fIQQn4yt18xncRjVj8KukLIo_DVy0fMT0,8614
|
|
6
|
+
purdue_af_shutdown_button-0.1.0.data/data/share/jupyter/labextensions/purdue-af-shutdown-button/static/remoteEntry.41a875cee769200fe1e5.js,sha256=Qah1zudpIA_h5RzxNSO_jCBHbbDTf4tgyAFNo2b4TTU,6705
|
|
7
|
+
purdue_af_shutdown_button-0.1.0.data/data/share/jupyter/labextensions/purdue-af-shutdown-button/static/style.js,sha256=wDq5dKeTWg9FWSlcWCfA_IZ7fNuVdnda0x_e4Joogew,168
|
|
8
|
+
purdue_af_shutdown_button-0.1.0.data/data/share/jupyter/labextensions/purdue-af-shutdown-button/static/third-party-licenses.json,sha256=4gO19VFka3FdKmYeeXHUqMQ7HvjmgEA4bgpQuYH62Jg,2598
|
|
9
|
+
purdue_af_shutdown_button-0.1.0.data/data/share/jupyter/labextensions/purdue-af-shutdown-button/install.json,sha256=kxZ6LvJoHZm8Fc7vFjztqlhcLqHRpT47W-8iZzoABPs,211
|
|
10
|
+
purdue_af_shutdown_button-0.1.0.dist-info/METADATA,sha256=c6dPedHgLHeQD6rM5WPJWpGH2cyCCuasDOyRikkz9u4,5399
|
|
11
|
+
purdue_af_shutdown_button-0.1.0.dist-info/WHEEL,sha256=TJPnKdtrSue7xZ_AVGkp9YXcvDrobsjBds1du3Nx6dc,87
|
|
12
|
+
purdue_af_shutdown_button-0.1.0.dist-info/licenses/LICENSE,sha256=I1Ysu0gVQ42jUoy0j42oog_NyEkYTzAYKXmpVS4N0qg,1525
|
|
13
|
+
purdue_af_shutdown_button-0.1.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
BSD 3-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024, Dmitry Kondratyev
|
|
4
|
+
All rights reserved.
|
|
5
|
+
|
|
6
|
+
Redistribution and use in source and binary forms, with or without
|
|
7
|
+
modification, are permitted provided that the following conditions are met:
|
|
8
|
+
|
|
9
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
10
|
+
list of conditions and the following disclaimer.
|
|
11
|
+
|
|
12
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
13
|
+
this list of conditions and the following disclaimer in the documentation
|
|
14
|
+
and/or other materials provided with the distribution.
|
|
15
|
+
|
|
16
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
17
|
+
contributors may be used to endorse or promote products derived from
|
|
18
|
+
this software without specific prior written permission.
|
|
19
|
+
|
|
20
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
21
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
22
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
23
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
24
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
25
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
26
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
27
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
28
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
29
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|