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.
Files changed (103) hide show
  1. package/.env +2 -0
  2. package/.eslintrc.js +1 -0
  3. package/.ldo/profile.shapeTypes.ts +18 -18
  4. package/.ldo/profile.typings.ts +17 -17
  5. package/app/index.tsx +3 -0
  6. package/babel.config.js +9 -1
  7. package/components/DataBrowser.tsx +9 -19
  8. package/components/DataBrowserContext.ts +24 -0
  9. package/components/TargetResourceProvider.tsx +1 -1
  10. package/components/ThemeProvider.tsx +2 -4
  11. package/components/common/LoadingBar.tsx +11 -1
  12. package/components/common/ProfileAvatar.tsx +6 -9
  13. package/components/nav/Layout.tsx +20 -4
  14. package/components/nav/header/AddressBox.tsx +104 -48
  15. package/components/nav/header/AvatarMenu.tsx +44 -12
  16. package/components/nav/header/Header.tsx +26 -19
  17. package/components/nav/header/SignInMenu.tsx +63 -36
  18. package/components/nav/header/ThemeToggleMenu.tsx +21 -9
  19. package/components/nav/header/ViewMenu.tsx +79 -71
  20. package/components/sharing/AccessDropdown.tsx +18 -7
  21. package/components/sharing/CopyLink.tsx +15 -3
  22. package/components/sharing/PermissionRow.tsx +17 -2
  23. package/components/sharing/SharingModal.tsx +30 -3
  24. package/components/sharing/WacRuleForm.tsx +12 -3
  25. package/components/sharing/agentPermissions/AgentInformation.tsx +18 -6
  26. package/components/sharing/agentPermissions/AgentInput.tsx +21 -6
  27. package/components/sharing/agentPermissions/AgentPermissionRow.tsx +24 -6
  28. package/components/ui/accordion.tsx +1 -1
  29. package/components/ui/alert.tsx +62 -46
  30. package/components/ui/avatar.tsx +38 -13
  31. package/components/ui/badge.tsx +63 -48
  32. package/components/ui/button.tsx +226 -108
  33. package/components/ui/card.tsx +53 -38
  34. package/components/ui/checkbox.tsx +53 -16
  35. package/components/ui/context-menu.tsx +4 -4
  36. package/components/ui/dialog.tsx +116 -65
  37. package/components/ui/dropdown-menu.tsx +304 -105
  38. package/components/ui/icon.tsx +23 -0
  39. package/components/ui/input-dropdown.tsx +42 -5
  40. package/components/ui/input.tsx +85 -22
  41. package/components/ui/label.tsx +16 -7
  42. package/components/ui/menubar.tsx +4 -4
  43. package/components/ui/navigation-menu.tsx +157 -90
  44. package/components/ui/progress.tsx +38 -24
  45. package/components/ui/select.tsx +139 -67
  46. package/components/ui/separator.tsx +22 -7
  47. package/components/ui/skeleton.tsx +14 -11
  48. package/components/ui/switch.tsx +82 -37
  49. package/components/ui/table.tsx +57 -35
  50. package/components/ui/tabs.tsx +66 -35
  51. package/components/ui/text.tsx +221 -30
  52. package/components/ui/textarea.tsx +34 -10
  53. package/components/ui/typography.tsx +94 -65
  54. package/components/useViewContext.tsx +8 -8
  55. package/global.css +93 -3
  56. package/metro.config.js +21 -3
  57. package/package.json +6 -9
  58. package/resourceViews/Container/ContainerConfig.tsx +1 -1
  59. package/resourceViews/Container/ContainerView.tsx +63 -25
  60. package/resourceViews/Profile/ProfileConfig.tsx +3 -3
  61. package/resourceViews/Profile/ProfileKnows.tsx +20 -11
  62. package/resourceViews/Profile/ProfileView.tsx +23 -6
  63. package/resourceViews/RawCode/RawCodeConfig.tsx +1 -1
  64. package/resourceViews/RawCode/RawCodeView.tsx +20 -6
  65. package/components.json +0 -7
  66. package/lib/icons/ArrowRight.tsx +0 -4
  67. package/lib/icons/Check.tsx +0 -4
  68. package/lib/icons/ChevronDown.tsx +0 -4
  69. package/lib/icons/ChevronRight.tsx +0 -4
  70. package/lib/icons/ChevronUp.tsx +0 -4
  71. package/lib/icons/ChevronsRight.tsx +0 -4
  72. package/lib/icons/CircleSlash.tsx +0 -4
  73. package/lib/icons/CircleX.tsx +0 -4
  74. package/lib/icons/Code.tsx +0 -4
  75. package/lib/icons/EllipsisVertical.tsx +0 -4
  76. package/lib/icons/EyeOff.tsx +0 -4
  77. package/lib/icons/File.tsx +0 -4
  78. package/lib/icons/Fingerprint.tsx +0 -4
  79. package/lib/icons/Folder.tsx +0 -4
  80. package/lib/icons/Folders.tsx +0 -4
  81. package/lib/icons/Info.tsx +0 -4
  82. package/lib/icons/Link.tsx +0 -4
  83. package/lib/icons/Loader.tsx +0 -4
  84. package/lib/icons/LogOut.tsx +0 -4
  85. package/lib/icons/MonitorSmartphone.tsx +0 -4
  86. package/lib/icons/MoonStar.tsx +0 -4
  87. package/lib/icons/OctagonX.tsx +0 -4
  88. package/lib/icons/Plus.tsx +0 -4
  89. package/lib/icons/RefreshCw.tsx +0 -4
  90. package/lib/icons/Save.tsx +0 -4
  91. package/lib/icons/ShieldX.tsx +0 -4
  92. package/lib/icons/Sun.tsx +0 -4
  93. package/lib/icons/TextCursorInput.tsx +0 -4
  94. package/lib/icons/Trash.tsx +0 -4
  95. package/lib/icons/User.tsx +0 -4
  96. package/lib/icons/UserPlus.tsx +0 -4
  97. package/lib/icons/Users.tsx +0 -4
  98. package/lib/icons/ViewIcon.tsx +0 -4
  99. package/lib/icons/X.tsx +0 -4
  100. package/lib/icons/iconWithClassName.ts +0 -14
  101. package/lib/utils.ts +0 -6
  102. package/nativewind-env.d.ts +0 -1
  103. package/tailwind.config.js +0 -69
