@lobb-js/lobb-ext-storage 0.9.2 → 0.10.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.
|
@@ -203,25 +203,6 @@
|
|
|
203
203
|
</div>
|
|
204
204
|
<div class="flex gap-2">
|
|
205
205
|
<!-- entries view toggle -->
|
|
206
|
-
<Tooltip.Provider delayDuration={0}>
|
|
207
|
-
<Tooltip.Root>
|
|
208
|
-
<Tooltip.Trigger>
|
|
209
|
-
<Button
|
|
210
|
-
class="h-6 w-6 text-muted-foreground hover:bg-transparent"
|
|
211
|
-
variant="ghost"
|
|
212
|
-
size="icon"
|
|
213
|
-
>
|
|
214
|
-
<icons.List />
|
|
215
|
-
</Button>
|
|
216
|
-
</Tooltip.Trigger>
|
|
217
|
-
<Tooltip.Content
|
|
218
|
-
side="bottom"
|
|
219
|
-
sideOffset={7.5}
|
|
220
|
-
>
|
|
221
|
-
List View
|
|
222
|
-
</Tooltip.Content>
|
|
223
|
-
</Tooltip.Root>
|
|
224
|
-
</Tooltip.Provider>
|
|
225
206
|
<Button
|
|
226
207
|
variant="outline"
|
|
227
208
|
class="h-7 px-3 text-xs font-normal"
|
|
@@ -273,10 +254,10 @@
|
|
|
273
254
|
{#each entries as entry}
|
|
274
255
|
{@const selectedCss =
|
|
275
256
|
selectedEntry?.id === entry.id
|
|
276
|
-
? "bg-
|
|
277
|
-
: "hover:bg-
|
|
257
|
+
? "bg-muted"
|
|
258
|
+
: "hover:bg-muted/50 active:bg-muted"}
|
|
278
259
|
<button
|
|
279
|
-
class="w-32 cursor-default rounded-md
|
|
260
|
+
class="w-32 cursor-default rounded-md p-2 {selectedCss}"
|
|
280
261
|
data-id={entry.id}
|
|
281
262
|
ondblclick={() =>
|
|
282
263
|
handleEntryDoubleClick(entry)}
|
|
@@ -290,17 +271,16 @@
|
|
|
290
271
|
>
|
|
291
272
|
<icons.Folder
|
|
292
273
|
size="50"
|
|
293
|
-
class="
|
|
274
|
+
class="text-muted-foreground/40 fill-current stroke-none"
|
|
294
275
|
/>
|
|
295
276
|
{#if entry.icon}
|
|
296
277
|
{@const key = entry.icon}
|
|
297
|
-
{
|
|
298
|
-
{@const Icon = icons[key]}
|
|
278
|
+
{@const Icon = (icons as any)[key]}
|
|
299
279
|
<div
|
|
300
280
|
class="absolute left-0 top-0 flex h-full w-full items-center justify-center"
|
|
301
281
|
>
|
|
302
282
|
<Icon
|
|
303
|
-
class="text-
|
|
283
|
+
class="text-white"
|
|
304
284
|
style="transform: translateY(0.1rem);"
|
|
305
285
|
size="15"
|
|
306
286
|
/>
|
|
@@ -4,6 +4,9 @@ import type { ExtensionConfig } from "../config/extensionConfigSchema.ts";
|
|
|
4
4
|
export function getFileSystemCollection(config: ExtensionConfig): CollectionConfig {
|
|
5
5
|
return {
|
|
6
6
|
"indexes": {},
|
|
7
|
+
"ui": {
|
|
8
|
+
"icon": "File"
|
|
9
|
+
},
|
|
7
10
|
"fields": {
|
|
8
11
|
"id": {
|
|
9
12
|
"type": "integer",
|
|
@@ -11,29 +14,21 @@ export function getFileSystemCollection(config: ExtensionConfig): CollectionConf
|
|
|
11
14
|
"name": {
|
|
12
15
|
"type": "string",
|
|
13
16
|
"length": 255,
|
|
14
|
-
"
|
|
15
|
-
"required": true,
|
|
16
|
-
},
|
|
17
|
+
"required": true,
|
|
17
18
|
},
|
|
18
19
|
"path": {
|
|
19
20
|
"type": "string",
|
|
20
21
|
"length": 255,
|
|
21
|
-
"
|
|
22
|
-
"default": "/",
|
|
23
|
-
},
|
|
22
|
+
"default": "/",
|
|
24
23
|
},
|
|
25
24
|
"type": {
|
|
26
25
|
"type": "string",
|
|
27
26
|
"length": 255,
|
|
28
|
-
"
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
"file",
|
|
34
|
-
"directory",
|
|
35
|
-
],
|
|
36
|
-
},
|
|
27
|
+
"default": "directory",
|
|
28
|
+
"enum": [
|
|
29
|
+
"file",
|
|
30
|
+
"directory",
|
|
31
|
+
],
|
|
37
32
|
},
|
|
38
33
|
"icon": {
|
|
39
34
|
"type": "string",
|
|
@@ -41,9 +36,7 @@ export function getFileSystemCollection(config: ExtensionConfig): CollectionConf
|
|
|
41
36
|
},
|
|
42
37
|
"is_pinned_sidebar": {
|
|
43
38
|
"type": "bool",
|
|
44
|
-
"
|
|
45
|
-
"default": "false",
|
|
46
|
-
},
|
|
39
|
+
"default": false,
|
|
47
40
|
},
|
|
48
41
|
"file_mime_type": {
|
|
49
42
|
"type": "string",
|
|
@@ -203,25 +203,6 @@
|
|
|
203
203
|
</div>
|
|
204
204
|
<div class="flex gap-2">
|
|
205
205
|
<!-- entries view toggle -->
|
|
206
|
-
<Tooltip.Provider delayDuration={0}>
|
|
207
|
-
<Tooltip.Root>
|
|
208
|
-
<Tooltip.Trigger>
|
|
209
|
-
<Button
|
|
210
|
-
class="h-6 w-6 text-muted-foreground hover:bg-transparent"
|
|
211
|
-
variant="ghost"
|
|
212
|
-
size="icon"
|
|
213
|
-
>
|
|
214
|
-
<icons.List />
|
|
215
|
-
</Button>
|
|
216
|
-
</Tooltip.Trigger>
|
|
217
|
-
<Tooltip.Content
|
|
218
|
-
side="bottom"
|
|
219
|
-
sideOffset={7.5}
|
|
220
|
-
>
|
|
221
|
-
List View
|
|
222
|
-
</Tooltip.Content>
|
|
223
|
-
</Tooltip.Root>
|
|
224
|
-
</Tooltip.Provider>
|
|
225
206
|
<Button
|
|
226
207
|
variant="outline"
|
|
227
208
|
class="h-7 px-3 text-xs font-normal"
|
|
@@ -273,10 +254,10 @@
|
|
|
273
254
|
{#each entries as entry}
|
|
274
255
|
{@const selectedCss =
|
|
275
256
|
selectedEntry?.id === entry.id
|
|
276
|
-
? "bg-
|
|
277
|
-
: "hover:bg-
|
|
257
|
+
? "bg-muted"
|
|
258
|
+
: "hover:bg-muted/50 active:bg-muted"}
|
|
278
259
|
<button
|
|
279
|
-
class="w-32 cursor-default rounded-md
|
|
260
|
+
class="w-32 cursor-default rounded-md p-2 {selectedCss}"
|
|
280
261
|
data-id={entry.id}
|
|
281
262
|
ondblclick={() =>
|
|
282
263
|
handleEntryDoubleClick(entry)}
|
|
@@ -290,17 +271,16 @@
|
|
|
290
271
|
>
|
|
291
272
|
<icons.Folder
|
|
292
273
|
size="50"
|
|
293
|
-
class="
|
|
274
|
+
class="text-muted-foreground/40 fill-current stroke-none"
|
|
294
275
|
/>
|
|
295
276
|
{#if entry.icon}
|
|
296
277
|
{@const key = entry.icon}
|
|
297
|
-
{
|
|
298
|
-
{@const Icon = icons[key]}
|
|
278
|
+
{@const Icon = (icons as any)[key]}
|
|
299
279
|
<div
|
|
300
280
|
class="absolute left-0 top-0 flex h-full w-full items-center justify-center"
|
|
301
281
|
>
|
|
302
282
|
<Icon
|
|
303
|
-
class="text-
|
|
283
|
+
class="text-white"
|
|
304
284
|
style="transform: translateY(0.1rem);"
|
|
305
285
|
size="15"
|
|
306
286
|
/>
|
|
@@ -45,9 +45,7 @@ export function createSimpleConfig(uploadsPath?: string): Config & { uploadsPath
|
|
|
45
45
|
title: {
|
|
46
46
|
type: "string",
|
|
47
47
|
length: 255,
|
|
48
|
-
|
|
49
|
-
required: true,
|
|
50
|
-
},
|
|
48
|
+
required: true,
|
|
51
49
|
},
|
|
52
50
|
description: {
|
|
53
51
|
type: "string",
|
|
@@ -56,16 +54,12 @@ export function createSimpleConfig(uploadsPath?: string): Config & { uploadsPath
|
|
|
56
54
|
body: {
|
|
57
55
|
type: "string",
|
|
58
56
|
length: 255,
|
|
59
|
-
|
|
60
|
-
required: true,
|
|
61
|
-
},
|
|
57
|
+
required: true,
|
|
62
58
|
},
|
|
63
59
|
status: {
|
|
64
60
|
type: "string",
|
|
65
61
|
length: 255,
|
|
66
|
-
|
|
67
|
-
enum: ["public", "private"],
|
|
68
|
-
},
|
|
62
|
+
enum: ["public", "private"],
|
|
69
63
|
},
|
|
70
64
|
},
|
|
71
65
|
},
|
|
@@ -78,15 +72,11 @@ export function createSimpleConfig(uploadsPath?: string): Config & { uploadsPath
|
|
|
78
72
|
body: {
|
|
79
73
|
type: "string",
|
|
80
74
|
length: 255,
|
|
81
|
-
|
|
82
|
-
required: true,
|
|
83
|
-
},
|
|
75
|
+
required: true,
|
|
84
76
|
},
|
|
85
77
|
article_id: {
|
|
86
78
|
type: "integer",
|
|
87
|
-
|
|
88
|
-
required: true,
|
|
89
|
-
},
|
|
79
|
+
required: true,
|
|
90
80
|
},
|
|
91
81
|
},
|
|
92
82
|
},
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobb-js/lobb-ext-storage",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"license": "
|
|
3
|
+
"version": "0.10.0",
|
|
4
|
+
"license": "UNLICENSED",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -34,14 +34,14 @@
|
|
|
34
34
|
"package": "svelte-package --input extensions/storage/studio"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@lobb-js/core": "^0.
|
|
37
|
+
"@lobb-js/core": "^0.24.0",
|
|
38
38
|
"browser-fs-access": "^0.35.0",
|
|
39
39
|
"hono": "^4.7.0",
|
|
40
40
|
"openapi-types": "^12.1.3",
|
|
41
41
|
"path-browserify": "^1.0.1"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@lobb-js/studio": "^0.
|
|
44
|
+
"@lobb-js/studio": "^0.20.0",
|
|
45
45
|
"@lucide/svelte": "^0.563.1",
|
|
46
46
|
"@playwright/test": "^1.58.2",
|
|
47
47
|
"@sveltejs/adapter-node": "^5.5.4",
|