@taruvi/navkit 0.0.22 → 0.0.24-beta.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.
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
{
|
|
2
|
+
"languages": {
|
|
3
|
+
"cpp": {
|
|
4
|
+
"name": "clangd",
|
|
5
|
+
"command": "clangd",
|
|
6
|
+
"args": [
|
|
7
|
+
"--background-index"
|
|
8
|
+
],
|
|
9
|
+
"file_extensions": [
|
|
10
|
+
"cpp",
|
|
11
|
+
"cc",
|
|
12
|
+
"cxx",
|
|
13
|
+
"c",
|
|
14
|
+
"h",
|
|
15
|
+
"hpp",
|
|
16
|
+
"hxx"
|
|
17
|
+
],
|
|
18
|
+
"project_patterns": [
|
|
19
|
+
"CMakeLists.txt",
|
|
20
|
+
"compile_commands.json",
|
|
21
|
+
"Makefile"
|
|
22
|
+
],
|
|
23
|
+
"exclude_patterns": [
|
|
24
|
+
"**/build/**",
|
|
25
|
+
"**/cmake-build-**/**"
|
|
26
|
+
],
|
|
27
|
+
"multi_workspace": false,
|
|
28
|
+
"initialization_options": {},
|
|
29
|
+
"request_timeout_secs": 60
|
|
30
|
+
},
|
|
31
|
+
"ruby": {
|
|
32
|
+
"name": "solargraph",
|
|
33
|
+
"command": "solargraph",
|
|
34
|
+
"args": [
|
|
35
|
+
"stdio"
|
|
36
|
+
],
|
|
37
|
+
"file_extensions": [
|
|
38
|
+
"rb"
|
|
39
|
+
],
|
|
40
|
+
"project_patterns": [
|
|
41
|
+
"Gemfile",
|
|
42
|
+
"Rakefile"
|
|
43
|
+
],
|
|
44
|
+
"exclude_patterns": [
|
|
45
|
+
"**/vendor/**",
|
|
46
|
+
"**/tmp/**"
|
|
47
|
+
],
|
|
48
|
+
"multi_workspace": false,
|
|
49
|
+
"initialization_options": {},
|
|
50
|
+
"request_timeout_secs": 60
|
|
51
|
+
},
|
|
52
|
+
"typescript": {
|
|
53
|
+
"name": "typescript-language-server",
|
|
54
|
+
"command": "typescript-language-server",
|
|
55
|
+
"args": [
|
|
56
|
+
"--stdio"
|
|
57
|
+
],
|
|
58
|
+
"file_extensions": [
|
|
59
|
+
"ts",
|
|
60
|
+
"js",
|
|
61
|
+
"tsx",
|
|
62
|
+
"jsx"
|
|
63
|
+
],
|
|
64
|
+
"project_patterns": [
|
|
65
|
+
"package.json",
|
|
66
|
+
"tsconfig.json"
|
|
67
|
+
],
|
|
68
|
+
"exclude_patterns": [
|
|
69
|
+
"**/node_modules/**",
|
|
70
|
+
"**/dist/**"
|
|
71
|
+
],
|
|
72
|
+
"multi_workspace": false,
|
|
73
|
+
"initialization_options": {
|
|
74
|
+
"preferences": {
|
|
75
|
+
"disableSuggestions": false
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"request_timeout_secs": 60
|
|
79
|
+
},
|
|
80
|
+
"python": {
|
|
81
|
+
"name": "pyright",
|
|
82
|
+
"command": "pyright-langserver",
|
|
83
|
+
"args": [
|
|
84
|
+
"--stdio"
|
|
85
|
+
],
|
|
86
|
+
"file_extensions": [
|
|
87
|
+
"py"
|
|
88
|
+
],
|
|
89
|
+
"project_patterns": [
|
|
90
|
+
"pyproject.toml",
|
|
91
|
+
"setup.py",
|
|
92
|
+
"requirements.txt",
|
|
93
|
+
"pyrightconfig.json"
|
|
94
|
+
],
|
|
95
|
+
"exclude_patterns": [
|
|
96
|
+
"**/__pycache__/**",
|
|
97
|
+
"**/venv/**",
|
|
98
|
+
"**/.venv/**",
|
|
99
|
+
"**/.pytest_cache/**"
|
|
100
|
+
],
|
|
101
|
+
"multi_workspace": false,
|
|
102
|
+
"initialization_options": {},
|
|
103
|
+
"request_timeout_secs": 60
|
|
104
|
+
},
|
|
105
|
+
"rust": {
|
|
106
|
+
"name": "rust-analyzer",
|
|
107
|
+
"command": "rust-analyzer",
|
|
108
|
+
"args": [],
|
|
109
|
+
"file_extensions": [
|
|
110
|
+
"rs"
|
|
111
|
+
],
|
|
112
|
+
"project_patterns": [
|
|
113
|
+
"Cargo.toml"
|
|
114
|
+
],
|
|
115
|
+
"exclude_patterns": [
|
|
116
|
+
"**/target/**"
|
|
117
|
+
],
|
|
118
|
+
"multi_workspace": false,
|
|
119
|
+
"initialization_options": {
|
|
120
|
+
"cargo": {
|
|
121
|
+
"buildScripts": {
|
|
122
|
+
"enable": true
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
"diagnostics": {
|
|
126
|
+
"enable": true,
|
|
127
|
+
"enableExperimental": true
|
|
128
|
+
},
|
|
129
|
+
"workspace": {
|
|
130
|
+
"symbol": {
|
|
131
|
+
"search": {
|
|
132
|
+
"scope": "workspace"
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
"request_timeout_secs": 60
|
|
138
|
+
},
|
|
139
|
+
"go": {
|
|
140
|
+
"name": "gopls",
|
|
141
|
+
"command": "gopls",
|
|
142
|
+
"args": [],
|
|
143
|
+
"file_extensions": [
|
|
144
|
+
"go"
|
|
145
|
+
],
|
|
146
|
+
"project_patterns": [
|
|
147
|
+
"go.mod",
|
|
148
|
+
"go.sum"
|
|
149
|
+
],
|
|
150
|
+
"exclude_patterns": [
|
|
151
|
+
"**/vendor/**"
|
|
152
|
+
],
|
|
153
|
+
"multi_workspace": false,
|
|
154
|
+
"initialization_options": {
|
|
155
|
+
"usePlaceholders": true,
|
|
156
|
+
"completeUnimported": true
|
|
157
|
+
},
|
|
158
|
+
"request_timeout_secs": 60
|
|
159
|
+
},
|
|
160
|
+
"java": {
|
|
161
|
+
"name": "jdtls",
|
|
162
|
+
"command": "jdtls",
|
|
163
|
+
"args": [],
|
|
164
|
+
"file_extensions": [
|
|
165
|
+
"java"
|
|
166
|
+
],
|
|
167
|
+
"project_patterns": [
|
|
168
|
+
"pom.xml",
|
|
169
|
+
"build.gradle",
|
|
170
|
+
"build.gradle.kts",
|
|
171
|
+
".project"
|
|
172
|
+
],
|
|
173
|
+
"exclude_patterns": [
|
|
174
|
+
"**/target/**",
|
|
175
|
+
"**/build/**",
|
|
176
|
+
"**/.gradle/**"
|
|
177
|
+
],
|
|
178
|
+
"multi_workspace": false,
|
|
179
|
+
"initialization_options": {
|
|
180
|
+
"settings": {
|
|
181
|
+
"java": {
|
|
182
|
+
"compile": {
|
|
183
|
+
"nullAnalysis": {
|
|
184
|
+
"mode": "automatic"
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
"configuration": {
|
|
188
|
+
"annotationProcessing": {
|
|
189
|
+
"enabled": true
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
"request_timeout_secs": 60
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taruvi/navkit",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.24-beta.0",
|
|
4
4
|
"main": "src/App.tsx",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -46,6 +46,6 @@
|
|
|
46
46
|
"vite": "^7.1.7"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@taruvi/sdk": "^1.
|
|
49
|
+
"@taruvi/sdk": "^1.3.4-beta.0"
|
|
50
50
|
}
|
|
51
51
|
}
|
package/src/NavkitContext.tsx
CHANGED
|
@@ -109,7 +109,7 @@ export const NavkitProvider = ({ children, client, onThemeChange }: NavkitProvid
|
|
|
109
109
|
const transformedApps: AppData[] = (appsResponse?.data || []).map?.((app: any) => ({
|
|
110
110
|
id: app.slug,
|
|
111
111
|
appname: app.display_name || app.name,
|
|
112
|
-
icon: app.icon || "
|
|
112
|
+
icon: app.icon || "",
|
|
113
113
|
url: app.url
|
|
114
114
|
}))
|
|
115
115
|
startTransition(() => {
|
|
@@ -3,7 +3,7 @@ import type { AppData } from "../../types"
|
|
|
3
3
|
import Search from "../Search/Search"
|
|
4
4
|
import { Card, Box, Grid, Typography } from "@mui/material"
|
|
5
5
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"
|
|
6
|
-
import type
|
|
6
|
+
import { findIconDefinition, type IconName } from "@fortawesome/fontawesome-svg-core"
|
|
7
7
|
import { useNavigation } from "../../NavkitContext"
|
|
8
8
|
import { getAppLauncherStyles } from "./AppLauncher.styles"
|
|
9
9
|
|
|
@@ -12,6 +12,11 @@ const isIconUrl = (icon: string): boolean => {
|
|
|
12
12
|
return icon.startsWith('http://') || icon.startsWith('https://') || icon.startsWith('/')
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
const isValidFaIcon = (icon: string): boolean => {
|
|
16
|
+
const iconName = icon.replace('fa-', '') as IconName
|
|
17
|
+
return !!findIconDefinition({ prefix: 'fas', iconName }) || !!findIconDefinition({ prefix: 'far', iconName })
|
|
18
|
+
}
|
|
19
|
+
|
|
15
20
|
const AppLauncher = () => {
|
|
16
21
|
const { navigateToUrl, appsList, themeMode } = useNavigation()
|
|
17
22
|
const styles = getAppLauncherStyles(themeMode)
|
|
@@ -34,10 +39,10 @@ const AppLauncher = () => {
|
|
|
34
39
|
<Search appsList={appsList} onSearchChange={handleSearchChange} />
|
|
35
40
|
{filteredApps && filteredApps.length > 0 && (
|
|
36
41
|
<Box sx={styles.scrollContainer}>
|
|
37
|
-
<Grid container spacing={
|
|
42
|
+
<Grid container spacing={0}>
|
|
38
43
|
{filteredApps.map((app) => {
|
|
39
44
|
return (
|
|
40
|
-
<Grid size={
|
|
45
|
+
<Grid size={2} key={app.id}>
|
|
41
46
|
<Box
|
|
42
47
|
sx={styles.appItem}
|
|
43
48
|
onClick={() => handleAppClick(app)}
|
|
@@ -55,18 +60,22 @@ const AppLauncher = () => {
|
|
|
55
60
|
objectFit: 'contain'
|
|
56
61
|
}}
|
|
57
62
|
/>
|
|
58
|
-
) : (
|
|
63
|
+
) : app.icon && isValidFaIcon(app.icon) ? (
|
|
59
64
|
<FontAwesomeIcon
|
|
60
65
|
icon={["fas", app.icon.replace('fa-', '') as IconName]}
|
|
61
66
|
style={styles.iconStyle}
|
|
62
67
|
/>
|
|
68
|
+
) : (
|
|
69
|
+
<Typography sx={{ fontSize: '1.25rem', fontWeight: 600 }}>
|
|
70
|
+
{app.appname?.charAt(0).toUpperCase()}
|
|
71
|
+
</Typography>
|
|
63
72
|
)}
|
|
64
73
|
</Box>
|
|
65
74
|
<Typography
|
|
66
75
|
variant="body2"
|
|
67
76
|
sx={styles.appName}
|
|
68
77
|
>
|
|
69
|
-
{app?.appname?.length >
|
|
78
|
+
{app?.appname?.length > 40 ? `${app.appname.substring(0, 40)}...` : app.appname}
|
|
70
79
|
</Typography>
|
|
71
80
|
</Box>
|
|
72
81
|
</Grid>
|
package/tsconfig.app.json
CHANGED
|
@@ -18,11 +18,12 @@
|
|
|
18
18
|
|
|
19
19
|
/* Linting */
|
|
20
20
|
"strict": true,
|
|
21
|
-
"noUnusedLocals":
|
|
22
|
-
"noUnusedParameters":
|
|
23
|
-
"erasableSyntaxOnly":
|
|
21
|
+
"noUnusedLocals": false,
|
|
22
|
+
"noUnusedParameters": false,
|
|
23
|
+
"erasableSyntaxOnly": false,
|
|
24
24
|
"noFallthroughCasesInSwitch": true,
|
|
25
25
|
"noUncheckedSideEffectImports": true
|
|
26
26
|
},
|
|
27
|
-
"include": ["src"]
|
|
27
|
+
"include": ["src"],
|
|
28
|
+
"exclude": ["node_modules"]
|
|
28
29
|
}
|