gennaker-tools 0.1.3__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.
- gennaker_tools/__init__.py +26 -0
- gennaker_tools/_version.py +4 -0
- gennaker_tools/settings_sync_extension.py +132 -0
- gennaker_tools-0.1.3.data/data/etc/jupyter/jupyter_server_config.d/gennaker_tools.json +7 -0
- gennaker_tools-0.1.3.data/data/share/jupyter/labextensions/gennaker-tools/install.json +5 -0
- gennaker_tools-0.1.3.data/data/share/jupyter/labextensions/gennaker-tools/package.json +198 -0
- gennaker_tools-0.1.3.data/data/share/jupyter/labextensions/gennaker-tools/schemas/gennaker-tools/package.json.orig +193 -0
- gennaker_tools-0.1.3.data/data/share/jupyter/labextensions/gennaker-tools/schemas/gennaker-tools/stateless-run.json +17 -0
- gennaker_tools-0.1.3.data/data/share/jupyter/labextensions/gennaker-tools/static/509.289abdc89cdc2da51b88.js +1 -0
- gennaker_tools-0.1.3.data/data/share/jupyter/labextensions/gennaker-tools/static/728.c3ac4b62173ea8b3c44b.js +1 -0
- gennaker_tools-0.1.3.data/data/share/jupyter/labextensions/gennaker-tools/static/747.28975bdde163d0eaf6e0.js +1 -0
- gennaker_tools-0.1.3.data/data/share/jupyter/labextensions/gennaker-tools/static/remoteEntry.3e78bb25784889ba8b31.js +1 -0
- gennaker_tools-0.1.3.data/data/share/jupyter/labextensions/gennaker-tools/static/style.js +4 -0
- gennaker_tools-0.1.3.data/data/share/jupyter/labextensions/gennaker-tools/static/third-party-licenses.json +22 -0
- gennaker_tools-0.1.3.dist-info/METADATA +178 -0
- gennaker_tools-0.1.3.dist-info/RECORD +18 -0
- gennaker_tools-0.1.3.dist-info/WHEEL +4 -0
- gennaker_tools-0.1.3.dist-info/licenses/LICENSE +29 -0
|
@@ -0,0 +1,26 @@
|
|
|
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
|
+
|
|
9
|
+
warnings.warn("Importing 'gennaker-tools' outside a proper installation.")
|
|
10
|
+
__version__ = "dev"
|
|
11
|
+
|
|
12
|
+
from .settings_sync_extension import SettingsSyncApp
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def _jupyter_server_extension_points():
|
|
16
|
+
"""
|
|
17
|
+
Returns a list of dictionaries with metadata describing
|
|
18
|
+
where to find the `_load_jupyter_server_extension` function.
|
|
19
|
+
"""
|
|
20
|
+
return [
|
|
21
|
+
{"module": "gennaker_tools.settings_sync_extension", "app": SettingsSyncApp}
|
|
22
|
+
]
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def _jupyter_labextension_paths():
|
|
26
|
+
return [{"src": "labextension", "dest": "gennaker-tools"}]
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
from jupyter_server.extension.application import ExtensionApp
|
|
2
|
+
import jupyterlab.commands
|
|
3
|
+
|
|
4
|
+
from traitlets import Instance, default, validate, TraitError
|
|
5
|
+
import pathlib
|
|
6
|
+
import watchfiles
|
|
7
|
+
import jupyter_server.serverapp
|
|
8
|
+
import asyncio
|
|
9
|
+
import tomli
|
|
10
|
+
import json
|
|
11
|
+
import tomli_w
|
|
12
|
+
import re
|
|
13
|
+
import os
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class SettingsSyncApp(ExtensionApp):
|
|
17
|
+
# -------------- Required traits --------------
|
|
18
|
+
name = "settings-sync"
|
|
19
|
+
load_other_extensions = True
|
|
20
|
+
settings_path = Instance(pathlib.Path)
|
|
21
|
+
|
|
22
|
+
_task = Instance(asyncio.Task, allow_none=True)
|
|
23
|
+
_event = Instance(asyncio.Event, allow_none=True)
|
|
24
|
+
|
|
25
|
+
@default("settings_path")
|
|
26
|
+
def _default_settings_path(self):
|
|
27
|
+
return pathlib.Path(jupyterlab.commands.get_user_settings_dir())
|
|
28
|
+
|
|
29
|
+
@validate("settings_path")
|
|
30
|
+
def _valid_settings_path(self, proposal):
|
|
31
|
+
try:
|
|
32
|
+
_path = pathlib.Path(proposal["value"])
|
|
33
|
+
except TypeError:
|
|
34
|
+
raise TraitError("settings_path should be a valid pathlike value")
|
|
35
|
+
return _path
|
|
36
|
+
|
|
37
|
+
def _toml_to_settings_path(self, path: pathlib.Path) -> pathlib.Path:
|
|
38
|
+
return path.with_name(path.stem)
|
|
39
|
+
|
|
40
|
+
def _settings_to_toml_path(self, path: pathlib.Path) -> pathlib.Path:
|
|
41
|
+
return path.with_name(f"{path.name}.toml")
|
|
42
|
+
|
|
43
|
+
def _is_settings_path(self, path: pathlib.Path) -> bool:
|
|
44
|
+
return path.suffix == ".jupyterlab-settings"
|
|
45
|
+
|
|
46
|
+
def _is_toml_path(self, path: pathlib.Path) -> bool:
|
|
47
|
+
return path.suffix == ".toml"
|
|
48
|
+
|
|
49
|
+
def _strip_comments(self, source: str) -> str:
|
|
50
|
+
without_single_line_comments = re.sub(r"//.*$", "", source, flags=re.MULTILINE)
|
|
51
|
+
|
|
52
|
+
return re.sub(
|
|
53
|
+
r"/\*[\s\S]*?\*/", "", without_single_line_comments, flags=re.MULTILINE
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
async def _watched_files_need_sync(
|
|
57
|
+
self, path: pathlib.Path, other_path: pathlib.Path
|
|
58
|
+
) -> bool:
|
|
59
|
+
return path.stat().st_mtime != other_path.stat().st_mtime
|
|
60
|
+
|
|
61
|
+
async def _sync_watched_files(self, path: pathlib.Path, other_path: pathlib.Path):
|
|
62
|
+
self.log.info(f"Detected change in {path} file, synchronising")
|
|
63
|
+
if self._is_settings_path(path):
|
|
64
|
+
settings = json.loads(self._strip_comments(path.read_text()))
|
|
65
|
+
with open(other_path, "wb") as f:
|
|
66
|
+
tomli_w.dump(settings, f)
|
|
67
|
+
|
|
68
|
+
else:
|
|
69
|
+
with open(path, "rb") as f:
|
|
70
|
+
settings = tomli.load(f)
|
|
71
|
+
with open(other_path, "w") as sf:
|
|
72
|
+
json.dump(settings, sf, indent=2)
|
|
73
|
+
|
|
74
|
+
# Sync mtimes
|
|
75
|
+
stat = path.stat()
|
|
76
|
+
os.utime(other_path, (stat.st_atime, stat.st_mtime))
|
|
77
|
+
|
|
78
|
+
async def _unsync_watched_files(self, path: pathlib.Path, other_path: pathlib.Path):
|
|
79
|
+
if self._is_settings_path(path) and other_path.exists():
|
|
80
|
+
other_path.unlink()
|
|
81
|
+
|
|
82
|
+
async def _event_loop(self):
|
|
83
|
+
async for changes in watchfiles.awatch(
|
|
84
|
+
self.settings_path, stop_event=self._event
|
|
85
|
+
):
|
|
86
|
+
for change, _path in changes:
|
|
87
|
+
try:
|
|
88
|
+
await self._reconcile_change(change, pathlib.Path(_path))
|
|
89
|
+
except Exception as exc:
|
|
90
|
+
self.log.error(exc)
|
|
91
|
+
|
|
92
|
+
async def _reconcile_change(self, change, path):
|
|
93
|
+
# Ignore .~ files
|
|
94
|
+
if path.name.startswith(".~"):
|
|
95
|
+
return
|
|
96
|
+
|
|
97
|
+
# Only process settings files
|
|
98
|
+
path_is_toml = self._is_toml_path(path)
|
|
99
|
+
if not (path_is_toml or self._is_settings_path(path)):
|
|
100
|
+
return
|
|
101
|
+
|
|
102
|
+
# Find other path
|
|
103
|
+
other_path = (
|
|
104
|
+
self._toml_to_settings_path(path)
|
|
105
|
+
if path_is_toml
|
|
106
|
+
else self._settings_to_toml_path(path)
|
|
107
|
+
)
|
|
108
|
+
|
|
109
|
+
# Now we have either TOML or JSON setting files
|
|
110
|
+
# File needs deleting
|
|
111
|
+
if change == watchfiles.Change.deleted:
|
|
112
|
+
await self._unsync_watched_files(path, other_path)
|
|
113
|
+
|
|
114
|
+
# Files might need syncing
|
|
115
|
+
elif change == watchfiles.Change.added or change == watchfiles.Change.modified:
|
|
116
|
+
if await self._watched_files_need_sync(path, other_path):
|
|
117
|
+
await self._sync_watched_files(path, other_path)
|
|
118
|
+
|
|
119
|
+
async def _start_jupyter_server_extension(self, app):
|
|
120
|
+
self._event = asyncio.Event()
|
|
121
|
+
self._task = asyncio.create_task(self._event_loop())
|
|
122
|
+
|
|
123
|
+
async def stop_extension(self):
|
|
124
|
+
if self._event is not None:
|
|
125
|
+
self._event.set()
|
|
126
|
+
try:
|
|
127
|
+
await self._task
|
|
128
|
+
except asyncio.CancelledError:
|
|
129
|
+
pass
|
|
130
|
+
finally:
|
|
131
|
+
self._event = None
|
|
132
|
+
self._task = None
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "gennaker-tools",
|
|
3
|
+
"version": "0.1.3",
|
|
4
|
+
"description": "A JupyterLab extension to provide a restart-and-run-to-selected command variant that clears non-executed cell outputs.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"jupyter",
|
|
7
|
+
"jupyterlab",
|
|
8
|
+
"jupyterlab-extension"
|
|
9
|
+
],
|
|
10
|
+
"homepage": "https://github.com/agoose77/gennaker-tools",
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/agoose77/gennaker-tools/issues"
|
|
13
|
+
},
|
|
14
|
+
"license": "BSD-3-Clause",
|
|
15
|
+
"author": {
|
|
16
|
+
"name": "Angus",
|
|
17
|
+
"email": "angus@oieltd.com"
|
|
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
|
+
"schema/*.json",
|
|
23
|
+
"src/**/*.{ts,tsx}"
|
|
24
|
+
],
|
|
25
|
+
"main": "lib/index.js",
|
|
26
|
+
"types": "lib/index.d.ts",
|
|
27
|
+
"style": "style/index.css",
|
|
28
|
+
"repository": {
|
|
29
|
+
"type": "git",
|
|
30
|
+
"url": "https://github.com/agoose77/gennaker-tools.git"
|
|
31
|
+
},
|
|
32
|
+
"scripts": {
|
|
33
|
+
"build": "jlpm build:lib && jlpm build:labextension:dev",
|
|
34
|
+
"build:prod": "jlpm clean && jlpm build:lib:prod && jlpm build:labextension",
|
|
35
|
+
"build:labextension": "jupyter labextension build .",
|
|
36
|
+
"build:labextension:dev": "jupyter labextension build --development True .",
|
|
37
|
+
"build:lib": "tsc --sourceMap",
|
|
38
|
+
"build:lib:prod": "tsc",
|
|
39
|
+
"clean": "jlpm clean:lib",
|
|
40
|
+
"clean:lib": "rimraf lib tsconfig.tsbuildinfo",
|
|
41
|
+
"clean:lintcache": "rimraf .eslintcache .stylelintcache",
|
|
42
|
+
"clean:labextension": "rimraf gennaker_tools/labextension gennaker_tools/_version.py",
|
|
43
|
+
"clean:all": "jlpm clean:lib && jlpm clean:labextension && jlpm clean:lintcache",
|
|
44
|
+
"eslint": "jlpm eslint:check --fix",
|
|
45
|
+
"eslint:check": "eslint . --cache --ext .ts,.tsx",
|
|
46
|
+
"install:extension": "jlpm build",
|
|
47
|
+
"lint": "jlpm stylelint && jlpm prettier && jlpm eslint",
|
|
48
|
+
"lint:check": "jlpm stylelint:check && jlpm prettier:check && jlpm eslint:check",
|
|
49
|
+
"prettier": "jlpm prettier:base --write --list-different",
|
|
50
|
+
"prettier:base": "prettier \"**/*{.ts,.tsx,.js,.jsx,.css,.json,.md}\"",
|
|
51
|
+
"prettier:check": "jlpm prettier:base --check",
|
|
52
|
+
"stylelint": "jlpm stylelint:check --fix",
|
|
53
|
+
"stylelint:check": "stylelint --cache \"style/**/*.css\"",
|
|
54
|
+
"watch": "run-p watch:src watch:labextension",
|
|
55
|
+
"watch:src": "tsc -w --sourceMap",
|
|
56
|
+
"watch:labextension": "jupyter labextension watch ."
|
|
57
|
+
},
|
|
58
|
+
"dependencies": {
|
|
59
|
+
"@codemirror/autocomplete": "^6.0.1",
|
|
60
|
+
"@jupyterlab/application": "^4.4.0",
|
|
61
|
+
"@jupyterlab/codemirror": "^4.4.0",
|
|
62
|
+
"@jupyterlab/mainmenu": "^4.4.0",
|
|
63
|
+
"@jupyterlab/notebook": "^4.4.0"
|
|
64
|
+
},
|
|
65
|
+
"devDependencies": {
|
|
66
|
+
"@jupyterlab/builder": "^4.2.0",
|
|
67
|
+
"@types/json-schema": "^7.0.11",
|
|
68
|
+
"@types/react": "^18.0.26",
|
|
69
|
+
"@types/react-addons-linked-state-mixin": "^0.14.22",
|
|
70
|
+
"@typescript-eslint/eslint-plugin": "^6.1.0",
|
|
71
|
+
"@typescript-eslint/parser": "^6.1.0",
|
|
72
|
+
"css-loader": "^6.7.1",
|
|
73
|
+
"eslint": "^8.36.0",
|
|
74
|
+
"eslint-config-prettier": "^8.8.0",
|
|
75
|
+
"eslint-plugin-prettier": "^5.0.0",
|
|
76
|
+
"npm-run-all2": "^7.0.1",
|
|
77
|
+
"prettier": "^3.0.0",
|
|
78
|
+
"rimraf": "^5.0.1",
|
|
79
|
+
"source-map-loader": "^1.0.2",
|
|
80
|
+
"style-loader": "^3.3.1",
|
|
81
|
+
"stylelint": "^15.10.1",
|
|
82
|
+
"stylelint-config-recommended": "^13.0.0",
|
|
83
|
+
"stylelint-config-standard": "^34.0.0",
|
|
84
|
+
"stylelint-csstree-validator": "^3.0.0",
|
|
85
|
+
"stylelint-prettier": "^4.0.0",
|
|
86
|
+
"typescript": "~5.5.4",
|
|
87
|
+
"yjs": "^13.5.0"
|
|
88
|
+
},
|
|
89
|
+
"sideEffects": [
|
|
90
|
+
"style/*.css",
|
|
91
|
+
"style/index.js"
|
|
92
|
+
],
|
|
93
|
+
"styleModule": "style/index.js",
|
|
94
|
+
"publishConfig": {
|
|
95
|
+
"access": "public"
|
|
96
|
+
},
|
|
97
|
+
"jupyterlab": {
|
|
98
|
+
"extension": true,
|
|
99
|
+
"outputDir": "gennaker_tools/labextension",
|
|
100
|
+
"schemaDir": "schema",
|
|
101
|
+
"_build": {
|
|
102
|
+
"load": "static/remoteEntry.3e78bb25784889ba8b31.js",
|
|
103
|
+
"extension": "./extension",
|
|
104
|
+
"style": "./style"
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
"eslintIgnore": [
|
|
108
|
+
"node_modules",
|
|
109
|
+
"dist",
|
|
110
|
+
"coverage",
|
|
111
|
+
"**/*.d.ts"
|
|
112
|
+
],
|
|
113
|
+
"eslintConfig": {
|
|
114
|
+
"extends": [
|
|
115
|
+
"eslint:recommended",
|
|
116
|
+
"plugin:@typescript-eslint/eslint-recommended",
|
|
117
|
+
"plugin:@typescript-eslint/recommended",
|
|
118
|
+
"plugin:prettier/recommended"
|
|
119
|
+
],
|
|
120
|
+
"parser": "@typescript-eslint/parser",
|
|
121
|
+
"parserOptions": {
|
|
122
|
+
"project": "tsconfig.json",
|
|
123
|
+
"sourceType": "module"
|
|
124
|
+
},
|
|
125
|
+
"plugins": [
|
|
126
|
+
"@typescript-eslint"
|
|
127
|
+
],
|
|
128
|
+
"rules": {
|
|
129
|
+
"@typescript-eslint/naming-convention": [
|
|
130
|
+
"error",
|
|
131
|
+
{
|
|
132
|
+
"selector": "interface",
|
|
133
|
+
"format": [
|
|
134
|
+
"PascalCase"
|
|
135
|
+
],
|
|
136
|
+
"custom": {
|
|
137
|
+
"regex": "^I[A-Z]",
|
|
138
|
+
"match": true
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
],
|
|
142
|
+
"@typescript-eslint/no-unused-vars": [
|
|
143
|
+
"warn",
|
|
144
|
+
{
|
|
145
|
+
"args": "none"
|
|
146
|
+
}
|
|
147
|
+
],
|
|
148
|
+
"@typescript-eslint/no-explicit-any": "off",
|
|
149
|
+
"@typescript-eslint/no-namespace": "off",
|
|
150
|
+
"@typescript-eslint/no-use-before-define": "off",
|
|
151
|
+
"@typescript-eslint/quotes": [
|
|
152
|
+
"error",
|
|
153
|
+
"single",
|
|
154
|
+
{
|
|
155
|
+
"avoidEscape": true,
|
|
156
|
+
"allowTemplateLiterals": false
|
|
157
|
+
}
|
|
158
|
+
],
|
|
159
|
+
"curly": [
|
|
160
|
+
"error",
|
|
161
|
+
"all"
|
|
162
|
+
],
|
|
163
|
+
"eqeqeq": "error",
|
|
164
|
+
"prefer-arrow-callback": "error"
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
"prettier": {
|
|
168
|
+
"singleQuote": true,
|
|
169
|
+
"trailingComma": "none",
|
|
170
|
+
"arrowParens": "avoid",
|
|
171
|
+
"endOfLine": "auto",
|
|
172
|
+
"overrides": [
|
|
173
|
+
{
|
|
174
|
+
"files": "package.json",
|
|
175
|
+
"options": {
|
|
176
|
+
"tabWidth": 4
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
]
|
|
180
|
+
},
|
|
181
|
+
"stylelint": {
|
|
182
|
+
"extends": [
|
|
183
|
+
"stylelint-config-recommended",
|
|
184
|
+
"stylelint-config-standard",
|
|
185
|
+
"stylelint-prettier/recommended"
|
|
186
|
+
],
|
|
187
|
+
"plugins": [
|
|
188
|
+
"stylelint-csstree-validator"
|
|
189
|
+
],
|
|
190
|
+
"rules": {
|
|
191
|
+
"csstree/validator": true,
|
|
192
|
+
"property-no-vendor-prefix": null,
|
|
193
|
+
"selector-class-pattern": "^([a-z][A-z\\d]*)(-[A-z\\d]+)*$",
|
|
194
|
+
"selector-no-vendor-prefix": null,
|
|
195
|
+
"value-no-vendor-prefix": null
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "gennaker-tools",
|
|
3
|
+
"version": "0.1.3",
|
|
4
|
+
"description": "A JupyterLab extension to provide a restart-and-run-to-selected command variant that clears non-executed cell outputs.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"jupyter",
|
|
7
|
+
"jupyterlab",
|
|
8
|
+
"jupyterlab-extension"
|
|
9
|
+
],
|
|
10
|
+
"homepage": "https://github.com/agoose77/gennaker-tools",
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/agoose77/gennaker-tools/issues"
|
|
13
|
+
},
|
|
14
|
+
"license": "BSD-3-Clause",
|
|
15
|
+
"author": {
|
|
16
|
+
"name": "Angus",
|
|
17
|
+
"email": "angus@oieltd.com"
|
|
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
|
+
"schema/*.json",
|
|
23
|
+
"src/**/*.{ts,tsx}"
|
|
24
|
+
],
|
|
25
|
+
"main": "lib/index.js",
|
|
26
|
+
"types": "lib/index.d.ts",
|
|
27
|
+
"style": "style/index.css",
|
|
28
|
+
"repository": {
|
|
29
|
+
"type": "git",
|
|
30
|
+
"url": "https://github.com/agoose77/gennaker-tools.git"
|
|
31
|
+
},
|
|
32
|
+
"scripts": {
|
|
33
|
+
"build": "jlpm build:lib && jlpm build:labextension:dev",
|
|
34
|
+
"build:prod": "jlpm clean && jlpm build:lib:prod && jlpm build:labextension",
|
|
35
|
+
"build:labextension": "jupyter labextension build .",
|
|
36
|
+
"build:labextension:dev": "jupyter labextension build --development True .",
|
|
37
|
+
"build:lib": "tsc --sourceMap",
|
|
38
|
+
"build:lib:prod": "tsc",
|
|
39
|
+
"clean": "jlpm clean:lib",
|
|
40
|
+
"clean:lib": "rimraf lib tsconfig.tsbuildinfo",
|
|
41
|
+
"clean:lintcache": "rimraf .eslintcache .stylelintcache",
|
|
42
|
+
"clean:labextension": "rimraf gennaker_tools/labextension gennaker_tools/_version.py",
|
|
43
|
+
"clean:all": "jlpm clean:lib && jlpm clean:labextension && jlpm clean:lintcache",
|
|
44
|
+
"eslint": "jlpm eslint:check --fix",
|
|
45
|
+
"eslint:check": "eslint . --cache --ext .ts,.tsx",
|
|
46
|
+
"install:extension": "jlpm build",
|
|
47
|
+
"lint": "jlpm stylelint && jlpm prettier && jlpm eslint",
|
|
48
|
+
"lint:check": "jlpm stylelint:check && jlpm prettier:check && jlpm eslint:check",
|
|
49
|
+
"prettier": "jlpm prettier:base --write --list-different",
|
|
50
|
+
"prettier:base": "prettier \"**/*{.ts,.tsx,.js,.jsx,.css,.json,.md}\"",
|
|
51
|
+
"prettier:check": "jlpm prettier:base --check",
|
|
52
|
+
"stylelint": "jlpm stylelint:check --fix",
|
|
53
|
+
"stylelint:check": "stylelint --cache \"style/**/*.css\"",
|
|
54
|
+
"watch": "run-p watch:src watch:labextension",
|
|
55
|
+
"watch:src": "tsc -w --sourceMap",
|
|
56
|
+
"watch:labextension": "jupyter labextension watch ."
|
|
57
|
+
},
|
|
58
|
+
"dependencies": {
|
|
59
|
+
"@codemirror/autocomplete": "^6.0.1",
|
|
60
|
+
"@jupyterlab/application": "^4.4.0",
|
|
61
|
+
"@jupyterlab/codemirror": "^4.4.0",
|
|
62
|
+
"@jupyterlab/mainmenu": "^4.4.0",
|
|
63
|
+
"@jupyterlab/notebook": "^4.4.0"
|
|
64
|
+
},
|
|
65
|
+
"devDependencies": {
|
|
66
|
+
"@jupyterlab/builder": "^4.2.0",
|
|
67
|
+
"@types/json-schema": "^7.0.11",
|
|
68
|
+
"@types/react": "^18.0.26",
|
|
69
|
+
"@types/react-addons-linked-state-mixin": "^0.14.22",
|
|
70
|
+
"@typescript-eslint/eslint-plugin": "^6.1.0",
|
|
71
|
+
"@typescript-eslint/parser": "^6.1.0",
|
|
72
|
+
"css-loader": "^6.7.1",
|
|
73
|
+
"eslint": "^8.36.0",
|
|
74
|
+
"eslint-config-prettier": "^8.8.0",
|
|
75
|
+
"eslint-plugin-prettier": "^5.0.0",
|
|
76
|
+
"npm-run-all2": "^7.0.1",
|
|
77
|
+
"prettier": "^3.0.0",
|
|
78
|
+
"rimraf": "^5.0.1",
|
|
79
|
+
"source-map-loader": "^1.0.2",
|
|
80
|
+
"style-loader": "^3.3.1",
|
|
81
|
+
"stylelint": "^15.10.1",
|
|
82
|
+
"stylelint-config-recommended": "^13.0.0",
|
|
83
|
+
"stylelint-config-standard": "^34.0.0",
|
|
84
|
+
"stylelint-csstree-validator": "^3.0.0",
|
|
85
|
+
"stylelint-prettier": "^4.0.0",
|
|
86
|
+
"typescript": "~5.5.4",
|
|
87
|
+
"yjs": "^13.5.0"
|
|
88
|
+
},
|
|
89
|
+
"sideEffects": [
|
|
90
|
+
"style/*.css",
|
|
91
|
+
"style/index.js"
|
|
92
|
+
],
|
|
93
|
+
"styleModule": "style/index.js",
|
|
94
|
+
"publishConfig": {
|
|
95
|
+
"access": "public"
|
|
96
|
+
},
|
|
97
|
+
"jupyterlab": {
|
|
98
|
+
"extension": true,
|
|
99
|
+
"outputDir": "gennaker_tools/labextension",
|
|
100
|
+
"schemaDir": "schema"
|
|
101
|
+
},
|
|
102
|
+
"eslintIgnore": [
|
|
103
|
+
"node_modules",
|
|
104
|
+
"dist",
|
|
105
|
+
"coverage",
|
|
106
|
+
"**/*.d.ts"
|
|
107
|
+
],
|
|
108
|
+
"eslintConfig": {
|
|
109
|
+
"extends": [
|
|
110
|
+
"eslint:recommended",
|
|
111
|
+
"plugin:@typescript-eslint/eslint-recommended",
|
|
112
|
+
"plugin:@typescript-eslint/recommended",
|
|
113
|
+
"plugin:prettier/recommended"
|
|
114
|
+
],
|
|
115
|
+
"parser": "@typescript-eslint/parser",
|
|
116
|
+
"parserOptions": {
|
|
117
|
+
"project": "tsconfig.json",
|
|
118
|
+
"sourceType": "module"
|
|
119
|
+
},
|
|
120
|
+
"plugins": [
|
|
121
|
+
"@typescript-eslint"
|
|
122
|
+
],
|
|
123
|
+
"rules": {
|
|
124
|
+
"@typescript-eslint/naming-convention": [
|
|
125
|
+
"error",
|
|
126
|
+
{
|
|
127
|
+
"selector": "interface",
|
|
128
|
+
"format": [
|
|
129
|
+
"PascalCase"
|
|
130
|
+
],
|
|
131
|
+
"custom": {
|
|
132
|
+
"regex": "^I[A-Z]",
|
|
133
|
+
"match": true
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
],
|
|
137
|
+
"@typescript-eslint/no-unused-vars": [
|
|
138
|
+
"warn",
|
|
139
|
+
{
|
|
140
|
+
"args": "none"
|
|
141
|
+
}
|
|
142
|
+
],
|
|
143
|
+
"@typescript-eslint/no-explicit-any": "off",
|
|
144
|
+
"@typescript-eslint/no-namespace": "off",
|
|
145
|
+
"@typescript-eslint/no-use-before-define": "off",
|
|
146
|
+
"@typescript-eslint/quotes": [
|
|
147
|
+
"error",
|
|
148
|
+
"single",
|
|
149
|
+
{
|
|
150
|
+
"avoidEscape": true,
|
|
151
|
+
"allowTemplateLiterals": false
|
|
152
|
+
}
|
|
153
|
+
],
|
|
154
|
+
"curly": [
|
|
155
|
+
"error",
|
|
156
|
+
"all"
|
|
157
|
+
],
|
|
158
|
+
"eqeqeq": "error",
|
|
159
|
+
"prefer-arrow-callback": "error"
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
"prettier": {
|
|
163
|
+
"singleQuote": true,
|
|
164
|
+
"trailingComma": "none",
|
|
165
|
+
"arrowParens": "avoid",
|
|
166
|
+
"endOfLine": "auto",
|
|
167
|
+
"overrides": [
|
|
168
|
+
{
|
|
169
|
+
"files": "package.json",
|
|
170
|
+
"options": {
|
|
171
|
+
"tabWidth": 4
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
]
|
|
175
|
+
},
|
|
176
|
+
"stylelint": {
|
|
177
|
+
"extends": [
|
|
178
|
+
"stylelint-config-recommended",
|
|
179
|
+
"stylelint-config-standard",
|
|
180
|
+
"stylelint-prettier/recommended"
|
|
181
|
+
],
|
|
182
|
+
"plugins": [
|
|
183
|
+
"stylelint-csstree-validator"
|
|
184
|
+
],
|
|
185
|
+
"rules": {
|
|
186
|
+
"csstree/validator": true,
|
|
187
|
+
"property-no-vendor-prefix": null,
|
|
188
|
+
"selector-class-pattern": "^([a-z][A-z\\d]*)(-[A-z\\d]+)*$",
|
|
189
|
+
"selector-no-vendor-prefix": null,
|
|
190
|
+
"value-no-vendor-prefix": null
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "Gennaker Settings",
|
|
3
|
+
"description": "Gennaker tools settings.",
|
|
4
|
+
"jupyter.lab.menus": {
|
|
5
|
+
"main": [
|
|
6
|
+
{
|
|
7
|
+
"id": "jp-mainmenu-run",
|
|
8
|
+
"items": [
|
|
9
|
+
{
|
|
10
|
+
"command": "stateless:clear-restart-run-to-selected",
|
|
11
|
+
"rank": 80
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkgennaker_tools=self.webpackChunkgennaker_tools||[]).push([[509],{509:(e,t,o)=>{o.r(t),o.d(t,{default:()=>b,reloadPlugin:()=>c,snippetsPlugin:()=>m,statelessRunPlugin:()=>d});var n=o(389),a=o(827),r=o(591),s=o(460),l=o(505);const i="gennaker-tools:restart-run-stateless",p="gennaker-tools:reset-jupyterlab",d={id:"gennaker-tools:stateless-run",description:"A JupyterLab extension.",autoStart:!0,requires:[a.ICommandPalette,n.INotebookTracker],optional:[r.ITranslator],activate:(e,t,o,n)=>{const a=(null!=n?n:r.nullTranslator).load("jupyterlab"),{commands:s,shell:l}=e;console.log("JupyterLab extension gennaker-tools is activated!"),s.addCommand(i,{label:"Restart Kernel, Clear Outputs, and Run All Above Selected Cell",caption:"Clear all outputs, restart kernel, and run all cells above the selected cell",isEnabled:()=>(console.log("enabed",{tracker:o,shell:l}),null!==o.currentWidget&&o.currentWidget===l.currentWidget),execute:async e=>{const t=e.origin;console.log(`${i} has been called from... ${t}.`),"init"!==t&&await s.execute("apputils:run-all-enabled",{commands:["notebook:clear-all-cell-outputs","notebook:restart-and-run-to-selected"]})}});const p=a.__("Notebook Operations");t.addItem({command:i,category:p,args:{origin:"from palette"}})}},c={id:"gennaker-tools:reload",description:"A JupyterLab extension.",autoStart:!0,requires:[a.ICommandPalette],optional:[r.ITranslator],activate:(e,t,o)=>{const{commands:n}=e,a=(null!=o?o:r.nullTranslator).load("jupyterlab");n.addCommand(p,{label:"Reset JupyterLab",caption:"Reset JupyterLab",isEnabled:()=>!0,execute:e=>{"init"!==e.origin&&window.location.reload()}});const s=a.__("Reset");t.addItem({command:p,category:s,args:{origin:"from palette"}})}},u={properties:{snippets:{type:"array",title:"Codemirror snippets",description:"Snippets of the form accepted by Codemirrors snippetCompletion",items:{type:"object",properties:{type:{type:"string",enum:["class","constant","enum","function","interface","keyword","method","namespace","property","text","type","variable"]},body:{type:"string"},label:{type:"string"}},required:["type","body","label"]}}},additionalProperties:!1,type:"object"},m={id:"gennaker-tools:snippets",description:"A JupyterLab extension.",autoStart:!0,requires:[s.IEditorExtensionRegistry],optional:[],activate:(e,t)=>{t.addExtension(Object.freeze({name:"gennaker-tools:snippets",factory:()=>s.EditorExtensionRegistry.createConfigurableExtension(e=>(0,l.autocompletion)({override:[(0,l.completeFromList)(e.snippets.map(e=>{const{body:t,...o}=e;return(0,l.snippetCompletion)(t,o)}))]})),default:{snippets:[]},schema:u}))}},b=[d,c,m]}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkgennaker_tools=self.webpackChunkgennaker_tools||[]).push([[728],{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,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var a={},s=[],c=0;c<e.length;c++){var i=e[c],u=r.base?i[0]+r.base:i[0],l=a[u]||0,p="".concat(u," ").concat(l);a[u]=l+1;var f=n(p),d={css:i[1],media:i[2],sourceMap:i[3],supports:i[4],layer:i[5]};if(-1!==f)t[f].references++,t[f].updater(d);else{var v=o(d,r);r.byIndex=c,t.splice(c,0,{identifier:p,updater:v,references:1})}s.push(p)}return s}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 s=0;s<a.length;s++){var c=n(a[s]);t[c].references--}for(var i=r(e,o),u=0;u<a.length;u++){var l=n(a[u]);0===t[l].references&&(t[l].updater(),t.splice(l,1))}a=i}}},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="",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 s={};if(r)for(var c=0;c<this.length;c++){var i=this[c][0];null!=i&&(s[i]=!0)}for(var u=0;u<e.length;u++){var l=[].concat(e[u]);r&&s[l[0]]||(void 0!==a&&(void 0===l[5]||(l[1]="@layer".concat(l[5].length>0?" ".concat(l[5]):""," {").concat(l[1],"}")),l[5]=a),n&&(l[2]?(l[1]="@media ".concat(l[2]," {").concat(l[1],"}"),l[2]=n):l[2]=n),o&&(l[4]?(l[1]="@supports (".concat(l[4],") {").concat(l[1],"}"),l[4]=o):l[4]="".concat(o)),t.push(l))}},t}},475:(e,t,n)=>{n.d(t,{A:()=>c});var r=n(601),o=n.n(r),a=n(314),s=n.n(a)()(o());s.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 c=s},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 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)}},728:(e,t,n)=>{var r=n(72),o=n.n(r),a=n(825),s=n.n(a),c=n(659),i=n.n(c),u=n(56),l=n.n(u),p=n(540),f=n.n(p),d=n(113),v=n.n(d),h=n(475),m={};m.styleTagTransform=v(),m.setAttributes=l(),m.insert=i().bind(null,"head"),m.domAPI=s(),m.insertStyleElement=f(),o()(h.A,m),h.A&&h.A.locals&&h.A.locals},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 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)}}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkgennaker_tools=self.webpackChunkgennaker_tools||[]).push([[747],{747:(e,t,n)=>{n.r(t),n.d(t,{CompletionContext:()=>l,acceptCompletion:()=>j,autocompletion:()=>He,clearSnippet:()=>he,closeBrackets:()=>Te,closeBracketsKeymap:()=>Be,closeCompletion:()=>K,completeAnyWord:()=>ke,completeFromList:()=>a,completionKeymap:()=>Ke,completionStatus:()=>_e,currentCompletions:()=>Ye,deleteBracketPair:()=>Fe,hasNextSnippetField:()=>fe,hasPrevSnippetField:()=>ue,ifIn:()=>c,ifNotIn:()=>h,insertBracket:()=>$e,insertCompletionText:()=>m,moveCompletionSelection:()=>q,nextSnippetField:()=>pe,pickedCompletion:()=>u,prevSnippetField:()=>de,selectedCompletion:()=>Ge,selectedCompletionIndex:()=>Je,setSelectedCompletion:()=>Ze,snippet:()=>ae,snippetCompletion:()=>be,snippetKeymap:()=>ge,startCompletion:()=>H});var o=n(195),i=n(24),s=n(84);class l{constructor(e,t,n,o){this.state=e,this.pos=t,this.explicit=n,this.view=o,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=(0,s.syntaxTree)(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),n=Math.max(t.from,this.pos-250),o=t.text.slice(n-t.from,this.pos-t.from),i=o.search(f(e,!1));return i<0?null:{from:n+i,to:this.pos,text:o.slice(i)}}get aborted(){return null==this.abortListeners}addEventListener(e,t,n){"abort"==e&&this.abortListeners&&(this.abortListeners.push(t),n&&n.onDocChange&&(this.abortOnDocChange=!0))}}function r(e){let t=Object.keys(e).join(""),n=/\w/.test(t);return n&&(t=t.replace(/\w/g,"")),`[${n?"\\w":""}${t.replace(/[^\w\s]/g,"\\$&")}]`}function a(e){let t=e.map(e=>"string"==typeof e?{label:e}:e),[n,o]=t.every(e=>/^\w+$/.test(e.label))?[/\w*$/,/\w+$/]:function(e){let t=Object.create(null),n=Object.create(null);for(let{label:o}of e){t[o[0]]=!0;for(let e=1;e<o.length;e++)n[o[e]]=!0}let o=r(t)+r(n)+"*$";return[new RegExp("^"+o),new RegExp(o)]}(t);return e=>{let i=e.matchBefore(o);return i||e.explicit?{from:i?i.from:e.pos,options:t,validFor:n}:null}}function c(e,t){return n=>{for(let o=(0,s.syntaxTree)(n.state).resolveInner(n.pos,-1);o;o=o.parent){if(e.indexOf(o.name)>-1)return t(n);if(o.type.isTop)break}return null}}function h(e,t){return n=>{for(let t=(0,s.syntaxTree)(n.state).resolveInner(n.pos,-1);t;t=t.parent){if(e.indexOf(t.name)>-1)return null;if(t.type.isTop)break}return t(n)}}class p{constructor(e,t,n,o){this.completion=e,this.source=t,this.match=n,this.score=o}}function d(e){return e.selection.main.from}function f(e,t){var n;let{source:o}=e,i=t&&"^"!=o[0],s="$"!=o[o.length-1];return i||s?new RegExp(`${i?"^":""}(?:${o})${s?"$":""}`,null!==(n=e.flags)&&void 0!==n?n:e.ignoreCase?"i":""):e}const u=o.Annotation.define();function m(e,t,n,i){let{main:s}=e.selection,l=n-s.from,r=i-s.from;return{...e.changeByRange(a=>{if(a!=s&&n!=i&&e.sliceDoc(a.from+l,a.from+r)!=e.sliceDoc(n,i))return{range:a};let c=e.toText(t);return{changes:{from:a.from+l,to:i==s.from?a.to:a.from+r,insert:c},range:o.EditorSelection.cursor(a.from+l+c.length)}}),scrollIntoView:!0,userEvent:"input.complete"}}const g=new WeakMap;function v(e){if(!Array.isArray(e))return e;let t=g.get(e);return t||g.set(e,t=a(e)),t}const b=o.StateEffect.define(),y=o.StateEffect.define();class w{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t<e.length;){let n=(0,o.codePointAt)(e,t),i=(0,o.codePointSize)(n);this.chars.push(n);let s=e.slice(t,t+i),l=s.toUpperCase();this.folded.push((0,o.codePointAt)(l==s?s.toLowerCase():l,0)),t+=i}this.astral=e.length!=this.chars.length}ret(e,t){return this.score=e,this.matched=t,this}match(e){if(0==this.pattern.length)return this.ret(-100,[]);if(e.length<this.pattern.length)return null;let{chars:t,folded:n,any:i,precise:s,byWord:l}=this;if(1==t.length){let i=(0,o.codePointAt)(e,0),s=(0,o.codePointSize)(i),l=s==e.length?0:-100;if(i==t[0]);else{if(i!=n[0])return null;l+=-200}return this.ret(l,[0,s])}let r=e.indexOf(this.pattern);if(0==r)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let a=t.length,c=0;if(r<0){for(let s=0,l=Math.min(e.length,200);s<l&&c<a;){let l=(0,o.codePointAt)(e,s);l!=t[c]&&l!=n[c]||(i[c++]=s),s+=(0,o.codePointSize)(l)}if(c<a)return null}let h=0,p=0,d=!1,f=0,u=-1,m=-1,g=/[a-z]/.test(e),v=!0;for(let i=0,c=Math.min(e.length,200),b=0;i<c&&p<a;){let c=(0,o.codePointAt)(e,i);r<0&&(h<a&&c==t[h]&&(s[h++]=i),f<a&&(c==t[f]||c==n[f]?(0==f&&(u=i),m=i+1,f++):f=0));let y,w=c<255?c>=48&&c<=57||c>=97&&c<=122?2:c>=65&&c<=90?1:0:(y=(0,o.fromCodePoint)(c))!=y.toLowerCase()?1:y!=y.toUpperCase()?2:0;(!i||1==w&&g||0==b&&0!=w)&&(t[p]==c||n[p]==c&&(d=!0)?l[p++]=i:l.length&&(v=!1)),b=w,i+=(0,o.codePointSize)(c)}return p==a&&0==l[0]&&v?this.result((d?-200:0)-100,l,e):f==a&&0==u?this.ret(-200-e.length+(m==e.length?0:-100),[0,m]):r>-1?this.ret(-700-e.length,[r,r+this.pattern.length]):f==a?this.ret(-900-e.length,[u,m]):p==a?this.result((d?-200:0)-100-700+(v?0:-1100),l,e):2==t.length?null:this.result((i[0]?-700:0)-200-1100,i,e)}result(e,t,n){let i=[],s=0;for(let e of t){let t=e+(this.astral?(0,o.codePointSize)((0,o.codePointAt)(n,e)):1);s&&i[s-1]==e?i[s-1]=t:(i[s++]=e,i[s++]=t)}return this.ret(e-n.length,i)}}class x{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length<this.pattern.length)return null;let t=e.slice(0,this.pattern.length),n=t==this.pattern?0:t.toLowerCase()==this.folded?-200:null;return null==n?null:(this.matched=[0,t.length],this.score=n+(e.length==this.pattern.length?0:-100),this)}}const C=o.Facet.define({combine:e=>(0,o.combineConfig)(e,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:k,filterStrict:!1,compareCompletions:(e,t)=>e.label.localeCompare(t.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>n=>S(e(n),t(n)),optionClass:(e,t)=>n=>S(e(n),t(n)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})});function S(e,t){return e?t?e+" "+t:e:t}function k(e,t,n,o,s,l){let r,a,c=e.textDirection==i.Direction.RTL,h=c,p=!1,d="top",f=t.left-s.left,u=s.right-t.right,m=o.right-o.left,g=o.bottom-o.top;if(h&&f<Math.min(m,u)?h=!1:!h&&u<Math.min(m,f)&&(h=!0),m<=(h?f:u))r=Math.max(s.top,Math.min(n.top,s.bottom-g))-t.top,a=Math.min(400,h?f:u);else{p=!0,a=Math.min(400,(c?t.right:s.right-t.left)-30);let e=s.bottom-t.bottom;e>=g||e>t.top?r=n.bottom-t.top:(d="bottom",r=t.bottom-n.top)}return{style:`${d}: ${r/((t.bottom-t.top)/l.offsetHeight)}px; max-width: ${a/((t.right-t.left)/l.offsetWidth)}px`,class:"cm-completionInfo-"+(p?c?"left-narrow":"right-narrow":h?"left":"right")}}function I(e,t,n){if(e<=n)return{from:0,to:e};if(t<0&&(t=0),t<=e>>1){let e=Math.floor(t/n);return{from:e*n,to:(e+1)*n}}let o=Math.floor((e-t)/n);return{from:e-(o+1)*n,to:e-o*n}}class E{constructor(e,t,n){this.view=e,this.stateField=t,this.applyCompletion=n,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:e=>this.placeInfo(e),key:this},this.space=null,this.currentClass="";let o=e.state.field(t),{options:i,selected:s}=o.open,l=e.state.facet(C);this.optionContent=function(e){let t=e.addToOptions.slice();return e.icons&&t.push({render(e){let t=document.createElement("div");return t.classList.add("cm-completionIcon"),e.type&&t.classList.add(...e.type.split(/\s+/g).map(e=>"cm-completionIcon-"+e)),t.setAttribute("aria-hidden","true"),t},position:20}),t.push({render(e,t,n,o){let i=document.createElement("span");i.className="cm-completionLabel";let s=e.displayLabel||e.label,l=0;for(let e=0;e<o.length;){let t=o[e++],n=o[e++];t>l&&i.appendChild(document.createTextNode(s.slice(l,t)));let r=i.appendChild(document.createElement("span"));r.appendChild(document.createTextNode(s.slice(t,n))),r.className="cm-completionMatchedText",l=n}return l<s.length&&i.appendChild(document.createTextNode(s.slice(l))),i},position:50},{render(e){if(!e.detail)return null;let t=document.createElement("span");return t.className="cm-completionDetail",t.textContent=e.detail,t},position:80}),t.sort((e,t)=>e.position-t.position).map(e=>e.render)}(l),this.optionClass=l.optionClass,this.tooltipClass=l.tooltipClass,this.range=I(i.length,s,l.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",n=>{let{options:o}=e.state.field(t).open;for(let t,i=n.target;i&&i!=this.dom;i=i.parentNode)if("LI"==i.nodeName&&(t=/-(\d+)$/.exec(i.id))&&+t[1]<o.length)return this.applyCompletion(e,o[+t[1]]),void n.preventDefault()}),this.dom.addEventListener("focusout",t=>{let n=e.state.field(this.stateField,!1);n&&n.tooltip&&e.state.facet(C).closeOnBlur&&t.relatedTarget!=e.contentDOM&&e.dispatch({effects:y.of(null)})}),this.showOptions(i,o.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var t;let n=e.state.field(this.stateField),o=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),n!=o){let{options:i,selected:s,disabled:l}=n.open;o.open&&o.open.options==i||(this.range=I(i.length,s,e.state.facet(C).maxRenderedOptions),this.showOptions(i,n.id)),this.updateSel(),l!=(null===(t=o.open)||void 0===t?void 0:t.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!l)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let e of this.currentClass.split(" "))e&&this.dom.classList.remove(e);for(let e of t.split(" "))e&&this.dom.classList.add(e);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;(t.selected>-1&&t.selected<this.range.from||t.selected>=this.range.to)&&(this.range=I(t.options.length,t.selected,this.view.state.facet(C).maxRenderedOptions),this.showOptions(t.options,e.id));let n=this.updateSelectedOption(t.selected);if(n){this.destroyInfo();let{completion:o}=t.options[t.selected],{info:s}=o;if(!s)return;let l="string"==typeof s?document.createTextNode(s):s(o);if(!l)return;"then"in l?l.then(t=>{t&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(t,o)}).catch(e=>(0,i.logException)(this.view.state,e,"completion info")):(this.addInfoPane(l,o),n.setAttribute("aria-describedby",this.info.id))}}addInfoPane(e,t){this.destroyInfo();let n=this.info=document.createElement("div");if(n.className="cm-tooltip cm-completionInfo",n.id="cm-completionInfo-"+Math.floor(65535*Math.random()).toString(16),null!=e.nodeType)n.appendChild(e),this.infoDestroy=null;else{let{dom:t,destroy:o}=e;n.appendChild(t),this.infoDestroy=o||null}this.dom.appendChild(n),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let n=this.list.firstChild,o=this.range.from;n;n=n.nextSibling,o++)"LI"==n.nodeName&&n.id?o==e?n.hasAttribute("aria-selected")||(n.setAttribute("aria-selected","true"),t=n):n.hasAttribute("aria-selected")&&(n.removeAttribute("aria-selected"),n.removeAttribute("aria-describedby")):o--;return t&&function(e,t){let n=e.getBoundingClientRect(),o=t.getBoundingClientRect(),i=n.height/e.offsetHeight;o.top<n.top?e.scrollTop-=(n.top-o.top)/i:o.bottom>n.bottom&&(e.scrollTop+=(o.bottom-n.bottom)/i)}(this.list,t),t}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),n=this.info.getBoundingClientRect(),o=e.getBoundingClientRect(),i=this.space;if(!i){let e=this.dom.ownerDocument.documentElement;i={left:0,top:0,right:e.clientWidth,bottom:e.clientHeight}}return o.top>Math.min(i.bottom,t.bottom)-10||o.bottom<Math.max(i.top,t.top)+10?null:this.view.state.facet(C).positionInfo(this.view,t,o,n,i,this.dom)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className="cm-tooltip cm-completionInfo "+(e.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(e,t,n){const o=document.createElement("ul");o.id=t,o.setAttribute("role","listbox"),o.setAttribute("aria-expanded","true"),o.setAttribute("aria-label",this.view.state.phrase("Completions")),o.addEventListener("mousedown",e=>{e.target==o&&e.preventDefault()});let i=null;for(let s=n.from;s<n.to;s++){let{completion:l,match:r}=e[s],{section:a}=l;if(a){let e="string"==typeof a?a:a.name;e!=i&&(s>n.from||0==n.from)&&(i=e,"string"!=typeof a&&a.header?o.appendChild(a.header(a)):o.appendChild(document.createElement("completion-section")).textContent=e)}const c=o.appendChild(document.createElement("li"));c.id=t+"-"+s,c.setAttribute("role","option");let h=this.optionClass(l);h&&(c.className=h);for(let e of this.optionContent){let t=e(l,this.view.state,this.view,r);t&&c.appendChild(t)}}return n.from&&o.classList.add("cm-completionListIncompleteTop"),n.to<e.length&&o.classList.add("cm-completionListIncompleteBottom"),o}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}}function P(e,t){return n=>new E(n,e,t)}function A(e){return 100*(e.boost||0)+(e.apply?10:0)+(e.info?5:0)+(e.type?1:0)}class T{constructor(e,t,n,o,i,s){this.options=e,this.attrs=t,this.tooltip=n,this.timestamp=o,this.selected=i,this.disabled=s}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new T(this.options,R(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,n,o,i,s){if(o&&!s&&e.some(e=>e.isPending))return o.setDisabled();let l=function(e,t){let n=[],o=null,i=null,s=e=>{n.push(e);let{section:t}=e.completion;if(t){o||(o=[]);let e="string"==typeof t?t:t.name;o.some(t=>t.name==e)||o.push("string"==typeof t?{name:e}:t)}},l=t.facet(C);for(let o of e)if(o.hasResult()){let e=o.result.getMatch;if(!1===o.result.filter)for(let t of o.result.options)s(new p(t,o.source,e?e(t):[],1e9-n.length));else{let n,r=t.sliceDoc(o.from,o.to),a=l.filterStrict?new x(r):new w(r);for(let t of o.result.options)if(n=a.match(t.label)){let l=t.displayLabel?e?e(t,n.matched):[]:n.matched,r=n.score+(t.boost||0);if(s(new p(t,o.source,l,r)),"object"==typeof t.section&&"dynamic"===t.section.rank){let{name:e}=t.section;i||(i=Object.create(null)),i[e]=Math.max(r,i[e]||-1e9)}}}}if(o){let e=Object.create(null),t=0,s=(e,t)=>("dynamic"===e.rank&&"dynamic"===t.rank?i[t.name]-i[e.name]:0)||("number"==typeof e.rank?e.rank:1e9)-("number"==typeof t.rank?t.rank:1e9)||(e.name<t.name?-1:1);for(let n of o.sort(s))t-=1e5,e[n.name]=t;for(let t of n){let{section:n}=t.completion;n&&(t.score+=e["string"==typeof n?n:n.name])}}let r=[],a=null,c=l.compareCompletions;for(let e of n.sort((e,t)=>t.score-e.score||c(e.completion,t.completion))){let t=e.completion;!a||a.label!=t.label||a.detail!=t.detail||null!=a.type&&null!=t.type&&a.type!=t.type||a.apply!=t.apply||a.boost!=t.boost?r.push(e):A(e.completion)>A(a)&&(r[r.length-1]=e),a=e.completion}return r}(e,t);if(!l.length)return o&&e.some(e=>e.isPending)?o.setDisabled():null;let r=t.facet(C).selectOnOpen?0:-1;if(o&&o.selected!=r&&-1!=o.selected){let e=o.options[o.selected].completion;for(let t=0;t<l.length;t++)if(l[t].completion==e){r=t;break}}return new T(l,R(n,r),{pos:e.reduce((e,t)=>t.hasResult()?Math.min(e,t.from):e,1e8),create:z,above:i.aboveCursor},o?o.timestamp:Date.now(),r,!1)}map(e){return new T(this.options,this.attrs,{...this.tooltip,pos:e.mapPos(this.tooltip.pos)},this.timestamp,this.selected,this.disabled)}setDisabled(){return new T(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class D{constructor(e,t,n){this.active=e,this.id=t,this.open=n}static start(){return new D(L,"cm-ac-"+Math.floor(2e6*Math.random()).toString(36),null)}update(e){let{state:t}=e,n=t.facet(C),o=(n.override||t.languageDataAt("autocomplete",d(t)).map(v)).map(t=>(this.active.find(e=>e.source==t)||new B(t,this.active.some(e=>0!=e.state)?1:0)).update(e,n));o.length==this.active.length&&o.every((e,t)=>e==this.active[t])&&(o=this.active);let i=this.open,s=e.effects.some(e=>e.is(N));i&&e.docChanged&&(i=i.map(e.changes)),e.selection||o.some(t=>t.hasResult()&&e.changes.touchesRange(t.from,t.to))||!function(e,t){if(e==t)return!0;for(let n=0,o=0;;){for(;n<e.length&&!e[n].hasResult();)n++;for(;o<t.length&&!t[o].hasResult();)o++;let i=n==e.length,s=o==t.length;if(i||s)return i==s;if(e[n++].result!=t[o++].result)return!1}}(o,this.active)||s?i=T.build(o,t,this.id,i,n,s):i&&i.disabled&&!o.some(e=>e.isPending)&&(i=null),!i&&o.every(e=>!e.isPending)&&o.some(e=>e.hasResult())&&(o=o.map(e=>e.hasResult()?new B(e.source,0):e));for(let t of e.effects)t.is(W)&&(i=i&&i.setSelected(t.value,this.id));return o==this.active&&i==this.open?this:new D(o,this.id,i)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?O:M}}const O={"aria-autocomplete":"list"},M={};function R(e,t){let n={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":e};return t>-1&&(n["aria-activedescendant"]=e+"-"+t),n}const L=[];function F(e,t){if(e.isUserEvent("input.complete")){let n=e.annotation(u);if(n&&t.activateOnCompletion(n))return 12}let n=e.isUserEvent("input.type");return n&&t.activateOnTyping?5:n?1:e.isUserEvent("delete.backward")?2:e.selection?8:e.docChanged?16:0}class B{constructor(e,t,n=!1){this.source=e,this.state=t,this.explicit=n}hasResult(){return!1}get isPending(){return 1==this.state}update(e,t){let n=F(e,t),o=this;(8&n||16&n&&this.touches(e))&&(o=new B(o.source,0)),4&n&&0==o.state&&(o=new B(this.source,1)),o=o.updateFor(e,n);for(let t of e.effects)if(t.is(b))o=new B(o.source,1,t.value);else if(t.is(y))o=new B(o.source,0);else if(t.is(N))for(let e of t.value)e.source==o.source&&(o=e);return o}updateFor(e,t){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(d(e.state))}}class $ extends B{constructor(e,t,n,o,i,s){super(e,3,t),this.limit=n,this.result=o,this.from=i,this.to=s}hasResult(){return!0}updateFor(e,t){var n;if(!(3&t))return this.map(e.changes);let o=this.result;o.map&&!e.changes.empty&&(o=o.map(o,e.changes));let i=e.changes.mapPos(this.from),s=e.changes.mapPos(this.to,1),r=d(e.state);if(r>s||!o||2&t&&(d(e.startState)==this.from||r<this.limit))return new B(this.source,4&t?1:0);let a=e.changes.mapPos(this.limit);return function(e,t,n,o){if(!e)return!1;let i=t.sliceDoc(n,o);return"function"==typeof e?e(i,n,o,t):f(e,!0).test(i)}(o.validFor,e.state,i,s)?new $(this.source,this.explicit,a,o,i,s):o.update&&(o=o.update(o,i,s,new l(e.state,r,!1)))?new $(this.source,this.explicit,a,o,o.from,null!==(n=o.to)&&void 0!==n?n:d(e.state)):new B(this.source,1,this.explicit)}map(e){return e.empty?this:(this.result.map?this.result.map(this.result,e):this.result)?new $(this.source,this.explicit,e.mapPos(this.limit),this.result,e.mapPos(this.from),e.mapPos(this.to,1)):new B(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}}const N=o.StateEffect.define({map:(e,t)=>e.map(e=>e.map(t))}),W=o.StateEffect.define(),U=o.StateField.define({create:()=>D.start(),update:(e,t)=>e.update(t),provide:e=>[i.showTooltip.from(e,e=>e.tooltip),i.EditorView.contentAttributes.from(e,e=>e.attrs)]});function V(e,t){const n=t.completion.apply||t.completion.label;let o=e.state.field(U).active.find(e=>e.source==t.source);return o instanceof $&&("string"==typeof n?e.dispatch({...m(e.state,n,o.from,o.to),annotations:u.of(t.completion)}):n(e,t.completion,o.from,o.to),!0)}const z=P(U,V);function q(e,t="option"){return n=>{let o=n.state.field(U,!1);if(!o||!o.open||o.open.disabled||Date.now()-o.open.timestamp<n.state.facet(C).interactionDelay)return!1;let s,l=1;"page"==t&&(s=(0,i.getTooltip)(n,o.open.tooltip))&&(l=Math.max(2,Math.floor(s.dom.offsetHeight/s.dom.querySelector("li").offsetHeight)-1));let{length:r}=o.open.options,a=o.open.selected>-1?o.open.selected+l*(e?1:-1):e?0:r-1;return a<0?a="page"==t?0:r-1:a>=r&&(a="page"==t?r-1:0),n.dispatch({effects:W.of(a)}),!0}}const j=e=>{let t=e.state.field(U,!1);return!(e.state.readOnly||!t||!t.open||t.open.selected<0||t.open.disabled||Date.now()-t.open.timestamp<e.state.facet(C).interactionDelay)&&V(e,t.open.options[t.open.selected])},H=e=>!!e.state.field(U,!1)&&(e.dispatch({effects:b.of(!0)}),!0),K=e=>{let t=e.state.field(U,!1);return!(!t||!t.active.some(e=>0!=e.state)||(e.dispatch({effects:y.of(null)}),0))};class Q{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}}const _=i.ViewPlugin.fromClass(class{constructor(e){this.view=e,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let t of e.state.field(U).active)t.isPending&&this.startQuery(t)}update(e){let t=e.state.field(U),n=e.state.facet(C);if(!e.selectionSet&&!e.docChanged&&e.startState.field(U)==t)return;let o=e.transactions.some(e=>{let t=F(e,n);return 8&t||(e.selection||e.docChanged)&&!(3&t)});for(let t=0;t<this.running.length;t++){let n=this.running[t];if(o||n.context.abortOnDocChange&&e.docChanged||n.updates.length+e.transactions.length>50&&Date.now()-n.time>1e3){for(let e of n.context.abortListeners)try{e()}catch(e){(0,i.logException)(this.view.state,e)}n.context.abortListeners=null,this.running.splice(t--,1)}else n.updates.push(...e.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),e.transactions.some(e=>e.effects.some(e=>e.is(b)))&&(this.pendingStart=!0);let s=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=t.active.some(e=>e.isPending&&!this.running.some(t=>t.active.source==e.source))?setTimeout(()=>this.startUpdate(),s):-1,0!=this.composing)for(let t of e.transactions)t.isUserEvent("input.type")?this.composing=2:2==this.composing&&t.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:e}=this.view,t=e.field(U);for(let e of t.active)e.isPending&&!this.running.some(t=>t.active.source==e.source)&&this.startQuery(e);this.running.length&&t.open&&t.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(C).updateSyncTime))}startQuery(e){let{state:t}=this.view,n=d(t),o=new l(t,n,e.explicit,this.view),s=new Q(e,o);this.running.push(s),Promise.resolve(e.source(o)).then(e=>{s.context.aborted||(s.done=e||null,this.scheduleAccept())},e=>{this.view.dispatch({effects:y.of(null)}),(0,i.logException)(this.view.state,e)})}scheduleAccept(){this.running.every(e=>void 0!==e.done)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(C).updateSyncTime))}accept(){var e;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let t=[],n=this.view.state.facet(C),o=this.view.state.field(U);for(let i=0;i<this.running.length;i++){let s=this.running[i];if(void 0===s.done)continue;if(this.running.splice(i--,1),s.done){let o=d(s.updates.length?s.updates[0].startState:this.view.state),i=Math.min(o,s.done.from+(s.active.explicit?0:1)),l=new $(s.active.source,s.active.explicit,i,s.done,s.done.from,null!==(e=s.done.to)&&void 0!==e?e:o);for(let e of s.updates)l=l.update(e,n);if(l.hasResult()){t.push(l);continue}}let l=o.active.find(e=>e.source==s.active.source);if(l&&l.isPending)if(null==s.done){let e=new B(s.active.source,0);for(let t of s.updates)e=e.update(t,n);e.isPending||t.push(e)}else this.startQuery(l)}(t.length||o.open&&o.open.disabled)&&this.view.dispatch({effects:N.of(t)})}},{eventHandlers:{blur(e){let t=this.view.state.field(U,!1);if(t&&t.tooltip&&this.view.state.facet(C).closeOnBlur){let n=t.open&&(0,i.getTooltip)(this.view,t.open.tooltip);n&&n.dom.contains(e.relatedTarget)||setTimeout(()=>this.view.dispatch({effects:y.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){3==this.composing&&setTimeout(()=>this.view.dispatch({effects:b.of(!1)}),20),this.composing=0}}}),X="object"==typeof navigator&&/Win/.test(navigator.platform),Y=o.Prec.highest(i.EditorView.domEventHandlers({keydown(e,t){let n=t.state.field(U,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||e.key.length>1||e.ctrlKey&&(!X||!e.altKey)||e.metaKey)return!1;let o=n.open.options[n.open.selected],i=n.active.find(e=>e.source==o.source),s=o.completion.commitCharacters||i.result.commitCharacters;return s&&s.indexOf(e.key)>-1&&V(t,o),!1}})),G=i.EditorView.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class J{constructor(e,t,n,o){this.field=e,this.line=t,this.from=n,this.to=o}}class Z{constructor(e,t,n){this.field=e,this.from=t,this.to=n}map(e){let t=e.mapPos(this.from,-1,o.MapMode.TrackDel),n=e.mapPos(this.to,1,o.MapMode.TrackDel);return null==t||null==n?null:new Z(this.field,t,n)}}class ee{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let n=[],o=[t],i=e.doc.lineAt(t),l=/^\s*/.exec(i.text)[0];for(let i of this.lines){if(n.length){let n=l,r=/^\t*/.exec(i)[0].length;for(let t=0;t<r;t++)n+=e.facet(s.indentUnit);o.push(t+n.length-r),i=n+i.slice(r)}n.push(i),t+=i.length+1}let r=this.fieldPositions.map(e=>new Z(e.field,o[e.line]+e.from,o[e.line]+e.to));return{text:n,ranges:r}}static parse(e){let t,n=[],o=[],i=[];for(let s of e.split(/\r\n?|\n/)){for(;t=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(s);){let e=t[1]?+t[1]:null,l=t[2]||t[3]||"",r=-1,a=l.replace(/\\[{}]/g,e=>e[1]);for(let t=0;t<n.length;t++)(null!=e?n[t].seq==e:a&&n[t].name==a)&&(r=t);if(r<0){let t=0;for(;t<n.length&&(null==e||null!=n[t].seq&&n[t].seq<e);)t++;n.splice(t,0,{seq:e,name:a}),r=t;for(let e of i)e.field>=r&&e.field++}for(let e of i)if(e.line==o.length&&e.from>t.index){let n=t[2]?3+(t[1]||"").length:2;e.from-=n,e.to-=n}i.push(new J(r,o.length,t.index,t.index+a.length)),s=s.slice(0,t.index)+l+s.slice(t.index+t[0].length)}s=s.replace(/\\([{}])/g,(e,t,n)=>{for(let e of i)e.line==o.length&&e.from>n&&(e.from--,e.to--);return t}),o.push(s)}return new ee(o,i)}}let te=i.Decoration.widget({widget:new class extends i.WidgetType{toDOM(){let e=document.createElement("span");return e.className="cm-snippetFieldPosition",e}ignoreEvent(){return!1}}}),ne=i.Decoration.mark({class:"cm-snippetField"});class oe{constructor(e,t){this.ranges=e,this.active=t,this.deco=i.Decoration.set(e.map(e=>(e.from==e.to?te:ne).range(e.from,e.to)),!0)}map(e){let t=[];for(let n of this.ranges){let o=n.map(e);if(!o)return null;t.push(o)}return new oe(t,this.active)}selectionInsideField(e){return e.ranges.every(e=>this.ranges.some(t=>t.field==this.active&&t.from<=e.from&&t.to>=e.to))}}const ie=o.StateEffect.define({map:(e,t)=>e&&e.map(t)}),se=o.StateEffect.define(),le=o.StateField.define({create:()=>null,update(e,t){for(let n of t.effects){if(n.is(ie))return n.value;if(n.is(se)&&e)return new oe(e.ranges,n.value)}return e&&t.docChanged&&(e=e.map(t.changes)),e&&t.selection&&!e.selectionInsideField(t.selection)&&(e=null),e},provide:e=>i.EditorView.decorations.from(e,e=>e?e.deco:i.Decoration.none)});function re(e,t){return o.EditorSelection.create(e.filter(e=>e.field==t).map(e=>o.EditorSelection.range(e.from,e.to)))}function ae(e){let t=ee.parse(e);return(e,n,i,s)=>{let{text:l,ranges:r}=t.instantiate(e.state,i),{main:a}=e.state.selection,c={changes:{from:i,to:s==a.from?a.to:s,insert:o.Text.of(l)},scrollIntoView:!0,annotations:n?[u.of(n),o.Transaction.userEvent.of("input.complete")]:void 0};if(r.length&&(c.selection=re(r,0)),r.some(e=>e.field>0)){let t=new oe(r,0),n=c.effects=[ie.of(t)];void 0===e.state.field(le,!1)&&n.push(o.StateEffect.appendConfig.of([le,ve,ye,G]))}e.dispatch(e.state.update(c))}}function ce(e){return({state:t,dispatch:n})=>{let o=t.field(le,!1);if(!o||e<0&&0==o.active)return!1;let i=o.active+e,s=e>0&&!o.ranges.some(t=>t.field==i+e);return n(t.update({selection:re(o.ranges,i),effects:ie.of(s?null:new oe(o.ranges,i)),scrollIntoView:!0})),!0}}const he=({state:e,dispatch:t})=>!!e.field(le,!1)&&(t(e.update({effects:ie.of(null)})),!0),pe=ce(1),de=ce(-1);function fe(e){let t=e.field(le,!1);return!(!t||!t.ranges.some(e=>e.field==t.active+1))}function ue(e){let t=e.field(le,!1);return!!(t&&t.active>0)}const me=[{key:"Tab",run:pe,shift:de},{key:"Escape",run:he}],ge=o.Facet.define({combine:e=>e.length?e[0]:me}),ve=o.Prec.highest(i.keymap.compute([ge],e=>e.facet(ge)));function be(e,t){return{...t,apply:ae(e)}}const ye=i.EditorView.domEventHandlers({mousedown(e,t){let n,o=t.state.field(le,!1);if(!o||null==(n=t.posAtCoords({x:e.clientX,y:e.clientY})))return!1;let i=o.ranges.find(e=>e.from<=n&&e.to>=n);return!(!i||i.field==o.active||(t.dispatch({selection:re(o.ranges,i.field),effects:ie.of(o.ranges.some(e=>e.field>i.field)?new oe(o.ranges,i.field):null),scrollIntoView:!0}),0))}});function we(e,t){return new RegExp(t(e.source),e.unicode?"u":"")}const xe=Object.create(null);function Ce(e,t,n,o,i){for(let s=e.iterLines(),l=0;!s.next().done;){let e,{value:r}=s;for(t.lastIndex=0;e=t.exec(r);)if(!o[e[0]]&&l+e.index!=i&&(n.push({type:"text",label:e[0]}),o[e[0]]=!0,n.length>=2e3))return;l+=r.length+1}}function Se(e,t,n,o,i){let s=e.length>=1e3,l=s&&t.get(e);if(l)return l;let r=[],a=Object.create(null);if(e.children){let s=0;for(let l of e.children){if(l.length>=1e3)for(let e of Se(l,t,n,o-s,i-s))a[e.label]||(a[e.label]=!0,r.push(e));else Ce(l,n,r,a,i-s);s+=l.length+1}}else Ce(e,n,r,a,i);return s&&r.length<2e3&&t.set(e,r),r}const ke=e=>{let t=e.state.languageDataAt("wordChars",e.pos).join(""),n=function(e){let t=e.replace(/[\]\-\\]/g,"\\$&");try{return new RegExp(`[\\p{Alphabetic}\\p{Number}_${t}]+`,"ug")}catch(e){return new RegExp(`[w${t}]`,"g")}}(t),o=e.matchBefore(we(n,e=>e+"$"));if(!o&&!e.explicit)return null;let i=o?o.from:e.pos,s=Se(e.state.doc,function(e){return xe[e]||(xe[e]=new WeakMap)}(t),n,5e4,i);return{from:i,options:s,validFor:we(n,e=>"^"+e)}},Ie={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},Ee=o.StateEffect.define({map(e,t){let n=t.mapPos(e,-1,o.MapMode.TrackAfter);return null==n?void 0:n}}),Pe=new class extends o.RangeValue{};Pe.startSide=1,Pe.endSide=-1;const Ae=o.StateField.define({create:()=>o.RangeSet.empty,update(e,t){if(e=e.map(t.changes),t.selection){let n=t.state.doc.lineAt(t.selection.main.head);e=e.update({filter:e=>e>=n.from&&e<=n.to})}for(let n of t.effects)n.is(Ee)&&(e=e.update({add:[Pe.range(n.value,n.value+1)]}));return e}});function Te(){return[Le,Ae]}const De="()[]{}<>«»»«[]{}";function Oe(e){for(let t=0;t<De.length;t+=2)if(De.charCodeAt(t)==e)return De.charAt(t+1);return(0,o.fromCodePoint)(e<128?e:e+1)}function Me(e,t){return e.languageDataAt("closeBrackets",t)[0]||Ie}const Re="object"==typeof navigator&&/Android\b/.test(navigator.userAgent),Le=i.EditorView.inputHandler.of((e,t,n,i)=>{if((Re?e.composing:e.compositionStarted)||e.state.readOnly)return!1;let s=e.state.selection.main;if(i.length>2||2==i.length&&1==(0,o.codePointSize)((0,o.codePointAt)(i,0))||t!=s.from||n!=s.to)return!1;let l=$e(e.state,i);return!!l&&(e.dispatch(l),!0)}),Fe=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=Me(e,e.selection.main.head).brackets||Ie.brackets,i=null,s=e.changeByRange(t=>{if(t.empty){let i=function(e,t){let n=e.sliceString(t-2,t);return(0,o.codePointSize)((0,o.codePointAt)(n,0))==n.length?n:n.slice(1)}(e.doc,t.head);for(let s of n)if(s==i&&We(e.doc,t.head)==Oe((0,o.codePointAt)(s,0)))return{changes:{from:t.head-s.length,to:t.head+s.length},range:o.EditorSelection.cursor(t.head-s.length)}}return{range:i=t}});return i||t(e.update(s,{scrollIntoView:!0,userEvent:"delete.backward"})),!i},Be=[{key:"Backspace",run:Fe}];function $e(e,t){let n=Me(e,e.selection.main.head),i=n.brackets||Ie.brackets;for(let s of i){let l=Oe((0,o.codePointAt)(s,0));if(t==s)return l==s?ze(e,s,i.indexOf(s+s+s)>-1,n):Ue(e,s,l,n.before||Ie.before);if(t==l&&Ne(e,e.selection.main.from))return Ve(e,0,l)}return null}function Ne(e,t){let n=!1;return e.field(Ae).between(0,e.doc.length,e=>{e==t&&(n=!0)}),n}function We(e,t){let n=e.sliceString(t,t+2);return n.slice(0,(0,o.codePointSize)((0,o.codePointAt)(n,0)))}function Ue(e,t,n,i){let s=null,l=e.changeByRange(l=>{if(!l.empty)return{changes:[{insert:t,from:l.from},{insert:n,from:l.to}],effects:Ee.of(l.to+t.length),range:o.EditorSelection.range(l.anchor+t.length,l.head+t.length)};let r=We(e.doc,l.head);return!r||/\s/.test(r)||i.indexOf(r)>-1?{changes:{insert:t+n,from:l.head},effects:Ee.of(l.head+t.length),range:o.EditorSelection.cursor(l.head+t.length)}:{range:s=l}});return s?null:e.update(l,{scrollIntoView:!0,userEvent:"input.type"})}function Ve(e,t,n){let i=null,s=e.changeByRange(t=>t.empty&&We(e.doc,t.head)==n?{changes:{from:t.head,to:t.head+n.length,insert:n},range:o.EditorSelection.cursor(t.head+n.length)}:i={range:t});return i?null:e.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function ze(e,t,n,i){let l=i.stringPrefixes||Ie.stringPrefixes,r=null,a=e.changeByRange(i=>{if(!i.empty)return{changes:[{insert:t,from:i.from},{insert:t,from:i.to}],effects:Ee.of(i.to+t.length),range:o.EditorSelection.range(i.anchor+t.length,i.head+t.length)};let a,c=i.head,h=We(e.doc,c);if(h==t){if(qe(e,c))return{changes:{insert:t+t,from:c},effects:Ee.of(c+t.length),range:o.EditorSelection.cursor(c+t.length)};if(Ne(e,c)){let i=n&&e.sliceDoc(c,c+3*t.length)==t+t+t?t+t+t:t;return{changes:{from:c,to:c+i.length,insert:i},range:o.EditorSelection.cursor(c+i.length)}}}else{if(n&&e.sliceDoc(c-2*t.length,c)==t+t&&(a=je(e,c-2*t.length,l))>-1&&qe(e,a))return{changes:{insert:t+t+t+t,from:c},effects:Ee.of(c+t.length),range:o.EditorSelection.cursor(c+t.length)};if(e.charCategorizer(c)(h)!=o.CharCategory.Word&&je(e,c,l)>-1&&!function(e,t,n,o){let i=(0,s.syntaxTree)(e).resolveInner(t,-1),l=o.reduce((e,t)=>Math.max(e,t.length),0);for(let s=0;s<5;s++){let s=e.sliceDoc(i.from,Math.min(i.to,i.from+n.length+l)),r=s.indexOf(n);if(!r||r>-1&&o.indexOf(s.slice(0,r))>-1){let t=i.firstChild;for(;t&&t.from==i.from&&t.to-t.from>n.length+r;){if(e.sliceDoc(t.to-n.length,t.to)==n)return!1;t=t.firstChild}return!0}let a=i.to==t&&i.parent;if(!a)break;i=a}return!1}(e,c,t,l))return{changes:{insert:t+t,from:c},effects:Ee.of(c+t.length),range:o.EditorSelection.cursor(c+t.length)}}return{range:r=i}});return r?null:e.update(a,{scrollIntoView:!0,userEvent:"input.type"})}function qe(e,t){let n=(0,s.syntaxTree)(e).resolveInner(t+1);return n.parent&&n.from==t}function je(e,t,n){let i=e.charCategorizer(t);if(i(e.sliceDoc(t-1,t))!=o.CharCategory.Word)return t;for(let s of n){let n=t-s.length;if(e.sliceDoc(n,t)==s&&i(e.sliceDoc(n-1,n))!=o.CharCategory.Word)return n}return-1}function He(e={}){return[Y,U,C.of(e),_,Qe,G]}const Ke=[{key:"Ctrl-Space",run:H},{mac:"Alt-`",run:H},{mac:"Alt-i",run:H},{key:"Escape",run:K},{key:"ArrowDown",run:q(!0)},{key:"ArrowUp",run:q(!1)},{key:"PageDown",run:q(!0,"page")},{key:"PageUp",run:q(!1,"page")},{key:"Enter",run:j}],Qe=o.Prec.highest(i.keymap.computeN([C],e=>e.facet(C).defaultKeymap?[Ke]:[]));function _e(e){let t=e.field(U,!1);return t&&t.active.some(e=>e.isPending)?"pending":t&&t.active.some(e=>0!=e.state)?"active":null}const Xe=new WeakMap;function Ye(e){var t;let n=null===(t=e.field(U,!1))||void 0===t?void 0:t.open;if(!n||n.disabled)return[];let o=Xe.get(n.options);return o||Xe.set(n.options,o=n.options.map(e=>e.completion)),o}function Ge(e){var t;let n=null===(t=e.field(U,!1))||void 0===t?void 0:t.open;return n&&!n.disabled&&n.selected>=0?n.options[n.selected].completion:null}function Je(e){var t;let n=null===(t=e.field(U,!1))||void 0===t?void 0:t.open;return n&&!n.disabled&&n.selected>=0?n.selected:null}function Ze(e){return W.of(e)}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var _JUPYTERLAB;(()=>{"use strict";var e,r,t,o,n,a,i,u,l,s,f,d,c,p,h,v,g,m,b,y,w,k,S,j={842:(e,r,t)=>{var o={"./index":()=>t.e(509).then(()=>()=>t(509)),"./extension":()=>t.e(509).then(()=>()=>t(509)),"./style":()=>t.e(728).then(()=>()=>t(728))},n=(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),a=(e,r)=>{if(t.S){var o="default",n=t.S[o];if(n&&n!==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:()=>n,init:()=>a})}},E={};function P(e){var r=E[e];if(void 0!==r)return r.exports;var t=E[e]={id:e,exports:{}};return j[e](t,t.exports,P),t.exports}P.m=j,P.c=E,P.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return P.d(r,{a:r}),r},P.d=(e,r)=>{for(var t in r)P.o(r,t)&&!P.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},P.f={},P.e=e=>Promise.all(Object.keys(P.f).reduce((r,t)=>(P.f[t](e,r),r),[])),P.u=e=>e+"."+{509:"289abdc89cdc2da51b88",728:"c3ac4b62173ea8b3c44b",747:"28975bdde163d0eaf6e0"}[e]+".js?v="+{509:"289abdc89cdc2da51b88",728:"c3ac4b62173ea8b3c44b",747:"28975bdde163d0eaf6e0"}[e],P.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),P.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),e={},r="gennaker-tools:",P.l=(t,o,n,a)=>{if(e[t])e[t].push(o);else{var i,u;if(void 0!==n)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+n){i=f;break}}i||(u=!0,(i=document.createElement("script")).charset="utf-8",P.nc&&i.setAttribute("nonce",P.nc),i.setAttribute("data-webpack",r+n),i.src=t),e[t]=[o];var d=(r,o)=>{i.onerror=i.onload=null,clearTimeout(c);var n=e[t];if(delete e[t],i.parentNode&&i.parentNode.removeChild(i),n&&n.forEach(e=>e(o)),r)return r(o)},c=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)}},P.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{P.S={};var e={},r={};P.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];P.o(P.S,t)||(P.S[t]={});var a=P.S[t],i="gennaker-tools",u=(e,r,t,o)=>{var n=a[e]=a[e]||{},u=n[r];(!u||!u.loaded&&(!o!=!u.eager?o:i>u.from))&&(n[r]={get:t,from:i,eager:!!o})},l=[];return"default"===t&&(u("@codemirror/autocomplete","6.19.1",()=>Promise.all([P.e(747),P.e(949)]).then(()=>()=>P(747))),u("gennaker-tools","0.1.3",()=>P.e(509).then(()=>()=>P(509)))),e[t]=l.length?Promise.all(l).then(()=>e[t]=1):1}}})(),(()=>{var e;P.g.importScripts&&(e=P.g.location+"");var r=P.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(/\/[^\/]+$/,"/"),P.p=e})(),t=e=>{var r=e=>e.split(".").map(e=>+e==e?+e:e),t=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(e),o=t[1]?r(t[1]):[];return t[2]&&(o.length++,o.push.apply(o,r(t[2]))),t[3]&&(o.push([]),o.push.apply(o,r(t[3]))),o},o=(e,r)=>{e=t(e),r=t(r);for(var o=0;;){if(o>=e.length)return o<r.length&&"u"!=(typeof r[o])[0];var n=e[o],a=(typeof n)[0];if(o>=r.length)return"u"==a;var i=r[o],u=(typeof i)[0];if(a!=u)return"o"==a&&"n"==u||"s"==u||"u"==a;if("o"!=a&&"u"!=a&&n!=i)return n<i;o++}},n=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 o=1,a=1;a<e.length;a++)o--,t+="u"==(typeof(u=e[a]))[0]?"-":(o>0?".":"")+(o=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():n(u))}return l();function l(){return i.pop().replace(/^\((.+)\)$/,"$1")}},a=(e,r)=>{if(0 in e){r=t(r);var o=e[0],n=o<0;n&&(o=-o-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>o&&!n:""==d!=n);if("u"==f){if(!l||"u"!=d)return!1}else if(l)if(d==f)if(u<=o){if(s!=e[u])return!1}else{if(n?s>e[u]:s<e[u])return!1;s!=e[u]&&(l=!1)}else if("s"!=d&&"n"!=d){if(n||u<=o)return!1;l=!1,u--}else{if(u<=o||f<d!=n)return!1;l=!1}else"s"!=d&&"n"!=d&&(l=!1,u--)}}var c=[],p=c.pop.bind(c);for(i=1;i<e.length;i++){var h=e[i];c.push(1==h?p()|p():2==h?p()&p():h?a(h,r):!p())}return!!p()},i=(e,r)=>e&&P.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,n)=>{var i=n?l(e[r]):e[r];return(r=Object.keys(i).reduce((e,r)=>!a(t,r)||e&&!o(e,r)?e:r,0))&&i[r]},f=(e,r,t)=>{var n=t?l(e[r]):e[r];return Object.keys(n).reduce((e,r)=>!e||!n[e].loaded&&o(e,r)?r:e,0)},d=(e,r,t,o)=>"Unsatisfied version "+t+" from "+(t&&e[r][t].from)+" of shared singleton module "+r+" (required "+n(o)+")",c=(e,r,t,o,a)=>{var i=e[t];return"No satisfying version ("+n(o)+")"+(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(", ")},p=e=>{throw new Error(e)},h=e=>{"undefined"!=typeof console&&console.warn&&console.warn(e)},g=(e,r,t)=>t?t():((e,r)=>p("Shared module "+r+" doesn't exist in shared scope "+e))(e,r),m=(v=e=>function(r,t,o,n,a){var i=P.I(r);return i&&i.then&&!o?i.then(e.bind(e,r,P.S[r],t,!1,n,a)):e(r,P.S[r],t,o,n,a)})((e,r,t,o,n,a)=>{if(!i(r,t))return g(e,t,a);var l=s(r,t,n,o);return l?u(l):a?a():void p(c(r,e,t,n,o))}),b=v((e,r,t,o,n,l)=>{if(!i(r,t))return g(e,t,l);var s=f(r,t,o);return a(n,s)||h(d(r,t,s,n)),u(r[t][s])}),y={},w={389:()=>b("default","@jupyterlab/notebook",!1,[1,4,5,1]),460:()=>b("default","@jupyterlab/codemirror",!1,[1,4,5,1]),505:()=>m("default","@codemirror/autocomplete",!1,[1,6,0,1],()=>Promise.all([P.e(747),P.e(949)]).then(()=>()=>P(747))),591:()=>b("default","@jupyterlab/translation",!1,[1,4,5,1]),827:()=>b("default","@jupyterlab/apputils",!1,[1,4,6,1]),24:()=>b("default","@codemirror/view",!1,[1,6,9,6]),84:()=>b("default","@codemirror/language",!1,[1,6,0,0]),195:()=>b("default","@codemirror/state",!1,[1,6,2,0])},k={509:[389,460,505,591,827],949:[24,84,195]},S={},P.f.consumes=(e,r)=>{P.o(k,e)&&k[e].forEach(e=>{if(P.o(y,e))return r.push(y[e]);if(!S[e]){var t=r=>{y[e]=0,P.m[e]=t=>{delete P.c[e],t.exports=r()}};S[e]=!0;var o=r=>{delete y[e],P.m[e]=t=>{throw delete P.c[e],r}};try{var n=w[e]();n.then?r.push(y[e]=n.then(t).catch(o)):t(n)}catch(e){o(e)}}})},(()=>{var e={204:0};P.f.j=(r,t)=>{var o=P.o(e,r)?e[r]:void 0;if(0!==o)if(o)t.push(o[2]);else if(949!=r){var n=new Promise((t,n)=>o=e[r]=[t,n]);t.push(o[2]=n);var a=P.p+P.u(r),i=new Error;P.l(a,t=>{if(P.o(e,r)&&(0!==(o=e[r])&&(e[r]=void 0),o)){var n=t&&("load"===t.type?"missing":t.type),a=t&&t.target&&t.target.src;i.message="Loading chunk "+r+" failed.\n("+n+": "+a+")",i.name="ChunkLoadError",i.type=n,i.request=a,o[1](i)}},"chunk-"+r,r)}else e[r]=0};var r=(r,t)=>{var o,n,[a,i,u]=t,l=0;if(a.some(r=>0!==e[r])){for(o in i)P.o(i,o)&&(P.m[o]=i[o]);u&&u(P)}for(r&&r(t);l<a.length;l++)n=a[l],P.o(e,n)&&e[n]&&e[n][0](),e[n]=0},t=self.webpackChunkgennaker_tools=self.webpackChunkgennaker_tools||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})(),P.nc=void 0;var T=P(842);(_JUPYTERLAB=void 0===_JUPYTERLAB?{}:_JUPYTERLAB)["gennaker-tools"]=T})();
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"packages": [
|
|
3
|
+
{
|
|
4
|
+
"name": "@codemirror/autocomplete",
|
|
5
|
+
"versionInfo": "6.19.1",
|
|
6
|
+
"licenseId": "MIT",
|
|
7
|
+
"extractedText": "MIT License\n\nCopyright (C) 2018-2021 by Marijn Haverbeke <marijn@haverbeke.berlin> and others\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n"
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"name": "css-loader",
|
|
11
|
+
"versionInfo": "6.11.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,178 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: gennaker-tools
|
|
3
|
+
Version: 0.1.3
|
|
4
|
+
Summary: A JupyterLab extension to provide a restart-and-run-to-selected command variant that clears non-executed cell outputs.
|
|
5
|
+
Project-URL: Homepage, https://github.com/agoose77/gennaker-tools
|
|
6
|
+
Project-URL: Bug Tracker, https://github.com/agoose77/gennaker-tools/issues
|
|
7
|
+
Project-URL: Repository, https://github.com/agoose77/gennaker-tools.git
|
|
8
|
+
Author-email: Angus <angus@oieltd.com>
|
|
9
|
+
License: BSD 3-Clause License
|
|
10
|
+
|
|
11
|
+
Copyright (c) 2025, Angus
|
|
12
|
+
All rights reserved.
|
|
13
|
+
|
|
14
|
+
Redistribution and use in source and binary forms, with or without
|
|
15
|
+
modification, are permitted provided that the following conditions are met:
|
|
16
|
+
|
|
17
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
18
|
+
list of conditions and the following disclaimer.
|
|
19
|
+
|
|
20
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
21
|
+
this list of conditions and the following disclaimer in the documentation
|
|
22
|
+
and/or other materials provided with the distribution.
|
|
23
|
+
|
|
24
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
25
|
+
contributors may be used to endorse or promote products derived from
|
|
26
|
+
this software without specific prior written permission.
|
|
27
|
+
|
|
28
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
29
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
30
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
31
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
32
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
33
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
34
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
35
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
36
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
37
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
38
|
+
License-File: LICENSE
|
|
39
|
+
Keywords: jupyter,jupyterlab,jupyterlab-extension
|
|
40
|
+
Classifier: Framework :: Jupyter
|
|
41
|
+
Classifier: Framework :: Jupyter :: JupyterLab
|
|
42
|
+
Classifier: Framework :: Jupyter :: JupyterLab :: 4
|
|
43
|
+
Classifier: Framework :: Jupyter :: JupyterLab :: Extensions
|
|
44
|
+
Classifier: Framework :: Jupyter :: JupyterLab :: Extensions :: Prebuilt
|
|
45
|
+
Classifier: License :: OSI Approved :: BSD License
|
|
46
|
+
Classifier: Programming Language :: Python
|
|
47
|
+
Classifier: Programming Language :: Python :: 3
|
|
48
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
49
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
50
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
51
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
52
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
53
|
+
Requires-Python: >=3.9
|
|
54
|
+
Requires-Dist: aiofiles
|
|
55
|
+
Requires-Dist: tomli
|
|
56
|
+
Requires-Dist: tomli-w
|
|
57
|
+
Requires-Dist: watchfiles
|
|
58
|
+
Description-Content-Type: text/markdown
|
|
59
|
+
|
|
60
|
+
# gennaker-tools
|
|
61
|
+
|
|
62
|
+
[](https://github.com/agoose77/gennaker-tools/actions/workflows/build.yml)
|
|
63
|
+
|
|
64
|
+
A series of JupyterLab and Jupyter Server extensions to power the gennaker project.
|
|
65
|
+
|
|
66
|
+
## Features
|
|
67
|
+
|
|
68
|
+
### TOML ←→ JSON Settings Sync
|
|
69
|
+
|
|
70
|
+
<img width="1130" height="900" alt="image" src="https://github.com/user-attachments/assets/c9babdd6-d247-45a1-a590-f17165f5b7fb" />
|
|
71
|
+
|
|
72
|
+
_Synchronise between JSON and TOML representations of settings under the JupyterLab settings path._
|
|
73
|
+
|
|
74
|
+
## Code Snippets
|
|
75
|
+
|
|
76
|
+
<img width="1350" height="870" alt="image" src="https://github.com/user-attachments/assets/4e2673a9-3e27-4535-a3b0-b86e27f12f49" />
|
|
77
|
+
|
|
78
|
+
_Use CodeMirror snippets to autocomplete text and modular units of content._ See https://codemirror.net/docs/ref/#autocomplete.autocompletion for more information.
|
|
79
|
+
|
|
80
|
+
## Reset Command
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
gennaker-tools:reset-jupyterlab
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
<img width="887" height="423" alt="image" src="https://github.com/user-attachments/assets/2ef028a5-0eca-45ab-81e1-f22627c427c1" />
|
|
87
|
+
|
|
88
|
+
_Reset the current session by reloading the page_.
|
|
89
|
+
|
|
90
|
+
## Stateless Execution Command
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
gennaker-tools:restart-run-stateless
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
<img width="627" height="318" alt="image" src="https://github.com/user-attachments/assets/079684f8-e7bc-484f-b466-533f2dc1665e" />
|
|
97
|
+
|
|
98
|
+
_Perform some compute_
|
|
99
|
+
|
|
100
|
+
<img width="618" height="140" alt="image" src="https://github.com/user-attachments/assets/0029730a-e9ea-4791-8f61-a4ed0da783f8" />
|
|
101
|
+
|
|
102
|
+
_Modify the earlier state_
|
|
103
|
+
|
|
104
|
+
<img width="626" height="362" alt="image" src="https://github.com/user-attachments/assets/18ad2055-105e-461e-af36-5be4b4c7c51e" />
|
|
105
|
+
|
|
106
|
+
_Re-run up to a particular cell, and clear outputs_
|
|
107
|
+
|
|
108
|
+
## Requirements
|
|
109
|
+
|
|
110
|
+
- JupyterLab >= 4.0.0
|
|
111
|
+
|
|
112
|
+
## Install
|
|
113
|
+
|
|
114
|
+
To install the extension, execute:
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
pip install gennaker-tools
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## Uninstall
|
|
121
|
+
|
|
122
|
+
To remove the extension, execute:
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
pip uninstall gennaker-tools
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
## Contributing
|
|
129
|
+
|
|
130
|
+
### Development install
|
|
131
|
+
|
|
132
|
+
Note: You will need NodeJS to build the extension package.
|
|
133
|
+
|
|
134
|
+
The `jlpm` command is JupyterLab's pinned version of
|
|
135
|
+
[yarn](https://yarnpkg.com/) that is installed with JupyterLab. You may use
|
|
136
|
+
`yarn` or `npm` in lieu of `jlpm` below.
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
# Clone the repo to your local environment
|
|
140
|
+
# Change directory to the gennaker_tools directory
|
|
141
|
+
# Install package in development mode
|
|
142
|
+
pip install -e "."
|
|
143
|
+
# Link your development version of the extension with JupyterLab
|
|
144
|
+
jupyter labextension develop . --overwrite
|
|
145
|
+
# Rebuild extension Typescript source after making changes
|
|
146
|
+
jlpm build
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
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.
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
# Watch the source directory in one terminal, automatically rebuilding when needed
|
|
153
|
+
jlpm watch
|
|
154
|
+
# Run JupyterLab in another terminal
|
|
155
|
+
jupyter lab
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
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).
|
|
159
|
+
|
|
160
|
+
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:
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
jupyter lab build --minimize=False
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
### Development uninstall
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
pip uninstall gennaker-tools
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
In development mode, you will also need to remove the symlink created by `jupyter labextension develop`
|
|
173
|
+
command. To find its location, you can run `jupyter labextension list` to figure out where the `labextensions`
|
|
174
|
+
folder is located. Then you can remove the symlink named `gennaker-tools` within that folder.
|
|
175
|
+
|
|
176
|
+
### Packaging the extension
|
|
177
|
+
|
|
178
|
+
See [RELEASE](RELEASE.md)
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
gennaker_tools/__init__.py,sha256=nFYEbiT8K0wt8yEQz8HEf_Qe6LNSkCYqRkIsDNazxcQ,906
|
|
2
|
+
gennaker_tools/_version.py,sha256=0bhZNmKmDXExUL2dj7IzVQeZsRU1vgGevqAQCZ9Z9FU,171
|
|
3
|
+
gennaker_tools/settings_sync_extension.py,sha256=MQ29Qa_4nRD5MvfziRTC6rjfavAI-SPuOWIdY42Trv0,4533
|
|
4
|
+
gennaker_tools-0.1.3.data/data/etc/jupyter/jupyter_server_config.d/gennaker_tools.json,sha256=wdPROHQZmjYZls69VFa0u4SSeZ5hSsLrtZat3amwhT4,89
|
|
5
|
+
gennaker_tools-0.1.3.data/data/share/jupyter/labextensions/gennaker-tools/package.json,sha256=v3VTLeGfaCvr9Bm2OkypKUSz0ArkKHr76DpbhsnIafo,5842
|
|
6
|
+
gennaker_tools-0.1.3.data/data/share/jupyter/labextensions/gennaker-tools/schemas/gennaker-tools/package.json.orig,sha256=nh3dWwx1VktvrO1LEqMLV72hen-Fkd8TsKsw4br5nIw,6586
|
|
7
|
+
gennaker_tools-0.1.3.data/data/share/jupyter/labextensions/gennaker-tools/schemas/gennaker-tools/stateless-run.json,sha256=Q68L3gxXaKLxMqi4OB2B8M6VAG_ig4Z7rccdC6xGPw8,321
|
|
8
|
+
gennaker_tools-0.1.3.data/data/share/jupyter/labextensions/gennaker-tools/static/509.289abdc89cdc2da51b88.js,sha256=KJq9yJzcLaUbiJfnL1xooN6-LXWuEEaLOlgeqkvSDFA,2645
|
|
9
|
+
gennaker_tools-0.1.3.data/data/share/jupyter/labextensions/gennaker-tools/static/728.c3ac4b62173ea8b3c44b.js,sha256=w6xLYhc-qLPES-XlMKoqrev4S_jv2BCO3lpeEw9KvPg,3997
|
|
10
|
+
gennaker_tools-0.1.3.data/data/share/jupyter/labextensions/gennaker-tools/static/747.28975bdde163d0eaf6e0.js,sha256=KJdb3eFj0Or24KLM3CZhUWaPlSuX_2MNsFLzvv2Qwec,38424
|
|
11
|
+
gennaker_tools-0.1.3.data/data/share/jupyter/labextensions/gennaker-tools/static/remoteEntry.3e78bb25784889ba8b31.js,sha256=Pni7JXhIibqLMcQ1QTTRh9EkC-n-GE2tieUaw8kh4Ns,7695
|
|
12
|
+
gennaker_tools-0.1.3.data/data/share/jupyter/labextensions/gennaker-tools/static/style.js,sha256=tlmhP_8sbqsVTTTDWvepKWLoxcSEhbnBWO90BLsF0bg,157
|
|
13
|
+
gennaker_tools-0.1.3.data/data/share/jupyter/labextensions/gennaker-tools/static/third-party-licenses.json,sha256=CDXgijqFVBM8NMtDSylWGVU9B0MXXmBVI9RilPj2vIQ,3734
|
|
14
|
+
gennaker_tools-0.1.3.data/data/share/jupyter/labextensions/gennaker-tools/install.json,sha256=tXRyzqi6iukm4CRTQuuyytG8F3cwc4ITtzS2RccmfmI,189
|
|
15
|
+
gennaker_tools-0.1.3.dist-info/METADATA,sha256=30QQADIUVg_G18h0PrrUiZPS4Z0Uhke9MSRp0crWkJU,6919
|
|
16
|
+
gennaker_tools-0.1.3.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
17
|
+
gennaker_tools-0.1.3.dist-info/licenses/LICENSE,sha256=e5YjFxBDNzcxgCAlUWfTdsNI2TSeCBkY6r9gdMAjQVI,1513
|
|
18
|
+
gennaker_tools-0.1.3.dist-info/RECORD,,
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
BSD 3-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025, Angus
|
|
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.
|