@pie-players/pie-section-tools-toolbar 0.2.7 → 0.2.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pie-players/pie-section-tools-toolbar",
3
- "version": "0.2.7",
3
+ "version": "0.2.8",
4
4
  "type": "module",
5
5
  "description": "Section-level tools toolbar for PIE assessment player",
6
6
  "repository": {
@@ -34,15 +34,6 @@
34
34
  } from '@pie-players/pie-assessment-toolkit';
35
35
  import { onDestroy, onMount } from 'svelte';
36
36
 
37
- // Import tool web components to register them
38
- import '@pie-players/pie-tool-calculator';
39
- import '@pie-players/pie-tool-graph';
40
- import '@pie-players/pie-tool-periodic-table';
41
- import '@pie-players/pie-tool-protractor';
42
- import '@pie-players/pie-tool-line-reader';
43
- import '@pie-players/pie-tool-magnifier';
44
- import '@pie-players/pie-tool-ruler';
45
-
46
37
  const isBrowser = typeof window !== 'undefined';
47
38
 
48
39
  // Props
@@ -104,6 +95,20 @@
104
95
  let unsubscribe: (() => void) | null = null;
105
96
 
106
97
  onMount(() => {
98
+ if (isBrowser) {
99
+ Promise.all([
100
+ import('@pie-players/pie-tool-calculator'),
101
+ import('@pie-players/pie-tool-graph'),
102
+ import('@pie-players/pie-tool-periodic-table'),
103
+ import('@pie-players/pie-tool-protractor'),
104
+ import('@pie-players/pie-tool-line-reader'),
105
+ import('@pie-players/pie-tool-magnifier'),
106
+ import('@pie-players/pie-tool-ruler')
107
+ ]).catch((err) => {
108
+ console.error('[SectionToolsToolbar] Failed to load tool web components:', err);
109
+ });
110
+ }
111
+
107
112
  if (toolCoordinator) {
108
113
  updateToolVisibility();
109
114
  unsubscribe = toolCoordinator.subscribe(() => {