@anthusai/papyrus 2.0.0-next.1 → 2.0.0-next.10

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.
Files changed (68) hide show
  1. package/amplify/data/resource.js +7 -0
  2. package/amplify/data/resource.ts +8 -0
  3. package/amplify/data/schema.js +8 -0
  4. package/amplify/data/schema.ts +9 -0
  5. package/amplify/functions/assignment-action/data-access.js +88 -0
  6. package/amplify/functions/assignment-action/data-access.ts +87 -0
  7. package/amplify/functions/content-actions/handler.py +7 -0
  8. package/amplify/functions/model-attachment-upload/handler.ts +1 -0
  9. package/amplify/plugins/editorial-checks/function/handler.py +14 -0
  10. package/amplify/plugins/editorial-checks/function/requirements.txt +1 -0
  11. package/amplify/plugins/editorial-checks/function/resource.js +43 -0
  12. package/amplify/plugins/editorial-checks/function/resource.ts +60 -0
  13. package/amplify/plugins/editorial-checks/papyrus.plugin.js +71 -0
  14. package/amplify/plugins/editorial-checks/papyrus.plugin.ts +87 -0
  15. package/amplify/plugins/editorial-checks/schema.js +94 -0
  16. package/amplify/plugins/editorial-checks/schema.ts +96 -0
  17. package/amplify/plugins/registry.js +2 -0
  18. package/amplify/plugins/registry.ts +2 -0
  19. package/amplify/site-backend.js +5 -0
  20. package/amplify/site-backend.ts +11 -0
  21. package/components/editorial-checks-admin-panel.tsx +337 -0
  22. package/components/editorial-finding-card.tsx +162 -0
  23. package/components/editorial-findings-panel.tsx +91 -0
  24. package/components/editorial-preview-popover.tsx +103 -0
  25. package/components/markus-body-editor.tsx +213 -0
  26. package/components/markus-ir-preview.tsx +147 -6
  27. package/components/newsroom-article-editor.tsx +138 -11
  28. package/components/newsroom-board-view.tsx +6 -7
  29. package/components/newsroom-ops-shell.tsx +7 -3
  30. package/components/newsroom-organizer.css +57 -61
  31. package/components/newsroom-theme-fonts/broadsheet-green.css +10 -0
  32. package/components/newsroom-theme-fonts/broadsheet-green.tsx +6 -0
  33. package/components/newsroom-theme-fonts/newspaper-gothic.css +9 -0
  34. package/components/newsroom-theme-fonts/newspaper-gothic.tsx +6 -0
  35. package/components/newsroom-theme-fonts/night-desk.css +10 -0
  36. package/components/newsroom-theme-fonts/night-desk.tsx +6 -0
  37. package/components/newsroom-theme-fonts/refined-newsprint.css +11 -0
  38. package/components/newsroom-theme-fonts/refined-newsprint.tsx +6 -0
  39. package/components/newsroom-theme.css +39 -0
  40. package/components/newsroom-theme.tsx +33 -0
  41. package/components/reference-cyclotron-priming.tsx +12 -13
  42. package/components/reference-cyclotron-status.tsx +4 -4
  43. package/components/reference-cyclotron-suggestion.tsx +6 -6
  44. package/components/reference-live-agreement.tsx +10 -10
  45. package/components/reference-priming.tsx +1 -1
  46. package/components/reference-relevance-review.tsx +1 -1
  47. package/components/reference-section-suggestion.tsx +1 -1
  48. package/components/topic-steering-workspace.tsx +19 -1
  49. package/components/use-editorial-checks.ts +131 -0
  50. package/lib/cyclotron-suggestions.ts +9 -9
  51. package/lib/editorial-checks-backend.ts +16 -0
  52. package/lib/editorial-checks-client.ts +194 -0
  53. package/lib/editorial-checks-demo.ts +147 -0
  54. package/lib/editorial-checks-settings.ts +24 -0
  55. package/lib/editorial-checks.ts +178 -0
  56. package/lib/editorial-preview.ts +228 -0
  57. package/lib/newsroom-board.ts +27 -2
  58. package/lib/relevance-status.ts +4 -4
  59. package/lib/site-brand.ts +17 -0
  60. package/package.json +34 -2
  61. package/routes.manifest.json +1 -1
  62. package/components/newsroom-fonts/playfair-display-700.ttf +0 -0
  63. package/components/newsroom-fonts/playfair-display-900.ttf +0 -0
  64. package/components/newsroom-fonts/playfair-display-OFL.txt +0 -93
  65. package/components/newsroom-fonts/plus-jakarta-sans-400.ttf +0 -0
  66. package/components/newsroom-fonts/plus-jakarta-sans-600.ttf +0 -0
  67. package/components/newsroom-fonts/plus-jakarta-sans-OFL.txt +0 -93
  68. package/components/newsroom-newsprint-board.css +0 -7
