@brftech/filex-core 0.30.1 → 0.32.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/README.md +37 -2
- package/dist/filex-core.js +10571 -8278
- package/dist/filex-core.js.map +1 -1
- package/dist/filex-core.umd.cjs +95 -87
- package/dist/filex-core.umd.cjs.map +1 -1
- package/dist/index.d.ts +548 -66
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/FileExplorer.vue +1104 -26
- package/src/components/Breadcrumb.vue +4 -2
- package/src/components/CommandPalette.vue +18 -2
- package/src/components/E2eRecoveryUnlockModal.vue +193 -0
- package/src/components/EncryptedFolderModal.vue +10 -0
- package/src/components/FilterBar.vue +244 -0
- package/src/components/GalleryView.vue +48 -0
- package/src/components/GridView.vue +85 -3
- package/src/components/InspectorPanel.vue +231 -8
- package/src/components/ListView.vue +11 -1
- package/src/components/RecoveryKeyModal.vue +133 -0
- package/src/components/SecondaryPane.vue +15 -1
- package/src/components/SideNav.vue +329 -6
- package/src/components/StarButton.vue +27 -15
- package/src/components/Toolbar.vue +235 -49
- package/src/components/ViewSwitcher.vue +81 -0
- package/src/composables/useFileApi.ts +83 -0
- package/src/composables/useKeyboardShortcuts.ts +7 -0
- package/src/index.ts +33 -1
- package/src/lib/e2ecrypto.ts +716 -70
- package/src/lib/fileFilters.ts +143 -0
- package/src/lib/listing.ts +103 -1
- package/src/lib/star.ts +42 -0
- package/src/lib/tags.ts +105 -0
- package/src/locales/en.ts +154 -2
- package/src/locales/tr.ts +154 -2
- package/src/modals/PermissionsModal.vue +18 -2
- package/src/styles/base.css +743 -0
- package/src/types/ExplorerConfig.ts +53 -1
- package/src/types/FileNode.ts +23 -0
|
@@ -77,6 +77,9 @@ export interface EndpointMap {
|
|
|
77
77
|
restore: string | null;
|
|
78
78
|
trashList: string | null;
|
|
79
79
|
trashRestore: string | null;
|
|
80
|
+
/* wiring:e2 */
|
|
81
|
+
e2eEscrowChallenge: string | null;
|
|
82
|
+
e2eEscrowUsed: string | null;
|
|
80
83
|
}
|
|
81
84
|
|
|
82
85
|
export interface ExplorerConfig {
|
|
@@ -157,6 +160,12 @@ export interface ExplorerConfig {
|
|
|
157
160
|
/** filex trash restore endpoint — `POST { node_id }`. */
|
|
158
161
|
trashRestore?: string;
|
|
159
162
|
|
|
163
|
+
/* wiring:e2 */
|
|
164
|
+
/** E2E escrow proof-of-possession — `POST { path } → { id, challenge }`. */
|
|
165
|
+
e2eEscrowChallenge?: string;
|
|
166
|
+
/** E2E escrow use report — `POST { path, id, nonce }`. */
|
|
167
|
+
e2eEscrowUsed?: string;
|
|
168
|
+
|
|
160
169
|
/** Public share base URL — `${shareBase}/${uuid}` */
|
|
161
170
|
shareBase?: string;
|
|
162
171
|
|
|
@@ -268,6 +277,22 @@ export interface ExplorerConfig {
|
|
|
268
277
|
* navigation panel starts expanded, the tab strip
|
|
269
278
|
* and split pane are off, the gallery view mode and
|
|
270
279
|
* the host's "How to connect" surface are hidden.
|
|
280
|
+
* 'drive' — everything `simple` does, plus the shell an end
|
|
281
|
+
* user already knows: one primary "New" menu, one
|
|
282
|
+
* search field in the header (with its ⌘K/Ctrl+K
|
|
283
|
+
* escalation into the command palette), a filter row
|
|
284
|
+
* under the breadcrumb, Folders and Files as
|
|
285
|
+
* labelled sections in grid view, the details panel
|
|
286
|
+
* split into Details / Activity, and a storage line
|
|
287
|
+
* under the navigation.
|
|
288
|
+
*
|
|
289
|
+
* ⚠ `drive` is a SUPERSET of `simple`, not a sibling: everything `simple`
|
|
290
|
+
* turns off stays off, and the code asks `simpleUi` for those questions so a
|
|
291
|
+
* later change to `simple` cannot silently miss `drive`. It is a third value
|
|
292
|
+
* rather than a second boolean because "which chrome" is ONE question with
|
|
293
|
+
* three answers — a `driveShell: true` next to `uiProfile: 'standard'` would
|
|
294
|
+
* be a combination nobody can describe, and keeping that question single is
|
|
295
|
+
* why `uiProfile` was a preset to begin with.
|
|
271
296
|
*
|
|
272
297
|
* Why it exists (GitHub #14): the reporter's users are not in IT and read
|
|
273
298
|
* split panes, tabs and mount instructions as a file manager they would have
|
|
@@ -279,7 +304,7 @@ export interface ExplorerConfig {
|
|
|
279
304
|
* rest of the chrome differ. A viewer's own collapse choice, once made,
|
|
280
305
|
* outranks the profile — it is a per-viewer preference, not a policy.
|
|
281
306
|
*/
|
|
282
|
-
uiProfile?: 'standard' | 'simple';
|
|
307
|
+
uiProfile?: 'standard' | 'simple' | 'drive';
|
|
283
308
|
|
|
284
309
|
/**
|
|
285
310
|
* Render the navigation panel (Upload · Recent / Starred / Shared with me /
|
|
@@ -318,12 +343,39 @@ export interface ExplorerConfig {
|
|
|
318
343
|
* the bug this became: for a year the sole place to mint the token the FTPS
|
|
319
344
|
* guide told you to use was the admin panel.
|
|
320
345
|
*
|
|
346
|
+
* ⚠ Role is not the same question as `callerKind`. "API keys" IS hidden for
|
|
347
|
+
* an app token — not because of what that caller may do, but because there is
|
|
348
|
+
* no single person behind it whose keys they would be. See `callerKind`.
|
|
349
|
+
*
|
|
321
350
|
* ⚠ The entries live in the panel, so `sideNav: false` takes them with it.
|
|
322
351
|
* Hosts that want the surface without the panel mount `<filex-connections>`
|
|
323
352
|
* (or `ConnectionsPanel`) on a page of their own.
|
|
324
353
|
*/
|
|
325
354
|
connections?: boolean;
|
|
326
355
|
|
|
356
|
+
/**
|
|
357
|
+
* Who is behind this explorer — a person, or an integration?
|
|
358
|
+
*
|
|
359
|
+
* `'user'` (a signed-in human, or their own API token) draws everything.
|
|
360
|
+
* `'app'` suppresses the surfaces that only mean something for ONE person:
|
|
361
|
+
* **API keys**, **Recent**, **Starred** and **Shared with me**. Upload, the
|
|
362
|
+
* storage list, Trash and "How to connect" stay — an embed's users still
|
|
363
|
+
* upload files and still need mount instructions.
|
|
364
|
+
*
|
|
365
|
+
* Why it exists: a filex API token authenticates AS its owner, and the embeds
|
|
366
|
+
* we run authenticate every visitor with ONE shared token injected by the
|
|
367
|
+
* host's proxy. v0.30.0 put "API keys" in the panel, so under that token an
|
|
368
|
+
* embed visitor could list and revoke the credential the embed itself runs
|
|
369
|
+
* on — and "your Recent" meant the token owner's history shown to a stranger.
|
|
370
|
+
*
|
|
371
|
+
* Default: read from `GET /api/files/capabilities` (`caller_kind`), which is
|
|
372
|
+
* authoritative because only the server knows the token's kind (migration
|
|
373
|
+
* 00030). Set this only to answer BEFORE that request lands — a host that
|
|
374
|
+
* already knows it proxies with an app token spares its users the flash of a
|
|
375
|
+
* Starred row that then disappears. A value here wins over the server's.
|
|
376
|
+
*/
|
|
377
|
+
callerKind?: 'user' | 'app';
|
|
378
|
+
|
|
327
379
|
|
|
328
380
|
/** Default view. */
|
|
329
381
|
viewMode?: 'list' | 'grid';
|
package/src/types/FileNode.ts
CHANGED
|
@@ -88,11 +88,34 @@ export interface Capabilities {
|
|
|
88
88
|
/** Longest life a new share link may be given, in days (0 = no ceiling).
|
|
89
89
|
* Read by the share dialogs so they offer only expiries the server keeps. */
|
|
90
90
|
share_max_ttl_days?: number;
|
|
91
|
+
/** Is the caller a person (`'user'` — a session OR their own API token) or an
|
|
92
|
+
* integration (`'app'` — a host proxy, a bot, an MCP client)? The explorer
|
|
93
|
+
* reads it to decide whether to draw the identity-bearing surfaces; see
|
|
94
|
+
* ExplorerConfig.callerKind. Absent on a server older than the app/user
|
|
95
|
+
* token split, which is why every reader treats "missing" as a person. */
|
|
96
|
+
caller_kind?: 'user' | 'app';
|
|
91
97
|
external?: {
|
|
92
98
|
onlyoffice?: ExternalServiceStatus;
|
|
93
99
|
drawio?: ExternalServiceStatus;
|
|
94
100
|
mermaid?: ExternalServiceStatus;
|
|
95
101
|
};
|
|
102
|
+
/* wiring:e2 */
|
|
103
|
+
/** Whether this installation holds an escrow key for E2E-encrypted folders,
|
|
104
|
+
* and the public half the browser wraps new folders' master keys to.
|
|
105
|
+
*
|
|
106
|
+
* Published on purpose. Escrow means the operator can open the folders you
|
|
107
|
+
* create here without your password, and someone about to create one is
|
|
108
|
+
* entitled to know that BEFORE they create it. Fixed at install time
|
|
109
|
+
* (FILEX_INSTALLATION_E2E_ESCROW_KEY), so this answer never changes for a
|
|
110
|
+
* running installation. */
|
|
111
|
+
e2e_escrow?: {
|
|
112
|
+
enabled: boolean;
|
|
113
|
+
/** Short id of the escrow key (SHA-256(SPKI)[:8], hex). */
|
|
114
|
+
kid?: string;
|
|
115
|
+
alg?: string;
|
|
116
|
+
/** Base64 SPKI. Public material — it can only seal, never open. */
|
|
117
|
+
public_key?: string;
|
|
118
|
+
};
|
|
96
119
|
}
|
|
97
120
|
|
|
98
121
|
/** Single source of truth for "is the IdP/editor/diagram service ready?".
|