opfs-finder 0.2.0 → 0.3.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 (43) hide show
  1. package/README.ja.md +93 -0
  2. package/README.md +36 -58
  3. package/dist/const.d.ts +35 -0
  4. package/dist/const.d.ts.map +1 -0
  5. package/dist/finder/act.d.ts +6 -0
  6. package/dist/finder/act.d.ts.map +1 -0
  7. package/dist/finder/api.d.ts +9 -0
  8. package/dist/finder/api.d.ts.map +1 -0
  9. package/dist/finder/index.d.ts +8 -0
  10. package/dist/finder/index.d.ts.map +1 -0
  11. package/dist/finder/open.d.ts +7 -0
  12. package/dist/finder/open.d.ts.map +1 -0
  13. package/dist/finder/opfs.d.ts +24 -0
  14. package/dist/finder/opfs.d.ts.map +1 -0
  15. package/dist/finder/path.d.ts +17 -0
  16. package/dist/finder/path.d.ts.map +1 -0
  17. package/dist/finder/pref.d.ts +14 -0
  18. package/dist/finder/pref.d.ts.map +1 -0
  19. package/dist/fonts/icon.d.ts +2 -0
  20. package/dist/fonts/icon.d.ts.map +1 -0
  21. package/dist/index.cjs +5 -0
  22. package/dist/index.cjs.map +1 -0
  23. package/dist/index.d.ts +11 -0
  24. package/dist/index.d.ts.map +1 -0
  25. package/dist/index.js +5 -0
  26. package/dist/index.js.map +1 -0
  27. package/dist/style.d.ts +55 -0
  28. package/dist/style.d.ts.map +1 -0
  29. package/dist/types.d.ts +165 -0
  30. package/dist/types.d.ts.map +1 -0
  31. package/dist/utils/hex.d.ts +3 -0
  32. package/dist/utils/hex.d.ts.map +1 -0
  33. package/dist/utils/icon.d.ts +2 -0
  34. package/dist/utils/icon.d.ts.map +1 -0
  35. package/dist/utils/jsx.d.ts +17 -0
  36. package/dist/utils/jsx.d.ts.map +1 -0
  37. package/dist/utils/node.d.ts +18 -0
  38. package/dist/utils/node.d.ts.map +1 -0
  39. package/dist/utils/utils.d.ts +30 -0
  40. package/dist/utils/utils.d.ts.map +1 -0
  41. package/dist/view.d.ts +5 -0
  42. package/dist/view.d.ts.map +1 -0
  43. package/package.json +3 -1
