@treasure-ai/treasure-deck 2026.10.3 → 2026.10.5
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 +4 -2
- package/dist/build.js +1 -1
- package/dist/build.js.map +1 -1
- package/dist/cli.js +33 -1
- package/dist/cli.js.map +1 -1
- package/dist/render.d.ts +6 -0
- package/dist/render.js +96 -0
- package/dist/render.js.map +1 -1
- package/dist/update.d.ts +82 -0
- package/dist/update.js +344 -0
- package/dist/update.js.map +1 -0
- package/docs/adrs/2026-10-16-updates-install-after-exit.md +31 -0
- package/docs/adrs/README.md +1 -0
- package/docs/commands.md +23 -0
- package/docs/editor.md +1 -1
- package/docs/syntax.md +26 -2
- package/docs/themes.md +16 -5
- package/package.json +3 -3
- package/runtime/base.css +5 -0
- package/runtime/edit-core.cjs +28 -0
- package/runtime/embed.js +7 -4
- package/skills/treasure-deck/SKILL.md +223 -55
- package/themes/default/theme.css +1 -1
- package/themes/editorial/theme.css +1 -1
- package/themes/gold/theme.css +1 -1
- package/themes/treasure-ai/theme.css +1 -1
- package/themes/treasure-ai-2026/assets/gem.svg +25 -0
- package/themes/treasure-ai-2026/assets/glass.svg +12 -0
- package/themes/treasure-ai-2026/assets/logo-white.png +0 -0
- package/themes/treasure-ai-2026/assets/logo.png +0 -0
- package/themes/treasure-ai-2026/theme.css +259 -0
- package/themes/treasure-ai-2026/theme.yaml +7 -0
package/dist/update.js
ADDED
|
@@ -0,0 +1,344 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Auto-update for global installs (plans/2026-10-16-auto-update.md). A command that starts checks the state file and,
|
|
3
|
+
* at most once an hour, spawns a detached child (`deck __update`) that asks the registry for a newer release and
|
|
4
|
+
* installs it with the package manager that installed this copy once no `deck` from this copy is running, so a
|
|
5
|
+
* long `deck dev` never serves files from two versions. The next start prints what changed.
|
|
6
|
+
*/
|
|
7
|
+
import { execFileSync, spawn } from 'node:child_process';
|
|
8
|
+
import { createHash } from 'node:crypto';
|
|
9
|
+
import { existsSync, mkdirSync, readdirSync, readFileSync, realpathSync, renameSync, unlinkSync, writeFileSync } from 'node:fs';
|
|
10
|
+
import { homedir } from 'node:os';
|
|
11
|
+
import * as path from 'node:path';
|
|
12
|
+
import { DeckError } from './parse.js';
|
|
13
|
+
export const PACKAGE_NAME = '@treasure-ai/treasure-deck';
|
|
14
|
+
const CHECK_INTERVAL_MS = 60 * 60 * 1000;
|
|
15
|
+
/** A failed install of a version is retried after this long; `deck update` shows the error at once. */
|
|
16
|
+
const RETRY_FAILED_MS = 24 * 60 * 60 * 1000;
|
|
17
|
+
const FETCH_TIMEOUT_MS = 5000;
|
|
18
|
+
const WAIT_POLL_MS = 5000;
|
|
19
|
+
/**
|
|
20
|
+
* `~/.treasure-deck/<hash of the package folder>`: each copy (a global install, another under an app's own prefix)
|
|
21
|
+
* checks, waits, and reports on its own.
|
|
22
|
+
*/
|
|
23
|
+
export function stateDirFor(packageRoot) {
|
|
24
|
+
return path.join(homedir(), '.treasure-deck', createHash('sha256').update(real(packageRoot)).digest('hex').slice(0, 12));
|
|
25
|
+
}
|
|
26
|
+
/** -1, 0, or 1 for CalVer (or any dotted-number) versions; a version that isn't one compares as equal. */
|
|
27
|
+
export function compareVersions(a, b) {
|
|
28
|
+
const pa = a.split('.').map(Number);
|
|
29
|
+
const pb = b.split('.').map(Number);
|
|
30
|
+
if ([...pa, ...pb].some((n) => !Number.isInteger(n)))
|
|
31
|
+
return 0;
|
|
32
|
+
for (let i = 0; i < Math.max(pa.length, pb.length); i++) {
|
|
33
|
+
const d = (pa[i] ?? 0) - (pb[i] ?? 0);
|
|
34
|
+
if (d)
|
|
35
|
+
return Math.sign(d);
|
|
36
|
+
}
|
|
37
|
+
return 0;
|
|
38
|
+
}
|
|
39
|
+
/** Why auto-update is off, or undefined when it's on. A checkout (0.0.0-dev) is updated with git, not npm. */
|
|
40
|
+
export function autoUpdateDisabled(version, env) {
|
|
41
|
+
if (env.DECK_DISABLE_AUTOUPDATE && env.DECK_DISABLE_AUTOUPDATE !== '0')
|
|
42
|
+
return 'DECK_DISABLE_AUTOUPDATE is set';
|
|
43
|
+
if (env.CI)
|
|
44
|
+
return 'CI is set';
|
|
45
|
+
if (version === '0.0.0-dev')
|
|
46
|
+
return 'this is a source checkout';
|
|
47
|
+
return undefined;
|
|
48
|
+
}
|
|
49
|
+
export function channelFor(env, next = false) {
|
|
50
|
+
return next || env.DECK_UPDATE_CHANNEL === 'next' ? 'next' : 'latest';
|
|
51
|
+
}
|
|
52
|
+
function statePath(dir) {
|
|
53
|
+
return path.join(dir, 'update.json');
|
|
54
|
+
}
|
|
55
|
+
export function readState(dir) {
|
|
56
|
+
try {
|
|
57
|
+
return JSON.parse(readFileSync(statePath(dir), 'utf8'));
|
|
58
|
+
}
|
|
59
|
+
catch {
|
|
60
|
+
return {};
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
/** Merge into the state file, through a rename so a concurrent reader never sees half a file. */
|
|
64
|
+
export function writeState(dir, patch) {
|
|
65
|
+
mkdirSync(dir, { recursive: true });
|
|
66
|
+
const next = { ...readState(dir), ...patch };
|
|
67
|
+
const tmp = `${statePath(dir)}.${process.pid}`;
|
|
68
|
+
writeFileSync(tmp, JSON.stringify(next, null, 2) + '\n');
|
|
69
|
+
renameSync(tmp, statePath(dir));
|
|
70
|
+
}
|
|
71
|
+
function alive(pid) {
|
|
72
|
+
try {
|
|
73
|
+
process.kill(pid, 0);
|
|
74
|
+
return true;
|
|
75
|
+
}
|
|
76
|
+
catch (e) {
|
|
77
|
+
return e.code === 'EPERM';
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
function real(p) {
|
|
81
|
+
try {
|
|
82
|
+
return realpathSync(p);
|
|
83
|
+
}
|
|
84
|
+
catch {
|
|
85
|
+
return path.resolve(p);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
const exitFiles = new Set();
|
|
89
|
+
function removeOnExit(file) {
|
|
90
|
+
if (!exitFiles.size) {
|
|
91
|
+
process.on('exit', () => {
|
|
92
|
+
for (const f of exitFiles) {
|
|
93
|
+
try {
|
|
94
|
+
unlinkSync(f);
|
|
95
|
+
}
|
|
96
|
+
catch {
|
|
97
|
+
// Already gone.
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
exitFiles.add(file);
|
|
103
|
+
}
|
|
104
|
+
/** Record this process as a running `deck` of this copy until it exits, so the installer waits for it. */
|
|
105
|
+
export function registerSession(ctx) {
|
|
106
|
+
const dir = path.join(ctx.stateDir, 'sessions');
|
|
107
|
+
const file = path.join(dir, String(process.pid));
|
|
108
|
+
try {
|
|
109
|
+
mkdirSync(dir, { recursive: true });
|
|
110
|
+
writeFileSync(file, '');
|
|
111
|
+
removeOnExit(file);
|
|
112
|
+
}
|
|
113
|
+
catch {
|
|
114
|
+
// An unwritable home only means an update could land while this runs.
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
/** The pids of other running `deck` processes from this copy; stale entries (killed processes) are removed. */
|
|
118
|
+
export function runningSessions(ctx) {
|
|
119
|
+
const dir = path.join(ctx.stateDir, 'sessions');
|
|
120
|
+
let names;
|
|
121
|
+
try {
|
|
122
|
+
names = readdirSync(dir);
|
|
123
|
+
}
|
|
124
|
+
catch {
|
|
125
|
+
return [];
|
|
126
|
+
}
|
|
127
|
+
const pids = [];
|
|
128
|
+
for (const name of names) {
|
|
129
|
+
const pid = Number(name);
|
|
130
|
+
const file = path.join(dir, name);
|
|
131
|
+
if (!Number.isInteger(pid) || !alive(pid)) {
|
|
132
|
+
try {
|
|
133
|
+
unlinkSync(file);
|
|
134
|
+
}
|
|
135
|
+
catch {
|
|
136
|
+
// Removed by another process.
|
|
137
|
+
}
|
|
138
|
+
continue;
|
|
139
|
+
}
|
|
140
|
+
if (pid !== process.pid)
|
|
141
|
+
pids.push(pid);
|
|
142
|
+
}
|
|
143
|
+
return pids;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Called as a command starts: the notices to print about an earlier update, and the background check when one is
|
|
147
|
+
* due. Never throws and never waits on the network.
|
|
148
|
+
*/
|
|
149
|
+
export function onStart(ctx, spawnCheck = () => spawnBackgroundCheck(ctx)) {
|
|
150
|
+
const notices = [];
|
|
151
|
+
try {
|
|
152
|
+
// Only a global install is updated, so only it records a session for the updater to find.
|
|
153
|
+
if (installMethod(ctx))
|
|
154
|
+
registerSession(ctx);
|
|
155
|
+
if (autoUpdateDisabled(ctx.version, ctx.env))
|
|
156
|
+
return notices;
|
|
157
|
+
const state = readState(ctx.stateDir);
|
|
158
|
+
const patch = {};
|
|
159
|
+
if (state.updated) {
|
|
160
|
+
if (state.updated.to === ctx.version)
|
|
161
|
+
notices.push(`treasure-deck updated to ${state.updated.to} (from ${state.updated.from})`);
|
|
162
|
+
patch.updated = undefined;
|
|
163
|
+
}
|
|
164
|
+
if (state.failed && !state.failed.notified && compareVersions(state.failed.version, ctx.version) > 0) {
|
|
165
|
+
notices.push(`treasure-deck couldn't update itself to ${state.failed.version}; run \`deck update\` to see why`);
|
|
166
|
+
patch.failed = { ...state.failed, notified: true };
|
|
167
|
+
}
|
|
168
|
+
// Written before spawning, so a burst of commands starts one check, not one each.
|
|
169
|
+
const due = Date.now() - (state.lastCheck ?? 0) >= CHECK_INTERVAL_MS;
|
|
170
|
+
if (due)
|
|
171
|
+
patch.lastCheck = Date.now();
|
|
172
|
+
if (Object.keys(patch).length)
|
|
173
|
+
writeState(ctx.stateDir, patch);
|
|
174
|
+
if (due)
|
|
175
|
+
spawnCheck();
|
|
176
|
+
}
|
|
177
|
+
catch {
|
|
178
|
+
// Updating is best effort; the command itself goes on.
|
|
179
|
+
}
|
|
180
|
+
return notices;
|
|
181
|
+
}
|
|
182
|
+
function spawnBackgroundCheck(ctx) {
|
|
183
|
+
const child = spawn(process.execPath, [path.join(ctx.packageRoot, 'dist', 'cli.js'), '__update'], {
|
|
184
|
+
detached: true,
|
|
185
|
+
stdio: 'ignore',
|
|
186
|
+
windowsHide: true,
|
|
187
|
+
env: ctx.env,
|
|
188
|
+
// Not the command's folder, which the child would hold on to while it waits (a volume, a temp folder).
|
|
189
|
+
cwd: ctx.stateDir,
|
|
190
|
+
});
|
|
191
|
+
child.on('error', () => { });
|
|
192
|
+
child.unref();
|
|
193
|
+
}
|
|
194
|
+
/** Runs npm or pnpm. Only queries time out: killing an install midway could leave the package half replaced. */
|
|
195
|
+
function packageManager(manager, args, env, inherit = false, query = false) {
|
|
196
|
+
const win = process.platform === 'win32';
|
|
197
|
+
return execFileSync(win ? `${manager}.cmd` : manager, args, {
|
|
198
|
+
encoding: 'utf8',
|
|
199
|
+
env,
|
|
200
|
+
// Windows runs .cmd files only through a shell; the arguments are ours, never user input.
|
|
201
|
+
shell: win,
|
|
202
|
+
windowsHide: true,
|
|
203
|
+
stdio: ['ignore', inherit ? 'inherit' : 'pipe', inherit ? 'inherit' : 'pipe'],
|
|
204
|
+
cwd: homedir(),
|
|
205
|
+
timeout: query ? 60 * 1000 : undefined,
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* npm or pnpm when this copy is that manager's global install, else undefined (npx, a project's dependency, a link).
|
|
210
|
+
* npm's is recognized by its layout, `<prefix>/lib/node_modules/<package>` with `<prefix>/bin/deck` linking to it
|
|
211
|
+
* (`<prefix>/node_modules/<package>` and `<prefix>/deck.cmd` on Windows), not by `npm root -g`: npm masks parts of
|
|
212
|
+
* paths that look like tokens in its output, and the layout also finds a copy under a prefix the environment doesn't
|
|
213
|
+
* name, such as one an app installs for itself.
|
|
214
|
+
*/
|
|
215
|
+
export function installMethod(ctx) {
|
|
216
|
+
const root = real(ctx.packageRoot);
|
|
217
|
+
const modules = path.dirname(path.dirname(root));
|
|
218
|
+
const parent = path.dirname(modules);
|
|
219
|
+
if (path.join(modules, PACKAGE_NAME) === root && path.basename(modules) === 'node_modules') {
|
|
220
|
+
if (process.platform === 'win32') {
|
|
221
|
+
if (existsSync(path.join(parent, 'deck.cmd')))
|
|
222
|
+
return { manager: 'npm', prefix: parent };
|
|
223
|
+
}
|
|
224
|
+
else if (path.basename(parent) === 'lib' && real(path.join(parent, '..', 'bin', 'deck')) === path.join(root, 'dist', 'cli.js')) {
|
|
225
|
+
return { manager: 'npm', prefix: path.dirname(parent) };
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
try {
|
|
229
|
+
const globalRoot = packageManager('pnpm', ['root', '-g'], ctx.env, false, true).trim();
|
|
230
|
+
const installed = path.join(globalRoot, PACKAGE_NAME);
|
|
231
|
+
if (globalRoot && existsSync(installed) && real(installed) === root)
|
|
232
|
+
return { manager: 'pnpm' };
|
|
233
|
+
}
|
|
234
|
+
catch {
|
|
235
|
+
// No pnpm.
|
|
236
|
+
}
|
|
237
|
+
return undefined;
|
|
238
|
+
}
|
|
239
|
+
/** The version a dist-tag points to, from the registry npm is configured with in the environment. */
|
|
240
|
+
export async function fetchDistTag(env, channel) {
|
|
241
|
+
const registry = (env.npm_config_registry || env.NPM_CONFIG_REGISTRY || 'https://registry.npmjs.org').replace(/\/+$/, '');
|
|
242
|
+
const res = await fetch(`${registry}/${PACKAGE_NAME.replaceAll('/', '%2f')}`, {
|
|
243
|
+
headers: { accept: 'application/vnd.npm.install-v1+json' },
|
|
244
|
+
signal: AbortSignal.timeout(FETCH_TIMEOUT_MS),
|
|
245
|
+
});
|
|
246
|
+
if (!res.ok)
|
|
247
|
+
throw new Error(`${registry} answered ${res.status}`);
|
|
248
|
+
const version = (await res.json())['dist-tags']?.[channel];
|
|
249
|
+
if (!version)
|
|
250
|
+
throw new Error(`${PACKAGE_NAME} has no ${channel} release`);
|
|
251
|
+
return version;
|
|
252
|
+
}
|
|
253
|
+
/** The version installed in this copy now: an update since this process started changes it. */
|
|
254
|
+
export function installedVersion(packageRoot) {
|
|
255
|
+
return JSON.parse(readFileSync(path.join(packageRoot, 'package.json'), 'utf8')).version;
|
|
256
|
+
}
|
|
257
|
+
export function install(method, version, env, inherit = false) {
|
|
258
|
+
const spec = `${PACKAGE_NAME}@${version}`;
|
|
259
|
+
const args = method.manager === 'npm' ? ['install', '-g', '--prefix', method.prefix, '--no-audit', '--no-fund', spec] : ['add', '-g', spec];
|
|
260
|
+
packageManager(method.manager, args, env, inherit);
|
|
261
|
+
}
|
|
262
|
+
/** Hold a lock file (this pid) until exit, or return false when a live process already does. */
|
|
263
|
+
function takeLock(lock) {
|
|
264
|
+
mkdirSync(path.dirname(lock), { recursive: true });
|
|
265
|
+
for (let attempt = 0; attempt < 2; attempt++) {
|
|
266
|
+
try {
|
|
267
|
+
writeFileSync(lock, String(process.pid), { flag: 'wx' });
|
|
268
|
+
removeOnExit(lock);
|
|
269
|
+
return true;
|
|
270
|
+
}
|
|
271
|
+
catch {
|
|
272
|
+
const holder = Number(readFileSync(lock, 'utf8'));
|
|
273
|
+
if (Number.isInteger(holder) && holder > 0 && alive(holder))
|
|
274
|
+
return false;
|
|
275
|
+
try {
|
|
276
|
+
unlinkSync(lock);
|
|
277
|
+
}
|
|
278
|
+
catch {
|
|
279
|
+
// Another process took it over first.
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
return false;
|
|
284
|
+
}
|
|
285
|
+
/** `deck __update`: the detached check. Waits for running sessions of this copy, then installs. */
|
|
286
|
+
export async function backgroundUpdate(ctx, pollMs = WAIT_POLL_MS) {
|
|
287
|
+
// `update.lock` keeps one background updater per copy; `install.lock` keeps it and `deck update` from installing at once.
|
|
288
|
+
if (autoUpdateDisabled(ctx.version, ctx.env) || !takeLock(path.join(ctx.stateDir, 'update.lock')))
|
|
289
|
+
return;
|
|
290
|
+
const method = installMethod(ctx);
|
|
291
|
+
if (!method)
|
|
292
|
+
return;
|
|
293
|
+
const target = await fetchDistTag(ctx.env, channelFor(ctx.env));
|
|
294
|
+
if (compareVersions(target, ctx.version) <= 0)
|
|
295
|
+
return;
|
|
296
|
+
const failed = readState(ctx.stateDir).failed;
|
|
297
|
+
if (failed?.version === target && Date.now() - failed.at < RETRY_FAILED_MS)
|
|
298
|
+
return;
|
|
299
|
+
while (runningSessions(ctx).length)
|
|
300
|
+
await new Promise((r) => setTimeout(r, pollMs));
|
|
301
|
+
// `deck update` may have installed it while we waited.
|
|
302
|
+
const current = installedVersion(ctx.packageRoot);
|
|
303
|
+
if (compareVersions(target, current) <= 0 || !takeLock(path.join(ctx.stateDir, 'install.lock')))
|
|
304
|
+
return;
|
|
305
|
+
try {
|
|
306
|
+
install(method, target, ctx.env);
|
|
307
|
+
writeState(ctx.stateDir, { updated: { from: current, to: target }, failed: undefined });
|
|
308
|
+
}
|
|
309
|
+
catch (e) {
|
|
310
|
+
const err = e;
|
|
311
|
+
const message = (err.stderr?.trim() || err.message).split('\n').slice(-5).join('\n');
|
|
312
|
+
writeState(ctx.stateDir, { failed: { version: target, at: Date.now(), message } });
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
/** `deck update`: check and install now, in the foreground, with the package manager's output shown. */
|
|
316
|
+
export async function updateNow(ctx, next = false) {
|
|
317
|
+
if (ctx.version === '0.0.0-dev')
|
|
318
|
+
return { kind: 'unmanaged', reason: `${ctx.packageRoot} is a source checkout: update it with git pull` };
|
|
319
|
+
const method = installMethod(ctx);
|
|
320
|
+
if (!method) {
|
|
321
|
+
return {
|
|
322
|
+
kind: 'unmanaged',
|
|
323
|
+
reason: `${ctx.packageRoot} isn't a global npm or pnpm install, so deck can't update it. Update it where it was installed, or install it globally: npm install -g ${PACKAGE_NAME}@latest`,
|
|
324
|
+
};
|
|
325
|
+
}
|
|
326
|
+
const channel = channelFor(ctx.env, next);
|
|
327
|
+
const target = await fetchDistTag(ctx.env, channel).catch((e) => {
|
|
328
|
+
throw new DeckError(`couldn't check for an update: ${e.message}`);
|
|
329
|
+
});
|
|
330
|
+
writeState(ctx.stateDir, { lastCheck: Date.now() });
|
|
331
|
+
if (compareVersions(target, ctx.version) <= 0)
|
|
332
|
+
return { kind: 'current', version: ctx.version, channel };
|
|
333
|
+
if (!takeLock(path.join(ctx.stateDir, 'install.lock')))
|
|
334
|
+
throw new DeckError('a background update is installing now; try again in a minute');
|
|
335
|
+
try {
|
|
336
|
+
install(method, target, ctx.env, true);
|
|
337
|
+
}
|
|
338
|
+
catch {
|
|
339
|
+
throw new DeckError(`${method.manager} couldn't install ${PACKAGE_NAME}@${target} (its output is above)`);
|
|
340
|
+
}
|
|
341
|
+
writeState(ctx.stateDir, { failed: undefined, updated: undefined });
|
|
342
|
+
return { kind: 'updated', from: ctx.version, to: target, running: runningSessions(ctx) };
|
|
343
|
+
}
|
|
344
|
+
//# sourceMappingURL=update.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update.js","sourceRoot":"","sources":["../src/update.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAChI,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,MAAM,CAAC,MAAM,YAAY,GAAG,4BAA4B,CAAC;AACzD,MAAM,iBAAiB,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AACzC,uGAAuG;AACvG,MAAM,eAAe,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAC5C,MAAM,gBAAgB,GAAG,IAAI,CAAC;AAC9B,MAAM,YAAY,GAAG,IAAI,CAAC;AAqB1B;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,WAAmB;IAC7C,OAAO,IAAI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E,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,CAAC,GAAG,CAAC,EAAE,CAAC;AAC3F,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
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
CHANGED
|
@@ -23,6 +23,7 @@ A record is named `YYYY-MM-DD-<decision>.md`, after the day the decision landed.
|
|
|
23
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
24
|
- [2026-10-14 `deck dev` links media by URL, not inlined](2026-10-14-dev-links-media-by-url.md)
|
|
25
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)
|
|
26
27
|
|
|
27
28
|
## Editing
|
|
28
29
|
|
package/docs/commands.md
CHANGED
|
@@ -102,3 +102,26 @@ Touch: swipe to navigate, pinch out for the overview. On portrait phones the dec
|
|
|
102
102
|
**Presenter window:** `P` (or the share panel) opens the deck in a second window for your screen: the current slide, the next one, the speaker notes, the elapsed time (`k` or Pause stops it and Resume goes on; `r` or Reset restarts it), and the clock. Put the first window on the projector. The windows follow each other: navigating, `b` (black screen), `d` (light/dark), and `t` in either one updates both.
|
|
103
103
|
|
|
104
104
|
**Share panel (`s`):** copy the deck link or a link to the current slide, show a QR code full screen (for the audience to follow on their phones), print or save as PDF, and copy an `<iframe>` embed snippet for Google Sites.
|
|
105
|
+
|
|
106
|
+
## Updating: `deck update`
|
|
107
|
+
|
|
108
|
+
```sh
|
|
109
|
+
deck update # install the latest release now
|
|
110
|
+
deck update --next # the newest release, before it's promoted to stable
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
A global install (`npm install -g` or `pnpm add -g`) also updates itself:
|
|
114
|
+
|
|
115
|
+
- **When it checks:** every `deck` command except `version` and `update` checks for a newer release in the background, at most once an hour. The command never waits for the check.
|
|
116
|
+
- **When it installs:** after the command exits and no other `deck` from the same install is running. So a `deck dev` or `deck editor` left open, like the one in Treasure Work's dock, is never changed while it runs: the update lands when it stops, and the next start uses it.
|
|
117
|
+
- **What it prints:** the next start says so on stderr: `treasure-deck updated to 2026.10.7 (from 2026.10.5)`. A failed install (no permission to write the global folder, say) is reported once, and retried a day later. `deck update` shows the package manager's own output.
|
|
118
|
+
- **How it installs:** with the package manager that installed it. For npm, that's `npm install -g --prefix <where it is installed>`, so a copy under its own prefix updates in place, wherever it is.
|
|
119
|
+
- **What it leaves alone:** `npx`, a project's own dependency (its lockfile picks the version), and a checkout of the repository. For these, `deck update` says how to update instead.
|
|
120
|
+
|
|
121
|
+
Settings, as environment variables:
|
|
122
|
+
|
|
123
|
+
- `DECK_DISABLE_AUTOUPDATE=1` turns the background updates off. `deck update` still works. They're also off when `CI` is set.
|
|
124
|
+
- `DECK_UPDATE_CHANNEL=next` follows `next` instead of `latest`.
|
|
125
|
+
- `npm_config_registry` points the check at another registry.
|
|
126
|
+
|
|
127
|
+
The updater keeps its state in a folder per install, `~/.treasure-deck/<hash of the install's path>/`. In it, `update.json` holds the last check and any result to report, `update.lock` and `install.lock` mark a running check and install, and `sessions/` lists the running `deck` processes of a global install. So a global install and another copy, such as one an app installs under its own prefix, each update on their own. See [ADR: updates install after deck exits](adrs/2026-10-16-updates-install-after-exit.md).
|
package/docs/editor.md
CHANGED
|
@@ -67,7 +67,7 @@ Every slide's content as one document, a numbered rule before each, with classes
|
|
|
67
67
|
|
|
68
68
|
Click text to type into it. There is no edit box: you type where the text is. The block you are in shows its own Markdown (`**bold**`, `[link](url)`), what you type is saved as typed, and it shows formatted again when you leave it, as in Obsidian. Selecting text with the mouse edits that block too, with the selection kept. An edit that would cut through formatting, or a block that can't be typed into (code, diagrams), opens its Markdown in place.
|
|
69
69
|
|
|
70
|
-
**The text row** (also while typing a new block) has bold, italic, code, strikethrough, highlight, and link, headings, lists, quotes, and a **Style** menu for classes such as `.lead` or `.center`. A mark button is lit when the selection is in that mark, and pressing it takes the mark off.
|
|
70
|
+
**The text row** (also while typing a new block) has bold, italic, code, strikethrough, highlight, and link, headings, lists, quotes, and a **Style** menu for classes such as `.lead` or `.center`. A mark button is lit when the selection is in that mark, and pressing it takes the mark off. A mark over a selection that is partly in it already makes the whole selection one span (`**a** b` becomes `**a b**`), and over one that is all in it takes it off.
|
|
71
71
|
|
|
72
72
|
**Markdown shortcuts**, typed at the start of a paragraph, as in other block editors:
|
|
73
73
|
|
package/docs/syntax.md
CHANGED
|
@@ -12,7 +12,7 @@ deck: true
|
|
|
12
12
|
title: "Wvlet: A Flow-Style Query Language"
|
|
13
13
|
author: Taro L. Saito
|
|
14
14
|
date: 2026-10-15
|
|
15
|
-
theme: wvlet # default | editorial | pastel | gold | treasure-ai | wvlet | ./my-theme (a theme folder, relative to the deck)
|
|
15
|
+
theme: wvlet # default | editorial | pastel | gold | treasure-ai | treasure-ai-2026 | wvlet | ./my-theme (a theme folder, relative to the deck)
|
|
16
16
|
mode: dark # light | dark (each theme has both)
|
|
17
17
|
accent: "#25a7c1" # recolors the accent, and everything derived from it, on every slide
|
|
18
18
|
footer: "Treasure AI · DB Study Group"
|
|
@@ -46,7 +46,7 @@ Header and separator lines count only on a line of their own, outside fenced cod
|
|
|
46
46
|
| `content` (default) | | Heading + body |
|
|
47
47
|
| `title` | | Centered title slide: H1 title, `{.subtitle}` and `{.meta}` paragraphs |
|
|
48
48
|
| `section` | | Starts a section (see below) |
|
|
49
|
-
| `columns` | ratio, e.g. `3:2`, `1:1:1` (default: equal) | Columns separated by `=== col`; a leading `#`/`##` heading spans all of them. A column that opens with `###` becomes a card. |
|
|
49
|
+
| `columns` | ratio, e.g. `3:2`, `1:1:1` (default: equal) | Columns separated by `=== col`; a leading `#`/`##` heading spans all of them. A column that opens with `###` becomes a card; cards side by side share one height. |
|
|
50
50
|
|
|
51
51
|
Other kinds of slides come from attributes rather than more layouts: `{side=right w=40%}` on an image makes a split slide, `{bg}` a full-bleed image slide, and `{.center}` or `{.lead}` a statement slide.
|
|
52
52
|
|
|
@@ -146,6 +146,30 @@ Attributes on headings, paragraphs, lists, and spans take a fixed vocabulary of
|
|
|
146
146
|
|
|
147
147
|
A block's braces go right after its text (`Plain text{.center}`); after an inline element such as `**bold**`, braces belong to that element, so a block's braces then need a space before them (`Some **bold** {.muted}`). Define more classes in a deck-local `theme.css` ([Themes](themes.md)).
|
|
148
148
|
|
|
149
|
+
## Tables
|
|
150
|
+
|
|
151
|
+
Tables are GFM tables, styled by the theme. Braces at the end of a header cell apply to its column, and braces on the line after the table (right under it, or after a blank line) apply to the table:
|
|
152
|
+
|
|
153
|
+
```markdown
|
|
154
|
+
| Metric {w=200} | Q2 {nowrap} | Q3 {nowrap} | Notes |
|
|
155
|
+
|---|--:|--:|---|
|
|
156
|
+
| Weekly users | 84 | 126 | Driven by the editor launch |
|
|
157
|
+
| Build time | 1.9 s | 0.4 s | Prerendered diagrams |
|
|
158
|
+
{.small}
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
| Where | Attribute | Effect |
|
|
162
|
+
|---|---|---|
|
|
163
|
+
| Header cell | `w=` | The column's width, in canvas px or `%` of the table |
|
|
164
|
+
| Header cell | `nowrap` | The column's cells stay on one line |
|
|
165
|
+
| Header cell | `wrap` | The column wraps even in a `nowrap` table |
|
|
166
|
+
| Body cell | `nowrap`, `wrap` | Just that cell |
|
|
167
|
+
| Table | `nowrap` | No cell wraps, except in `wrap` columns |
|
|
168
|
+
| Table | `w=` | The table's width, in canvas px or `%` of the column (`w=100%` spans it) |
|
|
169
|
+
| Table | `.class` | A class on the table, such as `.small` |
|
|
170
|
+
|
|
171
|
+
Without widths, the browser sizes columns by their content. A table with a `%` column and no `w=` of its own spans its column, so the percentages have something to be a share of. A column that can't wrap can push the table past the slide's edge, which `deck check` reports. Other attributes on a table or a cell fail the build. The editor leaves a cell's braces in place when you edit its text.
|
|
172
|
+
|
|
149
173
|
## Code
|
|
150
174
|
|
|
151
175
|
Fenced code is highlighted at build time for every [highlight.js](https://highlightjs.org/) language plus [Wvlet](https://wvlet.org/wvlet/docs/development/syntax-highlighting/) (` ```wvlet ` or ` ```wv `), colored by the theme. ` ```sql {2-3} ` highlights lines 2–3. A slide holding only a code block gets a larger code font, and a block whose longest line is wider than its panel shrinks just enough to fit, down to 12px, instead of clipping (`deck check` reports code still clipped, and warns below 14px).
|
package/docs/themes.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# Themes
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Seven themes are built in: three unbranded ones, `default` (used when a deck names no theme), `editorial`, and `pastel`, and four branded ones, `gold` (Treasure Work), `treasure-ai`, `treasure-ai-2026`, and `wvlet` (`deck themes` lists them). Every theme styles the same four layouts, every class, and every Markdown element, so switching themes is one line of frontmatter:
|
|
4
4
|
|
|
5
5
|
```yaml
|
|
6
|
-
theme: default # or editorial, pastel, gold, treasure-ai, wvlet, or ./my-theme (a folder, relative to the deck)
|
|
6
|
+
theme: default # or editorial, pastel, gold, treasure-ai, treasure-ai-2026, wvlet, or ./my-theme (a folder, relative to the deck)
|
|
7
7
|
mode: dark # light | dark
|
|
8
8
|
accent: "#25a7c1" # recolors the accent, and everything derived from it
|
|
9
9
|
```
|
|
@@ -65,7 +65,7 @@ A theme must style the four layouts, every semantic class, and the standard Mark
|
|
|
65
65
|
- **Header band:** a leading `#`/`##` on a content or columns slide becomes the slide header, with an **eyebrow** naming the current section (`01 · THE SYNTAX`).
|
|
66
66
|
- **Section numbers:** a shown section divider has a large `.section-num`.
|
|
67
67
|
- **Footer banner:** every slide has a `.footer-brand` slot at bottom left that the theme fills with its logo and wordmark; the deck's `footer:` text and the page number follow it.
|
|
68
|
-
- **Columns:** a divider when the theme sets `--deck-col-rule`; a column that opens with `###` is a card.
|
|
68
|
+
- **Columns:** a divider when the theme sets `--deck-col-rule`; a column that opens with `###` is a card, and cards side by side share one height (the tallest card's).
|
|
69
69
|
|
|
70
70
|
### `deck theme check`
|
|
71
71
|
|
|
@@ -82,7 +82,7 @@ Contrast is measured against the rendered pixels, so gradients, grain, and frost
|
|
|
82
82
|
|
|
83
83
|
- Plain at heart, with some polish. Light: white `#ffffff` / ink `#1d2129`, soft indigo `#5e6ad2` as the accent and violet `#7654dd` as the second; the two make the accent gradient. Dark: near-black `#0c0e13` / `#e4e7ed`, with `#8e97f0` and `#b4a6f7`. Everything follows the seeds, so `accent:` recolors the whole deck, gradients and section slides included.
|
|
84
84
|
- Inter throughout (700 headings with tight tracking, 800 on title and section slides); `*accent*` words in headings carry the accent gradient. JetBrains Mono for code and page numbers.
|
|
85
|
-
- Content slides: white with a faint accent glow in the top-right and bottom-right corners. The header is the section in a small chip, the title, and a hairline that starts with a short gradient stroke. Bullets are small gradient squares, with hollow rings on nested levels. Cards are raised white panels with a gradient top edge. Tables are raised panels with a tinted
|
|
85
|
+
- Content slides: white with a faint accent glow in the top-right and bottom-right corners. The header is the section in a small chip, the title, and a hairline that starts with a short gradient stroke. Bullets are small gradient squares, with hollow rings on nested levels. Cards are raised white panels with a gradient top edge. Tables are raised panels with a tinted header row. Callouts are tinted panels with a side rule.
|
|
86
86
|
- Code: a dark panel on every slide, with GitHub-dark token colors, line numbers, and the language in the corner.
|
|
87
87
|
- Title: big 800-weight type at left, a gradient bar above it, and a soft indigo and violet glow with a dot grid fading in from the right. Section: a full-bleed accent color block (its lightness capped so white type always reads) with a large number and the dot grid.
|
|
88
88
|
- Banner: no logo; the footer shows only the deck's `footer:` text and the page number.
|
|
@@ -110,7 +110,7 @@ Contrast is measured against the rendered pixels, so gradients, grain, and frost
|
|
|
110
110
|
|
|
111
111
|
- Light: cream `#fbf8f2` / ink `hsl(25 35% 10%)`, primary `hsl(30 62% 32%)`. Dark: slate gray `hsl(224 11% 19%)` as in the Treasure Work app / ink `hsl(210 15% 91%)`, primary `hsl(42 85% 64%)`. Series colors are the six "ray" hues.
|
|
112
112
|
- Inter Tight 700 headings with tight tracking, and 21px body text (a touch below the 22px default). `*Accent*` words in headings stay in Inter Tight, set in its 700 italic with an animated gold shimmer. Serif italics (Instrument Serif, then Fraunces and Source Serif) were tried and dropped: inside a bold sans title the mix never sat well, however the weight was matched. Source Serif 4 italic remains for blockquotes, where it sets a quote apart from body text. JetBrains Mono for code and page numbers.
|
|
113
|
-
- Paper feel: content slides carry a softer version of the title aurora around the right and bottom edges, with a fine grain texture. The top left stays flat cream so titles read cleanly. Under the title, a long gold bar (deep amber → bright gold) fades out over a hairline. Bullets are gold diamonds (the gem motif), and nested levels hang off a thin gold guide line. Tables use
|
|
113
|
+
- Paper feel: content slides carry a softer version of the title aurora around the right and bottom edges, with a fine grain texture. The top left stays flat cream so titles read cleanly. Under the title, a long gold bar (deep amber → bright gold) fades out over a hairline. Bullets are gold diamonds (the gem motif), and nested levels hang off a thin gold guide line. Tables use bold headers on a gradient that runs from deep amber at the left to bright gold at the right. Cards are cream with a shine edge. `.muted` text uses its own lighter warm grey, so it stands clearly apart from body text.
|
|
114
114
|
- Code: flat charcoal panels above the grain, with line numbers, the language in the top-right corner, Rosé Pine token colors (iris keywords, gold strings, rose numbers, foam types), and highlighted lines on a neutral lifted band with a gold left edge. Inline code is a gold-tinted chip.
|
|
115
115
|
- Title: a full aurora with the 3D gem floating at right. Section: a giant gold-gradient number above the title.
|
|
116
116
|
- Banner: the gem and the "Treasure Work" wordmark at bottom left.
|
|
@@ -125,6 +125,17 @@ Contrast is measured against the rendered pixels, so gradients, grain, and frost
|
|
|
125
125
|
- **Night mode** (`mode: dark`): a deep-indigo canvas (`#0b0d29`) with stronger glows, white titles, and cyan accents.
|
|
126
126
|
- Banner: the Treasure AI logo at bottom left, with a white wordmark on gradient and night slides.
|
|
127
127
|
|
|
128
|
+
**`treasure-ai-2026` — the 2026 Treasure AI brand** (palette and type from the Treasure AI brand hub; layouts and gradients from the 2026 Google Slides template)
|
|
129
|
+
|
|
130
|
+
- Palette: primary `#494FFF`, secondary `#8753FF` and `#C466D4`, and the official accents (salmon, lime, coral) for chart series. As the brand asks, a slide uses at most two brand colors plus black and white: titles are black, the blue and purple carry everything else.
|
|
131
|
+
- Manrope Bold headlines (800 on title and section slides), Inter body at 21px, all flush left. `*Accent*` words in headings take the template's purple → magenta gradient, as in "The *Agentic Experience* Platform".
|
|
132
|
+
- Content slides are white, as in the template, with a faint lavender wash at the lower right and a thin full-height rule near the left edge. Titles carry no bar; the eyebrow is a small purple label. Bullets are purple dots, nested levels purple arrows, and third levels hollow rings. Subtitles are purple.
|
|
133
|
+
- Cards are the template's boxed columns: white, a thin purple rounded border, and a small uppercase purple title. Tables have a purple → blue header row in white. Callouts are lavender with a purple side rule, and quotes are large Manrope behind a purple quotation mark.
|
|
134
|
+
- Code: a deep-indigo panel with token colors from the brand palette.
|
|
135
|
+
- Title: the full logo at top left over the brand's pastel sweep (peach → pink → violet → blue) rising from the lower right, with the frosted gem-facet slabs. Section: the template's named gradients with black type and a large blue number, cycling **Rainbow → Dusk → Lavender → Sunset** from one section to the next (through section 16; later sections are Lavender).
|
|
136
|
+
- Banner: only the small gem, in the strip left of the edge rule, since the template drops the footer band; the deck's `footer:` text and the page number follow in gray.
|
|
137
|
+
- `mode: dark` is the brand hub's deep indigo (`hsl(238 100% 8%)`) with the washes as soft glows and white type.
|
|
138
|
+
|
|
128
139
|
**`wvlet` — Wvlet** (after the Trino Summit 2024 Wvlet deck; icon from `wvlet/logos/wvlet-icon.svg`)
|
|
129
140
|
|
|
130
141
|
- Light by default: an icy blue-white gradient with soft bokeh highlights. Titles are Roboto Bold in deep teal `#246570` with a soft lift shadow; `*accent*` words carry a slow teal → cyan shimmer (lighter cyans on section terminals and dark slides, where titles turn white). Top-level bullets are teal statements and nested levels are gray details with hollow ○ markers. Links are coral.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@treasure-ai/treasure-deck",
|
|
3
|
-
"version": "2026.10.
|
|
3
|
+
"version": "2026.10.5",
|
|
4
4
|
"description": "Markdown presentations without <div> markup: four layouts, themes, and a single-file HTML output that publishes to Apps Script",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"homepage": "https://www.npmjs.com/package/@treasure-ai/treasure-deck",
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"deck": "tsx src/cli.ts",
|
|
41
41
|
"test": "vitest run",
|
|
42
42
|
"typecheck": "tsc --noEmit",
|
|
43
|
-
"demo": "for t in default editorial pastel gold treasure-ai wvlet; do tsx src/cli.ts build examples/tour/tour.md --theme $t -o examples/tour/tour-$t.html; done",
|
|
44
|
-
"demo:pdf": "for t in default editorial pastel gold treasure-ai wvlet; do tsx src/cli.ts pdf examples/tour/tour.md --theme $t -o examples/tour/tour-$t.pdf; done",
|
|
43
|
+
"demo": "for t in default editorial pastel gold treasure-ai treasure-ai-2026 wvlet; do tsx src/cli.ts build examples/tour/tour.md --theme $t -o examples/tour/tour-$t.html; done",
|
|
44
|
+
"demo:pdf": "for t in default editorial pastel gold treasure-ai treasure-ai-2026 wvlet; do tsx src/cli.ts pdf examples/tour/tour.md --theme $t -o examples/tour/tour-$t.pdf; done",
|
|
45
45
|
"release": "scripts/release.sh",
|
|
46
46
|
"promote": "scripts/promote.sh"
|
|
47
47
|
},
|
package/runtime/base.css
CHANGED
|
@@ -101,6 +101,9 @@ body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
|
|
|
101
101
|
.slide table { border-collapse: collapse; font-size: .9em; margin: 0 0 .5em; }
|
|
102
102
|
.slide th, .slide td { padding: .32em .75em; text-align: left; vertical-align: top; }
|
|
103
103
|
.slide th { padding-top: .5em; padding-bottom: .5em; }
|
|
104
|
+
/* Table options: `{nowrap}` on the table or a header cell (its column) keeps cells on one line; `{wrap}` undoes it for a column or cell. */
|
|
105
|
+
.slide :is(table.nowrap :is(th, td), th.nowrap, td.nowrap) { white-space: nowrap; }
|
|
106
|
+
.slide table :is(th, td).wrap { white-space: normal; }
|
|
104
107
|
/* Lines are blocks carrying the horizontal padding, so a highlighted band and its edge bar span the panel with no seams. */
|
|
105
108
|
.slide pre.code { margin: 0 0 .6em; padding: 14px 0; overflow: hidden; font-family: var(--deck-font-mono); font-size: var(--deck-scale-code); line-height: 1.45; }
|
|
106
109
|
.slide pre.code .line { display: block; padding: 0 18px; }
|
|
@@ -167,6 +170,8 @@ body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
|
|
|
167
170
|
.layout-columns .cols:not(:has(> .col > h3:first-child)) { column-gap: calc(var(--deck-col-gap) / 2); }
|
|
168
171
|
.layout-columns .cols:not(:has(> .col > h3:first-child)) > .col + .col { padding-left: calc(var(--deck-col-gap) / 2); border-left: 1px solid var(--deck-col-rule, transparent); }
|
|
169
172
|
.layout-columns .col > :first-child { margin-top: 0; }
|
|
173
|
+
/* Cards side by side share one height, the tallest card's: the band's row fits its content, and its columns fill the row. */
|
|
174
|
+
.layout-columns .cols:has(> .col > h3:first-child) { align-items: stretch; align-content: start; }
|
|
170
175
|
|
|
171
176
|
/* Extra blank lines between blocks: each one more than the first adds this much space. */
|
|
172
177
|
.slide .gap { flex: none; height: calc(var(--gap) * var(--deck-gap, .6em)); }
|