prismdeckjs 0.1.0

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 (66) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +45 -0
  3. package/dist/chunks/rapier-D1P_-6v-.js +5727 -0
  4. package/dist/document/archive.d.ts +17 -0
  5. package/dist/document/archive.d.ts.map +1 -0
  6. package/dist/document/archive.js +105 -0
  7. package/dist/document/archive.js.map +1 -0
  8. package/dist/document/html.d.ts +10 -0
  9. package/dist/document/html.d.ts.map +1 -0
  10. package/dist/document/html.js +149 -0
  11. package/dist/document/html.js.map +1 -0
  12. package/dist/document/types.d.ts +188 -0
  13. package/dist/document/types.d.ts.map +1 -0
  14. package/dist/document/types.js +21 -0
  15. package/dist/document/types.js.map +1 -0
  16. package/dist/document/validate.d.ts +9 -0
  17. package/dist/document/validate.d.ts.map +1 -0
  18. package/dist/document/validate.js +77 -0
  19. package/dist/document/validate.js.map +1 -0
  20. package/dist/import/index.d.ts +9 -0
  21. package/dist/import/index.d.ts.map +1 -0
  22. package/dist/import/index.js +41 -0
  23. package/dist/import/index.js.map +1 -0
  24. package/dist/import/odp.d.ts +3 -0
  25. package/dist/import/odp.d.ts.map +1 -0
  26. package/dist/import/odp.js +529 -0
  27. package/dist/import/odp.js.map +1 -0
  28. package/dist/import/pptx.d.ts +3 -0
  29. package/dist/import/pptx.d.ts.map +1 -0
  30. package/dist/import/pptx.js +634 -0
  31. package/dist/import/pptx.js.map +1 -0
  32. package/dist/import/xml.d.ts +19 -0
  33. package/dist/import/xml.d.ts.map +1 -0
  34. package/dist/import/xml.js +100 -0
  35. package/dist/import/xml.js.map +1 -0
  36. package/dist/index.d.ts +12 -0
  37. package/dist/index.d.ts.map +1 -0
  38. package/dist/index.js +12 -0
  39. package/dist/index.js.map +1 -0
  40. package/dist/physics/rapier.d.ts +36 -0
  41. package/dist/physics/rapier.d.ts.map +1 -0
  42. package/dist/physics/rapier.js +137 -0
  43. package/dist/physics/rapier.js.map +1 -0
  44. package/dist/prism-deck.min.js +61229 -0
  45. package/dist/render/renderer.d.ts +78 -0
  46. package/dist/render/renderer.d.ts.map +1 -0
  47. package/dist/render/renderer.js +512 -0
  48. package/dist/render/renderer.js.map +1 -0
  49. package/dist/render/stereo.d.ts +20 -0
  50. package/dist/render/stereo.d.ts.map +1 -0
  51. package/dist/render/stereo.js +26 -0
  52. package/dist/render/stereo.js.map +1 -0
  53. package/dist/runtime/player.d.ts +30 -0
  54. package/dist/runtime/player.d.ts.map +1 -0
  55. package/dist/runtime/player.js +91 -0
  56. package/dist/runtime/player.js.map +1 -0
  57. package/dist/runtime/session.d.ts +50 -0
  58. package/dist/runtime/session.d.ts.map +1 -0
  59. package/dist/runtime/session.js +212 -0
  60. package/dist/runtime/session.js.map +1 -0
  61. package/dist/version.d.ts +2 -0
  62. package/dist/version.d.ts.map +1 -0
  63. package/dist/version.js +3 -0
  64. package/dist/version.js.map +1 -0
  65. package/package.json +61 -0
  66. package/schema/prismdeck.schema.json +124 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Haochuan Zhang
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,45 @@
1
+ # prismdeckjs
2
+
3
+ Browser-native spatial presentation SDK used by
4
+ [PrismDeck Studio](https://lunarmoon26.github.io/PrismDeckJS/).
5
+
6
+ ## Capabilities
7
+
8
+ - Local `.pptx`, `.odp`, `.prismdeck`, and PrismDeck HTML import.
9
+ - Versioned normalized document and asset bundle.
10
+ - Three.js mono, full-SBS, and half-SBS rendering from one scene.
11
+ - Editable depth, rotation, thickness, text, and optional Rapier physics.
12
+ - PowerPoint and ODP template layouts that can instantiate slides.
13
+ - Single-file editable HTML export with CDN-hosted Three.js playback.
14
+
15
+ ## Basic use
16
+
17
+ ```ts
18
+ import { DeckPlayer, importPresentation } from 'prismdeckjs';
19
+
20
+ const input = await file.arrayBuffer();
21
+ const deck = await importPresentation(input, { sourceName: file.name });
22
+ const player = await DeckPlayer.create(canvas, deck, {
23
+ physics: true,
24
+ autoStart: true,
25
+ });
26
+ ```
27
+
28
+ Call `player.dispose()` when the canvas is no longer used. Imported files are
29
+ parsed locally; the SDK does not upload source bytes or execute macros, scripts,
30
+ or OLE objects.
31
+
32
+ ## Browser module and HTML export
33
+
34
+ ```js
35
+ import * as PrismDeck from 'https://cdn.jsdelivr.net/npm/prismdeckjs@latest/dist/prism-deck.min.js';
36
+ ```
37
+
38
+ `savePrismDeckHtml(deck)` embeds the full document archive and assets into one
39
+ HTML file. `loadPrismDeckHtml(bytes)` recovers the same editable `LoadedDeck`
40
+ without executing HTML-authored scripts. The default runtime URL is pinned to the
41
+ installed `prismdeckjs` package version and can be overridden with an absolute
42
+ HTTPS URL.
43
+
44
+ See the [repository](https://github.com/lunarmoon26/PrismDeckJS) for the schema,
45
+ compatibility policy, Studio, and development instructions.