package/README.ja.md ADDED
@@ -0,0 +1,93 @@
1
+ # opfs-finder
2
+
3
+ <p align="center">
4
+ <img width="128px" src="https://opfs-finder.tsei.jp/opfs.webp" alt="opfs-finder logo">
5
+ </p>
6
+ <p align="center">
7
+ <a href="https://www.npmjs.com/package/opfs-finder">
8
+ <img
9
+ src="https://img.shields.io/npm/v/opfs-finder?style=for-the-badge&colorA=5EACED&colorB=E6E3E4"
10
+ alt="npm version"
11
+ />
12
+ </a>
13
+ <a href="https://www.npmtrends.com/opfs-finder">
14
+ <img
15
+ src="https://img.shields.io/npm/dy/opfs-finder.svg?style=for-the-badge&colorA=5EACED&colorB=E6E3E4"
16
+ alt="downloads"
17
+ />
18
+ </a>
19
+ <a href="https://github.com/tseijp/opfs-finder">
20
+ <img
21
+ src="https://img.shields.io/npm/l/opfs-finder?style=for-the-badge&colorA=5EACED&colorB=E6E3E4"
22
+ alt="license MIT"
23
+ />
24
+ </a>
25
+ <a href="https://opfs-finder.tsei.jp/">
26
+ <img
27
+ src="https://img.shields.io/badge/docs-available-000.svg?style=for-the-badge&colorA=5EACED&colorB=E6E3E4"
28
+ alt="docs available"
29
+ />
30
+ </a>
31
+ </p>
32
+
33
+ <p align="center">
34
+ <b>ブラウザに隠されたファイルを、Finder そのままに見る。</b>
35
+ </p>
36
+
37
+ どの web サイトも、ブラウザの中に静かにファイルを溜め込んでいます。これまでは、それを見るだけでも DevTools が必要でした。**opfs-finder** は、その隠されたストレージを、あなたがすでに使い方を知っている window で開きます — アイコン、リスト、カラム、ギャラリーの各表示、ドラッグ&ドロップ、名前の変更、タグ、検索。新しく覚えることは何もありません。ただ Finder のように感じられるだけです。
38
+
39
+ ## 二つの使い方
40
+
41
+ ### Chrome 拡張として
42
+
43
+ どのサイトでも、ツールバーのボタンを押すだけ。Finder が開き、そのサイトのファイルが表示されます。閲覧し、プレビューし、名前を変え、移動し、削除する — どこにいても、同じ見慣れた window です。
44
+
45
+ > [Chrome Web Store][cws] からインストールしてください。
46
+
47
+ ### npm パッケージとして
48
+
49
+ あなた自身のアプリに、ファイル管理機能を一行で追加できます。ユーザーは自分のデータのための本物の Finder を手にします — 自分で作る必要はありません。
50
+
51
+ ```sh
52
+ pnpm install opfs-finder
53
+ ```
54
+
55
+ <!-- prettier-ignore -->
56
+ ```tsx
57
+ import { finder } from 'opfs-finder'
58
+
59
+ <button onClick={finder}>
60
+ Manage my files
61
+ </button>
62
+ ```
63
+
64
+ これだけです。一つの import と一つの呼び出しで、あなたのアプリに Finder が宿ります。
65
+
66
+ ## 手に入るもの
67
+
68
+ - **四つの表示** — アイコン、リスト、カラム、ギャラリー。まさに macOS の通りに。
69
+ - **すべてのファイル操作** — 開く、作成、名前の変更、複製、コピー、移動、削除。
70
+ - **ドラッグ&ドロップ** — ファイルを動かしたり、デスクトップから取り込んだり。
71
+ - **タグ、お気に入り、検索** — あなたがすでにしているやり方で、整理し、見つける。
72
+ - **何でもプレビュー** — 生のバイナリすら、読めるhex 表示で。
73
+
74
+ セットアップ不要。設定不要。あなたの好みを覚え、邪魔をしません。
75
+
76
+ ## 対応ブラウザ
77
+
78
+ opfs-finder は、あらゆるモダンブラウザで動きます。詳しくは: [Can I use…][ciu]
79
+
80
+ | Chrome | Edge | Firefox | Safari | Opera |
81
+ | :----: | :--: | :-----: | :----: | :---: |
82
+ | 108+ | 108+ | 111+ | 16.4+ | 94+ |
83
+
84
+ ## リンク
85
+
86
+ - [Chrome Web Store][cws]
87
+ - [npm パッケージ][npm]
88
+ - [ドキュメント][docs]
89
+
90
+ [cws]: https://chromewebstore.google.com/detail/opfs-finder/xxx
91
+ [npm]: https://www.npmjs.com/package/opfs-finder
92
+ [docs]: https://opfs-finder.tsei.jp/
93
+ [ciu]: https://caniuse.com/wf-origin-private-file-system
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # opfs-finder
2
2
 
3
3
  <p align="center">
4
- <img width="128px" src="https://opfs-finder.tsei.jp/opfs.webp">
4
+ <img width="128px" src="https://opfs-finder.tsei.jp/opfs.webp" alt="opfs-finder logo">
5
5
  </p>
6
6
  <p align="center">
7
7
  <a href="https://www.npmjs.com/package/opfs-finder">
@@ -30,86 +30,64 @@
30
30
  </a>
31
31
  </p>
32
32
 
33
- ## Installation
33
+ <p align="center">
34
+ <b>Browse your browser's hidden files — exactly like the Finder.</b>
35
+ </p>
34
36
 
35
- opfs-finder can be installed not only from [Chrome Web Store][cws], but also as an [npm library][npm], allowing to integrate its API directly into your application.
37
+ Every website quietly stores files inside your browser. Until now, you needed DevTools to even see them. **opfs-finder** opens that hidden storage in a window you already know how to use — icons, list, column, and gallery views, drag & drop, rename, tag, search. Nothing new to learn. It just feels like Finder.
36
38
 
37
- [cws]: https://chromewebstore.google.com/detail/opfs-finder/xxx
38
- [npm]: https://www.npmjs.com/package/opfs-finder
39
+ ## Two ways to use it
39
40
 
40
- ### Chrome Extension
41
+ ### As a Chrome extension
41
42
 
