@brftech/filex-core 0.39.0 → 0.40.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/index.d.ts CHANGED
@@ -624,6 +624,9 @@ export declare interface ClipboardState {
624
624
  */
625
625
  export declare function comboFromEvent(e: KeyboardEvent): string | null;
626
626
 
627
+ /** Canonical combo → what a human should see. '' stays ''. */
628
+ export declare function comboLabel(combo: string): string;
629
+
627
630
  export declare const ConnectionGuideView: DefineComponent<__VLS_Props_17, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_17> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
628
631
 
629
632
  export declare type ConnectionsApi = ReturnType<typeof useConnections>;
@@ -679,6 +682,12 @@ declare interface ContextAction {
679
682
  disabled?: boolean;
680
683
  hidden?: boolean;
681
684
  divider?: boolean;
685
+ /**
686
+ * tus:t1 — registry action id whose key this row should print. Optional:
687
+ * rows whose `key` already matches the registry (rename, delete, copy…)
688
+ * are resolved from the shared map and need nothing here.
689
+ */
690
+ shortcutId?: string;
682
691
  }
683
692
 
684
693
  export declare interface CreatedFolder {
@@ -1081,6 +1090,14 @@ export declare type EscrowOfferState = 'n/a' | 'offer' | 'declined';
1081
1090
 
1082
1091
  export declare function escrowOfferState(m: E2eMarker | null, installationKid: string | null | undefined): EscrowOfferState;
1083
1092
 
1093
+ /**
1094
+ * Does this event fire the given registry action? For overlays that
1095
+ * handle their own keys (the quick-look peek) rather than going through
1096
+ * the global binder — without this they keep answering to the DEFAULT
1097
+ * key after the user has remapped the action.
1098
+ */
1099
+ export declare function eventMatchesShortcut(e: KeyboardEvent, id: string): boolean;
1100
+
1084
1101
  export declare interface ExplorerConfig {
1085
1102
  /**
1086
1103
  * Modern shorthand: URL prefix for the standard /api/files/* layout.
@@ -1624,10 +1641,10 @@ scopeLabel?: string;
1624
1641
  onAction?: ((key: string) => any) | undefined;
1625
1642
  onUpload?: (() => any) | undefined;
1626
1643
  "onGo-up"?: (() => any) | undefined;
1627
- "onUpdate:viewMode"?: ((v: ViewMode) => any) | undefined;
1628
- "onUpdate:searchQuery"?: ((v: string) => any) | undefined;
1629
1644
  "onNew-folder"?: (() => any) | undefined;
1630
1645
  onRefresh?: (() => any) | undefined;
1646
+ "onUpdate:viewMode"?: ((v: ViewMode) => any) | undefined;
1647
+ "onUpdate:searchQuery"?: ((v: string) => any) | undefined;
1631
1648
  "onOpen-recents"?: (() => any) | undefined;
1632
1649
  "onUpdate:density"?: ((v: Density) => any) | undefined;
1633
1650
  "onToggle-inspector"?: (() => any) | undefined;
@@ -1641,10 +1658,10 @@ focusSearch: () => Promise<void>;
1641
1658
  action: (key: string) => any;
1642
1659
  upload: () => any;
1643
1660
  "go-up": () => any;
1644
- "update:viewMode": (v: ViewMode) => any;
1645
- "update:searchQuery": (v: string) => any;
1646
1661
  "new-folder": () => any;
1647
1662
  refresh: () => any;
1663
+ "update:viewMode": (v: ViewMode) => any;
1664
+ "update:searchQuery": (v: string) => any;
1648
1665
  "open-recents": () => any;
1649
1666
  "update:density": (v: Density) => any;
1650
1667
  "toggle-inspector": () => any;
@@ -1767,10 +1784,10 @@ scopeLabel?: string;
1767
1784
  onAction?: ((key: string) => any) | undefined;
1768
1785
  onUpload?: (() => any) | undefined;
1769
1786
  "onGo-up"?: (() => any) | undefined;
1770
- "onUpdate:viewMode"?: ((v: ViewMode) => any) | undefined;
1771
- "onUpdate:searchQuery"?: ((v: string) => any) | undefined;
1772
1787
  "onNew-folder"?: (() => any) | undefined;
1773
1788
  onRefresh?: (() => any) | undefined;
1789
+ "onUpdate:viewMode"?: ((v: ViewMode) => any) | undefined;
1790
+ "onUpdate:searchQuery"?: ((v: string) => any) | undefined;
1774
1791
  "onOpen-recents"?: (() => any) | undefined;
1775
1792
  "onUpdate:density"?: ((v: Density) => any) | undefined;
1776
1793
  "onToggle-inspector"?: (() => any) | undefined;
@@ -1805,10 +1822,10 @@ targetWire: string;
1805
1822
  originWire?: string;
1806
1823
  }) => any) | undefined;
1807
1824
  onClose?: (() => any) | undefined;
1825
+ "onOpen-tab"?: ((path: string) => any) | undefined;
1808
1826
  onNavigate?: ((path: string) => any) | undefined;
1809
1827
  "onOpen-trash"?: (() => any) | undefined;
1810
1828
  onActivate?: (() => any) | undefined;
1811
- "onOpen-tab"?: ((path: string) => any) | undefined;
1812
1829
  onContext?: ((node: FileNode | null, ev: MouseEvent) => any) | undefined;
1813
1830
  }>, {
1814
1831
  reload: () => Promise<void>;
@@ -1824,10 +1841,10 @@ targetWire: string;
1824
1841
  originWire?: string;
1825
1842
  }) => any;
1826
1843
  close: () => any;
1844
+ "open-tab": (path: string) => any;
1827
1845
  navigate: (path: string) => any;
1828
1846
  "open-trash": () => any;
1829
1847
  activate: () => any;
1830
- "open-tab": (path: string) => any;
1831
1848
  context: (node: FileNode | null, ev: MouseEvent) => any;
1832
1849
  }, PublicProps, {}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, HTMLElement, ComponentProvideOptions, {
1833
1850
  P: {};
@@ -1860,10 +1877,10 @@ targetWire: string;
1860
1877
  originWire?: string;
1861
1878
  }) => any) | undefined;
1862
1879
  onClose?: (() => any) | undefined;
1880
+ "onOpen-tab"?: ((path: string) => any) | undefined;
1863
1881
  onNavigate?: ((path: string) => any) | undefined;
1864
1882
  "onOpen-trash"?: (() => any) | undefined;
1865
1883
  onActivate?: (() => any) | undefined;
1866
- "onOpen-tab"?: ((path: string) => any) | undefined;
1867
1884
  onContext?: ((node: FileNode | null, ev: MouseEvent) => any) | undefined;
1868
1885
  }>, {
1869
1886
  reload: () => Promise<void>;
@@ -2179,10 +2196,20 @@ declare interface InviteResponse {
2179
2196
  */
2180
2197
  export declare function isExternalUsable(s: ExternalServiceStatus | undefined): boolean;
2181
2198
 
2199
+ /**
2200
+ * Is this a Mac-style keyboard? Only affects how a combo is PRINTED —
2201
+ * the canonical form folds Meta into Ctrl, so one saved combo works on
2202
+ * every platform and only the label differs.
2203
+ */
2204
+ export declare function isMacLike(): boolean;
2205
+
2182
2206
  /** True when the deployment is not on TLS — several clients refuse that,
2183
2207
  * and Windows refuses it silently, which is worse. */
2184
2208
  export declare function isPlainHttp(origin: string): boolean;
2185
2209
 
2210
+ /** Does the browser eat this combo before the page can see it? */
2211
+ export declare function isReservedCombo(combo: string): boolean;
2212
+
2186
2213
  /** True when the staged protocol is simply not there. */
2187
2214
  export declare function isStagedUnsupported(err: unknown): boolean;
2188
2215
 
@@ -2226,6 +2253,25 @@ export declare function markerHasRecovery(m: E2eMarker | null): boolean;
2226
2253
  /** True when the hit matched (at least partly) inside file CONTENT. */
2227
2254
  export declare function matchedInContent(matched: unknown): boolean;
2228
2255
 
2256
+ /**
2257
+ * Menu action key → registry action id.
2258
+ *
2259
+ * The right-click menu, the toolbar and the keyboard all name the same verbs,
2260
+ * but the menu's `key` and the registry's `id` are separate vocabularies and
2261
+ * two of them genuinely differ (`access` is the share dialog, `details` is the
2262
+ * inspector). One map, in one place: a second copy is a second chance to
2263
+ * forget, and the symptom would be a menu row that silently stops naming its
2264
+ * key while every other row keeps working.
2265
+ */
2266
+ export declare const MENU_ACTION_SHORTCUTS: Record<string, string>;
2267
+
2268
+ /**
2269
+ * What a menu row or a toolbar button should print beside its label: the
2270
+ * current combo for the verb it triggers, or '' when it has none (unbound, or
2271
+ * not a registry action at all — `keep-local`, the E2E entries and so on).
2272
+ */
2273
+ export declare function menuShortcutHint(menuKey: string): string;
2274
+
2229
2275
  export declare const messages: Record<LocaleCode, Record<string, string>>;
2230
2276
 
2231
2277
  /** Where an NFS client should point, reported by the server. */
@@ -2726,10 +2772,10 @@ targetWire: string;
2726
2772
  originWire?: string;
2727
2773
  }) => any;
2728
2774
  close: () => any;
2775
+ "open-tab": (path: string) => any;
2729
2776
  navigate: (path: string) => any;
2730
2777
  "open-trash": () => any;
2731
2778
  activate: () => any;
2732
- "open-tab": (path: string) => any;
2733
2779
  context: (node: FileNode | null, ev: MouseEvent) => any;
2734
2780
  }, string, PublicProps, Readonly<__VLS_Props_11> & Readonly<{
2735
2781
  onTransfer?: ((p: {
@@ -2738,10 +2784,10 @@ targetWire: string;
2738
2784
  originWire?: string;
2739
2785
  }) => any) | undefined;
2740
2786
  onClose?: (() => any) | undefined;
2787
+ "onOpen-tab"?: ((path: string) => any) | undefined;
2741
2788
  onNavigate?: ((path: string) => any) | undefined;
2742
2789
  "onOpen-trash"?: (() => any) | undefined;
2743
2790
  onActivate?: (() => any) | undefined;
2744
- "onOpen-tab"?: ((path: string) => any) | undefined;
2745
2791
  onContext?: ((node: FileNode | null, ev: MouseEvent) => any) | undefined;
2746
2792
  }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLElement>;
