opfs-finder 0.1.1 → 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.
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,91 +1,93 @@
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
+ </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>
5
31
  </p>
6
32
 
7
- ## Installation
33
+ <p align="center">
34
+ <b>Browse your browser's hidden files — exactly like the Finder.</b>
35
+ </p>
8
36
 
9
- 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.
10
38
 
11
- [cws]: https://chromewebstore.google.com/detail/opfs-finder/xxx
12
- [npm]: https://www.npmjs.com/package/opfs-finder
39
+ ## Two ways to use it
13
40
 
14
- ### Chrome Extension
41
+ ### As a Chrome extension
15
42
 
16
- 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.
17
44
 
18
- **[OPFS Finder - Chrome Web Store][3]**
45
+ > Install from the [Chrome Web Store][cws].
19
46
 
20
- ### Manual installation
47
+ ### As an npm package
21
48
 
22
- 1. install opfs-finder library from npm
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.
23
50
 
24
- ```rb
51
+ ```sh
25
52
  pnpm install opfs-finder
26
53
  ```
27
54
 
28
- 2. import finder function and register click event
29
-
30
55
  <!-- prettier-ignore -->
31
56
  ```tsx
32
- import { finder } from "opfs-finder"
57
+ import { finder } from 'opfs-finder'
33
58
 
34
- <button onClick={finder}>
35
- Open Finder Panel window
59
+ <button onClick={() => finder()}>
60
+ Manage my files
36
61
  </button>
