@brftech/filex-core 0.5.0 → 0.6.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.
Files changed (45) hide show
  1. package/dist/{ArchiveViewer-DKW-HyXT.js → ArchiveViewer-EGgNqLPE.js} +2 -2
  2. package/dist/{ArchiveViewer-DKW-HyXT.js.map → ArchiveViewer-EGgNqLPE.js.map} +1 -1
  3. package/dist/{CsvViewer-D2HmP2yr.js → CsvViewer-BvriJ42M.js} +2 -2
  4. package/dist/{CsvViewer-D2HmP2yr.js.map → CsvViewer-BvriJ42M.js.map} +1 -1
  5. package/dist/{DrawioViewer-DPNvOFCs.js → DrawioViewer-B_bSPsWX.js} +2 -2
  6. package/dist/{DrawioViewer-DPNvOFCs.js.map → DrawioViewer-B_bSPsWX.js.map} +1 -1
  7. package/dist/{EpubViewer-ByqjNuNL.js → EpubViewer-hl68h4gG.js} +2 -2
  8. package/dist/{EpubViewer-ByqjNuNL.js.map → EpubViewer-hl68h4gG.js.map} +1 -1
  9. package/dist/{IpynbViewer-2iONhbuJ.js → IpynbViewer-lhwOjXK7.js} +2 -2
  10. package/dist/{IpynbViewer-2iONhbuJ.js.map → IpynbViewer-lhwOjXK7.js.map} +1 -1
  11. package/dist/{MermaidViewer-CmiU7hIT.js → MermaidViewer-H2Z6AYXg.js} +2 -2
  12. package/dist/{MermaidViewer-CmiU7hIT.js.map → MermaidViewer-H2Z6AYXg.js.map} +1 -1
  13. package/dist/{PsdViewer-Inhl2yN9.js → PsdViewer-Bsk-11yH.js} +2 -2
  14. package/dist/{PsdViewer-Inhl2yN9.js.map → PsdViewer-Bsk-11yH.js.map} +1 -1
  15. package/dist/{TiffViewer-C2AFFEze.js → TiffViewer-D-j9vycG.js} +2 -2
  16. package/dist/{TiffViewer-C2AFFEze.js.map → TiffViewer-D-j9vycG.js.map} +1 -1
  17. package/dist/{Viewer3D-YdW14q_n.js → Viewer3D-Bcr70rTe.js} +2 -2
  18. package/dist/{Viewer3D-YdW14q_n.js.map → Viewer3D-Bcr70rTe.js.map} +1 -1
  19. package/dist/filex-core.js +42 -39
  20. package/dist/filex-core.umd.cjs +59 -58
  21. package/dist/filex-core.umd.cjs.map +1 -1
  22. package/dist/index-C_ZSnk_I.js +11109 -0
  23. package/dist/index-C_ZSnk_I.js.map +1 -0
  24. package/dist/index.d.ts +234 -1
  25. package/dist/style.css +1 -1
  26. package/package.json +1 -1
  27. package/src/FileExplorer.vue +367 -14
  28. package/src/components/CommandPalette.vue +12 -1
  29. package/src/components/GalleryView.vue +214 -0
  30. package/src/components/GridView.vue +1 -0
  31. package/src/components/InspectorPanel.vue +170 -0
  32. package/src/components/ListView.vue +1 -0
  33. package/src/components/SecondaryPane.vue +411 -0
  34. package/src/components/TabBar.vue +174 -0
  35. package/src/components/Toolbar.vue +23 -5
  36. package/src/composables/useFileApi.ts +53 -0
  37. package/src/composables/useKeyboardShortcuts.ts +19 -0
  38. package/src/composables/useTabs.ts +222 -0
  39. package/src/index.ts +6 -0
  40. package/src/locales/en.ts +33 -0
  41. package/src/locales/tr.ts +33 -0
  42. package/src/styles/base.css +538 -0
  43. package/src/types/FileNode.ts +1 -1
  44. package/dist/index-eARevpz0.js +0 -9952
  45. package/dist/index-eARevpz0.js.map +0 -1
package/dist/index.d.ts CHANGED
@@ -12,6 +12,39 @@ declare type __VLS_Props = {
12
12
  config: ExplorerConfig;
13
13
  };
14
14
 
