@jseeio/jsee 0.4.2 → 0.8.1

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.
Files changed (66) hide show
  1. package/CHANGELOG.md +96 -0
  2. package/LICENSE +21 -0
  3. package/README.md +583 -55
  4. package/dist/2b3e1faf89f94a483539.png +0 -0
  5. package/dist/416d91365b44e4b4f477.png +0 -0
  6. package/dist/8f2c4d11474275fbc161.png +0 -0
  7. package/dist/jsee.core.js +1 -0
  8. package/dist/jsee.full.js +1 -0
  9. package/dist/jsee.runtime.js +2 -1
  10. package/package.json +84 -18
  11. package/src/app.js +127 -32
  12. package/src/browser-bundle-node.js +9 -0
  13. package/src/cli.js +479 -67
  14. package/src/extended-imports.js +11 -0
  15. package/src/main.js +232 -44
  16. package/src/overlay.js +26 -1
  17. package/src/utils.js +386 -16
  18. package/templates/common-inputs.js +88 -0
  19. package/templates/common-outputs.js +340 -4
  20. package/templates/minimal-app.vue +367 -0
  21. package/templates/minimal-input.vue +573 -0
  22. package/templates/minimal-output.vue +426 -0
  23. package/templates/virtual-table.vue +194 -0
  24. package/.claude/settings.local.json +0 -15
  25. package/.eslintrc.js +0 -38
  26. package/AGENTS.md +0 -65
  27. package/CLAUDE.md +0 -5
  28. package/CNAME +0 -1
  29. package/_config.yml +0 -26
  30. package/dist/jsee.js +0 -1
  31. package/dump.sh +0 -23
  32. package/jest-puppeteer.config.js +0 -14
  33. package/jest.config.js +0 -8
  34. package/jest.unit.config.js +0 -8
  35. package/jsee.dump.txt +0 -5459
  36. package/load/index.html +0 -52
  37. package/templates/bulma-app.vue +0 -242
  38. package/templates/bulma-input.vue +0 -125
  39. package/templates/bulma-output.vue +0 -101
  40. package/test/arrow-main.html +0 -18
  41. package/test/arrow-worker.html +0 -18
  42. package/test/class.html +0 -22
  43. package/test/code.html +0 -25
  44. package/test/codew.html +0 -25
  45. package/test/example-class.js +0 -8
  46. package/test/example-sum.js +0 -3
  47. package/test/fixtures/lodash-like.js +0 -15
  48. package/test/fixtures/upload-sample.csv +0 -3
  49. package/test/importw.html +0 -28
  50. package/test/minimal.html +0 -14
  51. package/test/minimal1.html +0 -13
  52. package/test/minimal2.html +0 -15
  53. package/test/minimal3.html +0 -10
  54. package/test/minimal4.html +0 -22
  55. package/test/pipeline.html +0 -52
  56. package/test/python.html +0 -41
  57. package/test/runtime-arrow.html +0 -18
  58. package/test/string.html +0 -26
  59. package/test/stringw.html +0 -29
  60. package/test/sum.schema.json +0 -17
  61. package/test/sumw.schema.json +0 -15
  62. package/test/test-basic.test.js +0 -630
  63. package/test/test-python.test.js +0 -23
  64. package/test/unit/cli-fetch.test.js +0 -229
  65. package/test/unit/utils.test.js +0 -908
  66. package/webpack.config.js +0 -101
