@shivaedev/work-board 0.3.0 → 0.4.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/CHANGELOG.md +27 -0
- package/README.md +70 -11
- package/dist/attention/overviewHtml.d.ts +3 -0
- package/dist/attention/overviewHtml.d.ts.map +1 -0
- package/dist/attention/overviewHtml.js +41 -0
- package/dist/attention/overviewHtml.js.map +1 -0
- package/dist/attention/requests.d.ts +24 -0
- package/dist/attention/requests.d.ts.map +1 -0
- package/dist/attention/requests.js +40 -0
- package/dist/attention/requests.js.map +1 -0
- package/dist/attention/style.d.ts +2 -0
- package/dist/attention/style.d.ts.map +1 -0
- package/dist/attention/style.js +10 -0
- package/dist/attention/style.js.map +1 -0
- package/dist/board.d.ts.map +1 -1
- package/dist/board.js +6 -1
- package/dist/board.js.map +1 -1
- package/dist/cli.js +1 -1
- package/dist/files/changes.d.ts.map +1 -1
- package/dist/files/changes.js +4 -9
- package/dist/files/changes.js.map +1 -1
- package/dist/files/home.d.ts.map +1 -1
- package/dist/files/home.js +4 -0
- package/dist/files/home.js.map +1 -1
- package/dist/files/list.d.ts +7 -0
- package/dist/files/list.d.ts.map +1 -1
- package/dist/files/list.js +23 -13
- package/dist/files/list.js.map +1 -1
- package/dist/files/markdownPath.d.ts +3 -0
- package/dist/files/markdownPath.d.ts.map +1 -0
- package/dist/files/markdownPath.js +31 -0
- package/dist/files/markdownPath.js.map +1 -0
- package/dist/files/watchDirectories.d.ts +9 -0
- package/dist/files/watchDirectories.d.ts.map +1 -0
- package/dist/files/watchDirectories.js +33 -0
- package/dist/files/watchDirectories.js.map +1 -0
- package/dist/history/baseline.d.ts +19 -0
- package/dist/history/baseline.d.ts.map +1 -0
- package/dist/history/baseline.js +40 -0
- package/dist/history/baseline.js.map +1 -0
- package/dist/history/compare.d.ts +14 -0
- package/dist/history/compare.d.ts.map +1 -0
- package/dist/history/compare.js +47 -0
- package/dist/history/compare.js.map +1 -0
- package/dist/history/documents.d.ts +10 -0
- package/dist/history/documents.d.ts.map +1 -0
- package/dist/history/documents.js +15 -0
- package/dist/history/documents.js.map +1 -0
- package/dist/history/fields.d.ts +3 -0
- package/dist/history/fields.d.ts.map +1 -0
- package/dist/history/fields.js +27 -0
- package/dist/history/fields.js.map +1 -0
- package/dist/history/html.d.ts +4 -0
- package/dist/history/html.d.ts.map +1 -0
- package/dist/history/html.js +22 -0
- package/dist/history/html.js.map +1 -0
- package/dist/history/limits.d.ts +3 -0
- package/dist/history/limits.d.ts.map +1 -0
- package/dist/history/limits.js +3 -0
- package/dist/history/limits.js.map +1 -0
- package/dist/history/response.d.ts +4 -0
- package/dist/history/response.d.ts.map +1 -0
- package/dist/history/response.js +20 -0
- package/dist/history/response.js.map +1 -0
- package/dist/history/schema.d.ts +24 -0
- package/dist/history/schema.d.ts.map +1 -0
- package/dist/history/schema.js +19 -0
- package/dist/history/schema.js.map +1 -0
- package/dist/history/script.d.ts +2 -0
- package/dist/history/script.d.ts.map +1 -0
- package/dist/history/script.js +113 -0
- package/dist/history/script.js.map +1 -0
- package/dist/http/assets.d.ts.map +1 -1
- package/dist/http/assets.js +2 -0
- package/dist/http/assets.js.map +1 -1
- package/dist/http/history.d.ts +7 -0
- package/dist/http/history.d.ts.map +1 -0
- package/dist/http/history.js +45 -0
- package/dist/http/history.js.map +1 -0
- package/dist/http/overview.d.ts +5 -0
- package/dist/http/overview.d.ts.map +1 -0
- package/dist/http/overview.js +13 -0
- package/dist/http/overview.js.map +1 -0
- package/dist/http/page.d.ts +2 -2
- package/dist/http/page.d.ts.map +1 -1
- package/dist/http/page.js +5 -6
- package/dist/http/page.js.map +1 -1
- package/dist/metadata/attentionProblems.d.ts +4 -0
- package/dist/metadata/attentionProblems.d.ts.map +1 -0
- package/dist/metadata/attentionProblems.js +16 -0
- package/dist/metadata/attentionProblems.js.map +1 -0
- package/dist/metadata/backlinks.d.ts.map +1 -1
- package/dist/metadata/backlinks.js +5 -0
- package/dist/metadata/backlinks.js.map +1 -1
- package/dist/metadata/fields.d.ts +8 -0
- package/dist/metadata/fields.d.ts.map +1 -1
- package/dist/metadata/problems.d.ts.map +1 -1
- package/dist/metadata/problems.js +3 -1
- package/dist/metadata/problems.js.map +1 -1
- package/dist/metadata/relationshipLabel.d.ts.map +1 -1
- package/dist/metadata/relationshipLabel.js +1 -0
- package/dist/metadata/relationshipLabel.js.map +1 -1
- package/dist/metadata/schema.d.ts +10 -0
- package/dist/metadata/schema.d.ts.map +1 -1
- package/dist/metadata/schema.js +9 -0
- package/dist/metadata/schema.js.map +1 -1
- package/dist/page/attentionDetails.d.ts +4 -0
- package/dist/page/attentionDetails.d.ts.map +1 -0
- package/dist/page/attentionDetails.js +13 -0
- package/dist/page/attentionDetails.js.map +1 -0
- package/dist/page/client.d.ts +1 -1
- package/dist/page/client.d.ts.map +1 -1
- package/dist/page/client.js +1 -0
- package/dist/page/client.js.map +1 -1
- package/dist/page/metadataDetails.d.ts.map +1 -1
- package/dist/page/metadataDetails.js +2 -0
- package/dist/page/metadataDetails.js.map +1 -1
- package/dist/page/navigationScript.js +1 -1
- package/dist/page/shell.d.ts +1 -1
- package/dist/page/shell.d.ts.map +1 -1
- package/dist/page/shell.js +2 -2
- package/dist/page/shell.js.map +1 -1
- package/dist/page/stateScript.d.ts.map +1 -1
- package/dist/page/stateScript.js +6 -0
- package/dist/page/stateScript.js.map +1 -1
- package/dist/page/style.d.ts.map +1 -1
- package/dist/page/style.js +2 -1
- package/dist/page/style.js.map +1 -1
- package/dist/search/attentionEntries.d.ts +4 -0
- package/dist/search/attentionEntries.d.ts.map +1 -0
- package/dist/search/attentionEntries.js +20 -0
- package/dist/search/attentionEntries.js.map +1 -0
- package/dist/search/metadataEntries.d.ts.map +1 -1
- package/dist/search/metadataEntries.js +2 -0
- package/dist/search/metadataEntries.js.map +1 -1
- package/dist/search/snapshot.d.ts +2 -2
- package/dist/search/snapshot.d.ts.map +1 -1
- package/dist/search/snapshot.js +4 -5
- package/dist/search/snapshot.js.map +1 -1
- package/package.json +5 -4
- package/src/attention/overviewHtml.ts +44 -0
- package/src/attention/requests.ts +64 -0
- package/src/attention/style.ts +9 -0
- package/src/board.ts +7 -2
- package/src/cli.ts +1 -1
- package/src/files/changes.ts +4 -16
- package/src/files/home.ts +4 -0
- package/src/files/list.ts +25 -14
- package/src/files/markdownPath.ts +31 -0
- package/src/files/watchDirectories.ts +60 -0
- package/src/history/baseline.ts +43 -0
- package/src/history/compare.ts +54 -0
- package/src/history/documents.ts +21 -0
- package/src/history/fields.ts +32 -0
- package/src/history/html.ts +23 -0
- package/src/history/limits.ts +2 -0
- package/src/history/response.ts +23 -0
- package/src/history/schema.ts +36 -0
- package/src/history/script.ts +112 -0
- package/src/http/assets.ts +2 -0
- package/src/http/history.ts +50 -0
- package/src/http/overview.ts +19 -0
- package/src/http/page.ts +6 -6
- package/src/metadata/attentionProblems.ts +18 -0
- package/src/metadata/backlinks.ts +7 -0
- package/src/metadata/problems.ts +5 -1
- package/src/metadata/relationshipLabel.ts +1 -0
- package/src/metadata/schema.ts +9 -0
- package/src/page/attentionDetails.ts +18 -0
- package/src/page/client.ts +1 -0
- package/src/page/metadataDetails.ts +2 -0
- package/src/page/navigationScript.ts +1 -1
- package/src/page/shell.ts +11 -3
- package/src/page/stateScript.ts +6 -0
- package/src/page/style.ts +2 -1
- package/src/search/attentionEntries.ts +22 -0
- package/src/search/metadataEntries.ts +2 -0
- package/src/search/snapshot.ts +4 -5
package/src/page/style.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { attentionStyle } from "#attention/style.ts";
|
|
1
2
|
import { workStyle } from "#views/workStyle.ts";
|
|
2
3
|
import { metadataStyles } from "./metadata.ts";
|
|
3
4
|
import { readingStyles } from "./readingStyles.ts";
|
|
@@ -55,4 +56,4 @@ figure.diagram[data-state="failed"]::after { content: attr(data-error); color: v
|
|
|
55
56
|
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
|
|
56
57
|
`;
|
|
57
58
|
|
|
58
|
-
export const style = theme + layout + prose + board + diagrams + readingStyles() + searchStyles + metadataStyles + workStyle();
|
|
59
|
+
export const style = theme + layout + prose + board + diagrams + readingStyles() + searchStyles + metadataStyles + workStyle() + attentionStyle();
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { MetadataDocument } from "#metadata/model.ts";
|
|
2
|
+
import type { Entry } from "./entries.ts";
|
|
3
|
+
|
|
4
|
+
export function attentionEntries(document: MetadataDocument, href: string): readonly Entry[] {
|
|
5
|
+
const requests = document.parsed.fields.attention ?? [];
|
|
6
|
+
return requests.flatMap((request, index) => {
|
|
7
|
+
if (requests.filter((other) => other.id === request.id).length !== 1) {
|
|
8
|
+
return [];
|
|
9
|
+
}
|
|
10
|
+
const line = document.parsed.lines[`attention.${index}`] ?? document.parsed.lines.attention;
|
|
11
|
+
return [
|
|
12
|
+
{
|
|
13
|
+
file: document.file,
|
|
14
|
+
href: `${href}#attention-request-${encodeURIComponent(request.id)}`,
|
|
15
|
+
kind: "passage",
|
|
16
|
+
...(line === undefined ? {} : { line }),
|
|
17
|
+
text: [request.reason, request.id, request.kind, request.state, ...request.responseFrom, ...request.unblocks].join(" "),
|
|
18
|
+
title: request.reason,
|
|
19
|
+
},
|
|
20
|
+
];
|
|
21
|
+
});
|
|
22
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { fileUrl } from "#files/url.ts";
|
|
2
2
|
import { identityUrl } from "#metadata/links.ts";
|
|
3
3
|
import type { MetadataDocument, MetadataModel } from "#metadata/model.ts";
|
|
4
|
+
import { attentionEntries } from "./attentionEntries.ts";
|
|
4
5
|
import type { Entry } from "./entries.ts";
|
|
5
6
|
|
|
6
7
|
function itemUrl(document: MetadataDocument, model: MetadataModel): string {
|
|
@@ -22,6 +23,7 @@ export function metadataEntries(entries: readonly Entry[], documents: readonly M
|
|
|
22
23
|
};
|
|
23
24
|
});
|
|
24
25
|
for (const document of documents) {
|
|
26
|
+
enriched.push(...attentionEntries(document, itemUrl(document, model)));
|
|
25
27
|
const criteria = document.parsed.fields.criteria ?? [];
|
|
26
28
|
for (const [index, criterion] of criteria.entries()) {
|
|
27
29
|
if (criteria.filter((item) => item.id === criterion.id).length !== 1) {
|
package/src/search/snapshot.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Effect, FileSystem, Option,
|
|
1
|
+
import { Effect, FileSystem, Option, Ref, Semaphore } from "effect";
|
|
2
2
|
import type { Changes } from "#files/changes.ts";
|
|
3
|
-
import {
|
|
3
|
+
import { markdownPath } from "#files/markdownPath.ts";
|
|
4
4
|
import { type MetadataDocument, metadataModel } from "#metadata/model.ts";
|
|
5
5
|
import { metadataParse } from "#metadata/parse.ts";
|
|
6
6
|
import { type Entry, entriesOf } from "./entries.ts";
|
|
@@ -24,7 +24,6 @@ export const searchSnapshot = Effect.fn("WorkBoard.searchSnapshot")(function* (r
|
|
|
24
24
|
return hit;
|
|
25
25
|
}
|
|
26
26
|
const fs = yield* FileSystem.FileSystem;
|
|
27
|
-
const path = yield* Path.Path;
|
|
28
27
|
const files = yield* changes.files;
|
|
29
28
|
const entries: Entry[] = [];
|
|
30
29
|
const documents: MetadataDocument[] = [];
|
|
@@ -32,8 +31,8 @@ export const searchSnapshot = Effect.fn("WorkBoard.searchSnapshot")(function* (r
|
|
|
32
31
|
for (const file of files) {
|
|
33
32
|
const found = yield* Effect.option(
|
|
34
33
|
Effect.gen(function* () {
|
|
35
|
-
const real = yield*
|
|
36
|
-
if (
|
|
34
|
+
const real = yield* markdownPath(root, changes.realRoot, file.path);
|
|
35
|
+
if (real === undefined) {
|
|
37
36
|
return undefined;
|
|
38
37
|
}
|
|
39
38
|
const source = yield* fs.readFileString(real);
|