linked-data-browser 0.0.8-alpha.5 → 0.0.8-alpha.7
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 +55 -0
- package/dist-lib/index.d.mts +45 -3
- package/dist-lib/index.d.ts +45 -3
- package/dist-lib/index.js +959 -746
- package/dist-lib/index.mjs +825 -617
- 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 +29 -29
- package/dist-server/_expo/static/css/global-c029fb6f4311978a769388b3a9f28b01.css +0 -1
- package/dist-server/_expo/static/js/web/AppEntry-02974cfff24938192767ab98511c2421.js +0 -12640
- package/dist-standalone/_expo/static/css/global-c029fb6f4311978a769388b3a9f28b01.css +0 -1
- package/dist-standalone/_expo/static/js/web/AppEntry-02974cfff24938192767ab98511c2421.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";
|
|
@@ -26,9 +10,8 @@ import React35, {
|
|
|
26
10
|
|
|
27
11
|
// components/nav/header/Header.tsx
|
|
28
12
|
import React33 from "react";
|
|
29
|
-
import { useSolidAuth as
|
|
30
|
-
import { StyleSheet as
|
|
31
|
-
import { useTheme as useTheme17 } from "@react-navigation/native";
|
|
13
|
+
import { useSolidAuth as useSolidAuth6 } from "@ldo/solid-react";
|
|
14
|
+
import { StyleSheet as StyleSheet28 } from "react-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
|
},
|
|
@@ -548,8 +531,8 @@ function useDataBrowserConfig() {
|
|
|
548
531
|
}
|
|
549
532
|
|
|
550
533
|
// components/TargetResourceProvider.tsx
|
|
551
|
-
import { useResource } from "@ldo/solid-react";
|
|
552
|
-
import { Platform as
|
|
534
|
+
import { useResource, useSolidAuth } from "@ldo/solid-react";
|
|
535
|
+
import { Platform as Platform3 } from "react-native";
|
|
553
536
|
var TargetResourceContext = createContext3({});
|
|
554
537
|
function useTargetResource() {
|
|
555
538
|
return useContext3(TargetResourceContext);
|
|
@@ -558,14 +541,15 @@ var TargetResourceProvider = ({
|
|
|
558
541
|
children
|
|
559
542
|
}) => {
|
|
560
543
|
const { mode, origin } = useDataBrowserConfig();
|
|
544
|
+
const { ranInitialAuthCheck } = useSolidAuth();
|
|
561
545
|
const [currentUrl, setCurrentUrl] = useState(() => {
|
|
562
|
-
return
|
|
546
|
+
return Platform3.OS === "web" ? new URL(window.location.href) : new URL("");
|
|
563
547
|
});
|
|
564
548
|
const handleUrlChange = useCallback(() => {
|
|
565
549
|
setCurrentUrl(new URL(window.location.href));
|
|
566
550
|
}, []);
|
|
567
551
|
useEffect(() => {
|
|
568
|
-
if (
|
|
552
|
+
if (Platform3.OS === "web") {
|
|
569
553
|
window.addEventListener("popstate", handleUrlChange);
|
|
570
554
|
const originalPushState = history.pushState;
|
|
571
555
|
const originalReplaceState = history.replaceState;
|
|
@@ -594,7 +578,7 @@ var TargetResourceProvider = ({
|
|
|
594
578
|
finalUrl = `${origin}?uri=${encodeURIComponent(newRoute)}`;
|
|
595
579
|
}
|
|
596
580
|
setCurrentUrl(new URL(finalUrl));
|
|
597
|
-
if (
|
|
581
|
+
if (Platform3.OS === "web") {
|
|
598
582
|
window.history.pushState(null, "", finalUrl);
|
|
599
583
|
}
|
|
600
584
|
},
|
|
@@ -609,6 +593,10 @@ var TargetResourceProvider = ({
|
|
|
609
593
|
const curHash = currentUrl.hash;
|
|
610
594
|
return `${curOrigin}${curPathname}${curHash}`;
|
|
611
595
|
}, [currentUrl, mode]);
|
|
596
|
+
if (!ranInitialAuthCheck) return /* @__PURE__ */ React5.createElement(React5.Fragment, null);
|
|
597
|
+
return /* @__PURE__ */ React5.createElement(TargetResourceLoader, { targetUri, navigateTo }, children);
|
|
598
|
+
};
|
|
599
|
+
var TargetResourceLoader = ({ targetUri, navigateTo, children }) => {
|
|
612
600
|
const targetResource = useResource(targetUri);
|
|
613
601
|
const refresh = useCallback(async () => {
|
|
614
602
|
if (targetResource) {
|
|
@@ -773,7 +761,7 @@ var styles2 = StyleSheet5.create({
|
|
|
773
761
|
});
|
|
774
762
|
|
|
775
763
|
// components/nav/header/AvatarMenu.tsx
|
|
776
|
-
import { useResource as useResource2, useSolidAuth, useSubject } from "@ldo/solid-react";
|
|
764
|
+
import { useResource as useResource2, useSolidAuth as useSolidAuth2, useSubject } from "@ldo/solid-react";
|
|
777
765
|
import React13 from "react";
|
|
778
766
|
import { View as View7, StyleSheet as StyleSheet10 } from "react-native";
|
|
779
767
|
|
|
@@ -1987,7 +1975,7 @@ import { Sun } from "lucide-react-native";
|
|
|
1987
1975
|
// components/ui/switch.tsx
|
|
1988
1976
|
import * as SwitchPrimitives from "@rn-primitives/switch";
|
|
1989
1977
|
import * as React7 from "react";
|
|
1990
|
-
import { Platform as
|
|
1978
|
+
import { Platform as Platform4, StyleSheet as StyleSheet6 } from "react-native";
|
|
1991
1979
|
import Animated, {
|
|
1992
1980
|
interpolateColor,
|
|
1993
1981
|
useAnimatedStyle,
|
|
@@ -2095,7 +2083,7 @@ function SwitchNative({
|
|
|
2095
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 })))
|
|
2096
2084
|
);
|
|
2097
2085
|
}
|
|
2098
|
-
var Switch =
|
|
2086
|
+
var Switch = Platform4.select({
|
|
2099
2087
|
web: SwitchWeb,
|
|
2100
2088
|
default: SwitchNative
|
|
2101
2089
|
});
|
|
@@ -2104,7 +2092,7 @@ var Switch = Platform5.select({
|
|
|
2104
2092
|
import * as DropdownMenuPrimitive from "@rn-primitives/dropdown-menu";
|
|
2105
2093
|
import * as React8 from "react";
|
|
2106
2094
|
import {
|
|
2107
|
-
Platform as
|
|
2095
|
+
Platform as Platform5,
|
|
2108
2096
|
Pressable as Pressable2,
|
|
2109
2097
|
StyleSheet as StyleSheet7,
|
|
2110
2098
|
Text as Text3,
|
|
@@ -2115,6 +2103,36 @@ import { ChevronDown } from "lucide-react-native";
|
|
|
2115
2103
|
import { ChevronRight as ChevronRight2 } from "lucide-react-native";
|
|
2116
2104
|
import { ChevronUp } from "lucide-react-native";
|
|
2117
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
|
+
}
|
|
2118
2136
|
var DropdownMenu = DropdownMenuPrimitive.Root;
|
|
2119
2137
|
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
2120
2138
|
var DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
@@ -2129,7 +2147,7 @@ function DropdownMenuSubTrigger({
|
|
|
2129
2147
|
}) {
|
|
2130
2148
|
const theme = useTheme6();
|
|
2131
2149
|
const { open } = DropdownMenuPrimitive.useSubContext();
|
|
2132
|
-
const SubIcon =
|
|
2150
|
+
const SubIcon = Platform5.OS === "web" ? ChevronRight2 : open ? ChevronUp : ChevronDown;
|
|
2133
2151
|
return /* @__PURE__ */ React8.createElement(
|
|
2134
2152
|
TextStyleProvider,
|
|
2135
2153
|
{
|
|
@@ -2182,13 +2200,14 @@ function DropdownMenuContent({
|
|
|
2182
2200
|
...props
|
|
2183
2201
|
}) {
|
|
2184
2202
|
const theme = useTheme6();
|
|
2203
|
+
useDropdownAnimation();
|
|
2185
2204
|
return /* @__PURE__ */ React8.createElement(DropdownMenuPrimitive.Portal, { hostName: portalHost }, /* @__PURE__ */ React8.createElement(
|
|
2186
2205
|
DropdownMenuPrimitive.Overlay,
|
|
2187
2206
|
{
|
|
2188
2207
|
style: overlayStyle ? StyleSheet7.flatten([
|
|
2189
|
-
|
|
2208
|
+
Platform5.OS !== "web" ? StyleSheet7.absoluteFill : void 0,
|
|
2190
2209
|
overlayStyle
|
|
2191
|
-
]) :
|
|
2210
|
+
]) : Platform5.OS !== "web" ? StyleSheet7.absoluteFill : void 0
|
|
2192
2211
|
},
|
|
2193
2212
|
/* @__PURE__ */ React8.createElement(
|
|
2194
2213
|
DropdownMenuPrimitive.Content,
|
|
@@ -2214,7 +2233,7 @@ function DropdownMenuItem({
|
|
|
2214
2233
|
...props
|
|
2215
2234
|
}) {
|
|
2216
2235
|
const theme = useTheme6();
|
|
2217
|
-
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(
|
|
2218
2237
|
Pressable2,
|
|
2219
2238
|
{
|
|
2220
2239
|
style: ({ pressed, hovered }) => StyleSheet7.flatten([
|
|
@@ -2328,7 +2347,7 @@ function DropdownMenuShortcut({ style, ...props }) {
|
|
|
2328
2347
|
var styles4 = StyleSheet7.create({
|
|
2329
2348
|
// SubTrigger styles
|
|
2330
2349
|
subTriggerText: {
|
|
2331
|
-
fontSize:
|
|
2350
|
+
fontSize: Platform5.OS === "web" ? 14 : 18
|
|
2332
2351
|
// text-sm native:text-lg
|
|
2333
2352
|
},
|
|
2334
2353
|
subTriggerTextOpen: {
|
|
@@ -2341,7 +2360,7 @@ var styles4 = StyleSheet7.create({
|
|
|
2341
2360
|
// gap-2
|
|
2342
2361
|
paddingHorizontal: 8,
|
|
2343
2362
|
// px-2
|
|
2344
|
-
paddingVertical:
|
|
2363
|
+
paddingVertical: Platform5.OS === "web" ? 6 : 8,
|
|
2345
2364
|
// py-1.5 native:py-2
|
|
2346
2365
|
borderRadius: 2
|
|
2347
2366
|
// rounded-sm
|
|
@@ -2372,11 +2391,10 @@ var styles4 = StyleSheet7.create({
|
|
|
2372
2391
|
// mt-1
|
|
2373
2392
|
padding: 4,
|
|
2374
2393
|
// p-1
|
|
2375
|
-
shadowOffset: { width: 0, height:
|
|
2376
|
-
shadowOpacity: 0.
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
elevation: 2
|
|
2394
|
+
shadowOffset: { width: 0, height: 4 },
|
|
2395
|
+
shadowOpacity: 0.12,
|
|
2396
|
+
shadowRadius: 8,
|
|
2397
|
+
elevation: 8
|
|
2380
2398
|
// Android shadow
|
|
2381
2399
|
// Border color, background color, and shadow color applied at render time
|
|
2382
2400
|
},
|
|
@@ -2392,11 +2410,10 @@ var styles4 = StyleSheet7.create({
|
|
|
2392
2410
|
borderWidth: 1,
|
|
2393
2411
|
padding: 4,
|
|
2394
2412
|
// p-1
|
|
2395
|
-
shadowOffset: { width: 0, height:
|
|
2396
|
-
shadowOpacity: 0.
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
elevation: 2
|
|
2413
|
+
shadowOffset: { width: 0, height: 4 },
|
|
2414
|
+
shadowOpacity: 0.12,
|
|
2415
|
+
shadowRadius: 8,
|
|
2416
|
+
elevation: 8
|
|
2400
2417
|
// Android shadow
|
|
2401
2418
|
// Border color, background color, and shadow color applied at render time
|
|
2402
2419
|
},
|
|
@@ -2410,7 +2427,7 @@ var styles4 = StyleSheet7.create({
|
|
|
2410
2427
|
// rounded-sm
|
|
2411
2428
|
paddingHorizontal: 8,
|
|
2412
2429
|
// px-2
|
|
2413
|
-
paddingVertical:
|
|
2430
|
+
paddingVertical: Platform5.OS === "web" ? 6 : 8
|
|
2414
2431
|
// py-1.5 native:py-2
|
|
2415
2432
|
},
|
|
2416
2433
|
itemInset: {
|
|
@@ -2428,7 +2445,7 @@ var styles4 = StyleSheet7.create({
|
|
|
2428
2445
|
alignItems: "center",
|
|
2429
2446
|
borderRadius: 2,
|
|
2430
2447
|
// rounded-sm
|
|
2431
|
-
paddingVertical:
|
|
2448
|
+
paddingVertical: Platform5.OS === "web" ? 6 : 8,
|
|
2432
2449
|
// py-1.5 native:py-2
|
|
2433
2450
|
paddingLeft: 32,
|
|
2434
2451
|
// pl-8
|
|
@@ -2460,7 +2477,7 @@ var styles4 = StyleSheet7.create({
|
|
|
2460
2477
|
alignItems: "center",
|
|
2461
2478
|
borderRadius: 2,
|
|
2462
2479
|
// rounded-sm
|
|
2463
|
-
paddingVertical:
|
|
2480
|
+
paddingVertical: Platform5.OS === "web" ? 6 : 8,
|
|
2464
2481
|
// py-1.5 native:py-2
|
|
2465
2482
|
paddingLeft: 32,
|
|
2466
2483
|
// pl-8
|
|
@@ -2497,7 +2514,7 @@ var styles4 = StyleSheet7.create({
|
|
|
2497
2514
|
// px-2
|
|
2498
2515
|
paddingVertical: 6,
|
|
2499
2516
|
// py-1.5
|
|
2500
|
-
fontSize:
|
|
2517
|
+
fontSize: Platform5.OS === "web" ? 14 : 16,
|
|
2501
2518
|
// text-sm native:text-base
|
|
2502
2519
|
fontWeight: "600"
|
|
2503
2520
|
// font-semibold
|
|
@@ -2520,7 +2537,7 @@ var styles4 = StyleSheet7.create({
|
|
|
2520
2537
|
// Shortcut styles
|
|
2521
2538
|
shortcut: {
|
|
2522
2539
|
marginLeft: "auto",
|
|
2523
|
-
fontSize:
|
|
2540
|
+
fontSize: Platform5.OS === "web" ? 12 : 14,
|
|
2524
2541
|
// text-xs native:text-sm
|
|
2525
2542
|
letterSpacing: 0.1
|
|
2526
2543
|
// tracking-widest
|
|
@@ -2529,7 +2546,7 @@ var styles4 = StyleSheet7.create({
|
|
|
2529
2546
|
});
|
|
2530
2547
|
|
|
2531
2548
|
// components/ThemeProvider.tsx
|
|
2532
|
-
import React9, { useEffect as
|
|
2549
|
+
import React9, { useEffect as useEffect4 } from "react";
|
|
2533
2550
|
import AsyncStorage from "@react-native-async-storage/async-storage";
|
|
2534
2551
|
import {
|
|
2535
2552
|
createContext as createContext4,
|
|
@@ -2537,7 +2554,7 @@ import {
|
|
|
2537
2554
|
useMemo as useMemo3,
|
|
2538
2555
|
useState as useState3
|
|
2539
2556
|
} from "react";
|
|
2540
|
-
import { Appearance, Platform as
|
|
2557
|
+
import { Appearance, Platform as Platform7 } from "react-native";
|
|
2541
2558
|
import {
|
|
2542
2559
|
ThemeProvider as ApplicationThemeProvider,
|
|
2543
2560
|
DarkTheme,
|
|
@@ -2549,7 +2566,7 @@ var NAV_THEME = {
|
|
|
2549
2566
|
light: {
|
|
2550
2567
|
background: "hsl(0 0% 99%)",
|
|
2551
2568
|
border: "hsl(220 13% 91%)",
|
|
2552
|
-
card: "hsl(
|
|
2569
|
+
card: "hsl(220 14% 96%)",
|
|
2553
2570
|
notification: "hsl(0 72% 51%)",
|
|
2554
2571
|
primary: "hsl(220 70% 45%)",
|
|
2555
2572
|
text: "hsl(220 15% 12%)"
|
|
@@ -2557,7 +2574,7 @@ var NAV_THEME = {
|
|
|
2557
2574
|
dark: {
|
|
2558
2575
|
background: "hsl(222 18% 8%)",
|
|
2559
2576
|
border: "hsl(217 18% 18%)",
|
|
2560
|
-
card: "hsl(222 18%
|
|
2577
|
+
card: "hsl(222 18% 14%)",
|
|
2561
2578
|
notification: "hsl(0 62% 50%)",
|
|
2562
2579
|
primary: "hsl(217 91% 60%)",
|
|
2563
2580
|
text: "hsl(210 20% 96%)"
|
|
@@ -2566,9 +2583,9 @@ var NAV_THEME = {
|
|
|
2566
2583
|
|
|
2567
2584
|
// lib/android-navigation-bar.ts
|
|
2568
2585
|
import * as NavigationBar from "expo-navigation-bar";
|
|
2569
|
-
import { Platform as
|
|
2586
|
+
import { Platform as Platform6 } from "react-native";
|
|
2570
2587
|
async function setAndroidNavigationBar(theme) {
|
|
2571
|
-
if (
|
|
2588
|
+
if (Platform6.OS !== "android") return;
|
|
2572
2589
|
await NavigationBar.setButtonStyleAsync(theme === "dark" ? "light" : "dark");
|
|
2573
2590
|
await NavigationBar.setBackgroundColorAsync(
|
|
2574
2591
|
theme === "dark" ? NAV_THEME.dark.background : NAV_THEME.light.background
|
|
@@ -2594,7 +2611,7 @@ var ThemeProviderContext = createContext4({
|
|
|
2594
2611
|
function useThemeChange() {
|
|
2595
2612
|
return useContext4(ThemeProviderContext);
|
|
2596
2613
|
}
|
|
2597
|
-
var usePlatformSpecificSetup =
|
|
2614
|
+
var usePlatformSpecificSetup = Platform7.select({
|
|
2598
2615
|
android: useSetAndroidNavigationBar,
|
|
2599
2616
|
default: noop
|
|
2600
2617
|
});
|
|
@@ -2606,7 +2623,7 @@ var ThemeProvider = ({
|
|
|
2606
2623
|
const resolvedScheme = colorScheme ?? "light";
|
|
2607
2624
|
usePlatformSpecificSetup();
|
|
2608
2625
|
useSetWebBackgroundClassName(resolvedScheme);
|
|
2609
|
-
|
|
2626
|
+
useEffect4(() => {
|
|
2610
2627
|
const lookupCurColorScheme = async () => {
|
|
2611
2628
|
setColorScheme(Appearance.getColorScheme() ?? "light");
|
|
2612
2629
|
const storedColorSchemeName = await AsyncStorage.getItem(COLOR_SCHEME_KEY) || Appearance.getColorScheme();
|
|
@@ -2636,10 +2653,10 @@ var ThemeProvider = ({
|
|
|
2636
2653
|
/* @__PURE__ */ React9.createElement(ThemeProviderContext.Provider, { value: context }, children)
|
|
2637
2654
|
));
|
|
2638
2655
|
};
|
|
2639
|
-
var useIsomorphicLayoutEffect =
|
|
2656
|
+
var useIsomorphicLayoutEffect = Platform7.OS === "web" && typeof window === "undefined" ? React9.useEffect : React9.useLayoutEffect;
|
|
2640
2657
|
function useSetWebBackgroundClassName(colorScheme) {
|
|
2641
2658
|
useIsomorphicLayoutEffect(() => {
|
|
2642
|
-
if (
|
|
2659
|
+
if (Platform7.OS !== "web" || typeof document === "undefined") return;
|
|
2643
2660
|
const el = document.documentElement;
|
|
2644
2661
|
el.classList.add("bg-background");
|
|
2645
2662
|
if (colorScheme === "dark") {
|
|
@@ -2781,7 +2798,7 @@ var ProfileAvatar = ({
|
|
|
2781
2798
|
|
|
2782
2799
|
// components/nav/header/AvatarMenu.tsx
|
|
2783
2800
|
var AvatarMenu = () => {
|
|
2784
|
-
const { session, logout } =
|
|
2801
|
+
const { session, logout } = useSolidAuth2();
|
|
2785
2802
|
const webIdResource = useResource2(session.webId);
|
|
2786
2803
|
const profile = useSubject(SolidProfileShapeType, session.webId);
|
|
2787
2804
|
const { navigateTo } = useTargetResource();
|
|
@@ -2826,7 +2843,7 @@ var styles7 = StyleSheet10.create({
|
|
|
2826
2843
|
});
|
|
2827
2844
|
|
|
2828
2845
|
// components/nav/header/SignInMenu.tsx
|
|
2829
|
-
import { useSolidAuth as
|
|
2846
|
+
import { useSolidAuth as useSolidAuth3 } from "@ldo/solid-react";
|
|
2830
2847
|
import React15, { useCallback as useCallback2, useState as useState4 } from "react";
|
|
2831
2848
|
import { View as View9, StyleSheet as StyleSheet12, useWindowDimensions } from "react-native";
|
|
2832
2849
|
import { EllipsisVertical } from "lucide-react-native";
|
|
@@ -2835,7 +2852,7 @@ import { EllipsisVertical } from "lucide-react-native";
|
|
|
2835
2852
|
import * as DialogPrimitive from "@rn-primitives/dialog";
|
|
2836
2853
|
import * as React14 from "react";
|
|
2837
2854
|
import {
|
|
2838
|
-
Platform as
|
|
2855
|
+
Platform as Platform8,
|
|
2839
2856
|
StyleSheet as StyleSheet11,
|
|
2840
2857
|
View as View8
|
|
2841
2858
|
} from "react-native";
|
|
@@ -2879,7 +2896,7 @@ function DialogOverlayNative({
|
|
|
2879
2896
|
)
|
|
2880
2897
|
);
|
|
2881
2898
|
}
|
|
2882
|
-
var DialogOverlay =
|
|
2899
|
+
var DialogOverlay = Platform8.select({
|
|
2883
2900
|
web: DialogOverlayWeb,
|
|
2884
2901
|
default: DialogOverlayNative
|
|
2885
2902
|
});
|
|
@@ -2901,7 +2918,7 @@ function DialogContent({
|
|
|
2901
2918
|
...props
|
|
2902
2919
|
},
|
|
2903
2920
|
children,
|
|
2904
|
-
/* @__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 }))
|
|
2905
2922
|
)));
|
|
2906
2923
|
}
|
|
2907
2924
|
function DialogHeader({ style, ...props }) {
|
|
@@ -2913,7 +2930,7 @@ function DialogFooter({ style, ...props }) {
|
|
|
2913
2930
|
{
|
|
2914
2931
|
style: StyleSheet11.flatten([
|
|
2915
2932
|
styles8.footer,
|
|
2916
|
-
|
|
2933
|
+
Platform8.OS === "web" && styles8.footerRow,
|
|
2917
2934
|
style
|
|
2918
2935
|
]),
|
|
2919
2936
|
...props
|
|
@@ -3002,8 +3019,7 @@ var styles8 = StyleSheet11.create({
|
|
|
3002
3019
|
flexDirection: "column",
|
|
3003
3020
|
gap: 6,
|
|
3004
3021
|
// gap-1.5
|
|
3005
|
-
textAlign: "center"
|
|
3006
|
-
borderBottomWidth: 1
|
|
3022
|
+
textAlign: "center"
|
|
3007
3023
|
},
|
|
3008
3024
|
footer: {
|
|
3009
3025
|
flexDirection: "column-reverse",
|
|
@@ -3015,17 +3031,17 @@ var styles8 = StyleSheet11.create({
|
|
|
3015
3031
|
justifyContent: "flex-end"
|
|
3016
3032
|
},
|
|
3017
3033
|
title: {
|
|
3018
|
-
fontSize:
|
|
3034
|
+
fontSize: Platform8.OS === "web" ? 18 : 20,
|
|
3019
3035
|
// text-lg native:text-xl
|
|
3020
3036
|
fontWeight: "600",
|
|
3021
3037
|
// font-semibold
|
|
3022
|
-
lineHeight:
|
|
3038
|
+
lineHeight: Platform8.OS === "web" ? 20 : 22,
|
|
3023
3039
|
// leading-none
|
|
3024
3040
|
letterSpacing: -0.025
|
|
3025
3041
|
// tracking-tight
|
|
3026
3042
|
},
|
|
3027
3043
|
description: {
|
|
3028
|
-
fontSize:
|
|
3044
|
+
fontSize: Platform8.OS === "web" ? 14 : 16,
|
|
3029
3045
|
// text-sm native:text-base
|
|
3030
3046
|
opacity: 0.7
|
|
3031
3047
|
}
|
|
@@ -3035,14 +3051,14 @@ var styles8 = StyleSheet11.create({
|
|
|
3035
3051
|
var SignInMenu = () => {
|
|
3036
3052
|
const [idpValue, setIdpValue] = useState4("");
|
|
3037
3053
|
const [, setIdpError] = useState4();
|
|
3038
|
-
const { login, signUp } =
|
|
3054
|
+
const { login, signUp } = useSolidAuth3();
|
|
3039
3055
|
const { width } = useWindowDimensions();
|
|
3040
3056
|
const { defaultIssuer } = useDataBrowserConfig();
|
|
3041
3057
|
const isSmallScreen = width < 640;
|
|
3042
3058
|
const onIdpSubmit = useCallback2(async () => {
|
|
3043
3059
|
setIdpError(void 0);
|
|
3044
3060
|
try {
|
|
3045
|
-
await login(idpValue);
|
|
3061
|
+
await login(idpValue, window.location.href);
|
|
3046
3062
|
} catch (err) {
|
|
3047
3063
|
if (err instanceof Error) {
|
|
3048
3064
|
setIdpError(err.message);
|
|
@@ -3056,7 +3072,7 @@ var SignInMenu = () => {
|
|
|
3056
3072
|
Button,
|
|
3057
3073
|
{
|
|
3058
3074
|
key: "signUp",
|
|
3059
|
-
onPress: () => signUp(defaultIssuer),
|
|
3075
|
+
onPress: () => signUp(defaultIssuer, window.location.href),
|
|
3060
3076
|
variant: "ghost",
|
|
3061
3077
|
text: "Sign Up"
|
|
3062
3078
|
}
|
|
@@ -3064,7 +3080,7 @@ var SignInMenu = () => {
|
|
|
3064
3080
|
Button,
|
|
3065
3081
|
{
|
|
3066
3082
|
key: "logIn",
|
|
3067
|
-
onPress: () => login(defaultIssuer),
|
|
3083
|
+
onPress: () => login(defaultIssuer, window.location.href),
|
|
3068
3084
|
variant: "default",
|
|
3069
3085
|
text: "Log In"
|
|
3070
3086
|
}
|
|
@@ -3080,13 +3096,13 @@ var SignInMenu = () => {
|
|
|
3080
3096
|
)), /* @__PURE__ */ React15.createElement(DropdownMenuContent, { style: styles9.dropdownContent }, /* @__PURE__ */ React15.createElement(DropdownMenuGroup, null, isSmallScreen && /* @__PURE__ */ React15.createElement(
|
|
3081
3097
|
DropdownMenuItem,
|
|
3082
3098
|
{
|
|
3083
|
-
onPress: () => signUp(defaultIssuer)
|
|
3099
|
+
onPress: () => signUp(defaultIssuer, window.location.href)
|
|
3084
3100
|
},
|
|
3085
3101
|
/* @__PURE__ */ React15.createElement(Text2, null, "Sign Up")
|
|
3086
3102
|
), isSmallScreen && /* @__PURE__ */ React15.createElement(
|
|
3087
3103
|
DropdownMenuItem,
|
|
3088
3104
|
{
|
|
3089
|
-
onPress: () => login(defaultIssuer)
|
|
3105
|
+
onPress: () => login(defaultIssuer, window.location.href)
|
|
3090
3106
|
},
|
|
3091
3107
|
/* @__PURE__ */ React15.createElement(Text2, null, "Log In")
|
|
3092
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(
|
|
@@ -3121,12 +3137,12 @@ var styles9 = StyleSheet12.create({
|
|
|
3121
3137
|
|
|
3122
3138
|
// components/nav/header/ViewMenu.tsx
|
|
3123
3139
|
import React19 from "react";
|
|
3124
|
-
import { StyleSheet as
|
|
3140
|
+
import { StyleSheet as StyleSheet15, useWindowDimensions as useWindowDimensions2 } from "react-native";
|
|
3125
3141
|
import { ViewIcon } from "lucide-react-native";
|
|
3126
3142
|
|
|
3127
3143
|
// components/useViewContext.tsx
|
|
3128
3144
|
import createContainer from "constate";
|
|
3129
|
-
import React18, { useEffect as
|
|
3145
|
+
import React18, { useEffect as useEffect5, useMemo as useMemo4, useState as useState5 } from "react";
|
|
3130
3146
|
import { EyeOff } from "lucide-react-native";
|
|
3131
3147
|
import { OctagonX } from "lucide-react-native";
|
|
3132
3148
|
import { CircleSlash } from "lucide-react-native";
|
|
@@ -3152,7 +3168,7 @@ function Card({
|
|
|
3152
3168
|
{
|
|
3153
3169
|
style: StyleSheet13.flatten([
|
|
3154
3170
|
styles10.card,
|
|
3155
|
-
{ backgroundColor: colors.
|
|
3171
|
+
{ backgroundColor: colors.card, borderColor: colors.border },
|
|
3156
3172
|
style
|
|
3157
3173
|
]),
|
|
3158
3174
|
...props
|
|
@@ -3243,18 +3259,41 @@ var styles10 = StyleSheet13.create({
|
|
|
3243
3259
|
});
|
|
3244
3260
|
|
|
3245
3261
|
// components/utilityResourceViews/ErrorMessageResourceView.tsx
|
|
3246
|
-
import { View as View11 } from "react-native";
|
|
3262
|
+
import { View as View11, StyleSheet as StyleSheet14 } from "react-native";
|
|
3263
|
+
import { useTheme as useTheme10 } from "@react-navigation/native";
|
|
3247
3264
|
var ErrorMessageResourceView = ({ icon, message }) => {
|
|
3248
3265
|
const Icon2 = icon;
|
|
3249
|
-
|
|
3266
|
+
const { colors } = useTheme10();
|
|
3267
|
+
return /* @__PURE__ */ React17.createElement(View11, { style: styles11.container }, /* @__PURE__ */ React17.createElement(Card, { style: styles11.card }, /* @__PURE__ */ React17.createElement(Icon2, { size: 60, color: colors.text, style: styles11.icon }), /* @__PURE__ */ React17.createElement(Text2, { style: styles11.message }, message)));
|
|
3250
3268
|
};
|
|
3269
|
+
var styles11 = StyleSheet14.create({
|
|
3270
|
+
container: {
|
|
3271
|
+
flex: 1,
|
|
3272
|
+
justifyContent: "center",
|
|
3273
|
+
alignItems: "center",
|
|
3274
|
+
padding: 24
|
|
3275
|
+
},
|
|
3276
|
+
card: {
|
|
3277
|
+
maxWidth: 400,
|
|
3278
|
+
width: "100%",
|
|
3279
|
+
padding: 24,
|
|
3280
|
+
alignItems: "center",
|
|
3281
|
+
gap: 16
|
|
3282
|
+
},
|
|
3283
|
+
icon: {
|
|
3284
|
+
marginBottom: 8
|
|
3285
|
+
},
|
|
3286
|
+
message: {
|
|
3287
|
+
textAlign: "center"
|
|
3288
|
+
}
|
|
3289
|
+
});
|
|
3251
3290
|
|
|
3252
3291
|
// components/useViewContext.tsx
|
|
3253
3292
|
import { useLdo } from "@ldo/solid-react";
|
|
3254
3293
|
var [ViewContextProvider, useViewContext] = createContainer(() => {
|
|
3255
3294
|
const { targetUri, targetResource, refresh, navigateTo } = useTargetResource();
|
|
3256
3295
|
const { resourceViews } = useDataBrowserConfig();
|
|
3257
|
-
const { dataset
|
|
3296
|
+
const { dataset } = useLdo();
|
|
3258
3297
|
const validViews = useMemo4(() => {
|
|
3259
3298
|
if (!targetResource || !targetUri) {
|
|
3260
3299
|
return [
|
|
@@ -3274,14 +3313,14 @@ var [ViewContextProvider, useViewContext] = createContainer(() => {
|
|
|
3274
3313
|
const errorViews = getErrorViews(targetResource);
|
|
3275
3314
|
if (errorViews) return errorViews;
|
|
3276
3315
|
const potentialViews = resourceViews.filter(
|
|
3277
|
-
(view) => view.canDisplay(targetUri, targetResource,
|
|
3316
|
+
(view) => view.canDisplay(targetUri, targetResource, dataset)
|
|
3278
3317
|
);
|
|
3279
3318
|
return potentialViews.length > 0 ? potentialViews : [constructErrorView(`No valid view for ${targetUri}`, OctagonX)];
|
|
3280
|
-
}, [targetResource, targetUri, resourceViews,
|
|
3319
|
+
}, [targetResource, targetUri, resourceViews, dataset]);
|
|
3281
3320
|
const [curViewConfig, setCurViewConfig] = useState5(
|
|
3282
3321
|
validViews[0]
|
|
3283
3322
|
);
|
|
3284
|
-
|
|
3323
|
+
useEffect5(() => {
|
|
3285
3324
|
setCurViewConfig(validViews[0]);
|
|
3286
3325
|
}, [targetUri, validViews]);
|
|
3287
3326
|
return {
|
|
@@ -3357,7 +3396,7 @@ function getErrorViews(targetResource) {
|
|
|
3357
3396
|
}
|
|
3358
3397
|
|
|
3359
3398
|
// components/nav/header/ViewMenu.tsx
|
|
3360
|
-
import { useTheme as
|
|
3399
|
+
import { useTheme as useTheme11 } from "@react-navigation/native";
|
|
3361
3400
|
var ViewMenu = () => {
|
|
3362
3401
|
const { validViews } = useViewContext();
|
|
3363
3402
|
const { width } = useWindowDimensions2();
|
|
@@ -3371,21 +3410,21 @@ var ViewMenu = () => {
|
|
|
3371
3410
|
)), /* @__PURE__ */ React19.createElement(
|
|
3372
3411
|
DropdownMenuContent,
|
|
3373
3412
|
{
|
|
3374
|
-
style:
|
|
3413
|
+
style: StyleSheet15.flatten([styles12.contentContainer])
|
|
3375
3414
|
},
|
|
3376
3415
|
validViews.map((menuItem) => /* @__PURE__ */ React19.createElement(ListItem, { key: menuItem.name, viewConfig: menuItem }, menuItem.displayName))
|
|
3377
3416
|
));
|
|
3378
3417
|
};
|
|
3379
3418
|
var ListItem = ({ viewConfig, children }) => {
|
|
3380
3419
|
const { curViewConfig, setCurViewConfig } = useViewContext();
|
|
3381
|
-
const { colors } =
|
|
3420
|
+
const { colors } = useTheme11();
|
|
3382
3421
|
const DisplayIcon = viewConfig.displayIcon;
|
|
3383
3422
|
const isSelected = curViewConfig.name === viewConfig.name;
|
|
3384
3423
|
return /* @__PURE__ */ React19.createElement(
|
|
3385
3424
|
DropdownMenuItem,
|
|
3386
3425
|
{
|
|
3387
|
-
style:
|
|
3388
|
-
|
|
3426
|
+
style: StyleSheet15.flatten([
|
|
3427
|
+
styles12.listItem,
|
|
3389
3428
|
isSelected && {
|
|
3390
3429
|
backgroundColor: colors.border
|
|
3391
3430
|
}
|
|
@@ -3397,7 +3436,7 @@ var ListItem = ({ viewConfig, children }) => {
|
|
|
3397
3436
|
);
|
|
3398
3437
|
};
|
|
3399
3438
|
ListItem.displayName = "ListItem";
|
|
3400
|
-
var
|
|
3439
|
+
var styles12 = StyleSheet15.create({
|
|
3401
3440
|
triggerContainer: {
|
|
3402
3441
|
flexDirection: "row",
|
|
3403
3442
|
alignItems: "center",
|
|
@@ -3433,16 +3472,16 @@ import React32, {
|
|
|
3433
3472
|
createContext as createContext5,
|
|
3434
3473
|
useCallback as useCallback8,
|
|
3435
3474
|
useContext as useContext5,
|
|
3436
|
-
useEffect as
|
|
3475
|
+
useEffect as useEffect7,
|
|
3437
3476
|
useMemo as useMemo9,
|
|
3438
3477
|
useState as useState9
|
|
3439
3478
|
} from "react";
|
|
3440
|
-
import { StyleSheet as
|
|
3441
|
-
import { useTheme as
|
|
3479
|
+
import { StyleSheet as StyleSheet27, useWindowDimensions as useWindowDimensions3 } from "react-native";
|
|
3480
|
+
import { useTheme as useTheme17 } from "@react-navigation/native";
|
|
3442
3481
|
|
|
3443
3482
|
// components/sharing/CopyLink.tsx
|
|
3444
3483
|
import React20, { useCallback as useCallback3, useState as useState6 } from "react";
|
|
3445
|
-
import { StyleSheet as
|
|
3484
|
+
import { StyleSheet as StyleSheet16 } from "react-native";
|
|
3446
3485
|
import { Link } from "lucide-react-native";
|
|
3447
3486
|
var CopyLink = () => {
|
|
3448
3487
|
const { targetUri } = useViewContext();
|
|
@@ -3457,14 +3496,14 @@ var CopyLink = () => {
|
|
|
3457
3496
|
Button,
|
|
3458
3497
|
{
|
|
3459
3498
|
variant: "outline",
|
|
3460
|
-
style:
|
|
3499
|
+
style: styles13.button,
|
|
3461
3500
|
onPress: onCopy,
|
|
3462
3501
|
text: message,
|
|
3463
3502
|
iconLeft: Link
|
|
3464
3503
|
}
|
|
3465
3504
|
);
|
|
3466
3505
|
};
|
|
3467
|
-
var
|
|
3506
|
+
var styles13 = StyleSheet16.create({
|
|
3468
3507
|
button: {
|
|
3469
3508
|
flexDirection: "row"
|
|
3470
3509
|
}
|
|
@@ -3472,13 +3511,13 @@ var styles12 = StyleSheet15.create({
|
|
|
3472
3511
|
|
|
3473
3512
|
// components/common/LoadingBar.tsx
|
|
3474
3513
|
import React21 from "react";
|
|
3475
|
-
import { useTheme as
|
|
3514
|
+
import { useTheme as useTheme12 } from "@react-navigation/native";
|
|
3476
3515
|
import { Bar } from "react-native-progress";
|
|
3477
|
-
import { StyleSheet as
|
|
3516
|
+
import { StyleSheet as StyleSheet17 } from "react-native";
|
|
3478
3517
|
var LoadingBar = ({
|
|
3479
3518
|
isLoading
|
|
3480
3519
|
}) => {
|
|
3481
|
-
const { colors } =
|
|
3520
|
+
const { colors } = useTheme12();
|
|
3482
3521
|
if (!isLoading) return /* @__PURE__ */ React21.createElement(React21.Fragment, null);
|
|
3483
3522
|
return /* @__PURE__ */ React21.createElement(
|
|
3484
3523
|
Bar,
|
|
@@ -3488,11 +3527,11 @@ var LoadingBar = ({
|
|
|
3488
3527
|
borderWidth: 0,
|
|
3489
3528
|
borderRadius: 0,
|
|
3490
3529
|
width: null,
|
|
3491
|
-
style:
|
|
3530
|
+
style: styles14.bar
|
|
3492
3531
|
}
|
|
3493
3532
|
);
|
|
3494
3533
|
};
|
|
3495
|
-
var
|
|
3534
|
+
var styles14 = StyleSheet17.create({
|
|
3496
3535
|
bar: {
|
|
3497
3536
|
position: "absolute",
|
|
3498
3537
|
top: 0,
|
|
@@ -3506,27 +3545,27 @@ import { ScrollView as ScrollView2 } from "react-native";
|
|
|
3506
3545
|
|
|
3507
3546
|
// components/sharing/WacRuleForm.tsx
|
|
3508
3547
|
import React31 from "react";
|
|
3509
|
-
import { StyleSheet as
|
|
3548
|
+
import { StyleSheet as StyleSheet26 } from "react-native";
|
|
3510
3549
|
|
|
3511
3550
|
// components/ui/separator.tsx
|
|
3512
|
-
import { useTheme as
|
|
3551
|
+
import { useTheme as useTheme13 } from "@react-navigation/native";
|
|
3513
3552
|
import * as SeparatorPrimitive from "@rn-primitives/separator";
|
|
3514
3553
|
import * as React22 from "react";
|
|
3515
|
-
import { StyleSheet as
|
|
3554
|
+
import { StyleSheet as StyleSheet18 } from "react-native";
|
|
3516
3555
|
function Separator2({
|
|
3517
3556
|
style,
|
|
3518
3557
|
orientation = "horizontal",
|
|
3519
3558
|
decorative = true,
|
|
3520
3559
|
...props
|
|
3521
3560
|
}) {
|
|
3522
|
-
const { colors } =
|
|
3561
|
+
const { colors } = useTheme13();
|
|
3523
3562
|
return /* @__PURE__ */ React22.createElement(
|
|
3524
3563
|
SeparatorPrimitive.Root,
|
|
3525
3564
|
{
|
|
3526
3565
|
decorative,
|
|
3527
3566
|
orientation,
|
|
3528
|
-
style:
|
|
3529
|
-
orientation === "horizontal" ?
|
|
3567
|
+
style: StyleSheet18.flatten([
|
|
3568
|
+
orientation === "horizontal" ? styles15.horizontal : styles15.vertical,
|
|
3530
3569
|
{ backgroundColor: colors.border },
|
|
3531
3570
|
style
|
|
3532
3571
|
]),
|
|
@@ -3534,7 +3573,7 @@ function Separator2({
|
|
|
3534
3573
|
}
|
|
3535
3574
|
);
|
|
3536
3575
|
}
|
|
3537
|
-
var
|
|
3576
|
+
var styles15 = StyleSheet18.create({
|
|
3538
3577
|
horizontal: {
|
|
3539
3578
|
flexShrink: 0,
|
|
3540
3579
|
height: 1,
|
|
@@ -3552,22 +3591,22 @@ import React29, { useCallback as useCallback7 } from "react";
|
|
|
3552
3591
|
|
|
3553
3592
|
// components/sharing/agentPermissions/AgentPermissionRow.tsx
|
|
3554
3593
|
import React26 from "react";
|
|
3555
|
-
import { StyleSheet as
|
|
3594
|
+
import { StyleSheet as StyleSheet22 } from "react-native";
|
|
3556
3595
|
|
|
3557
3596
|
// components/sharing/agentPermissions/AgentInformation.tsx
|
|
3558
|
-
import { useResource as useResource3, useSolidAuth as
|
|
3597
|
+
import { useResource as useResource3, useSolidAuth as useSolidAuth4, useSubject as useSubject2 } from "@ldo/solid-react";
|
|
3559
3598
|
import React23 from "react";
|
|
3560
|
-
import { View as View12, StyleSheet as
|
|
3599
|
+
import { View as View12, StyleSheet as StyleSheet19 } from "react-native";
|
|
3561
3600
|
var AgentInformation = ({
|
|
3562
3601
|
webId,
|
|
3563
3602
|
accessoryRight
|
|
3564
3603
|
}) => {
|
|
3565
|
-
const { session } =
|
|
3604
|
+
const { session } = useSolidAuth4();
|
|
3566
3605
|
useResource3(webId);
|
|
3567
3606
|
const agentProfile = useSubject2(SolidProfileShapeType, webId);
|
|
3568
|
-
return /* @__PURE__ */ React23.createElement(View12, { style:
|
|
3607
|
+
return /* @__PURE__ */ React23.createElement(View12, { style: styles16.container }, /* @__PURE__ */ React23.createElement(ProfileAvatar, { profile: agentProfile }), /* @__PURE__ */ React23.createElement(View12, { style: styles16.textContainer }, /* @__PURE__ */ React23.createElement(Text2, null, agentProfile["@id"] === session.webId ? "You" : agentProfile.fn ?? agentProfile.name ?? "Unnamed Agent"), /* @__PURE__ */ React23.createElement(Text2, { size: "xs", muted: true }, webId)), accessoryRight);
|
|
3569
3608
|
};
|
|
3570
|
-
var
|
|
3609
|
+
var styles16 = StyleSheet19.create({
|
|
3571
3610
|
container: {
|
|
3572
3611
|
flexDirection: "row",
|
|
3573
3612
|
gap: 16,
|
|
@@ -3585,9 +3624,9 @@ import React25, { useCallback as useCallback4, useMemo as useMemo5 } from "react
|
|
|
3585
3624
|
// components/ui/checkbox.tsx
|
|
3586
3625
|
import * as CheckboxPrimitive from "@rn-primitives/checkbox";
|
|
3587
3626
|
import * as React24 from "react";
|
|
3588
|
-
import { Platform as
|
|
3627
|
+
import { Platform as Platform9, StyleSheet as StyleSheet20 } from "react-native";
|
|
3589
3628
|
import { Check as Check2 } from "lucide-react-native";
|
|
3590
|
-
import { useTheme as
|
|
3629
|
+
import { useTheme as useTheme14 } from "@react-navigation/native";
|
|
3591
3630
|
var getCheckboxStyles = (checked = false, disabled = false, theme) => {
|
|
3592
3631
|
const baseStyles = {
|
|
3593
3632
|
height: 16,
|
|
@@ -3605,7 +3644,7 @@ var getCheckboxStyles = (checked = false, disabled = false, theme) => {
|
|
|
3605
3644
|
const disabledStyles = disabled ? {
|
|
3606
3645
|
opacity: 0.5
|
|
3607
3646
|
} : {};
|
|
3608
|
-
return
|
|
3647
|
+
return StyleSheet20.flatten([baseStyles, checkedStyles, disabledStyles]);
|
|
3609
3648
|
};
|
|
3610
3649
|
var getIndicatorStyles = () => ({
|
|
3611
3650
|
alignItems: "center",
|
|
@@ -3617,8 +3656,8 @@ function Checkbox({
|
|
|
3617
3656
|
style,
|
|
3618
3657
|
...props
|
|
3619
3658
|
}) {
|
|
3620
|
-
const theme =
|
|
3621
|
-
const rootStyle =
|
|
3659
|
+
const theme = useTheme14();
|
|
3660
|
+
const rootStyle = StyleSheet20.flatten([
|
|
3622
3661
|
getCheckboxStyles(props.checked, props.disabled, theme),
|
|
3623
3662
|
style
|
|
3624
3663
|
]);
|
|
@@ -3626,7 +3665,7 @@ function Checkbox({
|
|
|
3626
3665
|
Check2,
|
|
3627
3666
|
{
|
|
3628
3667
|
size: 12,
|
|
3629
|
-
strokeWidth:
|
|
3668
|
+
strokeWidth: Platform9.OS === "web" ? 2.5 : 3.5,
|
|
3630
3669
|
color: theme.colors.background
|
|
3631
3670
|
}
|
|
3632
3671
|
)));
|
|
@@ -3634,7 +3673,7 @@ function Checkbox({
|
|
|
3634
3673
|
|
|
3635
3674
|
// components/sharing/AccessDropdown.tsx
|
|
3636
3675
|
import { ChevronDown as ChevronDown2 } from "lucide-react-native";
|
|
3637
|
-
import { StyleSheet as
|
|
3676
|
+
import { StyleSheet as StyleSheet21 } from "react-native";
|
|
3638
3677
|
var AccessDropdown = ({
|
|
3639
3678
|
value,
|
|
3640
3679
|
onChange
|
|
@@ -3663,7 +3702,7 @@ var AccessDropdown = ({
|
|
|
3663
3702
|
},
|
|
3664
3703
|
[onChange, value]
|
|
3665
3704
|
);
|
|
3666
|
-
return /* @__PURE__ */ React25.createElement(DropdownMenu, null, /* @__PURE__ */ React25.createElement(DropdownMenuTrigger, { asChild: true, style:
|
|
3705
|
+
return /* @__PURE__ */ React25.createElement(DropdownMenu, null, /* @__PURE__ */ React25.createElement(DropdownMenuTrigger, { asChild: true, style: styles17.button }, /* @__PURE__ */ React25.createElement(Button, { variant: "outline" }, /* @__PURE__ */ React25.createElement(Text2, null, accessDescription), /* @__PURE__ */ React25.createElement(Icon, { icon: ChevronDown2, style: styles17.buttonChevron }))), /* @__PURE__ */ React25.createElement(DropdownMenuContent, null, /* @__PURE__ */ React25.createElement(DropdownMenuLabel, null, "Permissions"), /* @__PURE__ */ React25.createElement(DropdownMenuSeparator, null), /* @__PURE__ */ React25.createElement(DropdownMenuGroup, null, ["read", "append", "write", "control"].map((accessModeName) => /* @__PURE__ */ React25.createElement(
|
|
3667
3706
|
DropdownMenuItem,
|
|
3668
3707
|
{
|
|
3669
3708
|
key: accessModeName,
|
|
@@ -3683,7 +3722,7 @@ var AccessDropdown = ({
|
|
|
3683
3722
|
/* @__PURE__ */ React25.createElement(Text2, null, accessModeName.charAt(0).toUpperCase() + accessModeName.slice(1))
|
|
3684
3723
|
)))));
|
|
3685
3724
|
};
|
|
3686
|
-
var
|
|
3725
|
+
var styles17 = StyleSheet21.create({
|
|
3687
3726
|
button: {
|
|
3688
3727
|
display: "flex",
|
|
3689
3728
|
width: 130,
|
|
@@ -3703,18 +3742,18 @@ var AgentPermissionRow = ({
|
|
|
3703
3742
|
value,
|
|
3704
3743
|
onChange
|
|
3705
3744
|
}) => {
|
|
3706
|
-
return /* @__PURE__ */ React26.createElement(View13, { style:
|
|
3745
|
+
return /* @__PURE__ */ React26.createElement(View13, { style: styles18.container }, /* @__PURE__ */ React26.createElement(AgentInformation, { webId }), /* @__PURE__ */ React26.createElement(View13, { style: styles18.rightSection }, /* @__PURE__ */ React26.createElement(
|
|
3707
3746
|
Button,
|
|
3708
3747
|
{
|
|
3709
3748
|
variant: "ghost",
|
|
3710
3749
|
onPress: () => onChange(void 0),
|
|
3711
|
-
style:
|
|
3750
|
+
style: styles18.deleteButton,
|
|
3712
3751
|
iconLeft: Trash,
|
|
3713
|
-
textStyle:
|
|
3752
|
+
textStyle: styles18.deleteButtonText
|
|
3714
3753
|
}
|
|
3715
3754
|
), /* @__PURE__ */ React26.createElement(AccessDropdown, { value, onChange })));
|
|
3716
3755
|
};
|
|
3717
|
-
var
|
|
3756
|
+
var styles18 = StyleSheet22.create({
|
|
3718
3757
|
container: {
|
|
3719
3758
|
flexDirection: "row",
|
|
3720
3759
|
justifyContent: "space-between",
|
|
@@ -3733,10 +3772,10 @@ var styles17 = StyleSheet21.create({
|
|
|
3733
3772
|
|
|
3734
3773
|
// components/sharing/agentPermissions/AgentInput.tsx
|
|
3735
3774
|
import React28, { useCallback as useCallback6, useMemo as useMemo8, useState as useState8 } from "react";
|
|
3736
|
-
import { StyleSheet as
|
|
3737
|
-
import { useTheme as
|
|
3775
|
+
import { StyleSheet as StyleSheet24 } from "react-native";
|
|
3776
|
+
import { useTheme as useTheme16 } from "@react-navigation/native";
|
|
3738
3777
|
import { Pressable as Pressable3 } from "react-native";
|
|
3739
|
-
import { useLinkQuery, useSolidAuth as
|
|
3778
|
+
import { useLinkQuery, useSolidAuth as useSolidAuth5 } from "@ldo/solid-react";
|
|
3740
3779
|
|
|
3741
3780
|
// components/ui/input-dropdown.tsx
|
|
3742
3781
|
import React27, {
|
|
@@ -3744,10 +3783,10 @@ import React27, {
|
|
|
3744
3783
|
useMemo as useMemo6,
|
|
3745
3784
|
useState as useState7,
|
|
3746
3785
|
useRef,
|
|
3747
|
-
useEffect as
|
|
3786
|
+
useEffect as useEffect6
|
|
3748
3787
|
} from "react";
|
|
3749
|
-
import { View as View14, StyleSheet as
|
|
3750
|
-
import { useTheme as
|
|
3788
|
+
import { View as View14, StyleSheet as StyleSheet23 } from "react-native";
|
|
3789
|
+
import { useTheme as useTheme15 } from "@react-navigation/native";
|
|
3751
3790
|
function InputDropdown({
|
|
3752
3791
|
items,
|
|
3753
3792
|
renderItem,
|
|
@@ -3761,7 +3800,7 @@ function InputDropdown({
|
|
|
3761
3800
|
style,
|
|
3762
3801
|
...inputProps
|
|
3763
3802
|
}) {
|
|
3764
|
-
const { colors } =
|
|
3803
|
+
const { colors } = useTheme15();
|
|
3765
3804
|
const [isDropdownOpen, setIsDropdownOpen] = useState7(false);
|
|
3766
3805
|
const inputRef = useRef(null);
|
|
3767
3806
|
const filteredItems = useMemo6(() => {
|
|
@@ -3788,7 +3827,7 @@ function InputDropdown({
|
|
|
3788
3827
|
},
|
|
3789
3828
|
[onItemSelect]
|
|
3790
3829
|
);
|
|
3791
|
-
|
|
3830
|
+
useEffect6(() => {
|
|
3792
3831
|
const handleClickOutside = (event) => {
|
|
3793
3832
|
if (inputRef.current && !inputRef.current.contains(event.target)) {
|
|
3794
3833
|
setIsDropdownOpen(false);
|
|
@@ -3802,11 +3841,11 @@ function InputDropdown({
|
|
|
3802
3841
|
}
|
|
3803
3842
|
}, [isDropdownOpen]);
|
|
3804
3843
|
const containerStyles = {
|
|
3805
|
-
...
|
|
3844
|
+
...styles19.container,
|
|
3806
3845
|
...style
|
|
3807
3846
|
};
|
|
3808
3847
|
const dropdownStyles = {
|
|
3809
|
-
...
|
|
3848
|
+
...styles19.dropdown,
|
|
3810
3849
|
backgroundColor: colors.background,
|
|
3811
3850
|
borderColor: colors.border
|
|
3812
3851
|
};
|
|
@@ -3820,7 +3859,7 @@ function InputDropdown({
|
|
|
3820
3859
|
}
|
|
3821
3860
|
), isDropdownOpen && (filteredItems.length > 0 || isLoading) && /* @__PURE__ */ React27.createElement(Card, { style: dropdownStyles }, isLoading && /* @__PURE__ */ React27.createElement(LoadingBar, { isLoading }), filteredItems.map((item, index) => /* @__PURE__ */ React27.createElement(View14, { key: index }, renderItem(item, handleItemSelect)))));
|
|
3822
3861
|
}
|
|
3823
|
-
var
|
|
3862
|
+
var styles19 = StyleSheet23.create({
|
|
3824
3863
|
container: {
|
|
3825
3864
|
position: "relative"
|
|
3826
3865
|
},
|
|
@@ -3866,12 +3905,12 @@ function useContactFilter(webIds, searchText, contactsWithNames) {
|
|
|
3866
3905
|
// components/sharing/agentPermissions/AgentInput.tsx
|
|
3867
3906
|
import { Plus } from "lucide-react-native";
|
|
3868
3907
|
var ContactDropdownItem = ({ webId, onSelect }) => {
|
|
3869
|
-
const { colors } =
|
|
3908
|
+
const { colors } = useTheme16();
|
|
3870
3909
|
return /* @__PURE__ */ React28.createElement(
|
|
3871
3910
|
Pressable3,
|
|
3872
3911
|
{
|
|
3873
3912
|
style: ({ hovered }) => [
|
|
3874
|
-
|
|
3913
|
+
styles20.dropdownItem,
|
|
3875
3914
|
{ borderBottomColor: colors.border },
|
|
3876
3915
|
hovered && { backgroundColor: colors.border }
|
|
3877
3916
|
],
|
|
@@ -3891,7 +3930,7 @@ var AgentInput = ({
|
|
|
3891
3930
|
existingAgents,
|
|
3892
3931
|
className
|
|
3893
3932
|
}) => {
|
|
3894
|
-
const { session } =
|
|
3933
|
+
const { session } = useSolidAuth5();
|
|
3895
3934
|
const [inputValue, setInputValue] = useState8("");
|
|
3896
3935
|
const currentUserProfile = useLinkQuery(
|
|
3897
3936
|
SolidProfileShapeType,
|
|
@@ -3955,7 +3994,7 @@ var AgentInput = ({
|
|
|
3955
3994
|
}
|
|
3956
3995
|
);
|
|
3957
3996
|
};
|
|
3958
|
-
var
|
|
3997
|
+
var styles20 = StyleSheet24.create({
|
|
3959
3998
|
dropdownItem: {
|
|
3960
3999
|
padding: 8,
|
|
3961
4000
|
borderBottomWidth: 1
|
|
@@ -4011,7 +4050,7 @@ import { View as View16 } from "react-native";
|
|
|
4011
4050
|
|
|
4012
4051
|
// components/sharing/PermissionRow.tsx
|
|
4013
4052
|
import React30 from "react";
|
|
4014
|
-
import { StyleSheet as
|
|
4053
|
+
import { StyleSheet as StyleSheet25 } from "react-native";
|
|
4015
4054
|
import { View as View15 } from "react-native";
|
|
4016
4055
|
var PermissionRow = ({
|
|
4017
4056
|
Icon: Icon2,
|
|
@@ -4019,9 +4058,9 @@ var PermissionRow = ({
|
|
|
4019
4058
|
value,
|
|
4020
4059
|
onChange
|
|
4021
4060
|
}) => {
|
|
4022
|
-
return /* @__PURE__ */ React30.createElement(View15, { style:
|
|
4061
|
+
return /* @__PURE__ */ React30.createElement(View15, { style: styles21.container }, /* @__PURE__ */ React30.createElement(View15, { style: styles21.leftSection }, /* @__PURE__ */ React30.createElement(Avatar, { alt: displayName }, /* @__PURE__ */ React30.createElement(AvatarFallback, null, /* @__PURE__ */ React30.createElement(Text2, null, /* @__PURE__ */ React30.createElement(Icon2, null)))), /* @__PURE__ */ React30.createElement(Text2, { bold: true }, displayName)), /* @__PURE__ */ React30.createElement(AccessDropdown, { value, onChange }));
|
|
4023
4062
|
};
|
|
4024
|
-
var
|
|
4063
|
+
var styles21 = StyleSheet25.create({
|
|
4025
4064
|
container: {
|
|
4026
4065
|
flexDirection: "row",
|
|
4027
4066
|
justifyContent: "space-between",
|
|
@@ -4042,7 +4081,7 @@ var WacRuleForm = ({
|
|
|
4042
4081
|
value,
|
|
4043
4082
|
onChange
|
|
4044
4083
|
}) => {
|
|
4045
|
-
return /* @__PURE__ */ React31.createElement(View16, { style:
|
|
4084
|
+
return /* @__PURE__ */ React31.createElement(View16, { style: styles22.container }, /* @__PURE__ */ React31.createElement(
|
|
4046
4085
|
PermissionRow,
|
|
4047
4086
|
{
|
|
4048
4087
|
displayName: "Public Access",
|
|
@@ -4066,7 +4105,7 @@ var WacRuleForm = ({
|
|
|
4066
4105
|
}
|
|
4067
4106
|
));
|
|
4068
4107
|
};
|
|
4069
|
-
var
|
|
4108
|
+
var styles22 = StyleSheet26.create({
|
|
4070
4109
|
container: {
|
|
4071
4110
|
gap: 16,
|
|
4072
4111
|
marginTop: 8,
|
|
@@ -4090,8 +4129,9 @@ var SharingModalProvider = ({
|
|
|
4090
4129
|
children
|
|
4091
4130
|
}) => {
|
|
4092
4131
|
const { targetResource } = useViewContext();
|
|
4093
|
-
const { colors } =
|
|
4132
|
+
const { colors } = useTheme17();
|
|
4094
4133
|
const [isOpen, setIsOpen] = useState9(false);
|
|
4134
|
+
const [resourceOverride, setResourceOverride] = useState9();
|
|
4095
4135
|
const [wacResult, setWacResult] = useState9();
|
|
4096
4136
|
const [isLoading, setIsLoading] = useState9(false);
|
|
4097
4137
|
const [editedRules, setEditedRules] = useState9({
|
|
@@ -4100,10 +4140,11 @@ var SharingModalProvider = ({
|
|
|
4100
4140
|
agent: {}
|
|
4101
4141
|
});
|
|
4102
4142
|
const { width, height } = useWindowDimensions3();
|
|
4103
|
-
|
|
4104
|
-
|
|
4143
|
+
const activeResource = resourceOverride ?? targetResource;
|
|
4144
|
+
useEffect7(() => {
|
|
4145
|
+
if (isOpen && (activeResource?.type === "SolidContainer" || activeResource?.type === "SolidLeaf")) {
|
|
4105
4146
|
setIsLoading(true);
|
|
4106
|
-
|
|
4147
|
+
activeResource.getWac().then((wac) => {
|
|
4107
4148
|
setWacResult(
|
|
4108
4149
|
wac
|
|
4109
4150
|
);
|
|
@@ -4113,7 +4154,7 @@ var SharingModalProvider = ({
|
|
|
4113
4154
|
setIsLoading(false);
|
|
4114
4155
|
});
|
|
4115
4156
|
}
|
|
4116
|
-
}, [
|
|
4157
|
+
}, [activeResource, isOpen]);
|
|
4117
4158
|
const didEdit = useMemo9(() => {
|
|
4118
4159
|
if (wacResult?.type !== "getWacRuleSuccess") return false;
|
|
4119
4160
|
return !isEqual(editedRules, wacResult.wacRule);
|
|
@@ -4121,19 +4162,26 @@ var SharingModalProvider = ({
|
|
|
4121
4162
|
const context = useMemo9(
|
|
4122
4163
|
() => ({
|
|
4123
4164
|
isModalOpen: isOpen,
|
|
4124
|
-
openSharingModal: () =>
|
|
4125
|
-
|
|
4165
|
+
openSharingModal: (resource) => {
|
|
4166
|
+
setResourceOverride(resource);
|
|
4167
|
+
setIsOpen(true);
|
|
4168
|
+
},
|
|
4169
|
+
closeSharingModal: () => {
|
|
4170
|
+
setIsOpen(false);
|
|
4171
|
+
setResourceOverride(void 0);
|
|
4172
|
+
}
|
|
4126
4173
|
}),
|
|
4127
4174
|
[isOpen]
|
|
4128
4175
|
);
|
|
4129
4176
|
const onApplyChanges = useCallback8(async () => {
|
|
4130
|
-
if (didEdit && (
|
|
4177
|
+
if (didEdit && (activeResource?.type === "SolidContainer" || activeResource?.type === "SolidLeaf")) {
|
|
4131
4178
|
setIsLoading(true);
|
|
4132
|
-
const result = await
|
|
4179
|
+
const result = await activeResource.setWac(editedRules);
|
|
4133
4180
|
setIsLoading(false);
|
|
4134
4181
|
}
|
|
4135
4182
|
setIsOpen(false);
|
|
4136
|
-
|
|
4183
|
+
setResourceOverride(void 0);
|
|
4184
|
+
}, [editedRules, activeResource, didEdit]);
|
|
4137
4185
|
return /* @__PURE__ */ React32.createElement(sharingModalContext.Provider, { value: context }, /* @__PURE__ */ React32.createElement(Dialog, { open: isOpen, onOpenChange: (value) => setIsOpen(value) }, /* @__PURE__ */ React32.createElement(
|
|
4138
4186
|
DialogContent,
|
|
4139
4187
|
{
|
|
@@ -4147,7 +4195,7 @@ var SharingModalProvider = ({
|
|
|
4147
4195
|
/* @__PURE__ */ React32.createElement(
|
|
4148
4196
|
ScrollView2,
|
|
4149
4197
|
{
|
|
4150
|
-
style: [{ borderColor: colors.border },
|
|
4198
|
+
style: [{ borderColor: colors.border }, styles23.scrollView]
|
|
4151
4199
|
},
|
|
4152
4200
|
(() => {
|
|
4153
4201
|
if (!wacResult) return /* @__PURE__ */ React32.createElement(React32.Fragment, null);
|
|
@@ -4166,11 +4214,10 @@ var SharingModalProvider = ({
|
|
|
4166
4214
|
))
|
|
4167
4215
|
)), children);
|
|
4168
4216
|
};
|
|
4169
|
-
var
|
|
4217
|
+
var styles23 = StyleSheet27.create({
|
|
4170
4218
|
scrollView: {
|
|
4171
4219
|
flex: 1,
|
|
4172
4220
|
borderTopWidth: 1,
|
|
4173
|
-
borderBottomWidth: 1,
|
|
4174
4221
|
paddingTop: 8,
|
|
4175
4222
|
paddingBottom: 8,
|
|
4176
4223
|
marginLeft: -24,
|
|
@@ -4182,33 +4229,26 @@ var styles22 = StyleSheet26.create({
|
|
|
4182
4229
|
|
|
4183
4230
|
// components/nav/header/Header.tsx
|
|
4184
4231
|
var Header = () => {
|
|
4185
|
-
const { session } =
|
|
4232
|
+
const { session } = useSolidAuth6();
|
|
4186
4233
|
const { openSharingModal } = useSharingModal();
|
|
4187
|
-
const {
|
|
4188
|
-
|
|
4189
|
-
|
|
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,
|
|
4190
4242
|
{
|
|
4191
|
-
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
|
|
4195
|
-
|
|
4196
|
-
|
|
4197
|
-
|
|
4198
|
-
Button,
|
|
4199
|
-
{
|
|
4200
|
-
key: "setMemu",
|
|
4201
|
-
variant: "ghost",
|
|
4202
|
-
style: styles23.shareButton,
|
|
4203
|
-
onPress: openSharingModal,
|
|
4204
|
-
iconLeft: UserPlus
|
|
4205
|
-
}
|
|
4206
|
-
),
|
|
4207
|
-
/* @__PURE__ */ React33.createElement(ViewMenu, null),
|
|
4208
|
-
session.isLoggedIn ? /* @__PURE__ */ React33.createElement(AvatarMenu, null) : /* @__PURE__ */ React33.createElement(SignInMenu, null)
|
|
4209
|
-
);
|
|
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));
|
|
4210
4250
|
};
|
|
4211
|
-
var
|
|
4251
|
+
var styles24 = StyleSheet28.create({
|
|
4212
4252
|
card: {
|
|
4213
4253
|
height: 56,
|
|
4214
4254
|
flexDirection: "row",
|
|
@@ -4229,7 +4269,7 @@ var styles23 = StyleSheet27.create({
|
|
|
4229
4269
|
});
|
|
4230
4270
|
|
|
4231
4271
|
// components/nav/Layout.tsx
|
|
4232
|
-
import { View as View18, StyleSheet as
|
|
4272
|
+
import { View as View18, StyleSheet as StyleSheet29 } from "react-native";
|
|
4233
4273
|
|
|
4234
4274
|
// components/nav/DialogProvider.tsx
|
|
4235
4275
|
import React34, {
|
|
@@ -4308,11 +4348,11 @@ var DialogProvider = ({
|
|
|
4308
4348
|
};
|
|
4309
4349
|
|
|
4310
4350
|
// components/nav/Layout.tsx
|
|
4311
|
-
import { useSolidAuth as
|
|
4351
|
+
import { useSolidAuth as useSolidAuth7 } from "@ldo/solid-react";
|
|
4312
4352
|
import { useTheme as useTheme18 } from "@react-navigation/native";
|
|
4313
4353
|
var ValidViewContext = createContext7({});
|
|
4314
4354
|
var Layout = () => {
|
|
4315
|
-
const { ranInitialAuthCheck } =
|
|
4355
|
+
const { ranInitialAuthCheck } = useSolidAuth7();
|
|
4316
4356
|
const { colors } = useTheme18();
|
|
4317
4357
|
if (!ranInitialAuthCheck) {
|
|
4318
4358
|
return /* @__PURE__ */ React35.createElement(React35.Fragment, null);
|
|
@@ -4320,10 +4360,10 @@ var Layout = () => {
|
|
|
4320
4360
|
return /* @__PURE__ */ React35.createElement(DialogProvider, null, /* @__PURE__ */ React35.createElement(ViewContextProvider, null, /* @__PURE__ */ React35.createElement(SharingModalProvider, null, /* @__PURE__ */ React35.createElement(
|
|
4321
4361
|
View18,
|
|
4322
4362
|
{
|
|
4323
|
-
style: [
|
|
4363
|
+
style: [styles25.container, { backgroundColor: colors.background }]
|
|
4324
4364
|
},
|
|
4325
4365
|
/* @__PURE__ */ React35.createElement(Header, null),
|
|
4326
|
-
/* @__PURE__ */ React35.createElement(View18, { style:
|
|
4366
|
+
/* @__PURE__ */ React35.createElement(View18, { style: styles25.contentView }, /* @__PURE__ */ React35.createElement(RenderView, null))
|
|
4327
4367
|
))));
|
|
4328
4368
|
};
|
|
4329
4369
|
var RenderView = () => {
|
|
@@ -4336,7 +4376,7 @@ var RenderView = () => {
|
|
|
4336
4376
|
const CurView = viewToRender.view;
|
|
4337
4377
|
return /* @__PURE__ */ React35.createElement(CurView, null);
|
|
4338
4378
|
};
|
|
4339
|
-
var
|
|
4379
|
+
var styles25 = StyleSheet29.create({
|
|
4340
4380
|
container: {
|
|
4341
4381
|
flex: 1
|
|
4342
4382
|
},
|
|
@@ -4349,11 +4389,11 @@ var styles24 = StyleSheet28.create({
|
|
|
4349
4389
|
// components/DataBrowser.tsx
|
|
4350
4390
|
import { PortalHost } from "@rn-primitives/portal";
|
|
4351
4391
|
import { NotifierWrapper } from "react-native-notifier";
|
|
4352
|
-
import { Platform as
|
|
4392
|
+
import { Platform as Platform10 } from "react-native";
|
|
4353
4393
|
var DataBrowser = (props) => {
|
|
4354
4394
|
const providerProps = useMemo10(() => {
|
|
4355
4395
|
return {
|
|
4356
|
-
origin:
|
|
4396
|
+
origin: Platform10.OS === "web" && !props.origin ? window.location.origin : void 0,
|
|
4357
4397
|
defaultIssuer: props.mode === "server-ui" ? window.location.origin : "https://solidcommunity.net",
|
|
4358
4398
|
...props
|
|
4359
4399
|
};
|
|
@@ -4364,7 +4404,7 @@ var DataBrowser = (props) => {
|
|
|
4364
4404
|
// components/ui/accordion.tsx
|
|
4365
4405
|
import * as AccordionPrimitive from "@rn-primitives/accordion";
|
|
4366
4406
|
import * as React37 from "react";
|
|
4367
|
-
import { Platform as
|
|
4407
|
+
import { Platform as Platform11, Pressable as Pressable4, View as View19, StyleSheet as StyleSheet30 } from "react-native";
|
|
4368
4408
|
import Animated3, {
|
|
4369
4409
|
Extrapolation,
|
|
4370
4410
|
FadeIn as FadeIn2,
|
|
@@ -4386,7 +4426,7 @@ function Accordion({
|
|
|
4386
4426
|
AccordionPrimitive.Root,
|
|
4387
4427
|
{
|
|
4388
4428
|
...props,
|
|
4389
|
-
asChild:
|
|
4429
|
+
asChild: Platform11.OS !== "web"
|
|
4390
4430
|
},
|
|
4391
4431
|
/* @__PURE__ */ React37.createElement(Animated3.View, { layout: LinearTransition.duration(200) }, children)
|
|
4392
4432
|
));
|
|
@@ -4400,14 +4440,14 @@ function AccordionItem({
|
|
|
4400
4440
|
return /* @__PURE__ */ React37.createElement(
|
|
4401
4441
|
Animated3.View,
|
|
4402
4442
|
{
|
|
4403
|
-
style: [
|
|
4443
|
+
style: [styles26.itemContainer, { overflow: "hidden" }],
|
|
4404
4444
|
layout: LinearTransition.duration(200)
|
|
4405
4445
|
},
|
|
4406
4446
|
/* @__PURE__ */ React37.createElement(
|
|
4407
4447
|
AccordionPrimitive.Item,
|
|
4408
4448
|
{
|
|
4409
|
-
style:
|
|
4410
|
-
|
|
4449
|
+
style: StyleSheet30.flatten([
|
|
4450
|
+
styles26.item,
|
|
4411
4451
|
{ borderBottomColor: colors.border },
|
|
4412
4452
|
style
|
|
4413
4453
|
]),
|
|
@@ -4417,7 +4457,7 @@ function AccordionItem({
|
|
|
4417
4457
|
)
|
|
4418
4458
|
);
|
|
4419
4459
|
}
|
|
4420
|
-
var Trigger4 =
|
|
4460
|
+
var Trigger4 = Platform11.OS === "web" ? View19 : Pressable4;
|
|
4421
4461
|
function AccordionTrigger({
|
|
4422
4462
|
style,
|
|
4423
4463
|
children,
|
|
@@ -4433,16 +4473,16 @@ function AccordionTrigger({
|
|
|
4433
4473
|
opacity: interpolate(progress.value, [0, 1], [1, 0.8], Extrapolation.CLAMP)
|
|
4434
4474
|
}));
|
|
4435
4475
|
const textStyles2 = {
|
|
4436
|
-
fontSize:
|
|
4476
|
+
fontSize: Platform11.OS === "web" ? 16 : 18,
|
|
4437
4477
|
fontWeight: "500",
|
|
4438
4478
|
color: colors.text
|
|
4439
4479
|
};
|
|
4440
|
-
return /* @__PURE__ */ React37.createElement(TextStyleProvider, { style: textStyles2 }, /* @__PURE__ */ React37.createElement(AccordionPrimitive.Header, { style:
|
|
4480
|
+
return /* @__PURE__ */ React37.createElement(TextStyleProvider, { style: textStyles2 }, /* @__PURE__ */ React37.createElement(AccordionPrimitive.Header, { style: styles26.header }, /* @__PURE__ */ React37.createElement(AccordionPrimitive.Trigger, { ...props, asChild: true }, /* @__PURE__ */ React37.createElement(
|
|
4441
4481
|
Trigger4,
|
|
4442
4482
|
{
|
|
4443
|
-
style:
|
|
4444
|
-
|
|
4445
|
-
{ flex:
|
|
4483
|
+
style: StyleSheet30.flatten([
|
|
4484
|
+
styles26.trigger,
|
|
4485
|
+
{ flex: Platform11.OS === "web" ? 1 : void 0 },
|
|
4446
4486
|
style
|
|
4447
4487
|
])
|
|
4448
4488
|
},
|
|
@@ -4457,40 +4497,40 @@ function AccordionContent({
|
|
|
4457
4497
|
}) {
|
|
4458
4498
|
const { colors } = useTheme19();
|
|
4459
4499
|
const textStyles2 = {
|
|
4460
|
-
fontSize:
|
|
4500
|
+
fontSize: Platform11.OS === "web" ? 14 : 18,
|
|
4461
4501
|
color: colors.text
|
|
4462
4502
|
};
|
|
4463
4503
|
return /* @__PURE__ */ React37.createElement(TextStyleProvider, { style: textStyles2 }, /* @__PURE__ */ React37.createElement(
|
|
4464
4504
|
AccordionPrimitive.Content,
|
|
4465
4505
|
{
|
|
4466
|
-
style:
|
|
4467
|
-
|
|
4506
|
+
style: StyleSheet30.flatten([
|
|
4507
|
+
styles26.content,
|
|
4468
4508
|
{ overflow: "hidden" },
|
|
4469
4509
|
style
|
|
4470
4510
|
]),
|
|
4471
4511
|
...props
|
|
4472
4512
|
},
|
|
4473
|
-
/* @__PURE__ */ React37.createElement(InnerContent, { style:
|
|
4513
|
+
/* @__PURE__ */ React37.createElement(InnerContent, { style: styles26.innerContent }, children)
|
|
4474
4514
|
));
|
|
4475
4515
|
}
|
|
4476
4516
|
function InnerContent({
|
|
4477
4517
|
children,
|
|
4478
4518
|
style
|
|
4479
4519
|
}) {
|
|
4480
|
-
if (
|
|
4481
|
-
return /* @__PURE__ */ React37.createElement(View19, { style:
|
|
4520
|
+
if (Platform11.OS === "web") {
|
|
4521
|
+
return /* @__PURE__ */ React37.createElement(View19, { style: StyleSheet30.flatten([styles26.innerContent, style]) }, children);
|
|
4482
4522
|
}
|
|
4483
4523
|
return /* @__PURE__ */ React37.createElement(
|
|
4484
4524
|
Animated3.View,
|
|
4485
4525
|
{
|
|
4486
4526
|
entering: FadeIn2,
|
|
4487
4527
|
exiting: FadeOutUp.duration(200),
|
|
4488
|
-
style:
|
|
4528
|
+
style: StyleSheet30.flatten([styles26.innerContent, style])
|
|
4489
4529
|
},
|
|
4490
4530
|
children
|
|
4491
4531
|
);
|
|
4492
4532
|
}
|
|
4493
|
-
var
|
|
4533
|
+
var styles26 = StyleSheet30.create({
|
|
4494
4534
|
itemContainer: {
|
|
4495
4535
|
overflow: "hidden"
|
|
4496
4536
|
},
|
|
@@ -4517,7 +4557,7 @@ var styles25 = StyleSheet29.create({
|
|
|
4517
4557
|
// components/ui/alert.tsx
|
|
4518
4558
|
import { useTheme as useTheme20 } from "@react-navigation/native";
|
|
4519
4559
|
import * as React38 from "react";
|
|
4520
|
-
import { View as View20, StyleSheet as
|
|
4560
|
+
import { View as View20, StyleSheet as StyleSheet31 } from "react-native";
|
|
4521
4561
|
function Alert({
|
|
4522
4562
|
style,
|
|
4523
4563
|
variant = "default",
|
|
@@ -4533,9 +4573,9 @@ function Alert({
|
|
|
4533
4573
|
borderColor: variant === "destructive" ? colors.notification : colors.border,
|
|
4534
4574
|
shadowColor: colors.text
|
|
4535
4575
|
};
|
|
4536
|
-
return
|
|
4576
|
+
return StyleSheet31.flatten([styles27.base, baseAlertStyles, style]);
|
|
4537
4577
|
};
|
|
4538
|
-
return /* @__PURE__ */ React38.createElement(View20, { role: "alert", style: getAlertStyles(), ...props }, /* @__PURE__ */ React38.createElement(View20, { style:
|
|
4578
|
+
return /* @__PURE__ */ React38.createElement(View20, { role: "alert", style: getAlertStyles(), ...props }, /* @__PURE__ */ React38.createElement(View20, { style: styles27.icon }, /* @__PURE__ */ React38.createElement(
|
|
4539
4579
|
Icon2,
|
|
4540
4580
|
{
|
|
4541
4581
|
size: iconSize,
|
|
@@ -4548,7 +4588,7 @@ function AlertTitle({ style, ...props }) {
|
|
|
4548
4588
|
return /* @__PURE__ */ React38.createElement(
|
|
4549
4589
|
Text2,
|
|
4550
4590
|
{
|
|
4551
|
-
style:
|
|
4591
|
+
style: StyleSheet31.flatten([styles27.title, { color: colors.text }, style]),
|
|
4552
4592
|
...props
|
|
4553
4593
|
}
|
|
4554
4594
|
);
|
|
@@ -4561,8 +4601,8 @@ function AlertDescription({
|
|
|
4561
4601
|
return /* @__PURE__ */ React38.createElement(
|
|
4562
4602
|
Text2,
|
|
4563
4603
|
{
|
|
4564
|
-
style:
|
|
4565
|
-
|
|
4604
|
+
style: StyleSheet31.flatten([
|
|
4605
|
+
styles27.description,
|
|
4566
4606
|
{ color: colors.text },
|
|
4567
4607
|
style
|
|
4568
4608
|
]),
|
|
@@ -4570,7 +4610,7 @@ function AlertDescription({
|
|
|
4570
4610
|
}
|
|
4571
4611
|
);
|
|
4572
4612
|
}
|
|
4573
|
-
var
|
|
4613
|
+
var styles27 = StyleSheet31.create({
|
|
4574
4614
|
base: {
|
|
4575
4615
|
position: "relative",
|
|
4576
4616
|
width: "100%",
|
|
@@ -4616,7 +4656,7 @@ var AspectRatio = AspectRatioPrimitive.Root;
|
|
|
4616
4656
|
// components/ui/badge.tsx
|
|
4617
4657
|
import React39 from "react";
|
|
4618
4658
|
import * as Slot2 from "@rn-primitives/slot";
|
|
4619
|
-
import { View as View22, StyleSheet as
|
|
4659
|
+
import { View as View22, StyleSheet as StyleSheet32 } from "react-native";
|
|
4620
4660
|
import { useTheme as useTheme21 } from "@react-navigation/native";
|
|
4621
4661
|
function Badge({ style, variant = "default", asChild, ...props }) {
|
|
4622
4662
|
const { colors } = useTheme21();
|
|
@@ -4652,18 +4692,18 @@ function Badge({ style, variant = "default", asChild, ...props }) {
|
|
|
4652
4692
|
return colors.background;
|
|
4653
4693
|
}
|
|
4654
4694
|
};
|
|
4655
|
-
const badgeStyle =
|
|
4656
|
-
|
|
4695
|
+
const badgeStyle = StyleSheet32.flatten([
|
|
4696
|
+
styles28.base,
|
|
4657
4697
|
getVariantStyles(),
|
|
4658
4698
|
style
|
|
4659
4699
|
]);
|
|
4660
|
-
const textStyle =
|
|
4700
|
+
const textStyle = StyleSheet32.flatten([
|
|
4661
4701
|
textStyles.base,
|
|
4662
4702
|
{ color: getTextColor() }
|
|
4663
4703
|
]);
|
|
4664
4704
|
return /* @__PURE__ */ React39.createElement(TextStyleProvider, { style: textStyle }, /* @__PURE__ */ React39.createElement(Component, { style: badgeStyle, ...props }));
|
|
4665
4705
|
}
|
|
4666
|
-
var
|
|
4706
|
+
var styles28 = StyleSheet32.create({
|
|
4667
4707
|
base: {
|
|
4668
4708
|
flexDirection: "row",
|
|
4669
4709
|
alignItems: "center",
|
|
@@ -4673,7 +4713,7 @@ var styles27 = StyleSheet31.create({
|
|
|
4673
4713
|
paddingVertical: 2
|
|
4674
4714
|
}
|
|
4675
4715
|
});
|
|
4676
|
-
var textStyles =
|
|
4716
|
+
var textStyles = StyleSheet32.create({
|
|
4677
4717
|
base: {
|
|
4678
4718
|
fontSize: 12,
|
|
4679
4719
|
fontWeight: "600"
|
|
@@ -4690,8 +4730,8 @@ var CollapsibleContent = CollapsiblePrimitive.Content;
|
|
|
4690
4730
|
import * as ContextMenuPrimitive from "@rn-primitives/context-menu";
|
|
4691
4731
|
import * as React40 from "react";
|
|
4692
4732
|
import {
|
|
4693
|
-
Platform as
|
|
4694
|
-
StyleSheet as
|
|
4733
|
+
Platform as Platform12,
|
|
4734
|
+
StyleSheet as StyleSheet33,
|
|
4695
4735
|
Text as Text5,
|
|
4696
4736
|
View as View23
|
|
4697
4737
|
} from "react-native";
|
|
@@ -4713,28 +4753,28 @@ function ContextMenuSubTrigger({
|
|
|
4713
4753
|
}) {
|
|
4714
4754
|
const { colors } = useTheme22();
|
|
4715
4755
|
const { open } = ContextMenuPrimitive.useSubContext();
|
|
4716
|
-
const Icon2 =
|
|
4756
|
+
const Icon2 = Platform12.OS === "web" ? ChevronRight3 : open ? ChevronUp2 : ChevronDown4;
|
|
4717
4757
|
const textStyles2 = {
|
|
4718
|
-
fontSize:
|
|
4758
|
+
fontSize: Platform12.OS === "web" ? 14 : 18,
|
|
4719
4759
|
color: open ? colors.primary : colors.primary
|
|
4720
4760
|
};
|
|
4721
|
-
const triggerStyles =
|
|
4722
|
-
|
|
4761
|
+
const triggerStyles = StyleSheet33.flatten([
|
|
4762
|
+
styles29.subTrigger,
|
|
4723
4763
|
{
|
|
4724
4764
|
backgroundColor: open ? colors.border : "transparent",
|
|
4725
4765
|
paddingLeft: inset ? 32 : 8
|
|
4726
4766
|
},
|
|
4727
4767
|
style
|
|
4728
4768
|
]);
|
|
4729
|
-
return /* @__PURE__ */ React40.createElement(TextStyleProvider, { style: textStyles2 }, /* @__PURE__ */ React40.createElement(ContextMenuPrimitive.SubTrigger, { style: triggerStyles, ...props }, children, /* @__PURE__ */ React40.createElement(Icon2, { size: 18, color: colors.text, style:
|
|
4769
|
+
return /* @__PURE__ */ React40.createElement(TextStyleProvider, { style: textStyles2 }, /* @__PURE__ */ React40.createElement(ContextMenuPrimitive.SubTrigger, { style: triggerStyles, ...props }, children, /* @__PURE__ */ React40.createElement(Icon2, { size: 18, color: colors.text, style: styles29.icon })));
|
|
4730
4770
|
}
|
|
4731
4771
|
function ContextMenuSubContent({
|
|
4732
4772
|
style,
|
|
4733
4773
|
...props
|
|
4734
4774
|
}) {
|
|
4735
4775
|
const { colors } = useTheme22();
|
|
4736
|
-
const contentStyles =
|
|
4737
|
-
|
|
4776
|
+
const contentStyles = StyleSheet33.flatten([
|
|
4777
|
+
styles29.subContent,
|
|
4738
4778
|
{
|
|
4739
4779
|
backgroundColor: colors.background,
|
|
4740
4780
|
borderColor: colors.border,
|
|
@@ -4751,8 +4791,8 @@ function ContextMenuContent({
|
|
|
4751
4791
|
...props
|
|
4752
4792
|
}) {
|
|
4753
4793
|
const { colors } = useTheme22();
|
|
4754
|
-
const contentStyles =
|
|
4755
|
-
|
|
4794
|
+
const contentStyles = StyleSheet33.flatten([
|
|
4795
|
+
styles29.content,
|
|
4756
4796
|
{
|
|
4757
4797
|
backgroundColor: colors.background,
|
|
4758
4798
|
borderColor: colors.border,
|
|
@@ -4763,10 +4803,10 @@ function ContextMenuContent({
|
|
|
4763
4803
|
return /* @__PURE__ */ React40.createElement(ContextMenuPrimitive.Portal, { hostName: portalHost }, /* @__PURE__ */ React40.createElement(
|
|
4764
4804
|
ContextMenuPrimitive.Overlay,
|
|
4765
4805
|
{
|
|
4766
|
-
style: overlayStyle ?
|
|
4767
|
-
|
|
4806
|
+
style: overlayStyle ? StyleSheet33.flatten([
|
|
4807
|
+
Platform12.OS !== "web" ? StyleSheet33.absoluteFill : void 0,
|
|
4768
4808
|
overlayStyle
|
|
4769
|
-
]) :
|
|
4809
|
+
]) : Platform12.OS !== "web" ? StyleSheet33.absoluteFill : void 0
|
|
4770
4810
|
},
|
|
4771
4811
|
/* @__PURE__ */ React40.createElement(ContextMenuPrimitive.Content, { style: contentStyles, ...props })
|
|
4772
4812
|
));
|
|
@@ -4778,11 +4818,11 @@ function ContextMenuItem({
|
|
|
4778
4818
|
}) {
|
|
4779
4819
|
const { colors } = useTheme22();
|
|
4780
4820
|
const textStyles2 = {
|
|
4781
|
-
fontSize:
|
|
4821
|
+
fontSize: Platform12.OS === "web" ? 14 : 18,
|
|
4782
4822
|
color: colors.text
|
|
4783
4823
|
};
|
|
4784
|
-
const itemStyles =
|
|
4785
|
-
|
|
4824
|
+
const itemStyles = StyleSheet33.flatten([
|
|
4825
|
+
styles29.item,
|
|
4786
4826
|
{
|
|
4787
4827
|
paddingLeft: inset ? 32 : 8,
|
|
4788
4828
|
opacity: props.disabled ? 0.5 : 1
|
|
@@ -4797,14 +4837,14 @@ function ContextMenuCheckboxItem({
|
|
|
4797
4837
|
...props
|
|
4798
4838
|
}) {
|
|
4799
4839
|
const { colors } = useTheme22();
|
|
4800
|
-
const checkboxStyles =
|
|
4801
|
-
|
|
4840
|
+
const checkboxStyles = StyleSheet33.flatten([
|
|
4841
|
+
styles29.checkboxItem,
|
|
4802
4842
|
{
|
|
4803
4843
|
opacity: props.disabled ? 0.5 : 1
|
|
4804
4844
|
},
|
|
4805
4845
|
style
|
|
4806
4846
|
]);
|
|
4807
|
-
return /* @__PURE__ */ React40.createElement(ContextMenuPrimitive.CheckboxItem, { style: checkboxStyles, ...props }, /* @__PURE__ */ React40.createElement(View23, { style:
|
|
4847
|
+
return /* @__PURE__ */ React40.createElement(ContextMenuPrimitive.CheckboxItem, { style: checkboxStyles, ...props }, /* @__PURE__ */ React40.createElement(View23, { style: styles29.checkboxIndicator }, /* @__PURE__ */ React40.createElement(ContextMenuPrimitive.ItemIndicator, null, /* @__PURE__ */ React40.createElement(Check3, { size: 14, strokeWidth: 3, color: colors.text }))), children);
|
|
4808
4848
|
}
|
|
4809
4849
|
function ContextMenuRadioItem({
|
|
4810
4850
|
style,
|
|
@@ -4812,14 +4852,14 @@ function ContextMenuRadioItem({
|
|
|
4812
4852
|
...props
|
|
4813
4853
|
}) {
|
|
4814
4854
|
const { colors } = useTheme22();
|
|
4815
|
-
const radioStyles =
|
|
4816
|
-
|
|
4855
|
+
const radioStyles = StyleSheet33.flatten([
|
|
4856
|
+
styles29.radioItem,
|
|
4817
4857
|
{
|
|
4818
4858
|
opacity: props.disabled ? 0.5 : 1
|
|
4819
4859
|
},
|
|
4820
4860
|
style
|
|
4821
4861
|
]);
|
|
4822
|
-
return /* @__PURE__ */ React40.createElement(ContextMenuPrimitive.RadioItem, { style: radioStyles, ...props }, /* @__PURE__ */ React40.createElement(View23, { style:
|
|
4862
|
+
return /* @__PURE__ */ React40.createElement(ContextMenuPrimitive.RadioItem, { style: radioStyles, ...props }, /* @__PURE__ */ React40.createElement(View23, { style: styles29.radioIndicator }, /* @__PURE__ */ React40.createElement(ContextMenuPrimitive.ItemIndicator, null, /* @__PURE__ */ React40.createElement(View23, { style: [styles29.radioDot, { backgroundColor: colors.text }] }))), children);
|
|
4823
4863
|
}
|
|
4824
4864
|
function ContextMenuLabel({
|
|
4825
4865
|
style,
|
|
@@ -4827,8 +4867,8 @@ function ContextMenuLabel({
|
|
|
4827
4867
|
...props
|
|
4828
4868
|
}) {
|
|
4829
4869
|
const { colors } = useTheme22();
|
|
4830
|
-
const labelStyles =
|
|
4831
|
-
|
|
4870
|
+
const labelStyles = StyleSheet33.flatten([
|
|
4871
|
+
styles29.label,
|
|
4832
4872
|
{
|
|
4833
4873
|
color: colors.text,
|
|
4834
4874
|
paddingLeft: inset ? 32 : 8
|
|
@@ -4842,8 +4882,8 @@ function ContextMenuSeparator({
|
|
|
4842
4882
|
...props
|
|
4843
4883
|
}) {
|
|
4844
4884
|
const { colors } = useTheme22();
|
|
4845
|
-
const separatorStyles =
|
|
4846
|
-
|
|
4885
|
+
const separatorStyles = StyleSheet33.flatten([
|
|
4886
|
+
styles29.separator,
|
|
4847
4887
|
{
|
|
4848
4888
|
backgroundColor: colors.border
|
|
4849
4889
|
},
|
|
@@ -4853,8 +4893,8 @@ function ContextMenuSeparator({
|
|
|
4853
4893
|
}
|
|
4854
4894
|
function ContextMenuShortcut({ style, ...props }) {
|
|
4855
4895
|
const { colors } = useTheme22();
|
|
4856
|
-
const shortcutStyles =
|
|
4857
|
-
|
|
4896
|
+
const shortcutStyles = StyleSheet33.flatten([
|
|
4897
|
+
styles29.shortcut,
|
|
4858
4898
|
{
|
|
4859
4899
|
color: colors.text
|
|
4860
4900
|
},
|
|
@@ -4862,7 +4902,7 @@ function ContextMenuShortcut({ style, ...props }) {
|
|
|
4862
4902
|
]);
|
|
4863
4903
|
return /* @__PURE__ */ React40.createElement(Text5, { style: shortcutStyles, ...props });
|
|
4864
4904
|
}
|
|
4865
|
-
var
|
|
4905
|
+
var styles29 = StyleSheet33.create({
|
|
4866
4906
|
subTrigger: {
|
|
4867
4907
|
flexDirection: "row",
|
|
4868
4908
|
alignItems: "center",
|
|
@@ -4947,7 +4987,7 @@ var styles28 = StyleSheet32.create({
|
|
|
4947
4987
|
label: {
|
|
4948
4988
|
paddingHorizontal: 8,
|
|
4949
4989
|
paddingVertical: 6,
|
|
4950
|
-
fontSize:
|
|
4990
|
+
fontSize: Platform12.OS === "web" ? 14 : 16,
|
|
4951
4991
|
fontWeight: "600"
|
|
4952
4992
|
},
|
|
4953
4993
|
separator: {
|
|
@@ -4957,7 +4997,7 @@ var styles28 = StyleSheet32.create({
|
|
|
4957
4997
|
},
|
|
4958
4998
|
shortcut: {
|
|
4959
4999
|
marginLeft: "auto",
|
|
4960
|
-
fontSize:
|
|
5000
|
+
fontSize: Platform12.OS === "web" ? 12 : 14,
|
|
4961
5001
|
letterSpacing: 1
|
|
4962
5002
|
}
|
|
4963
5003
|
});
|
|
@@ -4965,7 +5005,7 @@ var styles28 = StyleSheet32.create({
|
|
|
4965
5005
|
// components/ui/hover-card.tsx
|
|
4966
5006
|
import * as HoverCardPrimitive from "@rn-primitives/hover-card";
|
|
4967
5007
|
import * as React41 from "react";
|
|
4968
|
-
import { Platform as
|
|
5008
|
+
import { Platform as Platform13, StyleSheet as StyleSheet34 } from "react-native";
|
|
4969
5009
|
import Animated4, { FadeIn as FadeIn3 } from "react-native-reanimated";
|
|
4970
5010
|
import { useTheme as useTheme23 } from "@react-navigation/native";
|
|
4971
5011
|
var HoverCard = HoverCardPrimitive.Root;
|
|
@@ -4977,8 +5017,8 @@ function HoverCardContent({
|
|
|
4977
5017
|
...props
|
|
4978
5018
|
}) {
|
|
4979
5019
|
const { colors } = useTheme23();
|
|
4980
|
-
const contentStyles =
|
|
4981
|
-
|
|
5020
|
+
const contentStyles = StyleSheet34.flatten([
|
|
5021
|
+
styles30.content,
|
|
4982
5022
|
{
|
|
4983
5023
|
backgroundColor: colors.background,
|
|
4984
5024
|
borderColor: colors.border,
|
|
@@ -4992,7 +5032,7 @@ function HoverCardContent({
|
|
|
4992
5032
|
return /* @__PURE__ */ React41.createElement(HoverCardPrimitive.Portal, null, /* @__PURE__ */ React41.createElement(
|
|
4993
5033
|
HoverCardPrimitive.Overlay,
|
|
4994
5034
|
{
|
|
4995
|
-
style:
|
|
5035
|
+
style: Platform13.OS !== "web" ? StyleSheet34.absoluteFill : void 0
|
|
4996
5036
|
},
|
|
4997
5037
|
/* @__PURE__ */ React41.createElement(Animated4.View, { entering: FadeIn3 }, /* @__PURE__ */ React41.createElement(TextStyleProvider, { style: textStyles2 }, /* @__PURE__ */ React41.createElement(
|
|
4998
5038
|
HoverCardPrimitive.Content,
|
|
@@ -5005,7 +5045,7 @@ function HoverCardContent({
|
|
|
5005
5045
|
)))
|
|
5006
5046
|
));
|
|
5007
5047
|
}
|
|
5008
|
-
var
|
|
5048
|
+
var styles30 = StyleSheet34.create({
|
|
5009
5049
|
content: {
|
|
5010
5050
|
zIndex: 50,
|
|
5011
5051
|
width: 256,
|
|
@@ -5022,7 +5062,7 @@ var styles29 = StyleSheet33.create({
|
|
|
5022
5062
|
// components/ui/label.tsx
|
|
5023
5063
|
import * as LabelPrimitive from "@rn-primitives/label";
|
|
5024
5064
|
import * as React42 from "react";
|
|
5025
|
-
import { StyleSheet as
|
|
5065
|
+
import { StyleSheet as StyleSheet35 } from "react-native";
|
|
5026
5066
|
function Label3({
|
|
5027
5067
|
style,
|
|
5028
5068
|
onPress,
|
|
@@ -5034,7 +5074,7 @@ function Label3({
|
|
|
5034
5074
|
return /* @__PURE__ */ React42.createElement(
|
|
5035
5075
|
LabelPrimitive.Root,
|
|
5036
5076
|
{
|
|
5037
|
-
style:
|
|
5077
|
+
style: styles31.root,
|
|
5038
5078
|
onPress,
|
|
5039
5079
|
onLongPress,
|
|
5040
5080
|
onPressIn,
|
|
@@ -5043,13 +5083,13 @@ function Label3({
|
|
|
5043
5083
|
/* @__PURE__ */ React42.createElement(
|
|
5044
5084
|
LabelPrimitive.Text,
|
|
5045
5085
|
{
|
|
5046
|
-
style:
|
|
5086
|
+
style: StyleSheet35.flatten([styles31.text, style]),
|
|
5047
5087
|
...props
|
|
5048
5088
|
}
|
|
5049
5089
|
)
|
|
5050
5090
|
);
|
|
5051
5091
|
}
|
|
5052
|
-
var
|
|
5092
|
+
var styles31 = StyleSheet35.create({
|
|
5053
5093
|
root: {
|
|
5054
5094
|
// web:cursor-default - handled by platform
|
|
5055
5095
|
},
|
|
@@ -5066,7 +5106,7 @@ var styles30 = StyleSheet34.create({
|
|
|
5066
5106
|
// components/ui/menubar.tsx
|
|
5067
5107
|
import * as MenubarPrimitive from "@rn-primitives/menubar";
|
|
5068
5108
|
import * as React43 from "react";
|
|
5069
|
-
import { Platform as
|
|
5109
|
+
import { Platform as Platform14, Text as Text7, View as View24, StyleSheet as StyleSheet36 } from "react-native";
|
|
5070
5110
|
import { Check as Check4 } from "lucide-react-native";
|
|
5071
5111
|
import { ChevronDown as ChevronDown5 } from "lucide-react-native";
|
|
5072
5112
|
import { ChevronRight as ChevronRight4 } from "lucide-react-native";
|
|
@@ -5082,8 +5122,8 @@ function Menubar({
|
|
|
5082
5122
|
...props
|
|
5083
5123
|
}) {
|
|
5084
5124
|
const { colors } = useTheme24();
|
|
5085
|
-
const rootStyles =
|
|
5086
|
-
|
|
5125
|
+
const rootStyles = StyleSheet36.flatten([
|
|
5126
|
+
styles32.root,
|
|
5087
5127
|
{
|
|
5088
5128
|
backgroundColor: colors.background,
|
|
5089
5129
|
borderColor: colors.border
|
|
@@ -5099,8 +5139,8 @@ function MenubarTrigger({
|
|
|
5099
5139
|
const { colors } = useTheme24();
|
|
5100
5140
|
const { value } = MenubarPrimitive.useRootContext();
|
|
5101
5141
|
const { value: itemValue } = MenubarPrimitive.useMenuContext();
|
|
5102
|
-
const triggerStyles =
|
|
5103
|
-
|
|
5142
|
+
const triggerStyles = StyleSheet36.flatten([
|
|
5143
|
+
styles32.trigger,
|
|
5104
5144
|
{
|
|
5105
5145
|
backgroundColor: value === itemValue ? colors.border : "transparent",
|
|
5106
5146
|
color: value === itemValue ? colors.text : colors.text
|
|
@@ -5117,28 +5157,28 @@ function MenubarSubTrigger({
|
|
|
5117
5157
|
}) {
|
|
5118
5158
|
const { colors } = useTheme24();
|
|
5119
5159
|
const { open } = MenubarPrimitive.useSubContext();
|
|
5120
|
-
const Icon2 =
|
|
5160
|
+
const Icon2 = Platform14.OS === "web" ? ChevronRight4 : open ? ChevronUp3 : ChevronDown5;
|
|
5121
5161
|
const textStyles2 = {
|
|
5122
|
-
fontSize:
|
|
5162
|
+
fontSize: Platform14.OS === "web" ? 14 : 18,
|
|
5123
5163
|
color: open ? colors.primary : colors.primary
|
|
5124
5164
|
};
|
|
5125
|
-
const triggerStyles =
|
|
5126
|
-
|
|
5165
|
+
const triggerStyles = StyleSheet36.flatten([
|
|
5166
|
+
styles32.subTrigger,
|
|
5127
5167
|
{
|
|
5128
5168
|
backgroundColor: open ? colors.border : "transparent",
|
|
5129
5169
|
paddingLeft: inset ? 32 : 8
|
|
5130
5170
|
},
|
|
5131
5171
|
style
|
|
5132
5172
|
]);
|
|
5133
|
-
return /* @__PURE__ */ React43.createElement(TextStyleProvider, { style: textStyles2 }, /* @__PURE__ */ React43.createElement(MenubarPrimitive.SubTrigger, { style: triggerStyles, ...props }, children, /* @__PURE__ */ React43.createElement(Icon2, { size: 18, color: colors.text, style:
|
|
5173
|
+
return /* @__PURE__ */ React43.createElement(TextStyleProvider, { style: textStyles2 }, /* @__PURE__ */ React43.createElement(MenubarPrimitive.SubTrigger, { style: triggerStyles, ...props }, children, /* @__PURE__ */ React43.createElement(Icon2, { size: 18, color: colors.text, style: styles32.icon })));
|
|
5134
5174
|
}
|
|
5135
5175
|
function MenubarSubContent({
|
|
5136
5176
|
style,
|
|
5137
5177
|
...props
|
|
5138
5178
|
}) {
|
|
5139
5179
|
const { colors } = useTheme24();
|
|
5140
|
-
const contentStyles =
|
|
5141
|
-
|
|
5180
|
+
const contentStyles = StyleSheet36.flatten([
|
|
5181
|
+
styles32.subContent,
|
|
5142
5182
|
{
|
|
5143
5183
|
backgroundColor: colors.background,
|
|
5144
5184
|
borderColor: colors.border,
|
|
@@ -5154,8 +5194,8 @@ function MenubarContent({
|
|
|
5154
5194
|
...props
|
|
5155
5195
|
}) {
|
|
5156
5196
|
const { colors } = useTheme24();
|
|
5157
|
-
const contentStyles =
|
|
5158
|
-
|
|
5197
|
+
const contentStyles = StyleSheet36.flatten([
|
|
5198
|
+
styles32.content,
|
|
5159
5199
|
{
|
|
5160
5200
|
backgroundColor: colors.background,
|
|
5161
5201
|
borderColor: colors.border,
|
|
@@ -5172,11 +5212,11 @@ function MenubarItem({
|
|
|
5172
5212
|
}) {
|
|
5173
5213
|
const { colors } = useTheme24();
|
|
5174
5214
|
const textStyles2 = {
|
|
5175
|
-
fontSize:
|
|
5215
|
+
fontSize: Platform14.OS === "web" ? 14 : 18,
|
|
5176
5216
|
color: colors.text
|
|
5177
5217
|
};
|
|
5178
|
-
const itemStyles =
|
|
5179
|
-
|
|
5218
|
+
const itemStyles = StyleSheet36.flatten([
|
|
5219
|
+
styles32.item,
|
|
5180
5220
|
{
|
|
5181
5221
|
paddingLeft: inset ? 32 : 8,
|
|
5182
5222
|
opacity: props.disabled ? 0.5 : 1
|
|
@@ -5192,8 +5232,8 @@ function MenubarCheckboxItem({
|
|
|
5192
5232
|
...props
|
|
5193
5233
|
}) {
|
|
5194
5234
|
const { colors } = useTheme24();
|
|
5195
|
-
const checkboxStyles =
|
|
5196
|
-
|
|
5235
|
+
const checkboxStyles = StyleSheet36.flatten([
|
|
5236
|
+
styles32.checkboxItem,
|
|
5197
5237
|
{
|
|
5198
5238
|
opacity: props.disabled ? 0.5 : 1
|
|
5199
5239
|
},
|
|
@@ -5206,7 +5246,7 @@ function MenubarCheckboxItem({
|
|
|
5206
5246
|
checked,
|
|
5207
5247
|
...props
|
|
5208
5248
|
},
|
|
5209
|
-
/* @__PURE__ */ React43.createElement(View24, { style:
|
|
5249
|
+
/* @__PURE__ */ React43.createElement(View24, { style: styles32.checkboxIndicator }, /* @__PURE__ */ React43.createElement(MenubarPrimitive.ItemIndicator, null, /* @__PURE__ */ React43.createElement(Check4, { size: 14, strokeWidth: 3, color: colors.text }))),
|
|
5210
5250
|
children
|
|
5211
5251
|
);
|
|
5212
5252
|
}
|
|
@@ -5216,14 +5256,14 @@ function MenubarRadioItem({
|
|
|
5216
5256
|
...props
|
|
5217
5257
|
}) {
|
|
5218
5258
|
const { colors } = useTheme24();
|
|
5219
|
-
const radioStyles =
|
|
5220
|
-
|
|
5259
|
+
const radioStyles = StyleSheet36.flatten([
|
|
5260
|
+
styles32.radioItem,
|
|
5221
5261
|
{
|
|
5222
5262
|
opacity: props.disabled ? 0.5 : 1
|
|
5223
5263
|
},
|
|
5224
5264
|
style
|
|
5225
5265
|
]);
|
|
5226
|
-
return /* @__PURE__ */ React43.createElement(MenubarPrimitive.RadioItem, { style: radioStyles, ...props }, /* @__PURE__ */ React43.createElement(View24, { style:
|
|
5266
|
+
return /* @__PURE__ */ React43.createElement(MenubarPrimitive.RadioItem, { style: radioStyles, ...props }, /* @__PURE__ */ React43.createElement(View24, { style: styles32.radioIndicator }, /* @__PURE__ */ React43.createElement(MenubarPrimitive.ItemIndicator, null, /* @__PURE__ */ React43.createElement(View24, { style: [styles32.radioDot, { backgroundColor: colors.text }] }))), children);
|
|
5227
5267
|
}
|
|
5228
5268
|
function MenubarLabel({
|
|
5229
5269
|
style,
|
|
@@ -5231,8 +5271,8 @@ function MenubarLabel({
|
|
|
5231
5271
|
...props
|
|
5232
5272
|
}) {
|
|
5233
5273
|
const { colors } = useTheme24();
|
|
5234
|
-
const labelStyles =
|
|
5235
|
-
|
|
5274
|
+
const labelStyles = StyleSheet36.flatten([
|
|
5275
|
+
styles32.label,
|
|
5236
5276
|
{
|
|
5237
5277
|
color: colors.text,
|
|
5238
5278
|
paddingLeft: inset ? 32 : 8
|
|
@@ -5246,8 +5286,8 @@ function MenubarSeparator({
|
|
|
5246
5286
|
...props
|
|
5247
5287
|
}) {
|
|
5248
5288
|
const { colors } = useTheme24();
|
|
5249
|
-
const separatorStyles =
|
|
5250
|
-
|
|
5289
|
+
const separatorStyles = StyleSheet36.flatten([
|
|
5290
|
+
styles32.separator,
|
|
5251
5291
|
{
|
|
5252
5292
|
backgroundColor: colors.border
|
|
5253
5293
|
},
|
|
@@ -5257,8 +5297,8 @@ function MenubarSeparator({
|
|
|
5257
5297
|
}
|
|
5258
5298
|
function MenubarShortcut({ style, ...props }) {
|
|
5259
5299
|
const { colors } = useTheme24();
|
|
5260
|
-
const shortcutStyles =
|
|
5261
|
-
|
|
5300
|
+
const shortcutStyles = StyleSheet36.flatten([
|
|
5301
|
+
styles32.shortcut,
|
|
5262
5302
|
{
|
|
5263
5303
|
color: colors.text
|
|
5264
5304
|
},
|
|
@@ -5266,10 +5306,10 @@ function MenubarShortcut({ style, ...props }) {
|
|
|
5266
5306
|
]);
|
|
5267
5307
|
return /* @__PURE__ */ React43.createElement(Text7, { style: shortcutStyles, ...props });
|
|
5268
5308
|
}
|
|
5269
|
-
var
|
|
5309
|
+
var styles32 = StyleSheet36.create({
|
|
5270
5310
|
root: {
|
|
5271
5311
|
flexDirection: "row",
|
|
5272
|
-
height:
|
|
5312
|
+
height: Platform14.OS === "web" ? 40 : 48,
|
|
5273
5313
|
alignItems: "center",
|
|
5274
5314
|
gap: 4,
|
|
5275
5315
|
borderRadius: 6,
|
|
@@ -5282,7 +5322,7 @@ var styles31 = StyleSheet35.create({
|
|
|
5282
5322
|
borderRadius: 6,
|
|
5283
5323
|
paddingHorizontal: 12,
|
|
5284
5324
|
paddingVertical: 6,
|
|
5285
|
-
fontSize:
|
|
5325
|
+
fontSize: Platform14.OS === "web" ? 14 : 16,
|
|
5286
5326
|
fontWeight: "500"
|
|
5287
5327
|
},
|
|
5288
5328
|
subTrigger: {
|
|
@@ -5366,7 +5406,7 @@ var styles31 = StyleSheet35.create({
|
|
|
5366
5406
|
label: {
|
|
5367
5407
|
paddingHorizontal: 8,
|
|
5368
5408
|
paddingVertical: 6,
|
|
5369
|
-
fontSize:
|
|
5409
|
+
fontSize: Platform14.OS === "web" ? 14 : 16,
|
|
5370
5410
|
fontWeight: "600"
|
|
5371
5411
|
},
|
|
5372
5412
|
separator: {
|
|
@@ -5376,7 +5416,7 @@ var styles31 = StyleSheet35.create({
|
|
|
5376
5416
|
},
|
|
5377
5417
|
shortcut: {
|
|
5378
5418
|
marginLeft: "auto",
|
|
5379
|
-
fontSize:
|
|
5419
|
+
fontSize: Platform14.OS === "web" ? 12 : 14,
|
|
5380
5420
|
letterSpacing: 1
|
|
5381
5421
|
},
|
|
5382
5422
|
icon: {
|
|
@@ -5387,7 +5427,7 @@ var styles31 = StyleSheet35.create({
|
|
|
5387
5427
|
// components/ui/navigation-menu.tsx
|
|
5388
5428
|
import * as NavigationMenuPrimitive from "@rn-primitives/navigation-menu";
|
|
5389
5429
|
import * as React44 from "react";
|
|
5390
|
-
import { Platform as
|
|
5430
|
+
import { Platform as Platform15, View as View25, StyleSheet as StyleSheet37, Pressable as Pressable5 } from "react-native";
|
|
5391
5431
|
import { ChevronDown as ChevronDown6 } from "lucide-react-native";
|
|
5392
5432
|
import { useTheme as useTheme25 } from "@react-navigation/native";
|
|
5393
5433
|
function NavigationMenu({
|
|
@@ -5398,11 +5438,11 @@ function NavigationMenu({
|
|
|
5398
5438
|
return /* @__PURE__ */ React44.createElement(
|
|
5399
5439
|
NavigationMenuPrimitive.Root,
|
|
5400
5440
|
{
|
|
5401
|
-
style:
|
|
5441
|
+
style: StyleSheet37.flatten([styles33.navigationMenu, style]),
|
|
5402
5442
|
...props
|
|
5403
5443
|
},
|
|
5404
5444
|
children,
|
|
5405
|
-
|
|
5445
|
+
Platform15.OS === "web" && /* @__PURE__ */ React44.createElement(NavigationMenuViewport, null)
|
|
5406
5446
|
);
|
|
5407
5447
|
}
|
|
5408
5448
|
function NavigationMenuList({
|
|
@@ -5412,7 +5452,7 @@ function NavigationMenuList({
|
|
|
5412
5452
|
return /* @__PURE__ */ React44.createElement(
|
|
5413
5453
|
NavigationMenuPrimitive.List,
|
|
5414
5454
|
{
|
|
5415
|
-
style:
|
|
5455
|
+
style: StyleSheet37.flatten([styles33.navigationMenuList, style]),
|
|
5416
5456
|
...props
|
|
5417
5457
|
}
|
|
5418
5458
|
);
|
|
@@ -5431,14 +5471,14 @@ function NavigationMenuTrigger({
|
|
|
5431
5471
|
Pressable5,
|
|
5432
5472
|
{
|
|
5433
5473
|
style: ({ hovered }) => ({
|
|
5434
|
-
...
|
|
5474
|
+
...styles33.trigger,
|
|
5435
5475
|
backgroundColor: isActive ? colors.card : hovered ? colors.border : colors.background,
|
|
5436
5476
|
...style
|
|
5437
5477
|
}),
|
|
5438
5478
|
...props
|
|
5439
5479
|
},
|
|
5440
5480
|
children,
|
|
5441
|
-
/* @__PURE__ */ React44.createElement(View25, { style:
|
|
5481
|
+
/* @__PURE__ */ React44.createElement(View25, { style: styles33.chevronContainer }, /* @__PURE__ */ React44.createElement(ChevronDown6, { size: 12, color: colors.text, "aria-hidden": true }))
|
|
5442
5482
|
));
|
|
5443
5483
|
}
|
|
5444
5484
|
function NavigationMenuContent({
|
|
@@ -5451,8 +5491,8 @@ function NavigationMenuContent({
|
|
|
5451
5491
|
return /* @__PURE__ */ React44.createElement(NavigationMenuPrimitive.Portal, { hostName: portalHost }, /* @__PURE__ */ React44.createElement(
|
|
5452
5492
|
NavigationMenuPrimitive.Content,
|
|
5453
5493
|
{
|
|
5454
|
-
style:
|
|
5455
|
-
|
|
5494
|
+
style: StyleSheet37.flatten([
|
|
5495
|
+
styles33.content,
|
|
5456
5496
|
{
|
|
5457
5497
|
backgroundColor: colors.background,
|
|
5458
5498
|
borderColor: colors.border
|
|
@@ -5470,11 +5510,11 @@ function NavigationMenuViewport({
|
|
|
5470
5510
|
...props
|
|
5471
5511
|
}) {
|
|
5472
5512
|
const { colors } = useTheme25();
|
|
5473
|
-
return /* @__PURE__ */ React44.createElement(View25, { style:
|
|
5513
|
+
return /* @__PURE__ */ React44.createElement(View25, { style: styles33.viewportContainer }, /* @__PURE__ */ React44.createElement(
|
|
5474
5514
|
View25,
|
|
5475
5515
|
{
|
|
5476
|
-
style:
|
|
5477
|
-
|
|
5516
|
+
style: StyleSheet37.flatten([
|
|
5517
|
+
styles33.viewport,
|
|
5478
5518
|
{
|
|
5479
5519
|
backgroundColor: colors.background,
|
|
5480
5520
|
borderColor: colors.border
|
|
@@ -5496,21 +5536,21 @@ function NavigationMenuIndicator({
|
|
|
5496
5536
|
NavigationMenuPrimitive.Indicator,
|
|
5497
5537
|
{
|
|
5498
5538
|
ref,
|
|
5499
|
-
style:
|
|
5539
|
+
style: StyleSheet37.flatten([styles33.indicator, style]),
|
|
5500
5540
|
...props
|
|
5501
5541
|
},
|
|
5502
5542
|
/* @__PURE__ */ React44.createElement(
|
|
5503
5543
|
View25,
|
|
5504
5544
|
{
|
|
5505
|
-
style:
|
|
5506
|
-
|
|
5545
|
+
style: StyleSheet37.flatten([
|
|
5546
|
+
styles33.indicatorArrow,
|
|
5507
5547
|
{ backgroundColor: colors.border }
|
|
5508
5548
|
])
|
|
5509
5549
|
}
|
|
5510
5550
|
)
|
|
5511
5551
|
);
|
|
5512
5552
|
}
|
|
5513
|
-
var
|
|
5553
|
+
var styles33 = StyleSheet37.create({
|
|
5514
5554
|
navigationMenu: {
|
|
5515
5555
|
position: "relative",
|
|
5516
5556
|
zIndex: 10,
|
|
@@ -5525,14 +5565,14 @@ var styles32 = StyleSheet36.create({
|
|
|
5525
5565
|
alignItems: "center",
|
|
5526
5566
|
justifyContent: "center",
|
|
5527
5567
|
gap: 4,
|
|
5528
|
-
...
|
|
5568
|
+
...Platform15.OS === "web" && {
|
|
5529
5569
|
listStyle: "none"
|
|
5530
5570
|
}
|
|
5531
5571
|
},
|
|
5532
5572
|
trigger: {
|
|
5533
5573
|
flexDirection: "row",
|
|
5534
|
-
height:
|
|
5535
|
-
paddingHorizontal:
|
|
5574
|
+
height: Platform15.OS === "web" ? 40 : 48,
|
|
5575
|
+
paddingHorizontal: Platform15.OS === "web" ? 16 : 12,
|
|
5536
5576
|
paddingVertical: 8,
|
|
5537
5577
|
alignItems: "center",
|
|
5538
5578
|
justifyContent: "center",
|
|
@@ -5545,7 +5585,7 @@ var styles32 = StyleSheet36.create({
|
|
|
5545
5585
|
},
|
|
5546
5586
|
content: {
|
|
5547
5587
|
width: "100%",
|
|
5548
|
-
...
|
|
5588
|
+
...Platform15.OS !== "web" && {
|
|
5549
5589
|
borderWidth: 1,
|
|
5550
5590
|
borderRadius: 8,
|
|
5551
5591
|
shadowColor: "#000",
|
|
@@ -5557,7 +5597,7 @@ var styles32 = StyleSheet36.create({
|
|
|
5557
5597
|
}
|
|
5558
5598
|
},
|
|
5559
5599
|
viewportContainer: {
|
|
5560
|
-
...
|
|
5600
|
+
...Platform15.OS === "web" && {
|
|
5561
5601
|
position: "fixed",
|
|
5562
5602
|
right: 0,
|
|
5563
5603
|
top: 48,
|
|
@@ -5568,7 +5608,7 @@ var styles32 = StyleSheet36.create({
|
|
|
5568
5608
|
}
|
|
5569
5609
|
},
|
|
5570
5610
|
viewport: {
|
|
5571
|
-
...
|
|
5611
|
+
...Platform15.OS === "web" && {
|
|
5572
5612
|
position: "relative",
|
|
5573
5613
|
marginTop: 6,
|
|
5574
5614
|
width: "100%",
|
|
@@ -5610,7 +5650,7 @@ var styles32 = StyleSheet36.create({
|
|
|
5610
5650
|
// components/ui/popover.tsx
|
|
5611
5651
|
import React45 from "react";
|
|
5612
5652
|
import * as PopoverPrimitive from "@rn-primitives/popover";
|
|
5613
|
-
import { Platform as
|
|
5653
|
+
import { Platform as Platform16, StyleSheet as StyleSheet38 } from "react-native";
|
|
5614
5654
|
import Animated5, { FadeIn as FadeIn4, FadeOut as FadeOut2 } from "react-native-reanimated";
|
|
5615
5655
|
import { useTheme as useTheme26 } from "@react-navigation/native";
|
|
5616
5656
|
var Popover = PopoverPrimitive.Root;
|
|
@@ -5623,8 +5663,8 @@ function PopoverContent({
|
|
|
5623
5663
|
...props
|
|
5624
5664
|
}) {
|
|
5625
5665
|
const { colors } = useTheme26();
|
|
5626
|
-
const contentStyles =
|
|
5627
|
-
|
|
5666
|
+
const contentStyles = StyleSheet38.flatten([
|
|
5667
|
+
styles34.content,
|
|
5628
5668
|
{
|
|
5629
5669
|
backgroundColor: colors.background,
|
|
5630
5670
|
borderColor: colors.border,
|
|
@@ -5638,7 +5678,7 @@ function PopoverContent({
|
|
|
5638
5678
|
return /* @__PURE__ */ React45.createElement(PopoverPrimitive.Portal, { hostName: portalHost }, /* @__PURE__ */ React45.createElement(
|
|
5639
5679
|
PopoverPrimitive.Overlay,
|
|
5640
5680
|
{
|
|
5641
|
-
style:
|
|
5681
|
+
style: Platform16.OS !== "web" ? StyleSheet38.absoluteFill : void 0
|
|
5642
5682
|
},
|
|
5643
5683
|
/* @__PURE__ */ React45.createElement(Animated5.View, { entering: FadeIn4.duration(200), exiting: FadeOut2 }, /* @__PURE__ */ React45.createElement(TextStyleProvider, { style: textStyles2 }, /* @__PURE__ */ React45.createElement(
|
|
5644
5684
|
PopoverPrimitive.Content,
|
|
@@ -5651,7 +5691,7 @@ function PopoverContent({
|
|
|
5651
5691
|
)))
|
|
5652
5692
|
));
|
|
5653
5693
|
}
|
|
5654
|
-
var
|
|
5694
|
+
var styles34 = StyleSheet38.create({
|
|
5655
5695
|
content: {
|
|
5656
5696
|
zIndex: 50,
|
|
5657
5697
|
width: 288,
|
|
@@ -5668,7 +5708,7 @@ var styles33 = StyleSheet37.create({
|
|
|
5668
5708
|
// components/ui/progress.tsx
|
|
5669
5709
|
import * as ProgressPrimitive from "@rn-primitives/progress";
|
|
5670
5710
|
import * as React46 from "react";
|
|
5671
|
-
import { Platform as
|
|
5711
|
+
import { Platform as Platform17, View as View26, StyleSheet as StyleSheet39 } from "react-native";
|
|
5672
5712
|
import Animated6, {
|
|
5673
5713
|
Extrapolation as Extrapolation2,
|
|
5674
5714
|
interpolate as interpolate2,
|
|
@@ -5684,8 +5724,8 @@ function Progress({
|
|
|
5684
5724
|
...props
|
|
5685
5725
|
}) {
|
|
5686
5726
|
const { colors } = useTheme27();
|
|
5687
|
-
const progressStyles =
|
|
5688
|
-
|
|
5727
|
+
const progressStyles = StyleSheet39.flatten([
|
|
5728
|
+
styles35.progress,
|
|
5689
5729
|
{ backgroundColor: colors.border },
|
|
5690
5730
|
style
|
|
5691
5731
|
]);
|
|
@@ -5705,12 +5745,12 @@ function Indicator4({
|
|
|
5705
5745
|
)
|
|
5706
5746
|
};
|
|
5707
5747
|
});
|
|
5708
|
-
if (
|
|
5748
|
+
if (Platform17.OS === "web") {
|
|
5709
5749
|
return /* @__PURE__ */ React46.createElement(
|
|
5710
5750
|
View26,
|
|
5711
5751
|
{
|
|
5712
|
-
style:
|
|
5713
|
-
|
|
5752
|
+
style: StyleSheet39.flatten([
|
|
5753
|
+
styles35.indicatorWeb,
|
|
5714
5754
|
{
|
|
5715
5755
|
transform: `translateX(-${100 - (value ?? 0)}%)`,
|
|
5716
5756
|
backgroundColor: colors.primary
|
|
@@ -5724,16 +5764,16 @@ function Indicator4({
|
|
|
5724
5764
|
return /* @__PURE__ */ React46.createElement(ProgressPrimitive.Indicator, { asChild: true }, /* @__PURE__ */ React46.createElement(
|
|
5725
5765
|
Animated6.View,
|
|
5726
5766
|
{
|
|
5727
|
-
style:
|
|
5767
|
+
style: StyleSheet39.flatten([
|
|
5728
5768
|
indicator,
|
|
5729
|
-
|
|
5769
|
+
styles35.indicator,
|
|
5730
5770
|
{ backgroundColor: colors.primary },
|
|
5731
5771
|
style
|
|
5732
5772
|
])
|
|
5733
5773
|
}
|
|
5734
5774
|
));
|
|
5735
5775
|
}
|
|
5736
|
-
var
|
|
5776
|
+
var styles35 = StyleSheet39.create({
|
|
5737
5777
|
progress: {
|
|
5738
5778
|
position: "relative",
|
|
5739
5779
|
height: 16,
|
|
@@ -5754,7 +5794,7 @@ var styles34 = StyleSheet38.create({
|
|
|
5754
5794
|
// components/ui/radio-group.tsx
|
|
5755
5795
|
import React47 from "react";
|
|
5756
5796
|
import * as RadioGroupPrimitive from "@rn-primitives/radio-group";
|
|
5757
|
-
import { View as View27, StyleSheet as
|
|
5797
|
+
import { View as View27, StyleSheet as StyleSheet40 } from "react-native";
|
|
5758
5798
|
import { useTheme as useTheme28 } from "@react-navigation/native";
|
|
5759
5799
|
function RadioGroup4({
|
|
5760
5800
|
style,
|
|
@@ -5763,7 +5803,7 @@ function RadioGroup4({
|
|
|
5763
5803
|
return /* @__PURE__ */ React47.createElement(
|
|
5764
5804
|
RadioGroupPrimitive.Root,
|
|
5765
5805
|
{
|
|
5766
|
-
style:
|
|
5806
|
+
style: StyleSheet40.flatten([styles36.root, style]),
|
|
5767
5807
|
...props
|
|
5768
5808
|
}
|
|
5769
5809
|
);
|
|
@@ -5773,27 +5813,27 @@ function RadioGroupItem({
|
|
|
5773
5813
|
...props
|
|
5774
5814
|
}) {
|
|
5775
5815
|
const { colors } = useTheme28();
|
|
5776
|
-
const itemStyles =
|
|
5777
|
-
|
|
5816
|
+
const itemStyles = StyleSheet40.flatten([
|
|
5817
|
+
styles36.item,
|
|
5778
5818
|
{
|
|
5779
5819
|
borderColor: colors.primary,
|
|
5780
5820
|
opacity: props.disabled ? 0.5 : 1
|
|
5781
5821
|
},
|
|
5782
5822
|
style
|
|
5783
5823
|
]);
|
|
5784
|
-
const indicatorStyles =
|
|
5785
|
-
|
|
5824
|
+
const indicatorStyles = StyleSheet40.flatten([
|
|
5825
|
+
styles36.indicator,
|
|
5786
5826
|
{ backgroundColor: colors.primary }
|
|
5787
5827
|
]);
|
|
5788
|
-
return /* @__PURE__ */ React47.createElement(RadioGroupPrimitive.Item, { style: itemStyles, ...props }, /* @__PURE__ */ React47.createElement(RadioGroupPrimitive.Indicator, { style:
|
|
5828
|
+
return /* @__PURE__ */ React47.createElement(RadioGroupPrimitive.Item, { style: itemStyles, ...props }, /* @__PURE__ */ React47.createElement(RadioGroupPrimitive.Indicator, { style: styles36.indicatorContainer }, /* @__PURE__ */ React47.createElement(View27, { style: indicatorStyles })));
|
|
5789
5829
|
}
|
|
5790
5830
|
function RadioGroupItemWithLabel({
|
|
5791
5831
|
value,
|
|
5792
5832
|
children
|
|
5793
5833
|
}) {
|
|
5794
|
-
return /* @__PURE__ */ React47.createElement(View27, { style:
|
|
5834
|
+
return /* @__PURE__ */ React47.createElement(View27, { style: styles36.itemWithLabel }, /* @__PURE__ */ React47.createElement(RadioGroupItem, { "aria-labelledby": `label-for-${value}`, value }), /* @__PURE__ */ React47.createElement(Label3, { nativeID: `label-for-${value}`, style: styles36.label }, children));
|
|
5795
5835
|
}
|
|
5796
|
-
var
|
|
5836
|
+
var styles36 = StyleSheet40.create({
|
|
5797
5837
|
root: {
|
|
5798
5838
|
gap: 8
|
|
5799
5839
|
},
|
|
@@ -5831,7 +5871,7 @@ var styles35 = StyleSheet39.create({
|
|
|
5831
5871
|
// components/ui/select.tsx
|
|
5832
5872
|
import * as SelectPrimitive from "@rn-primitives/select";
|
|
5833
5873
|
import * as React48 from "react";
|
|
5834
|
-
import { Platform as
|
|
5874
|
+
import { Platform as Platform18, StyleSheet as StyleSheet41, View as View28 } from "react-native";
|
|
5835
5875
|
import Animated7, { FadeIn as FadeIn5, FadeOut as FadeOut3 } from "react-native-reanimated";
|
|
5836
5876
|
import { Check as Check5 } from "lucide-react-native";
|
|
5837
5877
|
import { ChevronDown as ChevronDown7 } from "lucide-react-native";
|
|
@@ -5845,43 +5885,43 @@ function SelectTrigger({
|
|
|
5845
5885
|
children,
|
|
5846
5886
|
...props
|
|
5847
5887
|
}) {
|
|
5848
|
-
const triggerStyle =
|
|
5849
|
-
|
|
5850
|
-
props.disabled &&
|
|
5888
|
+
const triggerStyle = StyleSheet41.flatten([
|
|
5889
|
+
styles37.trigger,
|
|
5890
|
+
props.disabled && styles37.triggerDisabled,
|
|
5851
5891
|
style
|
|
5852
5892
|
]);
|
|
5853
|
-
return /* @__PURE__ */ React48.createElement(SelectPrimitive.Trigger, { ref, style: triggerStyle, ...props }, children, /* @__PURE__ */ React48.createElement(ChevronDown7, { size: 16, "aria-hidden": true, style:
|
|
5893
|
+
return /* @__PURE__ */ React48.createElement(SelectPrimitive.Trigger, { ref, style: triggerStyle, ...props }, children, /* @__PURE__ */ React48.createElement(ChevronDown7, { size: 16, "aria-hidden": true, style: styles37.chevron }));
|
|
5854
5894
|
}
|
|
5855
5895
|
function SelectScrollUpButton({
|
|
5856
5896
|
style,
|
|
5857
5897
|
...props
|
|
5858
5898
|
}) {
|
|
5859
|
-
if (
|
|
5899
|
+
if (Platform18.OS !== "web") {
|
|
5860
5900
|
return null;
|
|
5861
5901
|
}
|
|
5862
5902
|
return /* @__PURE__ */ React48.createElement(
|
|
5863
5903
|
SelectPrimitive.ScrollUpButton,
|
|
5864
5904
|
{
|
|
5865
|
-
style:
|
|
5905
|
+
style: StyleSheet41.flatten([styles37.scrollButton, style]),
|
|
5866
5906
|
...props
|
|
5867
5907
|
},
|
|
5868
|
-
/* @__PURE__ */ React48.createElement(ChevronUp4, { size: 14, style:
|
|
5908
|
+
/* @__PURE__ */ React48.createElement(ChevronUp4, { size: 14, style: styles37.chevron })
|
|
5869
5909
|
);
|
|
5870
5910
|
}
|
|
5871
5911
|
function SelectScrollDownButton({
|
|
5872
5912
|
style,
|
|
5873
5913
|
...props
|
|
5874
5914
|
}) {
|
|
5875
|
-
if (
|
|
5915
|
+
if (Platform18.OS !== "web") {
|
|
5876
5916
|
return null;
|
|
5877
5917
|
}
|
|
5878
5918
|
return /* @__PURE__ */ React48.createElement(
|
|
5879
5919
|
SelectPrimitive.ScrollDownButton,
|
|
5880
5920
|
{
|
|
5881
|
-
style:
|
|
5921
|
+
style: StyleSheet41.flatten([styles37.scrollButton, style]),
|
|
5882
5922
|
...props
|
|
5883
5923
|
},
|
|
5884
|
-
/* @__PURE__ */ React48.createElement(ChevronDown7, { size: 14, style:
|
|
5924
|
+
/* @__PURE__ */ React48.createElement(ChevronDown7, { size: 14, style: styles37.chevron })
|
|
5885
5925
|
);
|
|
5886
5926
|
}
|
|
5887
5927
|
function SelectContent({
|
|
@@ -5895,7 +5935,7 @@ function SelectContent({
|
|
|
5895
5935
|
return /* @__PURE__ */ React48.createElement(SelectPrimitive.Portal, { hostName: portalHost }, /* @__PURE__ */ React48.createElement(
|
|
5896
5936
|
SelectPrimitive.Overlay,
|
|
5897
5937
|
{
|
|
5898
|
-
style:
|
|
5938
|
+
style: Platform18.OS !== "web" ? StyleSheet41.absoluteFill : void 0
|
|
5899
5939
|
},
|
|
5900
5940
|
/* @__PURE__ */ React48.createElement(
|
|
5901
5941
|
Animated7.View,
|
|
@@ -5907,7 +5947,7 @@ function SelectContent({
|
|
|
5907
5947
|
/* @__PURE__ */ React48.createElement(
|
|
5908
5948
|
SelectPrimitive.Content,
|
|
5909
5949
|
{
|
|
5910
|
-
style:
|
|
5950
|
+
style: StyleSheet41.flatten([styles37.content, style]),
|
|
5911
5951
|
position,
|
|
5912
5952
|
...props
|
|
5913
5953
|
},
|
|
@@ -5915,8 +5955,8 @@ function SelectContent({
|
|
|
5915
5955
|
/* @__PURE__ */ React48.createElement(
|
|
5916
5956
|
SelectPrimitive.Viewport,
|
|
5917
5957
|
{
|
|
5918
|
-
style:
|
|
5919
|
-
|
|
5958
|
+
style: StyleSheet41.flatten([
|
|
5959
|
+
styles37.viewport,
|
|
5920
5960
|
position === "popper" && {
|
|
5921
5961
|
height: "var(--radix-select-trigger-height)",
|
|
5922
5962
|
width: "100%",
|
|
@@ -5938,7 +5978,7 @@ function SelectLabel({
|
|
|
5938
5978
|
return /* @__PURE__ */ React48.createElement(
|
|
5939
5979
|
SelectPrimitive.Label,
|
|
5940
5980
|
{
|
|
5941
|
-
style:
|
|
5981
|
+
style: StyleSheet41.flatten([styles37.label, style]),
|
|
5942
5982
|
...props
|
|
5943
5983
|
}
|
|
5944
5984
|
);
|
|
@@ -5947,19 +5987,19 @@ function SelectItem({
|
|
|
5947
5987
|
style,
|
|
5948
5988
|
...props
|
|
5949
5989
|
}) {
|
|
5950
|
-
const itemStyle =
|
|
5951
|
-
|
|
5952
|
-
props.disabled &&
|
|
5990
|
+
const itemStyle = StyleSheet41.flatten([
|
|
5991
|
+
styles37.item,
|
|
5992
|
+
props.disabled && styles37.itemDisabled,
|
|
5953
5993
|
style
|
|
5954
5994
|
]);
|
|
5955
|
-
return /* @__PURE__ */ React48.createElement(SelectPrimitive.Item, { style: itemStyle, ...props }, /* @__PURE__ */ React48.createElement(View28, { style:
|
|
5995
|
+
return /* @__PURE__ */ React48.createElement(SelectPrimitive.Item, { style: itemStyle, ...props }, /* @__PURE__ */ React48.createElement(View28, { style: styles37.itemIndicator }, /* @__PURE__ */ React48.createElement(SelectPrimitive.ItemIndicator, null, /* @__PURE__ */ React48.createElement(
|
|
5956
5996
|
Check5,
|
|
5957
5997
|
{
|
|
5958
5998
|
size: 16,
|
|
5959
5999
|
strokeWidth: 3,
|
|
5960
6000
|
color: "hsl(var(--popover-foreground))"
|
|
5961
6001
|
}
|
|
5962
|
-
))), /* @__PURE__ */ React48.createElement(SelectPrimitive.ItemText, { style:
|
|
6002
|
+
))), /* @__PURE__ */ React48.createElement(SelectPrimitive.ItemText, { style: styles37.itemText }));
|
|
5963
6003
|
}
|
|
5964
6004
|
function SelectSeparator({
|
|
5965
6005
|
style,
|
|
@@ -5968,12 +6008,12 @@ function SelectSeparator({
|
|
|
5968
6008
|
return /* @__PURE__ */ React48.createElement(
|
|
5969
6009
|
SelectPrimitive.Separator,
|
|
5970
6010
|
{
|
|
5971
|
-
style:
|
|
6011
|
+
style: StyleSheet41.flatten([styles37.separator, style]),
|
|
5972
6012
|
...props
|
|
5973
6013
|
}
|
|
5974
6014
|
);
|
|
5975
6015
|
}
|
|
5976
|
-
var
|
|
6016
|
+
var styles37 = StyleSheet41.create({
|
|
5977
6017
|
trigger: {
|
|
5978
6018
|
flexDirection: "row",
|
|
5979
6019
|
height: 40,
|
|
@@ -6072,7 +6112,7 @@ import Animated8, {
|
|
|
6072
6112
|
withSequence,
|
|
6073
6113
|
withTiming as withTiming3
|
|
6074
6114
|
} from "react-native-reanimated";
|
|
6075
|
-
import { StyleSheet as
|
|
6115
|
+
import { StyleSheet as StyleSheet42 } from "react-native";
|
|
6076
6116
|
import { useTheme as useTheme29 } from "@react-navigation/native";
|
|
6077
6117
|
var duration = 1e3;
|
|
6078
6118
|
function Skeleton({
|
|
@@ -6089,13 +6129,13 @@ function Skeleton({
|
|
|
6089
6129
|
}, []);
|
|
6090
6130
|
const animatedStyle = useAnimatedStyle4(() => ({
|
|
6091
6131
|
opacity: sv.value,
|
|
6092
|
-
...
|
|
6132
|
+
...styles38.skeleton,
|
|
6093
6133
|
backgroundColor: colors.border,
|
|
6094
6134
|
style
|
|
6095
6135
|
}));
|
|
6096
6136
|
return /* @__PURE__ */ React49.createElement(Animated8.View, { style: animatedStyle, ...props });
|
|
6097
6137
|
}
|
|
6098
|
-
var
|
|
6138
|
+
var styles38 = StyleSheet42.create({
|
|
6099
6139
|
skeleton: {
|
|
6100
6140
|
borderRadius: 6
|
|
6101
6141
|
}
|
|
@@ -6104,7 +6144,7 @@ var styles37 = StyleSheet41.create({
|
|
|
6104
6144
|
// components/ui/table.tsx
|
|
6105
6145
|
import * as TablePrimitive from "@rn-primitives/table";
|
|
6106
6146
|
import * as React50 from "react";
|
|
6107
|
-
import { StyleSheet as
|
|
6147
|
+
import { StyleSheet as StyleSheet43 } from "react-native";
|
|
6108
6148
|
function Table({
|
|
6109
6149
|
style,
|
|
6110
6150
|
...props
|
|
@@ -6112,7 +6152,7 @@ function Table({
|
|
|
6112
6152
|
return /* @__PURE__ */ React50.createElement(
|
|
6113
6153
|
TablePrimitive.Root,
|
|
6114
6154
|
{
|
|
6115
|
-
style:
|
|
6155
|
+
style: StyleSheet43.flatten([styles39.table, style]),
|
|
6116
6156
|
...props
|
|
6117
6157
|
}
|
|
6118
6158
|
);
|
|
@@ -6124,7 +6164,7 @@ function TableHeader({
|
|
|
6124
6164
|
return /* @__PURE__ */ React50.createElement(
|
|
6125
6165
|
TablePrimitive.Header,
|
|
6126
6166
|
{
|
|
6127
|
-
style:
|
|
6167
|
+
style: StyleSheet43.flatten([styles39.header, style]),
|
|
6128
6168
|
...props
|
|
6129
6169
|
}
|
|
6130
6170
|
);
|
|
@@ -6136,7 +6176,7 @@ function TableBody({
|
|
|
6136
6176
|
return /* @__PURE__ */ React50.createElement(
|
|
6137
6177
|
TablePrimitive.Body,
|
|
6138
6178
|
{
|
|
6139
|
-
style:
|
|
6179
|
+
style: StyleSheet43.flatten([styles39.body, { minHeight: 2 }, style]),
|
|
6140
6180
|
...props
|
|
6141
6181
|
}
|
|
6142
6182
|
);
|
|
@@ -6148,7 +6188,7 @@ function TableFooter({
|
|
|
6148
6188
|
return /* @__PURE__ */ React50.createElement(
|
|
6149
6189
|
TablePrimitive.Footer,
|
|
6150
6190
|
{
|
|
6151
|
-
style:
|
|
6191
|
+
style: StyleSheet43.flatten([styles39.footer, style]),
|
|
6152
6192
|
...props
|
|
6153
6193
|
}
|
|
6154
6194
|
);
|
|
@@ -6160,7 +6200,7 @@ function TableRow({
|
|
|
6160
6200
|
return /* @__PURE__ */ React50.createElement(
|
|
6161
6201
|
TablePrimitive.Row,
|
|
6162
6202
|
{
|
|
6163
|
-
style:
|
|
6203
|
+
style: StyleSheet43.flatten([styles39.row, style]),
|
|
6164
6204
|
...props
|
|
6165
6205
|
}
|
|
6166
6206
|
);
|
|
@@ -6177,7 +6217,7 @@ function TableHead({
|
|
|
6177
6217
|
/* @__PURE__ */ React50.createElement(
|
|
6178
6218
|
TablePrimitive.Head,
|
|
6179
6219
|
{
|
|
6180
|
-
style:
|
|
6220
|
+
style: StyleSheet43.flatten([styles39.head, style]),
|
|
6181
6221
|
...props
|
|
6182
6222
|
}
|
|
6183
6223
|
)
|
|
@@ -6190,12 +6230,12 @@ function TableCell({
|
|
|
6190
6230
|
return /* @__PURE__ */ React50.createElement(
|
|
6191
6231
|
TablePrimitive.Cell,
|
|
6192
6232
|
{
|
|
6193
|
-
style:
|
|
6233
|
+
style: StyleSheet43.flatten([styles39.cell, style]),
|
|
6194
6234
|
...props
|
|
6195
6235
|
}
|
|
6196
6236
|
);
|
|
6197
6237
|
}
|
|
6198
|
-
var
|
|
6238
|
+
var styles39 = StyleSheet43.create({
|
|
6199
6239
|
table: {
|
|
6200
6240
|
width: "100%",
|
|
6201
6241
|
fontSize: 14
|
|
@@ -6236,7 +6276,7 @@ var styles38 = StyleSheet42.create({
|
|
|
6236
6276
|
// components/ui/tabs.tsx
|
|
6237
6277
|
import * as TabsPrimitive from "@rn-primitives/tabs";
|
|
6238
6278
|
import * as React51 from "react";
|
|
6239
|
-
import { StyleSheet as
|
|
6279
|
+
import { StyleSheet as StyleSheet44 } from "react-native";
|
|
6240
6280
|
var Tabs = TabsPrimitive.Root;
|
|
6241
6281
|
function TabsList({
|
|
6242
6282
|
style,
|
|
@@ -6245,7 +6285,7 @@ function TabsList({
|
|
|
6245
6285
|
return /* @__PURE__ */ React51.createElement(
|
|
6246
6286
|
TabsPrimitive.List,
|
|
6247
6287
|
{
|
|
6248
|
-
style:
|
|
6288
|
+
style: StyleSheet44.flatten([styles40.list, style]),
|
|
6249
6289
|
...props
|
|
6250
6290
|
}
|
|
6251
6291
|
);
|
|
@@ -6256,13 +6296,13 @@ function TabsTrigger({
|
|
|
6256
6296
|
}) {
|
|
6257
6297
|
const { value } = TabsPrimitive.useRootContext();
|
|
6258
6298
|
const isActive = props.value === value;
|
|
6259
|
-
const triggerStyle =
|
|
6260
|
-
|
|
6261
|
-
isActive &&
|
|
6262
|
-
props.disabled &&
|
|
6299
|
+
const triggerStyle = StyleSheet44.flatten([
|
|
6300
|
+
styles40.trigger,
|
|
6301
|
+
isActive && styles40.triggerActive,
|
|
6302
|
+
props.disabled && styles40.triggerDisabled,
|
|
6263
6303
|
style
|
|
6264
6304
|
]);
|
|
6265
|
-
const textStyle = isActive ?
|
|
6305
|
+
const textStyle = isActive ? StyleSheet44.flatten([styles40.triggerText, styles40.triggerTextActive]) : styles40.triggerText;
|
|
6266
6306
|
return /* @__PURE__ */ React51.createElement(TextStyleContext.Provider, { value: { style: textStyle } }, /* @__PURE__ */ React51.createElement(TabsPrimitive.Trigger, { style: triggerStyle, ...props }));
|
|
6267
6307
|
}
|
|
6268
6308
|
function TabsContent({
|
|
@@ -6271,7 +6311,7 @@ function TabsContent({
|
|
|
6271
6311
|
}) {
|
|
6272
6312
|
return /* @__PURE__ */ React51.createElement(TabsPrimitive.Content, { style, ...props });
|
|
6273
6313
|
}
|
|
6274
|
-
var
|
|
6314
|
+
var styles40 = StyleSheet44.create({
|
|
6275
6315
|
list: {
|
|
6276
6316
|
flexDirection: "row",
|
|
6277
6317
|
height: 40,
|
|
@@ -6316,7 +6356,7 @@ var styles39 = StyleSheet43.create({
|
|
|
6316
6356
|
|
|
6317
6357
|
// components/ui/textarea.tsx
|
|
6318
6358
|
import * as React52 from "react";
|
|
6319
|
-
import { TextInput as TextInput2, StyleSheet as
|
|
6359
|
+
import { TextInput as TextInput2, StyleSheet as StyleSheet45 } from "react-native";
|
|
6320
6360
|
function Textarea({
|
|
6321
6361
|
style,
|
|
6322
6362
|
multiline = true,
|
|
@@ -6324,9 +6364,9 @@ function Textarea({
|
|
|
6324
6364
|
placeholderTextColor,
|
|
6325
6365
|
...props
|
|
6326
6366
|
}) {
|
|
6327
|
-
const textareaStyle =
|
|
6328
|
-
|
|
6329
|
-
props.editable === false &&
|
|
6367
|
+
const textareaStyle = StyleSheet45.flatten([
|
|
6368
|
+
styles41.textarea,
|
|
6369
|
+
props.editable === false && styles41.textareaDisabled,
|
|
6330
6370
|
style
|
|
6331
6371
|
]);
|
|
6332
6372
|
return /* @__PURE__ */ React52.createElement(
|
|
@@ -6341,7 +6381,7 @@ function Textarea({
|
|
|
6341
6381
|
}
|
|
6342
6382
|
);
|
|
6343
6383
|
}
|
|
6344
|
-
var
|
|
6384
|
+
var styles41 = StyleSheet45.create({
|
|
6345
6385
|
textarea: {
|
|
6346
6386
|
minHeight: 80,
|
|
6347
6387
|
width: "100%",
|
|
@@ -6364,7 +6404,7 @@ var styles40 = StyleSheet44.create({
|
|
|
6364
6404
|
|
|
6365
6405
|
// components/ui/toggle-group.tsx
|
|
6366
6406
|
import * as React53 from "react";
|
|
6367
|
-
import { StyleSheet as
|
|
6407
|
+
import { StyleSheet as StyleSheet46 } from "react-native";
|
|
6368
6408
|
import { useTheme as useTheme30 } from "@react-navigation/native";
|
|
6369
6409
|
import * as ToggleGroupPrimitive from "@rn-primitives/toggle-group";
|
|
6370
6410
|
var ToggleGroupContext = React53.createContext(null);
|
|
@@ -6378,7 +6418,7 @@ function ToggleGroup({
|
|
|
6378
6418
|
return /* @__PURE__ */ React53.createElement(
|
|
6379
6419
|
ToggleGroupPrimitive.Root,
|
|
6380
6420
|
{
|
|
6381
|
-
style:
|
|
6421
|
+
style: StyleSheet46.flatten([styles42.root, style]),
|
|
6382
6422
|
...props
|
|
6383
6423
|
},
|
|
6384
6424
|
/* @__PURE__ */ React53.createElement(ToggleGroupContext.Provider, { value: { variant, size } }, children)
|
|
@@ -6415,23 +6455,23 @@ function ToggleGroupItem({
|
|
|
6415
6455
|
const getSizeStyles = () => {
|
|
6416
6456
|
switch (finalSize) {
|
|
6417
6457
|
case "sm":
|
|
6418
|
-
return
|
|
6458
|
+
return styles42.smItemSize;
|
|
6419
6459
|
case "lg":
|
|
6420
|
-
return
|
|
6460
|
+
return styles42.lgItemSize;
|
|
6421
6461
|
default:
|
|
6422
|
-
return
|
|
6462
|
+
return styles42.defaultItemSize;
|
|
6423
6463
|
}
|
|
6424
6464
|
};
|
|
6425
6465
|
const getVariantStyles = () => {
|
|
6426
6466
|
switch (finalVariant) {
|
|
6427
6467
|
case "outline":
|
|
6428
|
-
return
|
|
6468
|
+
return styles42.outlineItem;
|
|
6429
6469
|
default:
|
|
6430
|
-
return
|
|
6470
|
+
return styles42.defaultItem;
|
|
6431
6471
|
}
|
|
6432
6472
|
};
|
|
6433
|
-
const itemStyles =
|
|
6434
|
-
|
|
6473
|
+
const itemStyles = StyleSheet46.flatten([
|
|
6474
|
+
styles42.item,
|
|
6435
6475
|
getVariantStyles(),
|
|
6436
6476
|
getSizeStyles(),
|
|
6437
6477
|
{
|
|
@@ -6450,7 +6490,7 @@ function ToggleGroupIcon({
|
|
|
6450
6490
|
const { colors } = useTheme30();
|
|
6451
6491
|
return /* @__PURE__ */ React53.createElement(Icon2, { color: colors.text, ...props });
|
|
6452
6492
|
}
|
|
6453
|
-
var
|
|
6493
|
+
var styles42 = StyleSheet46.create({
|
|
6454
6494
|
root: {
|
|
6455
6495
|
flexDirection: "row",
|
|
6456
6496
|
alignItems: "center",
|
|
@@ -6486,7 +6526,7 @@ var styles41 = StyleSheet45.create({
|
|
|
6486
6526
|
// components/ui/toggle.tsx
|
|
6487
6527
|
import * as TogglePrimitive from "@rn-primitives/toggle";
|
|
6488
6528
|
import * as React54 from "react";
|
|
6489
|
-
import { StyleSheet as
|
|
6529
|
+
import { StyleSheet as StyleSheet47 } from "react-native";
|
|
6490
6530
|
import { useTheme as useTheme31 } from "@react-navigation/native";
|
|
6491
6531
|
var toggleVariants = {
|
|
6492
6532
|
default: {
|
|
@@ -6516,23 +6556,23 @@ function Toggle({
|
|
|
6516
6556
|
const getSizeStyles = () => {
|
|
6517
6557
|
switch (size) {
|
|
6518
6558
|
case "sm":
|
|
6519
|
-
return
|
|
6559
|
+
return styles43.smSize;
|
|
6520
6560
|
case "lg":
|
|
6521
|
-
return
|
|
6561
|
+
return styles43.lgSize;
|
|
6522
6562
|
default:
|
|
6523
|
-
return
|
|
6563
|
+
return styles43.defaultSize;
|
|
6524
6564
|
}
|
|
6525
6565
|
};
|
|
6526
6566
|
const getVariantStyles = () => {
|
|
6527
6567
|
switch (variant) {
|
|
6528
6568
|
case "outline":
|
|
6529
|
-
return
|
|
6569
|
+
return styles43.outlineVariant;
|
|
6530
6570
|
default:
|
|
6531
|
-
return
|
|
6571
|
+
return styles43.defaultVariant;
|
|
6532
6572
|
}
|
|
6533
6573
|
};
|
|
6534
|
-
const toggleStyles =
|
|
6535
|
-
|
|
6574
|
+
const toggleStyles = StyleSheet47.flatten([
|
|
6575
|
+
styles43.toggle,
|
|
6536
6576
|
getVariantStyles(),
|
|
6537
6577
|
getSizeStyles(),
|
|
6538
6578
|
{
|
|
@@ -6551,7 +6591,7 @@ function ToggleIcon({
|
|
|
6551
6591
|
const { colors } = useTheme31();
|
|
6552
6592
|
return /* @__PURE__ */ React54.createElement(Icon2, { color: colors.text, ...props });
|
|
6553
6593
|
}
|
|
6554
|
-
var
|
|
6594
|
+
var styles43 = StyleSheet47.create({
|
|
6555
6595
|
toggle: {
|
|
6556
6596
|
alignItems: "center",
|
|
6557
6597
|
justifyContent: "center",
|
|
@@ -6581,7 +6621,7 @@ var styles42 = StyleSheet46.create({
|
|
|
6581
6621
|
// components/ui/tooltip.tsx
|
|
6582
6622
|
import * as TooltipPrimitive from "@rn-primitives/tooltip";
|
|
6583
6623
|
import * as React55 from "react";
|
|
6584
|
-
import { Platform as
|
|
6624
|
+
import { Platform as Platform19, StyleSheet as StyleSheet48 } from "react-native";
|
|
6585
6625
|
import Animated9, { FadeIn as FadeIn6, FadeOut as FadeOut4 } from "react-native-reanimated";
|
|
6586
6626
|
import { useTheme as useTheme32 } from "@react-navigation/native";
|
|
6587
6627
|
var Tooltip = TooltipPrimitive.Root;
|
|
@@ -6593,8 +6633,8 @@ function TooltipContent({
|
|
|
6593
6633
|
...props
|
|
6594
6634
|
}) {
|
|
6595
6635
|
const { colors } = useTheme32();
|
|
6596
|
-
const tooltipStyles =
|
|
6597
|
-
|
|
6636
|
+
const tooltipStyles = StyleSheet48.flatten([
|
|
6637
|
+
styles44.content,
|
|
6598
6638
|
{
|
|
6599
6639
|
backgroundColor: colors.background,
|
|
6600
6640
|
borderColor: colors.border,
|
|
@@ -6603,19 +6643,19 @@ function TooltipContent({
|
|
|
6603
6643
|
style
|
|
6604
6644
|
]);
|
|
6605
6645
|
const textStyles2 = {
|
|
6606
|
-
fontSize:
|
|
6646
|
+
fontSize: Platform19.OS === "web" ? 14 : 16,
|
|
6607
6647
|
color: colors.text
|
|
6608
6648
|
};
|
|
6609
6649
|
return /* @__PURE__ */ React55.createElement(TooltipPrimitive.Portal, { hostName: portalHost }, /* @__PURE__ */ React55.createElement(
|
|
6610
6650
|
TooltipPrimitive.Overlay,
|
|
6611
6651
|
{
|
|
6612
|
-
style:
|
|
6652
|
+
style: Platform19.OS !== "web" ? StyleSheet48.absoluteFill : void 0
|
|
6613
6653
|
},
|
|
6614
6654
|
/* @__PURE__ */ React55.createElement(
|
|
6615
6655
|
Animated9.View,
|
|
6616
6656
|
{
|
|
6617
|
-
entering:
|
|
6618
|
-
exiting:
|
|
6657
|
+
entering: Platform19.select({ web: void 0, default: FadeIn6 }),
|
|
6658
|
+
exiting: Platform19.select({ web: void 0, default: FadeOut4 })
|
|
6619
6659
|
},
|
|
6620
6660
|
/* @__PURE__ */ React55.createElement(TextStyleProvider, { style: textStyles2 }, /* @__PURE__ */ React55.createElement(
|
|
6621
6661
|
TooltipPrimitive.Content,
|
|
@@ -6628,7 +6668,7 @@ function TooltipContent({
|
|
|
6628
6668
|
)
|
|
6629
6669
|
));
|
|
6630
6670
|
}
|
|
6631
|
-
var
|
|
6671
|
+
var styles44 = StyleSheet48.create({
|
|
6632
6672
|
content: {
|
|
6633
6673
|
zIndex: 50,
|
|
6634
6674
|
overflow: "hidden",
|
|
@@ -6646,7 +6686,7 @@ var styles43 = StyleSheet47.create({
|
|
|
6646
6686
|
// components/ui/typography.tsx
|
|
6647
6687
|
import * as Slot3 from "@rn-primitives/slot";
|
|
6648
6688
|
import * as React56 from "react";
|
|
6649
|
-
import { Platform as
|
|
6689
|
+
import { Platform as Platform20, Text as RNText2, StyleSheet as StyleSheet49 } from "react-native";
|
|
6650
6690
|
function H1({ style, asChild = false, ...props }) {
|
|
6651
6691
|
const Component = asChild ? Slot3.Text : RNText2;
|
|
6652
6692
|
return /* @__PURE__ */ React56.createElement(
|
|
@@ -6654,7 +6694,7 @@ function H1({ style, asChild = false, ...props }) {
|
|
|
6654
6694
|
{
|
|
6655
6695
|
role: "heading",
|
|
6656
6696
|
"aria-level": "1",
|
|
6657
|
-
style:
|
|
6697
|
+
style: StyleSheet49.flatten([styles45.h1, style]),
|
|
6658
6698
|
...props
|
|
6659
6699
|
}
|
|
6660
6700
|
);
|
|
@@ -6666,7 +6706,7 @@ function H2({ style, asChild = false, ...props }) {
|
|
|
6666
6706
|
{
|
|
6667
6707
|
role: "heading",
|
|
6668
6708
|
"aria-level": "2",
|
|
6669
|
-
style:
|
|
6709
|
+
style: StyleSheet49.flatten([styles45.h2, style]),
|
|
6670
6710
|
...props
|
|
6671
6711
|
}
|
|
6672
6712
|
);
|
|
@@ -6678,7 +6718,7 @@ function H3({ style, asChild = false, ...props }) {
|
|
|
6678
6718
|
{
|
|
6679
6719
|
role: "heading",
|
|
6680
6720
|
"aria-level": "3",
|
|
6681
|
-
style:
|
|
6721
|
+
style: StyleSheet49.flatten([styles45.h3, style]),
|
|
6682
6722
|
...props
|
|
6683
6723
|
}
|
|
6684
6724
|
);
|
|
@@ -6690,22 +6730,22 @@ function H4({ style, asChild = false, ...props }) {
|
|
|
6690
6730
|
{
|
|
6691
6731
|
role: "heading",
|
|
6692
6732
|
"aria-level": "4",
|
|
6693
|
-
style:
|
|
6733
|
+
style: StyleSheet49.flatten([styles45.h4, style]),
|
|
6694
6734
|
...props
|
|
6695
6735
|
}
|
|
6696
6736
|
);
|
|
6697
6737
|
}
|
|
6698
6738
|
function P({ style, asChild = false, ...props }) {
|
|
6699
6739
|
const Component = asChild ? Slot3.Text : RNText2;
|
|
6700
|
-
return /* @__PURE__ */ React56.createElement(Component, { style:
|
|
6740
|
+
return /* @__PURE__ */ React56.createElement(Component, { style: StyleSheet49.flatten([styles45.p, style]), ...props });
|
|
6701
6741
|
}
|
|
6702
6742
|
function BlockQuote({ style, asChild = false, ...props }) {
|
|
6703
6743
|
const Component = asChild ? Slot3.Text : RNText2;
|
|
6704
6744
|
return /* @__PURE__ */ React56.createElement(
|
|
6705
6745
|
Component,
|
|
6706
6746
|
{
|
|
6707
|
-
role:
|
|
6708
|
-
style:
|
|
6747
|
+
role: Platform20.OS === "web" ? "blockquote" : void 0,
|
|
6748
|
+
style: StyleSheet49.flatten([styles45.blockquote, style]),
|
|
6709
6749
|
...props
|
|
6710
6750
|
}
|
|
6711
6751
|
);
|
|
@@ -6715,29 +6755,29 @@ function Code({ style, asChild = false, ...props }) {
|
|
|
6715
6755
|
return /* @__PURE__ */ React56.createElement(
|
|
6716
6756
|
Component,
|
|
6717
6757
|
{
|
|
6718
|
-
role:
|
|
6719
|
-
style:
|
|
6758
|
+
role: Platform20.OS === "web" ? "code" : void 0,
|
|
6759
|
+
style: StyleSheet49.flatten([styles45.code, style]),
|
|
6720
6760
|
...props
|
|
6721
6761
|
}
|
|
6722
6762
|
);
|
|
6723
6763
|
}
|
|
6724
6764
|
function Lead({ style, asChild = false, ...props }) {
|
|
6725
6765
|
const Component = asChild ? Slot3.Text : RNText2;
|
|
6726
|
-
return /* @__PURE__ */ React56.createElement(Component, { style:
|
|
6766
|
+
return /* @__PURE__ */ React56.createElement(Component, { style: StyleSheet49.flatten([styles45.lead, style]), ...props });
|
|
6727
6767
|
}
|
|
6728
6768
|
function Large({ style, asChild = false, ...props }) {
|
|
6729
6769
|
const Component = asChild ? Slot3.Text : RNText2;
|
|
6730
|
-
return /* @__PURE__ */ React56.createElement(Component, { style:
|
|
6770
|
+
return /* @__PURE__ */ React56.createElement(Component, { style: StyleSheet49.flatten([styles45.large, style]), ...props });
|
|
6731
6771
|
}
|
|
6732
6772
|
function Small({ style, asChild = false, ...props }) {
|
|
6733
6773
|
const Component = asChild ? Slot3.Text : RNText2;
|
|
6734
|
-
return /* @__PURE__ */ React56.createElement(Component, { style:
|
|
6774
|
+
return /* @__PURE__ */ React56.createElement(Component, { style: StyleSheet49.flatten([styles45.small, style]), ...props });
|
|
6735
6775
|
}
|
|
6736
6776
|
function Muted({ style, asChild = false, ...props }) {
|
|
6737
6777
|
const Component = asChild ? Slot3.Text : RNText2;
|
|
6738
|
-
return /* @__PURE__ */ React56.createElement(Component, { style:
|
|
6778
|
+
return /* @__PURE__ */ React56.createElement(Component, { style: StyleSheet49.flatten([styles45.muted, style]), ...props });
|
|
6739
6779
|
}
|
|
6740
|
-
var
|
|
6780
|
+
var styles45 = StyleSheet49.create({
|
|
6741
6781
|
h1: {
|
|
6742
6782
|
fontSize: 36,
|
|
6743
6783
|
color: "hsl(var(--foreground))",
|
|
@@ -6830,11 +6870,11 @@ var ContainerResourceCreator = {
|
|
|
6830
6870
|
};
|
|
6831
6871
|
|
|
6832
6872
|
// resourceCreators/RdfResourceCreator.ts
|
|
6833
|
-
import {
|
|
6873
|
+
import { FileCode } from "lucide-react-native";
|
|
6834
6874
|
var RdfResourceCreator = {
|
|
6835
6875
|
name: "createRdf",
|
|
6836
6876
|
displayName: "RDF Turtle",
|
|
6837
|
-
displayIcon:
|
|
6877
|
+
displayIcon: FileCode,
|
|
6838
6878
|
canCreate: (container) => container.type === "SolidContainer",
|
|
6839
6879
|
create: async ({ container, createUtils }) => {
|
|
6840
6880
|
createUtils.loadingMessage("Asking for file name\u2026");
|
|
@@ -6852,6 +6892,7 @@ var RdfResourceCreator = {
|
|
|
6852
6892
|
|
|
6853
6893
|
// resourceCreators/FileUploadResourceCreator.ts
|
|
6854
6894
|
import { FileUp } from "lucide-react-native";
|
|
6895
|
+
import { Platform as Platform21 } from "react-native";
|
|
6855
6896
|
function basename(path) {
|
|
6856
6897
|
const lastSlash = path.lastIndexOf("/");
|
|
6857
6898
|
return lastSlash === -1 ? path : path.slice(lastSlash + 1);
|
|
@@ -6872,9 +6913,11 @@ var FileUploadResourceCreator = {
|
|
|
6872
6913
|
const slug = basename(file.name);
|
|
6873
6914
|
const mimeType = file.type || "application/octet-stream";
|
|
6874
6915
|
createUtils.loadingMessage(`Uploading ${slug}\u2026`);
|
|
6916
|
+
const body = Platform21.OS !== "web" ? await file.arrayBuffer() : file;
|
|
6875
6917
|
const result = await container.uploadChildAndOverwrite(
|
|
6876
6918
|
slug,
|
|
6877
|
-
|
|
6919
|
+
// @ts-ignore
|
|
6920
|
+
body,
|
|
6878
6921
|
mimeType
|
|
6879
6922
|
);
|
|
6880
6923
|
if (result.isError) {
|
|
@@ -6888,34 +6931,27 @@ var FileUploadResourceCreator = {
|
|
|
6888
6931
|
// resourceViews/Container/ContainerResourceView.tsx
|
|
6889
6932
|
import { Folders } from "lucide-react-native";
|
|
6890
6933
|
|
|
6934
|
+
// resourceViews/Container/DefaultContainerView.tsx
|
|
6935
|
+
import React62 from "react";
|
|
6936
|
+
|
|
6891
6937
|
// resourceViews/Container/ContainerView.tsx
|
|
6892
6938
|
import React57, {
|
|
6893
6939
|
useCallback as useCallback10,
|
|
6894
6940
|
useMemo as useMemo11,
|
|
6895
6941
|
useState as useState11
|
|
6896
6942
|
} from "react";
|
|
6897
|
-
import {
|
|
6898
|
-
View as View29,
|
|
6899
|
-
FlatList,
|
|
6900
|
-
StyleSheet as StyleSheet49,
|
|
6901
|
-
Pressable as Pressable6,
|
|
6902
|
-
ScrollView as ScrollView3,
|
|
6903
|
-
Platform as Platform22
|
|
6904
|
-
} from "react-native";
|
|
6943
|
+
import { Platform as Platform22 } from "react-native";
|
|
6905
6944
|
import * as DocumentPicker from "expo-document-picker";
|
|
6906
6945
|
import { CircleX as CircleX2 } from "lucide-react-native";
|
|
6907
|
-
import { Folder as Folder2 } from "lucide-react-native";
|
|
6908
|
-
import { Code as Code3 } from "lucide-react-native";
|
|
6909
|
-
import { File } from "lucide-react-native";
|
|
6910
|
-
import { Trash as Trash2 } from "lucide-react-native";
|
|
6911
|
-
import { Plus as Plus2 } from "lucide-react-native";
|
|
6912
6946
|
import { Notifier } from "react-native-notifier";
|
|
6913
|
-
|
|
6914
|
-
|
|
6915
|
-
|
|
6947
|
+
var ContainerView = ({
|
|
6948
|
+
Layout: Layout2,
|
|
6949
|
+
SideMenu,
|
|
6950
|
+
Content: Content13,
|
|
6951
|
+
ResourceItem
|
|
6952
|
+
}) => {
|
|
6916
6953
|
const { targetResource, navigateTo } = useViewContext();
|
|
6917
6954
|
const { prompt } = useDialog();
|
|
6918
|
-
const { colors } = useTheme33();
|
|
6919
6955
|
const { resourceCreators = [] } = useDataBrowserConfig();
|
|
6920
6956
|
const [isCreating, setIsCreating] = useState11(false);
|
|
6921
6957
|
const [loadingMessages, setLoadingMessages] = useState11([]);
|
|
@@ -6959,10 +6995,7 @@ var ContainerView = () => {
|
|
|
6959
6995
|
setIsCreating(true);
|
|
6960
6996
|
setLoadingMessages([]);
|
|
6961
6997
|
try {
|
|
6962
|
-
await creator.create({
|
|
6963
|
-
container: targetResource,
|
|
6964
|
-
createUtils
|
|
6965
|
-
});
|
|
6998
|
+
await creator.create({ container: targetResource, createUtils });
|
|
6966
6999
|
} finally {
|
|
6967
7000
|
setIsCreating(false);
|
|
6968
7001
|
setLoadingMessages([]);
|
|
@@ -6973,9 +7006,8 @@ var ContainerView = () => {
|
|
|
6973
7006
|
const onDelete = useCallback10(
|
|
6974
7007
|
async (item) => {
|
|
6975
7008
|
if (targetResource?.type !== "SolidContainer") return;
|
|
6976
|
-
const
|
|
6977
|
-
if (
|
|
6978
|
-
Notifier.showNotification({ title: createResult.message });
|
|
7009
|
+
const result = await item.delete();
|
|
7010
|
+
if (result.isError) Notifier.showNotification({ title: result.message });
|
|
6979
7011
|
},
|
|
6980
7012
|
[targetResource?.type]
|
|
6981
7013
|
);
|
|
@@ -6988,100 +7020,159 @@ var ContainerView = () => {
|
|
|
6988
7020
|
}
|
|
6989
7021
|
);
|
|
6990
7022
|
}
|
|
6991
|
-
|
|
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(
|
|
6992
7098
|
Button,
|
|
6993
7099
|
{
|
|
6994
7100
|
text: "Create",
|
|
6995
7101
|
iconLeft: Plus2,
|
|
6996
|
-
disabled: isCreating ||
|
|
7102
|
+
disabled: isCreating || creators.length === 0
|
|
6997
7103
|
}
|
|
6998
|
-
)), /* @__PURE__ */
|
|
6999
|
-
|
|
7104
|
+
)), /* @__PURE__ */ React59.createElement(
|
|
7105
|
+
DropdownMenuContent,
|
|
7000
7106
|
{
|
|
7001
|
-
|
|
7002
|
-
|
|
7107
|
+
align: "start",
|
|
7108
|
+
sideOffset: 4,
|
|
7109
|
+
style: styles47.dropdownContent
|
|
7003
7110
|
},
|
|
7004
|
-
/* @__PURE__ */
|
|
7005
|
-
|
|
7006
|
-
|
|
7007
|
-
|
|
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,
|
|
7008
7122
|
{
|
|
7009
|
-
style: [
|
|
7123
|
+
style: [styles47.creatingPanel, { backgroundColor: colors.border }]
|
|
7010
7124
|
},
|
|
7011
|
-
/* @__PURE__ */
|
|
7012
|
-
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(
|
|
7013
7127
|
ScrollView3,
|
|
7014
7128
|
{
|
|
7015
|
-
style:
|
|
7016
|
-
contentContainerStyle:
|
|
7129
|
+
style: styles47.loadingMessages,
|
|
7130
|
+
contentContainerStyle: styles47.loadingMessagesContent
|
|
7017
7131
|
},
|
|
7018
|
-
loadingMessages.map((msg, i) => /* @__PURE__ */
|
|
7132
|
+
loadingMessages.map((msg, i) => /* @__PURE__ */ React59.createElement(Text2, { key: i, style: styles47.loadingMessageItem }, msg))
|
|
7019
7133
|
)
|
|
7020
|
-
)
|
|
7021
|
-
|
|
7134
|
+
), session.isActive && /* @__PURE__ */ React59.createElement(React59.Fragment, null, /* @__PURE__ */ React59.createElement(
|
|
7135
|
+
View30,
|
|
7022
7136
|
{
|
|
7023
|
-
style: [
|
|
7024
|
-
|
|
7025
|
-
|
|
7026
|
-
|
|
7027
|
-
|
|
7028
|
-
|
|
7029
|
-
|
|
7030
|
-
|
|
7031
|
-
|
|
7032
|
-
|
|
7033
|
-
|
|
7034
|
-
|
|
7035
|
-
|
|
7036
|
-
|
|
7037
|
-
|
|
7038
|
-
|
|
7039
|
-
|
|
7040
|
-
|
|
7041
|
-
|
|
7042
|
-
|
|
7043
|
-
|
|
7044
|
-
{
|
|
7045
|
-
onPress: () => navigateTo(item.uri),
|
|
7046
|
-
style: ({ hovered }) => [
|
|
7047
|
-
styles45.listItemRow,
|
|
7048
|
-
hovered && { backgroundColor: colors.border }
|
|
7049
|
-
]
|
|
7050
|
-
},
|
|
7051
|
-
/* @__PURE__ */ React57.createElement(View29, { style: styles45.listItem }, /* @__PURE__ */ React57.createElement(View29, { style: styles45.listItemText }, /* @__PURE__ */ React57.createElement(Icon, { icon: TypeIcon, size: 18 }), /* @__PURE__ */ React57.createElement(
|
|
7052
|
-
Text2,
|
|
7053
|
-
{
|
|
7054
|
-
style: styles45.listItemLabel,
|
|
7055
|
-
numberOfLines: 1,
|
|
7056
|
-
ellipsizeMode: "middle"
|
|
7057
|
-
},
|
|
7058
|
-
displayName
|
|
7059
|
-
)), /* @__PURE__ */ React57.createElement(
|
|
7060
|
-
Button,
|
|
7061
|
-
{
|
|
7062
|
-
variant: "ghost",
|
|
7063
|
-
size: "icon",
|
|
7064
|
-
style: styles45.deleteButton,
|
|
7065
|
-
onPress: () => onDelete(item),
|
|
7066
|
-
iconLeft: Trash2
|
|
7067
|
-
}
|
|
7068
|
-
))
|
|
7069
|
-
);
|
|
7070
|
-
}
|
|
7071
|
-
}
|
|
7072
|
-
)
|
|
7073
|
-
));
|
|
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
|
+
))));
|
|
7074
7158
|
};
|
|
7075
|
-
var
|
|
7076
|
-
|
|
7077
|
-
|
|
7078
|
-
|
|
7159
|
+
var styles47 = StyleSheet51.create({
|
|
7160
|
+
navSection: {
|
|
7161
|
+
gap: 2,
|
|
7162
|
+
marginBottom: 4
|
|
7079
7163
|
},
|
|
7080
|
-
|
|
7081
|
-
|
|
7082
|
-
|
|
7083
|
-
|
|
7084
|
-
|
|
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
|
|
7085
7176
|
},
|
|
7086
7177
|
creatingPanel: {
|
|
7087
7178
|
marginTop: 12,
|
|
@@ -7106,69 +7197,180 @@ var styles45 = StyleSheet49.create({
|
|
|
7106
7197
|
loadingMessageItem: {
|
|
7107
7198
|
fontSize: 12,
|
|
7108
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
|
|
7109
7227
|
},
|
|
7110
|
-
|
|
7111
|
-
|
|
7228
|
+
listContent: {
|
|
7229
|
+
flexGrow: 1,
|
|
7230
|
+
paddingHorizontal: 16,
|
|
7231
|
+
paddingVertical: 8
|
|
7112
7232
|
},
|
|
7113
|
-
|
|
7114
|
-
|
|
7115
|
-
|
|
7116
|
-
|
|
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
|
|
7117
7243
|
},
|
|
7118
|
-
|
|
7244
|
+
separator: {
|
|
7119
7245
|
height: 1,
|
|
7120
7246
|
width: "100%"
|
|
7121
|
-
}
|
|
7122
|
-
|
|
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: {
|
|
7123
7314
|
minHeight: 48,
|
|
7124
7315
|
justifyContent: "center"
|
|
7125
7316
|
},
|
|
7126
|
-
|
|
7317
|
+
inner: {
|
|
7127
7318
|
flexDirection: "row",
|
|
7128
7319
|
paddingHorizontal: 16,
|
|
7129
7320
|
paddingVertical: 12,
|
|
7130
7321
|
justifyContent: "space-between",
|
|
7131
7322
|
alignItems: "center"
|
|
7132
7323
|
},
|
|
7133
|
-
|
|
7324
|
+
label: {
|
|
7134
7325
|
flexDirection: "row",
|
|
7135
7326
|
alignItems: "center",
|
|
7136
7327
|
gap: 12,
|
|
7137
7328
|
flex: 1,
|
|
7138
7329
|
minWidth: 0
|
|
7139
7330
|
},
|
|
7140
|
-
|
|
7331
|
+
name: {
|
|
7141
7332
|
flex: 1
|
|
7142
7333
|
},
|
|
7143
|
-
|
|
7334
|
+
actionButton: {
|
|
7144
7335
|
width: 36,
|
|
7145
7336
|
height: 36,
|
|
7146
7337
|
padding: 0
|
|
7147
7338
|
}
|
|
7148
7339
|
});
|
|
7149
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
|
+
|
|
7150
7352
|
// resourceViews/Container/ContainerResourceView.tsx
|
|
7151
7353
|
var ContainerResourceView = {
|
|
7152
7354
|
name: "container",
|
|
7153
7355
|
displayName: "Container",
|
|
7154
7356
|
displayIcon: Folders,
|
|
7155
|
-
view:
|
|
7357
|
+
view: DefaultContainerView,
|
|
7156
7358
|
canDisplay: (targetUri, targetResource) => {
|
|
7157
7359
|
return targetResource.type === "SolidContainer";
|
|
7158
7360
|
}
|
|
7159
7361
|
};
|
|
7160
7362
|
|
|
7161
7363
|
// resourceViews/Profile/ProfileResourceView.tsx
|
|
7162
|
-
import { User as
|
|
7364
|
+
import { User as User3 } from "lucide-react-native";
|
|
7163
7365
|
|
|
7164
7366
|
// resourceViews/Profile/ProfileView.tsx
|
|
7165
|
-
import { ScrollView as ScrollView4, View as
|
|
7166
|
-
import
|
|
7367
|
+
import { ScrollView as ScrollView4, View as View34, StyleSheet as StyleSheet55 } from "react-native";
|
|
7368
|
+
import React64 from "react";
|
|
7167
7369
|
|
|
7168
7370
|
// resourceViews/Profile/ProfileKnows.tsx
|
|
7169
|
-
import
|
|
7371
|
+
import React63, { useCallback as useCallback12, useState as useState12 } from "react";
|
|
7170
7372
|
import { Plus as Plus3 } from "lucide-react-native";
|
|
7171
|
-
import { View as
|
|
7373
|
+
import { View as View33, StyleSheet as StyleSheet54 } from "react-native";
|
|
7172
7374
|
import { Trash as Trash3 } from "lucide-react-native";
|
|
7173
7375
|
var ProfileKnows = ({
|
|
7174
7376
|
resource,
|
|
@@ -7176,13 +7378,13 @@ var ProfileKnows = ({
|
|
|
7176
7378
|
setProfile
|
|
7177
7379
|
}) => {
|
|
7178
7380
|
const [newContact, setNewContact] = useState12("");
|
|
7179
|
-
const addNewContact =
|
|
7381
|
+
const addNewContact = useCallback12(() => {
|
|
7180
7382
|
setProfile(resource, (cProfile) => {
|
|
7181
7383
|
cProfile.knows?.add({ "@id": newContact });
|
|
7182
7384
|
});
|
|
7183
7385
|
setNewContact("");
|
|
7184
7386
|
}, [newContact, resource, setProfile]);
|
|
7185
|
-
return /* @__PURE__ */
|
|
7387
|
+
return /* @__PURE__ */ React63.createElement(View33, { style: styles50.container }, /* @__PURE__ */ React63.createElement(
|
|
7186
7388
|
Input,
|
|
7187
7389
|
{
|
|
7188
7390
|
placeholder: "https://example.pod/john/profile/card#me",
|
|
@@ -7196,12 +7398,12 @@ var ProfileKnows = ({
|
|
|
7196
7398
|
onChangeText: setNewContact,
|
|
7197
7399
|
onSubmitEditing: addNewContact
|
|
7198
7400
|
}
|
|
7199
|
-
), profile.knows?.map((friend) => /* @__PURE__ */
|
|
7401
|
+
), profile.knows?.map((friend) => /* @__PURE__ */ React63.createElement(
|
|
7200
7402
|
AgentInformation,
|
|
7201
7403
|
{
|
|
7202
7404
|
key: friend["@id"],
|
|
7203
7405
|
webId: friend["@id"],
|
|
7204
|
-
accessoryRight: /* @__PURE__ */
|
|
7406
|
+
accessoryRight: /* @__PURE__ */ React63.createElement(
|
|
7205
7407
|
Button,
|
|
7206
7408
|
{
|
|
7207
7409
|
variant: "ghost",
|
|
@@ -7216,7 +7418,7 @@ var ProfileKnows = ({
|
|
|
7216
7418
|
}
|
|
7217
7419
|
)));
|
|
7218
7420
|
};
|
|
7219
|
-
var
|
|
7421
|
+
var styles50 = StyleSheet54.create({
|
|
7220
7422
|
container: {
|
|
7221
7423
|
gap: 16
|
|
7222
7424
|
// gap-4 equivalent (4 * 4px = 16px)
|
|
@@ -7230,8 +7432,8 @@ var ProfileView = () => {
|
|
|
7230
7432
|
const profileResource = useResource4(targetUri);
|
|
7231
7433
|
const [profile, setProfile, commitProfile, transactionDataset] = useChangeSubject(SolidProfileShapeType, targetUri);
|
|
7232
7434
|
if (!targetUri || !profileResource || !profile || profileResource.type === "InvalidIdentifierResource")
|
|
7233
|
-
return /* @__PURE__ */
|
|
7234
|
-
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(
|
|
7235
7437
|
Input,
|
|
7236
7438
|
{
|
|
7237
7439
|
placeholder: "John Doe",
|
|
@@ -7243,25 +7445,25 @@ var ProfileView = () => {
|
|
|
7243
7445
|
});
|
|
7244
7446
|
}
|
|
7245
7447
|
}
|
|
7246
|
-
), /* @__PURE__ */
|
|
7448
|
+
), /* @__PURE__ */ React64.createElement(Separator2, null), /* @__PURE__ */ React64.createElement(Text2, { variant: "h2" }, "Contacts"), /* @__PURE__ */ React64.createElement(
|
|
7247
7449
|
ProfileKnows,
|
|
7248
7450
|
{
|
|
7249
7451
|
profile,
|
|
7250
7452
|
setProfile,
|
|
7251
7453
|
resource: profileResource
|
|
7252
7454
|
}
|
|
7253
|
-
), /* @__PURE__ */
|
|
7455
|
+
), /* @__PURE__ */ React64.createElement(
|
|
7254
7456
|
Button,
|
|
7255
7457
|
{
|
|
7256
7458
|
disabled: !transactionDataset.hasChanges(),
|
|
7257
7459
|
text: "Update Profile",
|
|
7258
|
-
style:
|
|
7460
|
+
style: styles51.updateButton,
|
|
7259
7461
|
onPress: commitProfile,
|
|
7260
7462
|
isLoading: profileResource.isLoading()
|
|
7261
7463
|
}
|
|
7262
7464
|
)));
|
|
7263
7465
|
};
|
|
7264
|
-
var
|
|
7466
|
+
var styles51 = StyleSheet55.create({
|
|
7265
7467
|
scrollContainer: {
|
|
7266
7468
|
flexDirection: "row",
|
|
7267
7469
|
justifyContent: "center",
|
|
@@ -7283,10 +7485,10 @@ var styles47 = StyleSheet51.create({
|
|
|
7283
7485
|
var ProfileResourceView = {
|
|
7284
7486
|
name: "profile",
|
|
7285
7487
|
displayName: "Profile",
|
|
7286
|
-
displayIcon:
|
|
7488
|
+
displayIcon: User3,
|
|
7287
7489
|
view: ProfileView,
|
|
7288
|
-
canDisplay: (targetUri, targetResource,
|
|
7289
|
-
const profile =
|
|
7490
|
+
canDisplay: (targetUri, targetResource, dataset) => {
|
|
7491
|
+
const profile = dataset.usingType(SolidProfileShapeType).fromSubject(targetUri);
|
|
7290
7492
|
return !!profile?.type?.some?.(
|
|
7291
7493
|
(val) => val["@id"] === "Person" || val["@id"] === "Person2"
|
|
7292
7494
|
);
|
|
@@ -7294,18 +7496,18 @@ var ProfileResourceView = {
|
|
|
7294
7496
|
};
|
|
7295
7497
|
|
|
7296
7498
|
// resourceViews/RawCode/RawCodeResourceView.tsx
|
|
7297
|
-
import { Code as
|
|
7499
|
+
import { Code as Code3 } from "lucide-react-native";
|
|
7298
7500
|
|
|
7299
7501
|
// resourceViews/RawCode/RawCodeView.tsx
|
|
7300
|
-
import { useSolidAuth as
|
|
7301
|
-
import
|
|
7302
|
-
useCallback as
|
|
7303
|
-
useEffect as
|
|
7502
|
+
import { useSolidAuth as useSolidAuth10 } from "@ldo/solid-react";
|
|
7503
|
+
import React66, {
|
|
7504
|
+
useCallback as useCallback13,
|
|
7505
|
+
useEffect as useEffect9,
|
|
7304
7506
|
useState as useState13
|
|
7305
7507
|
} from "react";
|
|
7306
7508
|
|
|
7307
7509
|
// resourceViews/RawCode/RawCodeEditor.tsx
|
|
7308
|
-
import
|
|
7510
|
+
import React65, { useRef as useRef3 } from "react";
|
|
7309
7511
|
import Editor from "@monaco-editor/react";
|
|
7310
7512
|
var RawCodeEditor = ({
|
|
7311
7513
|
value,
|
|
@@ -7319,7 +7521,7 @@ var RawCodeEditor = ({
|
|
|
7319
7521
|
const handleEditorDidMount = (editor, monaco) => {
|
|
7320
7522
|
monacoRef.current = monaco;
|
|
7321
7523
|
};
|
|
7322
|
-
return /* @__PURE__ */
|
|
7524
|
+
return /* @__PURE__ */ React65.createElement(
|
|
7323
7525
|
Editor,
|
|
7324
7526
|
{
|
|
7325
7527
|
className: "flex-1",
|
|
@@ -7334,13 +7536,13 @@ var RawCodeEditor = ({
|
|
|
7334
7536
|
};
|
|
7335
7537
|
|
|
7336
7538
|
// resourceViews/RawCode/RawCodeView.tsx
|
|
7337
|
-
import { View as
|
|
7338
|
-
import { Notifier as
|
|
7539
|
+
import { View as View35, StyleSheet as StyleSheet56 } from "react-native";
|
|
7540
|
+
import { Notifier as Notifier3 } from "react-native-notifier";
|
|
7339
7541
|
import { Save } from "lucide-react-native";
|
|
7340
|
-
import { useTheme as
|
|
7542
|
+
import { useTheme as useTheme37 } from "@react-navigation/native";
|
|
7341
7543
|
var RawCodeView = () => {
|
|
7342
|
-
const { fetch: fetch2 } =
|
|
7343
|
-
const { colors } =
|
|
7544
|
+
const { fetch: fetch2 } = useSolidAuth10();
|
|
7545
|
+
const { colors } = useTheme37();
|
|
7344
7546
|
const [content, setContent] = useState13("");
|
|
7345
7547
|
const [contentType, setContentType] = useState13("");
|
|
7346
7548
|
const [didEdit, setDidEdit] = useState13(false);
|
|
@@ -7348,12 +7550,12 @@ var RawCodeView = () => {
|
|
|
7348
7550
|
const [isFetching, setIsFetching] = useState13(false);
|
|
7349
7551
|
const [isSaving, setIsSaving] = useState13(false);
|
|
7350
7552
|
const targetUri = targetResource?.uri;
|
|
7351
|
-
const fetchContent =
|
|
7553
|
+
const fetchContent = useCallback13(async () => {
|
|
7352
7554
|
if (!targetUri || curViewConfig.name !== "rawCode") return;
|
|
7353
7555
|
setIsFetching(true);
|
|
7354
7556
|
const response = await fetch2(targetUri);
|
|
7355
7557
|
if (response.status !== 200) {
|
|
7356
|
-
|
|
7558
|
+
Notifier3.showNotification({
|
|
7357
7559
|
title: `Could not fetch document. Recieved ${response.status}`
|
|
7358
7560
|
});
|
|
7359
7561
|
}
|
|
@@ -7362,7 +7564,7 @@ var RawCodeView = () => {
|
|
|
7362
7564
|
setDidEdit(false);
|
|
7363
7565
|
setContentType(response.headers.get("content-type") ?? "");
|
|
7364
7566
|
}, [curViewConfig.name, fetch2, targetUri]);
|
|
7365
|
-
const submitChanges =
|
|
7567
|
+
const submitChanges = useCallback13(async () => {
|
|
7366
7568
|
if (!targetUri) return;
|
|
7367
7569
|
setIsSaving(true);
|
|
7368
7570
|
const response = await fetch2(targetUri, {
|
|
@@ -7373,23 +7575,23 @@ var RawCodeView = () => {
|
|
|
7373
7575
|
body: content
|
|
7374
7576
|
});
|
|
7375
7577
|
if (response.status !== 205) {
|
|
7376
|
-
|
|
7578
|
+
Notifier3.showNotification({
|
|
7377
7579
|
title: `Could save document. Recieved ${response.status}`
|
|
7378
7580
|
});
|
|
7379
7581
|
setIsSaving(false);
|
|
7380
7582
|
return;
|
|
7381
7583
|
}
|
|
7382
|
-
|
|
7584
|
+
Notifier3.showNotification({
|
|
7383
7585
|
title: `Document Saved`
|
|
7384
7586
|
});
|
|
7385
7587
|
await fetchContent();
|
|
7386
7588
|
setIsSaving(false);
|
|
7387
7589
|
setDidEdit(false);
|
|
7388
7590
|
}, [content, contentType, fetch2, fetchContent, targetUri]);
|
|
7389
|
-
|
|
7591
|
+
useEffect9(() => {
|
|
7390
7592
|
fetchContent();
|
|
7391
7593
|
}, [fetchContent]);
|
|
7392
|
-
return /* @__PURE__ */
|
|
7594
|
+
return /* @__PURE__ */ React66.createElement(View35, { style: [styles52.container, { backgroundColor: colors.background }] }, /* @__PURE__ */ React66.createElement(LoadingBar, { isLoading: isFetching || isSaving }), /* @__PURE__ */ React66.createElement(
|
|
7393
7595
|
RawCodeEditor,
|
|
7394
7596
|
{
|
|
7395
7597
|
value: content,
|
|
@@ -7398,10 +7600,10 @@ var RawCodeView = () => {
|
|
|
7398
7600
|
setContent(value ?? "");
|
|
7399
7601
|
}
|
|
7400
7602
|
}
|
|
7401
|
-
), /* @__PURE__ */
|
|
7603
|
+
), /* @__PURE__ */ React66.createElement(
|
|
7402
7604
|
Button,
|
|
7403
7605
|
{
|
|
7404
|
-
style:
|
|
7606
|
+
style: styles52.saveButton,
|
|
7405
7607
|
onPress: submitChanges,
|
|
7406
7608
|
text: "Save Changes",
|
|
7407
7609
|
iconLeft: Save,
|
|
@@ -7410,7 +7612,7 @@ var RawCodeView = () => {
|
|
|
7410
7612
|
}
|
|
7411
7613
|
));
|
|
7412
7614
|
};
|
|
7413
|
-
var
|
|
7615
|
+
var styles52 = StyleSheet56.create({
|
|
7414
7616
|
container: {
|
|
7415
7617
|
flex: 1,
|
|
7416
7618
|
position: "relative"
|
|
@@ -7427,7 +7629,7 @@ var styles48 = StyleSheet52.create({
|
|
|
7427
7629
|
var RawCodeResourceView = {
|
|
7428
7630
|
name: "rawCode",
|
|
7429
7631
|
displayName: "Raw Code",
|
|
7430
|
-
displayIcon:
|
|
7632
|
+
displayIcon: Code3,
|
|
7431
7633
|
view: RawCodeView,
|
|
7432
7634
|
canDisplay: () => true
|
|
7433
7635
|
};
|
|
@@ -7436,8 +7638,8 @@ var RawCodeResourceView = {
|
|
|
7436
7638
|
import { Image as ImageIcon } from "lucide-react-native";
|
|
7437
7639
|
|
|
7438
7640
|
// resourceViews/Image/ImageView.tsx
|
|
7439
|
-
import
|
|
7440
|
-
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";
|
|
7441
7643
|
import { useResource as useResource5 } from "@ldo/solid-react";
|
|
7442
7644
|
var ImageView = () => {
|
|
7443
7645
|
const { targetUri } = useViewContext();
|
|
@@ -7448,39 +7650,39 @@ var ImageView = () => {
|
|
|
7448
7650
|
if (!blob2 || !blob2.type.startsWith("image/")) return void 0;
|
|
7449
7651
|
return URL.createObjectURL(blob2);
|
|
7450
7652
|
}, [imageResource]);
|
|
7451
|
-
|
|
7653
|
+
useEffect10(() => {
|
|
7452
7654
|
return () => {
|
|
7453
7655
|
if (blobUrl) URL.revokeObjectURL(blobUrl);
|
|
7454
7656
|
};
|
|
7455
7657
|
}, [blobUrl]);
|
|
7456
7658
|
if (!targetUri || !imageResource) return null;
|
|
7457
7659
|
if (imageResource.isLoading?.() ?? imageResource.status?.type === "unfetched") {
|
|
7458
|
-
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"));
|
|
7459
7661
|
}
|
|
7460
7662
|
if (imageResource.status?.isError) {
|
|
7461
|
-
return /* @__PURE__ */
|
|
7663
|
+
return /* @__PURE__ */ React67.createElement(View36, { style: styles53.center }, /* @__PURE__ */ React67.createElement(Text2, null, imageResource.status.message ?? "Failed to load image."));
|
|
7462
7664
|
}
|
|
7463
7665
|
if (!imageResource.isBinary()) {
|
|
7464
|
-
return /* @__PURE__ */
|
|
7666
|
+
return /* @__PURE__ */ React67.createElement(View36, { style: styles53.center }, /* @__PURE__ */ React67.createElement(Text2, null, "This resource is not a binary image."));
|
|
7465
7667
|
}
|
|
7466
7668
|
const blob = imageResource.getBlob();
|
|
7467
7669
|
if (!blob || !blob.type.startsWith("image/")) {
|
|
7468
|
-
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", ")."));
|
|
7469
7671
|
}
|
|
7470
7672
|
if (!blobUrl) {
|
|
7471
|
-
return /* @__PURE__ */
|
|
7673
|
+
return /* @__PURE__ */ React67.createElement(View36, { style: styles53.center }, /* @__PURE__ */ React67.createElement(Text2, null, "Unable to display image."));
|
|
7472
7674
|
}
|
|
7473
|
-
return /* @__PURE__ */
|
|
7675
|
+
return /* @__PURE__ */ React67.createElement(View36, { style: styles53.container }, /* @__PURE__ */ React67.createElement(
|
|
7474
7676
|
Image2,
|
|
7475
7677
|
{
|
|
7476
7678
|
source: { uri: blobUrl },
|
|
7477
|
-
style:
|
|
7679
|
+
style: styles53.image,
|
|
7478
7680
|
resizeMode: "contain",
|
|
7479
7681
|
accessibilityLabel: "Image resource"
|
|
7480
7682
|
}
|
|
7481
7683
|
));
|
|
7482
7684
|
};
|
|
7483
|
-
var
|
|
7685
|
+
var styles53 = StyleSheet57.create({
|
|
7484
7686
|
container: {
|
|
7485
7687
|
flex: 1,
|
|
7486
7688
|
padding: 16,
|
|
@@ -7570,6 +7772,11 @@ export {
|
|
|
7570
7772
|
CopyLink,
|
|
7571
7773
|
DataBrowser,
|
|
7572
7774
|
DataBrowserConfigContext,
|
|
7775
|
+
DefaultContainerContent,
|
|
7776
|
+
DefaultContainerLayout,
|
|
7777
|
+
DefaultContainerResourceItem,
|
|
7778
|
+
DefaultContainerSideMenu,
|
|
7779
|
+
DefaultContainerView,
|
|
7573
7780
|
Dialog,
|
|
7574
7781
|
DialogClose,
|
|
7575
7782
|
DialogContent,
|
|
@@ -7686,6 +7893,7 @@ export {
|
|
|
7686
7893
|
TabsContent,
|
|
7687
7894
|
TabsList,
|
|
7688
7895
|
TabsTrigger,
|
|
7896
|
+
TargetResourceLoader,
|
|
7689
7897
|
TargetResourceProvider,
|
|
7690
7898
|
Text2 as Text,
|
|
7691
7899
|
TextStyleContext,
|