json-object-editor 0.10.443 → 0.10.501

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 (57) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/_www/mcp-test.html +136 -0
  3. package/css/jif/Read Me.txt +5 -5
  4. package/css/jif/demo-files/demo.css +153 -153
  5. package/css/jif/demo-files/demo.js +30 -30
  6. package/css/jif/demo.html +285 -285
  7. package/css/jif/fonts/joeiconfont.svg +24 -24
  8. package/css/jif/ie7/ie7.css +45 -45
  9. package/css/jif/ie7/ie7.js +46 -46
  10. package/css/jif/selection.json +573 -573
  11. package/css/joe.css +12 -12
  12. package/css/jquery-ui-1.10.4.custom.min.css +5 -5
  13. package/css/jquery-ui.min.css +6 -6
  14. package/css/jquery.timepicker.css +72 -72
  15. package/es5-build/web-components/account-info.js +136 -136
  16. package/es5-build/web-components/capp-components.js +160 -160
  17. package/es5-build/web-components/capp-panel.js +85 -85
  18. package/es5-build/web-components/capp-view.js +73 -73
  19. package/es5-build/web-components/joe-autocomplete.js +149 -149
  20. package/es5-build/web-components/joe-button.js +132 -132
  21. package/es5-build/web-components/joe-card.js +92 -92
  22. package/es5-build/web-components/joe-component.js +74 -74
  23. package/es5-build/web-components/joe-field.js +70 -70
  24. package/es5-build/web-components/joe-list-item.js +176 -176
  25. package/es5-build/web-components/joe-user-cube.js +100 -100
  26. package/es5-build/web-components/report-components.js +133 -133
  27. package/grunt/build +86 -86
  28. package/grunt/package-lock.json +9105 -9105
  29. package/grunt/package.json +47 -47
  30. package/grunt/src +86 -86
  31. package/js/joe.js +10 -10
  32. package/js/leaflet.js +8 -8
  33. package/js/libs/adapter-latest.js +4400 -4400
  34. package/js/libs/craydent-1.9.2.js +11741 -11741
  35. package/js/libs/craydent-upload-2.0.0.js +394 -394
  36. package/js/libs/hammer.min.208.js +6 -6
  37. package/js/libs/jquery-3.5.1.min.js +2 -2
  38. package/js/libs/moment.min.js +6 -6
  39. package/js/native-shim.js +46 -46
  40. package/js/plugins/c3/c3.min.js +5 -5
  41. package/js/plugins/c3/d3.v3.min.js +4 -4
  42. package/js/plugins/threejs/Detector.js +78 -78
  43. package/js/plugins/threejs/LICENSE +21 -21
  44. package/js/plugins/threejs/MTLLoader.js +417 -417
  45. package/js/plugins/threejs/OBJLoader.js +564 -564
  46. package/js/plugins/threejs/OrbitControls.js +1037 -1037
  47. package/js/plugins/threejs/README.md +9 -9
  48. package/js/plugins/threejs/assets/female-croupier-2013-03-26.mtl +3 -3
  49. package/js/plugins/threejs/index.html +178 -178
  50. package/js/plugins/threejs/three.js +41507 -41507
  51. package/package.json +2 -2
  52. package/readme.md +113 -0
  53. package/server/init.js +7 -0
  54. package/server/modules/MCP.js +310 -0
  55. package/server/modules/Server.js +23 -2
  56. package/server/plugins/chatgpt-assistants.js +359 -359
  57. package/server/plugins/chatgpt-tools.js +79 -79
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  ## CHANGELOG
2
2
 
3
+ ### 0.10.500
4
+ 500 - MCP integration (initial)
5
+ - MCP core module with JSON-RPC 2.0 endpoint (/mcp) protected by auth
6
+ - Manifest available at /.well-known/mcp/manifest.json for tool discovery
7
+ - Tools: listSchemas, getSchema, getObject, getObjectsByIds, queryObjects, searchCache, saveObject
8
+ - Tools mapped to real JOE APIs (Schemas, Storage, Cache) with sensitive-field sanitization
9
+ - Read-path prefers Cache for speed; saveObject uses Storage.save (events/history/socket emit)
10
+ - Adopted module init pattern: MCP.init() attaches routes via init.js; removed direct Server.js wiring
11
+ - Basics for local testing (auth + example payloads) to be added to README
12
+
3
13
  ### 0.10.400