37
62
  ```
38
63
 
39
- ### Supported browsers
64
+ That's it. One import, one call, and your app has a Finder.
40
65
 
41
- opfs-finder suports modern browsers. more: [Can I use...][ciu]
66
+ ## What you get
42
67
 
43
- - Chrome 108+
44
- - Edge 108+
45
- - Firefox 111+
46
- - Safari 16.4+
47
- - 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.
48
73
 
49
- [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.
50
75
 
51
- ## Learn OPFS API
76
+ ## Supported browsers
52
77
 
53
- > 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]
54
79
 
55
- [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+ |
56
83
 
57
- ### Manipulating the OPFS from the main thread
84
+ ## Links
58
85
 
59
- > 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]
60
89
 
61
- [mdn1]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise
62
- [mdn2]: https://developer.mozilla.org/en-US/docs/Web/API/FileSystemFileHandle
63
- [mdn3]: https://developer.mozilla.org/en-US/docs/Web/API/FileSystemDirectoryHandle
64
- [mdn4]: https://developer.mozilla.org/en-US/docs/Web/API/FileSystemDirectoryHandle/getFileHandle
65
- [mdn5]: https://developer.mozilla.org/en-US/docs/Web/API/FileSystemDirectoryHandle/getDirectoryHandle
66
-
67
- <!-- prettier-ignore -->
68
- ```tsx
69
- // Get a opfs root directory
70
- const root = await navigator.storage.getDirectory()
71
-
72
- // Create a hierarchy of files and folders
73
- const file = await root.getFileHandle('root file')
74
- const folder = await root.getDirectoryHandle('root folder')
75
- const nestedFile = await folder.getFileHandle('nested file')
76
- const nestedFolder = await folder.getDirectoryHandle('nested folder')
77
-
78
- // Access existing files and folders via their names
79
- const existingFile = await root.getFileHandle('root file')
80
- const existingFolder = await root.getDirectoryHandle('root folder')
81
-
82
- // Deleting a file or folder
83
- await file.remove()
84
- await folder.remove({ recursive: true })
85
-
86
- // Listing the contents of a folder
87
- for await (let [name, handle] of folder) {}
88
- for await (let [name, handle] of folder.entries()) {}
89
- for await (let handle of folder.values()) {}
90
- for await (let name of folder.keys()) {}
91
- ```
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/dist/const.d.ts CHANGED
@@ -1,9 +1,10 @@
1
- import type { FinderAction, FinderEntry, FinderSidebarSection, FinderState, RenderOption, ViewMode } from './types';
1
+ import type { FinderActionKey, FinderEntry, FinderPrefs, FinderSidebarSection, FinderState, ViewMode } from './types';
2
2
  export declare const viewModes: ViewMode[];
3
- export declare const finderActions: FinderAction[];
4
- export declare const initialState: (option: RenderOption) => FinderState;
5
- export declare const sidebarSections: (root: FinderEntry | null) => FinderSidebarSection[];
6
- export declare const ensureMaterialSymbols: () => void;
3
+ export declare const finderActions: {
4
+ key: FinderActionKey;
5
+ label: string;
6
+ }[];
7
+ export declare const sidebarSections: (prefs: FinderPrefs) => FinderSidebarSection[];
7
8
  export declare const iconStyle: {
8
9
  fontSize: string;
9
10
  lineHeight: string;
@@ -16,9 +17,9 @@ export declare const rowIcon: {
16
17
  gap: string;
17
18
  minWidth: string;
18
19
  };
19
- export declare const iconOf: (entry: Pick<FinderEntry, "kind" | "name">) => "folder" | "database" | "article" | "account_tree" | "description";
20
- export declare const badgeIconOf: (entry: FinderEntry) => "" | "delete_sweep" | "auto_awesome" | "lock";
21
- export declare const sidebarIconOf: (name: string) => "folder" | "database" | "article" | "folder_special" | "home_storage" | "sell";
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";
22
23
  export declare const viewModeIconOf: Record<FinderState['viewMode'], string>;
23
24
  export declare const sizeOf: (size: number) => string;
24
25
  export declare const dateOf: (time: number) => string;
@@ -1 +1 @@
1
- {"version":3,"file":"const.d.ts","sourceRoot":"","sources":["../lib/const.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,oBAAoB,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAEnH,eAAO,MAAM,SAAS,EAAE,QAAQ,EAA2C,CAAA;AAC3E,eAAO,MAAM,aAAa,EAAE,YAAY,EAYvC,CAAA;AACD,eAAO,MAAM,YAAY,GAAI,QAAQ,YAAY,KAAG,WASlD,CAAA;AACF,eAAO,MAAM,eAAe,GAAI,MAAM,WAAW,GAAG,IAAI,KAAG,oBAAoB,EAgB9E,CAAA;AAGD,eAAO,MAAM,qBAAqB,YAQjC,CAAA;AACD,eAAO,MAAM,SAAS;;;;;CAA+H,CAAA;AACrJ,eAAO,MAAM,OAAO;;;;;CAA8E,CAAA;AAClG,eAAO,MAAM,MAAM,GAAI,OAAO,IAAI,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC,uEAM/D,CAAA;AACD,eAAO,MAAM,WAAW,GAAI,OAAO,WAAW,kDAK7C,CAAA;AACD,eAAO,MAAM,aAAa,GAAI,MAAM,MAAM,mFASzC,CAAA;AACD,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"}
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"}
@@ -4,4 +4,4 @@ export type ViewerOption = {
4
4
  source?: Window | null;
5
5
  };
6
6
  export declare const openFile: ({ path, file, source }: ViewerOption) => Promise<void | null>;
7
- //# sourceMappingURL=viewer.d.ts.map
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"}
@@ -14,7 +14,7 @@ export type OpfsEntry = {
14
14
  children: OpfsEntry[];
15
15
  };
16
16
  export declare const createOPFS: (option?: OpfsOption) => {
17
- get(path?: string): Promise<any>;
17
+ get(path?: string): Promise<File | OpfsEntry>;
18
18
  create(path: string, kind?: OpfsKind, body?: OpfsBody): Promise<void | FileSystemDirectoryHandle>;
19
19
  put(path: string, body?: OpfsBody): Promise<void>;
20
20
  delete(path: string): Promise<void>;
@@ -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"}
@@ -10,6 +10,7 @@ export declare const crumbs: (path: string) => {
10
10
  export declare const flatten: (entry: FinderEntry | null) => FinderEntry[];
11
11
  export declare const findEntry: (entry: FinderEntry | null, path: string) => FinderEntry | null;
12
12
  export declare const selectedEntry: (entry: FinderEntry | null, id: string) => FinderEntry | null;
13
+ export declare const existingEntries: (entries: Array<FinderEntry | null>) => FinderEntry[];
13
14
  export declare const childrenOf: (entry: FinderEntry | null, path: string) => FinderEntry[];
14
15
  export declare const extensionOf: (name: string) => string;
15
16
  export declare const visibleEntries: (state: FinderState) => FinderEntry[];
@@ -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"}