@anthusai/papyrus 1.1.0 → 1.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.
@@ -5,7 +5,7 @@ import Link from "next/link";
5
5
  import { IssueCollection, IssueDetailPanel, IssueTypeFilter, issueTypeFromFilter } from "@kanbus/ui";
6
6
  import "@kanbus/ui/styles/kanban.css";
7
7
  import "./newsroom-newsprint-board.css";
8
- import { canReadNewsroomBoard, newsroomBoardConfig, projectNewsroomBoard, type NativeBoardIssue } from "../lib/newsroom-board";
8
+ import { canReadNewsroomBoard, contentItemBoardType, newsroomBoardConfig, projectNewsroomBoard, type NativeBoardIssue } from "../lib/newsroom-board";
9
9
  import { getContentItemName, SITE_BRAND } from "../lib/site-brand";
10
10
  import { getNewsroomNavHref } from "../lib/newsroom-nav";
11
11
  import { loadNewsroomAssignmentPage, loadNewsroomContentItemVersions, loadNewsroomReferencePage } from "./news-desk-taxonomy-client";
@@ -24,7 +24,7 @@ export function NewsroomBoardView() {
24
24
  const theme = useResolvedPapyrusTheme();
25
25
  const [lowMotion, setLowMotion] = useState(false);
26
26
  const [issues, setIssues] = useState<NativeBoardIssue[]>([]);
27
- const [filter, setFilter] = useState("all");
27
+ const [filter, setFilter] = useState(contentItemBoardType());
28
28
  const [view, setView] = useState<"board" | "list">("board");
29
29
  const [revision, setRevision] = useState(0);
30
30
  const [selected, setSelected] = useState<string | null>(null);
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Priming proof reports a publication owner approved for visitors, keyed by site brand id.
3
3
  * A report reaches this map only through a reviewed commit of its
4
- * `publications/priming-proofs/<brand id>.json` file; see docs/priming-proof.md.
4
+ * `publications/priming-proofs/<brand id>.json` file; see docs/cyclotron-priming.md.
5
5
  */
6
6
  export const APPROVED_PRIMING_PROOF_REPORTS: Record<string, unknown> = {};
@@ -71,14 +71,17 @@ export function projectNewsroomBoard(records: {
71
71
  ];
72
72
  }
73
73
 
74
- /** Content items always show every lifecycle stage in order; unknown native statuses of other records stay visible. */
74
+ export function contentItemColumnOrder(stagesPresentOnBoard: readonly string[]): string[] {
75
+ const lastStage = CONTENT_ITEM_STAGES[CONTENT_ITEM_STAGES.length - 1];
76
+ const unrecognizedStages = [...new Set(stagesPresentOnBoard)].filter(stage => !(CONTENT_ITEM_STAGES as readonly string[]).includes(stage));
77
+ return [...CONTENT_ITEM_STAGES.filter(stage => stage !== lastStage), ...unrecognizedStages, lastStage];
78
+ }
79
+
80
+ /** Content items read left to right through the lifecycle with the final stage last; other record kinds follow it. */
75
81
  export function newsroomBoardConfig(issues: readonly NativeBoardIssue[]): KanbanConfig {
76
82
  const contentItemType = contentItemBoardType();
77
83
  const kinds: NativeBoardKind[] = ["contentItem", "reference", "assignment"];
78
- const contentItemStatuses = [
79
- ...CONTENT_ITEM_STAGES,
80
- ...new Set(issues.filter(issue => issue.kind === "contentItem").map(issue => issue.nativeStatus)),
81
- ].filter((stage, index, stages) => stages.indexOf(stage) === index)
84
+ const contentItemStatuses = contentItemColumnOrder(issues.filter(issue => issue.kind === "contentItem").map(issue => issue.nativeStatus))
82
85
  .map(stage => ({ key: `${contentItemType}/${stage}`, name: contentItemStageLabel(stage), category: "native" }));
83
86
  const otherStatuses = [...new Set(issues.filter(issue => issue.kind !== "contentItem").map(issue => issue.status))]
84
87
  .map(key => ({ key, name: key.replace("/", " · "), category: "native" }));
package/package.json CHANGED
@@ -339,7 +339,7 @@
339
339
  "optional": true
340
340
  }
341
341
  },
342
- "version": "1.1.0",
342
+ "version": "1.1.1",
343
343
  "dependencies": {
344
344
  "@aws-amplify/adapter-nextjs": "^1.7.3",
345
345
  "@aws-crypto/sha256-js": "5.2.0",
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.1.0",
2
+ "version": "1.1.1",
3
3
  "routes": [
4
4
  {
5
5
  "file": "app/%5F_preview/[[...path]]/route.ts",