@deck-ui/workspace 0.2.0 → 0.3.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deck-ui/workspace",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
@@ -18,4 +18,4 @@
18
18
  "scripts": {
19
19
  "typecheck": "tsc --noEmit"
20
20
  }
21
- }
21
+ }
@@ -4,8 +4,8 @@
4
4
  * Supports drag-and-drop file import (with folder targeting) and folder creation.
5
5
  */
6
6
  import { useCallback, useRef, useState } from "react"
7
- import { cn } from "@deck-ui/core"
8
- import { FolderPlus } from "lucide-react"
7
+ import { cn, Button } from "@deck-ui/core"
8
+ import { FolderPlus, Upload, FolderOpen } from "lucide-react"
9
9
  import type { FileEntry } from "./types"
10
10
  import { useDropZone } from "./drop-zone"
11
11
  import { FileRow, FolderSection } from "./file-row"
@@ -25,6 +25,10 @@ export interface FilesBrowserProps {
25
25
  onFilesDropped?: (files: File[], targetFolder?: string) => void
26
26
  /** Called when the user creates a new folder via the inline input */
27
27
  onCreateFolder?: (name: string) => void
28
+ /** Called when "Browse files" is clicked — wire to native file picker (e.g. tauri-plugin-dialog). */
29
+ onBrowse?: () => void
30
+ /** Called when "Open folder" is clicked — wire to reveal workspace dir (e.g. shell open). */
31
+ onRevealWorkspace?: () => void
28
32
  /** Title for empty state */
29
33
  emptyTitle?: string
30
34
  /** Description for empty state */
@@ -39,6 +43,8 @@ export function FilesBrowser({
39
43
  onDelete,
40
44
  onFilesDropped,
41
45
  onCreateFolder,
46
+ onBrowse,
47
+ onRevealWorkspace,
42
48
  emptyTitle = "Your work shows up here",
43
49
  emptyDescription = "When agents create files, they'll appear here for you to open and review.",
44
50
  }: FilesBrowserProps) {
@@ -70,6 +76,22 @@ export function FilesBrowser({
70
76
  {emptyDescription}
71
77
  </p>
72
78
  </div>
79
+ {(onBrowse || onRevealWorkspace) && (
80
+ <div className="flex items-center gap-2">
81
+ {onBrowse && (
82
+ <Button variant="default" size="sm" onClick={onBrowse}>
83
+ <Upload className="size-4 mr-1.5" />
84
+ Browse files
85
+ </Button>
86
+ )}
87
+ {onRevealWorkspace && (
88
+ <Button variant="outline" size="sm" onClick={onRevealWorkspace}>
89
+ <FolderOpen className="size-4 mr-1.5" />
90
+ Open folder
91
+ </Button>
92
+ )}
93
+ </div>
94
+ )}
73
95
  {onCreateFolder && (
74
96
  <button
75
97
  onClick={() => setCreatingFolder(true)}
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 ja-818
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.