@treasure-ai/treasure-deck 2026.10.6 → 2026.10.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -12
- package/dist/chrome.d.ts +10 -1
- package/dist/chrome.js +88 -13
- package/dist/chrome.js.map +1 -1
- package/dist/cli.js +17 -16
- package/dist/cli.js.map +1 -1
- package/dist/dev.js +5 -11
- package/dist/dev.js.map +1 -1
- package/dist/diagrams.js +2 -2
- package/dist/diagrams.js.map +1 -1
- package/dist/media.d.ts +1 -1
- package/dist/media.js +1 -1
- package/dist/scaffold.d.ts +2 -0
- package/dist/scaffold.js +10 -1
- package/dist/scaffold.js.map +1 -1
- package/dist/update.d.ts +7 -0
- package/dist/update.js +17 -5
- package/dist/update.js.map +1 -1
- package/dist/vendor.d.ts +13 -0
- package/dist/vendor.js +46 -0
- package/dist/vendor.js.map +1 -0
- package/docs/commands.md +4 -4
- package/docs/editor.md +3 -3
- package/docs/syntax.md +2 -2
- package/docs/themes.md +1 -1
- package/package.json +5 -6
- package/runtime/edit-core.cjs +236 -1
- package/runtime/embed.js +66 -151
- package/skills/treasure-deck/SKILL.md +28 -9
- package/vendor/lucide/LICENSE +43 -0
- package/vendor/lucide/align-center.svg +17 -0
- package/vendor/lucide/align-left.svg +17 -0
- package/vendor/lucide/align-right.svg +17 -0
- package/vendor/lucide/arrow-down.svg +16 -0
- package/vendor/lucide/arrow-up.svg +16 -0
- package/vendor/lucide/bold.svg +15 -0
- package/vendor/lucide/chevron-down.svg +15 -0
- package/vendor/lucide/clipboard-paste.svg +19 -0
- package/vendor/lucide/code.svg +16 -0
- package/vendor/lucide/copy-plus.svg +18 -0
- package/vendor/lucide/copy.svg +16 -0
- package/vendor/lucide/external-link.svg +17 -0
- package/vendor/lucide/eye-off.svg +18 -0
- package/vendor/lucide/eye.svg +16 -0
- package/vendor/lucide/file-code.svg +18 -0
- package/vendor/lucide/heading-1.svg +18 -0
- package/vendor/lucide/heading-2.svg +18 -0
- package/vendor/lucide/heading-3.svg +19 -0
- package/vendor/lucide/highlighter.svg +16 -0
- package/vendor/lucide/italic.svg +17 -0
- package/vendor/lucide/layers.svg +17 -0
- package/vendor/lucide/link.svg +16 -0
- package/vendor/lucide/list-ordered.svg +20 -0
- package/vendor/lucide/list.svg +20 -0
- package/vendor/lucide/pilcrow.svg +17 -0
- package/vendor/lucide/pin-off.svg +18 -0
- package/vendor/lucide/play.svg +15 -0
- package/vendor/lucide/plus.svg +16 -0
- package/vendor/lucide/presentation.svg +17 -0
- package/vendor/lucide/quote.svg +16 -0
- package/vendor/lucide/redo-2.svg +16 -0
- package/vendor/lucide/repeat.svg +18 -0
- package/vendor/lucide/scissors.svg +19 -0
- package/vendor/lucide/settings.svg +16 -0
- package/vendor/lucide/sliders-horizontal.svg +23 -0
- package/vendor/lucide/square-round-corner.svg +16 -0
- package/vendor/lucide/square.svg +15 -0
- package/vendor/lucide/strikethrough.svg +17 -0
- package/vendor/lucide/trash-2.svg +19 -0
- package/vendor/lucide/undo-2.svg +16 -0
- package/vendor/mermaid/LICENSE +21 -0
- package/vendor/mermaid/mermaid.min.js +3636 -0
- package/docs/adrs/2026-10-03-chrome-over-devtools.md +0 -29
- package/docs/adrs/2026-10-03-fixed-canvas.md +0 -25
- package/docs/adrs/2026-10-03-four-layouts-plus-attributes.md +0 -25
- package/docs/adrs/2026-10-03-hybrid-pdf-over-devtools.md +0 -25
- package/docs/adrs/2026-10-03-keyword-lines-and-one-attribute-syntax.md +0 -36
- package/docs/adrs/2026-10-03-one-behavior-instead-of-settings.md +0 -30
- package/docs/adrs/2026-10-03-overflow-is-reported-not-hidden.md +0 -27
- package/docs/adrs/2026-10-03-single-file-html.md +0 -26
- package/docs/adrs/2026-10-03-strict-build-forgiving-preview.md +0 -31
- package/docs/adrs/2026-10-04-edit-in-place-by-alignment.md +0 -28
- package/docs/adrs/2026-10-04-editor-in-the-deck-page.md +0 -31
- package/docs/adrs/2026-10-04-edits-are-line-range-patches.md +0 -35
- package/docs/adrs/2026-10-04-per-slide-hot-swap.md +0 -33
- package/docs/adrs/2026-10-04-theme-colors-derive-in-css.md +0 -32
- package/docs/adrs/2026-10-05-host-owns-undo.md +0 -26
- package/docs/adrs/2026-10-07-anonymous-access-metrics.md +0 -38
- package/docs/adrs/2026-10-14-dev-links-media-by-url.md +0 -25
- package/docs/adrs/2026-10-14-media-dir-for-the-publish-limit.md +0 -28
- package/docs/adrs/2026-10-14-videos-are-inlined-images.md +0 -28
- package/docs/adrs/2026-10-15-public-npm-under-labs-terms.md +0 -37
- package/docs/adrs/2026-10-16-updates-install-after-exit.md +0 -31
- package/docs/adrs/README.md +0 -35
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
status: accepted
|
|
3
|
-
date: 2026-10-16
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Global installs update themselves, after `deck` exits
|
|
7
|
-
|
|
8
|
-
## Context
|
|
9
|
-
|
|
10
|
-
treasure-deck releases several times a week, much more often than Treasure Work. Treasure Work runs `deck dev --embed` in its dock and keeps it open for hours. People who installed it with `npm install -g` stayed on that version until they reinstalled. `deck dev` and `deck editor` read the runtime (`runtime/*.js`, `base.css`) and the themes from the package folder on every rebuild. So replacing the package while one runs would serve a new `embed.js` from an old server.
|
|
11
|
-
|
|
12
|
-
## Decision
|
|
13
|
-
|
|
14
|
-
- State is kept per copy, in `~/.treasure-deck/<hash of the package folder>/`. Every command except `version` and `update`, run from a global install, records itself there in `sessions/<pid>`, whether or not background updates are on. At most once an hour, it spawns a detached `deck __update` and doesn't wait for it.
|
|
15
|
-
- The child takes `update.lock` and checks that this copy is a global install, either npm's or pnpm's. It reads the `latest` dist-tag, or `next` when `DECK_UPDATE_CHANNEL=next`. When that's newer, it waits until no session of this copy is alive, then installs with the same manager. The next start prints the change.
|
|
16
|
-
- npm's global install is recognized by its layout, `<prefix>/lib/node_modules/<package>` with `<prefix>/bin/deck` linking to it, and updated with `--prefix <prefix>`. `npm root -g` isn't used: npm masks path segments that look like tokens, such as UUIDs, in its output. The layout also finds a copy under a prefix no environment variable names.
|
|
17
|
-
- `deck update` installs at once, in the foreground. `DECK_DISABLE_AUTOUPDATE=1` and `CI` turn off the background updates.
|
|
18
|
-
|
|
19
|
-
## Consequences
|
|
20
|
-
|
|
21
|
-
- A dock session updates when it's closed, not while it's open, so a long session can run an old version for a while.
|
|
22
|
-
- A child can wait for hours. It's an idle Node process, and `update.lock` keeps it the only one per copy. `install.lock` stops it and `deck update` from installing at once.
|
|
23
|
-
- npx copies, project dependencies, and checkouts are never touched. `deck update` says how to update them instead.
|
|
24
|
-
- A global folder that needs `sudo` can't be updated. The failure is reported once a day.
|
|
25
|
-
|
|
26
|
-
## Alternatives considered
|
|
27
|
-
|
|
28
|
-
- **Install while the command runs**, as Claude Code's npm updater did: that would mix versions in a long-running `deck dev`.
|
|
29
|
-
- **Install before the command starts:** an npm install takes 5–20 s, and an offline start would hang until the timeout.
|
|
30
|
-
- **Versioned install folders behind a launcher shim**, as Claude Code's native installer does: that switches atomically even mid-session, but it means a second way to distribute deck next to npm.
|
|
31
|
-
- **Treasure Work updates deck itself:** that covers only the dock, and other hosts would each need their own updater.
|
package/docs/adrs/README.md
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
# Architecture decision records
|
|
2
|
-
|
|
3
|
-
Each record states one decision that shapes treasure-deck's internals: the context it was made in, the decision, what follows from it, and the alternatives that were turned down. They are short on purpose; the details of how each is built are in `docs/design.md` and the implementation plans in `plans/`, in the source repository.
|
|
4
|
-
|
|
5
|
-
A record is named `YYYY-MM-DD-<decision>.md`, after the day the decision landed. When a decision changes, add a new record that supersedes the old one and mark the old one `status: superseded by <file>`, rather than rewriting history.
|
|
6
|
-
|
|
7
|
-
## Authoring
|
|
8
|
-
|
|
9
|
-
- [2026-10-03 Slides are divided by keyword lines, styled by one `{…}` syntax](2026-10-03-keyword-lines-and-one-attribute-syntax.md)
|
|
10
|
-
- [2026-10-03 Four layouts, and attributes for everything else](2026-10-03-four-layouts-plus-attributes.md)
|
|
11
|
-
- [2026-10-03 One built-in behavior instead of settings](2026-10-03-one-behavior-instead-of-settings.md)
|
|
12
|
-
- [2026-10-03 Overflow is reported, not hidden](2026-10-03-overflow-is-reported-not-hidden.md)
|
|
13
|
-
|
|
14
|
-
## Build and output
|
|
15
|
-
|
|
16
|
-
- [2026-10-03 A deck builds to one self-contained HTML file](2026-10-03-single-file-html.md)
|
|
17
|
-
- [2026-10-03 A fixed 1280×720 canvas](2026-10-03-fixed-canvas.md)
|
|
18
|
-
- [2026-10-03 Strict build, forgiving preview](2026-10-03-strict-build-forgiving-preview.md)
|
|
19
|
-
- [2026-10-03 Headless Chrome is the one renderer, driven over the DevTools protocol](2026-10-03-chrome-over-devtools.md)
|
|
20
|
-
- [2026-10-03 Hybrid PDF: backgrounds as images, content as vectors](2026-10-03-hybrid-pdf-over-devtools.md)
|
|
21
|
-
- [2026-10-04 Theme colors derive from a few seeds, in CSS](2026-10-04-theme-colors-derive-in-css.md)
|
|
22
|
-
- [2026-10-14 Videos take image syntax and are inlined like images](2026-10-14-videos-are-inlined-images.md)
|
|
23
|
-
- [2026-10-14 Pages past Apps Script's limit warn, and videos can leave the page](2026-10-14-media-dir-for-the-publish-limit.md)
|
|
24
|
-
- [2026-10-14 `deck dev` links media by URL, not inlined](2026-10-14-dev-links-media-by-url.md)
|
|
25
|
-
- [2026-10-15 Released to public npm as a Treasure AI Labs offering, not as open source](2026-10-15-public-npm-under-labs-terms.md)
|
|
26
|
-
- [2026-10-16 Global installs update themselves, after `deck` exits](2026-10-16-updates-install-after-exit.md)
|
|
27
|
-
|
|
28
|
-
## Editing
|
|
29
|
-
|
|
30
|
-
- [2026-10-04 Edits are compare-and-swap patches on line ranges](2026-10-04-edits-are-line-range-patches.md)
|
|
31
|
-
- [2026-10-04 Text is edited in place only where rendered text lines up with its source](2026-10-04-edit-in-place-by-alignment.md)
|
|
32
|
-
- [2026-10-04 The whole editor lives in the deck's page](2026-10-04-editor-in-the-deck-page.md)
|
|
33
|
-
- [2026-10-04 The preview swaps changed slides in place](2026-10-04-per-slide-hot-swap.md)
|
|
34
|
-
- [2026-10-05 The host owns undo](2026-10-05-host-owns-undo.md)
|
|
35
|
-
- [2026-10-07 Built decks report anonymous access metrics](2026-10-07-anonymous-access-metrics.md)
|