Skip to content

armgit / bento

Public Imported from GitHub
0

Bento, the office suite that fits in a file

Bento Slides: self-contained editable slide deck in one HTML file

nyblnet7bd225d06bce
diff --git a/.claude/launch.json b/.claude/launch.json
new file mode 100644
index 00000000..fbfa51c9
--- /dev/null
+++ b/.claude/launch.json
@@ -0,0 +1,19 @@
+{
+ "version": "0.0.1",
+ "configurations": [
+ {
+ "name": "slides-dev",
+ "cwd": "slides",
+ "runtimeExecutable": "npm",
+ "runtimeArgs": ["run", "dev", "--", "--port", "5199", "--strictPort"],
+ "port": 5199
+ },
+ {
+ "name": "serve-built",
+ "cwd": "slides",
+ "runtimeExecutable": "python3",
+ "runtimeArgs": ["-m", "http.server", "5198", "--directory", "dist-single"],
+ "port": 5198
+ }
+ ]
+}
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000..ff1e88fe
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,11 @@
+# dependencies & build output
+node_modules/
+dist/
+dist-single/
+
+# local test decks — never committed (may contain confidential content)
+testing/
+
+# os cruft
+.DS_Store
+*.tsbuildinfo
diff --git a/CLAUDE.md b/CLAUDE.md
new file mode 100644
index 00000000..512e03df
--- /dev/null
+++ b/CLAUDE.md
@@ -0,0 +1,44 @@
+# Bento — self-contained office documents
+
+One HTML file = the document + viewer + editor. See `README.md` for the vision.
+`slides/` is the first app (PowerPoint replacement); docs and sheets come later.
+
+## Architecture (slides/)
+
+- `src/model.ts` — the `bento/slides` JSON document model + starter deck. This is the format.
+- `src/save.ts` — the self-save trick: clone the document at boot (`capturePristine`),
+ swap the `#bento-doc` data block, re-serialize. JSON is `<`-escaped (`<`) so it can
+ never contain `</script>`. File System Access API first, download fallback.
+- `src/render.ts` — single model→DOM renderer shared by editor canvas, thumbnails, and
+ Reveal sections. Elements carry `data-el-id` (editing) and `data-flip-id` (morph).
+- `src/present.ts` — Reveal.js overlay; slides with `transition:'morph'` use GSAP Flip:
+ matched `data-flip-id` elements animate geometry via Flip, style props (fill/color)
+ tween straight from the model values.
+- `src/editor/` — vanilla-TS editor. Moveable + Selecto handle manipulation.
+
+## Hard-won details — do not regress
+
+1. **Moveable in a scaled canvas**: the control box mounts INSIDE `.ed-stage-scale`
+ (the `transform: scale()` wrapper) with `rootContainer: document.body`, and
+ `moveable.zoom = 1/scale` on relayout. Then all Moveable event coords are in
+ slide-local px. Mounting it outside the scaled wrapper gives garbage coordinates.
+2. **Don't reset `moveable.target` to an identical array** — gesture listeners re-attach
+ a frame later and a drag started in that frame is swallowed (`syncTargets` checks).
+3. **`querySelector('[data-el-id=…]')` is ambiguous** — sidebar thumbnails contain the
+ same ids as the canvas. Always scope to the surface (`.ed-stage-scale …`).
+4. **Never let a literal `</script>` into the bundle** — `save.ts` builds it by
+ concatenation; the data block JSON escapes `<`.
+5. Reveal's `.reveal-viewport` paints white; the present overlay CSS overrides it black.
+
+## Commands
+
+- `npm run dev` (in slides/) — dev server; `.claude/launch.json` has `slides-dev` (:5199)
+ and `serve-built` (:5198, serves dist-single).
+- `npm run build:single` — the shippable `dist-single/Bento_Slides.bento.html`.
+- In-page scripting/testing API: `window.bento` → `{ doc, serialize() }`.
+
+## Testing gotcha
+
+Synthetic `PointerEvent`s do NOT trigger Moveable/Selecto (Gesto listens for mouse
+events) — dispatch `MouseEvent`s, or use trusted input. After changing selection, wait a
+frame before starting a synthetic drag.
diff --git a/README.md b/README.md
new file mode 100644
index 00000000..61bbe0ac
--- /dev/null
+++ b/README.md
@@ -0,0 +1,42 @@
+# Bento
+
+**Documents that carry their own app.** Bento packages a document *and* its full
+display + editing functionality into a single HTML file any web browser can open —
+no install, no server, no cloud. Like a bento box: everything you need, in one container.
+
+The inspiration is the single-file build of the commercial-architecture webapp
+(Vite + `vite-plugin-singlefile` → one self-contained HTML that runs from `file://`),
+combined with the TiddlyWiki idea of a file that can edit and re-save itself.
+
+## The format
+
+A Bento document (`*.bento.html`) is an ordinary HTML file with three parts:
+
+1. **Data block** — `<script type="application/bento+json" id="bento-doc">` holding the
+ document model as JSON (all assets such as images embedded as data URIs).
+2. **Runtime** — one inlined JS/CSS bundle: the viewer, the presenter, and the editor.
+3. **Self-save** — at boot the runtime captures its own pristine HTML; on save it swaps
+ in the updated data block and writes the file back via the File System Access API
+ (Chrome/Edge) or a download fallback (Firefox/Safari). The saved file is again a
+ complete, editable Bento document.
+
+## Apps
+
+| App | Status | Libraries |
+|---|---|---|
+| `slides/` — Bento Slides (PowerPoint replacement) | in development | Reveal.js (present), GSAP Flip (morph/animation), Moveable + Selecto (editing) |
+| docs (Word replacement) | planned | TBD (e.g. ProseMirror/Tiptap) |
+| sheets (Excel replacement) | planned | TBD (e.g. HyperFormula + a grid) |
+
+## Bento Slides
+
+```bash
+cd slides
+npm install
+npm run dev # editor on http://localhost:5173
+npm run build:single # → dist-single/Bento_Slides.bento.html (the shippable format)
+```
+
+The built file opens from disk, boots into the editor with a starter deck, presents
+with Reveal.js (morph transitions via GSAP Flip for elements whose IDs match across
+slides — PowerPoint "Morph" style), and saves itself with your edits embedded.
diff --git a/slides/index.html b/slides/index.html
new file mode 100644
index 00000000..b66bc934
--- /dev/null
+++ b/slides/index.html
@@ -0,0 +1,20 @@
+<!doctype html>
+<html lang="en">
+ <head>
+ <meta charset="UTF-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ <meta name="generator" content="bento-slides" />
+ <link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect x='2' y='2' width='28' height='28' rx='6' fill='%231E2A3A'/%3E%3Crect x='6' y='6' width='12' height='9' rx='2' fill='%23F7A600'/%3E%3Crect x='20' y='6' width='6' height='20' rx='2' fill='%235B8DEF'/%3E%3Crect x='6' y='17' width='12' height='9' rx='2' fill='%23E9EDF3'/%3E%3C/svg%3E" />
+ <title>Bento Slides</title>
+ <!--
+ Bento document data lives in the script block below. The runtime replaces its
+ contents on every save, so this one file is both the app and the document.
+ An empty block means "boot with the starter deck".
+ -->
+ <script type="application/bento+json" id="bento-doc"></script>
+ </head>
+ <body>
+ <div id="app"></div>
+ <script type="module" src="/src/main.ts"></script>
+ </body>
+</html>
diff --git a/slides/package-lock.json b/slides/package-lock.json
new file mode 100644
index 00000000..d9ff7251
--- /dev/null
+++ b/slides/package-lock.json
@@ -0,0 +1,1553 @@
+{
+ "name": "bento-slides",
+ "version": "0.1.0",
+ "lockfileVersion": 3,
+ "requires": true,
+ "packages": {
+ "": {
+ "name": "bento-slides",
+ "version": "0.1.0",
+ "dependencies": {
+ "gsap": "^3.12.7",
+ "moveable": "^0.53.0",
+ "reveal.js": "^5.2.1",
+ "selecto": "^1.26.3"
+ },
+ "devDependencies": {
+ "@types/node": "^24.13.2",
+ "@types/reveal.js": "^5.2.1",
+ "typescript": "~5.8.3",
+ "vite": "^7.1.1",
+ "vite-plugin-singlefile": "^2.3.3"
+ }
+ },
+ "node_modules/@cfcs/core": {
+ "version": "0.0.6",
+ "resolved": "https://registry.npmjs.org/@cfcs/core/-/core-0.0.6.tgz",
+ "integrity": "sha512-FxfJMwoLB8MEMConeXUCqtMGqxdtePQxRBOiGip9ULcYYam3WfCgoY6xdnMaSkYvRvmosp5iuG+TiPofm65+Pw==",
+ "license": "MIT",
+ "dependencies": {
+ "@egjs/component": "^3.0.2"
+ }
+ },
+ "node_modules/@daybrush/utils": {
+ "version": "1.13.0",
+ "resolved": "https://registry.npmjs.org/@daybrush/utils/-/utils-1.13.0.tgz",
+ "integrity": "sha512-ALK12C6SQNNHw1enXK+UO8bdyQ+jaWNQ1Af7Z3FNxeAwjYhQT7do+TRE4RASAJ3ObaS2+TJ7TXR3oz2Gzbw0PQ==",
+ "license": "MIT"
+ },
+ "node_modules/@egjs/agent": {
+ "version": "2.4.4",
+ "resolved": "https://registry.npmjs.org/@egjs/agent/-/agent-2.4.4.tgz",
+ "integrity": "sha512-cvAPSlUILhBBOakn2krdPnOGv5hAZq92f1YHxYcfu0p7uarix2C6Ia3AVizpS1SGRZGiEkIS5E+IVTLg1I2Iog==",
+ "license": "MIT"
+ },
+ "node_modules/@egjs/children-differ": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@egjs/children-differ/-/children-differ-1.0.1.tgz",
+ "integrity": "sha512-DRvyqMf+CPCOzAopQKHtW+X8iN6Hy6SFol+/7zCUiE5y4P/OB8JP8FtU4NxtZwtafvSL4faD5KoQYPj3JHzPFQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@egjs/list-differ": "^1.0.0"
+ }
+ },
+ "node_modules/@egjs/component": {
+ "version": "3.0.5",
+ "resolved": "https://registry.npmjs.org/@egjs/component/-/component-3.0.5.tgz",
+ "integrity": "sha512-cLcGizTrrUNA2EYE3MBmEDt2tQv1joVP1Q3oDisZ5nw0MZDx2kcgEXM+/kZpfa/PAkFvYVhRUZwytIQWoN3V/w==",
+ "license": "MIT"
+ },
+ "node_modules/@egjs/list-differ": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@egjs/list-differ/-/list-differ-1.0.1.tgz",
+ "integrity": "sha512-OTFTDQcWS+1ZREOdCWuk5hCBgYO4OsD30lXcOCyVOAjXMhgL5rBRDnt/otb6Nz8CzU0L/igdcaQBDLWc4t9gvg==",
+ "license": "MIT"
+ },
+ "node_modules/@esbuild/aix-ppc64": {
+ "version": "0.28.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.28.1.tgz",
+ "integrity": "sha512-Svl7tq8k/08+p6CXPpRjQ1fKX+1odH/BQbb48fV6fj3CWHhsoIOoY87w1oHXm0qEpkIK3ZfVgp0hed3XBXzXMQ==",
+ "cpu": [
+ "ppc64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "aix"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/android-arm": {
+ "version": "0.28.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.28.1.tgz",
+ "integrity": "sha512-0k2F129Xdio1TdJfzJ8sy1Q47vUD2NnwdhiAf7drUN1EBTfPf4hsFCtmMgu/6m8JSzsBrlmVjudMBQqOfG8usQ==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/android-arm64": {
+ "version": "0.28.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.28.1.tgz",
+ "integrity": "sha512-34EGEbCIAgosYz6goLcopX6Mo7NyGv9tfwEM2/7Ce2VcVRk568iSvniGWcUXIy7wEDR1wzolcxcriFVrWYcwBg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/android-x64": {
+ "version": "0.28.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.28.1.tgz",
+ "integrity": "sha512-dbwY7ltSMDWsRatcRpCnES4F+im88OCUgGZjy52shC7GqHRE/cYlxNbB4Z4UpJswpcc4Qxd2oE/ufM0p61IKng==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/darwin-arm64": {
+ "version": "0.28.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.28.1.tgz",
+ "integrity": "sha512-TZbWkQY7kvTAXbXUT7uVACR5cMHsDiSz9z7ZKAX/RTq/WJEk3QyRr0wZpNhBDX+/0CtdqUIJlOiodQcta6tY3Q==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/darwin-x64": {
+ "version": "0.28.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.28.1.tgz",
+ "integrity": "sha512-zfdzgK9ACBNZLI/CyHTOx81SyNbM6YXn7rxSgX97VjyiPl9W1i4Ka4fgKECEoFCKGpvBj5qArWIGgQjOwkgskQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/freebsd-arm64": {
+ "version": "0.28.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.28.1.tgz",
+ "integrity": "sha512-wG2EA8ENdEI0qhkSZMjfqrdY+ziCYCPMmtZjjIwOmXFjmyzEHn+UUxk5of+SYsjtfs3VpnlC7QLzSI5hY/rOAw==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/freebsd-x64": {
+ "version": "0.28.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.28.1.tgz",
+ "integrity": "sha512-i7dZ9vQgnvSCzi/rYCXNgtF/U+eKZNJBzu3eTQbRgHnM7tNSizLOkRFAl3qzVc/Op/u5YkHHa4pf/3DOYHthLQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-arm": {
+ "version": "0.28.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.28.1.tgz",
+ "integrity": "sha512-qVXBOHQS+d5Y722GwJzJUtOLlX7km3CraOaGormF1pDtPd2C/l1SHRPgjLunLGe51Sh5YYWKMFDyV4SxgMQYTQ==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-arm64": {
+ "version": "0.28.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.28.1.tgz",
+ "integrity": "sha512-yHs+0uc8+nvEAfAfxrWQKK5peSNzBc4PegcMO0EJ2hT71uA7vB8Ihg2e77R2P7SG5uYjPbHlLLmve4LLLRCf0g==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-ia32": {
+ "version": "0.28.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.28.1.tgz",
+ "integrity": "sha512-d1z4ZuP0ajrfz/FhGT4vv278rX8KnPPJx8i5+AtK7TYbx9Le9F1hyzurZpkEyjkGa9dUGhQow4C1NmeGvqxN2w==",
+ "cpu": [
+ "ia32"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-loong64": {
+ "version": "0.28.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.28.1.tgz",
+ "integrity": "sha512-M5sRjUVZrkm1OAPR3dlOYzNmN+loZKGVi1VUQGrwuqLcbR6qeAz+famMhjASeH3YVKvZz+zT1jlh/keC3Rj/lg==",
+ "cpu": [
+ "loong64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-mips64el": {
+ "version": "0.28.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.28.1.tgz",
+ "integrity": "sha512-mRObBZeHh2OxcBFPWE/FjylkRgZdYuiTR3vaTozquCGOH14iP9oN4x4Ge81CoIDYQrXmIxpFumJBu5MtZpnQJQ==",
+ "cpu": [
+ "mips64el"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-ppc64": {
+ "version": "0.28.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.28.1.tgz",
+ "integrity": "sha512-slScBsMAb3GFDcdrCgLwZtPYRoH2H/youv10QiZyRjmsP48fznoveWytSgCI/R0ZcUgpc0ZhIUEx6LHts8yrfQ==",
+ "cpu": [
+ "ppc64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-riscv64": {
+ "version": "0.28.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.28.1.tgz",
+ "integrity": "sha512-kw0owk1o0GFETUJyW0jc0G4Yzs0BHZn0JDZ8JRT088vjJYX777BAs1fDGxAC+q831qOs2DTC96mNsG2opdfyyQ==",
+ "cpu": [
+ "riscv64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-s390x": {
+ "version": "0.28.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.28.1.tgz",
+ "integrity": "sha512-/lAIjX8aYFRByhh6L5rYtPEDRqa9de/4V/juOXcta5frjvzXO4/sqEtyytse0g3zZFuWu5cDN0MkLz2qRDD2Ag==",
+ "cpu": [
+ "s390x"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-x64": {
+ "version": "0.28.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.28.1.tgz",
+ "integrity": "sha512-u/anNYF2mmVOEDwLtnQ1wOr3EZ9sTNGLWrsYGYwHWzGA3Si84IOkHXlbWTD1NB+9/1lcnweYKO54uhxZydNzfA==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/netbsd-arm64": {
+ "version": "0.28.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.28.1.tgz",
+ "integrity": "sha512-oks0DYbLwWMmaakTsCb+zL4E+aHRVLom9IJZOAthMQEPiQmydXHkziYEsGYRx0uNV/IjEKGAV941JzH02pflqw==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "netbsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/netbsd-x64": {
+ "version": "0.28.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.28.1.tgz",
+ "integrity": "sha512-aeL6lAnN89Hz43Mlh1G8ARasbuoYvSITDEx0tHh5b7jJnHcssqgjy9Yx430GDpmCa6OyrKoS0aNRjKundRizGg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "netbsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/openbsd-arm64": {
+ "version": "0.28.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.28.1.tgz",
+ "integrity": "sha512-MEFJe5C3R8pwXdZ5Y21oo6m7ePiS0d9pWucn99O/wvyJZChoIQKrQDxKrGeW8F5+T0okTHesAmDeiHDTIq0V/Q==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openbsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/openbsd-x64": {
+ "version": "0.28.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.28.1.tgz",
+ "integrity": "sha512-i/ZLIOafE0Z8cI/XANJAixoJL/uRAoS2xOA3rb0xN+KK0K177cMAsQYkzHtBrtMXAKuAc7HGgcWiZ/sRC1Nxgw==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openbsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/openharmony-arm64": {
+ "version": "0.28.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.28.1.tgz",
+ "integrity": "sha512-ge+Z7EXFNt2BO1oAMsVpiQ8EwndV9i1xXerAeTIK7AtPs3bKFXQM7nlRxDSIUIMeueR1CNXxqztLzdNeReKBJg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openharmony"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/sunos-x64": {
+ "version": "0.28.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.28.1.tgz",
+ "integrity": "sha512-BEjgtECkL3vY+SaSQ6nzVfiALUeFxpawyp8Jmf5PtYhf1Ug40N1h/hxlhts+f1FvSvarEigdxS3BlSMI2PJLcQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "sunos"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/win32-arm64": {
+ "version": "0.28.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.28.1.tgz",
+ "integrity": "sha512-lCv9eK/H6ZJWbE7bh2nw54CZ9M2nupBxJcTsdk/QQnWkdSjKGuxmmH8/GWrlT1eMmZfn4dGcCjRte397WqfQXA==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/win32-ia32": {
+ "version": "0.28.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.28.1.tgz",
+ "integrity": "sha512-zvb/mB2bSCoJOpoCBgYKKpX6YM6mJBlBUVUtVj41DlZJVEB6/0CKlRYxP5wWl1C1ILiCoAU5wZZ4q1P3qeS6Eg==",
+ "cpu": [
+ "ia32"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/win32-x64": {
+ "version": "0.28.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.28.1.tgz",
+ "integrity": "sha512-bm4Mowrv+GXMlpWX++EcXw/iLyd1o3+bJkC2DkWXYVvgZCqD/bSj9ctZeAMC3cIxgjRVR2Dufaiu4YPxr5gW1A==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@rollup/rollup-android-arm-eabi": {
+ "version": "4.62.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.62.2.tgz",
+ "integrity": "sha512-6o7ZLZK+BeenkZCFNDXqpbjw9bD6nuWonvS/lwQJp7NoVVxm6p3qE7qQ5jGuBjiFsgvqjD8mZAU5oWxTmbOeOg==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ]
+ },
+ "node_modules/@rollup/rollup-android-arm64": {
+ "version": "4.62.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.62.2.tgz",
+ "integrity": "sha512-BaH7BllCACHoH1LguOU56UItGfUWjujlO65kS9LAodViaN4bwIKd7oeW/ZHJ/4ljr/7MIiENnNy3HJ0zXv8Zkw==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ]
+ },
+ "node_modules/@rollup/rollup-darwin-arm64": {
+ "version": "4.62.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.62.2.tgz",
+ "integrity": "sha512-v39RCCvj4He82I9sFmk+M1VZ0PLM9sfsLVikjfx2hYBNALhrrOR2D3JjQA6AhlaSOgcR+RzrKY7e1+bT6SUO/A==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ]
+ },
+ "node_modules/@rollup/rollup-darwin-x64": {
+ "version": "4.62.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.62.2.tgz",
+ "integrity": "sha512-yl0y2vq3S3lHeuXhEdss6TWfKW8vkujImO12tn4ZkG/4oghr09LvdYm2RElVjokTQiUvDUGXLGsYeLqUMCKpGA==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ]
+ },
+ "node_modules/@rollup/rollup-freebsd-arm64": {
+ "version": "4.62.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.62.2.tgz",
+ "integrity": "sha512-tT4pvt4qXD+vEoezupCWi+a1F0vvDiksiHc+PxRlYTOH1I6/X4id9jPxTP+Fg+545euaFT1jJVs4CEdHZAU1vw==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ]
+ },
+ "node_modules/@rollup/rollup-freebsd-x64": {
+ "version": "4.62.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.62.2.tgz",
+ "integrity": "sha512-6nU5F2wCW+qvCBhTn1pdIU3bzsIoF7EUwsCDRxilWGprQR6yd508YnH9+OKFCwpfS8pjZqDUmnCAr7exax0XCg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-arm-gnueabihf": {
+ "version": "4.62.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.62.2.tgz",
+ "integrity": "sha512-n1GJHPOvpIfhi3TmrCeh6S6URt9BFCt0KQE3qvexyGCTAKpR4Lg+eWvNZEqu7epxwus/8ElT3hacYEucm49SZg==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "libc": [
+ "glibc"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-arm-musleabihf": {
+ "version": "4.62.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.62.2.tgz",
+ "integrity": "sha512-JqgflS8wEB+UXV/vS1RpRbifGBeN4D5lz8D8oOFbFZw4vedvdOgCFAjfBmIMdW3yL10XpQQ0Ambepw6MXrhOnA==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "libc": [
+ "musl"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-arm64-gnu": {
+ "version": "4.62.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.62.2.tgz",
+ "integrity": "sha512-wnFJkogWvN4jm/hQRF2UBaeUmk20j5+DmHvoyWii2b8HJDyvz1MF2OU/6ynXt2KR63rbZLWkFpoytpdc/yBuSA==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "libc": [
+ "glibc"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-arm64-musl": {
+ "version": "4.62.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.62.2.tgz",
+ "integrity": "sha512-HVu2bp0zhvJ8xHEV9+UUs7S90VadmBSY3LcIMvozbPo4AuMGDWlz3ymHLHZPX4hR67TKTt8Qp5PJ5RBg/i+RMQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "libc": [
+ "musl"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-loong64-gnu": {
+ "version": "4.62.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.62.2.tgz",
+ "integrity": "sha512-mQqqAV8QaoSgr9I2fKDLY2BAVvmKjWoGiu/cSYQonsLvtqwEn1E4QYfnCOcp5zoEqNhsDYin1s6jx/VJmrxlZg==",
+ "cpu": [
+ "loong64"
+ ],
+ "dev": true,
+ "libc": [
+ "glibc"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-loong64-musl": {
+ "version": "4.62.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.62.2.tgz",
+ "integrity": "sha512-IxKLoxCQ2IWi6bT2akyDUBGsOImDKB+sPp4EsTmwFQ/fMwpCKm8uLSSgP/Kx/QYUgKis6SEZ5/Nlhup0DIA0PQ==",
+ "cpu": [
+ "loong64"
+ ],
+ "dev": true,
+ "libc": [
+ "musl"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-ppc64-gnu": {
+ "version": "4.62.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.62.2.tgz",
+ "integrity": "sha512-Mk5ha2RQSgyFfmYYLkBpPnUk8D8FriBxesO1u9O75X0mHgXL1UQcH5Itl2lurWL2tj0RxV9b9tJgipac0hRY9A==",
+ "cpu": [
+ "ppc64"
+ ],
+ "dev": true,
+ "libc": [
+ "glibc"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-ppc64-musl": {
+ "version": "4.62.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.62.2.tgz",
+ "integrity": "sha512-CjvEnqJL/0/TQ3TXX3OPIJ/kmBellrWd4heXUmHeJlTnmwjKpSJzoehLaL6Xk0ZnMHBu9dZuFADNOrtjF4v+2w==",
+ "cpu": [
+ "ppc64"
+ ],
+ "dev": true,
+ "libc": [
+ "musl"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-riscv64-gnu": {
+ "version": "4.62.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.62.2.tgz",
+ "integrity": "sha512-1SiZbzwdkaDURsew/tSOrooKiYy7EQGT6m8ufavAi9NEyQb/6VuIxFXAL1fqa4iZe3g4NbNk4P7J32z2tw5Mgg==",
+ "cpu": [
+ "riscv64"
+ ],
+ "dev": true,
+ "libc": [
+ "glibc"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-riscv64-musl": {
+ "version": "4.62.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.62.2.tgz",
+ "integrity": "sha512-nQts12zJ3NQRoE6uYljOH89v7szzLDvG2JD/vsX+vGXU8w/At1GowTZ5/7qeFQ8m7L55rpR8Okugnuo5bgjy2Q==",
+ "cpu": [
+ "riscv64"
+ ],
+ "dev": true,
+ "libc": [
+ "musl"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-s390x-gnu": {
+ "version": "4.62.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.62.2.tgz",
+ "integrity": "sha512-E9/ll019jhPIJgpzfZoIkBGhcz+kKNgVWYRY0zr9srBdPPFVpvOKW8VaJKUbeK+eZXyQF9ltME+Kk6affeaPgg==",
+ "cpu": [
+ "s390x"
+ ],
+ "dev": true,
+ "libc": [
+ "glibc"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-x64-gnu": {
+ "version": "4.62.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.62.2.tgz",
+ "integrity": "sha512-5BqxR/pshjey51iliyzTD5Xi3EN0aLmQ2lZ3lvefVV9c82BvrLo2/6OT55iifpWBufs6kdwWbuOKS841DrmK9A==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "libc": [
+ "glibc"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-x64-musl": {
+ "version": "4.62.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.62.2.tgz",
+ "integrity": "sha512-uNN83XxQrRAh/w0/pmAfibcwyb6YWt4gP+dpnQKPVJshAloQ785ii8CT8ZCIxkGg9opVsvAlGhFitSm6D1Jjpg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "libc": [
+ "musl"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-openbsd-x64": {
+ "version": "4.62.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.62.2.tgz",
+ "integrity": "sha512-srjEIxSH3LRnJN6THczDHWQplqEMFiAJrTab0msUryh9kwNpkICf3Ea6q6MN/2cZwRFUNx5w+h6Hpi4QuHS6Zg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openbsd"
+ ]
+ },
+ "node_modules/@rollup/rollup-openharmony-arm64": {
+ "version": "4.62.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.62.2.tgz",
+ "integrity": "sha512-8hOJnxgbyObnCm5AlRA3A931xX19xq80RjVTKgJOvEKWqJruP/Uf12IbAOaDjjEXYRewwHLfmF0YRIdK3OwKWA==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openharmony"
+ ]
+ },
+ "node_modules/@rollup/rollup-win32-arm64-msvc": {
+ "version": "4.62.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.62.2.tgz",
+ "integrity": "sha512-mmF4AY1i0hG/bLWUctUq59gtmgaSIRa3cu/A3JFRp/sCNEme2bgDEiDS22P9FbnJB8NJNF4jPJiSP5RHQpUTDg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ]
+ },
+ "node_modules/@rollup/rollup-win32-ia32-msvc": {
+ "version": "4.62.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.62.2.tgz",
+ "integrity": "sha512-DZgkknc6jhHrk46V25vbAM0zZkyP0nSDkJB8/dRkLTxv470dOmWDqGoEJl/9A0dFfS7yE3REOwNDxpHwSLSt0Q==",
+ "cpu": [
+ "ia32"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ]
+ },
+ "node_modules/@rollup/rollup-win32-x64-gnu": {
+ "version": "4.62.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.62.2.tgz",
+ "integrity": "sha512-T6xr6ucWSFto+VGajA8YH26LdpHRuP4YLHEKAtCWvJDOlnmWcDZVCI2Jmjr+IFHDlt2zRaTAKE4tfjTaWLgJBg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ]
+ },
+ "node_modules/@rollup/rollup-win32-x64-msvc": {
+ "version": "4.62.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.62.2.tgz",
+ "integrity": "sha512-BfzEnDJOt9T8M989/lA37EcJgat01wLRnoi5dQf3QzOH7jzpqTAzdDbVfRljVr5r+jzKqpbHeyOfAaXxAd0PAA==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ]
+ },
+ "node_modules/@scena/dragscroll": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/@scena/dragscroll/-/dragscroll-1.4.0.tgz",
+ "integrity": "sha512-3O8daaZD9VXA9CP3dra6xcgt/qrm0mg0xJCwiX6druCteQ9FFsXffkF8PrqxY4Z4VJ58fFKEa0RlKqbsi/XnRA==",
+ "license": "MIT",
+ "dependencies": {
+ "@daybrush/utils": "^1.6.0",
+ "@scena/event-emitter": "^1.0.2"
+ }
+ },
+ "node_modules/@scena/event-emitter": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/@scena/event-emitter/-/event-emitter-1.0.5.tgz",
+ "integrity": "sha512-AzY4OTb0+7ynefmWFQ6hxDdk0CySAq/D4efljfhtRHCOP7MBF9zUfhKG3TJiroVjASqVgkRJFdenS8ArZo6Olg==",
+ "license": "MIT",
+ "dependencies": {
+ "@daybrush/utils": "^1.1.1"
+ }
+ },
+ "node_modules/@scena/matrix": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/@scena/matrix/-/matrix-1.1.1.tgz",
+ "integrity": "sha512-JVKBhN0tm2Srl+Yt+Ywqu0oLgLcdemDQlD1OxmN9jaCTwaFPZ7tY8n6dhVgMEaR9qcR7r+kAlMXnSfNyYdE+Vg==",
+ "license": "MIT",
+ "dependencies": {
+ "@daybrush/utils": "^1.4.0"
+ }
+ },
+ "node_modules/@types/estree": {
+ "version": "1.0.9",
+ "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.9.tgz",
+ "integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@types/node": {
+ "version": "24.13.3",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-24.13.3.tgz",
+ "integrity": "sha512-Dh8vAsV36ig5wa9OX4pXvMc9D3Veibfw2wix0CUwYODLD8nkj9UsLjASr49nPg+2eKzxhBV+v7L8pXvT4e639Q==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "undici-types": "~7.18.0"
+ }
+ },
+ "node_modules/@types/reveal.js": {
+ "version": "5.2.2",
+ "resolved": "https://registry.npmjs.org/@types/reveal.js/-/reveal.js-5.2.2.tgz",
+ "integrity": "sha512-U6wdIeFZPR77zjaZCrFNPzKjjfdFr4Dj0WUAZ+UYgXGjwqYCnjpCngeS0hb+28FLL0QzE9jXBikvB7xxAQi5sg==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/braces": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
+ "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "fill-range": "^7.1.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/croact": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/croact/-/croact-1.0.4.tgz",
+ "integrity": "sha512-9GhvyzTY/IVUrMQ2iz/mzgZ8+NcjczmIo/t4FkC1CU0CEcau6v6VsEih4jkTa4ZmRgYTF0qXEZLObCzdDFplpw==",
+ "license": "MIT",
+ "dependencies": {
+ "@daybrush/utils": "^1.13.0",
+ "@egjs/list-differ": "^1.0.0"
+ }
+ },
+ "node_modules/croact-css-styled": {
+ "version": "1.1.9",
+ "resolved": "https://registry.npmjs.org/croact-css-styled/-/croact-css-styled-1.1.9.tgz",
+ "integrity": "sha512-G7yvRiVJ3Eoj0ov2h2xR4312hpOzATay2dGS9clK8yJQothjH1sBXIyvOeRP5wBKD9mPcKcoUXPCPsl0tQog4w==",
+ "license": "MIT",
+ "dependencies": {
+ "@daybrush/utils": "^1.13.0",
+ "css-styled": "~1.0.8",
+ "framework-utils": "^1.1.0"
+ }
+ },
+ "node_modules/croact-moveable": {
+ "version": "0.9.0",
+ "resolved": "https://registry.npmjs.org/croact-moveable/-/croact-moveable-0.9.0.tgz",
+ "integrity": "sha512-fc3bieV6CdqqZFtzsSLi9KmvUMFW3oakUfhPCls1BxKjOfUfn8rktteGED2341A/Qghy8tI3Hm6SdocIc68IKg==",
+ "license": "MIT",
+ "dependencies": {
+ "@daybrush/utils": "^1.13.0",
+ "@egjs/agent": "^2.2.1",
+ "@egjs/children-differ": "^1.0.1",
+ "@egjs/list-differ": "^1.0.0",
+ "@scena/dragscroll": "^1.4.0",
+ "@scena/event-emitter": "^1.0.5",
+ "@scena/matrix": "^1.1.1",
+ "croact-css-styled": "^1.1.9",
+ "css-to-mat": "^1.1.1",
+ "framework-utils": "^1.1.0",
+ "gesto": "^1.19.3",
+ "overlap-area": "^1.1.0",
+ "react-css-styled": "^1.1.9",
+ "react-moveable": "~0.56.0"
+ },
+ "peerDependencies": {
+ "croact": "^1.0.4"
+ }
+ },
+ "node_modules/css-styled": {
+ "version": "1.0.8",
+ "resolved": "https://registry.npmjs.org/css-styled/-/css-styled-1.0.8.tgz",
+ "integrity": "sha512-tCpP7kLRI8dI95rCh3Syl7I+v7PP+2JYOzWkl0bUEoSbJM+u8ITbutjlQVf0NC2/g4ULROJPi16sfwDIO8/84g==",
+ "license": "MIT",
+ "dependencies": {
+ "@daybrush/utils": "^1.13.0"
+ }
+ },
+ "node_modules/css-to-mat": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/css-to-mat/-/css-to-mat-1.1.1.tgz",
+ "integrity": "sha512-kvpxFYZb27jRd2vium35G7q5XZ2WJ9rWjDUMNT36M3Hc41qCrLXFM5iEKMGXcrPsKfXEN+8l/riB4QzwwwiEyQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@daybrush/utils": "^1.13.0",
+ "@scena/matrix": "^1.0.0"
+ }
+ },
+ "node_modules/esbuild": {
+ "version": "0.28.1",
+ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.28.1.tgz",
+ "integrity": "sha512-HrJrvZv5ayxBzPfwphOoNzkzOIIlifzk0KJrGK2c8R4+LKpMtpYLQeUdjnwjWv/LZlkH2laZk+4w78pi99D4Vw==",
+ "dev": true,
+ "hasInstallScript": true,
+ "license": "MIT",
+ "bin": {
+ "esbuild": "bin/esbuild"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "optionalDependencies": {
+ "@esbuild/aix-ppc64": "0.28.1",
+ "@esbuild/android-arm": "0.28.1",
+ "@esbuild/android-arm64": "0.28.1",
+ "@esbuild/android-x64": "0.28.1",
+ "@esbuild/darwin-arm64": "0.28.1",
+ "@esbuild/darwin-x64": "0.28.1",
+ "@esbuild/freebsd-arm64": "0.28.1",
+ "@esbuild/freebsd-x64": "0.28.1",
+ "@esbuild/linux-arm": "0.28.1",
+ "@esbuild/linux-arm64": "0.28.1",
+ "@esbuild/linux-ia32": "0.28.1",
+ "@esbuild/linux-loong64": "0.28.1",
+ "@esbuild/linux-mips64el": "0.28.1",
+ "@esbuild/linux-ppc64": "0.28.1",
+ "@esbuild/linux-riscv64": "0.28.1",
+ "@esbuild/linux-s390x": "0.28.1",
+ "@esbuild/linux-x64": "0.28.1",
+ "@esbuild/netbsd-arm64": "0.28.1",
+ "@esbuild/netbsd-x64": "0.28.1",
+ "@esbuild/openbsd-arm64": "0.28.1",
+ "@esbuild/openbsd-x64": "0.28.1",
+ "@esbuild/openharmony-arm64": "0.28.1",
+ "@esbuild/sunos-x64": "0.28.1",
+ "@esbuild/win32-arm64": "0.28.1",
+ "@esbuild/win32-ia32": "0.28.1",
+ "@esbuild/win32-x64": "0.28.1"
+ }
+ },
+ "node_modules/fdir": {
+ "version": "6.5.0",
+ "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz",
+ "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=12.0.0"
+ },
+ "peerDependencies": {
+ "picomatch": "^3 || ^4"
+ },
+ "peerDependenciesMeta": {
+ "picomatch": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/fill-range": {
+ "version": "7.1.1",
+ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
+ "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "to-regex-range": "^5.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/framework-utils": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/framework-utils/-/framework-utils-1.1.0.tgz",
+ "integrity": "sha512-KAfqli5PwpFJ8o3psRNs8svpMGyCSAe8nmGcjQ0zZBWN2H6dZDnq+ABp3N3hdUmFeMrLtjOCTXD4yplUJIWceg==",
+ "license": "MIT"
+ },
+ "node_modules/fsevents": {
+ "version": "2.3.3",
+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
+ "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
+ "dev": true,
+ "hasInstallScript": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
+ }
+ },
+ "node_modules/gesto": {
+ "version": "1.19.4",
+ "resolved": "https://registry.npmjs.org/gesto/-/gesto-1.19.4.tgz",
+ "integrity": "sha512-hfr/0dWwh0Bnbb88s3QVJd1ZRJeOWcgHPPwmiH6NnafDYvhTsxg+SLYu+q/oPNh9JS3V+nlr6fNs8kvPAtcRDQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@daybrush/utils": "^1.13.0",
+ "@scena/event-emitter": "^1.0.2"
+ }
+ },
+ "node_modules/gsap": {
+ "version": "3.15.0",
+ "resolved": "https://registry.npmjs.org/gsap/-/gsap-3.15.0.tgz",
+ "integrity": "sha512-dMW4CWBTUK1AEEDeZc1g4xpPGIrSf9fJF960qbTZmN/QwZIWY5wgliS6JWl9/25fpTGJrMRtSjGtOmPnfjZB+A==",
+ "license": "Standard 'no charge' license: https://gsap.com/standard-license."
+ },
+ "node_modules/is-number": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
+ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.12.0"
+ }
+ },
+ "node_modules/keycode": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/keycode/-/keycode-2.2.1.tgz",
+ "integrity": "sha512-Rdgz9Hl9Iv4QKi8b0OlCRQEzp4AgVxyCtz5S/+VIHezDmrDhkp2N2TqBWOLz0/gbeREXOOiI9/4b8BY9uw2vFg==",
+ "license": "MIT"
+ },
+ "node_modules/keycon": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/keycon/-/keycon-1.4.0.tgz",
+ "integrity": "sha512-p1NAIxiRMH3jYfTeXRs2uWbVJ1WpEjpi8ktzUyBJsX7/wn2qu2VRXktneBLNtKNxJmlUYxRi9gOJt1DuthXR7A==",
+ "license": "MIT",
+ "dependencies": {
+ "@cfcs/core": "^0.0.6",
+ "@daybrush/utils": "^1.7.1",
+ "@scena/event-emitter": "^1.0.2",
+ "keycode": "^2.2.0"
+ }
+ },
+ "node_modules/micromatch": {
+ "version": "4.0.8",
+ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz",
+ "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "braces": "^3.0.3",
+ "picomatch": "^2.3.1"
+ },
+ "engines": {
+ "node": ">=8.6"
+ }
+ },
+ "node_modules/micromatch/node_modules/picomatch": {
+ "version": "2.3.2",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz",
+ "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8.6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/jonschlinkert"
+ }
+ },
+ "node_modules/moveable": {
+ "version": "0.53.0",
+ "resolved": "https://registry.npmjs.org/moveable/-/moveable-0.53.0.tgz",
+ "integrity": "sha512-71jS9zIoQzMhnNvduhg4tUEdm23+fO/40FN7muVMbZvVwbTku2MIxxLhnU4qFvxI4oVxn75l79SbtgjuA+s7Pw==",
+ "license": "MIT",
+ "dependencies": {
+ "@daybrush/utils": "^1.13.0",
+ "@scena/event-emitter": "^1.0.5",
+ "croact": "^1.0.4",
+ "croact-moveable": "~0.9.0",
+ "react-moveable": "~0.56.0"
+ }
+ },
+ "node_modules/nanoid": {
+ "version": "3.3.16",
+ "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.16.tgz",
+ "integrity": "sha512-bzlKTyNJ7+LdGIIwy8ijFpIqEQIvafahV7eYykJ8Cvh42EdJeODoJ6gUJXpQJvej1BddH8OqTXZNE/KfbWAu8Q==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "license": "MIT",
+ "bin": {
+ "nanoid": "bin/nanoid.cjs"
+ },
+ "engines": {
+ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
+ }
+ },
+ "node_modules/overlap-area": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/overlap-area/-/overlap-area-1.1.0.tgz",
+ "integrity": "sha512-3dlJgJCaVeXH0/eZjYVJvQiLVVrPO4U1ZGqlATtx6QGO3b5eNM6+JgUKa7oStBTdYuGTk7gVoABCW6Tp+dhRdw==",
+ "license": "MIT",
+ "dependencies": {
+ "@daybrush/utils": "^1.7.1"
+ }
+ },
+ "node_modules/picocolors": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
+ "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",
+ "dev": true,
+ "license": "ISC"
+ },
+ "node_modules/picomatch": {
+ "version": "4.0.5",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.5.tgz",
+ "integrity": "sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/jonschlinkert"
+ }
+ },
+ "node_modules/postcss": {
+ "version": "8.5.19",
+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.19.tgz",
+ "integrity": "sha512-Mz8SaolMd8nB+G13WkORcxQKHZ/NE4xXevtkJHVuG+guo9/wYKlIMTKAqGdEmYOXR2ijPjTYNHssizdaVSUNdQ==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/postcss/"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/postcss"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "nanoid": "^3.3.12",
+ "picocolors": "^1.1.1",
+ "source-map-js": "^1.2.1"
+ },
+ "engines": {
+ "node": "^10 || ^12 || >=14"
+ }
+ },
+ "node_modules/react-css-styled": {
+ "version": "1.1.9",
+ "resolved": "https://registry.npmjs.org/react-css-styled/-/react-css-styled-1.1.9.tgz",
+ "integrity": "sha512-M7fJZ3IWFaIHcZEkoFOnkjdiUFmwd8d+gTh2bpqMOcnxy/0Gsykw4dsL4QBiKsxcGow6tETUa4NAUcmJF+/nfw==",
+ "license": "MIT",
+ "dependencies": {
+ "css-styled": "~1.0.8",
+ "framework-utils": "^1.1.0"
+ }
+ },
+ "node_modules/react-moveable": {
+ "version": "0.56.0",
+ "resolved": "https://registry.npmjs.org/react-moveable/-/react-moveable-0.56.0.tgz",
+ "integrity": "sha512-FmJNmIOsOA36mdxbrc/huiE4wuXSRlmon/o+/OrfNhSiYYYL0AV5oObtPluEhb2Yr/7EfYWBHTxF5aWAvjg1SA==",
+ "license": "MIT",
+ "dependencies": {
+ "@daybrush/utils": "^1.13.0",
+ "@egjs/agent": "^2.2.1",
+ "@egjs/children-differ": "^1.0.1",
+ "@egjs/list-differ": "^1.0.0",
+ "@scena/dragscroll": "^1.4.0",
+ "@scena/event-emitter": "^1.0.5",
+ "@scena/matrix": "^1.1.1",
+ "css-to-mat": "^1.1.1",
+ "framework-utils": "^1.1.0",
+ "gesto": "^1.19.3",
+ "overlap-area": "^1.1.0",
+ "react-css-styled": "^1.1.9",
+ "react-selecto": "^1.25.0"
+ }
+ },
+ "node_modules/react-selecto": {
+ "version": "1.26.3",
+ "resolved": "https://registry.npmjs.org/react-selecto/-/react-selecto-1.26.3.tgz",
+ "integrity": "sha512-Ubik7kWSnZyQEBNro+1k38hZaI1tJarE+5aD/qsqCOA1uUBSjgKVBy3EWRzGIbdmVex7DcxznFZLec/6KZNvwQ==",
+ "license": "MIT",
+ "dependencies": {
+ "selecto": "~1.26.3"
+ }
+ },
+ "node_modules/reveal.js": {
+ "version": "5.2.1",
+ "resolved": "https://registry.npmjs.org/reveal.js/-/reveal.js-5.2.1.tgz",
+ "integrity": "sha512-r7//6mIM5p34hFiDMvYfXgyjXqGRta+/psd9YtytsgRlrpRzFv4RbH76TXd2qD+7ZPZEbpBDhdRhJaFgfQ7zNQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/rollup": {
+ "version": "4.62.2",
+ "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.62.2.tgz",
+ "integrity": "sha512-RFnrW4lhXA3s3eqHDZvN654g8OTjzRfqpIRJYczCGB6HzphckVAi/Qh4tbPUbRuDi7s1Llv8g/NspLkttY3gTA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/estree": "1.0.9"
+ },
+ "bin": {
+ "rollup": "dist/bin/rollup"
+ },
+ "engines": {
+ "node": ">=18.0.0",
+ "npm": ">=8.0.0"
+ },
+ "optionalDependencies": {
+ "@rollup/rollup-android-arm-eabi": "4.62.2",
+ "@rollup/rollup-android-arm64": "4.62.2",
+ "@rollup/rollup-darwin-arm64": "4.62.2",
+ "@rollup/rollup-darwin-x64": "4.62.2",
+ "@rollup/rollup-freebsd-arm64": "4.62.2",
+ "@rollup/rollup-freebsd-x64": "4.62.2",
+ "@rollup/rollup-linux-arm-gnueabihf": "4.62.2",
+ "@rollup/rollup-linux-arm-musleabihf": "4.62.2",
+ "@rollup/rollup-linux-arm64-gnu": "4.62.2",
+ "@rollup/rollup-linux-arm64-musl": "4.62.2",
+ "@rollup/rollup-linux-loong64-gnu": "4.62.2",
+ "@rollup/rollup-linux-loong64-musl": "4.62.2",
+ "@rollup/rollup-linux-ppc64-gnu": "4.62.2",
+ "@rollup/rollup-linux-ppc64-musl": "4.62.2",
+ "@rollup/rollup-linux-riscv64-gnu": "4.62.2",
+ "@rollup/rollup-linux-riscv64-musl": "4.62.2",
+ "@rollup/rollup-linux-s390x-gnu": "4.62.2",
+ "@rollup/rollup-linux-x64-gnu": "4.62.2",
+ "@rollup/rollup-linux-x64-musl": "4.62.2",
+ "@rollup/rollup-openbsd-x64": "4.62.2",
+ "@rollup/rollup-openharmony-arm64": "4.62.2",
+ "@rollup/rollup-win32-arm64-msvc": "4.62.2",
+ "@rollup/rollup-win32-ia32-msvc": "4.62.2",
+ "@rollup/rollup-win32-x64-gnu": "4.62.2",
+ "@rollup/rollup-win32-x64-msvc": "4.62.2",
+ "fsevents": "~2.3.2"
+ }
+ },
+ "node_modules/selecto": {
+ "version": "1.26.3",
+ "resolved": "https://registry.npmjs.org/selecto/-/selecto-1.26.3.tgz",
+ "integrity": "sha512-gZHgqMy5uyB6/2YDjv3Qqaf7bd2hTDOpPdxXlrez4R3/L0GiEWDCFaUfrflomgqdb3SxHF2IXY0Jw0EamZi7cw==",
+ "license": "MIT",
+ "dependencies": {
+ "@daybrush/utils": "^1.13.0",
+ "@egjs/children-differ": "^1.0.1",
+ "@scena/dragscroll": "^1.4.0",
+ "@scena/event-emitter": "^1.0.5",
+ "css-styled": "^1.0.8",
+ "css-to-mat": "^1.1.1",
+ "framework-utils": "^1.1.0",
+ "gesto": "^1.19.4",
+ "keycon": "^1.2.0",
+ "overlap-area": "^1.1.0"
+ }
+ },
+ "node_modules/source-map-js": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",
+ "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==",
+ "dev": true,
+ "license": "BSD-3-Clause",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/tinyglobby": {
+ "version": "0.2.17",
+ "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz",
+ "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "fdir": "^6.5.0",
+ "picomatch": "^4.0.4"
+ },
+ "engines": {
+ "node": ">=12.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/SuperchupuDev"
+ }
+ },
+ "node_modules/to-regex-range": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
+ "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "is-number": "^7.0.0"
+ },
+ "engines": {
+ "node": ">=8.0"
+ }
+ },
+ "node_modules/typescript": {
+ "version": "5.8.3",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz",
+ "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "bin": {
+ "tsc": "bin/tsc",
+ "tsserver": "bin/tsserver"
+ },
+ "engines": {
+ "node": ">=14.17"
+ }
+ },
+ "node_modules/undici-types": {
+ "version": "7.18.2",
+ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.18.2.tgz",
+ "integrity": "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/vite": {
+ "version": "7.3.6",
+ "resolved": "https://registry.npmjs.org/vite/-/vite-7.3.6.tgz",
+ "integrity": "sha512-4XP60spRGjSZFf1qYH+dJIkK2znL3zQfl9KkOV9MkkRR/3Dls0dxaBsQPTloEc5BLXWPL9vsOxopxyKoMmDueg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "esbuild": "^0.27.0 || ^0.28.0",
+ "fdir": "^6.5.0",
+ "picomatch": "^4.0.3",
+ "postcss": "^8.5.6",
+ "rollup": "^4.43.0",
+ "tinyglobby": "^0.2.15"
+ },
+ "bin": {
+ "vite": "bin/vite.js"
+ },
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ },
+ "funding": {
+ "url": "https://github.com/vitejs/vite?sponsor=1"
+ },
+ "optionalDependencies": {
+ "fsevents": "~2.3.3"
+ },
+ "peerDependencies": {
+ "@types/node": "^20.19.0 || >=22.12.0",
+ "jiti": ">=1.21.0",
+ "less": "^4.0.0",
+ "lightningcss": "^1.21.0",
+ "sass": "^1.70.0",
+ "sass-embedded": "^1.70.0",
+ "stylus": ">=0.54.8",
+ "sugarss": "^5.0.0",
+ "terser": "^5.16.0",
+ "tsx": "^4.8.1",
+ "yaml": "^2.4.2"
+ },
+ "peerDependenciesMeta": {
+ "@types/node": {
+ "optional": true
+ },
+ "jiti": {
+ "optional": true
+ },
+ "less": {
+ "optional": true
+ },
+ "lightningcss": {
+ "optional": true
+ },
+ "sass": {
+ "optional": true
+ },
+ "sass-embedded": {
+ "optional": true
+ },
+ "stylus": {
+ "optional": true
+ },
+ "sugarss": {
+ "optional": true
+ },
+ "terser": {
+ "optional": true
+ },
+ "tsx": {
+ "optional": true
+ },
+ "yaml": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/vite-plugin-singlefile": {
+ "version": "2.3.3",
+ "resolved": "https://registry.npmjs.org/vite-plugin-singlefile/-/vite-plugin-singlefile-2.3.3.tgz",
+ "integrity": "sha512-XVnGH0QzbOa8fxRSsHdCarVN1BSBXNi7uLMQYlrGRN5apdHkk62XQWRJhVever0lnfuyBkwn+kvVChdm/OoOUg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "micromatch": "^4.0.8"
+ },
+ "engines": {
+ "node": ">18.0.0"
+ },
+ "peerDependencies": {
+ "rollup": "^4.59.0",
+ "vite": "^5.4.21 || ^6.0.0 || ^7.0.0 || ^8.0.0"
+ },
+ "peerDependenciesMeta": {
+ "rollup": {
+ "optional": true
+ }
+ }
+ }
+ }
+}
diff --git a/slides/package.json b/slides/package.json
new file mode 100644
index 00000000..a702a88f
--- /dev/null
+++ b/slides/package.json
@@ -0,0 +1,25 @@
+{
+ "name": "bento-slides",
+ "private": true,
+ "version": "0.1.0",
+ "type": "module",
+ "scripts": {
+ "dev": "vite",
+ "build": "tsc -b && vite build",
+ "build:single": "tsc -b && SINGLEFILE=1 vite build --outDir dist-single && mv dist-single/index.html dist-single/Bento_Slides.bento.html",
+ "preview": "vite preview"
+ },
+ "dependencies": {
+ "gsap": "^3.12.7",
+ "moveable": "^0.53.0",
+ "reveal.js": "^5.2.1",
+ "selecto": "^1.26.3"
+ },
+ "devDependencies": {
+ "@types/node": "^24.13.2",
+ "@types/reveal.js": "^5.2.1",
+ "typescript": "~5.8.3",
+ "vite": "^7.1.1",
+ "vite-plugin-singlefile": "^2.3.3"
+ }
+}
diff --git a/slides/src/editor/canvas.ts b/slides/src/editor/canvas.ts
new file mode 100644
index 00000000..f1ffa792
--- /dev/null
+++ b/slides/src/editor/canvas.ts
@@ -0,0 +1,281 @@
+// The editing canvas: renders the current slide at fit-to-window scale and
+// wires Moveable (drag/resize/rotate/snap) + Selecto (click & rubber-band
+// selection) + contenteditable text editing on top of it.
+
+import Moveable from 'moveable'
+import Selecto from 'selecto'
+import type { Store } from '../store'
+import type { SlideElement } from '../model'
+import { renderSlide, sanitizeHtml } from '../render'
+
+export class SlideCanvas {
+ private stage: HTMLElement
+ private scaleHost: HTMLElement
+ private surface: HTMLElement | null = null
+ private moveable: Moveable
+ private selecto: Selecto
+ private scale = 1
+ private editing: HTMLElement | null = null
+
+ constructor(
+ private wrap: HTMLElement,
+ private store: Store,
+ ) {
+ this.stage = document.createElement('div')
+ this.stage.className = 'ed-stage'
+ this.scaleHost = document.createElement('div')
+ this.scaleHost.className = 'ed-stage-scale'
+ this.stage.appendChild(this.scaleHost)
+ wrap.appendChild(this.stage)
+
+ // Control box lives INSIDE the scaled host with rootContainer at body:
+ // Moveable then works in slide-local coordinates (e.left/e.top are model
+ // px), and `zoom` compensates the handles' visual size (set in relayout).
+ this.moveable = new Moveable(this.scaleHost, {
+ rootContainer: document.body,
+ draggable: true,
+ resizable: true,
+ rotatable: true,
+ origin: false,
+ snappable: true,
+ snapThreshold: 6,
+ snapDirections: { top: true, left: true, bottom: true, right: true, center: true, middle: true },
+ elementSnapDirections: { top: true, left: true, bottom: true, right: true, center: true, middle: true },
+ isDisplaySnapDigit: false,
+ throttleRotate: 1,
+ rotationPosition: 'top',
+ renderDirections: ['nw', 'n', 'ne', 'w', 'e', 'sw', 's', 'se'],
+ })
+
+ this.selecto = new Selecto({
+ container: this.stage,
+ dragContainer: this.stage,
+ selectableTargets: ['.bento-el'],
+ selectByClick: true,
+ selectFromInside: false,
+ toggleContinueSelect: 'shift',
+ hitRate: 0,
+ })
+
+ this.wireMoveable()
+ this.wireSelecto()
+
+ this.stage.addEventListener('dblclick', (ev) => {
+ const el = (ev.target as HTMLElement).closest<HTMLElement>('.bento-el-text')
+ if (el) this.startTextEdit(el)
+ })
+
+ new ResizeObserver(() => this.relayout()).observe(wrap)
+
+ store.on('current', () => this.render())
+ store.on('doc', () => this.render())
+ store.on('selection', () => this.syncTargets())
+
+ this.render()
+ }
+
+ // --- layout & rendering ---------------------------------------------------
+
+ relayout() {
+ const { width, height } = this.store.doc.size
+ const availW = this.wrap.clientWidth - 64
+ const availH = this.wrap.clientHeight - 64
+ if (availW <= 0 || availH <= 0) return
+ this.scale = Math.min(availW / width, availH / height)
+ this.stage.style.width = `${width * this.scale}px`
+ this.stage.style.height = `${height * this.scale}px`
+ this.scaleHost.style.transform = `scale(${this.scale})`
+ this.moveable.zoom = 1 / this.scale
+ this.moveable.updateRect()
+ }
+
+ render() {
+ this.commitTextEdit()
+ const next = renderSlide(this.store.slide, this.store.doc)
+ if (this.surface) this.surface.replaceWith(next)
+ else this.scaleHost.appendChild(next)
+ this.surface = next
+ this.relayout()
+ this.syncTargets()
+ }
+
+ private selectedNodes(): HTMLElement[] {
+ if (!this.surface) return []
+ return this.store.selection
+ .map((id) => this.surface!.querySelector<HTMLElement>(`[data-el-id="${CSS.escape(id)}"]`))
+ .filter((n): n is HTMLElement => !!n)
+ }
+
+ private syncTargets() {
+ const targets = this.editing ? [] : this.selectedNodes()
+ // snap against slide bounds/center and every non-selected element
+ const others = this.surface
+ ? [this.surface, ...Array.from(this.surface.querySelectorAll<HTMLElement>('.bento-el'))].filter(
+ (n) => !targets.includes(n),
+ )
+ : []
+ this.moveable.elementGuidelines = others
+ // Only reset targets when they actually changed — setting the same array
+ // re-attaches gesture listeners a frame later and can swallow a drag that
+ // starts immediately after.
+ const current = (this.moveable.target ?? []) as HTMLElement[]
+ const same = current.length === targets.length && targets.every((t, i) => current[i] === t)
+ if (!same) this.moveable.target = targets
+ this.moveable.updateRect()
+ }
+
+ // --- moveable -------------------------------------------------------------
+
+ private wireMoveable() {
+ const mv = this.moveable
+
+ mv.on('drag', (e) => {
+ e.target.style.left = `${e.left}px`
+ e.target.style.top = `${e.top}px`
+ })
+ mv.on('dragGroup', (e) => e.events.forEach((ev) => {
+ ev.target.style.left = `${ev.left}px`
+ ev.target.style.top = `${ev.top}px`
+ }))
+ mv.on('resize', (e) => {
+ e.target.style.width = `${e.width}px`
+ e.target.style.height = `${e.height}px`
+ e.target.style.left = `${e.drag.left}px`
+ e.target.style.top = `${e.drag.top}px`
+ })
+ mv.on('rotate', (e) => {
+ e.target.style.transform = `rotate(${e.rotation}deg)`
+ })
+ mv.on('rotateGroup', (e) => e.events.forEach((ev) => {
+ ev.target.style.transform = ev.transform
+ }))
+
+ const commitFrames = () => this.commitDomFrames(this.selectedNodes())
+ mv.on('dragEnd', ({ isDrag }) => isDrag && commitFrames())
+ mv.on('dragGroupEnd', ({ isDrag }) => isDrag && commitFrames())
+ mv.on('resizeEnd', ({ isDrag }) => isDrag && commitFrames())
+ mv.on('rotateEnd', ({ isDrag }) => isDrag && commitFrames())
+ mv.on('rotateGroupEnd', ({ isDrag }) => isDrag && commitFrames())
+ }
+
+ /** Read live DOM styles back into the model in one undo step. */
+ private commitDomFrames(nodes: HTMLElement[]) {
+ if (!nodes.length) return
+ const frames = nodes.map((node) => {
+ const rotation = /rotate\((-?[\d.]+)deg\)/.exec(node.style.transform)
+ return {
+ id: node.dataset.elId!,
+ x: parseFloat(node.style.left) || 0,
+ y: parseFloat(node.style.top) || 0,
+ w: parseFloat(node.style.width) || 1,
+ h: parseFloat(node.style.height) || 1,
+ rotation: rotation ? Math.round(parseFloat(rotation[1]) * 10) / 10 : 0,
+ }
+ })
+ this.store.commit(() => {
+ for (const f of frames) {
+ const el = this.store.element(f.id)
+ if (!el) continue
+ el.x = Math.round(f.x * 10) / 10
+ el.y = Math.round(f.y * 10) / 10
+ el.w = Math.round(f.w * 10) / 10
+ el.h = Math.round(f.h * 10) / 10
+ el.rotation = f.rotation
+ }
+ })
+ }
+
+ // --- selecto ----------------------------------------------------------------
+
+ private wireSelecto() {
+ this.selecto.on('dragStart', (e) => {
+ const target = e.inputEvent.target as HTMLElement
+ if (this.editing) {
+ // clicking outside the text being edited commits it; inside, do nothing
+ if (!this.editing.contains(target)) this.commitTextEdit()
+ e.stop()
+ return
+ }
+ const selected = this.selectedNodes()
+ if (
+ this.moveable.isMoveableElement(target) ||
+ selected.some((n) => n === target || n.contains(target))
+ ) {
+ e.stop() // let Moveable take the drag
+ }
+ })
+
+ this.selecto.on('selectEnd', (e) => {
+ const ids = (e.selected as HTMLElement[])
+ .map((n) => n.dataset.elId)
+ .filter((id): id is string => !!id)
+ this.store.select(ids)
+ if (e.isDragStartEnd) {
+ e.inputEvent.preventDefault()
+ this.moveable.waitToChangeTarget().then(() => {
+ this.moveable.dragStart(e.inputEvent)
+ })
+ }
+ })
+ }
+
+ // --- text editing -----------------------------------------------------------
+
+ startTextEdit(node: HTMLElement) {
+ if (this.editing === node) return
+ this.commitTextEdit()
+ const inner = node.querySelector<HTMLElement>('.bento-text-inner')
+ if (!inner) return
+ this.editing = node
+ node.classList.add('bento-editing')
+ inner.contentEditable = 'true'
+ inner.focus()
+ document.getSelection()?.selectAllChildren(inner)
+ this.syncTargets()
+
+ inner.addEventListener('keydown', (ev) => {
+ ev.stopPropagation() // keep global shortcuts (Delete, arrows…) away
+ if (ev.key === 'Escape') {
+ ev.preventDefault()
+ this.commitTextEdit()
+ }
+ })
+ inner.addEventListener('blur', () => this.commitTextEdit(), { once: true })
+ }
+
+ commitTextEdit() {
+ const node = this.editing
+ if (!node) return
+ this.editing = null
+ const inner = node.querySelector<HTMLElement>('.bento-text-inner')
+ const id = node.dataset.elId
+ node.classList.remove('bento-editing')
+ if (!inner || !id) return
+ inner.contentEditable = 'false'
+ const html = sanitizeHtml(inner.innerHTML)
+ const grownH = Math.max(parseFloat(node.style.height) || 0, inner.scrollHeight)
+ const el = this.store.element(id)
+ if (el && el.type === 'text' && (el.html !== html || grownH > el.h)) {
+ this.store.commit(() => {
+ el.html = html
+ if (grownH > el.h) el.h = Math.ceil(grownH)
+ })
+ } else {
+ this.syncTargets()
+ }
+ }
+
+ get isEditingText() {
+ return !!this.editing
+ }
+
+ /** Insert an element, select it, and (for text) drop straight into editing. */
+ insert(el: SlideElement, startEditing = false) {
+ this.store.commit(() => this.store.slide.elements.push(el))
+ this.store.select([el.id])
+ if (startEditing && el.type === 'text') {
+ const node = this.surface?.querySelector<HTMLElement>(`[data-el-id="${CSS.escape(el.id)}"]`)
+ if (node) this.startTextEdit(node)
+ }
+ }
+}
diff --git a/slides/src/editor/editor.ts b/slides/src/editor/editor.ts
new file mode 100644
index 00000000..66902461
--- /dev/null
+++ b/slides/src/editor/editor.ts
@@ -0,0 +1,411 @@
+// Editor shell: topbar, slide sidebar, canvas, properties panel, keyboard
+// shortcuts, save & present wiring.
+
+import type { Store } from '../store'
+import {
+ defaultImage, defaultShape, defaultText, emptySlide, uid,
+ type ShapeKind, type SlideElement,
+} from '../model'
+import { renderThumbnail } from '../render'
+import { SlideCanvas } from './canvas'
+import { PropsPanel } from './panels'
+import { startPresentation } from '../present'
+import { saveFile } from '../save'
+import { ICONS } from '../icons'
+
+const SHAPE_MENU: Array<{ kind: ShapeKind; label: string; icon: string }> = [
+ { kind: 'rect', label: 'Rectangle', icon: ICONS.rect },
+ { kind: 'ellipse', label: 'Ellipse', icon: ICONS.ellipse },
+ { kind: 'triangle', label: 'Triangle', icon: ICONS.triangle },
+ { kind: 'arrow', label: 'Arrow', icon: ICONS.arrow },
+ { kind: 'line', label: 'Line', icon: ICONS.line },
+]
+
+export class Editor {
+ private canvas!: SlideCanvas
+ private sidebar!: HTMLElement
+ private dirtyDot!: HTMLElement
+ private thumbTimer = 0
+ private clipboard: SlideElement[] = []
+ private presenting = false
+
+ constructor(
+ private root: HTMLElement,
+ private store: Store,
+ ) {
+ this.build()
+ this.wireKeyboard()
+ store.on('slides', () => this.rebuildSidebar())
+ store.on('current', () => this.highlightSidebar())
+ store.on('doc', () => this.scheduleThumbs())
+ store.on('dirty', () => {
+ this.dirtyDot.classList.toggle('on', store.dirty)
+ })
+ window.addEventListener('beforeunload', (ev) => {
+ if (store.dirty) ev.preventDefault()
+ })
+ this.rebuildSidebar()
+ }
+
+ // --- DOM ----------------------------------------------------------------
+
+ private build() {
+ this.root.innerHTML = ''
+ this.root.className = 'ed-root'
+
+ // topbar
+ const bar = div('ed-topbar')
+ const logo = div('ed-logo')
+ logo.innerHTML = `<span class="ed-logo-mark">🍱</span> <b>Bento</b>&nbsp;Slides`
+ const title = document.createElement('input')
+ title.className = 'ed-title'
+ title.value = this.store.doc.title
+ title.spellcheck = false
+ title.addEventListener('change', () => {
+ this.store.commit(() => { this.store.doc.title = title.value || 'Untitled' })
+ document.title = `${this.store.doc.title} — Bento Slides`
+ })
+ this.dirtyDot = div('ed-dirty')
+ this.dirtyDot.title = 'Unsaved changes'
+
+ const insert = div('ed-group')
+ insert.append(
+ btn(ICONS.text, 'Text', () => this.canvas.insert(defaultText({ y: 120 + Math.random() * 200 }), true)),
+ this.shapeDropdown(),
+ btn(ICONS.image, 'Image', () => this.pickImage()),
+ )
+
+ const actions = div('ed-group ed-group-right')
+ const undoB = btn(ICONS.undo, '', () => this.store.undo(), 'Undo (⌘Z)')
+ const redoB = btn(ICONS.redo, '', () => this.store.redo(), 'Redo (⇧⌘Z)')
+ const presentB = btn(ICONS.play, 'Present', () => this.present(), 'Present from current slide')
+ presentB.classList.add('ed-btn-primary')
+ const saveB = btn(ICONS.save, 'Save', () => this.save(false), 'Save (⌘S)')
+ const saveAsB = btn(ICONS.download, '', () => this.save(true), 'Save a copy…')
+ actions.append(undoB, redoB, presentB, saveB, saveAsB)
+
+ bar.append(logo, title, this.dirtyDot, insert, actions)
+
+ // main area
+ const main = div('ed-main')
+ this.sidebar = div('ed-sidebar')
+ const canvasWrap = div('ed-canvas-wrap')
+ const props = div('ed-props')
+ main.append(this.sidebar, canvasWrap, props)
+
+ this.root.append(bar, main)
+
+ this.canvas = new SlideCanvas(canvasWrap, this.store)
+ new PropsPanel(props, this.store)
+ }
+
+ private shapeDropdown(): HTMLElement {
+ const wrap = div('ed-dropdown')
+ const trigger = btn(ICONS.shapes, 'Shape', () => wrap.classList.toggle('open'))
+ const menu = div('ed-menu')
+ for (const item of SHAPE_MENU) {
+ const b = btn(item.icon, item.label, () => {
+ wrap.classList.remove('open')
+ const partial = item.kind === 'line' ? { h: 4, w: 400, strokeWidth: 3 } : {}
+ this.canvas.insert(defaultShape(item.kind, partial))
+ })
+ menu.appendChild(b)
+ }
+ wrap.append(trigger, menu)
+ document.addEventListener('pointerdown', (ev) => {
+ if (!wrap.contains(ev.target as Node)) wrap.classList.remove('open')
+ })
+ return wrap
+ }
+
+ // --- sidebar -----------------------------------------------------------------
+
+ private rebuildSidebar() {
+ this.sidebar.innerHTML = ''
+ this.store.doc.slides.forEach((slide, i) => {
+ const item = div('ed-thumb')
+ item.dataset.index = String(i)
+ item.draggable = true
+ const num = div('ed-thumb-num')
+ num.textContent = String(i + 1)
+ const surface = renderThumbnail(slide, this.store.doc, 148)
+ const tools = div('ed-thumb-tools')
+ tools.append(
+ btn(ICONS.copy, '', (ev) => { ev.stopPropagation(); this.duplicateSlide(i) }, 'Duplicate slide'),
+ btn(ICONS.trash, '', (ev) => { ev.stopPropagation(); this.deleteSlide(i) }, 'Delete slide'),
+ )
+ item.append(num, surface, tools)
+ item.addEventListener('click', () => this.store.goTo(i))
+ this.wireThumbDrag(item, i)
+ this.sidebar.appendChild(item)
+ })
+ const add = btn(ICONS.plus, 'New slide', () => this.addSlide())
+ add.classList.add('ed-add-slide')
+ this.sidebar.appendChild(add)
+ this.highlightSidebar()
+ }
+
+ private wireThumbDrag(item: HTMLElement, index: number) {
+ item.addEventListener('dragstart', (ev) => {
+ ev.dataTransfer!.setData('text/bento-slide', String(index))
+ ev.dataTransfer!.effectAllowed = 'move'
+ })
+ item.addEventListener('dragover', (ev) => {
+ ev.preventDefault()
+ item.classList.add('drop')
+ })
+ item.addEventListener('dragleave', () => item.classList.remove('drop'))
+ item.addEventListener('drop', (ev) => {
+ ev.preventDefault()
+ item.classList.remove('drop')
+ const from = parseInt(ev.dataTransfer!.getData('text/bento-slide'))
+ if (Number.isNaN(from) || from === index) return
+ this.store.commit(() => {
+ const [moved] = this.store.doc.slides.splice(from, 1)
+ this.store.doc.slides.splice(index, 0, moved)
+ }, 'slides')
+ this.store.currentIndex = index
+ this.store.emit('current')
+ })
+ }
+
+ private highlightSidebar() {
+ this.sidebar.querySelectorAll('.ed-thumb').forEach((n, i) => {
+ n.classList.toggle('active', i === this.store.currentIndex)
+ })
+ }
+
+ private scheduleThumbs() {
+ clearTimeout(this.thumbTimer)
+ this.thumbTimer = window.setTimeout(() => {
+ const thumbs = this.sidebar.querySelectorAll('.ed-thumb')
+ this.store.doc.slides.forEach((slide, i) => {
+ const item = thumbs[i]
+ if (!item) return this.rebuildSidebar()
+ item.querySelector('.bento-thumb-surface')?.replaceWith(renderThumbnail(slide, this.store.doc, 148))
+ })
+ if (thumbs.length !== this.store.doc.slides.length) this.rebuildSidebar()
+ }, 150)
+ }
+
+ // --- slide ops ------------------------------------------------------------------
+
+ private addSlide() {
+ const bg = this.store.slide.background
+ this.store.commit(() => {
+ this.store.doc.slides.splice(this.store.currentIndex + 1, 0, emptySlide({ background: bg }))
+ }, 'slides')
+ this.store.goTo(this.store.currentIndex + 1)
+ }
+
+ private duplicateSlide(i: number) {
+ // Duplicated slides keep element ids → set transition to morph and you
+ // get PowerPoint-Morph behaviour for free.
+ const clone = JSON.parse(JSON.stringify(this.store.doc.slides[i]))
+ clone.id = uid('slide')
+ this.store.commit(() => {
+ this.store.doc.slides.splice(i + 1, 0, clone)
+ }, 'slides')
+ this.store.goTo(i + 1)
+ }
+
+ private deleteSlide(i: number) {
+ if (this.store.doc.slides.length <= 1) return this.toast('A deck needs at least one slide')
+ this.store.commit(() => {
+ this.store.doc.slides.splice(i, 1)
+ }, 'slides')
+ this.store.goTo(Math.min(i, this.store.doc.slides.length - 1))
+ this.store.emit('current')
+ }
+
+ // --- insert image ------------------------------------------------------------------
+
+ private pickImage() {
+ const input = document.createElement('input')
+ input.type = 'file'
+ input.accept = 'image/*'
+ input.addEventListener('change', () => {
+ const file = input.files?.[0]
+ if (!file) return
+ const reader = new FileReader()
+ reader.onload = () => {
+ const src = String(reader.result)
+ const img = new Image()
+ img.onload = () => {
+ const { width: dw, height: dh } = this.store.doc.size
+ const scale = Math.min((dw * 0.5) / img.width, (dh * 0.5) / img.height, 1)
+ const w = Math.round(img.width * scale)
+ const h = Math.round(img.height * scale)
+ this.canvas.insert(defaultImage(src, { w, h, x: (dw - w) / 2, y: (dh - h) / 2 }))
+ }
+ img.src = src
+ }
+ reader.readAsDataURL(file)
+ })
+ input.click()
+ }
+
+ // --- present & save ------------------------------------------------------------------
+
+ present(fromStart = false) {
+ if (this.presenting) return
+ this.canvas.commitTextEdit()
+ this.presenting = true
+ startPresentation(this.store.doc, fromStart ? 0 : this.store.currentIndex, (last) => {
+ this.presenting = false
+ this.store.goTo(last)
+ this.canvas.render()
+ })
+ }
+
+ async save(forcePicker: boolean) {
+ this.canvas.commitTextEdit()
+ try {
+ const result = await saveFile(this.store.doc, forcePicker)
+ if (result === 'cancelled') return
+ this.store.setDirty(false)
+ this.toast(result === 'downloaded' ? 'Saved a copy to Downloads' : 'Saved')
+ } catch (err) {
+ console.error(err)
+ this.toast('Save failed — see console')
+ }
+ }
+
+ // --- keyboard ------------------------------------------------------------------
+
+ private wireKeyboard() {
+ document.addEventListener('keydown', (ev) => {
+ if (this.presenting) return
+ const mod = ev.metaKey || ev.ctrlKey
+ const inField =
+ (ev.target as HTMLElement).closest('input, textarea, select, [contenteditable="true"]') != null
+
+ if (mod && ev.key.toLowerCase() === 's') {
+ ev.preventDefault()
+ this.save(false)
+ return
+ }
+ if (ev.key === 'F5') {
+ ev.preventDefault()
+ this.present(!ev.shiftKey)
+ return
+ }
+ if (inField) return
+
+ if (mod && ev.key.toLowerCase() === 'z') {
+ ev.preventDefault()
+ ev.shiftKey ? this.store.redo() : this.store.undo()
+ return
+ }
+ if (mod && ev.key.toLowerCase() === 'y') {
+ ev.preventDefault()
+ this.store.redo()
+ return
+ }
+ if (mod && ev.key.toLowerCase() === 'd') {
+ ev.preventDefault()
+ this.duplicateSelection()
+ return
+ }
+ if (mod && ev.key.toLowerCase() === 'c') {
+ if (this.store.selection.length) {
+ this.clipboard = JSON.parse(JSON.stringify(this.store.selectedElements))
+ }
+ return
+ }
+ if (mod && ev.key.toLowerCase() === 'v') {
+ if (this.clipboard.length) {
+ const clones = this.clipboard.map((el) => cloneElement(el))
+ this.store.commit(() => this.store.slide.elements.push(...clones))
+ this.store.select(clones.map((c) => c.id))
+ }
+ return
+ }
+ if (ev.key === 'Delete' || ev.key === 'Backspace') {
+ if (this.store.selection.length) {
+ ev.preventDefault()
+ const ids = new Set(this.store.selection)
+ this.store.commit(() => {
+ this.store.slide.elements = this.store.slide.elements.filter((e) => !ids.has(e.id))
+ })
+ this.store.select([])
+ }
+ return
+ }
+ if (ev.key.startsWith('Arrow') && this.store.selection.length) {
+ ev.preventDefault()
+ const step = ev.shiftKey ? 10 : 1
+ const dx = ev.key === 'ArrowLeft' ? -step : ev.key === 'ArrowRight' ? step : 0
+ const dy = ev.key === 'ArrowUp' ? -step : ev.key === 'ArrowDown' ? step : 0
+ this.store.commit(() => {
+ for (const el of this.store.selectedElements) {
+ el.x += dx
+ el.y += dy
+ }
+ })
+ return
+ }
+ if (ev.key === 'Escape') {
+ this.store.select([])
+ return
+ }
+ if (ev.key === 'PageDown') {
+ ev.preventDefault()
+ this.store.goTo(this.store.currentIndex + 1)
+ return
+ }
+ if (ev.key === 'PageUp') {
+ ev.preventDefault()
+ this.store.goTo(this.store.currentIndex - 1)
+ }
+ })
+ }
+
+ private duplicateSelection() {
+ const els = this.store.selectedElements
+ if (!els.length) return
+ const clones = els.map((el) => cloneElement(el))
+ this.store.commit(() => this.store.slide.elements.push(...clones))
+ this.store.select(clones.map((c) => c.id))
+ }
+
+ // --- toast ------------------------------------------------------------------
+
+ toast(message: string) {
+ document.querySelector('.ed-toast')?.remove()
+ const t = div('ed-toast')
+ t.textContent = message
+ document.body.appendChild(t)
+ setTimeout(() => t.classList.add('show'))
+ setTimeout(() => {
+ t.classList.remove('show')
+ setTimeout(() => t.remove(), 300)
+ }, 2200)
+ }
+}
+
+/** Deep-clone an element with a fresh id (same-slide duplicates must not share ids). */
+function cloneElement(el: SlideElement): SlideElement {
+ return { ...JSON.parse(JSON.stringify(el)), id: uid(el.type[0]), x: el.x + 24, y: el.y + 24 }
+}
+
+// tiny DOM helpers
+function div(cls: string): HTMLElement {
+ const d = document.createElement('div')
+ d.className = cls
+ return d
+}
+
+function btn(
+ icon: string,
+ label: string,
+ onClick: (ev: MouseEvent) => void,
+ title?: string,
+): HTMLElement {
+ const b = document.createElement('button')
+ b.className = 'ed-btn'
+ b.innerHTML = label ? `${icon}<span>${label}</span>` : icon
+ if (title) b.title = title
+ b.addEventListener('click', onClick)
+ return b
+}
diff --git a/slides/src/editor/panels.ts b/slides/src/editor/panels.ts
new file mode 100644
index 00000000..6ce6156b
--- /dev/null
+++ b/slides/src/editor/panels.ts
@@ -0,0 +1,267 @@
+// Right-hand properties panel. Shows slide properties when nothing is
+// selected, element properties otherwise. Bursts of 'input' events collapse
+// into a single undo checkpoint.
+
+import type { Store } from '../store'
+import type { ShapeElement, SlideElement, TextElement, TransitionKind } from '../model'
+import { ICONS } from '../icons'
+
+export class PropsPanel {
+ private burst = false
+
+ constructor(
+ private host: HTMLElement,
+ private store: Store,
+ ) {
+ store.on('selection', () => this.rebuild())
+ store.on('current', () => this.rebuild())
+ store.on('doc', () => this.rebuild())
+ this.rebuild()
+ }
+
+ /** checkpoint once per burst of continuous input, commit on change. */
+ private edit(mutate: () => void, final: boolean) {
+ if (!this.burst) {
+ this.store.checkpoint()
+ this.burst = true
+ }
+ mutate()
+ this.store.touch()
+ if (final) this.burst = false
+ }
+
+ private rebuild() {
+ if (this.host.matches(':focus-within')) return // don't rip inputs out from under the user
+ this.burst = false
+ this.host.innerHTML = ''
+ const els = this.store.selectedElements
+ if (els.length === 0) this.buildSlidePanel()
+ else if (els.length === 1) this.buildElementPanel(els[0])
+ else this.buildMultiPanel(els)
+ }
+
+ // --- builders ---------------------------------------------------------------
+
+ private buildSlidePanel() {
+ const slide = this.store.slide
+ this.section('Slide')
+ this.row('Background', this.color(slide.background, (v, fin) =>
+ this.edit(() => { this.store.slide.background = v }, fin)))
+ this.row('Transition', this.select(
+ ['none', 'fade', 'slide', 'zoom', 'morph'],
+ slide.transition,
+ (v) => this.edit(() => { this.store.slide.transition = v as TransitionKind }, true),
+ ))
+ const hint = document.createElement('p')
+ hint.className = 'ed-hint'
+ hint.innerHTML = '<b>Morph</b> animates elements that appear on both this slide and the previous one (copy a slide, then move things around).'
+ this.host.appendChild(hint)
+
+ this.section('Speaker notes')
+ const notes = document.createElement('textarea')
+ notes.className = 'ed-notes'
+ notes.placeholder = 'Notes for presenter view (press S while presenting)…'
+ notes.value = slide.notes
+ notes.addEventListener('input', () => this.edit(() => { this.store.slide.notes = notes.value }, false))
+ notes.addEventListener('change', () => this.edit(() => { this.store.slide.notes = notes.value }, true))
+ this.host.appendChild(notes)
+ }
+
+ private buildMultiPanel(els: SlideElement[]) {
+ this.section(`${els.length} elements`)
+ this.opsRow(els)
+ }
+
+ private buildElementPanel(el: SlideElement) {
+ this.section({ text: 'Text', shape: 'Shape', image: 'Image' }[el.type])
+ this.opsRow([el])
+
+ // geometry
+ const geo = document.createElement('div')
+ geo.className = 'ed-grid2'
+ geo.append(
+ this.mini('X', el.x, (v) => this.setNum(el.id, 'x', v)),
+ this.mini('Y', el.y, (v) => this.setNum(el.id, 'y', v)),
+ this.mini('W', el.w, (v) => this.setNum(el.id, 'w', Math.max(v, 1))),
+ this.mini('H', el.h, (v) => this.setNum(el.id, 'h', Math.max(v, 1))),
+ this.mini('Angle', el.rotation, (v) => this.setNum(el.id, 'rotation', v)),
+ this.mini('Opacity', Math.round(el.opacity * 100), (v) =>
+ this.setNum(el.id, 'opacity', Math.min(Math.max(v / 100, 0), 1))),
+ )
+ this.host.appendChild(geo)
+
+ if (el.type === 'text') this.buildTextProps(el)
+ if (el.type === 'shape') this.buildShapeProps(el)
+ if (el.type === 'image') this.buildImageProps(el)
+
+ const morph = document.createElement('p')
+ morph.className = 'ed-hint'
+ morph.innerHTML = `Morph id: <code>${el.id}</code>`
+ this.host.appendChild(morph)
+ }
+
+ private buildTextProps(el: TextElement) {
+ this.section('Typography')
+ this.row('Size', this.number(el.fontSize, 1, (v, fin) =>
+ this.mutate(el.id, (e) => { (e as TextElement).fontSize = Math.max(v, 4) }, fin)))
+ this.row('Weight', this.select(['300', '400', '600', '700', '800'], String(el.fontWeight), (v) =>
+ this.mutate(el.id, (e) => { (e as TextElement).fontWeight = parseInt(v) }, true)))
+ this.row('Color', this.color(el.color, (v, fin) =>
+ this.mutate(el.id, (e) => { (e as TextElement).color = v }, fin)))
+ this.row('Align', this.select(['left', 'center', 'right'], el.align, (v) =>
+ this.mutate(el.id, (e) => { (e as TextElement).align = v as TextElement['align'] }, true)))
+ this.row('V-align', this.select(['top', 'middle', 'bottom'], el.valign, (v) =>
+ this.mutate(el.id, (e) => { (e as TextElement).valign = v as TextElement['valign'] }, true)))
+ this.row('Line height', this.number(el.lineHeight, 0.05, (v, fin) =>
+ this.mutate(el.id, (e) => { (e as TextElement).lineHeight = Math.max(v, 0.5) }, fin)))
+ }
+
+ private buildShapeProps(el: ShapeElement) {
+ this.section('Fill & stroke')
+ this.row('Fill', this.color(el.fill, (v, fin) =>
+ this.mutate(el.id, (e) => { (e as ShapeElement).fill = v }, fin)))
+ this.row('Stroke', this.color(el.stroke === 'transparent' ? '#1E2A3A' : el.stroke, (v, fin) =>
+ this.mutate(el.id, (e) => { (e as ShapeElement).stroke = v }, fin)))
+ this.row('Stroke width', this.number(el.strokeWidth, 0.5, (v, fin) =>
+ this.mutate(el.id, (e) => { (e as ShapeElement).strokeWidth = Math.max(v, 0) }, fin)))
+ if (el.shape === 'rect') {
+ this.row('Corner radius', this.number(el.radius, 1, (v, fin) =>
+ this.mutate(el.id, (e) => { (e as ShapeElement).radius = Math.max(v, 0) }, fin)))
+ }
+ }
+
+ private buildImageProps(el: SlideElement) {
+ this.section('Image')
+ this.row('Fit', this.select(['contain', 'cover', 'fill'], (el as any).fit, (v) =>
+ this.mutate(el.id, (e) => { (e as any).fit = v }, true)))
+ this.row('Corner radius', this.number((el as any).radius, 1, (v, fin) =>
+ this.mutate(el.id, (e) => { (e as any).radius = Math.max(v, 0) }, fin)))
+ }
+
+ // --- element ops --------------------------------------------------------------
+
+ private opsRow(els: SlideElement[]) {
+ const row = document.createElement('div')
+ row.className = 'ed-ops'
+ row.append(
+ this.opBtn(ICONS.copy, 'Duplicate', () => this.duplicate(els)),
+ this.opBtn(ICONS.front, 'Bring to front', () => this.reorder(els, 'front')),
+ this.opBtn(ICONS.back, 'Send to back', () => this.reorder(els, 'back')),
+ this.opBtn(ICONS.trash, 'Delete', () => this.deleteEls(els)),
+ )
+ this.host.appendChild(row)
+ }
+
+ duplicate(els: SlideElement[]) {
+ const clones = els.map((el) => ({
+ ...JSON.parse(JSON.stringify(el)),
+ id: `${el.id.replace(/-copy\d*$/, '')}-copy${Math.floor(Math.random() * 1000)}`,
+ x: el.x + 24,
+ y: el.y + 24,
+ }))
+ this.store.commit(() => this.store.slide.elements.push(...clones))
+ this.store.select(clones.map((c) => c.id))
+ }
+
+ deleteEls(els: SlideElement[]) {
+ const ids = new Set(els.map((e) => e.id))
+ this.store.commit(() => {
+ this.store.slide.elements = this.store.slide.elements.filter((e) => !ids.has(e.id))
+ })
+ this.store.select([])
+ }
+
+ private reorder(els: SlideElement[], where: 'front' | 'back') {
+ const ids = new Set(els.map((e) => e.id))
+ this.store.commit(() => {
+ const slide = this.store.slide
+ const picked = slide.elements.filter((e) => ids.has(e.id))
+ const rest = slide.elements.filter((e) => !ids.has(e.id))
+ slide.elements = where === 'front' ? [...rest, ...picked] : [...picked, ...rest]
+ })
+ }
+
+ // --- tiny DOM helpers -----------------------------------------------------------
+
+ private mutate(id: string, fn: (el: SlideElement) => void, final: boolean) {
+ const el = this.store.element(id)
+ if (el) this.edit(() => fn(el), final)
+ }
+
+ private setNum(id: string, key: 'x' | 'y' | 'w' | 'h' | 'rotation' | 'opacity', v: number) {
+ if (Number.isNaN(v)) return
+ this.mutate(id, (el) => { (el as any)[key] = v }, true)
+ }
+
+ private section(title: string) {
+ const h = document.createElement('h3')
+ h.className = 'ed-section'
+ h.textContent = title
+ this.host.appendChild(h)
+ }
+
+ private row(label: string, input: HTMLElement) {
+ const row = document.createElement('label')
+ row.className = 'ed-row'
+ const span = document.createElement('span')
+ span.textContent = label
+ row.append(span, input)
+ this.host.appendChild(row)
+ }
+
+ private mini(label: string, value: number, onChange: (v: number) => void): HTMLElement {
+ const wrap = document.createElement('label')
+ wrap.className = 'ed-mini'
+ const span = document.createElement('span')
+ span.textContent = label
+ const input = document.createElement('input')
+ input.type = 'number'
+ input.value = String(Math.round(value * 10) / 10)
+ input.addEventListener('change', () => onChange(parseFloat(input.value)))
+ wrap.append(span, input)
+ return wrap
+ }
+
+ private number(value: number, step: number, onEdit: (v: number, final: boolean) => void): HTMLElement {
+ const input = document.createElement('input')
+ input.type = 'number'
+ input.step = String(step)
+ input.value = String(value)
+ input.addEventListener('change', () => {
+ const v = parseFloat(input.value)
+ if (!Number.isNaN(v)) onEdit(v, true)
+ })
+ return input
+ }
+
+ private color(value: string, onEdit: (v: string, final: boolean) => void): HTMLElement {
+ const input = document.createElement('input')
+ input.type = 'color'
+ input.value = /^#[0-9a-fA-F]{6}$/.test(value) ? value : '#1E2A3A'
+ input.addEventListener('input', () => onEdit(input.value, false))
+ input.addEventListener('change', () => onEdit(input.value, true))
+ return input
+ }
+
+ private select(options: string[], value: string, onChange: (v: string) => void): HTMLElement {
+ const sel = document.createElement('select')
+ for (const opt of options) {
+ const o = document.createElement('option')
+ o.value = opt
+ o.textContent = opt
+ if (opt === value) o.selected = true
+ sel.appendChild(o)
+ }
+ sel.addEventListener('change', () => onChange(sel.value))
+ return sel
+ }
+
+ private opBtn(icon: string, title: string, onClick: () => void): HTMLElement {
+ const btn = document.createElement('button')
+ btn.className = 'ed-btn ed-btn-icon'
+ btn.title = title
+ btn.innerHTML = icon
+ btn.addEventListener('click', onClick)
+ return btn
+ }
+}
diff --git a/slides/src/icons.ts b/slides/src/icons.ts
new file mode 100644
index 00000000..46e44a57
--- /dev/null
+++ b/slides/src/icons.ts
@@ -0,0 +1,28 @@
+// Minimal inline icon set (lucide-style, stroke = currentColor). No deps.
+
+const svg = (body: string, viewBox = '0 0 24 24') =>
+ `<svg xmlns="http://www.w3.org/2000/svg" viewBox="${viewBox}" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">${body}</svg>`
+
+export const ICONS = {
+ text: svg('<polyline points="4 7 4 4 20 4 20 7"/><line x1="9" y1="20" x2="15" y2="20"/><line x1="12" y1="4" x2="12" y2="20"/>'),
+ shapes: svg('<rect x="3" y="3" width="10" height="10" rx="1.5"/><circle cx="16.5" cy="16.5" r="4.5"/>'),
+ image: svg('<rect x="3" y="3" width="18" height="18" rx="2"/><circle cx="9" cy="9" r="2"/><path d="m21 15-3.5-3.5L6 23"/>'),
+ undo: svg('<path d="M9 14 4 9l5-5"/><path d="M4 9h10.5a5.5 5.5 0 0 1 0 11H11"/>'),
+ redo: svg('<path d="m15 14 5-5-5-5"/><path d="M20 9H9.5a5.5 5.5 0 0 0 0 11H13"/>'),
+ play: svg('<polygon points="6 3 20 12 6 21 6 3" fill="currentColor" stroke="none"/>'),
+ save: svg('<path d="M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"/><polyline points="17 21 17 13 7 13 7 21"/><polyline points="7 3 7 8 15 8"/>'),
+ download: svg('<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" y1="15" x2="12" y2="3"/>'),
+ plus: svg('<line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/>'),
+ trash: svg('<polyline points="3 6 5 6 21 6"/><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/>'),
+ copy: svg('<rect x="9" y="9" width="13" height="13" rx="2"/><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/>'),
+ front: svg('<rect x="8" y="8" width="12" height="12" rx="2" fill="currentColor" stroke="none" opacity="0.35"/><rect x="4" y="4" width="12" height="12" rx="2"/>'),
+ back: svg('<rect x="4" y="4" width="12" height="12" rx="2" fill="currentColor" stroke="none" opacity="0.35"/><rect x="8" y="8" width="12" height="12" rx="2"/>'),
+ // shape menu entries
+ rect: svg('<rect x="3" y="5" width="18" height="14" rx="2"/>'),
+ ellipse: svg('<ellipse cx="12" cy="12" rx="9" ry="7"/>'),
+ triangle: svg('<path d="M12 4 21 20H3z"/>'),
+ arrow: svg('<line x1="3" y1="12" x2="19" y2="12"/><polyline points="13 6 19 12 13 18"/>'),
+ line: svg('<line x1="4" y1="19" x2="20" y2="5"/>'),
+} as const
+
+export type IconName = keyof typeof ICONS
diff --git a/slides/src/main.ts b/slides/src/main.ts
new file mode 100644
index 00000000..cea75823
--- /dev/null
+++ b/slides/src/main.ts
@@ -0,0 +1,33 @@
+// Boot sequence. Order matters: capture the pristine document BEFORE any DOM
+// mutation — the captured copy is what gets re-serialized on save.
+
+import './styles.css'
+import { capturePristine, readEmbeddedDoc, serializeFile } from './save'
+import { parseDoc, starterDoc } from './model'
+import { Store } from './store'
+import { Editor } from './editor/editor'
+
+capturePristine()
+
+const embedded = readEmbeddedDoc()
+const doc = (embedded && parseDoc(embedded)) || starterDoc()
+
+document.title = `${doc.title} — Bento Slides`
+
+const store = new Store(doc)
+const editor = new Editor(document.getElementById('app')!, store)
+
+// Opening a link ending in #present starts the show immediately (player mode).
+if (location.hash === '#present') {
+ editor.present(true)
+}
+
+// Small scripting surface for tooling and automation: read/replace the
+// document model and serialize the full .bento.html file.
+;(window as any).bento = {
+ format: doc.format,
+ get doc() {
+ return store.doc
+ },
+ serialize: () => serializeFile(store.doc),
+}
diff --git a/slides/src/model.ts b/slides/src/model.ts
new file mode 100644
index 00000000..e3192244
--- /dev/null
+++ b/slides/src/model.ts
@@ -0,0 +1,403 @@
+// The Bento Slides document model. This JSON is what lives inside the
+// <script type="application/bento+json"> block of a .bento.html file.
+
+export const FORMAT = 'bento/slides'
+export const FORMAT_VERSION = 1
+
+export type TransitionKind = 'none' | 'fade' | 'slide' | 'zoom' | 'morph'
+
+export interface ElementBase {
+ /** Stable id. Elements sharing an id across adjacent slides morph into each other. */
+ id: string
+ x: number
+ y: number
+ w: number
+ h: number
+ /** degrees, clockwise */
+ rotation: number
+ opacity: number
+}
+
+export interface TextElement extends ElementBase {
+ type: 'text'
+ /** Rich text as sanitized inline HTML (b/i/u/br/span only). */
+ html: string
+ fontSize: number
+ fontFamily: string
+ fontWeight: number
+ color: string
+ align: 'left' | 'center' | 'right'
+ valign: 'top' | 'middle' | 'bottom'
+ lineHeight: number
+}
+
+export type ShapeKind = 'rect' | 'ellipse' | 'triangle' | 'arrow' | 'line'
+
+export interface ShapeElement extends ElementBase {
+ type: 'shape'
+ shape: ShapeKind
+ fill: string
+ stroke: string
+ strokeWidth: number
+ /** corner radius, rect only */
+ radius: number
+}
+
+export interface ImageElement extends ElementBase {
+ type: 'image'
+ /** data: URI — Bento files embed all assets */
+ src: string
+ fit: 'contain' | 'cover' | 'fill'
+ radius: number
+}
+
+export type SlideElement = TextElement | ShapeElement | ImageElement
+
+export interface Slide {
+ id: string
+ background: string
+ transition: TransitionKind
+ elements: SlideElement[]
+ notes: string
+}
+
+export interface BentoDoc {
+ format: typeof FORMAT
+ version: number
+ title: string
+ /** slide coordinate space, px */
+ size: { width: number; height: number }
+ theme: {
+ background: string
+ color: string
+ accent: string
+ fontFamily: string
+ }
+ slides: Slide[]
+ modified: string
+}
+
+let counter = 0
+export const uid = (prefix = 'el') =>
+ `${prefix}-${Date.now().toString(36)}-${(counter++).toString(36)}${Math.random().toString(36).slice(2, 6)}`
+
+export const FONT_STACK =
+ "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif"
+
+export function defaultText(partial: Partial<TextElement> = {}): TextElement {
+ return {
+ id: uid('t'),
+ type: 'text',
+ x: 340, y: 300, w: 600, h: 120,
+ rotation: 0, opacity: 1,
+ html: 'Double-click to edit',
+ fontSize: 32,
+ fontFamily: FONT_STACK,
+ fontWeight: 400,
+ color: '#1E2A3A',
+ align: 'center',
+ valign: 'middle',
+ lineHeight: 1.25,
+ ...partial,
+ }
+}
+
+export function defaultShape(shape: ShapeKind, partial: Partial<ShapeElement> = {}): ShapeElement {
+ return {
+ id: uid('s'),
+ type: 'shape',
+ shape,
+ x: 490, y: 260, w: 300, h: 200,
+ rotation: 0, opacity: 1,
+ fill: '#F7A600',
+ stroke: 'transparent',
+ strokeWidth: 0,
+ radius: shape === 'rect' ? 12 : 0,
+ ...partial,
+ }
+}
+
+export function defaultImage(src: string, partial: Partial<ImageElement> = {}): ImageElement {
+ return {
+ id: uid('i'),
+ type: 'image',
+ x: 440, y: 210, w: 400, h: 300,
+ rotation: 0, opacity: 1,
+ src,
+ fit: 'contain',
+ radius: 0,
+ ...partial,
+ }
+}
+
+export function emptySlide(partial: Partial<Slide> = {}): Slide {
+ return {
+ id: uid('slide'),
+ background: '#FFFFFF',
+ transition: 'fade',
+ elements: [],
+ notes: '',
+ ...partial,
+ }
+}
+
+export function newDoc(): BentoDoc {
+ return {
+ format: FORMAT,
+ version: FORMAT_VERSION,
+ title: 'Untitled',
+ size: { width: 1280, height: 720 },
+ theme: {
+ background: '#FFFFFF',
+ color: '#1E2A3A',
+ accent: '#F7A600',
+ fontFamily: FONT_STACK,
+ },
+ slides: [emptySlide()],
+ modified: new Date().toISOString(),
+ }
+}
+
+export function parseDoc(json: string): BentoDoc | null {
+ try {
+ const doc = JSON.parse(json)
+ if (doc && doc.format === FORMAT && Array.isArray(doc.slides) && doc.slides.length > 0) {
+ return doc as BentoDoc
+ }
+ } catch {
+ /* fall through */
+ }
+ return null
+}
+
+// ---------------------------------------------------------------------------
+// Starter deck — what a freshly built Bento Slides file opens with. It doubles
+// as the feature demo: the amber circle and the title share ids across slides,
+// so 'morph' transitions animate them PowerPoint-Morph style.
+// ---------------------------------------------------------------------------
+
+export function starterDoc(): BentoDoc {
+ const ink = '#1E2A3A'
+ const amber = '#F7A600'
+ const blue = '#5B8DEF'
+ const doc = newDoc()
+ doc.title = 'Welcome to Bento Slides'
+
+ const heroCircle = 'demo-circle'
+ const heroTitle = 'demo-title'
+ const chipBlue = 'demo-chip'
+
+ doc.slides = [
+ {
+ id: uid('slide'),
+ background: ink,
+ transition: 'fade',
+ notes:
+ 'This whole deck lives inside one HTML file — data, viewer and editor together. Press Escape to go back to editing.',
+ elements: [
+ {
+ ...defaultShape('ellipse'),
+ id: heroCircle,
+ x: 1020, y: 480, w: 180, h: 180,
+ fill: amber,
+ },
+ {
+ ...defaultShape('rect'),
+ id: chipBlue,
+ x: 80, y: 520, w: 56, h: 120, radius: 14, fill: blue,
+ },
+ {
+ ...defaultText({}),
+ id: heroTitle,
+ x: 140, y: 240, w: 1000, h: 130,
+ html: 'Bento Slides',
+ fontSize: 88, fontWeight: 700, color: '#FFFFFF', align: 'left',
+ },
+ {
+ ...defaultText({}),
+ x: 144, y: 380, w: 820, h: 60,
+ html: 'A presentation that <b>is</b> its own app — one file, opens anywhere.',
+ fontSize: 26, color: '#B9C4D4', align: 'left',
+ },
+ ],
+ },
+ {
+ id: uid('slide'),
+ background: '#FFFFFF',
+ transition: 'morph',
+ notes:
+ 'Morph in action: the circle, title and blue chip carry the same element ids as slide 1, so GSAP Flip animates them between slides.',
+ elements: [
+ {
+ ...defaultShape('ellipse'),
+ id: heroCircle,
+ x: -160, y: -200, w: 560, h: 560,
+ fill: amber, opacity: 0.92,
+ },
+ {
+ ...defaultShape('rect'),
+ id: chipBlue,
+ x: 80, y: 588, w: 340, h: 52, radius: 26, fill: blue,
+ },
+ {
+ ...defaultText({}),
+ id: heroTitle,
+ x: 460, y: 90, w: 740, h: 80,
+ html: 'One file. Everything inside.',
+ fontSize: 52, fontWeight: 700, color: ink, align: 'left',
+ },
+ {
+ ...defaultText({}),
+ x: 460, y: 210, w: 720, h: 300,
+ html:
+ '• The document data is embedded as JSON<br>• Viewer, presenter and editor ship in the same file<br>• Saving rewrites the file itself — no server, no install<br>• Images embed as data URIs, fonts stay local',
+ fontSize: 28, color: ink, align: 'left', valign: 'top', lineHeight: 1.7,
+ },
+ {
+ ...defaultText({}),
+ x: 96, y: 598, w: 310, h: 36,
+ html: 'try pressing ← to morph back',
+ fontSize: 17, color: '#FFFFFF', fontWeight: 600,
+ },
+ ],
+ },
+ {
+ id: uid('slide'),
+ background: '#F5F7FA',
+ transition: 'morph',
+ notes: 'Everything on this slide was made with the built-in editor: drag, resize, rotate, snap.',
+ elements: [
+ {
+ ...defaultShape('ellipse'),
+ id: heroCircle,
+ x: 1100, y: -70, w: 140, h: 140, fill: amber,
+ },
+ {
+ ...defaultText({}),
+ id: heroTitle,
+ x: 80, y: 70, w: 900, h: 70,
+ html: 'Edit like a native app',
+ fontSize: 44, fontWeight: 700, color: ink, align: 'left',
+ },
+ {
+ ...defaultShape('rect'),
+ x: 80, y: 200, w: 350, h: 330, fill: '#FFFFFF', stroke: '#E3E8EF', strokeWidth: 1.5, radius: 16,
+ },
+ {
+ ...defaultText({}),
+ x: 104, y: 230, w: 300, h: 260,
+ html: '<b>Direct manipulation</b><br><br>Drag, resize and rotate with snap guides. Double-click any text to type.',
+ fontSize: 22, color: ink, align: 'left', valign: 'top', lineHeight: 1.5,
+ },
+ {
+ ...defaultShape('rect'),
+ x: 465, y: 200, w: 350, h: 330, fill: '#FFFFFF', stroke: '#E3E8EF', strokeWidth: 1.5, radius: 16,
+ },
+ {
+ ...defaultText({}),
+ x: 489, y: 230, w: 300, h: 260,
+ html: '<b>Shapes, text, images</b><br><br>Insert from the toolbar. Images are embedded into the file, so it never breaks.',
+ fontSize: 22, color: ink, align: 'left', valign: 'top', lineHeight: 1.5,
+ },
+ {
+ ...defaultShape('rect'),
+ x: 850, y: 200, w: 350, h: 330, fill: ink, radius: 16,
+ },
+ {
+ ...defaultText({}),
+ x: 874, y: 230, w: 300, h: 260,
+ html: '<b>Undo everything</b><br><br>Full undo/redo history, keyboard shortcuts, and ⌘S saves the file itself.',
+ fontSize: 22, color: '#FFFFFF', align: 'left', valign: 'top', lineHeight: 1.5,
+ },
+ {
+ ...defaultShape('arrow'),
+ x: 80, y: 580, w: 220, h: 60, fill: amber,
+ },
+ {
+ ...defaultText({}),
+ x: 320, y: 590, w: 500, h: 40,
+ html: 'This deck is editable — press Esc and try it',
+ fontSize: 20, color: '#5B6472', align: 'left',
+ },
+ ],
+ },
+ {
+ id: uid('slide'),
+ background: ink,
+ transition: 'morph',
+ notes:
+ 'Reveal.js drives presentation: keyboard and swipe navigation, overview mode, speaker notes. GSAP Flip powers the morphs.',
+ elements: [
+ {
+ ...defaultShape('ellipse'),
+ id: heroCircle,
+ x: 550, y: 470, w: 190, h: 190, fill: blue,
+ },
+ {
+ ...defaultText({}),
+ id: heroTitle,
+ x: 140, y: 120, w: 1000, h: 150,
+ html: 'Present with Reveal.js,<br>morph with GSAP Flip',
+ fontSize: 54, fontWeight: 700, color: '#FFFFFF', align: 'center', lineHeight: 1.2,
+ },
+ {
+ ...defaultText({}),
+ x: 240, y: 330, w: 800, h: 90,
+ html: 'Elements that share an id morph between slides —<br>position, size, colour and rotation animate automatically.',
+ fontSize: 24, color: '#B9C4D4', lineHeight: 1.5,
+ },
+ ],
+ },
+ {
+ id: uid('slide'),
+ background: '#FFFFFF',
+ transition: 'zoom',
+ notes: 'Docs and Sheets follow the same recipe: one self-contained HTML file per document, built on best-of-breed open-source libraries.',
+ elements: [
+ {
+ ...defaultText({}),
+ x: 140, y: 150, w: 1000, h: 80,
+ html: 'Where this goes next',
+ fontSize: 48, fontWeight: 700, color: ink,
+ },
+ {
+ ...defaultShape('rect'),
+ x: 200, y: 300, w: 260, h: 180, fill: '#FDF1DC', radius: 16,
+ },
+ {
+ ...defaultText({}),
+ x: 200, y: 350, w: 260, h: 80,
+ html: '<b>Slides</b><br>you are here',
+ fontSize: 24, color: ink, lineHeight: 1.4,
+ },
+ {
+ ...defaultShape('rect'),
+ x: 510, y: 300, w: 260, h: 180, fill: '#EDF2FD', radius: 16,
+ },
+ {
+ ...defaultText({}),
+ x: 510, y: 350, w: 260, h: 80,
+ html: '<b>Docs</b><br>next up',
+ fontSize: 24, color: ink, lineHeight: 1.4,
+ },
+ {
+ ...defaultShape('rect'),
+ x: 820, y: 300, w: 260, h: 180, fill: '#EAF7EF', radius: 16,
+ },
+ {
+ ...defaultText({}),
+ x: 820, y: 350, w: 260, h: 80,
+ html: '<b>Sheets</b><br>after that',
+ fontSize: 24, color: ink, lineHeight: 1.4,
+ },
+ {
+ ...defaultText({}),
+ x: 240, y: 560, w: 800, h: 50,
+ html: 'One format idea, three apps: <b>the file is the software.</b>',
+ fontSize: 26, color: '#5B6472',
+ },
+ ],
+ },
+ ]
+ return doc
+}
diff --git a/slides/src/present.ts b/slides/src/present.ts
new file mode 100644
index 00000000..c402957e
--- /dev/null
+++ b/slides/src/present.ts
@@ -0,0 +1,225 @@
+// Present mode: a fullscreen Reveal.js overlay generated from the model.
+// Slides marked transition:'morph' use GSAP Flip to animate elements whose
+// ids match across the two slides (PowerPoint "Morph" behaviour).
+
+import Reveal from 'reveal.js'
+import RevealNotes from 'reveal.js/plugin/notes/notes'
+import 'reveal.js/dist/reveal.css'
+import { gsap } from 'gsap'
+import { Flip } from 'gsap/Flip'
+import type { BentoDoc, SlideElement } from './model'
+import { renderSlide } from './render'
+
+gsap.registerPlugin(Flip)
+
+const MORPH_DURATION = 0.65
+const MORPH_EASE = 'power2.inOut'
+
+export interface PresentSession {
+ exit(): void
+}
+
+export function startPresentation(
+ doc: BentoDoc,
+ startIndex: number,
+ onExit: (lastIndex: number) => void,
+): PresentSession {
+ const overlay = document.createElement('div')
+ overlay.className = 'bento-present-overlay'
+
+ const revealEl = document.createElement('div')
+ revealEl.className = 'reveal'
+ const slidesEl = document.createElement('div')
+ slidesEl.className = 'slides'
+ revealEl.appendChild(slidesEl)
+ overlay.appendChild(revealEl)
+
+ doc.slides.forEach((slide) => {
+ const section = document.createElement('section')
+ // Morph slides swap instantly; the Flip animation supplies the motion.
+ section.dataset.transition = slide.transition === 'morph' ? 'none' : slide.transition
+ section.appendChild(renderSlide(slide, doc))
+ if (slide.notes) {
+ const aside = document.createElement('aside')
+ aside.className = 'notes'
+ aside.textContent = slide.notes
+ section.appendChild(aside)
+ }
+ slidesEl.appendChild(section)
+ })
+
+ document.body.appendChild(overlay)
+
+ let exited = false
+ const deck = new Reveal(revealEl, {
+ embedded: true,
+ width: doc.size.width,
+ height: doc.size.height,
+ margin: 0,
+ center: false,
+ hash: false,
+ history: false,
+ transition: 'fade',
+ transitionSpeed: 'default',
+ backgroundTransition: 'fade',
+ controls: true,
+ progress: true,
+ slideNumber: 'c/t',
+ keyboardCondition: null,
+ plugins: [RevealNotes],
+ })
+
+ const exit = () => {
+ if (exited) return
+ exited = true
+ const last = deck.getIndices().h
+ try {
+ deck.destroy()
+ } catch {
+ /* Reveal teardown is best-effort */
+ }
+ overlay.remove()
+ document.removeEventListener('keydown', onKeydown, true)
+ onExit(last)
+ }
+
+ // Esc exits the show (capture phase so Reveal's own Esc handling never sees it).
+ const onKeydown = (ev: KeyboardEvent) => {
+ if (ev.key === 'Escape') {
+ if (deck.isOverview()) return // let Reveal close its overview first
+ ev.preventDefault()
+ ev.stopPropagation()
+ exit()
+ }
+ }
+ document.addEventListener('keydown', onKeydown, true)
+
+ deck.on('slidechanged', ((event: any) => {
+ const from = event.previousSlide as HTMLElement | undefined
+ const to = event.currentSlide as HTMLElement
+ if (!from || !to) return
+ const fromIdx = [...slidesEl.children].indexOf(from)
+ const toIdx = [...slidesEl.children].indexOf(to)
+ const forward = toIdx > fromIdx
+ // Morph forward into a morph slide, and un-morph when backing out of one.
+ const morphing =
+ (forward && doc.slides[toIdx]?.transition === 'morph') ||
+ (!forward && doc.slides[fromIdx]?.transition === 'morph')
+ if (morphing) runMorph(doc, from, to, fromIdx, toIdx)
+ }) as any)
+
+ deck.initialize().then(() => {
+ if (startIndex > 0) deck.slide(startIndex, 0)
+ })
+
+ return { exit }
+}
+
+// --- morph ------------------------------------------------------------------
+
+function elementsById(root: HTMLElement): Map<string, HTMLElement> {
+ const map = new Map<string, HTMLElement>()
+ root.querySelectorAll<HTMLElement>('[data-flip-id]').forEach((n) => {
+ map.set(n.dataset.flipId!, n)
+ })
+ return map
+}
+
+function modelById(doc: BentoDoc, index: number): Map<string, SlideElement> {
+ const map = new Map<string, SlideElement>()
+ for (const el of doc.slides[index]?.elements ?? []) map.set(el.id, el)
+ return map
+}
+
+function runMorph(
+ doc: BentoDoc,
+ fromSection: HTMLElement,
+ toSection: HTMLElement,
+ fromIdx: number,
+ toIdx: number,
+) {
+ const fromEls = elementsById(fromSection)
+ const toEls = elementsById(toSection)
+ const fromModel = modelById(doc, fromIdx)
+ const toModel = modelById(doc, toIdx)
+
+ const matchedFrom: HTMLElement[] = []
+ const matchedTo: HTMLElement[] = []
+ for (const [id, el] of fromEls) {
+ const target = toEls.get(id)
+ if (target) {
+ matchedFrom.push(el)
+ matchedTo.push(target)
+ }
+ }
+
+ // Unmatched incoming elements simply fade/rise in.
+ const entering = [...toEls.values()].filter((n) => !fromEls.has(n.dataset.flipId!))
+ if (entering.length) {
+ gsap.from(entering, {
+ opacity: 0,
+ y: 14,
+ duration: 0.45,
+ delay: MORPH_DURATION * 0.4,
+ stagger: 0.03,
+ ease: 'power2.out',
+ clearProps: 'opacity,transform',
+ })
+ }
+ if (!matchedFrom.length) return
+
+ // Reveal has already hidden/transformed the outgoing section. Temporarily
+ // neutralize that so Flip can measure where the elements really were.
+ const saved = {
+ display: fromSection.style.display,
+ visibility: fromSection.style.visibility,
+ transform: fromSection.style.transform,
+ opacity: fromSection.style.opacity,
+ }
+ fromSection.style.display = 'block'
+ fromSection.style.visibility = 'hidden'
+ fromSection.style.transform = 'none'
+ fromSection.style.opacity = '1'
+
+ const state = Flip.getState(matchedFrom)
+
+ fromSection.style.display = saved.display
+ fromSection.style.visibility = saved.visibility
+ fromSection.style.transform = saved.transform
+ fromSection.style.opacity = saved.opacity
+
+ // Geometry via Flip (position/size/rotation, scale mode like PowerPoint).
+ Flip.from(state, {
+ targets: matchedTo,
+ duration: MORPH_DURATION,
+ ease: MORPH_EASE,
+ scale: true,
+ })
+
+ // Styles morph straight from the model — exact values, no DOM sniffing.
+ for (const to of matchedTo) {
+ const id = to.dataset.flipId!
+ const a = fromModel.get(id)
+ const b = toModel.get(id)
+ if (!a || !b) continue
+ if (a.opacity !== b.opacity) {
+ gsap.fromTo(to, { opacity: a.opacity }, { opacity: b.opacity, duration: MORPH_DURATION, ease: MORPH_EASE })
+ }
+ if (a.type === 'shape' && b.type === 'shape' && a.fill !== b.fill) {
+ const target = to.querySelector('rect,ellipse,polygon,line')
+ if (target) {
+ gsap.fromTo(
+ target,
+ { attr: { fill: a.fill } },
+ { attr: { fill: b.fill }, duration: MORPH_DURATION, ease: MORPH_EASE },
+ )
+ }
+ }
+ if (a.type === 'text' && b.type === 'text' && a.color !== b.color) {
+ const inner = to.querySelector<HTMLElement>('.bento-text-inner')
+ if (inner) {
+ gsap.fromTo(inner, { color: a.color }, { color: b.color, duration: MORPH_DURATION, ease: MORPH_EASE })
+ }
+ }
+ }
+}
diff --git a/slides/src/render.ts b/slides/src/render.ts
new file mode 100644
index 00000000..833a8d1b
--- /dev/null
+++ b/slides/src/render.ts
@@ -0,0 +1,183 @@
+// Shared model → DOM renderer. One code path draws slides everywhere:
+// editor canvas, sidebar thumbnails, and Reveal.js sections.
+
+import type { BentoDoc, ShapeElement, Slide, SlideElement } from './model'
+
+const SVG_NS = 'http://www.w3.org/2000/svg'
+
+export function applyElementFrame(node: HTMLElement, el: SlideElement) {
+ node.style.left = `${el.x}px`
+ node.style.top = `${el.y}px`
+ node.style.width = `${el.w}px`
+ node.style.height = `${el.h}px`
+ node.style.transform = el.rotation ? `rotate(${el.rotation}deg)` : ''
+ node.style.opacity = String(el.opacity)
+}
+
+export function shapeSvg(el: ShapeElement): SVGSVGElement {
+ const svg = document.createElementNS(SVG_NS, 'svg')
+ const { w, h } = el
+ const sw = el.strokeWidth
+ const inset = sw / 2
+ svg.setAttribute('viewBox', `0 0 ${Math.max(w, 1)} ${Math.max(h, 1)}`)
+ svg.setAttribute('preserveAspectRatio', 'none')
+ svg.style.cssText = 'position:absolute;inset:0;width:100%;height:100%;overflow:visible'
+
+ let node: SVGElement
+ switch (el.shape) {
+ case 'rect': {
+ node = document.createElementNS(SVG_NS, 'rect')
+ node.setAttribute('x', String(inset))
+ node.setAttribute('y', String(inset))
+ node.setAttribute('width', String(Math.max(w - sw, 0)))
+ node.setAttribute('height', String(Math.max(h - sw, 0)))
+ if (el.radius) node.setAttribute('rx', String(el.radius))
+ break
+ }
+ case 'ellipse': {
+ node = document.createElementNS(SVG_NS, 'ellipse')
+ node.setAttribute('cx', String(w / 2))
+ node.setAttribute('cy', String(h / 2))
+ node.setAttribute('rx', String(Math.max(w / 2 - inset, 0)))
+ node.setAttribute('ry', String(Math.max(h / 2 - inset, 0)))
+ break
+ }
+ case 'triangle': {
+ node = document.createElementNS(SVG_NS, 'polygon')
+ node.setAttribute('points', `${w / 2},${inset} ${w - inset},${h - inset} ${inset},${h - inset}`)
+ break
+ }
+ case 'arrow': {
+ // right-pointing arrow: shaft + head, proportional to the box
+ node = document.createElementNS(SVG_NS, 'polygon')
+ const shaftH = h * 0.44
+ const headW = Math.min(w * 0.38, h)
+ const y0 = (h - shaftH) / 2
+ node.setAttribute(
+ 'points',
+ `0,${y0} ${w - headW},${y0} ${w - headW},0 ${w},${h / 2} ${w - headW},${h} ${w - headW},${y0 + shaftH} 0,${y0 + shaftH}`,
+ )
+ break
+ }
+ case 'line': {
+ node = document.createElementNS(SVG_NS, 'line')
+ node.setAttribute('x1', '0')
+ node.setAttribute('y1', String(h / 2))
+ node.setAttribute('x2', String(w))
+ node.setAttribute('y2', String(h / 2))
+ node.setAttribute('stroke', el.fill)
+ node.setAttribute('stroke-width', String(Math.max(sw, 2)))
+ node.setAttribute('stroke-linecap', 'round')
+ svg.appendChild(node)
+ return svg
+ }
+ }
+ node.setAttribute('fill', el.fill)
+ if (el.stroke && el.stroke !== 'transparent' && sw > 0) {
+ node.setAttribute('stroke', el.stroke)
+ node.setAttribute('stroke-width', String(sw))
+ }
+ svg.appendChild(node)
+ return svg
+}
+
+const ALLOWED_TAGS = new Set(['B', 'I', 'U', 'BR', 'SPAN', 'DIV', 'P', 'STRONG', 'EM'])
+
+/** Keep pasted/edited rich text down to a safe inline subset. */
+export function sanitizeHtml(html: string): string {
+ const tpl = document.createElement('template')
+ tpl.innerHTML = html
+ const walk = (node: Node) => {
+ for (const child of Array.from(node.childNodes)) {
+ if (child.nodeType === Node.ELEMENT_NODE) {
+ const elChild = child as HTMLElement
+ if (!ALLOWED_TAGS.has(elChild.tagName)) {
+ // unwrap unknown elements, keep their text
+ while (elChild.firstChild) node.insertBefore(elChild.firstChild, elChild)
+ elChild.remove()
+ continue
+ }
+ for (const attr of Array.from(elChild.attributes)) elChild.removeAttribute(attr.name)
+ walk(elChild)
+ } else if (child.nodeType !== Node.TEXT_NODE) {
+ child.remove()
+ }
+ }
+ }
+ walk(tpl.content)
+ const out = document.createElement('div')
+ out.appendChild(tpl.content.cloneNode(true))
+ return out.innerHTML
+}
+
+const VALIGN: Record<string, string> = { top: 'flex-start', middle: 'center', bottom: 'flex-end' }
+
+/**
+ * Render one element. The wrapper carries data-el-id (edit-time selection)
+ * and data-flip-id (GSAP Flip morph matching across slides).
+ */
+export function renderElement(el: SlideElement, doc: BentoDoc): HTMLElement {
+ const node = document.createElement('div')
+ node.className = `bento-el bento-el-${el.type}`
+ node.dataset.elId = el.id
+ node.dataset.flipId = el.id
+ applyElementFrame(node, el)
+
+ switch (el.type) {
+ case 'text': {
+ node.style.display = 'flex'
+ node.style.flexDirection = 'column'
+ node.style.justifyContent = VALIGN[el.valign]
+ const inner = document.createElement('div')
+ inner.className = 'bento-text-inner'
+ inner.style.fontSize = `${el.fontSize}px`
+ inner.style.fontFamily = el.fontFamily || doc.theme.fontFamily
+ inner.style.fontWeight = String(el.fontWeight)
+ inner.style.color = el.color
+ inner.style.textAlign = el.align
+ inner.style.lineHeight = String(el.lineHeight)
+ inner.style.width = '100%'
+ inner.innerHTML = sanitizeHtml(el.html)
+ node.appendChild(inner)
+ break
+ }
+ case 'shape':
+ node.appendChild(shapeSvg(el))
+ break
+ case 'image': {
+ const img = document.createElement('img')
+ img.src = el.src
+ img.draggable = false
+ img.style.cssText = `width:100%;height:100%;object-fit:${el.fit};border-radius:${el.radius}px;display:block`
+ node.appendChild(img)
+ break
+ }
+ }
+ return node
+}
+
+/** Render a full slide surface (background + elements) at model coordinates. */
+export function renderSlide(slide: Slide, doc: BentoDoc): HTMLElement {
+ const surface = document.createElement('div')
+ surface.className = 'bento-slide'
+ surface.dataset.slideId = slide.id
+ surface.style.width = `${doc.size.width}px`
+ surface.style.height = `${doc.size.height}px`
+ surface.style.background = slide.background
+ for (const el of slide.elements) surface.appendChild(renderElement(el, doc))
+ return surface
+}
+
+/** Scaled-down live preview used for sidebar thumbnails. */
+export function renderThumbnail(slide: Slide, doc: BentoDoc, width: number): HTMLElement {
+ const scale = width / doc.size.width
+ const box = document.createElement('div')
+ box.className = 'bento-thumb-surface'
+ box.style.width = `${width}px`
+ box.style.height = `${doc.size.height * scale}px`
+ const inner = renderSlide(slide, doc)
+ inner.style.transformOrigin = '0 0'
+ inner.style.transform = `scale(${scale})`
+ box.appendChild(inner)
+ return box
+}
diff --git a/slides/src/save.ts b/slides/src/save.ts
new file mode 100644
index 00000000..3f23c05e
--- /dev/null
+++ b/slides/src/save.ts
@@ -0,0 +1,121 @@
+// Self-saving: a Bento file writes itself back to disk with updated data.
+//
+// At boot (before the app mutates the DOM) we deep-clone the document. On save
+// we swap the clone's data block content for the current model JSON and
+// serialize the clone back to an HTML string — byte-for-byte the same app
+// shell, new document inside. TiddlyWiki pioneered this trick.
+
+import type { BentoDoc } from './model'
+
+const DATA_BLOCK_ID = 'bento-doc'
+// Split so the literal never appears in the bundle (it would terminate the
+// inline <script> that carries this very code inside a built Bento file).
+const SCRIPT_CLOSE = '</scr' + 'ipt>'
+
+let pristine: Document | null = null
+
+/** Call first thing at boot, before any DOM mutation. */
+export function capturePristine() {
+ pristine = document.cloneNode(true) as Document
+}
+
+export function readEmbeddedDoc(): string | null {
+ const block = document.getElementById(DATA_BLOCK_ID)
+ const text = block?.textContent?.trim()
+ return text || null
+}
+
+/** The full .bento.html file content with `doc` embedded. */
+export function serializeFile(doc: BentoDoc): string {
+ if (!pristine) throw new Error('capturePristine() was not called at boot')
+ const clone = pristine.cloneNode(true) as Document
+
+ let block = clone.getElementById(DATA_BLOCK_ID)
+ if (!block) {
+ block = clone.createElement('script')
+ block.setAttribute('type', 'application/bento+json')
+ block.id = DATA_BLOCK_ID
+ clone.head.appendChild(block)
+ }
+ // <-escape so the JSON can never contain "</script>" and break the file.
+ block.textContent = '\n' + JSON.stringify(doc).replace(/</g, '\\u003c') + '\n'
+
+ const title = clone.querySelector('title')
+ if (title) title.textContent = doc.title + ' — Bento Slides'
+
+ let html = '<!DOCTYPE html>\n' + clone.documentElement.outerHTML
+ // Belt-and-braces: an unescaped close tag anywhere in generated output would
+ // corrupt the file; this should never trigger given the escaping above.
+ if (html.split(SCRIPT_CLOSE).length !== pristine.querySelectorAll('script').length + 1) {
+ console.warn('bento: unexpected script-close count in serialized file')
+ }
+ return html
+}
+
+export function suggestedFileName(doc: BentoDoc): string {
+ const base = doc.title.replace(/[^\w\d-]+/g, '_').replace(/^_+|_+$/g, '') || 'Untitled'
+ return `${base}.bento.html`
+}
+
+// --- writing to disk --------------------------------------------------------
+
+type SaveResult = 'saved' | 'saved-as' | 'downloaded' | 'cancelled'
+
+interface FsFileHandle {
+ createWritable(): Promise<{ write(data: Blob): Promise<void>; close(): Promise<void> }>
+ name: string
+}
+
+let fileHandle: FsFileHandle | null = null
+
+const hasFsAccess = () => typeof (window as any).showSaveFilePicker === 'function'
+
+async function pickHandle(doc: BentoDoc): Promise<FsFileHandle | null> {
+ try {
+ return await (window as any).showSaveFilePicker({
+ suggestedName: suggestedFileName(doc),
+ types: [{ description: 'Bento Slides', accept: { 'text/html': ['.html'] } }],
+ })
+ } catch (err: any) {
+ if (err?.name === 'AbortError') return null
+ throw err
+ }
+}
+
+async function writeHandle(handle: FsFileHandle, html: string) {
+ const writable = await handle.createWritable()
+ await writable.write(new Blob([html], { type: 'text/html' }))
+ await writable.close()
+}
+
+function download(html: string, name: string) {
+ const url = URL.createObjectURL(new Blob([html], { type: 'text/html' }))
+ const a = document.createElement('a')
+ a.href = url
+ a.download = name
+ a.click()
+ setTimeout(() => URL.revokeObjectURL(url), 5000)
+}
+
+/**
+ * Save the document. Chrome/Edge: File System Access API (picker on first
+ * save, silent rewrite after). Firefox/Safari: download a copy.
+ */
+export async function saveFile(doc: BentoDoc, forcePicker = false): Promise<SaveResult> {
+ const html = serializeFile(doc)
+ if (hasFsAccess()) {
+ if (forcePicker || !fileHandle) {
+ const handle = await pickHandle(doc)
+ if (!handle) return 'cancelled'
+ fileHandle = handle
+ await writeHandle(handle, html)
+ return 'saved-as'
+ }
+ await writeHandle(fileHandle, html)
+ return 'saved'
+ }
+ download(html, suggestedFileName(doc))
+ return 'downloaded'
+}
+
+export const currentFileName = () => fileHandle?.name ?? null
diff --git a/slides/src/store.ts b/slides/src/store.ts
new file mode 100644
index 00000000..e79a46ae
--- /dev/null
+++ b/slides/src/store.ts
@@ -0,0 +1,115 @@
+import type { BentoDoc, Slide, SlideElement } from './model'
+
+export type StoreEvent =
+ | 'doc' // any document mutation
+ | 'slides' // slide list changed (add/remove/reorder) — sidebar rebuild
+ | 'current' // current slide switched
+ | 'selection' // selected element ids changed
+ | 'dirty' // dirty flag changed
+
+type Listener = () => void
+
+const MAX_UNDO = 100
+
+/** Central state: document, current slide, selection, undo/redo, dirty flag. */
+export class Store {
+ doc: BentoDoc
+ currentIndex = 0
+ selection: string[] = []
+ dirty = false
+
+ private undoStack: string[] = []
+ private redoStack: string[] = []
+ private listeners = new Map<StoreEvent, Set<Listener>>()
+
+ constructor(doc: BentoDoc) {
+ this.doc = doc
+ }
+
+ on(event: StoreEvent, fn: Listener): () => void {
+ if (!this.listeners.has(event)) this.listeners.set(event, new Set())
+ this.listeners.get(event)!.add(fn)
+ return () => this.listeners.get(event)!.delete(fn)
+ }
+
+ emit(event: StoreEvent) {
+ this.listeners.get(event)?.forEach((fn) => fn())
+ }
+
+ get slide(): Slide {
+ return this.doc.slides[this.currentIndex]
+ }
+
+ element(id: string): SlideElement | undefined {
+ return this.slide.elements.find((e) => e.id === id)
+ }
+
+ get selectedElements(): SlideElement[] {
+ return this.selection
+ .map((id) => this.element(id))
+ .filter((e): e is SlideElement => !!e)
+ }
+
+ // --- history ------------------------------------------------------------
+
+ /** Snapshot current doc state onto the undo stack. Call BEFORE a mutation. */
+ checkpoint() {
+ this.undoStack.push(JSON.stringify(this.doc))
+ if (this.undoStack.length > MAX_UNDO) this.undoStack.shift()
+ this.redoStack.length = 0
+ }
+
+ /** checkpoint() + mutate + notify, in one call. */
+ commit(mutate: () => void, event: StoreEvent = 'doc') {
+ this.checkpoint()
+ mutate()
+ this.touch(event)
+ }
+
+ /** Mark dirty and notify after an in-place mutation (no checkpoint). */
+ touch(event: StoreEvent = 'doc') {
+ this.doc.modified = new Date().toISOString()
+ this.setDirty(true)
+ this.emit('doc')
+ if (event !== 'doc') this.emit(event)
+ }
+
+ undo() { this.restore(this.undoStack, this.redoStack) }
+ redo() { this.restore(this.redoStack, this.undoStack) }
+
+ private restore(from: string[], to: string[]) {
+ const snapshot = from.pop()
+ if (!snapshot) return
+ to.push(JSON.stringify(this.doc))
+ this.doc = JSON.parse(snapshot)
+ this.currentIndex = Math.min(this.currentIndex, this.doc.slides.length - 1)
+ this.selection = this.selection.filter((id) => this.element(id))
+ this.setDirty(true)
+ this.emit('doc')
+ this.emit('slides')
+ this.emit('current')
+ this.emit('selection')
+ }
+
+ setDirty(dirty: boolean) {
+ if (this.dirty === dirty) return
+ this.dirty = dirty
+ this.emit('dirty')
+ }
+
+ // --- navigation & selection ----------------------------------------------
+
+ goTo(index: number) {
+ const clamped = Math.max(0, Math.min(index, this.doc.slides.length - 1))
+ if (clamped === this.currentIndex) return
+ this.currentIndex = clamped
+ this.selection = []
+ this.emit('current')
+ this.emit('selection')
+ }
+
+ select(ids: string[]) {
+ this.selection = ids
+ this.emit('selection')
+ }
+}
diff --git a/slides/src/styles.css b/slides/src/styles.css
new file mode 100644
index 00000000..79a9e4cf
--- /dev/null
+++ b/slides/src/styles.css
@@ -0,0 +1,352 @@
+/* ————— Bento Slides chrome ————— */
+
+:root {
+ --ink: #1e2a3a;
+ --ink-2: #31445c;
+ --chrome: #f5f7fa;
+ --chrome-2: #eceff4;
+ --line: #e3e8ef;
+ --muted: #5b6472;
+ --accent: #f7a600;
+ --accent-ink: #7a5200;
+ --blue: #5b8def;
+ --radius: 10px;
+}
+
+* { box-sizing: border-box; }
+
+html, body {
+ margin: 0;
+ height: 100%;
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
+ color: var(--ink);
+ background: var(--chrome);
+ overscroll-behavior: none;
+}
+
+#app { height: 100%; }
+
+.ed-root {
+ height: 100%;
+ display: flex;
+ flex-direction: column;
+ user-select: none;
+}
+
+/* ————— topbar ————— */
+
+.ed-topbar {
+ display: flex;
+ align-items: center;
+ gap: 10px;
+ padding: 8px 14px;
+ background: #fff;
+ border-bottom: 1px solid var(--line);
+ z-index: 20;
+}
+
+.ed-logo { display: flex; align-items: center; gap: 6px; font-size: 15px; white-space: nowrap; }
+.ed-logo-mark { font-size: 18px; }
+
+.ed-title {
+ font: inherit;
+ font-size: 14px;
+ color: var(--ink);
+ border: 1px solid transparent;
+ border-radius: 6px;
+ padding: 5px 8px;
+ width: 220px;
+ background: transparent;
+}
+.ed-title:hover { border-color: var(--line); }
+.ed-title:focus { border-color: var(--blue); outline: none; background: #fff; }
+
+.ed-dirty {
+ width: 8px; height: 8px; border-radius: 50%;
+ background: transparent; margin-left: -4px; flex: none;
+}
+.ed-dirty.on { background: var(--accent); }
+
+.ed-group { display: flex; align-items: center; gap: 6px; }
+.ed-group-right { margin-left: auto; }
+
+.ed-btn {
+ display: inline-flex;
+ align-items: center;
+ gap: 6px;
+ font: inherit;
+ font-size: 13px;
+ color: var(--ink-2);
+ background: transparent;
+ border: 1px solid transparent;
+ border-radius: 8px;
+ padding: 6px 9px;
+ cursor: pointer;
+ white-space: nowrap;
+}
+.ed-btn:hover { background: var(--chrome-2); }
+.ed-btn:active { background: var(--line); }
+.ed-btn svg { display: block; }
+
+.ed-btn-primary {
+ background: var(--ink);
+ color: #fff;
+ padding: 6px 14px;
+}
+.ed-btn-primary:hover { background: var(--ink-2); }
+
+.ed-dropdown { position: relative; }
+.ed-menu {
+ display: none;
+ position: absolute;
+ top: calc(100% + 4px);
+ left: 0;
+ flex-direction: column;
+ background: #fff;
+ border: 1px solid var(--line);
+ border-radius: var(--radius);
+ box-shadow: 0 8px 24px rgb(20 30 45 / 0.14);
+ padding: 4px;
+ z-index: 50;
+ min-width: 150px;
+}
+.ed-dropdown.open .ed-menu { display: flex; }
+.ed-menu .ed-btn { justify-content: flex-start; width: 100%; }
+
+/* ————— main layout ————— */
+
+.ed-main { flex: 1; display: flex; min-height: 0; }
+
+.ed-sidebar {
+ width: 188px;
+ flex: none;
+ overflow-y: auto;
+ padding: 12px;
+ display: flex;
+ flex-direction: column;
+ gap: 10px;
+ background: #fff;
+ border-right: 1px solid var(--line);
+}
+
+.ed-thumb {
+ position: relative;
+ border: 2px solid var(--line);
+ border-radius: 8px;
+ overflow: hidden;
+ cursor: pointer;
+ flex: none;
+ background: #fff;
+}
+.ed-thumb:hover { border-color: #c9d2de; }
+.ed-thumb.active { border-color: var(--accent); }
+.ed-thumb.drop { border-color: var(--blue); }
+.ed-thumb-num {
+ position: absolute;
+ top: 4px; left: 4px;
+ z-index: 2;
+ font-size: 10px;
+ font-weight: 600;
+ color: var(--muted);
+ background: rgb(255 255 255 / 0.85);
+ border-radius: 4px;
+ padding: 1px 5px;
+}
+.ed-thumb-tools {
+ position: absolute;
+ right: 4px; top: 4px;
+ z-index: 2;
+ display: none;
+ gap: 2px;
+}
+.ed-thumb:hover .ed-thumb-tools { display: flex; }
+.ed-thumb-tools .ed-btn { padding: 3px; background: rgb(255 255 255 / 0.9); }
+
+.bento-thumb-surface { overflow: hidden; pointer-events: none; }
+
+.ed-add-slide { border: 1.5px dashed var(--line); justify-content: center; color: var(--muted); }
+
+/* ————— canvas ————— */
+
+.ed-canvas-wrap {
+ flex: 1;
+ min-width: 0;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ background:
+ radial-gradient(circle at 1px 1px, #d5dbe4 1px, transparent 0) 0 0 / 22px 22px,
+ var(--chrome);
+ overflow: hidden;
+ position: relative;
+}
+
+.ed-stage {
+ position: relative;
+ flex: none;
+ box-shadow: 0 10px 40px rgb(20 30 45 / 0.18), 0 2px 8px rgb(20 30 45 / 0.10);
+ border-radius: 2px;
+}
+
+.ed-stage-scale { position: absolute; top: 0; left: 0; transform-origin: 0 0; }
+
+/* ————— slide surface (shared by canvas, thumbs, present) ————— */
+
+.bento-slide { position: relative; overflow: hidden; }
+
+.bento-el { position: absolute; }
+.bento-el-text .bento-text-inner {
+ overflow-wrap: break-word;
+ outline: none;
+ cursor: default;
+}
+.ed-stage .bento-el { cursor: grab; }
+.ed-stage .bento-el:active { cursor: grabbing; }
+.ed-stage .bento-editing { cursor: text; }
+.ed-stage .bento-editing .bento-text-inner {
+ cursor: text;
+ user-select: text;
+ box-shadow: 0 0 0 1.5px var(--blue);
+ background: rgb(91 141 239 / 0.06);
+ min-height: 1em;
+}
+
+/* ————— properties panel ————— */
+
+.ed-props {
+ width: 236px;
+ flex: none;
+ overflow-y: auto;
+ background: #fff;
+ border-left: 1px solid var(--line);
+ padding: 14px;
+}
+
+.ed-section {
+ font-size: 11px;
+ font-weight: 700;
+ text-transform: uppercase;
+ letter-spacing: 0.07em;
+ color: var(--muted);
+ margin: 18px 0 8px;
+}
+.ed-section:first-child { margin-top: 2px; }
+
+.ed-row {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ gap: 8px;
+ margin-bottom: 8px;
+ font-size: 12.5px;
+ color: var(--ink-2);
+}
+.ed-row > span { flex: none; }
+.ed-row input[type='number'], .ed-row select {
+ width: 110px;
+ font: inherit;
+ font-size: 12.5px;
+ padding: 4px 6px;
+ border: 1px solid var(--line);
+ border-radius: 6px;
+ background: #fff;
+ color: var(--ink);
+}
+.ed-row input[type='color'] {
+ width: 110px;
+ height: 26px;
+ padding: 1px 2px;
+ border: 1px solid var(--line);
+ border-radius: 6px;
+ background: #fff;
+}
+
+.ed-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
+.ed-mini { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); }
+.ed-mini input {
+ width: 100%;
+ min-width: 0;
+ font: inherit;
+ font-size: 12px;
+ padding: 4px 5px;
+ border: 1px solid var(--line);
+ border-radius: 6px;
+}
+
+.ed-ops { display: flex; gap: 4px; margin-bottom: 10px; }
+.ed-btn-icon { border: 1px solid var(--line); padding: 6px; }
+
+.ed-notes {
+ width: 100%;
+ min-height: 130px;
+ font: inherit;
+ font-size: 12.5px;
+ line-height: 1.5;
+ padding: 8px;
+ border: 1px solid var(--line);
+ border-radius: 8px;
+ resize: vertical;
+ color: var(--ink);
+}
+
+.ed-hint {
+ font-size: 11.5px;
+ line-height: 1.45;
+ color: var(--muted);
+ background: var(--chrome);
+ border-radius: 8px;
+ padding: 8px 10px;
+}
+.ed-hint code { font-size: 10.5px; word-break: break-all; }
+
+/* ————— toast ————— */
+
+.ed-toast {
+ position: fixed;
+ left: 50%;
+ bottom: 26px;
+ transform: translate(-50%, 12px);
+ background: var(--ink);
+ color: #fff;
+ font-size: 13px;
+ padding: 9px 16px;
+ border-radius: 999px;
+ opacity: 0;
+ transition: all 0.25s ease;
+ z-index: 2000;
+ pointer-events: none;
+}
+.ed-toast.show { opacity: 1; transform: translate(-50%, 0); }
+
+/* ————— present overlay ————— */
+
+.bento-present-overlay {
+ position: fixed;
+ inset: 0;
+ z-index: 1000;
+ background: #000;
+}
+.bento-present-overlay .reveal,
+.bento-present-overlay .reveal-viewport {
+ background: #000;
+}
+.bento-present-overlay .reveal {
+ width: 100%;
+ height: 100%;
+ --r-background-color: #000;
+ --r-main-color: #fff;
+ --r-main-font-size: 32px;
+ --r-link-color: #f7a600;
+ --r-link-color-hover: #ffc23e;
+ --r-selection-background-color: #f7a600;
+ --r-controls-color: rgb(255 255 255 / 0.6);
+ --r-progress-color: #f7a600;
+ --r-overlay-element-bg-color: 255, 255, 255;
+ --r-overlay-element-fg-color: 0, 0, 0;
+}
+.bento-present-overlay .reveal .slides section { padding: 0; }
+
+/* moveable accents */
+.moveable-control-box {
+ --moveable-color: var(--blue);
+}
diff --git a/slides/src/types.d.ts b/slides/src/types.d.ts
new file mode 100644
index 00000000..ce328b36
--- /dev/null
+++ b/slides/src/types.d.ts
@@ -0,0 +1,5 @@
+declare module 'reveal.js/plugin/notes/notes' {
+ import type { PluginFunction } from 'reveal.js'
+ const RevealNotes: PluginFunction
+ export default RevealNotes
+}
diff --git a/slides/tsconfig.json b/slides/tsconfig.json
new file mode 100644
index 00000000..f51f643a
--- /dev/null
+++ b/slides/tsconfig.json
@@ -0,0 +1,19 @@
+{
+ "compilerOptions": {
+ "target": "ES2022",
+ "useDefineForClassFields": true,
+ "module": "ESNext",
+ "lib": ["ES2022", "DOM", "DOM.Iterable"],
+ "skipLibCheck": true,
+ "moduleResolution": "bundler",
+ "allowImportingTsExtensions": true,
+ "isolatedModules": true,
+ "moduleDetection": "force",
+ "noEmit": true,
+ "strict": true,
+ "noUnusedLocals": true,
+ "noUnusedParameters": true,
+ "noFallthroughCasesInSwitch": true
+ },
+ "include": ["src"]
+}
diff --git a/slides/vite.config.ts b/slides/vite.config.ts
new file mode 100644
index 00000000..f401d5ab
--- /dev/null
+++ b/slides/vite.config.ts
@@ -0,0 +1,15 @@
+import { defineConfig } from 'vite'
+import { viteSingleFile } from 'vite-plugin-singlefile'
+
+// base './' so builds open from file:// or any static host.
+// SINGLEFILE=1 → everything (JS, CSS, assets) inlined into one HTML file:
+// that file IS the Bento document format.
+export default defineConfig({
+ base: './',
+ plugins: [...(process.env.SINGLEFILE ? [viteSingleFile()] : [])],
+ build: {
+ // Keep asset inlining aggressive; a Bento file must have zero external requests.
+ assetsInlineLimit: 100_000_000,
+ chunkSizeWarningLimit: 4096,
+ },
+})