package/load/index.html DELETED
@@ -1,52 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
6
- <title>JSEE Schema Loader</title>
7
- <style>
8
- body {
9
- font-family: sans-serif;
10
- }
11
- #jsee-container {
12
- max-width: 1100px;
13
- margin: auto;
14
- }
15
- #loader-tip {
16
- max-width: 1100px;
17
- margin: 8px auto 0;
18
- font-size: 12px;
19
- color: #666;
20
- }
21
- </style>
22
- </head>
23
- <body>
24
- <div id="loader-tip">Tip: schema inputs can be prefilled via query params, including file URLs that now auto-load.</div>
25
- <div id="jsee-container"></div>
26
- <script src="/dist/jsee.js" type="text/javascript"></script>
27
- <script>window.JSEE || document.write('<script src="https://cdn.jsdelivr.net/npm/@jseeio/jsee@latest/dist/jsee.runtime.js">\x3C/script>')</script>
28
- <script>window.JSEE || document.write('<script src="https://unpkg.com/@jseeio/jsee@latest/dist/jsee.runtime.js">\x3C/script>')</script>
29
- <script>
30
- var params = new URLSearchParams(window.location.search)
31
- var schemaStr = params.get('s')
32
- if (schemaStr) {
33
- let schema
34
- try {
35
- schema = JSON.parse(schemaStr);
36
- } catch (e) {
37
- schema = schemaStr.includes('/') ? schemaStr : '/apps/' + schemaStr + '/schema.json'
38
- }
39
- console.log('[Loader] Schema:', schemaStr, schema)
40
- try {
41
- const env = new JSEE({
42
- container: document.getElementById('jsee-container'),
43
- schema: schema
44
- })
45
- } catch (error) {
46
- console.error('[Loader] Failed to initialize JSEE:', error)
47
- document.getElementById('jsee-container').innerHTML = '<pre style="color:#f14668;padding:16px;border:1px solid #f14668;border-radius:6px;">Failed to initialize schema. Check browser console for details.</pre>'
48
- }
49
- }
50
- </script>
51
- </body>
52
- </html>
@@ -1,242 +0,0 @@
1
- <style lang="scss" scoped>
2
- :deep(.jsee-app) {
3
- @import "../node_modules/vue3-json-viewer/dist/index.css";
4
- @import "../node_modules/bulma/sass/base/_all.sass";
5
- @import "../node_modules/bulma/sass/utilities/_all.sass";
6
- @import "../node_modules/bulma/sass/form/_all.sass";
7
- @import "../node_modules/bulma/sass/grid/_all.sass";
8
- @import "../node_modules/bulma/sass/elements/_all.sass";
9
- @import "../node_modules/bulma/sass/helpers/_all.sass";
10
- @import "../node_modules/bulma/sass/components/card.sass";
11
- @import "../node_modules/bulma/sass/layout/section.sass";
12
-
13
- font-family: sans-serif;
14
-
15
- #overlay {
16
- display: none;
17
- position: absolute;
18
- top: -1px;
19
- left: -1px;
20
- right: -1px;
21
- bottom: -1px;
22
- background: #F5F5F5;
23
- opacity: .6;
24
- z-index: 1000;
25
- align-items: center;
26
- justify-content: center;
27
- }
28
-
29
- .column {
30
- box-sizing: border-box;
31
- }
32
-
33
- .card {
34
- box-sizing: content-box;
35
- }
36
-
37
- #inputs .column {
38
- padding: 0 10px;
39
- }
40
-
41
- #outputs .column {
42
- padding: 0 10px;
43
- }
44
-
45
- .card-header {
46
- box-shadow: none;
47
- border-bottom: 1px solid #ececec;
48
- }
49
-
50
- .card-header-title {
51
- font-weight: 400;
52
- }
53
-
54
- .card-header-title, .card-header-icon {
55
- padding: 0.75rem 1.5rem;
56
- cursor: initial;
57
- }
58
-
59
- .card-header-icon button {
60
- border: none;
61
- margin: 0 0 0 5px;
62
- padding: 0px 7px;
63
- height: auto;
64
-
65
- &:hover {
66
- background-color: whitesmoke;
67
- }
68
- }
69
-
70
- .card-footer {
71
- /* background: linear-gradient(62deg, rgba(0,171,209,1) 0%, rgba(0,209,178,1) 100%); */
72
- background: linear-gradient(90deg, #4395d0 0%, #00d1b2 100%);
73
- }
74
-
75
- .card-footer.reset {
76
- background: linear-gradient(90deg, #ff577f 0%, #4395d0 50%, #00d1b2 100%);
77
- }
78
-
79
- .card-footer .button {
80
- background: none;
81
- padding: .75rem 1.5rem;
82
- border: none !important;
83
- border-radius: .25rem !important;
84
- font-size: 14px;
85
- font-weight: 400;
86
- }
87
-
88
- .reset-button {
89
- justify-content: left;
90
- }
91
-
92
- .reset-button:hover {
93
- background-color: transparent !important;
94
- background: linear-gradient(90deg, #ff3a56 0%, #fff0 80%);
95
- box-shadow: -5px 0px 5px -2px #fd4c7e30;
96
- }
97
-
98
- .card-footer .run-button {
99
- border-left: 1px dashed white;
100
- justify-content: right;
101
- }
102
-
103
- .card-footer .run-button:hover {
104
- background-color: transparent !important;
105
- background: linear-gradient(270deg, #02dbb2 0%, #fff0 80%);
106
- box-shadow: 5px 0px 5px -2px #48ffd43b;
107
- }
108
-
109
- .card-footer .run-button.running .run-icon {
110
- color: #016c5c !important;
111
- }
112
-
113
- .example-button {
114
- margin-top: 3px;
115
- padding: 5px 10px;
116
- border-radius: 5px !important;
117
- height: auto;
118
- }
119
-
120
- .field {
121
- margin-bottom: 5px;
122
- }
123
-
124
- .input, .textarea, .select select {
125
- border-color: #e8e8e8;
126
- border-top-left-radius: 0;
127
- }
128
-
129
- .input:focus, .textarea:focus, .select select:focus, .is-focused.input, .is-focused.textarea, .select select.is-focused, .input:active, .textarea:active, .select select:active, .is-active.input, .is-active.textarea, .select select.is-active {
130
- border-color: #7ab8e6;
131
- box-shadow: 0 0 0 0.125em rgba(72, 139, 199, 0.25);
132
- }
133
-
134
- #inputs .field > label:first-child {
135
- background: #f2f2f2;
136
- padding: 1px 5px;
137
- margin-top: 2px;
138
- display: inline-block;
139
- border-top-left-radius: 5px;
140
- border-top-right-radius: 5px;
141
- }
142
-
143
- }
144
- </style>
145
- <template>
146
- <section>
147
- <div class="jsee-app">
148
- <div class="columns">
149
- <div class="column is-full" id="$parent.model" v-if="$parent.model">
150
- <h2 class="title is-2" v-if="$parent.model.title">{{ $parent.model.title }}</h2>
151
- <p v-if="$parent.model.description">{{ $parent.model.description }}</p>
152
- </div>
153
- </div>
154
- <div class="columns is-multiline">
155
- <div class="column" v-bind:class="($parent.design && $parent.design.grid && ($parent.design.grid.length > 0)) ? 'is-' + $parent.design.grid[0] : ''">
156
- <!-- Inputs -->
157
- <div class="card bordered">
158
- <div class="card-content columns is-multiline" id="inputs" v-if="$parent.inputs && $parent.inputs.length > 0">
159
- <div
160
- v-for="(input, index) in $parent.inputs"
161
- :key="index"
162
- v-bind:class="[
163
- 'column',
164
- input.columns ? 'is-' + input.columns : 'is-12',
165
- input.columnsMobile ? 'is-' + input.columnsMobile + '-mobile' : '',
166
- input.columnsTablet ? 'is-' + input.columnsTablet + '-tablet' : '',
167
- input.columnsDesktop ? 'is-' + input.columnsDesktop + '-desktop' : '',
168
- ]"
169
- >
170
- <vue-input
171
- v-bind:input="input"
172
- v-if="input.display !== false && $parent.display(index)"
173
- v-on:inchange="$parent.run()"
174
- ></vue-input>
175
- </div>
176
- <pre v-if="$parent.model.debug">{{ $parent.inputs }}</pre>
177
- <!-- <button class="button is-primary" id="run"><span>▸</span>&nbsp;&nbsp;Run</button> -->
178
- </div>
179
- <footer class="card-footer" v-bind:class="{ reset: $parent.dataChanged }">
180
- <button
181
- v-on:click="$parent.reset()"
182
- v-if="$parent.inputs && $parent.inputs.length > 0 && $parent.dataChanged"
183
- class="button reset-button icon card-footer-item is-danger is-small"
184
- >
185
- <span class="rest-icon has-text-danger-dark">✕</span>
186
- <span>&nbsp; Reset</span>
187
- </button>
188
- <button
189
- v-on:click="$parent.run('run')"
190
- class="button run-button icon card-footer-item is-primary is-small"
191
- v-bind:class="{ running: $parent.clickRun }"
192
- >
193
- <span>&nbsp; Run &nbsp;</span>
194
- <span class="run-icon has-text-primary-dark">▸</span>
195
- </button>
196
- </footer>
197
- </div>
198
- <!-- Examples -->
199
- <div v-if="$parent.examples">
200
- <p style="margin-top: 20px">Examples</p>
201
- <div v-for="(example, index) in $parent.examples">
202
- <button
203
- v-on:click="$parent.reset(example)"
204
- class="button is-small example-button"
205
- style="white-space: normal; width: 100%; text-align: left; font-family: monospace; font-size: 10px;"
206
- >
207
- {{ JSON.stringify(example, null, 2) }}
208
- </button>
209
- </div>
210
- </div>
211
- </div>
212
- <div class="column" id="outputs" v-bind:class="($parent.design && $parent.design.grid && ($parent.design.grid.length > 1)) ? 'is-' + $parent.design.grid[1] : ''">
213
- <!-- Outputs -->
214
- <div v-if="$parent.outputs">
215
- <div class="columns is-multiline">
216
- <div
217
- v-for="(output, index) in $parent.outputs"
218
- :key="index"
219
- v-bind:class="[
220
- 'column',
221
- output.columns ? 'is-' + output.columns : 'is-12',
222
- output.columnsMobile ? 'is-' + output.columnsMobile + '-mobile' : '',
223
- output.columnsTablet ? 'is-' + output.columnsTablet + '-tablet' : '',
224
- output.columnsDesktop ? 'is-' + output.columnsDesktop + '-desktop' : '',
225
- ]"
226
- >
227
- <vue-output
228
- v-bind:output="output"
229
- v-on:notification="$parent.notify($event)"
230
- ></vue-output>
231
- </div>
232
- </div>
233
- <pre v-if="$parent.debug">{{ $parent.outputs }}</pre>
234
- </div>
235
- </div>
236
- </div>
237
- </div>
238
- </section>
239
- </template>
240
- <script>
241
- export default {}
242
- </script>
@@ -1,125 +0,0 @@
1
- <style lang="scss" scoped>
2
- .control {
3
- margin-top: -1px;
4
- }
5
- </style>
6
-
7
- <template>
8
- <div class="field" v-if="input.type == 'int' || input.type == 'float' || input.type == 'number'">
9
- <label v-bind:for="input.name" class="is-size-7">{{ input.name }}</label>
10
- <div class="control">
11
- <input
12
- v-model="input.value"
13
- v-bind:id="input.name"
14
- v-bind:step="input.type == 'int' ? 1 : 0.001"
15
- v-bind:placeholder="input.placeholder ? input.placeholder : input.name"
16
- v-bind:min="input.min"
17
- v-bind:max="input.max"
18
- v-bind:disabled="input.disabled"
19
- v-on:change="changeHandler"
20
- class="input"
21
- type="number"
22
- >
23
- </div>
24
- </div>
25
-
26
- <div class="field" v-if="input.type == 'string' || input.type == 'color'">
27
- <label v-bind:for="input.name" class="is-size-7">{{ input.name }}</label>
28
- <div class="control">
29
- <input
30
- v-model="input.value"
31
- v-bind:id="input.name"
32
- v-bind:placeholder="input.placeholder ? input.placeholder : input.name"
33
- v-on:change="changeHandler"
34
- class="input"
35
- >
36
- </div>
37
- </div>
38
-
39
- <div class="field" v-if="input.type == 'text'">
40
- <label v-bind:for="input.name" class="is-size-7">{{ input.name }}</label>
41
- <div class="control">
42
- <textarea
43
- v-model="input.value"
44
- v-bind:id="input.name"
45
- v-bind:placeholder="input.placeholder ? input.placeholder : input.name"
46
- v-on:change="changeHandler"
47
- class="textarea"
48
- ></textarea>
49
- </div>
50
- </div>
51
-
52
- <div class="field" v-if="input.type == 'checkbox' || input.type == 'bool'">
53
- <div class="control">
54
- <label class="checkbox is-size-7">
55
- <input
56
- v-model="input.value"
57
- v-bind:id="input.name"
58
- v-on:change="changeHandler"
59
- type="checkbox"
60
- >
61
- {{ input.name }}
62
- </label>
63
- </div>
64
- </div>
65
-
66
- <div class="field" v-if="input.type == 'categorical' || input.type == 'select'">
67
- <label v-bind:for="input.name" class="is-size-7">{{ input.name }}</label>
68
- <div class="control">
69
- <div class="select is-fullwidth">
70
- <select
71
- v-model="input.value"
72
- v-bind:id="input.name"
73
- v-on:change="changeHandler"
74
- >
75
- <option
76
- v-for="(option, oi) in input.options"
77
- >{{ option }}</option>
78
- </select>
79
- </div>
80
- </div>
81
- </div>
82
-
83
- <div class="field" v-if="input.type == 'file'">
84
- <label v-bind:for="input.name" class="is-size-7">{{ input.name }}</label>
85
- <div class="control">
86
- <div class="file has-name is-fullwidth" v-bind:class="{ 'is-primary': !input.file }" v-if="!input.disabled">
87
- <file-picker
88
- v-model="input.value"
89
- v-model:url="input.url"
90
- v-bind:raw="input.raw === true || input.stream === true"
91
- v-bind:autoload="input.urlAutoLoad === true"
92
- v-on:change="changeHandler"
93
- ></file-picker>
94
- </div>
95
- <div class="file has-name is-fullwidth" v-bind:class="{ 'is-primary': !input.file }" v-else>
96
- <input
97
- class="input"
98
- v-bind:id="input.name"
99
- v-bind:value="input.default"
100
- disabled
101
- >
102
- </div>
103
- </div>
104
- </div>
105
-
106
- <div class="field" v-if="input.type == 'action' || input.type == 'button'">
107
- <button
108
- v-on:click="$parent.$parent.run(input.name.toLowerCase().replace(/ /g, '_'))"
109
- class="button is-small"
110
- style="width: 100%; padding: 5px 0; margin-top: 8px; text-align: left;"
111
- >
112
- <span>&nbsp; {{ input.title ? input.title : input.name }} &nbsp;</span>
113
- </button>
114
- </div>
115
-
116
- <div class="field is-horizontal" v-if="input.type == 'group'">
117
- <div class="field-body">
118
- <vue-input v-for="(el, index) in input.elements" v-bind:input="el" ></vue-input>
119
- </div>
120
- </div>
121
- </template>
122
-
123
- <script>
124
- export { component as default } from "./common-inputs.js"
125
- </script>
@@ -1,101 +0,0 @@
1
- <style scoped>
2
- /* Quickly stretch the card when browser goes native full‑screen
3
- (actual FS API above) OR when the helper class is present. */
4
- /*
5
- .is-fullscreen {
6
- position: fixed;
7
- inset: 0;
8
- z-index: 9999;
9
- width: 100vw;
10
- height: 100vh;
11
- overflow: auto;
12
- background: #fff;
13
- }
14
- .is-fullscreen .card-content, .is-fullscreen .content {
15
- height: 100% !important;
16
- }
17
- */
18
-
19
- /* Full‑screen override */
20
- .is-fullscreen {
21
- position: fixed;
22
- inset: 0;
23
- z-index: 9999;
24
- width: 100vw;
25
- height: 100vh;
26
- background: #fff;
27
- display: flex;
28
- flex-direction: column;
29
- }
30
-
31
- .is-fullscreen .card-content {
32
- flex: 1 1 auto;
33
- overflow: auto;
34
- }
35
-
36
- /* Ensure Plotly div or other content can grow */
37
- .is-fullscreen .content, .is-fullscreen .custom-container {
38
- height: 100% !important;
39
- }
40
- </style>
41
-
42
- <template>
43
- <div
44
- class="card mb-5"
45
- v-show="!(typeof output.value === 'undefined')"
46
- :class="{ 'is-fullscreen': isFullScreen }"
47
- ref="cardRoot"
48
- >
49
- <header class="card-header">
50
- <p class="card-header-title is-size-6" v-if="output.name">
51
- {{ output.name }}
52
- </p>
53
- <!-- <p class="card-header-icon" v-if="output.type != 'function'"> -->
54
- <p class="card-header-icon">
55
- <button class="button is-small" v-on:click="save()">Save</button>
56
- <button class="button is-small" v-on:click="copy()">Copy</button>
57
- <button
58
- class="button is-small"
59
- v-if="!isFullScreen"
60
- @click="toggleFullScreen"
61
- title="Expand to full screen"
62
- >
63
- Fullscreen
64
- </button>
65
- <button
66
- class="button is-small"
67
- v-else
68
- @click="toggleFullScreen"
69
- title="Exit full screen"
70
- >
71
- Close
72
- </button>
73
- </p>
74
- </header>
75
- <div class="card-content">
76
- <div class="content" :id="outputName" v-if="(output.type == 'svg') || (output.type == 'html')">
77
- <div v-html="output.value"></div>
78
- </div>
79
- <div class="content" :id="outputName" v-else-if="output.type == 'object'">
80
- <json-viewer :value="output.value" copyable sort />
81
- </div>
82
- <div class="content" :id="outputName" v-else-if="output.type == 'code'">
83
- <pre>{{ output.value }}</pre>
84
- </div>
85
- <div class="content" :id="outputName" v-else-if="output.type == 'function'">
86
- <div class="custom-container" ref="customContainer"></div>
87
- </div>
88
- <div class="content" :id="outputName" v-else-if="output.type == 'blank'">
89
- <!-- will be filled by custom render function -->
90
- </div>
91
- <div class="content" :id="outputName" v-else>
92
- <pre>{{ output.value }}</pre>
93
- </div>
94
- </div>
95
- </div>
96
- </template>
97
-
98
- <script>
99
- export { component as default } from "./common-outputs.js"
100
- </script>
101
-
@@ -1,18 +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
- worker: false,
9
- code: ({ a, b }) => ({ sum: Number(a) + Number(b) })
10
- },
11
- inputs: [
12
- { name: 'a', type: 'int', default: 100 },
13
- { name: 'b', type: 'int', default: 42 }
14
- ]
15
- }
16
- })
17
- </script>
18
- </html>
@@ -1,18 +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
- worker: true,
9
- code: ({ a, b }) => ({ sum: Number(a) + Number(b) })
10
- },
11
- inputs: [
12
- { name: 'a', type: 'int', default: 100 },
13
- { name: 'b', type: 'int', default: 42 }
14
- ]
15
- }
16
- })
17
- </script>
18
- </html>
package/test/class.html DELETED
@@ -1,22 +0,0 @@
1
-
2
- <html>
3
- <div id="jsee-container">
4
- <script src="/dist/jsee.js"></script>
5
- <script>
6
- new JSEE({
7
- schema: {
8
- 'model': {
9
- 'name': 'Doubler',
10
- 'method': 'double',
11
- 'type': 'class',
12
- 'container': 'args',
13
- 'url': '/test/example-class.js',
14
- },
15
- 'inputs': [
16
- { 'name': 'b', 'type': 'int', 'default': 100 }
17
- ]
18
- },
19
- container: '#jsee-container'
20
- })
21
- </script>
22
- </html>
package/test/code.html DELETED
@@ -1,25 +0,0 @@
1
- <html>
2
- <div id="jsee-container">
3
- <script src="/dist/jsee.js"></script>
4
- <script>
5
- function sum (a, b) {
6
- return a + b
7
- }
8
- new JSEE({
9
- schema: {
10
- "model": {
11
- "name": "sum",
12
- "type": "function",
13
- "container": "args",
14
- "code": sum,
15
- "autorun": true,
16
- "worker": false
17
- },
18
- "inputs": [
19
- { "name": "a", "type": "int", "default": 100 },
20
- { "name": "b", "type": "int", "default": 42 }
21
- ]
22
- }
23
- })
24
- </script>
25
- </html>
package/test/codew.html DELETED
@@ -1,25 +0,0 @@
1
- <html>
2
- <div id="jsee-container">
3
- <script src="/dist/jsee.js"></script>
4
- <script>
5
- function sum (a, b) {
6
- return a + b
7
- }
8
- new JSEE({
9
- schema: {
10
- "model": {
11
- "name": "sum",
12
- "type": "function",
13
- "container": "args",
14
- "code": sum,
15
- "autorun": true,
16
- "worker": true
17
- },
18
- "inputs": [
19
- { "name": "a", "type": "int", "default": 100 },
20
- { "name": "b", "type": "int", "default": 42 }
21
- ]
22
- }
23
- })
24
- </script>
25
- </html>
@@ -1,8 +0,0 @@
1
- class Doubler {
2
- constructor() {
3
- this.a = 2
4
- }
5
- double(b) {
6
- return this.a * b
7
- }
8
- }
@@ -1,3 +0,0 @@
1
- function sum (a, b) {
2
- return a + b
3
- }
@@ -1,15 +0,0 @@
1
- (function (root) {
2
- function kebabCase (input) {
3
- if (typeof input !== 'string') {
4
- return ''
5
- }
6
- return input
7
- .replace(/([a-z0-9])([A-Z])/g, '$1-$2')
8
- .replace(/[^a-zA-Z0-9]+/g, '-')
9
- .replace(/^-+|-+$/g, '')
10
- .toLowerCase()
11
- }
12
-
13
- root._ = root._ || {}
14
- root._.kebabCase = kebabCase
15
- })(typeof self !== 'undefined' ? self : window)
@@ -1,3 +0,0 @@
1
- name,age
2
- Alice,30
3
- Bob,25