@vp-tw/dirwell 0.1.0-alpha.1 → 0.1.0-alpha.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @vp-tw/dirwell
2
2
 
3
+ ## 0.1.0-alpha.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Keep the bundled attribution link usable outside a repository checkout and align the API documentation with declared-target symlink navigation.
8
+
9
+ ## 0.1.0-alpha.2
10
+
11
+ ### Patch Changes
12
+
13
+ - Document published-package onboarding, selective build-tool support, troubleshooting, and current alpha release procedures. Lead the README and docs with a working folder-to-website path before advanced configuration.
14
+
3
15
  ## 0.1.0-alpha.1
4
16
 
5
17
  ### Patch Changes
package/README.md CHANGED
@@ -1,183 +1,89 @@
1
1
  # Dirwell
2
2
 
3
- Dirwell turns a directory into a static file explorer. Build files for a static
4
- host, or serve a changing folder locally. Choose SSG for portable output and
5
- MPA when many directory pages should share assets.
3
+ Turn a folder of downloads, reports, or build artifacts into a searchable website.
4
+ Dirwell generates the file list, directory navigation, and links to the original
5
+ files. Publish the output on a static host; visitors do not need a Dirwell server.
6
6
 
7
- ## Quick start
7
+ [Try the live explorer](https://vp-tw.github.io/dirwell/examples/file-icons/) ·
8
+ [Get started](https://vp-tw.github.io/dirwell/getting-started/) ·
9
+ [Documentation](https://vp-tw.github.io/dirwell/overview/)
8
10
 
9
- ```bash
10
- pnpm install
11
- pnpm dirwell serve ./fixture
12
- pnpm dirwell build ./fixture -o ./generated
13
- ```
11
+ ## Browse your first folder
12
+
13
+ You need **Node.js 26 or later**, which includes npm. From a terminal, replace
14
+ `./downloads` with a folder that already exists:
14
15
 
15
- These commands run from a repository checkout. The first starts a watch server;
16
- the second writes a static tree. The installed CLI uses the same `dirwell`
17
- commands. Existing `index.html` and `index.htm` files are preserved; Dirwell
18
- uses `_dirwell.html` for those directories when that name is available.
19
-
20
- | Need | Start with |
21
- | ------------------------------------ | ------------------------------------------- |
22
- | Move the output tree between paths | SSG and relative URLs, the defaults |
23
- | Publish beneath a fixed path | `base` plus `urls: "base"` |
24
- | Share assets across many pages | `mode: "mpa"` |
25
- | Show only selected source files | `include` and `exclude` |
26
- | Change icons or a few UI parts | `createDefaultTheme({ icons, components })` |
27
- | Render basic HTML without JavaScript | `createPlainTheme()` |
28
-
29
- The [configuration guide](./docs/src/content/docs/configuration.md) lists
30
- accepted values, defaults, effects, and use cases for every field.
31
-
32
- ```text
33
- dirwell [directory] # alias for serve
34
- dirwell serve [directory] # watch and live reload
35
- dirwell build [directory] # generate static output
36
- dirwell daemon start [dir] # detached server
37
- dirwell daemon status
38
- dirwell daemon stop
16
+ ```bash
17
+ npx @vp-tw/dirwell@alpha serve ./downloads
39
18
  ```
40
19
 
41
- ## Configuration
20
+ Accept npm's installation prompt on first use. Open the `Local:` URL printed by
21
+ Dirwell. Add or change a file to see the list update. Press Ctrl+C to stop.
22
+ No repository clone or config file is required.
42
23
 
43
- Create `dirwell.config.ts` when a field has no CLI flag or you want a reusable
44
- setup:
24
+ Dirwell is currently **alpha**. Use `@alpha` explicitly; the `latest` npm tag
25
+ remains on the bootstrap alpha and does not select the newest alpha.
45
26
 
46
- ```ts
47
- import { defineConfig } from "@vp-tw/dirwell";
27
+ ## Publish the folder
48
28
 
49
- export default defineConfig({
50
- mode: "mpa",
51
- base: "/downloads/",
52
- urls: "base",
53
- include: ["**/*.md", "assets/**"],
54
- exclude: ["drafts/**"],
55
- });
29
+ ```bash
30
+ npx @vp-tw/dirwell@alpha build ./downloads -o ./site-downloads
56
31
  ```
57
32
 
58
- Run `pnpm dirwell build ./public -o ./dist` to use it. The CLI's positional
59
- directory defaults to `.` and overrides config `root`, so pass the source
60
- path in the command.
61
-
62
- `outputName` accepts a fixed filename or a function receiving `DirectoryData`.
63
- Returning `null` skips the current directory. The default uses `index.html`,
64
- then `_dirwell.html` when an index already exists, then skips if both exist.
65
-
66
- `include` and `exclude` accept root-relative glob patterns. They select mirrored
67
- files, generated directory pages, and search results; exclusions win. With no
68
- patterns, every source entry is included.
33
+ Upload the complete `site-downloads/` directory to a static host. The default
34
+ output uses relative links so it can move between URL paths as one tree. The
35
+ command replaces that output directory; keep unrelated files elsewhere.
36
+ Existing source `index.html` and `index.htm` files are preserved, with the
37
+ explorer written to `_dirwell.html` when that name is free.
69
38
 
70
- URL generation supports portable depth-aware `relative` links, Vite-style
71
- `base` prefixes for deployments such as GitHub Pages, and native
72
- `html-base` documents using `<base href>`.
39
+ The default Ledger theme includes search, sorting, file icons, and keyboard
40
+ navigation. Files open in a new tab; directory navigation stays in the explorer.
41
+ Default output includes the listing in HTML and remains browsable without
42
+ JavaScript. Advanced MPA output can use JavaScript for large directory lists.
73
43
 
74
- ## Output modes
44
+ ## Use it in a project
75
45
 
76
- - `ssg` emits a page and runtime asset in every generated directory. This is
77
- the default and works on simple static hosts.
78
- - `mpa` keeps every directory directly addressable while sharing runtime
79
- assets from the output-root `__dirwell/` directory. The default theme moves
80
- directories over 500 entries into a per-directory data asset and renders only
81
- nearby rows, so these pages require JavaScript.
46
+ Install the package when you need a reusable config, a theme, or a build adapter:
82
47
 
83
- `__dirwell/` is reserved in both modes for generated assets such as broken-link
84
- raw views.
85
-
86
- ## Vite integration
48
+ ```bash
49
+ npm install --save-dev @vp-tw/dirwell@alpha
50
+ ```
87
51
 
88
- The `@vp-tw/dirwell/vite` adapter builds one or more explorers alongside a Vite
89
- application and serves them through Vite's development server:
52
+ Create `dirwell.config.ts` beside your project's `package.json`:
90
53
 
91
54
  ```ts
92
- import { defineConfig } from "vite";
93
- import Dirwell from "@vp-tw/dirwell/vite";
55
+ import { defineConfig } from "@vp-tw/dirwell";
94
56
 
95
57
  export default defineConfig({
96
- plugins: [
97
- Dirwell([
98
- { root: "./docs", outDir: "dist/docs" },
99
- { root: "./downloads", outDir: "dist/downloads", mode: "mpa" },
100
- ]),
101
- ],
58
+ exclude: ["drafts/**"],
102
59
  });
103
60
  ```
104
61
 
105
- By default, Dirwell writes to a dedicated `dirwell/` subdirectory of Vite's
106
- `build.outDir` and derives its public `base` from Vite's base path. Set
107
- `outDir: "dist/downloads"` for another path relative to the Vite project root,
108
- or set an absolute `outDir` for an independent publish directory. An output
109
- outside Vite's build directory needs an explicit public `base`. The adapter
110
- never replaces Vite's output root or an existing directory it does not own.
111
- See [configuration](./docs/src/content/docs/configuration.md#vite-adapter) for
112
- the full path and development-server behavior.
113
-
114
- ## Other build tools
115
-
116
- Adapters are available for Rollup, Rolldown, webpack, Rspack, Rsbuild, esbuild,
117
- Farm, and Bun. Import `@vp-tw/dirwell/<host>` or use the factories from
118
- `@vp-tw/dirwell/unplugin`. Each generates a dedicated explorer path alongside the host
119
- output. See [build tool adapters](./docs/src/content/docs/build-tools.md) for
120
- options, watch behavior, and verification boundaries.
121
-
122
- ## Browser behavior
123
-
124
- SSG pages and smaller MPA pages work without JavaScript. The runtime adds local and global
125
- fuzzy search, type filters, configurable sorting, IME-safe keyboard controls,
126
- Backspace parent navigation, theme persistence, and watch-mode live reload. The
127
- global search index is fetched only after the user opens Search all files and types a query.
128
- The index is split into bounded files; the first 100 best matches render progressively.
129
- Search matches file names, relative paths, and symlink targets. Three independent
130
- type controls filter physical folders, physical files, and symlinks. All are on by
131
- default; any combination is available in the current folder and global search.
132
-
133
- Name sorting supports raw Unicode code-point order, locale-aware comparison,
134
- and natural numeric comparison. Modified time and file size are also available;
135
- direction and directory grouping are independent controls.
136
-
137
- The default theme shows modified times in the viewer's local time zone when
138
- JavaScript is available, without repeating the offset in every row. Activate a
139
- date with touch, pointer, or keyboard to see its exact local time and UTC instant.
140
- Generated HTML displays labeled UTC times before the
141
- runtime loads and when JavaScript is disabled. The plain theme always displays UTC.
142
-
143
- ## Symlinks
144
-
145
- Symlinks always remain visible and show their declared target. Broken links can
146
- open their raw target text; targets outside the configured root remain
147
- unavailable. Broken links, outside-root targets, and cycles receive explicit states.
148
- Following directory links is opt-in. Ancestor cycles remain navigable but are
149
- never expanded recursively.
150
-
151
- ## Themes
152
-
153
- Replace the complete `ExplorerTheme` or layer typed component overrides over
154
- the default theme. See [THEMING.md](./THEMING.md) and the Starlight site in
155
- `docs/`.
156
-
157
- `createPlainTheme()` provides a separate browser-native listing with no
158
- icons, JavaScript, appearance controls, or search index. It emits complete HTML
159
- in both modes; choose the default theme for search and large-directory
160
- virtualization. See [examples/plain](./examples/plain).
161
- Its footer shows the repository, author, and license. Pass `project` to
162
- `createPlainTheme()` to override the metadata and link to a published repository.
163
-
164
- The default theme uses selected self-hosted `vscode-icons` artwork for common
165
- file types. The icons are CC BY-SA 4.0 and may include separately protected
166
- brand marks; Dirwell's code remains MIT-licensed. See
167
- [Ledger theme attribution](./src/theme-default/README.md),
168
- [third-party notices](./THIRD_PARTY_NOTICES.md), and the
169
- [file-icons example](./examples/file-icons).
170
-
171
- ## Development
62
+ Run `npx dirwell build ./downloads -o ./site-downloads`. Pass the source folder
63
+ explicitly: the CLI defaults to the current directory even if config sets `root`.
64
+ Pin your tested version when you need reproducible alpha builds.
172
65
 
173
- ```bash
174
- pnpm install
175
- pnpm test
176
- pnpm exec playwright install chromium --only-shell
177
- pnpm test:browser
178
- pnpm run check
179
- pnpm run build
180
- pnpm run docs:build
181
- ```
66
+ ## Choose your next step
67
+
68
+ | Need | Read |
69
+ | ---------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
70
+ | Publish under a fixed path, such as GitHub Pages | [Deployment](https://vp-tw.github.io/dirwell/deployment/) |
71
+ | Select files, change output names, or configure URLs | [Configuration](https://vp-tw.github.io/dirwell/configuration/) |
72
+ | Change the interface or use a no-script listing | [Themes](https://vp-tw.github.io/dirwell/themes/) |
73
+ | Generate alongside an existing application | [Build tool adapters](https://vp-tw.github.io/dirwell/build-tools/) |
74
+ | Check supported integrations and limitations | [Support policy](https://vp-tw.github.io/dirwell/support/) |
75
+ | Call Dirwell from Node.js or write a theme package | [API reference](https://vp-tw.github.io/dirwell/api-reference/) · [Theme contract](./THEME_PACKAGE_CONTRACT.md) |
76
+ | Resolve setup, output, or link problems | [Troubleshooting](https://vp-tw.github.io/dirwell/troubleshooting/) |
77
+
78
+ Build-tool support is selective. Vite, Rollup, and webpack are the primary
79
+ integrations; the other existing adapters are experimental. Unplugin supplies
80
+ shared plugin interfaces, not a promise that every tool or website framework
81
+ has identical behavior. See the support policy before choosing an adapter.
82
+
83
+ ## Contribute
84
+
85
+ For repository setup, tests, examples, architecture, and release instructions,
86
+ see [Contributing](https://github.com/vp-tw/dirwell/blob/main/CONTRIBUTING.md).
182
87
 
183
- Dirwell is MIT licensed.
88
+ Dirwell's code is MIT licensed. Ledger's bundled file icons have separate
89
+ attribution and license terms in [third-party notices](./THIRD_PARTY_NOTICES.md).
@@ -5,9 +5,9 @@ An independent theme package exports a factory returning `ExplorerTheme` from
5
5
  renderer replacement is the smallest contract: the package owns its HTML,
6
6
  styles, assets, options, language controls, and browser behavior.
7
7
 
8
- The [external package example](examples/theme-package) exercises this boundary
8
+ The [external package example](https://github.com/vp-tw/dirwell/tree/main/examples/theme-package) exercises this boundary
9
9
  from packed distributions rather than repository source aliases. The
10
- [i18n example](examples/i18n) separately demonstrates theme-owned localization.
10
+ [i18n example](https://github.com/vp-tw/dirwell/tree/main/examples/i18n) separately demonstrates theme-owned localization.
11
11
 
12
12
  ## Public surface
13
13
 
@@ -60,5 +60,5 @@ selected alpha version.
60
60
  `pnpm verify:package` packs Dirwell and this private theme separately, installs
61
61
  them into a fresh project, and exercises their public imports. It verifies the
62
62
  CLI, an external renderer with SSG/MPA assets and encoded names, public types,
63
- and a real Rollup build. Successful local tarball consumption does not prove npm
63
+ a real Rollup build, and an async CommonJS webpack build. Successful local tarball consumption does not prove npm
64
64
  publication or a registry install; release readback must verify those separately.
package/THEMING.md CHANGED
@@ -9,7 +9,7 @@ behavior. Choose one of three paths:
9
9
  | Publish a basic no-script list | `createPlainTheme()` | Prepared entries and safe links |
10
10
  | Replace the full page | An `ExplorerTheme` with `render(context)` | Prepared entries and safe links |
11
11
 
12
- The [theme guide](docs/src/content/docs/themes.md) lists every default-theme
12
+ The [theme guide](https://vp-tw.github.io/dirwell/themes/) lists every default-theme
13
13
  option, its accepted input, default, result, and use case. This file describes
14
14
  the component contract for theme authors.
15
15
 
@@ -46,20 +46,20 @@ export default defineConfig({
46
46
  ```
47
47
 
48
48
  Global search is progressive: the browser requests the generated JSON index
49
- only after the user selects `Everywhere`. Sorting and search controls can be
49
+ only after the user opens Search all files and types a query. Sorting and search controls can be
50
50
  disabled independently without changing the component override API.
51
51
 
52
52
  Replacing `EntryList` or `EntryRow` disables the default MPA virtual list.
53
53
  Keep those defaults for large directories unless the replacement provides its
54
54
  own row loading. `virtualizeAfter` defaults to 500 entries.
55
55
 
56
- Within the bundled theme, the five select controls share a private renderer,
56
+ Within the bundled theme, select controls share a private renderer,
57
57
  and `--dw-control-height` gives search, select, sort, and color-scheme controls
58
58
  one height. This is a default-theme styling hook, not a requirement for custom
59
59
  themes. The controls keep their native `input`, `select`, `details`, and
60
60
  `fieldset` semantics; override `Toolbar` to replace their markup.
61
61
 
62
- The bundled explorer has its own [design specification](src/theme-default/DESIGN.md)
62
+ The bundled explorer has its own [design specification](https://github.com/vp-tw/dirwell/blob/main/src/theme-default/DESIGN.md)
63
63
  beside its components and styles. The repository-root `DESIGN.md` describes the
64
64
  official site; neither document constrains third-party themes.
65
65
 
@@ -73,8 +73,8 @@ Escape untrusted file names with the exported `escapeHtml` helper.
73
73
 
74
74
  The full `ExplorerTheme` contract can host a Svelte, Astro, React, or other SSR
75
75
  adapter that returns a complete HTML string and optional assets. The
76
- [`custom-theme`](examples/custom-theme) example builds a release catalog with
77
- its own HTML and CSS. The [`default-theme-override`](examples/default-theme-override)
76
+ [`custom-theme`](https://github.com/vp-tw/dirwell/tree/main/examples/custom-theme) example builds a release catalog with
77
+ its own HTML and CSS. The [`default-theme-override`](https://github.com/vp-tw/dirwell/tree/main/examples/default-theme-override)
78
78
  example keeps the default explorer and changes components, Catppuccin colors,
79
79
  and file icons. `createDefaultTheme({ icons })` accepts light and optional dark
80
80
  SVG sets, including fallbacks and extension mappings. Dirwell uses the same icon
@@ -85,4 +85,4 @@ set for static, global-search, and virtualized rows.
85
85
  An external package can return `ExplorerTheme` through its own factory and own
86
86
  its HTML, assets, styles, options, and localization. Pin the tested Dirwell alpha
87
87
  in its peer dependency. See [the package contract](THEME_PACKAGE_CONTRACT.md)
88
- and [the separately packed example](examples/theme-package).
88
+ and [the separately packed example](https://github.com/vp-tw/dirwell/tree/main/examples/theme-package).
@@ -10,5 +10,5 @@ their respective owners. No endorsement is implied.
10
10
  The exact icon list is in [`dist/vscode-icons/NOTICE.txt`](./dist/vscode-icons/NOTICE.txt)
11
11
  in the published package, and in `src/vscode-icons/NOTICE.txt` in the source tree.
12
12
  Generated sites include this notice as `vscode-icons-NOTICE.txt`. The default
13
- theme footer links to the [Ledger theme README](./src/theme-default/README.md),
13
+ theme footer links to the [Ledger theme README](https://github.com/vp-tw/dirwell/blob/main/src/theme-default/README.md),
14
14
  which links to the source notice.
package/dist/bin.mjs CHANGED
@@ -97,7 +97,7 @@ async function stopDaemon(cwd) {
97
97
  }
98
98
  //#endregion
99
99
  //#region package.json
100
- var version = "0.1.0-alpha.1";
100
+ var version = "0.1.0-alpha.3";
101
101
  //#endregion
102
102
  //#region src/cli.ts
103
103
  const commonArguments = {
package/dist/bun.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { n as DirwellPluginOptions, t as DirwellPluginInput } from "./unplugin-CKRUCTgW.mjs";
1
+ import { n as DirwellPluginOptions, t as DirwellPluginInput } from "./unplugin-BEWhmsTM.mjs";
2
2
  import { UnpluginInstance } from "unplugin";
3
3
  //#region src/bun.d.ts
4
4
  declare const plugin: UnpluginInstance<DirwellPluginInput, true>["bun"];
package/dist/bun.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { t as unplugin } from "./unplugin-p6AXhL4F.mjs";
1
+ import { t as unplugin } from "./unplugin-3KZVc7em.mjs";
2
2
  //#region src/bun.ts
3
3
  const plugin = unplugin.bun;
4
4
  //#endregion
@@ -1,4 +1,4 @@
1
- import { p as SortOptions, r as ExplorerTheme, s as GenerateOptions } from "./model-CWjYM17j.mjs";
1
+ import { p as SortOptions, r as ExplorerTheme, s as GenerateOptions } from "./model-D5PPrgIs.mjs";
2
2
  //#region src/config.d.ts
3
3
  interface DirwellConfig {
4
4
  readonly base?: string;
@@ -31,4 +31,4 @@ declare function loadDirwellConfig(cwd: string, command: DirwellConfigContext["c
31
31
  declare function resolveGenerateOptions(cwd: string, config: DirwellConfig, overrides?: Partial<Pick<DirwellConfig, "base" | "mode" | "outDir" | "root" | "urls">>): GenerateOptions;
32
32
  //#endregion
33
33
  export { loadDirwellConfig as a, defineConfig as i, DirwellConfigContext as n, resolveGenerateOptions as o, DirwellConfigInput as r, DirwellConfig as t };
34
- //# sourceMappingURL=config-BJG2Zc3Q.d.mts.map
34
+ //# sourceMappingURL=config-CJutlaP0.d.mts.map
@@ -1,4 +1,4 @@
1
- import { n as DirwellPluginOptions, t as DirwellPluginInput } from "./unplugin-CKRUCTgW.mjs";
1
+ import { n as DirwellPluginOptions, t as DirwellPluginInput } from "./unplugin-BEWhmsTM.mjs";
2
2
  import { UnpluginInstance } from "unplugin";
3
3
  //#region src/esbuild.d.ts
4
4
  declare const plugin: UnpluginInstance<DirwellPluginInput, true>["esbuild"];
package/dist/esbuild.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { t as unplugin } from "./unplugin-p6AXhL4F.mjs";
1
+ import { t as unplugin } from "./unplugin-3KZVc7em.mjs";
2
2
  //#region src/esbuild.ts
3
3
  const plugin = unplugin.esbuild;
4
4
  //#endregion
package/dist/farm.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { n as DirwellPluginOptions, t as DirwellPluginInput } from "./unplugin-CKRUCTgW.mjs";
1
+ import { n as DirwellPluginOptions, t as DirwellPluginInput } from "./unplugin-BEWhmsTM.mjs";
2
2
  import { UnpluginInstance } from "unplugin";
3
3
  //#region src/farm.d.ts
4
4
  declare const plugin: UnpluginInstance<DirwellPluginInput, true>["farm"];
package/dist/farm.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { t as unplugin } from "./unplugin-p6AXhL4F.mjs";
1
+ import { t as unplugin } from "./unplugin-3KZVc7em.mjs";
2
2
  //#region src/farm.ts
3
3
  const plugin = unplugin.farm;
4
4
  //#endregion