@immediately-run/grove 0.1.1
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 +122 -0
- package/docs/ENGINE_BOUNDARY.md +233 -0
- package/llms.txt +115 -0
- package/package.json +82 -0
- package/src/App.tsx +131 -0
- package/src/GroveApp.css +2774 -0
- package/src/GroveWiki.tsx +386 -0
- package/src/components/AssetImage.tsx +58 -0
- package/src/components/Backlinks.tsx +104 -0
- package/src/components/Callout.tsx +26 -0
- package/src/components/ChildPages.tsx +40 -0
- package/src/components/DefaultLayout.tsx +27 -0
- package/src/components/Directory.tsx +65 -0
- package/src/components/DirectoryList.test.tsx +275 -0
- package/src/components/DirectoryList.tsx +189 -0
- package/src/components/DirectoryView.tsx +68 -0
- package/src/components/DocList.tsx +109 -0
- package/src/components/DocsByTag.tsx +13 -0
- package/src/components/Drawer.tsx +45 -0
- package/src/components/EntryHeader.tsx +51 -0
- package/src/components/FamilyTree.tsx +95 -0
- package/src/components/GroveAgent.tsx +264 -0
- package/src/components/GroveFooter.tsx +20 -0
- package/src/components/GroveNav.tsx +102 -0
- package/src/components/Icon.tsx +56 -0
- package/src/components/Infobox.tsx +19 -0
- package/src/components/Kbd.tsx +10 -0
- package/src/components/KeyValue.tsx +32 -0
- package/src/components/Lede.tsx +6 -0
- package/src/components/More.tsx +10 -0
- package/src/components/Outlet.tsx +11 -0
- package/src/components/PageMeta.tsx +24 -0
- package/src/components/PageView.tsx +98 -0
- package/src/components/Quote.tsx +36 -0
- package/src/components/RecentlyUpdated.tsx +6 -0
- package/src/components/SafeEntryBody.tsx +72 -0
- package/src/components/SafeLayout.tsx +35 -0
- package/src/components/ScrollToFragment.tsx +63 -0
- package/src/components/Search.tsx +127 -0
- package/src/components/Sidebar.tsx +118 -0
- package/src/components/TableOfContents.test.tsx +163 -0
- package/src/components/TableOfContents.tsx +101 -0
- package/src/components/TagCloud.tsx +46 -0
- package/src/components/TagList.tsx +31 -0
- package/src/components/Timeline.tsx +55 -0
- package/src/components/Toc.tsx +14 -0
- package/src/components/WikiLink.tsx +112 -0
- package/src/data/themes.ts +14 -0
- package/src/devfs.d.ts +4 -0
- package/src/hooks/useContentComponents.ts +122 -0
- package/src/hooks/useCorpusMetadata.ts +43 -0
- package/src/hooks/useDirectoryListing.ts +56 -0
- package/src/hooks/useHeadings.ts +96 -0
- package/src/hooks/useOpenWikiBoot.ts +95 -0
- package/src/index.css +120 -0
- package/src/lib/compose.test.ts +92 -0
- package/src/lib/compose.ts +99 -0
- package/src/lib/content.test.ts +269 -0
- package/src/lib/content.ts +267 -0
- package/src/lib/contentRoot.ts +61 -0
- package/src/lib/corpusComponents.test.ts +101 -0
- package/src/lib/corpusComponents.ts +117 -0
- package/src/lib/corpusScan.test.ts +157 -0
- package/src/lib/corpusScan.ts +105 -0
- package/src/lib/directory.test.ts +216 -0
- package/src/lib/directory.ts +262 -0
- package/src/lib/fragment.test.ts +88 -0
- package/src/lib/fragment.ts +55 -0
- package/src/lib/frontmatter.ts +26 -0
- package/src/lib/layout.ts +84 -0
- package/src/lib/openWiki.test.ts +216 -0
- package/src/lib/openWiki.ts +84 -0
- package/src/lib/queries.test.ts +74 -0
- package/src/lib/queries.ts +84 -0
- package/src/lib/safeIntrinsics.test.tsx +99 -0
- package/src/lib/safeIntrinsics.tsx +77 -0
- package/src/lib/safeRender.test.ts +359 -0
- package/src/lib/safeSources.ts +25 -0
- package/src/lib/shell.ts +71 -0
- package/src/lib/sourceCache.test.ts +66 -0
- package/src/lib/sourceCache.ts +42 -0
- package/src/lib/tocScroll.test.ts +71 -0
- package/src/lib/tocScroll.ts +93 -0
- package/src/lib/wiki.test.ts +194 -0
- package/src/lib/wiki.ts +175 -0
- package/src/lib.ts +54 -0
- package/src/main.tsx +19 -0
- package/src/mdx.d.ts +9 -0
- package/src/mdxComponents.ts +89 -0
- package/src/test/setup.ts +19 -0
- package/viewer-manifest.schema.json +62 -0
- package/viewer.manifest.json +267 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://immediately.run/viewer-manifest.schema.json",
|
|
4
|
+
"title": "immediately.run viewer component manifest",
|
|
5
|
+
"description": "The component vocabulary a directory-as-content VIEWER declares. Two-way surface (PLATFORM_LAYERING_SPEC §5 target 3): a corpus checker reads it to know which components a corpus may use, and a thin shell composing the viewer as a library (§1.1 M3) reads it to know which components it may override, with what props. The FORMAT is viewer-generic — a Lodestar manifest with a node/edge vocabulary validates through this same schema; only the entries are per-viewer.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["schemaVersion", "viewer", "components"],
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"$schema": { "type": "string" },
|
|
11
|
+
"schemaVersion": { "const": 1 },
|
|
12
|
+
"viewer": {
|
|
13
|
+
"type": "object",
|
|
14
|
+
"required": ["name"],
|
|
15
|
+
"additionalProperties": false,
|
|
16
|
+
"properties": {
|
|
17
|
+
"name": { "type": "string", "description": "The package name a shell imports." },
|
|
18
|
+
"kind": { "type": "string", "description": "The content kind this viewer renders (`wiki`, `board`, …) — display and discovery only; it confers nothing." },
|
|
19
|
+
"task": { "type": "string", "description": "The task CONTRACT this viewer provides, matching package.json `immediately.run.provides`." }
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"components": {
|
|
23
|
+
"type": "object",
|
|
24
|
+
"description": "Component name → its contract. A name absent here is INTERNAL: a corpus using it is flagged, and a shell overriding it fails visibly.",
|
|
25
|
+
"additionalProperties": {
|
|
26
|
+
"type": "object",
|
|
27
|
+
"required": ["tier", "overridable"],
|
|
28
|
+
"additionalProperties": false,
|
|
29
|
+
"properties": {
|
|
30
|
+
"tier": {
|
|
31
|
+
"enum": ["engine", "chrome", "corpus"],
|
|
32
|
+
"description": "`engine` renders any corpus and holds no opinion about its subject; `chrome` is site furniture a layout arranges; `corpus` is furniture encoding ONE corpus's frontmatter conventions, declared by that corpus rather than the engine (ENGINE_BOUNDARY §3)."
|
|
33
|
+
},
|
|
34
|
+
"overridable": {
|
|
35
|
+
"type": "boolean",
|
|
36
|
+
"description": "Whether a library-composing shell may replace it. False for components whose behaviour is engine mechanics rather than presentation."
|
|
37
|
+
},
|
|
38
|
+
"sanitizing": {
|
|
39
|
+
"type": "boolean",
|
|
40
|
+
"description": "Whether this component is a sanitizing wrapper on the interpreter path. An override of a sanitizing component inherits the obligation — that is why the flag is on the contract and not in a comment."
|
|
41
|
+
},
|
|
42
|
+
"props": {
|
|
43
|
+
"type": "object",
|
|
44
|
+
"description": "Prop name → a short type string (`string?`, `number?`, `node?`, `string[]?`). Documentation for an overriding shell, not a runtime check.",
|
|
45
|
+
"additionalProperties": { "type": "string" }
|
|
46
|
+
},
|
|
47
|
+
"summary": { "type": "string" }
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"frontmatter": {
|
|
52
|
+
"type": "object",
|
|
53
|
+
"description": "Frontmatter key OWNERSHIP (PLATFORM_LAYERING §5 target 1). Each side validates the keys it owns; pass-through is what keeps a foreign corpus with its own vocabulary renderable.",
|
|
54
|
+
"additionalProperties": false,
|
|
55
|
+
"properties": {
|
|
56
|
+
"engine": { "type": "array", "items": { "type": "string" }, "description": "Keys the ENGINE reads. Changing one changes rendering." },
|
|
57
|
+
"corpusTooling": { "type": "array", "items": { "type": "string" }, "description": "Keys a corpus's own tooling reads. The engine ignores them." },
|
|
58
|
+
"passThrough": { "type": "boolean", "description": "Whether unknown keys are allowed (they are carried, unread). False makes the vocabulary closed." }
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./viewer-manifest.schema.json",
|
|
3
|
+
"schemaVersion": 1,
|
|
4
|
+
"viewer": {
|
|
5
|
+
"name": "@immediately-run/grove",
|
|
6
|
+
"kind": "wiki",
|
|
7
|
+
"task": "open-wiki"
|
|
8
|
+
},
|
|
9
|
+
"components": {
|
|
10
|
+
"a": {
|
|
11
|
+
"tier": "engine",
|
|
12
|
+
"overridable": true,
|
|
13
|
+
"sanitizing": false,
|
|
14
|
+
"props": {
|
|
15
|
+
"href": "string?",
|
|
16
|
+
"children": "node?"
|
|
17
|
+
},
|
|
18
|
+
"summary": "Wiki-link resolver: renders the resolved / broken / self states for an in-corpus href."
|
|
19
|
+
},
|
|
20
|
+
"img": {
|
|
21
|
+
"tier": "engine",
|
|
22
|
+
"overridable": true,
|
|
23
|
+
"sanitizing": false,
|
|
24
|
+
"props": {
|
|
25
|
+
"src": "string?",
|
|
26
|
+
"alt": "string?"
|
|
27
|
+
},
|
|
28
|
+
"summary": "Resolves a mount-relative asset off the filesystem."
|
|
29
|
+
},
|
|
30
|
+
"Callout": {
|
|
31
|
+
"tier": "engine",
|
|
32
|
+
"overridable": true,
|
|
33
|
+
"sanitizing": false,
|
|
34
|
+
"props": {
|
|
35
|
+
"kind": "string?",
|
|
36
|
+
"title": "string?",
|
|
37
|
+
"children": "node?"
|
|
38
|
+
},
|
|
39
|
+
"summary": "An aside block with a kind (note / warning / \u2026)."
|
|
40
|
+
},
|
|
41
|
+
"Lede": {
|
|
42
|
+
"tier": "engine",
|
|
43
|
+
"overridable": true,
|
|
44
|
+
"sanitizing": false,
|
|
45
|
+
"props": {
|
|
46
|
+
"children": "node?"
|
|
47
|
+
},
|
|
48
|
+
"summary": "The opening paragraph, set apart typographically."
|
|
49
|
+
},
|
|
50
|
+
"Infobox": {
|
|
51
|
+
"tier": "engine",
|
|
52
|
+
"overridable": true,
|
|
53
|
+
"sanitizing": false,
|
|
54
|
+
"props": {
|
|
55
|
+
"title": "string?",
|
|
56
|
+
"children": "node?"
|
|
57
|
+
},
|
|
58
|
+
"summary": "The boxed summary panel a wiki entry carries beside its lede."
|
|
59
|
+
},
|
|
60
|
+
"More": {
|
|
61
|
+
"tier": "engine",
|
|
62
|
+
"overridable": true,
|
|
63
|
+
"sanitizing": false,
|
|
64
|
+
"props": {
|
|
65
|
+
"href": "string?",
|
|
66
|
+
"children": "node?"
|
|
67
|
+
},
|
|
68
|
+
"summary": "A 'read more' pointer to a related entry."
|
|
69
|
+
},
|
|
70
|
+
"DocList": {
|
|
71
|
+
"tier": "engine",
|
|
72
|
+
"overridable": true,
|
|
73
|
+
"sanitizing": false,
|
|
74
|
+
"props": {
|
|
75
|
+
"tag": "string?",
|
|
76
|
+
"limit": "number?"
|
|
77
|
+
},
|
|
78
|
+
"summary": "A queried list of entries \u2014 the generic index primitive."
|
|
79
|
+
},
|
|
80
|
+
"TagCloud": {
|
|
81
|
+
"tier": "engine",
|
|
82
|
+
"overridable": true,
|
|
83
|
+
"sanitizing": false,
|
|
84
|
+
"props": {
|
|
85
|
+
"limit": "number?"
|
|
86
|
+
},
|
|
87
|
+
"summary": "Every tag in the corpus, weighted by use."
|
|
88
|
+
},
|
|
89
|
+
"TagList": {
|
|
90
|
+
"tier": "engine",
|
|
91
|
+
"overridable": true,
|
|
92
|
+
"sanitizing": false,
|
|
93
|
+
"props": {
|
|
94
|
+
"tags": "string[]?"
|
|
95
|
+
},
|
|
96
|
+
"summary": "The tags of one entry, as links to their indexes."
|
|
97
|
+
},
|
|
98
|
+
"Directory": {
|
|
99
|
+
"tier": "engine",
|
|
100
|
+
"overridable": true,
|
|
101
|
+
"sanitizing": false,
|
|
102
|
+
"props": {
|
|
103
|
+
"path": "string?"
|
|
104
|
+
},
|
|
105
|
+
"summary": "The entries under one corpus directory."
|
|
106
|
+
},
|
|
107
|
+
"DirectoryList": {
|
|
108
|
+
"tier": "engine",
|
|
109
|
+
"overridable": true,
|
|
110
|
+
"sanitizing": false,
|
|
111
|
+
"props": {
|
|
112
|
+
"path": "string?",
|
|
113
|
+
"title": "string?",
|
|
114
|
+
"columns": "string?",
|
|
115
|
+
"sort": "string?",
|
|
116
|
+
"hidden": "boolean?"
|
|
117
|
+
},
|
|
118
|
+
"summary": "A folder listing as a table, with metadata columns chosen by `columns` and narrowed to those the rows actually carry."
|
|
119
|
+
},
|
|
120
|
+
"Quote": {
|
|
121
|
+
"tier": "engine",
|
|
122
|
+
"overridable": true,
|
|
123
|
+
"sanitizing": false,
|
|
124
|
+
"props": {
|
|
125
|
+
"cite": "string?",
|
|
126
|
+
"children": "node?"
|
|
127
|
+
},
|
|
128
|
+
"summary": "A pull quote with an optional citation."
|
|
129
|
+
},
|
|
130
|
+
"KeyValue": {
|
|
131
|
+
"tier": "engine",
|
|
132
|
+
"overridable": true,
|
|
133
|
+
"sanitizing": false,
|
|
134
|
+
"props": {
|
|
135
|
+
"children": "node?"
|
|
136
|
+
},
|
|
137
|
+
"summary": "A definition-list row for infobox-style facts."
|
|
138
|
+
},
|
|
139
|
+
"Kbd": {
|
|
140
|
+
"tier": "engine",
|
|
141
|
+
"overridable": true,
|
|
142
|
+
"sanitizing": false,
|
|
143
|
+
"props": {
|
|
144
|
+
"children": "node?"
|
|
145
|
+
},
|
|
146
|
+
"summary": "A keyboard key."
|
|
147
|
+
},
|
|
148
|
+
"Toc": {
|
|
149
|
+
"tier": "engine",
|
|
150
|
+
"overridable": true,
|
|
151
|
+
"sanitizing": false,
|
|
152
|
+
"props": {
|
|
153
|
+
"depth": "number?"
|
|
154
|
+
},
|
|
155
|
+
"summary": "The table of contents derived from the entry's heading anchors."
|
|
156
|
+
},
|
|
157
|
+
"TableOfContents": {
|
|
158
|
+
"tier": "engine",
|
|
159
|
+
"overridable": true,
|
|
160
|
+
"sanitizing": false,
|
|
161
|
+
"props": {
|
|
162
|
+
"entryKey": "string?",
|
|
163
|
+
"title": "string?",
|
|
164
|
+
"className": "string?"
|
|
165
|
+
},
|
|
166
|
+
"summary": "The on-this-page heading list, which keeps the active entry in view as the reader scrolls."
|
|
167
|
+
},
|
|
168
|
+
"Backlinks": {
|
|
169
|
+
"tier": "engine",
|
|
170
|
+
"overridable": true,
|
|
171
|
+
"sanitizing": false,
|
|
172
|
+
"props": {},
|
|
173
|
+
"summary": "Entries linking to this one."
|
|
174
|
+
},
|
|
175
|
+
"PageMeta": {
|
|
176
|
+
"tier": "engine",
|
|
177
|
+
"overridable": true,
|
|
178
|
+
"sanitizing": false,
|
|
179
|
+
"props": {},
|
|
180
|
+
"summary": "The entry's own metadata line (updated, reading time, \u2026)."
|
|
181
|
+
},
|
|
182
|
+
"RecentlyUpdated": {
|
|
183
|
+
"tier": "engine",
|
|
184
|
+
"overridable": true,
|
|
185
|
+
"sanitizing": false,
|
|
186
|
+
"props": {
|
|
187
|
+
"limit": "number?"
|
|
188
|
+
},
|
|
189
|
+
"summary": "The most recently updated entries."
|
|
190
|
+
},
|
|
191
|
+
"DocsByTag": {
|
|
192
|
+
"tier": "engine",
|
|
193
|
+
"overridable": true,
|
|
194
|
+
"sanitizing": false,
|
|
195
|
+
"props": {
|
|
196
|
+
"tag": "string?"
|
|
197
|
+
},
|
|
198
|
+
"summary": "Entries grouped under one tag."
|
|
199
|
+
},
|
|
200
|
+
"ChildPages": {
|
|
201
|
+
"tier": "engine",
|
|
202
|
+
"overridable": true,
|
|
203
|
+
"sanitizing": false,
|
|
204
|
+
"props": {},
|
|
205
|
+
"summary": "The entries nested under this one."
|
|
206
|
+
},
|
|
207
|
+
"Timeline": {
|
|
208
|
+
"tier": "engine",
|
|
209
|
+
"overridable": true,
|
|
210
|
+
"sanitizing": false,
|
|
211
|
+
"props": {
|
|
212
|
+
"children": "node?"
|
|
213
|
+
},
|
|
214
|
+
"summary": "A dated sequence of entries or events."
|
|
215
|
+
},
|
|
216
|
+
"FamilyTree": {
|
|
217
|
+
"tier": "engine",
|
|
218
|
+
"overridable": true,
|
|
219
|
+
"sanitizing": false,
|
|
220
|
+
"props": {
|
|
221
|
+
"children": "node?"
|
|
222
|
+
},
|
|
223
|
+
"summary": "A relationship graph rendered from frontmatter links."
|
|
224
|
+
},
|
|
225
|
+
"Outlet": {
|
|
226
|
+
"tier": "engine",
|
|
227
|
+
"overridable": false,
|
|
228
|
+
"sanitizing": false,
|
|
229
|
+
"props": {},
|
|
230
|
+
"summary": "The layout chain's inward slot. NOT overridable \u2014 the chain's nesting is engine mechanics, and replacing it detaches every layer from the page it wraps."
|
|
231
|
+
},
|
|
232
|
+
"GroveNav": {
|
|
233
|
+
"tier": "chrome",
|
|
234
|
+
"overridable": true,
|
|
235
|
+
"sanitizing": false,
|
|
236
|
+
"props": {},
|
|
237
|
+
"summary": "Top/side navigation. Reads the shell context, so an override must too (or render its own)."
|
|
238
|
+
},
|
|
239
|
+
"GroveSidebar": {
|
|
240
|
+
"tier": "chrome",
|
|
241
|
+
"overridable": true,
|
|
242
|
+
"sanitizing": false,
|
|
243
|
+
"props": {},
|
|
244
|
+
"summary": "The corpus tree sidebar."
|
|
245
|
+
},
|
|
246
|
+
"GroveFooter": {
|
|
247
|
+
"tier": "chrome",
|
|
248
|
+
"overridable": true,
|
|
249
|
+
"sanitizing": false,
|
|
250
|
+
"props": {},
|
|
251
|
+
"summary": "The site footer."
|
|
252
|
+
}
|
|
253
|
+
},
|
|
254
|
+
"frontmatter": {
|
|
255
|
+
"engine": [
|
|
256
|
+
"site",
|
|
257
|
+
"layout",
|
|
258
|
+
"view",
|
|
259
|
+
"frame",
|
|
260
|
+
"render",
|
|
261
|
+
"nav",
|
|
262
|
+
"order",
|
|
263
|
+
"tags"
|
|
264
|
+
],
|
|
265
|
+
"passThrough": true
|
|
266
|
+
}
|
|
267
|
+
}
|