@pie-framework/pie-fixed-player-static 1.0.0-24d9476.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/README.md +54 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +39 -0
- package/dist/math-rendering.js +89442 -0
- package/dist/pie-elements-bundle-24d9476.js +92 -0
- package/dist/pie-fixed-player.js +2402 -0
- package/package.json +33 -0
package/README.md
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# @pie-framework/pie-fixed-player-static
|
|
2
|
+
|
|
3
|
+
Version: 1.0.0-24d9476.1
|
|
4
|
+
|
|
5
|
+
Pre-bundled PIE fixed player with static element versions for production use.
|
|
6
|
+
|
|
7
|
+
**Note:** This is for production use with a fixed set of PIE elements. For development/testing
|
|
8
|
+
in Pieoneer, use `pie-inline-player` instead.
|
|
9
|
+
|
|
10
|
+
## Included Elements
|
|
11
|
+
|
|
12
|
+
- @pie-element/multiple-choice@11.1.0
|
|
13
|
+
|
|
14
|
+
## Installation
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm install @pie-framework/pie-fixed-player-static@1.0.0-24d9476.1
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Usage
|
|
21
|
+
|
|
22
|
+
```html
|
|
23
|
+
<script type="module">
|
|
24
|
+
import '@pie-framework/pie-fixed-player-static';
|
|
25
|
+
</script>
|
|
26
|
+
|
|
27
|
+
<pie-fixed-player
|
|
28
|
+
item-id="your-item-id"
|
|
29
|
+
token="your-jwt-token"
|
|
30
|
+
api-base-url="https://api.example.com"
|
|
31
|
+
env='{"mode": "gather", "role": "student"}'>
|
|
32
|
+
</pie-fixed-player>
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Attributes
|
|
36
|
+
|
|
37
|
+
- `item-id` - Item identifier
|
|
38
|
+
- `api-base-url` - Base URL for API calls
|
|
39
|
+
- `token` - JWT authentication token
|
|
40
|
+
- `env` - Environment config (mode, role)
|
|
41
|
+
- `session` - Session data array
|
|
42
|
+
- `add-correct-response` - Show correct answers
|
|
43
|
+
- `external-style-urls` - Additional CSS URLs
|
|
44
|
+
- Custom styling attributes
|
|
45
|
+
|
|
46
|
+
## Events
|
|
47
|
+
|
|
48
|
+
- `load-complete` - Fired when item loads successfully
|
|
49
|
+
- `session-changed` - Fired when user interacts with questions
|
|
50
|
+
- `player-error` - Fired on errors
|
|
51
|
+
|
|
52
|
+
## License
|
|
53
|
+
|
|
54
|
+
MIT
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// Auto-generated entry point for pie-fixed-player-static
|
|
2
|
+
// This loads the pre-bundled PIE elements and pie-fixed-player custom element
|
|
3
|
+
// FULLY SELF-CONTAINED: No external dependencies needed!
|
|
4
|
+
|
|
5
|
+
// Use async IIFE to ensure sequential loading without top-level await
|
|
6
|
+
// (Top-level await has bundler compatibility issues with some build tools)
|
|
7
|
+
(async function initializePieFixedPlayer() {
|
|
8
|
+
try {
|
|
9
|
+
// 1. Dynamically import math-rendering module (bundled with package)
|
|
10
|
+
const mathRenderingModule = await import('./math-rendering.js');
|
|
11
|
+
|
|
12
|
+
// 2. Set globals BEFORE any PIE elements execute
|
|
13
|
+
if (typeof window !== 'undefined') {
|
|
14
|
+
// Set BOTH globals:
|
|
15
|
+
// - @pie-lib/math-rendering: Standard key used by pie-player
|
|
16
|
+
// - _dll_pie_lib__math_rendering: SystemJS/DLL key used by IIFE bundles
|
|
17
|
+
window['@pie-lib/math-rendering'] = mathRenderingModule._dll_pie_lib__math_rendering;
|
|
18
|
+
window['_dll_pie_lib__math_rendering'] = mathRenderingModule._dll_pie_lib__math_rendering;
|
|
19
|
+
console.log('[pie-fixed-player-static] Math rendering initialized (both globals set)');
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// 3. NOW load PIE element bundles (IIFE) - these execute immediately
|
|
23
|
+
// The IIFE must find math-rendering globals already set (which they now are)
|
|
24
|
+
await import('./pie-elements-bundle-24d9476.js');
|
|
25
|
+
|
|
26
|
+
// 4. Load pie-fixed-player custom element
|
|
27
|
+
await import('./pie-fixed-player.js');
|
|
28
|
+
|
|
29
|
+
// 5. Confirm ready
|
|
30
|
+
if (typeof window !== 'undefined') {
|
|
31
|
+
console.log('[pie-fixed-player-static] Package loaded. PIE elements available via window.pie');
|
|
32
|
+
}
|
|
33
|
+
} catch (error) {
|
|
34
|
+
console.error('[pie-fixed-player-static] Failed to initialize:', error);
|
|
35
|
+
}
|
|
36
|
+
})();
|
|
37
|
+
|
|
38
|
+
// Export for ES module compatibility
|
|
39
|
+
export {};
|