@prozilla-os/file-explorer 1.0.10 → 1.0.12

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/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  <div align="center">
2
2
  <br />
3
3
  <p>
4
- <a href="https://os.prozilla.dev/"><img src="https://os.prozilla.dev/assets/logo.svg" height="200" alt="ProzillaOS" /></a>
4
+ <a href="https://os.prozilla.dev/"><img src="https://os.prozilla.dev/assets/logo.svg?v=2" height="200" alt="ProzillaOS" /></a>
5
5
  </p>
6
6
  <p>
7
7
  <a href="https://github.com/prozilla-os/ProzillaOS/blob/main/LICENSE.md"><img alt="License" src="https://img.shields.io/github/license/Prozilla/ProzillaOS?style=flat-square&color=FF4D5B&label=License"></a>
@@ -27,6 +27,8 @@ $ pnpm add @prozilla-os/core @prozilla-os/file-explorer
27
27
 
28
28
  ## Usage
29
29
 
30
+ ### Basic setup
31
+
30
32
  ```tsx
31
33
  import { Desktop, ModalsView, ProzillaOS, Taskbar, WindowsView, AppsConfig } from "@prozilla-os/core";
32
34
  import { fileExplorer } from "@prozilla-os/file-explorer";
@@ -51,14 +53,51 @@ function App() {
51
53
  }
52
54
  ```
53
55
 
56
+ ### Window options
57
+
58
+ ```tsx
59
+ /**
60
+ * Initial path that the app will open
61
+ * @default "~" - Home directory
62
+ */
63
+ path: string;
64
+
65
+ /**
66
+ * Defines in which mode the application is running
67
+ * 0: None
68
+ * 1: Single
69
+ * 2: Multiple
70
+ * @default 0
71
+ */
72
+ selectorMode: number;
73
+
74
+ /**
75
+ * Footer component that will be displayed when `selectorMode` != 0
76
+ * Can be used to display a list of selected files for example
77
+ */
78
+ Footer: React.FC;
79
+
80
+ /**
81
+ * Gets called each time the selection changes if `selectorMode` != 0
82
+ */
83
+ onSelectionChange: (params: OnSelectionChangeParams) => void;
84
+
85
+ /**
86
+ * Gets called when the selection is finished if `selectorMode` != 0
87
+ */
88
+ onSelectionFinish: Function;
89
+ ```
90
+
54
91
  ## Links
55
92
 
56
93
  - [Website/demo][website]
57
94
  - [GitHub][github]
58
95
  - [npm][npm]
96
+ - [Discord][discord]
59
97
  - [Ko-fi][ko-fi]
60
98
 
61
99
  [website]: https://os.prozilla.dev/file-explorer
62
100
  [github]: https://github.com/prozilla-os/ProzillaOS/tree/convert-to-monorepo/packages/apps/file-explorer
63
101
  [npm]: https://www.npmjs.com/package/@prozilla-os/file-explorer
102
+ [discord]: https://discord.gg/JwbyQP4tdz
64
103
  [ko-fi]: https://ko-fi.com/prozilla
package/dist/main.d.ts CHANGED
@@ -8,9 +8,9 @@ export declare const fileExplorer: App<FileExplorerProps>;
8
8
  declare interface FileExplorerProps extends WindowProps {
9
9
  path?: string;
10
10
  selectorMode?: number;
11
- Footer: FC;
12
- onSelectionChange: (params: OnSelectionChangeParams) => void;
13
- onSelectionFinish: Function;
11
+ Footer?: FC;
12
+ onSelectionChange?: (params: OnSelectionChangeParams) => void;
13
+ onSelectionFinish?: Function;
14
14
  }
15
15
 
16
16
  export declare enum FileSelectorMode {