glideshow 0.4.0__tar.gz → 0.4.2__tar.gz

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 (375) hide show
  1. {glideshow-0.4.0 → glideshow-0.4.2}/PKG-INFO +1 -1
  2. {glideshow-0.4.0 → glideshow-0.4.2}/cloud/auth.js +1 -1
  3. {glideshow-0.4.0 → glideshow-0.4.2}/cloud/pages.js +5 -1
  4. {glideshow-0.4.0 → glideshow-0.4.2}/cloud/worker.js +5 -2
  5. {glideshow-0.4.0 → glideshow-0.4.2}/editor/deck/present.js +3 -1
  6. {glideshow-0.4.0 → glideshow-0.4.2}/editor/index.html +1 -0
  7. {glideshow-0.4.0 → glideshow-0.4.2}/editor/js/menubar.js +1 -1
  8. {glideshow-0.4.0 → glideshow-0.4.2}/editor/js/menus.js +28 -5
  9. glideshow-0.4.2/editor/js/pptx.js +345 -0
  10. {glideshow-0.4.0 → glideshow-0.4.2}/pyproject.toml +1 -1
  11. glideshow-0.4.2/test/menus_hover.py +98 -0
  12. glideshow-0.4.2/test/pptx_browser.py +84 -0
  13. {glideshow-0.4.0 → glideshow-0.4.2}/test/smoke.py +3 -3
  14. {glideshow-0.4.0 → glideshow-0.4.2}/uv.lock +1 -1
  15. {glideshow-0.4.0 → glideshow-0.4.2}/.assetsignore +0 -0
  16. {glideshow-0.4.0 → glideshow-0.4.2}/.github/workflows/checks.yml +0 -0
  17. {glideshow-0.4.0 → glideshow-0.4.2}/.github/workflows/release.yml +0 -0
  18. {glideshow-0.4.0 → glideshow-0.4.2}/.github/workflows/staging.yml +0 -0
  19. {glideshow-0.4.0 → glideshow-0.4.2}/.github/workflows/tests.yml +0 -0
  20. {glideshow-0.4.0 → glideshow-0.4.2}/.gitignore +0 -0
  21. {glideshow-0.4.0 → glideshow-0.4.2}/CHANGELOG.md +0 -0
  22. {glideshow-0.4.0 → glideshow-0.4.2}/LICENSE +0 -0
  23. {glideshow-0.4.0 → glideshow-0.4.2}/README.md +0 -0
  24. {glideshow-0.4.0 → glideshow-0.4.2}/bin/glideshow +0 -0
  25. {glideshow-0.4.0 → glideshow-0.4.2}/cloud/assets.js +0 -0
  26. {glideshow-0.4.0 → glideshow-0.4.2}/cloud/clean.js +0 -0
  27. {glideshow-0.4.0 → glideshow-0.4.2}/cloud/env.d.ts +0 -0
  28. {glideshow-0.4.0 → glideshow-0.4.2}/cloud/github-app.py +0 -0
  29. {glideshow-0.4.0 → glideshow-0.4.2}/cloud/library.js +0 -0
  30. {glideshow-0.4.0 → glideshow-0.4.2}/cloud/setup.sh +0 -0
  31. {glideshow-0.4.0 → glideshow-0.4.2}/cloud/share.js +0 -0
  32. {glideshow-0.4.0 → glideshow-0.4.2}/cloud/store-drive.js +0 -0
  33. {glideshow-0.4.0 → glideshow-0.4.2}/cloud/store-github.js +0 -0
  34. {glideshow-0.4.0 → glideshow-0.4.2}/cloud/tsconfig.json +0 -0
  35. {glideshow-0.4.0 → glideshow-0.4.2}/cloud/wrangler.toml +0 -0
  36. {glideshow-0.4.0 → glideshow-0.4.2}/cloud/writes.js +0 -0
  37. {glideshow-0.4.0 → glideshow-0.4.2}/docs/agents-writes.md +0 -0
  38. {glideshow-0.4.0 → glideshow-0.4.2}/docs/agents.md +0 -0
  39. {glideshow-0.4.0 → glideshow-0.4.2}/docs/deck-format.md +0 -0
  40. {glideshow-0.4.0 → glideshow-0.4.2}/docs/self-hosting.md +0 -0
  41. {glideshow-0.4.0 → glideshow-0.4.2}/docs/shortcuts.md +0 -0
  42. {glideshow-0.4.0 → glideshow-0.4.2}/docs/state-machines.md +0 -0
  43. {glideshow-0.4.0 → glideshow-0.4.2}/editor/.assetsignore +0 -0
  44. {glideshow-0.4.0 → glideshow-0.4.2}/editor/apple-touch-icon.png +0 -0
  45. {glideshow-0.4.0 → glideshow-0.4.2}/editor/data/font-metrics.json +0 -0
  46. {glideshow-0.4.0 → glideshow-0.4.2}/editor/data/fonts.json +0 -0
  47. {glideshow-0.4.0 → glideshow-0.4.2}/editor/data/icons.json +0 -0
  48. {glideshow-0.4.0 → glideshow-0.4.2}/editor/data/symbols.js +0 -0
  49. {glideshow-0.4.0 → glideshow-0.4.2}/editor/data/themes.js +0 -0
  50. {glideshow-0.4.0 → glideshow-0.4.2}/editor/deck/base.css +0 -0
  51. {glideshow-0.4.0 → glideshow-0.4.2}/editor/deck/shapes.js +0 -0
  52. {glideshow-0.4.0 → glideshow-0.4.2}/editor/deck/template.html +0 -0
  53. {glideshow-0.4.0 → glideshow-0.4.2}/editor/editor.css +0 -0
  54. {glideshow-0.4.0 → glideshow-0.4.2}/editor/glideshow-1024.png +0 -0
  55. {glideshow-0.4.0 → glideshow-0.4.2}/editor/glideshow.svg +0 -0
  56. {glideshow-0.4.0 → glideshow-0.4.2}/editor/globals.d.ts +0 -0
  57. {glideshow-0.4.0 → glideshow-0.4.2}/editor/home.html +0 -0
  58. {glideshow-0.4.0 → glideshow-0.4.2}/editor/js/arrange.js +0 -0
  59. {glideshow-0.4.0 → glideshow-0.4.2}/editor/js/boot.js +0 -0
  60. {glideshow-0.4.0 → glideshow-0.4.2}/editor/js/boxes.js +0 -0
  61. {glideshow-0.4.0 → glideshow-0.4.2}/editor/js/charts.js +0 -0
  62. {glideshow-0.4.0 → glideshow-0.4.2}/editor/js/comments.js +0 -0
  63. {glideshow-0.4.0 → glideshow-0.4.2}/editor/js/context-menus.js +0 -0
  64. {glideshow-0.4.0 → glideshow-0.4.2}/editor/js/dialogs.js +0 -0
  65. {glideshow-0.4.0 → glideshow-0.4.2}/editor/js/dock.js +0 -0
  66. {glideshow-0.4.0 → glideshow-0.4.2}/editor/js/draw.js +0 -0
  67. {glideshow-0.4.0 → glideshow-0.4.2}/editor/js/file.js +0 -0
  68. {glideshow-0.4.0 → glideshow-0.4.2}/editor/js/find.js +0 -0
  69. {glideshow-0.4.0 → glideshow-0.4.2}/editor/js/format-panel.js +0 -0
  70. {glideshow-0.4.0 → glideshow-0.4.2}/editor/js/geometry.js +0 -0
  71. {glideshow-0.4.0 → glideshow-0.4.2}/editor/js/guides.js +0 -0
  72. {glideshow-0.4.0 → glideshow-0.4.2}/editor/js/insert.js +0 -0
  73. {glideshow-0.4.0 → glideshow-0.4.2}/editor/js/keyboard.js +0 -0
  74. {glideshow-0.4.0 → glideshow-0.4.2}/editor/js/live.js +0 -0
  75. {glideshow-0.4.0 → glideshow-0.4.2}/editor/js/motion.js +0 -0
  76. {glideshow-0.4.0 → glideshow-0.4.2}/editor/js/notes.js +0 -0
  77. {glideshow-0.4.0 → glideshow-0.4.2}/editor/js/objects.js +0 -0
  78. {glideshow-0.4.0 → glideshow-0.4.2}/editor/js/offline.js +0 -0
  79. {glideshow-0.4.0 → glideshow-0.4.2}/editor/js/people.js +0 -0
  80. {glideshow-0.4.0 → glideshow-0.4.2}/editor/js/phone-comments.js +0 -0
  81. {glideshow-0.4.0 → glideshow-0.4.2}/editor/js/phone-edit.js +0 -0
  82. {glideshow-0.4.0 → glideshow-0.4.2}/editor/js/phone-home.js +0 -0
  83. {glideshow-0.4.0 → glideshow-0.4.2}/editor/js/phone-mode.js +0 -0
  84. {glideshow-0.4.0 → glideshow-0.4.2}/editor/js/phone-sheets.js +0 -0
  85. {glideshow-0.4.0 → glideshow-0.4.2}/editor/js/phone-touch.js +0 -0
  86. {glideshow-0.4.0 → glideshow-0.4.2}/editor/js/phone-view.js +0 -0
  87. {glideshow-0.4.0 → glideshow-0.4.2}/editor/js/pointer.js +0 -0
  88. {glideshow-0.4.0 → glideshow-0.4.2}/editor/js/render.js +0 -0
  89. {glideshow-0.4.0 → glideshow-0.4.2}/editor/js/shortcuts.js +0 -0
  90. {glideshow-0.4.0 → glideshow-0.4.2}/editor/js/slides.js +0 -0
  91. {glideshow-0.4.0 → glideshow-0.4.2}/editor/js/spacing.js +0 -0
  92. {glideshow-0.4.0 → glideshow-0.4.2}/editor/js/state.js +0 -0
  93. {glideshow-0.4.0 → glideshow-0.4.2}/editor/js/storage.js +0 -0
  94. {glideshow-0.4.0 → glideshow-0.4.2}/editor/js/text.js +0 -0
  95. {glideshow-0.4.0 → glideshow-0.4.2}/editor/js/theme-toggle.js +0 -0
  96. {glideshow-0.4.0 → glideshow-0.4.2}/editor/js/theme.js +0 -0
  97. {glideshow-0.4.0 → glideshow-0.4.2}/editor/js/toolbar-groups.js +0 -0
  98. {glideshow-0.4.0 → glideshow-0.4.2}/editor/js/toolbar.js +0 -0
  99. {glideshow-0.4.0 → glideshow-0.4.2}/editor/lib/pending.js +0 -0
  100. {glideshow-0.4.0 → glideshow-0.4.2}/editor/lib/polygon-clipping.min.js +0 -0
  101. {glideshow-0.4.0 → glideshow-0.4.2}/editor/local/offline.js +0 -0
  102. {glideshow-0.4.0 → glideshow-0.4.2}/editor/local/sw.js +0 -0
  103. {glideshow-0.4.0 → glideshow-0.4.2}/editor/local/tsconfig.json +0 -0
  104. {glideshow-0.4.0 → glideshow-0.4.2}/editor/looks/glider.svg +0 -0
  105. {glideshow-0.4.0 → glideshow-0.4.2}/editor/looks/thermal-phone.css +0 -0
  106. {glideshow-0.4.0 → glideshow-0.4.2}/editor/looks/thermal.css +0 -0
  107. {glideshow-0.4.0 → glideshow-0.4.2}/editor/manifest.json +0 -0
  108. {glideshow-0.4.0 → glideshow-0.4.2}/editor/phone.css +0 -0
  109. {glideshow-0.4.0 → glideshow-0.4.2}/editor/share/share.css +0 -0
  110. {glideshow-0.4.0 → glideshow-0.4.2}/editor/share/share.js +0 -0
  111. {glideshow-0.4.0 → glideshow-0.4.2}/editor/share/speaker.html +0 -0
  112. {glideshow-0.4.0 → glideshow-0.4.2}/editor/share/still.js +0 -0
  113. {glideshow-0.4.0 → glideshow-0.4.2}/editor/tsconfig.json +0 -0
  114. {glideshow-0.4.0 → glideshow-0.4.2}/editor/vendor/README.md +0 -0
  115. {glideshow-0.4.0 → glideshow-0.4.2}/editor/vendor/fonts/HankenGrotesk-00.woff2 +0 -0
  116. {glideshow-0.4.0 → glideshow-0.4.2}/editor/vendor/fonts/HankenGrotesk-01.woff2 +0 -0
  117. {glideshow-0.4.0 → glideshow-0.4.2}/editor/vendor/fonts/HankenGrotesk-02.woff2 +0 -0
  118. {glideshow-0.4.0 → glideshow-0.4.2}/editor/vendor/fonts/HankenGrotesk-03.woff2 +0 -0
  119. {glideshow-0.4.0 → glideshow-0.4.2}/editor/vendor/fonts/HankenGrotesk-OFL.txt +0 -0
  120. {glideshow-0.4.0 → glideshow-0.4.2}/editor/vendor/fonts/IBMPlexMono-00.woff2 +0 -0
  121. {glideshow-0.4.0 → glideshow-0.4.2}/editor/vendor/fonts/IBMPlexMono-01.woff2 +0 -0
  122. {glideshow-0.4.0 → glideshow-0.4.2}/editor/vendor/fonts/IBMPlexMono-02.woff2 +0 -0
  123. {glideshow-0.4.0 → glideshow-0.4.2}/editor/vendor/fonts/IBMPlexMono-03.woff2 +0 -0
  124. {glideshow-0.4.0 → glideshow-0.4.2}/editor/vendor/fonts/IBMPlexMono-04.woff2 +0 -0
  125. {glideshow-0.4.0 → glideshow-0.4.2}/editor/vendor/fonts/IBMPlexMono-05.woff2 +0 -0
  126. {glideshow-0.4.0 → glideshow-0.4.2}/editor/vendor/fonts/IBMPlexMono-06.woff2 +0 -0
  127. {glideshow-0.4.0 → glideshow-0.4.2}/editor/vendor/fonts/IBMPlexMono-07.woff2 +0 -0
  128. {glideshow-0.4.0 → glideshow-0.4.2}/editor/vendor/fonts/IBMPlexMono-08.woff2 +0 -0
  129. {glideshow-0.4.0 → glideshow-0.4.2}/editor/vendor/fonts/IBMPlexMono-09.woff2 +0 -0
  130. {glideshow-0.4.0 → glideshow-0.4.2}/editor/vendor/fonts/IBMPlexMono-OFL.txt +0 -0
  131. {glideshow-0.4.0 → glideshow-0.4.2}/editor/vendor/fonts/MaterialSymbolsOutlined-00.woff2 +0 -0
  132. {glideshow-0.4.0 → glideshow-0.4.2}/editor/vendor/fonts/MaterialSymbolsOutlined-LICENSE.txt +0 -0
  133. {glideshow-0.4.0 → glideshow-0.4.2}/editor/vendor/fonts/Roboto-00.woff2 +0 -0
  134. {glideshow-0.4.0 → glideshow-0.4.2}/editor/vendor/fonts/Roboto-01.woff2 +0 -0
  135. {glideshow-0.4.0 → glideshow-0.4.2}/editor/vendor/fonts/Roboto-02.woff2 +0 -0
  136. {glideshow-0.4.0 → glideshow-0.4.2}/editor/vendor/fonts/Roboto-03.woff2 +0 -0
  137. {glideshow-0.4.0 → glideshow-0.4.2}/editor/vendor/fonts/Roboto-04.woff2 +0 -0
  138. {glideshow-0.4.0 → glideshow-0.4.2}/editor/vendor/fonts/Roboto-05.woff2 +0 -0
  139. {glideshow-0.4.0 → glideshow-0.4.2}/editor/vendor/fonts/Roboto-06.woff2 +0 -0
  140. {glideshow-0.4.0 → glideshow-0.4.2}/editor/vendor/fonts/Roboto-07.woff2 +0 -0
  141. {glideshow-0.4.0 → glideshow-0.4.2}/editor/vendor/fonts/Roboto-08.woff2 +0 -0
  142. {glideshow-0.4.0 → glideshow-0.4.2}/editor/vendor/fonts/Roboto-OFL.txt +0 -0
  143. {glideshow-0.4.0 → glideshow-0.4.2}/editor/vendor/fonts/fonts.css +0 -0
  144. {glideshow-0.4.0 → glideshow-0.4.2}/editor/vendor/katex-0.16.11/LICENSE +0 -0
  145. {glideshow-0.4.0 → glideshow-0.4.2}/editor/vendor/katex-0.16.11/dist/contrib/auto-render.min.js +0 -0
  146. {glideshow-0.4.0 → glideshow-0.4.2}/editor/vendor/katex-0.16.11/dist/fonts/KaTeX_AMS-Regular.woff2 +0 -0
  147. {glideshow-0.4.0 → glideshow-0.4.2}/editor/vendor/katex-0.16.11/dist/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
  148. {glideshow-0.4.0 → glideshow-0.4.2}/editor/vendor/katex-0.16.11/dist/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
  149. {glideshow-0.4.0 → glideshow-0.4.2}/editor/vendor/katex-0.16.11/dist/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
  150. {glideshow-0.4.0 → glideshow-0.4.2}/editor/vendor/katex-0.16.11/dist/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
  151. {glideshow-0.4.0 → glideshow-0.4.2}/editor/vendor/katex-0.16.11/dist/fonts/KaTeX_Main-Bold.woff2 +0 -0
  152. {glideshow-0.4.0 → glideshow-0.4.2}/editor/vendor/katex-0.16.11/dist/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
  153. {glideshow-0.4.0 → glideshow-0.4.2}/editor/vendor/katex-0.16.11/dist/fonts/KaTeX_Main-Italic.woff2 +0 -0
  154. {glideshow-0.4.0 → glideshow-0.4.2}/editor/vendor/katex-0.16.11/dist/fonts/KaTeX_Main-Regular.woff2 +0 -0
  155. {glideshow-0.4.0 → glideshow-0.4.2}/editor/vendor/katex-0.16.11/dist/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
  156. {glideshow-0.4.0 → glideshow-0.4.2}/editor/vendor/katex-0.16.11/dist/fonts/KaTeX_Math-Italic.woff2 +0 -0
  157. {glideshow-0.4.0 → glideshow-0.4.2}/editor/vendor/katex-0.16.11/dist/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
  158. {glideshow-0.4.0 → glideshow-0.4.2}/editor/vendor/katex-0.16.11/dist/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
  159. {glideshow-0.4.0 → glideshow-0.4.2}/editor/vendor/katex-0.16.11/dist/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
  160. {glideshow-0.4.0 → glideshow-0.4.2}/editor/vendor/katex-0.16.11/dist/fonts/KaTeX_Script-Regular.woff2 +0 -0
  161. {glideshow-0.4.0 → glideshow-0.4.2}/editor/vendor/katex-0.16.11/dist/fonts/KaTeX_Size1-Regular.woff2 +0 -0
  162. {glideshow-0.4.0 → glideshow-0.4.2}/editor/vendor/katex-0.16.11/dist/fonts/KaTeX_Size2-Regular.woff2 +0 -0
  163. {glideshow-0.4.0 → glideshow-0.4.2}/editor/vendor/katex-0.16.11/dist/fonts/KaTeX_Size3-Regular.woff2 +0 -0
  164. {glideshow-0.4.0 → glideshow-0.4.2}/editor/vendor/katex-0.16.11/dist/fonts/KaTeX_Size4-Regular.woff2 +0 -0
  165. {glideshow-0.4.0 → glideshow-0.4.2}/editor/vendor/katex-0.16.11/dist/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
  166. {glideshow-0.4.0 → glideshow-0.4.2}/editor/vendor/katex-0.16.11/dist/katex.min.css +0 -0
  167. {glideshow-0.4.0 → glideshow-0.4.2}/editor/vendor/katex-0.16.11/dist/katex.min.js +0 -0
  168. {glideshow-0.4.0 → glideshow-0.4.2}/editor/vendor/reveal.js-5.1.0/LICENSE +0 -0
  169. {glideshow-0.4.0 → glideshow-0.4.2}/editor/vendor/reveal.js-5.1.0/dist/reveal.css +0 -0
  170. {glideshow-0.4.0 → glideshow-0.4.2}/editor/vendor/reveal.js-5.1.0/dist/reveal.js +0 -0
  171. {glideshow-0.4.0 → glideshow-0.4.2}/editor/vendor/reveal.js-5.1.0/plugin/highlight/highlight.js +0 -0
  172. {glideshow-0.4.0 → glideshow-0.4.2}/editor/vendor/reveal.js-5.1.0/plugin/notes/notes.js +0 -0
  173. {glideshow-0.4.0 → glideshow-0.4.2}/glidecore/__init__.py +0 -0
  174. {glideshow-0.4.0 → glideshow-0.4.2}/glidecore/merge.py +0 -0
  175. {glideshow-0.4.0 → glideshow-0.4.2}/glidecore/osutil.py +0 -0
  176. {glideshow-0.4.0 → glideshow-0.4.2}/glidecore/web/browser-db.js +0 -0
  177. {glideshow-0.4.0 → glideshow-0.4.2}/glidecore/web/library.js +0 -0
  178. {glideshow-0.4.0 → glideshow-0.4.2}/glidecore/web/merge.js +0 -0
  179. {glideshow-0.4.0 → glideshow-0.4.2}/glidecore/web/move-local.js +0 -0
  180. {glideshow-0.4.0 → glideshow-0.4.2}/glidecore/web/onefile.js +0 -0
  181. {glideshow-0.4.0 → glideshow-0.4.2}/glidecore/web/store-browser.js +0 -0
  182. {glideshow-0.4.0 → glideshow-0.4.2}/glidecore/web/store-folder.js +0 -0
  183. {glideshow-0.4.0 → glideshow-0.4.2}/glideshow/__init__.py +0 -0
  184. {glideshow-0.4.0 → glideshow-0.4.2}/glideshow/__main__.py +0 -0
  185. {glideshow-0.4.0 → glideshow-0.4.2}/glideshow/agent.py +0 -0
  186. {glideshow-0.4.0 → glideshow-0.4.2}/glideshow/build.py +0 -0
  187. {glideshow-0.4.0 → glideshow-0.4.2}/glideshow/cli.py +0 -0
  188. {glideshow-0.4.0 → glideshow-0.4.2}/glideshow/comments.py +0 -0
  189. {glideshow-0.4.0 → glideshow-0.4.2}/glideshow/decks.py +0 -0
  190. {glideshow-0.4.0 → glideshow-0.4.2}/glideshow/figure.py +0 -0
  191. {glideshow-0.4.0 → glideshow-0.4.2}/glideshow/fonts.py +0 -0
  192. {glideshow-0.4.0 → glideshow-0.4.2}/glideshow/gslides.py +0 -0
  193. {glideshow-0.4.0 → glideshow-0.4.2}/glideshow/history.py +0 -0
  194. {glideshow-0.4.0 → glideshow-0.4.2}/glideshow/movie.py +0 -0
  195. {glideshow-0.4.0 → glideshow-0.4.2}/glideshow/pptx_export.py +0 -0
  196. {glideshow-0.4.0 → glideshow-0.4.2}/glideshow/pptx_import.py +0 -0
  197. {glideshow-0.4.0 → glideshow-0.4.2}/glideshow/publish.py +0 -0
  198. {glideshow-0.4.0 → glideshow-0.4.2}/glideshow/render.py +0 -0
  199. {glideshow-0.4.0 → glideshow-0.4.2}/glideshow/server.py +0 -0
  200. {glideshow-0.4.0 → glideshow-0.4.2}/glideshow/service.py +0 -0
  201. {glideshow-0.4.0 → glideshow-0.4.2}/glidewrites/__init__.py +0 -0
  202. {glideshow-0.4.0 → glideshow-0.4.2}/glidewrites/__main__.py +0 -0
  203. {glideshow-0.4.0 → glideshow-0.4.2}/glidewrites/agent.py +0 -0
  204. {glideshow-0.4.0 → glideshow-0.4.2}/glidewrites/claude_agent.py +0 -0
  205. {glideshow-0.4.0 → glideshow-0.4.2}/glidewrites/cli.py +0 -0
  206. {glideshow-0.4.0 → glideshow-0.4.2}/glidewrites/comment_cli.py +0 -0
  207. {glideshow-0.4.0 → glideshow-0.4.2}/glidewrites/comments.py +0 -0
  208. {glideshow-0.4.0 → glideshow-0.4.2}/glidewrites/convert.py +0 -0
  209. {glideshow-0.4.0 → glideshow-0.4.2}/glidewrites/docs.py +0 -0
  210. {glideshow-0.4.0 → glideshow-0.4.2}/glidewrites/docx_export.py +0 -0
  211. {glideshow-0.4.0 → glideshow-0.4.2}/glidewrites/docx_import.py +0 -0
  212. {glideshow-0.4.0 → glideshow-0.4.2}/glidewrites/gdocs.py +0 -0
  213. {glideshow-0.4.0 → glideshow-0.4.2}/glidewrites/history.py +0 -0
  214. {glideshow-0.4.0 → glideshow-0.4.2}/glidewrites/lan.py +0 -0
  215. {glideshow-0.4.0 → glideshow-0.4.2}/glidewrites/library.py +0 -0
  216. {glideshow-0.4.0 → glideshow-0.4.2}/glidewrites/markup.py +0 -0
  217. {glideshow-0.4.0 → glideshow-0.4.2}/glidewrites/pdf_export.py +0 -0
  218. {glideshow-0.4.0 → glideshow-0.4.2}/glidewrites/server.py +0 -0
  219. {glideshow-0.4.0 → glideshow-0.4.2}/glidewrites/service.py +0 -0
  220. {glideshow-0.4.0 → glideshow-0.4.2}/glidewrites/suggest.py +0 -0
  221. {glideshow-0.4.0 → glideshow-0.4.2}/skills/glideshow/SKILL.md +0 -0
  222. {glideshow-0.4.0 → glideshow-0.4.2}/skills/glidewrites/SKILL.md +0 -0
  223. {glideshow-0.4.0 → glideshow-0.4.2}/test/agent.py +0 -0
  224. {glideshow-0.4.0 → glideshow-0.4.2}/test/caching.py +0 -0
  225. {glideshow-0.4.0 → glideshow-0.4.2}/test/cloud.py +0 -0
  226. {glideshow-0.4.0 → glideshow-0.4.2}/test/coedit.py +0 -0
  227. {glideshow-0.4.0 → glideshow-0.4.2}/test/fake_drive.py +0 -0
  228. {glideshow-0.4.0 → glideshow-0.4.2}/test/fake_gdocs.py +0 -0
  229. {glideshow-0.4.0 → glideshow-0.4.2}/test/fixtures/agent-deck.html +0 -0
  230. {glideshow-0.4.0 → glideshow-0.4.2}/test/fixtures/gdocs-export.html +0 -0
  231. {glideshow-0.4.0 → glideshow-0.4.2}/test/fixtures/gslides-api.json +0 -0
  232. {glideshow-0.4.0 → glideshow-0.4.2}/test/fixtures/stack-deck.html +0 -0
  233. {glideshow-0.4.0 → glideshow-0.4.2}/test/gw_browser.py +0 -0
  234. {glideshow-0.4.0 → glideshow-0.4.2}/test/keys.py +0 -0
  235. {glideshow-0.4.0 → glideshow-0.4.2}/test/media.py +0 -0
  236. {glideshow-0.4.0 → glideshow-0.4.2}/test/offline.py +0 -0
  237. {glideshow-0.4.0 → glideshow-0.4.2}/test/offline_save.py +0 -0
  238. {glideshow-0.4.0 → glideshow-0.4.2}/test/offline_sw.py +0 -0
  239. {glideshow-0.4.0 → glideshow-0.4.2}/test/perf.py +0 -0
  240. {glideshow-0.4.0 → glideshow-0.4.2}/test/share.py +0 -0
  241. {glideshow-0.4.0 → glideshow-0.4.2}/test/snap.py +0 -0
  242. {glideshow-0.4.0 → glideshow-0.4.2}/test/state_glideshow_edit.py +0 -0
  243. {glideshow-0.4.0 → glideshow-0.4.2}/test/state_glideshow_present.py +0 -0
  244. {glideshow-0.4.0 → glideshow-0.4.2}/test/state_glideshow_present_phone.py +0 -0
  245. {glideshow-0.4.0 → glideshow-0.4.2}/test/state_glideshow_sync.py +0 -0
  246. {glideshow-0.4.0 → glideshow-0.4.2}/test/state_glideshow_sync_cloud.py +0 -0
  247. {glideshow-0.4.0 → glideshow-0.4.2}/test/writes.py +0 -0
  248. {glideshow-0.4.0 → glideshow-0.4.2}/test/writes_agent.py +0 -0
  249. {glideshow-0.4.0 → glideshow-0.4.2}/test/writes_chips.py +0 -0
  250. {glideshow-0.4.0 → glideshow-0.4.2}/test/writes_claude.py +0 -0
  251. {glideshow-0.4.0 → glideshow-0.4.2}/test/writes_cloud.py +0 -0
  252. {glideshow-0.4.0 → glideshow-0.4.2}/test/writes_comments.py +0 -0
  253. {glideshow-0.4.0 → glideshow-0.4.2}/test/writes_drawings.py +0 -0
  254. {glideshow-0.4.0 → glideshow-0.4.2}/test/writes_e2e.py +0 -0
  255. {glideshow-0.4.0 → glideshow-0.4.2}/test/writes_emoji.py +0 -0
  256. {glideshow-0.4.0 → glideshow-0.4.2}/test/writes_engines.py +0 -0
  257. {glideshow-0.4.0 → glideshow-0.4.2}/test/writes_find.py +0 -0
  258. {glideshow-0.4.0 → glideshow-0.4.2}/test/writes_gdocs.py +0 -0
  259. {glideshow-0.4.0 → glideshow-0.4.2}/test/writes_gifs.py +0 -0
  260. {glideshow-0.4.0 → glideshow-0.4.2}/test/writes_history_more.py +0 -0
  261. {glideshow-0.4.0 → glideshow-0.4.2}/test/writes_house.py +0 -0
  262. {glideshow-0.4.0 → glideshow-0.4.2}/test/writes_insert.py +0 -0
  263. {glideshow-0.4.0 → glideshow-0.4.2}/test/writes_keys.py +0 -0
  264. {glideshow-0.4.0 → glideshow-0.4.2}/test/writes_lan.py +0 -0
  265. {glideshow-0.4.0 → glideshow-0.4.2}/test/writes_matrix.py +0 -0
  266. {glideshow-0.4.0 → glideshow-0.4.2}/test/writes_pages.py +0 -0
  267. {glideshow-0.4.0 → glideshow-0.4.2}/test/writes_paragraph.py +0 -0
  268. {glideshow-0.4.0 → glideshow-0.4.2}/test/writes_perf.py +0 -0
  269. {glideshow-0.4.0 → glideshow-0.4.2}/test/writes_phone.py +0 -0
  270. {glideshow-0.4.0 → glideshow-0.4.2}/test/writes_prefs.py +0 -0
  271. {glideshow-0.4.0 → glideshow-0.4.2}/test/writes_state.py +0 -0
  272. {glideshow-0.4.0 → glideshow-0.4.2}/test/writes_state_comments.py +0 -0
  273. {glideshow-0.4.0 → glideshow-0.4.2}/test/writes_state_comments_share.py +0 -0
  274. {glideshow-0.4.0 → glideshow-0.4.2}/test/writes_state_objects.py +0 -0
  275. {glideshow-0.4.0 → glideshow-0.4.2}/test/writes_state_server.py +0 -0
  276. {glideshow-0.4.0 → glideshow-0.4.2}/test/writes_suggest.py +0 -0
  277. {glideshow-0.4.0 → glideshow-0.4.2}/test/writes_tables.py +0 -0
  278. {glideshow-0.4.0 → glideshow-0.4.2}/test/writes_tabs.py +0 -0
  279. {glideshow-0.4.0 → glideshow-0.4.2}/test/writes_vim.py +0 -0
  280. {glideshow-0.4.0 → glideshow-0.4.2}/tools/check.sh +0 -0
  281. {glideshow-0.4.0 → glideshow-0.4.2}/tools/font_metrics.py +0 -0
  282. {glideshow-0.4.0 → glideshow-0.4.2}/tools/gslides2deck.py +0 -0
  283. {glideshow-0.4.0 → glideshow-0.4.2}/tools/make-app.sh +0 -0
  284. {glideshow-0.4.0 → glideshow-0.4.2}/tools/make-writes-app.sh +0 -0
  285. {glideshow-0.4.0 → glideshow-0.4.2}/tools/split-core.py +0 -0
  286. {glideshow-0.4.0 → glideshow-0.4.2}/tools/vendor.py +0 -0
  287. {glideshow-0.4.0 → glideshow-0.4.2}/writer/CORE-SPLIT.md +0 -0
  288. {glideshow-0.4.0 → glideshow-0.4.2}/writer/PLAN.md +0 -0
  289. {glideshow-0.4.0 → glideshow-0.4.2}/writer/RELEASE.md +0 -0
  290. {glideshow-0.4.0 → glideshow-0.4.2}/writer/a11y.css +0 -0
  291. {glideshow-0.4.0 → glideshow-0.4.2}/writer/apps.js +0 -0
  292. {glideshow-0.4.0 → glideshow-0.4.2}/writer/chips.css +0 -0
  293. {glideshow-0.4.0 → glideshow-0.4.2}/writer/cloud.css +0 -0
  294. {glideshow-0.4.0 → glideshow-0.4.2}/writer/comments.css +0 -0
  295. {glideshow-0.4.0 → glideshow-0.4.2}/writer/doc/doc.css +0 -0
  296. {glideshow-0.4.0 → glideshow-0.4.2}/writer/emoji-watermark.css +0 -0
  297. {glideshow-0.4.0 → glideshow-0.4.2}/writer/emoji.json +0 -0
  298. {glideshow-0.4.0 → glideshow-0.4.2}/writer/find.css +0 -0
  299. {glideshow-0.4.0 → glideshow-0.4.2}/writer/glidewrites-1024.png +0 -0
  300. {glideshow-0.4.0 → glideshow-0.4.2}/writer/glidewrites.svg +0 -0
  301. {glideshow-0.4.0 → glideshow-0.4.2}/writer/history.css +0 -0
  302. {glideshow-0.4.0 → glideshow-0.4.2}/writer/home.css +0 -0
  303. {glideshow-0.4.0 → glideshow-0.4.2}/writer/home.html +0 -0
  304. {glideshow-0.4.0 → glideshow-0.4.2}/writer/home.js +0 -0
  305. {glideshow-0.4.0 → glideshow-0.4.2}/writer/index.html +0 -0
  306. {glideshow-0.4.0 → glideshow-0.4.2}/writer/inserts.css +0 -0
  307. {glideshow-0.4.0 → glideshow-0.4.2}/writer/js/a11y.js +0 -0
  308. {glideshow-0.4.0 → glideshow-0.4.2}/writer/js/boot.js +0 -0
  309. {glideshow-0.4.0 → glideshow-0.4.2}/writer/js/chars.js +0 -0
  310. {glideshow-0.4.0 → glideshow-0.4.2}/writer/js/charts.js +0 -0
  311. {glideshow-0.4.0 → glideshow-0.4.2}/writer/js/chips.js +0 -0
  312. {glideshow-0.4.0 → glideshow-0.4.2}/writer/js/cloud.js +0 -0
  313. {glideshow-0.4.0 → glideshow-0.4.2}/writer/js/columns.js +0 -0
  314. {glideshow-0.4.0 → glideshow-0.4.2}/writer/js/comments.js +0 -0
  315. {glideshow-0.4.0 → glideshow-0.4.2}/writer/js/compat.js +0 -0
  316. {glideshow-0.4.0 → glideshow-0.4.2}/writer/js/context.js +0 -0
  317. {glideshow-0.4.0 → glideshow-0.4.2}/writer/js/doc.js +0 -0
  318. {glideshow-0.4.0 → glideshow-0.4.2}/writer/js/drawing.js +0 -0
  319. {glideshow-0.4.0 → glideshow-0.4.2}/writer/js/emoji.js +0 -0
  320. {glideshow-0.4.0 → glideshow-0.4.2}/writer/js/find.js +0 -0
  321. {glideshow-0.4.0 → glideshow-0.4.2}/writer/js/fnpages.js +0 -0
  322. {glideshow-0.4.0 → glideshow-0.4.2}/writer/js/format.js +0 -0
  323. {glideshow-0.4.0 → glideshow-0.4.2}/writer/js/glideshow.js +0 -0
  324. {glideshow-0.4.0 → glideshow-0.4.2}/writer/js/headers.js +0 -0
  325. {glideshow-0.4.0 → glideshow-0.4.2}/writer/js/history.js +0 -0
  326. {glideshow-0.4.0 → glideshow-0.4.2}/writer/js/images.js +0 -0
  327. {glideshow-0.4.0 → glideshow-0.4.2}/writer/js/inserts.js +0 -0
  328. {glideshow-0.4.0 → glideshow-0.4.2}/writer/js/io.js +0 -0
  329. {glideshow-0.4.0 → glideshow-0.4.2}/writer/js/keys.js +0 -0
  330. {glideshow-0.4.0 → glideshow-0.4.2}/writer/js/linenumbers.js +0 -0
  331. {glideshow-0.4.0 → glideshow-0.4.2}/writer/js/lists.js +0 -0
  332. {glideshow-0.4.0 → glideshow-0.4.2}/writer/js/menus.js +0 -0
  333. {glideshow-0.4.0 → glideshow-0.4.2}/writer/js/outline.js +0 -0
  334. {glideshow-0.4.0 → glideshow-0.4.2}/writer/js/overflow.js +0 -0
  335. {glideshow-0.4.0 → glideshow-0.4.2}/writer/js/pages.js +0 -0
  336. {glideshow-0.4.0 → glideshow-0.4.2}/writer/js/pagesetup.js +0 -0
  337. {glideshow-0.4.0 → glideshow-0.4.2}/writer/js/paragraph.js +0 -0
  338. {glideshow-0.4.0 → glideshow-0.4.2}/writer/js/phone-edit.js +0 -0
  339. {glideshow-0.4.0 → glideshow-0.4.2}/writer/js/prefs.js +0 -0
  340. {glideshow-0.4.0 → glideshow-0.4.2}/writer/js/ruler.js +0 -0
  341. {glideshow-0.4.0 → glideshow-0.4.2}/writer/js/sections.js +0 -0
  342. {glideshow-0.4.0 → glideshow-0.4.2}/writer/js/share.js +0 -0
  343. {glideshow-0.4.0 → glideshow-0.4.2}/writer/js/sidepanel.js +0 -0
  344. {glideshow-0.4.0 → glideshow-0.4.2}/writer/js/state.js +0 -0
  345. {glideshow-0.4.0 → glideshow-0.4.2}/writer/js/suggest.js +0 -0
  346. {glideshow-0.4.0 → glideshow-0.4.2}/writer/js/tables.js +0 -0
  347. {glideshow-0.4.0 → glideshow-0.4.2}/writer/js/tabs.js +0 -0
  348. {glideshow-0.4.0 → glideshow-0.4.2}/writer/js/undo.js +0 -0
  349. {glideshow-0.4.0 → glideshow-0.4.2}/writer/js/view.js +0 -0
  350. {glideshow-0.4.0 → glideshow-0.4.2}/writer/js/vim.js +0 -0
  351. {glideshow-0.4.0 → glideshow-0.4.2}/writer/js/watermark.js +0 -0
  352. {glideshow-0.4.0 → glideshow-0.4.2}/writer/js/webimages.js +0 -0
  353. {glideshow-0.4.0 → glideshow-0.4.2}/writer/lib/merge.js +0 -0
  354. {glideshow-0.4.0 → glideshow-0.4.2}/writer/looks/glide.css +0 -0
  355. {glideshow-0.4.0 → glideshow-0.4.2}/writer/looks/look.js +0 -0
  356. {glideshow-0.4.0 → glideshow-0.4.2}/writer/looks/updraft.css +0 -0
  357. {glideshow-0.4.0 → glideshow-0.4.2}/writer/looks/vellum.css +0 -0
  358. {glideshow-0.4.0 → glideshow-0.4.2}/writer/looks/wave.css +0 -0
  359. {glideshow-0.4.0 → glideshow-0.4.2}/writer/objects.css +0 -0
  360. {glideshow-0.4.0 → glideshow-0.4.2}/writer/pages.css +0 -0
  361. {glideshow-0.4.0 → glideshow-0.4.2}/writer/paragraph.css +0 -0
  362. {glideshow-0.4.0 → glideshow-0.4.2}/writer/phone-home.js +0 -0
  363. {glideshow-0.4.0 → glideshow-0.4.2}/writer/phone.css +0 -0
  364. {glideshow-0.4.0 → glideshow-0.4.2}/writer/phone.js +0 -0
  365. {glideshow-0.4.0 → glideshow-0.4.2}/writer/prefs.css +0 -0
  366. {glideshow-0.4.0 → glideshow-0.4.2}/writer/share-view.css +0 -0
  367. {glideshow-0.4.0 → glideshow-0.4.2}/writer/share-view.js +0 -0
  368. {glideshow-0.4.0 → glideshow-0.4.2}/writer/suggest.css +0 -0
  369. {glideshow-0.4.0 → glideshow-0.4.2}/writer/tabs.css +0 -0
  370. {glideshow-0.4.0 → glideshow-0.4.2}/writer/templates/letter.html +0 -0
  371. {glideshow-0.4.0 → glideshow-0.4.2}/writer/templates/notes.html +0 -0
  372. {glideshow-0.4.0 → glideshow-0.4.2}/writer/templates/proposal.html +0 -0
  373. {glideshow-0.4.0 → glideshow-0.4.2}/writer/templates/resume.html +0 -0
  374. {glideshow-0.4.0 → glideshow-0.4.2}/writer/tsconfig.json +0 -0
  375. {glideshow-0.4.0 → glideshow-0.4.2}/writer/writer.css +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: glideshow
