linked-data-browser 0.0.6 → 0.0.8-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env +2 -0
- package/.eslintrc.js +1 -0
- package/.ldo/profile.shapeTypes.ts +18 -18
- package/.ldo/profile.typings.ts +17 -17
- package/app/index.tsx +3 -0
- package/babel.config.js +9 -1
- package/components/DataBrowser.tsx +9 -19
- package/components/DataBrowserContext.ts +24 -0
- package/components/TargetResourceProvider.tsx +1 -1
- package/components/ThemeProvider.tsx +2 -4
- package/components/common/LoadingBar.tsx +11 -1
- package/components/common/ProfileAvatar.tsx +6 -9
- package/components/nav/Layout.tsx +20 -4
- package/components/nav/header/AddressBox.tsx +104 -48
- package/components/nav/header/AvatarMenu.tsx +44 -12
- package/components/nav/header/Header.tsx +26 -19
- package/components/nav/header/SignInMenu.tsx +63 -36
- package/components/nav/header/ThemeToggleMenu.tsx +21 -9
- package/components/nav/header/ViewMenu.tsx +79 -71
- package/components/sharing/AccessDropdown.tsx +18 -7
- package/components/sharing/CopyLink.tsx +15 -3
- package/components/sharing/PermissionRow.tsx +17 -2
- package/components/sharing/SharingModal.tsx +30 -3
- package/components/sharing/WacRuleForm.tsx +12 -3
- package/components/sharing/agentPermissions/AgentInformation.tsx +18 -6
- package/components/sharing/agentPermissions/AgentInput.tsx +21 -6
- package/components/sharing/agentPermissions/AgentPermissionRow.tsx +24 -6
- package/components/ui/accordion.tsx +1 -1
- package/components/ui/alert.tsx +62 -46
- package/components/ui/avatar.tsx +38 -13
- package/components/ui/badge.tsx +63 -48
- package/components/ui/button.tsx +226 -108
- package/components/ui/card.tsx +53 -38
- package/components/ui/checkbox.tsx +53 -16
- package/components/ui/context-menu.tsx +4 -4
- package/components/ui/dialog.tsx +116 -65
- package/components/ui/dropdown-menu.tsx +304 -105
- package/components/ui/icon.tsx +23 -0
- package/components/ui/input-dropdown.tsx +42 -5
- package/components/ui/input.tsx +85 -22
- package/components/ui/label.tsx +16 -7
- package/components/ui/menubar.tsx +4 -4
- package/components/ui/navigation-menu.tsx +157 -90
- package/components/ui/progress.tsx +38 -24
- package/components/ui/select.tsx +139 -67
- package/components/ui/separator.tsx +22 -7
- package/components/ui/skeleton.tsx +14 -11
- package/components/ui/switch.tsx +82 -37
- package/components/ui/table.tsx +57 -35
- package/components/ui/tabs.tsx +66 -35
- package/components/ui/text.tsx +221 -30
- package/components/ui/textarea.tsx +34 -10
- package/components/ui/typography.tsx +94 -65
- package/components/useViewContext.tsx +8 -8
- package/global.css +93 -3
- package/metro.config.js +21 -3
- package/package.json +6 -9
- package/resourceViews/Container/ContainerConfig.tsx +1 -1
- package/resourceViews/Container/ContainerView.tsx +63 -25
- package/resourceViews/Profile/ProfileConfig.tsx +3 -3
- package/resourceViews/Profile/ProfileKnows.tsx +20 -11
- package/resourceViews/Profile/ProfileView.tsx +23 -6
- package/resourceViews/RawCode/RawCodeConfig.tsx +1 -1
- package/resourceViews/RawCode/RawCodeView.tsx +20 -6
- package/components.json +0 -7
- package/lib/icons/ArrowRight.tsx +0 -4
- package/lib/icons/Check.tsx +0 -4
- package/lib/icons/ChevronDown.tsx +0 -4
- package/lib/icons/ChevronRight.tsx +0 -4
- package/lib/icons/ChevronUp.tsx +0 -4
- package/lib/icons/ChevronsRight.tsx +0 -4
- package/lib/icons/CircleSlash.tsx +0 -4
- package/lib/icons/CircleX.tsx +0 -4
- package/lib/icons/Code.tsx +0 -4
- package/lib/icons/EllipsisVertical.tsx +0 -4
- package/lib/icons/EyeOff.tsx +0 -4
- package/lib/icons/File.tsx +0 -4
- package/lib/icons/Fingerprint.tsx +0 -4
- package/lib/icons/Folder.tsx +0 -4
- package/lib/icons/Folders.tsx +0 -4
- package/lib/icons/Info.tsx +0 -4
- package/lib/icons/Link.tsx +0 -4
- package/lib/icons/Loader.tsx +0 -4
- package/lib/icons/LogOut.tsx +0 -4
- package/lib/icons/MonitorSmartphone.tsx +0 -4
- package/lib/icons/MoonStar.tsx +0 -4
- package/lib/icons/OctagonX.tsx +0 -4
- package/lib/icons/Plus.tsx +0 -4
- package/lib/icons/RefreshCw.tsx +0 -4
- package/lib/icons/Save.tsx +0 -4
- package/lib/icons/ShieldX.tsx +0 -4
- package/lib/icons/Sun.tsx +0 -4
- package/lib/icons/TextCursorInput.tsx +0 -4
- package/lib/icons/Trash.tsx +0 -4
- package/lib/icons/User.tsx +0 -4
- package/lib/icons/UserPlus.tsx +0 -4
- package/lib/icons/Users.tsx +0 -4
- package/lib/icons/ViewIcon.tsx +0 -4
- package/lib/icons/X.tsx +0 -4
- package/lib/icons/iconWithClassName.ts +0 -14
- package/lib/utils.ts +0 -6
- package/nativewind-env.d.ts +0 -1
- package/tailwind.config.js +0 -69
package/components/ui/dialog.tsx
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import * as DialogPrimitive from '@rn-primitives/dialog';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
Platform,
|
|
5
|
+
StyleSheet,
|
|
6
|
+
View,
|
|
7
|
+
type ViewProps,
|
|
8
|
+
type ViewStyle,
|
|
9
|
+
} from 'react-native';
|
|
4
10
|
import Animated, { FadeIn, FadeOut } from 'react-native-reanimated';
|
|
5
|
-
import { X } from '
|
|
6
|
-
import {
|
|
11
|
+
import { X } from 'lucide-react-native';
|
|
12
|
+
import { useTheme } from '@react-navigation/native';
|
|
7
13
|
|
|
8
14
|
const Dialog = DialogPrimitive.Root;
|
|
9
15
|
|
|
@@ -14,41 +20,32 @@ const DialogPortal = DialogPrimitive.Portal;
|
|
|
14
20
|
const DialogClose = DialogPrimitive.Close;
|
|
15
21
|
|
|
16
22
|
function DialogOverlayWeb({
|
|
17
|
-
|
|
23
|
+
style,
|
|
18
24
|
...props
|
|
19
25
|
}: DialogPrimitive.OverlayProps & {
|
|
20
26
|
ref?: React.RefObject<DialogPrimitive.OverlayRef>;
|
|
27
|
+
style?: ViewStyle;
|
|
21
28
|
}) {
|
|
22
|
-
const { open } = DialogPrimitive.useRootContext();
|
|
23
29
|
return (
|
|
24
30
|
<DialogPrimitive.Overlay
|
|
25
|
-
|
|
26
|
-
'bg-black/80 flex justify-center items-center p-2 absolute top-0 right-0 bottom-0 left-0',
|
|
27
|
-
open
|
|
28
|
-
? 'web:animate-in web:fade-in-0'
|
|
29
|
-
: 'web:animate-out web:fade-out-0',
|
|
30
|
-
className,
|
|
31
|
-
)}
|
|
31
|
+
style={StyleSheet.flatten([styles.overlay, style])}
|
|
32
32
|
{...props}
|
|
33
33
|
/>
|
|
34
34
|
);
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
function DialogOverlayNative({
|
|
38
|
-
|
|
38
|
+
style,
|
|
39
39
|
children,
|
|
40
40
|
...props
|
|
41
41
|
}: DialogPrimitive.OverlayProps & {
|
|
42
42
|
ref?: React.RefObject<DialogPrimitive.OverlayRef>;
|
|
43
43
|
children?: React.ReactNode;
|
|
44
|
+
style?: ViewStyle;
|
|
44
45
|
}) {
|
|
45
46
|
return (
|
|
46
47
|
<DialogPrimitive.Overlay
|
|
47
|
-
style={StyleSheet.absoluteFill}
|
|
48
|
-
className={cn(
|
|
49
|
-
'flex bg-black/80 justify-center items-center p-2',
|
|
50
|
-
className,
|
|
51
|
-
)}
|
|
48
|
+
style={[StyleSheet.absoluteFill, styles.overlayNative, style]}
|
|
52
49
|
{...props}
|
|
53
50
|
>
|
|
54
51
|
<Animated.View
|
|
@@ -67,42 +64,30 @@ const DialogOverlay = Platform.select({
|
|
|
67
64
|
});
|
|
68
65
|
|
|
69
66
|
function DialogContent({
|
|
70
|
-
|
|
67
|
+
style,
|
|
71
68
|
children,
|
|
72
69
|
portalHost,
|
|
73
70
|
...props
|
|
74
71
|
}: DialogPrimitive.ContentProps & {
|
|
75
72
|
ref?: React.RefObject<DialogPrimitive.ContentRef>;
|
|
76
|
-
|
|
73
|
+
style?: ViewStyle;
|
|
77
74
|
portalHost?: string;
|
|
78
75
|
}) {
|
|
79
|
-
const {
|
|
76
|
+
const { colors } = useTheme();
|
|
80
77
|
return (
|
|
81
78
|
<DialogPortal hostName={portalHost}>
|
|
82
79
|
<DialogOverlay>
|
|
83
80
|
<DialogPrimitive.Content
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
className,
|
|
90
|
-
)}
|
|
81
|
+
style={StyleSheet.flatten([
|
|
82
|
+
styles.content,
|
|
83
|
+
{ borderColor: colors.border, backgroundColor: colors.background },
|
|
84
|
+
style,
|
|
85
|
+
])}
|
|
91
86
|
{...props}
|
|
92
87
|
>
|
|
93
88
|
{children}
|
|
94
|
-
<DialogPrimitive.Close
|
|
95
|
-
|
|
96
|
-
'absolute right-4 top-4 p-0.5 web:group rounded-sm opacity-70 web:ring-offset-background web:transition-opacity web:hover:opacity-100 web:focus:outline-none web:focus:ring-2 web:focus:ring-ring web:focus:ring-offset-2 web:disabled:pointer-events-none'
|
|
97
|
-
}
|
|
98
|
-
>
|
|
99
|
-
<X
|
|
100
|
-
size={Platform.OS === 'web' ? 16 : 18}
|
|
101
|
-
className={cn(
|
|
102
|
-
'text-muted-foreground',
|
|
103
|
-
open && 'text-accent-foreground',
|
|
104
|
-
)}
|
|
105
|
-
/>
|
|
89
|
+
<DialogPrimitive.Close style={styles.closeButton}>
|
|
90
|
+
<X size={Platform.OS === 'web' ? 16 : 18} color={colors.text} />
|
|
106
91
|
</DialogPrimitive.Close>
|
|
107
92
|
</DialogPrimitive.Content>
|
|
108
93
|
</DialogOverlay>
|
|
@@ -110,59 +95,52 @@ function DialogContent({
|
|
|
110
95
|
);
|
|
111
96
|
}
|
|
112
97
|
|
|
113
|
-
function DialogHeader({
|
|
114
|
-
return (
|
|
115
|
-
<View
|
|
116
|
-
className={cn(
|
|
117
|
-
'flex flex-col gap-1.5 text-center sm:text-left',
|
|
118
|
-
className,
|
|
119
|
-
)}
|
|
120
|
-
{...props}
|
|
121
|
-
/>
|
|
122
|
-
);
|
|
98
|
+
function DialogHeader({ style, ...props }: ViewProps) {
|
|
99
|
+
return <View style={StyleSheet.flatten([styles.header, style])} {...props} />;
|
|
123
100
|
}
|
|
124
101
|
|
|
125
|
-
function DialogFooter({
|
|
102
|
+
function DialogFooter({ style, ...props }: ViewProps) {
|
|
126
103
|
return (
|
|
127
104
|
<View
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
105
|
+
style={StyleSheet.flatten([
|
|
106
|
+
styles.footer,
|
|
107
|
+
Platform.OS === 'web' && styles.footerRow,
|
|
108
|
+
style,
|
|
109
|
+
])}
|
|
132
110
|
{...props}
|
|
133
111
|
/>
|
|
134
112
|
);
|
|
135
113
|
}
|
|
136
114
|
|
|
137
115
|
function DialogTitle({
|
|
138
|
-
|
|
116
|
+
style,
|
|
139
117
|
...props
|
|
140
118
|
}: DialogPrimitive.TitleProps & {
|
|
141
119
|
ref?: React.RefObject<DialogPrimitive.TitleRef>;
|
|
142
120
|
}) {
|
|
121
|
+
const { colors } = useTheme();
|
|
143
122
|
return (
|
|
144
123
|
<DialogPrimitive.Title
|
|
145
|
-
|
|
146
|
-
'text-lg native:text-xl text-foreground font-semibold leading-none tracking-tight',
|
|
147
|
-
className,
|
|
148
|
-
)}
|
|
124
|
+
style={StyleSheet.flatten([styles.title, { color: colors.text }, style])}
|
|
149
125
|
{...props}
|
|
150
126
|
/>
|
|
151
127
|
);
|
|
152
128
|
}
|
|
153
129
|
|
|
154
130
|
function DialogDescription({
|
|
155
|
-
|
|
131
|
+
style,
|
|
156
132
|
...props
|
|
157
133
|
}: DialogPrimitive.DescriptionProps & {
|
|
158
134
|
ref?: React.RefObject<DialogPrimitive.DescriptionRef>;
|
|
159
135
|
}) {
|
|
136
|
+
const { colors } = useTheme();
|
|
160
137
|
return (
|
|
161
138
|
<DialogPrimitive.Description
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
139
|
+
style={StyleSheet.flatten([
|
|
140
|
+
styles.description,
|
|
141
|
+
{ color: colors.text },
|
|
142
|
+
style,
|
|
143
|
+
])}
|
|
166
144
|
{...props}
|
|
167
145
|
/>
|
|
168
146
|
);
|
|
@@ -180,3 +158,76 @@ export {
|
|
|
180
158
|
DialogTitle,
|
|
181
159
|
DialogTrigger,
|
|
182
160
|
};
|
|
161
|
+
|
|
162
|
+
const styles = StyleSheet.create({
|
|
163
|
+
overlay: {
|
|
164
|
+
backgroundColor: 'rgba(0, 0, 0, 0.8)',
|
|
165
|
+
flex: 1,
|
|
166
|
+
justifyContent: 'center',
|
|
167
|
+
alignItems: 'center',
|
|
168
|
+
padding: 8,
|
|
169
|
+
position: 'absolute',
|
|
170
|
+
top: 0,
|
|
171
|
+
right: 0,
|
|
172
|
+
bottom: 0,
|
|
173
|
+
left: 0,
|
|
174
|
+
},
|
|
175
|
+
overlayNative: {
|
|
176
|
+
backgroundColor: 'rgba(0, 0, 0, 0.8)',
|
|
177
|
+
flex: 1,
|
|
178
|
+
justifyContent: 'center',
|
|
179
|
+
alignItems: 'center',
|
|
180
|
+
padding: 8,
|
|
181
|
+
},
|
|
182
|
+
content: {
|
|
183
|
+
maxWidth: 512, // max-w-lg
|
|
184
|
+
gap: 16, // gap-4
|
|
185
|
+
borderWidth: 1,
|
|
186
|
+
padding: 24, // p-6
|
|
187
|
+
shadowColor: '#000',
|
|
188
|
+
shadowOffset: {
|
|
189
|
+
width: 0,
|
|
190
|
+
height: 10,
|
|
191
|
+
},
|
|
192
|
+
shadowOpacity: 0.25,
|
|
193
|
+
shadowRadius: 25,
|
|
194
|
+
elevation: 10,
|
|
195
|
+
borderRadius: 8, // rounded-lg
|
|
196
|
+
overflow: 'hidden',
|
|
197
|
+
},
|
|
198
|
+
closeButton: {
|
|
199
|
+
position: 'absolute',
|
|
200
|
+
right: 16, // right-4
|
|
201
|
+
top: 16, // top-4
|
|
202
|
+
padding: 2, // p-0.5
|
|
203
|
+
borderRadius: 4, // rounded-sm
|
|
204
|
+
opacity: 0.7,
|
|
205
|
+
},
|
|
206
|
+
closeButtonFocused: {
|
|
207
|
+
opacity: 1,
|
|
208
|
+
},
|
|
209
|
+
header: {
|
|
210
|
+
flexDirection: 'column',
|
|
211
|
+
gap: 6, // gap-1.5
|
|
212
|
+
textAlign: 'center',
|
|
213
|
+
borderBottomWidth: 1,
|
|
214
|
+
},
|
|
215
|
+
footer: {
|
|
216
|
+
flexDirection: 'column-reverse',
|
|
217
|
+
gap: 8, // gap-2
|
|
218
|
+
},
|
|
219
|
+
footerRow: {
|
|
220
|
+
flexDirection: 'row',
|
|
221
|
+
justifyContent: 'flex-end',
|
|
222
|
+
},
|
|
223
|
+
title: {
|
|
224
|
+
fontSize: Platform.OS === 'web' ? 18 : 20, // text-lg native:text-xl
|
|
225
|
+
fontWeight: '600', // font-semibold
|
|
226
|
+
lineHeight: Platform.OS === 'web' ? 20 : 22, // leading-none
|
|
227
|
+
letterSpacing: -0.025, // tracking-tight
|
|
228
|
+
},
|
|
229
|
+
description: {
|
|
230
|
+
fontSize: Platform.OS === 'web' ? 14 : 16, // text-sm native:text-base
|
|
231
|
+
opacity: 0.7,
|
|
232
|
+
},
|
|
233
|
+
});
|