@webappwiz/arbor 0.0.28 → 0.0.30
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/AGENTS.md +7 -0
- package/README.md +34 -12
- package/add.test.ts +125 -0
- package/add.ts +192 -0
- package/age.ts +11 -0
- package/arbor.test.ts +145 -0
- package/arbor.ts +429 -0
- package/assets.d.ts +9 -0
- package/attachments.ts +87 -0
- package/build.ts +98 -0
- package/claim.test.ts +89 -0
- package/claim.ts +73 -0
- package/components.json +21 -0
- package/config.ts +58 -0
- package/dev/api.ts +120 -0
- package/dev/app.test.tsx +645 -0
- package/dev/app.tsx +80 -0
- package/dev/assets.ts +16 -0
- package/dev/build/main.txt +68 -0
- package/dev/build/shell.txt +21 -0
- package/dev/build/styles.txt +2263 -0
- package/dev/components/ui/badge.tsx +51 -0
- package/dev/components/ui/button.tsx +57 -0
- package/dev/components/ui/dialog.tsx +154 -0
- package/dev/components/ui/empty.tsx +100 -0
- package/dev/components/ui/input-group.tsx +155 -0
- package/dev/components/ui/input.tsx +19 -0
- package/dev/components/ui/progress.tsx +80 -0
- package/dev/components/ui/textarea.tsx +17 -0
- package/dev/components/ui/toast.tsx +227 -0
- package/dev/feed.ts +69 -0
- package/dev/files.tsx +191 -0
- package/dev/index.html +21 -0
- package/dev/lib/utils.ts +7 -0
- package/dev/main.tsx +22 -0
- package/dev/markdown.test.tsx +133 -0
- package/dev/markdown.tsx +124 -0
- package/dev/mentions.tsx +319 -0
- package/dev/shadcn.css +649 -0
- package/dev/styles.css +107 -0
- package/dev/tags.tsx +44 -0
- package/dev/tasks.tsx +151 -0
- package/dev/todos.tsx +759 -0
- package/dev.test.ts +439 -0
- package/dev.ts +386 -0
- package/e2e.test.ts +256 -0
- package/escalate.test.ts +76 -0
- package/escalate.ts +112 -0
- package/exit.test.ts +71 -0
- package/exit.ts +74 -0
- package/git.ts +294 -0
- package/index.ts +9 -0
- package/journal.ts +89 -0
- package/list.test.ts +82 -0
- package/list.ts +137 -0
- package/load-config.test.ts +121 -0
- package/load-config.ts +62 -0
- package/log.test.ts +65 -0
- package/log.ts +40 -0
- package/merge.test.ts +332 -0
- package/merge.ts +283 -0
- package/package.json +32 -15
- package/path.test.ts +35 -0
- package/path.ts +38 -0
- package/plan.test.ts +318 -0
- package/plan.ts +302 -0
- package/progress.test.ts +54 -0
- package/progress.ts +31 -0
- package/remove.test.ts +68 -0
- package/remove.ts +88 -0
- package/repository.ts +83 -0
- package/retry.test.ts +43 -0
- package/retry.ts +48 -0
- package/shell.ts +44 -0
- package/show.test.ts +91 -0
- package/show.ts +151 -0
- package/snapshot.test.ts +33 -0
- package/snapshot.ts +84 -0
- package/table.ts +20 -0
- package/testing.ts +229 -0
- package/todo.test.ts +490 -0
- package/todo.ts +834 -0
- package/wait.test.ts +61 -0
- package/wait.ts +77 -0
- package/worktree-service.test.ts +158 -0
- package/worktree-service.ts +193 -0
- package/worktree.ts +239 -0
- package/add.d.ts +0 -23
- package/age.d.ts +0 -2
- package/arbor.d.ts +0 -11
- package/attachments.d.ts +0 -36
- package/claim.d.ts +0 -11
- package/config.d.ts +0 -55
- package/config.js +0 -7
- package/dev/assets.d.ts +0 -11
- package/dev.d.ts +0 -47
- package/escalate.d.ts +0 -28
- package/exit.d.ts +0 -42
- package/git.d.ts +0 -77
- package/index.d.ts +0 -2
- package/index.js +0 -4669
- package/journal.d.ts +0 -29
- package/list.d.ts +0 -18
- package/load-config.d.ts +0 -15
- package/log.d.ts +0 -14
- package/merge.d.ts +0 -24
- package/path.d.ts +0 -13
- package/plan.d.ts +0 -83
- package/remove.d.ts +0 -19
- package/repository.d.ts +0 -25
- package/retry.d.ts +0 -17
- package/shell.d.ts +0 -17
- package/show.d.ts +0 -53
- package/snapshot.d.ts +0 -31
- package/table.d.ts +0 -5
- package/todo.d.ts +0 -230
- package/wait.d.ts +0 -22
- package/worktree-service.d.ts +0 -51
- package/worktree.d.ts +0 -95
package/dev/app.tsx
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { useDisposerEffect, useReactive } from "@webappwiz/react";
|
|
2
|
+
import { type JSX, useEffect, useState } from "react";
|
|
3
|
+
import { Toaster } from "#dev/components/ui/toast.tsx";
|
|
4
|
+
import { Feed } from "./feed";
|
|
5
|
+
import { Tasks } from "./tasks";
|
|
6
|
+
import { Todos } from "./todos";
|
|
7
|
+
|
|
8
|
+
export function App(): JSX.Element {
|
|
9
|
+
// One Feed for as long as this component lives. `useReactive` subscribes to
|
|
10
|
+
// the source it saw on its first render, so an instance that got rebuilt
|
|
11
|
+
// would leave the page listening to the one it replaced, showing nothing.
|
|
12
|
+
const [feed] = useState(() => new Feed());
|
|
13
|
+
useDisposerEffect(
|
|
14
|
+
(disposer) => {
|
|
15
|
+
feed.start();
|
|
16
|
+
disposer.use(feed);
|
|
17
|
+
},
|
|
18
|
+
[feed],
|
|
19
|
+
);
|
|
20
|
+
const { snapshot, offline } = useReactive(
|
|
21
|
+
feed,
|
|
22
|
+
(feed) => ({ snapshot: feed.snapshot, offline: feed.offline }),
|
|
23
|
+
["changed"],
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
useEffect(() => {
|
|
27
|
+
document.title = snapshot?.repo ?? "arbor";
|
|
28
|
+
}, [snapshot?.repo]);
|
|
29
|
+
|
|
30
|
+
return (
|
|
31
|
+
<Toaster>
|
|
32
|
+
<main className="mx-auto flex min-h-dvh max-w-xl flex-col gap-8 px-4 py-6">
|
|
33
|
+
<header className="flex items-center justify-between">
|
|
34
|
+
<div className="flex min-w-0 items-baseline gap-2">
|
|
35
|
+
<h1 className="shrink-0 font-medium text-sm">
|
|
36
|
+
{snapshot?.repo ?? "arbor"}
|
|
37
|
+
</h1>
|
|
38
|
+
{snapshot && (
|
|
39
|
+
<span className="min-w-0 truncate text-muted-foreground text-xs">
|
|
40
|
+
{snapshot.path}
|
|
41
|
+
</span>
|
|
42
|
+
)}
|
|
43
|
+
</div>
|
|
44
|
+
{/* Silent while connected, which is the normal case. Once the server
|
|
45
|
+
stops answering, the page says so, since what it shows may no
|
|
46
|
+
longer be true. */}
|
|
47
|
+
{offline && (
|
|
48
|
+
<span role="status" className="shrink-0 text-destructive text-xs">
|
|
49
|
+
Offline: is `arbor dev` still running?
|
|
50
|
+
</span>
|
|
51
|
+
)}
|
|
52
|
+
</header>
|
|
53
|
+
{/* Tasks first: there are only ever a few, and they are what is moving
|
|
54
|
+
right now. The todos below are what comes after. */}
|
|
55
|
+
{snapshot === null ? null : (
|
|
56
|
+
<>
|
|
57
|
+
<section aria-labelledby="tasks" className="flex flex-col gap-2">
|
|
58
|
+
<h2
|
|
59
|
+
id="tasks"
|
|
60
|
+
className="font-medium text-muted-foreground text-xs"
|
|
61
|
+
>
|
|
62
|
+
Tasks
|
|
63
|
+
</h2>
|
|
64
|
+
<Tasks tasks={snapshot.tasks} />
|
|
65
|
+
</section>
|
|
66
|
+
<section aria-labelledby="todos" className="flex flex-col gap-2">
|
|
67
|
+
<h2
|
|
68
|
+
id="todos"
|
|
69
|
+
className="font-medium text-muted-foreground text-xs"
|
|
70
|
+
>
|
|
71
|
+
Todos
|
|
72
|
+
</h2>
|
|
73
|
+
<Todos snapshot={snapshot} />
|
|
74
|
+
</section>
|
|
75
|
+
</>
|
|
76
|
+
)}
|
|
77
|
+
</main>
|
|
78
|
+
</Toaster>
|
|
79
|
+
);
|
|
80
|
+
}
|
package/dev/assets.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import script from "./build/main.txt" with { type: "text" };
|
|
2
|
+
import shell from "./build/shell.txt" with { type: "text" };
|
|
3
|
+
import styles from "./build/styles.txt" with { type: "text" };
|
|
4
|
+
|
|
5
|
+
/** The three files the browser asks for, as the server hands them over. */
|
|
6
|
+
export interface Assets {
|
|
7
|
+
/** The page, which asks for the other two. */
|
|
8
|
+
shell: string;
|
|
9
|
+
/** The React app, bundled for the browser. */
|
|
10
|
+
script: string;
|
|
11
|
+
/** The stylesheet, with Tailwind already compiled. */
|
|
12
|
+
styles: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/** The page this package ships. Serve each field's contents as-is. */
|
|
16
|
+
export const assets: Assets = { shell, script, styles };
|