4
14
  443 - added npm build support
5
15
  442 - engagements (alpha)
@@ -0,0 +1,136 @@
1
+ <!doctype html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <title>JOE MCP Test</title>
6
+ <meta name="viewport" content="width=device-width, initial-scale=1">
7
+ <style>
8
+ body{font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif;margin:20px;}
9
+ label{display:block;margin:8px 0 4px}
10
+ select, input, textarea, button{font-size:14px}
11
+ textarea{width:100%;height:160px;font-family:ui-monospace,Menlo,Consolas,monospace}
12
+ pre{background:#f6f8fa;border:1px solid #e1e4e8;padding:10px;overflow:auto}
13
+ .row{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
14
+ .small{font-size:12px;color:#666}
15
+ .bad{color:#b00020}
16
+ .good{color:#0a7d00}
17
+ </style>
18
+ </head>
19
+ <body>
20
+ <h1>JOE MCP Test</h1>
21
+ <div class="small">Use this page to discover tools and call the JSON-RPC endpoint.</div>
22
+
23
+ <h3>Manifest</h3>
24
+ <div class="row">
25
+ <label for="base">Base URL</label>
26
+ <input id="base" value="" placeholder="http://localhost:{{PORT}}" style="min-width:280px"/>
27
+ <button id="loadManifest">Load manifest</button>
28
+ <span id="status" class="small"></span>
29
+ </div>
30
+ <label for="tool">Tools</label>
31
+ <select id="tool"></select>
32
+ <pre id="toolInfo"></pre>
33
+
34
+ <h3>Call JSON-RPC</h3>
35
+ <label for="params">Params (JSON)</label>
36
+ <textarea id="params">{}</textarea>
37
+ <div class="row">
38
+ <button id="call">POST /mcp</button>
39
+ <span id="callStatus" class="small"></span>
40
+ </div>
41
+ <pre id="result"></pre>
42
+
43
+ <script>
44
+ (function(){
45
+ const $ = (id)=>document.getElementById(id);
46
+ const base = $('base');
47
+ const loadBtn = $('loadManifest');
48
+ const status = $('status');
49
+ const toolSel = $('tool');
50
+ const toolInfo = $('toolInfo');
51
+ const params = $('params');
52
+ const callBtn = $('call');
53
+ const callStatus = $('callStatus');
54
+ const result = $('result');
55
+
56
+ // Try to infer base from window location
57
+ base.value = base.value || (location.origin);
58
+
59
+ let manifest = null;
60
+ let idCounter = 1;
61
+
62
+ function setStatus(el, msg, ok){
63
+ el.textContent = msg || '';
64
+ el.className = 'small ' + (ok===true?'good': ok===false?'bad':'');
65
+ }
66
+
67
+ async function fetchJSON(url, opts){
68
+ const res = await fetch(url, opts);
69
+ const ct = res.headers.get('content-type')||'';
70
+ const isJSON = ct.includes('application/json');
71
+ if(!res.ok){
72
+ let detail = isJSON ? await res.json().catch(()=>({})) : await res.text();
73
+ throw new Error('HTTP '+res.status+': '+(isJSON?JSON.stringify(detail):detail));
74
+ }
75
+ return isJSON ? res.json() : res.text();
76
+ }
77
+
78
+ loadBtn.onclick = async function(){
79
+ setStatus(status, 'Loading...', null);
80
+ toolSel.innerHTML = '';
81
+ toolInfo.textContent='';
82
+ try{
83
+ const url = base.value.replace(/\/$/,'') + '/.well-known/mcp/manifest.json';
84
+ manifest = await fetchJSON(url);
85
+ (manifest.tools||[]).forEach(t=>{
86
+ const opt=document.createElement('option');
87
+ opt.value=t.name; opt.textContent=t.name;
88
+ toolSel.appendChild(opt);
89
+ });
90
+ if((manifest.tools||[]).length){
91
+ toolSel.selectedIndex=0; renderToolInfo();
92
+ }
93
+ setStatus(status, 'Manifest loaded', true);
94
+ }catch(e){
95
+ setStatus(status, e.message||String(e), false);
96
+ }
97
+ };
98
+
99
+ function renderToolInfo(){
100
+ const name = toolSel.value;
101
+ const tool = (manifest.tools||[]).find(t=>t.name===name);
102
+ toolInfo.textContent = tool ? JSON.stringify(tool, null, 2) : '';
103
+ // Prefill common params for convenience
104
+ if(tool && tool.params){
105
+ params.value = JSON.stringify(Object.fromEntries(Object.keys(tool.params.properties||{}).map(k=>[k, null])), null, 2);
106
+ }
107
+ }
108
+ toolSel.onchange = renderToolInfo;
109
+
110
+ callBtn.onclick = async function(){
111
+ setStatus(callStatus, 'Calling...', null);
112
+ result.textContent='';
113
+ try{
114
+ const url = base.value.replace(/\/$/,'') + '/mcp';
115
+ let p = {};
116
+ try{ p = params.value ? JSON.parse(params.value) : {}; }catch(e){ throw new Error('Invalid JSON in params'); }
117
+ const body = {
118
+ jsonrpc: '2.0',
119
+ id: String(idCounter++),
120
+ method: toolSel.value,
121
+ params: p
122
+ };
123
+ const resp = await fetchJSON(url, { method:'POST', headers:{'Content-Type':'application/json'}, body: JSON.stringify(body)});
124
+ result.textContent = JSON.stringify(resp, null, 2);
125
+ setStatus(callStatus, 'OK', true);
126
+ }catch(e){
127
+ setStatus(callStatus, e.message||String(e), false);
128
+ }
129
+ };
130
+
131
+ // Auto-load manifest on open
132
+ setTimeout(()=>loadBtn.click(), 50);
133
+ })();
134
+ </script>
135
+ </body>
136
+ </html>
@@ -1,5 +1,5 @@
1
- Open *demo.html* to see a list of all the glyphs in your font along with their codes/ligatures.
2
-
3
- You won't need any of the files located under the *demo-files* directory when including the generated font in your own projects.
4
-
5
- You can import *selection.json* back to the IcoMoon app using the *Import Icons* button (or via Main Menu > Manage Projects) to retrieve your icon selection.
1
+ Open *demo.html* to see a list of all the glyphs in your font along with their codes/ligatures.
2
+
3
+ You won't need any of the files located under the *demo-files* directory when including the generated font in your own projects.
4
+
5
+ You can import *selection.json* back to the IcoMoon app using the *Import Icons* button (or via Main Menu > Manage Projects) to retrieve your icon selection.
@@ -1,153 +1,153 @@
1
- body {
2
- padding: 0;
3
- margin: 0;
4
- font-family: sans-serif;
5
- font-size: 1em;
6
- line-height: 1.5;
7
- color: #555;
8
- background: #fff;
9
- }
10
- h1 {
11
- font-size: 1.5em;
12
- font-weight: normal;
13
- }
14
- small {
15
- font-size: .66666667em;
16
- }
17
- a {
18
- color: #e74c3c;
19
- text-decoration: none;
20
- }
21
- a:hover, a:focus {
22
- box-shadow: 0 1px #e74c3c;
23
- }
24
- .bshadow0, input {
25
- box-shadow: inset 0 -2px #e7e7e7;
26
- }
27
- input:hover {
28
- box-shadow: inset 0 -2px #ccc;
29
- }
30
- input, fieldset {
31
- font-size: 1em;
32
- margin: 0;
33
- padding: 0;
34
- border: 0;
35
- }
36
- input {
37
- color: inherit;
38
- line-height: 1.5;
39
- height: 1.5em;
40
- padding: .25em 0;
41
- }
42
- input:focus {
43
- outline: none;
44
- box-shadow: inset 0 -2px #449fdb;
45
- }
46
- .glyph {
47
- font-size: 16px;
48
- width: 15em;
49
- padding-bottom: 1em;
50
- margin-right: 4em;
51
- margin-bottom: 1em;
52
- float: left;
53
- overflow: hidden;
54
- }
55
- .liga {
56
- width: 80%;
57
- width: calc(100% - 2.5em);
58
- }
59
- .talign-right {
60
- text-align: right;
61
- }
62
- .talign-center {
63
- text-align: center;
64
- }
65
- .bgc1 {
66
- background: #f1f1f1;
67
- }
68
- .fgc1 {
69
- color: #999;
70
- }
71
- .fgc0 {
72
- color: #000;
73
- }
74
- p {
75
- margin-top: 1em;
76
- margin-bottom: 1em;
77
- }
78
- .mvm {
79
- margin-top: .75em;
80
- margin-bottom: .75em;
81
- }
82
- .mtn {
83
- margin-top: 0;
84
- }
85
- .mtl, .mal {
86
- margin-top: 1.5em;
87
- }
88
- .mbl, .mal {
89
- margin-bottom: 1.5em;
90
- }
91
- .mal, .mhl {
92
- margin-left: 1.5em;
93
- margin-right: 1.5em;
94
- }
95
- .mhmm {
96
- margin-left: 1em;
97
- margin-right: 1em;
98
- }
99
- .mls {
100
- margin-left: .25em;
101
- }
102
- .ptl {
103
- padding-top: 1.5em;
104
- }
105
- .pbs, .pvs {
106
- padding-bottom: .25em;
107
- }
108
- .pvs, .pts {
109
- padding-top: .25em;
110
- }
111
- .unit {
112
- float: left;
113
- }
114
- .unitRight {
115
- float: right;
116
- }
117
- .size1of2 {
118
- width: 50%;
119
- }
120
- .size1of1 {
121
- width: 100%;
122
- }
123
- .clearfix:before, .clearfix:after {
124
- content: " ";
125
- display: table;
126
- }
127
- .clearfix:after {
128
- clear: both;
129
- }
130
- .hidden-true {
131
- display: none;
132
- }
133
- .textbox0 {
134
- width: 3em;
135
- background: #f1f1f1;
136
- padding: .25em .5em;
137
- line-height: 1.5;
138
- height: 1.5em;
139
- }
140
- #testDrive {
141
- display: block;
142
- padding-top: 24px;
143
- line-height: 1.5;
144
- }
145
- .fs0 {
146
- font-size: 16px;
147
- }
148
- .fs1 {
149
- font-size: 32px;
150
- }
151
- .fs2 {
152
- font-size: 32px;
153
- }
1
+ body {
2
+ padding: 0;
3
+ margin: 0;
4
+ font-family: sans-serif;
5
+ font-size: 1em;
6
+ line-height: 1.5;
7
+ color: #555;
8
+ background: #fff;
9
+ }
10
+ h1 {
11
+ font-size: 1.5em;
12
+ font-weight: normal;
13
+ }
14
+ small {
15
+ font-size: .66666667em;
16
+ }
17
+ a {
18
+ color: #e74c3c;
19
+ text-decoration: none;
20
+ }
21
+ a:hover, a:focus {
22
+ box-shadow: 0 1px #e74c3c;
23
+ }
24
+ .bshadow0, input {
25
+ box-shadow: inset 0 -2px #e7e7e7;
26
+ }
27
+ input:hover {
28
+ box-shadow: inset 0 -2px #ccc;
29
+ }
30
+ input, fieldset {
31
+ font-size: 1em;
32
+ margin: 0;
33
+ padding: 0;
34
+ border: 0;
35
+ }
36
+ input {
37
+ color: inherit;
38
+ line-height: 1.5;
39
+ height: 1.5em;
40
+ padding: .25em 0;
41
+ }
42
+ input:focus {
43
+ outline: none;
44
+ box-shadow: inset 0 -2px #449fdb;
45
+ }
46
+ .glyph {
47
+ font-size: 16px;
48
+ width: 15em;
49
+ padding-bottom: 1em;
50
+ margin-right: 4em;
51
+ margin-bottom: 1em;
52
+ float: left;
53
+ overflow: hidden;
54
+ }
55
+ .liga {
56
+ width: 80%;
57
+ width: calc(100% - 2.5em);
58
+ }
59
+ .talign-right {
60
+ text-align: right;
61
+ }
62
+ .talign-center {
63
+ text-align: center;
64
+ }
65
+ .bgc1 {
66
+ background: #f1f1f1;
67
+ }
68
+ .fgc1 {
69
+ color: #999;
70
+ }
71
+ .fgc0 {
72
+ color: #000;
73
+ }
74
+ p {
75
+ margin-top: 1em;
76
+ margin-bottom: 1em;
77
+ }
78
+ .mvm {
79
+ margin-top: .75em;
80
+ margin-bottom: .75em;
81
+ }
82
+ .mtn {
83
+ margin-top: 0;
84
+ }
85
+ .mtl, .mal {
86
+ margin-top: 1.5em;
87
+ }
88
+ .mbl, .mal {
89
+ margin-bottom: 1.5em;
90
+ }
91
+ .mal, .mhl {
92
+ margin-left: 1.5em;
93
+ margin-right: 1.5em;
94
+ }
95
+ .mhmm {
96
+ margin-left: 1em;
97
+ margin-right: 1em;
98
+ }
99
+ .mls {
100
+ margin-left: .25em;
101
+ }
102
+ .ptl {
103
+ padding-top: 1.5em;
104
+ }
105
+ .pbs, .pvs {
106
+ padding-bottom: .25em;
107
+ }
108
+ .pvs, .pts {
109
+ padding-top: .25em;
110
+ }
111
+ .unit {
112
+ float: left;
113
+ }
114
+ .unitRight {
115
+ float: right;
116
+ }
117
+ .size1of2 {
118
+ width: 50%;
119
+ }
120
+ .size1of1 {
121
+ width: 100%;
122
+ }
123
+ .clearfix:before, .clearfix:after {
124
+ content: " ";
125
+ display: table;
126
+ }
127
+ .clearfix:after {
128
+ clear: both;
129
+ }
130
+ .hidden-true {
131
+ display: none;
132
+ }
133
+ .textbox0 {
134
+ width: 3em;
135
+ background: #f1f1f1;
136
+ padding: .25em .5em;
137
+ line-height: 1.5;
138
+ height: 1.5em;
139
+ }
140
+ #testDrive {
141
+ display: block;
142
+ padding-top: 24px;
143
+ line-height: 1.5;
144
+ }
145
+ .fs0 {
146
+ font-size: 16px;
147
+ }
148
+ .fs1 {
149
+ font-size: 32px;
150
+ }
151
+ .fs2 {
152
+ font-size: 32px;
153
+ }
@@ -1,30 +1,30 @@
1
- if (!('boxShadow' in document.body.style)) {
2
- document.body.setAttribute('class', 'noBoxShadow');
3
- }
4
-
5
- document.body.addEventListener("click", function(e) {
6
- var target = e.target;
7
- if (target.tagName === "INPUT" &&
8
- target.getAttribute('class').indexOf('liga') === -1) {
9
- target.select();
10
- }
11
- });
12
-
13
- (function() {
14
- var fontSize = document.getElementById('fontSize'),
15
- testDrive = document.getElementById('testDrive'),
16
- testText = document.getElementById('testText');
17
- function updateTest() {
18
- testDrive.innerHTML = testText.value || String.fromCharCode(160);
19
- if (window.icomoonLiga) {
20
- window.icomoonLiga(testDrive);
21
- }
22
- }
23
- function updateSize() {
24
- testDrive.style.fontSize = fontSize.value + 'px';
25
- }
26
- fontSize.addEventListener('change', updateSize, false);
27
- testText.addEventListener('input', updateTest, false);
28
- testText.addEventListener('change', updateTest, false);
29
- updateSize();
30
- }());
1
+ if (!('boxShadow' in document.body.style)) {
2
+ document.body.setAttribute('class', 'noBoxShadow');
3
+ }
4
+
5
+ document.body.addEventListener("click", function(e) {
6
+ var target = e.target;
7
+ if (target.tagName === "INPUT" &&
8
+ target.getAttribute('class').indexOf('liga') === -1) {
9
+ target.select();
10
+ }
11
+ });
12
+
13
+ (function() {
14
+ var fontSize = document.getElementById('fontSize'),
15
+ testDrive = document.getElementById('testDrive'),
16
+ testText = document.getElementById('testText');
17
+ function updateTest() {
18
+ testDrive.innerHTML = testText.value || String.fromCharCode(160);
19
+ if (window.icomoonLiga) {
20
+ window.icomoonLiga(testDrive);
21
+ }
22
+ }
23
+ function updateSize() {
24
+ testDrive.style.fontSize = fontSize.value + 'px';
25
+ }
26
+ fontSize.addEventListener('change', updateSize, false);
27
+ testText.addEventListener('input', updateTest, false);
28
+ testText.addEventListener('change', updateTest, false);
29
+ updateSize();
30
+ }());