3
- Version: 0.4.0
3
+ Version: 0.4.2
4
4
  Summary: Slides and documents you own: Glideshow (Google Slides-style) and Glidewrites (Google Docs-style) editors over plain HTML folders that AI agents can edit
5
5
  Project-URL: Homepage, https://glideshow.org
6
6
  License-Expression: AGPL-3.0-or-later
@@ -213,7 +213,7 @@ function meta(title, { index = false, path = '/', description = '', ld = null }
213
213
  return `<meta name="description" content="${d}"><link rel="canonical" href="${SITE}${path}">
214
214
  <meta property="og:type" content="website"><meta property="og:site_name" content="Glideshow"><meta property="og:title" content="${t}">
215
215
  <meta property="og:description" content="${d}"><meta property="og:url" content="${SITE}${path}"><meta property="og:image" content="${SITE}/og.png">
216
- <meta name="twitter:card" content="summary"><meta name="twitter:title" content="${t}"><meta name="twitter:description" content="${d}"><meta name="twitter:image" content="${SITE}/og.png">${ld ? `
216
+ <meta name="twitter:card" content="summary_large_image"><meta name="twitter:title" content="${t}"><meta name="twitter:description" content="${d}"><meta name="twitter:image" content="${SITE}/og.png">${ld ? `
217
217
  <script type="application/ld+json">${JSON.stringify(ld).replace(/</g, '\\u003c')}</script>` : ''}`;
218
218
  }
219
219
 
@@ -90,7 +90,11 @@ or loss of data, from using it.</p>
90
90
  Gemini training only, so Google Search still indexes the public pages. Cloudflare's "Block AI bots" enforces it for the rest. */
91
91
  const AI_BOTS = ['GPTBot', 'ClaudeBot', 'anthropic-ai', 'CCBot', 'Google-Extended', 'Applebot-Extended', 'meta-externalagent', 'FacebookBot',
92
92
  'Bytespider', 'Amazonbot', 'cohere-ai', 'cohere-training-data-crawler', 'Diffbot', 'omgili', 'PerplexityBot', 'AI2Bot', 'Timpibot'];
93
- export const robots = AI_BOTS.map(b => `User-agent: ${b}\n`).join('') + 'Disallow: /\n\n' + 'User-agent: *\nAllow: /$\nAllow: /privacy\nAllow: /terms\nAllow: /og.png\nAllow: /sitemap.xml\nDisallow: /\n\nSitemap: https://glideshow.org/sitemap.xml\n';
93
+ /* files the public pages show (icon, preview picture, fonts, logo): search engines may fetch them so results show the icon and
94
+ the pages render styled */
95
+ export const PUBLIC_FILES = ['/favicon.svg', '/favicon.ico', '/apple-touch-icon.png', '/og.png', '/editor/vendor/fonts/', '/editor/looks/glider.svg'];
96
+ export const robots = AI_BOTS.map(b => `User-agent: ${b}\n`).join('') + 'Disallow: /\n\n' + 'User-agent: *\nAllow: /$\nAllow: /privacy\nAllow: /terms\n'
97
+ + PUBLIC_FILES.map(f => `Allow: ${f}\n`).join('') + 'Allow: /sitemap.xml\nDisallow: /\n\nSitemap: https://glideshow.org/sitemap.xml\n';
94
98
 
95
99
  export const sitemap = `<?xml version="1.0" encoding="UTF-8"?>
96
100
  <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
@@ -12,7 +12,7 @@
12
12
  import { DurableObject } from 'cloudflare:workers';
13
13
  import { approvedFrom, cleanSlides, composeDeck, deckForCollaborator } from './clean.js';
14
14
  import { session, legacySession, SESSION, isOwner, isAdmin, libraryFor, githubStart, githubCallback, googleStart, googleCallback, devLogin, loginPage, page, esc, json, redirect, cookie, getCookie, safeNext, unseal, unlock, sameTag } from './auth.js';
15
- import { landing, privacy, terms, robots, sitemap } from './pages.js';
15
+ import { landing, privacy, terms, robots, sitemap, PUBLIC_FILES } from './pages.js';
16
16
  import { editorEnv, writerAsset } from './assets.js';
17
17
  export { Library } from './library.js';
18
18
 
@@ -40,7 +40,10 @@ export default {
40
40
  if (left > 0) h.append('set-cookie', cookie(SESSION, old, left));
41
41
  h.append('set-cookie', cookie('session', '', 0));
42
42
  }
43
- h.set('x-robots-tag', ['/', '/privacy', '/terms'].includes(path) && res.status === 200 && !res.headers.get('set-cookie') ? 'noai, noimageai' : 'noindex, nofollow, noai, noimageai'); // only the public pages may be indexed
43
+ const plainOk = res.status === 200 && !res.headers.get('set-cookie');
44
+ h.set('x-robots-tag', plainOk && ['/', '/privacy', '/terms'].includes(path) ? 'noai, noimageai' // only the public pages may be indexed
45
+ : plainOk && PUBLIC_FILES.some(f => f.endsWith('/') ? path.startsWith(f) : path === f) ? 'noai, noimageai' // and what they show (the icon in results)
46
+ : 'noindex, nofollow, noai, noimageai');
44
47
  if (!framable(path, h.get('content-security-policy'))) h.set('x-frame-options', 'SAMEORIGIN');
45
48
  // which deploy the editor's files are from: the offline copy (editor/local/offline.js) keeps a page with its own scripts
46
49
  // (wrangler dev serves edited files under one id: none there, so each file is asked for, unless DEV_BUILD names one)
@@ -473,7 +473,9 @@
473
473
  @page { margin: 0; } .reveal .slide-number, .sl-bar { display: none !important; }
474
474
  .gs-print-bar { position: fixed; z-index: 1000; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 16px; height: 56px; padding: 0 16px; background: #fff;
475
475
  box-shadow: 0 1px 3px rgba(60, 64, 67, .3); font: 14px Roboto, Arial, sans-serif; color: #1f1f1f; }
476
- .gs-print-bar select { height: 36px; padding: 0 8px; border: 1px solid #c4c7c5; border-radius: 4px; font: inherit; background: #fff; }
476
+ .gs-print-bar select { appearance: none; -webkit-appearance: none; height: 36px; margin: 0; padding: 0 36px 0 12px; border: 1px solid #c4c7c5; border-radius: 4px; font: inherit; line-height: 34px; color: inherit; cursor: pointer;
477
+ background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z' fill='%23444746'/%3E%3C/svg%3E") no-repeat right 8px center / 24px; } /* the system arrow sat against the edge (2026-11-22) */
478
+ .gs-print-bar select:hover { background-color: #f8fafd; } .gs-print-bar select:focus-visible { outline: 2px solid #0b57d0; outline-offset: 1px; }
477
479
  .gs-print-bar label { display: flex; align-items: center; gap: 6px; cursor: pointer; } .gs-print-bar .sp { flex: 1; }
478
480
  .gs-print-bar button { height: 36px; padding: 0 16px; border: 1px solid #747775; border-radius: 18px; background: #fff; color: #0b57d0; font: 500 14px Roboto, Arial, sans-serif; cursor: pointer; }
479
481
  .gs-print-bar button.go { border: 0; background: #0b57d0; color: #fff; }
@@ -501,6 +501,7 @@ window.gsFirstDeck = fetch('/api/deck', { cache: 'no-store' }).then(r => r.json(
501
501
  <script src="/editor/js/notes.js"></script>
502
502
  <script src="/editor/js/find.js"></script>
503
503
  <script src="/editor/js/file.js"></script>
504
+ <script src="/editor/js/pptx.js"></script>
504
505
  <script src="/editor/js/comments.js"></script>
505
506
  <script src="/editor/js/live.js"></script>
506
507
  <script src="/editor/js/people.js"></script>
@@ -58,7 +58,7 @@ const MENUS = {
58
58
  { label: 'Import from Google Slides', icon: 'cloud_download', run: () => askURL('Import from Google Slides: link to the deck', importGoogle), mac: true },
59
59
  { label: 'Make a copy', icon: 'file_copy', run: () => askURL('Make a copy: folder name', name => switchDeck({ copy: name }), deckName() + '-copy') },
60
60
  '-',
61
- { label: 'Download', icon: 'download', items: onThisSide([{ label: 'Glideshow deck, one file (.html)', run: downloadOneFile }, { label: 'PDF document (.pdf)', run: printDeck }, { label: 'PNG image (.png, current slide)', run: downloadSlidePNG }, { label: 'Images of the slides (.zip)…', run: () => showImgDlg() }, { label: 'Movie (.mp4)…', run: () => showMovieDlg('mp4'), mac: true }, { label: 'Animated GIF (.gif)…', run: () => showMovieDlg('gif'), mac: true }, { label: 'Microsoft PowerPoint (.pptx)', run: async () => { await flushSave(); setStatus('Making the PowerPoint file…'); location.href = '/api/pptx'; }, mac: true }, { label: 'Web page folder (.zip)', run: () => { location.href = '/api/zip'; }, mac: true }]) }, // the print dialog's Save as PDF
61
+ { label: 'Download', icon: 'download', items: onThisSide([{ label: 'Glideshow deck, one file (.html)', run: downloadOneFile }, { label: 'PDF document (.pdf)', run: printDeck }, { label: 'PNG image (.png, current slide)', run: downloadSlidePNG }, { label: 'Images of the slides (.zip)…', run: () => showImgDlg() }, { label: 'Movie (.mp4)…', run: () => showMovieDlg('mp4'), mac: true }, { label: 'Animated GIF (.gif)…', run: () => showMovieDlg('gif'), mac: true }, { label: 'Microsoft PowerPoint (.pptx)', run: async () => { await flushSave(); setStatus('Making the PowerPoint file…'); location.href = '/api/pptx'; }, mac: true }, { label: 'Microsoft PowerPoint (.pptx)', run: downloadPPTX, online: true }, { label: 'Web page folder (.zip)', run: () => { location.href = '/api/zip'; }, mac: true }]) }, // the print dialog's Save as PDF
62
62
  '-',
63
63
  { label: 'Rename', icon: 'edit', run: () => { $('#ed-title').focus(); $('#ed-title').select(); } },
64
64
  { label: 'Move to trash', icon: 'delete', run: trashDeck },
@@ -19,7 +19,7 @@ let openMenuEl = null, openAnchor = null, subMenus = []; // open submenus, out
19
19
  const val = v => typeof v === 'function' ? v() : v;
20
20
  const levelOf = m => m === openMenuEl ? 0 : subMenus.indexOf(m) + 1;
21
21
  function closeSub(level = 0) { subMenus.splice(level).forEach(m => m.remove()); } // close submenus deeper than `level`
22
- function closeMenu() { closeSub(); openMenuEl?.remove(); openAnchor?.classList.remove('open'); openMenuEl = openAnchor = null; }
22
+ function closeMenu() { clearTimeout(subTimer); closeSub(); openMenuEl?.remove(); openAnchor?.classList.remove('open'); openMenuEl = openAnchor = null; }
23
23
  function buildMenu(items) {
24
24
  const m = div('menu');
25
25
  m.addEventListener('mousedown', e => e.preventDefault()); // keep the text selection being formatted
@@ -39,10 +39,12 @@ function buildMenu(items) {
39
39
  if (it.tip) row.dataset.tip = it.tip;
40
40
  if (it.items) {
41
41
  row.classList.add('has-sub'); row.children[2].className = 'menu-key icon'; row.children[2].textContent = 'arrow_right';
42
- row.onpointerenter = row.onclick = () => openSub(row, it.items);
42
+ row.onclick = () => { clearTimeout(subTimer); openSub(row, it.items, true); };
43
+ row.onpointerenter = () => hoverSoon(m, () => openSub(row, it.items), 120);
44
+ row.onpointerleave = () => { if (!subMenus[levelOf(m)]) clearTimeout(subTimer); };
43
45
  } else {
44
46
  row.children[2].textContent = gkey(it.key);
45
- row.onpointerenter = () => closeSub(levelOf(m));
47
+ row.onpointerenter = () => hoverSoon(m, () => closeSub(levelOf(m)), 0);
46
48
  row.onclick = () => { closeMenu(); it.run(); };
47
49
  }
48
50
  m.append(row);
@@ -65,15 +67,36 @@ function openMenu(anchor, items, { up = false } = {}) {
65
67
  anchor.classList.add('open'); openMenuEl = m; openAnchor = anchor;
66
68
  }
67
69
 
68
- function openSub(row, items) {
70
+ /* Hovering, as Slides: a submenu opens once the pointer rests on its row a moment, and the one open stays while the
71
+ pointer heads into it across other rows (inside the triangle from where it was to the submenu's near edge), so
72
+ moving down the menu doesn't flash submenus over it and a diagonal move doesn't lose the one you're going to. */
73
+ let subTimer = 0, ptr = [0, 0], ptrWas = [0, 0], ptrAt = 0;
74
+ addEventListener('pointermove', e => { ptrWas = ptr; ptr = [e.clientX, e.clientY]; ptrAt = performance.now(); }, true);
75
+ function headingInto(sub) {
76
+ if (performance.now() - ptrAt > 150) return false; // stopped: it isn't on its way anywhere
77
+ const r = sub.getBoundingClientRect(), [x0, y0] = ptrWas, [x, y] = ptr, edge = r.left >= x0 ? r.left : r.right;
78
+ if (Math.abs(edge - x) >= Math.abs(edge - x0)) return false; // not getting closer to it
79
+ const side = (ax, ay, bx, by) => (bx - ax) * (y - ay) - (by - ay) * (x - ax);
80
+ const a = side(x0, y0, edge, r.top), b = side(edge, r.top, edge, r.bottom), c = side(edge, r.bottom, x0, y0);
81
+ return (a >= 0 && b >= 0 && c >= 0) || (a <= 0 && b <= 0 && c <= 0);
82
+ }
83
+ function hoverSoon(menu, act, ms) {
84
+ clearTimeout(subTimer);
85
+ const sub = subMenus[levelOf(menu)];
86
+ if (sub && headingInto(sub)) ms = Math.max(ms, 300); // and checked again then: still on its way, or arrived (its pointerenter cancels)
87
+ const run = () => { if (sub && sub.isConnected && headingInto(sub) && !sub.matches(':hover')) { subTimer = setTimeout(run, 100); return; } if (!sub?.matches(':hover')) act(); };
88
+ if (ms) subTimer = setTimeout(run, ms); else run();
89
+ }
90
+ function openSub(row, items, asked = false) {
69
91
  const list = val(items);
70
- if (list?.then) return list.then(l => row.isConnected && openSub(row, l)); // a fetched submenu (File → Open's recent decks)
92
+ if (list?.then) return list.then(l => row.isConnected && (asked || row.matches(':hover') || row === document.activeElement) && openSub(row, l, asked)); // a fetched submenu (File → Open's recent decks): not if the pointer has moved on by the time it comes
71
93
  const level = levelOf(row.parentElement);
72
94
  if (subMenus[level]?.dataset.from === row.textContent) return;
73
95
  closeSub(level);
74
96
  const m = buildMenu(list), r = row.getBoundingClientRect();
75
97
  m.dataset.from = row.textContent;
76
98
  placeMenu(m, r.right - 2, r.top - 6, r.left - m.offsetWidth + 2);
99
+ m.addEventListener('pointerenter', () => clearTimeout(subTimer));
77
100
  subMenus.push(m);
78
101
  }
79
102
  addEventListener('pointerdown', e => {
@@ -0,0 +1,345 @@
1
+ /* File → Download → Microsoft PowerPoint (.pptx) where there's no Python beside the editor (glideshow.org): the deck
2
+ written as PowerPoint's XML here in the browser, zipped with zipStore (file.js). The same choices as
3
+ glideshow/pptx_export.py, which the Mac's server runs instead: slide backgrounds, text boxes (paragraphs; size, bold,
4
+ italic, colour, font, alignment per run), pictures (an SVG drawn to a PNG), tables, charts (PowerPoint charts with
5
+ the numbers kept in them), the common shapes with their fill and outline, straight lines, speaker notes, transitions
6
+ (Morph as PowerPoint's Morph, shapes named "!!<id>" so they pair), builds, a layout's own objects. Videos and web
7
+ embeds are left out. */
8
+
9
+ const PX_EMU = 914400 * 10 / 1920, PX_PT = 192 / 72; // the 1920 px canvas is 10 in wide
10
+ const PPTX_SHAPES = { rect: 'rect', roundrect: 'roundRect', ellipse: 'ellipse', triangle: 'triangle', diamond: 'diamond', parallelogram: 'parallelogram',
11
+ trapezoid: 'trapezoid', pentagon: 'pentagon', hexagon: 'hexagon', octagon: 'octagon', star: 'star5', cloud: 'cloud', arrow: 'rightArrow',
12
+ leftarrow: 'leftArrow', uparrow: 'upArrow', downarrow: 'downArrow', leftrightarrow: 'leftRightArrow', chevron: 'chevron', callout: 'wedgeRectCallout',
13
+ roundcallout: 'wedgeRoundRectCallout', cross: 'plus', heart: 'heart', donut: 'donut', can: 'can', cube: 'cube', homeplate: 'homePlate', rttriangle: 'rtTriangle' };
14
+ let PPTX_PRESETS = null; // every other shape: its OOXML name from shapes.js' PRESET_OF table, which PowerPoint knows natively
15
+ function pptxPreset(name) {
16
+ if (!PPTX_PRESETS) {
17
+ const js = typeof SHAPES_JS === 'string' ? SHAPES_JS : '', at = js.indexOf('PRESET_OF = {');
18
+ PPTX_PRESETS = at < 0 ? {} : Object.fromEntries([...js.slice(at, js.indexOf('};', at)).matchAll(/['"]?([\w-]+)['"]?:\s*'(\w+)'/g)].map(m => [m[1], m[2]]));
19
+ }
20
+ return PPTX_SHAPES[name] || PPTX_PRESETS[name] || null;
21
+ }
22
+ const xesc = s => String(s).replace(/[&<>"]/g, c => ({ '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;' }[c])).replace(/[\u0000-\u0008\u000b\u000c\u000e-\u001f]/g, '');
23
+ const emu = v => Math.round(v * PX_EMU);
24
+ const pxOf = (v, d = 0) => { const m = /^\s*(-?[\d.]+)px/.exec(v || ''); return m ? +m[1] : d; };
25
+ function hexOf(v) {
26
+ v = (v || '').trim();
27
+ let m = /^#([0-9a-f]{6})(?:[0-9a-f]{2})?$/i.exec(v); if (m) return m[1].toUpperCase();
28
+ m = /^#([0-9a-f]{3})$/i.exec(v); if (m) return [...m[1]].map(c => c + c).join('').toUpperCase();
29
+ m = /^rgba?\(\s*(\d+)[\s,]+(\d+)[\s,]+(\d+)(?:[\s,/]+([\d.]+%?))?\s*\)$/i.exec(v);
30
+ if (m && !(m[4] && parseFloat(m[4]) === 0)) return [m[1], m[2], m[3]].map(n => (+n).toString(16).padStart(2, '0')).join('').toUpperCase();
31
+ return null;
32
+ }
33
+ const NS_A = 'xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main"', NS_R = 'xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"';
34
+ const NS_P = 'xmlns:p="http://schemas.openxmlformats.org/presentationml/2006/main"', NS_MC = 'xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"';
35
+ const XML = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n';
36
+ const REL = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships';
37
+
38
+ /* Paragraphs of runs, one per block child / list item / <br>, each run with its own bold, italic, colour, size. */
39
+ function pptxParas(content, boxStyle) {
40
+ const out = []; let line = [];
41
+ const BLOCK = new Set(['DIV', 'P', 'LI', 'H1', 'H2', 'H3', 'PRE', 'TR']);
42
+ const flush = (st, bullet) => {
43
+ const runs = line.map(r => ({ ...r, t: r.t.replace(/\s+/g, ' ') })); line = [];
44
+ if (runs.length) runs[0].t = runs[0].t.replace(/^\s+/, ''), runs[runs.length - 1].t = runs[runs.length - 1].t.replace(/\s+$/, '');
45
+ const kept = runs.filter(r => r.t);
46
+ if (kept.length) { if (bullet) kept[0].t = '• ' + kept[0].t; out.push({ runs: kept, align: st.textAlign }); }
47
+ };
48
+ const walk = (n, st) => {
49
+ for (const k of n.childNodes) {
50
+ if (k.nodeType === 3) { line.push({ t: k.data, ...st }); continue; }
51
+ if (k.nodeType !== 1) continue;
52
+ const s = k.style, here = { ...st };
53
+ if (s.fontWeight) here.b = s.fontWeight === 'bold' || +s.fontWeight >= 600;
54
+ if (k.tagName === 'B' || k.tagName === 'STRONG') here.b = true;
55
+ if (s.fontStyle) here.i = s.fontStyle === 'italic'; if (k.tagName === 'I' || k.tagName === 'EM') here.i = true;
56
+ if (k.tagName === 'U' || /underline/.test(s.textDecoration)) here.u = true;
57
+ if (s.color) here.color = hexOf(s.color) || here.color;
58
+ if (s.fontSize) here.size = pxOf(s.fontSize, here.size);
59
+ if (s.fontFamily) here.font = s.fontFamily.split(',')[0].replace(/['"]/g, '').trim();
60
+ if (s.textAlign) here.textAlign = s.textAlign;
61
+ if (k.tagName === 'BR') flush(st);
62
+ else if (k.tagName === 'UL' || k.tagName === 'OL') walk(k, here);
63
+ else if (BLOCK.has(k.tagName)) { flush(st); walk(k, here); flush(here, k.tagName === 'LI'); }
64
+ else if (!['svg', 'ASIDE', 'SCRIPT', 'STYLE'].includes(k.tagName)) walk(k, here);
65
+ }
66
+ };
67
+ const cs = content.style;
68
+ walk(content, { size: pxOf(cs.fontSize, pxOf(boxStyle.fontSize, 37.33)), b: cs.fontWeight === 'bold' || +cs.fontWeight >= 600, i: cs.fontStyle === 'italic',
69
+ color: hexOf(cs.color), font: (cs.fontFamily || '').split(',')[0].replace(/['"]/g, '').trim(), textAlign: cs.textAlign });
70
+ flush({ textAlign: cs.textAlign });
71
+ return out;
72
+ }
73
+ function pptxTxBody(content, shaped, box) {
74
+ const paras = content ? pptxParas(content, box.style) : [];
75
+ const algn = a => ({ center: 'ctr', right: 'r', justify: 'just' }[a] || (shaped ? 'ctr' : 'l'));
76
+ const anchor = shaped ? 'ctr' : 't';
77
+ const ps = paras.map(p => `<a:p><a:pPr algn="${algn(p.align)}"/>${p.runs.map(r =>
78
+ `<a:r><a:rPr lang="en-US" sz="${Math.round(r.size / PX_PT * 100)}" b="${r.b ? 1 : 0}" i="${r.i ? 1 : 0}"${r.u ? ' u="sng"' : ''} dirty="0">${r.color ? `<a:solidFill><a:srgbClr val="${r.color}"/></a:solidFill>` : ''}${r.font ? `<a:latin typeface="${xesc(r.font)}"/><a:cs typeface="${xesc(r.font)}"/>` : ''}</a:rPr><a:t>${xesc(r.t)}</a:t></a:r>`).join('')}</a:p>`).join('');
79
+ return `<p:txBody><a:bodyPr wrap="square" lIns="91440" tIns="45720" rIns="91440" bIns="45720" anchor="${anchor}"><a:normAutofit/></a:bodyPr><a:lstStyle/>${ps || '<a:p><a:endParaRPr lang="en-US"/></a:p>'}</p:txBody>`;
80
+ }
81
+
82
+ /* Notes as lines: each paragraph, list item or <br> its own (textContent would run them together). */
83
+ function pptxNotesText(el) {
84
+ if (!el.children.length) return el.textContent.split('\n').map(l => l.trim()).join('\n').trim(); // plain text, its own line breaks
85
+ let out = '';
86
+ const walk = n => { for (const k of n.childNodes) {
87
+ if (k.nodeType === 3) out += k.data.replace(/\s+/g, ' ');
88
+ else if (k.nodeType === 1) { const blk = /^(P|DIV|LI|H[1-6]|UL|OL|PRE|TR)$/.test(k.tagName); if (k.tagName === 'BR' || blk) out += '\n'; if (k.tagName === 'LI') out += '• '; walk(k); if (blk) out += '\n'; }
89
+ } };
90
+ walk(el);
91
+ return out.split('\n').map(l => l.trim()).filter(Boolean).join('\n');
92
+ }
93
+
94
+ /* A .box.chart's table as a PowerPoint chart with its numbers cached in it (no workbook: PowerPoint shows and restyles
95
+ it; editing its data asks for one). */
96
+ function pptxChart(box) {
97
+ const a = box.dataset, rows = [...box.querySelectorAll('tr')].map(r => [...r.querySelectorAll('td, th')].map(c => c.textContent.replace(/\s+/g, ' ').trim()));
98
+ if (!rows.length) return null;
99
+ const num = s => { const v = parseFloat((s || '').replace(/[,\s$%€£]/g, '')); return isFinite(v) ? v : null; };
100
+ let cats = rows[0].slice(1), series = rows.slice(1).map(r => [r[0] || '', cats.map((_, j) => num(r[j + 1]))]);
101
+ if (a.plot === 'columns') { series = cats.map((c, j) => [c, rows.slice(1).map(r => num(r[j + 1]))]); cats = rows.slice(1).map(r => r[0] || ''); }
102
+ const kind = a.chart || 'column';
103
+ /* The numbers go in a small workbook too (Sheet1, as PowerPoint lays one out), the chart pointing at its cells with a
104
+ copy of each value: Keynote shows no chart without one, and PowerPoint's Edit Data opens it. */
105
+ const grid = [], colName = j => (j >= 26 ? String.fromCharCode(64 + Math.floor(j / 26)) : '') + String.fromCharCode(65 + (j % 26));
106
+ const ref = (c, r0, n) => `Sheet1!$${colName(c)}$${r0 + 1}` + (n > 1 ? `:$${colName(c)}$${r0 + n}` : '');
107
+ const strRef = (c, r0, list) => { list.forEach((v, i) => { (grid[r0 + i] ||= [])[c] = String(v); });
108
+ return `<c:strRef><c:f>${ref(c, r0, list.length)}</c:f><c:strCache><c:ptCount val="${list.length}"/>${list.map((v, i) => `<c:pt idx="${i}"><c:v>${xesc(v)}</c:v></c:pt>`).join('')}</c:strCache></c:strRef>`; };
109
+ const numRef = (c, r0, list) => { list.forEach((v, i) => { (grid[r0 + i] ||= [])[c] = v; });
110
+ return `<c:numRef><c:f>${ref(c, r0, list.length)}</c:f><c:numCache><c:formatCode>General</c:formatCode><c:ptCount val="${list.length}"/>${list.map((v, i) => v == null ? '' : `<c:pt idx="${i}"><c:v>${v}</c:v></c:pt>`).join('')}</c:numCache></c:numRef>`; };
111
+ const tx = (name, i, c) => `<c:idx val="${i}"/><c:order val="${i}"/><c:tx>${strRef(c, 0, [name])}</c:tx>`;
112
+ const labels = 'labels' in a ? '<c:dLbls><c:showLegendKey val="0"/><c:showVal val="1"/><c:showCatName val="0"/><c:showSerName val="0"/><c:showPercent val="0"/><c:showBubbleSize val="0"/></c:dLbls>' : '';
113
+ const axes = '<c:axId val="1001"/><c:axId val="1002"/>';
114
+ const catAx = '<c:catAx><c:axId val="1001"/><c:scaling><c:orientation val="minMax"/></c:scaling><c:delete val="0"/><c:axPos val="b"/><c:crossAx val="1002"/></c:catAx><c:valAx><c:axId val="1002"/><c:scaling><c:orientation val="minMax"/></c:scaling><c:delete val="0"/><c:axPos val="l"/><c:majorGridlines/><c:crossAx val="1001"/></c:valAx>';
115
+ let plot;
116
+ if (kind === 'scatter') {
117
+ const ser = series.map(([n, vals], i) => { const pts = cats.map((c, j) => [num(c), vals[j]]).filter(([x, y]) => x != null && y != null);
118
+ (grid[0] ||= [])[2 * i] = 'X';
119
+ return `<c:ser>${tx(n, i, 2 * i + 1)}<c:spPr><a:ln w="19050"><a:noFill/></a:ln></c:spPr><c:xVal>${numRef(2 * i, 1, pts.map(p => p[0]))}</c:xVal><c:yVal>${numRef(2 * i + 1, 1, pts.map(p => p[1]))}</c:yVal></c:ser>`; }).join('');
120
+ plot = `<c:scatterChart><c:scatterStyle val="lineMarker"/><c:varyColors val="0"/>${ser}${labels}${axes}</c:scatterChart><c:valAx><c:axId val="1001"/><c:scaling><c:orientation val="minMax"/></c:scaling><c:delete val="0"/><c:axPos val="b"/><c:crossAx val="1002"/></c:valAx><c:valAx><c:axId val="1002"/><c:scaling><c:orientation val="minMax"/></c:scaling><c:delete val="0"/><c:axPos val="l"/><c:majorGridlines/><c:crossAx val="1001"/></c:valAx>`;
121
+ } else if (kind === 'pie') {
122
+ const names = series.map(s => s[0]), vals = series.map(s => s[1].find(v => v != null) ?? 0);
123
+ plot = `<c:pieChart><c:varyColors val="1"/><c:ser>${tx(cats[0] || '', 0, 1)}<c:cat>${strRef(0, 1, names)}</c:cat><c:val>${numRef(1, 1, vals)}</c:val></c:ser>${labels}<c:firstSliceAng val="0"/></c:pieChart>`;
124
+ } else {
125
+ const ser = series.map(([n, vals], i) => `<c:ser>${tx(n, i, i + 1)}${kind === 'line' ? '<c:marker><c:symbol val="circle"/></c:marker>' : ''}<c:cat>${strRef(0, 1, cats)}</c:cat><c:val>${numRef(i + 1, 1, vals)}</c:val>${kind === 'line' ? '<c:smooth val="0"/>' : ''}</c:ser>`).join('');
126
+ const el = { bar: 'barChart', line: 'lineChart', area: 'areaChart' }[kind] || 'barChart';
127
+ const head = el === 'barChart' ? `<c:barDir val="${kind === 'bar' ? 'bar' : 'col'}"/><c:grouping val="clustered"/>` : '<c:grouping val="standard"/>';
128
+ plot = `<c:${el}>${head}<c:varyColors val="0"/>${ser}${labels}${el === 'barChart' ? '<c:gapWidth val="150"/>' : el === 'lineChart' ? '<c:marker val="1"/>' : ''}${axes}</c:${el}>${catAx}`;
129
+ if (kind === 'bar') plot = plot.replace('<c:axPos val="b"/>', '<c:axPos val="l"/>').replace('<c:axPos val="l"/><c:majorGridlines/>', '<c:axPos val="b"/><c:majorGridlines/>');
130
+ }
131
+ const legend = a.legend !== 'off' && (series.length > 1 || kind === 'pie') ? '<c:legend><c:legendPos val="t"/><c:overlay val="0"/></c:legend>' : '';
132
+ const title = a.title ? `<c:title><c:tx><c:rich><a:bodyPr/><a:p><a:r><a:t>${xesc(a.title)}</a:t></a:r></a:p></c:rich></c:tx><c:overlay val="0"/></c:title><c:autoTitleDeleted val="0"/>` : '<c:autoTitleDeleted val="1"/>';
133
+ const chart = `${XML}<c:chartSpace xmlns:c="http://schemas.openxmlformats.org/drawingml/2006/chart" ${NS_A} ${NS_R}><c:roundedCorners val="0"/><c:chart>${title}<c:plotArea><c:layout/>${plot}</c:plotArea>${legend}<c:plotVisOnly val="1"/></c:chart><c:txPr><a:bodyPr/><a:lstStyle/><a:p><a:pPr><a:defRPr sz="1400"/></a:pPr><a:endParaRPr lang="en-US"/></a:p></c:txPr><c:externalData r:id="rId1"><c:autoUpdate val="0"/></c:externalData></c:chartSpace>`;
134
+ return { xml: chart, grid };
135
+ }
136
+
137
+ /* A one-sheet workbook of the chart's numbers (inline strings, no styles: Excel and Numbers open it as it is). */
138
+ async function pptxWorkbook(grid) {
139
+ const enc = new TextEncoder(), colName = j => (j >= 26 ? String.fromCharCode(64 + Math.floor(j / 26)) : '') + String.fromCharCode(65 + (j % 26));
140
+ const rows = grid.map((r, i) => `<row r="${i + 1}">${(r || []).map((v, j) => v == null ? '' : typeof v === 'number' ? `<c r="${colName(j)}${i + 1}"><v>${v}</v></c>` : `<c r="${colName(j)}${i + 1}" t="inlineStr"><is><t>${xesc(v)}</t></is></c>`).join('')}</row>`).join('');
141
+ const f = [['[Content_Types].xml', `${XML}<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/><Default Extension="xml" ContentType="application/xml"/><Override PartName="/xl/workbook.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"/><Override PartName="/xl/worksheets/sheet1.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"/></Types>`],
142
+ ['_rels/.rels', `${XML}<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="${REL}/officeDocument" Target="xl/workbook.xml"/></Relationships>`],
143
+ ['xl/workbook.xml', `${XML}<workbook xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" ${NS_R}><sheets><sheet name="Sheet1" sheetId="1" r:id="rId1"/></sheets></workbook>`],
144
+ ['xl/_rels/workbook.xml.rels', `${XML}<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="${REL}/worksheet" Target="worksheets/sheet1.xml"/></Relationships>`],
145
+ ['xl/worksheets/sheet1.xml', `${XML}<worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"><sheetData>${rows}</sheetData></worksheet>`]];
146
+ return new Uint8Array(await zipStore(f.map(([n, t]) => [n, enc.encode(t)])).arrayBuffer());
147
+ }
148
+
149
+ /* A picture's bytes: fetched beside the deck (or a data: URL); an SVG drawn to a PNG at the size it's shown, as
150
+ PowerPoint before 2019 takes no SVG. */
151
+ async function pptxPicture(src, w, h) {
152
+ const r = await fetch(new URL(src, document.baseURI)); if (!r.ok) return null;
153
+ const blob = await r.blob(), type = blob.type || '';
154
+ const ext = /png/.test(type) ? 'png' : /jpe?g/.test(type) ? 'jpeg' : /gif/.test(type) ? 'gif' : /svg/.test(type) || /\.svg(\?|$)/i.test(src) ? 'svg' : /webp|avif/.test(type) ? 'raster' : 'png';
155
+ if (ext !== 'svg' && ext !== 'raster') return { ext, data: new Uint8Array(await blob.arrayBuffer()) };
156
+ const img = new Image(); img.src = URL.createObjectURL(blob);
157
+ try { await img.decode(); } catch { return null; }
158
+ const k = ext === 'svg' ? 2 : 1, c = document.createElement('canvas');
159
+ c.width = Math.max(1, Math.round((ext === 'svg' ? w : img.naturalWidth) * k)); c.height = Math.max(1, Math.round((ext === 'svg' ? h : img.naturalHeight) * k));
160
+ c.getContext('2d').drawImage(img, 0, 0, c.width, c.height); URL.revokeObjectURL(img.src);
161
+ const png = await new Promise(res => c.toBlob(res, 'image/png'));
162
+ return png && { ext: 'png', data: new Uint8Array(await png.arrayBuffer()) };
163
+ }
164
+
165
+ const PPTX_TRANSITIONS = { fade: '<p:fade/>', 'fade-in fade-out': '<p:fade/>', 'fade-black': '<p:fade thruBlk="1"/>', slide: '<p:push dir="l"/>', 'sl-left': '<p:push dir="r"/>',
166
+ 'sl-up': '<p:push dir="u"/>', 'sl-down': '<p:push dir="d"/>', 'wipe-r': '<p:wipe dir="r"/>', 'wipe-l': '<p:wipe dir="l"/>', 'wipe-d': '<p:wipe dir="d"/>',
167
+ 'wipe-u': '<p:wipe dir="u"/>', 'move-in-r': '<p:cover dir="r"/>', 'move-in-l': '<p:cover dir="l"/>', 'move-in-d': '<p:cover dir="d"/>',
168
+ 'move-in-u': '<p:cover dir="u"/>', 'reveal-l': '<p:pull dir="l"/>', iris: '<p:circle/>', zoom: '<p:zoom/>', 'k-scale': '<p:zoom/>', 'fade-move': '<p:push dir="l"/>', blinds: '<p:blinds dir="vert"/>', mosaic: '<p:dissolve/>', flop: '<p:split orient="horz" dir="in"/>', doorway: '<p:split orient="vert" dir="out"/>' };
169
+ function pptxTransition(sec) {
170
+ const d = sec.dataset, spd = { slow: 'slow', fast: 'fast' }[d.transitionSpeed] || 'med';
171
+ if ('autoAnimate' in d) return `<mc:AlternateContent xmlns:p159="http://schemas.microsoft.com/office/powerpoint/2015/09/main"><mc:Choice Requires="p159"><p:transition spd="slow" xmlns:p14="http://schemas.microsoft.com/office/powerpoint/2010/main" p14:dur="${Math.round(parseFloat(d.autoAnimateDuration || 1) * 1000)}"><p159:morph option="byObject"/></p:transition></mc:Choice><mc:Fallback><p:transition spd="slow"><p:fade/></p:transition></mc:Fallback></mc:AlternateContent>`;
172
+ if (!d.transition || d.transition === 'none') return '';
173
+ return `<p:transition spd="${spd}">${PPTX_TRANSITIONS[d.transition] || '<p:fade/>'}</p:transition>`;
174
+ }
175
+ const PPTX_OUTS = new Set(['fade-out', 'line-erase', 'disappear', 'blur-out', 'scale-out', 'iris-out']);
176
+ const PPTX_WIPES = { 'wipe-r': ['left', 8], 'wipe-l': ['right', 2], 'wipe-d': ['up', 1], 'wipe-u': ['down', 4] };
177
+ /* The slide's builds as PowerPoint's main sequence: each click a group; "with previous" joins it, "after previous" waits. */
178
+ function pptxTiming(built) {
179
+ let n = 2; const nid = () => ++n;
180
+ const idx = b => parseInt(b.dataset.fragmentIndex || 0) || 0;
181
+ const order = built.slice().sort((p, q) => idx(p[0]) - idx(q[0]) || Number('withPrevious' in p[0].dataset) - Number('withPrevious' in q[0].dataset));
182
+ const clicks = []; let last = null;
183
+ for (const [box, ids] of order) {
184
+ const i = idx(box), start = box.dataset.start || '';
185
+ if (clicks.length && (i === last || start === 'after' || start === 'transition')) clicks.at(-1).push([box, ids]); else clicks.push([[box, ids]]);
186
+ last = i;
187
+ }
188
+ const groups = clicks.map(click => {
189
+ let at = 0, first = true;
190
+ /** @type {[string[], number, number][]} */
191
+ const inner = [];
192
+ for (const [box, ids] of click) {
193
+ const d = box.dataset, eff = [...box.classList].find(c => !['box', 'fragment', 'image', 'table', 'group', 'visible', 'current-fragment'].includes(c)) || 'fade-in';
194
+ const dur = Math.round(parseFloat(d.duration || 0.5) * 1000), delay = Math.round(parseFloat(d.delay || 0) * 1000), start = d.start || '';
195
+ if (!first && start === 'after') at = inner.at(-1)[1];
196
+ const node = first && start !== 'after' && start !== 'transition' ? 'clickEffect' : start === 'after' || start === 'transition' ? 'afterEffect' : 'withEffect';
197
+ const out = PPTX_OUTS.has(eff);
198
+ const [cls, preset, sub, filt] = out ? ['exit', 10, 0, 'fade'] : eff === 'appear' ? ['entr', 1, 0, null] : eff in PPTX_WIPES ? ['entr', 22, PPTX_WIPES[eff][1], `wipe(${PPTX_WIPES[eff][0]})`] : ['entr', 10, 0, 'fade'];
199
+ const beh = ids.map(spid => {
200
+ const vis = `<p:set><p:cBhvr><p:cTn id="${nid()}" dur="1" fill="hold"><p:stCondLst><p:cond delay="${out ? dur - 1 : 0}"/></p:stCondLst></p:cTn><p:tgtEl><p:spTgt spid="${spid}"/></p:tgtEl><p:attrNameLst><p:attrName>style.visibility</p:attrName></p:attrNameLst></p:cBhvr><p:to><p:strVal val="${out ? 'hidden' : 'visible'}"/></p:to></p:set>`;
201
+ const anim = filt ? `<p:animEffect transition="${out ? 'out' : 'in'}" filter="${filt}"><p:cBhvr><p:cTn id="${nid()}" dur="${dur}"/><p:tgtEl><p:spTgt spid="${spid}"/></p:tgtEl></p:cBhvr></p:animEffect>` : '';
202
+ return out ? anim + vis : vis + anim;
203
+ }).join('');
204
+ const effect = `<p:par><p:cTn id="${nid()}" presetID="${preset}" presetClass="${cls}" presetSubtype="${sub}" fill="hold" nodeType="${node}"><p:stCondLst><p:cond delay="${delay}"/></p:stCondLst><p:childTnLst>${beh}</p:childTnLst></p:cTn></p:par>`;
205
+ if (first || start === 'after') inner.push([[effect], at + delay + dur, at]);
206
+ else { inner.at(-1)[0].push(effect); inner.at(-1)[1] = Math.max(inner.at(-1)[1], inner.at(-1)[2] + delay + dur); }
207
+ first = false;
208
+ }
209
+ const pars = inner.map(([effs, , t0]) => `<p:par><p:cTn id="${nid()}" fill="hold"><p:stCondLst><p:cond delay="${t0}"/></p:stCondLst><p:childTnLst>${effs.join('')}</p:childTnLst></p:cTn></p:par>`).join('');
210
+ return `<p:par><p:cTn id="${nid()}" fill="hold"><p:stCondLst><p:cond delay="indefinite"/></p:stCondLst><p:childTnLst>${pars}</p:childTnLst></p:cTn></p:par>`;
211
+ }).join('');
212
+ return `<p:timing><p:tnLst><p:par><p:cTn id="1" dur="indefinite" restart="never" nodeType="tmRoot"><p:childTnLst><p:seq concurrent="1" nextAc="seek"><p:cTn id="2" dur="indefinite" nodeType="mainSeq"><p:childTnLst>${groups}</p:childTnLst></p:cTn><p:prevCondLst><p:cond evt="onPrev" delay="0"><p:tgtEl><p:sldTgt/></p:tgtEl></p:cond></p:prevCondLst><p:nextCondLst><p:cond evt="onNext" delay="0"><p:tgtEl><p:sldTgt/></p:tgtEl></p:cond></p:nextCondLst></p:seq></p:childTnLst></p:cTn></p:par></p:tnLst></p:timing>`;
213
+ }
214
+
215
+ /* Column widths in px as base.css lays the table out: <col> widths, else the first row's; the rest share what's left. */
216
+ function pptxColWidths(table, cols, w) {
217
+ let cs = [...table.querySelectorAll('col')].flatMap(c => Array(+c.span || 1).fill(c));
218
+ const first = table.querySelector('tr');
219
+ if (!cs.length && first) cs = [...first.children].filter(c => /^T[DH]$/.test(c.tagName)).flatMap(c => (+c.colSpan || 1) === 1 ? [c] : Array(+c.colSpan).fill(null));
220
+ const one = c => { const m = c && /^\s*([\d.]+)\s*(%|px)?\s*$/.exec(c.style.width || c.getAttribute('width') || ''); return m ? +m[1] * (m[2] === '%' ? w / 100 : 1) : null; };
221
+ const got = Array.from({ length: cols }, (_, j) => one(cs[j]));
222
+ const fixed = got.reduce((s, g) => s + (g ?? 0), 0), free = got.filter(g => g == null).length, rest = free ? Math.max(0, w - fixed) / free : 0;
223
+ const out = got.map(g => g ?? rest), sum = out.reduce((s, v) => s + v, 0), k = sum > 0 ? w / sum : 1;
224
+ return out.map(v => v * k);
225
+ }
226
+
227
+ async function makePPTX(html) {
228
+ const doc = new DOMParser().parseFromString(html, 'text/html');
229
+ const slidesEl = doc.querySelector('.reveal .slides') || doc.querySelector('div.slides');
230
+ const m = /^(\d+)x(\d+)$/.exec(slidesEl?.dataset.size || ''), W = m ? +m[1] : 1920, H = m ? +m[2] : 1080;
231
+ const sections = [...(slidesEl?.children || [])].filter(s => s.tagName === 'SECTION').flatMap(top => { const kids = [...top.children].filter(k => k.tagName === 'SECTION'); return kids.length ? kids : [top]; });
232
+ const layouts = Object.fromEntries([...(/** @type {any} */ (doc.getElementById('deck-layouts'))?.content.children || [])].filter(L => L.classList.contains('layout')).map(L => [L.dataset.layout, L]));
233
+ const files = [], media = [], charts = []; const enc = new TextEncoder();
234
+ const put = (name, text) => files.push([name, enc.encode(text)]);
235
+ const slideXml = [];
236
+ for (const [si, sec] of sections.entries()) {
237
+ const rels = [`<Relationship Id="rId1" Type="${REL}/slideLayout" Target="../slideLayouts/slideLayout1.xml"/>`];
238
+ let spid = 1; const shapes = [], built = [];
239
+ const relFor = (type, target) => { const id = 'rId' + (rels.length + 1); rels.push(`<Relationship Id="${id}" Type="${REL}/${type}" Target="${target}"/>`); return id; };
240
+ const addBox = async (box, ox, oy, name) => {
241
+ const s = box.style, d = box.dataset, cls = box.classList;
242
+ const x = ox + pxOf(s.left), y = oy + pxOf(s.top), w = pxOf(s.width, 1), h = pxOf(s.height, 1);
243
+ const off = `<a:xfrm><a:off x="${emu(x)}" y="${emu(y)}"/><a:ext cx="${emu(w)}" cy="${emu(h)}"/></a:xfrm>`;
244
+ const nm = xesc('!!' + (name || box.id || 'shape' + spid));
245
+ const content = [...box.children].find(k => k.classList.contains('content'));
246
+ if (cls.contains('group')) { const ids = []; for (const k of [...box.children].filter(k => k.classList.contains('box'))) ids.push(...await addBox(k, x, y, k.dataset.morph || k.id)); return ids; }
247
+ if (cls.contains('video') || cls.contains('embed')) return [];
248
+ const id = ++spid;
249
+ if (cls.contains('image')) {
250
+ const img = box.querySelector('img'), src = img?.getAttribute('src');
251
+ const pic = src && await pptxPicture(src, w, h).catch(() => null);
252
+ if (!pic) { spid--; return []; }
253
+ const file = `image${media.length + 1}.${pic.ext}`; media.push([`ppt/media/${file}`, pic.data]);
254
+ const rid = relFor('image', `../media/${file}`);
255
+ shapes.push(`<p:pic><p:nvPicPr><p:cNvPr id="${id}" name="${nm}" descr="${xesc(img.getAttribute('alt') || '')}"/><p:cNvPicPr><a:picLocks noChangeAspect="1"/></p:cNvPicPr><p:nvPr/></p:nvPicPr><p:blipFill><a:blip r:embed="${rid}"/><a:stretch><a:fillRect/></a:stretch></p:blipFill><p:spPr>${off}<a:prstGeom prst="rect"><a:avLst/></a:prstGeom></p:spPr></p:pic>`);
256
+ return [id];
257
+ }
258
+ if (cls.contains('chart')) {
259
+ const ch = pptxChart(box); if (!ch) { spid--; return []; }
260
+ const file = `chart${charts.length + 1}.xml`, book = `Microsoft_Excel_Worksheet${charts.length + 1}.xlsx`; charts.push(file); put(`ppt/charts/${file}`, ch.xml);
261
+ media.push([`ppt/embeddings/${book}`, await pptxWorkbook(ch.grid)]);
262
+ put(`ppt/charts/_rels/${file}.rels`, `${XML}<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="${REL}/package" Target="../embeddings/${book}"/></Relationships>`);
263
+ const rid = relFor('chart', `../charts/${file}`);
264
+ shapes.push(`<p:graphicFrame><p:nvGraphicFramePr><p:cNvPr id="${id}" name="${nm}"/><p:cNvGraphicFramePr/><p:nvPr/></p:nvGraphicFramePr><p:xfrm><a:off x="${emu(x)}" y="${emu(y)}"/><a:ext cx="${emu(w)}" cy="${emu(h)}"/></p:xfrm><a:graphic><a:graphicData uri="http://schemas.openxmlformats.org/drawingml/2006/chart"><c:chart xmlns:c="http://schemas.openxmlformats.org/drawingml/2006/chart" r:id="${rid}"/></a:graphicData></a:graphic></p:graphicFrame>`);
265
+ return [id];
266
+ }
267
+ if (cls.contains('table')) {
268
+ const table = box.querySelector('table'), rows = [...box.querySelectorAll('tr')];
269
+ const cols = Math.max(0, ...rows.map(r => [...r.children].filter(c => /^T[DH]$/.test(c.tagName)).length));
270
+ if (!table || !rows.length || !cols) { spid--; return []; }
271
+ const sz = Math.round(pxOf(content?.style.fontSize, 37.33) / PX_PT * 100), rh = emu(h / rows.length);
272
+ const grid = pptxColWidths(table, cols, w).map(cw => `<a:gridCol w="${emu(cw)}"/>`).join('');
273
+ const trs = rows.map(r => { const cells = [...r.children].filter(c => /^T[DH]$/.test(c.tagName));
274
+ return `<a:tr h="${rh}">${Array.from({ length: cols }, (_, j) => `<a:tc><a:txBody><a:bodyPr/><a:lstStyle/><a:p><a:r><a:rPr lang="en-US" sz="${sz}" b="${cells[j]?.tagName === 'TH' ? 1 : 0}" dirty="0"/><a:t>${xesc((cells[j]?.textContent || '').replace(/\s+/g, ' ').trim())}</a:t></a:r></a:p></a:txBody><a:tcPr/></a:tc>`).join('')}</a:tr>`; }).join('');
275
+ shapes.push(`<p:graphicFrame><p:nvGraphicFramePr><p:cNvPr id="${id}" name="${nm}"/><p:cNvGraphicFramePr><a:graphicFrameLocks noGrp="1"/></p:cNvGraphicFramePr><p:nvPr/></p:nvGraphicFramePr><p:xfrm><a:off x="${emu(x)}" y="${emu(y)}"/><a:ext cx="${emu(w)}" cy="${emu(h)}"/></p:xfrm><a:graphic><a:graphicData uri="http://schemas.openxmlformats.org/drawingml/2006/table"><a:tbl><a:tblPr firstRow="1" bandRow="1"/><a:tblGrid>${grid}</a:tblGrid>${trs}</a:tbl></a:graphicData></a:graphic></p:graphicFrame>`);
276
+ return [id];
277
+ }
278
+ const shape = d.shape || '', sw = pxOf(s.getPropertyValue('--sw'), 4), stroke = hexOf(s.getPropertyValue('--stroke')), fill = hexOf(s.getPropertyValue('--fill'));
279
+ const ln = stroke ? `<a:ln w="${emu(sw)}"><a:solidFill><a:srgbClr val="${stroke}"/></a:solidFill></a:ln>` : '<a:ln><a:noFill/></a:ln>';
280
+ if (['line', 'arrowline', 'elbow', 'curve'].includes(shape)) {
281
+ const up = d.dir === 'up', tail = shape === 'arrowline' || d.end === 'arrow' ? '<a:tailEnd type="triangle"/>' : '';
282
+ shapes.push(`<p:cxnSp><p:nvCxnSpPr><p:cNvPr id="${id}" name="${nm}"/><p:cNvCxnSpPr/><p:nvPr/></p:nvCxnSpPr><p:spPr><a:xfrm${up ? ' flipV="1"' : ''}><a:off x="${emu(x)}" y="${emu(y)}"/><a:ext cx="${emu(w)}" cy="${emu(h)}"/></a:xfrm><a:prstGeom prst="line"><a:avLst/></a:prstGeom><a:ln w="${emu(sw)}">${stroke ? `<a:solidFill><a:srgbClr val="${stroke}"/></a:solidFill>` : '<a:solidFill><a:srgbClr val="000000"/></a:solidFill>'}${tail}</a:ln></p:spPr></p:cxnSp>`);
283
+ return [id];
284
+ }
285
+ const prst = shape ? pptxPreset(shape) : 'rect';
286
+ if (!prst) { spid--; return []; } // a shape PowerPoint export doesn't know yet
287
+ const fillXml = fill ? `<a:solidFill><a:srgbClr val="${fill}"/></a:solidFill>` : '<a:noFill/>';
288
+ shapes.push(`<p:sp><p:nvSpPr><p:cNvPr id="${id}" name="${nm}"/><p:cNvSpPr${shape ? '' : ' txBox="1"'}/><p:nvPr/></p:nvSpPr><p:spPr>${off}<a:prstGeom prst="${prst}"><a:avLst/></a:prstGeom>${fillXml}${shape ? ln : '<a:ln><a:noFill/></a:ln>'}</p:spPr>${pptxTxBody(content, !!shape, box)}</p:sp>`);
289
+ return [id];
290
+ };
291
+ const L = layouts[sec.dataset.layout || ''];
292
+ if (L && sec.dataset.layoutObjects !== 'off')
293
+ for (const box of [...L.children].filter(k => k.classList.contains('box') && !k.hasAttribute('data-placeholder'))) await addBox(box, 0, 0, box.id);
294
+ for (const box of [...sec.children].filter(k => k.classList.contains('box'))) {
295
+ const ids = await addBox(box, 0, 0, box.dataset.morph || box.id);
296
+ if (box.classList.contains('fragment') && ids.length) built.push([box, ids]);
297
+ }
298
+ const bg = hexOf(sec.dataset.backgroundColor || L?.dataset.backgroundColor || '');
299
+ const aside = [...sec.children].find(k => k.tagName === 'ASIDE' && k.classList.contains('notes'));
300
+ const notes = aside && pptxNotesText(aside);
301
+ if (notes) {
302
+ const n = si + 1; relFor('notesSlide', `../notesSlides/notesSlide${n}.xml`);
303
+ put(`ppt/notesSlides/notesSlide${n}.xml`, `${XML}<p:notes ${NS_A} ${NS_R} ${NS_P}><p:cSld><p:spTree><p:nvGrpSpPr><p:cNvPr id="1" name=""/><p:cNvGrpSpPr/><p:nvPr/></p:nvGrpSpPr><p:grpSpPr/><p:sp><p:nvSpPr><p:cNvPr id="2" name="Slide Image"/><p:cNvSpPr><a:spLocks noGrp="1" noRot="1" noChangeAspect="1"/></p:cNvSpPr><p:nvPr><p:ph type="sldImg"/></p:nvPr></p:nvSpPr><p:spPr><a:xfrm><a:off x="1143000" y="685800"/><a:ext cx="4572000" cy="2571750"/></a:xfrm><a:prstGeom prst="rect"><a:avLst/></a:prstGeom></p:spPr></p:sp><p:sp><p:nvSpPr><p:cNvPr id="3" name="Notes"/><p:cNvSpPr><a:spLocks noGrp="1"/></p:cNvSpPr><p:nvPr><p:ph type="body" idx="1"/></p:nvPr></p:nvSpPr><p:spPr><a:xfrm><a:off x="685800" y="3429000"/><a:ext cx="5486400" cy="4800600"/></a:xfrm><a:prstGeom prst="rect"><a:avLst/></a:prstGeom></p:spPr><p:txBody><a:bodyPr/><a:lstStyle/>${notes.split(/\n/).map(l => `<a:p><a:r><a:rPr lang="en-US" dirty="0"/><a:t>${xesc(l)}</a:t></a:r></a:p>`).join('')}</p:txBody></p:sp></p:spTree></p:cSld><p:clrMapOvr><a:masterClrMapping/></p:clrMapOvr></p:notes>`);
304
+ put(`ppt/notesSlides/_rels/notesSlide${n}.xml.rels`, `${XML}<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="${REL}/notesMaster" Target="../notesMasters/notesMaster1.xml"/><Relationship Id="rId2" Type="${REL}/slide" Target="../slides/slide${n}.xml"/></Relationships>`);
305
+ }
306
+ const bgXml = bg ? `<p:bg><p:bgPr><a:solidFill><a:srgbClr val="${bg}"/></a:solidFill><a:effectLst/></p:bgPr></p:bg>` : '';
307
+ put(`ppt/slides/slide${si + 1}.xml`, `${XML}<p:sld ${NS_A} ${NS_R} ${NS_P} ${NS_MC}><p:cSld>${bgXml}<p:spTree><p:nvGrpSpPr><p:cNvPr id="1" name=""/><p:cNvGrpSpPr/><p:nvPr/></p:nvGrpSpPr><p:grpSpPr/>${shapes.join('')}</p:spTree></p:cSld><p:clrMapOvr><a:masterClrMapping/></p:clrMapOvr>${pptxTransition(sec)}${built.length ? pptxTiming(built) : ''}</p:sld>`);
308
+ put(`ppt/slides/_rels/slide${si + 1}.xml.rels`, `${XML}<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">${rels.join('')}</Relationships>`);
309
+ slideXml.push(si + 1);
310
+ }
311
+ const types = { png: 'image/png', jpeg: 'image/jpeg', gif: 'image/gif', xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' };
312
+ put('[Content_Types].xml', `${XML}<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/><Default Extension="xml" ContentType="application/xml"/>${Object.entries(types).map(([e, t]) => `<Default Extension="${e}" ContentType="${t}"/>`).join('')}<Override PartName="/ppt/presentation.xml" ContentType="application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml"/><Override PartName="/ppt/slideMasters/slideMaster1.xml" ContentType="application/vnd.openxmlformats-officedocument.presentationml.slideMaster+xml"/><Override PartName="/ppt/slideLayouts/slideLayout1.xml" ContentType="application/vnd.openxmlformats-officedocument.presentationml.slideLayout+xml"/><Override PartName="/ppt/theme/theme1.xml" ContentType="application/vnd.openxmlformats-officedocument.theme+xml"/><Override PartName="/ppt/theme/theme2.xml" ContentType="application/vnd.openxmlformats-officedocument.theme+xml"/><Override PartName="/ppt/notesMasters/notesMaster1.xml" ContentType="application/vnd.openxmlformats-officedocument.presentationml.notesMaster+xml"/><Override PartName="/ppt/presProps.xml" ContentType="application/vnd.openxmlformats-officedocument.presentationml.presProps+xml"/><Override PartName="/ppt/viewProps.xml" ContentType="application/vnd.openxmlformats-officedocument.presentationml.viewProps+xml"/><Override PartName="/ppt/tableStyles.xml" ContentType="application/vnd.openxmlformats-officedocument.presentationml.tableStyles+xml"/><Override PartName="/docProps/core.xml" ContentType="application/vnd.openxmlformats-package.core-properties+xml"/><Override PartName="/docProps/app.xml" ContentType="application/vnd.openxmlformats-officedocument.extended-properties+xml"/>${slideXml.map(n => `<Override PartName="/ppt/slides/slide${n}.xml" ContentType="application/vnd.openxmlformats-officedocument.presentationml.slide+xml"/>`).join('')}${files.filter(([n]) => n.startsWith('ppt/notesSlides/notesSlide')).map(([n]) => `<Override PartName="/${n}" ContentType="application/vnd.openxmlformats-officedocument.presentationml.notesSlide+xml"/>`).join('')}${charts.map(c => `<Override PartName="/ppt/charts/${c}" ContentType="application/vnd.openxmlformats-officedocument.drawingml.chart+xml"/>`).join('')}</Types>`);
313
+ put('_rels/.rels', `${XML}<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="${REL}/officeDocument" Target="ppt/presentation.xml"/><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="docProps/core.xml"/><Relationship Id="rId3" Type="${REL}/extended-properties" Target="docProps/app.xml"/></Relationships>`);
314
+ const title = doc.title || 'Untitled deck', now = new Date().toISOString().replace(/\.\d+Z$/, 'Z');
315
+ put('docProps/core.xml', `${XML}<cp:coreProperties xmlns:cp="http://schemas.openxmlformats.org/package/2006/metadata/core-properties" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><dc:title>${xesc(title)}</dc:title><dcterms:created xsi:type="dcterms:W3CDTF">${now}</dcterms:created><dcterms:modified xsi:type="dcterms:W3CDTF">${now}</dcterms:modified></cp:coreProperties>`);
316
+ put('docProps/app.xml', `${XML}<Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties"><Application>Glideshow</Application><Slides>${slideXml.length}</Slides><Notes>${files.filter(([n]) => /notesSlide\d+\.xml$/.test(n)).length}</Notes></Properties>`);
317
+ put('ppt/presentation.xml', `${XML}<p:presentation ${NS_A} ${NS_R} ${NS_P} saveSubsetFonts="1"><p:sldMasterIdLst><p:sldMasterId id="2147483648" r:id="rId1"/></p:sldMasterIdLst><p:notesMasterIdLst><p:notesMasterId r:id="rId2"/></p:notesMasterIdLst><p:sldIdLst>${slideXml.map((n, i) => `<p:sldId id="${256 + i}" r:id="rId${10 + i}"/>`).join('')}</p:sldIdLst><p:sldSz cx="${emu(W)}" cy="${emu(H)}"/><p:notesSz cx="6858000" cy="9144000"/><p:defaultTextStyle><a:defPPr><a:defRPr lang="en-US"/></a:defPPr></p:defaultTextStyle></p:presentation>`);
318
+ put('ppt/_rels/presentation.xml.rels', `${XML}<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="${REL}/slideMaster" Target="slideMasters/slideMaster1.xml"/><Relationship Id="rId2" Type="${REL}/notesMaster" Target="notesMasters/notesMaster1.xml"/><Relationship Id="rId3" Type="${REL}/theme" Target="theme/theme1.xml"/><Relationship Id="rId4" Type="${REL}/presProps" Target="presProps.xml"/><Relationship Id="rId5" Type="${REL}/viewProps" Target="viewProps.xml"/><Relationship Id="rId6" Type="${REL}/tableStyles" Target="tableStyles.xml"/>${slideXml.map((n, i) => `<Relationship Id="rId${10 + i}" Type="${REL}/slide" Target="slides/slide${n}.xml"/>`).join('')}</Relationships>`);
319
+ put('ppt/presProps.xml', `${XML}<p:presentationPr ${NS_A} ${NS_R} ${NS_P}/>`);
320
+ put('ppt/viewProps.xml', `${XML}<p:viewPr ${NS_A} ${NS_R} ${NS_P}><p:normalViewPr><p:restoredLeft sz="15620"/><p:restoredTop sz="94660"/></p:normalViewPr><p:gridSpacing cx="76200" cy="76200"/></p:viewPr>`);
321
+ put('ppt/tableStyles.xml', `${XML}<a:tblStyleLst ${NS_A} def="{5C22544A-7EE6-4342-B048-85BDC9FD1C3A}"/>`);
322
+ const tree = '<p:spTree><p:nvGrpSpPr><p:cNvPr id="1" name=""/><p:cNvGrpSpPr/><p:nvPr/></p:nvGrpSpPr><p:grpSpPr><a:xfrm><a:off x="0" y="0"/><a:ext cx="0" cy="0"/><a:chOff x="0" y="0"/><a:chExt cx="0" cy="0"/></a:xfrm></p:grpSpPr></p:spTree>';
323
+ const clrMap = '<p:clrMap bg1="lt1" tx1="dk1" bg2="lt2" tx2="dk2" accent1="accent1" accent2="accent2" accent3="accent3" accent4="accent4" accent5="accent5" accent6="accent6" hlink="hlink" folHlink="folHlink"/>';
324
+ put('ppt/slideMasters/slideMaster1.xml', `${XML}<p:sldMaster ${NS_A} ${NS_R} ${NS_P}><p:cSld><p:bg><p:bgRef idx="1001"><a:schemeClr val="bg1"/></p:bgRef></p:bg>${tree}</p:cSld>${clrMap}<p:sldLayoutIdLst><p:sldLayoutId id="2147483649" r:id="rId1"/></p:sldLayoutIdLst><p:txStyles><p:titleStyle><a:lvl1pPr><a:defRPr sz="4400"/></a:lvl1pPr></p:titleStyle><p:bodyStyle><a:lvl1pPr><a:defRPr sz="2800"/></a:lvl1pPr></p:bodyStyle><p:otherStyle><a:lvl1pPr><a:defRPr sz="1800"/></a:lvl1pPr></p:otherStyle></p:txStyles></p:sldMaster>`);
325
+ put('ppt/slideMasters/_rels/slideMaster1.xml.rels', `${XML}<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="${REL}/slideLayout" Target="../slideLayouts/slideLayout1.xml"/><Relationship Id="rId2" Type="${REL}/theme" Target="../theme/theme1.xml"/></Relationships>`);
326
+ put('ppt/slideLayouts/slideLayout1.xml', `${XML}<p:sldLayout ${NS_A} ${NS_R} ${NS_P} type="blank" preserve="1"><p:cSld name="Blank">${tree}</p:cSld><p:clrMapOvr><a:masterClrMapping/></p:clrMapOvr></p:sldLayout>`);
327
+ put('ppt/slideLayouts/_rels/slideLayout1.xml.rels', `${XML}<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="${REL}/slideMaster" Target="../slideMasters/slideMaster1.xml"/></Relationships>`);
328
+ put('ppt/notesMasters/notesMaster1.xml', `${XML}<p:notesMaster ${NS_A} ${NS_R} ${NS_P}><p:cSld><p:bg><p:bgRef idx="1001"><a:schemeClr val="bg1"/></p:bgRef></p:bg>${tree}</p:cSld>${clrMap}</p:notesMaster>`);
329
+ put('ppt/notesMasters/_rels/notesMaster1.xml.rels', `${XML}<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="${REL}/theme" Target="../theme/theme2.xml"/></Relationships>`);
330
+ for (const n of [1, 2]) put(`ppt/theme/theme${n}.xml`, PPTX_THEME);
331
+ return zipStore([files.find(f => f[0] === '[Content_Types].xml'), ...files.filter(f => f[0] !== '[Content_Types].xml'), ...media]);
332
+ }
333
+
334
+ const PPTX_THEME = `${XML}<a:theme ${NS_A} name="Glideshow"><a:themeElements><a:clrScheme name="Glideshow"><a:dk1><a:srgbClr val="000000"/></a:dk1><a:lt1><a:srgbClr val="FFFFFF"/></a:lt1><a:dk2><a:srgbClr val="1F1F1F"/></a:dk2><a:lt2><a:srgbClr val="F1F3F4"/></a:lt2><a:accent1><a:srgbClr val="1A73E8"/></a:accent1><a:accent2><a:srgbClr val="EA4335"/></a:accent2><a:accent3><a:srgbClr val="FBBC04"/></a:accent3><a:accent4><a:srgbClr val="34A853"/></a:accent4><a:accent5><a:srgbClr val="FA7B17"/></a:accent5><a:accent6><a:srgbClr val="A142F4"/></a:accent6><a:hlink><a:srgbClr val="1A73E8"/></a:hlink><a:folHlink><a:srgbClr val="681DA8"/></a:folHlink></a:clrScheme><a:fontScheme name="Glideshow"><a:majorFont><a:latin typeface="Arial"/><a:ea typeface=""/><a:cs typeface=""/></a:majorFont><a:minorFont><a:latin typeface="Arial"/><a:ea typeface=""/><a:cs typeface=""/></a:minorFont></a:fontScheme><a:fmtScheme name="Glideshow"><a:fillStyleLst><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:solidFill><a:schemeClr val="phClr"/></a:solidFill></a:fillStyleLst><a:lnStyleLst><a:ln w="9525"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill></a:ln><a:ln w="25400"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill></a:ln><a:ln w="38100"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill></a:ln></a:lnStyleLst><a:effectStyleLst><a:effectStyle><a:effectLst/></a:effectStyle><a:effectStyle><a:effectLst/></a:effectStyle><a:effectStyle><a:effectLst/></a:effectStyle></a:effectStyleLst><a:bgFillStyleLst><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:solidFill><a:schemeClr val="phClr"/></a:solidFill></a:bgFillStyleLst></a:fmtScheme></a:themeElements><a:objectDefaults/><a:extraClrSchemeLst/></a:theme>`;
335
+
336
+ /* File → Download → PowerPoint in the browser. */
337
+ async function downloadPPTX() {
338
+ await saveSettled(); setStatus('Making the PowerPoint file…');
339
+ try {
340
+ const blob = await makePPTX(deckHTML());
341
+ const el = document.createElement('a'); el.href = URL.createObjectURL(new Blob([blob], { type: 'application/vnd.openxmlformats-officedocument.presentationml.presentation' }));
342
+ el.download = `${($('#ed-title').value.trim() || 'slides').replace(/[^\w -]+/g, '')}.pptx`; el.click();
343
+ setTimeout(() => URL.revokeObjectURL(el.href), 2000); setStatus('PowerPoint file downloaded');
344
+ } catch (e) { console.error(e); setStatus("Couldn't make the PowerPoint file: " + e.message, 'error'); }
345
+ }
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "glideshow"
3
- version = "0.4.0"
3
+ version = "0.4.2"
4
4
  description = "Slides and documents you own: Glideshow (Google Slides-style) and Glidewrites (Google Docs-style) editors over plain HTML folders that AI agents can edit"
5
5
  license = "AGPL-3.0-or-later"
6
6
  license-files = ["LICENSE"]