@yaks/browse 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/LICENSE +202 -0
- package/README.md +324 -2
- package/_dist/app.d.ts +8 -0
- package/_dist/app.d.ts.map +1 -0
- package/_dist/cli.d.ts +16 -0
- package/_dist/cli.d.ts.map +1 -0
- package/_dist/hosting.d.ts +24 -0
- package/_dist/hosting.d.ts.map +1 -0
- package/_dist/mod.d.ts +7 -0
- package/_dist/mod.d.ts.map +1 -0
- package/_dist/types.d.ts +5 -0
- package/_dist/types.d.ts.map +1 -0
- package/_dist/url.d.ts +2 -0
- package/_dist/url.d.ts.map +1 -0
- package/app.js +10 -0
- package/app.js.map +1 -0
- package/app.ts +10 -0
- package/browser-links.js +22 -0
- package/browser-links.js.map +1 -0
- package/browser-links.ts +28 -0
- package/cli.js +172 -0
- package/cli.js.map +1 -0
- package/cli.ts +168 -0
- package/client.js +748 -0
- package/client.js.map +1 -0
- package/client.ts +734 -0
- package/clipboard.js +18 -0
- package/clipboard.js.map +1 -0
- package/clipboard.ts +17 -0
- package/commands.js +1157 -0
- package/commands.js.map +1 -0
- package/commands.ts +1108 -0
- package/components/Ansi.tsx +160 -0
- package/components/App.tsx +446 -0
- package/components/Canvas.tsx +625 -0
- package/components/Card.tsx +276 -0
- package/components/Chat.tsx +205 -0
- package/components/Configuration.tsx +218 -0
- package/components/Decision.tsx +49 -0
- package/components/Dot.tsx +52 -0
- package/components/Entity.tsx +609 -0
- package/components/Fault.tsx +43 -0
- package/components/Filter.tsx +103 -0
- package/components/Keybindings.tsx +100 -0
- package/components/Keys.tsx +67 -0
- package/components/Markdown.tsx +90 -0
- package/components/Navigation.tsx +161 -0
- package/components/New.tsx +490 -0
- package/components/Peek.tsx +168 -0
- package/components/Prio.tsx +20 -0
- package/components/Run.tsx +263 -0
- package/components/Search.tsx +280 -0
- package/components/Stamp.tsx +44 -0
- package/components/Status.tsx +514 -0
- package/components/Sync.tsx +173 -0
- package/components/Tile.tsx +50 -0
- package/components/answered.js +23 -0
- package/components/answered.js.map +1 -0
- package/components/answered.ts +25 -0
- package/components/comp.js +11 -0
- package/components/comp.js.map +1 -0
- package/components/comp.ts +10 -0
- package/components/drag.js +173 -0
- package/components/drag.js.map +1 -0
- package/components/drag.ts +198 -0
- package/components/fields.tsx +90 -0
- package/components/fixtures/README.md +10 -0
- package/components/fixtures/archetypes.json +3646 -0
- package/components/hits.js +63 -0
- package/components/hits.js.map +1 -0
- package/components/hits.ts +84 -0
- package/components/icons.tsx +177 -0
- package/components/inspect.tsx +331 -0
- package/components/mount.ts +79 -0
- package/components/nav.tsx +479 -0
- package/components/offers.js +26 -0
- package/components/offers.js.map +1 -0
- package/components/offers.ts +54 -0
- package/components/page.js +21 -0
- package/components/page.js.map +1 -0
- package/components/page.ts +18 -0
- package/components/read.js +5 -0
- package/components/read.js.map +1 -0
- package/components/read.ts +7 -0
- package/components/registry.js +285 -0
- package/components/registry.js.map +1 -0
- package/components/registry.ts +317 -0
- package/components/session_status.tsx +115 -0
- package/components/subscriptions.js +149 -0
- package/components/subscriptions.js.map +1 -0
- package/components/subscriptions.ts +161 -0
- package/components/title.tsx +21 -0
- package/components/useQuery.js +166 -0
- package/components/useQuery.js.map +1 -0
- package/components/useQuery.ts +211 -0
- package/components/views/Board.tsx +450 -0
- package/components/views/BoardTile.tsx +65 -0
- package/components/views/Dashboard.tsx +148 -0
- package/components/views/Debug.tsx +445 -0
- package/components/views/Dependency.tsx +51 -0
- package/components/views/Entry.tsx +500 -0
- package/components/views/Gist.tsx +28 -0
- package/components/views/Inline.tsx +54 -0
- package/components/views/Json.tsx +19 -0
- package/components/views/Layout.tsx +211 -0
- package/components/views/List.tsx +238 -0
- package/components/views/Md.tsx +43 -0
- package/components/views/Media.tsx +48 -0
- package/components/views/Memory.tsx +32 -0
- package/components/views/Relate.tsx +205 -0
- package/components/views/Search.tsx +42 -0
- package/components/views/Session.tsx +850 -0
- package/components/views/SessionManage.tsx +127 -0
- package/components/views/Show.tsx +758 -0
- package/components/views/Shown.tsx +72 -0
- package/components/views/Split.tsx +58 -0
- package/components/views/TaskTile.tsx +37 -0
- package/components/views/Title.tsx +105 -0
- package/components/views/Wake.tsx +77 -0
- package/components/views/Web.tsx +49 -0
- package/components/wells.js +30 -0
- package/components/wells.js.map +1 -0
- package/components/wells.ts +33 -0
- package/configuration.js +38 -0
- package/configuration.js.map +1 -0
- package/configuration.ts +41 -0
- package/decision_sync.js +88 -0
- package/decision_sync.js.map +1 -0
- package/decision_sync.ts +93 -0
- package/deno.json +1 -0
- package/domain-host.tsx +108 -0
- package/edge.js +193 -0
- package/edge.js.map +1 -0
- package/edge.ts +196 -0
- package/entry_log.js +241 -0
- package/entry_log.js.map +1 -0
- package/entry_log.ts +214 -0
- package/failure.js +22 -0
- package/failure.js.map +1 -0
- package/failure.ts +34 -0
- package/front.json +61 -0
- package/highlight.js +143 -0
- package/highlight.js.map +1 -0
- package/highlight.ts +149 -0
- package/history.js +68 -0
- package/history.js.map +1 -0
- package/history.ts +72 -0
- package/host_commands.js +107 -0
- package/host_commands.js.map +1 -0
- package/host_commands.ts +38 -0
- package/hosting.js +53 -0
- package/hosting.js.map +1 -0
- package/hosting.ts +72 -0
- package/idb.js +14 -0
- package/idb.js.map +1 -0
- package/idb.ts +15 -0
- package/index.js +232 -0
- package/index.js.map +1 -0
- package/index.ts +252 -0
- package/keybindings.js +136 -0
- package/keybindings.js.map +1 -0
- package/keybindings.ts +37 -0
- package/kit.js +103 -0
- package/kit.js.map +1 -0
- package/kit.ts +119 -0
- package/layout.js +254 -0
- package/layout.js.map +1 -0
- package/layout.ts +210 -0
- package/legacy_outbox.js +53 -0
- package/legacy_outbox.js.map +1 -0
- package/legacy_outbox.ts +63 -0
- package/live.js +2883 -0
- package/live.js.map +1 -0
- package/live.ts +3334 -0
- package/live_archetypes.js +92 -0
- package/live_archetypes.js.map +1 -0
- package/live_archetypes.ts +113 -0
- package/live_client.js +145 -0
- package/live_client.js.map +1 -0
- package/live_client.ts +120 -0
- package/main.tsx +5 -0
- package/mod.js +7 -0
- package/mod.js.map +1 -0
- package/mod.ts +7 -0
- package/mount.tsx +50 -0
- package/navigation.js +120 -0
- package/navigation.js.map +1 -0
- package/navigation.ts +152 -0
- package/near.js +83 -0
- package/near.js.map +1 -0
- package/near.ts +83 -0
- package/new.js +295 -0
- package/new.js.map +1 -0
- package/new.ts +361 -0
- package/outbox.js +112 -0
- package/outbox.js.map +1 -0
- package/outbox.ts +129 -0
- package/owner.js +39 -0
- package/owner.js.map +1 -0
- package/owner.ts +37 -0
- package/package.json +81 -4
- package/paste.js +157 -0
- package/paste.js.map +1 -0
- package/paste.ts +122 -0
- package/props.js +303 -0
- package/props.js.map +1 -0
- package/props.ts +358 -0
- package/providers.js +136 -0
- package/providers.js.map +1 -0
- package/providers.ts +194 -0
- package/query.js +987 -0
- package/query.js.map +1 -0
- package/query.ts +1113 -0
- package/remote.js +37 -0
- package/remote.js.map +1 -0
- package/remote.ts +46 -0
- package/resolver.js +149 -0
- package/resolver.js.map +1 -0
- package/resolver.ts +213 -0
- package/rfc2047.js +37 -0
- package/rfc2047.js.map +1 -0
- package/rfc2047.ts +40 -0
- package/row_holds.js +107 -0
- package/row_holds.js.map +1 -0
- package/row_holds.ts +93 -0
- package/served.ts +42 -0
- package/session_worktree.js +7 -0
- package/session_worktree.js.map +1 -0
- package/session_worktree.ts +16 -0
- package/sessions.js +57 -0
- package/sessions.js.map +1 -0
- package/sessions.ts +53 -0
- package/sha.js +161 -0
- package/sha.js.map +1 -0
- package/sha.ts +164 -0
- package/styles.css +2823 -0
- package/subs.js +36 -0
- package/subs.js.map +1 -0
- package/subs.ts +40 -0
- package/terminal-route.js +13 -0
- package/terminal-route.js.map +1 -0
- package/terminal-route.ts +17 -0
- package/terminal.js +251 -0
- package/terminal.js.map +1 -0
- package/terminal.ts +186 -0
- package/time.js +142 -0
- package/time.js.map +1 -0
- package/time.ts +133 -0
- package/title.js +25 -0
- package/title.js.map +1 -0
- package/title.ts +50 -0
- package/tui/doc.ts +6 -0
- package/tui/testing.ts +19 -0
- package/twin.js +11 -0
- package/twin.js.map +1 -0
- package/twin.ts +13 -0
- package/types.js +456 -0
- package/types.js.map +1 -0
- package/types.ts +1370 -0
- package/url.js +77 -0
- package/url.js.map +1 -0
- package/url.ts +85 -0
- package/verb.js +82 -0
- package/verb.js.map +1 -0
- package/verb.ts +137 -0
- package/warmth.js +41 -0
- package/warmth.js.map +1 -0
- package/warmth.ts +54 -0
- package/wire.js +86 -0
- package/wire.js.map +1 -0
- package/wire.ts +63 -0
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
/** @jsxRuntime automatic *//** @jsxImportSourceTypes npm:react@19.3.0 *//** @jsxImportSource npm:react@19.3.0 */
|
|
2
|
+
/* @ts-types="npm:@types/react@19.3.0" */ import { useEffect, useId, useRef, useState } from 'npm:react@19.3.0'
|
|
3
|
+
import { relations, reversed } from 'jsr:@yaks/edge@0.2.36/vocab'
|
|
4
|
+
import { type Ent, uuid, vocab } from '../../types.ts'
|
|
5
|
+
import { link } from '../../edge.ts'
|
|
6
|
+
import { up } from './Dependency.tsx'
|
|
7
|
+
import { spec, taskChanges } from '../../client.ts'
|
|
8
|
+
import { block, Combobox, comboboxAttrs, Field } from 'jsr:@yaks/ui@0.2.36'
|
|
9
|
+
import { label, pickLine, useHits } from 'jsr:@yaks/ux@0.2.36'
|
|
10
|
+
import { drafts, useDraft } from 'jsr:@yaks/draft@0.2.36/input'
|
|
11
|
+
import { bundlesOf } from '../../wire.ts'
|
|
12
|
+
import { rows } from '../hits.ts'
|
|
13
|
+
import { ux } from '../registry.ts'
|
|
14
|
+
|
|
15
|
+
let Frame = block('span', 'Relate', {
|
|
16
|
+
Verb: 'button',
|
|
17
|
+
Anchor: 'span',
|
|
18
|
+
})
|
|
19
|
+
let { Verb, Anchor } = Frame
|
|
20
|
+
|
|
21
|
+
// A sentence an entity grows a link by: a relation, and which end the entity
|
|
22
|
+
// is (out: it is the parent), the same grammar Dependency renders.
|
|
23
|
+
type V = { type: string; out: boolean }
|
|
24
|
+
|
|
25
|
+
// Every relation the vocabulary declares and the wire may write (not a
|
|
26
|
+
// computed one, not the meta vocabulary's), read off the vocabulary each time
|
|
27
|
+
// so a relation declared today is offered today: forwards by its name, and
|
|
28
|
+
// from the child's side too where it declares a phrase for that ('required
|
|
29
|
+
// by').
|
|
30
|
+
export let verbs = (): V[] => {
|
|
31
|
+
let back = reversed(vocab)
|
|
32
|
+
return Object.entries(relations(vocab)).filter(([, name]) => {
|
|
33
|
+
let c = vocab.comp(name)
|
|
34
|
+
return c?.wire && !c.computed
|
|
35
|
+
}).flatMap(([type]) => [
|
|
36
|
+
{ type, out: true },
|
|
37
|
+
...(back[type] ? [{ type, out: false }] : []),
|
|
38
|
+
])
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// A verb as it reads: the relation's name from the parent's side, its
|
|
42
|
+
// reversed phrase from the child's ('required by', 'contained by').
|
|
43
|
+
let said = (v: V) => v.out ? v.type : up(v.type)
|
|
44
|
+
|
|
45
|
+
// Add a link by finishing its sentence: press `+ link` and pick its relation
|
|
46
|
+
// from every one declared (typing narrows them), then type its far end — the
|
|
47
|
+
// list is a live search over documented entities; Enter (or a click) links
|
|
48
|
+
// the pick, and text that matches nothing becomes a NEW task, spec-parsed
|
|
49
|
+
// (`P1 .filed.domain=Eng title` works here), created and linked in one atomic
|
|
50
|
+
// apply, inheriting the host's project and domain. Both lists overlay —
|
|
51
|
+
// nothing below them moves.
|
|
52
|
+
export let Relate = ({ e }: { e: Ent }) => {
|
|
53
|
+
// A verb whose line is half-typed stays open — a new task or edge not yet
|
|
54
|
+
// filed, typed here before a reload, in another tab or in the terminal
|
|
55
|
+
// (../drafts.ts). Keyed by (host, verb) so the sentence resumes exact. A
|
|
56
|
+
// verb picked here takes the keyboard; one its draft opened waits.
|
|
57
|
+
let all = verbs()
|
|
58
|
+
let dk = (v: V) => `relate:${e.eid}:${said(v)}`
|
|
59
|
+
let [picked, setVerb] = useState<V | 'choose' | null>(null)
|
|
60
|
+
let choosing = picked == 'choose'
|
|
61
|
+
let verb = picked == 'choose'
|
|
62
|
+
? null
|
|
63
|
+
: picked ?? all.find((v) => drafts.text(dk(v))) ?? null
|
|
64
|
+
let [q, setQ] = useState('')
|
|
65
|
+
let [pick, setPick] = useState(0)
|
|
66
|
+
// The Find input doubles as the picker's anchor; focus it when a verb
|
|
67
|
+
// opens it (it only mounts then), the way Search takes the palette.
|
|
68
|
+
let list = useId() + '-relations'
|
|
69
|
+
let find = useRef<HTMLInputElement>(null)
|
|
70
|
+
let trigger = useRef<HTMLButtonElement>(null)
|
|
71
|
+
useEffect(() => {
|
|
72
|
+
if (picked) find.current?.focus()
|
|
73
|
+
}, [picked])
|
|
74
|
+
let { sync, spend } = useDraft(verb ? dk(verb) : '', find, setQ)
|
|
75
|
+
let close = () => {
|
|
76
|
+
setVerb(null)
|
|
77
|
+
setQ('')
|
|
78
|
+
setPick(0)
|
|
79
|
+
}
|
|
80
|
+
let taken = new Set([
|
|
81
|
+
e.eid,
|
|
82
|
+
...e.refs.map((r) => r.child),
|
|
83
|
+
...e.kids.map((k) => k.eid),
|
|
84
|
+
])
|
|
85
|
+
// Candidates come from the server (@yaks/ux useHits): FTS over every doc plus
|
|
86
|
+
// id-addressing, so a typed id, title word, or dot-filter names an entity
|
|
87
|
+
// even when the cache holds only part of the graph. An unopened verb (no
|
|
88
|
+
// line) searches nothing; already-linked targets and the host drop out.
|
|
89
|
+
let hits = useHits(verb ? pickLine(q) : '', 8, rows)
|
|
90
|
+
.filter((h) => !taken.has(h.entity.eid))
|
|
91
|
+
.slice(0, 6)
|
|
92
|
+
let fresh = verb && q.trim() ? spec(q).title : ''
|
|
93
|
+
// While choosing, the relations whose sentence holds what is typed.
|
|
94
|
+
let options = choosing
|
|
95
|
+
? all.filter((v) => said(v).includes(q.trim().toLowerCase()))
|
|
96
|
+
: []
|
|
97
|
+
let choose = (v: V) => {
|
|
98
|
+
if (find.current) find.current.value = ''
|
|
99
|
+
setVerb(v)
|
|
100
|
+
setQ('')
|
|
101
|
+
setPick(0)
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
let edge = (v: V, other: string) =>
|
|
105
|
+
v.out ? link(e.eid, v.type, other) : link(other, v.type, e.eid)
|
|
106
|
+
let tie = (other: string) => {
|
|
107
|
+
if (verb) spend(bundlesOf(edge(verb, other)))
|
|
108
|
+
close()
|
|
109
|
+
}
|
|
110
|
+
let create = () => {
|
|
111
|
+
if (!verb || !fresh) return
|
|
112
|
+
let { title, body, grouped } = spec(q)
|
|
113
|
+
let id = uuid()
|
|
114
|
+
spend(bundlesOf([
|
|
115
|
+
...taskChanges(id, {
|
|
116
|
+
...grouped,
|
|
117
|
+
doc: { title, body, ...grouped.doc },
|
|
118
|
+
task: { ...grouped.task },
|
|
119
|
+
filed: {
|
|
120
|
+
project: e.filed?.project ?? null,
|
|
121
|
+
domain: e.filed?.domain ?? null,
|
|
122
|
+
},
|
|
123
|
+
}, true),
|
|
124
|
+
...edge(verb, id),
|
|
125
|
+
]))
|
|
126
|
+
close()
|
|
127
|
+
}
|
|
128
|
+
let suggestions = [
|
|
129
|
+
...options.map((v) => ({
|
|
130
|
+
value: said(v),
|
|
131
|
+
label: said(v),
|
|
132
|
+
take: () => choose(v),
|
|
133
|
+
})),
|
|
134
|
+
...hits.map((t) => ({
|
|
135
|
+
value: t.entity.eid,
|
|
136
|
+
label: label(ux, t),
|
|
137
|
+
take: () => tie(t.entity.eid),
|
|
138
|
+
})),
|
|
139
|
+
...fresh
|
|
140
|
+
? [{ value: '', label: '+ new “' + fresh + '”', take: create }]
|
|
141
|
+
: [],
|
|
142
|
+
]
|
|
143
|
+
let active = Math.min(pick, suggestions.length - 1)
|
|
144
|
+
let key = (ev: KeyboardEvent) => {
|
|
145
|
+
if (ev.isComposing) return
|
|
146
|
+
if (ev.key == 'Enter') {
|
|
147
|
+
ev.preventDefault()
|
|
148
|
+
suggestions[active]?.take()
|
|
149
|
+
return
|
|
150
|
+
}
|
|
151
|
+
let d = ev.key == 'ArrowDown' ? 1 : ev.key == 'ArrowUp' ? -1 : 0
|
|
152
|
+
if (!d || !suggestions.length) return
|
|
153
|
+
ev.preventDefault()
|
|
154
|
+
setPick(Math.max(0, Math.min(active + d, suggestions.length - 1)))
|
|
155
|
+
}
|
|
156
|
+
let dismiss = () => {
|
|
157
|
+
spend()
|
|
158
|
+
close()
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
if (!verb && !choosing) {
|
|
162
|
+
return (
|
|
163
|
+
<Frame>
|
|
164
|
+
<Verb elRef={trigger} type='button' onClick={() => setVerb('choose')}>
|
|
165
|
+
+ link
|
|
166
|
+
</Verb>
|
|
167
|
+
</Frame>
|
|
168
|
+
)
|
|
169
|
+
}
|
|
170
|
+
return (
|
|
171
|
+
<Frame>
|
|
172
|
+
<Verb elRef={trigger} mod={verb?.type} type='button' onClick={close}>
|
|
173
|
+
{verb ? said(verb) : '+ link'}
|
|
174
|
+
</Verb>
|
|
175
|
+
<Anchor
|
|
176
|
+
onCancel={dismiss}
|
|
177
|
+
overlay={{ opener: trigger.current }}
|
|
178
|
+
>
|
|
179
|
+
<Field
|
|
180
|
+
className='Relate_Find'
|
|
181
|
+
elRef={find}
|
|
182
|
+
{...comboboxAttrs(list, suggestions, active)}
|
|
183
|
+
placeholder={verb ? 'entity…' : 'relation…'}
|
|
184
|
+
onInput={(ev: InputEvent) => {
|
|
185
|
+
let el = ev.currentTarget as HTMLInputElement
|
|
186
|
+
sync(el)
|
|
187
|
+
setQ(el.value)
|
|
188
|
+
setPick(0)
|
|
189
|
+
}}
|
|
190
|
+
onKeyDown={key}
|
|
191
|
+
onBlur={close}
|
|
192
|
+
/>
|
|
193
|
+
<Combobox.List
|
|
194
|
+
id={list}
|
|
195
|
+
anchor={find}
|
|
196
|
+
options={suggestions}
|
|
197
|
+
active={active}
|
|
198
|
+
onHover={setPick}
|
|
199
|
+
onChoose={(_value, index) => suggestions[index].take()}
|
|
200
|
+
onDismiss={dismiss}
|
|
201
|
+
/>
|
|
202
|
+
</Anchor>
|
|
203
|
+
</Frame>
|
|
204
|
+
)
|
|
205
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/** @jsxRuntime automatic *//** @jsxImportSourceTypes npm:react@19.3.0 *//** @jsxImportSource npm:react@19.3.0 */
|
|
2
|
+
// Search is a renderer context, not a second entity drawing in the screen.
|
|
3
|
+
// Delegate the entity shape to Tile, with what was sought in the context
|
|
4
|
+
// (`words`) and its matches in the same slots all tiles share: a title marked
|
|
5
|
+
// where the words are in it, and under a tile that draws no passage of its
|
|
6
|
+
// own, the passage of its text that the words matched. A passage row (words
|
|
7
|
+
// someone said, a long text) marks its own passage from `words`.
|
|
8
|
+
import type { Ent } from '../../types.ts'
|
|
9
|
+
import { vocab } from '../../types.ts'
|
|
10
|
+
import { marked, Passage } from 'jsr:@yaks/ui@0.2.36'
|
|
11
|
+
import { hit, snippet } from 'jsr:@yaks/graph@0.2.36/hit'
|
|
12
|
+
import { bundle, renderView } from '../registry.ts'
|
|
13
|
+
import type { TileSlots } from '../Tile.tsx'
|
|
14
|
+
import { unmime } from '../../rfc2047.ts'
|
|
15
|
+
|
|
16
|
+
let matched = (cut: string) => cut.includes('\x01')
|
|
17
|
+
|
|
18
|
+
/** The slots a tile wears in the results of a search for `words`. */
|
|
19
|
+
export let hitSlots = (e: Ent, words: string[]): TileSlots => {
|
|
20
|
+
if (!words.length) return {}
|
|
21
|
+
let title = e.doc?.title ?? ''
|
|
22
|
+
let named = snippet(e.mail ? unmime(title) : title, words)
|
|
23
|
+
// A yaks.app store cuts its own passage from its index (`rank.snip`).
|
|
24
|
+
let cut = (e.rank as { snip?: unknown } | undefined)?.snip
|
|
25
|
+
let passage = hit(vocab, words)(
|
|
26
|
+
bundle(e),
|
|
27
|
+
typeof cut == 'string' ? cut : undefined,
|
|
28
|
+
).snippet
|
|
29
|
+
return {
|
|
30
|
+
title: matched(named) ? marked(named) : undefined,
|
|
31
|
+
body: matched(passage)
|
|
32
|
+
? (
|
|
33
|
+
<Passage>
|
|
34
|
+
<Passage.Text>{marked(passage)}</Passage.Text>
|
|
35
|
+
</Passage>
|
|
36
|
+
)
|
|
37
|
+
: undefined,
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export let SearchTile = ({ e, words = [] }: { e: Ent; words?: string[] }) =>
|
|
42
|
+
renderView(e, 'Tile', { slots: hitSlots(e, words), words })
|