@dirwell/theme-ledger 0.0.1-alpha.1 → 0.0.2
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.md +34 -2
- package/dist/client.js +27 -28
- package/dist/index.d.mts +4 -3
- package/dist/index.mjs +626 -83
- package/dist/index.mjs.map +1 -1
- package/dist/model-BgCmoksr.d.mts +167 -0
- package/dist/model.d.mts +1 -1
- package/dist/source/Ledger.svelte +493 -156
- package/dist/source/component.d.mts +1 -1
- package/dist/source/shared/customization.mjs +255 -0
- package/dist/source/shared/live-search.mjs +28 -0
- package/dist/source/shared/navigation.mjs +197 -2
- package/dist/source/shared/view-state.mjs +128 -0
- package/dist/styles.css +6 -0
- package/package.json +7 -3
- package/dist/model-K7UzS9YB.d.mts +0 -46
package/README.md
CHANGED
|
@@ -1,10 +1,36 @@
|
|
|
1
1
|
# @dirwell/theme-ledger
|
|
2
2
|
|
|
3
|
+
Searchable Svelte directory listings with sorting, keyboard selection and row virtualization.
|
|
4
|
+
|
|
5
|
+
Requires Node.js 22.12 or newer. Install the first stable family:
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
npm install @dirwell/core@0.0.2 @dirwell/theme-ledger@0.0.2
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Create `files/note.txt`, save this as `build.mjs`, then run `node build.mjs`:
|
|
12
|
+
|
|
13
|
+
```js
|
|
14
|
+
import { generateExplorer } from "@dirwell/core";
|
|
15
|
+
import { createLedgerTheme } from "@dirwell/theme-ledger";
|
|
16
|
+
await generateExplorer({
|
|
17
|
+
sourceDir: "./files",
|
|
18
|
+
outputDir: "./generated",
|
|
19
|
+
theme: createLedgerTheme({ title: "Sample downloads" }),
|
|
20
|
+
});
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Serve the complete `generated` folder over HTTP and open its root. Native links/pagination remain usable without JavaScript.
|
|
24
|
+
|
|
25
|
+
Version `0.0.1` adds shared `language`, `direction`, `locale`, `timeZone`, partial `labels`, `brand`, `columns` and `cssVariables`. Opt-in `copy-link`, `copy-path` and `download` actions live outside the primary row link; source wrappers have a separate `actions` region. See [theme configuration](https://vp-tw.github.io/dirwell/themes/) and [the public annotation example](https://github.com/vp-tw/dirwell/tree/main/examples/release-downloads). Official themes do not embed media previews.
|
|
26
|
+
|
|
27
|
+
## Implementation and advanced use
|
|
28
|
+
|
|
3
29
|
Svelte owns the server markup, client state, keyed rows, search, sorting, dialogs, navigation and cleanup. No framework-neutral serialized UI tree or imperative theme controller is used.
|
|
4
30
|
|
|
5
31
|
Use `createLedgerTheme({ title: "Sample downloads" })` with `@dirwell/core` and an explicit listing policy. Paged HTML preserves native links without JavaScript. The browser loads and validates the complete compact listing before enabling directory-wide search and sorting; directories exceeding 500 visible rows use measured row virtualization. Folder snapshots resolve navigation URLs before updating History.
|
|
6
32
|
|
|
7
|
-
The
|
|
33
|
+
The theme includes directory type filtering, fuzzy search, name/size/modified sorting, natural/locale/Unicode names, color schemes, timestamp details, archive search, and keyboard selection. File URLs use native navigation and pagination.
|
|
8
34
|
|
|
9
35
|
The package contains a separately compiled classic browser script and Node server renderer. Svelte is a dependency of this theme, not core or Plain. No Open Graph image implementation is bundled.
|
|
10
36
|
|
|
@@ -14,4 +40,10 @@ Import the official component from this package's `/source` entry and model/row
|
|
|
14
40
|
types from `/model`. Use `@dirwell/theme-authoring` to compile the same wrapper
|
|
15
41
|
for SSR and client, or its `/dev` entry for trusted local HMR. Header, row content
|
|
16
42
|
and footer are customizable; official navigation and interaction ownership is
|
|
17
|
-
retained. See [the authoring guide](
|
|
43
|
+
retained. See [the authoring guide](https://vp-tw.github.io/dirwell/themes/#source-component-customization).
|
|
44
|
+
|
|
45
|
+
Stable shares directory query/sort/type controls through URL parameters and restores per-entry History selection/scroll. Failed navigation retains the previous view and offers retry/native navigation. See [view behavior](https://vp-tw.github.io/dirwell/themes/#returning-to-a-view-upcoming-stable).
|
|
46
|
+
|
|
47
|
+
The 0.0.x API may evolve. Pin your qualified version and upgrade the official family together. See [support and verification](https://vp-tw.github.io/dirwell/support/) for host, browser and device boundaries.
|
|
48
|
+
|
|
49
|
+
Version 0.0.2 also uses an opt-in Server `search` query endpoint for live archive search. The archive dialog remains separate from current-directory filtering; `archiveSearch: false` hides both static and live archive controls. Open live dialogs refresh every two seconds by default, with request cancellation and retry states. See the Server package for scan budgets and authorization boundaries.
|