42
- To install opfs-finder chrome extension, open [here][cws] and install it.
43
+ Click the toolbar button on any site. The Finder opens, showing that site's files. Browse, preview, rename, move, and delete — wherever you are, the same familiar window.
43
44
 
44
- ### Manual installation
45
+ > Install from the [Chrome Web Store][cws].
45
46
 
46
- 1. install opfs-finder library from npm
47
+ ### As an npm package
47
48
 
48
- ```tsx
49
+ Add file management to your own app in one line. Your users get a real Finder for their data — no need to build one yourself.
50
+
51
+ ```sh
49
52
  pnpm install opfs-finder
50
53
  ```
51
54
 
52
- 2. import finder function and register click event
53
-
54
55
  <!-- prettier-ignore -->
55
56
  ```tsx
56
- import { finder } from "opfs-finder"
57
+ import { finder } from 'opfs-finder'
57
58
 
58
59
  <button onClick={() => finder()}>
59
- Open Finder Panel window
60
+ Manage my files
60
61
  </button>
61
62
  ```
62
63
 
63
- ### Supported browsers
64
+ That's it. One import, one call, and your app has a Finder.
64
65
 
65
- opfs-finder suports modern browsers. more: [Can I use...][ciu]
66
+ ## What you get
66
67
 
67
- - Chrome 108+
68
- - Edge 108+
69
- - Firefox 111+
70
- - Safari 16.4+
71
- - Opera 94+
68
+ - **Four views** — icons, list, column, and gallery, just like macOS.
69
+ - **Full file actions** — open, create, rename, duplicate, copy, move, delete.
70
+ - **Drag & drop** — move files around, or drop files in from your desktop.
71
+ - **Tags, favorites, search** — organize and find files the way you already do.
72
+ - **Preview anything** — even raw binary, shown as readable hex.
72
73
 
73
- [ciu]: https://caniuse.com/wf-origin-private-file-system
74
+ No setup. No config. It remembers how you like things and stays out of your way.
74
75
 
75
- ## Learn OPFS API
76
+ ## Supported browsers
76
77
 
77
- > The origin private file system (OPFS) is a storage endpoint provided as part of the [File System API][mdn], which is private to the origin of the page and not visible to the user like the regular file system. It provides access to a special kind of file that is highly optimized for performance and offers in-place write access to its content.
78
+ opfs-finder runs on every modern browser. More: [Can I use…][ciu]
78
79
 
79
- [mdn]: https://developer.mozilla.org/en-US/docs/Web/API/File_System_API
80
+ | Chrome | Edge | Firefox | Safari | Opera |
81
+ | :----: | :--: | :-----: | :----: | :---: |
82
+ | 108+ | 108+ | 111+ | 16.4+ | 94+ |
80
83
 
81
- ### Manipulating the OPFS from the main thread
84
+ ## Links
82
85
 
83
- > When accessing the OPFS from the main thread, you will use asynchronous, [Promise][mdn1]-based APIs. You can access file ([FileSystemFileHandle][mdn2]) and directory ([FileSystemDirectoryHandle][mdn3]) handles by calling [.getFileHandle()][mdn4] and [.getDirectoryHandle()][mdn5] respectively on the FileSystemDirectoryHandle object representing the OPFS root (and child directories, as they are created).
86
+ - [Chrome Web Store][cws]
87
+ - [npm package][npm]
88
+ - [Documentation][docs]
84
89
 
85
- [mdn1]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise
86
- [mdn2]: https://developer.mozilla.org/en-US/docs/Web/API/FileSystemFileHandle
87
- [mdn3]: https://developer.mozilla.org/en-US/docs/Web/API/FileSystemDirectoryHandle
88
- [mdn4]: https://developer.mozilla.org/en-US/docs/Web/API/FileSystemDirectoryHandle/getFileHandle
89
- [mdn5]: https://developer.mozilla.org/en-US/docs/Web/API/FileSystemDirectoryHandle/getDirectoryHandle
90
-
91
- <!-- prettier-ignore -->
92
- ```tsx
93
- // Get a opfs root directory
94
- const root = await navigator.storage.getDirectory()
95
-
96
- // Create a hierarchy of files and folders
97
- const file = await root.getFileHandle('root file')
98
- const folder = await root.getDirectoryHandle('root folder')
99
- const nestedFile = await folder.getFileHandle('nested file')
100
- const nestedFolder = await folder.getDirectoryHandle('nested folder')
101
-
102
- // Access existing files and folders via their names
103
- const existingFile = await root.getFileHandle('root file')
104
- const existingFolder = await root.getDirectoryHandle('root folder')
105
-
106
- // Deleting a file or folder
107
- await file.remove()
108
- await folder.remove({ recursive: true })
109
-
110
- // Listing the contents of a folder
111
- for await (let [name, handle] of folder) {}
112
- for await (let [name, handle] of folder.entries()) {}
113
- for await (let handle of folder.values()) {}
114
- for await (let name of folder.keys()) {}
115
- ```
90
+ [cws]: https://chromewebstore.google.com/detail/opfs-finder/xxx
91
+ [npm]: https://www.npmjs.com/package/opfs-finder
92
+ [docs]: https://opfs-finder.tsei.jp/
93
+ [ciu]: https://caniuse.com/wf-origin-private-file-system
@@ -0,0 +1,35 @@
1
+ import type { FinderActionKey, FinderEntry, FinderPrefs, FinderSidebarSection, FinderState, ViewMode } from './types';
2
+ export declare const viewModes: ViewMode[];
3
+ export declare const finderActions: {
4
+ key: FinderActionKey;
5
+ label: string;
6
+ }[];
7
+ export declare const sidebarSections: (prefs: FinderPrefs) => FinderSidebarSection[];
8
+ export declare const iconStyle: {
9
+ fontSize: string;
10
+ lineHeight: string;
11
+ fontWeight: string;
12
+ fontVariationSettings: string;
13
+ };
14
+ export declare const rowIcon: {
15
+ display: string;
16
+ alignItems: string;
17
+ gap: string;
18
+ minWidth: string;
19
+ };
20
+ export declare const iconOf: (entry: Pick<FinderEntry, "kind" | "name">) => string;
21
+ export declare const badgeIconOf: (entry: FinderEntry) => string;
22
+ export declare const sidebarIconOf: (name: string) => "folder_special" | "folder";
23
+ export declare const viewModeIconOf: Record<FinderState['viewMode'], string>;
24
+ export declare const sizeOf: (size: number) => string;
25
+ export declare const dateOf: (time: number) => string;
26
+ export declare const detailRows: (entry: FinderEntry) => ({
27
+ icon: string;
28
+ value: string;
29
+ strong: boolean;
30
+ } | {
31
+ icon: string;
32
+ value: string;
33
+ strong?: undefined;
34
+ })[];
35
+ //# sourceMappingURL=const.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"const.d.ts","sourceRoot":"","sources":["../lib/const.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,WAAW,EAAE,oBAAoB,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AACrH,eAAO,MAAM,SAAS,EAAE,QAAQ,EAA2C,CAAA;AAC3E,eAAO,MAAM,aAAa;;;GAce,CAAA;AACzC,eAAO,MAAM,eAAe,GAAI,OAAO,WAAW,KAAG,oBAAoB,EAUxE,CAAA;AACD,eAAO,MAAM,SAAS;;;;;CAA+H,CAAA;AACrJ,eAAO,MAAM,OAAO;;;;;CAA8E,CAAA;AAOlG,eAAO,MAAM,MAAM,GAAI,OAAO,IAAI,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC,WAG/D,CAAA;AACD,eAAO,MAAM,WAAW,GAAI,OAAO,WAAW,WAE7C,CAAA;AACD,eAAO,MAAM,aAAa,GAAI,MAAM,MAAM,gCAAoD,CAAA;AAC9F,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,WAAW,CAAC,UAAU,CAAC,EAAE,MAAM,CAKlE,CAAA;AACD,eAAO,MAAM,MAAM,GAAI,MAAM,MAAM,WAKlC,CAAA;AACD,eAAO,MAAM,MAAM,GAAI,MAAM,MAAM,WAGlC,CAAA;AACD,eAAO,MAAM,UAAU,GAAI,OAAO,WAAW;;;;;;;;IAM5C,CAAA"}
@@ -0,0 +1,6 @@
1
+ import type { ActCommand, ActContext, ActEffect, Command } from '../types';
2
+ export declare const createAct: ({ command, view }: {
3
+ command: Command;
4
+ view: Window;
5
+ }) => (message: ActCommand, context: ActContext) => Promise<ActEffect | null>;
6
+ //# sourceMappingURL=act.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"act.d.ts","sourceRoot":"","sources":["../../lib/finder/act.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAiB,OAAO,EAA2C,MAAM,UAAU,CAAA;AAGlI,eAAO,MAAM,SAAS,GAAI,mBAAmB;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,MAsCzD,SAAS,UAAU,EAAE,SAAS,UAAU,KAAG,OAAO,CAAC,SAAS,GAAG,IAAI,CAexF,CAAA"}
@@ -0,0 +1,9 @@
1
+ import type { APIOption, FinderHydration, FinderSnapshot, FinderState, FinderStateEvent } from '../types';
2
+ export declare const createAPI: (option?: APIOption) => {
3
+ state: FinderState;
4
+ hydrate(next: FinderHydration): void;
5
+ send(event: FinderStateEvent): void;
6
+ snapshot(): FinderSnapshot;
7
+ };
8
+ export type API = ReturnType<typeof createAPI>;
9
+ //# sourceMappingURL=api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../lib/finder/api.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,cAAc,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AACzG,eAAO,MAAM,SAAS,GAAI,SAAQ,SAAc;;kBAoDlB,eAAe;gBAIjB,gBAAgB;gBAKhB,cAAc;CAIzC,CAAA;AAED,MAAM,MAAM,GAAG,GAAG,UAAU,CAAC,OAAO,SAAS,CAAC,CAAA"}
@@ -0,0 +1,8 @@
1
+ import type { FinderClient, RenderOption } from '../types';
2
+ export declare const createFinder: (mount: HTMLElement, option?: RenderOption & {
3
+ source?: Window | null;
4
+ }) => {
5
+ client: FinderClient;
6
+ render(): void;
7
+ };
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/finder/index.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAW,YAAY,EAA8C,YAAY,EAAE,MAAM,UAAU,CAAA;AAC/G,eAAO,MAAM,YAAY,GAAI,OAAO,WAAW,EAAE,SAAQ,YAAY,GAAG;IAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAO;;;CAmEtG,CAAA"}
@@ -0,0 +1,7 @@
1
+ export type ViewerOption = {
2
+ path: string;
3
+ file: File;
4
+ source?: Window | null;
5
+ };
6
+ export declare const openFile: ({ path, file, source }: ViewerOption) => Promise<void | null>;
7
+ //# sourceMappingURL=open.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"open.d.ts","sourceRoot":"","sources":["../../lib/finder/open.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,YAAY,GAAG;IACnB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,IAAI,CAAA;IACV,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAC7B,CAAA;AAoBD,eAAO,MAAM,QAAQ,GAAU,wBAAwB,YAAY,yBAclE,CAAA"}
@@ -0,0 +1,24 @@
1
+ export type OpfsKind = 'directory' | 'file';
2
+ export type OpfsBody = BlobPart;
3
+ export type OpfsOption = {
4
+ view?: Window;
5
+ };
6
+ export type OpfsEntry = {
7
+ id: string;
8
+ path: string;
9
+ name: string;
10
+ kind: OpfsKind;
11
+ size: number;
12
+ type: string;
13
+ modified: number;
14
+ children: OpfsEntry[];
15
+ };
16
+ export declare const createOPFS: (option?: OpfsOption) => {
17
+ get(path?: string): Promise<File | OpfsEntry>;
18
+ create(path: string, kind?: OpfsKind, body?: OpfsBody): Promise<void | FileSystemDirectoryHandle>;
19
+ put(path: string, body?: OpfsBody): Promise<void>;
20
+ delete(path: string): Promise<void>;
21
+ copy(path: string, to: string, name?: string): Promise<void>;
22
+ move(path: string, name: string): Promise<void>;
23
+ };
24
+ //# sourceMappingURL=opfs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"opfs.d.ts","sourceRoot":"","sources":["../../lib/finder/opfs.ts"],"names":[],"mappings":"AACA,MAAM,MAAM,QAAQ,GAAG,WAAW,GAAG,MAAM,CAAA;AAC3C,MAAM,MAAM,QAAQ,GAAG,QAAQ,CAAA;AAC/B,MAAM,MAAM,UAAU,GAAG;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAC1C,MAAM,MAAM,SAAS,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,SAAS,EAAE,CAAA;CAAE,CAAA;AACvJ,eAAO,MAAM,UAAU,GAAI,SAAQ,UAAe;;iBAmDf,MAAM,SAAQ,QAAQ,SAAiB,QAAQ;cAIlD,MAAM,SAAQ,QAAQ;iBAGnB,MAAM;eAGR,MAAM,MAAM,MAAM;eAGlB,MAAM,QAAQ,MAAM;CAKpD,CAAA"}
@@ -0,0 +1,17 @@
1
+ import type { FinderEntry, FinderState } from '../types';
2
+ export declare const normalizePath: (path: string) => string;
3
+ export declare const dirname: (path: string) => string;
4
+ export declare const basename: (path: string) => string;
5
+ export declare const joinPath: (base: string, name: string) => string;
6
+ export declare const crumbs: (path: string) => {
7
+ name: string;
8
+ path: string;
9
+ }[];
10
+ export declare const flatten: (entry: FinderEntry | null) => FinderEntry[];
11
+ export declare const findEntry: (entry: FinderEntry | null, path: string) => FinderEntry | null;
12
+ export declare const selectedEntry: (entry: FinderEntry | null, id: string) => FinderEntry | null;
13
+ export declare const existingEntries: (entries: Array<FinderEntry | null>) => FinderEntry[];
14
+ export declare const childrenOf: (entry: FinderEntry | null, path: string) => FinderEntry[];
15
+ export declare const extensionOf: (name: string) => string;
16
+ export declare const visibleEntries: (state: FinderState) => FinderEntry[];
17
+ //# sourceMappingURL=path.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"path.d.ts","sourceRoot":"","sources":["../../lib/finder/path.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AACxD,eAAO,MAAM,aAAa,GAAI,MAAM,MAAM,WAGzC,CAAA;AACD,eAAO,MAAM,OAAO,GAAI,MAAM,MAAM,WAKnC,CAAA;AACD,eAAO,MAAM,QAAQ,GAAI,MAAM,MAAM,WAGpC,CAAA;AACD,eAAO,MAAM,QAAQ,GAAI,MAAM,MAAM,EAAE,MAAM,MAAM,WAAqC,CAAA;AACxF,eAAO,MAAM,MAAM,GAAI,MAAM,MAAM;;;GAGlC,CAAA;AACD,eAAO,MAAM,OAAO,GAAI,OAAO,WAAW,GAAG,IAAI,KAAG,WAAW,EAG9D,CAAA;AACD,eAAO,MAAM,SAAS,GAAI,OAAO,WAAW,GAAG,IAAI,EAAE,MAAM,MAAM,KAAG,WAAW,GAAG,IAIjF,CAAA;AACD,eAAO,MAAM,aAAa,GAAI,OAAO,WAAW,GAAG,IAAI,EAAE,IAAI,MAAM,uBAElE,CAAA;AACD,eAAO,MAAM,eAAe,GAAI,SAAS,KAAK,CAAC,WAAW,GAAG,IAAI,CAAC,KAAG,WAAW,EAE/E,CAAA;AACD,eAAO,MAAM,UAAU,GAAI,OAAO,WAAW,GAAG,IAAI,EAAE,MAAM,MAAM,kBAEjE,CAAA;AACD,eAAO,MAAM,WAAW,GAAI,MAAM,MAAM,WAIvC,CAAA;AACD,eAAO,MAAM,cAAc,GAAI,OAAO,WAAW,kBAKhD,CAAA"}
@@ -0,0 +1,14 @@
1
+ import type { FinderFavorite, FinderPrefs } from '../types';
2
+ export declare const prefTags: {
3
+ name: string;
4
+ color: string;
5
+ paths: never[];
6
+ }[];
7
+ export declare const defaultPrefs: () => FinderPrefs;
8
+ export declare const createPref: (view: Window) => {
9
+ current(): FinderPrefs;
10
+ load(): Promise<FinderPrefs>;
11
+ write(prefs: FinderPrefs): Promise<FinderPrefs>;
12
+ addFavorite(favorite: FinderFavorite): Promise<FinderPrefs>;
13
+ };
14
+ //# sourceMappingURL=pref.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pref.d.ts","sourceRoot":"","sources":["../../lib/finder/pref.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAC3D,eAAO,MAAM,QAAQ;;;;GAAqS,CAAA;AAC1T,eAAO,MAAM,YAAY,QAAO,WAAkD,CAAA;AAElF,eAAO,MAAM,UAAU,GAAI,MAAM,MAAM;;;iBAoBV,WAAW;0BAGF,cAAc;CAInD,CAAA"}