15
+ declare type __VLS_Props_10 = {
16
+ tabs: TabItem[];
17
+ activeId: string;
18
+ locale: LocaleCode;
19
+ /** false → the split toggle is hidden (narrow embeds). */
20
+ splitEnabled?: boolean;
21
+ /** true → the split toggle renders pressed (active tab has a pane). */
22
+ splitActive?: boolean;
23
+ };
24
+
25
+ declare type __VLS_Props_11 = {
26
+ api: FileApi;
27
+ /** Opening location, in the host's `currentPath` form. */
28
+ initialPath: string;
29
+ locale: LocaleCode;
30
+ /** Host's own qualify(): user path → wire `<adapter>://<rel>`. */
31
+ qualify: (p: string) => string;
32
+ /** Host's wire → user-path converter (multi-storage aware). */
33
+ toUser: (wire: string) => string;
34
+ /** Host's rootFloor clamp — keeps the pane inside the confine. */
35
+ clamp: (p: string) => string;
36
+ /** Label for the root crumb (adapter name / storage list). */
37
+ rootLabel: string;
38
+ /** rootFloor (user-path form, '' when unconfined) — trims crumbs. */
39
+ floor?: string;
40
+ /** Multi-storage mode: '' is the virtual drives root (no fetch). */
41
+ multiRoot?: boolean;
42
+ /** Synthesized storage rows for the virtual drives root. */
43
+ virtualRows?: () => FileNode[];
44
+ /** Active-panel highlight (keyboard target). */
45
+ active?: boolean;
46
+ };
47
+
15
48
  declare type __VLS_Props_2 = {
16
49
  open: boolean;
17
50
  locale: LocaleCode;
@@ -648,6 +681,82 @@ onRefresh?: (() => any) | undefined;
648
681
  }>, {
649
682
  focusSearch: () => Promise<void>;
650
683
  }, {}, {}, {}, {}> | null;
