@burdenoff/microfe-theculturepost 2026.705.2 → 2026.709.2
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/dist/dev/main.d.ts +2 -0
- package/dist/dev/main.d.ts.map +1 -0
- package/dist/generated/global-operations.d.ts +2 -0
- package/dist/generated/global-operations.d.ts.map +1 -0
- package/dist/generated/global-types.d.ts +18199 -0
- package/dist/generated/global-types.d.ts.map +1 -0
- package/dist/generated/wspace-operations.d.ts +2 -0
- package/dist/generated/wspace-operations.d.ts.map +1 -0
- package/dist/generated/wspace-types.d.ts +43046 -0
- package/dist/generated/wspace-types.d.ts.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -1
- package/dist/services/assistantApi.d.ts +15 -0
- package/dist/services/assistantApi.d.ts.map +1 -0
- package/dist/services/assistantApi.js +204 -0
- package/dist/services/assistantApi.js.map +1 -0
- package/dist/services/createSandboxAssistantTransport.d.ts +26 -0
- package/dist/services/createSandboxAssistantTransport.d.ts.map +1 -0
- package/dist/services/createSandboxAssistantTransport.js +126 -0
- package/dist/services/createSandboxAssistantTransport.js.map +1 -0
- package/dist/theculturepost/TheCulturePostRoot.d.ts +5 -0
- package/dist/theculturepost/TheCulturePostRoot.d.ts.map +1 -0
- package/dist/theculturepost/TheCulturePostRoutes.d.ts +4 -0
- package/dist/theculturepost/TheCulturePostRoutes.d.ts.map +1 -0
- package/dist/theculturepost/TheCulturePostRoutes.js +73 -40
- package/dist/theculturepost/TheCulturePostRoutes.js.map +1 -1
- package/dist/theculturepost/components/AddCitationDialog.d.ts +11 -0
- package/dist/theculturepost/components/AddCitationDialog.d.ts.map +1 -0
- package/dist/theculturepost/components/ArchiveItemCard.d.ts +9 -0
- package/dist/theculturepost/components/ArchiveItemCard.d.ts.map +1 -0
- package/dist/theculturepost/components/AudioPlayer.d.ts +22 -0
- package/dist/theculturepost/components/AudioPlayer.d.ts.map +1 -0
- package/dist/theculturepost/components/AuthorLabel.d.ts +16 -0
- package/dist/theculturepost/components/AuthorLabel.d.ts.map +1 -0
- package/dist/theculturepost/components/AuthorLabel.js +1 -1
- package/dist/theculturepost/components/CitationList.d.ts +27 -0
- package/dist/theculturepost/components/CitationList.d.ts.map +1 -0
- package/dist/theculturepost/components/CollectionCard.d.ts +9 -0
- package/dist/theculturepost/components/CollectionCard.d.ts.map +1 -0
- package/dist/theculturepost/components/CoverImage.d.ts +13 -0
- package/dist/theculturepost/components/CoverImage.d.ts.map +1 -0
- package/dist/theculturepost/components/CreateArchiveItemDialog.d.ts +12 -0
- package/dist/theculturepost/components/CreateArchiveItemDialog.d.ts.map +1 -0
- package/dist/theculturepost/components/CreateCollectionDialog.d.ts +10 -0
- package/dist/theculturepost/components/CreateCollectionDialog.d.ts.map +1 -0
- package/dist/theculturepost/components/CreateStoryDialog.d.ts +12 -0
- package/dist/theculturepost/components/CreateStoryDialog.d.ts.map +1 -0
- package/dist/theculturepost/components/CreateTopicDialog.d.ts +10 -0
- package/dist/theculturepost/components/CreateTopicDialog.d.ts.map +1 -0
- package/dist/theculturepost/components/DecorativeCover.d.ts +17 -0
- package/dist/theculturepost/components/DecorativeCover.d.ts.map +1 -0
- package/dist/theculturepost/components/DecorativeDivider.d.ts +14 -0
- package/dist/theculturepost/components/DecorativeDivider.d.ts.map +1 -0
- package/dist/theculturepost/components/DiscussionCard.d.ts +9 -0
- package/dist/theculturepost/components/DiscussionCard.d.ts.map +1 -0
- package/dist/theculturepost/components/EmptyState.d.ts +18 -0
- package/dist/theculturepost/components/EmptyState.d.ts.map +1 -0
- package/dist/theculturepost/components/FileImage.d.ts +18 -0
- package/dist/theculturepost/components/FileImage.d.ts.map +1 -0
- package/dist/theculturepost/components/FileUploadField.d.ts +29 -0
- package/dist/theculturepost/components/FileUploadField.d.ts.map +1 -0
- package/dist/theculturepost/components/FilterTabs.d.ts +18 -0
- package/dist/theculturepost/components/FilterTabs.d.ts.map +1 -0
- package/dist/theculturepost/components/HistoryTimeline.d.ts +20 -0
- package/dist/theculturepost/components/HistoryTimeline.d.ts.map +1 -0
- package/dist/theculturepost/components/LifecycleStepper.d.ts +11 -0
- package/dist/theculturepost/components/LifecycleStepper.d.ts.map +1 -0
- package/dist/theculturepost/components/OpenDiscussionDialog.d.ts +12 -0
- package/dist/theculturepost/components/OpenDiscussionDialog.d.ts.map +1 -0
- package/dist/theculturepost/components/OralHistoryCard.d.ts +8 -0
- package/dist/theculturepost/components/OralHistoryCard.d.ts.map +1 -0
- package/dist/theculturepost/components/OverlayBadge.d.ts +15 -0
- package/dist/theculturepost/components/OverlayBadge.d.ts.map +1 -0
- package/dist/theculturepost/components/PageHero.d.ts +26 -0
- package/dist/theculturepost/components/PageHero.d.ts.map +1 -0
- package/dist/theculturepost/components/PageLayout.d.ts +16 -0
- package/dist/theculturepost/components/PageLayout.d.ts.map +1 -0
- package/dist/theculturepost/components/Pagination.d.ts +22 -0
- package/dist/theculturepost/components/Pagination.d.ts.map +1 -0
- package/dist/theculturepost/components/RecordOralHistoryDialog.d.ts +47 -0
- package/dist/theculturepost/components/RecordOralHistoryDialog.d.ts.map +1 -0
- package/dist/theculturepost/components/ReplyThread.d.ts +20 -0
- package/dist/theculturepost/components/ReplyThread.d.ts.map +1 -0
- package/dist/theculturepost/components/ReplyThread.js +1 -1
- package/dist/theculturepost/components/StateViews.d.ts +24 -0
- package/dist/theculturepost/components/StateViews.d.ts.map +1 -0
- package/dist/theculturepost/components/StatusBadge.d.ts +11 -0
- package/dist/theculturepost/components/StatusBadge.d.ts.map +1 -0
- package/dist/theculturepost/components/StoryCard.d.ts +11 -0
- package/dist/theculturepost/components/StoryCard.d.ts.map +1 -0
- package/dist/theculturepost/components/Tabs.d.ts +17 -0
- package/dist/theculturepost/components/Tabs.d.ts.map +1 -0
- package/dist/theculturepost/components/TagInput.d.ts +20 -0
- package/dist/theculturepost/components/TagInput.d.ts.map +1 -0
- package/dist/theculturepost/components/TopicCard.d.ts +9 -0
- package/dist/theculturepost/components/TopicCard.d.ts.map +1 -0
- package/dist/theculturepost/components/Waveform.d.ts +23 -0
- package/dist/theculturepost/components/Waveform.d.ts.map +1 -0
- package/dist/theculturepost/components/categoryMeta.d.ts +14 -0
- package/dist/theculturepost/components/categoryMeta.d.ts.map +1 -0
- package/dist/theculturepost/components/index.d.ts +43 -0
- package/dist/theculturepost/components/index.d.ts.map +1 -0
- package/dist/theculturepost/components/kindIcon.d.ts +7 -0
- package/dist/theculturepost/components/kindIcon.d.ts.map +1 -0
- package/dist/theculturepost/components/viz/BarChart.d.ts +23 -0
- package/dist/theculturepost/components/viz/BarChart.d.ts.map +1 -0
- package/dist/theculturepost/components/viz/Donut.d.ts +25 -0
- package/dist/theculturepost/components/viz/Donut.d.ts.map +1 -0
- package/dist/theculturepost/components/viz/StatTile.d.ts +14 -0
- package/dist/theculturepost/components/viz/StatTile.d.ts.map +1 -0
- package/dist/theculturepost/components/viz/index.d.ts +11 -0
- package/dist/theculturepost/components/viz/index.d.ts.map +1 -0
- package/dist/theculturepost/context/TheCulturePostContext.d.ts +16 -0
- package/dist/theculturepost/context/TheCulturePostContext.d.ts.map +1 -0
- package/dist/theculturepost/context/index.d.ts +6 -0
- package/dist/theculturepost/context/index.d.ts.map +1 -0
- package/dist/theculturepost/hooks/index.d.ts +10 -0
- package/dist/theculturepost/hooks/index.d.ts.map +1 -0
- package/dist/theculturepost/hooks/index.js +2 -0
- package/dist/theculturepost/hooks/useCursorPager.d.ts +32 -0
- package/dist/theculturepost/hooks/useCursorPager.d.ts.map +1 -0
- package/dist/theculturepost/hooks/useFiles.d.ts +31 -0
- package/dist/theculturepost/hooks/useFiles.d.ts.map +1 -0
- package/dist/theculturepost/hooks/usePageAnalytics.d.ts +9 -0
- package/dist/theculturepost/hooks/usePageAnalytics.d.ts.map +1 -0
- package/dist/theculturepost/hooks/usePageAnalytics.js +34 -0
- package/dist/theculturepost/hooks/usePageAnalytics.js.map +1 -0
- package/dist/theculturepost/hooks/useTcpApi.d.ts +74 -0
- package/dist/theculturepost/hooks/useTcpApi.d.ts.map +1 -0
- package/dist/theculturepost/hooks/useTr.d.ts +8 -0
- package/dist/theculturepost/hooks/useTr.d.ts.map +1 -0
- package/dist/theculturepost/hooks/useTr.js +14 -0
- package/dist/theculturepost/hooks/useTr.js.map +1 -0
- package/dist/theculturepost/index.d.ts +9 -0
- package/dist/theculturepost/index.d.ts.map +1 -0
- package/dist/theculturepost/index.js +2 -1
- package/dist/theculturepost/lib/graphql-cache.d.ts +26 -0
- package/dist/theculturepost/lib/graphql-cache.d.ts.map +1 -0
- package/dist/theculturepost/lib/toast.d.ts +23 -0
- package/dist/theculturepost/lib/toast.d.ts.map +1 -0
- package/dist/theculturepost/pages/HomePage.d.ts +16 -0
- package/dist/theculturepost/pages/HomePage.d.ts.map +1 -0
- package/dist/theculturepost/pages/HomePage.js +83 -68
- package/dist/theculturepost/pages/HomePage.js.map +1 -1
- package/dist/theculturepost/pages/archive/ArchiveItemDetailPage.d.ts +12 -0
- package/dist/theculturepost/pages/archive/ArchiveItemDetailPage.d.ts.map +1 -0
- package/dist/theculturepost/pages/archive/ArchiveItemDetailPage.js +21 -21
- package/dist/theculturepost/pages/archive/ArchivePage.d.ts +7 -0
- package/dist/theculturepost/pages/archive/ArchivePage.d.ts.map +1 -0
- package/dist/theculturepost/pages/archive/ArchivePage.js +144 -125
- package/dist/theculturepost/pages/archive/ArchivePage.js.map +1 -1
- package/dist/theculturepost/pages/archive/CollectionDetailPage.d.ts +12 -0
- package/dist/theculturepost/pages/archive/CollectionDetailPage.d.ts.map +1 -0
- package/dist/theculturepost/pages/discussions/DiscussionDetailPage.d.ts +12 -0
- package/dist/theculturepost/pages/discussions/DiscussionDetailPage.d.ts.map +1 -0
- package/dist/theculturepost/pages/discussions/DiscussionDetailPage.js +78 -70
- package/dist/theculturepost/pages/discussions/DiscussionDetailPage.js.map +1 -1
- package/dist/theculturepost/pages/discussions/DiscussionsPage.d.ts +10 -0
- package/dist/theculturepost/pages/discussions/DiscussionsPage.d.ts.map +1 -0
- package/dist/theculturepost/pages/discussions/DiscussionsPage.js +63 -56
- package/dist/theculturepost/pages/discussions/DiscussionsPage.js.map +1 -1
- package/dist/theculturepost/pages/governance/GovernancePage.d.ts +20 -0
- package/dist/theculturepost/pages/governance/GovernancePage.d.ts.map +1 -0
- package/dist/theculturepost/pages/stories/StoriesPage.d.ts +9 -0
- package/dist/theculturepost/pages/stories/StoriesPage.d.ts.map +1 -0
- package/dist/theculturepost/pages/stories/StoriesPage.js +65 -58
- package/dist/theculturepost/pages/stories/StoriesPage.js.map +1 -1
- package/dist/theculturepost/pages/stories/StoryDetailPage.d.ts +18 -0
- package/dist/theculturepost/pages/stories/StoryDetailPage.d.ts.map +1 -0
- package/dist/theculturepost/pages/stories/StoryDetailPage.js +249 -229
- package/dist/theculturepost/pages/stories/StoryDetailPage.js.map +1 -1
- package/dist/theculturepost/pages/timeline/TimelinePage.d.ts +17 -0
- package/dist/theculturepost/pages/timeline/TimelinePage.d.ts.map +1 -0
- package/dist/theculturepost/pages/topics/TopicDetailPage.d.ts +12 -0
- package/dist/theculturepost/pages/topics/TopicDetailPage.d.ts.map +1 -0
- package/dist/theculturepost/pages/topics/TopicsPage.d.ts +12 -0
- package/dist/theculturepost/pages/topics/TopicsPage.d.ts.map +1 -0
- package/dist/theculturepost/pages/topics/TopicsPage.js +61 -52
- package/dist/theculturepost/pages/topics/TopicsPage.js.map +1 -1
- package/dist/theculturepost/styles/injectDisplayFont.d.ts +14 -0
- package/dist/theculturepost/styles/injectDisplayFont.d.ts.map +1 -0
- package/dist/theculturepost/translations/ar.d.ts +50 -0
- package/dist/theculturepost/translations/ar.d.ts.map +1 -0
- package/dist/theculturepost/translations/ar.js +54 -0
- package/dist/theculturepost/translations/ar.js.map +1 -0
- package/dist/theculturepost/translations/en.d.ts +50 -0
- package/dist/theculturepost/translations/en.d.ts.map +1 -0
- package/dist/theculturepost/translations/en.js +54 -0
- package/dist/theculturepost/translations/en.js.map +1 -0
- package/dist/theculturepost/translations/es.d.ts +50 -0
- package/dist/theculturepost/translations/es.d.ts.map +1 -0
- package/dist/theculturepost/translations/es.js +54 -0
- package/dist/theculturepost/translations/es.js.map +1 -0
- package/dist/theculturepost/translations/hi.d.ts +50 -0
- package/dist/theculturepost/translations/hi.d.ts.map +1 -0
- package/dist/theculturepost/translations/hi.js +54 -0
- package/dist/theculturepost/translations/hi.js.map +1 -0
- package/dist/theculturepost/translations/index.d.ts +7 -0
- package/dist/theculturepost/translations/index.d.ts.map +1 -0
- package/dist/theculturepost/translations/ta.d.ts +50 -0
- package/dist/theculturepost/translations/ta.d.ts.map +1 -0
- package/dist/theculturepost/translations/ta.js +54 -0
- package/dist/theculturepost/translations/ta.js.map +1 -0
- package/dist/theculturepost/translations/zh.d.ts +50 -0
- package/dist/theculturepost/translations/zh.d.ts.map +1 -0
- package/dist/theculturepost/translations/zh.js +54 -0
- package/dist/theculturepost/translations/zh.js.map +1 -0
- package/dist/theculturepost/types/index.d.ts +333 -0
- package/dist/theculturepost/types/index.d.ts.map +1 -0
- package/dist/theculturepost/utils/cn.d.ts +4 -0
- package/dist/theculturepost/utils/cn.d.ts.map +1 -0
- package/dist/theculturepost/utils/formatters.d.ts +19 -0
- package/dist/theculturepost/utils/formatters.d.ts.map +1 -0
- package/dist/theculturepost/utils/i18n.d.ts +6 -0
- package/dist/theculturepost/utils/i18n.d.ts.map +1 -0
- package/dist/theculturepost/utils/index.d.ts +11 -0
- package/dist/theculturepost/utils/index.d.ts.map +1 -0
- package/dist/theculturepost/utils/index.js +6 -0
- package/dist/theculturepost/utils/nativeBridge.d.ts +47 -0
- package/dist/theculturepost/utils/nativeBridge.d.ts.map +1 -0
- package/dist/theculturepost/utils/nativeBridge.js +60 -0
- package/dist/theculturepost/utils/nativeBridge.js.map +1 -0
- package/dist/theculturepost/utils/navigation.d.ts +14 -0
- package/dist/theculturepost/utils/navigation.d.ts.map +1 -0
- package/dist/theculturepost/utils/slug.d.ts +6 -0
- package/dist/theculturepost/utils/slug.d.ts.map +1 -0
- package/dist/types/assistant.d.ts +56 -0
- package/dist/types/assistant.d.ts.map +1 -0
- package/dist/utils/pageContext.d.ts +27 -0
- package/dist/utils/pageContext.d.ts.map +1 -0
- package/dist/utils/pageContext.js +47 -0
- package/dist/utils/pageContext.js.map +1 -0
- package/package.json +29 -1
|
@@ -5,17 +5,18 @@ import { StoryCard as r } from "../../components/StoryCard.js";
|
|
|
5
5
|
import { EmptyState as i } from "../../components/EmptyState.js";
|
|
6
6
|
import { useTcpStories as a, useTcpTopics as o } from "../../hooks/useTcpApi.js";
|
|
7
7
|
import { useCursorPager as s } from "../../hooks/useCursorPager.js";
|
|
8
|
+
import { useTr as c } from "../../hooks/useTr.js";
|
|
8
9
|
import "../../hooks/index.js";
|
|
9
|
-
import { Pagination as
|
|
10
|
-
import { PageLayout as
|
|
11
|
-
import { FilterTabs as
|
|
12
|
-
import { CreateStoryDialog as
|
|
13
|
-
import { useState as
|
|
14
|
-
import { BookOpen as
|
|
15
|
-
import { Fragment as
|
|
16
|
-
import { Button as
|
|
10
|
+
import { Pagination as l } from "../../components/Pagination.js";
|
|
11
|
+
import { PageLayout as u } from "../../components/PageLayout.js";
|
|
12
|
+
import { FilterTabs as d } from "../../components/FilterTabs.js";
|
|
13
|
+
import { CreateStoryDialog as f } from "../../components/CreateStoryDialog.js";
|
|
14
|
+
import { useState as p } from "react";
|
|
15
|
+
import { BookOpen as m, Plus as h } from "lucide-react";
|
|
16
|
+
import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
17
|
+
import { Button as y, Select as b, SelectContent as x, SelectItem as S, SelectTrigger as C, SelectValue as w } from "@burdenoff/fe-libs/ui";
|
|
17
18
|
//#region src/theculturepost/pages/stories/StoriesPage.tsx
|
|
18
|
-
var
|
|
19
|
+
var T = 12, E = [
|
|
19
20
|
{
|
|
20
21
|
value: "ALL",
|
|
21
22
|
label: "All"
|
|
@@ -41,84 +42,90 @@ var w = 12, T = [
|
|
|
41
42
|
label: "Archived"
|
|
42
43
|
}
|
|
43
44
|
];
|
|
44
|
-
function
|
|
45
|
-
let { navigateTo:
|
|
46
|
-
status:
|
|
47
|
-
topicId:
|
|
45
|
+
function D() {
|
|
46
|
+
let { navigateTo: D } = e(), O = c(), k = s(), [A, j] = p("ALL"), [M, N] = p("ALL"), [P, F] = p(!1), I = o({ pagination: { limit: 100 } }), { data: L, isLoading: R, isError: z, refetch: B } = a({
|
|
47
|
+
status: A === "ALL" ? void 0 : A,
|
|
48
|
+
topicId: M === "ALL" ? void 0 : M,
|
|
48
49
|
pagination: {
|
|
49
|
-
limit:
|
|
50
|
-
cursor:
|
|
50
|
+
limit: T,
|
|
51
|
+
cursor: k.cursor
|
|
51
52
|
}
|
|
52
|
-
}),
|
|
53
|
-
return /* @__PURE__ */
|
|
54
|
-
title: "Stories",
|
|
55
|
-
description: "Articles, essays, explainers, photo stories and timelines — across the full editorial lifecycle.",
|
|
56
|
-
actions: /* @__PURE__ */
|
|
57
|
-
onClick: () =>
|
|
58
|
-
|
|
53
|
+
}), V = L?.items ?? [];
|
|
54
|
+
return /* @__PURE__ */ v(u, {
|
|
55
|
+
title: O("stories.title", "Stories"),
|
|
56
|
+
description: O("stories.description", "Articles, essays, explainers, photo stories and timelines — across the full editorial lifecycle."),
|
|
57
|
+
actions: /* @__PURE__ */ v(y, {
|
|
58
|
+
onClick: () => F(!0),
|
|
59
|
+
"data-tour": "theculturepost-stories-create",
|
|
60
|
+
children: [
|
|
61
|
+
/* @__PURE__ */ _(h, { className: "mr-1.5 h-4 w-4" }),
|
|
62
|
+
" ",
|
|
63
|
+
O("stories.newStory", "New story")
|
|
64
|
+
]
|
|
59
65
|
}),
|
|
60
66
|
children: [
|
|
61
|
-
/* @__PURE__ */
|
|
67
|
+
/* @__PURE__ */ v("div", {
|
|
62
68
|
className: "mb-6 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
69
|
+
"data-tour": "theculturepost-stories-filters",
|
|
70
|
+
children: [/* @__PURE__ */ _(d, {
|
|
71
|
+
options: E,
|
|
72
|
+
value: A,
|
|
66
73
|
onChange: (e) => {
|
|
67
|
-
|
|
74
|
+
j(e), k.reset();
|
|
68
75
|
}
|
|
69
|
-
}), /* @__PURE__ */
|
|
70
|
-
value:
|
|
76
|
+
}), /* @__PURE__ */ v(b, {
|
|
77
|
+
value: M,
|
|
71
78
|
onValueChange: (e) => {
|
|
72
|
-
|
|
79
|
+
N(e), k.reset();
|
|
73
80
|
},
|
|
74
|
-
children: [/* @__PURE__ */
|
|
81
|
+
children: [/* @__PURE__ */ _(C, {
|
|
75
82
|
className: "w-full sm:w-[13rem]",
|
|
76
83
|
"aria-label": "Filter by topic",
|
|
77
|
-
children: /* @__PURE__ */
|
|
78
|
-
}), /* @__PURE__ */
|
|
84
|
+
children: /* @__PURE__ */ _(w, { placeholder: "All topics" })
|
|
85
|
+
}), /* @__PURE__ */ v(x, { children: [/* @__PURE__ */ _(S, {
|
|
79
86
|
value: "ALL",
|
|
80
87
|
children: "All topics"
|
|
81
|
-
}), (
|
|
88
|
+
}), (I.data?.items ?? []).map((e) => /* @__PURE__ */ _(S, {
|
|
82
89
|
value: e.id,
|
|
83
90
|
children: e.name
|
|
84
91
|
}, e.id))] })]
|
|
85
92
|
})]
|
|
86
93
|
}),
|
|
87
|
-
|
|
94
|
+
R ? /* @__PURE__ */ _(n, { label: "Loading stories…" }) : z ? /* @__PURE__ */ _(t, {
|
|
88
95
|
message: "We couldn't load stories.",
|
|
89
|
-
onRetry: () =>
|
|
90
|
-
}) :
|
|
96
|
+
onRetry: () => B()
|
|
97
|
+
}) : V.length === 0 && k.page === 0 ? /* @__PURE__ */ _(i, {
|
|
91
98
|
illustration: "empty-data",
|
|
92
|
-
icon: /* @__PURE__ */
|
|
93
|
-
title:
|
|
94
|
-
description:
|
|
95
|
-
action: /* @__PURE__ */
|
|
96
|
-
onClick: () =>
|
|
97
|
-
children: [/* @__PURE__ */
|
|
99
|
+
icon: /* @__PURE__ */ _(m, { className: "h-10 w-10" }),
|
|
100
|
+
title: A === "ALL" && M === "ALL" ? "No stories yet" : "No stories match these filters",
|
|
101
|
+
description: A === "ALL" && M === "ALL" ? "Draft the first story — it enters the editorial lifecycle you can publish from." : "Try widening the filters, or draft a new story.",
|
|
102
|
+
action: /* @__PURE__ */ v(y, {
|
|
103
|
+
onClick: () => F(!0),
|
|
104
|
+
children: [/* @__PURE__ */ _(h, { className: "mr-1.5 h-4 w-4" }), " New story"]
|
|
98
105
|
})
|
|
99
|
-
}) : /* @__PURE__ */
|
|
106
|
+
}) : /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _("div", {
|
|
100
107
|
className: "grid gap-5 sm:grid-cols-2 lg:grid-cols-3",
|
|
101
|
-
children:
|
|
108
|
+
children: V.map((e) => /* @__PURE__ */ _(r, {
|
|
102
109
|
story: e,
|
|
103
|
-
onOpen: () =>
|
|
110
|
+
onOpen: () => D(`stories/${e.id}`)
|
|
104
111
|
}, e.id))
|
|
105
|
-
}), /* @__PURE__ */
|
|
106
|
-
page:
|
|
107
|
-
pageSize:
|
|
108
|
-
itemCount:
|
|
109
|
-
hasMore:
|
|
110
|
-
onPageChange: (e) =>
|
|
112
|
+
}), /* @__PURE__ */ _(l, {
|
|
113
|
+
page: k.page,
|
|
114
|
+
pageSize: T,
|
|
115
|
+
itemCount: V.length,
|
|
116
|
+
hasMore: L?.pageInfo.hasMore ?? !1,
|
|
117
|
+
onPageChange: (e) => k.onPageChange(e, L?.pageInfo.cursor)
|
|
111
118
|
})] }),
|
|
112
|
-
/* @__PURE__ */
|
|
113
|
-
open:
|
|
114
|
-
onOpenChange:
|
|
115
|
-
topicId:
|
|
116
|
-
onCreated: (e) =>
|
|
119
|
+
/* @__PURE__ */ _(f, {
|
|
120
|
+
open: P,
|
|
121
|
+
onOpenChange: F,
|
|
122
|
+
topicId: M === "ALL" ? void 0 : M,
|
|
123
|
+
onCreated: (e) => D(`stories/${e.id}`)
|
|
117
124
|
})
|
|
118
125
|
]
|
|
119
126
|
});
|
|
120
127
|
}
|
|
121
128
|
//#endregion
|
|
122
|
-
export {
|
|
129
|
+
export { D as StoriesPage };
|
|
123
130
|
|
|
124
131
|
//# sourceMappingURL=StoriesPage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StoriesPage.js","names":[],"sources":["../../../../src/theculturepost/pages/stories/StoriesPage.tsx"],"sourcesContent":["/**\n * StoriesPage — browse the newsroom.\n * @module theculturepost/pages/stories\n *\n * Reads `tcpListStories` (filtered by status + optional topic). \"New Story\"\n * opens {@link CreateStoryDialog}. Cursor-paginated.\n */\n\nimport { useState } from 'react';\nimport { BookOpen, Plus } from 'lucide-react';\nimport {\n Button,\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from '@burdenoff/fe-libs/ui';\nimport { PageLayout } from '../../components/PageLayout';\nimport { FilterTabs, type FilterOption } from '../../components/FilterTabs';\nimport { StoryCard } from '../../components/StoryCard';\nimport { CreateStoryDialog } from '../../components/CreateStoryDialog';\nimport { EmptyState } from '../../components/EmptyState';\nimport { LoadingView, ErrorView } from '../../components/StateViews';\nimport { Pagination } from '../../components/Pagination';\nimport { useTcpStories, useTcpTopics, useCursorPager } from '../../hooks';\nimport { useTheCulturePost } from '../../context';\nimport type { TcpStoryStatus } from '../../types';\n\nconst PAGE_SIZE = 12;\n\ntype StatusFilter = 'ALL' | TcpStoryStatus;\n\nconst STATUS_FILTERS: FilterOption<StatusFilter>[] = [\n { value: 'ALL', label: 'All' },\n { value: 'PUBLISHED', label: 'Published' },\n { value: 'IN_REVIEW', label: 'In Review' },\n { value: 'DRAFT', label: 'Draft' },\n { value: 'IDEA', label: 'Idea' },\n { value: 'ARCHIVED', label: 'Archived' },\n];\n\nexport function StoriesPage() {\n const { navigateTo } = useTheCulturePost();\n const pager = useCursorPager();\n const [status, setStatus] = useState<StatusFilter>('ALL');\n const [topicId, setTopicId] = useState<string>('ALL');\n const [createOpen, setCreateOpen] = useState(false);\n\n const topicsQuery = useTcpTopics({ pagination: { limit: 100 } });\n const { data, isLoading, isError, refetch } = useTcpStories({\n status: status === 'ALL' ? undefined : status,\n topicId: topicId === 'ALL' ? undefined : topicId,\n pagination: { limit: PAGE_SIZE, cursor: pager.cursor },\n });\n\n const stories = data?.items ?? [];\n\n const changeStatus = (next: StatusFilter) => {\n setStatus(next);\n pager.reset();\n };\n\n const changeTopic = (next: string) => {\n setTopicId(next);\n pager.reset();\n };\n\n return (\n <PageLayout\n title
|
|
1
|
+
{"version":3,"file":"StoriesPage.js","names":[],"sources":["../../../../src/theculturepost/pages/stories/StoriesPage.tsx"],"sourcesContent":["/**\n * StoriesPage — browse the newsroom.\n * @module theculturepost/pages/stories\n *\n * Reads `tcpListStories` (filtered by status + optional topic). \"New Story\"\n * opens {@link CreateStoryDialog}. Cursor-paginated.\n */\n\nimport { useState } from 'react';\nimport { BookOpen, Plus } from 'lucide-react';\nimport {\n Button,\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from '@burdenoff/fe-libs/ui';\nimport { PageLayout } from '../../components/PageLayout';\nimport { FilterTabs, type FilterOption } from '../../components/FilterTabs';\nimport { StoryCard } from '../../components/StoryCard';\nimport { CreateStoryDialog } from '../../components/CreateStoryDialog';\nimport { EmptyState } from '../../components/EmptyState';\nimport { LoadingView, ErrorView } from '../../components/StateViews';\nimport { Pagination } from '../../components/Pagination';\nimport { useTcpStories, useTcpTopics, useCursorPager, useTr } from '../../hooks';\nimport { useTheCulturePost } from '../../context';\nimport type { TcpStoryStatus } from '../../types';\n\nconst PAGE_SIZE = 12;\n\ntype StatusFilter = 'ALL' | TcpStoryStatus;\n\nconst STATUS_FILTERS: FilterOption<StatusFilter>[] = [\n { value: 'ALL', label: 'All' },\n { value: 'PUBLISHED', label: 'Published' },\n { value: 'IN_REVIEW', label: 'In Review' },\n { value: 'DRAFT', label: 'Draft' },\n { value: 'IDEA', label: 'Idea' },\n { value: 'ARCHIVED', label: 'Archived' },\n];\n\nexport function StoriesPage() {\n const { navigateTo } = useTheCulturePost();\n const tr = useTr();\n const pager = useCursorPager();\n const [status, setStatus] = useState<StatusFilter>('ALL');\n const [topicId, setTopicId] = useState<string>('ALL');\n const [createOpen, setCreateOpen] = useState(false);\n\n const topicsQuery = useTcpTopics({ pagination: { limit: 100 } });\n const { data, isLoading, isError, refetch } = useTcpStories({\n status: status === 'ALL' ? undefined : status,\n topicId: topicId === 'ALL' ? undefined : topicId,\n pagination: { limit: PAGE_SIZE, cursor: pager.cursor },\n });\n\n const stories = data?.items ?? [];\n\n const changeStatus = (next: StatusFilter) => {\n setStatus(next);\n pager.reset();\n };\n\n const changeTopic = (next: string) => {\n setTopicId(next);\n pager.reset();\n };\n\n return (\n <PageLayout\n title={tr('stories.title', 'Stories')}\n description={tr(\n 'stories.description',\n 'Articles, essays, explainers, photo stories and timelines — across the full editorial lifecycle.'\n )}\n actions={\n <Button onClick={() => setCreateOpen(true)} data-tour=\"theculturepost-stories-create\">\n <Plus className=\"mr-1.5 h-4 w-4\" /> {tr('stories.newStory', 'New story')}\n </Button>\n }\n >\n <div\n className=\"mb-6 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between\"\n data-tour=\"theculturepost-stories-filters\"\n >\n <FilterTabs options={STATUS_FILTERS} value={status} onChange={changeStatus} />\n <Select value={topicId} onValueChange={changeTopic}>\n <SelectTrigger className=\"w-full sm:w-[13rem]\" aria-label=\"Filter by topic\">\n <SelectValue placeholder=\"All topics\" />\n </SelectTrigger>\n <SelectContent>\n <SelectItem value=\"ALL\">All topics</SelectItem>\n {(topicsQuery.data?.items ?? []).map((topic) => (\n <SelectItem key={topic.id} value={topic.id}>\n {topic.name}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n </div>\n\n {isLoading ? (\n <LoadingView label=\"Loading stories…\" />\n ) : isError ? (\n <ErrorView message=\"We couldn't load stories.\" onRetry={() => refetch()} />\n ) : stories.length === 0 && pager.page === 0 ? (\n <EmptyState\n illustration=\"empty-data\"\n icon={<BookOpen className=\"h-10 w-10\" />}\n title={\n status === 'ALL' && topicId === 'ALL'\n ? 'No stories yet'\n : 'No stories match these filters'\n }\n description={\n status === 'ALL' && topicId === 'ALL'\n ? 'Draft the first story — it enters the editorial lifecycle you can publish from.'\n : 'Try widening the filters, or draft a new story.'\n }\n action={\n <Button onClick={() => setCreateOpen(true)}>\n <Plus className=\"mr-1.5 h-4 w-4\" /> New story\n </Button>\n }\n />\n ) : (\n <>\n <div className=\"grid gap-5 sm:grid-cols-2 lg:grid-cols-3\">\n {stories.map((story) => (\n <StoryCard\n key={story.id}\n story={story}\n onOpen={() => navigateTo(`stories/${story.id}`)}\n />\n ))}\n </div>\n <Pagination\n page={pager.page}\n pageSize={PAGE_SIZE}\n itemCount={stories.length}\n hasMore={data?.pageInfo.hasMore ?? false}\n onPageChange={(target) => pager.onPageChange(target, data?.pageInfo.cursor)}\n />\n </>\n )}\n\n <CreateStoryDialog\n open={createOpen}\n onOpenChange={setCreateOpen}\n topicId={topicId === 'ALL' ? undefined : topicId}\n onCreated={(story) => navigateTo(`stories/${story.id}`)}\n />\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AA6BA,IAAM,IAAY,IAIZ,IAA+C;CACnD;EAAE,OAAO;EAAO,OAAO;EAAO;CAC9B;EAAE,OAAO;EAAa,OAAO;EAAa;CAC1C;EAAE,OAAO;EAAa,OAAO;EAAa;CAC1C;EAAE,OAAO;EAAS,OAAO;EAAS;CAClC;EAAE,OAAO;EAAQ,OAAO;EAAQ;CAChC;EAAE,OAAO;EAAY,OAAO;EAAY;CACzC;AAED,SAAgB,IAAc;CAC5B,IAAM,EAAE,kBAAe,GAAmB,EACpC,IAAK,GAAO,EACZ,IAAQ,GAAgB,EACxB,CAAC,GAAQ,KAAa,EAAuB,MAAM,EACnD,CAAC,GAAS,KAAc,EAAiB,MAAM,EAC/C,CAAC,GAAY,KAAiB,EAAS,GAAM,EAE7C,IAAc,EAAa,EAAE,YAAY,EAAE,OAAO,KAAK,EAAE,CAAC,EAC1D,EAAE,SAAM,cAAW,YAAS,eAAY,EAAc;EAC1D,QAAQ,MAAW,QAAQ,KAAA,IAAY;EACvC,SAAS,MAAY,QAAQ,KAAA,IAAY;EACzC,YAAY;GAAE,OAAO;GAAW,QAAQ,EAAM;GAAQ;EACvD,CAAC,EAEI,IAAU,GAAM,SAAS,EAAE;AAYjC,QACE,kBAAC,GAAD;EACE,OAAO,EAAG,iBAAiB,UAAU;EACrC,aAAa,EACX,uBACA,mGACD;EACD,SACE,kBAAC,GAAD;GAAQ,eAAe,EAAc,GAAK;GAAE,aAAU;aAAtD;IACE,kBAAC,GAAD,EAAM,WAAU,kBAAmB,CAAA;;IAAE,EAAG,oBAAoB,YAAY;IACjE;;YATb;GAYE,kBAAC,OAAD;IACE,WAAU;IACV,aAAU;cAFZ,CAIE,kBAAC,GAAD;KAAY,SAAS;KAAgB,OAAO;KAAQ,WA3BpC,MAAuB;AAE3C,MADA,EAAU,EAAK,EACf,EAAM,OAAO;;KAyBqE,CAAA,EAC9E,kBAAC,GAAD;KAAQ,OAAO;KAAS,gBAvBT,MAAiB;AAEpC,MADA,EAAW,EAAK,EAChB,EAAM,OAAO;;eAqBT,CACE,kBAAC,GAAD;MAAe,WAAU;MAAsB,cAAW;gBACxD,kBAAC,GAAD,EAAa,aAAY,cAAe,CAAA;MAC1B,CAAA,EAChB,kBAAC,GAAD,EAAA,UAAA,CACE,kBAAC,GAAD;MAAY,OAAM;gBAAM;MAAuB,CAAA,GAC7C,EAAY,MAAM,SAAS,EAAE,EAAE,KAAK,MACpC,kBAAC,GAAD;MAA2B,OAAO,EAAM;gBACrC,EAAM;MACI,EAFI,EAAM,GAEV,CACb,CACY,EAAA,CAAA,CACT;OACL;;GAEL,IACC,kBAAC,GAAD,EAAa,OAAM,oBAAqB,CAAA,GACtC,IACF,kBAAC,GAAD;IAAW,SAAQ;IAA4B,eAAe,GAAS;IAAI,CAAA,GACzE,EAAQ,WAAW,KAAK,EAAM,SAAS,IACzC,kBAAC,GAAD;IACE,cAAa;IACb,MAAM,kBAAC,GAAD,EAAU,WAAU,aAAc,CAAA;IACxC,OACE,MAAW,SAAS,MAAY,QAC5B,mBACA;IAEN,aACE,MAAW,SAAS,MAAY,QAC5B,oFACA;IAEN,QACE,kBAAC,GAAD;KAAQ,eAAe,EAAc,GAAK;eAA1C,CACE,kBAAC,GAAD,EAAM,WAAU,kBAAmB,CAAA,EAAA,aAC5B;;IAEX,CAAA,GAEF,kBAAA,GAAA,EAAA,UAAA,CACE,kBAAC,OAAD;IAAK,WAAU;cACZ,EAAQ,KAAK,MACZ,kBAAC,GAAD;KAES;KACP,cAAc,EAAW,WAAW,EAAM,KAAK;KAC/C,EAHK,EAAM,GAGX,CACF;IACE,CAAA,EACN,kBAAC,GAAD;IACE,MAAM,EAAM;IACZ,UAAU;IACV,WAAW,EAAQ;IACnB,SAAS,GAAM,SAAS,WAAW;IACnC,eAAe,MAAW,EAAM,aAAa,GAAQ,GAAM,SAAS,OAAO;IAC3E,CAAA,CACD,EAAA,CAAA;GAGL,kBAAC,GAAD;IACE,MAAM;IACN,cAAc;IACd,SAAS,MAAY,QAAQ,KAAA,IAAY;IACzC,YAAY,MAAU,EAAW,WAAW,EAAM,KAAK;IACvD,CAAA;GACS"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* StoryDetailPage — a single story in two complementary surfaces.
|
|
3
|
+
* @module theculturepost/pages/stories
|
|
4
|
+
*
|
|
5
|
+
* A `?view=` toggle (with a sub-tab control) splits the page into:
|
|
6
|
+
* - READING (tcp-03): a cover-banner hero, serif display title, a drop-cap
|
|
7
|
+
* article body with ornamental section breaks, and a right rail of citations
|
|
8
|
+
* (compact) + linked discussions.
|
|
9
|
+
* - EDITORIAL (tcp-04): a visual lifecycle stepper with validated transitions
|
|
10
|
+
* (Publish / Send back), plus citations as a verifiable-source table with an
|
|
11
|
+
* inline verify control.
|
|
12
|
+
*
|
|
13
|
+
* Reads `tcpStory` (+ citations), `tcpListDiscussions(storyId)`. Writes
|
|
14
|
+
* `tcpTransitionStory`, `tcpUpdateStory`, `tcpVerifyCitation`. Person references
|
|
15
|
+
* are id-only, so we render "You" / "Contributor".
|
|
16
|
+
*/
|
|
17
|
+
export declare function StoryDetailPage(): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
//# sourceMappingURL=StoryDetailPage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StoryDetailPage.d.ts","sourceRoot":"","sources":["../../../../src/theculturepost/pages/stories/StoryDetailPage.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AA2IH,wBAAgB,eAAe,4CAgK9B"}
|