@bitmagic/cli 0.1.53-dev.1 → 0.1.53-dev.11
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 +140 -36
- package/dist/assets/revoxelize.d.ts +61 -1
- package/dist/assets/revoxelize.js +157 -13
- package/dist/assets/revoxelize.js.map +1 -1
- package/dist/cli.d.ts +35 -1
- package/dist/cli.js +18 -1
- package/dist/cli.js.map +1 -1
- package/dist/commands/assets.js +3 -2
- package/dist/commands/assets.js.map +1 -1
- package/dist/commands/build.d.ts +4 -0
- package/dist/commands/build.js +7 -1
- package/dist/commands/build.js.map +1 -1
- package/dist/commands/cover.d.ts +5 -0
- package/dist/commands/cover.js +3 -0
- package/dist/commands/cover.js.map +1 -1
- package/dist/commands/dev.js +1 -2
- package/dist/commands/dev.js.map +1 -1
- package/dist/commands/forge.d.ts +4 -0
- package/dist/commands/forge.js +9 -0
- package/dist/commands/forge.js.map +1 -1
- package/dist/commands/generate.d.ts +25 -0
- package/dist/commands/generate.js +80 -8
- package/dist/commands/generate.js.map +1 -1
- package/dist/commands/init.d.ts +4 -0
- package/dist/commands/init.js +12 -1
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/publish.d.ts +39 -5
- package/dist/commands/publish.js +102 -21
- package/dist/commands/publish.js.map +1 -1
- package/dist/commands/reload.js +1 -3
- package/dist/commands/reload.js.map +1 -1
- package/dist/commands/reset-account.js +25 -8
- package/dist/commands/reset-account.js.map +1 -1
- package/dist/commands/self-update.d.ts +67 -0
- package/dist/commands/self-update.js +196 -0
- package/dist/commands/self-update.js.map +1 -0
- package/dist/commands/upgrade.js +5 -2
- package/dist/commands/upgrade.js.map +1 -1
- package/dist/editor/asset-detail-panel.d.ts +2 -2
- package/dist/editor/asset-detail-panel.js +5 -2
- package/dist/editor/asset-detail-panel.js.map +1 -1
- package/dist/editor/cli-update.d.ts +32 -0
- package/dist/editor/cli-update.js +67 -0
- package/dist/editor/cli-update.js.map +1 -0
- package/dist/editor/publish-panel.d.ts +31 -0
- package/dist/editor/publish-panel.js +69 -0
- package/dist/editor/publish-panel.js.map +1 -0
- package/dist/editor/server.js +43 -1
- package/dist/editor/server.js.map +1 -1
- package/dist/editor/shell-page.js +249 -8
- package/dist/editor/shell-page.js.map +1 -1
- package/dist/forge/upload-proxy.d.ts +14 -0
- package/dist/forge/upload-proxy.js +28 -1
- package/dist/forge/upload-proxy.js.map +1 -1
- package/dist/generate/model.d.ts +7 -0
- package/dist/generate/model.js +13 -3
- package/dist/generate/model.js.map +1 -1
- package/dist/generate/prop.d.ts +20 -0
- package/dist/generate/prop.js +22 -2
- package/dist/generate/prop.js.map +1 -1
- package/dist/generate/vehicle.d.ts +2 -0
- package/dist/generate/vehicle.js +1 -0
- package/dist/generate/vehicle.js.map +1 -1
- package/dist/project/dev-handle.d.ts +28 -0
- package/dist/project/dev-handle.js +43 -0
- package/dist/project/dev-handle.js.map +1 -1
- package/dist/project/jobs.js +11 -9
- package/dist/project/jobs.js.map +1 -1
- package/dist/publish/bundle.d.ts +35 -8
- package/dist/publish/bundle.js +41 -13
- package/dist/publish/bundle.js.map +1 -1
- package/dist/publish/client.d.ts +13 -2
- package/dist/publish/client.js.map +1 -1
- package/dist/publish/record.d.ts +22 -0
- package/dist/publish/record.js +62 -0
- package/dist/publish/record.js.map +1 -0
- package/dist/render/qr-output.d.ts +44 -0
- package/dist/render/qr-output.js +71 -0
- package/dist/render/qr-output.js.map +1 -0
- package/dist/render/qr-png.d.ts +37 -0
- package/dist/render/qr-png.js +111 -0
- package/dist/render/qr-png.js.map +1 -0
- package/dist/render/qr-terminal.d.ts +63 -0
- package/dist/render/qr-terminal.js +142 -0
- package/dist/render/qr-terminal.js.map +1 -0
- package/dist/render/qr.d.ts +51 -0
- package/dist/render/qr.js +516 -0
- package/dist/render/qr.js.map +1 -0
- package/dist/scaffold/project-files.d.ts +42 -9
- package/dist/scaffold/project-files.js +242 -43
- package/dist/scaffold/project-files.js.map +1 -1
- package/dist/scaffold/project.js +2 -1
- package/dist/scaffold/project.js.map +1 -1
- package/dist/scaffold/suggest-template.d.ts +2 -0
- package/dist/scaffold/suggest-template.js +2 -1
- package/dist/scaffold/suggest-template.js.map +1 -1
- package/dist/telemetry/command-context.d.ts +12 -0
- package/dist/telemetry/command-context.js +7 -0
- package/dist/telemetry/command-context.js.map +1 -1
- package/dist/telemetry/creator-prompt.d.ts +35 -0
- package/dist/telemetry/creator-prompt.js +45 -0
- package/dist/telemetry/creator-prompt.js.map +1 -0
- package/dist/update/check.js +2 -1
- package/dist/update/check.js.map +1 -1
- package/dist/update/notice.d.ts +31 -1
- package/dist/update/notice.js +39 -5
- package/dist/update/notice.js.map +1 -1
- package/dist/update/self-install.d.ts +175 -0
- package/dist/update/self-install.js +335 -0
- package/dist/update/self-install.js.map +1 -0
- package/package.json +4 -4
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `bitmagic self-update` — replace this CLI with the newest build of its own line.
|
|
3
|
+
*
|
|
4
|
+
* Why a command and not a printed instruction: see the header of `update/self-install.ts`. In
|
|
5
|
+
* short, a printed `npm i -g` is run by whatever `npm` the calling shell happens to resolve, which
|
|
6
|
+
* on an nvm machine is routinely not the one that owns this install — the update lands in a prefix
|
|
7
|
+
* nobody's PATH points at, npm reports success, and the next `bitmagic` is still the old build.
|
|
8
|
+
* This command asks the shell nothing.
|
|
9
|
+
*
|
|
10
|
+
* It is also what every update nudge now names, and that is safe by construction: the CLI printing
|
|
11
|
+
* the nudge is on that shell's PATH, because it just ran there.
|
|
12
|
+
*/
|
|
13
|
+
import { defineCommand } from 'citty';
|
|
14
|
+
import { createOutput } from '../output.js';
|
|
15
|
+
import { CliError } from '../errors.js';
|
|
16
|
+
import { currentCliVersion } from '../update/cli-version.js';
|
|
17
|
+
import { fetchTagVersion, writeUpdateCache } from '../update/check.js';
|
|
18
|
+
import { describeUpdateTag, installCommandFor, updateTagFor, updateTagForEnvironment, } from '../update/notice.js';
|
|
19
|
+
import { readPinnedEnvironment } from '../config/environments.js';
|
|
20
|
+
import { isOlderSemverVersion } from '../project/version-compare.js';
|
|
21
|
+
import * as fs from 'fs';
|
|
22
|
+
import { PACKAGE_NAME, installArgs, isStalePackumentFailure, isUpdatable, isWritable, managerFor, readInstalledVersion, realSpawnManager, resolveInstall, } from '../update/self-install.js';
|
|
23
|
+
/** How long to wait before the single retry that a stale packument earns. */
|
|
24
|
+
const RETRY_DELAY_MS = 5000;
|
|
25
|
+
export const defaultSelfUpdateDeps = {
|
|
26
|
+
currentVersion: currentCliVersion,
|
|
27
|
+
pinned: () => readPinnedEnvironment(),
|
|
28
|
+
resolve: () => resolveInstall(import.meta.url),
|
|
29
|
+
fetchTag: (tag) => fetchTagVersion(tag),
|
|
30
|
+
spawn: realSpawnManager,
|
|
31
|
+
readVersion: (dir) => readInstalledVersion(dir),
|
|
32
|
+
writable: (dir) => isWritable(dir),
|
|
33
|
+
exists: (candidate) => fs.existsSync(candidate),
|
|
34
|
+
writeCache: (cache) => writeUpdateCache(cache),
|
|
35
|
+
sleep: (ms) => new Promise((resolve) => setTimeout(resolve, ms)),
|
|
36
|
+
now: Date.now,
|
|
37
|
+
execPath: process.execPath,
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Which npm line to install from, and never a question put to the creator.
|
|
41
|
+
*
|
|
42
|
+
* The order is the same rule the startup nudge already applies, just acted on instead of printed:
|
|
43
|
+
* an explicit `--tag` is a deliberate override; otherwise a project's committed pin decides,
|
|
44
|
+
* because the project is where a wrong line actually bites (a prerelease against `prod` calls
|
|
45
|
+
* `/api/cli/v1` endpoints that are not deployed there yet); and outside a project the only honest
|
|
46
|
+
* answer is the line this build is already on.
|
|
47
|
+
*
|
|
48
|
+
* That middle case is what makes this command the fix for `cliLineMismatchNotice` too: run inside
|
|
49
|
+
* a project on the wrong line, it crosses over without being told to.
|
|
50
|
+
*/
|
|
51
|
+
export function resolveTargetTag(explicit, pinned, currentVersion) {
|
|
52
|
+
if (explicit !== undefined) {
|
|
53
|
+
if (explicit !== 'latest' && explicit !== 'dev') {
|
|
54
|
+
throw new CliError(`--tag must be \`latest\` or \`dev\`, not \`${explicit}\`.`);
|
|
55
|
+
}
|
|
56
|
+
return explicit;
|
|
57
|
+
}
|
|
58
|
+
if (pinned !== undefined)
|
|
59
|
+
return updateTagForEnvironment(pinned);
|
|
60
|
+
return updateTagFor(currentVersion);
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Turn a location this command cannot act on into the sentence that says why, and what to do
|
|
64
|
+
* instead.
|
|
65
|
+
*
|
|
66
|
+
* Every branch names the resolved directory. That is the point: the failure being replaced is one
|
|
67
|
+
* where nobody could tell WHERE the install went, so a refusal that does not say where it looked
|
|
68
|
+
* would be the same failure wearing a different message.
|
|
69
|
+
*/
|
|
70
|
+
function refuse(location, tag) {
|
|
71
|
+
const manual = installCommandFor(tag);
|
|
72
|
+
if (location.kind === 'npx') {
|
|
73
|
+
return new CliError(`This CLI is running from an npx cache (${location.packageDir}), so there is no install to ` +
|
|
74
|
+
`update — npx fetches a fresh copy every time. To keep one, run \`${manual}\`.`);
|
|
75
|
+
}
|
|
76
|
+
if (location.kind === 'linked-dev') {
|
|
77
|
+
return new CliError(`This CLI is running from a source checkout (${location.packageDir}), not from an npm ` +
|
|
78
|
+
'install. Update it with `git pull` and a rebuild (`pnpm run build` in `cli/`).');
|
|
79
|
+
}
|
|
80
|
+
return new CliError(`Could not recognise how this CLI is installed (${location.packageDir}), so it will not guess ` +
|
|
81
|
+
`at where to write. Update it the way you installed it — for a normal install that is ` +
|
|
82
|
+
`\`${manual}\`.`);
|
|
83
|
+
}
|
|
84
|
+
export async function runSelfUpdate(explicitTag, output, deps = defaultSelfUpdateDeps) {
|
|
85
|
+
const current = deps.currentVersion();
|
|
86
|
+
if (current === '') {
|
|
87
|
+
throw new CliError('Could not read this CLI\'s own version, so there is nothing to compare against.');
|
|
88
|
+
}
|
|
89
|
+
const tag = resolveTargetTag(explicitTag, deps.pinned(), current);
|
|
90
|
+
const target = await deps.fetchTag(tag);
|
|
91
|
+
if (target === null) {
|
|
92
|
+
throw new CliError(`Could not reach the npm registry to find the newest ${describeUpdateTag(tag)} build. ` +
|
|
93
|
+
'Check your connection and try again.', 1, 'unreachable');
|
|
94
|
+
}
|
|
95
|
+
const location = deps.resolve();
|
|
96
|
+
if (!isUpdatable(location))
|
|
97
|
+
throw refuse(location, tag);
|
|
98
|
+
const manager = location.kind === 'npm-global' ? 'npm' : 'pnpm';
|
|
99
|
+
// Already current is reported before anything is spawned, but AFTER the location is resolved:
|
|
100
|
+
// being told "you are up to date" by a command that could not have updated you anyway is the
|
|
101
|
+
// kind of all-clear that hides a broken install until the day it matters.
|
|
102
|
+
if (target === current) {
|
|
103
|
+
output.info(`Already on the newest ${describeUpdateTag(tag)} build: ${current}.`);
|
|
104
|
+
// Recorded even though nothing changed: this run just asked npm the question the startup nudge
|
|
105
|
+
// caches an answer to, and throwing that away would leave the nudge free to contradict it.
|
|
106
|
+
deps.writeCache({ latest: target, tag, checkedAt: deps.now() });
|
|
107
|
+
return { ok: true, from: current, to: current, tag, updated: false, manager, packageDir: location.packageDir };
|
|
108
|
+
}
|
|
109
|
+
// A CLI ahead of the registry is a normal state on the dev line right after a release, and
|
|
110
|
+
// "updating" to it would be a downgrade nobody asked for. Asked before the two checks below,
|
|
111
|
+
// which are about whether an install COULD be performed: refusing over an unwritable prefix
|
|
112
|
+
// someone was never going to write to would replace a true answer with an irrelevant complaint.
|
|
113
|
+
if (isOlderSemverVersion(current, target) !== true) {
|
|
114
|
+
output.info(`Nothing newer on the ${describeUpdateTag(tag)} line: it is at ${target}, you have ${current}.`);
|
|
115
|
+
return { ok: true, from: current, to: current, tag, updated: false, manager, packageDir: location.packageDir };
|
|
116
|
+
}
|
|
117
|
+
if (location.kind === 'pnpm-global' && location.binDir === undefined) {
|
|
118
|
+
throw new CliError(`This CLI was installed with pnpm into ${location.globalDir}, but the matching global bin ` +
|
|
119
|
+
'directory could not be found, and installing into a guessed one would put the update ' +
|
|
120
|
+
`somewhere your PATH does not look. Run \`pnpm add -g --global-dir ${location.globalDir} ` +
|
|
121
|
+
`--global-bin-dir <your bin dir> ${PACKAGE_NAME}@${target}\`.`);
|
|
122
|
+
}
|
|
123
|
+
if (!deps.writable(location.modulesRoot)) {
|
|
124
|
+
throw new CliError(`${location.modulesRoot} is not writable by this user, so the update cannot be installed ` +
|
|
125
|
+
'there. Either fix its ownership, or reinstall the CLI into a prefix you own.');
|
|
126
|
+
}
|
|
127
|
+
const command = managerFor(location, deps.execPath, deps.exists);
|
|
128
|
+
const spec = `${PACKAGE_NAME}@${target}`;
|
|
129
|
+
const args = [...command.leadingArgs, ...installArgs(location, spec)];
|
|
130
|
+
output.info(`Updating ${PACKAGE_NAME} on the ${describeUpdateTag(tag)} line: ${current} -> ${target}`);
|
|
131
|
+
output.info(` into ${location.modulesRoot}`);
|
|
132
|
+
if (command.fromPath) {
|
|
133
|
+
output.info(` using \`${command.command}\` from PATH — no bundled ${manager} was found next to this node.`);
|
|
134
|
+
}
|
|
135
|
+
// Nothing below this line may need a module that has not been imported yet: the install replaces
|
|
136
|
+
// the very directory this process is executing out of, and a lazy import after it would resolve
|
|
137
|
+
// against a directory npm has already unlinked.
|
|
138
|
+
let outcome = deps.spawn(command.command, args);
|
|
139
|
+
if (outcome.status !== 0 && isStalePackumentFailure(outcome)) {
|
|
140
|
+
// The documented post-release window: the version IS published, but this machine's cached
|
|
141
|
+
// packument predates it. Retrying is the fix (docs/npm-publishing.md).
|
|
142
|
+
output.info(' npm has a stale package listing for a just-published version; retrying once…');
|
|
143
|
+
await deps.sleep(RETRY_DELAY_MS);
|
|
144
|
+
outcome = deps.spawn(command.command, args);
|
|
145
|
+
}
|
|
146
|
+
if (outcome.error !== undefined) {
|
|
147
|
+
throw new CliError(`Could not run \`${command.command}\`: ${outcome.error.message}. ` +
|
|
148
|
+
(command.fromPath
|
|
149
|
+
? `It was not found next to this node installation and is not on PATH either.`
|
|
150
|
+
: 'The file exists but could not be executed.'));
|
|
151
|
+
}
|
|
152
|
+
if (outcome.status !== 0) {
|
|
153
|
+
const detail = (outcome.stderr.trim() || outcome.stdout.trim()).split('\n').slice(-8);
|
|
154
|
+
for (const line of detail)
|
|
155
|
+
output.info(` ${line}`);
|
|
156
|
+
throw new CliError(`\`${manager}\` exited ${outcome.status ?? 'without a status'}; the CLI was not updated.`);
|
|
157
|
+
}
|
|
158
|
+
// The check that makes a silent no-op impossible. The manager reporting success is not evidence
|
|
159
|
+
// that anything moved — that was precisely the old failure, where npm cheerfully installed into
|
|
160
|
+
// a prefix nobody's PATH pointed at and said so.
|
|
161
|
+
const installed = deps.readVersion(location.verifyDir);
|
|
162
|
+
if (installed !== target) {
|
|
163
|
+
throw new CliError(`\`${manager}\` reported success, but ${location.verifyDir} still holds ` +
|
|
164
|
+
`${installed ?? 'no readable version'} instead of ${target}. The update did not land where ` +
|
|
165
|
+
'this CLI is installed; nothing has been changed.');
|
|
166
|
+
}
|
|
167
|
+
// Written so the startup nudge goes quiet on the very next command instead of at the end of its
|
|
168
|
+
// refresh interval — being told to update by the CLI you just updated reads as a failed update.
|
|
169
|
+
deps.writeCache({ latest: target, tag, checkedAt: deps.now() });
|
|
170
|
+
output.info(`Done. \`bitmagic --version\` now reports ${target}.`);
|
|
171
|
+
return { ok: true, from: current, to: target, tag, updated: true, manager, packageDir: location.packageDir };
|
|
172
|
+
}
|
|
173
|
+
export const selfUpdateCommand = defineCommand({
|
|
174
|
+
meta: {
|
|
175
|
+
name: 'self-update',
|
|
176
|
+
description: 'Update the bitmagic CLI itself to the newest build of its line, installing it where this ' +
|
|
177
|
+
'CLI actually lives rather than wherever `npm` on your PATH would put it.',
|
|
178
|
+
},
|
|
179
|
+
args: {
|
|
180
|
+
tag: {
|
|
181
|
+
type: 'string',
|
|
182
|
+
description: "Which npm line to install: `latest` or `dev`. Defaults to the project's environment, or " +
|
|
183
|
+
'to the line this build is already on.',
|
|
184
|
+
},
|
|
185
|
+
json: {
|
|
186
|
+
type: 'boolean',
|
|
187
|
+
description: 'Print the result as JSON on stdout; all progress goes to stderr.',
|
|
188
|
+
},
|
|
189
|
+
},
|
|
190
|
+
async run({ args }) {
|
|
191
|
+
const output = createOutput(args.json === true);
|
|
192
|
+
const result = await runSelfUpdate(typeof args.tag === 'string' ? args.tag : undefined, output);
|
|
193
|
+
output.result(result);
|
|
194
|
+
},
|
|
195
|
+
});
|
|
196
|
+
//# sourceMappingURL=self-update.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"self-update.js","sourceRoot":"","sources":["../../src/commands/self-update.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,YAAY,EAAe,MAAM,cAAc,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACvE,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,YAAY,EACZ,uBAAuB,GAGxB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,qBAAqB,EAAwB,MAAM,2BAA2B,CAAC;AACxF,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,EACL,YAAY,EACZ,WAAW,EACX,uBAAuB,EACvB,WAAW,EACX,UAAU,EACV,UAAU,EACV,oBAAoB,EACpB,gBAAgB,EAChB,cAAc,GAIf,MAAM,2BAA2B,CAAC;AAEnC,6EAA6E;AAC7E,MAAM,cAAc,GAAG,IAAI,CAAC;AA4B5B,MAAM,CAAC,MAAM,qBAAqB,GAAmB;IACnD,cAAc,EAAE,iBAAiB;IACjC,MAAM,EAAE,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addCommand, detectPackageManager } from '../project/package-manager.js';
|
|
17
17
|
import { isOlderSemverVersion } from '../project/version-compare.js';
|
|
18
18
|
import { fetchTagVersion } from '../update/check.js';
|
|
19
|
-
import {
|
|
19
|
+
import { crossLineUpdateCommand, updateTagFor, updateTagForEnvironment } from '../update/notice.js';
|
|
20
20
|
import { currentCliVersion } from '../update/cli-version.js';
|
|
21
21
|
const deps = {
|
|
22
22
|
fetch: globalThis.fetch,
|
|
@@ -223,7 +223,10 @@ fetchLatest = () => fetchTagVersion(tag)) {
|
|
|
223
223
|
if (updateAvailable) {
|
|
224
224
|
output.info('');
|
|
225
225
|
output.info(`Your CLI is older than the engine you just vendored: ${latest} is on npm, you have ${version}.`);
|
|
226
|
-
|
|
226
|
+
// `--tag` is named because this call site passes the PROJECT's line, not the running build's:
|
|
227
|
+
// an upgrade run by a CLI from the other line must be told to cross over, and the bare command
|
|
228
|
+
// would only re-read the pin it is already standing in.
|
|
229
|
+
output.info(` Run \`${crossLineUpdateCommand(tag)}\` before the next build.`);
|
|
227
230
|
output.info(' The CLI and the engine ship together, so a newer engine can need build config or a ' +
|
|
228
231
|
'command only the newer CLI has.');
|
|
229
232
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upgrade.js","sourceRoot":"","sources":["../../src/commands/upgrade.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,YAAY,EAAe,MAAM,cAAc,CAAC;AACzD,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,2BAA2B,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAC9F,O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-overlay`,
|
|
17
17
|
* `.bm-dialog`, `.bm-pill`); only what is specific to this dialog's layout lives here.
|
|
18
18
|
*/
|
|
19
|
-
export declare const ASSET_DETAIL_CSS = "\n /* Above #hq-overlay, which sits at 10 \u2014 a preview opened from a row must cover it. */\n #asset-overlay { z-index: 11; }\n #asset-dialog { display: flex; width: min(1100px, 94vw); height: min(760px, 88vh);\n overflow: hidden; }\n /* The viewer takes the room. Everything else is a caption. The near-black ground is the\n brand's: a creation is the only thing on this surface that carries colour. */\n #asset-view { flex: 1; min-width: 0; position: relative; background: var(--bm-bg); }\n #asset-view iframe { display: block; width: 100%; height: 100%; border: 0; }\n #asset-view img { display: block; width: 100%; height: 100%; object-fit: contain;\n background: var(--bm-bg); }\n #asset-view audio { position: absolute; left: 50%; top: 50%; width: min(420px, 80%);\n transform: translate(-50%, -50%); }\n /* A note here is always a failure or a wait that has gone on too long \u2014 the negative accent. */\n #asset-note { position: absolute; inset: auto 0 0 0; padding: 10px 12px;\n background: var(--bm-scrim); color: var(--bm-pink-hover); font-size: 12px; }\n #asset-note.hidden, #asset-view > .hidden { display: none; }\n /* Wide enough for the
|
|
19
|
+
export declare const ASSET_DETAIL_CSS = "\n /* Above #hq-overlay, which sits at 10 \u2014 a preview opened from a row must cover it. */\n #asset-overlay { z-index: 11; }\n #asset-dialog { display: flex; width: min(1100px, 94vw); height: min(760px, 88vh);\n overflow: hidden; }\n /* The viewer takes the room. Everything else is a caption. The near-black ground is the\n brand's: a creation is the only thing on this surface that carries colour. */\n #asset-view { flex: 1; min-width: 0; position: relative; background: var(--bm-bg); }\n #asset-view iframe { display: block; width: 100%; height: 100%; border: 0; }\n #asset-view img { display: block; width: 100%; height: 100%; object-fit: contain;\n background: var(--bm-bg); }\n #asset-view audio { position: absolute; left: 50%; top: 50%; width: min(420px, 80%);\n transform: translate(-50%, -50%); }\n /* A note here is always a failure or a wait that has gone on too long \u2014 the negative accent. */\n #asset-note { position: absolute; inset: auto 0 0 0; padding: 10px 12px;\n background: var(--bm-scrim); color: var(--bm-pink-hover); font-size: 12px; }\n #asset-note.hidden, #asset-view > .hidden { display: none; }\n /* Wide enough for the action pills to sit on one row (wrapping to two once Edit voxels shows):\n uppercase tracked labels are wider than the sentence-case ones this panel used to have. */\n #asset-meta { width: 360px; flex: none; padding: 16px; overflow-y: auto;\n border-left: 1px solid var(--bm-border-muted); }\n #asset-meta h2 { margin: 0 0 4px; word-break: break-word; }\n #asset-meta .sub { color: var(--bm-text-dim); font-size: 12px; margin-bottom: 16px; }\n #asset-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: 12px; }\n #asset-facts dt { color: var(--bm-text-dim); }\n #asset-facts dd { margin: 0; color: var(--bm-text); word-break: break-word; }\n #asset-facts dd.mono { font-family: var(--bm-font-mono); }\n #asset-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }\n /* The .hidden rules above are scoped to the viewer side; the actions row needs its own. */\n #asset-actions .hidden { display: none; }\n #asset-close { margin-left: auto; }\n";
|
|
20
20
|
/**
|
|
21
21
|
* The overlay itself.
|
|
22
22
|
*
|
|
@@ -24,4 +24,4 @@ export declare const ASSET_DETAIL_CSS = "\n /* Above #hq-overlay, which sits at
|
|
|
24
24
|
* controls because its player sits in a 46px row, and here there is a whole dialog. A creator
|
|
25
25
|
* checking a sound effect wants the scrubber.
|
|
26
26
|
*/
|
|
27
|
-
export declare const ASSET_DETAIL_HTML = "\n <div id=\"asset-overlay\" class=\"bm-overlay\">\n <div id=\"asset-dialog\" class=\"bm-dialog\">\n <div id=\"asset-view\">\n <iframe id=\"asset-frame\" class=\"hidden\" title=\"Asset preview\"></iframe>\n <img id=\"asset-image\" class=\"hidden\" alt=\"\">\n <audio id=\"asset-audio\" class=\"hidden\" controls preload=\"none\"></audio>\n <div id=\"asset-note\" class=\"hidden\"></div>\n </div>\n <aside id=\"asset-meta\">\n <h2 id=\"asset-name\"></h2>\n <div class=\"sub\" id=\"asset-sub\"></div>\n <dl id=\"asset-facts\"></dl>\n <div id=\"asset-actions\">\n <button id=\"asset-reset\" class=\"bm-pill\" type=\"button\" title=\"Back to the angle the thumbnail uses\">Reset view</button>\n <button id=\"asset-copy\" class=\"bm-pill\" type=\"button\" title=\"Copy this asset's id\">Copy id</button>\n <button id=\"asset-close\" class=\"bm-pill bm-pill--ghost\" type=\"button\">Close</button>\n </div>\n </aside>\n </div>\n </div>\n";
|
|
27
|
+
export declare const ASSET_DETAIL_HTML = "\n <div id=\"asset-overlay\" class=\"bm-overlay\">\n <div id=\"asset-dialog\" class=\"bm-dialog\">\n <div id=\"asset-view\">\n <iframe id=\"asset-frame\" class=\"hidden\" title=\"Asset preview\"></iframe>\n <img id=\"asset-image\" class=\"hidden\" alt=\"\">\n <audio id=\"asset-audio\" class=\"hidden\" controls preload=\"none\"></audio>\n <div id=\"asset-note\" class=\"hidden\"></div>\n </div>\n <aside id=\"asset-meta\">\n <h2 id=\"asset-name\"></h2>\n <div class=\"sub\" id=\"asset-sub\"></div>\n <dl id=\"asset-facts\"></dl>\n <div id=\"asset-actions\">\n <button id=\"asset-edit-voxels\" class=\"bm-pill bm-pill--primary hidden\" type=\"button\" title=\"Open the 3D voxel editor: add, delete and recolor voxels, and set which ones glow\">Edit voxels</button>\n <button id=\"asset-reset\" class=\"bm-pill\" type=\"button\" title=\"Back to the angle the thumbnail uses\">Reset view</button>\n <button id=\"asset-copy\" class=\"bm-pill\" type=\"button\" title=\"Copy this asset's id\">Copy id</button>\n <button id=\"asset-close\" class=\"bm-pill bm-pill--ghost\" type=\"button\">Close</button>\n </div>\n </aside>\n </div>\n </div>\n";
|
|
@@ -33,8 +33,8 @@ export const ASSET_DETAIL_CSS = `
|
|
|
33
33
|
#asset-note { position: absolute; inset: auto 0 0 0; padding: 10px 12px;
|
|
34
34
|
background: var(--bm-scrim); color: var(--bm-pink-hover); font-size: 12px; }
|
|
35
35
|
#asset-note.hidden, #asset-view > .hidden { display: none; }
|
|
36
|
-
/* Wide enough for the
|
|
37
|
-
wider than the sentence-case ones this panel used to have. */
|
|
36
|
+
/* Wide enough for the action pills to sit on one row (wrapping to two once Edit voxels shows):
|
|
37
|
+
uppercase tracked labels are wider than the sentence-case ones this panel used to have. */
|
|
38
38
|
#asset-meta { width: 360px; flex: none; padding: 16px; overflow-y: auto;
|
|
39
39
|
border-left: 1px solid var(--bm-border-muted); }
|
|
40
40
|
#asset-meta h2 { margin: 0 0 4px; word-break: break-word; }
|
|
@@ -44,6 +44,8 @@ export const ASSET_DETAIL_CSS = `
|
|
|
44
44
|
#asset-facts dd { margin: 0; color: var(--bm-text); word-break: break-word; }
|
|
45
45
|
#asset-facts dd.mono { font-family: var(--bm-font-mono); }
|
|
46
46
|
#asset-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
|
|
47
|
+
/* The .hidden rules above are scoped to the viewer side; the actions row needs its own. */
|
|
48
|
+
#asset-actions .hidden { display: none; }
|
|
47
49
|
#asset-close { margin-left: auto; }
|
|
48
50
|
`;
|
|
49
51
|
/**
|
|
@@ -67,6 +69,7 @@ export const ASSET_DETAIL_HTML = `
|
|
|
67
69
|
<div class="sub" id="asset-sub"></div>
|
|
68
70
|
<dl id="asset-facts"></dl>
|
|
69
71
|
<div id="asset-actions">
|
|
72
|
+
<button id="asset-edit-voxels" class="bm-pill bm-pill--primary hidden" type="button" title="Open the 3D voxel editor: add, delete and recolor voxels, and set which ones glow">Edit voxels</button>
|
|
70
73
|
<button id="asset-reset" class="bm-pill" type="button" title="Back to the angle the thumbnail uses">Reset view</button>
|
|
71
74
|
<button id="asset-copy" class="bm-pill" type="button" title="Copy this asset's id">Copy id</button>
|
|
72
75
|
<button id="asset-close" class="bm-pill bm-pill--ghost" type="button">Close</button>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asset-detail-panel.js","sourceRoot":"","sources":["../../src/editor/asset-detail-panel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG
|
|
1
|
+
{"version":3,"file":"asset-detail-panel.js","sourceRoot":"","sources":["../../src/editor/asset-detail-panel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+B/B,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG;;;;;;;;;;;;;;;;;;;;;;CAsBhC,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type UpdateCheckCache } from '../update/notice.js';
|
|
2
|
+
/** What the banner needs to write its sentence, or null when there is nothing to say. */
|
|
3
|
+
export interface CliUpdateState {
|
|
4
|
+
current: string;
|
|
5
|
+
latest: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* How often the cache file is re-read.
|
|
9
|
+
*
|
|
10
|
+
* Not about the network — the refresh below has its own, much longer interval — but about not
|
|
11
|
+
* stat-ing and parsing a file 7200 times an hour to answer a question whose answer changes at most
|
|
12
|
+
* a few times a day.
|
|
13
|
+
*/
|
|
14
|
+
export declare const CLI_UPDATE_READ_INTERVAL_MS = 30000;
|
|
15
|
+
export interface CliUpdateReaderDeps {
|
|
16
|
+
version: () => string;
|
|
17
|
+
readCache: () => UpdateCheckCache | null;
|
|
18
|
+
/** Fire-and-forget; self-throttles on the cache's own staleness rule. */
|
|
19
|
+
refresh: (version: string) => void;
|
|
20
|
+
now: () => number;
|
|
21
|
+
}
|
|
22
|
+
export declare const defaultCliUpdateReaderDeps: CliUpdateReaderDeps;
|
|
23
|
+
/**
|
|
24
|
+
* A memoised "is this CLI behind?", safe to call from a route handler on every poll.
|
|
25
|
+
*
|
|
26
|
+
* The refresh is triggered from here rather than on a timer of its own, because a `dev` session is
|
|
27
|
+
* exactly the case bin.ts's one-shot refresh does not cover: it checks once at startup and the
|
|
28
|
+
* process then runs for hours, so without this a session started before a release would never
|
|
29
|
+
* learn of it. `refreshUpdateCacheInBackground` already declines to do anything until its own
|
|
30
|
+
* interval has passed, so calling it here every thirty seconds costs a cache read, not a request.
|
|
31
|
+
*/
|
|
32
|
+
export declare function createCliUpdateReader(deps?: CliUpdateReaderDeps): () => CliUpdateState | null;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether a newer bitmagic CLI exists, for the `bitmagic dev` banner.
|
|
3
|
+
*
|
|
4
|
+
* The terminal already prints this at the top of every command (bin.ts), but `dev` is the one
|
|
5
|
+
* command that runs for hours: its nudge scrolls away behind the build log within seconds, and the
|
|
6
|
+
* creator spends the rest of the session looking at a browser tab instead. So the same fact is
|
|
7
|
+
* surfaced where they actually are.
|
|
8
|
+
*
|
|
9
|
+
* Nothing here goes to the network on the page's behalf. The answer comes from the cache that the
|
|
10
|
+
* ordinary startup check already maintains (`~/.bitmagic/update-check.json`), and the refresh is
|
|
11
|
+
* the same fire-and-forget one every command performs — which matters because `/api/state` is
|
|
12
|
+
* polled twice a second, and a check that cost a registry read would cost 7000 of them an hour.
|
|
13
|
+
*
|
|
14
|
+
* Structured rather than the prose notice: the shell page is assembled as a TypeScript template
|
|
15
|
+
* literal and may not contain a backtick, and the terminal's wording is full of them. Sending the
|
|
16
|
+
* two versions lets the page write its own sentence.
|
|
17
|
+
*/
|
|
18
|
+
import { currentCliVersion } from '../update/cli-version.js';
|
|
19
|
+
import { readUpdateCache, refreshUpdateCacheInBackground } from '../update/check.js';
|
|
20
|
+
import { updateTagFor } from '../update/notice.js';
|
|
21
|
+
import { isOlderSemverVersion } from '../project/version-compare.js';
|
|
22
|
+
/**
|
|
23
|
+
* How often the cache file is re-read.
|
|
24
|
+
*
|
|
25
|
+
* Not about the network — the refresh below has its own, much longer interval — but about not
|
|
26
|
+
* stat-ing and parsing a file 7200 times an hour to answer a question whose answer changes at most
|
|
27
|
+
* a few times a day.
|
|
28
|
+
*/
|
|
29
|
+
export const CLI_UPDATE_READ_INTERVAL_MS = 30_000;
|
|
30
|
+
export const defaultCliUpdateReaderDeps = {
|
|
31
|
+
version: currentCliVersion,
|
|
32
|
+
readCache: () => readUpdateCache(),
|
|
33
|
+
refresh: (version) => void refreshUpdateCacheInBackground(version),
|
|
34
|
+
now: Date.now,
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* A memoised "is this CLI behind?", safe to call from a route handler on every poll.
|
|
38
|
+
*
|
|
39
|
+
* The refresh is triggered from here rather than on a timer of its own, because a `dev` session is
|
|
40
|
+
* exactly the case bin.ts's one-shot refresh does not cover: it checks once at startup and the
|
|
41
|
+
* process then runs for hours, so without this a session started before a release would never
|
|
42
|
+
* learn of it. `refreshUpdateCacheInBackground` already declines to do anything until its own
|
|
43
|
+
* interval has passed, so calling it here every thirty seconds costs a cache read, not a request.
|
|
44
|
+
*/
|
|
45
|
+
export function createCliUpdateReader(deps = defaultCliUpdateReaderDeps) {
|
|
46
|
+
let memo = null;
|
|
47
|
+
let readAt = null;
|
|
48
|
+
return () => {
|
|
49
|
+
const now = deps.now();
|
|
50
|
+
if (readAt !== null && now - readAt < CLI_UPDATE_READ_INTERVAL_MS)
|
|
51
|
+
return memo;
|
|
52
|
+
readAt = now;
|
|
53
|
+
const version = deps.version();
|
|
54
|
+
deps.refresh(version);
|
|
55
|
+
const cache = deps.readCache();
|
|
56
|
+
// A cache about the OTHER line answers a different question — the same rule, and the same
|
|
57
|
+
// silence, as `pendingUpdateNotice`. A dev build must not be shown the release as "newer".
|
|
58
|
+
memo =
|
|
59
|
+
cache === null || cache.latest === null || cache.tag !== updateTagFor(version)
|
|
60
|
+
? null
|
|
61
|
+
: isOlderSemverVersion(version, cache.latest) === true
|
|
62
|
+
? { current: version, latest: cache.latest }
|
|
63
|
+
: null;
|
|
64
|
+
return memo;
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=cli-update.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"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AAI,IAAI,KAAK,CAAC,GAAG,KAAK,YAAY,CAAC,OAAO,CAAC;gBAC5E,CAAC,CAAC,IAAI;gBACN,CAAC,CAAC,oBAAoB,CAAC,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,IAAI;oBACpD,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE;oBAC5C,CAAC,CAAC,IAAI,CAAC;QACb,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The published-game panel's CSS and markup, composed into `shell-page.ts`.
|
|
3
|
+
*
|
|
4
|
+
* Split out for the reason `asset-detail-panel.ts` was: that file is the busiest in the package and
|
|
5
|
+
* sits near the repo's 2000-line ceiling. Style and markup carry no closure state, so they can
|
|
6
|
+
* leave without threading anything across a boundary; the panel's behaviour stays inline there,
|
|
7
|
+
* because it needs the poll, `readPref`/`writePref` and the enclosing IIFE's element lookups.
|
|
8
|
+
*
|
|
9
|
+
* What this surface is for: `bitmagic dev` is the window a creator already has open, and until now
|
|
10
|
+
* it could not answer "where is this game?". The terminal that published knows, and it has usually
|
|
11
|
+
* scrolled away — or belongs to an agent the creator never sees. The QR is the second half of the
|
|
12
|
+
* same thought: the address is most useful on a phone, and a phone cannot copy from a terminal.
|
|
13
|
+
*
|
|
14
|
+
* Same template-literal rules as its host: **no backticks**, and a backslash in a regex has to be
|
|
15
|
+
* doubled to survive the literal. Every colour is a `--bm-*` token; `shell-page.test.ts` fails the
|
|
16
|
+
* build on a hex that is not black or white.
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* Styles for `#publish-overlay`, appended to the shell's stylesheet.
|
|
20
|
+
*
|
|
21
|
+
* The backdrop, the card and the pills come from `design.ts` (`.bm-overlay`, `.bm-dialog`,
|
|
22
|
+
* `.bm-pill`, `.bm-badge`); only this dialog's own layout lives here.
|
|
23
|
+
*/
|
|
24
|
+
export declare const PUBLISH_PANEL_CSS = "\n /* Level with #hq-overlay: the two are opened from different controls and never stack. */\n #publish-overlay { z-index: 10; }\n #publish-dialog { width: min(420px, 92vw); padding: 20px; text-align: center; }\n /* The address, styled like #hq-note's command line \u2014 the one thing on this card a creator may\n want to read character by character, and the one thing that has to wrap without pushing the\n card wider. */\n #publish-url { display: block; margin: 0 0 12px; color: var(--bm-aqua);\n font-family: var(--bm-font-mono); font-size: 12px; word-break: break-all;\n text-decoration: none; }\n #publish-url:hover { text-decoration: underline; }\n #publish-meta { display: flex; align-items: center; justify-content: center; gap: 8px;\n margin-bottom: 16px; font-size: 12px; color: var(--bm-text-muted); }\n /* White ground under the code, always: the PNG is dark-on-white and this surface is near-black,\n so without it the quiet zone would be the page and no scanner would find the edges. */\n #publish-qr { display: block; width: 240px; height: 240px; margin: 0 auto;\n background: #ffffff; border-radius: 6px; }\n #publish-hint { margin: 12px 0 0; font-size: 12px; color: var(--bm-text-muted); }\n #publish-actions { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }\n /* An anchor wearing a pill needs the line-height a button gets for free. */\n #publish-manage { display: inline-flex; align-items: center; text-decoration: none; }\n";
|
|
25
|
+
/**
|
|
26
|
+
* Markup for the published-game dialog.
|
|
27
|
+
*
|
|
28
|
+
* Everything inside is empty until the poll fills it: the shell is rendered once when the server
|
|
29
|
+
* starts, and the publish it should show usually happens hours later in another terminal.
|
|
30
|
+
*/
|
|
31
|
+
export declare const PUBLISH_PANEL_HTML = " <div id=\"publish-overlay\" class=\"bm-overlay\">\n <div id=\"publish-dialog\" class=\"bm-dialog\">\n <h2>Your game is live</h2>\n <a id=\"publish-url\" target=\"_blank\" rel=\"noopener noreferrer\"></a>\n <div id=\"publish-meta\">\n <span id=\"publish-visibility\" class=\"bm-badge\"></span>\n <span id=\"publish-version\"></span>\n </div>\n <img id=\"publish-qr\" alt=\"QR code for this game's address\">\n <p id=\"publish-hint\">Scan it to play on your phone.</p>\n <div id=\"publish-actions\">\n <a id=\"publish-manage\" class=\"bm-pill bm-pill--ghost\" target=\"_blank\" rel=\"noopener noreferrer\">Manage</a>\n <button id=\"publish-close\" class=\"bm-pill bm-pill--primary\" type=\"button\">Close</button>\n </div>\n </div>\n </div>\n";
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The published-game panel's CSS and markup, composed into `shell-page.ts`.
|
|
3
|
+
*
|
|
4
|
+
* Split out for the reason `asset-detail-panel.ts` was: that file is the busiest in the package and
|
|
5
|
+
* sits near the repo's 2000-line ceiling. Style and markup carry no closure state, so they can
|
|
6
|
+
* leave without threading anything across a boundary; the panel's behaviour stays inline there,
|
|
7
|
+
* because it needs the poll, `readPref`/`writePref` and the enclosing IIFE's element lookups.
|
|
8
|
+
*
|
|
9
|
+
* What this surface is for: `bitmagic dev` is the window a creator already has open, and until now
|
|
10
|
+
* it could not answer "where is this game?". The terminal that published knows, and it has usually
|
|
11
|
+
* scrolled away — or belongs to an agent the creator never sees. The QR is the second half of the
|
|
12
|
+
* same thought: the address is most useful on a phone, and a phone cannot copy from a terminal.
|
|
13
|
+
*
|
|
14
|
+
* Same template-literal rules as its host: **no backticks**, and a backslash in a regex has to be
|
|
15
|
+
* doubled to survive the literal. Every colour is a `--bm-*` token; `shell-page.test.ts` fails the
|
|
16
|
+
* build on a hex that is not black or white.
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* Styles for `#publish-overlay`, appended to the shell's stylesheet.
|
|
20
|
+
*
|
|
21
|
+
* The backdrop, the card and the pills come from `design.ts` (`.bm-overlay`, `.bm-dialog`,
|
|
22
|
+
* `.bm-pill`, `.bm-badge`); only this dialog's own layout lives here.
|
|
23
|
+
*/
|
|
24
|
+
export const PUBLISH_PANEL_CSS = `
|
|
25
|
+
/* Level with #hq-overlay: the two are opened from different controls and never stack. */
|
|
26
|
+
#publish-overlay { z-index: 10; }
|
|
27
|
+
#publish-dialog { width: min(420px, 92vw); padding: 20px; text-align: center; }
|
|
28
|
+
/* The address, styled like #hq-note's command line — the one thing on this card a creator may
|
|
29
|
+
want to read character by character, and the one thing that has to wrap without pushing the
|
|
30
|
+
card wider. */
|
|
31
|
+
#publish-url { display: block; margin: 0 0 12px; color: var(--bm-aqua);
|
|
32
|
+
font-family: var(--bm-font-mono); font-size: 12px; word-break: break-all;
|
|
33
|
+
text-decoration: none; }
|
|
34
|
+
#publish-url:hover { text-decoration: underline; }
|
|
35
|
+
#publish-meta { display: flex; align-items: center; justify-content: center; gap: 8px;
|
|
36
|
+
margin-bottom: 16px; font-size: 12px; color: var(--bm-text-muted); }
|
|
37
|
+
/* White ground under the code, always: the PNG is dark-on-white and this surface is near-black,
|
|
38
|
+
so without it the quiet zone would be the page and no scanner would find the edges. */
|
|
39
|
+
#publish-qr { display: block; width: 240px; height: 240px; margin: 0 auto;
|
|
40
|
+
background: #ffffff; border-radius: 6px; }
|
|
41
|
+
#publish-hint { margin: 12px 0 0; font-size: 12px; color: var(--bm-text-muted); }
|
|
42
|
+
#publish-actions { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }
|
|
43
|
+
/* An anchor wearing a pill needs the line-height a button gets for free. */
|
|
44
|
+
#publish-manage { display: inline-flex; align-items: center; text-decoration: none; }
|
|
45
|
+
`;
|
|
46
|
+
/**
|
|
47
|
+
* Markup for the published-game dialog.
|
|
48
|
+
*
|
|
49
|
+
* Everything inside is empty until the poll fills it: the shell is rendered once when the server
|
|
50
|
+
* starts, and the publish it should show usually happens hours later in another terminal.
|
|
51
|
+
*/
|
|
52
|
+
export const PUBLISH_PANEL_HTML = ` <div id="publish-overlay" class="bm-overlay">
|
|
53
|
+
<div id="publish-dialog" class="bm-dialog">
|
|
54
|
+
<h2>Your game is live</h2>
|
|
55
|
+
<a id="publish-url" target="_blank" rel="noopener noreferrer"></a>
|
|
56
|
+
<div id="publish-meta">
|
|
57
|
+
<span id="publish-visibility" class="bm-badge"></span>
|
|
58
|
+
<span id="publish-version"></span>
|
|
59
|
+
</div>
|
|
60
|
+
<img id="publish-qr" alt="QR code for this game's address">
|
|
61
|
+
<p id="publish-hint">Scan it to play on your phone.</p>
|
|
62
|
+
<div id="publish-actions">
|
|
63
|
+
<a id="publish-manage" class="bm-pill bm-pill--ghost" target="_blank" rel="noopener noreferrer">Manage</a>
|
|
64
|
+
<button id="publish-close" class="bm-pill bm-pill--primary" type="button">Close</button>
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
`;
|
|
69
|
+
//# sourceMappingURL=publish-panel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"publish-panel.js","sourceRoot":"","sources":["../../src/editor/publish-panel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG;;;;;;;;;;;;;;;;;;;;;CAqBhC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;;;;;;;;;;;;;;;;CAgBjC,CAAC"}
|