@superwall/cli 1.6.1 → 1.6.2
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 +6 -0
- package/dist/{actions-BdZ-7BJd.js → actions-H7f6knyY.js} +2 -2
- package/dist/{api-FjrCPu6r.js → api-Dv3LyZ5m.js} +7 -7
- package/dist/{app-YeJj35Ia.js → app-mJC5NDtW.js} +7 -7
- package/dist/{asa-4nk7HHy8.js → asa-D6H7Pjae.js} +8 -8
- package/dist/{asc-2TZOQuK1.js → asc-xCin0akG.js} +9 -9
- package/dist/{auth-QUYfKdwk.js → auth-ZlLL-Gko.js} +8 -8
- package/dist/auth.js +2 -2
- package/dist/{billing-BK7bpv1t.js → billing-C8kBge_S.js} +1 -1
- package/dist/{bind-Ch4VR2EY.js → bind-BIzaGq8K.js} +2 -2
- package/dist/build-B7BS1rF2.js +87 -0
- package/dist/{command-BJ_6850A.js → command-3fGYyC8r.js} +4 -4
- package/dist/{create-vSQxQlEP.js → create-CwnnNqv4.js} +20 -19
- package/dist/{dev-DEss5dwo.js → dev-CgGAb5Al.js} +9 -6
- package/dist/dev-Dx99K183.js +22 -0
- package/dist/{doctor-BYTfekBr.js → doctor-CyUvut31.js} +9 -9
- package/dist/{drivers-DGml3OlF.js → drivers-6RMOPIdn.js} +2 -2
- package/dist/entry.js +99 -32
- package/dist/{existing-DgSo639M.js → existing-DHpPn1y6.js} +2 -2
- package/dist/feedback-RKyGuQ8_.js +152 -0
- package/dist/{hosted-DqGp6oV2.js → hosted-BeGVAntr.js} +2 -2
- package/dist/{integrate-Cl9eKHoF.js → integrate-BR2LR-EK.js} +20 -20
- package/dist/{login-DS3MPeW2.js → login-Bhxgqwtm.js} +3 -3
- package/dist/{migrate-WiTO71PE.js → migrate-C-4ISELN.js} +22 -21
- package/dist/{open-studio-CbMUL5Va.js → open-studio-BnVD6tJ9.js} +16 -13
- package/dist/{output-XKuoEEjP.js → output-C-4UKMot.js} +1 -1
- package/dist/{pipeline-J9-nENTS.js → pipeline-CHX0Syre.js} +9 -494
- package/dist/{print-skill-BOGm5Szi.js → print-skill-BiZLdCKv.js} +6 -6
- package/dist/{promote-Ci085QxU.js → promote-Pgpz-3xl.js} +15 -14
- package/dist/publish-BPeuc3lq.js +35 -0
- package/dist/push-DcSQ4odB.js +35 -0
- package/dist/{query-BZStoGLM.js → query-CWLaZkdm.js} +7 -7
- package/dist/{resource-ClLHSXi6.js → resource-jwASPCrw.js} +11 -11
- package/dist/{run-CiaWn78U.js → run-D-NbZLpj.js} +2 -2
- package/dist/{scan-DEgX5HxV.js → scan-BmAW413l.js} +1 -1
- package/dist/selection-BGi6GyxC.js +496 -0
- package/dist/skills/superwall-framework/SKILL.md +109 -36
- package/dist/skills/superwall-framework/references/cli.md +45 -5
- package/dist/skills/superwall-framework/references/mobile-design.md +60 -181
- package/dist/{skills-DsBAVRTE.js → skills-AxAf7bDB.js} +77 -8
- package/dist/{skills-DjPCmUMU.js → skills-FK5aDuNV.js} +6 -6
- package/dist/{telemetry-EzV7cA7s.js → telemetry-Ch9cCTI-.js} +1 -1
- package/dist/{token-r5g876aI.js → token-BGAVPSQc.js} +1 -1
- package/dist/{update-Cz3Q3MFj.js → update-DIXbL-H9.js} +2 -2
- package/dist/{upgrade-BA_4sdnh.js → upgrade-De7JMI1g.js} +5 -5
- package/package.json +2 -2
- package/dist/dev-B9qmPH1W.js +0 -21
- package/dist/feedback-4LsBpZZx.js +0 -73
- package/dist/publish--TV-j8Zd.js +0 -34
- package/dist/push-CpGetsJF.js +0 -34
- package/dist/skills/superwall-framework/references/responsive.md +0 -162
- /package/dist/{api-output-CEhN-U_N.js → api-output-aJNw7Syy.js} +0 -0
- /package/dist/{asc-products-1e1DoGeL.js → asc-products-Dvcyef3_.js} +0 -0
- /package/dist/{org-CV8c849b.js → org-CQduIOic.js} +0 -0
- /package/dist/{params-BxgTuCzr.js → params-l3CrvRtR.js} +0 -0
- /package/dist/{reports-C0xHCLnt.js → reports-DqMs9xNR.js} +0 -0
- /package/dist/{storekit-Dlpbq5Wv.js → storekit-CC4gnTI6.js} +0 -0
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { a as AGENT_SKILLS_DIR, l as CHANNEL, u as CHANNELS, y as VERSION } from "./output-
|
|
2
|
-
import { h as setSkillsSync, i as track, u as getSkillsSync } from "./telemetry-
|
|
1
|
+
import { a as AGENT_SKILLS_DIR, l as CHANNEL, u as CHANNELS, y as VERSION } from "./output-C-4UKMot.js";
|
|
2
|
+
import { h as setSkillsSync, i as track, u as getSkillsSync } from "./telemetry-Ch9cCTI-.js";
|
|
3
3
|
import { n as ui } from "./ui-4gLyfrgl.js";
|
|
4
4
|
import { r as spawnStream } from "./spawn-DSoTXy_j.js";
|
|
5
5
|
import { dirname, join } from "node:path";
|
|
6
|
-
import {
|
|
6
|
+
import { tmpdir } from "node:os";
|
|
7
|
+
import { existsSync, mkdtempSync, readFileSync, readdirSync, rmSync, writeFileSync } from "node:fs";
|
|
7
8
|
import { fileURLToPath } from "node:url";
|
|
8
9
|
|
|
9
10
|
//#region src/packaged.ts
|
|
@@ -187,17 +188,85 @@ async function fetchSkillSummary(name) {
|
|
|
187
188
|
}
|
|
188
189
|
}
|
|
189
190
|
async function installPublicSkills(opts = {}) {
|
|
190
|
-
const
|
|
191
|
+
const selection = opts.skills?.length ? ["--skill", ...opts.skills] : ["--skill", "*"];
|
|
192
|
+
const remote = [
|
|
191
193
|
"-y",
|
|
192
194
|
"skills@latest",
|
|
193
195
|
"add",
|
|
194
196
|
SKILLS_INSTALL_SOURCE(),
|
|
195
197
|
"--global",
|
|
196
|
-
"--yes"
|
|
198
|
+
"--yes",
|
|
199
|
+
...selection
|
|
197
200
|
];
|
|
198
|
-
if (opts.
|
|
199
|
-
|
|
200
|
-
return runInstall(
|
|
201
|
+
if (opts.dryRun) return runInstall(remote, opts);
|
|
202
|
+
const checkout = await clonePublicSkills(opts.cwd);
|
|
203
|
+
if (!checkout) return runInstall(remote, opts);
|
|
204
|
+
try {
|
|
205
|
+
normalizeSkillsDir(join(checkout, "skills"));
|
|
206
|
+
return await runInstall([
|
|
207
|
+
"-y",
|
|
208
|
+
"skills@latest",
|
|
209
|
+
"add",
|
|
210
|
+
join(checkout, "skills"),
|
|
211
|
+
"--global",
|
|
212
|
+
"--yes",
|
|
213
|
+
...selection,
|
|
214
|
+
"--copy"
|
|
215
|
+
], opts);
|
|
216
|
+
} finally {
|
|
217
|
+
rmSync(checkout, {
|
|
218
|
+
recursive: true,
|
|
219
|
+
force: true
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
async function clonePublicSkills(cwd) {
|
|
224
|
+
const dir = mkdtempSync(join(tmpdir(), "superwall-skills-"));
|
|
225
|
+
const { code } = await spawnStream({
|
|
226
|
+
bin: "git",
|
|
227
|
+
args: [
|
|
228
|
+
"clone",
|
|
229
|
+
"--quiet",
|
|
230
|
+
"--depth",
|
|
231
|
+
"1",
|
|
232
|
+
"--branch",
|
|
233
|
+
SKILLS_REF(),
|
|
234
|
+
`https://github.com/${SUPERWALL_SKILLS_SOURCE}.git`,
|
|
235
|
+
dir
|
|
236
|
+
],
|
|
237
|
+
cwd: cwd ?? process.cwd(),
|
|
238
|
+
onStdoutLine: () => {}
|
|
239
|
+
}).catch(() => ({ code: 1 }));
|
|
240
|
+
if (code === 0 && existsSync(join(dir, "skills"))) return dir;
|
|
241
|
+
rmSync(dir, {
|
|
242
|
+
recursive: true,
|
|
243
|
+
force: true
|
|
244
|
+
});
|
|
245
|
+
return null;
|
|
246
|
+
}
|
|
247
|
+
function normalizeSkillsDir(dir) {
|
|
248
|
+
for (const entry of readdirSync(dir, { withFileTypes: true })) {
|
|
249
|
+
if (!entry.isDirectory()) continue;
|
|
250
|
+
const file = join(dir, entry.name, "SKILL.md");
|
|
251
|
+
if (!existsSync(file)) continue;
|
|
252
|
+
const md = readFileSync(file, "utf8");
|
|
253
|
+
const normalized = normalizeSkillFrontmatter(md);
|
|
254
|
+
if (normalized !== md) writeFileSync(file, normalized);
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
function normalizeSkillFrontmatter(md) {
|
|
258
|
+
const lines = md.split("\n");
|
|
259
|
+
if (lines[0]?.trim() !== "---") return md;
|
|
260
|
+
const end = lines.indexOf("---", 1);
|
|
261
|
+
if (end < 0) return md;
|
|
262
|
+
for (let i = 1; i < end; i++) {
|
|
263
|
+
const match = lines[i].match(/^([A-Za-z0-9_-]+):[ \t]+(.+?)\s*$/);
|
|
264
|
+
if (!match) continue;
|
|
265
|
+
const [, key, value] = match;
|
|
266
|
+
if (/^["']/.test(value) || /^[|>][+-]?\d*$/.test(value)) continue;
|
|
267
|
+
if (/: |\s#/.test(value) || /^[`@%&*!?{}[\],]/.test(value) || value.endsWith(":")) lines[i] = `${key}: ${JSON.stringify(value)}`;
|
|
268
|
+
}
|
|
269
|
+
return lines.join("\n");
|
|
201
270
|
}
|
|
202
271
|
async function installBundledSkills(opts = {}) {
|
|
203
272
|
return runInstall([
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import "./output-
|
|
2
|
-
import "./telemetry-
|
|
3
|
-
import "./update-
|
|
4
|
-
import "./token-
|
|
5
|
-
import { t as defineCommand } from "./command-
|
|
1
|
+
import "./output-C-4UKMot.js";
|
|
2
|
+
import "./telemetry-Ch9cCTI-.js";
|
|
3
|
+
import "./update-DIXbL-H9.js";
|
|
4
|
+
import "./token-BGAVPSQc.js";
|
|
5
|
+
import { t as defineCommand } from "./command-3fGYyC8r.js";
|
|
6
6
|
import { n as ui } from "./ui-4gLyfrgl.js";
|
|
7
|
-
import { a as skillsOutOfDate, o as syncSkills, r as fetchPublicSkills, t as SKILLS_INSTALL_SOURCE } from "./skills-
|
|
7
|
+
import { a as skillsOutOfDate, o as syncSkills, r as fetchPublicSkills, t as SKILLS_INSTALL_SOURCE } from "./skills-AxAf7bDB.js";
|
|
8
8
|
import "./spawn-DSoTXy_j.js";
|
|
9
9
|
import { t as withSpinner } from "./spinner-DFctF_Jw.js";
|
|
10
10
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as TELEMETRY_HOST, g as SUPERWALL_HOME, r as formatJson, v as TELEMETRY_KEY, x as isNonInteractive, y as VERSION } from "./output-
|
|
1
|
+
import { _ as TELEMETRY_HOST, g as SUPERWALL_HOME, r as formatJson, v as TELEMETRY_KEY, x as isNonInteractive, y as VERSION } from "./output-C-4UKMot.js";
|
|
2
2
|
import { join } from "node:path";
|
|
3
3
|
import { homedir } from "node:os";
|
|
4
4
|
import { randomUUID } from "node:crypto";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as SUPERWALL_HOME, r as formatJson } from "./output-
|
|
1
|
+
import { g as SUPERWALL_HOME, r as formatJson } from "./output-C-4UKMot.js";
|
|
2
2
|
import { join } from "node:path";
|
|
3
3
|
import { homedir } from "node:os";
|
|
4
4
|
import { existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { y as VERSION } from "./output-
|
|
2
|
-
import { d as getUpdateCheck, g as setUpdateCheck } from "./telemetry-
|
|
1
|
+
import { y as VERSION } from "./output-C-4UKMot.js";
|
|
2
|
+
import { d as getUpdateCheck, g as setUpdateCheck } from "./telemetry-Ch9cCTI-.js";
|
|
3
3
|
import pc from "picocolors";
|
|
4
4
|
|
|
5
5
|
//#region src/core/update.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { y as VERSION } from "./output-
|
|
2
|
-
import { g as setUpdateCheck } from "./telemetry-
|
|
3
|
-
import { r as isNewerVersion, t as fetchLatestVersion } from "./update-
|
|
4
|
-
import "./token-
|
|
5
|
-
import { t as defineCommand } from "./command-
|
|
1
|
+
import { y as VERSION } from "./output-C-4UKMot.js";
|
|
2
|
+
import { g as setUpdateCheck } from "./telemetry-Ch9cCTI-.js";
|
|
3
|
+
import { r as isNewerVersion, t as fetchLatestVersion } from "./update-DIXbL-H9.js";
|
|
4
|
+
import "./token-BGAVPSQc.js";
|
|
5
|
+
import { t as defineCommand } from "./command-3fGYyC8r.js";
|
|
6
6
|
import "./ui-4gLyfrgl.js";
|
|
7
7
|
import { r as spawnStream } from "./spawn-DSoTXy_j.js";
|
|
8
8
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superwall/cli",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.2",
|
|
4
4
|
"description": "The official CLI for managing Superwall from your terminal or coding agent.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agent",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
61
|
"@anthropic-ai/claude-agent-sdk": "0.3.201",
|
|
62
|
-
"@superwall/studio": "1.6.
|
|
62
|
+
"@superwall/studio": "1.6.2",
|
|
63
63
|
"ansi-escapes": "^7.3.0",
|
|
64
64
|
"fast-glob": "^3.3.3",
|
|
65
65
|
"ink": "^5.2.1",
|
package/dist/dev-B9qmPH1W.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import "./output-XKuoEEjP.js";
|
|
2
|
-
import "./telemetry-EzV7cA7s.js";
|
|
3
|
-
import "./update-Cz3Q3MFj.js";
|
|
4
|
-
import "./token-r5g876aI.js";
|
|
5
|
-
import "./command-BJ_6850A.js";
|
|
6
|
-
import "./ui-4gLyfrgl.js";
|
|
7
|
-
import "./skills-DsBAVRTE.js";
|
|
8
|
-
import "./spawn-DSoTXy_j.js";
|
|
9
|
-
import "./login-DS3MPeW2.js";
|
|
10
|
-
import "./scan-DEgX5HxV.js";
|
|
11
|
-
import "./hosted-DqGp6oV2.js";
|
|
12
|
-
import "./spinner-DFctF_Jw.js";
|
|
13
|
-
import "./resources-Bf9O1JNM.js";
|
|
14
|
-
import "./org-CV8c849b.js";
|
|
15
|
-
import "./bind-Ch4VR2EY.js";
|
|
16
|
-
import "./pipeline-J9-nENTS.js";
|
|
17
|
-
import "./actions-BdZ-7BJd.js";
|
|
18
|
-
import "./app-YeJj35Ia.js";
|
|
19
|
-
import { t as runDev } from "./dev-DEss5dwo.js";
|
|
20
|
-
|
|
21
|
-
export { runDev };
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { _ as TELEMETRY_HOST, v as TELEMETRY_KEY, y as VERSION } from "./output-XKuoEEjP.js";
|
|
2
|
-
import { a as getAnonymousId } from "./telemetry-EzV7cA7s.js";
|
|
3
|
-
import "./update-Cz3Q3MFj.js";
|
|
4
|
-
import { i as loadSession } from "./token-r5g876aI.js";
|
|
5
|
-
import { t as defineCommand } from "./command-BJ_6850A.js";
|
|
6
|
-
import "./ui-4gLyfrgl.js";
|
|
7
|
-
|
|
8
|
-
//#region src/core/feedback.ts
|
|
9
|
-
function buildFeedbackEvent(message, via, distinctId, session) {
|
|
10
|
-
return {
|
|
11
|
-
api_key: TELEMETRY_KEY(),
|
|
12
|
-
event: "feedback submitted",
|
|
13
|
-
distinct_id: distinctId,
|
|
14
|
-
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
15
|
-
properties: {
|
|
16
|
-
$process_person_profile: false,
|
|
17
|
-
message,
|
|
18
|
-
via,
|
|
19
|
-
cli_version: VERSION,
|
|
20
|
-
platform: process.platform,
|
|
21
|
-
email: session?.userEmail ?? null,
|
|
22
|
-
org_id: session?.orgId ?? null,
|
|
23
|
-
org_name: session?.orgName ?? null
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
async function submitFeedback(message, via) {
|
|
28
|
-
if (!TELEMETRY_KEY()) return false;
|
|
29
|
-
const payload = buildFeedbackEvent(message, via, getAnonymousId(), loadSession());
|
|
30
|
-
try {
|
|
31
|
-
return (await fetch(`${TELEMETRY_HOST()}/capture/`, {
|
|
32
|
-
method: "POST",
|
|
33
|
-
headers: { "content-type": "application/json" },
|
|
34
|
-
body: JSON.stringify(payload),
|
|
35
|
-
signal: AbortSignal.timeout(8e3)
|
|
36
|
-
})).ok;
|
|
37
|
-
} catch {
|
|
38
|
-
return false;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
//#endregion
|
|
43
|
-
//#region src/commands/account/feedback.ts
|
|
44
|
-
const runFeedback = defineCommand({
|
|
45
|
-
name: "feedback",
|
|
46
|
-
output: "both",
|
|
47
|
-
async run(ctx) {
|
|
48
|
-
const { ui, json, interactive, argv } = ctx;
|
|
49
|
-
let message = argv.message?.trim();
|
|
50
|
-
if (!message && interactive) {
|
|
51
|
-
ui.intro("Superwall feedback");
|
|
52
|
-
const answer = await ui.text({
|
|
53
|
-
message: "What's your feedback on the Superwall CLI?",
|
|
54
|
-
placeholder: "What worked, what didn't, what's missing...",
|
|
55
|
-
validate: (v) => v?.trim() ? void 0 : "Required"
|
|
56
|
-
});
|
|
57
|
-
if (answer === null) return void ui.warn("Cancelled.");
|
|
58
|
-
message = answer.trim();
|
|
59
|
-
}
|
|
60
|
-
if (!message) throw new Error("Usage: superwall feedback \"<message>\"");
|
|
61
|
-
const via = interactive ? "human" : "agent";
|
|
62
|
-
const spin = interactive ? ui.spinner() : null;
|
|
63
|
-
spin?.start("Sending your feedback");
|
|
64
|
-
const ok = await submitFeedback(message, via);
|
|
65
|
-
spin?.stop(ok ? "Sent" : "Failed to send");
|
|
66
|
-
if (json) return ctx.output.data({ submitted: ok });
|
|
67
|
-
if (!ok) throw new Error("Couldn't send your feedback - check your connection and try again.");
|
|
68
|
-
ui.success("Thank you! We've received your feedback and will read through it. Really appreciate you helping us make the CLI better.");
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
|
|
72
|
-
//#endregion
|
|
73
|
-
export { runFeedback };
|
package/dist/publish--TV-j8Zd.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import "./output-XKuoEEjP.js";
|
|
2
|
-
import "./telemetry-EzV7cA7s.js";
|
|
3
|
-
import "./update-Cz3Q3MFj.js";
|
|
4
|
-
import "./token-r5g876aI.js";
|
|
5
|
-
import { t as defineCommand } from "./command-BJ_6850A.js";
|
|
6
|
-
import "./ui-4gLyfrgl.js";
|
|
7
|
-
import "./skills-DsBAVRTE.js";
|
|
8
|
-
import "./spawn-DSoTXy_j.js";
|
|
9
|
-
import "./login-DS3MPeW2.js";
|
|
10
|
-
import "./scan-DEgX5HxV.js";
|
|
11
|
-
import "./hosted-DqGp6oV2.js";
|
|
12
|
-
import "./spinner-DFctF_Jw.js";
|
|
13
|
-
import "./resources-Bf9O1JNM.js";
|
|
14
|
-
import "./org-CV8c849b.js";
|
|
15
|
-
import "./bind-Ch4VR2EY.js";
|
|
16
|
-
import { A as requireApi, n as runPushPipeline } from "./pipeline-J9-nENTS.js";
|
|
17
|
-
import "./actions-BdZ-7BJd.js";
|
|
18
|
-
import "./app-YeJj35Ia.js";
|
|
19
|
-
|
|
20
|
-
//#region src/commands/paywalls/publish.ts
|
|
21
|
-
const runPublish = defineCommand({
|
|
22
|
-
name: "publish",
|
|
23
|
-
output: "human",
|
|
24
|
-
async run(context) {
|
|
25
|
-
const api = await requireApi(context.interactive);
|
|
26
|
-
await runPushPipeline({
|
|
27
|
-
...context,
|
|
28
|
-
api
|
|
29
|
-
}, { promote: true });
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
//#endregion
|
|
34
|
-
export { runPublish };
|
package/dist/push-CpGetsJF.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import "./output-XKuoEEjP.js";
|
|
2
|
-
import "./telemetry-EzV7cA7s.js";
|
|
3
|
-
import "./update-Cz3Q3MFj.js";
|
|
4
|
-
import "./token-r5g876aI.js";
|
|
5
|
-
import { t as defineCommand } from "./command-BJ_6850A.js";
|
|
6
|
-
import "./ui-4gLyfrgl.js";
|
|
7
|
-
import "./skills-DsBAVRTE.js";
|
|
8
|
-
import "./spawn-DSoTXy_j.js";
|
|
9
|
-
import "./login-DS3MPeW2.js";
|
|
10
|
-
import "./scan-DEgX5HxV.js";
|
|
11
|
-
import "./hosted-DqGp6oV2.js";
|
|
12
|
-
import "./spinner-DFctF_Jw.js";
|
|
13
|
-
import "./resources-Bf9O1JNM.js";
|
|
14
|
-
import "./org-CV8c849b.js";
|
|
15
|
-
import "./bind-Ch4VR2EY.js";
|
|
16
|
-
import { A as requireApi, n as runPushPipeline } from "./pipeline-J9-nENTS.js";
|
|
17
|
-
import "./actions-BdZ-7BJd.js";
|
|
18
|
-
import "./app-YeJj35Ia.js";
|
|
19
|
-
|
|
20
|
-
//#region src/commands/paywalls/push.ts
|
|
21
|
-
const runPush = defineCommand({
|
|
22
|
-
name: "push",
|
|
23
|
-
output: "human",
|
|
24
|
-
async run(context) {
|
|
25
|
-
const api = await requireApi(context.interactive);
|
|
26
|
-
await runPushPipeline({
|
|
27
|
-
...context,
|
|
28
|
-
api
|
|
29
|
-
}, { promote: false });
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
//#endregion
|
|
34
|
-
export { runPush };
|
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
# Responsive — every screen the paywall ships to
|
|
2
|
-
|
|
3
|
-
A paywall is designed at one size and shipped to dozens. The studio's
|
|
4
|
-
device presets are the contract: a paywall is finished when it is right
|
|
5
|
-
on every one of them, in both schemes, in the presentation style its
|
|
6
|
-
`config.ts` declares. This file says what "right" means at each size and
|
|
7
|
-
how to get there without a second design.
|
|
8
|
-
|
|
9
|
-
## The sizes that matter
|
|
10
|
-
|
|
11
|
-
| Preset | Logical size | What it tests |
|
|
12
|
-
| --- | --- | --- |
|
|
13
|
-
| iPhone SE | 375 × 667, no cutout | The shortest phone: does the pinned CTA still leave room for the content? 20px status bar, no home indicator |
|
|
14
|
-
| Responsive at 320 | 320 wide (drag the frame's edge or type the width) | Narrowest width in the wild (older phones, split view). Nothing may overflow; display type must have shrunk. Keep dragging narrower and taller to find where the layout breaks |
|
|
15
|
-
| iPhone 17 / Air / Pro Max | 402–440 × 874–956, island | The default. The tallest phones: does the layout use the height or leave a void above the CTA? |
|
|
16
|
-
| Pixel 10 / Galaxy S25 | 412 × 915 / 360 × 780, Android | Android conventions, 24px status-bar floor, no bottom inset, 360-wide Galaxy is the second-narrowest common width |
|
|
17
|
-
| iPad mini / iPad Pro 11″ | 744 × 1133 / 834 × 1194 | Tablet: a phone layout stretched to 800px is wrong; a centered column or a two-column reflow is right |
|
|
18
|
-
| Desktop (web only) | 1440 × 900 | A web funnel in a browser: a phone-width column, centered; hover states; real keyboard focus |
|
|
19
|
-
| Landscape | any preset rotated | Only where the app allows it. Cutout on the sides, 21px indicator, no status bar |
|
|
20
|
-
|
|
21
|
-
The studio also switches what the paywall is *told* — platform, model,
|
|
22
|
-
OS — so the inset floors and any `data-sw-*`-keyed CSS follow the preset.
|
|
23
|
-
|
|
24
|
-
## Width
|
|
25
|
-
|
|
26
|
-
- **Fluid by default.** `width: 100%`, `max-width` for the reading
|
|
27
|
-
column, `padding-inline: 20px` (16px at 320 if the design is tight).
|
|
28
|
-
Never a fixed pixel width on anything wider than an icon.
|
|
29
|
-
- **Type scales with `clamp()`**: a 40px display size on the reference is
|
|
30
|
-
`clamp(2rem, 8vw, 2.5rem)` — 32px at 320, 40px at 393+, capped on
|
|
31
|
-
tablets. Body text does not scale; it stays 15–17px everywhere.
|
|
32
|
-
- **Rows of options** (plan cards, feature bullets) stack vertically on
|
|
33
|
-
phones; side-by-side plan cards fit three across at 393 only when each
|
|
34
|
-
is under 110px wide — check 320 and 360, where they usually can't.
|
|
35
|
-
- **Pills and badges** ("Most popular", "Save 40%") wrap or truncate
|
|
36
|
-
before they push the row wider; give them `white-space: nowrap` and
|
|
37
|
-
the row `min-width: 0`, and check the longest locale.
|
|
38
|
-
- `min-width: 0` on flex children with text, or a long product name
|
|
39
|
-
breaks the row instead of wrapping.
|
|
40
|
-
|
|
41
|
-
## Height — the short phone is the hard one
|
|
42
|
-
|
|
43
|
-
The iPhone SE's 667px, minus 20 status bar, minus a 120px pinned footer,
|
|
44
|
-
leaves under 530px for everything else. Design for that, and the tall
|
|
45
|
-
phones get more air, not a different layout.
|
|
46
|
-
|
|
47
|
-
- **Content scrolls; the CTA never does.** With the footer sticky at the
|
|
48
|
-
page's end, a page that doesn't fit simply scrolls under it. That is
|
|
49
|
-
the entire strategy for short screens; do not shrink the CTA or hide
|
|
50
|
-
the legal links to "make it fit".
|
|
51
|
-
- **The shell is `flex: 1 1 auto`, never a viewport-height box.** The
|
|
52
|
-
framework's wrapper is the one element sized to the viewport (with
|
|
53
|
-
`100dvh`, so Safari's collapsing toolbar can't make it taller than what
|
|
54
|
-
is visible); a shell with `min-height: 100dvh` of its own overflows the
|
|
55
|
-
insets and scrolls.
|
|
56
|
-
- **Vertical rhythm compresses before content is cut**: `gap`s of
|
|
57
|
-
24→16, a hero of `clamp(160px, 30dvh, 280px)` rather than a fixed 280,
|
|
58
|
-
feature lists that lose a row of *spacing* at 667 rather than a
|
|
59
|
-
feature. `@media (max-height: 700px)` is the switch for that.
|
|
60
|
-
- A tall phone should not end with a void above the CTA: `margin-top:
|
|
61
|
-
auto` on the actions block, or a hero that grows with `dvh`, uses the
|
|
62
|
-
height.
|
|
63
|
-
- A **short page** (three lines and a button) centers its content or
|
|
64
|
-
pins it to the top by design; it does not stretch a card to fill the
|
|
65
|
-
screen.
|
|
66
|
-
|
|
67
|
-
## Tablets
|
|
68
|
-
|
|
69
|
-
- An iPad is not a big phone. Either **center a column** (`max-width:
|
|
70
|
-
34rem`, the same layout as the phone with more margin) or **reflow**
|
|
71
|
-
(hero beside the copy, plan cards in a row) — the design reference
|
|
72
|
-
decides; the column is the safe default when it says nothing.
|
|
73
|
-
- Insets are small (24px top, 20px bottom) and a `modal` floats in the
|
|
74
|
-
middle with 0 on every side; the framework sets both, so the phone CSS
|
|
75
|
-
usually just works.
|
|
76
|
-
- Tap targets can stay 44px; type does not grow much (cap display at the
|
|
77
|
-
reference size); images do grow, so ship a 2× asset that survives
|
|
78
|
-
834px wide or cap the hero's width.
|
|
79
|
-
- `data-sw-idiom="tablet"` on `:root` is the hook for tablet-only rules
|
|
80
|
-
when a media query on width isn't the right question (a narrow iPad
|
|
81
|
-
split view is still a tablet).
|
|
82
|
-
|
|
83
|
-
## Landscape
|
|
84
|
-
|
|
85
|
-
Most apps lock portrait; `useDevice().orientation` says which state the
|
|
86
|
-
paywall is in, live. Where landscape is allowed:
|
|
87
|
-
|
|
88
|
-
- **The cutout moves to the sides** and the framework moves the insets
|
|
89
|
-
with it (44/59px on both sides, top 0, bottom 21px), so the paywall's
|
|
90
|
-
padding already clears the camera. Only a full-bleed design
|
|
91
|
-
(`insets: "none"`) has to handle it, with `--sw-safe-area-inset-left`
|
|
92
|
-
and `-right` on the chrome over the bleed.
|
|
93
|
-
- Reflow to **two columns** (hero left, copy and CTA right) rather than
|
|
94
|
-
shrinking the portrait layout; the `orientation` example is the
|
|
95
|
-
reference.
|
|
96
|
-
- Keep the CTA pinned; in landscape there is even less height, and the
|
|
97
|
-
content scrolls in its column.
|
|
98
|
-
|
|
99
|
-
## Sheets, drawers and popups
|
|
100
|
-
|
|
101
|
-
`presentation.style` changes the viewport the paywall lives in, and the
|
|
102
|
-
studio shows it that way:
|
|
103
|
-
|
|
104
|
-
- **`modal`** rises as a sheet below the status bar on phones, so the
|
|
105
|
-
framework's top inset is 0 and the sheet's own grabber sits at the top:
|
|
106
|
-
leave 16–20px above the first element, and don't draw a close button
|
|
107
|
-
where the grabber is unless the design does. On iPad the sheet floats,
|
|
108
|
-
and both insets are 0.
|
|
109
|
-
- **`drawer`** takes the height you declared (`drawer.height`, a
|
|
110
|
-
percentage); the paywall's viewport is that drawer, not the screen.
|
|
111
|
-
Design for the declared height and check the tallest locale's copy
|
|
112
|
-
fits or scrolls inside it.
|
|
113
|
-
- **`popup`** is centered with the declared width and height and inset by
|
|
114
|
-
the SDK; the framework's insets are 0 and the page is the popup's
|
|
115
|
-
interior.
|
|
116
|
-
No pinned footer with a gradient here — the popup is short enough that
|
|
117
|
-
the CTA is simply the last element.
|
|
118
|
-
- **Fullscreen and push** are the full screen: everything in
|
|
119
|
-
[mobile-design.md](mobile-design.md) applies as written.
|
|
120
|
-
|
|
121
|
-
## Dynamic type and font scale
|
|
122
|
-
|
|
123
|
-
- The host reports `fontScale` (Android) and
|
|
124
|
-
`preferredContentSizeCategory` (iOS) in `useDevice()`. A paywall does
|
|
125
|
-
not have to honor them — a webview doesn't scale text on its own — but
|
|
126
|
-
a design that wants to should use `rem` for type and scale the root
|
|
127
|
-
with the reported value, clamped to the range the layout survives
|
|
128
|
-
(0.85–1.3 is a safe band).
|
|
129
|
-
- Whatever the strategy, the pinned CTA keeps its height and the legal
|
|
130
|
-
text stays legible; if anything gives, it is the hero.
|
|
131
|
-
|
|
132
|
-
## Locales are a responsive axis
|
|
133
|
-
|
|
134
|
-
German and Finnish run 30% longer than English; Japanese runs shorter
|
|
135
|
-
but taller. The studio's locale switch is part of the size matrix:
|
|
136
|
-
|
|
137
|
-
- Buttons wrap to two lines rather than clip; set `min-height`, not
|
|
138
|
-
`height`, on every button.
|
|
139
|
-
- Plan cards with a price and a period per line need the longest
|
|
140
|
-
formatted price (`$1,299.99/year`) checked, not `$9.99`.
|
|
141
|
-
- Never `text-overflow: ellipsis` on a price, a CTA label or a legal
|
|
142
|
-
line.
|
|
143
|
-
|
|
144
|
-
## The verification matrix
|
|
145
|
-
|
|
146
|
-
Before hand-off, in the studio, walk every cell. Each takes seconds; a
|
|
147
|
-
device bug found after promote takes a release.
|
|
148
|
-
|
|
149
|
-
| | iPhone SE | 320 wide | Island phone | Pixel / Galaxy | iPad | Landscape\* | Desktop\*\* |
|
|
150
|
-
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
151
|
-
| Light | | | | | | | |
|
|
152
|
-
| Dark | | | | | | | |
|
|
153
|
-
| Longest locale | | | | | | | |
|
|
154
|
-
| Configured presentation | | | | | | | |
|
|
155
|
-
| Trial toggle (if any) | | | | | | | |
|
|
156
|
-
|
|
157
|
-
\* where the app allows rotation · \*\* web platforms only
|
|
158
|
-
|
|
159
|
-
What to look at in each cell: the close/back control against the bar and
|
|
160
|
-
cutout, the CTA against the bottom edge, horizontal overflow, the last
|
|
161
|
-
content row scrolling clear of the footer, and the unpriced state if the
|
|
162
|
-
products aren't resolving.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|