@anthusai/papyrus 1.9.0 → 1.11.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/amplify/data/resource.js +3 -3
- package/amplify/data/resource.ts +3 -3
- package/amplify/functions/category-action/handler.ts +18 -18
- package/amplify/functions/console-chat-responder/src/main.rs +1 -1
- package/amplify/functions/content-actions/handler.py +23 -0
- package/amplify/functions/content-actions/requirements.txt +1 -1
- package/amplify/functions/content-actions/resource.js +1 -1
- package/amplify/functions/content-actions/resource.ts +1 -1
- package/amplify/functions/renditions/requirements.txt +1 -1
- package/amplify/functions/shared/slack-events.ts +2 -2
- package/amplify/publication/renditions-function.js +1 -1
- package/amplify/publication/renditions-function.ts +1 -1
- package/app/api/local-preview/derive/route.ts +28 -0
- package/app/api/local-preview/media/route.ts +25 -0
- package/app/globals.css +28 -28
- package/app/layout.tsx +8 -5
- package/app/newsroom/[section]/[...selection]/page.tsx +0 -1
- package/app/newsroom/[section]/page.tsx +0 -1
- package/app/newsroom/insights/[threadId]/page.tsx +5 -16
- package/app/newsroom/insights/page.tsx +4 -12
- package/components/board-card-excerpts.tsx +45 -0
- package/components/markus-ir-preview.tsx +47 -2
- package/components/news-desk-page.tsx +0 -1
- package/components/news-desk-taxonomy-client.ts +28 -222
- package/components/newsroom-article-editor.tsx +138 -40
- package/components/newsroom-assignment-detail.tsx +79 -0
- package/components/newsroom-board-view.tsx +44 -9
- package/components/newsroom-newsprint-board.css +9 -2
- package/components/newsroom-ops-overview.tsx +27 -5
- package/components/newsroom-organizer-shell.tsx +25 -7
- package/components/newsroom-organizer.css +217 -6
- package/components/newsroom-topics-view.tsx +1 -1
- package/components/priming-proof-page.tsx +17 -8
- package/components/prospectus-account-chooser.tsx +103 -0
- package/components/story-reporting-trail-client.ts +91 -0
- package/components/story-reporting-trail.tsx +115 -0
- package/components/topic-steering-workspace.tsx +154 -671
- package/components/ui/sheet.tsx +10 -4
- package/components/wiki-concepts-view.tsx +153 -0
- package/components/wiki-index-client.ts +51 -0
- package/lib/approved-priming-proof-reports.ts +6 -3
- package/lib/approved-priming-proofs/papyrus.json +90 -0
- package/lib/content-actions-client.ts +3 -0
- package/lib/content-actions-demo.ts +55 -0
- package/lib/content-item-lifecycle.ts +4 -2
- package/lib/front-matter-fields.ts +42 -0
- package/lib/front-mosaic.ts +2 -1
- package/lib/layout-plan.ts +3 -2
- package/lib/layout-warnings.ts +8 -0
- package/lib/local-preview-seed.ts +53 -0
- package/lib/newsroom-articles.ts +2 -0
- package/lib/newsroom-assignments.ts +13 -0
- package/lib/newsroom-board.ts +4 -0
- package/lib/newsroom-forum-routes.ts +2 -43
- package/lib/newsroom-index-filters.ts +3 -40
- package/lib/newsroom-media-backend.ts +5 -0
- package/lib/newsroom-nav.ts +1 -3
- package/lib/newsroom-organizer-nav.ts +5 -12
- package/lib/newsroom-section-routing.ts +1 -1
- package/lib/newsroom-sections.ts +12 -0
- package/lib/papyrus-web-locations.ts +3 -24
- package/lib/priming-proof-report.ts +1 -0
- package/lib/semantic-graph.ts +5 -5
- package/lib/site-brand.ts +9 -0
- package/lib/story-reporting-trail.ts +106 -0
- package/lib/wiki.ts +56 -0
- package/package.json +14 -1
- package/routes.manifest.json +23 -7
package/lib/wiki.ts
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { SemanticNodeRecord } from "./category-repository";
|
|
2
|
+
|
|
3
|
+
/** The wiki's front page is an ordinary content item with this slug; its Markus body holds the dynamic components. */
|
|
4
|
+
export const WIKI_INDEX_SLUG = "wiki-index";
|
|
5
|
+
export const WIKI_PAGE_ITEM_TYPE = "wiki_page";
|
|
6
|
+
export const WIKI_CONCEPT_LINK_SCHEME = "concept:";
|
|
7
|
+
|
|
8
|
+
export const DEFAULT_WIKI_INDEX_MARKUS = `# Concept wiki
|
|
9
|
+
|
|
10
|
+
Every page in this wiki is a concept: an entity in the knowledge graph that the newsroom has reported on, researched or cited. Open one to see what it is, what it connects to, and the references behind it.
|
|
11
|
+
|
|
12
|
+
## Recently edited
|
|
13
|
+
|
|
14
|
+
::recent-concepts{limit=10}
|
|
15
|
+
|
|
16
|
+
## Browse all concepts
|
|
17
|
+
|
|
18
|
+
::concept-list
|
|
19
|
+
`;
|
|
20
|
+
|
|
21
|
+
export function conceptEditedAt(node: SemanticNodeRecord): string {
|
|
22
|
+
return node.updatedAt ?? node.versionCreatedAt ?? node.createdAt ?? "";
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export function conceptTitle(node: SemanticNodeRecord): string {
|
|
26
|
+
return node.displayName?.trim() || node.nodeKey;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export function conceptId(node: SemanticNodeRecord): string {
|
|
30
|
+
return node.lineageId ?? node.id;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export function recentlyEditedConcepts(nodes: readonly SemanticNodeRecord[], options: { limit?: number; kind?: string | null } = {}): SemanticNodeRecord[] {
|
|
34
|
+
const { limit = 10, kind = null } = options;
|
|
35
|
+
return nodes
|
|
36
|
+
.filter(node => !kind || node.nodeKind === kind)
|
|
37
|
+
.slice()
|
|
38
|
+
.sort((left, right) => conceptEditedAt(right).localeCompare(conceptEditedAt(left)) || conceptTitle(left).localeCompare(conceptTitle(right)))
|
|
39
|
+
.slice(0, limit);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function conceptsByTitle(nodes: readonly SemanticNodeRecord[], options: { kind?: string | null; limit?: number | null } = {}): SemanticNodeRecord[] {
|
|
43
|
+
const filtered = nodes.filter(node => !options.kind || node.nodeKind === options.kind).slice().sort((left, right) => conceptTitle(left).localeCompare(conceptTitle(right)));
|
|
44
|
+
return options.limit ? filtered.slice(0, options.limit) : filtered;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/** Finds the concept a `concept:<key>` wiki link names, by lineage id, node key or title. */
|
|
48
|
+
export function resolveConceptLink(href: string, nodes: readonly SemanticNodeRecord[]): SemanticNodeRecord | null {
|
|
49
|
+
if (!href.startsWith(WIKI_CONCEPT_LINK_SCHEME)) return null;
|
|
50
|
+
const reference = decodeURIComponent(href.slice(WIKI_CONCEPT_LINK_SCHEME.length)).trim().toLowerCase();
|
|
51
|
+
return nodes.find(node => conceptId(node).toLowerCase() === reference || node.nodeKey.toLowerCase() === reference || conceptTitle(node).toLowerCase() === reference) ?? null;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function conceptWikiPath(node: SemanticNodeRecord): string {
|
|
55
|
+
return `/newsroom/concepts/${encodeURIComponent(conceptId(node))}`;
|
|
56
|
+
}
|
package/package.json
CHANGED
|
@@ -75,6 +75,7 @@
|
|
|
75
75
|
"./components/archive-shell": "./components/archive-shell.tsx",
|
|
76
76
|
"./components/article-video": "./components/article-video.tsx",
|
|
77
77
|
"./components/blog-page-background": "./components/blog-page-background.tsx",
|
|
78
|
+
"./components/board-card-excerpts": "./components/board-card-excerpts.tsx",
|
|
78
79
|
"./components/dev-sandbox-editor-sign-in": "./components/dev-sandbox-editor-sign-in.tsx",
|
|
79
80
|
"./components/markus-ir-preview": "./components/markus-ir-preview.tsx",
|
|
80
81
|
"./components/news-desk-client-provider": "./components/news-desk-client-provider.tsx",
|
|
@@ -84,6 +85,7 @@
|
|
|
84
85
|
"./components/newsroom-access-gate": "./components/newsroom-access-gate.tsx",
|
|
85
86
|
"./components/newsroom-article-editor": "./components/newsroom-article-editor.tsx",
|
|
86
87
|
"./components/newsroom-articles-view": "./components/newsroom-articles-view.tsx",
|
|
88
|
+
"./components/newsroom-assignment-detail": "./components/newsroom-assignment-detail.tsx",
|
|
87
89
|
"./components/newsroom-assignments-view": "./components/newsroom-assignments-view.tsx",
|
|
88
90
|
"./components/newsroom-board-view": "./components/newsroom-board-view.tsx",
|
|
89
91
|
"./components/newsroom-client-shell": "./components/newsroom-client-shell.tsx",
|
|
@@ -99,6 +101,7 @@
|
|
|
99
101
|
"./components/presentation-header": "./components/presentation-header.tsx",
|
|
100
102
|
"./components/presentation-rhythm-hrule": "./components/presentation-rhythm-hrule.tsx",
|
|
101
103
|
"./components/priming-proof-page": "./components/priming-proof-page.tsx",
|
|
104
|
+
"./components/prospectus-account-chooser": "./components/prospectus-account-chooser.tsx",
|
|
102
105
|
"./components/publication-cyclotron-panel": "./components/publication-cyclotron-panel.tsx",
|
|
103
106
|
"./components/reader-auth-control": "./components/reader-auth-control.tsx",
|
|
104
107
|
"./components/reader-auth-state": "./components/reader-auth-state.ts",
|
|
@@ -113,6 +116,8 @@
|
|
|
113
116
|
"./components/settings-page": "./components/settings-page.tsx",
|
|
114
117
|
"./components/signup-entries-panel": "./components/signup-entries-panel.tsx",
|
|
115
118
|
"./components/staging-banner": "./components/staging-banner.tsx",
|
|
119
|
+
"./components/story-reporting-trail-client": "./components/story-reporting-trail-client.ts",
|
|
120
|
+
"./components/story-reporting-trail": "./components/story-reporting-trail.tsx",
|
|
116
121
|
"./components/topic-steering-workspace": "./components/topic-steering-workspace.tsx",
|
|
117
122
|
"./components/ui/badge": "./components/ui/badge.tsx",
|
|
118
123
|
"./components/ui/button-group": "./components/ui/button-group.tsx",
|
|
@@ -138,6 +143,8 @@
|
|
|
138
143
|
"./components/use-paged-content-item-versions": "./components/use-paged-content-item-versions.ts",
|
|
139
144
|
"./components/use-resolved-papyrus-theme": "./components/use-resolved-papyrus-theme.ts",
|
|
140
145
|
"./components/use-rhythm-overlay": "./components/use-rhythm-overlay.ts",
|
|
146
|
+
"./components/wiki-concepts-view": "./components/wiki-concepts-view.tsx",
|
|
147
|
+
"./components/wiki-index-client": "./components/wiki-index-client.ts",
|
|
141
148
|
"./lib/amplify-outputs-guard": "./lib/amplify-outputs-guard.ts",
|
|
142
149
|
"./lib/amplify-outputs-path": "./lib/amplify-outputs-path.ts",
|
|
143
150
|
"./lib/amplify-server-runtime": "./lib/amplify-server-runtime.ts",
|
|
@@ -173,6 +180,7 @@
|
|
|
173
180
|
"./lib/edition-sections": "./lib/edition-sections.ts",
|
|
174
181
|
"./lib/empty-edition-layout-plan": "./lib/empty-edition-layout-plan.ts",
|
|
175
182
|
"./lib/excerpts": "./lib/excerpts.ts",
|
|
183
|
+
"./lib/front-matter-fields": "./lib/front-matter-fields.ts",
|
|
176
184
|
"./lib/front-mosaic": "./lib/front-mosaic.ts",
|
|
177
185
|
"./lib/furniture": "./lib/furniture.ts",
|
|
178
186
|
"./lib/graphql-content-repository": "./lib/graphql-content-repository.ts",
|
|
@@ -182,6 +190,7 @@
|
|
|
182
190
|
"./lib/layout-plan": "./lib/layout-plan.ts",
|
|
183
191
|
"./lib/layout-scenarios": "./lib/layout-scenarios.ts",
|
|
184
192
|
"./lib/layout-types": "./lib/layout-types.ts",
|
|
193
|
+
"./lib/layout-warnings": "./lib/layout-warnings.ts",
|
|
185
194
|
"./lib/local-preview-seed": "./lib/local-preview-seed.ts",
|
|
186
195
|
"./lib/local-preview": "./lib/local-preview.ts",
|
|
187
196
|
"./lib/markus-body": "./lib/markus-body.ts",
|
|
@@ -257,6 +266,7 @@
|
|
|
257
266
|
"./lib/staging-gate": "./lib/staging-gate.ts",
|
|
258
267
|
"./lib/staging-gated-path": "./lib/staging-gated-path.ts",
|
|
259
268
|
"./lib/staging-preview-object": "./lib/staging-preview-object.ts",
|
|
269
|
+
"./lib/story-reporting-trail": "./lib/story-reporting-trail.ts",
|
|
260
270
|
"./lib/test-editor-override": "./lib/test-editor-override.ts",
|
|
261
271
|
"./lib/text-columns": "./lib/text-columns.ts",
|
|
262
272
|
"./lib/themed-image": "./lib/themed-image.ts",
|
|
@@ -264,6 +274,7 @@
|
|
|
264
274
|
"./lib/video-loading": "./lib/video-loading.ts",
|
|
265
275
|
"./lib/video-mode": "./lib/video-mode.ts",
|
|
266
276
|
"./lib/video-script": "./lib/video-script.ts",
|
|
277
|
+
"./lib/wiki": "./lib/wiki.ts",
|
|
267
278
|
"./renderers/markus/index": "./renderers/markus/index.ts",
|
|
268
279
|
"./renderers/markus/stubs": "./renderers/markus/stubs.tsx",
|
|
269
280
|
"./renderers/pretext/article-page": "./renderers/pretext/article-page.tsx",
|
|
@@ -286,6 +297,8 @@
|
|
|
286
297
|
"./app/api/auth/prospectus/sign-in/route": "./app/api/auth/prospectus/sign-in/route.ts",
|
|
287
298
|
"./app/api/auth/prospectus/sign-out/route": "./app/api/auth/prospectus/sign-out/route.ts",
|
|
288
299
|
"./app/api/cyclotron/priming-proof/route": "./app/api/cyclotron/priming-proof/route.ts",
|
|
300
|
+
"./app/api/local-preview/derive/route": "./app/api/local-preview/derive/route.ts",
|
|
301
|
+
"./app/api/local-preview/media/route": "./app/api/local-preview/media/route.ts",
|
|
289
302
|
"./app/api/media/[...path]/route": "./app/api/media/[...path]/route.ts",
|
|
290
303
|
"./app/api/revalidate/route": "./app/api/revalidate/route.ts",
|
|
291
304
|
"./app/archive/page": "./app/archive/page.tsx",
|
|
@@ -352,7 +365,7 @@
|
|
|
352
365
|
"optional": true
|
|
353
366
|
}
|
|
354
367
|
},
|
|
355
|
-
"version": "1.
|
|
368
|
+
"version": "1.11.0",
|
|
356
369
|
"dependencies": {
|
|
357
370
|
"@aws-amplify/adapter-nextjs": "^1.7.3",
|
|
358
371
|
"@aws-crypto/sha256-js": "5.2.0",
|
package/routes.manifest.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.
|
|
2
|
+
"version": "1.11.0",
|
|
3
3
|
"routes": [
|
|
4
4
|
{
|
|
5
5
|
"file": "app/%5F_preview/[[...path]]/route.ts",
|
|
@@ -129,6 +129,26 @@
|
|
|
129
129
|
],
|
|
130
130
|
"config": {}
|
|
131
131
|
},
|
|
132
|
+
{
|
|
133
|
+
"file": "app/api/local-preview/derive/route.ts",
|
|
134
|
+
"hasDefault": false,
|
|
135
|
+
"exports": [
|
|
136
|
+
"POST"
|
|
137
|
+
],
|
|
138
|
+
"config": {
|
|
139
|
+
"dynamic": "\"force-dynamic\""
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"file": "app/api/local-preview/media/route.ts",
|
|
144
|
+
"hasDefault": false,
|
|
145
|
+
"exports": [
|
|
146
|
+
"GET"
|
|
147
|
+
],
|
|
148
|
+
"config": {
|
|
149
|
+
"dynamic": "\"force-dynamic\""
|
|
150
|
+
}
|
|
151
|
+
},
|
|
132
152
|
{
|
|
133
153
|
"file": "app/api/media/[...path]/route.ts",
|
|
134
154
|
"hasDefault": false,
|
|
@@ -230,17 +250,13 @@
|
|
|
230
250
|
"file": "app/newsroom/insights/[threadId]/page.tsx",
|
|
231
251
|
"hasDefault": true,
|
|
232
252
|
"exports": [],
|
|
233
|
-
"config": {
|
|
234
|
-
"dynamic": "\"force-dynamic\""
|
|
235
|
-
}
|
|
253
|
+
"config": {}
|
|
236
254
|
},
|
|
237
255
|
{
|
|
238
256
|
"file": "app/newsroom/insights/page.tsx",
|
|
239
257
|
"hasDefault": true,
|
|
240
258
|
"exports": [],
|
|
241
|
-
"config": {
|
|
242
|
-
"dynamic": "\"force-dynamic\""
|
|
243
|
-
}
|
|
259
|
+
"config": {}
|
|
244
260
|
},
|
|
245
261
|
{
|
|
246
262
|
"file": "app/newsroom/layout.tsx",
|