@jseeio/jsee 0.4.1 → 0.8.0
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.
- package/CHANGELOG.md +90 -0
- package/LICENSE +21 -0
- package/README.md +583 -55
- package/dist/2b3e1faf89f94a483539.png +0 -0
- package/dist/416d91365b44e4b4f477.png +0 -0
- package/dist/8f2c4d11474275fbc161.png +0 -0
- package/dist/jsee.core.js +1 -0
- package/dist/jsee.full.js +1 -0
- package/dist/jsee.runtime.js +2 -1
- package/package.json +84 -18
- package/src/app.js +130 -33
- package/src/cli.js +474 -64
- package/src/extended-imports.js +11 -0
- package/src/main.js +264 -45
- package/src/overlay.js +26 -1
- package/src/utils.js +390 -12
- package/templates/common-inputs.js +88 -0
- package/templates/common-outputs.js +340 -4
- package/templates/minimal-app.vue +367 -0
- package/templates/minimal-input.vue +573 -0
- package/templates/minimal-output.vue +426 -0
- package/templates/virtual-table.vue +194 -0
- package/.claude/settings.local.json +0 -13
- package/.eslintrc.js +0 -38
- package/AGENTS.md +0 -65
- package/CLAUDE.md +0 -5
- package/CNAME +0 -1
- package/_config.yml +0 -26
- package/dist/jsee.js +0 -1
- package/jest-puppeteer.config.js +0 -14
- package/jest.config.js +0 -8
- package/jest.unit.config.js +0 -8
- package/load/index.html +0 -52
- package/templates/bulma-app.vue +0 -242
- package/templates/bulma-input.vue +0 -125
- package/templates/bulma-output.vue +0 -101
- package/test/class.html +0 -22
- package/test/code.html +0 -25
- package/test/codew.html +0 -25
- package/test/example-class.js +0 -8
- package/test/example-sum.js +0 -3
- package/test/fixtures/lodash-like.js +0 -15
- package/test/fixtures/upload-sample.csv +0 -3
- package/test/importw.html +0 -28
- package/test/minimal.html +0 -14
- package/test/minimal1.html +0 -13
- package/test/minimal2.html +0 -15
- package/test/minimal3.html +0 -10
- package/test/minimal4.html +0 -22
- package/test/pipeline.html +0 -52
- package/test/python.html +0 -41
- package/test/string.html +0 -26
- package/test/stringw.html +0 -29
- package/test/sum.schema.json +0 -17
- package/test/sumw.schema.json +0 -15
- package/test/test-basic.test.js +0 -603
- package/test/test-python.test.js +0 -23
- package/test/unit/cli-fetch.test.js +0 -229
- package/test/unit/utils.test.js +0 -888
- package/webpack.config.js +0 -101
package/test/importw.html
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
<html>
|
|
2
|
-
<div id="jsee-container">
|
|
3
|
-
<script src="/dist/jsee.js"></script>
|
|
4
|
-
<script>
|
|
5
|
-
|
|
6
|
-
new JSEE({
|
|
7
|
-
schema: {
|
|
8
|
-
"model": {
|
|
9
|
-
"name": "kebab",
|
|
10
|
-
"type": "function",
|
|
11
|
-
"container": "args",
|
|
12
|
-
"code": `
|
|
13
|
-
function kebab (str) {
|
|
14
|
-
return _.kebabCase(str)
|
|
15
|
-
}
|
|
16
|
-
`,
|
|
17
|
-
"worker": false,
|
|
18
|
-
},
|
|
19
|
-
"imports": "lodash@4.17.21/lodash.min.js",
|
|
20
|
-
"inputs": [
|
|
21
|
-
{ "name": "str", "type": "string", "default": 'FooBar' },
|
|
22
|
-
]
|
|
23
|
-
},
|
|
24
|
-
container: '#jsee-container',
|
|
25
|
-
verbose: true
|
|
26
|
-
})
|
|
27
|
-
</script>
|
|
28
|
-
</html>
|
package/test/minimal.html
DELETED
package/test/minimal1.html
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<!-- Minimal example -->
|
|
2
|
-
<html>
|
|
3
|
-
<div id="jsee-container">
|
|
4
|
-
<script src="/dist/jsee.js"></script>
|
|
5
|
-
<script>window.JSEE || document.write('<script src="https://cdn.jsdelivr.net/npm/@jseeio/jsee@latest/dist/jsee.runtime.js">\x3C/script>')</script>
|
|
6
|
-
<script>window.JSEE || document.write('<script src="https://unpkg.com/@jseeio/jsee@latest/dist/jsee.runtime.js">\x3C/script>')</script>
|
|
7
|
-
<script>
|
|
8
|
-
function mul (a, b) {
|
|
9
|
-
return a * b
|
|
10
|
-
}
|
|
11
|
-
new JSEE(mul, '#jsee-container')
|
|
12
|
-
</script>
|
|
13
|
-
</html>
|
package/test/minimal2.html
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
<!-- Minimal example -->
|
|
2
|
-
<html>
|
|
3
|
-
<div id="jsee-container">
|
|
4
|
-
<script src="/dist/jsee.js"></script>
|
|
5
|
-
<script>window.JSEE || document.write('<script src="https://cdn.jsdelivr.net/npm/@jseeio/jsee@latest/dist/jsee.runtime.js">\x3C/script>')</script>
|
|
6
|
-
<script>window.JSEE || document.write('<script src="https://unpkg.com/@jseeio/jsee@latest/dist/jsee.runtime.js">\x3C/script>')</script>
|
|
7
|
-
<script>
|
|
8
|
-
function mul (a, b) {
|
|
9
|
-
return a * b
|
|
10
|
-
}
|
|
11
|
-
new JSEE({
|
|
12
|
-
model: mul
|
|
13
|
-
}, '#jsee-container')
|
|
14
|
-
</script>
|
|
15
|
-
</html>
|
package/test/minimal3.html
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
<!-- Minimal example -->
|
|
2
|
-
<html>
|
|
3
|
-
<div id="jsee-container">
|
|
4
|
-
<script src="/dist/jsee.js"></script>
|
|
5
|
-
<script>window.JSEE || document.write('<script src="https://cdn.jsdelivr.net/npm/@jseeio/jsee@latest/dist/jsee.runtime.js">\x3C/script>')</script>
|
|
6
|
-
<script>window.JSEE || document.write('<script src="https://unpkg.com/@jseeio/jsee@latest/dist/jsee.runtime.js">\x3C/script>')</script>
|
|
7
|
-
<script>
|
|
8
|
-
new JSEE(function (a, b) { return a * b }, '#jsee-container')
|
|
9
|
-
</script>
|
|
10
|
-
</html>
|
package/test/minimal4.html
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
<html>
|
|
2
|
-
<div id="jsee-container">
|
|
3
|
-
<script src="/dist/jsee.js"></script>
|
|
4
|
-
<script>
|
|
5
|
-
new JSEE({
|
|
6
|
-
schema: {
|
|
7
|
-
"model": {
|
|
8
|
-
"name": "div",
|
|
9
|
-
"code": "function div (a) { return a / 2 }"
|
|
10
|
-
},
|
|
11
|
-
"inputs": [
|
|
12
|
-
{
|
|
13
|
-
"name": "a",
|
|
14
|
-
"type": "int",
|
|
15
|
-
"value": 0
|
|
16
|
-
}
|
|
17
|
-
]
|
|
18
|
-
},
|
|
19
|
-
container: '#jsee-container'
|
|
20
|
-
})
|
|
21
|
-
</script>
|
|
22
|
-
</html>
|
package/test/pipeline.html
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
<html>
|
|
2
|
-
<div id="jsee-container">
|
|
3
|
-
<script src="/dist/jsee.js"></script>
|
|
4
|
-
<script>
|
|
5
|
-
new JSEE({
|
|
6
|
-
schema: {
|
|
7
|
-
"model": [
|
|
8
|
-
{
|
|
9
|
-
"name": "sum",
|
|
10
|
-
"type": "function",
|
|
11
|
-
"container": "args",
|
|
12
|
-
"code": function sum (a, b) {
|
|
13
|
-
return a + b
|
|
14
|
-
},
|
|
15
|
-
"worker": true
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
"name": "square",
|
|
19
|
-
"type": "function",
|
|
20
|
-
"container": "args",
|
|
21
|
-
"code": function square (a) {
|
|
22
|
-
return a * a
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
"name": "Increment",
|
|
27
|
-
"type": "class",
|
|
28
|
-
"method": "step",
|
|
29
|
-
"container": "args",
|
|
30
|
-
"code": class Increment {
|
|
31
|
-
constructor () {
|
|
32
|
-
this.i = 0
|
|
33
|
-
}
|
|
34
|
-
step (a) {
|
|
35
|
-
this.i += 1
|
|
36
|
-
return a + this.i
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
],
|
|
41
|
-
"inputs": [
|
|
42
|
-
{ "name": "a", "type": "int", "default": 2 },
|
|
43
|
-
{ "name": "b", "type": "int", "default": 3 }
|
|
44
|
-
],
|
|
45
|
-
"outputs": [
|
|
46
|
-
{ "name": "square", "type": "int" }
|
|
47
|
-
],
|
|
48
|
-
"autorun": false
|
|
49
|
-
}
|
|
50
|
-
})
|
|
51
|
-
</script>
|
|
52
|
-
</html>
|
package/test/python.html
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
<html>
|
|
2
|
-
<div id="jsee-container">
|
|
3
|
-
<script src="/dist/jsee.js"></script>
|
|
4
|
-
<script>
|
|
5
|
-
new JSEE({
|
|
6
|
-
schema: {
|
|
7
|
-
"model": {
|
|
8
|
-
"name": "pytest",
|
|
9
|
-
"type": "py",
|
|
10
|
-
"description": "Testing pyodide project",
|
|
11
|
-
"container": "object",
|
|
12
|
-
"code": `
|
|
13
|
-
import numpy as np
|
|
14
|
-
from js import a, b
|
|
15
|
-
np.mean([a, b])
|
|
16
|
-
`.replace(/^\s+/gm, ''),
|
|
17
|
-
"autorun": false,
|
|
18
|
-
"worker": true,
|
|
19
|
-
"imports": [
|
|
20
|
-
"numpy"
|
|
21
|
-
]
|
|
22
|
-
},
|
|
23
|
-
"inputs": [
|
|
24
|
-
{
|
|
25
|
-
"type": "int",
|
|
26
|
-
"name": "a"
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
"type": "int",
|
|
30
|
-
"name": "b"
|
|
31
|
-
}
|
|
32
|
-
],
|
|
33
|
-
"outputs": [
|
|
34
|
-
{
|
|
35
|
-
"type": "int"
|
|
36
|
-
}
|
|
37
|
-
]
|
|
38
|
-
}
|
|
39
|
-
})
|
|
40
|
-
</script>
|
|
41
|
-
</html>
|
package/test/string.html
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
<html>
|
|
2
|
-
<div id="jsee-container">
|
|
3
|
-
<script src="/dist/jsee.js"></script>
|
|
4
|
-
<script>
|
|
5
|
-
new JSEE({
|
|
6
|
-
schema: {
|
|
7
|
-
"model": {
|
|
8
|
-
"name": "sum",
|
|
9
|
-
"type": "function",
|
|
10
|
-
"container": "args",
|
|
11
|
-
"code": `
|
|
12
|
-
function sum (a, b) {
|
|
13
|
-
return a + b
|
|
14
|
-
}
|
|
15
|
-
`,
|
|
16
|
-
"autorun": true,
|
|
17
|
-
"worker": false
|
|
18
|
-
},
|
|
19
|
-
"inputs": [
|
|
20
|
-
{ "name": "a", "type": "int", "default": 100 },
|
|
21
|
-
{ "name": "b", "type": "int", "default": 42 }
|
|
22
|
-
]
|
|
23
|
-
}
|
|
24
|
-
})
|
|
25
|
-
</script>
|
|
26
|
-
</html>
|
package/test/stringw.html
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
<html>
|
|
2
|
-
<div id="jsee-container">
|
|
3
|
-
<script src="/dist/jsee.js"></script>
|
|
4
|
-
<script>
|
|
5
|
-
|
|
6
|
-
new JSEE({
|
|
7
|
-
schema: {
|
|
8
|
-
"model": {
|
|
9
|
-
"name": "sum",
|
|
10
|
-
"type": "function",
|
|
11
|
-
"container": "args",
|
|
12
|
-
"code": `
|
|
13
|
-
function sum (a, b) {
|
|
14
|
-
return a + b
|
|
15
|
-
}
|
|
16
|
-
`,
|
|
17
|
-
"autorun": true,
|
|
18
|
-
"worker": true
|
|
19
|
-
},
|
|
20
|
-
"inputs": [
|
|
21
|
-
{ "name": "a", "type": "int", "default": 100 },
|
|
22
|
-
{ "name": "b", "type": "int", "default": 42 }
|
|
23
|
-
]
|
|
24
|
-
},
|
|
25
|
-
container: '#jsee-container',
|
|
26
|
-
verbose: false
|
|
27
|
-
})
|
|
28
|
-
</script>
|
|
29
|
-
</html>
|
package/test/sum.schema.json
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"model": {
|
|
3
|
-
"name": "sum",
|
|
4
|
-
"type": "function",
|
|
5
|
-
"title": "title",
|
|
6
|
-
"description": "description",
|
|
7
|
-
"container": "args",
|
|
8
|
-
"url": "example-sum.js",
|
|
9
|
-
"autorun": true,
|
|
10
|
-
"worker": false
|
|
11
|
-
},
|
|
12
|
-
"inputs": [
|
|
13
|
-
{ "name": "a", "type": "int", "default": 100 },
|
|
14
|
-
{ "name": "b", "type": "int", "default": 42 }
|
|
15
|
-
]
|
|
16
|
-
}
|
|
17
|
-
|
package/test/sumw.schema.json
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"model": {
|
|
3
|
-
"name": "sum",
|
|
4
|
-
"type": "function",
|
|
5
|
-
"container": "args",
|
|
6
|
-
"url": "example-sum.js",
|
|
7
|
-
"autorun": true,
|
|
8
|
-
"worker": true
|
|
9
|
-
},
|
|
10
|
-
"inputs": [
|
|
11
|
-
{ "name": "a", "type": "int", "default": 100 },
|
|
12
|
-
{ "name": "b", "type": "int", "default": 42 }
|
|
13
|
-
]
|
|
14
|
-
}
|
|
15
|
-
|