@digipair/skill-web-editor 0.63.1 → 0.64.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.
package/index.cjs2.js CHANGED
@@ -72328,7 +72328,7 @@ class EditorElement extends r$1 {
72328
72328
  generateBlocklyBlockFromLibraries = pinsToBlockly.generateBlocklyBlockFromLibraries;
72329
72329
  generateToolboxFromLibraries = pinsToBlockly.generateToolboxFromLibraries;
72330
72330
  initializeMutator = pinsToBlockly.initializeMutator;
72331
- setTimeout(()=>this.loadScene(this.digipair, this.reasoning), 1);
72331
+ setTimeout(()=>this.loadScene(this.reasoning), 1);
72332
72332
  this.addEventListener('setReasoning', ({ detail })=>this.loadReasoning(detail));
72333
72333
  }
72334
72334
  loadReasoning(reasoning) {
@@ -72336,29 +72336,16 @@ class EditorElement extends r$1 {
72336
72336
  initializeWorkspaceFromPinsAndLibraries(reasoning, this.workspace, this.librariesToLoad);
72337
72337
  Blockly.Events.enable();
72338
72338
  }
72339
- async getLibraries(libraries) {
72340
- const privateSchemas = this.schemas;
72339
+ async getLibraries() {
72341
72340
  const list = [
72342
72341
  this.language === 'fr' ? schemas : schemas$1,
72343
- ...privateSchemas,
72344
- ...await Promise.all(Object.keys(libraries).filter((library)=>!privateSchemas.find((schema)=>schema.info.title === library)).map(async (library, i)=>{
72345
- let res;
72346
- if (this.language !== 'en') {
72347
- res = await fetch(`${BASE_URL}/${library}@${libraries[library]}/schema.${this.language}.json`);
72348
- if (!res.ok) {
72349
- res = await fetch(`${BASE_URL}/${library}@${libraries[library]}/schema.json`);
72350
- }
72351
- } else {
72352
- res = await fetch(`${BASE_URL}/${library}@${libraries[library]}/schema.json`);
72353
- }
72354
- return await res.json();
72355
- }))
72342
+ ...this.schemas
72356
72343
  ];
72357
72344
  return list;
72358
72345
  }
72359
- async loadScene(digipair, reasoning) {
72346
+ async loadScene(reasoning) {
72360
72347
  const scene = reasoning;
72361
- this.librariesToLoad = await this.getLibraries(digipair.libraries);
72348
+ this.librariesToLoad = await this.getLibraries();
72362
72349
  this.loadBlockly(scene);
72363
72350
  if (!scene) {
72364
72351
  return;
@@ -72517,10 +72504,6 @@ class EditorElement extends r$1 {
72517
72504
  this.canSave = false;
72518
72505
  }
72519
72506
  }
72520
- __decorate([
72521
- n(),
72522
- __metadata("design:type", Object)
72523
- ], EditorElement.prototype, "digipair", void 0);
72524
72507
  __decorate([
72525
72508
  n(),
72526
72509
  __metadata("design:type", Object)
package/index.esm2.js CHANGED
@@ -72326,7 +72326,7 @@ class EditorElement extends r$1 {
72326
72326
  generateBlocklyBlockFromLibraries = pinsToBlockly.generateBlocklyBlockFromLibraries;
72327
72327
  generateToolboxFromLibraries = pinsToBlockly.generateToolboxFromLibraries;
72328
72328
  initializeMutator = pinsToBlockly.initializeMutator;
72329
- setTimeout(()=>this.loadScene(this.digipair, this.reasoning), 1);
72329
+ setTimeout(()=>this.loadScene(this.reasoning), 1);
72330
72330
  this.addEventListener('setReasoning', ({ detail })=>this.loadReasoning(detail));
72331
72331
  }
72332
72332
  loadReasoning(reasoning) {
@@ -72334,29 +72334,16 @@ class EditorElement extends r$1 {
72334
72334
  initializeWorkspaceFromPinsAndLibraries(reasoning, this.workspace, this.librariesToLoad);
72335
72335
  Blockly.Events.enable();
72336
72336
  }
72337
- async getLibraries(libraries) {
72338
- const privateSchemas = this.schemas;
72337
+ async getLibraries() {
72339
72338
  const list = [
72340
72339
  this.language === 'fr' ? schemas : schemas$1,
72341
- ...privateSchemas,
72342
- ...await Promise.all(Object.keys(libraries).filter((library)=>!privateSchemas.find((schema)=>schema.info.title === library)).map(async (library, i)=>{
72343
- let res;
72344
- if (this.language !== 'en') {
72345
- res = await fetch(`${BASE_URL}/${library}@${libraries[library]}/schema.${this.language}.json`);
72346
- if (!res.ok) {
72347
- res = await fetch(`${BASE_URL}/${library}@${libraries[library]}/schema.json`);
72348
- }
72349
- } else {
72350
- res = await fetch(`${BASE_URL}/${library}@${libraries[library]}/schema.json`);
72351
- }
72352
- return await res.json();
72353
- }))
72340
+ ...this.schemas
72354
72341
  ];
72355
72342
  return list;
72356
72343
  }
72357
- async loadScene(digipair, reasoning) {
72344
+ async loadScene(reasoning) {
72358
72345
  const scene = reasoning;
72359
- this.librariesToLoad = await this.getLibraries(digipair.libraries);
72346
+ this.librariesToLoad = await this.getLibraries();
72360
72347
  this.loadBlockly(scene);
72361
72348
  if (!scene) {
72362
72349
  return;
@@ -72515,10 +72502,6 @@ class EditorElement extends r$1 {
72515
72502
  this.canSave = false;
72516
72503
  }
72517
72504
  }
72518
- __decorate([
72519
- n(),
72520
- __metadata("design:type", Object)
72521
- ], EditorElement.prototype, "digipair", void 0);
72522
72505
  __decorate([
72523
72506
  n(),
72524
72507
  __metadata("design:type", Object)
@@ -1,6 +1,5 @@
1
1
  import { LitElement, TemplateResult } from 'lit';
2
2
  export declare class EditorElement extends LitElement {
3
- digipair: any;
4
3
  reasoning: any;
5
4
  schemas: any[];
6
5
  menuColor: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digipair/skill-web-editor",
3
- "version": "0.63.1",
3
+ "version": "0.64.1",
4
4
  "dependencies": {},
5
5
  "main": "./index.cjs.js",
6
6
  "module": "./index.esm.js"
package/schema.fr.json CHANGED
@@ -14,15 +14,6 @@
14
14
  "summary": "Editeur de raisonnements",
15
15
  "description": "Editeur no-code de raisonnements IA",
16
16
  "parameters": [
17
- {
18
- "name": "digipair",
19
- "summary": "Digipair",
20
- "required": true,
21
- "description": "Informations du digipair propriétaire du raisonnement",
22
- "schema": {
23
- "type": "object"
24
- }
25
- },
26
17
  {
27
18
  "name": "reasoning",
28
19
  "summary": "Raisonnement",
@@ -36,7 +27,7 @@
36
27
  "name": "schemas",
37
28
  "summary": "Schemas",
38
29
  "required": false,
39
- "description": "Liste des schemas des compétences privées",
30
+ "description": "Liste des schemas des compétences",
40
31
  "schema": {
41
32
  "type": "object"
42
33
  }
package/schema.json CHANGED
@@ -14,15 +14,6 @@
14
14
  "summary": "Reasoning editor",
15
15
  "description": "No-code editor for AI reasonings",
16
16
  "parameters": [
17
- {
18
- "name": "digipair",
19
- "summary": "Digipair",
20
- "required": true,
21
- "description": "Information of the digipair owning the reasoning",
22
- "schema": {
23
- "type": "object"
24
- }
25
- },
26
17
  {
27
18
  "name": "reasoning",
28
19
  "summary": "Reasoning",
@@ -36,7 +27,7 @@
36
27
  "name": "schemas",
37
28
  "summary": "Schemas",
38
29
  "required": false,
39
- "description": "List of private skill schemas",
30
+ "description": "List of skill schemas",
40
31
  "schema": {
41
32
  "type": "object"
42
33
  }