684
+ splitPaneRef: CreateComponentPublicInstanceWithMixins<Readonly<{
685
+ api: FileApi;
686
+ initialPath: string;
687
+ locale: LocaleCode;
688
+ qualify: (p: string) => string;
689
+ toUser: (wire: string) => string;
690
+ clamp: (p: string) => string;
691
+ rootLabel: string;
692
+ floor?: string;
693
+ multiRoot?: boolean;
694
+ virtualRows?: () => FileNode[];
695
+ active?: boolean;
696
+ }> & Readonly<{
697
+ onClose?: (() => any) | undefined;
698
+ onNavigate?: ((path: string) => any) | undefined;
699
+ onActivate?: (() => any) | undefined;
700
+ "onOpen-tab"?: ((path: string) => any) | undefined;
701
+ onTransfer?: ((p: {
702
+ sources: string[];
703
+ targetWire: string;
704
+ originWire?: string;
705
+ }) => any) | undefined;
706
+ }>, {
707
+ reload: () => Promise<void>;
708
+ goUp: () => void;
709
+ selectAll: () => void;
710
+ openSelected: () => void;
711
+ selectedNodes: () => FileNode[];
712
+ getPath: () => string;
713
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
714
+ close: () => any;
715
+ navigate: (path: string) => any;
716
+ activate: () => any;
717
+ "open-tab": (path: string) => any;
718
+ transfer: (p: {
719
+ sources: string[];
720
+ targetWire: string;
721
+ originWire?: string;
722
+ }) => any;
723
+ }, PublicProps, {}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, HTMLElement, ComponentProvideOptions, {
724
+ P: {};
725
+ B: {};
726
+ D: {};
727
+ C: {};
728
+ M: {};
729
+ Defaults: {};
730
+ }, Readonly<{
731
+ api: FileApi;
732
+ initialPath: string;
733
+ locale: LocaleCode;
734
+ qualify: (p: string) => string;
735
+ toUser: (wire: string) => string;
736
+ clamp: (p: string) => string;
737
+ rootLabel: string;
738
+ floor?: string;
739
+ multiRoot?: boolean;
740
+ virtualRows?: () => FileNode[];
741
+ active?: boolean;
742
+ }> & Readonly<{
743
+ onClose?: (() => any) | undefined;
744
+ onNavigate?: ((path: string) => any) | undefined;
745
+ onActivate?: (() => any) | undefined;
746
+ "onOpen-tab"?: ((path: string) => any) | undefined;
747
+ onTransfer?: ((p: {
748
+ sources: string[];
749
+ targetWire: string;
750
+ originWire?: string;
751
+ }) => any) | undefined;
752
+ }>, {
753
+ reload: () => Promise<void>;
754
+ goUp: () => void;
755
+ selectAll: () => void;
756
+ openSelected: () => void;
757
+ selectedNodes: () => FileNode[];
758
+ getPath: () => string;
759
+ }, {}, {}, {}, {}> | null;
651
760
  ctxRef: CreateComponentPublicInstanceWithMixins<Readonly<{
652
761
  locale: LocaleCode;
653
762
  actions: ContextAction[];
@@ -759,6 +868,8 @@ export declare function getHighlight(): unknown | null;
759
868
  /** Synchronous cached lookup — null if Monaco not yet ready or absent. */
760
869
  export declare function getMonaco(): unknown | null;
761
870
 
871
+ declare function getPath(): string;
872
+
762
873
  /**
763
874
  * One hit from the dedicated files-search endpoint. The backend returns raw
764
875
  * node rows (`{results: [...]}`), so `path` is the IN-STORAGE relative path
@@ -785,6 +896,8 @@ export declare interface GlobalSearchHit {
785
896
 
786
897
  export declare type GlobalSearchScope = 'name' | 'content' | 'all';
787
898
 
899
+ declare function goUp(): void;
900
+
788
901
  /** A single ACL grant row (RBAC permissions panel). */
789
902
  declare interface Grant {
790
903
  id: number;
@@ -830,6 +943,20 @@ export declare function matchedInContent(matched: unknown): boolean;
830
943
 
831
944
  export declare const messages: Record<LocaleCode, Record<string, string>>;
832
945
 
946
+ /** Mirrors backend `model.NodeComment` (GET /api/files/comments?node_id=…). */
947
+ declare interface NodeComment {
948
+ id: number;
949
+ node_id: number;
950
+ user_id: number;
951
+ body: string;
952
+ created_at: string;
953
+ updated_at?: string;
954
+ /** Joined author display name (email fallback), filled by the backend. */
955
+ author_name?: string;
956
+ /** Whether the CURRENT caller may delete this row (author or admin). */
957
+ can_delete?: boolean;
958
+ }
959
+
833
960
  /** Mirrors backend `model.NodeVersion` (GET /api/files/versions?node_id=…). */
834
961
  declare interface NodeVersion {
835
962
  id: number;
@@ -841,6 +968,8 @@ declare interface NodeVersion {
841
968
  created_at: string;
842
969
  }
843
970
 
971
+ declare function openSelected(): void;
972
+
844
973
  export declare interface Operation {
845
974
  /** `${group}:${id}` — unique across publishers. */
846
975
  key: string;
@@ -1030,6 +1159,8 @@ declare interface RecentNode {
1030
1159
  last_opened?: string;
1031
1160
  }
1032
1161
 
1162
+ declare function reload(): Promise<void>;
1163
+
1033
1164
  export declare function resetAllShortcuts(): void;
1034
1165
 
1035
1166
  export declare function resetShortcut(id: string): void;
@@ -1055,6 +1186,39 @@ export declare function resolveEndpoints(config: ExplorerConfig): EndpointMap;
1055
1186
  /** Matched-in values the search contract allows on a hit. */
1056
1187
  export declare type SearchMatched = 'name' | 'content' | 'both';
1057
1188
 
1189
+ export declare const SecondaryPane: DefineComponent<__VLS_Props_11, {
1190
+ reload: typeof reload;
1191
+ goUp: typeof goUp;
1192
+ selectAll: typeof selectAll;
1193
+ openSelected: typeof openSelected;
1194
+ selectedNodes: typeof selectedNodes;
1195
+ getPath: typeof getPath;
1196
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
1197
+ close: () => any;
1198
+ navigate: (path: string) => any;
1199
+ activate: () => any;
1200
+ "open-tab": (path: string) => any;
1201
+ transfer: (p: {
1202
+ sources: string[];
1203
+ targetWire: string;
1204
+ originWire?: string;
1205
+ }) => any;
1206
+ }, string, PublicProps, Readonly<__VLS_Props_11> & Readonly<{
1207
+ onClose?: (() => any) | undefined;
1208
+ onNavigate?: ((path: string) => any) | undefined;
1209
+ onActivate?: (() => any) | undefined;
1210
+ "onOpen-tab"?: ((path: string) => any) | undefined;
1211
+ onTransfer?: ((p: {
1212
+ sources: string[];
1213
+ targetWire: string;
1214
+ originWire?: string;
1215
+ }) => any) | undefined;
1216
+ }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLElement>;
1217
+
1218
+ declare function selectAll(): void;
1219
+
1220
+ declare function selectedNodes(): FileNode[];
1221
+
1058
1222
  declare type SelectionMode_2 = 'none' | 'single-file' | 'single-dir' | 'multi';
1059
1223
 
1060
1224
  /** Set (or clear back to default) a user override. '' unbinds. */
@@ -1120,6 +1284,10 @@ export declare interface ShortcutHandlers {
1120
1284
  onShowHelp?: () => void;
1121
1285
  onToggleInspector?: () => void;
1122
1286
  onQuickLook?: () => void;
1287
+ onTabNew?: () => void;
1288
+ onTabClose?: () => void;
1289
+ onTabNext?: () => void;
1290
+ onTabPrev?: () => void;
1123
1291
  hasSelection?: () => boolean;
1124
1292
  }
1125
1293
 
@@ -1178,6 +1346,42 @@ onChange?: ((value: boolean) => any) | undefined;
1178
1346
  */
1179
1347
  export declare function syncThemeStyle(id: string): void;
1180
1348
 
1349
+ export declare const TabBar: DefineComponent<__VLS_Props_10, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
1350
+ close: (id: string) => any;
1351
+ select: (id: string) => any;
1352
+ new: () => any;
1353
+ reorder: (from: number, to: number) => any;
1354
+ "toggle-split": () => any;
1355
+ }, string, PublicProps, Readonly<__VLS_Props_10> & Readonly<{
1356
+ onClose?: ((id: string) => any) | undefined;
1357
+ onSelect?: ((id: string) => any) | undefined;
1358
+ onNew?: (() => any) | undefined;
1359
+ onReorder?: ((from: number, to: number) => any) | undefined;
1360
+ "onToggle-split"?: (() => any) | undefined;
1361
+ }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
1362
+
1363
+ declare interface TabItem {
1364
+ id: string;
1365
+ label: string;
1366
+ /** true → the tab carries a split pane (small accent dot). */
1367
+ split: boolean;
1368
+ }
1369
+
1370
+ export declare type TabsApi = ReturnType<typeof useTabs>;
1371
+
1372
+ /** Per-tab split state — the secondary pane's own location. */
1373
+ export declare interface TabSplit {
1374
+ path: string;
1375
+ }
1376
+
1377
+ export declare interface TabState {
1378
+ id: string;
1379
+ /** Location snapshot in `currentPath` form (see module docs). */
1380
+ path: string;
1381
+ viewMode: ViewMode;
1382
+ split: TabSplit | null;
1383
+ }
1384
+
1181
1385
  export declare const TagPicker: DefineComponent<__VLS_Props_4, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
1182
1386
  error: (message: string) => any;
1183
1387
  change: (tags: string[]) => any;
@@ -1361,6 +1565,9 @@ export declare function useFileApi(config: ExplorerConfig): {
1361
1565
  listVersions: (nodeId: number) => Promise<NodeVersion[]>;
1362
1566
  restoreVersion: (nodeId: number, versionId: number, snapshotCurrent?: boolean) => Promise<void>;
1363
1567
  snapshotVersion: (nodeId: number) => Promise<void>;
1568
+ listComments: (nodeId: number) => Promise<NodeComment[]>;
1569
+ addComment: (nodeId: number, body: string) => Promise<NodeComment>;
1570
+ deleteComment: (id: number) => Promise<void>;
1364
1571
  listPermissions: (path: string) => Promise<PermissionsResponse>;
1365
1572
  resolveEmail: (email: string) => Promise<ResolveEmailResponse>;
1366
1573
  searchUsers: (q: string) => Promise<UserSearchResponse>;
@@ -1580,6 +1787,32 @@ export declare function useSelection(items: () => FileNode[]): {
1580
1787
  /** Reactive, override-aware view of the registry (registry order). */
1581
1788
  export declare function useShortcutList(): ComputedRef<ShortcutView[]>;
1582
1789
 
1790
+ export declare function useTabs(opts: UseTabsOptions): {
1791
+ tabs: Ref<TabState[], TabState[]>;
1792
+ activeId: Ref<string, string>;
1793
+ activeTab: ComputedRef<TabState | null>;
1794
+ activeIndex: ComputedRef<number>;
1795
+ hasMultiple: ComputedRef<boolean>;
1796
+ restore: () => boolean;
1797
+ seed: (path: string, viewMode: ViewMode) => void;
1798
+ syncActive: (patch: Partial<Pick<TabState, "path" | "viewMode">>) => void;
1799
+ openTab: (path: string, o: {
1800
+ viewMode: ViewMode;
1801
+ background?: boolean;
1802
+ split?: TabSplit | null;
1803
+ }) => TabState;
1804
+ closeTab: (id: string) => TabState | null;
1805
+ activate: (id: string) => TabState | null;
1806
+ step: (delta: number) => TabState | null;
1807
+ move: (from: number, to: number) => void;
1808
+ setSplit: (split: TabSplit | null) => void;
1809
+ };
1810
+
1811
+ declare interface UseTabsOptions {
1812
+ /** localStorage key; null disables persistence entirely. */
1813
+ storageKey: string | null;
1814
+ }
1815
+
1583
1816
  /** Reactive handle for components: `{ themeId, setTheme }`. */
1584
1817
  export declare function useThemeState(): {
1585
1818
  themeId: Ref<string>;
@@ -1590,6 +1823,6 @@ export declare function useUploadChunked(config: ExplorerConfig, api: FileApi):
1590
1823
  uploadFile: (opts: UploadOptions) => Promise<UploadFinalizeResponse>;
1591
1824
  };
1592
1825
 
1593
- export declare type ViewMode = 'list' | 'grid';
1826
+ export declare type ViewMode = 'list' | 'grid' | 'gallery';
1594
1827
 
1595
1828
  export { }