linked-data-browser 0.0.8-alpha.6 → 0.0.8-alpha.8
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 +68 -1
- package/dist-lib/index.d.mts +40 -3
- package/dist-lib/index.d.ts +40 -3
- package/dist-lib/index.js +894 -711
- package/dist-lib/index.mjs +583 -404
- package/dist-server/RefreshWorker.js +2045 -0
- package/dist-server/_expo/static/css/global-9f1ade27c4ac36316f91e9e008f2f694.css +1 -0
- package/dist-server/_expo/static/js/web/AppEntry-3fb182fd2bcf22f400f77c2d2f09bc56.js +14269 -0
- package/dist-server/index.html +2 -2
- package/dist-standalone/RefreshWorker.js +2045 -0
- package/dist-standalone/_expo/static/css/global-9f1ade27c4ac36316f91e9e008f2f694.css +1 -0
- package/dist-standalone/_expo/static/js/web/AppEntry-3fb182fd2bcf22f400f77c2d2f09bc56.js +14269 -0
- package/dist-standalone/index.html +2 -2
- package/package.json +34 -30
- package/scripts/copy-refresh-worker.js +40 -0
- package/dist-server/_expo/static/css/global-c029fb6f4311978a769388b3a9f28b01.css +0 -1
- package/dist-server/_expo/static/js/web/AppEntry-3f89550cb70ba0801aa1bbc82a590e5d.js +0 -12640
- package/dist-standalone/_expo/static/css/global-c029fb6f4311978a769388b3a9f28b01.css +0 -1
- package/dist-standalone/_expo/static/js/web/AppEntry-3f89550cb70ba0801aa1bbc82a590e5d.js +0 -12640
package/dist-lib/index.mjs
CHANGED
|
@@ -1,19 +1,3 @@
|
|
|
1
|
-
// components/solidFetchConfig.ts
|
|
2
|
-
import { Platform } from "react-native";
|
|
3
|
-
import { fetch as solidAuthFetch } from "@inrupt/solid-client-authn-browser";
|
|
4
|
-
import { dataset } from "@ldo/solid-react";
|
|
5
|
-
function createSolidFetch() {
|
|
6
|
-
const baseFetch = solidAuthFetch;
|
|
7
|
-
return async (input, init) => {
|
|
8
|
-
if (Platform.OS !== "web" && init?.body instanceof Blob) {
|
|
9
|
-
const arrayBuffer = await init.body.arrayBuffer();
|
|
10
|
-
return baseFetch(input, { ...init, body: arrayBuffer });
|
|
11
|
-
}
|
|
12
|
-
return baseFetch(input, init);
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
dataset.setContext("solid", { fetch: createSolidFetch() });
|
|
16
|
-
|
|
17
1
|
// components/DataBrowser.tsx
|
|
18
2
|
import { useMemo as useMemo10 } from "react";
|
|
19
3
|
import { BrowserSolidLdoProvider } from "@ldo/solid-react";
|
|
@@ -28,7 +12,6 @@ import React35, {
|
|
|
28
12
|
import React33 from "react";
|
|
29
13
|
import { useSolidAuth as useSolidAuth6 } from "@ldo/solid-react";
|
|
30
14
|
import { StyleSheet as StyleSheet28 } from "react-native";
|
|
31
|
-
import { useTheme as useTheme18 } from "@react-navigation/native";
|
|
32
15
|
|
|
33
16
|
// components/nav/header/AddressBox.tsx
|
|
34
17
|
import React6, { useEffect as useEffect2, useMemo as useMemo2 } from "react";
|
|
@@ -41,7 +24,7 @@ import {
|
|
|
41
24
|
TextInput,
|
|
42
25
|
View as View3,
|
|
43
26
|
StyleSheet as StyleSheet4,
|
|
44
|
-
Platform as
|
|
27
|
+
Platform as Platform2
|
|
45
28
|
} from "react-native";
|
|
46
29
|
import { useTheme as useTheme3 } from "@react-navigation/native";
|
|
47
30
|
|
|
@@ -258,7 +241,7 @@ import * as React3 from "react";
|
|
|
258
241
|
import {
|
|
259
242
|
Pressable,
|
|
260
243
|
View as View2,
|
|
261
|
-
Platform
|
|
244
|
+
Platform,
|
|
262
245
|
StyleSheet as StyleSheet3
|
|
263
246
|
} from "react-native";
|
|
264
247
|
import { CircleSnail } from "react-native-progress";
|
|
@@ -290,9 +273,9 @@ var getButtonStyles = (style, variant = "default", size = "default", isPressed =
|
|
|
290
273
|
};
|
|
291
274
|
const sizeStyles = {
|
|
292
275
|
default: {
|
|
293
|
-
height:
|
|
294
|
-
paddingHorizontal:
|
|
295
|
-
paddingVertical:
|
|
276
|
+
height: Platform.OS === "web" ? 40 : 48,
|
|
277
|
+
paddingHorizontal: Platform.OS === "web" ? 16 : 20,
|
|
278
|
+
paddingVertical: Platform.OS === "web" ? 8 : 12
|
|
296
279
|
},
|
|
297
280
|
sm: {
|
|
298
281
|
height: 36,
|
|
@@ -300,7 +283,7 @@ var getButtonStyles = (style, variant = "default", size = "default", isPressed =
|
|
|
300
283
|
paddingHorizontal: 12
|
|
301
284
|
},
|
|
302
285
|
lg: {
|
|
303
|
-
height:
|
|
286
|
+
height: Platform.OS === "web" ? 44 : 56,
|
|
304
287
|
borderRadius: 6,
|
|
305
288
|
paddingHorizontal: 32
|
|
306
289
|
},
|
|
@@ -344,7 +327,7 @@ var getButtonStyles = (style, variant = "default", size = "default", isPressed =
|
|
|
344
327
|
};
|
|
345
328
|
var getButtonTextStyles = (variant = "default", size = "default", isPressed = false, theme) => {
|
|
346
329
|
const baseStyles = {
|
|
347
|
-
fontSize:
|
|
330
|
+
fontSize: Platform.OS === "web" ? 14 : 16,
|
|
348
331
|
fontWeight: "500",
|
|
349
332
|
color: theme.colors.text
|
|
350
333
|
};
|
|
@@ -352,7 +335,7 @@ var getButtonTextStyles = (variant = "default", size = "default", isPressed = fa
|
|
|
352
335
|
default: {},
|
|
353
336
|
sm: {},
|
|
354
337
|
lg: {
|
|
355
|
-
fontSize:
|
|
338
|
+
fontSize: Platform.OS === "web" ? 14 : 18
|
|
356
339
|
},
|
|
357
340
|
icon: {}
|
|
358
341
|
};
|
|
@@ -483,10 +466,10 @@ var inputBaseStyles = StyleSheet4.create({
|
|
|
483
466
|
paddingVertical: 8,
|
|
484
467
|
fontSize: 16,
|
|
485
468
|
// Platform specific adjustments
|
|
486
|
-
...
|
|
469
|
+
...Platform2.OS === "web" && {
|
|
487
470
|
width: "100%"
|
|
488
471
|
},
|
|
489
|
-
...
|
|
472
|
+
...Platform2.OS !== "web" && {
|
|
490
473
|
height: 48,
|
|
491
474
|
// native:h-12
|
|
492
475
|
fontSize: 18,
|
|
@@ -497,7 +480,7 @@ var inputBaseStyles = StyleSheet4.create({
|
|
|
497
480
|
},
|
|
498
481
|
disabled: {
|
|
499
482
|
opacity: 0.5,
|
|
500
|
-
...
|
|
483
|
+
...Platform2.OS === "web" && {
|
|
501
484
|
cursor: "not-allowed"
|
|
502
485
|
}
|
|
503
486
|
},
|
|
@@ -549,7 +532,7 @@ function useDataBrowserConfig() {
|
|
|
549
532
|
|
|
550
533
|
// components/TargetResourceProvider.tsx
|
|
551
534
|
import { useResource, useSolidAuth } from "@ldo/solid-react";
|
|
552
|
-
import { Platform as
|
|
535
|
+
import { Platform as Platform3 } from "react-native";
|
|
553
536
|
var TargetResourceContext = createContext3({});
|
|
554
537
|
function useTargetResource() {
|
|
555
538
|
return useContext3(TargetResourceContext);
|
|
@@ -560,13 +543,13 @@ var TargetResourceProvider = ({
|
|
|
560
543
|
const { mode, origin } = useDataBrowserConfig();
|
|
561
544
|
const { ranInitialAuthCheck } = useSolidAuth();
|
|
562
545
|
const [currentUrl, setCurrentUrl] = useState(() => {
|
|
563
|
-
return
|
|
546
|
+
return Platform3.OS === "web" ? new URL(window.location.href) : new URL("");
|
|
564
547
|
});
|
|
565
548
|
const handleUrlChange = useCallback(() => {
|
|
566
549
|
setCurrentUrl(new URL(window.location.href));
|
|
567
550
|
}, []);
|
|
568
551
|
useEffect(() => {
|
|
569
|
-
if (
|
|
552
|
+
if (Platform3.OS === "web") {
|
|
570
553
|
window.addEventListener("popstate", handleUrlChange);
|
|
571
554
|
const originalPushState = history.pushState;
|
|
572
555
|
const originalReplaceState = history.replaceState;
|
|
@@ -595,7 +578,7 @@ var TargetResourceProvider = ({
|
|
|
595
578
|
finalUrl = `${origin}?uri=${encodeURIComponent(newRoute)}`;
|
|
596
579
|
}
|
|
597
580
|
setCurrentUrl(new URL(finalUrl));
|
|
598
|
-
if (
|
|
581
|
+
if (Platform3.OS === "web") {
|
|
599
582
|
window.history.pushState(null, "", finalUrl);
|
|
600
583
|
}
|
|
601
584
|
},
|
|
@@ -1992,7 +1975,7 @@ import { Sun } from "lucide-react-native";
|
|
|
1992
1975
|
// components/ui/switch.tsx
|
|
1993
1976
|
import * as SwitchPrimitives from "@rn-primitives/switch";
|
|
1994
1977
|
import * as React7 from "react";
|
|
1995
|
-
import { Platform as
|
|
1978
|
+
import { Platform as Platform4, StyleSheet as StyleSheet6 } from "react-native";
|
|
1996
1979
|
import Animated, {
|
|
1997
1980
|
interpolateColor,
|
|
1998
1981
|
useAnimatedStyle,
|
|
@@ -2100,7 +2083,7 @@ function SwitchNative({
|
|
|
2100
2083
|
/* @__PURE__ */ React7.createElement(SwitchPrimitives.Root, { style: styles3.switchNativeRoot, ...props }, /* @__PURE__ */ React7.createElement(Animated.View, { style: animatedThumbStyle }, /* @__PURE__ */ React7.createElement(SwitchPrimitives.Thumb, { style: styles3.switchNativeThumb })))
|
|
2101
2084
|
);
|
|
2102
2085
|
}
|
|
2103
|
-
var Switch =
|
|
2086
|
+
var Switch = Platform4.select({
|
|
2104
2087
|
web: SwitchWeb,
|
|
2105
2088
|
default: SwitchNative
|
|
2106
2089
|
});
|
|
@@ -2109,7 +2092,7 @@ var Switch = Platform5.select({
|
|
|
2109
2092
|
import * as DropdownMenuPrimitive from "@rn-primitives/dropdown-menu";
|
|
2110
2093
|
import * as React8 from "react";
|
|
2111
2094
|
import {
|
|
2112
|
-
Platform as
|
|
2095
|
+
Platform as Platform5,
|
|
2113
2096
|
Pressable as Pressable2,
|
|
2114
2097
|
StyleSheet as StyleSheet7,
|
|
2115
2098
|
Text as Text3,
|
|
@@ -2120,6 +2103,36 @@ import { ChevronDown } from "lucide-react-native";
|
|
|
2120
2103
|
import { ChevronRight as ChevronRight2 } from "lucide-react-native";
|
|
2121
2104
|
import { ChevronUp } from "lucide-react-native";
|
|
2122
2105
|
import { useTheme as useTheme6 } from "@react-navigation/native";
|
|
2106
|
+
var DROPDOWN_ANIMATION_CSS = `
|
|
2107
|
+
@keyframes dropdown-in {
|
|
2108
|
+
from { opacity: 0; transform: scaleY(0) translateY(-8px); }
|
|
2109
|
+
to { opacity: 1; transform: scaleY(1) translateY(0); }
|
|
2110
|
+
}
|
|
2111
|
+
@keyframes dropdown-out {
|
|
2112
|
+
from { opacity: 1; transform: scaleY(1) translateY(0); }
|
|
2113
|
+
to { opacity: 0; transform: scaleY(0) translateY(-8px); }
|
|
2114
|
+
}
|
|
2115
|
+
[role="menu"] {
|
|
2116
|
+
transform-origin: var(--radix-dropdown-menu-content-transform-origin);
|
|
2117
|
+
}
|
|
2118
|
+
[role="menu"][data-state="open"] {
|
|
2119
|
+
animation: dropdown-in 200ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
2120
|
+
}
|
|
2121
|
+
[role="menu"][data-state="closed"] {
|
|
2122
|
+
animation: dropdown-out 150ms ease-in;
|
|
2123
|
+
}
|
|
2124
|
+
`;
|
|
2125
|
+
function useDropdownAnimation() {
|
|
2126
|
+
React8.useEffect(() => {
|
|
2127
|
+
if (Platform5.OS !== "web") return;
|
|
2128
|
+
const id = "rnp-dropdown-menu-animations";
|
|
2129
|
+
if (document.getElementById(id)) return;
|
|
2130
|
+
const el = document.createElement("style");
|
|
2131
|
+
el.id = id;
|
|
2132
|
+
el.textContent = DROPDOWN_ANIMATION_CSS;
|
|
2133
|
+
document.head.appendChild(el);
|
|
2134
|
+
}, []);
|
|
2135
|
+
}
|
|
2123
2136
|
var DropdownMenu = DropdownMenuPrimitive.Root;
|
|
2124
2137
|
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
2125
2138
|
var DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
@@ -2134,7 +2147,7 @@ function DropdownMenuSubTrigger({
|
|
|
2134
2147
|
}) {
|
|
2135
2148
|
const theme = useTheme6();
|
|
2136
2149
|
const { open } = DropdownMenuPrimitive.useSubContext();
|
|
2137
|
-
const SubIcon =
|
|
2150
|
+
const SubIcon = Platform5.OS === "web" ? ChevronRight2 : open ? ChevronUp : ChevronDown;
|
|
2138
2151
|
return /* @__PURE__ */ React8.createElement(
|
|
2139
2152
|
TextStyleProvider,
|
|
2140
2153
|
{
|
|
@@ -2187,13 +2200,14 @@ function DropdownMenuContent({
|
|
|
2187
2200
|
...props
|
|
2188
2201
|
}) {
|
|
2189
2202
|
const theme = useTheme6();
|
|
2203
|
+
useDropdownAnimation();
|
|
2190
2204
|
return /* @__PURE__ */ React8.createElement(DropdownMenuPrimitive.Portal, { hostName: portalHost }, /* @__PURE__ */ React8.createElement(
|
|
2191
2205
|
DropdownMenuPrimitive.Overlay,
|
|
2192
2206
|
{
|
|
2193
2207
|
style: overlayStyle ? StyleSheet7.flatten([
|
|
2194
|
-
|
|
2208
|
+
Platform5.OS !== "web" ? StyleSheet7.absoluteFill : void 0,
|
|
2195
2209
|
overlayStyle
|
|
2196
|
-
]) :
|
|
2210
|
+
]) : Platform5.OS !== "web" ? StyleSheet7.absoluteFill : void 0
|
|
2197
2211
|
},
|
|
2198
2212
|
/* @__PURE__ */ React8.createElement(
|
|
2199
2213
|
DropdownMenuPrimitive.Content,
|
|
@@ -2219,7 +2233,7 @@ function DropdownMenuItem({
|
|
|
2219
2233
|
...props
|
|
2220
2234
|
}) {
|
|
2221
2235
|
const theme = useTheme6();
|
|
2222
|
-
return /* @__PURE__ */ React8.createElement(TextStyleProvider, { style: { color: theme.colors.text } }, /* @__PURE__ */ React8.createElement(DropdownMenuPrimitive.Item, { asChild: true, ...props }, /* @__PURE__ */ React8.createElement(
|
|
2236
|
+
return /* @__PURE__ */ React8.createElement(TextStyleProvider, { size: "sm", style: { color: theme.colors.text } }, /* @__PURE__ */ React8.createElement(DropdownMenuPrimitive.Item, { asChild: true, ...props }, /* @__PURE__ */ React8.createElement(
|
|
2223
2237
|
Pressable2,
|
|
2224
2238
|
{
|
|
2225
2239
|
style: ({ pressed, hovered }) => StyleSheet7.flatten([
|
|
@@ -2333,7 +2347,7 @@ function DropdownMenuShortcut({ style, ...props }) {
|
|
|
2333
2347
|
var styles4 = StyleSheet7.create({
|
|
2334
2348
|
// SubTrigger styles
|
|
2335
2349
|
subTriggerText: {
|
|
2336
|
-
fontSize:
|
|
2350
|
+
fontSize: Platform5.OS === "web" ? 14 : 18
|
|
2337
2351
|
// text-sm native:text-lg
|
|
2338
2352
|
},
|
|
2339
2353
|
subTriggerTextOpen: {
|
|
@@ -2346,7 +2360,7 @@ var styles4 = StyleSheet7.create({
|
|
|
2346
2360
|
// gap-2
|
|
2347
2361
|
paddingHorizontal: 8,
|
|
2348
2362
|
// px-2
|
|
2349
|
-
paddingVertical:
|
|
2363
|
+
paddingVertical: Platform5.OS === "web" ? 6 : 8,
|
|
2350
2364
|
// py-1.5 native:py-2
|
|
2351
2365
|
borderRadius: 2
|
|
2352
2366
|
// rounded-sm
|
|
@@ -2377,11 +2391,10 @@ var styles4 = StyleSheet7.create({
|
|
|
2377
2391
|
// mt-1
|
|
2378
2392
|
padding: 4,
|
|
2379
2393
|
// p-1
|
|
2380
|
-
shadowOffset: { width: 0, height:
|
|
2381
|
-
shadowOpacity: 0.
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
elevation: 2
|
|
2394
|
+
shadowOffset: { width: 0, height: 4 },
|
|
2395
|
+
shadowOpacity: 0.12,
|
|
2396
|
+
shadowRadius: 8,
|
|
2397
|
+
elevation: 8
|
|
2385
2398
|
// Android shadow
|
|
2386
2399
|
// Border color, background color, and shadow color applied at render time
|
|
2387
2400
|
},
|
|
@@ -2397,11 +2410,10 @@ var styles4 = StyleSheet7.create({
|
|
|
2397
2410
|
borderWidth: 1,
|
|
2398
2411
|
padding: 4,
|
|
2399
2412
|
// p-1
|
|
2400
|
-
shadowOffset: { width: 0, height:
|
|
2401
|
-
shadowOpacity: 0.
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
elevation: 2
|
|
2413
|
+
shadowOffset: { width: 0, height: 4 },
|
|
2414
|
+
shadowOpacity: 0.12,
|
|
2415
|
+
shadowRadius: 8,
|
|
2416
|
+
elevation: 8
|
|
2405
2417
|
// Android shadow
|
|
2406
2418
|
// Border color, background color, and shadow color applied at render time
|
|
2407
2419
|
},
|
|
@@ -2415,7 +2427,7 @@ var styles4 = StyleSheet7.create({
|
|
|
2415
2427
|
// rounded-sm
|
|
2416
2428
|
paddingHorizontal: 8,
|
|
2417
2429
|
// px-2
|
|
2418
|
-
paddingVertical:
|
|
2430
|
+
paddingVertical: Platform5.OS === "web" ? 6 : 8
|
|
2419
2431
|
// py-1.5 native:py-2
|
|
2420
2432
|
},
|
|
2421
2433
|
itemInset: {
|
|
@@ -2433,7 +2445,7 @@ var styles4 = StyleSheet7.create({
|
|
|
2433
2445
|
alignItems: "center",
|
|
2434
2446
|
borderRadius: 2,
|
|
2435
2447
|
// rounded-sm
|
|
2436
|
-
paddingVertical:
|
|
2448
|
+
paddingVertical: Platform5.OS === "web" ? 6 : 8,
|
|
2437
2449
|
// py-1.5 native:py-2
|
|
2438
2450
|
paddingLeft: 32,
|
|
2439
2451
|
// pl-8
|
|
@@ -2465,7 +2477,7 @@ var styles4 = StyleSheet7.create({
|
|
|
2465
2477
|
alignItems: "center",
|
|
2466
2478
|
borderRadius: 2,
|
|
2467
2479
|
// rounded-sm
|
|
2468
|
-
paddingVertical:
|
|
2480
|
+
paddingVertical: Platform5.OS === "web" ? 6 : 8,
|
|
2469
2481
|
// py-1.5 native:py-2
|
|
2470
2482
|
paddingLeft: 32,
|
|
2471
2483
|
// pl-8
|
|
@@ -2502,7 +2514,7 @@ var styles4 = StyleSheet7.create({
|
|
|
2502
2514
|
// px-2
|
|
2503
2515
|
paddingVertical: 6,
|
|
2504
2516
|
// py-1.5
|
|
2505
|
-
fontSize:
|
|
2517
|
+
fontSize: Platform5.OS === "web" ? 14 : 16,
|
|
2506
2518
|
// text-sm native:text-base
|
|
2507
2519
|
fontWeight: "600"
|
|
2508
2520
|
// font-semibold
|
|
@@ -2525,7 +2537,7 @@ var styles4 = StyleSheet7.create({
|
|
|
2525
2537
|
// Shortcut styles
|
|
2526
2538
|
shortcut: {
|
|
2527
2539
|
marginLeft: "auto",
|
|
2528
|
-
fontSize:
|
|
2540
|
+
fontSize: Platform5.OS === "web" ? 12 : 14,
|
|
2529
2541
|
// text-xs native:text-sm
|
|
2530
2542
|
letterSpacing: 0.1
|
|
2531
2543
|
// tracking-widest
|
|
@@ -2534,7 +2546,7 @@ var styles4 = StyleSheet7.create({
|
|
|
2534
2546
|
});
|
|
2535
2547
|
|
|
2536
2548
|
// components/ThemeProvider.tsx
|
|
2537
|
-
import React9, { useEffect as
|
|
2549
|
+
import React9, { useEffect as useEffect4 } from "react";
|
|
2538
2550
|
import AsyncStorage from "@react-native-async-storage/async-storage";
|
|
2539
2551
|
import {
|
|
2540
2552
|
createContext as createContext4,
|
|
@@ -2542,7 +2554,7 @@ import {
|
|
|
2542
2554
|
useMemo as useMemo3,
|
|
2543
2555
|
useState as useState3
|
|
2544
2556
|
} from "react";
|
|
2545
|
-
import { Appearance, Platform as
|
|
2557
|
+
import { Appearance, Platform as Platform7 } from "react-native";
|
|
2546
2558
|
import {
|
|
2547
2559
|
ThemeProvider as ApplicationThemeProvider,
|
|
2548
2560
|
DarkTheme,
|
|
@@ -2554,7 +2566,7 @@ var NAV_THEME = {
|
|
|
2554
2566
|
light: {
|
|
2555
2567
|
background: "hsl(0 0% 99%)",
|
|
2556
2568
|
border: "hsl(220 13% 91%)",
|
|
2557
|
-
card: "hsl(
|
|
2569
|
+
card: "hsl(220 14% 96%)",
|
|
2558
2570
|
notification: "hsl(0 72% 51%)",
|
|
2559
2571
|
primary: "hsl(220 70% 45%)",
|
|
2560
2572
|
text: "hsl(220 15% 12%)"
|
|
@@ -2562,7 +2574,7 @@ var NAV_THEME = {
|
|
|
2562
2574
|
dark: {
|
|
2563
2575
|
background: "hsl(222 18% 8%)",
|
|
2564
2576
|
border: "hsl(217 18% 18%)",
|
|
2565
|
-
card: "hsl(222 18%
|
|
2577
|
+
card: "hsl(222 18% 14%)",
|
|
2566
2578
|
notification: "hsl(0 62% 50%)",
|
|
2567
2579
|
primary: "hsl(217 91% 60%)",
|
|
2568
2580
|
text: "hsl(210 20% 96%)"
|
|
@@ -2571,9 +2583,9 @@ var NAV_THEME = {
|
|
|
2571
2583
|
|
|
2572
2584
|
// lib/android-navigation-bar.ts
|
|
2573
2585
|
import * as NavigationBar from "expo-navigation-bar";
|
|
2574
|
-
import { Platform as
|
|
2586
|
+
import { Platform as Platform6 } from "react-native";
|
|
2575
2587
|
async function setAndroidNavigationBar(theme) {
|
|
2576
|
-
if (
|
|
2588
|
+
if (Platform6.OS !== "android") return;
|
|
2577
2589
|
await NavigationBar.setButtonStyleAsync(theme === "dark" ? "light" : "dark");
|
|
2578
2590
|
await NavigationBar.setBackgroundColorAsync(
|
|
2579
2591
|
theme === "dark" ? NAV_THEME.dark.background : NAV_THEME.light.background
|
|
@@ -2599,7 +2611,7 @@ var ThemeProviderContext = createContext4({
|
|
|
2599
2611
|
function useThemeChange() {
|
|
2600
2612
|
return useContext4(ThemeProviderContext);
|
|
2601
2613
|
}
|
|
2602
|
-
var usePlatformSpecificSetup =
|
|
2614
|
+
var usePlatformSpecificSetup = Platform7.select({
|
|
2603
2615
|
android: useSetAndroidNavigationBar,
|
|
2604
2616
|
default: noop
|
|
2605
2617
|
});
|
|
@@ -2611,7 +2623,7 @@ var ThemeProvider = ({
|
|
|
2611
2623
|
const resolvedScheme = colorScheme ?? "light";
|
|
2612
2624
|
usePlatformSpecificSetup();
|
|
2613
2625
|
useSetWebBackgroundClassName(resolvedScheme);
|
|
2614
|
-
|
|
2626
|
+
useEffect4(() => {
|
|
2615
2627
|
const lookupCurColorScheme = async () => {
|
|
2616
2628
|
setColorScheme(Appearance.getColorScheme() ?? "light");
|
|
2617
2629
|
const storedColorSchemeName = await AsyncStorage.getItem(COLOR_SCHEME_KEY) || Appearance.getColorScheme();
|
|
@@ -2641,10 +2653,10 @@ var ThemeProvider = ({
|
|
|
2641
2653
|
/* @__PURE__ */ React9.createElement(ThemeProviderContext.Provider, { value: context }, children)
|
|
2642
2654
|
));
|
|
2643
2655
|
};
|
|
2644
|
-
var useIsomorphicLayoutEffect =
|
|
2656
|
+
var useIsomorphicLayoutEffect = Platform7.OS === "web" && typeof window === "undefined" ? React9.useEffect : React9.useLayoutEffect;
|
|
2645
2657
|
function useSetWebBackgroundClassName(colorScheme) {
|
|
2646
2658
|
useIsomorphicLayoutEffect(() => {
|
|
2647
|
-
if (
|
|
2659
|
+
if (Platform7.OS !== "web" || typeof document === "undefined") return;
|
|
2648
2660
|
const el = document.documentElement;
|
|
2649
2661
|
el.classList.add("bg-background");
|
|
2650
2662
|
if (colorScheme === "dark") {
|
|
@@ -2840,7 +2852,7 @@ import { EllipsisVertical } from "lucide-react-native";
|
|
|
2840
2852
|
import * as DialogPrimitive from "@rn-primitives/dialog";
|
|
2841
2853
|
import * as React14 from "react";
|
|
2842
2854
|
import {
|
|
2843
|
-
Platform as
|
|
2855
|
+
Platform as Platform8,
|
|
2844
2856
|
StyleSheet as StyleSheet11,
|
|
2845
2857
|
View as View8
|
|
2846
2858
|
} from "react-native";
|
|
@@ -2884,7 +2896,7 @@ function DialogOverlayNative({
|
|
|
2884
2896
|
)
|
|
2885
2897
|
);
|
|
2886
2898
|
}
|
|
2887
|
-
var DialogOverlay =
|
|
2899
|
+
var DialogOverlay = Platform8.select({
|
|
2888
2900
|
web: DialogOverlayWeb,
|
|
2889
2901
|
default: DialogOverlayNative
|
|
2890
2902
|
});
|
|
@@ -2906,7 +2918,7 @@ function DialogContent({
|
|
|
2906
2918
|
...props
|
|
2907
2919
|
},
|
|
2908
2920
|
children,
|
|
2909
|
-
/* @__PURE__ */ React14.createElement(DialogPrimitive.Close, { style: styles8.closeButton }, /* @__PURE__ */ React14.createElement(X, { size:
|
|
2921
|
+
/* @__PURE__ */ React14.createElement(DialogPrimitive.Close, { style: styles8.closeButton }, /* @__PURE__ */ React14.createElement(X, { size: Platform8.OS === "web" ? 16 : 18, color: colors.text }))
|
|
2910
2922
|
)));
|
|
2911
2923
|
}
|
|
2912
2924
|
function DialogHeader({ style, ...props }) {
|
|
@@ -2918,7 +2930,7 @@ function DialogFooter({ style, ...props }) {
|
|
|
2918
2930
|
{
|
|
2919
2931
|
style: StyleSheet11.flatten([
|
|
2920
2932
|
styles8.footer,
|
|
2921
|
-
|
|
2933
|
+
Platform8.OS === "web" && styles8.footerRow,
|
|
2922
2934
|
style
|
|
2923
2935
|
]),
|
|
2924
2936
|
...props
|
|
@@ -3007,8 +3019,7 @@ var styles8 = StyleSheet11.create({
|
|
|
3007
3019
|
flexDirection: "column",
|
|
3008
3020
|
gap: 6,
|
|
3009
3021
|
// gap-1.5
|
|
3010
|
-
textAlign: "center"
|
|
3011
|
-
borderBottomWidth: 1
|
|
3022
|
+
textAlign: "center"
|
|
3012
3023
|
},
|
|
3013
3024
|
footer: {
|
|
3014
3025
|
flexDirection: "column-reverse",
|
|
@@ -3020,17 +3031,17 @@ var styles8 = StyleSheet11.create({
|
|
|
3020
3031
|
justifyContent: "flex-end"
|
|
3021
3032
|
},
|
|
3022
3033
|
title: {
|
|
3023
|
-
fontSize:
|
|
3034
|
+
fontSize: Platform8.OS === "web" ? 18 : 20,
|
|
3024
3035
|
// text-lg native:text-xl
|
|
3025
3036
|
fontWeight: "600",
|
|
3026
3037
|
// font-semibold
|
|
3027
|
-
lineHeight:
|
|
3038
|
+
lineHeight: Platform8.OS === "web" ? 20 : 22,
|
|
3028
3039
|
// leading-none
|
|
3029
3040
|
letterSpacing: -0.025
|
|
3030
3041
|
// tracking-tight
|
|
3031
3042
|
},
|
|
3032
3043
|
description: {
|
|
3033
|
-
fontSize:
|
|
3044
|
+
fontSize: Platform8.OS === "web" ? 14 : 16,
|
|
3034
3045
|
// text-sm native:text-base
|
|
3035
3046
|
opacity: 0.7
|
|
3036
3047
|
}
|
|
@@ -3047,7 +3058,7 @@ var SignInMenu = () => {
|
|
|
3047
3058
|
const onIdpSubmit = useCallback2(async () => {
|
|
3048
3059
|
setIdpError(void 0);
|
|
3049
3060
|
try {
|
|
3050
|
-
await login(idpValue);
|
|
3061
|
+
await login(idpValue, window.location.href);
|
|
3051
3062
|
} catch (err) {
|
|
3052
3063
|
if (err instanceof Error) {
|
|
3053
3064
|
setIdpError(err.message);
|
|
@@ -3061,7 +3072,7 @@ var SignInMenu = () => {
|
|
|
3061
3072
|
Button,
|
|
3062
3073
|
{
|
|
3063
3074
|
key: "signUp",
|
|
3064
|
-
onPress: () => signUp(defaultIssuer),
|
|
3075
|
+
onPress: () => signUp(defaultIssuer, window.location.href),
|
|
3065
3076
|
variant: "ghost",
|
|
3066
3077
|
text: "Sign Up"
|
|
3067
3078
|
}
|
|
@@ -3069,7 +3080,7 @@ var SignInMenu = () => {
|
|
|
3069
3080
|
Button,
|
|
3070
3081
|
{
|
|
3071
3082
|
key: "logIn",
|
|
3072
|
-
onPress: () => login(defaultIssuer),
|
|
3083
|
+
onPress: () => login(defaultIssuer, window.location.href),
|
|
3073
3084
|
variant: "default",
|
|
3074
3085
|
text: "Log In"
|
|
3075
3086
|
}
|
|
@@ -3085,13 +3096,13 @@ var SignInMenu = () => {
|
|
|
3085
3096
|
)), /* @__PURE__ */ React15.createElement(DropdownMenuContent, { style: styles9.dropdownContent }, /* @__PURE__ */ React15.createElement(DropdownMenuGroup, null, isSmallScreen && /* @__PURE__ */ React15.createElement(
|
|
3086
3097
|
DropdownMenuItem,
|
|
3087
3098
|
{
|
|
3088
|
-
onPress: () => signUp(defaultIssuer)
|
|
3099
|
+
onPress: () => signUp(defaultIssuer, window.location.href)
|
|
3089
3100
|
},
|
|
3090
3101
|
/* @__PURE__ */ React15.createElement(Text2, null, "Sign Up")
|
|
3091
3102
|
), isSmallScreen && /* @__PURE__ */ React15.createElement(
|
|
3092
3103
|
DropdownMenuItem,
|
|
3093
3104
|
{
|
|
3094
|
-
onPress: () => login(defaultIssuer)
|
|
3105
|
+
onPress: () => login(defaultIssuer, window.location.href)
|
|
3095
3106
|
},
|
|
3096
3107
|
/* @__PURE__ */ React15.createElement(Text2, null, "Log In")
|
|
3097
3108
|
), /* @__PURE__ */ React15.createElement(Dialog, null, /* @__PURE__ */ React15.createElement(DialogTrigger, { asChild: true }, /* @__PURE__ */ React15.createElement(DropdownMenuItem, { closeOnPress: false }, /* @__PURE__ */ React15.createElement(Text2, null, "Log in with Another Pod"))), /* @__PURE__ */ React15.createElement(DialogContent, { style: styles9.dialogContent }, /* @__PURE__ */ React15.createElement(DialogHeader, null, /* @__PURE__ */ React15.createElement(DialogTitle, null, "Solid WebId or Identity Provider"), /* @__PURE__ */ React15.createElement(DialogDescription, null, /* @__PURE__ */ React15.createElement(
|
|
@@ -3131,7 +3142,7 @@ import { ViewIcon } from "lucide-react-native";
|
|
|
3131
3142
|
|
|
3132
3143
|
// components/useViewContext.tsx
|
|
3133
3144
|
import createContainer from "constate";
|
|
3134
|
-
import React18, { useEffect as
|
|
3145
|
+
import React18, { useEffect as useEffect5, useMemo as useMemo4, useState as useState5 } from "react";
|
|
3135
3146
|
import { EyeOff } from "lucide-react-native";
|
|
3136
3147
|
import { OctagonX } from "lucide-react-native";
|
|
3137
3148
|
import { CircleSlash } from "lucide-react-native";
|
|
@@ -3157,7 +3168,7 @@ function Card({
|
|
|
3157
3168
|
{
|
|
3158
3169
|
style: StyleSheet13.flatten([
|
|
3159
3170
|
styles10.card,
|
|
3160
|
-
{ backgroundColor: colors.
|
|
3171
|
+
{ backgroundColor: colors.card, borderColor: colors.border },
|
|
3161
3172
|
style
|
|
3162
3173
|
]),
|
|
3163
3174
|
...props
|
|
@@ -3282,7 +3293,7 @@ import { useLdo } from "@ldo/solid-react";
|
|
|
3282
3293
|
var [ViewContextProvider, useViewContext] = createContainer(() => {
|
|
3283
3294
|
const { targetUri, targetResource, refresh, navigateTo } = useTargetResource();
|
|
3284
3295
|
const { resourceViews } = useDataBrowserConfig();
|
|
3285
|
-
const { dataset
|
|
3296
|
+
const { dataset } = useLdo();
|
|
3286
3297
|
const validViews = useMemo4(() => {
|
|
3287
3298
|
if (!targetResource || !targetUri) {
|
|
3288
3299
|
return [
|
|
@@ -3302,14 +3313,14 @@ var [ViewContextProvider, useViewContext] = createContainer(() => {
|
|
|
3302
3313
|
const errorViews = getErrorViews(targetResource);
|
|
3303
3314
|
if (errorViews) return errorViews;
|
|
3304
3315
|
const potentialViews = resourceViews.filter(
|
|
3305
|
-
(view) => view.canDisplay(targetUri, targetResource,
|
|
3316
|
+
(view) => view.canDisplay(targetUri, targetResource, dataset)
|
|
3306
3317
|
);
|
|
3307
3318
|
return potentialViews.length > 0 ? potentialViews : [constructErrorView(`No valid view for ${targetUri}`, OctagonX)];
|
|
3308
|
-
}, [targetResource, targetUri, resourceViews,
|
|
3319
|
+
}, [targetResource, targetUri, resourceViews, dataset]);
|
|
3309
3320
|
const [curViewConfig, setCurViewConfig] = useState5(
|
|
3310
3321
|
validViews[0]
|
|
3311
3322
|
);
|
|
3312
|
-
|
|
3323
|
+
useEffect5(() => {
|
|
3313
3324
|
setCurViewConfig(validViews[0]);
|
|
3314
3325
|
}, [targetUri, validViews]);
|
|
3315
3326
|
return {
|
|
@@ -3461,7 +3472,7 @@ import React32, {
|
|
|
3461
3472
|
createContext as createContext5,
|
|
3462
3473
|
useCallback as useCallback8,
|
|
3463
3474
|
useContext as useContext5,
|
|
3464
|
-
useEffect as
|
|
3475
|
+
useEffect as useEffect7,
|
|
3465
3476
|
useMemo as useMemo9,
|
|
3466
3477
|
useState as useState9
|
|
3467
3478
|
} from "react";
|
|
@@ -3613,7 +3624,7 @@ import React25, { useCallback as useCallback4, useMemo as useMemo5 } from "react
|
|
|
3613
3624
|
// components/ui/checkbox.tsx
|
|
3614
3625
|
import * as CheckboxPrimitive from "@rn-primitives/checkbox";
|
|
3615
3626
|
import * as React24 from "react";
|
|
3616
|
-
import { Platform as
|
|
3627
|
+
import { Platform as Platform9, StyleSheet as StyleSheet20 } from "react-native";
|
|
3617
3628
|
import { Check as Check2 } from "lucide-react-native";
|
|
3618
3629
|
import { useTheme as useTheme14 } from "@react-navigation/native";
|
|
3619
3630
|
var getCheckboxStyles = (checked = false, disabled = false, theme) => {
|
|
@@ -3654,7 +3665,7 @@ function Checkbox({
|
|
|
3654
3665
|
Check2,
|
|
3655
3666
|
{
|
|
3656
3667
|
size: 12,
|
|
3657
|
-
strokeWidth:
|
|
3668
|
+
strokeWidth: Platform9.OS === "web" ? 2.5 : 3.5,
|
|
3658
3669
|
color: theme.colors.background
|
|
3659
3670
|
}
|
|
3660
3671
|
)));
|
|
@@ -3772,7 +3783,7 @@ import React27, {
|
|
|
3772
3783
|
useMemo as useMemo6,
|
|
3773
3784
|
useState as useState7,
|
|
3774
3785
|
useRef,
|
|
3775
|
-
useEffect as
|
|
3786
|
+
useEffect as useEffect6
|
|
3776
3787
|
} from "react";
|
|
3777
3788
|
import { View as View14, StyleSheet as StyleSheet23 } from "react-native";
|
|
3778
3789
|
import { useTheme as useTheme15 } from "@react-navigation/native";
|
|
@@ -3816,7 +3827,7 @@ function InputDropdown({
|
|
|
3816
3827
|
},
|
|
3817
3828
|
[onItemSelect]
|
|
3818
3829
|
);
|
|
3819
|
-
|
|
3830
|
+
useEffect6(() => {
|
|
3820
3831
|
const handleClickOutside = (event) => {
|
|
3821
3832
|
if (inputRef.current && !inputRef.current.contains(event.target)) {
|
|
3822
3833
|
setIsDropdownOpen(false);
|
|
@@ -4120,6 +4131,7 @@ var SharingModalProvider = ({
|
|
|
4120
4131
|
const { targetResource } = useViewContext();
|
|
4121
4132
|
const { colors } = useTheme17();
|
|
4122
4133
|
const [isOpen, setIsOpen] = useState9(false);
|
|
4134
|
+
const [resourceOverride, setResourceOverride] = useState9();
|
|
4123
4135
|
const [wacResult, setWacResult] = useState9();
|
|
4124
4136
|
const [isLoading, setIsLoading] = useState9(false);
|
|
4125
4137
|
const [editedRules, setEditedRules] = useState9({
|
|
@@ -4128,10 +4140,11 @@ var SharingModalProvider = ({
|
|
|
4128
4140
|
agent: {}
|
|
4129
4141
|
});
|
|
4130
4142
|
const { width, height } = useWindowDimensions3();
|
|
4131
|
-
|
|
4132
|
-
|
|
4143
|
+
const activeResource = resourceOverride ?? targetResource;
|
|
4144
|
+
useEffect7(() => {
|
|
4145
|
+
if (isOpen && (activeResource?.type === "SolidContainer" || activeResource?.type === "SolidLeaf")) {
|
|
4133
4146
|
setIsLoading(true);
|
|
4134
|
-
|
|
4147
|
+
activeResource.getWac().then((wac) => {
|
|
4135
4148
|
setWacResult(
|
|
4136
4149
|
wac
|
|
4137
4150
|
);
|
|
@@ -4141,7 +4154,7 @@ var SharingModalProvider = ({
|
|
|
4141
4154
|
setIsLoading(false);
|
|
4142
4155
|
});
|
|
4143
4156
|
}
|
|
4144
|
-
}, [
|
|
4157
|
+
}, [activeResource, isOpen]);
|
|
4145
4158
|
const didEdit = useMemo9(() => {
|
|
4146
4159
|
if (wacResult?.type !== "getWacRuleSuccess") return false;
|
|
4147
4160
|
return !isEqual(editedRules, wacResult.wacRule);
|
|
@@ -4149,19 +4162,26 @@ var SharingModalProvider = ({
|
|
|
4149
4162
|
const context = useMemo9(
|
|
4150
4163
|
() => ({
|
|
4151
4164
|
isModalOpen: isOpen,
|
|
4152
|
-
openSharingModal: () =>
|
|
4153
|
-
|
|
4165
|
+
openSharingModal: (resource) => {
|
|
4166
|
+
setResourceOverride(resource);
|
|
4167
|
+
setIsOpen(true);
|
|
4168
|
+
},
|
|
4169
|
+
closeSharingModal: () => {
|
|
4170
|
+
setIsOpen(false);
|
|
4171
|
+
setResourceOverride(void 0);
|
|
4172
|
+
}
|
|
4154
4173
|
}),
|
|
4155
4174
|
[isOpen]
|
|
4156
4175
|
);
|
|
4157
4176
|
const onApplyChanges = useCallback8(async () => {
|
|
4158
|
-
if (didEdit && (
|
|
4177
|
+
if (didEdit && (activeResource?.type === "SolidContainer" || activeResource?.type === "SolidLeaf")) {
|
|
4159
4178
|
setIsLoading(true);
|
|
4160
|
-
const result = await
|
|
4179
|
+
const result = await activeResource.setWac(editedRules);
|
|
4161
4180
|
setIsLoading(false);
|
|
4162
4181
|
}
|
|
4163
4182
|
setIsOpen(false);
|
|
4164
|
-
|
|
4183
|
+
setResourceOverride(void 0);
|
|
4184
|
+
}, [editedRules, activeResource, didEdit]);
|
|
4165
4185
|
return /* @__PURE__ */ React32.createElement(sharingModalContext.Provider, { value: context }, /* @__PURE__ */ React32.createElement(Dialog, { open: isOpen, onOpenChange: (value) => setIsOpen(value) }, /* @__PURE__ */ React32.createElement(
|
|
4166
4186
|
DialogContent,
|
|
4167
4187
|
{
|
|
@@ -4198,7 +4218,6 @@ var styles23 = StyleSheet27.create({
|
|
|
4198
4218
|
scrollView: {
|
|
4199
4219
|
flex: 1,
|
|
4200
4220
|
borderTopWidth: 1,
|
|
4201
|
-
borderBottomWidth: 1,
|
|
4202
4221
|
paddingTop: 8,
|
|
4203
4222
|
paddingBottom: 8,
|
|
4204
4223
|
marginLeft: -24,
|
|
@@ -4212,29 +4231,22 @@ var styles23 = StyleSheet27.create({
|
|
|
4212
4231
|
var Header = () => {
|
|
4213
4232
|
const { session } = useSolidAuth6();
|
|
4214
4233
|
const { openSharingModal } = useSharingModal();
|
|
4215
|
-
const {
|
|
4216
|
-
|
|
4217
|
-
|
|
4234
|
+
const { targetResource } = useViewContext();
|
|
4235
|
+
const handleShare = () => {
|
|
4236
|
+
if (targetResource?.type === "SolidLeaf" || targetResource?.type === "SolidContainer") {
|
|
4237
|
+
openSharingModal(targetResource);
|
|
4238
|
+
}
|
|
4239
|
+
};
|
|
4240
|
+
return /* @__PURE__ */ React33.createElement(Card, { style: styles24.card }, /* @__PURE__ */ React33.createElement(AddressBox, null), session.isActive && /* @__PURE__ */ React33.createElement(
|
|
4241
|
+
Button,
|
|
4218
4242
|
{
|
|
4219
|
-
|
|
4220
|
-
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
|
|
4225
|
-
|
|
4226
|
-
Button,
|
|
4227
|
-
{
|
|
4228
|
-
key: "setMemu",
|
|
4229
|
-
variant: "ghost",
|
|
4230
|
-
style: styles24.shareButton,
|
|
4231
|
-
onPress: openSharingModal,
|
|
4232
|
-
iconLeft: UserPlus
|
|
4233
|
-
}
|
|
4234
|
-
),
|
|
4235
|
-
/* @__PURE__ */ React33.createElement(ViewMenu, null),
|
|
4236
|
-
session.isLoggedIn ? /* @__PURE__ */ React33.createElement(AvatarMenu, null) : /* @__PURE__ */ React33.createElement(SignInMenu, null)
|
|
4237
|
-
);
|
|
4243
|
+
key: "setMemu",
|
|
4244
|
+
variant: "ghost",
|
|
4245
|
+
style: styles24.shareButton,
|
|
4246
|
+
onPress: handleShare,
|
|
4247
|
+
iconLeft: UserPlus
|
|
4248
|
+
}
|
|
4249
|
+
), /* @__PURE__ */ React33.createElement(ViewMenu, null), session.isActive ? /* @__PURE__ */ React33.createElement(AvatarMenu, null) : /* @__PURE__ */ React33.createElement(SignInMenu, null));
|
|
4238
4250
|
};
|
|
4239
4251
|
var styles24 = StyleSheet28.create({
|
|
4240
4252
|
card: {
|
|
@@ -4337,11 +4349,11 @@ var DialogProvider = ({
|
|
|
4337
4349
|
|
|
4338
4350
|
// components/nav/Layout.tsx
|
|
4339
4351
|
import { useSolidAuth as useSolidAuth7 } from "@ldo/solid-react";
|
|
4340
|
-
import { useTheme as
|
|
4352
|
+
import { useTheme as useTheme18 } from "@react-navigation/native";
|
|
4341
4353
|
var ValidViewContext = createContext7({});
|
|
4342
4354
|
var Layout = () => {
|
|
4343
4355
|
const { ranInitialAuthCheck } = useSolidAuth7();
|
|
4344
|
-
const { colors } =
|
|
4356
|
+
const { colors } = useTheme18();
|
|
4345
4357
|
if (!ranInitialAuthCheck) {
|
|
4346
4358
|
return /* @__PURE__ */ React35.createElement(React35.Fragment, null);
|
|
4347
4359
|
}
|
|
@@ -4377,11 +4389,11 @@ var styles25 = StyleSheet29.create({
|
|
|
4377
4389
|
// components/DataBrowser.tsx
|
|
4378
4390
|
import { PortalHost } from "@rn-primitives/portal";
|
|
4379
4391
|
import { NotifierWrapper } from "react-native-notifier";
|
|
4380
|
-
import { Platform as
|
|
4392
|
+
import { Platform as Platform10 } from "react-native";
|
|
4381
4393
|
var DataBrowser = (props) => {
|
|
4382
4394
|
const providerProps = useMemo10(() => {
|
|
4383
4395
|
return {
|
|
4384
|
-
origin:
|
|
4396
|
+
origin: Platform10.OS === "web" && !props.origin ? window.location.origin : void 0,
|
|
4385
4397
|
defaultIssuer: props.mode === "server-ui" ? window.location.origin : "https://solidcommunity.net",
|
|
4386
4398
|
...props
|
|
4387
4399
|
};
|
|
@@ -4392,7 +4404,7 @@ var DataBrowser = (props) => {
|
|
|
4392
4404
|
// components/ui/accordion.tsx
|
|
4393
4405
|
import * as AccordionPrimitive from "@rn-primitives/accordion";
|
|
4394
4406
|
import * as React37 from "react";
|
|
4395
|
-
import { Platform as
|
|
4407
|
+
import { Platform as Platform11, Pressable as Pressable4, View as View19, StyleSheet as StyleSheet30 } from "react-native";
|
|
4396
4408
|
import Animated3, {
|
|
4397
4409
|
Extrapolation,
|
|
4398
4410
|
FadeIn as FadeIn2,
|
|
@@ -4405,7 +4417,7 @@ import Animated3, {
|
|
|
4405
4417
|
withTiming as withTiming2
|
|
4406
4418
|
} from "react-native-reanimated";
|
|
4407
4419
|
import { ChevronDown as ChevronDown3 } from "lucide-react-native";
|
|
4408
|
-
import { useTheme as
|
|
4420
|
+
import { useTheme as useTheme19 } from "@react-navigation/native";
|
|
4409
4421
|
function Accordion({
|
|
4410
4422
|
children,
|
|
4411
4423
|
...props
|
|
@@ -4414,7 +4426,7 @@ function Accordion({
|
|
|
4414
4426
|
AccordionPrimitive.Root,
|
|
4415
4427
|
{
|
|
4416
4428
|
...props,
|
|
4417
|
-
asChild:
|
|
4429
|
+
asChild: Platform11.OS !== "web"
|
|
4418
4430
|
},
|
|
4419
4431
|
/* @__PURE__ */ React37.createElement(Animated3.View, { layout: LinearTransition.duration(200) }, children)
|
|
4420
4432
|
));
|
|
@@ -4424,7 +4436,7 @@ function AccordionItem({
|
|
|
4424
4436
|
value,
|
|
4425
4437
|
...props
|
|
4426
4438
|
}) {
|
|
4427
|
-
const { colors } =
|
|
4439
|
+
const { colors } = useTheme19();
|
|
4428
4440
|
return /* @__PURE__ */ React37.createElement(
|
|
4429
4441
|
Animated3.View,
|
|
4430
4442
|
{
|
|
@@ -4445,13 +4457,13 @@ function AccordionItem({
|
|
|
4445
4457
|
)
|
|
4446
4458
|
);
|
|
4447
4459
|
}
|
|
4448
|
-
var Trigger4 =
|
|
4460
|
+
var Trigger4 = Platform11.OS === "web" ? View19 : Pressable4;
|
|
4449
4461
|
function AccordionTrigger({
|
|
4450
4462
|
style,
|
|
4451
4463
|
children,
|
|
4452
4464
|
...props
|
|
4453
4465
|
}) {
|
|
4454
|
-
const { colors } =
|
|
4466
|
+
const { colors } = useTheme19();
|
|
4455
4467
|
const { isExpanded } = AccordionPrimitive.useItemContext();
|
|
4456
4468
|
const progress = useDerivedValue2(
|
|
4457
4469
|
() => isExpanded ? withTiming2(1, { duration: 250 }) : withTiming2(0, { duration: 200 })
|
|
@@ -4461,7 +4473,7 @@ function AccordionTrigger({
|
|
|
4461
4473
|
opacity: interpolate(progress.value, [0, 1], [1, 0.8], Extrapolation.CLAMP)
|
|
4462
4474
|
}));
|
|
4463
4475
|
const textStyles2 = {
|
|
4464
|
-
fontSize:
|
|
4476
|
+
fontSize: Platform11.OS === "web" ? 16 : 18,
|
|
4465
4477
|
fontWeight: "500",
|
|
4466
4478
|
color: colors.text
|
|
4467
4479
|
};
|
|
@@ -4470,7 +4482,7 @@ function AccordionTrigger({
|
|
|
4470
4482
|
{
|
|
4471
4483
|
style: StyleSheet30.flatten([
|
|
4472
4484
|
styles26.trigger,
|
|
4473
|
-
{ flex:
|
|
4485
|
+
{ flex: Platform11.OS === "web" ? 1 : void 0 },
|
|
4474
4486
|
style
|
|
4475
4487
|
])
|
|
4476
4488
|
},
|
|
@@ -4483,9 +4495,9 @@ function AccordionContent({
|
|
|
4483
4495
|
children,
|
|
4484
4496
|
...props
|
|
4485
4497
|
}) {
|
|
4486
|
-
const { colors } =
|
|
4498
|
+
const { colors } = useTheme19();
|
|
4487
4499
|
const textStyles2 = {
|
|
4488
|
-
fontSize:
|
|
4500
|
+
fontSize: Platform11.OS === "web" ? 14 : 18,
|
|
4489
4501
|
color: colors.text
|
|
4490
4502
|
};
|
|
4491
4503
|
return /* @__PURE__ */ React37.createElement(TextStyleProvider, { style: textStyles2 }, /* @__PURE__ */ React37.createElement(
|
|
@@ -4505,7 +4517,7 @@ function InnerContent({
|
|
|
4505
4517
|
children,
|
|
4506
4518
|
style
|
|
4507
4519
|
}) {
|
|
4508
|
-
if (
|
|
4520
|
+
if (Platform11.OS === "web") {
|
|
4509
4521
|
return /* @__PURE__ */ React37.createElement(View19, { style: StyleSheet30.flatten([styles26.innerContent, style]) }, children);
|
|
4510
4522
|
}
|
|
4511
4523
|
return /* @__PURE__ */ React37.createElement(
|
|
@@ -4543,7 +4555,7 @@ var styles26 = StyleSheet30.create({
|
|
|
4543
4555
|
});
|
|
4544
4556
|
|
|
4545
4557
|
// components/ui/alert.tsx
|
|
4546
|
-
import { useTheme as
|
|
4558
|
+
import { useTheme as useTheme20 } from "@react-navigation/native";
|
|
4547
4559
|
import * as React38 from "react";
|
|
4548
4560
|
import { View as View20, StyleSheet as StyleSheet31 } from "react-native";
|
|
4549
4561
|
function Alert({
|
|
@@ -4554,7 +4566,7 @@ function Alert({
|
|
|
4554
4566
|
iconSize = 16,
|
|
4555
4567
|
...props
|
|
4556
4568
|
}) {
|
|
4557
|
-
const { colors } =
|
|
4569
|
+
const { colors } = useTheme20();
|
|
4558
4570
|
const getAlertStyles = () => {
|
|
4559
4571
|
const baseAlertStyles = {
|
|
4560
4572
|
backgroundColor: colors.background,
|
|
@@ -4572,7 +4584,7 @@ function Alert({
|
|
|
4572
4584
|
)), children);
|
|
4573
4585
|
}
|
|
4574
4586
|
function AlertTitle({ style, ...props }) {
|
|
4575
|
-
const { colors } =
|
|
4587
|
+
const { colors } = useTheme20();
|
|
4576
4588
|
return /* @__PURE__ */ React38.createElement(
|
|
4577
4589
|
Text2,
|
|
4578
4590
|
{
|
|
@@ -4585,7 +4597,7 @@ function AlertDescription({
|
|
|
4585
4597
|
style,
|
|
4586
4598
|
...props
|
|
4587
4599
|
}) {
|
|
4588
|
-
const { colors } =
|
|
4600
|
+
const { colors } = useTheme20();
|
|
4589
4601
|
return /* @__PURE__ */ React38.createElement(
|
|
4590
4602
|
Text2,
|
|
4591
4603
|
{
|
|
@@ -4645,9 +4657,9 @@ var AspectRatio = AspectRatioPrimitive.Root;
|
|
|
4645
4657
|
import React39 from "react";
|
|
4646
4658
|
import * as Slot2 from "@rn-primitives/slot";
|
|
4647
4659
|
import { View as View22, StyleSheet as StyleSheet32 } from "react-native";
|
|
4648
|
-
import { useTheme as
|
|
4660
|
+
import { useTheme as useTheme21 } from "@react-navigation/native";
|
|
4649
4661
|
function Badge({ style, variant = "default", asChild, ...props }) {
|
|
4650
|
-
const { colors } =
|
|
4662
|
+
const { colors } = useTheme21();
|
|
4651
4663
|
const Component = asChild ? Slot2.View : View22;
|
|
4652
4664
|
const getVariantStyles = () => {
|
|
4653
4665
|
switch (variant) {
|
|
@@ -4718,7 +4730,7 @@ var CollapsibleContent = CollapsiblePrimitive.Content;
|
|
|
4718
4730
|
import * as ContextMenuPrimitive from "@rn-primitives/context-menu";
|
|
4719
4731
|
import * as React40 from "react";
|
|
4720
4732
|
import {
|
|
4721
|
-
Platform as
|
|
4733
|
+
Platform as Platform12,
|
|
4722
4734
|
StyleSheet as StyleSheet33,
|
|
4723
4735
|
Text as Text5,
|
|
4724
4736
|
View as View23
|
|
@@ -4727,7 +4739,7 @@ import { Check as Check3 } from "lucide-react-native";
|
|
|
4727
4739
|
import { ChevronDown as ChevronDown4 } from "lucide-react-native";
|
|
4728
4740
|
import { ChevronRight as ChevronRight3 } from "lucide-react-native";
|
|
4729
4741
|
import { ChevronUp as ChevronUp2 } from "lucide-react-native";
|
|
4730
|
-
import { useTheme as
|
|
4742
|
+
import { useTheme as useTheme22 } from "@react-navigation/native";
|
|
4731
4743
|
var ContextMenu = ContextMenuPrimitive.Root;
|
|
4732
4744
|
var ContextMenuTrigger = ContextMenuPrimitive.Trigger;
|
|
4733
4745
|
var ContextMenuGroup = ContextMenuPrimitive.Group;
|
|
@@ -4739,11 +4751,11 @@ function ContextMenuSubTrigger({
|
|
|
4739
4751
|
children,
|
|
4740
4752
|
...props
|
|
4741
4753
|
}) {
|
|
4742
|
-
const { colors } =
|
|
4754
|
+
const { colors } = useTheme22();
|
|
4743
4755
|
const { open } = ContextMenuPrimitive.useSubContext();
|
|
4744
|
-
const Icon2 =
|
|
4756
|
+
const Icon2 = Platform12.OS === "web" ? ChevronRight3 : open ? ChevronUp2 : ChevronDown4;
|
|
4745
4757
|
const textStyles2 = {
|
|
4746
|
-
fontSize:
|
|
4758
|
+
fontSize: Platform12.OS === "web" ? 14 : 18,
|
|
4747
4759
|
color: open ? colors.primary : colors.primary
|
|
4748
4760
|
};
|
|
4749
4761
|
const triggerStyles = StyleSheet33.flatten([
|
|
@@ -4760,7 +4772,7 @@ function ContextMenuSubContent({
|
|
|
4760
4772
|
style,
|
|
4761
4773
|
...props
|
|
4762
4774
|
}) {
|
|
4763
|
-
const { colors } =
|
|
4775
|
+
const { colors } = useTheme22();
|
|
4764
4776
|
const contentStyles = StyleSheet33.flatten([
|
|
4765
4777
|
styles29.subContent,
|
|
4766
4778
|
{
|
|
@@ -4778,7 +4790,7 @@ function ContextMenuContent({
|
|
|
4778
4790
|
portalHost,
|
|
4779
4791
|
...props
|
|
4780
4792
|
}) {
|
|
4781
|
-
const { colors } =
|
|
4793
|
+
const { colors } = useTheme22();
|
|
4782
4794
|
const contentStyles = StyleSheet33.flatten([
|
|
4783
4795
|
styles29.content,
|
|
4784
4796
|
{
|
|
@@ -4792,9 +4804,9 @@ function ContextMenuContent({
|
|
|
4792
4804
|
ContextMenuPrimitive.Overlay,
|
|
4793
4805
|
{
|
|
4794
4806
|
style: overlayStyle ? StyleSheet33.flatten([
|
|
4795
|
-
|
|
4807
|
+
Platform12.OS !== "web" ? StyleSheet33.absoluteFill : void 0,
|
|
4796
4808
|
overlayStyle
|
|
4797
|
-
]) :
|
|
4809
|
+
]) : Platform12.OS !== "web" ? StyleSheet33.absoluteFill : void 0
|
|
4798
4810
|
},
|
|
4799
4811
|
/* @__PURE__ */ React40.createElement(ContextMenuPrimitive.Content, { style: contentStyles, ...props })
|
|
4800
4812
|
));
|
|
@@ -4804,9 +4816,9 @@ function ContextMenuItem({
|
|
|
4804
4816
|
inset,
|
|
4805
4817
|
...props
|
|
4806
4818
|
}) {
|
|
4807
|
-
const { colors } =
|
|
4819
|
+
const { colors } = useTheme22();
|
|
4808
4820
|
const textStyles2 = {
|
|
4809
|
-
fontSize:
|
|
4821
|
+
fontSize: Platform12.OS === "web" ? 14 : 18,
|
|
4810
4822
|
color: colors.text
|
|
4811
4823
|
};
|
|
4812
4824
|
const itemStyles = StyleSheet33.flatten([
|
|
@@ -4824,7 +4836,7 @@ function ContextMenuCheckboxItem({
|
|
|
4824
4836
|
children,
|
|
4825
4837
|
...props
|
|
4826
4838
|
}) {
|
|
4827
|
-
const { colors } =
|
|
4839
|
+
const { colors } = useTheme22();
|
|
4828
4840
|
const checkboxStyles = StyleSheet33.flatten([
|
|
4829
4841
|
styles29.checkboxItem,
|
|
4830
4842
|
{
|
|
@@ -4839,7 +4851,7 @@ function ContextMenuRadioItem({
|
|
|
4839
4851
|
children,
|
|
4840
4852
|
...props
|
|
4841
4853
|
}) {
|
|
4842
|
-
const { colors } =
|
|
4854
|
+
const { colors } = useTheme22();
|
|
4843
4855
|
const radioStyles = StyleSheet33.flatten([
|
|
4844
4856
|
styles29.radioItem,
|
|
4845
4857
|
{
|
|
@@ -4854,7 +4866,7 @@ function ContextMenuLabel({
|
|
|
4854
4866
|
inset,
|
|
4855
4867
|
...props
|
|
4856
4868
|
}) {
|
|
4857
|
-
const { colors } =
|
|
4869
|
+
const { colors } = useTheme22();
|
|
4858
4870
|
const labelStyles = StyleSheet33.flatten([
|
|
4859
4871
|
styles29.label,
|
|
4860
4872
|
{
|
|
@@ -4869,7 +4881,7 @@ function ContextMenuSeparator({
|
|
|
4869
4881
|
style,
|
|
4870
4882
|
...props
|
|
4871
4883
|
}) {
|
|
4872
|
-
const { colors } =
|
|
4884
|
+
const { colors } = useTheme22();
|
|
4873
4885
|
const separatorStyles = StyleSheet33.flatten([
|
|
4874
4886
|
styles29.separator,
|
|
4875
4887
|
{
|
|
@@ -4880,7 +4892,7 @@ function ContextMenuSeparator({
|
|
|
4880
4892
|
return /* @__PURE__ */ React40.createElement(ContextMenuPrimitive.Separator, { style: separatorStyles, ...props });
|
|
4881
4893
|
}
|
|
4882
4894
|
function ContextMenuShortcut({ style, ...props }) {
|
|
4883
|
-
const { colors } =
|
|
4895
|
+
const { colors } = useTheme22();
|
|
4884
4896
|
const shortcutStyles = StyleSheet33.flatten([
|
|
4885
4897
|
styles29.shortcut,
|
|
4886
4898
|
{
|
|
@@ -4975,7 +4987,7 @@ var styles29 = StyleSheet33.create({
|
|
|
4975
4987
|
label: {
|
|
4976
4988
|
paddingHorizontal: 8,
|
|
4977
4989
|
paddingVertical: 6,
|
|
4978
|
-
fontSize:
|
|
4990
|
+
fontSize: Platform12.OS === "web" ? 14 : 16,
|
|
4979
4991
|
fontWeight: "600"
|
|
4980
4992
|
},
|
|
4981
4993
|
separator: {
|
|
@@ -4985,7 +4997,7 @@ var styles29 = StyleSheet33.create({
|
|
|
4985
4997
|
},
|
|
4986
4998
|
shortcut: {
|
|
4987
4999
|
marginLeft: "auto",
|
|
4988
|
-
fontSize:
|
|
5000
|
+
fontSize: Platform12.OS === "web" ? 12 : 14,
|
|
4989
5001
|
letterSpacing: 1
|
|
4990
5002
|
}
|
|
4991
5003
|
});
|
|
@@ -4993,9 +5005,9 @@ var styles29 = StyleSheet33.create({
|
|
|
4993
5005
|
// components/ui/hover-card.tsx
|
|
4994
5006
|
import * as HoverCardPrimitive from "@rn-primitives/hover-card";
|
|
4995
5007
|
import * as React41 from "react";
|
|
4996
|
-
import { Platform as
|
|
5008
|
+
import { Platform as Platform13, StyleSheet as StyleSheet34 } from "react-native";
|
|
4997
5009
|
import Animated4, { FadeIn as FadeIn3 } from "react-native-reanimated";
|
|
4998
|
-
import { useTheme as
|
|
5010
|
+
import { useTheme as useTheme23 } from "@react-navigation/native";
|
|
4999
5011
|
var HoverCard = HoverCardPrimitive.Root;
|
|
5000
5012
|
var HoverCardTrigger = HoverCardPrimitive.Trigger;
|
|
5001
5013
|
function HoverCardContent({
|
|
@@ -5004,7 +5016,7 @@ function HoverCardContent({
|
|
|
5004
5016
|
sideOffset = 4,
|
|
5005
5017
|
...props
|
|
5006
5018
|
}) {
|
|
5007
|
-
const { colors } =
|
|
5019
|
+
const { colors } = useTheme23();
|
|
5008
5020
|
const contentStyles = StyleSheet34.flatten([
|
|
5009
5021
|
styles30.content,
|
|
5010
5022
|
{
|
|
@@ -5020,7 +5032,7 @@ function HoverCardContent({
|
|
|
5020
5032
|
return /* @__PURE__ */ React41.createElement(HoverCardPrimitive.Portal, null, /* @__PURE__ */ React41.createElement(
|
|
5021
5033
|
HoverCardPrimitive.Overlay,
|
|
5022
5034
|
{
|
|
5023
|
-
style:
|
|
5035
|
+
style: Platform13.OS !== "web" ? StyleSheet34.absoluteFill : void 0
|
|
5024
5036
|
},
|
|
5025
5037
|
/* @__PURE__ */ React41.createElement(Animated4.View, { entering: FadeIn3 }, /* @__PURE__ */ React41.createElement(TextStyleProvider, { style: textStyles2 }, /* @__PURE__ */ React41.createElement(
|
|
5026
5038
|
HoverCardPrimitive.Content,
|
|
@@ -5094,12 +5106,12 @@ var styles31 = StyleSheet35.create({
|
|
|
5094
5106
|
// components/ui/menubar.tsx
|
|
5095
5107
|
import * as MenubarPrimitive from "@rn-primitives/menubar";
|
|
5096
5108
|
import * as React43 from "react";
|
|
5097
|
-
import { Platform as
|
|
5109
|
+
import { Platform as Platform14, Text as Text7, View as View24, StyleSheet as StyleSheet36 } from "react-native";
|
|
5098
5110
|
import { Check as Check4 } from "lucide-react-native";
|
|
5099
5111
|
import { ChevronDown as ChevronDown5 } from "lucide-react-native";
|
|
5100
5112
|
import { ChevronRight as ChevronRight4 } from "lucide-react-native";
|
|
5101
5113
|
import { ChevronUp as ChevronUp3 } from "lucide-react-native";
|
|
5102
|
-
import { useTheme as
|
|
5114
|
+
import { useTheme as useTheme24 } from "@react-navigation/native";
|
|
5103
5115
|
var MenubarMenu = MenubarPrimitive.Menu;
|
|
5104
5116
|
var MenubarGroup = MenubarPrimitive.Group;
|
|
5105
5117
|
var MenubarPortal = MenubarPrimitive.Portal;
|
|
@@ -5109,7 +5121,7 @@ function Menubar({
|
|
|
5109
5121
|
style,
|
|
5110
5122
|
...props
|
|
5111
5123
|
}) {
|
|
5112
|
-
const { colors } =
|
|
5124
|
+
const { colors } = useTheme24();
|
|
5113
5125
|
const rootStyles = StyleSheet36.flatten([
|
|
5114
5126
|
styles32.root,
|
|
5115
5127
|
{
|
|
@@ -5124,7 +5136,7 @@ function MenubarTrigger({
|
|
|
5124
5136
|
style,
|
|
5125
5137
|
...props
|
|
5126
5138
|
}) {
|
|
5127
|
-
const { colors } =
|
|
5139
|
+
const { colors } = useTheme24();
|
|
5128
5140
|
const { value } = MenubarPrimitive.useRootContext();
|
|
5129
5141
|
const { value: itemValue } = MenubarPrimitive.useMenuContext();
|
|
5130
5142
|
const triggerStyles = StyleSheet36.flatten([
|
|
@@ -5143,11 +5155,11 @@ function MenubarSubTrigger({
|
|
|
5143
5155
|
children,
|
|
5144
5156
|
...props
|
|
5145
5157
|
}) {
|
|
5146
|
-
const { colors } =
|
|
5158
|
+
const { colors } = useTheme24();
|
|
5147
5159
|
const { open } = MenubarPrimitive.useSubContext();
|
|
5148
|
-
const Icon2 =
|
|
5160
|
+
const Icon2 = Platform14.OS === "web" ? ChevronRight4 : open ? ChevronUp3 : ChevronDown5;
|
|
5149
5161
|
const textStyles2 = {
|
|
5150
|
-
fontSize:
|
|
5162
|
+
fontSize: Platform14.OS === "web" ? 14 : 18,
|
|
5151
5163
|
color: open ? colors.primary : colors.primary
|
|
5152
5164
|
};
|
|
5153
5165
|
const triggerStyles = StyleSheet36.flatten([
|
|
@@ -5164,7 +5176,7 @@ function MenubarSubContent({
|
|
|
5164
5176
|
style,
|
|
5165
5177
|
...props
|
|
5166
5178
|
}) {
|
|
5167
|
-
const { colors } =
|
|
5179
|
+
const { colors } = useTheme24();
|
|
5168
5180
|
const contentStyles = StyleSheet36.flatten([
|
|
5169
5181
|
styles32.subContent,
|
|
5170
5182
|
{
|
|
@@ -5181,7 +5193,7 @@ function MenubarContent({
|
|
|
5181
5193
|
portalHost,
|
|
5182
5194
|
...props
|
|
5183
5195
|
}) {
|
|
5184
|
-
const { colors } =
|
|
5196
|
+
const { colors } = useTheme24();
|
|
5185
5197
|
const contentStyles = StyleSheet36.flatten([
|
|
5186
5198
|
styles32.content,
|
|
5187
5199
|
{
|
|
@@ -5198,9 +5210,9 @@ function MenubarItem({
|
|
|
5198
5210
|
inset,
|
|
5199
5211
|
...props
|
|
5200
5212
|
}) {
|
|
5201
|
-
const { colors } =
|
|
5213
|
+
const { colors } = useTheme24();
|
|
5202
5214
|
const textStyles2 = {
|
|
5203
|
-
fontSize:
|
|
5215
|
+
fontSize: Platform14.OS === "web" ? 14 : 18,
|
|
5204
5216
|
color: colors.text
|
|
5205
5217
|
};
|
|
5206
5218
|
const itemStyles = StyleSheet36.flatten([
|
|
@@ -5219,7 +5231,7 @@ function MenubarCheckboxItem({
|
|
|
5219
5231
|
checked,
|
|
5220
5232
|
...props
|
|
5221
5233
|
}) {
|
|
5222
|
-
const { colors } =
|
|
5234
|
+
const { colors } = useTheme24();
|
|
5223
5235
|
const checkboxStyles = StyleSheet36.flatten([
|
|
5224
5236
|
styles32.checkboxItem,
|
|
5225
5237
|
{
|
|
@@ -5243,7 +5255,7 @@ function MenubarRadioItem({
|
|
|
5243
5255
|
children,
|
|
5244
5256
|
...props
|
|
5245
5257
|
}) {
|
|
5246
|
-
const { colors } =
|
|
5258
|
+
const { colors } = useTheme24();
|
|
5247
5259
|
const radioStyles = StyleSheet36.flatten([
|
|
5248
5260
|
styles32.radioItem,
|
|
5249
5261
|
{
|
|
@@ -5258,7 +5270,7 @@ function MenubarLabel({
|
|
|
5258
5270
|
inset,
|
|
5259
5271
|
...props
|
|
5260
5272
|
}) {
|
|
5261
|
-
const { colors } =
|
|
5273
|
+
const { colors } = useTheme24();
|
|
5262
5274
|
const labelStyles = StyleSheet36.flatten([
|
|
5263
5275
|
styles32.label,
|
|
5264
5276
|
{
|
|
@@ -5273,7 +5285,7 @@ function MenubarSeparator({
|
|
|
5273
5285
|
style,
|
|
5274
5286
|
...props
|
|
5275
5287
|
}) {
|
|
5276
|
-
const { colors } =
|
|
5288
|
+
const { colors } = useTheme24();
|
|
5277
5289
|
const separatorStyles = StyleSheet36.flatten([
|
|
5278
5290
|
styles32.separator,
|
|
5279
5291
|
{
|
|
@@ -5284,7 +5296,7 @@ function MenubarSeparator({
|
|
|
5284
5296
|
return /* @__PURE__ */ React43.createElement(MenubarPrimitive.Separator, { style: separatorStyles, ...props });
|
|
5285
5297
|
}
|
|
5286
5298
|
function MenubarShortcut({ style, ...props }) {
|
|
5287
|
-
const { colors } =
|
|
5299
|
+
const { colors } = useTheme24();
|
|
5288
5300
|
const shortcutStyles = StyleSheet36.flatten([
|
|
5289
5301
|
styles32.shortcut,
|
|
5290
5302
|
{
|
|
@@ -5297,7 +5309,7 @@ function MenubarShortcut({ style, ...props }) {
|
|
|
5297
5309
|
var styles32 = StyleSheet36.create({
|
|
5298
5310
|
root: {
|
|
5299
5311
|
flexDirection: "row",
|
|
5300
|
-
height:
|
|
5312
|
+
height: Platform14.OS === "web" ? 40 : 48,
|
|
5301
5313
|
alignItems: "center",
|
|
5302
5314
|
gap: 4,
|
|
5303
5315
|
borderRadius: 6,
|
|
@@ -5310,7 +5322,7 @@ var styles32 = StyleSheet36.create({
|
|
|
5310
5322
|
borderRadius: 6,
|
|
5311
5323
|
paddingHorizontal: 12,
|
|
5312
5324
|
paddingVertical: 6,
|
|
5313
|
-
fontSize:
|
|
5325
|
+
fontSize: Platform14.OS === "web" ? 14 : 16,
|
|
5314
5326
|
fontWeight: "500"
|
|
5315
5327
|
},
|
|
5316
5328
|
subTrigger: {
|
|
@@ -5394,7 +5406,7 @@ var styles32 = StyleSheet36.create({
|
|
|
5394
5406
|
label: {
|
|
5395
5407
|
paddingHorizontal: 8,
|
|
5396
5408
|
paddingVertical: 6,
|
|
5397
|
-
fontSize:
|
|
5409
|
+
fontSize: Platform14.OS === "web" ? 14 : 16,
|
|
5398
5410
|
fontWeight: "600"
|
|
5399
5411
|
},
|
|
5400
5412
|
separator: {
|
|
@@ -5404,7 +5416,7 @@ var styles32 = StyleSheet36.create({
|
|
|
5404
5416
|
},
|
|
5405
5417
|
shortcut: {
|
|
5406
5418
|
marginLeft: "auto",
|
|
5407
|
-
fontSize:
|
|
5419
|
+
fontSize: Platform14.OS === "web" ? 12 : 14,
|
|
5408
5420
|
letterSpacing: 1
|
|
5409
5421
|
},
|
|
5410
5422
|
icon: {
|
|
@@ -5415,9 +5427,9 @@ var styles32 = StyleSheet36.create({
|
|
|
5415
5427
|
// components/ui/navigation-menu.tsx
|
|
5416
5428
|
import * as NavigationMenuPrimitive from "@rn-primitives/navigation-menu";
|
|
5417
5429
|
import * as React44 from "react";
|
|
5418
|
-
import { Platform as
|
|
5430
|
+
import { Platform as Platform15, View as View25, StyleSheet as StyleSheet37, Pressable as Pressable5 } from "react-native";
|
|
5419
5431
|
import { ChevronDown as ChevronDown6 } from "lucide-react-native";
|
|
5420
|
-
import { useTheme as
|
|
5432
|
+
import { useTheme as useTheme25 } from "@react-navigation/native";
|
|
5421
5433
|
function NavigationMenu({
|
|
5422
5434
|
style,
|
|
5423
5435
|
children,
|
|
@@ -5430,7 +5442,7 @@ function NavigationMenu({
|
|
|
5430
5442
|
...props
|
|
5431
5443
|
},
|
|
5432
5444
|
children,
|
|
5433
|
-
|
|
5445
|
+
Platform15.OS === "web" && /* @__PURE__ */ React44.createElement(NavigationMenuViewport, null)
|
|
5434
5446
|
);
|
|
5435
5447
|
}
|
|
5436
5448
|
function NavigationMenuList({
|
|
@@ -5451,7 +5463,7 @@ function NavigationMenuTrigger({
|
|
|
5451
5463
|
children,
|
|
5452
5464
|
...props
|
|
5453
5465
|
}) {
|
|
5454
|
-
const { colors } =
|
|
5466
|
+
const { colors } = useTheme25();
|
|
5455
5467
|
const { value } = NavigationMenuPrimitive.useRootContext();
|
|
5456
5468
|
const { value: itemValue } = NavigationMenuPrimitive.useItemContext();
|
|
5457
5469
|
const isActive = value === itemValue;
|
|
@@ -5475,7 +5487,7 @@ function NavigationMenuContent({
|
|
|
5475
5487
|
portalHost,
|
|
5476
5488
|
...props
|
|
5477
5489
|
}) {
|
|
5478
|
-
const { colors } =
|
|
5490
|
+
const { colors } = useTheme25();
|
|
5479
5491
|
return /* @__PURE__ */ React44.createElement(NavigationMenuPrimitive.Portal, { hostName: portalHost }, /* @__PURE__ */ React44.createElement(
|
|
5480
5492
|
NavigationMenuPrimitive.Content,
|
|
5481
5493
|
{
|
|
@@ -5497,7 +5509,7 @@ function NavigationMenuViewport({
|
|
|
5497
5509
|
style,
|
|
5498
5510
|
...props
|
|
5499
5511
|
}) {
|
|
5500
|
-
const { colors } =
|
|
5512
|
+
const { colors } = useTheme25();
|
|
5501
5513
|
return /* @__PURE__ */ React44.createElement(View25, { style: styles33.viewportContainer }, /* @__PURE__ */ React44.createElement(
|
|
5502
5514
|
View25,
|
|
5503
5515
|
{
|
|
@@ -5519,7 +5531,7 @@ function NavigationMenuIndicator({
|
|
|
5519
5531
|
style,
|
|
5520
5532
|
...props
|
|
5521
5533
|
}) {
|
|
5522
|
-
const { colors } =
|
|
5534
|
+
const { colors } = useTheme25();
|
|
5523
5535
|
return /* @__PURE__ */ React44.createElement(
|
|
5524
5536
|
NavigationMenuPrimitive.Indicator,
|
|
5525
5537
|
{
|
|
@@ -5553,14 +5565,14 @@ var styles33 = StyleSheet37.create({
|
|
|
5553
5565
|
alignItems: "center",
|
|
5554
5566
|
justifyContent: "center",
|
|
5555
5567
|
gap: 4,
|
|
5556
|
-
...
|
|
5568
|
+
...Platform15.OS === "web" && {
|
|
5557
5569
|
listStyle: "none"
|
|
5558
5570
|
}
|
|
5559
5571
|
},
|
|
5560
5572
|
trigger: {
|
|
5561
5573
|
flexDirection: "row",
|
|
5562
|
-
height:
|
|
5563
|
-
paddingHorizontal:
|
|
5574
|
+
height: Platform15.OS === "web" ? 40 : 48,
|
|
5575
|
+
paddingHorizontal: Platform15.OS === "web" ? 16 : 12,
|
|
5564
5576
|
paddingVertical: 8,
|
|
5565
5577
|
alignItems: "center",
|
|
5566
5578
|
justifyContent: "center",
|
|
@@ -5573,7 +5585,7 @@ var styles33 = StyleSheet37.create({
|
|
|
5573
5585
|
},
|
|
5574
5586
|
content: {
|
|
5575
5587
|
width: "100%",
|
|
5576
|
-
...
|
|
5588
|
+
...Platform15.OS !== "web" && {
|
|
5577
5589
|
borderWidth: 1,
|
|
5578
5590
|
borderRadius: 8,
|
|
5579
5591
|
shadowColor: "#000",
|
|
@@ -5585,7 +5597,7 @@ var styles33 = StyleSheet37.create({
|
|
|
5585
5597
|
}
|
|
5586
5598
|
},
|
|
5587
5599
|
viewportContainer: {
|
|
5588
|
-
...
|
|
5600
|
+
...Platform15.OS === "web" && {
|
|
5589
5601
|
position: "fixed",
|
|
5590
5602
|
right: 0,
|
|
5591
5603
|
top: 48,
|
|
@@ -5596,7 +5608,7 @@ var styles33 = StyleSheet37.create({
|
|
|
5596
5608
|
}
|
|
5597
5609
|
},
|
|
5598
5610
|
viewport: {
|
|
5599
|
-
...
|
|
5611
|
+
...Platform15.OS === "web" && {
|
|
5600
5612
|
position: "relative",
|
|
5601
5613
|
marginTop: 6,
|
|
5602
5614
|
width: "100%",
|
|
@@ -5638,9 +5650,9 @@ var styles33 = StyleSheet37.create({
|
|
|
5638
5650
|
// components/ui/popover.tsx
|
|
5639
5651
|
import React45 from "react";
|
|
5640
5652
|
import * as PopoverPrimitive from "@rn-primitives/popover";
|
|
5641
|
-
import { Platform as
|
|
5653
|
+
import { Platform as Platform16, StyleSheet as StyleSheet38 } from "react-native";
|
|
5642
5654
|
import Animated5, { FadeIn as FadeIn4, FadeOut as FadeOut2 } from "react-native-reanimated";
|
|
5643
|
-
import { useTheme as
|
|
5655
|
+
import { useTheme as useTheme26 } from "@react-navigation/native";
|
|
5644
5656
|
var Popover = PopoverPrimitive.Root;
|
|
5645
5657
|
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
5646
5658
|
function PopoverContent({
|
|
@@ -5650,7 +5662,7 @@ function PopoverContent({
|
|
|
5650
5662
|
portalHost,
|
|
5651
5663
|
...props
|
|
5652
5664
|
}) {
|
|
5653
|
-
const { colors } =
|
|
5665
|
+
const { colors } = useTheme26();
|
|
5654
5666
|
const contentStyles = StyleSheet38.flatten([
|
|
5655
5667
|
styles34.content,
|
|
5656
5668
|
{
|
|
@@ -5666,7 +5678,7 @@ function PopoverContent({
|
|
|
5666
5678
|
return /* @__PURE__ */ React45.createElement(PopoverPrimitive.Portal, { hostName: portalHost }, /* @__PURE__ */ React45.createElement(
|
|
5667
5679
|
PopoverPrimitive.Overlay,
|
|
5668
5680
|
{
|
|
5669
|
-
style:
|
|
5681
|
+
style: Platform16.OS !== "web" ? StyleSheet38.absoluteFill : void 0
|
|
5670
5682
|
},
|
|
5671
5683
|
/* @__PURE__ */ React45.createElement(Animated5.View, { entering: FadeIn4.duration(200), exiting: FadeOut2 }, /* @__PURE__ */ React45.createElement(TextStyleProvider, { style: textStyles2 }, /* @__PURE__ */ React45.createElement(
|
|
5672
5684
|
PopoverPrimitive.Content,
|
|
@@ -5696,7 +5708,7 @@ var styles34 = StyleSheet38.create({
|
|
|
5696
5708
|
// components/ui/progress.tsx
|
|
5697
5709
|
import * as ProgressPrimitive from "@rn-primitives/progress";
|
|
5698
5710
|
import * as React46 from "react";
|
|
5699
|
-
import { Platform as
|
|
5711
|
+
import { Platform as Platform17, View as View26, StyleSheet as StyleSheet39 } from "react-native";
|
|
5700
5712
|
import Animated6, {
|
|
5701
5713
|
Extrapolation as Extrapolation2,
|
|
5702
5714
|
interpolate as interpolate2,
|
|
@@ -5704,14 +5716,14 @@ import Animated6, {
|
|
|
5704
5716
|
useDerivedValue as useDerivedValue3,
|
|
5705
5717
|
withSpring
|
|
5706
5718
|
} from "react-native-reanimated";
|
|
5707
|
-
import { useTheme as
|
|
5719
|
+
import { useTheme as useTheme27 } from "@react-navigation/native";
|
|
5708
5720
|
function Progress({
|
|
5709
5721
|
style,
|
|
5710
5722
|
value,
|
|
5711
5723
|
indicatorStyle,
|
|
5712
5724
|
...props
|
|
5713
5725
|
}) {
|
|
5714
|
-
const { colors } =
|
|
5726
|
+
const { colors } = useTheme27();
|
|
5715
5727
|
const progressStyles = StyleSheet39.flatten([
|
|
5716
5728
|
styles35.progress,
|
|
5717
5729
|
{ backgroundColor: colors.border },
|
|
@@ -5723,7 +5735,7 @@ function Indicator4({
|
|
|
5723
5735
|
value,
|
|
5724
5736
|
style
|
|
5725
5737
|
}) {
|
|
5726
|
-
const { colors } =
|
|
5738
|
+
const { colors } = useTheme27();
|
|
5727
5739
|
const progress = useDerivedValue3(() => value ?? 0);
|
|
5728
5740
|
const indicator = useAnimatedStyle3(() => {
|
|
5729
5741
|
return {
|
|
@@ -5733,7 +5745,7 @@ function Indicator4({
|
|
|
5733
5745
|
)
|
|
5734
5746
|
};
|
|
5735
5747
|
});
|
|
5736
|
-
if (
|
|
5748
|
+
if (Platform17.OS === "web") {
|
|
5737
5749
|
return /* @__PURE__ */ React46.createElement(
|
|
5738
5750
|
View26,
|
|
5739
5751
|
{
|
|
@@ -5783,7 +5795,7 @@ var styles35 = StyleSheet39.create({
|
|
|
5783
5795
|
import React47 from "react";
|
|
5784
5796
|
import * as RadioGroupPrimitive from "@rn-primitives/radio-group";
|
|
5785
5797
|
import { View as View27, StyleSheet as StyleSheet40 } from "react-native";
|
|
5786
|
-
import { useTheme as
|
|
5798
|
+
import { useTheme as useTheme28 } from "@react-navigation/native";
|
|
5787
5799
|
function RadioGroup4({
|
|
5788
5800
|
style,
|
|
5789
5801
|
...props
|
|
@@ -5800,7 +5812,7 @@ function RadioGroupItem({
|
|
|
5800
5812
|
style,
|
|
5801
5813
|
...props
|
|
5802
5814
|
}) {
|
|
5803
|
-
const { colors } =
|
|
5815
|
+
const { colors } = useTheme28();
|
|
5804
5816
|
const itemStyles = StyleSheet40.flatten([
|
|
5805
5817
|
styles36.item,
|
|
5806
5818
|
{
|
|
@@ -5859,7 +5871,7 @@ var styles36 = StyleSheet40.create({
|
|
|
5859
5871
|
// components/ui/select.tsx
|
|
5860
5872
|
import * as SelectPrimitive from "@rn-primitives/select";
|
|
5861
5873
|
import * as React48 from "react";
|
|
5862
|
-
import { Platform as
|
|
5874
|
+
import { Platform as Platform18, StyleSheet as StyleSheet41, View as View28 } from "react-native";
|
|
5863
5875
|
import Animated7, { FadeIn as FadeIn5, FadeOut as FadeOut3 } from "react-native-reanimated";
|
|
5864
5876
|
import { Check as Check5 } from "lucide-react-native";
|
|
5865
5877
|
import { ChevronDown as ChevronDown7 } from "lucide-react-native";
|
|
@@ -5884,7 +5896,7 @@ function SelectScrollUpButton({
|
|
|
5884
5896
|
style,
|
|
5885
5897
|
...props
|
|
5886
5898
|
}) {
|
|
5887
|
-
if (
|
|
5899
|
+
if (Platform18.OS !== "web") {
|
|
5888
5900
|
return null;
|
|
5889
5901
|
}
|
|
5890
5902
|
return /* @__PURE__ */ React48.createElement(
|
|
@@ -5900,7 +5912,7 @@ function SelectScrollDownButton({
|
|
|
5900
5912
|
style,
|
|
5901
5913
|
...props
|
|
5902
5914
|
}) {
|
|
5903
|
-
if (
|
|
5915
|
+
if (Platform18.OS !== "web") {
|
|
5904
5916
|
return null;
|
|
5905
5917
|
}
|
|
5906
5918
|
return /* @__PURE__ */ React48.createElement(
|
|
@@ -5923,7 +5935,7 @@ function SelectContent({
|
|
|
5923
5935
|
return /* @__PURE__ */ React48.createElement(SelectPrimitive.Portal, { hostName: portalHost }, /* @__PURE__ */ React48.createElement(
|
|
5924
5936
|
SelectPrimitive.Overlay,
|
|
5925
5937
|
{
|
|
5926
|
-
style:
|
|
5938
|
+
style: Platform18.OS !== "web" ? StyleSheet41.absoluteFill : void 0
|
|
5927
5939
|
},
|
|
5928
5940
|
/* @__PURE__ */ React48.createElement(
|
|
5929
5941
|
Animated7.View,
|
|
@@ -6101,13 +6113,13 @@ import Animated8, {
|
|
|
6101
6113
|
withTiming as withTiming3
|
|
6102
6114
|
} from "react-native-reanimated";
|
|
6103
6115
|
import { StyleSheet as StyleSheet42 } from "react-native";
|
|
6104
|
-
import { useTheme as
|
|
6116
|
+
import { useTheme as useTheme29 } from "@react-navigation/native";
|
|
6105
6117
|
var duration = 1e3;
|
|
6106
6118
|
function Skeleton({
|
|
6107
6119
|
style,
|
|
6108
6120
|
...props
|
|
6109
6121
|
}) {
|
|
6110
|
-
const { colors } =
|
|
6122
|
+
const { colors } = useTheme29();
|
|
6111
6123
|
const sv = useSharedValue(1);
|
|
6112
6124
|
React49.useEffect(() => {
|
|
6113
6125
|
sv.value = withRepeat(
|
|
@@ -6393,7 +6405,7 @@ var styles41 = StyleSheet45.create({
|
|
|
6393
6405
|
// components/ui/toggle-group.tsx
|
|
6394
6406
|
import * as React53 from "react";
|
|
6395
6407
|
import { StyleSheet as StyleSheet46 } from "react-native";
|
|
6396
|
-
import { useTheme as
|
|
6408
|
+
import { useTheme as useTheme30 } from "@react-navigation/native";
|
|
6397
6409
|
import * as ToggleGroupPrimitive from "@rn-primitives/toggle-group";
|
|
6398
6410
|
var ToggleGroupContext = React53.createContext(null);
|
|
6399
6411
|
function ToggleGroup({
|
|
@@ -6428,7 +6440,7 @@ function ToggleGroupItem({
|
|
|
6428
6440
|
size,
|
|
6429
6441
|
...props
|
|
6430
6442
|
}) {
|
|
6431
|
-
const { colors } =
|
|
6443
|
+
const { colors } = useTheme30();
|
|
6432
6444
|
const context = useToggleGroupContext();
|
|
6433
6445
|
const { value } = ToggleGroupPrimitive.useRootContext();
|
|
6434
6446
|
const isSelected = ToggleGroupPrimitive.utils.getIsSelected(
|
|
@@ -6475,7 +6487,7 @@ function ToggleGroupIcon({
|
|
|
6475
6487
|
icon: Icon2,
|
|
6476
6488
|
...props
|
|
6477
6489
|
}) {
|
|
6478
|
-
const { colors } =
|
|
6490
|
+
const { colors } = useTheme30();
|
|
6479
6491
|
return /* @__PURE__ */ React53.createElement(Icon2, { color: colors.text, ...props });
|
|
6480
6492
|
}
|
|
6481
6493
|
var styles42 = StyleSheet46.create({
|
|
@@ -6515,7 +6527,7 @@ var styles42 = StyleSheet46.create({
|
|
|
6515
6527
|
import * as TogglePrimitive from "@rn-primitives/toggle";
|
|
6516
6528
|
import * as React54 from "react";
|
|
6517
6529
|
import { StyleSheet as StyleSheet47 } from "react-native";
|
|
6518
|
-
import { useTheme as
|
|
6530
|
+
import { useTheme as useTheme31 } from "@react-navigation/native";
|
|
6519
6531
|
var toggleVariants = {
|
|
6520
6532
|
default: {
|
|
6521
6533
|
backgroundColor: "transparent"
|
|
@@ -6535,7 +6547,7 @@ function Toggle({
|
|
|
6535
6547
|
size = "default",
|
|
6536
6548
|
...props
|
|
6537
6549
|
}) {
|
|
6538
|
-
const { colors } =
|
|
6550
|
+
const { colors } = useTheme31();
|
|
6539
6551
|
const textStyles2 = {
|
|
6540
6552
|
fontSize: size === "sm" ? 14 : size === "lg" ? 16 : 14,
|
|
6541
6553
|
fontWeight: "500",
|
|
@@ -6576,7 +6588,7 @@ function ToggleIcon({
|
|
|
6576
6588
|
icon: Icon2,
|
|
6577
6589
|
...props
|
|
6578
6590
|
}) {
|
|
6579
|
-
const { colors } =
|
|
6591
|
+
const { colors } = useTheme31();
|
|
6580
6592
|
return /* @__PURE__ */ React54.createElement(Icon2, { color: colors.text, ...props });
|
|
6581
6593
|
}
|
|
6582
6594
|
var styles43 = StyleSheet47.create({
|
|
@@ -6609,9 +6621,9 @@ var styles43 = StyleSheet47.create({
|
|
|
6609
6621
|
// components/ui/tooltip.tsx
|
|
6610
6622
|
import * as TooltipPrimitive from "@rn-primitives/tooltip";
|
|
6611
6623
|
import * as React55 from "react";
|
|
6612
|
-
import { Platform as
|
|
6624
|
+
import { Platform as Platform19, StyleSheet as StyleSheet48 } from "react-native";
|
|
6613
6625
|
import Animated9, { FadeIn as FadeIn6, FadeOut as FadeOut4 } from "react-native-reanimated";
|
|
6614
|
-
import { useTheme as
|
|
6626
|
+
import { useTheme as useTheme32 } from "@react-navigation/native";
|
|
6615
6627
|
var Tooltip = TooltipPrimitive.Root;
|
|
6616
6628
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
6617
6629
|
function TooltipContent({
|
|
@@ -6620,7 +6632,7 @@ function TooltipContent({
|
|
|
6620
6632
|
portalHost,
|
|
6621
6633
|
...props
|
|
6622
6634
|
}) {
|
|
6623
|
-
const { colors } =
|
|
6635
|
+
const { colors } = useTheme32();
|
|
6624
6636
|
const tooltipStyles = StyleSheet48.flatten([
|
|
6625
6637
|
styles44.content,
|
|
6626
6638
|
{
|
|
@@ -6631,19 +6643,19 @@ function TooltipContent({
|
|
|
6631
6643
|
style
|
|
6632
6644
|
]);
|
|
6633
6645
|
const textStyles2 = {
|
|
6634
|
-
fontSize:
|
|
6646
|
+
fontSize: Platform19.OS === "web" ? 14 : 16,
|
|
6635
6647
|
color: colors.text
|
|
6636
6648
|
};
|
|
6637
6649
|
return /* @__PURE__ */ React55.createElement(TooltipPrimitive.Portal, { hostName: portalHost }, /* @__PURE__ */ React55.createElement(
|
|
6638
6650
|
TooltipPrimitive.Overlay,
|
|
6639
6651
|
{
|
|
6640
|
-
style:
|
|
6652
|
+
style: Platform19.OS !== "web" ? StyleSheet48.absoluteFill : void 0
|
|
6641
6653
|
},
|
|
6642
6654
|
/* @__PURE__ */ React55.createElement(
|
|
6643
6655
|
Animated9.View,
|
|
6644
6656
|
{
|
|
6645
|
-
entering:
|
|
6646
|
-
exiting:
|
|
6657
|
+
entering: Platform19.select({ web: void 0, default: FadeIn6 }),
|
|
6658
|
+
exiting: Platform19.select({ web: void 0, default: FadeOut4 })
|
|
6647
6659
|
},
|
|
6648
6660
|
/* @__PURE__ */ React55.createElement(TextStyleProvider, { style: textStyles2 }, /* @__PURE__ */ React55.createElement(
|
|
6649
6661
|
TooltipPrimitive.Content,
|
|
@@ -6674,7 +6686,7 @@ var styles44 = StyleSheet48.create({
|
|
|
6674
6686
|
// components/ui/typography.tsx
|
|
6675
6687
|
import * as Slot3 from "@rn-primitives/slot";
|
|
6676
6688
|
import * as React56 from "react";
|
|
6677
|
-
import { Platform as
|
|
6689
|
+
import { Platform as Platform20, Text as RNText2, StyleSheet as StyleSheet49 } from "react-native";
|
|
6678
6690
|
function H1({ style, asChild = false, ...props }) {
|
|
6679
6691
|
const Component = asChild ? Slot3.Text : RNText2;
|
|
6680
6692
|
return /* @__PURE__ */ React56.createElement(
|
|
@@ -6732,7 +6744,7 @@ function BlockQuote({ style, asChild = false, ...props }) {
|
|
|
6732
6744
|
return /* @__PURE__ */ React56.createElement(
|
|
6733
6745
|
Component,
|
|
6734
6746
|
{
|
|
6735
|
-
role:
|
|
6747
|
+
role: Platform20.OS === "web" ? "blockquote" : void 0,
|
|
6736
6748
|
style: StyleSheet49.flatten([styles45.blockquote, style]),
|
|
6737
6749
|
...props
|
|
6738
6750
|
}
|
|
@@ -6743,7 +6755,7 @@ function Code({ style, asChild = false, ...props }) {
|
|
|
6743
6755
|
return /* @__PURE__ */ React56.createElement(
|
|
6744
6756
|
Component,
|
|
6745
6757
|
{
|
|
6746
|
-
role:
|
|
6758
|
+
role: Platform20.OS === "web" ? "code" : void 0,
|
|
6747
6759
|
style: StyleSheet49.flatten([styles45.code, style]),
|
|
6748
6760
|
...props
|
|
6749
6761
|
}
|
|
@@ -6858,11 +6870,11 @@ var ContainerResourceCreator = {
|
|
|
6858
6870
|
};
|
|
6859
6871
|
|
|
6860
6872
|
// resourceCreators/RdfResourceCreator.ts
|
|
6861
|
-
import {
|
|
6873
|
+
import { FileCode } from "lucide-react-native";
|
|
6862
6874
|
var RdfResourceCreator = {
|
|
6863
6875
|
name: "createRdf",
|
|
6864
6876
|
displayName: "RDF Turtle",
|
|
6865
|
-
displayIcon:
|
|
6877
|
+
displayIcon: FileCode,
|
|
6866
6878
|
canCreate: (container) => container.type === "SolidContainer",
|
|
6867
6879
|
create: async ({ container, createUtils }) => {
|
|
6868
6880
|
createUtils.loadingMessage("Asking for file name\u2026");
|
|
@@ -6880,6 +6892,7 @@ var RdfResourceCreator = {
|
|
|
6880
6892
|
|
|
6881
6893
|
// resourceCreators/FileUploadResourceCreator.ts
|
|
6882
6894
|
import { FileUp } from "lucide-react-native";
|
|
6895
|
+
import { Platform as Platform21 } from "react-native";
|
|
6883
6896
|
function basename(path) {
|
|
6884
6897
|
const lastSlash = path.lastIndexOf("/");
|
|
6885
6898
|
return lastSlash === -1 ? path : path.slice(lastSlash + 1);
|
|
@@ -6900,9 +6913,11 @@ var FileUploadResourceCreator = {
|
|
|
6900
6913
|
const slug = basename(file.name);
|
|
6901
6914
|
const mimeType = file.type || "application/octet-stream";
|
|
6902
6915
|
createUtils.loadingMessage(`Uploading ${slug}\u2026`);
|
|
6916
|
+
const body = Platform21.OS !== "web" ? await file.arrayBuffer() : file;
|
|
6903
6917
|
const result = await container.uploadChildAndOverwrite(
|
|
6904
6918
|
slug,
|
|
6905
|
-
|
|
6919
|
+
// @ts-ignore
|
|
6920
|
+
body,
|
|
6906
6921
|
mimeType
|
|
6907
6922
|
);
|
|
6908
6923
|
if (result.isError) {
|
|
@@ -6916,34 +6931,27 @@ var FileUploadResourceCreator = {
|
|
|
6916
6931
|
// resourceViews/Container/ContainerResourceView.tsx
|
|
6917
6932
|
import { Folders } from "lucide-react-native";
|
|
6918
6933
|
|
|
6934
|
+
// resourceViews/Container/DefaultContainerView.tsx
|
|
6935
|
+
import React62 from "react";
|
|
6936
|
+
|
|
6919
6937
|
// resourceViews/Container/ContainerView.tsx
|
|
6920
6938
|
import React57, {
|
|
6921
6939
|
useCallback as useCallback10,
|
|
6922
6940
|
useMemo as useMemo11,
|
|
6923
6941
|
useState as useState11
|
|
6924
6942
|
} from "react";
|
|
6925
|
-
import {
|
|
6926
|
-
View as View29,
|
|
6927
|
-
FlatList,
|
|
6928
|
-
StyleSheet as StyleSheet50,
|
|
6929
|
-
Pressable as Pressable6,
|
|
6930
|
-
ScrollView as ScrollView3,
|
|
6931
|
-
Platform as Platform22
|
|
6932
|
-
} from "react-native";
|
|
6943
|
+
import { Platform as Platform22 } from "react-native";
|
|
6933
6944
|
import * as DocumentPicker from "expo-document-picker";
|
|
6934
6945
|
import { CircleX as CircleX2 } from "lucide-react-native";
|
|
6935
|
-
import { Folder as Folder2 } from "lucide-react-native";
|
|
6936
|
-
import { Code as Code3 } from "lucide-react-native";
|
|
6937
|
-
import { File } from "lucide-react-native";
|
|
6938
|
-
import { Trash as Trash2 } from "lucide-react-native";
|
|
6939
|
-
import { Plus as Plus2 } from "lucide-react-native";
|
|
6940
6946
|
import { Notifier } from "react-native-notifier";
|
|
6941
|
-
|
|
6942
|
-
|
|
6943
|
-
|
|
6947
|
+
var ContainerView = ({
|
|
6948
|
+
Layout: Layout2,
|
|
6949
|
+
SideMenu,
|
|
6950
|
+
Content: Content13,
|
|
6951
|
+
ResourceItem
|
|
6952
|
+
}) => {
|
|
6944
6953
|
const { targetResource, navigateTo } = useViewContext();
|
|
6945
6954
|
const { prompt } = useDialog();
|
|
6946
|
-
const { colors } = useTheme34();
|
|
6947
6955
|
const { resourceCreators = [] } = useDataBrowserConfig();
|
|
6948
6956
|
const [isCreating, setIsCreating] = useState11(false);
|
|
6949
6957
|
const [loadingMessages, setLoadingMessages] = useState11([]);
|
|
@@ -6987,10 +6995,7 @@ var ContainerView = () => {
|
|
|
6987
6995
|
setIsCreating(true);
|
|
6988
6996
|
setLoadingMessages([]);
|
|
6989
6997
|
try {
|
|
6990
|
-
await creator.create({
|
|
6991
|
-
container: targetResource,
|
|
6992
|
-
createUtils
|
|
6993
|
-
});
|
|
6998
|
+
await creator.create({ container: targetResource, createUtils });
|
|
6994
6999
|
} finally {
|
|
6995
7000
|
setIsCreating(false);
|
|
6996
7001
|
setLoadingMessages([]);
|
|
@@ -7001,9 +7006,8 @@ var ContainerView = () => {
|
|
|
7001
7006
|
const onDelete = useCallback10(
|
|
7002
7007
|
async (item) => {
|
|
7003
7008
|
if (targetResource?.type !== "SolidContainer") return;
|
|
7004
|
-
const
|
|
7005
|
-
if (
|
|
7006
|
-
Notifier.showNotification({ title: createResult.message });
|
|
7009
|
+
const result = await item.delete();
|
|
7010
|
+
if (result.isError) Notifier.showNotification({ title: result.message });
|
|
7007
7011
|
},
|
|
7008
7012
|
[targetResource?.type]
|
|
7009
7013
|
);
|
|
@@ -7016,100 +7020,159 @@ var ContainerView = () => {
|
|
|
7016
7020
|
}
|
|
7017
7021
|
);
|
|
7018
7022
|
}
|
|
7019
|
-
|
|
7023
|
+
const renderResource = (item) => {
|
|
7024
|
+
const displayName = item.uri.replace(targetResource.uri, "").replace(/\/$/, "") || "/";
|
|
7025
|
+
return /* @__PURE__ */ React57.createElement(
|
|
7026
|
+
ResourceItem,
|
|
7027
|
+
{
|
|
7028
|
+
key: item.uri,
|
|
7029
|
+
item,
|
|
7030
|
+
displayName,
|
|
7031
|
+
onNavigate: () => navigateTo(item.uri),
|
|
7032
|
+
onDelete: () => onDelete(item)
|
|
7033
|
+
}
|
|
7034
|
+
);
|
|
7035
|
+
};
|
|
7036
|
+
return /* @__PURE__ */ React57.createElement(
|
|
7037
|
+
Layout2,
|
|
7038
|
+
{
|
|
7039
|
+
sideMenu: /* @__PURE__ */ React57.createElement(
|
|
7040
|
+
SideMenu,
|
|
7041
|
+
{
|
|
7042
|
+
creators: availableCreators,
|
|
7043
|
+
isCreating,
|
|
7044
|
+
loadingMessages,
|
|
7045
|
+
onCreate: runCreator
|
|
7046
|
+
}
|
|
7047
|
+
),
|
|
7048
|
+
content: /* @__PURE__ */ React57.createElement(
|
|
7049
|
+
Content13,
|
|
7050
|
+
{
|
|
7051
|
+
resources: targetResource.children(),
|
|
7052
|
+
renderResource,
|
|
7053
|
+
creatorsAvailable: availableCreators.length > 0
|
|
7054
|
+
}
|
|
7055
|
+
)
|
|
7056
|
+
}
|
|
7057
|
+
);
|
|
7058
|
+
};
|
|
7059
|
+
|
|
7060
|
+
// resourceViews/Container/DefaultContainerLayout.tsx
|
|
7061
|
+
import React58 from "react";
|
|
7062
|
+
import { View as View29, StyleSheet as StyleSheet50 } from "react-native";
|
|
7063
|
+
import { useTheme as useTheme33 } from "@react-navigation/native";
|
|
7064
|
+
var DefaultContainerLayout = ({ sideMenu, content }) => {
|
|
7065
|
+
const { colors } = useTheme33();
|
|
7066
|
+
return /* @__PURE__ */ React58.createElement(View29, { style: [styles46.container, { backgroundColor: colors.card }] }, /* @__PURE__ */ React58.createElement(View29, { style: styles46.leftPanel }, sideMenu), /* @__PURE__ */ React58.createElement(View29, { style: [styles46.rightPanel, { backgroundColor: colors.background }] }, content));
|
|
7067
|
+
};
|
|
7068
|
+
var styles46 = StyleSheet50.create({
|
|
7069
|
+
container: {
|
|
7070
|
+
flex: 1,
|
|
7071
|
+
flexDirection: "row",
|
|
7072
|
+
paddingTop: 16
|
|
7073
|
+
},
|
|
7074
|
+
leftPanel: {
|
|
7075
|
+
maxWidth: 220,
|
|
7076
|
+
flex: 1,
|
|
7077
|
+
paddingHorizontal: 16,
|
|
7078
|
+
paddingBottom: 16
|
|
7079
|
+
},
|
|
7080
|
+
rightPanel: {
|
|
7081
|
+
flex: 3,
|
|
7082
|
+
borderTopLeftRadius: 12
|
|
7083
|
+
}
|
|
7084
|
+
});
|
|
7085
|
+
|
|
7086
|
+
// resourceViews/Container/DefaultContainerSideMenu.tsx
|
|
7087
|
+
import React59 from "react";
|
|
7088
|
+
import { View as View30, ScrollView as ScrollView3, StyleSheet as StyleSheet51 } from "react-native";
|
|
7089
|
+
import { Plus as Plus2, Loader2, Home, User as User2 } from "lucide-react-native";
|
|
7090
|
+
import { useTheme as useTheme34 } from "@react-navigation/native";
|
|
7091
|
+
import { useSolidAuth as useSolidAuth8, useRootContainerFor } from "@ldo/solid-react";
|
|
7092
|
+
var DefaultContainerSideMenu = ({ creators, isCreating, loadingMessages, onCreate }) => {
|
|
7093
|
+
const { colors } = useTheme34();
|
|
7094
|
+
const { session } = useSolidAuth8();
|
|
7095
|
+
const storageRoot = useRootContainerFor(session.webId);
|
|
7096
|
+
const { navigateTo } = useTargetResource();
|
|
7097
|
+
return /* @__PURE__ */ React59.createElement(React59.Fragment, null, /* @__PURE__ */ React59.createElement(DropdownMenu, null, /* @__PURE__ */ React59.createElement(DropdownMenuTrigger, { asChild: true }, /* @__PURE__ */ React59.createElement(
|
|
7020
7098
|
Button,
|
|
7021
7099
|
{
|
|
7022
7100
|
text: "Create",
|
|
7023
7101
|
iconLeft: Plus2,
|
|
7024
|
-
disabled: isCreating ||
|
|
7102
|
+
disabled: isCreating || creators.length === 0
|
|
7025
7103
|
}
|
|
7026
|
-
)), /* @__PURE__ */
|
|
7027
|
-
|
|
7104
|
+
)), /* @__PURE__ */ React59.createElement(
|
|
7105
|
+
DropdownMenuContent,
|
|
7028
7106
|
{
|
|
7029
|
-
|
|
7030
|
-
|
|
7107
|
+
align: "start",
|
|
7108
|
+
sideOffset: 4,
|
|
7109
|
+
style: styles47.dropdownContent
|
|
7031
7110
|
},
|
|
7032
|
-
/* @__PURE__ */
|
|
7033
|
-
|
|
7034
|
-
|
|
7035
|
-
|
|
7111
|
+
creators.map((creator) => /* @__PURE__ */ React59.createElement(
|
|
7112
|
+
DropdownMenuItem,
|
|
7113
|
+
{
|
|
7114
|
+
key: creator.name,
|
|
7115
|
+
onPress: () => onCreate(creator)
|
|
7116
|
+
},
|
|
7117
|
+
/* @__PURE__ */ React59.createElement(Icon, { icon: creator.displayIcon }),
|
|
7118
|
+
/* @__PURE__ */ React59.createElement(Text2, null, creator.displayName)
|
|
7119
|
+
))
|
|
7120
|
+
)), isCreating && /* @__PURE__ */ React59.createElement(
|
|
7121
|
+
View30,
|
|
7036
7122
|
{
|
|
7037
|
-
style: [
|
|
7123
|
+
style: [styles47.creatingPanel, { backgroundColor: colors.border }]
|
|
7038
7124
|
},
|
|
7039
|
-
/* @__PURE__ */
|
|
7040
|
-
loadingMessages.length > 0 && /* @__PURE__ */
|
|
7125
|
+
/* @__PURE__ */ React59.createElement(View30, { style: styles47.creatingHeader }, /* @__PURE__ */ React59.createElement(Loader2, { size: 16, style: styles47.spinner }), /* @__PURE__ */ React59.createElement(Text2, null, "Creating\u2026")),
|
|
7126
|
+
loadingMessages.length > 0 && /* @__PURE__ */ React59.createElement(
|
|
7041
7127
|
ScrollView3,
|
|
7042
7128
|
{
|
|
7043
|
-
style:
|
|
7044
|
-
contentContainerStyle:
|
|
7129
|
+
style: styles47.loadingMessages,
|
|
7130
|
+
contentContainerStyle: styles47.loadingMessagesContent
|
|
7045
7131
|
},
|
|
7046
|
-
loadingMessages.map((msg, i) => /* @__PURE__ */
|
|
7132
|
+
loadingMessages.map((msg, i) => /* @__PURE__ */ React59.createElement(Text2, { key: i, style: styles47.loadingMessageItem }, msg))
|
|
7047
7133
|
)
|
|
7048
|
-
)
|
|
7049
|
-
|
|
7134
|
+
), session.isActive && /* @__PURE__ */ React59.createElement(React59.Fragment, null, /* @__PURE__ */ React59.createElement(
|
|
7135
|
+
View30,
|
|
7050
7136
|
{
|
|
7051
|
-
style: [
|
|
7052
|
-
|
|
7053
|
-
|
|
7054
|
-
|
|
7055
|
-
|
|
7056
|
-
|
|
7057
|
-
|
|
7058
|
-
|
|
7059
|
-
|
|
7060
|
-
|
|
7061
|
-
|
|
7062
|
-
|
|
7063
|
-
|
|
7064
|
-
|
|
7065
|
-
|
|
7066
|
-
|
|
7067
|
-
|
|
7068
|
-
|
|
7069
|
-
|
|
7070
|
-
|
|
7071
|
-
|
|
7072
|
-
{
|
|
7073
|
-
onPress: () => navigateTo(item.uri),
|
|
7074
|
-
style: ({ hovered }) => [
|
|
7075
|
-
styles46.listItemRow,
|
|
7076
|
-
hovered && { backgroundColor: colors.border }
|
|
7077
|
-
]
|
|
7078
|
-
},
|
|
7079
|
-
/* @__PURE__ */ React57.createElement(View29, { style: styles46.listItem }, /* @__PURE__ */ React57.createElement(View29, { style: styles46.listItemText }, /* @__PURE__ */ React57.createElement(Icon, { icon: TypeIcon, size: 18 }), /* @__PURE__ */ React57.createElement(
|
|
7080
|
-
Text2,
|
|
7081
|
-
{
|
|
7082
|
-
style: styles46.listItemLabel,
|
|
7083
|
-
numberOfLines: 1,
|
|
7084
|
-
ellipsizeMode: "middle"
|
|
7085
|
-
},
|
|
7086
|
-
displayName
|
|
7087
|
-
)), /* @__PURE__ */ React57.createElement(
|
|
7088
|
-
Button,
|
|
7089
|
-
{
|
|
7090
|
-
variant: "ghost",
|
|
7091
|
-
size: "icon",
|
|
7092
|
-
style: styles46.deleteButton,
|
|
7093
|
-
onPress: () => onDelete(item),
|
|
7094
|
-
iconLeft: Trash2
|
|
7095
|
-
}
|
|
7096
|
-
))
|
|
7097
|
-
);
|
|
7098
|
-
}
|
|
7099
|
-
}
|
|
7100
|
-
)
|
|
7101
|
-
));
|
|
7137
|
+
style: [styles47.separator, { backgroundColor: colors.border }]
|
|
7138
|
+
}
|
|
7139
|
+
), /* @__PURE__ */ React59.createElement(View30, { style: styles47.navSection }, storageRoot && /* @__PURE__ */ React59.createElement(
|
|
7140
|
+
Button,
|
|
7141
|
+
{
|
|
7142
|
+
variant: "ghost",
|
|
7143
|
+
iconLeft: Home,
|
|
7144
|
+
text: "Home",
|
|
7145
|
+
style: styles47.navItem,
|
|
7146
|
+
onPress: () => navigateTo(storageRoot.uri)
|
|
7147
|
+
}
|
|
7148
|
+
), /* @__PURE__ */ React59.createElement(
|
|
7149
|
+
Button,
|
|
7150
|
+
{
|
|
7151
|
+
variant: "ghost",
|
|
7152
|
+
iconLeft: User2,
|
|
7153
|
+
text: "Profile",
|
|
7154
|
+
style: styles47.navItem,
|
|
7155
|
+
onPress: () => navigateTo(session.webId ?? "")
|
|
7156
|
+
}
|
|
7157
|
+
))));
|
|
7102
7158
|
};
|
|
7103
|
-
var
|
|
7104
|
-
|
|
7105
|
-
|
|
7106
|
-
|
|
7159
|
+
var styles47 = StyleSheet51.create({
|
|
7160
|
+
navSection: {
|
|
7161
|
+
gap: 2,
|
|
7162
|
+
marginBottom: 4
|
|
7107
7163
|
},
|
|
7108
|
-
|
|
7109
|
-
|
|
7110
|
-
|
|
7111
|
-
|
|
7112
|
-
|
|
7164
|
+
navItem: {
|
|
7165
|
+
justifyContent: "flex-start",
|
|
7166
|
+
paddingHorizontal: 8
|
|
7167
|
+
},
|
|
7168
|
+
separator: {
|
|
7169
|
+
height: 1,
|
|
7170
|
+
marginBottom: 12
|
|
7171
|
+
},
|
|
7172
|
+
dropdownContent: {
|
|
7173
|
+
minWidth: 220,
|
|
7174
|
+
paddingVertical: 6,
|
|
7175
|
+
paddingHorizontal: 6
|
|
7113
7176
|
},
|
|
7114
7177
|
creatingPanel: {
|
|
7115
7178
|
marginTop: 12,
|
|
@@ -7134,69 +7197,180 @@ var styles46 = StyleSheet50.create({
|
|
|
7134
7197
|
loadingMessageItem: {
|
|
7135
7198
|
fontSize: 12,
|
|
7136
7199
|
opacity: 0.85
|
|
7200
|
+
}
|
|
7201
|
+
});
|
|
7202
|
+
|
|
7203
|
+
// resourceViews/Container/DefaultContainerContent.tsx
|
|
7204
|
+
import React60 from "react";
|
|
7205
|
+
import { View as View31, FlatList, StyleSheet as StyleSheet52 } from "react-native";
|
|
7206
|
+
import { FolderOpen } from "lucide-react-native";
|
|
7207
|
+
import { useTheme as useTheme35 } from "@react-navigation/native";
|
|
7208
|
+
var DefaultContainerContent = ({ resources, renderResource, creatorsAvailable }) => {
|
|
7209
|
+
const { colors } = useTheme35();
|
|
7210
|
+
const emptyState = /* @__PURE__ */ React60.createElement(View31, { style: styles48.emptyState }, /* @__PURE__ */ React60.createElement(View31, { style: styles48.emptyStateIcon }, /* @__PURE__ */ React60.createElement(FolderOpen, { size: 40, color: colors.text })), /* @__PURE__ */ React60.createElement(Text2, { muted: true }, "This container is empty"), creatorsAvailable && /* @__PURE__ */ React60.createElement(Text2, { muted: true, size: "sm" }, "Use Create to add resources"));
|
|
7211
|
+
return /* @__PURE__ */ React60.createElement(
|
|
7212
|
+
FlatList,
|
|
7213
|
+
{
|
|
7214
|
+
data: resources,
|
|
7215
|
+
keyExtractor: (item) => item.uri,
|
|
7216
|
+
style: styles48.list,
|
|
7217
|
+
contentContainerStyle: styles48.listContent,
|
|
7218
|
+
ListEmptyComponent: /* @__PURE__ */ React60.createElement(React60.Fragment, null, emptyState),
|
|
7219
|
+
ItemSeparatorComponent: () => /* @__PURE__ */ React60.createElement(View31, { style: [styles48.separator, { backgroundColor: colors.border }] }),
|
|
7220
|
+
renderItem: ({ item }) => renderResource(item)
|
|
7221
|
+
}
|
|
7222
|
+
);
|
|
7223
|
+
};
|
|
7224
|
+
var styles48 = StyleSheet52.create({
|
|
7225
|
+
list: {
|
|
7226
|
+
flex: 1
|
|
7137
7227
|
},
|
|
7138
|
-
|
|
7139
|
-
|
|
7228
|
+
listContent: {
|
|
7229
|
+
flexGrow: 1,
|
|
7230
|
+
paddingHorizontal: 16,
|
|
7231
|
+
paddingVertical: 8
|
|
7140
7232
|
},
|
|
7141
|
-
|
|
7142
|
-
|
|
7143
|
-
|
|
7144
|
-
|
|
7233
|
+
emptyState: {
|
|
7234
|
+
flex: 1,
|
|
7235
|
+
alignItems: "center",
|
|
7236
|
+
justifyContent: "center",
|
|
7237
|
+
gap: 4,
|
|
7238
|
+
paddingVertical: 48
|
|
7239
|
+
},
|
|
7240
|
+
emptyStateIcon: {
|
|
7241
|
+
opacity: 0.2,
|
|
7242
|
+
marginBottom: 8
|
|
7145
7243
|
},
|
|
7146
|
-
|
|
7244
|
+
separator: {
|
|
7147
7245
|
height: 1,
|
|
7148
7246
|
width: "100%"
|
|
7149
|
-
}
|
|
7150
|
-
|
|
7247
|
+
}
|
|
7248
|
+
});
|
|
7249
|
+
|
|
7250
|
+
// resourceViews/Container/DefaultContainerResourceItem.tsx
|
|
7251
|
+
import React61, { useCallback as useCallback11 } from "react";
|
|
7252
|
+
import { View as View32, Pressable as Pressable6, StyleSheet as StyleSheet53, Platform as Platform23 } from "react-native";
|
|
7253
|
+
import {
|
|
7254
|
+
Folder as Folder2,
|
|
7255
|
+
Code as Code2,
|
|
7256
|
+
File,
|
|
7257
|
+
MoreHorizontal,
|
|
7258
|
+
Download,
|
|
7259
|
+
Share2,
|
|
7260
|
+
Trash as Trash2
|
|
7261
|
+
} from "lucide-react-native";
|
|
7262
|
+
import { useTheme as useTheme36 } from "@react-navigation/native";
|
|
7263
|
+
import { useSolidAuth as useSolidAuth9 } from "@ldo/solid-react";
|
|
7264
|
+
import { Notifier as Notifier2 } from "react-native-notifier";
|
|
7265
|
+
var DefaultContainerResourceItem = ({ item, displayName, onNavigate, onDelete }) => {
|
|
7266
|
+
const { colors } = useTheme36();
|
|
7267
|
+
const { fetch: fetch2 } = useSolidAuth9();
|
|
7268
|
+
const { openSharingModal } = useSharingModal();
|
|
7269
|
+
const TypeIcon = item.type === "SolidContainer" ? Folder2 : item.uri.endsWith(".ttl") ? Code2 : File;
|
|
7270
|
+
const handleDownload = useCallback11(async () => {
|
|
7271
|
+
if (item.type !== "SolidLeaf") return;
|
|
7272
|
+
if (Platform23.OS !== "web") {
|
|
7273
|
+
Notifier2.showNotification({ title: "Download is only available on web" });
|
|
7274
|
+
return;
|
|
7275
|
+
}
|
|
7276
|
+
const response = await fetch2(item.uri);
|
|
7277
|
+
const blob = await response.blob();
|
|
7278
|
+
const url = URL.createObjectURL(blob);
|
|
7279
|
+
const a = document.createElement("a");
|
|
7280
|
+
a.href = url;
|
|
7281
|
+
a.download = displayName;
|
|
7282
|
+
document.body.appendChild(a);
|
|
7283
|
+
a.click();
|
|
7284
|
+
document.body.removeChild(a);
|
|
7285
|
+
URL.revokeObjectURL(url);
|
|
7286
|
+
}, [item, displayName, fetch2]);
|
|
7287
|
+
const handleShare = useCallback11(() => {
|
|
7288
|
+
if (item.type === "SolidLeaf" || item.type === "SolidContainer") {
|
|
7289
|
+
openSharingModal(item);
|
|
7290
|
+
}
|
|
7291
|
+
}, [item, openSharingModal]);
|
|
7292
|
+
return /* @__PURE__ */ React61.createElement(
|
|
7293
|
+
Pressable6,
|
|
7294
|
+
{
|
|
7295
|
+
onPress: onNavigate,
|
|
7296
|
+
style: ({ hovered }) => [
|
|
7297
|
+
styles49.row,
|
|
7298
|
+
hovered && { backgroundColor: colors.border }
|
|
7299
|
+
]
|
|
7300
|
+
},
|
|
7301
|
+
/* @__PURE__ */ React61.createElement(View32, { style: styles49.inner }, /* @__PURE__ */ React61.createElement(View32, { style: styles49.label }, /* @__PURE__ */ React61.createElement(Icon, { icon: TypeIcon, size: 18 }), /* @__PURE__ */ React61.createElement(Text2, { style: styles49.name, numberOfLines: 1, ellipsizeMode: "middle" }, displayName)), /* @__PURE__ */ React61.createElement(DropdownMenu, null, /* @__PURE__ */ React61.createElement(DropdownMenuTrigger, { asChild: true }, /* @__PURE__ */ React61.createElement(
|
|
7302
|
+
Button,
|
|
7303
|
+
{
|
|
7304
|
+
variant: "ghost",
|
|
7305
|
+
size: "icon",
|
|
7306
|
+
style: styles49.actionButton,
|
|
7307
|
+
iconLeft: MoreHorizontal
|
|
7308
|
+
}
|
|
7309
|
+
)), /* @__PURE__ */ React61.createElement(DropdownMenuContent, { align: "end", sideOffset: 4 }, item.type === "SolidLeaf" && /* @__PURE__ */ React61.createElement(DropdownMenuItem, { onPress: handleDownload }, /* @__PURE__ */ React61.createElement(Icon, { icon: Download }), /* @__PURE__ */ React61.createElement(Text2, null, "Download")), /* @__PURE__ */ React61.createElement(DropdownMenuItem, { onPress: handleShare }, /* @__PURE__ */ React61.createElement(Icon, { icon: Share2 }), /* @__PURE__ */ React61.createElement(Text2, null, "Share")), /* @__PURE__ */ React61.createElement(DropdownMenuSeparator, null), /* @__PURE__ */ React61.createElement(DropdownMenuItem, { onPress: onDelete }, /* @__PURE__ */ React61.createElement(Icon, { icon: Trash2 }), /* @__PURE__ */ React61.createElement(Text2, { style: { color: colors.notification } }, "Delete")))))
|
|
7310
|
+
);
|
|
7311
|
+
};
|
|
7312
|
+
var styles49 = StyleSheet53.create({
|
|
7313
|
+
row: {
|
|
7151
7314
|
minHeight: 48,
|
|
7152
7315
|
justifyContent: "center"
|
|
7153
7316
|
},
|
|
7154
|
-
|
|
7317
|
+
inner: {
|
|
7155
7318
|
flexDirection: "row",
|
|
7156
7319
|
paddingHorizontal: 16,
|
|
7157
7320
|
paddingVertical: 12,
|
|
7158
7321
|
justifyContent: "space-between",
|
|
7159
7322
|
alignItems: "center"
|
|
7160
7323
|
},
|
|
7161
|
-
|
|
7324
|
+
label: {
|
|
7162
7325
|
flexDirection: "row",
|
|
7163
7326
|
alignItems: "center",
|
|
7164
7327
|
gap: 12,
|
|
7165
7328
|
flex: 1,
|
|
7166
7329
|
minWidth: 0
|
|
7167
7330
|
},
|
|
7168
|
-
|
|
7331
|
+
name: {
|
|
7169
7332
|
flex: 1
|
|
7170
7333
|
},
|
|
7171
|
-
|
|
7334
|
+
actionButton: {
|
|
7172
7335
|
width: 36,
|
|
7173
7336
|
height: 36,
|
|
7174
7337
|
padding: 0
|
|
7175
7338
|
}
|
|
7176
7339
|
});
|
|
7177
7340
|
|
|
7341
|
+
// resourceViews/Container/DefaultContainerView.tsx
|
|
7342
|
+
var DefaultContainerView = () => /* @__PURE__ */ React62.createElement(
|
|
7343
|
+
ContainerView,
|
|
7344
|
+
{
|
|
7345
|
+
Layout: DefaultContainerLayout,
|
|
7346
|
+
SideMenu: DefaultContainerSideMenu,
|
|
7347
|
+
Content: DefaultContainerContent,
|
|
7348
|
+
ResourceItem: DefaultContainerResourceItem
|
|
7349
|
+
}
|
|
7350
|
+
);
|
|
7351
|
+
|
|
7178
7352
|
// resourceViews/Container/ContainerResourceView.tsx
|
|
7179
7353
|
var ContainerResourceView = {
|
|
7180
7354
|
name: "container",
|
|
7181
7355
|
displayName: "Container",
|
|
7182
7356
|
displayIcon: Folders,
|
|
7183
|
-
view:
|
|
7357
|
+
view: DefaultContainerView,
|
|
7184
7358
|
canDisplay: (targetUri, targetResource) => {
|
|
7185
7359
|
return targetResource.type === "SolidContainer";
|
|
7186
7360
|
}
|
|
7187
7361
|
};
|
|
7188
7362
|
|
|
7189
7363
|
// resourceViews/Profile/ProfileResourceView.tsx
|
|
7190
|
-
import { User as
|
|
7364
|
+
import { User as User3 } from "lucide-react-native";
|
|
7191
7365
|
|
|
7192
7366
|
// resourceViews/Profile/ProfileView.tsx
|
|
7193
|
-
import { ScrollView as ScrollView4, View as
|
|
7194
|
-
import
|
|
7367
|
+
import { ScrollView as ScrollView4, View as View34, StyleSheet as StyleSheet55 } from "react-native";
|
|
7368
|
+
import React64 from "react";
|
|
7195
7369
|
|
|
7196
7370
|
// resourceViews/Profile/ProfileKnows.tsx
|
|
7197
|
-
import
|
|
7371
|
+
import React63, { useCallback as useCallback12, useState as useState12 } from "react";
|
|
7198
7372
|
import { Plus as Plus3 } from "lucide-react-native";
|
|
7199
|
-
import { View as
|
|
7373
|
+
import { View as View33, StyleSheet as StyleSheet54 } from "react-native";
|
|
7200
7374
|
import { Trash as Trash3 } from "lucide-react-native";
|
|
7201
7375
|
var ProfileKnows = ({
|
|
7202
7376
|
resource,
|
|
@@ -7204,13 +7378,13 @@ var ProfileKnows = ({
|
|
|
7204
7378
|
setProfile
|
|
7205
7379
|
}) => {
|
|
7206
7380
|
const [newContact, setNewContact] = useState12("");
|
|
7207
|
-
const addNewContact =
|
|
7381
|
+
const addNewContact = useCallback12(() => {
|
|
7208
7382
|
setProfile(resource, (cProfile) => {
|
|
7209
7383
|
cProfile.knows?.add({ "@id": newContact });
|
|
7210
7384
|
});
|
|
7211
7385
|
setNewContact("");
|
|
7212
7386
|
}, [newContact, resource, setProfile]);
|
|
7213
|
-
return /* @__PURE__ */
|
|
7387
|
+
return /* @__PURE__ */ React63.createElement(View33, { style: styles50.container }, /* @__PURE__ */ React63.createElement(
|
|
7214
7388
|
Input,
|
|
7215
7389
|
{
|
|
7216
7390
|
placeholder: "https://example.pod/john/profile/card#me",
|
|
@@ -7224,12 +7398,12 @@ var ProfileKnows = ({
|
|
|
7224
7398
|
onChangeText: setNewContact,
|
|
7225
7399
|
onSubmitEditing: addNewContact
|
|
7226
7400
|
}
|
|
7227
|
-
), profile.knows?.map((friend) => /* @__PURE__ */
|
|
7401
|
+
), profile.knows?.map((friend) => /* @__PURE__ */ React63.createElement(
|
|
7228
7402
|
AgentInformation,
|
|
7229
7403
|
{
|
|
7230
7404
|
key: friend["@id"],
|
|
7231
7405
|
webId: friend["@id"],
|
|
7232
|
-
accessoryRight: /* @__PURE__ */
|
|
7406
|
+
accessoryRight: /* @__PURE__ */ React63.createElement(
|
|
7233
7407
|
Button,
|
|
7234
7408
|
{
|
|
7235
7409
|
variant: "ghost",
|
|
@@ -7244,7 +7418,7 @@ var ProfileKnows = ({
|
|
|
7244
7418
|
}
|
|
7245
7419
|
)));
|
|
7246
7420
|
};
|
|
7247
|
-
var
|
|
7421
|
+
var styles50 = StyleSheet54.create({
|
|
7248
7422
|
container: {
|
|
7249
7423
|
gap: 16
|
|
7250
7424
|
// gap-4 equivalent (4 * 4px = 16px)
|
|
@@ -7258,8 +7432,8 @@ var ProfileView = () => {
|
|
|
7258
7432
|
const profileResource = useResource4(targetUri);
|
|
7259
7433
|
const [profile, setProfile, commitProfile, transactionDataset] = useChangeSubject(SolidProfileShapeType, targetUri);
|
|
7260
7434
|
if (!targetUri || !profileResource || !profile || profileResource.type === "InvalidIdentifierResource")
|
|
7261
|
-
return /* @__PURE__ */
|
|
7262
|
-
return /* @__PURE__ */
|
|
7435
|
+
return /* @__PURE__ */ React64.createElement(React64.Fragment, null);
|
|
7436
|
+
return /* @__PURE__ */ React64.createElement(ScrollView4, { contentContainerStyle: styles51.scrollContainer }, /* @__PURE__ */ React64.createElement(View34, { style: styles51.container }, /* @__PURE__ */ React64.createElement(Text2, { variant: "h1" }, "Profile"), /* @__PURE__ */ React64.createElement(
|
|
7263
7437
|
Input,
|
|
7264
7438
|
{
|
|
7265
7439
|
placeholder: "John Doe",
|
|
@@ -7271,25 +7445,25 @@ var ProfileView = () => {
|
|
|
7271
7445
|
});
|
|
7272
7446
|
}
|
|
7273
7447
|
}
|
|
7274
|
-
), /* @__PURE__ */
|
|
7448
|
+
), /* @__PURE__ */ React64.createElement(Separator2, null), /* @__PURE__ */ React64.createElement(Text2, { variant: "h2" }, "Contacts"), /* @__PURE__ */ React64.createElement(
|
|
7275
7449
|
ProfileKnows,
|
|
7276
7450
|
{
|
|
7277
7451
|
profile,
|
|
7278
7452
|
setProfile,
|
|
7279
7453
|
resource: profileResource
|
|
7280
7454
|
}
|
|
7281
|
-
), /* @__PURE__ */
|
|
7455
|
+
), /* @__PURE__ */ React64.createElement(
|
|
7282
7456
|
Button,
|
|
7283
7457
|
{
|
|
7284
7458
|
disabled: !transactionDataset.hasChanges(),
|
|
7285
7459
|
text: "Update Profile",
|
|
7286
|
-
style:
|
|
7460
|
+
style: styles51.updateButton,
|
|
7287
7461
|
onPress: commitProfile,
|
|
7288
7462
|
isLoading: profileResource.isLoading()
|
|
7289
7463
|
}
|
|
7290
7464
|
)));
|
|
7291
7465
|
};
|
|
7292
|
-
var
|
|
7466
|
+
var styles51 = StyleSheet55.create({
|
|
7293
7467
|
scrollContainer: {
|
|
7294
7468
|
flexDirection: "row",
|
|
7295
7469
|
justifyContent: "center",
|
|
@@ -7311,10 +7485,10 @@ var styles48 = StyleSheet52.create({
|
|
|
7311
7485
|
var ProfileResourceView = {
|
|
7312
7486
|
name: "profile",
|
|
7313
7487
|
displayName: "Profile",
|
|
7314
|
-
displayIcon:
|
|
7488
|
+
displayIcon: User3,
|
|
7315
7489
|
view: ProfileView,
|
|
7316
|
-
canDisplay: (targetUri, targetResource,
|
|
7317
|
-
const profile =
|
|
7490
|
+
canDisplay: (targetUri, targetResource, dataset) => {
|
|
7491
|
+
const profile = dataset.usingType(SolidProfileShapeType).fromSubject(targetUri);
|
|
7318
7492
|
return !!profile?.type?.some?.(
|
|
7319
7493
|
(val) => val["@id"] === "Person" || val["@id"] === "Person2"
|
|
7320
7494
|
);
|
|
@@ -7322,18 +7496,18 @@ var ProfileResourceView = {
|
|
|
7322
7496
|
};
|
|
7323
7497
|
|
|
7324
7498
|
// resourceViews/RawCode/RawCodeResourceView.tsx
|
|
7325
|
-
import { Code as
|
|
7499
|
+
import { Code as Code3 } from "lucide-react-native";
|
|
7326
7500
|
|
|
7327
7501
|
// resourceViews/RawCode/RawCodeView.tsx
|
|
7328
|
-
import { useSolidAuth as
|
|
7329
|
-
import
|
|
7330
|
-
useCallback as
|
|
7331
|
-
useEffect as
|
|
7502
|
+
import { useSolidAuth as useSolidAuth10 } from "@ldo/solid-react";
|
|
7503
|
+
import React66, {
|
|
7504
|
+
useCallback as useCallback13,
|
|
7505
|
+
useEffect as useEffect9,
|
|
7332
7506
|
useState as useState13
|
|
7333
7507
|
} from "react";
|
|
7334
7508
|
|
|
7335
7509
|
// resourceViews/RawCode/RawCodeEditor.tsx
|
|
7336
|
-
import
|
|
7510
|
+
import React65, { useRef as useRef3 } from "react";
|
|
7337
7511
|
import Editor from "@monaco-editor/react";
|
|
7338
7512
|
var RawCodeEditor = ({
|
|
7339
7513
|
value,
|
|
@@ -7347,7 +7521,7 @@ var RawCodeEditor = ({
|
|
|
7347
7521
|
const handleEditorDidMount = (editor, monaco) => {
|
|
7348
7522
|
monacoRef.current = monaco;
|
|
7349
7523
|
};
|
|
7350
|
-
return /* @__PURE__ */
|
|
7524
|
+
return /* @__PURE__ */ React65.createElement(
|
|
7351
7525
|
Editor,
|
|
7352
7526
|
{
|
|
7353
7527
|
className: "flex-1",
|
|
@@ -7362,13 +7536,13 @@ var RawCodeEditor = ({
|
|
|
7362
7536
|
};
|
|
7363
7537
|
|
|
7364
7538
|
// resourceViews/RawCode/RawCodeView.tsx
|
|
7365
|
-
import { View as
|
|
7366
|
-
import { Notifier as
|
|
7539
|
+
import { View as View35, StyleSheet as StyleSheet56 } from "react-native";
|
|
7540
|
+
import { Notifier as Notifier3 } from "react-native-notifier";
|
|
7367
7541
|
import { Save } from "lucide-react-native";
|
|
7368
|
-
import { useTheme as
|
|
7542
|
+
import { useTheme as useTheme37 } from "@react-navigation/native";
|
|
7369
7543
|
var RawCodeView = () => {
|
|
7370
|
-
const { fetch: fetch2 } =
|
|
7371
|
-
const { colors } =
|
|
7544
|
+
const { fetch: fetch2 } = useSolidAuth10();
|
|
7545
|
+
const { colors } = useTheme37();
|
|
7372
7546
|
const [content, setContent] = useState13("");
|
|
7373
7547
|
const [contentType, setContentType] = useState13("");
|
|
7374
7548
|
const [didEdit, setDidEdit] = useState13(false);
|
|
@@ -7376,12 +7550,12 @@ var RawCodeView = () => {
|
|
|
7376
7550
|
const [isFetching, setIsFetching] = useState13(false);
|
|
7377
7551
|
const [isSaving, setIsSaving] = useState13(false);
|
|
7378
7552
|
const targetUri = targetResource?.uri;
|
|
7379
|
-
const fetchContent =
|
|
7553
|
+
const fetchContent = useCallback13(async () => {
|
|
7380
7554
|
if (!targetUri || curViewConfig.name !== "rawCode") return;
|
|
7381
7555
|
setIsFetching(true);
|
|
7382
7556
|
const response = await fetch2(targetUri);
|
|
7383
7557
|
if (response.status !== 200) {
|
|
7384
|
-
|
|
7558
|
+
Notifier3.showNotification({
|
|
7385
7559
|
title: `Could not fetch document. Recieved ${response.status}`
|
|
7386
7560
|
});
|
|
7387
7561
|
}
|
|
@@ -7390,7 +7564,7 @@ var RawCodeView = () => {
|
|
|
7390
7564
|
setDidEdit(false);
|
|
7391
7565
|
setContentType(response.headers.get("content-type") ?? "");
|
|
7392
7566
|
}, [curViewConfig.name, fetch2, targetUri]);
|
|
7393
|
-
const submitChanges =
|
|
7567
|
+
const submitChanges = useCallback13(async () => {
|
|
7394
7568
|
if (!targetUri) return;
|
|
7395
7569
|
setIsSaving(true);
|
|
7396
7570
|
const response = await fetch2(targetUri, {
|
|
@@ -7401,23 +7575,23 @@ var RawCodeView = () => {
|
|
|
7401
7575
|
body: content
|
|
7402
7576
|
});
|
|
7403
7577
|
if (response.status !== 205) {
|
|
7404
|
-
|
|
7578
|
+
Notifier3.showNotification({
|
|
7405
7579
|
title: `Could save document. Recieved ${response.status}`
|
|
7406
7580
|
});
|
|
7407
7581
|
setIsSaving(false);
|
|
7408
7582
|
return;
|
|
7409
7583
|
}
|
|
7410
|
-
|
|
7584
|
+
Notifier3.showNotification({
|
|
7411
7585
|
title: `Document Saved`
|
|
7412
7586
|
});
|
|
7413
7587
|
await fetchContent();
|
|
7414
7588
|
setIsSaving(false);
|
|
7415
7589
|
setDidEdit(false);
|
|
7416
7590
|
}, [content, contentType, fetch2, fetchContent, targetUri]);
|
|
7417
|
-
|
|
7591
|
+
useEffect9(() => {
|
|
7418
7592
|
fetchContent();
|
|
7419
7593
|
}, [fetchContent]);
|
|
7420
|
-
return /* @__PURE__ */
|
|
7594
|
+
return /* @__PURE__ */ React66.createElement(View35, { style: [styles52.container, { backgroundColor: colors.background }] }, /* @__PURE__ */ React66.createElement(LoadingBar, { isLoading: isFetching || isSaving }), /* @__PURE__ */ React66.createElement(
|
|
7421
7595
|
RawCodeEditor,
|
|
7422
7596
|
{
|
|
7423
7597
|
value: content,
|
|
@@ -7426,10 +7600,10 @@ var RawCodeView = () => {
|
|
|
7426
7600
|
setContent(value ?? "");
|
|
7427
7601
|
}
|
|
7428
7602
|
}
|
|
7429
|
-
), /* @__PURE__ */
|
|
7603
|
+
), /* @__PURE__ */ React66.createElement(
|
|
7430
7604
|
Button,
|
|
7431
7605
|
{
|
|
7432
|
-
style:
|
|
7606
|
+
style: styles52.saveButton,
|
|
7433
7607
|
onPress: submitChanges,
|
|
7434
7608
|
text: "Save Changes",
|
|
7435
7609
|
iconLeft: Save,
|
|
@@ -7438,7 +7612,7 @@ var RawCodeView = () => {
|
|
|
7438
7612
|
}
|
|
7439
7613
|
));
|
|
7440
7614
|
};
|
|
7441
|
-
var
|
|
7615
|
+
var styles52 = StyleSheet56.create({
|
|
7442
7616
|
container: {
|
|
7443
7617
|
flex: 1,
|
|
7444
7618
|
position: "relative"
|
|
@@ -7455,7 +7629,7 @@ var styles49 = StyleSheet53.create({
|
|
|
7455
7629
|
var RawCodeResourceView = {
|
|
7456
7630
|
name: "rawCode",
|
|
7457
7631
|
displayName: "Raw Code",
|
|
7458
|
-
displayIcon:
|
|
7632
|
+
displayIcon: Code3,
|
|
7459
7633
|
view: RawCodeView,
|
|
7460
7634
|
canDisplay: () => true
|
|
7461
7635
|
};
|
|
@@ -7464,8 +7638,8 @@ var RawCodeResourceView = {
|
|
|
7464
7638
|
import { Image as ImageIcon } from "lucide-react-native";
|
|
7465
7639
|
|
|
7466
7640
|
// resourceViews/Image/ImageView.tsx
|
|
7467
|
-
import
|
|
7468
|
-
import { View as
|
|
7641
|
+
import React67, { useMemo as useMemo12, useEffect as useEffect10 } from "react";
|
|
7642
|
+
import { View as View36, Image as Image2, StyleSheet as StyleSheet57 } from "react-native";
|
|
7469
7643
|
import { useResource as useResource5 } from "@ldo/solid-react";
|
|
7470
7644
|
var ImageView = () => {
|
|
7471
7645
|
const { targetUri } = useViewContext();
|
|
@@ -7476,39 +7650,39 @@ var ImageView = () => {
|
|
|
7476
7650
|
if (!blob2 || !blob2.type.startsWith("image/")) return void 0;
|
|
7477
7651
|
return URL.createObjectURL(blob2);
|
|
7478
7652
|
}, [imageResource]);
|
|
7479
|
-
|
|
7653
|
+
useEffect10(() => {
|
|
7480
7654
|
return () => {
|
|
7481
7655
|
if (blobUrl) URL.revokeObjectURL(blobUrl);
|
|
7482
7656
|
};
|
|
7483
7657
|
}, [blobUrl]);
|
|
7484
7658
|
if (!targetUri || !imageResource) return null;
|
|
7485
7659
|
if (imageResource.isLoading?.() ?? imageResource.status?.type === "unfetched") {
|
|
7486
|
-
return /* @__PURE__ */
|
|
7660
|
+
return /* @__PURE__ */ React67.createElement(View36, { style: styles53.center }, /* @__PURE__ */ React67.createElement(LoadingBar, { isLoading: true }), /* @__PURE__ */ React67.createElement(Text2, null, "Loading image\u2026"));
|
|
7487
7661
|
}
|
|
7488
7662
|
if (imageResource.status?.isError) {
|
|
7489
|
-
return /* @__PURE__ */
|
|
7663
|
+
return /* @__PURE__ */ React67.createElement(View36, { style: styles53.center }, /* @__PURE__ */ React67.createElement(Text2, null, imageResource.status.message ?? "Failed to load image."));
|
|
7490
7664
|
}
|
|
7491
7665
|
if (!imageResource.isBinary()) {
|
|
7492
|
-
return /* @__PURE__ */
|
|
7666
|
+
return /* @__PURE__ */ React67.createElement(View36, { style: styles53.center }, /* @__PURE__ */ React67.createElement(Text2, null, "This resource is not a binary image."));
|
|
7493
7667
|
}
|
|
7494
7668
|
const blob = imageResource.getBlob();
|
|
7495
7669
|
if (!blob || !blob.type.startsWith("image/")) {
|
|
7496
|
-
return /* @__PURE__ */
|
|
7670
|
+
return /* @__PURE__ */ React67.createElement(View36, { style: styles53.center }, /* @__PURE__ */ React67.createElement(Text2, null, "This binary resource is not an image (", blob?.type ?? "unknown type", ")."));
|
|
7497
7671
|
}
|
|
7498
7672
|
if (!blobUrl) {
|
|
7499
|
-
return /* @__PURE__ */
|
|
7673
|
+
return /* @__PURE__ */ React67.createElement(View36, { style: styles53.center }, /* @__PURE__ */ React67.createElement(Text2, null, "Unable to display image."));
|
|
7500
7674
|
}
|
|
7501
|
-
return /* @__PURE__ */
|
|
7675
|
+
return /* @__PURE__ */ React67.createElement(View36, { style: styles53.container }, /* @__PURE__ */ React67.createElement(
|
|
7502
7676
|
Image2,
|
|
7503
7677
|
{
|
|
7504
7678
|
source: { uri: blobUrl },
|
|
7505
|
-
style:
|
|
7679
|
+
style: styles53.image,
|
|
7506
7680
|
resizeMode: "contain",
|
|
7507
7681
|
accessibilityLabel: "Image resource"
|
|
7508
7682
|
}
|
|
7509
7683
|
));
|
|
7510
7684
|
};
|
|
7511
|
-
var
|
|
7685
|
+
var styles53 = StyleSheet57.create({
|
|
7512
7686
|
container: {
|
|
7513
7687
|
flex: 1,
|
|
7514
7688
|
padding: 16,
|
|
@@ -7598,6 +7772,11 @@ export {
|
|
|
7598
7772
|
CopyLink,
|
|
7599
7773
|
DataBrowser,
|
|
7600
7774
|
DataBrowserConfigContext,
|
|
7775
|
+
DefaultContainerContent,
|
|
7776
|
+
DefaultContainerLayout,
|
|
7777
|
+
DefaultContainerResourceItem,
|
|
7778
|
+
DefaultContainerSideMenu,
|
|
7779
|
+
DefaultContainerView,
|
|
7601
7780
|
Dialog,
|
|
7602
7781
|
DialogClose,
|
|
7603
7782
|
DialogContent,
|