package/lib/site-brand.ts CHANGED
@@ -3,6 +3,7 @@ import type { ComponentType } from "react";
3
3
  import type { EditionPresentationFormat } from "./content-types";
4
4
  import type { Article, ArticleVideoAsset } from "./articles";
5
5
  import type { BlogPageBackgroundProps } from "../components/blog-page-background";
6
+ import type { KanbusThemeId } from "@kanbus/ui";
6
7
  import type { SiteBrandFont } from "./brand-fonts";
7
8
  import type { PictogramFigureProps } from "../components/pictogram-figure";
8
9
  import papyrusSite from "papyrus-site";
@@ -118,6 +119,13 @@ export type SiteBrand = {
118
119
  defaultVideoCredit?: string;
119
120
  themePack: ThemePackId;
120
121
  themeTokens: ThemePackTokens;
122
+ /**
123
+ * The Kanbus editorial theme the whole newsroom (sidebar, toolbar, boards,
124
+ * detail panel) renders in. Hard-coded per publication: editors cannot
125
+ * change it. Per-publication tweaks are `--kb-theme-*` overrides in the
126
+ * publication's `theme.css`, scoped to `[data-kanbus-theme]`.
127
+ */
128
+ kanbusTheme: KanbusThemeId;
121
129
  renderer: RendererConfig;
122
130
  hosting: HostingConfig;
123
131
  /** Static reader app when it is not co-hosted with this Papyrus checkout. */
@@ -182,6 +190,7 @@ const REFERENCE_SITE_BRANDS: Record<SiteBrandId, SiteBrand> = {
182
190
  sectionLinkStrategy: "route",
183
191
  themePack: "papyrus",
184
192
  themeTokens: DEFAULT_THEME_PACK_TOKENS,
193
+ kanbusTheme: "broadsheet-green",
185
194
  renderer: { kind: "pretext" },
186
195
  hosting: { kind: "amplify-ssr" },
187
196
  opsChrome: "app",
@@ -237,6 +246,14 @@ export function getSiteBrand(id: SiteBrandId = resolveSiteBrandId()): SiteBrand
237
246
 
238
247
  export const SITE_BRAND = getSiteBrand();
239
248
 
249
+ /** Mirrors `DEFAULT_KANBUS_THEME` from `@kanbus/ui` (a test keeps the two equal) without a runtime import. */
250
+ export const FALLBACK_KANBUS_THEME: KanbusThemeId = "newspaper-gothic";
251
+
252
+ /** The newsroom theme for a brand; a brand that predates the field falls back to the default theme. */
253
+ export function getKanbusTheme(brand: Pick<SiteBrand, "kanbusTheme"> = SITE_BRAND): KanbusThemeId {
254
+ return brand.kanbusTheme ?? FALLBACK_KANBUS_THEME;
255
+ }
256
+
240
257
  export function getContentItemName(brand: SiteBrand = SITE_BRAND): ContentItemName {
241
258
  return brand.contentItemName ?? DEFAULT_CONTENT_ITEM_NAME;
242
259
  }
package/package.json CHANGED
@@ -78,7 +78,12 @@
78
78
  "./components/blog-page-background": "./components/blog-page-background.tsx",
79
79
  "./components/curation-delegation-client": "./components/curation-delegation-client.ts",
80
80
  "./components/dev-sandbox-editor-sign-in": "./components/dev-sandbox-editor-sign-in.tsx",
81
+ "./components/editorial-checks-admin-panel": "./components/editorial-checks-admin-panel.tsx",
82
+ "./components/editorial-finding-card": "./components/editorial-finding-card.tsx",
83
+ "./components/editorial-findings-panel": "./components/editorial-findings-panel.tsx",
84
+ "./components/editorial-preview-popover": "./components/editorial-preview-popover.tsx",
81
85
  "./components/item-stream-view": "./components/item-stream-view.tsx",
86
+ "./components/markus-body-editor": "./components/markus-body-editor.tsx",
82
87
  "./components/markus-ir-preview": "./components/markus-ir-preview.tsx",
83
88
  "./components/news-desk-client-provider": "./components/news-desk-client-provider.tsx",
84
89
  "./components/news-desk-page": "./components/news-desk-page.tsx",
@@ -95,6 +100,11 @@
95
100
  "./components/newsroom-ops-overview": "./components/newsroom-ops-overview.tsx",
96
101
  "./components/newsroom-ops-shell": "./components/newsroom-ops-shell.tsx",
97
102
  "./components/newsroom-references-view": "./components/newsroom-references-view.tsx",
103
+ "./components/newsroom-theme-fonts/broadsheet-green": "./components/newsroom-theme-fonts/broadsheet-green.tsx",
104
+ "./components/newsroom-theme-fonts/newspaper-gothic": "./components/newsroom-theme-fonts/newspaper-gothic.tsx",
105
+ "./components/newsroom-theme-fonts/night-desk": "./components/newsroom-theme-fonts/night-desk.tsx",
106
+ "./components/newsroom-theme-fonts/refined-newsprint": "./components/newsroom-theme-fonts/refined-newsprint.tsx",
107
+ "./components/newsroom-theme": "./components/newsroom-theme.tsx",
98
108
  "./components/newsroom-topics-view": "./components/newsroom-topics-view.tsx",
99
109
  "./components/papyrus-console-shell": "./components/papyrus-console-shell.tsx",
100
110
  "./components/pictogram-figure": "./components/pictogram-figure.tsx",
@@ -143,6 +153,7 @@
143
153
  "./components/ui/tooltip": "./components/ui/tooltip.tsx",
144
154
  "./components/use-blog-header-obstacles": "./components/use-blog-header-obstacles.ts",
145
155
  "./components/use-brand-fonts-ready": "./components/use-brand-fonts-ready.ts",
156
+ "./components/use-editorial-checks": "./components/use-editorial-checks.ts",
146
157
  "./components/use-near-viewport": "./components/use-near-viewport.ts",
147
158
  "./components/use-paged-content-item-versions": "./components/use-paged-content-item-versions.ts",
148
159
  "./components/use-resolved-papyrus-theme": "./components/use-resolved-papyrus-theme.ts",
@@ -184,6 +195,12 @@
184
195
  "./lib/doctrine": "./lib/doctrine.ts",
185
196
  "./lib/edition-routes": "./lib/edition-routes.ts",
186
197
  "./lib/edition-sections": "./lib/edition-sections.ts",
198
+ "./lib/editorial-checks-backend": "./lib/editorial-checks-backend.ts",
199
+ "./lib/editorial-checks-client": "./lib/editorial-checks-client.ts",
200
+ "./lib/editorial-checks-demo": "./lib/editorial-checks-demo.ts",
201
+ "./lib/editorial-checks-settings": "./lib/editorial-checks-settings.ts",
202
+ "./lib/editorial-checks": "./lib/editorial-checks.ts",
203
+ "./lib/editorial-preview": "./lib/editorial-preview.ts",
187
204
  "./lib/empty-edition-layout-plan": "./lib/empty-edition-layout-plan.ts",
188
205
  "./lib/excerpts": "./lib/excerpts.ts",
189
206
  "./lib/front-matter-fields": "./lib/front-matter-fields.ts",
@@ -378,7 +395,7 @@
378
395
  "optional": true
379
396
  }
380
397
  },
