@anthusai/papyrus 5.45.0 → 5.46.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 +6 -0
- package/amplify/data/resource.ts +7 -0
- package/amplify/data/schema.js +6 -0
- package/amplify/data/schema.ts +7 -0
- package/amplify/functions/content-actions/handler.py +8 -0
- package/bin/papyrus-app.mjs +12 -1
- package/components/news-desk-client-provider.tsx +2 -2
- package/components/newsroom-ops-overview.tsx +63 -60
- package/components/newsroom-ops-shell.tsx +3 -1
- package/components/newsroom-organizer.css +1 -2
- package/components/newsroom-references-view.tsx +119 -7
- package/components/notification-cards.tsx +364 -0
- package/components/notification-center.tsx +319 -331
- package/components/reference-capture-client.ts +110 -0
- package/components/reference-capture-panel.tsx +180 -0
- package/components/reference-feed.tsx +93 -60
- package/components/reference-review-card.tsx +21 -66
- package/components/references-prefetch.ts +5 -0
- package/components/review-rating-grid.tsx +27 -14
- package/components/topic-steering-workspace.tsx +12 -2
- package/components/use-reference-ratings.ts +132 -0
- package/lib/category-repository.ts +2 -0
- package/lib/content-actions-client.ts +18 -0
- package/lib/local-preview-feed-fixture.ts +20 -0
- package/lib/newsroom-nav.ts +1 -1
- package/lib/newsroom-organizer-nav.ts +1 -1
- package/lib/notification-feed.ts +250 -0
- package/lib/reference-capture.ts +293 -0
- package/lib/reference-feed-cache.ts +37 -0
- package/lib/reference-feed-ranking.ts +44 -0
- package/lib/review-drafts.ts +8 -3
- package/lib/site-brand.ts +2 -0
- package/package.json +7 -1
- package/routes.manifest.json +1 -1
package/lib/review-drafts.ts
CHANGED
|
@@ -44,10 +44,12 @@ export const MAXIMUM_SOURCES = 5;
|
|
|
44
44
|
const MAXIMUM_EVIDENCE = 3;
|
|
45
45
|
const KIND_WORDS: Record<string, string> = { story_draft: "Story draft", new_concept: "New concept", rename: "Rename", merge: "Merge", split: "Split", new_column: "New column", element_symbol: "Element symbol" };
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
/** JSON fields arrive as strings, and a field written through `JSON.stringify` of a string arrives encoded twice: unwrap until it is not text. */
|
|
48
|
+
function parseJson(value: unknown, depth = 0): unknown {
|
|
48
49
|
if (typeof value !== "string") return value ?? null;
|
|
49
50
|
try {
|
|
50
|
-
|
|
51
|
+
const parsed: unknown = JSON.parse(value);
|
|
52
|
+
return typeof parsed === "string" && depth < 2 ? parseJson(parsed, depth + 1) : parsed;
|
|
51
53
|
} catch {
|
|
52
54
|
return null;
|
|
53
55
|
}
|
|
@@ -96,7 +98,10 @@ function evidenceLines(row: DraftRow): string[] {
|
|
|
96
98
|
const source = evidence && typeof evidence === "object" && typeof (evidence as { source?: unknown }).source === "string" ? String((evidence as { source: string }).source) : "";
|
|
97
99
|
if (!source) return [];
|
|
98
100
|
const monitor = source.match(/^(.+?) monitor:/);
|
|
99
|
-
|
|
101
|
+
const lines = [monitor ? `Found by the ${monitor[1]} monitor.` : source];
|
|
102
|
+
const check = body.match(/relevance check labelled it (\w+) with a score of (\d+(?:\.\d+)?)\./i);
|
|
103
|
+
if (check) lines.push(`Relevance check: ${check[1]}, score ${check[2]}.`);
|
|
104
|
+
return lines;
|
|
100
105
|
}
|
|
101
106
|
|
|
102
107
|
export function draftChoiceOf(state: string): DraftChoice | null {
|
package/lib/site-brand.ts
CHANGED
|
@@ -26,6 +26,8 @@ export type SiteBrandId = string;
|
|
|
26
26
|
export type SiteBrandComponents = {
|
|
27
27
|
/** The mark shown at the top of the newsroom CMS sidebar in place of the app title. */
|
|
28
28
|
NewsroomLogo?: ComponentType<{ className?: string }>;
|
|
29
|
+
/** A compact mark for the mobile newsroom top bar. Without it the bar scales down `NewsroomLogo`. */
|
|
30
|
+
NewsroomLogoCompact?: ComponentType<{ className?: string }>;
|
|
29
31
|
PictogramFigure?: ComponentType<PictogramFigureProps>;
|
|
30
32
|
BlogPageBackground?: ComponentType<BlogPageBackgroundProps>;
|
|
31
33
|
};
|
package/package.json
CHANGED
|
@@ -117,6 +117,7 @@
|
|
|
117
117
|
"./components/newsroom-theme-fonts/refined-newsprint": "./components/newsroom-theme-fonts/refined-newsprint.tsx",
|
|
118
118
|
"./components/newsroom-theme": "./components/newsroom-theme.tsx",
|
|
119
119
|
"./components/newsroom-topics-view": "./components/newsroom-topics-view.tsx",
|
|
120
|
+
"./components/notification-cards": "./components/notification-cards.tsx",
|
|
120
121
|
"./components/notification-center": "./components/notification-center.tsx",
|
|
121
122
|
"./components/papyrus-console-conversation": "./components/papyrus-console-conversation.tsx",
|
|
122
123
|
"./components/papyrus-console-frame": "./components/papyrus-console-frame.tsx",
|
|
@@ -136,6 +137,8 @@
|
|
|
136
137
|
"./components/reader-settings": "./components/reader-settings.ts",
|
|
137
138
|
"./components/reader-theme-control": "./components/reader-theme-control.tsx",
|
|
138
139
|
"./components/reference-add-entry": "./components/reference-add-entry.tsx",
|
|
140
|
+
"./components/reference-capture-client": "./components/reference-capture-client.ts",
|
|
141
|
+
"./components/reference-capture-panel": "./components/reference-capture-panel.tsx",
|
|
139
142
|
"./components/reference-curation-controls": "./components/reference-curation-controls.tsx",
|
|
140
143
|
"./components/reference-cyclotron-priming": "./components/reference-cyclotron-priming.tsx",
|
|
141
144
|
"./components/reference-cyclotron-status": "./components/reference-cyclotron-status.tsx",
|
|
@@ -180,6 +183,7 @@
|
|
|
180
183
|
"./components/use-editorial-checks": "./components/use-editorial-checks.ts",
|
|
181
184
|
"./components/use-near-viewport": "./components/use-near-viewport.ts",
|
|
182
185
|
"./components/use-paged-content-item-versions": "./components/use-paged-content-item-versions.ts",
|
|
186
|
+
"./components/use-reference-ratings": "./components/use-reference-ratings.ts",
|
|
183
187
|
"./components/use-resolved-papyrus-theme": "./components/use-resolved-papyrus-theme.ts",
|
|
184
188
|
"./components/use-rhythm-overlay": "./components/use-rhythm-overlay.ts",
|
|
185
189
|
"./components/wiki-concepts-view": "./components/wiki-concepts-view.tsx",
|
|
@@ -288,6 +292,7 @@
|
|
|
288
292
|
"./lib/newsroom-section-routing": "./lib/newsroom-section-routing.ts",
|
|
289
293
|
"./lib/newsroom-sections": "./lib/newsroom-sections.ts",
|
|
290
294
|
"./lib/newsroom-topics": "./lib/newsroom-topics.ts",
|
|
295
|
+
"./lib/notification-feed": "./lib/notification-feed.ts",
|
|
291
296
|
"./lib/oauth-redirect-priority": "./lib/oauth-redirect-priority.ts",
|
|
292
297
|
"./lib/papyrus-chat-admission": "./lib/papyrus-chat-admission.ts",
|
|
293
298
|
"./lib/papyrus-hosted-chat": "./lib/papyrus-hosted-chat.ts",
|
|
@@ -320,6 +325,7 @@
|
|
|
320
325
|
"./lib/reader-static-params": "./lib/reader-static-params.ts",
|
|
321
326
|
"./lib/reader-storage-url": "./lib/reader-storage-url.ts",
|
|
322
327
|
"./lib/reader-subject": "./lib/reader-subject.ts",
|
|
328
|
+
"./lib/reference-capture": "./lib/reference-capture.ts",
|
|
323
329
|
"./lib/reference-display": "./lib/reference-display.ts",
|
|
324
330
|
"./lib/reference-feed-cache": "./lib/reference-feed-cache.ts",
|
|
325
331
|
"./lib/reference-feed-ranking": "./lib/reference-feed-ranking.ts",
|
|
@@ -480,7 +486,7 @@
|
|
|
480
486
|
"optional": true
|
|
481
487
|
}
|
|
482
488
|
},
|
|
483
|
-
"version": "5.
|
|
489
|
+
"version": "5.46.0",
|
|
484
490
|
"dependencies": {
|
|
485
491
|
"@aws-amplify/adapter-nextjs": "^1.7.3",
|
|
486
492
|
"@aws-crypto/sha256-js": "5.2.0",
|
package/routes.manifest.json
CHANGED