@brftech/filex-core 0.21.6 → 0.23.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/dist/filex-core.js +6817 -6634
- package/dist/filex-core.js.map +1 -1
- package/dist/filex-core.umd.cjs +44 -44
- package/dist/filex-core.umd.cjs.map +1 -1
- package/dist/index.d.ts +72 -24
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/FileExplorer.vue +209 -0
- package/src/components/GridView.vue +17 -0
- package/src/components/ListView.vue +18 -0
- package/src/components/SecondaryPane.vue +4 -0
- package/src/locales/en.ts +13 -0
- package/src/locales/tr.ts +13 -0
- package/src/styles/base.css +80 -0
- package/src/styles/variables.css +3 -0
- package/src/types/ExplorerConfig.ts +42 -0
package/dist/index.d.ts
CHANGED
|
@@ -49,6 +49,8 @@ declare type __VLS_Props_11 = {
|
|
|
49
49
|
viewMode?: ViewMode;
|
|
50
50
|
/** ui-fix — authenticated thumb resolver, forwarded to grid/gallery. */
|
|
51
51
|
thumbSrc?: (n: FileNode) => string | null;
|
|
52
|
+
/** Desktop selective sync badge resolver, forwarded to the views. */
|
|
53
|
+
keepBadgeFor?: (n: FileNode) => 'kept' | 'syncing' | 'cloud' | 'partial' | null;
|
|
52
54
|
/** ui-fix — mirror the main panel's virtual `.trash` row at storage root
|
|
53
55
|
* so both split panes list identical rows (no row-offset). Defaults on. */
|
|
54
56
|
trashVisible?: boolean;
|
|
@@ -824,6 +826,50 @@ export declare interface ExplorerConfig {
|
|
|
824
826
|
driver?: string;
|
|
825
827
|
readOnly?: boolean;
|
|
826
828
|
}>;
|
|
829
|
+
/**
|
|
830
|
+
* Desktop-shell hook — selective sync ("keep on this computer").
|
|
831
|
+
*
|
|
832
|
+
* Present only when the explorer runs inside the filex desktop app; the
|
|
833
|
+
* shell passes functions that talk to its sync engine, and the explorer
|
|
834
|
+
* grows "Keep on this computer" / "Online only" entries on folder menus.
|
|
835
|
+
* Absent (web admin, embeds): nothing about it renders.
|
|
836
|
+
*
|
|
837
|
+
* Folders only, by design: the sync engine pairs directories, and a file
|
|
838
|
+
* rides along with the folder that holds it.
|
|
839
|
+
*/
|
|
840
|
+
desktopSync?: {
|
|
841
|
+
/** Kept folders for the mounted account, adapter-qualified remotes. */
|
|
842
|
+
kept: () => Promise<Array<{
|
|
843
|
+
remote: string;
|
|
844
|
+
local: string;
|
|
845
|
+
}>>;
|
|
846
|
+
/** Start keeping a folder — or, with kind 'file', a single file.
|
|
847
|
+
* Resolves once the pair is registered (or the user cancelled the
|
|
848
|
+
* shell's root-folder prompt — re-read `kept`). */
|
|
849
|
+
keep: (remote: string, kind: 'dir' | 'file') => Promise<void>;
|
|
850
|
+
/** Stop keeping. The SHELL owns the "what happens to the local copy"
|
|
851
|
+
* question — it asks natively and may cancel; re-read `kept` after. */
|
|
852
|
+
unkeep: (remote: string) => Promise<void>;
|
|
853
|
+
/** Open the folder's local mirror in the OS file manager. */
|
|
854
|
+
reveal: (remote: string) => Promise<void>;
|
|
855
|
+
/** Live engine state, for the row badges and the bottom progress strip.
|
|
856
|
+
* `active` is the folder being worked on right now — the engine walks
|
|
857
|
+
* its pairs one at a time — or null between runs. */
|
|
858
|
+
status?: () => Promise<{
|
|
859
|
+
running: boolean;
|
|
860
|
+
lastError?: string | null;
|
|
861
|
+
active: {
|
|
862
|
+
remote: string;
|
|
863
|
+
phase: 'inventory' | 'plan' | 'transfer' | 'settling';
|
|
864
|
+
done: number;
|
|
865
|
+
total: number;
|
|
866
|
+
} | null;
|
|
867
|
+
}>;
|
|
868
|
+
/** Subscribe to "something about sync changed" pokes from the shell —
|
|
869
|
+
* the explorer re-reads `kept` and `status` when poked. The shell keeps
|
|
870
|
+
* ONE subscriber (the mounted explorer) and overwrites it on remount. */
|
|
871
|
+
onChange?: (cb: () => void) => void;
|
|
872
|
+
};
|
|
827
873
|
}
|
|
828
874
|
|
|
829
875
|
/** Component emits — the parent listens for these events. */
|
|
@@ -1102,18 +1148,19 @@ virtualRows?: () => FileNode[];
|
|
|
1102
1148
|
active?: boolean;
|
|
1103
1149
|
viewMode?: ViewMode;
|
|
1104
1150
|
thumbSrc?: (n: FileNode) => string | null;
|
|
1151
|
+
keepBadgeFor?: (n: FileNode) => "kept" | "syncing" | "cloud" | "partial" | null;
|
|
1105
1152
|
trashVisible?: boolean;
|
|
1106
1153
|
}> & Readonly<{
|
|
1107
|
-
onClose?: (() => any) | undefined;
|
|
1108
|
-
onNavigate?: ((path: string) => any) | undefined;
|
|
1109
|
-
"onOpen-trash"?: (() => any) | undefined;
|
|
1110
|
-
onActivate?: (() => any) | undefined;
|
|
1111
|
-
"onOpen-tab"?: ((path: string) => any) | undefined;
|
|
1112
1154
|
onTransfer?: ((p: {
|
|
1113
1155
|
sources: string[];
|
|
1114
1156
|
targetWire: string;
|
|
1115
1157
|
originWire?: string;
|
|
1116
1158
|
}) => any) | undefined;
|
|
1159
|
+
onClose?: (() => any) | undefined;
|
|
1160
|
+
onNavigate?: ((path: string) => any) | undefined;
|
|
1161
|
+
"onOpen-trash"?: (() => any) | undefined;
|
|
1162
|
+
onActivate?: (() => any) | undefined;
|
|
1163
|
+
"onOpen-tab"?: ((path: string) => any) | undefined;
|
|
1117
1164
|
onContext?: ((node: FileNode | null, ev: MouseEvent) => any) | undefined;
|
|
1118
1165
|
}>, {
|
|
1119
1166
|
reload: () => Promise<void>;
|
|
@@ -1123,16 +1170,16 @@ openSelected: () => void;
|
|
|
1123
1170
|
selectedNodes: () => FileNode[];
|
|
1124
1171
|
getPath: () => string;
|
|
1125
1172
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
1126
|
-
close: () => any;
|
|
1127
|
-
navigate: (path: string) => any;
|
|
1128
|
-
"open-trash": () => any;
|
|
1129
|
-
activate: () => any;
|
|
1130
|
-
"open-tab": (path: string) => any;
|
|
1131
1173
|
transfer: (p: {
|
|
1132
1174
|
sources: string[];
|
|
1133
1175
|
targetWire: string;
|
|
1134
1176
|
originWire?: string;
|
|
1135
1177
|
}) => any;
|
|
1178
|
+
close: () => any;
|
|
1179
|
+
navigate: (path: string) => any;
|
|
1180
|
+
"open-trash": () => any;
|
|
1181
|
+
activate: () => any;
|
|
1182
|
+
"open-tab": (path: string) => any;
|
|
1136
1183
|
context: (node: FileNode | null, ev: MouseEvent) => any;
|
|
1137
1184
|
}, PublicProps, {}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, HTMLElement, ComponentProvideOptions, {
|
|
1138
1185
|
P: {};
|
|
@@ -1155,18 +1202,19 @@ virtualRows?: () => FileNode[];
|
|
|
1155
1202
|
active?: boolean;
|
|
1156
1203
|
viewMode?: ViewMode;
|
|
1157
1204
|
thumbSrc?: (n: FileNode) => string | null;
|
|
1205
|
+
keepBadgeFor?: (n: FileNode) => "kept" | "syncing" | "cloud" | "partial" | null;
|
|
1158
1206
|
trashVisible?: boolean;
|
|
1159
1207
|
}> & Readonly<{
|
|
1160
|
-
onClose?: (() => any) | undefined;
|
|
1161
|
-
onNavigate?: ((path: string) => any) | undefined;
|
|
1162
|
-
"onOpen-trash"?: (() => any) | undefined;
|
|
1163
|
-
onActivate?: (() => any) | undefined;
|
|
1164
|
-
"onOpen-tab"?: ((path: string) => any) | undefined;
|
|
1165
1208
|
onTransfer?: ((p: {
|
|
1166
1209
|
sources: string[];
|
|
1167
1210
|
targetWire: string;
|
|
1168
1211
|
originWire?: string;
|
|
1169
1212
|
}) => any) | undefined;
|
|
1213
|
+
onClose?: (() => any) | undefined;
|
|
1214
|
+
onNavigate?: ((path: string) => any) | undefined;
|
|
1215
|
+
"onOpen-trash"?: (() => any) | undefined;
|
|
1216
|
+
onActivate?: (() => any) | undefined;
|
|
1217
|
+
"onOpen-tab"?: ((path: string) => any) | undefined;
|
|
1170
1218
|
onContext?: ((node: FileNode | null, ev: MouseEvent) => any) | undefined;
|
|
1171
1219
|
}>, {
|
|
1172
1220
|
reload: () => Promise<void>;
|
|
@@ -1943,28 +1991,28 @@ openSelected: typeof openSelected;
|
|
|
1943
1991
|
selectedNodes: typeof selectedNodes;
|
|
1944
1992
|
getPath: typeof getPath;
|
|
1945
1993
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
1994
|
+
transfer: (p: {
|
|
1995
|
+
sources: string[];
|
|
1996
|
+
targetWire: string;
|
|
1997
|
+
originWire?: string;
|
|
1998
|
+
}) => any;
|
|
1946
1999
|
close: () => any;
|
|
1947
2000
|
navigate: (path: string) => any;
|
|
1948
2001
|
"open-trash": () => any;
|
|
1949
2002
|
activate: () => any;
|
|
1950
2003
|
"open-tab": (path: string) => any;
|
|
1951
|
-
|
|
2004
|
+
context: (node: FileNode | null, ev: MouseEvent) => any;
|
|
2005
|
+
}, string, PublicProps, Readonly<__VLS_Props_11> & Readonly<{
|
|
2006
|
+
onTransfer?: ((p: {
|
|
1952
2007
|
sources: string[];
|
|
1953
2008
|
targetWire: string;
|
|
1954
2009
|
originWire?: string;
|
|
1955
|
-
}) => any;
|
|
1956
|
-
context: (node: FileNode | null, ev: MouseEvent) => any;
|
|
1957
|
-
}, string, PublicProps, Readonly<__VLS_Props_11> & Readonly<{
|
|
2010
|
+
}) => any) | undefined;
|
|
1958
2011
|
onClose?: (() => any) | undefined;
|
|
1959
2012
|
onNavigate?: ((path: string) => any) | undefined;
|
|
1960
2013
|
"onOpen-trash"?: (() => any) | undefined;
|
|
1961
2014
|
onActivate?: (() => any) | undefined;
|
|
1962
2015
|
"onOpen-tab"?: ((path: string) => any) | undefined;
|
|
1963
|
-
onTransfer?: ((p: {
|
|
1964
|
-
sources: string[];
|
|
1965
|
-
targetWire: string;
|
|
1966
|
-
originWire?: string;
|
|
1967
|
-
}) => any) | undefined;
|
|
1968
2016
|
onContext?: ((node: FileNode | null, ev: MouseEvent) => any) | undefined;
|
|
1969
2017
|
}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLElement>;
|
|
1970
2018
|
|