glideshow 0.3.0__tar.gz → 0.4.1__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.
- glideshow-0.4.1/.assetsignore +12 -0
- glideshow-0.4.1/.github/workflows/checks.yml +35 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/.github/workflows/tests.yml +39 -1
- {glideshow-0.3.0 → glideshow-0.4.1}/.gitignore +1 -0
- glideshow-0.4.1/CHANGELOG.md +24 -0
- glideshow-0.3.0/README.md → glideshow-0.4.1/PKG-INFO +38 -2
- glideshow-0.3.0/PKG-INFO → glideshow-0.4.1/README.md +24 -14
- glideshow-0.4.1/cloud/assets.js +20 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/cloud/auth.js +1 -1
- {glideshow-0.3.0 → glideshow-0.4.1}/cloud/clean.js +31 -3
- {glideshow-0.3.0 → glideshow-0.4.1}/cloud/library.js +23 -7
- {glideshow-0.3.0 → glideshow-0.4.1}/cloud/pages.js +7 -3
- {glideshow-0.3.0 → glideshow-0.4.1}/cloud/share.js +10 -5
- {glideshow-0.3.0 → glideshow-0.4.1}/cloud/store-drive.js +22 -7
- {glideshow-0.3.0 → glideshow-0.4.1}/cloud/store-github.js +3 -3
- {glideshow-0.3.0 → glideshow-0.4.1}/cloud/worker.js +90 -17
- {glideshow-0.3.0 → glideshow-0.4.1}/cloud/wrangler.toml +1 -1
- glideshow-0.4.1/cloud/writes.js +350 -0
- glideshow-0.4.1/docs/agents-writes.md +163 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/docs/self-hosting.md +3 -0
- glideshow-0.4.1/docs/state-machines.md +146 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/deck/present.js +99 -35
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/deck/shapes.js +2 -2
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/home.html +6 -6
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/index.html +1 -1
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/js/arrange.js +17 -4
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/js/boot.js +28 -11
- glideshow-0.4.1/editor/js/boxes.js +48 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/js/charts.js +22 -14
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/js/comments.js +11 -4
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/js/dialogs.js +8 -5
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/js/draw.js +5 -5
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/js/file.js +12 -12
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/js/find.js +4 -2
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/js/keyboard.js +40 -32
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/js/live.js +3 -3
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/js/motion.js +13 -5
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/js/objects.js +30 -22
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/js/phone-edit.js +7 -4
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/js/phone-sheets.js +27 -15
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/js/phone-touch.js +7 -4
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/js/phone-view.js +15 -4
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/js/pointer.js +60 -15
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/js/render.js +2 -2
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/js/slides.js +19 -7
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/js/state.js +20 -4
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/js/storage.js +164 -59
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/js/text.js +2 -1
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/js/toolbar.js +1 -1
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/lib/pending.js +1 -1
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/local/offline.js +3 -3
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/local/sw.js +7 -7
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/local/tsconfig.json +1 -1
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/share/share.js +7 -1
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/tsconfig.json +1 -1
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/vendor/README.md +1 -1
- glideshow-0.4.1/glidecore/__init__.py +2 -0
- {glideshow-0.3.0/glideshow → glideshow-0.4.1/glidecore}/merge.py +2 -2
- {glideshow-0.3.0/editor/lib → glideshow-0.4.1/glidecore/web}/browser-db.js +2 -2
- {glideshow-0.3.0/editor/lib → glideshow-0.4.1/glidecore/web}/library.js +86 -20
- {glideshow-0.3.0/editor/lib → glideshow-0.4.1/glidecore/web}/merge.js +2 -2
- {glideshow-0.3.0 → glideshow-0.4.1}/glideshow/decks.py +14 -3
- {glideshow-0.3.0 → glideshow-0.4.1}/glideshow/fonts.py +1 -1
- {glideshow-0.3.0 → glideshow-0.4.1}/glideshow/history.py +27 -15
- {glideshow-0.3.0 → glideshow-0.4.1}/glideshow/server.py +46 -12
- {glideshow-0.3.0 → glideshow-0.4.1}/glideshow/service.py +1 -1
- glideshow-0.4.1/glidewrites/__init__.py +1 -0
- glideshow-0.4.1/glidewrites/__main__.py +2 -0
- glideshow-0.4.1/glidewrites/agent.py +274 -0
- glideshow-0.4.1/glidewrites/claude_agent.py +174 -0
- glideshow-0.4.1/glidewrites/cli.py +100 -0
- glideshow-0.4.1/glidewrites/comment_cli.py +118 -0
- glideshow-0.4.1/glidewrites/comments.py +140 -0
- glideshow-0.4.1/glidewrites/convert.py +200 -0
- glideshow-0.4.1/glidewrites/docs.py +186 -0
- glideshow-0.4.1/glidewrites/docx_export.py +394 -0
- glideshow-0.4.1/glidewrites/docx_import.py +303 -0
- glideshow-0.4.1/glidewrites/gdocs.py +141 -0
- glideshow-0.4.1/glidewrites/history.py +131 -0
- glideshow-0.4.1/glidewrites/lan.py +92 -0
- glideshow-0.4.1/glidewrites/library.py +191 -0
- glideshow-0.4.1/glidewrites/markup.py +472 -0
- glideshow-0.4.1/glidewrites/pdf_export.py +30 -0
- glideshow-0.4.1/glidewrites/server.py +255 -0
- glideshow-0.4.1/glidewrites/service.py +70 -0
- glideshow-0.4.1/glidewrites/suggest.py +208 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/pyproject.toml +9 -4
- glideshow-0.4.1/skills/glidewrites/SKILL.md +60 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/test/cloud.py +5 -5
- glideshow-0.4.1/test/fake_gdocs.py +75 -0
- glideshow-0.4.1/test/fixtures/gdocs-export.html +1 -0
- glideshow-0.4.1/test/gw_browser.py +53 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/test/smoke.py +6 -6
- glideshow-0.4.1/test/state_glideshow_edit.py +251 -0
- glideshow-0.4.1/test/state_glideshow_present.py +163 -0
- glideshow-0.4.1/test/state_glideshow_present_phone.py +93 -0
- glideshow-0.4.1/test/state_glideshow_sync.py +283 -0
- glideshow-0.4.1/test/state_glideshow_sync_cloud.py +180 -0
- glideshow-0.4.1/test/writes.py +117 -0
- glideshow-0.4.1/test/writes_agent.py +232 -0
- glideshow-0.4.1/test/writes_chips.py +147 -0
- glideshow-0.4.1/test/writes_claude.py +217 -0
- glideshow-0.4.1/test/writes_cloud.py +191 -0
- glideshow-0.4.1/test/writes_comments.py +250 -0
- glideshow-0.4.1/test/writes_drawings.py +177 -0
- glideshow-0.4.1/test/writes_e2e.py +332 -0
- glideshow-0.4.1/test/writes_emoji.py +138 -0
- glideshow-0.4.1/test/writes_engines.py +142 -0
- glideshow-0.4.1/test/writes_find.py +111 -0
- glideshow-0.4.1/test/writes_gdocs.py +116 -0
- glideshow-0.4.1/test/writes_gifs.py +155 -0
- glideshow-0.4.1/test/writes_history_more.py +169 -0
- glideshow-0.4.1/test/writes_house.py +84 -0
- glideshow-0.4.1/test/writes_insert.py +162 -0
- glideshow-0.4.1/test/writes_keys.py +251 -0
- glideshow-0.4.1/test/writes_lan.py +67 -0
- glideshow-0.4.1/test/writes_matrix.py +27 -0
- glideshow-0.4.1/test/writes_pages.py +498 -0
- glideshow-0.4.1/test/writes_paragraph.py +221 -0
- glideshow-0.4.1/test/writes_perf.py +119 -0
- glideshow-0.4.1/test/writes_phone.py +132 -0
- glideshow-0.4.1/test/writes_prefs.py +109 -0
- glideshow-0.4.1/test/writes_state.py +172 -0
- glideshow-0.4.1/test/writes_state_comments.py +170 -0
- glideshow-0.4.1/test/writes_state_comments_share.py +84 -0
- glideshow-0.4.1/test/writes_state_objects.py +274 -0
- glideshow-0.4.1/test/writes_state_server.py +202 -0
- glideshow-0.4.1/test/writes_suggest.py +248 -0
- glideshow-0.4.1/test/writes_tables.py +410 -0
- glideshow-0.4.1/test/writes_tabs.py +159 -0
- glideshow-0.4.1/test/writes_vim.py +122 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/tools/check.sh +2 -1
- glideshow-0.4.1/tools/make-writes-app.sh +74 -0
- glideshow-0.4.1/tools/split-core.py +160 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/uv.lock +352 -333
- glideshow-0.4.1/writer/CORE-SPLIT.md +171 -0
- glideshow-0.4.1/writer/PLAN.md +547 -0
- glideshow-0.4.1/writer/RELEASE.md +109 -0
- glideshow-0.4.1/writer/a11y.css +63 -0
- glideshow-0.4.1/writer/apps.js +43 -0
- glideshow-0.4.1/writer/chips.css +24 -0
- glideshow-0.4.1/writer/cloud.css +41 -0
- glideshow-0.4.1/writer/comments.css +86 -0
- glideshow-0.4.1/writer/doc/doc.css +105 -0
- glideshow-0.4.1/writer/emoji-watermark.css +46 -0
- glideshow-0.4.1/writer/emoji.json +1 -0
- glideshow-0.4.1/writer/find.css +27 -0
- glideshow-0.4.1/writer/glidewrites-1024.png +0 -0
- glideshow-0.4.1/writer/glidewrites.svg +10 -0
- glideshow-0.4.1/writer/history.css +60 -0
- glideshow-0.4.1/writer/home.css +118 -0
- glideshow-0.4.1/writer/home.html +65 -0
- glideshow-0.4.1/writer/home.js +326 -0
- glideshow-0.4.1/writer/index.html +173 -0
- glideshow-0.4.1/writer/inserts.css +37 -0
- glideshow-0.4.1/writer/js/a11y.js +349 -0
- glideshow-0.4.1/writer/js/boot.js +118 -0
- glideshow-0.4.1/writer/js/chars.js +14 -0
- glideshow-0.4.1/writer/js/charts.js +121 -0
- glideshow-0.4.1/writer/js/chips.js +264 -0
- glideshow-0.4.1/writer/js/cloud.js +145 -0
- glideshow-0.4.1/writer/js/columns.js +114 -0
- glideshow-0.4.1/writer/js/comments.js +508 -0
- glideshow-0.4.1/writer/js/compat.js +15 -0
- glideshow-0.4.1/writer/js/context.js +78 -0
- glideshow-0.4.1/writer/js/doc.js +307 -0
- glideshow-0.4.1/writer/js/drawing.js +292 -0
- glideshow-0.4.1/writer/js/emoji.js +73 -0
- glideshow-0.4.1/writer/js/find.js +171 -0
- glideshow-0.4.1/writer/js/fnpages.js +147 -0
- glideshow-0.4.1/writer/js/format.js +310 -0
- glideshow-0.4.1/writer/js/glideshow.js +141 -0
- glideshow-0.4.1/writer/js/headers.js +434 -0
- glideshow-0.4.1/writer/js/history.js +333 -0
- glideshow-0.4.1/writer/js/images.js +454 -0
- glideshow-0.4.1/writer/js/inserts.js +246 -0
- glideshow-0.4.1/writer/js/io.js +33 -0
- glideshow-0.4.1/writer/js/keys.js +9 -0
- glideshow-0.4.1/writer/js/linenumbers.js +76 -0
- glideshow-0.4.1/writer/js/lists.js +147 -0
- glideshow-0.4.1/writer/js/menus.js +365 -0
- glideshow-0.4.1/writer/js/outline.js +29 -0
- glideshow-0.4.1/writer/js/overflow.js +48 -0
- glideshow-0.4.1/writer/js/pages.js +142 -0
- glideshow-0.4.1/writer/js/pagesetup.js +192 -0
- glideshow-0.4.1/writer/js/paragraph.js +228 -0
- glideshow-0.4.1/writer/js/phone-edit.js +120 -0
- glideshow-0.4.1/writer/js/prefs.js +167 -0
- glideshow-0.4.1/writer/js/ruler.js +136 -0
- glideshow-0.4.1/writer/js/sections.js +49 -0
- glideshow-0.4.1/writer/js/share.js +89 -0
- glideshow-0.4.1/writer/js/sidepanel.js +85 -0
- glideshow-0.4.1/writer/js/state.js +63 -0
- glideshow-0.4.1/writer/js/suggest.js +490 -0
- glideshow-0.4.1/writer/js/tables.js +711 -0
- glideshow-0.4.1/writer/js/tabs.js +270 -0
- glideshow-0.4.1/writer/js/undo.js +69 -0
- glideshow-0.4.1/writer/js/view.js +187 -0
- glideshow-0.4.1/writer/js/vim.js +849 -0
- glideshow-0.4.1/writer/js/watermark.js +139 -0
- glideshow-0.4.1/writer/js/webimages.js +130 -0
- glideshow-0.4.1/writer/lib/merge.js +75 -0
- glideshow-0.4.1/writer/looks/glide.css +263 -0
- glideshow-0.4.1/writer/looks/look.js +58 -0
- glideshow-0.4.1/writer/looks/updraft.css +66 -0
- glideshow-0.4.1/writer/looks/vellum.css +49 -0
- glideshow-0.4.1/writer/looks/wave.css +53 -0
- glideshow-0.4.1/writer/objects.css +177 -0
- glideshow-0.4.1/writer/pages.css +137 -0
- glideshow-0.4.1/writer/paragraph.css +49 -0
- glideshow-0.4.1/writer/phone-home.js +22 -0
- glideshow-0.4.1/writer/phone.css +89 -0
- glideshow-0.4.1/writer/phone.js +22 -0
- glideshow-0.4.1/writer/prefs.css +15 -0
- glideshow-0.4.1/writer/share-view.css +30 -0
- glideshow-0.4.1/writer/share-view.js +103 -0
- glideshow-0.4.1/writer/suggest.css +55 -0
- glideshow-0.4.1/writer/tabs.css +18 -0
- glideshow-0.4.1/writer/templates/letter.html +18 -0
- glideshow-0.4.1/writer/templates/notes.html +11 -0
- glideshow-0.4.1/writer/templates/proposal.html +14 -0
- glideshow-0.4.1/writer/templates/resume.html +18 -0
- glideshow-0.4.1/writer/tsconfig.json +6 -0
- glideshow-0.4.1/writer/writer.css +216 -0
- glideshow-0.3.0/.github/workflows/checks.yml +0 -16
- glideshow-0.3.0/editor/js/boxes.js +0 -25
- {glideshow-0.3.0 → glideshow-0.4.1}/.github/workflows/release.yml +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/.github/workflows/staging.yml +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/LICENSE +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/bin/glideshow +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/cloud/env.d.ts +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/cloud/github-app.py +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/cloud/setup.sh +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/cloud/tsconfig.json +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/docs/agents.md +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/docs/deck-format.md +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/docs/shortcuts.md +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/.assetsignore +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/apple-touch-icon.png +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/data/font-metrics.json +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/data/fonts.json +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/data/icons.json +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/data/symbols.js +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/data/themes.js +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/deck/base.css +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/deck/template.html +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/editor.css +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/glideshow-1024.png +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/glideshow.svg +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/globals.d.ts +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/js/context-menus.js +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/js/dock.js +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/js/format-panel.js +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/js/geometry.js +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/js/guides.js +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/js/insert.js +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/js/menubar.js +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/js/menus.js +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/js/notes.js +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/js/offline.js +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/js/people.js +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/js/phone-comments.js +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/js/phone-home.js +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/js/phone-mode.js +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/js/shortcuts.js +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/js/spacing.js +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/js/theme-toggle.js +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/js/theme.js +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/js/toolbar-groups.js +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/lib/polygon-clipping.min.js +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/looks/glider.svg +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/looks/thermal-phone.css +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/looks/thermal.css +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/manifest.json +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/phone.css +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/share/share.css +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/share/speaker.html +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/share/still.js +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/vendor/fonts/HankenGrotesk-00.woff2 +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/vendor/fonts/HankenGrotesk-01.woff2 +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/vendor/fonts/HankenGrotesk-02.woff2 +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/vendor/fonts/HankenGrotesk-03.woff2 +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/vendor/fonts/HankenGrotesk-OFL.txt +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/vendor/fonts/IBMPlexMono-00.woff2 +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/vendor/fonts/IBMPlexMono-01.woff2 +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/vendor/fonts/IBMPlexMono-02.woff2 +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/vendor/fonts/IBMPlexMono-03.woff2 +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/vendor/fonts/IBMPlexMono-04.woff2 +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/vendor/fonts/IBMPlexMono-05.woff2 +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/vendor/fonts/IBMPlexMono-06.woff2 +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/vendor/fonts/IBMPlexMono-07.woff2 +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/vendor/fonts/IBMPlexMono-08.woff2 +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/vendor/fonts/IBMPlexMono-09.woff2 +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/vendor/fonts/IBMPlexMono-OFL.txt +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/vendor/fonts/MaterialSymbolsOutlined-00.woff2 +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/vendor/fonts/MaterialSymbolsOutlined-LICENSE.txt +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/vendor/fonts/Roboto-00.woff2 +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/vendor/fonts/Roboto-01.woff2 +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/vendor/fonts/Roboto-02.woff2 +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/vendor/fonts/Roboto-03.woff2 +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/vendor/fonts/Roboto-04.woff2 +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/vendor/fonts/Roboto-05.woff2 +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/vendor/fonts/Roboto-06.woff2 +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/vendor/fonts/Roboto-07.woff2 +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/vendor/fonts/Roboto-08.woff2 +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/vendor/fonts/Roboto-OFL.txt +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/vendor/fonts/fonts.css +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/vendor/katex-0.16.11/LICENSE +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/vendor/katex-0.16.11/dist/contrib/auto-render.min.js +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/vendor/katex-0.16.11/dist/fonts/KaTeX_AMS-Regular.woff2 +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/vendor/katex-0.16.11/dist/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/vendor/katex-0.16.11/dist/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/vendor/katex-0.16.11/dist/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/vendor/katex-0.16.11/dist/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/vendor/katex-0.16.11/dist/fonts/KaTeX_Main-Bold.woff2 +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/vendor/katex-0.16.11/dist/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/vendor/katex-0.16.11/dist/fonts/KaTeX_Main-Italic.woff2 +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/vendor/katex-0.16.11/dist/fonts/KaTeX_Main-Regular.woff2 +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/vendor/katex-0.16.11/dist/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/vendor/katex-0.16.11/dist/fonts/KaTeX_Math-Italic.woff2 +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/vendor/katex-0.16.11/dist/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/vendor/katex-0.16.11/dist/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/vendor/katex-0.16.11/dist/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/vendor/katex-0.16.11/dist/fonts/KaTeX_Script-Regular.woff2 +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/vendor/katex-0.16.11/dist/fonts/KaTeX_Size1-Regular.woff2 +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/vendor/katex-0.16.11/dist/fonts/KaTeX_Size2-Regular.woff2 +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/vendor/katex-0.16.11/dist/fonts/KaTeX_Size3-Regular.woff2 +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/vendor/katex-0.16.11/dist/fonts/KaTeX_Size4-Regular.woff2 +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/vendor/katex-0.16.11/dist/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/vendor/katex-0.16.11/dist/katex.min.css +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/vendor/katex-0.16.11/dist/katex.min.js +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/vendor/reveal.js-5.1.0/LICENSE +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/vendor/reveal.js-5.1.0/dist/reveal.css +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/vendor/reveal.js-5.1.0/dist/reveal.js +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/vendor/reveal.js-5.1.0/plugin/highlight/highlight.js +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/editor/vendor/reveal.js-5.1.0/plugin/notes/notes.js +0 -0
- {glideshow-0.3.0/glideshow → glideshow-0.4.1/glidecore}/osutil.py +0 -0
- {glideshow-0.3.0/editor/lib → glideshow-0.4.1/glidecore/web}/move-local.js +0 -0
- {glideshow-0.3.0/editor/lib → glideshow-0.4.1/glidecore/web}/onefile.js +0 -0
- {glideshow-0.3.0/editor/lib → glideshow-0.4.1/glidecore/web}/store-browser.js +0 -0
- {glideshow-0.3.0/editor/lib → glideshow-0.4.1/glidecore/web}/store-folder.js +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/glideshow/__init__.py +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/glideshow/__main__.py +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/glideshow/agent.py +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/glideshow/build.py +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/glideshow/cli.py +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/glideshow/comments.py +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/glideshow/figure.py +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/glideshow/gslides.py +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/glideshow/movie.py +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/glideshow/pptx_export.py +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/glideshow/pptx_import.py +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/glideshow/publish.py +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/glideshow/render.py +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/skills/glideshow/SKILL.md +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/test/agent.py +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/test/caching.py +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/test/coedit.py +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/test/fake_drive.py +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/test/fixtures/agent-deck.html +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/test/fixtures/gslides-api.json +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/test/fixtures/stack-deck.html +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/test/keys.py +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/test/media.py +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/test/offline.py +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/test/offline_save.py +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/test/offline_sw.py +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/test/perf.py +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/test/share.py +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/test/snap.py +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/tools/font_metrics.py +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/tools/gslides2deck.py +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/tools/make-app.sh +0 -0
- {glideshow-0.3.0 → glideshow-0.4.1}/tools/vendor.py +0 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# glideshow.org's static files (cloud/wrangler.toml [assets], the repo root): only the two browser apps, editor/ and writer/,
|
|
2
|
+
# and what they share, glidecore/web/ (served at /core/).
|
|
3
|
+
# Everything else in the repo (code, tests, docs, secrets like cloud/.dev.vars) stays out.
|
|
4
|
+
/*
|
|
5
|
+
!/editor/
|
|
6
|
+
!/writer/
|
|
7
|
+
!/glidecore/
|
|
8
|
+
/glidecore/*
|
|
9
|
+
!/glidecore/web/
|
|
10
|
+
/editor/**/.DS_Store
|
|
11
|
+
/writer/**/.DS_Store
|
|
12
|
+
/writer/PLAN.md
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Every push: the type and lint checks (about a minute; no build step, they read the plain JS and Python).
|
|
2
|
+
# Locally: tools/check.sh. The browser tests are tests.yml.
|
|
3
|
+
name: checks
|
|
4
|
+
on: [push, pull_request]
|
|
5
|
+
permissions:
|
|
6
|
+
contents: read
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
lint:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v4
|
|
13
|
+
- uses: astral-sh/setup-uv@v5
|
|
14
|
+
- uses: actions/setup-node@v4
|
|
15
|
+
with: { node-version: 22 }
|
|
16
|
+
- run: tools/check.sh
|
|
17
|
+
|
|
18
|
+
glidewrites-cli: # Glidewrites without a browser: a library, the agent commands, Markdown, Word and back (a minute)
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
steps:
|
|
21
|
+
- uses: actions/checkout@v4
|
|
22
|
+
- uses: astral-sh/setup-uv@v5
|
|
23
|
+
- run: git config --global user.name ci && git config --global user.email ci@example.org
|
|
24
|
+
- name: new, put, blocks, find, export, import
|
|
25
|
+
env: { GLIDEWRITES_HOME: /tmp/writes, GLIDEWRITES_PORT: "47990" }
|
|
26
|
+
run: |
|
|
27
|
+
set -e
|
|
28
|
+
d=$(uv run glidewrites new "CI check" --no-open --template proposal)
|
|
29
|
+
printf '<h2>From CI</h2>\n<ul class="checklist"><li data-checked="">built</li><li>tested</li></ul>\n' | uv run glidewrites put "$d" --after end
|
|
30
|
+
uv run glidewrites blocks "$d" --outline | grep -q "From CI"
|
|
31
|
+
test "$(uv run glidewrites find ci check)" = "$d"
|
|
32
|
+
uv run glidewrites export "$d" --to md -o /tmp/ci.md && grep -q -- "- \[x\] built" /tmp/ci.md
|
|
33
|
+
uv run glidewrites export "$d" --to docx -o /tmp/ci.docx
|
|
34
|
+
back=$(uv run glidewrites import /tmp/ci.docx) && grep -q 'class="checklist"' "$back/doc.html"
|
|
35
|
+
uv run glidewrites import /tmp/ci.md > /dev/null
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# The end-to-end tests in headless Chrome (about 30 minutes on macOS), by hand only (Actions → tests → Run workflow, or
|
|
1
|
+
# The end-to-end tests in headless Chrome (about 30 minutes on macOS; Glidewrites' another 30), by hand only (Actions → tests → Run workflow, or
|
|
2
2
|
# `gh workflow run tests.yml`): the repo is private, where a macOS minute costs ten of the free ones. They gate nothing.
|
|
3
3
|
# Before tagging a release, run `uv run test/smoke.py` locally.
|
|
4
4
|
name: tests
|
|
@@ -25,6 +25,44 @@ jobs:
|
|
|
25
25
|
uses: actions/upload-artifact@v4
|
|
26
26
|
with: { name: screenshots, path: "test/*.png", if-no-files-found: ignore }
|
|
27
27
|
|
|
28
|
+
writes: # Glidewrites in headless Chrome (the main suites), then the base and phone suites in WebKit (Safari's engine)
|
|
29
|
+
runs-on: macos-latest
|
|
30
|
+
timeout-minutes: 60
|
|
31
|
+
env: { GW_TEST_PORT: "47924" }
|
|
32
|
+
steps:
|
|
33
|
+
- uses: actions/checkout@v4
|
|
34
|
+
- uses: astral-sh/setup-uv@v5
|
|
35
|
+
- run: git config --global user.name ci && git config --global user.email ci@example.org # (the library is a git repo)
|
|
36
|
+
- run: uv run --with playwright python -m playwright install webkit
|
|
37
|
+
- run: uv run test/writes.py
|
|
38
|
+
- if: ${{ !cancelled() }} # (each suite runs even when one before it failed)
|
|
39
|
+
run: uv run test/writes_agent.py
|
|
40
|
+
- if: ${{ !cancelled() }}
|
|
41
|
+
run: uv run test/writes_e2e.py
|
|
42
|
+
- if: ${{ !cancelled() }}
|
|
43
|
+
run: uv run test/writes_pages.py
|
|
44
|
+
- if: ${{ !cancelled() }}
|
|
45
|
+
run: uv run test/writes_tables.py
|
|
46
|
+
- if: ${{ !cancelled() }}
|
|
47
|
+
run: uv run test/writes_comments.py
|
|
48
|
+
- if: ${{ !cancelled() }}
|
|
49
|
+
run: uv run test/writes_suggest.py
|
|
50
|
+
- if: ${{ !cancelled() }}
|
|
51
|
+
run: uv run test/writes_chips.py
|
|
52
|
+
- if: ${{ !cancelled() }}
|
|
53
|
+
run: uv run test/writes_prefs.py
|
|
54
|
+
- if: ${{ !cancelled() }}
|
|
55
|
+
run: uv run test/writes_gdocs.py # against test/fake_gdocs.py only, never Google
|
|
56
|
+
- if: ${{ !cancelled() }}
|
|
57
|
+
run: uv run test/writes_phone.py
|
|
58
|
+
- if: ${{ !cancelled() }}
|
|
59
|
+
run: GW_BROWSER=webkit uv run test/writes.py
|
|
60
|
+
- if: ${{ !cancelled() }}
|
|
61
|
+
run: GW_BROWSER=webkit uv run test/writes_phone.py
|
|
62
|
+
- if: failure()
|
|
63
|
+
uses: actions/upload-artifact@v4
|
|
64
|
+
with: { name: writes-screenshots, path: "test/shots/*.png", if-no-files-found: ignore }
|
|
65
|
+
|
|
28
66
|
cloud: # glideshow.org (cloud/) on a local Worker: browser mode, a Google account's library in a stand-in Drive, sharing
|
|
29
67
|
runs-on: macos-latest # (the sandbox, passes, comments), reports and takedowns. No real accounts: the secrets are made up.
|
|
30
68
|
timeout-minutes: 20
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## Unreleased
|
|
4
|
+
|
|
5
|
+
### Glidewrites (new): documents you own
|
|
6
|
+
|
|
7
|
+
Glideshow's sister app, in the same package: `uv tool install glideshow` now also gives the `glidewrites` command. A
|
|
8
|
+
Google Docs–style editor whose documents are plain HTML folders (`doc.html` + `assets/`, in `~/writes`), versioned in
|
|
9
|
+
git, that agents edit alongside you.
|
|
10
|
+
|
|
11
|
+
- **Editor**: Docs' chrome and shortcuts; pages with headers, footers, page numbers, columns, footnotes and a table
|
|
12
|
+
of contents (pageless in browsers without CSS `column-wrap`: Safari, Firefox, Chrome before 145); styles, fonts, lists,
|
|
13
|
+
checklists, tables, images, drawings, charts, equations, special characters, emoji, watermarks, smart chips and the
|
|
14
|
+
@-menu; comments, Suggesting mode, version history, find and replace; Tools › Preferences (autocorrect, smart quotes,
|
|
15
|
+
link and list detection, substitutions).
|
|
16
|
+
- **Agents**: `glidewrites blocks / put / find / rename / docs`; every block has a `data-bid`, so an agent's edit and
|
|
17
|
+
your typing merge block by block while the editor is open; an `AGENTS.md` in each document; a Claude Code skill in
|
|
18
|
+
`skills/glidewrites`.
|
|
19
|
+
- **Import and export**: Word (.docx) both ways, Markdown both ways, HTML in (Google Docs' export too) and out, PDF out;
|
|
20
|
+
Google Docs in and out through the Drive API (Glideshow's OAuth client).
|
|
21
|
+
- **Home screen**: templates, folders, list and grid, sort, rename / move / remove (to `.trash/`, with Undo), upload.
|
|
22
|
+
- **Phone**: the Google Docs iPhone app's layout (read, then edit with a formatting bar and sheets).
|
|
23
|
+
- **Install**: `glidewrites install` (the server at login), `tools/make-writes-app.sh` (a macOS Dock app).
|
|
24
|
+
- **Tests**: `test/writes*.py`, each in Chrome, WebKit or Firefox (`GW_BROWSER`), `test/writes_matrix.py` for all three.
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: glideshow
|
|
3
|
+
Version: 0.4.1
|
|
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
|
+
Project-URL: Homepage, https://glideshow.org
|
|
6
|
+
License-Expression: AGPL-3.0-or-later
|
|
7
|
+
License-File: LICENSE
|
|
8
|
+
Requires-Python: >=3.10
|
|
9
|
+
Provides-Extra: docx
|
|
10
|
+
Requires-Dist: python-docx>=1.1; extra == 'docx'
|
|
11
|
+
Provides-Extra: pptx
|
|
12
|
+
Requires-Dist: python-pptx>=0.6.23; extra == 'pptx'
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
|
|
1
15
|
<img src="editor/glideshow.svg" width="72" alt="">
|
|
2
16
|
|
|
3
17
|
# Glideshow <sup>alpha</sup>
|
|
@@ -14,7 +28,7 @@ presents in any browser. Every save is a version in git.
|
|
|
14
28
|
Needs Python 3.10+ and Chrome; macOS, Linux and Windows.
|
|
15
29
|
|
|
16
30
|
```console
|
|
17
|
-
$ uv tool install glideshow
|
|
31
|
+
$ uv tool install glideshow # both apps: the glideshow and glidewrites commands
|
|
18
32
|
$ glideshow # the home screen: your decks (in ~/decks)
|
|
19
33
|
$ glideshow new "Lab meeting" # a new deck, opened in the editor
|
|
20
34
|
$ glideshow build lab-meeting out/ # a copy that presents offline
|
|
@@ -30,10 +44,32 @@ Or use it online, with nothing to install, at [glideshow.org](https://glideshow.
|
|
|
30
44
|
- [Keyboard shortcuts](docs/shortcuts.md)
|
|
31
45
|
- [Running it online](docs/self-hosting.md): your own glideshow.org on Cloudflare.
|
|
32
46
|
|
|
47
|
+
## Glidewrites
|
|
48
|
+
|
|
49
|
+
<img src="writer/glidewrites.svg" width="48" alt="">
|
|
50
|
+
|
|
51
|
+
Glideshow's sister app: documents you own, in a Google Docs–style editor. A document is `doc.html` (blocks of plain HTML)
|
|
52
|
+
plus `assets/`, kept in `~/writes`; agents edit the same file while you type, and the editor merges both. It opens Word,
|
|
53
|
+
Markdown and HTML files and saves Word, Markdown, HTML and PDF. On a phone it looks like the Docs app.
|
|
54
|
+
|
|
55
|
+
Installed with Glideshow (one package, two commands):
|
|
56
|
+
|
|
57
|
+
```console
|
|
58
|
+
$ glidewrites # the home screen: your documents (in ~/writes)
|
|
59
|
+
$ glidewrites new "Trip plan" # a new document, opened in the editor
|
|
60
|
+
$ glidewrites import notes.docx # a Word, Markdown or HTML file as a document
|
|
61
|
+
$ glidewrites install # start its server at login (macOS, Linux, Windows)
|
|
62
|
+
$ bash tools/make-writes-app.sh # macOS: Glidewrites.app for the Dock
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
- [For agents](docs/agents-writes.md): the commands (`blocks`, `put`, `find`, `export`), the format and recipes; every
|
|
66
|
+
document gets a copy as `AGENTS.md`. The Claude Code skill is in `skills/glidewrites`.
|
|
67
|
+
|
|
33
68
|
## Contributing
|
|
34
69
|
|
|
35
70
|
Issues and pull requests are welcome. Before sending one, run `tools/check.sh` (types and lint) and `uv run test/smoke.py`
|
|
36
|
-
(the editor end to end, in Chrome).
|
|
71
|
+
(the editor end to end, in Chrome); for Glidewrites, `uv run test/writes_matrix.py` (every `test/writes*.py` suite in
|
|
72
|
+
Chrome, WebKit and Firefox; `GW_BROWSER=webkit uv run test/writes.py` for one).
|
|
37
73
|
|
|
38
74
|
## Releasing
|
|
39
75
|
|
|
@@ -1,15 +1,3 @@
|
|
|
1
|
-
Metadata-Version: 2.5
|
|
2
|
-
Name: glideshow
|
|
3
|
-
Version: 0.3.0
|
|
4
|
-
Summary: Slides you own: a Google Slides-style editor whose decks are plain HTML folders that AI agents can edit
|
|
5
|
-
Project-URL: Homepage, https://glideshow.org
|
|
6
|
-
License-Expression: AGPL-3.0-or-later
|
|
7
|
-
License-File: LICENSE
|
|
8
|
-
Requires-Python: >=3.10
|
|
9
|
-
Provides-Extra: pptx
|
|
10
|
-
Requires-Dist: python-pptx>=0.6.23; extra == 'pptx'
|
|
11
|
-
Description-Content-Type: text/markdown
|
|
12
|
-
|
|
13
1
|
<img src="editor/glideshow.svg" width="72" alt="">
|
|
14
2
|
|
|
15
3
|
# Glideshow <sup>alpha</sup>
|
|
@@ -26,7 +14,7 @@ presents in any browser. Every save is a version in git.
|
|
|
26
14
|
Needs Python 3.10+ and Chrome; macOS, Linux and Windows.
|
|
27
15
|
|
|
28
16
|
```console
|
|
29
|
-
$ uv tool install glideshow
|
|
17
|
+
$ uv tool install glideshow # both apps: the glideshow and glidewrites commands
|
|
30
18
|
$ glideshow # the home screen: your decks (in ~/decks)
|
|
31
19
|
$ glideshow new "Lab meeting" # a new deck, opened in the editor
|
|
32
20
|
$ glideshow build lab-meeting out/ # a copy that presents offline
|
|
@@ -42,10 +30,32 @@ Or use it online, with nothing to install, at [glideshow.org](https://glideshow.
|
|
|
42
30
|
- [Keyboard shortcuts](docs/shortcuts.md)
|
|
43
31
|
- [Running it online](docs/self-hosting.md): your own glideshow.org on Cloudflare.
|
|
44
32
|
|
|
33
|
+
## Glidewrites
|
|
34
|
+
|
|
35
|
+
<img src="writer/glidewrites.svg" width="48" alt="">
|
|
36
|
+
|
|
37
|
+
Glideshow's sister app: documents you own, in a Google Docs–style editor. A document is `doc.html` (blocks of plain HTML)
|
|
38
|
+
plus `assets/`, kept in `~/writes`; agents edit the same file while you type, and the editor merges both. It opens Word,
|
|
39
|
+
Markdown and HTML files and saves Word, Markdown, HTML and PDF. On a phone it looks like the Docs app.
|
|
40
|
+
|
|
41
|
+
Installed with Glideshow (one package, two commands):
|
|
42
|
+
|
|
43
|
+
```console
|
|
44
|
+
$ glidewrites # the home screen: your documents (in ~/writes)
|
|
45
|
+
$ glidewrites new "Trip plan" # a new document, opened in the editor
|
|
46
|
+
$ glidewrites import notes.docx # a Word, Markdown or HTML file as a document
|
|
47
|
+
$ glidewrites install # start its server at login (macOS, Linux, Windows)
|
|
48
|
+
$ bash tools/make-writes-app.sh # macOS: Glidewrites.app for the Dock
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
- [For agents](docs/agents-writes.md): the commands (`blocks`, `put`, `find`, `export`), the format and recipes; every
|
|
52
|
+
document gets a copy as `AGENTS.md`. The Claude Code skill is in `skills/glidewrites`.
|
|
53
|
+
|
|
45
54
|
## Contributing
|
|
46
55
|
|
|
47
56
|
Issues and pull requests are welcome. Before sending one, run `tools/check.sh` (types and lint) and `uv run test/smoke.py`
|
|
48
|
-
(the editor end to end, in Chrome).
|
|
57
|
+
(the editor end to end, in Chrome); for Glidewrites, `uv run test/writes_matrix.py` (every `test/writes*.py` suite in
|
|
58
|
+
Chrome, WebKit and Firefox; `GW_BROWSER=webkit uv run test/writes.py` for one).
|
|
49
59
|
|
|
50
60
|
## Releasing
|
|
51
61
|
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/* glideshow.org's static files are the repo's two browser apps (wrangler.toml [assets] is the repo root, .assetsignore
|
|
2
|
+
keeps only editor/ and writer/). Glideshow's code asks for its files as if editor/ were the root ('/index.html',
|
|
3
|
+
'https://assets.local/deck/base.css'), so the binding it gets puts '/editor' in front; Glidewrites' files are asked
|
|
4
|
+
for under '/writer/' on the raw binding (writerAsset). */
|
|
5
|
+
|
|
6
|
+
/** env with ASSETS rooted at editor/ (what Glideshow's Worker and library expect), the raw binding kept as ALL_ASSETS. */
|
|
7
|
+
export function editorEnv(env) {
|
|
8
|
+
if (!env?.ASSETS || env.ALL_ASSETS) return env;
|
|
9
|
+
const raw = env.ASSETS;
|
|
10
|
+
const ASSETS = { fetch: (req, init) => {
|
|
11
|
+
const r = req instanceof Request ? req : new Request(req, init), u = new URL(r.url);
|
|
12
|
+
u.pathname = '/editor' + u.pathname;
|
|
13
|
+
return raw.fetch(new Request(u, r));
|
|
14
|
+
} };
|
|
15
|
+
return new Proxy(env, { get: (t, k) => k === 'ASSETS' ? ASSETS : k === 'ALL_ASSETS' ? raw : t[k] });
|
|
16
|
+
}
|
|
17
|
+
/** One of Glidewrites' files (path: '/writer/…'). */
|
|
18
|
+
export function writerAsset(env, path, origin = 'https://assets.local') {
|
|
19
|
+
return (env.ALL_ASSETS || env.ASSETS).fetch(new Request(new URL(path, origin)));
|
|
20
|
+
}
|
|
@@ -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="
|
|
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
|
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
const TAGS = new Set(['section', 'div', 'span', 'p', 'br', 'b', 'strong', 'i', 'em', 'u', 's', 'strike', 'del', 'ins', 'sub', 'sup',
|
|
21
21
|
'small', 'mark', 'a', 'ul', 'ol', 'li', 'table', 'thead', 'tbody', 'tfoot', 'tr', 'td', 'th', 'col', 'colgroup', 'caption',
|
|
22
22
|
'pre', 'code', 'blockquote', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'img', 'video', 'source', 'aside', 'figure',
|
|
23
|
-
'figcaption', 'font',
|
|
23
|
+
'figcaption', 'font', 'time',
|
|
24
24
|
// SVG drawn by the editor (shapes, connectors, icons): drawing only
|
|
25
25
|
'svg', 'g', 'path', 'rect', 'circle', 'ellipse', 'line', 'polyline', 'polygon', 'text', 'tspan', 'defs',
|
|
26
26
|
'lineargradient', 'radialgradient', 'stop', 'clippath', 'marker']);
|
|
@@ -34,7 +34,7 @@ const PER_TAG = {
|
|
|
34
34
|
a: ['href', 'target', 'rel'], img: ['src', 'alt', 'width', 'height', 'loading', 'decoding'],
|
|
35
35
|
video: ['src', 'poster', 'controls', 'playsinline', 'muted', 'loop', 'autoplay', 'preload', 'width', 'height'], source: ['src', 'type'],
|
|
36
36
|
td: ['colspan', 'rowspan'], th: ['colspan', 'rowspan', 'scope'], col: ['span', 'width'], colgroup: ['span'], ol: ['start', 'type', 'reversed'],
|
|
37
|
-
font: ['color', 'size', 'face'], aside: [], section: [],
|
|
37
|
+
font: ['color', 'size', 'face'], aside: [], section: [], time: ['datetime'],
|
|
38
38
|
svg: ['viewbox', 'preserveaspectratio', 'width', 'height', 'xmlns', 'fill', 'stroke', 'overflow'],
|
|
39
39
|
};
|
|
40
40
|
const SVG_ATTRS = ['d', 'fill', 'fill-rule', 'fill-opacity', 'stroke', 'stroke-width', 'stroke-linejoin', 'stroke-linecap', 'stroke-dasharray',
|
|
@@ -105,7 +105,8 @@ function cleaning(rw, approved, scope = '') {
|
|
|
105
105
|
const own = new Set(PER_TAG[tag] || []);
|
|
106
106
|
for (const [name, value] of [...e.attributes]) {
|
|
107
107
|
const k = name.toLowerCase();
|
|
108
|
-
let ok = GLOBAL.has(k) || own.has(k) || (/^data-[a-z0-9-]+$/.test(k) && SAFE_DATA(value)) || /^aria-[a-z]+$/.test(k)
|
|
108
|
+
let ok = GLOBAL.has(k) || own.has(k) || (/^data-[a-z0-9-]+$/.test(k) && SAFE_DATA(value)) || /^aria-[a-z]+$/.test(k)
|
|
109
|
+
|| (tag === 'svg' && (k === 'data-drawing' || k === 'data-chart') && value.length < 400_000 && !/[<>]|javascript:|vbscript:/i.test(value)); // a Glidewrites drawing's or chart's source (JSON; never a URL or style)
|
|
109
110
|
if (ok && URL_ATTRS.has(k)) ok = safeURL(value, k, tag);
|
|
110
111
|
if (ok && k === 'class') ok = CLASS_OK(value);
|
|
111
112
|
if (ok && k === 'id') ok = ID_OK(value);
|
|
@@ -191,3 +192,30 @@ export async function deckForCollaborator(ownerDeck) {
|
|
|
191
192
|
.on('*', { element(e) { for (const [k, v] of [...e.attributes]) if (/^on/i.test(k) || /^\s*javascript:/i.test(v)) e.removeAttribute(k); } });
|
|
192
193
|
return rw.transform(new Response(ownerDeck)).text();
|
|
193
194
|
}
|
|
195
|
+
|
|
196
|
+
/* ---------- Glidewrites documents (writes.js): a collaborator's save, and the document they open ----------
|
|
197
|
+
A document is doc.html: Docs' styles in its head, its blocks in <article class="doc">. What a collaborator saves keeps
|
|
198
|
+
the owner's head (their styles, anything an agent put there) and takes only their blocks, through the same allow-list
|
|
199
|
+
as slides (doc blocks are what the editor writes: paragraphs, lists, tables, pictures, drawings and charts as SVG);
|
|
200
|
+
each block whose cleaned text is the same as the owner's cleaned one comes back as the owner's own, exactly. */
|
|
201
|
+
const NONE = { iframes: new Set(), styles: new Set() };
|
|
202
|
+
const W = () => /** @type {any} */ (globalThis).writeMerge; // writer/lib/merge.js (writes.js imports it)
|
|
203
|
+
async function cleanBlocks(inner) { return cleaning(new HTMLRewriter().onDocument({ comments(c) { c.remove(); } }), NONE).transform(new Response(inner)).text(); }
|
|
204
|
+
/** The owner's document with the collaborator's blocks (cleaned, or the owner's own where untouched) and title. */
|
|
205
|
+
export async function composeDoc(ownerDoc, theirDoc) {
|
|
206
|
+
const { docParts, splitBlocks, bidOf } = W(), mine = docParts(ownerDoc), theirs = docParts(theirDoc);
|
|
207
|
+
const ownRaw = new Map(), ownClean = new Map();
|
|
208
|
+
const ownBlocks = splitBlocks(mine.inner), ownCleaned = splitBlocks(await cleanBlocks(mine.inner));
|
|
209
|
+
if (ownBlocks.length === ownCleaned.length) ownBlocks.forEach((b, i) => { const id = bidOf(b); if (id && !ownRaw.has(id)) { ownRaw.set(id, b); ownClean.set(id, ownCleaned[i]); } });
|
|
210
|
+
const blocks = splitBlocks(await cleanBlocks(theirs.inner)).map(b => { const id = bidOf(b); return id && ownClean.get(id) === b ? ownRaw.get(id) : b; });
|
|
211
|
+
const t = /<title>([\s\S]*?)<\/title>/i.exec(theirDoc)?.[1] ?? '', title = t.replace(/<[^>]*>/g, '').replace(/[<>]/g, '').trim().slice(0, 200);
|
|
212
|
+
const head = title ? mine.head.replace(/<title>[\s\S]*?<\/title>/i, `<title>${title}</title>`) : mine.head;
|
|
213
|
+
return head + '\n' + blocks.join('\n') + '\n' + mine.tail;
|
|
214
|
+
}
|
|
215
|
+
/** The owner's document as a collaborator's editor gets it: its blocks cleaned, and no script or handler anywhere. */
|
|
216
|
+
export async function docForCollaborator(ownerDoc) {
|
|
217
|
+
const p = W().docParts(ownerDoc), inner = await cleanBlocks(p.inner);
|
|
218
|
+
const strip = h => new HTMLRewriter().on('script', { element(e) { e.remove(); } })
|
|
219
|
+
.on('*', { element(e) { for (const [k, v] of [...e.attributes]) if (/^on/i.test(k) || /^\s*javascript:/i.test(v)) e.removeAttribute(k); } }).transform(new Response(h)).text();
|
|
220
|
+
return (await strip(p.head)) + inner + (await strip(p.tail));
|
|
221
|
+
}
|
|
@@ -1,24 +1,29 @@
|
|
|
1
1
|
/* One person's library on glideshow.org: a Durable Object per person (user:<GitHub id>, user:g:<Google id>), over their
|
|
2
2
|
GitHub repo (store-github.js) or the Glideshow folder in their Drive (store-drive.js). The logic is the editor's
|
|
3
|
-
|
|
3
|
+
glidecore/web/library.js, which a library kept in a browser runs too (editor/local/sw.js); this adds the Durable Object, the two
|
|
4
4
|
stores and sharing (share.js). The Mac pulls the commits it makes (history.py `sync`), and this side picks up pushes
|
|
5
5
|
within seconds. */
|
|
6
6
|
|
|
7
7
|
import { DurableObject } from 'cloudflare:workers';
|
|
8
|
-
import { LibraryCore } from '../
|
|
8
|
+
import { LibraryCore, b64url } from '../glidecore/web/library.js';
|
|
9
9
|
import { GitHubStore } from './store-github.js';
|
|
10
10
|
import { DriveStore, makeRoot } from './store-drive.js';
|
|
11
11
|
import { shareRoutes, publishAPI, commentsAPI, collabRoutes, collabDeck } from './share.js';
|
|
12
|
-
|
|
12
|
+
import { writesRoutes, writesShare, writesLive, writesMessage, writesClose } from './writes.js';
|
|
13
|
+
import { editorEnv } from './assets.js';
|
|
14
|
+
export * from '../glidecore/web/library.js';
|
|
13
15
|
|
|
14
16
|
/* Every editor open on a deck holds a WebSocket here, tagged with the deck's file (the Durable Object sleeps with them open);
|
|
15
17
|
a save of that file, here or come from GitHub or Drive, sends them its new version (editor/js/boot.js remoteVersion). */
|
|
16
|
-
const notify = (lib, path, v, here = false) => { // by: who saved it here (the owner, or the collaborator share.js names); none for a push or Drive
|
|
18
|
+
const notify = (lib, path, v, here = false, by = '') => { // by: who saved it here (the owner, or the collaborator share.js names); none for a push or Drive
|
|
17
19
|
const both = lib.merged?.[path]?.v === v ? lib.merged[path].both : undefined; // a save merged with a push: where the save's version was kept
|
|
18
|
-
const msg = JSON.stringify({ deck: path.slice(0, -'/deck.html'.length), v, by: here ?
|
|
20
|
+
const msg = JSON.stringify({ deck: path.slice(0, -'/deck.html'.length), v, by: here ? by || lib.cfg.user?.n || lib.cfg.user?.l || '' : '', ...(both?.length ? { both } : {}) });
|
|
19
21
|
for (const ws of lib.ctx.getWebSockets(path)) try { ws.send(msg); } catch {}
|
|
20
22
|
};
|
|
21
|
-
|
|
23
|
+
/* A file saved here and changed in the store meanwhile, other than a deck or the library's JSON (LibraryCore rebasePending):
|
|
24
|
+
a Glidewrites document merges as its editor does; anything else is kept beside theirs (null). */
|
|
25
|
+
const mergeFile = (path, base, mine, theirs) => /^writes\/.+\/doc\.html$/.test(path) ? (/** @type {any} */ (globalThis).writeMerge?.mergeDocs(base, mine, theirs) ?? null) : null;
|
|
26
|
+
const deps = { store: lib => lib.cfg.kind === 'drive' ? new DriveStore(lib) : new GitHubStore(lib), makeRoot, share: { shareRoutes, publishAPI, commentsAPI, collabRoutes }, notify, mergeFile };
|
|
22
27
|
|
|
23
28
|
/* Requests a day, per library (every HTTP request here, an alarm, a WebSocket message as the 1/20 Cloudflare bills it):
|
|
24
29
|
the free plan allows 100,000 Durable Object requests a day for the whole account, so one runaway editor (2026-10-21: a
|
|
@@ -55,7 +60,7 @@ const marked = (res, level) => { // the load level on a response (not on a Web
|
|
|
55
60
|
const pausedResponse = () => new Response(JSON.stringify({ error: 'paused', load: 'paused' }), { status: 429, headers: { 'content-type': 'application/json', 'x-glideshow-load': 'paused', 'retry-after': '3600' } });
|
|
56
61
|
|
|
57
62
|
export class Library extends DurableObject {
|
|
58
|
-
constructor(ctx, env) { super(ctx, env); LibraryCore.prototype.init.call(this, ctx, env, deps); }
|
|
63
|
+
constructor(ctx, env) { super(ctx, env); LibraryCore.prototype.init.call(this, ctx, editorEnv(env), deps); }
|
|
59
64
|
}
|
|
60
65
|
// LibraryCore's methods become the Durable Object's own: its RPC methods and its fetch and alarm handlers
|
|
61
66
|
for (const k of Object.getOwnPropertyNames(LibraryCore.prototype)) {
|
|
@@ -84,6 +89,13 @@ Object.defineProperty(Library.prototype, 'pushed', { value: async function (bran
|
|
|
84
89
|
await this.refresh(true); return true;
|
|
85
90
|
} });
|
|
86
91
|
const libraryFetch = async function (req, path) {
|
|
92
|
+
if (path.startsWith('/__writes/') || path.startsWith('/__wshare/')) { // Glidewrites: documents under writes/ (writes.js)
|
|
93
|
+
await this.loaded; if (!this.ready()) return new Response(JSON.stringify({ error: 'No library yet: set it up at /setup.' }), { status: 409, headers: { 'content-type': 'application/json' } });
|
|
94
|
+
await this.refresh();
|
|
95
|
+
const live = path.match(/^\/__writes\/api\/live$/) || path.match(/^\/__wshare\/([^/]+)\/api\/live$/);
|
|
96
|
+
if (live && req.headers.get('upgrade')?.toLowerCase() === 'websocket') return writesLive(this, req, new URL(req.url), live[1] ? decodeURIComponent(live[1]) : '');
|
|
97
|
+
return path.startsWith('/__writes/') ? writesRoutes(this, req, new URL(req.url)) : writesShare(this, req, new URL(req.url));
|
|
98
|
+
}
|
|
87
99
|
const collab = path.match(/^\/__collab\/([^/]+)\/api\/live$/);
|
|
88
100
|
if ((path === '/api/live' || collab) && req.headers.get('upgrade')?.toLowerCase() === 'websocket') {
|
|
89
101
|
await this.loaded; if (!this.ready()) return new Response('no library', { status: 409 });
|
|
@@ -92,6 +104,8 @@ const libraryFetch = async function (req, path) {
|
|
|
92
104
|
if (collab) { const c = await collabDeck(this, req, collab[1]); if (c.error) return c.error; deck = c.deck; } // a collaborator: the deck they may edit
|
|
93
105
|
else deck = this.current(req);
|
|
94
106
|
if (!deck) return new Response('no deck', { status: 404 });
|
|
107
|
+
const asked = new URL(req.url).searchParams.get('deck'); // the deck the page opened: another opened in this browser since is not its deck (library.js handle)
|
|
108
|
+
if (!collab && asked && asked !== b64url(deck)) return new Response('switched', { status: 409, headers: { 'x-glideshow-switched': '1' } });
|
|
95
109
|
const pair = new WebSocketPair(), [client, server] = [pair[0], pair[1]], tag = deck + '/deck.html';
|
|
96
110
|
this.ctx.acceptWebSocket(server, [tag]);
|
|
97
111
|
const v = collab ? JSON.parse(req.headers.get('x-viewer') || '{}') : null, me = this.cfg.user || {};
|
|
@@ -117,6 +131,7 @@ function tellPeople(lib, tag, gone = '') {
|
|
|
117
131
|
Object.defineProperty(Library.prototype, 'webSocketMessage', { async value(ws, data) {
|
|
118
132
|
if (await meter(this, 1 / 20) === 'paused') { try { ws.close(4429, 'paused'); } catch {} return; }
|
|
119
133
|
const a = ws.deserializeAttachment(); if (!a || typeof data !== 'string' || data.length > 4000) return;
|
|
134
|
+
if (a.w) return writesMessage(this, ws, data); // a Glidewrites document's socket (writes.js)
|
|
120
135
|
let here; try { here = JSON.parse(data).here; } catch { return; }
|
|
121
136
|
if (!here || typeof here !== 'object') return;
|
|
122
137
|
const id = x => typeof x === 'string' && /^[\w:.-]{1,80}$/.test(x) ? x : '';
|
|
@@ -125,6 +140,7 @@ Object.defineProperty(Library.prototype, 'webSocketMessage', { async value(ws, d
|
|
|
125
140
|
} });
|
|
126
141
|
Object.defineProperty(Library.prototype, 'webSocketClose', { value(ws) {
|
|
127
142
|
const a = ws.deserializeAttachment();
|
|
143
|
+
if (a?.w) return writesClose(this, ws, a);
|
|
128
144
|
try { ws.close(); } catch {}
|
|
129
145
|
if (a) tellPeople(this, a.tag, a.id);
|
|
130
146
|
} });
|
|
@@ -14,13 +14,13 @@ GitHub repo. You see every version, and AI agents can read and edit them with yo
|
|
|
14
14
|
<a class="btn primary" href="/start">Start a deck</a><a class="btn" href="/login">Sign in</a>
|
|
15
15
|
<button class="btn" id="use-folder" type="button" hidden>Use a folder on this computer</button>
|
|
16
16
|
<small id="use-folder-note" hidden>Your decks as real folders you pick, only on this computer: not synced, and they can't be shared.</small>
|
|
17
|
-
<script>{ // Chrome and Edge on a computer can keep the decks in a folder the person picks (
|
|
17
|
+
<script>{ // Chrome and Edge on a computer can keep the decks in a folder the person picks (glidecore/web/store-folder.js);
|
|
18
18
|
// the others can't, and on a phone or tablet (a touch screen, no mouse) there is no folder to speak of
|
|
19
19
|
const b = document.getElementById('use-folder');
|
|
20
20
|
if ('showDirectoryPicker' in window && matchMedia('(pointer: fine)').matches) { b.hidden = false; document.getElementById('use-folder-note').hidden = false; }
|
|
21
21
|
b.onclick = async () => {
|
|
22
22
|
let dir; try { dir = await window.showDirectoryPicker({ mode: 'readwrite', id: 'glideshow' }); } catch { return; } // closed without picking
|
|
23
|
-
await (await import('/
|
|
23
|
+
await (await import('/core/store-folder.js')).setFolder(dir);
|
|
24
24
|
location.href = '/start';
|
|
25
25
|
};
|
|
26
26
|
}</script>
|
|
@@ -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
|
-
|
|
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">
|
|
@@ -92,7 +92,10 @@ export async function commentsAPI(lib, method, r, deck) {
|
|
|
92
92
|
async function comments(lib, deck) {
|
|
93
93
|
try { const c = JSON.parse(await lib.text(deck + '/comments.json') || '{}'); return { comments: Array.isArray(c.comments) ? c.comments : [] }; } catch { return { comments: [] }; }
|
|
94
94
|
}
|
|
95
|
-
|
|
95
|
+
/* One change at a time per deck's comments.json (library.js serialize): read, changed, written back without another
|
|
96
|
+
person's change landing in between and being written over. */
|
|
97
|
+
const changeComments = (lib, deck, r, by, isOwner) => lib.serialize(deck + '/comments.json', () => changeCommentsNow(lib, deck, r, by, isOwner));
|
|
98
|
+
async function changeCommentsNow(lib, deck, r, by, isOwner) {
|
|
96
99
|
const doc = await comments(lib, deck), list = doc.comments, find = id => list.find(c => c.id === id);
|
|
97
100
|
const text = String(r.text || '').trim().slice(0, 4000), who = { n: String(by.n || '').slice(0, 100), e: String(by.e || '').slice(0, 200) };
|
|
98
101
|
const mine = c => isOwner || (c.by?.e && c.by.e === who.e);
|
|
@@ -201,7 +204,7 @@ function deckRefs(html, deck, tree) {
|
|
|
201
204
|
.replace(/url\("([^&]*)"\)/gi, (m, ref) => tag(ref, m));
|
|
202
205
|
}
|
|
203
206
|
|
|
204
|
-
/* A deck's file in parts when asked (Range), as the owner's editor sends them (
|
|
207
|
+
/* A deck's file in parts when asked (Range), as the owner's editor sends them (glidecore/web/library.js file): a video loops by
|
|
205
208
|
seeking back to its start, which Chrome does only on a server that answers ranges. A shared link sent the whole file
|
|
206
209
|
every time, and its videos stopped at their end once Chrome no longer held their start (2026-10-21, presenting). */
|
|
207
210
|
function ranged(req, body, headers) {
|
|
@@ -235,7 +238,7 @@ export async function collabRoutes(lib, req, url) {
|
|
|
235
238
|
const body = req.method === 'POST' ? await req.arrayBuffer() : null, j = () => { try { return JSON.parse(dec(new Uint8Array(body))); } catch { return {}; } };
|
|
236
239
|
if (path === '__can') return json({ ok: true, title: entry.title || '', view: url.searchParams.get('base')?.replace(/^\/e\//, '/p/') || '' });
|
|
237
240
|
if (req.method === 'GET') {
|
|
238
|
-
if (path === 'api/deck') { // with its files' versions, as the owner's (
|
|
241
|
+
if (path === 'api/deck') { // with its files' versions, as the owner's (glidecore/web/library.js): pictures asked for by version
|
|
239
242
|
const files = {}; for (const [p, e] of Object.entries(v)) if (p.startsWith(deck + '/') && p !== deckFile && !e.folder) files[p.slice(deck.length + 1)] = e.v;
|
|
240
243
|
return json({ html: await deckForCollaborator(await lib.text(deckFile) || ''), mtime: version, draft: false, files });
|
|
241
244
|
}
|
|
@@ -262,8 +265,10 @@ export async function collabRoutes(lib, req, url) {
|
|
|
262
265
|
if (r.mtime !== version) return json({ error: 'conflict', mtime: version }, 409);
|
|
263
266
|
if (typeof r.slides !== 'string') return json({ error: 'nothing to save' }, 400);
|
|
264
267
|
const out = await composeDeck(await lib.text(deckFile) || '', r.slides, { title: titleOf(String(r.html || '')), same: r.same, count: r.count });
|
|
265
|
-
|
|
266
|
-
|
|
268
|
+
// saved by someone else while this one was being cleaned, or while it is being stored (put checks right before it sets):
|
|
269
|
+
// a conflict, which the editor merges. Who saved it goes along with it (not on the library, which other requests share).
|
|
270
|
+
const mtime = await lib.put(deckFile, enc(out), { expect: version, by: who.n || who.e || '' });
|
|
271
|
+
if (mtime === null) return json({ error: 'conflict', mtime: lib.view()[deckFile]?.v || '' }, 409);
|
|
267
272
|
lib.msgs.push(`${baseOf(deck)}: edited by ${who.n || who.e || 'a collaborator'}`);
|
|
268
273
|
await lib.savePending(); await lib.schedule();
|
|
269
274
|
return json({ mtime });
|
|
@@ -7,7 +7,7 @@ import { Buffer } from 'node:buffer';
|
|
|
7
7
|
import { typeOf, dirOf, baseOf } from './library.js';
|
|
8
8
|
|
|
9
9
|
const FOLDER = 'application/vnd.google-apps.folder';
|
|
10
|
-
const FIELDS = 'id,name,mimeType,parents,md5Checksum,modifiedTime,trashed';
|
|
10
|
+
const FIELDS = 'id,name,mimeType,parents,md5Checksum,modifiedTime,trashed', VFIELDS = 'id,md5Checksum,modifiedTime'; // VFIELDS: a file's version (head's v)
|
|
11
11
|
const KEEP_DAYS = 50; // kept-forever versions of a deck (Drive allows 200 a file)
|
|
12
12
|
|
|
13
13
|
export class DriveStore {
|
|
@@ -81,32 +81,47 @@ export class DriveStore {
|
|
|
81
81
|
return (folders[path] = f.id);
|
|
82
82
|
}
|
|
83
83
|
async upload(path, bytes, id, folders) {
|
|
84
|
-
if (id) return this.api(`/upload/drive/v3/files/${id}?uploadType=media&fields
|
|
84
|
+
if (id) return this.api(`/upload/drive/v3/files/${id}?uploadType=media&fields=${VFIELDS}`, { method: 'PATCH', raw: bytes, type: typeOf(path) });
|
|
85
85
|
const boundary = 'glideshow' + crypto.randomUUID().replace(/-/g, ''), meta = JSON.stringify({ name: baseOf(path), parents: [await this.folder(dirOf(path), folders)] });
|
|
86
86
|
const body = Buffer.concat([Buffer.from(`--${boundary}\r\ncontent-type: application/json; charset=UTF-8\r\n\r\n${meta}\r\n--${boundary}\r\ncontent-type: ${typeOf(path)}\r\n\r\n`), Buffer.from(bytes), Buffer.from(`\r\n--${boundary}--`)]);
|
|
87
|
-
return this.api(
|
|
87
|
+
return this.api(`/upload/drive/v3/files?uploadType=multipart&fields=${VFIELDS}`, { method: 'POST', raw: body, type: `multipart/related; boundary=${boundary}` });
|
|
88
|
+
}
|
|
89
|
+
/* A file this write replaces must still be the version it was read as (Drive offers no If-Match on files, so it is asked
|
|
90
|
+
right before): one changed in Drive meanwhile is a conflict, merged by the library (rebasePending) and written again. */
|
|
91
|
+
async unchanged(path, have) {
|
|
92
|
+
const f = await this.apiJSON(`/drive/v3/files/${have.ref}?fields=${VFIELDS}`).catch(() => null);
|
|
93
|
+
if (f && `${f.id}:${f.md5Checksum || f.modifiedTime}` !== have.v) throw Object.assign(new Error(`${path} changed in Drive meanwhile`), { conflict: true });
|
|
88
94
|
}
|
|
89
95
|
|
|
90
96
|
/* Each change straight to Drive: a file moved keeps its id (and its history); one copied is copied by Drive; removed
|
|
91
97
|
files go to the Drive trash; folders left empty by a move are trashed too. */
|
|
92
98
|
async write(base, changes) {
|
|
93
|
-
|
|
99
|
+
/* Several requests, any of which can fail, after which the library tries the whole write again: what each step made is
|
|
100
|
+
recorded in `base` as it goes (a folder, a file made, a copy, a move), so the next try updates those rather than
|
|
101
|
+
making them a second time (2026-11-10: a copy or a new deck's files twice in Drive after a failed commit). */
|
|
102
|
+
const folders = (base.folders ||= {}), moved = new Set();
|
|
103
|
+
const made = (p, f) => { base.tree[p] = { ref: f.id, v: `${f.id}:${f.md5Checksum || f.modifiedTime}`, t: Date.parse(f.modifiedTime) || Date.now() }; };
|
|
94
104
|
const gone = new Map(changes.filter(c => c.del && base.tree[c.path] && !base.tree[c.path].folder).map(c => [base.tree[c.path].ref, c.path]));
|
|
95
105
|
for (const c of changes.filter(c => c.ref && gone.has(c.ref) && !moved.has(c.ref))) { // a move: the file itself goes
|
|
96
106
|
const from = gone.get(c.ref), to = await this.folder(dirOf(c.path), folders), was = folders[dirOf(from)];
|
|
97
107
|
await this.api(`/drive/v3/files/${c.ref}?addParents=${to}&removeParents=${was}&fields=id`, { method: 'PATCH', json: { name: baseOf(c.path) } });
|
|
98
108
|
moved.add(c.ref); c.done = true;
|
|
99
109
|
changes.find(d => d.path === from && d.del).done = true;
|
|
110
|
+
base.tree[c.path] = base.tree[from]; delete base.tree[from]; // (recorded: a second try finds it moved)
|
|
100
111
|
}
|
|
101
112
|
for (const c of changes) {
|
|
102
113
|
if (c.done) continue;
|
|
103
114
|
const have = base.tree[c.path];
|
|
104
|
-
if (c.del) { if (have) await this.api(`/drive/v3/files/${have.ref}?fields=id`, { method: 'PATCH', json: { trashed: true } }); continue; }
|
|
115
|
+
if (c.del) { if (have) { await this.api(`/drive/v3/files/${have.ref}?fields=id`, { method: 'PATCH', json: { trashed: true } }); delete base.tree[c.path]; } continue; }
|
|
105
116
|
if (baseOf(c.path) === '.keep') { await this.folder(dirOf(c.path), folders); continue; } // a folder, nothing in it
|
|
106
|
-
|
|
117
|
+
const same = have && !have.folder && c.ref && (have.ref === c.ref || String(have.v).split(':')[1] === String(c.bv || '').split(':')[1]);
|
|
118
|
+
if (same) continue; // copied (or moved) there already, by an earlier try
|
|
119
|
+
if (have && !have.folder) await this.unchanged(c.path, have);
|
|
120
|
+
if (c.ref && !(have && !have.folder)) made(c.path, await this.apiJSON(`/drive/v3/files/${c.ref}/copy?fields=${VFIELDS}`, { method: 'POST', json: { name: baseOf(c.path), parents: [await this.folder(dirOf(c.path), folders)] } }));
|
|
107
121
|
else {
|
|
108
122
|
if (have && !have.folder && baseOf(c.path) === 'deck.html') await this.keepDay(have.ref).catch(() => {}); // history is a nicety: never stop a save
|
|
109
|
-
await this.
|
|
123
|
+
const bytes = c.ref ? await this.read({ ref: c.ref, bv: c.bv }) : c.bytes; // (a copy over a file that is there: its content, in place)
|
|
124
|
+
made(c.path, await (await this.upload(c.path, bytes, have && !have.folder ? have.ref : null, folders)).json());
|
|
110
125
|
}
|
|
111
126
|
}
|
|
112
127
|
// folders a removal left empty go to the trash too. Which ones is worked out from the changes, not from a fresh
|
|
@@ -74,9 +74,9 @@ export class GitHubStore {
|
|
|
74
74
|
return { base: next, versions: shas };
|
|
75
75
|
}
|
|
76
76
|
if (r.status !== 422 || attempt > 2) throw new Error(`GitHub: couldn't update ${this.branch} (${r.status})`);
|
|
77
|
-
const was = base; base = await this.head(null, true); // the Mac pushed meanwhile: commit on top of its work,
|
|
78
|
-
if (changes.some(c => c.
|
|
79
|
-
throw Object.assign(new Error('a
|
|
77
|
+
const was = base; base = await this.head(null, true); // the Mac pushed meanwhile: commit on top of its work, unless it changed a
|
|
78
|
+
if (changes.some(c => c.bytes && base.tree[c.path]?.v !== was.tree[c.path]?.v)) // file this writes (a deck, comments.json, published.json, a
|
|
79
|
+
throw Object.assign(new Error('a file changed in GitHub meanwhile'), { conflict: true }); // document): that one is merged first (library.js rebasePending)
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
|