@kubohiroya/turbowarp-plus-editor-project-folder 0.9.1 → 0.9.3

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.
@@ -1,8 +1,11 @@
1
1
  import type { Storage } from './source.js';
2
+ export declare function isProjectFolderEmpty(directory: FileSystemDirectoryHandle): Promise<boolean>;
3
+ export declare function projectFolderOverwriteWarning(locale?: string): "指定されたフォルダに保存されている内容は上書きされます" | "Contents in the selected folder will be overwritten.";
2
4
  /** Create and validate a project-folder snapshot in a directory chosen by the user. */
3
- export declare function createProjectFolder({ directory, files, storage, current }: {
5
+ export declare function createProjectFolder({ directory, files, storage, overwrite, current }: {
4
6
  directory: FileSystemDirectoryHandle;
5
7
  files: ReadonlyMap<string, Uint8Array>;
6
8
  storage: Storage;
9
+ overwrite?: boolean;
7
10
  current?: () => boolean;
8
11
  }): Promise<import("./source.js").FolderSource>;
@@ -34,6 +34,8 @@ export type ProjectFolderExplorerProps = {
34
34
  unsavedPaths?: ReadonlySet<string>;
35
35
  /** Changes after the folder contents have been saved or reloaded. */
36
36
  refreshKey?: number;
37
+ /** Case-insensitive search by file name or relative path. */
38
+ query?: string;
37
39
  /** Called when a file is opened with Enter, Space or a click. */
38
40
  onOpen?(entry: ExplorerEntry): void;
39
41
  /** The tree's accessible name. Defaults to "Project folder". */
@@ -64,8 +66,13 @@ export type FollowFileStatuses = (directory: FileSystemDirectoryHandle, update:
64
66
  type FolderViewProps = {
65
67
  vm: object;
66
68
  locale?: string;
69
+ /** Saves the current project to a local folder. */
70
+ createFolder?(): Promise<unknown>;
67
71
  marks?: FollowMarks;
68
72
  fileStatuses?: FollowFileStatuses;
73
+ /** Reports unsaved text edits in open file tabs for the given folder. */
74
+ followFileEdits?(directory: FileSystemDirectoryHandle, update: (paths: readonly string[]) => void): () => void;
75
+ query?: string;
69
76
  git?: FollowExplorerGit;
70
77
  /** Opens a transient file tab in the host workspace. */
71
78
  openFile?(request: FilePreviewRequest): boolean;
@@ -76,7 +83,8 @@ export type { FileBaseline, FilePreviewRequest, ReadFileBaseline } from './file-
76
83
  /**
77
84
  * Renders the explorer of the project folder open for `vm`, for a side panel of the host: its files with what each is
78
85
  * for, and `marks` (such as the Git status) when given. It follows the folder as it opens, closes and saves; with no
79
- * folder open it offers Open Project Folder…, and it renders nothing while no project folder is mounted for `vm`.
86
+ * folder open it offers to create one when the host supplies a command, or to open an existing one.
87
+ * It renders nothing while no project folder is mounted for `vm`.
80
88
  * Pass the same `marks` function across renders, or the marks are followed again.
81
89
  */
82
- export declare function renderProjectFolderExplorer(createElement: (component: any, props: any, ...children: any[]) => any, { vm, locale, marks, fileStatuses, git, openFile, readBaseline }: FolderViewProps): any;
90
+ export declare function renderProjectFolderExplorer(createElement: (component: any, props: any, ...children: any[]) => any, props: FolderViewProps): any;