381
- "version": "2.0.0-next.1",
398
+ "version": "2.0.0-next.10",
382
399
  "dependencies": {
383
400
  "@aws-amplify/adapter-nextjs": "^1.7.3",
384
401
  "@aws-crypto/sha256-js": "5.2.0",
@@ -391,7 +408,22 @@
391
408
  "@aws-sdk/s3-request-presigner": "^3.1045.0",
392
409
  "@base-ui/react": "^1.5.0",
393
410
  "@chenglou/pretext": "^0.0.7",
394
- "@kanbus/ui": "https://github.com/AnthusAI/Kanbus/releases/download/ui-v0.3.0/kanbus-ui-0.3.0.tgz",
411
+ "@codemirror/commands": "^6.11.1",
412
+ "@codemirror/lang-markdown": "^6.5.2",
413
+ "@codemirror/language": "^6.13.1",
414
+ "@codemirror/state": "^6.7.6",
415
+ "@codemirror/view": "^6.43.15",
416
+ "@fontsource-variable/hanken-grotesk": "5.3.0",
417
+ "@fontsource-variable/jetbrains-mono": "5.3.0",
418
+ "@fontsource-variable/libre-franklin": "5.3.0",
419
+ "@fontsource-variable/literata": "5.3.0",
420
+ "@fontsource-variable/newsreader": "5.3.0",
421
+ "@fontsource-variable/public-sans": "5.3.0",
422
+ "@fontsource-variable/source-serif-4": "5.3.1",
423
+ "@fontsource/ibm-plex-mono": "5.3.0",
424
+ "@fontsource/ibm-plex-sans": "5.3.0",
425
+ "@kanbus/ui": "https://github.com/AnthusAI/Kanbus/releases/download/ui-v0.4.1/kanbus-ui-0.4.1.tgz",
426
+ "@lezer/highlight": "^1.2.5",
395
427
  "@radix-ui/colors": "3.0.0",
396
428
  "@smithy/protocol-http": "5.4.1",
397
429
  "@smithy/signature-v4": "5.7.4",
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.0.0-next.1",
2
+ "version": "2.0.0-next.10",
3
3
  "routes": [
4
4
  {
5
5
  "file": "app/%5F_preview/[[...path]]/route.ts",
@@ -1,93 +0,0 @@
1
- Copyright 2017 The Playfair Display Project Authors (https://github.com/clauseggers/Playfair-Display), with Reserved Font Name "Playfair Display"
2
-
3
- This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
- This license is copied below, and is also available with a FAQ at:
5
- http://scripts.sil.org/OFL
6
-
7
-
8
- -----------------------------------------------------------
9
- SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10
- -----------------------------------------------------------
11
-
12
- PREAMBLE
13
- The goals of the Open Font License (OFL) are to stimulate worldwide
14
- development of collaborative font projects, to support the font creation
15
- efforts of academic and linguistic communities, and to provide a free and
16
- open framework in which fonts may be shared and improved in partnership
17
- with others.
18
-
19
- The OFL allows the licensed fonts to be used, studied, modified and
20
- redistributed freely as long as they are not sold by themselves. The
21
- fonts, including any derivative works, can be bundled, embedded,
22
- redistributed and/or sold with any software provided that any reserved
23
- names are not used by derivative works. The fonts and derivatives,
24
- however, cannot be released under any other type of license. The
25
- requirement for fonts to remain under this license does not apply
26
- to any document created using the fonts or their derivatives.
27
-
28
- DEFINITIONS
29
- "Font Software" refers to the set of files released by the Copyright
30
- Holder(s) under this license and clearly marked as such. This may
31
- include source files, build scripts and documentation.
32
-
33
- "Reserved Font Name" refers to any names specified as such after the
34
- copyright statement(s).
35
-
36
- "Original Version" refers to the collection of Font Software components as
37
- distributed by the Copyright Holder(s).
38
-
39
- "Modified Version" refers to any derivative made by adding to, deleting,
40
- or substituting -- in part or in whole -- any of the components of the
41
- Original Version, by changing formats or by porting the Font Software to a
42
- new environment.
43
-
44
- "Author" refers to any designer, engineer, programmer, technical
45
- writer or other person who contributed to the Font Software.
46
-
47
- PERMISSION & CONDITIONS
48
- Permission is hereby granted, free of charge, to any person obtaining
49
- a copy of the Font Software, to use, study, copy, merge, embed, modify,
50
- redistribute, and sell modified and unmodified copies of the Font
51
- Software, subject to the following conditions:
52
-
53
- 1) Neither the Font Software nor any of its individual components,
54
- in Original or Modified Versions, may be sold by itself.
55
-
56
- 2) Original or Modified Versions of the Font Software may be bundled,
57
- redistributed and/or sold with any software, provided that each copy
58
- contains the above copyright notice and this license. These can be
59
- included either as stand-alone text files, human-readable headers or
60
- in the appropriate machine-readable metadata fields within text or
61
- binary files as long as those fields can be easily viewed by the user.
62
-
63
- 3) No Modified Version of the Font Software may use the Reserved Font
64
- Name(s) unless explicit written permission is granted by the corresponding
65
- Copyright Holder. This restriction only applies to the primary font name as
66
- presented to the users.
67
-
68
- 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69
- Software shall not be used to promote, endorse or advertise any
70
- Modified Version, except to acknowledge the contribution(s) of the
71
- Copyright Holder(s) and the Author(s) or with their explicit written
72
- permission.
73
-
74
- 5) The Font Software, modified or unmodified, in part or in whole,
75
- must be distributed entirely under this license, and must not be
76
- distributed under any other license. The requirement for fonts to
77
- remain under this license does not apply to any document created
78
- using the Font Software.
79
-
80
- TERMINATION
81
- This license becomes null and void if any of the above conditions are
82
- not met.
83
-
84
- DISCLAIMER
85
- THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88
- OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89
- COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90
- INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91
- DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92
- FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93
- OTHER DEALINGS IN THE FONT SOFTWARE.
@@ -1,93 +0,0 @@
1
- Copyright 2020 The Plus Jakarta Sans Project Authors (https://github.com/tokotype/PlusJakartaSans)
2
-
3
- This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
- This license is copied below, and is also available with a FAQ at:
5
- http://scripts.sil.org/OFL
6
-
7
-
8
- -----------------------------------------------------------
9
- SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10
- -----------------------------------------------------------
11
-
12
- PREAMBLE
13
- The goals of the Open Font License (OFL) are to stimulate worldwide
14
- development of collaborative font projects, to support the font creation
15
- efforts of academic and linguistic communities, and to provide a free and
16
- open framework in which fonts may be shared and improved in partnership
17
- with others.
18
-
19
- The OFL allows the licensed fonts to be used, studied, modified and
20
- redistributed freely as long as they are not sold by themselves. The
21
- fonts, including any derivative works, can be bundled, embedded,
22
- redistributed and/or sold with any software provided that any reserved
23
- names are not used by derivative works. The fonts and derivatives,
24
- however, cannot be released under any other type of license. The
25
- requirement for fonts to remain under this license does not apply
26
- to any document created using the fonts or their derivatives.
27
-
28
- DEFINITIONS
29
- "Font Software" refers to the set of files released by the Copyright
30
- Holder(s) under this license and clearly marked as such. This may
31
- include source files, build scripts and documentation.
32
-
33
- "Reserved Font Name" refers to any names specified as such after the
34
- copyright statement(s).
35
-
36
- "Original Version" refers to the collection of Font Software components as
37
- distributed by the Copyright Holder(s).
38
-
39
- "Modified Version" refers to any derivative made by adding to, deleting,
40
- or substituting -- in part or in whole -- any of the components of the
41
- Original Version, by changing formats or by porting the Font Software to a
42
- new environment.
43
-
44
- "Author" refers to any designer, engineer, programmer, technical
45
- writer or other person who contributed to the Font Software.
46
-
47
- PERMISSION & CONDITIONS
48
- Permission is hereby granted, free of charge, to any person obtaining
49
- a copy of the Font Software, to use, study, copy, merge, embed, modify,
50
- redistribute, and sell modified and unmodified copies of the Font
51
- Software, subject to the following conditions:
52
-
53
- 1) Neither the Font Software nor any of its individual components,
54
- in Original or Modified Versions, may be sold by itself.
55
-
56
- 2) Original or Modified Versions of the Font Software may be bundled,
57
- redistributed and/or sold with any software, provided that each copy
58
- contains the above copyright notice and this license. These can be
59
- included either as stand-alone text files, human-readable headers or
60
- in the appropriate machine-readable metadata fields within text or
61
- binary files as long as those fields can be easily viewed by the user.
62
-
63
- 3) No Modified Version of the Font Software may use the Reserved Font
64
- Name(s) unless explicit written permission is granted by the corresponding
65
- Copyright Holder. This restriction only applies to the primary font name as
66
- presented to the users.
67
-
68
- 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69
- Software shall not be used to promote, endorse or advertise any
70
- Modified Version, except to acknowledge the contribution(s) of the
71
- Copyright Holder(s) and the Author(s) or with their explicit written
72
- permission.
73
-
74
- 5) The Font Software, modified or unmodified, in part or in whole,
75
- must be distributed entirely under this license, and must not be
76
- distributed under any other license. The requirement for fonts to
77
- remain under this license does not apply to any document created
78
- using the Font Software.
79
-
80
- TERMINATION
81
- This license becomes null and void if any of the above conditions are
82
- not met.
83
-
84
- DISCLAIMER
85
- THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88
- OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89
- COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90
- INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91
- DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92
- FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93
- OTHER DEALINGS IN THE FONT SOFTWARE.
@@ -1,7 +0,0 @@
1
- .papyrus-newsprint-board {
2
- --kb-newsprint-paper: var(--org-paper);
3
- --kb-newsprint-ink: var(--org-ink);
4
- --kb-newsprint-line: var(--org-line);
5
- --kb-newsprint-display-font: Newsroom Display, Georgia, serif;
6
- --kb-newsprint-body-font: Newsroom UI, system-ui, sans-serif;
7
- }