@difizen/libro-lab 0.3.1 → 0.3.2

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 (37) hide show
  1. package/es/command/lab-command.d.ts +4 -0
  2. package/es/command/lab-command.d.ts.map +1 -1
  3. package/es/command/lab-command.js +4 -0
  4. package/es/command/lab-menu-contribution.d.ts +3 -2
  5. package/es/command/lab-menu-contribution.d.ts.map +1 -1
  6. package/es/command/lab-menu-contribution.js +151 -110
  7. package/es/config/config.d.ts +2 -0
  8. package/es/config/config.d.ts.map +1 -1
  9. package/es/config/config.js +12 -1
  10. package/es/guide/content-contribution.d.ts +7 -0
  11. package/es/guide/content-contribution.d.ts.map +1 -0
  12. package/es/guide/content-contribution.js +74 -0
  13. package/es/guide/guide-view.d.ts +19 -0
  14. package/es/guide/guide-view.d.ts.map +1 -0
  15. package/es/guide/guide-view.js +141 -0
  16. package/es/guide/index.d.ts +3 -0
  17. package/es/guide/index.d.ts.map +1 -0
  18. package/es/guide/index.js +2 -0
  19. package/es/guide/index.less +8 -0
  20. package/es/guide/libro_guide_book.json +333 -0
  21. package/es/guide/libro_guide_book_zh.json +331 -0
  22. package/es/lab-app.d.ts.map +1 -1
  23. package/es/lab-app.js +51 -27
  24. package/es/module.d.ts.map +1 -1
  25. package/es/module.js +3 -1
  26. package/package.json +14 -14
  27. package/src/command/lab-command.ts +4 -0
  28. package/src/command/lab-menu-contribution.tsx +15 -2
  29. package/src/config/config.ts +12 -0
  30. package/src/guide/content-contribution.ts +50 -0
  31. package/src/guide/guide-view.tsx +77 -0
  32. package/src/guide/index.less +8 -0
  33. package/src/guide/index.ts +2 -0
  34. package/src/guide/libro_guide_book.json +333 -0
  35. package/src/guide/libro_guide_book_zh.json +331 -0
  36. package/src/lab-app.ts +10 -2
  37. package/src/module.tsx +4 -0
package/src/lab-app.ts CHANGED
@@ -17,7 +17,8 @@ import {
17
17
  singleton,
18
18
  } from '@difizen/mana-app';
19
19
 
20
- import { LibroLabConfiguration } from './config/index.js';
20
+ import { LibroLabConfiguration, LibroLabGuideViewEnabled } from './config/index.js';
21
+ import { GuideView } from './guide/index.js';
21
22
  import { KernelAndTerminalPanelView } from './kernel-and-terminal-panel/index.js';
22
23
  import { LibroLabLayoutSlots } from './layout/index.js';
23
24
  import { LayoutService } from './layout/layout-service.js';
@@ -67,11 +68,18 @@ export class LibroLabApp implements ApplicationContribution {
67
68
  }
68
69
  }
69
70
  this.serverManager.ready
70
- .then(() => {
71
+ .then(async () => {
71
72
  this.layoutService.setAreaVisible(LibroLabLayoutSlots.navigator, true);
72
73
  this.layoutService.setAreaVisible(LibroLabLayoutSlots.alert, false);
73
74
  this.layoutService.serverSatus = 'success';
74
75
  this.initialWorkspace();
76
+ const isGuideEnabled = await this.configurationService.get(
77
+ LibroLabGuideViewEnabled,
78
+ );
79
+ if (isGuideEnabled) {
80
+ const view = await this.viewManager.getOrCreateView(GuideView);
81
+ this.slotViewManager.addView(view, LibroLabLayoutSlots.content);
82
+ }
75
83
  return;
76
84
  })
77
85
  .catch(console.error);
package/src/module.tsx CHANGED
@@ -19,6 +19,8 @@ import { LibroLabHeaderMenuModule } from './command/module.js';
19
19
  import { LabConfigAppContribution } from './config/config-contribution.js';
20
20
  import { CodeEditorViewerModule } from './editor-viewer/index.js';
21
21
  import { GithubLinkView } from './github-link/index.js';
22
+ import { LibroGuidebookContentContribution } from './guide/content-contribution.js';
23
+ import { GuideView } from './guide/guide-view.js';
22
24
  import { ImageViewerModule } from './image-viewer/index.js';
23
25
  // import { KernelManagerView } from './kernel-manager/index.js';
24
26
  import { LibroKernelAndTerminalPanelModule } from './kernel-and-terminal-panel/module.js';
@@ -117,6 +119,8 @@ export const LibroLabModule = ManaModule.create()
117
119
  order: 'welcome',
118
120
  },
119
121
  }),
122
+ LibroGuidebookContentContribution,
123
+ GuideView,
120
124
  EntryPointView,
121
125
  )
122
126
  .dependOn(