@contentful/experience-design-system-cli 2.36.2-dev-build-4fe2ee93.0 → 2.36.2-dev-build-4bcc1e36.0
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/dist/app.js +209 -182
- package/dist/index.js +221 -193
- package/dist/package.json +1 -1
- package/dist/src/tui/control-hints.d.ts +7 -0
- package/dist/src/tui/debug-store.d.ts +0 -1
- package/legacy/package.json +1 -1
- package/package.json +2 -2
- package/dist/src/tui/help/help-info.d.ts +0 -9
package/dist/app.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// packages/experience-design-system-cli/app.tsx
|
|
2
|
-
import { useEffect as useEffect8, useState as
|
|
2
|
+
import { useEffect as useEffect8, useState as useState10 } from "react";
|
|
3
3
|
|
|
4
4
|
// packages/experience-design-system-cli/src/tui/home/home.tsx
|
|
5
5
|
import { useEffect as useEffect2, useState as useState2 } from "react";
|
|
6
|
-
import { Box, Text, useApp, useInput } from "ink";
|
|
6
|
+
import { Box, Text as Text2, useApp, useInput } from "ink";
|
|
7
7
|
|
|
8
8
|
// packages/experience-design-system-cli/src/tui/home/home.theme.ts
|
|
9
9
|
var BRAND = {
|
|
@@ -117,8 +117,15 @@ function useTerminalWidth() {
|
|
|
117
117
|
return columns;
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
+
// packages/experience-design-system-cli/src/tui/control-hints.tsx
|
|
121
|
+
import { Text } from "ink";
|
|
122
|
+
import { jsx } from "react/jsx-runtime";
|
|
123
|
+
function ControlHints({ hints }) {
|
|
124
|
+
return /* @__PURE__ */ jsx(Text, { color: PALETTE.muted, children: hints.map((hint) => `${hint.keys} ${hint.label}`).join(" \xB7 ") });
|
|
125
|
+
}
|
|
126
|
+
|
|
120
127
|
// packages/experience-design-system-cli/src/tui/home/home.tsx
|
|
121
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
128
|
+
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
122
129
|
var VERSION = readPackageVersion();
|
|
123
130
|
var HEADING = "Contentful Experiences";
|
|
124
131
|
var SUBTITLE = "Let's import your design system into Contentful";
|
|
@@ -171,27 +178,27 @@ function HomeScreen({ onNavigate }) {
|
|
|
171
178
|
});
|
|
172
179
|
if (tooNarrow) {
|
|
173
180
|
return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
174
|
-
/* @__PURE__ */
|
|
175
|
-
/* @__PURE__ */
|
|
181
|
+
/* @__PURE__ */ jsx2(Text2, { bold: true, color: PALETTE.warning, children: "Terminal too small" }),
|
|
182
|
+
/* @__PURE__ */ jsx2(Text2, { color: PALETTE.muted, children: "Press q to quit, make your terminal full screen, then run experiences import again." })
|
|
176
183
|
] });
|
|
177
184
|
}
|
|
178
185
|
return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
179
186
|
/* @__PURE__ */ jsxs(Box, { flexDirection: "column", alignItems: "center", children: [
|
|
180
|
-
/* @__PURE__ */
|
|
181
|
-
/* @__PURE__ */
|
|
182
|
-
/* @__PURE__ */
|
|
183
|
-
/* @__PURE__ */ jsxs(
|
|
187
|
+
/* @__PURE__ */ jsx2(Text2, { bold: true, color: PALETTE.heading, children: HEADING }),
|
|
188
|
+
/* @__PURE__ */ jsx2(Text2, { children: brandBar(HEADING.length).map((segment, i) => /* @__PURE__ */ jsx2(Text2, { color: segment.color, children: segment.text }, i)) }),
|
|
189
|
+
/* @__PURE__ */ jsx2(Text2, { color: PALETTE.muted, children: SUBTITLE }),
|
|
190
|
+
/* @__PURE__ */ jsxs(Text2, { color: PALETTE.muted, children: [
|
|
184
191
|
"v",
|
|
185
192
|
VERSION
|
|
186
193
|
] })
|
|
187
194
|
] }),
|
|
188
|
-
/* @__PURE__ */
|
|
195
|
+
/* @__PURE__ */ jsx2(Box, { marginTop: 1, justifyContent: "center", children: /* @__PURE__ */ jsx2(Box, { flexDirection: "column", children: START_ITEMS.map((item, i) => {
|
|
189
196
|
const focused = i === focusIdx;
|
|
190
197
|
const isUpgradeItem = item.screen === "upgrade";
|
|
191
198
|
const display = isUpgradeItem ? upgradeItemDisplay(upgradeCheck) : { label: item.label };
|
|
192
199
|
const dimmed = isUpgradeItem && upgradeDisabled;
|
|
193
200
|
return /* @__PURE__ */ jsxs(
|
|
194
|
-
|
|
201
|
+
Text2,
|
|
195
202
|
{
|
|
196
203
|
bold: focused && !dimmed,
|
|
197
204
|
dimColor: dimmed,
|
|
@@ -204,13 +211,22 @@ function HomeScreen({ onNavigate }) {
|
|
|
204
211
|
item.label
|
|
205
212
|
);
|
|
206
213
|
}) }) }),
|
|
207
|
-
/* @__PURE__ */
|
|
214
|
+
/* @__PURE__ */ jsx2(Box, { marginTop: 1, justifyContent: "center", children: /* @__PURE__ */ jsx2(
|
|
215
|
+
ControlHints,
|
|
216
|
+
{
|
|
217
|
+
hints: [
|
|
218
|
+
{ keys: "\u2191/\u2193", label: "move" },
|
|
219
|
+
{ keys: "\u23CE", label: "select" },
|
|
220
|
+
{ keys: "q", label: "quit" }
|
|
221
|
+
]
|
|
222
|
+
}
|
|
223
|
+
) })
|
|
208
224
|
] });
|
|
209
225
|
}
|
|
210
226
|
|
|
211
227
|
// packages/experience-design-system-cli/src/tui/import/PageContainer.tsx
|
|
212
|
-
import { Box as Box2, Text as
|
|
213
|
-
import { jsx as
|
|
228
|
+
import { Box as Box2, Text as Text3, useInput as useInput2 } from "ink";
|
|
229
|
+
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
214
230
|
function ImportScreen({ exitCode, onDone }) {
|
|
215
231
|
useInput2((input, key) => {
|
|
216
232
|
if (key.return || key.escape || input === "q") {
|
|
@@ -219,20 +235,20 @@ function ImportScreen({ exitCode, onDone }) {
|
|
|
219
235
|
});
|
|
220
236
|
const isSuccess = exitCode === 0;
|
|
221
237
|
return /* @__PURE__ */ jsxs2(Box2, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
222
|
-
/* @__PURE__ */
|
|
223
|
-
/* @__PURE__ */
|
|
224
|
-
isSuccess ? /* @__PURE__ */
|
|
238
|
+
/* @__PURE__ */ jsx3(Text3, { bold: true, children: "Import" }),
|
|
239
|
+
/* @__PURE__ */ jsx3(Text3, { children: " " }),
|
|
240
|
+
isSuccess ? /* @__PURE__ */ jsx3(Text3, { color: PALETTE.success, children: "\u2713 Import complete" }) : /* @__PURE__ */ jsxs2(Text3, { color: PALETTE.error, children: [
|
|
225
241
|
"\u2717 Import failed: process exited with code ",
|
|
226
242
|
exitCode ?? "unknown"
|
|
227
243
|
] }),
|
|
228
|
-
/* @__PURE__ */
|
|
229
|
-
/* @__PURE__ */
|
|
244
|
+
/* @__PURE__ */ jsx3(Text3, { children: " " }),
|
|
245
|
+
/* @__PURE__ */ jsx3(Text3, { dimColor: true, children: "[Enter] Back to Start" })
|
|
230
246
|
] });
|
|
231
247
|
}
|
|
232
248
|
|
|
233
249
|
// packages/experience-design-system-cli/src/tui/import/steps/01-welcome/screen.tsx
|
|
234
250
|
import { useState as useState3 } from "react";
|
|
235
|
-
import { Box as Box3, Text as
|
|
251
|
+
import { Box as Box3, Text as Text4 } from "ink";
|
|
236
252
|
import TextInput from "ink-text-input";
|
|
237
253
|
|
|
238
254
|
// packages/experience-design-system-cli/src/tui/import/steps/01-welcome/controls.ts
|
|
@@ -260,7 +276,7 @@ function useWelcomeControls(projectPath, onQuit) {
|
|
|
260
276
|
}
|
|
261
277
|
|
|
262
278
|
// packages/experience-design-system-cli/src/tui/import/steps/01-welcome/screen.tsx
|
|
263
|
-
import { jsx as
|
|
279
|
+
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
264
280
|
var RULE = "\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500";
|
|
265
281
|
var OVERVIEW = [
|
|
266
282
|
{ label: "Step 1", description: "Extract components from your codebase" },
|
|
@@ -277,25 +293,25 @@ function WelcomeScreen({ onContinue, onQuit, initialPath = "" }) {
|
|
|
277
293
|
if (path) onContinue(path);
|
|
278
294
|
};
|
|
279
295
|
return /* @__PURE__ */ jsxs3(Box3, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 1, children: [
|
|
280
|
-
/* @__PURE__ */
|
|
281
|
-
/* @__PURE__ */
|
|
296
|
+
/* @__PURE__ */ jsx4(Text4, { bold: true, color: PALETTE.success, children: "\u{1F44B} Hey! Let's import your design system into Contentful." }),
|
|
297
|
+
/* @__PURE__ */ jsx4(Text4, { dimColor: true, children: "I'll walk you through 5 steps to get your components into Contentful ExO." }),
|
|
282
298
|
/* @__PURE__ */ jsxs3(Box3, { flexDirection: "column", marginTop: 1, children: [
|
|
283
|
-
/* @__PURE__ */
|
|
299
|
+
/* @__PURE__ */ jsx4(Text4, { dimColor: true, children: RULE }),
|
|
284
300
|
OVERVIEW.map((item) => /* @__PURE__ */ jsxs3(Box3, { gap: 1, children: [
|
|
285
|
-
/* @__PURE__ */
|
|
286
|
-
/* @__PURE__ */
|
|
301
|
+
/* @__PURE__ */ jsx4(Text4, { bold: true, children: item.label }),
|
|
302
|
+
/* @__PURE__ */ jsx4(Text4, { dimColor: true, children: item.description })
|
|
287
303
|
] }, item.label)),
|
|
288
|
-
/* @__PURE__ */
|
|
304
|
+
/* @__PURE__ */ jsx4(Text4, { dimColor: true, children: RULE })
|
|
289
305
|
] }),
|
|
290
306
|
/* @__PURE__ */ jsxs3(Box3, { flexDirection: "column", marginTop: 1, children: [
|
|
291
|
-
/* @__PURE__ */
|
|
307
|
+
/* @__PURE__ */ jsx4(Text4, { children: "Where is your component library?" }),
|
|
292
308
|
/* @__PURE__ */ jsxs3(Box3, { gap: 1, children: [
|
|
293
|
-
/* @__PURE__ */
|
|
294
|
-
/* @__PURE__ */
|
|
295
|
-
/* @__PURE__ */
|
|
309
|
+
/* @__PURE__ */ jsx4(Text4, { color: PALETTE.accent, children: "?" }),
|
|
310
|
+
/* @__PURE__ */ jsx4(Text4, { children: "Project path:" }),
|
|
311
|
+
/* @__PURE__ */ jsx4(TextInput, { value: projectPath, onChange: setProjectPath, onSubmit: submit })
|
|
296
312
|
] })
|
|
297
313
|
] }),
|
|
298
|
-
/* @__PURE__ */
|
|
314
|
+
/* @__PURE__ */ jsx4(Box3, { marginTop: 1, gap: 3, children: WELCOME_CONTROLS.map((control) => /* @__PURE__ */ jsxs3(Text4, { dimColor: true, children: [
|
|
299
315
|
"[",
|
|
300
316
|
control.keys,
|
|
301
317
|
"] ",
|
|
@@ -306,7 +322,7 @@ function WelcomeScreen({ onContinue, onQuit, initialPath = "" }) {
|
|
|
306
322
|
|
|
307
323
|
// packages/experience-design-system-cli/src/tui/import/steps/02-token-input/screen.tsx
|
|
308
324
|
import { useState as useState4 } from "react";
|
|
309
|
-
import { Box as Box4, Text as
|
|
325
|
+
import { Box as Box4, Text as Text5 } from "ink";
|
|
310
326
|
import TextInput2 from "ink-text-input";
|
|
311
327
|
|
|
312
328
|
// packages/experience-design-system-cli/src/tui/import/steps/02-token-input/controls.ts
|
|
@@ -373,7 +389,7 @@ function validateTokenPath(rawPath) {
|
|
|
373
389
|
}
|
|
374
390
|
|
|
375
391
|
// packages/experience-design-system-cli/src/tui/import/steps/02-token-input/screen.tsx
|
|
376
|
-
import { jsx as
|
|
392
|
+
import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
377
393
|
function TokenInputScreen({
|
|
378
394
|
onConfirm,
|
|
379
395
|
onSkip,
|
|
@@ -398,26 +414,26 @@ function TokenInputScreen({
|
|
|
398
414
|
else setFailure({ error: check.error, resolvedPath: check.resolvedPath });
|
|
399
415
|
};
|
|
400
416
|
return /* @__PURE__ */ jsxs4(Box4, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 1, children: [
|
|
401
|
-
/* @__PURE__ */
|
|
402
|
-
/* @__PURE__ */
|
|
417
|
+
/* @__PURE__ */ jsx5(Text5, { bold: true, children: "Design tokens" }),
|
|
418
|
+
/* @__PURE__ */ jsx5(Text5, { dimColor: true, children: "Point me to your raw token file (e.g. ~/design-tokens/tokens.json). You can use ~, relative, or absolute paths. Claude will map it to DTCG format." }),
|
|
403
419
|
/* @__PURE__ */ jsxs4(Box4, { flexDirection: "column", marginTop: 1, children: [
|
|
404
420
|
/* @__PURE__ */ jsxs4(Box4, { gap: 1, children: [
|
|
405
|
-
/* @__PURE__ */
|
|
406
|
-
/* @__PURE__ */
|
|
407
|
-
/* @__PURE__ */
|
|
421
|
+
/* @__PURE__ */ jsx5(Text5, { color: PALETTE.accent, children: "?" }),
|
|
422
|
+
/* @__PURE__ */ jsx5(Text5, { children: "Token path:" }),
|
|
423
|
+
/* @__PURE__ */ jsx5(TextInput2, { value: tokenPath, onChange: change, onSubmit: submit })
|
|
408
424
|
] }),
|
|
409
425
|
failure && /* @__PURE__ */ jsxs4(Box4, { flexDirection: "column", children: [
|
|
410
|
-
/* @__PURE__ */ jsxs4(
|
|
426
|
+
/* @__PURE__ */ jsxs4(Text5, { color: PALETTE.error, children: [
|
|
411
427
|
"\u2717 ",
|
|
412
428
|
failure.error
|
|
413
429
|
] }),
|
|
414
|
-
/* @__PURE__ */ jsxs4(
|
|
430
|
+
/* @__PURE__ */ jsxs4(Text5, { dimColor: true, children: [
|
|
415
431
|
" Resolved to: ",
|
|
416
432
|
failure.resolvedPath
|
|
417
433
|
] })
|
|
418
434
|
] })
|
|
419
435
|
] }),
|
|
420
|
-
/* @__PURE__ */
|
|
436
|
+
/* @__PURE__ */ jsx5(Box4, { marginTop: 1, gap: 3, children: TOKEN_INPUT_CONTROLS.map((control) => /* @__PURE__ */ jsxs4(Text5, { dimColor: true, children: [
|
|
421
437
|
"[",
|
|
422
438
|
control.keys,
|
|
423
439
|
"] ",
|
|
@@ -493,8 +509,8 @@ function startReadingTerminal() {
|
|
|
493
509
|
}
|
|
494
510
|
|
|
495
511
|
// packages/experience-design-system-cli/src/tui/help/PageContainer.tsx
|
|
496
|
-
import { useEffect as useEffect3
|
|
497
|
-
import { Box as Box5, Text as
|
|
512
|
+
import { useEffect as useEffect3 } from "react";
|
|
513
|
+
import { Box as Box5, Text as Text6, useInput as useInput5 } from "ink";
|
|
498
514
|
|
|
499
515
|
// packages/experience-design-system-cli/src/tui/debug-store.ts
|
|
500
516
|
import { mkdir as mkdir2, writeFile as writeFile2 } from "node:fs/promises";
|
|
@@ -571,9 +587,6 @@ var SESSION_ID = generateSessionId();
|
|
|
571
587
|
function sessionDebugDir() {
|
|
572
588
|
return join5(debugSessionsDir(), SESSION_ID);
|
|
573
589
|
}
|
|
574
|
-
function currentDebugSessionDir() {
|
|
575
|
-
return sessionDebugDir();
|
|
576
|
-
}
|
|
577
590
|
void isDebugModeEnabled().then((enabled) => {
|
|
578
591
|
if (!enabled) return void 0;
|
|
579
592
|
return mkdir2(sessionDebugDir(), { recursive: true });
|
|
@@ -681,44 +694,11 @@ process.once("SIGINT", () => {
|
|
|
681
694
|
});
|
|
682
695
|
});
|
|
683
696
|
|
|
684
|
-
// packages/experience-design-system-cli/src/tui/help/help-info.ts
|
|
685
|
-
async function readHelpInfo() {
|
|
686
|
-
const debugMode = await readDebugModeSetting();
|
|
687
|
-
return {
|
|
688
|
-
storage: [
|
|
689
|
-
{ label: "Config folder", value: configRoot() },
|
|
690
|
-
{ label: "Settings file", value: configFilePath() },
|
|
691
|
-
{ label: "Debug logs", value: debugSessionsDir() }
|
|
692
|
-
],
|
|
693
|
-
troubleshooting: [
|
|
694
|
-
{ label: "CLI version", value: readPackageVersion() },
|
|
695
|
-
{ label: "Node", value: process.version },
|
|
696
|
-
{ label: "Platform", value: `${process.platform} ${process.arch}` },
|
|
697
|
-
{ label: "Debug Mode", value: debugMode.enabled ? "on" : "off" },
|
|
698
|
-
{
|
|
699
|
-
label: "This session",
|
|
700
|
-
value: debugMode.enabled ? currentDebugSessionDir() : "no logs written while Debug Mode is off"
|
|
701
|
-
}
|
|
702
|
-
]
|
|
703
|
-
};
|
|
704
|
-
}
|
|
705
|
-
|
|
706
697
|
// packages/experience-design-system-cli/src/tui/help/PageContainer.tsx
|
|
707
|
-
import {
|
|
708
|
-
function Section({ title, rows }) {
|
|
709
|
-
return /* @__PURE__ */ jsxs5(Box5, { flexDirection: "column", children: [
|
|
710
|
-
/* @__PURE__ */ jsx5(Text5, { bold: true, color: PALETTE.accent, children: title }),
|
|
711
|
-
rows.map((row) => /* @__PURE__ */ jsxs5(Box5, { gap: 1, children: [
|
|
712
|
-
/* @__PURE__ */ jsx5(Box5, { width: 14, flexShrink: 0, children: /* @__PURE__ */ jsx5(Text5, { dimColor: true, children: row.label }) }),
|
|
713
|
-
/* @__PURE__ */ jsx5(Text5, { children: row.value })
|
|
714
|
-
] }, row.label))
|
|
715
|
-
] });
|
|
716
|
-
}
|
|
698
|
+
import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
717
699
|
function HelpScreen({ onDone }) {
|
|
718
|
-
const [info, setInfo] = useState5();
|
|
719
700
|
useEffect3(() => {
|
|
720
701
|
startDebugRun({ flow: "help", step: "01-help", menuOption: "Help", inputs: {} });
|
|
721
|
-
void readHelpInfo().then(setInfo);
|
|
722
702
|
}, []);
|
|
723
703
|
const leave = (exitMethod) => {
|
|
724
704
|
void finishDebugRun({ outputs: {}, status: "success", exitMethod });
|
|
@@ -734,26 +714,32 @@ function HelpScreen({ onDone }) {
|
|
|
734
714
|
return;
|
|
735
715
|
}
|
|
736
716
|
});
|
|
737
|
-
return /* @__PURE__ */ jsxs5(Box5, { flexDirection: "column", paddingX: 2, paddingY: 1,
|
|
738
|
-
/* @__PURE__ */
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
717
|
+
return /* @__PURE__ */ jsxs5(Box5, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
718
|
+
/* @__PURE__ */ jsx6(Text6, { bold: true, children: "Help" }),
|
|
719
|
+
/* @__PURE__ */ jsx6(Text6, { children: " " }),
|
|
720
|
+
/* @__PURE__ */ jsx6(Text6, { children: "This is a placeholder screen for v2 help content." }),
|
|
721
|
+
/* @__PURE__ */ jsx6(Text6, { children: " " }),
|
|
722
|
+
/* @__PURE__ */ jsx6(
|
|
723
|
+
ControlHints,
|
|
724
|
+
{
|
|
725
|
+
hints: [
|
|
726
|
+
{ keys: "\u23CE", label: "done" },
|
|
727
|
+
{ keys: "Esc/q", label: "back to start" }
|
|
728
|
+
]
|
|
729
|
+
}
|
|
730
|
+
)
|
|
745
731
|
] });
|
|
746
732
|
}
|
|
747
733
|
|
|
748
734
|
// packages/experience-design-system-cli/src/tui/settings/PageContainer.tsx
|
|
749
|
-
import { useState as
|
|
750
|
-
import { Box as Box6, Text as
|
|
751
|
-
import { jsx as
|
|
735
|
+
import { useState as useState5 } from "react";
|
|
736
|
+
import { Box as Box6, Text as Text7, useInput as useInput6 } from "ink";
|
|
737
|
+
import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
752
738
|
function SettingsScreen({
|
|
753
739
|
onNavigate,
|
|
754
740
|
onBack
|
|
755
741
|
}) {
|
|
756
|
-
const [focusIdx, setFocusIdx] =
|
|
742
|
+
const [focusIdx, setFocusIdx] = useState5(0);
|
|
757
743
|
const items = [
|
|
758
744
|
{ label: "Configuration", screen: "settings-configuration" },
|
|
759
745
|
{ label: "Opt-in Analytics", screen: "settings-opt-in-analytics" },
|
|
@@ -780,20 +766,29 @@ function SettingsScreen({
|
|
|
780
766
|
}
|
|
781
767
|
});
|
|
782
768
|
return /* @__PURE__ */ jsxs6(Box6, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
783
|
-
/* @__PURE__ */
|
|
784
|
-
/* @__PURE__ */
|
|
785
|
-
items.map((item, i) => /* @__PURE__ */ jsxs6(
|
|
769
|
+
/* @__PURE__ */ jsx7(Text7, { bold: true, children: "Settings" }),
|
|
770
|
+
/* @__PURE__ */ jsx7(Text7, { children: " " }),
|
|
771
|
+
items.map((item, i) => /* @__PURE__ */ jsxs6(Text7, { color: i === focusIdx ? "cyan" : void 0, children: [
|
|
786
772
|
i === focusIdx ? "> " : " ",
|
|
787
773
|
item.label
|
|
788
774
|
] }, item.label)),
|
|
789
|
-
/* @__PURE__ */
|
|
790
|
-
/* @__PURE__ */
|
|
775
|
+
/* @__PURE__ */ jsx7(Text7, { children: " " }),
|
|
776
|
+
/* @__PURE__ */ jsx7(
|
|
777
|
+
ControlHints,
|
|
778
|
+
{
|
|
779
|
+
hints: [
|
|
780
|
+
{ keys: "\u2191/\u2193", label: "move" },
|
|
781
|
+
{ keys: "\u23CE", label: "select" },
|
|
782
|
+
{ keys: "Esc/q", label: "back" }
|
|
783
|
+
]
|
|
784
|
+
}
|
|
785
|
+
)
|
|
791
786
|
] });
|
|
792
787
|
}
|
|
793
788
|
|
|
794
789
|
// packages/experience-design-system-cli/src/tui/settings/contentful-configuration/ContentfulConfigScreen.tsx
|
|
795
|
-
import { useEffect as useEffect4, useState as
|
|
796
|
-
import { Box as Box7, Text as
|
|
790
|
+
import { useEffect as useEffect4, useState as useState6 } from "react";
|
|
791
|
+
import { Box as Box7, Text as Text8, useInput as useInput7 } from "ink";
|
|
797
792
|
import TextInput3 from "ink-text-input";
|
|
798
793
|
|
|
799
794
|
// packages/experience-design-system-cli/src/tui/settings/utils/v1-store.ts
|
|
@@ -825,7 +820,7 @@ async function writeCredentials(config) {
|
|
|
825
820
|
}
|
|
826
821
|
|
|
827
822
|
// packages/experience-design-system-cli/src/tui/settings/contentful-configuration/ContentfulConfigScreen.tsx
|
|
828
|
-
import { Fragment
|
|
823
|
+
import { Fragment, jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
829
824
|
var FIELD_ORDER = [
|
|
830
825
|
"spaceId",
|
|
831
826
|
"environmentId",
|
|
@@ -853,13 +848,13 @@ var FIELD_LABELS = {
|
|
|
853
848
|
defaultTokenFile: "Default token file (optional)"
|
|
854
849
|
};
|
|
855
850
|
function ConfigurationScreen({ onDone }) {
|
|
856
|
-
const [stage, setStage] =
|
|
857
|
-
const [config, setConfig] =
|
|
858
|
-
const [activeField, setActiveField] =
|
|
859
|
-
const [notice, setNotice] =
|
|
860
|
-
const [lastSaved, setLastSaved] =
|
|
861
|
-
const [editing, setEditing] =
|
|
862
|
-
const [valueBeforeEdit, setValueBeforeEdit] =
|
|
851
|
+
const [stage, setStage] = useState6("loading");
|
|
852
|
+
const [config, setConfig] = useState6(null);
|
|
853
|
+
const [activeField, setActiveField] = useState6("spaceId");
|
|
854
|
+
const [notice, setNotice] = useState6(null);
|
|
855
|
+
const [lastSaved, setLastSaved] = useState6(null);
|
|
856
|
+
const [editing, setEditing] = useState6(false);
|
|
857
|
+
const [valueBeforeEdit, setValueBeforeEdit] = useState6("");
|
|
863
858
|
useEffect4(() => {
|
|
864
859
|
readCredentials().then((cfg) => {
|
|
865
860
|
setConfig(cfg);
|
|
@@ -938,25 +933,25 @@ function ConfigurationScreen({ onDone }) {
|
|
|
938
933
|
});
|
|
939
934
|
if (stage === "loading") {
|
|
940
935
|
return /* @__PURE__ */ jsxs7(Box7, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
941
|
-
/* @__PURE__ */
|
|
942
|
-
/* @__PURE__ */
|
|
943
|
-
/* @__PURE__ */
|
|
936
|
+
/* @__PURE__ */ jsx8(Text8, { bold: true, children: "Configuration" }),
|
|
937
|
+
/* @__PURE__ */ jsx8(Text8, { children: " " }),
|
|
938
|
+
/* @__PURE__ */ jsx8(Text8, { color: PALETTE.accent, children: "Loading..." })
|
|
944
939
|
] });
|
|
945
940
|
}
|
|
946
941
|
return /* @__PURE__ */ jsxs7(Box7, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
947
|
-
/* @__PURE__ */
|
|
948
|
-
/* @__PURE__ */
|
|
949
|
-
/* @__PURE__ */
|
|
942
|
+
/* @__PURE__ */ jsx8(Text8, { bold: true, children: "Configuration" }),
|
|
943
|
+
/* @__PURE__ */ jsx8(Text8, { children: " " }),
|
|
944
|
+
/* @__PURE__ */ jsx8(Box7, { flexDirection: "column", children: FIELD_ORDER.map((field) => {
|
|
950
945
|
const isActive = activeField === field;
|
|
951
946
|
const value = fieldValue(field);
|
|
952
947
|
const display = field === "cmaToken" ? "\u2022".repeat(value.length) : value;
|
|
953
948
|
return /* @__PURE__ */ jsxs7(Box7, { gap: 1, children: [
|
|
954
|
-
/* @__PURE__ */
|
|
955
|
-
/* @__PURE__ */ jsxs7(
|
|
949
|
+
/* @__PURE__ */ jsx8(Text8, { color: isActive ? PALETTE.accent : void 0, children: isActive ? "\u276F" : " " }),
|
|
950
|
+
/* @__PURE__ */ jsxs7(Text8, { bold: isActive, children: [
|
|
956
951
|
FIELD_LABELS[field],
|
|
957
952
|
":"
|
|
958
953
|
] }),
|
|
959
|
-
isActive && editing ? /* @__PURE__ */
|
|
954
|
+
isActive && editing ? /* @__PURE__ */ jsx8(
|
|
960
955
|
TextInput3,
|
|
961
956
|
{
|
|
962
957
|
value,
|
|
@@ -964,25 +959,41 @@ function ConfigurationScreen({ onDone }) {
|
|
|
964
959
|
onSubmit: () => setEditing(false),
|
|
965
960
|
mask: field === "cmaToken" ? "\u2022" : void 0
|
|
966
961
|
}
|
|
967
|
-
) : /* @__PURE__ */
|
|
962
|
+
) : /* @__PURE__ */ jsx8(Text8, { children: display || /* @__PURE__ */ jsx8(Text8, { dimColor: true, children: "(empty)" }) })
|
|
968
963
|
] }, field);
|
|
969
964
|
}) }),
|
|
970
|
-
notice && /* @__PURE__ */ jsxs7(
|
|
971
|
-
/* @__PURE__ */
|
|
972
|
-
/* @__PURE__ */ jsxs7(
|
|
965
|
+
notice && /* @__PURE__ */ jsxs7(Fragment, { children: [
|
|
966
|
+
/* @__PURE__ */ jsx8(Text8, { children: " " }),
|
|
967
|
+
/* @__PURE__ */ jsxs7(Text8, { color: notice.kind === "success" ? PALETTE.success : PALETTE.error, children: [
|
|
973
968
|
notice.kind === "success" ? "\u2713" : "\u2717",
|
|
974
969
|
" ",
|
|
975
970
|
notice.text
|
|
976
971
|
] })
|
|
977
972
|
] }),
|
|
978
|
-
/* @__PURE__ */
|
|
979
|
-
/* @__PURE__ */
|
|
973
|
+
/* @__PURE__ */ jsx8(Text8, { children: " " }),
|
|
974
|
+
/* @__PURE__ */ jsx8(
|
|
975
|
+
ControlHints,
|
|
976
|
+
{
|
|
977
|
+
hints: editing ? [
|
|
978
|
+
{ keys: "type", label: "edit" },
|
|
979
|
+
{ keys: "\u2190/\u2192", label: "move cursor" },
|
|
980
|
+
{ keys: "\u23CE", label: "done" },
|
|
981
|
+
{ keys: "Esc", label: "cancel edit" }
|
|
982
|
+
] : [
|
|
983
|
+
{ keys: "\u2191/\u2193", label: "move" },
|
|
984
|
+
{ keys: "\u23CE", label: "edit" },
|
|
985
|
+
{ keys: "c", label: "clear" },
|
|
986
|
+
{ keys: "s", label: "save" },
|
|
987
|
+
{ keys: "Esc/q", label: "quit without saving" }
|
|
988
|
+
]
|
|
989
|
+
}
|
|
990
|
+
)
|
|
980
991
|
] });
|
|
981
992
|
}
|
|
982
993
|
|
|
983
994
|
// packages/experience-design-system-cli/src/tui/settings/opt-in-analytics/screen.tsx
|
|
984
|
-
import { useEffect as useEffect5, useState as
|
|
985
|
-
import { Box as Box8, Text as
|
|
995
|
+
import { useEffect as useEffect5, useState as useState7 } from "react";
|
|
996
|
+
import { Box as Box8, Text as Text9, useInput as useInput8 } from "ink";
|
|
986
997
|
|
|
987
998
|
// packages/experience-design-system-cli/src/tui/settings/opt-in-analytics/analytics-store.ts
|
|
988
999
|
async function readAnalyticsSetting() {
|
|
@@ -1000,10 +1011,10 @@ async function writeAnalyticsSetting(setting) {
|
|
|
1000
1011
|
}
|
|
1001
1012
|
|
|
1002
1013
|
// packages/experience-design-system-cli/src/tui/settings/opt-in-analytics/screen.tsx
|
|
1003
|
-
import { Fragment as
|
|
1014
|
+
import { Fragment as Fragment2, jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1004
1015
|
function OptInAnalyticsScreen({ onDone }) {
|
|
1005
|
-
const [loading, setLoading] =
|
|
1006
|
-
const [enabled, setEnabled] =
|
|
1016
|
+
const [loading, setLoading] = useState7(true);
|
|
1017
|
+
const [enabled, setEnabled] = useState7(true);
|
|
1007
1018
|
useEffect5(() => {
|
|
1008
1019
|
readAnalyticsSetting().then((setting) => {
|
|
1009
1020
|
setEnabled(setting.enabled);
|
|
@@ -1032,30 +1043,38 @@ function OptInAnalyticsScreen({ onDone }) {
|
|
|
1032
1043
|
}
|
|
1033
1044
|
});
|
|
1034
1045
|
return /* @__PURE__ */ jsxs8(Box8, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
1035
|
-
/* @__PURE__ */
|
|
1036
|
-
/* @__PURE__ */
|
|
1037
|
-
loading ? /* @__PURE__ */
|
|
1038
|
-
/* @__PURE__ */ jsxs8(
|
|
1046
|
+
/* @__PURE__ */ jsx9(Text9, { bold: true, children: "Settings \u203A Opt-in Analytics" }),
|
|
1047
|
+
/* @__PURE__ */ jsx9(Text9, { children: " " }),
|
|
1048
|
+
loading ? /* @__PURE__ */ jsx9(Text9, { color: PALETTE.muted, children: "Loading\u2026" }) : /* @__PURE__ */ jsxs8(Fragment2, { children: [
|
|
1049
|
+
/* @__PURE__ */ jsxs8(Text9, { children: [
|
|
1039
1050
|
"Share anonymous usage data:",
|
|
1040
1051
|
" ",
|
|
1041
|
-
/* @__PURE__ */
|
|
1052
|
+
/* @__PURE__ */ jsx9(Text9, { bold: true, color: enabled ? PALETTE.success : PALETTE.muted, children: enabled ? "On" : "Off" })
|
|
1042
1053
|
] }),
|
|
1043
|
-
/* @__PURE__ */
|
|
1044
|
-
/* @__PURE__ */
|
|
1045
|
-
/* @__PURE__ */
|
|
1054
|
+
/* @__PURE__ */ jsx9(Text9, { children: " " }),
|
|
1055
|
+
/* @__PURE__ */ jsx9(Text9, { dimColor: true, children: "Shares which CLI commands are used and where imports succeed or fail." }),
|
|
1056
|
+
/* @__PURE__ */ jsx9(Text9, { dimColor: true, children: "Never includes source code, file paths, credentials, or authored content." })
|
|
1046
1057
|
] }),
|
|
1047
|
-
/* @__PURE__ */
|
|
1048
|
-
/* @__PURE__ */
|
|
1058
|
+
/* @__PURE__ */ jsx9(Text9, { children: " " }),
|
|
1059
|
+
/* @__PURE__ */ jsx9(
|
|
1060
|
+
ControlHints,
|
|
1061
|
+
{
|
|
1062
|
+
hints: [
|
|
1063
|
+
{ keys: "\u23CE/Space", label: "toggle" },
|
|
1064
|
+
{ keys: "Esc/q", label: "back" }
|
|
1065
|
+
]
|
|
1066
|
+
}
|
|
1067
|
+
)
|
|
1049
1068
|
] });
|
|
1050
1069
|
}
|
|
1051
1070
|
|
|
1052
1071
|
// packages/experience-design-system-cli/src/tui/upgrade/PageContainer.tsx
|
|
1053
|
-
import { useEffect as useEffect6, useState as
|
|
1054
|
-
import { Box as Box9, Text as
|
|
1055
|
-
import { jsx as
|
|
1072
|
+
import { useEffect as useEffect6, useState as useState8 } from "react";
|
|
1073
|
+
import { Box as Box9, Text as Text10, useInput as useInput9 } from "ink";
|
|
1074
|
+
import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1056
1075
|
var UPGRADE_COMMANDS = ["git pull", "pnpm install", "pnpm build"];
|
|
1057
1076
|
function UpgradeScreen({ onDone }) {
|
|
1058
|
-
const [upgradeCheck, setUpgradeCheck] =
|
|
1077
|
+
const [upgradeCheck, setUpgradeCheck] = useState8();
|
|
1059
1078
|
useEffect6(() => {
|
|
1060
1079
|
startDebugRun({
|
|
1061
1080
|
flow: "upgrade",
|
|
@@ -1077,11 +1096,11 @@ function UpgradeScreen({ onDone }) {
|
|
|
1077
1096
|
}
|
|
1078
1097
|
});
|
|
1079
1098
|
return /* @__PURE__ */ jsxs9(Box9, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
1080
|
-
/* @__PURE__ */
|
|
1081
|
-
/* @__PURE__ */
|
|
1099
|
+
/* @__PURE__ */ jsx10(Text10, { bold: true, children: "Upgrade" }),
|
|
1100
|
+
/* @__PURE__ */ jsx10(Text10, { children: " " }),
|
|
1082
1101
|
renderBody(upgradeCheck),
|
|
1083
|
-
/* @__PURE__ */
|
|
1084
|
-
/* @__PURE__ */ jsxs9(
|
|
1102
|
+
/* @__PURE__ */ jsx10(Text10, { children: " " }),
|
|
1103
|
+
/* @__PURE__ */ jsxs9(Text10, { bold: true, color: PALETTE.accent, children: [
|
|
1085
1104
|
FOCUS_MARKER,
|
|
1086
1105
|
" Go Back"
|
|
1087
1106
|
] })
|
|
@@ -1089,44 +1108,44 @@ function UpgradeScreen({ onDone }) {
|
|
|
1089
1108
|
}
|
|
1090
1109
|
function renderBody(upgradeCheck) {
|
|
1091
1110
|
if (!upgradeCheck) {
|
|
1092
|
-
return /* @__PURE__ */
|
|
1111
|
+
return /* @__PURE__ */ jsx10(Text10, { color: PALETTE.muted, children: "Checking for updates\u2026" });
|
|
1093
1112
|
}
|
|
1094
1113
|
if (upgradeCheck.status === "error") {
|
|
1095
|
-
return /* @__PURE__ */
|
|
1114
|
+
return /* @__PURE__ */ jsx10(Text10, { color: PALETTE.warning, children: "Couldn't check for updates \u2014 check your network connection and try again." });
|
|
1096
1115
|
}
|
|
1097
1116
|
if (upgradeCheck.status === "up-to-date") {
|
|
1098
|
-
return /* @__PURE__ */ jsxs9(
|
|
1117
|
+
return /* @__PURE__ */ jsxs9(Text10, { color: PALETTE.success, children: [
|
|
1099
1118
|
"You're already on the latest version (v",
|
|
1100
1119
|
upgradeCheck.current,
|
|
1101
1120
|
")."
|
|
1102
1121
|
] });
|
|
1103
1122
|
}
|
|
1104
1123
|
return /* @__PURE__ */ jsxs9(Box9, { flexDirection: "column", children: [
|
|
1105
|
-
/* @__PURE__ */ jsxs9(
|
|
1106
|
-
/* @__PURE__ */ jsxs9(
|
|
1124
|
+
/* @__PURE__ */ jsxs9(Text10, { color: PALETTE.muted, children: [
|
|
1125
|
+
/* @__PURE__ */ jsxs9(Text10, { bold: true, color: PALETTE.success, children: [
|
|
1107
1126
|
"v",
|
|
1108
1127
|
upgradeCheck.latest
|
|
1109
1128
|
] }),
|
|
1110
1129
|
" ",
|
|
1111
1130
|
"is available (you're on ",
|
|
1112
|
-
/* @__PURE__ */ jsxs9(
|
|
1131
|
+
/* @__PURE__ */ jsxs9(Text10, { bold: true, children: [
|
|
1113
1132
|
"v",
|
|
1114
1133
|
upgradeCheck.current
|
|
1115
1134
|
] }),
|
|
1116
1135
|
"). Exit this program, cd into the root of your local clone of contentful/experience-design-system-sdk-public, then run:"
|
|
1117
1136
|
] }),
|
|
1118
|
-
/* @__PURE__ */
|
|
1119
|
-
/* @__PURE__ */
|
|
1137
|
+
/* @__PURE__ */ jsx10(Text10, { children: " " }),
|
|
1138
|
+
/* @__PURE__ */ jsx10(Box9, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.border, paddingX: 1, children: UPGRADE_COMMANDS.map((cmd) => /* @__PURE__ */ jsx10(Text10, { bold: true, children: cmd }, cmd)) })
|
|
1120
1139
|
] });
|
|
1121
1140
|
}
|
|
1122
1141
|
|
|
1123
1142
|
// packages/experience-design-system-cli/src/tui/settings/debug-mode/screen.tsx
|
|
1124
|
-
import { useEffect as useEffect7, useState as
|
|
1125
|
-
import { Box as Box10, Text as
|
|
1126
|
-
import { jsx as
|
|
1143
|
+
import { useEffect as useEffect7, useState as useState9 } from "react";
|
|
1144
|
+
import { Box as Box10, Text as Text11, useInput as useInput10 } from "ink";
|
|
1145
|
+
import { jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1127
1146
|
function DebugModeScreen({ onDone }) {
|
|
1128
|
-
const [loading, setLoading] =
|
|
1129
|
-
const [enabled, setEnabled] =
|
|
1147
|
+
const [loading, setLoading] = useState9(true);
|
|
1148
|
+
const [enabled, setEnabled] = useState9(true);
|
|
1130
1149
|
useEffect7(() => {
|
|
1131
1150
|
readDebugModeSetting().then((setting) => {
|
|
1132
1151
|
setEnabled(setting.enabled);
|
|
@@ -1155,26 +1174,34 @@ function DebugModeScreen({ onDone }) {
|
|
|
1155
1174
|
}
|
|
1156
1175
|
});
|
|
1157
1176
|
return /* @__PURE__ */ jsxs10(Box10, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
1158
|
-
/* @__PURE__ */
|
|
1159
|
-
/* @__PURE__ */
|
|
1160
|
-
loading ? /* @__PURE__ */
|
|
1177
|
+
/* @__PURE__ */ jsx11(Text11, { bold: true, children: "Settings \u203A Debug Mode" }),
|
|
1178
|
+
/* @__PURE__ */ jsx11(Text11, { children: " " }),
|
|
1179
|
+
loading ? /* @__PURE__ */ jsx11(Text11, { color: PALETTE.muted, children: "Loading\u2026" }) : /* @__PURE__ */ jsxs10(Text11, { children: [
|
|
1161
1180
|
"Debug logging:",
|
|
1162
1181
|
" ",
|
|
1163
|
-
/* @__PURE__ */
|
|
1182
|
+
/* @__PURE__ */ jsx11(Text11, { bold: true, color: enabled ? PALETTE.success : PALETTE.muted, children: enabled ? "On" : "Off" })
|
|
1164
1183
|
] }),
|
|
1165
|
-
/* @__PURE__ */
|
|
1166
|
-
/* @__PURE__ */
|
|
1184
|
+
/* @__PURE__ */ jsx11(Text11, { children: " " }),
|
|
1185
|
+
/* @__PURE__ */ jsx11(
|
|
1186
|
+
ControlHints,
|
|
1187
|
+
{
|
|
1188
|
+
hints: [
|
|
1189
|
+
{ keys: "\u23CE/Space", label: "toggle" },
|
|
1190
|
+
{ keys: "Esc/q", label: "back" }
|
|
1191
|
+
]
|
|
1192
|
+
}
|
|
1193
|
+
)
|
|
1167
1194
|
] });
|
|
1168
1195
|
}
|
|
1169
1196
|
|
|
1170
1197
|
// packages/experience-design-system-cli/app.tsx
|
|
1171
|
-
import { Fragment as
|
|
1198
|
+
import { Fragment as Fragment3, jsx as jsx12 } from "react/jsx-runtime";
|
|
1172
1199
|
function App({ onLaunchImport, importExitCode }) {
|
|
1173
1200
|
const returnedFromImport = importExitCode !== void 0;
|
|
1174
|
-
const [screen, setScreen] =
|
|
1175
|
-
const [showImportResult, setShowImportResult] =
|
|
1176
|
-
const [projectPath, setProjectPath] =
|
|
1177
|
-
const [importDefaults, setImportDefaults] =
|
|
1201
|
+
const [screen, setScreen] = useState10(returnedFromImport ? "import" : "start");
|
|
1202
|
+
const [showImportResult, setShowImportResult] = useState10(returnedFromImport);
|
|
1203
|
+
const [projectPath, setProjectPath] = useState10();
|
|
1204
|
+
const [importDefaults, setImportDefaults] = useState10();
|
|
1178
1205
|
useEffect8(() => {
|
|
1179
1206
|
if (screen !== "import") {
|
|
1180
1207
|
setImportDefaults(void 0);
|
|
@@ -1197,12 +1224,12 @@ function App({ onLaunchImport, importExitCode }) {
|
|
|
1197
1224
|
};
|
|
1198
1225
|
switch (screen) {
|
|
1199
1226
|
case "import":
|
|
1200
|
-
if (showImportResult) return /* @__PURE__ */
|
|
1201
|
-
if (importDefaults === void 0) return /* @__PURE__ */
|
|
1227
|
+
if (showImportResult) return /* @__PURE__ */ jsx12(ImportScreen, { exitCode: importExitCode, onDone: finishImportResult });
|
|
1228
|
+
if (importDefaults === void 0) return /* @__PURE__ */ jsx12(Fragment3, {});
|
|
1202
1229
|
if (projectPath === void 0) {
|
|
1203
|
-
return /* @__PURE__ */
|
|
1230
|
+
return /* @__PURE__ */ jsx12(WelcomeScreen, { onContinue: setProjectPath, onQuit: leaveImport, initialPath: importDefaults.componentDir });
|
|
1204
1231
|
}
|
|
1205
|
-
return /* @__PURE__ */
|
|
1232
|
+
return /* @__PURE__ */ jsx12(
|
|
1206
1233
|
TokenInputScreen,
|
|
1207
1234
|
{
|
|
1208
1235
|
initialPath: importDefaults.tokenFile,
|
|
@@ -1212,25 +1239,25 @@ function App({ onLaunchImport, importExitCode }) {
|
|
|
1212
1239
|
}
|
|
1213
1240
|
);
|
|
1214
1241
|
case "help":
|
|
1215
|
-
return /* @__PURE__ */
|
|
1242
|
+
return /* @__PURE__ */ jsx12(HelpScreen, { onDone: goToStart });
|
|
1216
1243
|
case "upgrade":
|
|
1217
|
-
return /* @__PURE__ */
|
|
1244
|
+
return /* @__PURE__ */ jsx12(UpgradeScreen, { onDone: goToStart });
|
|
1218
1245
|
case "settings":
|
|
1219
|
-
return /* @__PURE__ */
|
|
1246
|
+
return /* @__PURE__ */ jsx12(SettingsScreen, { onNavigate: setScreen, onBack: goToStart });
|
|
1220
1247
|
case "settings-configuration":
|
|
1221
|
-
return /* @__PURE__ */
|
|
1248
|
+
return /* @__PURE__ */ jsx12(ConfigurationScreen, { onDone: goToSettings });
|
|
1222
1249
|
case "settings-opt-in-analytics":
|
|
1223
|
-
return /* @__PURE__ */
|
|
1250
|
+
return /* @__PURE__ */ jsx12(OptInAnalyticsScreen, { onDone: goToSettings });
|
|
1224
1251
|
case "settings-debug-mode":
|
|
1225
|
-
return /* @__PURE__ */
|
|
1252
|
+
return /* @__PURE__ */ jsx12(DebugModeScreen, { onDone: goToSettings });
|
|
1226
1253
|
case "start":
|
|
1227
|
-
return /* @__PURE__ */
|
|
1254
|
+
return /* @__PURE__ */ jsx12(HomeScreen, { onNavigate: setScreen });
|
|
1228
1255
|
}
|
|
1229
1256
|
}
|
|
1230
1257
|
async function renderUntilImportRequestedOrExit(renderApp, importExitCode) {
|
|
1231
1258
|
let requestedImport;
|
|
1232
1259
|
const instance = renderApp(
|
|
1233
|
-
/* @__PURE__ */
|
|
1260
|
+
/* @__PURE__ */ jsx12(
|
|
1234
1261
|
App,
|
|
1235
1262
|
{
|
|
1236
1263
|
importExitCode,
|