@@ -1,9 +1,15 @@
1
1
  import * as DialogPrimitive from '@rn-primitives/dialog';
2
2
  import * as React from 'react';
3
- import { Platform, StyleSheet, View, type ViewProps } from 'react-native';
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 '../../lib/icons/X';
6
- import { cn } from '../../lib/utils';
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
- className,
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
- className={cn(
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
- className,
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
- className,
67
+ style,
71
68
  children,
72
69
  portalHost,
73
70
  ...props
74
71
  }: DialogPrimitive.ContentProps & {
75
72
  ref?: React.RefObject<DialogPrimitive.ContentRef>;
76
- className?: string;
73
+ style?: ViewStyle;
77
74
  portalHost?: string;
78
75
  }) {
79
- const { open } = DialogPrimitive.useRootContext();
76
+ const { colors } = useTheme();
80
77
  return (
81
78
  <DialogPortal hostName={portalHost}>
82
79
  <DialogOverlay>
83
80
  <DialogPrimitive.Content
84
- className={cn(
85
- 'max-w-lg gap-4 border border-border web:cursor-default bg-background p-6 shadow-lg web:duration-200 rounded-lg overflow-hidden',
86
- open
87
- ? 'web:animate-in web:fade-in-0 web:zoom-in-95'
88
- : 'web:animate-out web:fade-out-0 web:zoom-out-95',
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
- className={
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({ className, ...props }: ViewProps) {
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({ className, ...props }: ViewProps) {
102
+ function DialogFooter({ style, ...props }: ViewProps) {
126
103
  return (
127
104
  <View
128
- className={cn(
129
- 'flex flex-col-reverse sm:flex-row sm:justify-end gap-2',
130
- className,
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
- className,
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
- className={cn(
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
- className,
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
- className={cn(
163
- 'text-sm native:text-base text-muted-foreground',
164
- className,
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
+ });