@marktiderman/genesis-native 0.11.0 → 0.13.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/README.md +13 -3
- package/dist/{block-Iga-mCeC.d.ts → block-BfJT3F6B.d.ts} +3 -3
- package/dist/{blocks-BQY_df3j.d.ts → blocks-DoY_Z-Lh.d.ts} +69 -7
- package/dist/{chunk-6BT4PTGH.js → chunk-6UVWYJPZ.js} +15 -5
- package/dist/chunk-6UVWYJPZ.js.map +1 -0
- package/dist/{chunk-EWHO5WQU.js → chunk-JWIBRHDE.js} +21 -9
- package/dist/chunk-JWIBRHDE.js.map +1 -0
- package/dist/{chunk-YIF4BFQH.js → chunk-JZHDEU4Q.js} +130 -13
- package/dist/chunk-JZHDEU4Q.js.map +1 -0
- package/dist/devtools.d.ts +101 -8
- package/dist/devtools.js +180 -104
- package/dist/devtools.js.map +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.js +4 -5
- package/dist/index.js.map +1 -1
- package/dist/observability.d.ts +14 -8
- package/dist/observability.js +3 -3
- package/dist/persist.d.ts +1 -1
- package/dist/push.d.ts +4 -4
- package/dist/push.js +1 -1
- package/dist/push.js.map +1 -1
- package/dist/{query--ihYsJWC.d.ts → query-DJFrykK_.d.ts} +38 -2
- package/dist/{screen-boundary-B8DlsLwb.d.ts → screen-boundary-Da3qleNz.d.ts} +5 -1
- package/dist/updates.d.ts +3 -3
- package/dist/updates.js +6 -6
- package/dist/updates.js.map +1 -1
- package/package.json +50 -8
- package/src/app.tsx +2 -1
- package/src/blocks.tsx +20 -5
- package/src/devtools/block.tsx +281 -152
- package/src/devtools/index.ts +4 -3
- package/src/devtools/settings.ts +50 -0
- package/src/devtools/slots.ts +15 -0
- package/src/errors.tsx +144 -13
- package/src/index.ts +4 -0
- package/src/observability/block.tsx +1 -1
- package/src/observability/index.ts +1 -1
- package/src/observability/scrub.ts +22 -4
- package/src/push/block.tsx +1 -1
- package/src/screen-boundary.tsx +13 -2
- package/src/updates/block.tsx +7 -5
- package/src/updates/index.ts +1 -1
- package/src/updates/signature.ts +52 -3
- package/dist/chunk-65P7RU4V.js +0 -49
- package/dist/chunk-65P7RU4V.js.map +0 -1
- package/dist/chunk-6BT4PTGH.js.map +0 -1
- package/dist/chunk-EWHO5WQU.js.map +0 -1
- package/dist/chunk-YIF4BFQH.js.map +0 -1
package/dist/devtools.js
CHANGED
|
@@ -1,18 +1,37 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import './chunk-YIF4BFQH.js';
|
|
1
|
+
import { versionSignature } from './chunk-6UVWYJPZ.js';
|
|
2
|
+
import { scrubString, useRecentActivity, scrubUrl } from './chunk-JWIBRHDE.js';
|
|
3
|
+
import { useBlocks } from './chunk-JZHDEU4Q.js';
|
|
5
4
|
import './chunk-VIC2KXMA.js';
|
|
6
5
|
import { useSession } from './chunk-NGYNYJPL.js';
|
|
7
6
|
import { useSyncExternalStore, useState, useEffect, useRef, useMemo } from 'react';
|
|
8
|
-
import {
|
|
7
|
+
import { defineSettings, settingValueProblem } from '@marktiderman/genesis-config/settings';
|
|
8
|
+
import { View, Share, Alert } from 'react-native';
|
|
9
9
|
import { useQueryClient } from '@tanstack/react-query';
|
|
10
10
|
import { renderSlot } from '@marktiderman/genesis-core/slots';
|
|
11
|
-
import { NativeText, NativeButton, NativeInput } from '@marktiderman/genesis-ui-native/components';
|
|
12
|
-
import {
|
|
13
|
-
import { defineBlock } from '@marktiderman/genesis-features/blocks';
|
|
11
|
+
import { NativeSheet, NativeSheetScrollView, Box, Stack, Inline, NativeText, NativeButton, NativeInput, NativeSectionListHeader, NativeSettingsRow } from '@marktiderman/genesis-ui-native/components';
|
|
12
|
+
import { defineBlock } from '@marktiderman/genesis-config/blocks';
|
|
14
13
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
15
14
|
|
|
15
|
+
var DEVTOOLS_SETTING_SPECS = {
|
|
16
|
+
overlay: { type: "boolean", default: true, summary: "The Development overlay in development and preview builds. Off hides it; no setting turns it on in a production build." },
|
|
17
|
+
shakeToOpen: { type: "boolean", default: true, requires: ["devtools.overlay"], summary: "Shake to open the overlay (development and preview builds)." },
|
|
18
|
+
hold: { type: "boolean", default: true, requires: ["devtools.overlay"], summary: "A three-finger hold opens the overlay." },
|
|
19
|
+
flags: { type: "boolean", default: true, requires: ["devtools.overlay"], summary: "Show the app's switches and flags in the overlay." },
|
|
20
|
+
signOut: { type: "boolean", default: true, requires: ["devtools.overlay"], summary: "Offer Sign out in the overlay." }
|
|
21
|
+
};
|
|
22
|
+
var devtoolsSettings = defineSettings("devtools", DEVTOOLS_SETTING_SPECS);
|
|
23
|
+
function devtoolsSettingValues(input) {
|
|
24
|
+
const raw = input ?? {};
|
|
25
|
+
const nested = Object.prototype.hasOwnProperty.call(raw, "values") ? raw.values : void 0;
|
|
26
|
+
const values = typeof nested === "object" && nested !== null && !Array.isArray(nested) ? nested : raw;
|
|
27
|
+
const out = {};
|
|
28
|
+
for (const def of Object.values(devtoolsSettings.keys)) {
|
|
29
|
+
const v = Object.prototype.hasOwnProperty.call(values, def.key) ? values[def.key] : void 0;
|
|
30
|
+
out[def.key.slice("devtools.".length)] = v !== void 0 && settingValueProblem(def, v) === null ? v : def.defaults.max;
|
|
31
|
+
}
|
|
32
|
+
return out;
|
|
33
|
+
}
|
|
34
|
+
|
|
16
35
|
// src/devtools/gestures.ts
|
|
17
36
|
function createHoldDetector(options) {
|
|
18
37
|
const fingers = Math.max(2, options.fingers ?? 3);
|
|
@@ -93,8 +112,23 @@ function buildDebugInfo(input) {
|
|
|
93
112
|
return lines.join("\n");
|
|
94
113
|
}
|
|
95
114
|
var DEVTOOLS_BLOCK_ID = "devtools-overlay";
|
|
96
|
-
|
|
97
|
-
|
|
115
|
+
var DEFAULT_DEVTOOLS_CHECK_LABELS = {
|
|
116
|
+
ok: "Working",
|
|
117
|
+
warn: "Needs a look",
|
|
118
|
+
fail: "Not working",
|
|
119
|
+
retry: "Try again",
|
|
120
|
+
runAll: "Run checks"
|
|
121
|
+
};
|
|
122
|
+
function createDevtools(given) {
|
|
123
|
+
const settings = devtoolsSettingValues(given.appSettings);
|
|
124
|
+
const options = {
|
|
125
|
+
...given,
|
|
126
|
+
...settings.shakeToOpen ? {} : { accelerometer: void 0 },
|
|
127
|
+
...settings.hold ? {} : { hold: false },
|
|
128
|
+
...settings.flags ? {} : { flags: void 0 },
|
|
129
|
+
...settings.signOut ? {} : { signOut: void 0 }
|
|
130
|
+
};
|
|
131
|
+
const enabled = given.enabled === true && settings.overlay;
|
|
98
132
|
let state = { open: false };
|
|
99
133
|
const listeners = /* @__PURE__ */ new Set();
|
|
100
134
|
const set = (next) => {
|
|
@@ -198,6 +232,8 @@ function createDevtools(options) {
|
|
|
198
232
|
block,
|
|
199
233
|
Feedback: slots?.devtoolsFeedback,
|
|
200
234
|
feedbackProps: slotProps?.devtoolsFeedback,
|
|
235
|
+
Diagnostics: slots?.devtoolsDiagnostics,
|
|
236
|
+
diagnosticsProps: slotProps?.devtoolsDiagnostics,
|
|
201
237
|
onCrash: () => {
|
|
202
238
|
set({ open: false });
|
|
203
239
|
setCrash(true);
|
|
@@ -221,6 +257,9 @@ function createDevtools(options) {
|
|
|
221
257
|
function NoFeedback(_props) {
|
|
222
258
|
return null;
|
|
223
259
|
}
|
|
260
|
+
function NoDiagnostics(_props) {
|
|
261
|
+
return null;
|
|
262
|
+
}
|
|
224
263
|
function useSignature(options) {
|
|
225
264
|
const updates = options.updates;
|
|
226
265
|
const [requested, setRequested] = useState(null);
|
|
@@ -235,8 +274,8 @@ function useSignature(options) {
|
|
|
235
274
|
return useMemo(() => {
|
|
236
275
|
if (!updates) return options.signature ?? null;
|
|
237
276
|
if (!requested) return updates.signature;
|
|
238
|
-
const { application, updates: modules, platform } = updates.options;
|
|
239
|
-
return versionSignature({ application, updates: modules, platform, requestedChannel: requested });
|
|
277
|
+
const { application, updates: modules, platform, buildMetadata } = updates.options;
|
|
278
|
+
return versionSignature({ application, updates: modules, platform, requestedChannel: requested, buildMetadata: buildMetadata ?? null });
|
|
240
279
|
}, [updates, requested, options.signature]);
|
|
241
280
|
}
|
|
242
281
|
var RESULT_TEXT = {
|
|
@@ -247,21 +286,65 @@ var RESULT_TEXT = {
|
|
|
247
286
|
};
|
|
248
287
|
var DISMISS_FALLBACK_MS = 800;
|
|
249
288
|
function Row({ label, value, testID }) {
|
|
250
|
-
return /* @__PURE__ */
|
|
251
|
-
/* @__PURE__ */ jsx(NativeText, { preset: "label", children: label }),
|
|
252
|
-
/* @__PURE__ */ jsx(NativeText, { preset: "body-sm", className: "text-right text-muted-foreground", style: { flex: 1 }, selectable: true, children: value })
|
|
253
|
-
] });
|
|
289
|
+
return /* @__PURE__ */ jsx(NativeSettingsRow, { label, description: value, descriptionLines: null, selectable: true, ...testID ? { testID } : {} });
|
|
254
290
|
}
|
|
255
291
|
function Section({ title, children }) {
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
/* @__PURE__ */ jsx(NativeText, { preset: "label", accessibilityRole: "header", children: title }),
|
|
292
|
+
return /* @__PURE__ */ jsxs(Stack, { gap: "xs", children: [
|
|
293
|
+
/* @__PURE__ */ jsx(NativeSectionListHeader, { title }),
|
|
259
294
|
children
|
|
260
295
|
] });
|
|
261
296
|
}
|
|
262
|
-
function
|
|
297
|
+
function HealthChecksSection({ checks, labels }) {
|
|
298
|
+
const [results, setResults] = useState(() => checks.latest());
|
|
299
|
+
const [running, setRunning] = useState(false);
|
|
300
|
+
const [retrying, setRetrying] = useState(null);
|
|
301
|
+
const run = () => {
|
|
302
|
+
setRunning(true);
|
|
303
|
+
checks.run().then(setResults, () => void 0).finally(() => setRunning(false));
|
|
304
|
+
};
|
|
305
|
+
const runCheck = checks.runCheck?.bind(checks);
|
|
306
|
+
const retry = (again, name) => {
|
|
307
|
+
setRetrying(name);
|
|
308
|
+
again(name).then((next) => {
|
|
309
|
+
if (next) setResults((all) => all.map((r) => r.name === name ? next : r));
|
|
310
|
+
}, () => void 0).finally(() => setRetrying(null));
|
|
311
|
+
};
|
|
312
|
+
useEffect(run, [checks]);
|
|
313
|
+
const failed = results.filter((r) => r.status === "fail").length;
|
|
314
|
+
const warned = results.filter((r) => r.status === "warn").length;
|
|
315
|
+
const verdict = running ? "running" : !results.length ? "not run" : failed ? `${failed} failed` : warned ? `${warned} warnings` : "all good";
|
|
316
|
+
const word = { ok: labels.ok, warn: labels.warn, fail: labels.fail };
|
|
317
|
+
return /* @__PURE__ */ jsxs(Section, { title: `Health checks (${verdict})`, children: [
|
|
318
|
+
checks.list().length === 0 ? /* @__PURE__ */ jsx(NativeText, { preset: "body-sm", children: "None registered" }) : null,
|
|
319
|
+
results.map((r) => /* @__PURE__ */ jsx(
|
|
320
|
+
NativeSettingsRow,
|
|
321
|
+
{
|
|
322
|
+
label: r.name,
|
|
323
|
+
description: `${word[r.status]}${r.message ? ` \xB7 ${r.message}` : ""} \xB7 ${r.ms} ms`,
|
|
324
|
+
descriptionLines: null,
|
|
325
|
+
selectable: true,
|
|
326
|
+
testID: `genesis-devtools-check-${r.name}`,
|
|
327
|
+
children: runCheck ? /* @__PURE__ */ jsx(
|
|
328
|
+
NativeButton,
|
|
329
|
+
{
|
|
330
|
+
size: "sm",
|
|
331
|
+
variant: "ghost",
|
|
332
|
+
onPress: () => retry(runCheck, r.name),
|
|
333
|
+
disabled: running || retrying !== null,
|
|
334
|
+
loading: retrying === r.name,
|
|
335
|
+
accessibilityLabel: `${labels.retry}: ${r.name}`,
|
|
336
|
+
testID: `genesis-devtools-check-${r.name}-retry`,
|
|
337
|
+
children: labels.retry
|
|
338
|
+
}
|
|
339
|
+
) : null
|
|
340
|
+
},
|
|
341
|
+
r.name
|
|
342
|
+
)),
|
|
343
|
+
/* @__PURE__ */ jsx(NativeButton, { size: "sm", variant: "outline", onPress: run, disabled: running, testID: "genesis-devtools-run-checks", children: labels.runAll })
|
|
344
|
+
] });
|
|
345
|
+
}
|
|
346
|
+
function DevtoolsSheet({ visible, onDismissed, block, Feedback, feedbackProps, Diagnostics, diagnosticsProps, onCrash }) {
|
|
263
347
|
const { options } = block;
|
|
264
|
-
const roles = useThemeRoles();
|
|
265
348
|
const { userId } = useSession();
|
|
266
349
|
const blocks = useBlocks();
|
|
267
350
|
const recent = useRecentActivity(options.observability ?? null);
|
|
@@ -278,7 +361,8 @@ function DevtoolsSheet({ visible, onDismissed, block, Feedback, feedbackProps, o
|
|
|
278
361
|
(error) => setStatus(`${label}: ${error instanceof Error ? error.message : "failed"}`)
|
|
279
362
|
);
|
|
280
363
|
};
|
|
281
|
-
const
|
|
364
|
+
const copyText = (text) => options.copy ? options.copy(text) : Share.share({ message: text });
|
|
365
|
+
const copy = () => run("Copy debug info", () => copyText(info()));
|
|
282
366
|
const clearCache = () => run("Clear cache", async () => {
|
|
283
367
|
queryClient.clear();
|
|
284
368
|
await options.clearCache?.();
|
|
@@ -303,90 +387,82 @@ function DevtoolsSheet({ visible, onDismissed, block, Feedback, feedbackProps, o
|
|
|
303
387
|
};
|
|
304
388
|
const flags = Object.entries(options.flags ?? {});
|
|
305
389
|
return (
|
|
306
|
-
//
|
|
307
|
-
// library's
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
{
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
),
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
testID: "genesis-devtools-sign-out",
|
|
380
|
-
children: "Sign out"
|
|
381
|
-
}
|
|
382
|
-
) : null
|
|
383
|
-
] }) })
|
|
384
|
-
] })
|
|
385
|
-
}
|
|
386
|
-
)
|
|
390
|
+
// The sheet primitive: a page sheet on iOS (React Native's modal, needing no provider above it),
|
|
391
|
+
// or the bottom-sheet library's under NativeSheetProvider; it brings the escape gesture, reduced
|
|
392
|
+
// motion and the safe area.
|
|
393
|
+
/* @__PURE__ */ jsx(NativeSheet, { open: visible, onOpenChange: (open) => open ? void 0 : void close(), onDismissed, testID: "genesis-devtools", children: /* @__PURE__ */ jsx(NativeSheetScrollView, { children: /* @__PURE__ */ jsx(Box, { p: "lg", pb: "3xl", children: /* @__PURE__ */ jsxs(Stack, { gap: "md", children: [
|
|
394
|
+
/* @__PURE__ */ jsxs(Inline, { justify: "between", children: [
|
|
395
|
+
/* @__PURE__ */ jsx(NativeText, { preset: "h3", accessibilityRole: "header", children: "Devtools" }),
|
|
396
|
+
/* @__PURE__ */ jsx(NativeButton, { variant: "ghost", size: "sm", onPress: () => void close(), testID: "genesis-devtools-close", children: "Close" })
|
|
397
|
+
] }),
|
|
398
|
+
status ? /* @__PURE__ */ jsx(NativeText, { preset: "body-sm", testID: "genesis-devtools-status", children: status }) : null,
|
|
399
|
+
/* @__PURE__ */ jsx(Section, { title: "Build", children: /* @__PURE__ */ jsx(NativeText, { preset: "body-sm", selectable: true, testID: "genesis-devtools-signature", children: signature?.text ?? "Version unknown (no updates block)" }) }),
|
|
400
|
+
channels ? /* @__PURE__ */ jsxs(Section, { title: "Update channel", children: [
|
|
401
|
+
/* @__PURE__ */ jsx(Row, { label: "Channel", value: signature?.requestedChannel ?? signature?.channel ?? "none", testID: "genesis-devtools-channel" }),
|
|
402
|
+
channels.enabled ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
403
|
+
/* @__PURE__ */ jsx(
|
|
404
|
+
NativeInput,
|
|
405
|
+
{
|
|
406
|
+
value: channel,
|
|
407
|
+
onChangeText: setChannel,
|
|
408
|
+
placeholder: "pr-42",
|
|
409
|
+
autoCapitalize: "none",
|
|
410
|
+
autoCorrect: false,
|
|
411
|
+
accessibilityLabel: "Channel to switch to",
|
|
412
|
+
testID: "genesis-devtools-channel-input"
|
|
413
|
+
}
|
|
414
|
+
),
|
|
415
|
+
/* @__PURE__ */ jsx(NativeButton, { size: "sm", onPress: switchChannel, disabled: !channel.trim(), testID: "genesis-devtools-channel-switch", children: "Switch and reload" })
|
|
416
|
+
] }) : /* @__PURE__ */ jsx(NativeText, { preset: "body-sm", className: "text-muted-foreground", children: "Switching is off in this build." }),
|
|
417
|
+
/* @__PURE__ */ jsx(NativeButton, { size: "sm", variant: "ghost", onPress: resetChannel, testID: "genesis-devtools-channel-reset", children: "Back to the build's channel" })
|
|
418
|
+
] }) : null,
|
|
419
|
+
/* @__PURE__ */ jsxs(Section, { title: "Session", children: [
|
|
420
|
+
/* @__PURE__ */ jsx(Row, { label: "User id", value: userId ?? "signed out", testID: "genesis-devtools-user" }),
|
|
421
|
+
/* @__PURE__ */ jsx(Row, { label: "Server", value: options.baseUrl ? scrubUrl(options.baseUrl) : "unknown", testID: "genesis-devtools-server" })
|
|
422
|
+
] }),
|
|
423
|
+
options.checks ? /* @__PURE__ */ jsx(HealthChecksSection, { checks: options.checks, labels: { ...DEFAULT_DEVTOOLS_CHECK_LABELS, ...options.checkLabels } }) : null,
|
|
424
|
+
/* @__PURE__ */ jsxs(Section, { title: "Blocks and flags", children: [
|
|
425
|
+
/* @__PURE__ */ jsx(Row, { label: "Blocks", value: blocks.ids.size > 0 ? [...blocks.ids].join(", ") : "none", testID: "genesis-devtools-blocks" }),
|
|
426
|
+
flags.map(([name, value]) => /* @__PURE__ */ jsx(Row, { label: name, value: typeof value === "string" ? scrubString(value) : String(value), testID: `genesis-devtools-flag-${name}` }, name))
|
|
427
|
+
] }),
|
|
428
|
+
/* @__PURE__ */ jsxs(Section, { title: `Errors (${recent.errors.length})`, children: [
|
|
429
|
+
recent.errors.length === 0 ? /* @__PURE__ */ jsx(NativeText, { preset: "body-sm", children: "None" }) : null,
|
|
430
|
+
recent.errors.slice(-10).reverse().map((e) => /* @__PURE__ */ jsx(NativeText, { preset: "body-sm", testID: "genesis-devtools-error", children: `${e.fatal ? "fatal " : ""}${e.source} \xB7 ${e.name}: ${e.message}` }, `${e.at}-${e.message}`))
|
|
431
|
+
] }),
|
|
432
|
+
/* @__PURE__ */ jsxs(Section, { title: `Breadcrumbs (${recent.breadcrumbs.length})`, children: [
|
|
433
|
+
recent.breadcrumbs.length === 0 ? /* @__PURE__ */ jsx(NativeText, { preset: "body-sm", children: "None" }) : null,
|
|
434
|
+
recent.breadcrumbs.slice(-15).reverse().map((c, i) => /* @__PURE__ */ jsx(NativeText, { preset: "body-sm", testID: "genesis-devtools-breadcrumb", children: `${c.category} \xB7 ${c.message ?? ""}` }, `${c.timestamp ?? 0}-${i}`))
|
|
435
|
+
] }),
|
|
436
|
+
/* @__PURE__ */ jsx(Section, { title: "Actions", children: /* @__PURE__ */ jsxs(Stack, { gap: "sm", children: [
|
|
437
|
+
/* @__PURE__ */ jsx(NativeButton, { size: "sm", variant: "outline", onPress: copy, testID: "genesis-devtools-copy", children: "Copy debug info" }),
|
|
438
|
+
renderSlot(NoDiagnostics, Diagnostics, { debugInfo: info(), close, copy: copyText }, diagnosticsProps),
|
|
439
|
+
renderSlot(NoFeedback, Feedback, { debugInfo: info(), close }, feedbackProps),
|
|
440
|
+
/* @__PURE__ */ jsx(NativeButton, { size: "sm", variant: "outline", onPress: clearCache, testID: "genesis-devtools-clear-cache", children: "Clear cache" }),
|
|
441
|
+
/* @__PURE__ */ jsx(
|
|
442
|
+
NativeButton,
|
|
443
|
+
{
|
|
444
|
+
size: "sm",
|
|
445
|
+
variant: "outline",
|
|
446
|
+
onPress: () => confirm("Crash test", "This throws a render error: the fatal screen shows and the error is reported.", "Crash", onCrash),
|
|
447
|
+
testID: "genesis-devtools-crash",
|
|
448
|
+
children: "Crash test"
|
|
449
|
+
}
|
|
450
|
+
),
|
|
451
|
+
options.signOut ? /* @__PURE__ */ jsx(
|
|
452
|
+
NativeButton,
|
|
453
|
+
{
|
|
454
|
+
size: "sm",
|
|
455
|
+
variant: "destructive",
|
|
456
|
+
onPress: () => confirm("Sign out", "Sign out of this device?", "Sign out", () => run("Sign out", options.signOut)),
|
|
457
|
+
testID: "genesis-devtools-sign-out",
|
|
458
|
+
children: "Sign out"
|
|
459
|
+
}
|
|
460
|
+
) : null
|
|
461
|
+
] }) })
|
|
462
|
+
] }) }) }) })
|
|
387
463
|
);
|
|
388
464
|
}
|
|
389
465
|
|
|
390
|
-
export { DEVTOOLS_BLOCK_ID, buildDebugInfo, createDevtools, createHoldDetector, createShakeDetector };
|
|
466
|
+
export { DEFAULT_DEVTOOLS_CHECK_LABELS, DEVTOOLS_BLOCK_ID, DEVTOOLS_SETTING_SPECS, buildDebugInfo, createDevtools, createHoldDetector, createShakeDetector, devtoolsSettingValues, devtoolsSettings };
|
|
391
467
|
//# sourceMappingURL=devtools.js.map
|
|
392
468
|
//# sourceMappingURL=devtools.js.map
|