@digipair/skill-web-editor 0.8.42 → 0.8.43

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/index.cjs2.js CHANGED
@@ -2693,9 +2693,11 @@ class EditorElement extends s {
2693
2693
  Blockly.Events.enable();
2694
2694
  }
2695
2695
  async getLibraries(libraries) {
2696
+ const instanceSchemas = this.schemas.filter((schema)=>Object.keys(libraries).indexOf(schema.info.title) >= 0);
2696
2697
  const list = [
2697
2698
  schemas,
2698
- ...await Promise.all(Object.keys(libraries).map(async (library, i)=>fetch(`${BASE_URL}/${library}@${libraries[library]}/schema.json`).then((res)=>res.json())))
2699
+ ...instanceSchemas,
2700
+ ...await Promise.all(Object.keys(libraries).filter((library)=>!instanceSchemas.find((schema)=>schema.info.title === library)).map(async (library, i)=>fetch(`${BASE_URL}/${library}@${libraries[library]}/schema.json`).then((res)=>res.json())))
2699
2701
  ];
2700
2702
  return list;
2701
2703
  }
@@ -2852,6 +2854,7 @@ class EditorElement extends s {
2852
2854
  }
2853
2855
  constructor(...args){
2854
2856
  super(...args);
2857
+ this.schemas = [];
2855
2858
  this.menuColor = 'white';
2856
2859
  this.menuBackgroundColor = 'rgb(66, 133, 244)';
2857
2860
  this.contentStyle = 'position: fixed; top: 0; right: 0; bottom: 0; left: 0;';
@@ -2866,6 +2869,10 @@ __decorate([
2866
2869
  n(),
2867
2870
  __metadata("design:type", Object)
2868
2871
  ], EditorElement.prototype, "reasoning", void 0);
2872
+ __decorate([
2873
+ n(),
2874
+ __metadata("design:type", Array)
2875
+ ], EditorElement.prototype, "schemas", void 0);
2869
2876
  __decorate([
2870
2877
  n()
2871
2878
  ], EditorElement.prototype, "menuColor", void 0);
package/index.esm2.js CHANGED
@@ -2691,9 +2691,11 @@ class EditorElement extends s {
2691
2691
  Blockly.Events.enable();
2692
2692
  }
2693
2693
  async getLibraries(libraries) {
2694
+ const instanceSchemas = this.schemas.filter((schema)=>Object.keys(libraries).indexOf(schema.info.title) >= 0);
2694
2695
  const list = [
2695
2696
  schemas,
2696
- ...await Promise.all(Object.keys(libraries).map(async (library, i)=>fetch(`${BASE_URL}/${library}@${libraries[library]}/schema.json`).then((res)=>res.json())))
2697
+ ...instanceSchemas,
2698
+ ...await Promise.all(Object.keys(libraries).filter((library)=>!instanceSchemas.find((schema)=>schema.info.title === library)).map(async (library, i)=>fetch(`${BASE_URL}/${library}@${libraries[library]}/schema.json`).then((res)=>res.json())))
2697
2699
  ];
2698
2700
  return list;
2699
2701
  }
@@ -2850,6 +2852,7 @@ class EditorElement extends s {
2850
2852
  }
2851
2853
  constructor(...args){
2852
2854
  super(...args);
2855
+ this.schemas = [];
2853
2856
  this.menuColor = 'white';
2854
2857
  this.menuBackgroundColor = 'rgb(66, 133, 244)';
2855
2858
  this.contentStyle = 'position: fixed; top: 0; right: 0; bottom: 0; left: 0;';
@@ -2864,6 +2867,10 @@ __decorate([
2864
2867
  n(),
2865
2868
  __metadata("design:type", Object)
2866
2869
  ], EditorElement.prototype, "reasoning", void 0);
2870
+ __decorate([
2871
+ n(),
2872
+ __metadata("design:type", Array)
2873
+ ], EditorElement.prototype, "schemas", void 0);
2867
2874
  __decorate([
2868
2875
  n()
2869
2876
  ], EditorElement.prototype, "menuColor", void 0);
@@ -2,6 +2,7 @@ import { LitElement, TemplateResult } from 'lit';
2
2
  export declare class EditorElement extends LitElement {
3
3
  digipair: any;
4
4
  reasoning: any;
5
+ schemas: any[];
5
6
  menuColor: string;
6
7
  menuBackgroundColor: string;
7
8
  contentStyle: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digipair/skill-web-editor",
3
- "version": "0.8.42",
3
+ "version": "0.8.43",
4
4
  "dependencies": {},
5
5
  "main": "./index.cjs.js",
6
6
  "module": "./index.esm.js"