@yaks/task 0.0.0-stage → 0.2.36
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/DecisionForm.js +118 -0
- package/DecisionForm.js.map +1 -0
- package/DecisionForm.ts +211 -0
- package/LICENSE +202 -0
- package/README.md +389 -2
- package/_dist/DecisionForm.d.ts +25 -0
- package/_dist/DecisionForm.d.ts.map +1 -0
- package/_dist/comp.d.ts +20 -0
- package/_dist/comp.d.ts.map +1 -0
- package/_dist/decision.d.ts +41 -0
- package/_dist/decision.d.ts.map +1 -0
- package/_dist/deps.d.ts +58 -0
- package/_dist/deps.d.ts.map +1 -0
- package/_dist/graph.d.ts +3 -0
- package/_dist/graph.d.ts.map +1 -0
- package/_dist/mod.d.ts +71 -0
- package/_dist/mod.d.ts.map +1 -0
- package/_dist/plugin.d.ts +28 -0
- package/_dist/plugin.d.ts.map +1 -0
- package/_dist/text.d.ts +5 -0
- package/_dist/text.d.ts.map +1 -0
- package/_dist/tools.d.ts +20 -0
- package/_dist/tools.d.ts.map +1 -0
- package/_dist/views.d.ts +6 -0
- package/_dist/views.d.ts.map +1 -0
- package/_dist/vocab.d.ts +7 -0
- package/_dist/vocab.d.ts.map +1 -0
- package/_dist/words.d.ts +28 -0
- package/_dist/words.d.ts.map +1 -0
- package/comp.js +66 -0
- package/comp.js.map +1 -0
- package/comp.ts +77 -0
- package/decision.js +156 -0
- package/decision.js.map +1 -0
- package/decision.ts +174 -0
- package/deno.json +1 -0
- package/deps.js +127 -0
- package/deps.js.map +1 -0
- package/deps.ts +163 -0
- package/graph.js +9 -0
- package/graph.js.map +1 -0
- package/graph.ts +10 -0
- package/inspect.js +131 -0
- package/inspect.js.map +1 -0
- package/inspect.ts +144 -0
- package/mod.js +71 -0
- package/mod.js.map +1 -0
- package/mod.ts +83 -0
- package/package.json +53 -4
- package/plugin.js +46 -0
- package/plugin.js.map +1 -0
- package/plugin.ts +40 -0
- package/text.js +22 -0
- package/text.js.map +1 -0
- package/text.ts +30 -0
- package/tools.js +303 -0
- package/tools.js.map +1 -0
- package/tools.ts +282 -0
- package/views.js +35 -0
- package/views.js.map +1 -0
- package/views.ts +39 -0
- package/vocab.js +18 -0
- package/vocab.js.map +1 -0
- package/vocab.json +860 -0
- package/vocab.ts +20 -0
- package/words.js +46 -0
- package/words.js.map +1 -0
- package/words.ts +57 -0
package/tools.ts
ADDED
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
// What anybody may ask of a to-do list: the module a server imports as
|
|
2
|
+
// `@yaks/task/tools` — the implementations behind the declarations marked
|
|
3
|
+
// `tool: true` in ./vocab.json.
|
|
4
|
+
//
|
|
5
|
+
// They write components that are not this package's, and that is the point: a
|
|
6
|
+
// task with a title carries @yaks/doc's `doc`, and one filed in a portfolio
|
|
7
|
+
// carries @yaks/project's `filed`. A tool returns bundles, which are plain
|
|
8
|
+
// data, so naming a neighbour's component costs no import — and a server that
|
|
9
|
+
// composes neither package refuses the write, naming the component it does not
|
|
10
|
+
// know.
|
|
11
|
+
//
|
|
12
|
+
// There is no `task show`, no `task search` and no `task tree` here. Showing an
|
|
13
|
+
// entity whole is `graph_show`, and ranked text search is `search`; both are in
|
|
14
|
+
// @yaks/mcp's generic tier and work over any vocabulary at all, so a second
|
|
15
|
+
// name for either would be two implementations of one thing. task_new turns a
|
|
16
|
+
// compact plan into tasks and links in one transaction; graph_apply remains
|
|
17
|
+
// the door for arbitrary vocabulary.
|
|
18
|
+
|
|
19
|
+
import type { Bundle, Comp, Graph } from 'jsr:@yaks/graph@0.2.36'
|
|
20
|
+
import { argsOf } from '@yaks/graph/call'
|
|
21
|
+
import { answer, check, type Choice, shows } from './decision.js'
|
|
22
|
+
import { type Edit, edited, type Runs, type TextEdit } from '@yaks/graph/tools'
|
|
23
|
+
import { Refused } from '@yaks/graph/errors'
|
|
24
|
+
import { conjoin, type Line, line, whole } from '@yaks/query'
|
|
25
|
+
import { taskText } from './text.js'
|
|
26
|
+
|
|
27
|
+
// Where the work is filed, as arguments. The two that name an entity arrive
|
|
28
|
+
// as eids: a person types `P-19`, and the runner resolves every argument the
|
|
29
|
+
// declaration marks `ref` before a tool sees it (@yaks/tools).
|
|
30
|
+
let PLACES = ['project', 'assignee', 'priority', 'domain'] as const
|
|
31
|
+
|
|
32
|
+
// The text a person reads, as arguments. An argument nobody passed is left out
|
|
33
|
+
// of the patch, so the stored title stays as it was instead of being blanked —
|
|
34
|
+
// writing `null` is what clears a property.
|
|
35
|
+
let picked = (
|
|
36
|
+
args: Record<string, unknown>,
|
|
37
|
+
keys: readonly string[],
|
|
38
|
+
): Comp | undefined => {
|
|
39
|
+
let said = keys.filter((key) => Object.hasOwn(args, key))
|
|
40
|
+
return said.length
|
|
41
|
+
? Object.fromEntries(said.map((key) => [key, args[key]]))
|
|
42
|
+
: undefined
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
let filedIn = (args: Record<string, unknown>): Comp | undefined =>
|
|
46
|
+
picked(args, PLACES)
|
|
47
|
+
let docIn = (args: Record<string, unknown>): Comp | undefined =>
|
|
48
|
+
picked(args, ['title', 'body'])
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* A status, as the marks that mean it. Nothing writes `task.status` — it is
|
|
52
|
+
* computed from these — so moving a task means adding one mark and removing
|
|
53
|
+
* the other, which is why finishing something records when and by whom instead
|
|
54
|
+
* of overwriting a value.
|
|
55
|
+
*/
|
|
56
|
+
export let marked: Record<string, Record<string, Comp | null>> = {
|
|
57
|
+
open: { started: null, completed: null, cancelled: null },
|
|
58
|
+
wip: { started: {}, completed: null, cancelled: null },
|
|
59
|
+
done: { completed: {}, cancelled: null },
|
|
60
|
+
cancelled: { cancelled: {}, completed: null },
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* The query a listing runs, with `.task` always part of it.
|
|
65
|
+
*
|
|
66
|
+
* The default is `.task.status=open,wip`. A caller's own query is passed
|
|
67
|
+
* through as typed and narrowed to tasks as a whole (`.a|.b` lists the tasks
|
|
68
|
+
* that are either), and every task comes back whole (`*`): a listing shows
|
|
69
|
+
* tasks, not the words it matched.
|
|
70
|
+
*/
|
|
71
|
+
// A caller's own query, narrowed: `conjoin` groups it, and refuses one whose
|
|
72
|
+
// groups or quotes do not close, so it cannot reach past the narrowing.
|
|
73
|
+
export let listing = (query?: unknown, limit?: unknown): Line =>
|
|
74
|
+
whole(conjoin(
|
|
75
|
+
'.task',
|
|
76
|
+
String(query ?? '').trim() || '.task.status=open',
|
|
77
|
+
limit == null ? '' : line`.limit=${Number(limit)}`,
|
|
78
|
+
'*',
|
|
79
|
+
))
|
|
80
|
+
|
|
81
|
+
type Args = Record<string, unknown>
|
|
82
|
+
|
|
83
|
+
// Why a task is cancelled, said with the status it explains. A reason written
|
|
84
|
+
// alone would create the `cancelled` mark, and so cancel a task nobody asked
|
|
85
|
+
// to cancel.
|
|
86
|
+
let reasoned = (args: Args): Record<string, Comp> => {
|
|
87
|
+
if (!Object.hasOwn(args, 'reason')) return {}
|
|
88
|
+
if (!args.status) {
|
|
89
|
+
throw new Refused(
|
|
90
|
+
'A reason is why a task is cancelled: pass status cancelled with it',
|
|
91
|
+
)
|
|
92
|
+
}
|
|
93
|
+
return args.status == 'cancelled'
|
|
94
|
+
? {
|
|
95
|
+
cancelled: { reason: args.reason == null ? null : String(args.reason) },
|
|
96
|
+
}
|
|
97
|
+
: {}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
let conditions = (args: Args): Record<string, Comp | null> => ({
|
|
101
|
+
...(Object.hasOwn(args, 'accept')
|
|
102
|
+
? { accept: args.accept == null ? null : { body: String(args.accept) } }
|
|
103
|
+
: {}),
|
|
104
|
+
...(Object.hasOwn(args, 'blocked')
|
|
105
|
+
? { blocked: args.blocked == null ? null : { on: String(args.blocked) } }
|
|
106
|
+
: {}),
|
|
107
|
+
...reasoned(args),
|
|
108
|
+
})
|
|
109
|
+
|
|
110
|
+
let fields = (args: Args): Record<string, Comp | null> => {
|
|
111
|
+
let doc = docIn(args)
|
|
112
|
+
let filed = filedIn(args)
|
|
113
|
+
return {
|
|
114
|
+
...(args.status ? marked[String(args.status)] : {}),
|
|
115
|
+
...(doc ? { doc } : {}),
|
|
116
|
+
...(filed ? { filed } : {}),
|
|
117
|
+
...conditions(args),
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
let plans = (args: Args): Bundle[] => {
|
|
122
|
+
let tasks = args.tasks as Args[] | undefined
|
|
123
|
+
let rows = tasks ?? [args]
|
|
124
|
+
let named = rows.flatMap((item) => item.id ? [String(item.id)] : [])
|
|
125
|
+
let used = new Set(named)
|
|
126
|
+
if (used.size != named.length) {
|
|
127
|
+
throw new Refused('Each task id must be distinct')
|
|
128
|
+
}
|
|
129
|
+
let fresh = (name: string): string => {
|
|
130
|
+
while (used.has(name)) name += '-'
|
|
131
|
+
used.add(name)
|
|
132
|
+
return name
|
|
133
|
+
}
|
|
134
|
+
let ids = rows.map((item, i) =>
|
|
135
|
+
String(item.id ?? fresh(tasks ? `$task-${i + 1}` : '$task'))
|
|
136
|
+
)
|
|
137
|
+
return rows.flatMap((item, i) => {
|
|
138
|
+
let task = tasks ? { ...args, ...item } : item
|
|
139
|
+
if (typeof task.title != 'string') {
|
|
140
|
+
throw new Refused('Supply title, or tasks with a title each')
|
|
141
|
+
}
|
|
142
|
+
let eid = ids[i]
|
|
143
|
+
if (!eid.startsWith('$')) {
|
|
144
|
+
throw new Refused('A new task id must start with $')
|
|
145
|
+
}
|
|
146
|
+
let links = [
|
|
147
|
+
...(task.parent
|
|
148
|
+
? [{ from: String(task.parent), relation: 'contains', to: eid }]
|
|
149
|
+
: []),
|
|
150
|
+
...((task.requires ?? []) as string[]).map((to) => ({
|
|
151
|
+
from: eid,
|
|
152
|
+
relation: 'requires',
|
|
153
|
+
to,
|
|
154
|
+
})),
|
|
155
|
+
]
|
|
156
|
+
return [
|
|
157
|
+
{
|
|
158
|
+
entity: { eid },
|
|
159
|
+
task: {},
|
|
160
|
+
...fields(task),
|
|
161
|
+
doc: taskText(
|
|
162
|
+
task.title,
|
|
163
|
+
typeof task.body == 'string' ? task.body : undefined,
|
|
164
|
+
),
|
|
165
|
+
},
|
|
166
|
+
...links.map((l, n) => link(l, fresh(`$task-link-${i}-${n}`))),
|
|
167
|
+
]
|
|
168
|
+
})
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
type Link = { from: string; relation: string; to: string }
|
|
172
|
+
|
|
173
|
+
/** A link as its own entity: an edge, and the relation it is. */
|
|
174
|
+
let link = ({ from, relation, to }: Link, eid: string): Bundle => ({
|
|
175
|
+
entity: { eid },
|
|
176
|
+
edge: { from, to },
|
|
177
|
+
[relation]: {},
|
|
178
|
+
})
|
|
179
|
+
|
|
180
|
+
/** The `requires` links a task gains: from it to each prerequisite. */
|
|
181
|
+
let required = (task: Args): Link[] =>
|
|
182
|
+
((task.requires ?? []) as string[]).map((to) => ({
|
|
183
|
+
from: String(task.task),
|
|
184
|
+
relation: 'requires',
|
|
185
|
+
to,
|
|
186
|
+
}))
|
|
187
|
+
|
|
188
|
+
let updates = async (args: Args, graph: Graph): Promise<Bundle[]> => {
|
|
189
|
+
let items = args.updates as Args[] | undefined
|
|
190
|
+
let rows = (items ?? [args]).map((item) => {
|
|
191
|
+
let task = items ? { ...args, ...item } : item
|
|
192
|
+
if (typeof task.task != 'string') {
|
|
193
|
+
throw new Refused('Supply task, or updates with a task each')
|
|
194
|
+
}
|
|
195
|
+
return task
|
|
196
|
+
})
|
|
197
|
+
let edits: Edit[] = rows.map((task) => {
|
|
198
|
+
let set = Object.fromEntries(
|
|
199
|
+
Object.entries(fields(task)).flatMap(([comp, value]) =>
|
|
200
|
+
value == null || !Object.keys(value).length
|
|
201
|
+
? [[comp, value]]
|
|
202
|
+
: Object.entries(value).map(([prop, v]) => [`${comp}.${prop}`, v])
|
|
203
|
+
),
|
|
204
|
+
)
|
|
205
|
+
return {
|
|
206
|
+
id: String(task.task),
|
|
207
|
+
set,
|
|
208
|
+
...((Object.hasOwn(task, 'body') || task.edit) && task.was !== undefined
|
|
209
|
+
? { was: { 'doc.body': task.was as string | null } }
|
|
210
|
+
: {}),
|
|
211
|
+
...(task.edit
|
|
212
|
+
? {
|
|
213
|
+
text: [{
|
|
214
|
+
was: task.was as string | null | undefined,
|
|
215
|
+
...(task.edit as TextEdit),
|
|
216
|
+
path: 'doc.body',
|
|
217
|
+
}],
|
|
218
|
+
}
|
|
219
|
+
: {}),
|
|
220
|
+
}
|
|
221
|
+
})
|
|
222
|
+
let links = rows.flatMap(required)
|
|
223
|
+
return [
|
|
224
|
+
...await edited(graph, edits),
|
|
225
|
+
...links.map((l, n) => link(l, `$task-link-${n}`)),
|
|
226
|
+
]
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
// A decision on `args.question` and `args.choices`: asked, recommending
|
|
230
|
+
// `pick`, or, given `why`, already made by its writer, who took `pick`.
|
|
231
|
+
let decision = (args: Args, pick: unknown, why?: string): Bundle[] => {
|
|
232
|
+
let question = String(args.question).trim()
|
|
233
|
+
let filed = filedIn(args)
|
|
234
|
+
let choices = args.choices as (Choice & { shows?: string })[]
|
|
235
|
+
let made: Bundle = {
|
|
236
|
+
entity: { eid: '$decision' },
|
|
237
|
+
task: {},
|
|
238
|
+
doc: { title: question, ...(why ? { body: why } : {}) },
|
|
239
|
+
decision: {
|
|
240
|
+
question,
|
|
241
|
+
choices: choices.map(({ label, description }) => ({
|
|
242
|
+
label,
|
|
243
|
+
description,
|
|
244
|
+
})),
|
|
245
|
+
recommended: pick,
|
|
246
|
+
},
|
|
247
|
+
...(why == null ? {} : { decided: { choice: String(pick).trim() } }),
|
|
248
|
+
...(filed ? { filed } : {}),
|
|
249
|
+
}
|
|
250
|
+
check(made)
|
|
251
|
+
return [made, ...shows('$decision', choices)]
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
/** The implementations behind ./vocab.json. Scalar changes are data; partial
|
|
255
|
+
* text changes read through the graph and keep the shared compiler's guard. */
|
|
256
|
+
export let runs = (): Runs => ({
|
|
257
|
+
decision_new: (call): Bundle[] => {
|
|
258
|
+
let args = argsOf(call)
|
|
259
|
+
return decision(args, args.recommended)
|
|
260
|
+
},
|
|
261
|
+
|
|
262
|
+
decision_record: (call): Bundle[] => {
|
|
263
|
+
let args = argsOf(call)
|
|
264
|
+
return decision(args, args.chose, String(args.why).trim())
|
|
265
|
+
},
|
|
266
|
+
|
|
267
|
+
decision_answer: (call): Bundle[] => {
|
|
268
|
+
let args = argsOf(call)
|
|
269
|
+
return answer(
|
|
270
|
+
String(args.decision),
|
|
271
|
+
String(args.choice),
|
|
272
|
+
args.by as string | undefined,
|
|
273
|
+
)
|
|
274
|
+
},
|
|
275
|
+
|
|
276
|
+
task_new: (call): Bundle[] => plans(argsOf(call)),
|
|
277
|
+
|
|
278
|
+
task_list: (call, graph) =>
|
|
279
|
+
graph.read(listing(argsOf(call).query, argsOf(call).limit)),
|
|
280
|
+
|
|
281
|
+
task_update: (call, graph) => updates(argsOf(call), graph),
|
|
282
|
+
})
|
package/views.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// How a task's state reads, in every interface: one word, its status. A
|
|
2
|
+
// portable @yaks/render renderer, so a terminal prints the word (@yaks/text)
|
|
3
|
+
// and a browser styles it by its class (@yaks/react).
|
|
4
|
+
//
|
|
5
|
+
// The status is computed, never stored: it is read through the ladder the
|
|
6
|
+
// vocabulary the view was chosen by declares (./words.ts `statusOf`). A read
|
|
7
|
+
// carries the value its store derived, and the reading falls back to it where
|
|
8
|
+
// the bundle lacks the marks, so a task read as `.task` alone still says done.
|
|
9
|
+
// A bundle built by hand may carry neither, which is why this matches the
|
|
10
|
+
// component rather than a status.
|
|
11
|
+
//
|
|
12
|
+
// Beside it, as the inspector draws them, a task's page (./inspect.ts).
|
|
13
|
+
import { parse } from "@yaks/query/core";
|
|
14
|
+
import { define } from "@yaks/render";
|
|
15
|
+
import { loadVocab } from "@yaks/vocab/runtime";
|
|
16
|
+
import { TASK } from "./comp.js";
|
|
17
|
+
import { statusOf } from "./words.js";
|
|
18
|
+
// A backend that says no vocabulary has none of the ladder to read by.
|
|
19
|
+
let none = loadVocab([]);
|
|
20
|
+
/** `Status` for a task: `open`, `done`, `cancelled`, or a rung another package
|
|
21
|
+
* adds. */ export let views = define([
|
|
22
|
+
{
|
|
23
|
+
view: 'Status',
|
|
24
|
+
match: parse(`.${TASK}`),
|
|
25
|
+
render: (b, h, ctx)=>{
|
|
26
|
+
let status = statusOf(ctx.vocab ?? none, b) ?? 'open';
|
|
27
|
+
return h('span', {
|
|
28
|
+
class: `Status Status-${status}`
|
|
29
|
+
}, status);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
]);
|
|
33
|
+
// The inspector asks for its domain pages; a portable printer never does.
|
|
34
|
+
export let inspectViews = ()=>import("./inspect.js").then((m)=>m.inspectViews);
|
|
35
|
+
//# sourceMappingURL=views.js.map
|
package/views.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"views.js","sources":["./views.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,6EAA6E;AAC7E,sDAAsD;AACtD,EAAE;AACF,0EAA0E;AAC1E,6EAA6E;AAC7E,8EAA8E;AAC9E,+EAA+E;AAC/E,0EAA0E;AAC1E,kCAAkC;AAClC,EAAE;AACF,wEAAwE;AAExE,SAAS,KAAK,gCAAqC;AAEnD,SAAS,MAAM,4BAAgD;AAC/D,SAAS,SAAS,mCAAwC;AAC1D,SAAS,IAAI,oBAAmB;AAChC,SAAS,QAAQ,qBAAoB;AAErC,uEAAuE;AACvE,IAAI,OAAO,UAAU,EAAE;AAEvB;SACS,GACT,OAAO,IAAI,QAAkB,OAAO;EAClC;IACE,MAAM;IACN,OAAO,MAAM,CAAC,CAAC,EAAE,MAAM;IACvB,QAAQ,CAAC,GAAG,GAAG;MACb,IAAI,SAAS,SAAS,IAAI,KAAK,IAAI,MAAM,MAAM;MAC/C,OAAO,EAAE,QAAQ;QAAE,OAAO,CAAC,cAAc,EAAE,QAAQ;MAAC,GAAG;IACzD;EACF;CACD,EAAC;AAEF,0EAA0E;AAC1E,OAAO,IAAI,eAAe,IACxB,MAAM,CAAC,gBAAgB,IAAI,CAAC,CAAC,IAAM,EAAE,YAAY,EAAC"}
|
package/views.ts
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// How a task's state reads, in every interface: one word, its status. A
|
|
2
|
+
// portable @yaks/render renderer, so a terminal prints the word (@yaks/text)
|
|
3
|
+
// and a browser styles it by its class (@yaks/react).
|
|
4
|
+
//
|
|
5
|
+
// The status is computed, never stored: it is read through the ladder the
|
|
6
|
+
// vocabulary the view was chosen by declares (./words.ts `statusOf`). A read
|
|
7
|
+
// carries the value its store derived, and the reading falls back to it where
|
|
8
|
+
// the bundle lacks the marks, so a task read as `.task` alone still says done.
|
|
9
|
+
// A bundle built by hand may carry neither, which is why this matches the
|
|
10
|
+
// component rather than a status.
|
|
11
|
+
//
|
|
12
|
+
// Beside it, as the inspector draws them, a task's page (./inspect.ts).
|
|
13
|
+
|
|
14
|
+
import { parse } from '@yaks/query/core'
|
|
15
|
+
import type { View } from 'jsr:@yaks/inspect@0.2.36'
|
|
16
|
+
import { define, type Registry } from '@yaks/render'
|
|
17
|
+
import { loadVocab } from '@yaks/vocab/runtime'
|
|
18
|
+
import { TASK } from './comp.js'
|
|
19
|
+
import { statusOf } from './words.js'
|
|
20
|
+
|
|
21
|
+
// A backend that says no vocabulary has none of the ladder to read by.
|
|
22
|
+
let none = loadVocab([])
|
|
23
|
+
|
|
24
|
+
/** `Status` for a task: `open`, `done`, `cancelled`, or a rung another package
|
|
25
|
+
* adds. */
|
|
26
|
+
export let views: Registry = define([
|
|
27
|
+
{
|
|
28
|
+
view: 'Status',
|
|
29
|
+
match: parse(`.${TASK}`),
|
|
30
|
+
render: (b, h, ctx) => {
|
|
31
|
+
let status = statusOf(ctx.vocab ?? none, b) ?? 'open'
|
|
32
|
+
return h('span', { class: `Status Status-${status}` }, status)
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
])
|
|
36
|
+
|
|
37
|
+
// The inspector asks for its domain pages; a portable printer never does.
|
|
38
|
+
export let inspectViews = (): Promise<View[]> =>
|
|
39
|
+
import('./inspect.js').then((m) => m.inspectViews)
|
package/vocab.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// The task components and nothing that runs: the module a server imports as
|
|
2
|
+
// `@yaks/task/vocab`. It reaches no storage, no SQL and no runtime, so a
|
|
3
|
+
// browser tab that loads this vocabulary loads nothing else.
|
|
4
|
+
//
|
|
5
|
+
// A task's status is declared in the document itself (the `status` keyword on
|
|
6
|
+
// `task`), so every store reads it from there; nothing here hands one an
|
|
7
|
+
// expression.
|
|
8
|
+
import { taskDoc } from "./comp.js";
|
|
9
|
+
import manifest from './package.json' with {
|
|
10
|
+
type: 'json'
|
|
11
|
+
};
|
|
12
|
+
export { taskDoc };
|
|
13
|
+
/** What this package is: its manifest's description, the one place it is
|
|
14
|
+
* written, which a host stamps on each document here. */ export let description = manifest.description;
|
|
15
|
+
/** Every document this plugin declares. */ export let docs = [
|
|
16
|
+
taskDoc
|
|
17
|
+
];
|
|
18
|
+
//# sourceMappingURL=vocab.js.map
|
package/vocab.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vocab.js","sources":["./vocab.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,yEAAyE;AACzE,6DAA6D;AAC7D,EAAE;AACF,8EAA8E;AAC9E,yEAAyE;AACzE,cAAc;AAGd,SAAS,OAAO,oBAAmB;AACnC,OAAO,cAAc,sBAAsB;EAAE,MAAM;AAAO,EAAC;AAE3D,SAAS,OAAO,GAAE;AAElB;uDACuD,GACvD,OAAO,IAAI,cAAsB,SAAS,WAAW,CAAA;AAErD,yCAAyC,GACzC,OAAO,IAAI,OAAmB;EAAC;CAAQ,CAAA"}
|