2747
2793
 
@@ -2823,9 +2869,36 @@ export declare interface ShortcutHandlers {
2823
2869
  onTabClose?: () => void;
2824
2870
  onTabNext?: () => void;
2825
2871
  onTabPrev?: () => void;
2872
+ onNewFolder?: () => void;
2873
+ onUpload?: () => void;
2874
+ onRefresh?: () => void;
2875
+ onDownload?: () => void;
2876
+ onPreview?: () => void;
2877
+ onShare?: () => void;
2878
+ onTags?: () => void;
2879
+ onConvert?: () => void;
2880
+ onOpenTab?: () => void;
2881
+ onCopyPath?: () => void;
2882
+ onCopyId?: () => void;
2883
+ onRestore?: () => void;
2826
2884
  hasSelection?: () => boolean;
2827
2885
  }
2828
2886
 
2887
+ /**
2888
+ * The one way a hint may name a key.
2889
+ *
2890
+ * ⚠ Never write a key into a hint by hand — not in a template, not in a
2891
+ * locale string. Every combo in this registry is remappable, so a
2892
+ * hardcoded "Ctrl+K" is true only until someone opens the shortcut
2893
+ * settings, and then it is a label that tells the user to press a key
2894
+ * that does nothing. Call this instead and interpolate the result;
2895
+ * `web/tests/ui/shortcutHints.test.ts` fails the build on a literal.
2896
+ *
2897
+ * Returns '' when the action is unbound, so a caller can drop the whole
2898
+ * segment rather than print an empty key cap.
2899
+ */
2900
+ export declare function shortcutHint(id: string): string;
2901
+
2829
2902
  export declare const ShortcutSettings: DefineComponent<__VLS_Props_7, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
2830
2903
  close: () => any;
2831
2904
  }, string, PublicProps, Readonly<__VLS_Props_7> & Readonly<{