@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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useTheCulturePost as e } from "../../context/TheCulturePostContext.js";
|
|
2
|
-
import { cn as t } from "../../utils/cn.js";
|
|
3
2
|
import "../../context/index.js";
|
|
3
|
+
import { cn as t } from "../../utils/cn.js";
|
|
4
4
|
import { FILE_FOLDERS as n } from "../../hooks/useFiles.js";
|
|
5
5
|
import { PageHero as r } from "../../components/PageHero.js";
|
|
6
6
|
import { ErrorView as i, LoadingView as a } from "../../components/StateViews.js";
|
|
@@ -10,99 +10,100 @@ import { AuthorLabel as d } from "../../components/AuthorLabel.js";
|
|
|
10
10
|
import { EmptyState as f } from "../../components/EmptyState.js";
|
|
11
11
|
import { useTcpCitations as p, useTcpDiscussions as m, useTcpStory as h, useTcpTopics as g, useTcpTransitionStory as _, useTcpUpdateStory as v, useTcpVerifyCitation as y } from "../../hooks/useTcpApi.js";
|
|
12
12
|
import "../../hooks/index.js";
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
13
|
+
import { describeError as b, notify as x } from "../../lib/toast.js";
|
|
14
|
+
import { impact as S, nativeToast as C, share as w } from "../../utils/nativeBridge.js";
|
|
15
|
+
import { DecorativeDivider as T } from "../../components/DecorativeDivider.js";
|
|
16
|
+
import { Tabs as E } from "../../components/Tabs.js";
|
|
17
|
+
import { TagInput as D } from "../../components/TagInput.js";
|
|
18
|
+
import { OpenDiscussionDialog as O } from "../../components/OpenDiscussionDialog.js";
|
|
19
|
+
import { LifecycleStepper as k } from "../../components/LifecycleStepper.js";
|
|
20
|
+
import { FileUploadField as A } from "../../components/FileUploadField.js";
|
|
21
|
+
import { CitationList as j, VERIFICATIONS as M, VERIFICATION_META as N, sourceTypeIcon as P } from "../../components/CitationList.js";
|
|
22
|
+
import { AddCitationDialog as F } from "../../components/AddCitationDialog.js";
|
|
23
|
+
import { Fragment as ee, useMemo as I, useState as L } from "react";
|
|
24
|
+
import { Archive as te, ArrowLeft as R, BookOpen as ne, ChevronDown as re, Clock as ie, GitBranch as z, Languages as ae, Lightbulb as oe, Lock as se, MessagesSquare as B, Pencil as ce, Plus as V, RotateCcw as le, Scroll as H, Send as U, Share2 as ue, ShieldCheck as W, Sparkles as de, Tag as fe } from "lucide-react";
|
|
25
|
+
import { useParams as pe, useSearchParams as me } from "react-router-dom";
|
|
26
|
+
import { Fragment as he, jsx as G, jsxs as K } from "react/jsx-runtime";
|
|
27
|
+
import { Button as q, DropdownMenu as ge, DropdownMenuContent as _e, DropdownMenuItem as ve, DropdownMenuTrigger as ye, GlassCard as be, Input as J, Label as Y, ResponsiveDialog as xe, ResponsiveDialogContent as Se, ResponsiveDialogDescription as Ce, ResponsiveDialogFooter as we, ResponsiveDialogHeader as Te, ResponsiveDialogTitle as Ee, ResponsiveTable as De, Select as X, SelectContent as Z, SelectItem as Q, SelectTrigger as Oe, SelectValue as ke, Textarea as Ae } from "@burdenoff/fe-libs/ui";
|
|
27
28
|
//#region src/theculturepost/pages/stories/StoryDetailPage.tsx
|
|
28
|
-
var
|
|
29
|
+
var je = {
|
|
29
30
|
IDEA: ["DRAFT"],
|
|
30
31
|
DRAFT: ["IN_REVIEW"],
|
|
31
32
|
IN_REVIEW: ["PUBLISHED", "DRAFT"],
|
|
32
33
|
PUBLISHED: ["ARCHIVED"],
|
|
33
34
|
ARCHIVED: ["PUBLISHED"]
|
|
34
|
-
},
|
|
35
|
+
}, Me = {
|
|
35
36
|
IDEA: {
|
|
36
37
|
label: "Move to Idea",
|
|
37
|
-
icon:
|
|
38
|
+
icon: oe
|
|
38
39
|
},
|
|
39
40
|
DRAFT: {
|
|
40
41
|
label: "Send back to Draft",
|
|
41
|
-
icon:
|
|
42
|
+
icon: le
|
|
42
43
|
},
|
|
43
44
|
IN_REVIEW: {
|
|
44
45
|
label: "Send to Review",
|
|
45
|
-
icon:
|
|
46
|
+
icon: U
|
|
46
47
|
},
|
|
47
48
|
PUBLISHED: {
|
|
48
49
|
label: "Publish",
|
|
49
|
-
icon:
|
|
50
|
+
icon: U,
|
|
50
51
|
primary: !0
|
|
51
52
|
},
|
|
52
53
|
ARCHIVED: {
|
|
53
54
|
label: "Archive",
|
|
54
|
-
icon:
|
|
55
|
+
icon: te
|
|
55
56
|
}
|
|
56
57
|
};
|
|
57
|
-
function
|
|
58
|
-
switch (
|
|
58
|
+
function Ne(e) {
|
|
59
|
+
switch (N[e].accent) {
|
|
59
60
|
case "success": return "text-status-success-text";
|
|
60
61
|
case "warning": return "text-status-warning-text";
|
|
61
62
|
case "destructive": return "text-status-error-text";
|
|
62
63
|
default: return "text-text-tertiary";
|
|
63
64
|
}
|
|
64
65
|
}
|
|
65
|
-
function
|
|
66
|
-
let { id: t } =
|
|
66
|
+
function Pe() {
|
|
67
|
+
let { id: t } = pe(), { navigateTo: n } = e(), [o, l] = me(), f = o.get("view") === "editorial" ? "editorial" : "reading", p = (e) => {
|
|
67
68
|
l((t) => {
|
|
68
69
|
let n = new URLSearchParams(t);
|
|
69
70
|
return e === "editorial" ? n.set("view", "editorial") : n.delete("view"), n;
|
|
70
71
|
}, { replace: !0 });
|
|
71
|
-
}, { data: g, isLoading: _, isError: v, refetch: y } = h(t), [b, x] =
|
|
72
|
+
}, { data: g, isLoading: _, isError: v, refetch: y } = h(t), [b, x] = L(!1), [T, D] = L(!1), [k, A] = L(!1), j = m({
|
|
72
73
|
storyId: t,
|
|
73
74
|
pagination: { limit: 20 }
|
|
74
|
-
}),
|
|
75
|
-
if (_) return /* @__PURE__ */
|
|
75
|
+
}), M = j.data?.items ?? [];
|
|
76
|
+
if (_) return /* @__PURE__ */ K("div", {
|
|
76
77
|
className: "mx-auto max-w-6xl p-4 sm:p-6",
|
|
77
|
-
children: [/* @__PURE__ */
|
|
78
|
+
children: [/* @__PURE__ */ K(q, {
|
|
78
79
|
variant: "ghost",
|
|
79
80
|
size: "sm",
|
|
80
81
|
onClick: () => n("stories"),
|
|
81
|
-
children: [/* @__PURE__ */
|
|
82
|
-
}), /* @__PURE__ */
|
|
82
|
+
children: [/* @__PURE__ */ G(R, { className: "mr-1.5 h-4 w-4" }), " Stories"]
|
|
83
|
+
}), /* @__PURE__ */ G(a, { label: "Loading story…" })]
|
|
83
84
|
});
|
|
84
|
-
if (v || !g) return /* @__PURE__ */
|
|
85
|
+
if (v || !g) return /* @__PURE__ */ K("div", {
|
|
85
86
|
className: "mx-auto max-w-6xl p-4 sm:p-6",
|
|
86
|
-
children: [/* @__PURE__ */
|
|
87
|
+
children: [/* @__PURE__ */ K(q, {
|
|
87
88
|
variant: "ghost",
|
|
88
89
|
size: "sm",
|
|
89
90
|
onClick: () => n("stories"),
|
|
90
|
-
children: [/* @__PURE__ */
|
|
91
|
-
}), /* @__PURE__ */
|
|
91
|
+
children: [/* @__PURE__ */ G(R, { className: "mr-1.5 h-4 w-4" }), " Stories"]
|
|
92
|
+
}), /* @__PURE__ */ G(i, {
|
|
92
93
|
title: "Story not found",
|
|
93
94
|
message: "This story may have been archived, or you may not have access.",
|
|
94
95
|
onRetry: () => y()
|
|
95
96
|
})]
|
|
96
97
|
});
|
|
97
|
-
let
|
|
98
|
-
/* @__PURE__ */
|
|
99
|
-
/* @__PURE__ */
|
|
100
|
-
g.topic && /* @__PURE__ */
|
|
98
|
+
let N = /* @__PURE__ */ K(he, { children: [
|
|
99
|
+
/* @__PURE__ */ G(u, { status: g.format }),
|
|
100
|
+
/* @__PURE__ */ G(u, { status: g.status }),
|
|
101
|
+
g.topic && /* @__PURE__ */ K("button", {
|
|
101
102
|
type: "button",
|
|
102
103
|
onClick: () => n(`topics/${g.topic.id}`),
|
|
103
104
|
className: "inline-flex items-center gap-1 rounded-full bg-bg-sunken px-2.5 py-0.5 text-xs font-medium text-text-secondary transition-colors hover:text-text-primary",
|
|
104
105
|
children: [
|
|
105
|
-
/* @__PURE__ */
|
|
106
|
+
/* @__PURE__ */ G(fe, {
|
|
106
107
|
className: "h-3 w-3",
|
|
107
108
|
"aria-hidden": "true"
|
|
108
109
|
}),
|
|
@@ -110,18 +111,18 @@ function ke() {
|
|
|
110
111
|
g.topic.name
|
|
111
112
|
]
|
|
112
113
|
}),
|
|
113
|
-
/* @__PURE__ */
|
|
114
|
+
/* @__PURE__ */ G("span", {
|
|
114
115
|
className: "inline-flex items-center gap-1.5 text-xs text-text-tertiary",
|
|
115
|
-
children: /* @__PURE__ */
|
|
116
|
+
children: /* @__PURE__ */ G(d, {
|
|
116
117
|
actorId: g.authorId,
|
|
117
118
|
prefix: "By",
|
|
118
119
|
withIcon: !0
|
|
119
120
|
})
|
|
120
121
|
}),
|
|
121
|
-
g.readingMins > 0 && /* @__PURE__ */
|
|
122
|
+
g.readingMins > 0 && /* @__PURE__ */ K("span", {
|
|
122
123
|
className: "inline-flex items-center gap-1 text-xs text-text-tertiary",
|
|
123
124
|
children: [
|
|
124
|
-
/* @__PURE__ */
|
|
125
|
+
/* @__PURE__ */ G(ie, {
|
|
125
126
|
className: "h-3.5 w-3.5",
|
|
126
127
|
"aria-hidden": "true"
|
|
127
128
|
}),
|
|
@@ -130,10 +131,10 @@ function ke() {
|
|
|
130
131
|
" min read"
|
|
131
132
|
]
|
|
132
133
|
}),
|
|
133
|
-
g.languages.length > 0 && /* @__PURE__ */
|
|
134
|
+
g.languages.length > 0 && /* @__PURE__ */ K("span", {
|
|
134
135
|
className: "inline-flex items-center gap-1 text-xs text-text-tertiary",
|
|
135
136
|
children: [
|
|
136
|
-
/* @__PURE__ */
|
|
137
|
+
/* @__PURE__ */ G(ae, {
|
|
137
138
|
className: "h-3.5 w-3.5",
|
|
138
139
|
"aria-hidden": "true"
|
|
139
140
|
}),
|
|
@@ -141,20 +142,20 @@ function ke() {
|
|
|
141
142
|
g.languages.map(s).join(", ")
|
|
142
143
|
]
|
|
143
144
|
})
|
|
144
|
-
] }),
|
|
145
|
+
] }), P = [{
|
|
145
146
|
value: "reading",
|
|
146
147
|
label: "Reading",
|
|
147
|
-
icon: /* @__PURE__ */
|
|
148
|
+
icon: /* @__PURE__ */ G(ne, { className: "h-4 w-4" })
|
|
148
149
|
}, {
|
|
149
150
|
value: "editorial",
|
|
150
151
|
label: "Editorial",
|
|
151
|
-
icon: /* @__PURE__ */
|
|
152
|
+
icon: /* @__PURE__ */ G(z, { className: "h-4 w-4" }),
|
|
152
153
|
count: g.citations.length
|
|
153
154
|
}];
|
|
154
|
-
return /* @__PURE__ */
|
|
155
|
+
return /* @__PURE__ */ K("div", {
|
|
155
156
|
className: "mx-auto flex max-w-6xl flex-col gap-6 p-4 sm:p-6",
|
|
156
157
|
children: [
|
|
157
|
-
/* @__PURE__ */
|
|
158
|
+
/* @__PURE__ */ G(r, {
|
|
158
159
|
eyebrow: "Story",
|
|
159
160
|
title: g.title,
|
|
160
161
|
description: g.summary ?? void 0,
|
|
@@ -163,99 +164,118 @@ function ke() {
|
|
|
163
164
|
label: "Stories",
|
|
164
165
|
onClick: () => n("stories")
|
|
165
166
|
},
|
|
166
|
-
meta:
|
|
167
|
-
actions: /* @__PURE__ */
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
167
|
+
meta: N,
|
|
168
|
+
actions: /* @__PURE__ */ K("div", {
|
|
169
|
+
className: "flex items-center gap-2",
|
|
170
|
+
children: [/* @__PURE__ */ K(q, {
|
|
171
|
+
variant: "outline",
|
|
172
|
+
size: "sm",
|
|
173
|
+
onClick: async () => {
|
|
174
|
+
await S("light"), await w({
|
|
175
|
+
title: g.title,
|
|
176
|
+
text: g.summary ?? void 0,
|
|
177
|
+
url: window.location.href
|
|
178
|
+
}) && await C("Link shared");
|
|
179
|
+
},
|
|
180
|
+
"aria-label": "Share story",
|
|
181
|
+
children: [/* @__PURE__ */ G(ue, { className: "mr-1.5 h-4 w-4" }), " Share"]
|
|
182
|
+
}), /* @__PURE__ */ K(q, {
|
|
183
|
+
variant: "outline",
|
|
184
|
+
onClick: () => A(!0),
|
|
185
|
+
"data-tour": "theculturepost-story-edit",
|
|
186
|
+
children: [/* @__PURE__ */ G(ce, { className: "mr-1.5 h-4 w-4" }), " Edit"]
|
|
187
|
+
})]
|
|
171
188
|
})
|
|
172
189
|
}),
|
|
173
|
-
/* @__PURE__ */
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
190
|
+
/* @__PURE__ */ G("div", {
|
|
191
|
+
"data-tour": "theculturepost-story-tabs",
|
|
192
|
+
children: /* @__PURE__ */ G(E, {
|
|
193
|
+
items: P,
|
|
194
|
+
value: f,
|
|
195
|
+
onChange: p
|
|
196
|
+
})
|
|
177
197
|
}),
|
|
178
|
-
f === "reading" ? /* @__PURE__ */
|
|
198
|
+
f === "reading" ? /* @__PURE__ */ G(Fe, {
|
|
179
199
|
story: g,
|
|
180
|
-
discussions:
|
|
181
|
-
discussionsLoading:
|
|
200
|
+
discussions: M,
|
|
201
|
+
discussionsLoading: j.isLoading,
|
|
182
202
|
onViewCitations: () => p("editorial"),
|
|
183
|
-
onOpenDiscussion: () =>
|
|
203
|
+
onOpenDiscussion: () => D(!0),
|
|
184
204
|
onViewAllDiscussions: () => n("discussions"),
|
|
185
205
|
onOpenDiscussionItem: (e) => n(`discussions/${e.id}`)
|
|
186
|
-
}) : /* @__PURE__ */
|
|
206
|
+
}) : /* @__PURE__ */ G(Re, {
|
|
187
207
|
story: g,
|
|
188
208
|
onAddCitation: () => x(!0)
|
|
189
209
|
}),
|
|
190
|
-
/* @__PURE__ */
|
|
210
|
+
/* @__PURE__ */ G(F, {
|
|
191
211
|
open: b,
|
|
192
212
|
onOpenChange: x,
|
|
193
213
|
storyId: g.id
|
|
194
214
|
}),
|
|
195
|
-
/* @__PURE__ */
|
|
196
|
-
open:
|
|
197
|
-
onOpenChange:
|
|
215
|
+
/* @__PURE__ */ G(O, {
|
|
216
|
+
open: T,
|
|
217
|
+
onOpenChange: D,
|
|
198
218
|
storyId: g.id,
|
|
199
219
|
onCreated: (e) => n(`discussions/${e.id}`)
|
|
200
220
|
}),
|
|
201
|
-
/* @__PURE__ */
|
|
202
|
-
open:
|
|
203
|
-
onOpenChange:
|
|
221
|
+
/* @__PURE__ */ G(He, {
|
|
222
|
+
open: k,
|
|
223
|
+
onOpenChange: A,
|
|
204
224
|
story: g
|
|
205
225
|
})
|
|
206
226
|
]
|
|
207
227
|
});
|
|
208
228
|
}
|
|
209
|
-
function
|
|
210
|
-
return /* @__PURE__ */
|
|
229
|
+
function Fe({ story: e, discussions: t, discussionsLoading: n, onViewCitations: r, onOpenDiscussion: i, onViewAllDiscussions: o, onOpenDiscussionItem: s }) {
|
|
230
|
+
return /* @__PURE__ */ K("div", {
|
|
211
231
|
className: "grid grid-cols-1 gap-8 lg:grid-cols-[minmax(0,1fr)_360px]",
|
|
212
|
-
children: [/* @__PURE__ */
|
|
232
|
+
children: [/* @__PURE__ */ K("article", {
|
|
213
233
|
className: "min-w-0",
|
|
214
|
-
children: [/* @__PURE__ */
|
|
234
|
+
children: [/* @__PURE__ */ G(Ie, { body: e.body }), e.tags.length > 0 && /* @__PURE__ */ G("div", {
|
|
215
235
|
className: "mt-8 flex flex-wrap gap-1.5 border-t border-border-seam pt-6",
|
|
216
|
-
children: e.tags.map((e) => /* @__PURE__ */
|
|
236
|
+
children: e.tags.map((e) => /* @__PURE__ */ K("span", {
|
|
217
237
|
className: "rounded-full bg-bg-sunken px-2.5 py-0.5 text-xs font-medium text-text-secondary",
|
|
218
238
|
children: ["#", e]
|
|
219
239
|
}, e))
|
|
220
240
|
})]
|
|
221
|
-
}), /* @__PURE__ */
|
|
241
|
+
}), /* @__PURE__ */ K("aside", {
|
|
222
242
|
className: "flex flex-col gap-6 lg:sticky lg:top-4 lg:self-start",
|
|
223
|
-
children: [/* @__PURE__ */
|
|
243
|
+
children: [/* @__PURE__ */ G($, {
|
|
224
244
|
title: "Citations",
|
|
225
|
-
action: /* @__PURE__ */
|
|
245
|
+
action: /* @__PURE__ */ G("button", {
|
|
226
246
|
type: "button",
|
|
227
247
|
onClick: r,
|
|
228
248
|
className: "text-xs font-medium text-accent hover:underline",
|
|
229
249
|
children: "View all"
|
|
230
250
|
}),
|
|
231
|
-
children: /* @__PURE__ */
|
|
251
|
+
children: /* @__PURE__ */ G(j, {
|
|
232
252
|
storyId: e.id,
|
|
233
253
|
compact: !0
|
|
234
254
|
})
|
|
235
|
-
}), /* @__PURE__ */
|
|
255
|
+
}), /* @__PURE__ */ G($, {
|
|
236
256
|
title: "Linked discussions",
|
|
237
|
-
action: /* @__PURE__ */
|
|
257
|
+
action: /* @__PURE__ */ G("button", {
|
|
238
258
|
type: "button",
|
|
239
259
|
onClick: o,
|
|
240
260
|
className: "text-xs font-medium text-accent hover:underline",
|
|
241
261
|
children: "View all"
|
|
242
262
|
}),
|
|
243
|
-
children: n ? /* @__PURE__ */
|
|
263
|
+
children: n ? /* @__PURE__ */ G(a, {
|
|
244
264
|
label: "Loading discussions…",
|
|
245
265
|
className: "min-h-[8rem]"
|
|
246
|
-
}) : t.length === 0 ? /* @__PURE__ */
|
|
247
|
-
icon: /* @__PURE__ */
|
|
266
|
+
}) : t.length === 0 ? /* @__PURE__ */ G(f, {
|
|
267
|
+
icon: /* @__PURE__ */ G(B, { className: "h-8 w-8" }),
|
|
248
268
|
title: "No discussions yet",
|
|
249
269
|
description: "Open a discussion to invite perspectives on this story.",
|
|
250
|
-
action: /* @__PURE__ */
|
|
270
|
+
action: /* @__PURE__ */ K(q, {
|
|
251
271
|
size: "sm",
|
|
252
272
|
variant: "outline",
|
|
253
273
|
onClick: i,
|
|
254
|
-
children: [/* @__PURE__ */
|
|
274
|
+
children: [/* @__PURE__ */ G(V, { className: "mr-1.5 h-4 w-4" }), " Open discussion"]
|
|
255
275
|
})
|
|
256
|
-
}) : /* @__PURE__ */
|
|
276
|
+
}) : /* @__PURE__ */ G("div", {
|
|
257
277
|
className: "flex flex-col gap-3",
|
|
258
|
-
children: t.slice(0, 5).map((e) => /* @__PURE__ */
|
|
278
|
+
children: t.slice(0, 5).map((e) => /* @__PURE__ */ G(Le, {
|
|
259
279
|
discussion: e,
|
|
260
280
|
onOpen: () => s(e)
|
|
261
281
|
}, e.id))
|
|
@@ -264,71 +284,71 @@ function Ae({ story: e, discussions: t, discussionsLoading: n, onViewCitations:
|
|
|
264
284
|
})]
|
|
265
285
|
});
|
|
266
286
|
}
|
|
267
|
-
function
|
|
268
|
-
return /* @__PURE__ */
|
|
287
|
+
function $({ title: e, action: t, children: n }) {
|
|
288
|
+
return /* @__PURE__ */ K("section", { children: [/* @__PURE__ */ K("div", {
|
|
269
289
|
className: "mb-3 flex items-center justify-between gap-2",
|
|
270
|
-
children: [/* @__PURE__ */
|
|
290
|
+
children: [/* @__PURE__ */ G("h2", {
|
|
271
291
|
className: "font-display text-lg font-semibold text-text-primary",
|
|
272
292
|
children: e
|
|
273
293
|
}), t]
|
|
274
294
|
}), n] });
|
|
275
295
|
}
|
|
276
|
-
function
|
|
277
|
-
let n =
|
|
278
|
-
return n.length === 0 ? /* @__PURE__ */
|
|
296
|
+
function Ie({ body: e }) {
|
|
297
|
+
let n = I(() => (e ?? "").split(/\n{2,}/).map((e) => e.trim()).filter(Boolean), [e]);
|
|
298
|
+
return n.length === 0 ? /* @__PURE__ */ G("p", {
|
|
279
299
|
className: "rounded-xl border border-dashed border-border-seam px-4 py-10 text-center text-sm text-text-tertiary",
|
|
280
300
|
children: "This story has no body yet. Use Edit to write it."
|
|
281
|
-
}) : /* @__PURE__ */
|
|
301
|
+
}) : /* @__PURE__ */ G("div", {
|
|
282
302
|
className: "max-w-prose",
|
|
283
|
-
children: n.map((e, n) => /* @__PURE__ */
|
|
303
|
+
children: n.map((e, n) => /* @__PURE__ */ K(ee, { children: [n === 1 && /* @__PURE__ */ G(T, {}), /* @__PURE__ */ G("p", {
|
|
284
304
|
className: t("text-[1.05rem] leading-8 text-text-primary", n > 0 && n !== 1 && "mt-5", n === 0 && "first-letter:float-left first-letter:mr-3 first-letter:mt-1 first-letter:font-display first-letter:text-6xl first-letter:font-semibold first-letter:leading-[0.72] first-letter:text-accent"),
|
|
285
305
|
children: e
|
|
286
306
|
})] }, n))
|
|
287
307
|
});
|
|
288
308
|
}
|
|
289
|
-
function
|
|
290
|
-
return /* @__PURE__ */
|
|
309
|
+
function Le({ discussion: e, onOpen: t }) {
|
|
310
|
+
return /* @__PURE__ */ G("button", {
|
|
291
311
|
type: "button",
|
|
292
312
|
onClick: t,
|
|
293
313
|
className: "w-full rounded-xl border border-border-seam bg-bg-surface p-3 text-left transition-colors hover:border-border-strong",
|
|
294
|
-
children: /* @__PURE__ */
|
|
314
|
+
children: /* @__PURE__ */ K("div", {
|
|
295
315
|
className: "flex items-start gap-2.5",
|
|
296
|
-
children: [/* @__PURE__ */
|
|
316
|
+
children: [/* @__PURE__ */ G("span", {
|
|
297
317
|
className: "grid h-8 w-8 shrink-0 place-items-center rounded-lg bg-[var(--color-accent-soft)] text-text-primary",
|
|
298
318
|
"aria-hidden": "true",
|
|
299
|
-
children: /* @__PURE__ */
|
|
300
|
-
}), /* @__PURE__ */
|
|
319
|
+
children: /* @__PURE__ */ G(B, { className: "h-4 w-4" })
|
|
320
|
+
}), /* @__PURE__ */ K("div", {
|
|
301
321
|
className: "min-w-0 flex-1",
|
|
302
322
|
children: [
|
|
303
|
-
/* @__PURE__ */
|
|
323
|
+
/* @__PURE__ */ G("p", {
|
|
304
324
|
className: "truncate text-sm font-medium text-text-primary",
|
|
305
325
|
children: e.title
|
|
306
326
|
}),
|
|
307
|
-
e.prompt && /* @__PURE__ */
|
|
327
|
+
e.prompt && /* @__PURE__ */ G("p", {
|
|
308
328
|
className: "mt-0.5 line-clamp-2 text-xs text-text-tertiary",
|
|
309
329
|
children: e.prompt
|
|
310
330
|
}),
|
|
311
|
-
/* @__PURE__ */
|
|
331
|
+
/* @__PURE__ */ K("div", {
|
|
312
332
|
className: "mt-1.5 flex flex-wrap items-center gap-x-2 gap-y-1 text-xs text-text-tertiary",
|
|
313
333
|
children: [
|
|
314
|
-
/* @__PURE__ */
|
|
334
|
+
/* @__PURE__ */ K("span", { children: [
|
|
315
335
|
c(e.replyCount),
|
|
316
336
|
" ",
|
|
317
337
|
e.replyCount === 1 ? "reply" : "replies"
|
|
318
338
|
] }),
|
|
319
|
-
/* @__PURE__ */
|
|
339
|
+
/* @__PURE__ */ G("span", {
|
|
320
340
|
"aria-hidden": "true",
|
|
321
341
|
children: "·"
|
|
322
342
|
}),
|
|
323
|
-
/* @__PURE__ */
|
|
324
|
-
e.isInterfaith && /* @__PURE__ */
|
|
343
|
+
/* @__PURE__ */ G("span", { children: l(e.createdAt) }),
|
|
344
|
+
e.isInterfaith && /* @__PURE__ */ G(u, {
|
|
325
345
|
status: "Interfaith",
|
|
326
|
-
icon: /* @__PURE__ */
|
|
346
|
+
icon: /* @__PURE__ */ G(de, { className: "h-3 w-3" }),
|
|
327
347
|
className: "ml-0.5"
|
|
328
348
|
}),
|
|
329
|
-
e.isLocked && /* @__PURE__ */
|
|
349
|
+
e.isLocked && /* @__PURE__ */ K("span", {
|
|
330
350
|
className: "inline-flex items-center gap-1 text-text-tertiary",
|
|
331
|
-
children: [/* @__PURE__ */
|
|
351
|
+
children: [/* @__PURE__ */ G(se, {
|
|
332
352
|
className: "h-3 w-3",
|
|
333
353
|
"aria-hidden": "true"
|
|
334
354
|
}), " Locked"]
|
|
@@ -340,98 +360,98 @@ function Ne({ discussion: e, onOpen: t }) {
|
|
|
340
360
|
})
|
|
341
361
|
});
|
|
342
362
|
}
|
|
343
|
-
function
|
|
344
|
-
let n = _(), r =
|
|
363
|
+
function Re({ story: e, onAddCitation: t }) {
|
|
364
|
+
let n = _(), r = je[e.status] ?? [], i = async (t) => {
|
|
345
365
|
try {
|
|
346
366
|
await n.mutateAsync({
|
|
347
367
|
id: e.id,
|
|
348
368
|
status: t
|
|
349
|
-
}),
|
|
369
|
+
}), x.success("Story updated", `Moved to ${s(t)}`);
|
|
350
370
|
} catch (e) {
|
|
351
|
-
|
|
371
|
+
x.error("Could not update the story", b(e));
|
|
352
372
|
}
|
|
353
373
|
};
|
|
354
|
-
return /* @__PURE__ */
|
|
374
|
+
return /* @__PURE__ */ K("div", {
|
|
355
375
|
className: "flex flex-col gap-6",
|
|
356
|
-
children: [/* @__PURE__ */
|
|
376
|
+
children: [/* @__PURE__ */ K(be, {
|
|
357
377
|
treatment: "plain",
|
|
358
378
|
className: "p-5 sm:p-6",
|
|
359
379
|
children: [
|
|
360
|
-
/* @__PURE__ */
|
|
380
|
+
/* @__PURE__ */ K("div", {
|
|
361
381
|
className: "flex items-center gap-2.5",
|
|
362
|
-
children: [/* @__PURE__ */
|
|
382
|
+
children: [/* @__PURE__ */ G("span", {
|
|
363
383
|
className: "grid h-9 w-9 shrink-0 place-items-center rounded-xl bg-[var(--color-accent-soft)] text-text-primary",
|
|
364
384
|
"aria-hidden": "true",
|
|
365
|
-
children: /* @__PURE__ */
|
|
366
|
-
}), /* @__PURE__ */
|
|
385
|
+
children: /* @__PURE__ */ G(z, { className: "h-5 w-5" })
|
|
386
|
+
}), /* @__PURE__ */ G("h2", {
|
|
367
387
|
className: "font-display text-xl font-semibold text-text-primary",
|
|
368
388
|
children: "Editorial lifecycle"
|
|
369
389
|
})]
|
|
370
390
|
}),
|
|
371
|
-
/* @__PURE__ */
|
|
391
|
+
/* @__PURE__ */ G(k, {
|
|
372
392
|
status: e.status,
|
|
373
393
|
className: "mt-6"
|
|
374
394
|
}),
|
|
375
|
-
/* @__PURE__ */
|
|
395
|
+
/* @__PURE__ */ K("div", {
|
|
376
396
|
className: "mt-6 flex flex-col gap-4 border-t border-border-seam pt-5 md:flex-row md:items-center md:justify-between",
|
|
377
|
-
children: [r.length > 0 ? /* @__PURE__ */
|
|
397
|
+
children: [r.length > 0 ? /* @__PURE__ */ G("div", {
|
|
378
398
|
className: "flex flex-wrap gap-2",
|
|
379
399
|
children: r.map((e) => {
|
|
380
|
-
let t =
|
|
381
|
-
return /* @__PURE__ */
|
|
400
|
+
let t = Me[e], r = t.icon;
|
|
401
|
+
return /* @__PURE__ */ K(q, {
|
|
382
402
|
variant: t.primary ? "default" : "outline",
|
|
383
403
|
onClick: () => i(e),
|
|
384
404
|
disabled: n.isPending,
|
|
385
|
-
children: [/* @__PURE__ */
|
|
405
|
+
children: [/* @__PURE__ */ G(r, {
|
|
386
406
|
className: "mr-1.5 h-4 w-4",
|
|
387
407
|
"aria-hidden": "true"
|
|
388
408
|
}), t.label]
|
|
389
409
|
}, e);
|
|
390
410
|
})
|
|
391
|
-
}) : /* @__PURE__ */
|
|
411
|
+
}) : /* @__PURE__ */ G("p", {
|
|
392
412
|
className: "text-sm text-text-tertiary",
|
|
393
413
|
children: "This story is at the end of its lifecycle."
|
|
394
|
-
}), /* @__PURE__ */
|
|
414
|
+
}), /* @__PURE__ */ K("p", {
|
|
395
415
|
className: "flex items-center gap-2 text-sm text-text-secondary",
|
|
396
|
-
children: [/* @__PURE__ */ W
|
|
416
|
+
children: [/* @__PURE__ */ G(W, {
|
|
397
417
|
className: "h-4 w-4 shrink-0 text-text-tertiary",
|
|
398
418
|
"aria-hidden": "true"
|
|
399
419
|
}), "Reviewed with fact and sensitivity care before publishing."]
|
|
400
420
|
})]
|
|
401
421
|
})
|
|
402
422
|
]
|
|
403
|
-
}), /* @__PURE__ */
|
|
423
|
+
}), /* @__PURE__ */ K(be, {
|
|
404
424
|
treatment: "plain",
|
|
405
425
|
className: "p-5 sm:p-6",
|
|
406
426
|
children: [
|
|
407
|
-
/* @__PURE__ */
|
|
427
|
+
/* @__PURE__ */ K("div", {
|
|
408
428
|
className: "flex flex-wrap items-center justify-between gap-3",
|
|
409
|
-
children: [/* @__PURE__ */
|
|
429
|
+
children: [/* @__PURE__ */ K("div", {
|
|
410
430
|
className: "flex items-center gap-2.5",
|
|
411
|
-
children: [/* @__PURE__ */
|
|
431
|
+
children: [/* @__PURE__ */ G("span", {
|
|
412
432
|
className: "grid h-9 w-9 shrink-0 place-items-center rounded-xl bg-[var(--color-accent-soft)] text-text-primary",
|
|
413
433
|
"aria-hidden": "true",
|
|
414
|
-
children: /* @__PURE__ */
|
|
415
|
-
}), /* @__PURE__ */
|
|
434
|
+
children: /* @__PURE__ */ G(H, { className: "h-5 w-5" })
|
|
435
|
+
}), /* @__PURE__ */ K("div", { children: [/* @__PURE__ */ G("h2", {
|
|
416
436
|
className: "font-display text-xl font-semibold text-text-primary",
|
|
417
437
|
children: "Citations"
|
|
418
|
-
}), /* @__PURE__ */
|
|
438
|
+
}), /* @__PURE__ */ G("p", {
|
|
419
439
|
className: "text-sm text-text-secondary",
|
|
420
440
|
children: "Verifiable sources that ground this story."
|
|
421
441
|
})] })]
|
|
422
|
-
}), /* @__PURE__ */
|
|
442
|
+
}), /* @__PURE__ */ K(q, {
|
|
423
443
|
variant: "outline",
|
|
424
444
|
onClick: t,
|
|
425
|
-
children: [/* @__PURE__ */
|
|
445
|
+
children: [/* @__PURE__ */ G(V, { className: "mr-1.5 h-4 w-4" }), " Add citation"]
|
|
426
446
|
})]
|
|
427
447
|
}),
|
|
428
|
-
/* @__PURE__ */
|
|
448
|
+
/* @__PURE__ */ G(ze, {
|
|
429
449
|
storyId: e.id,
|
|
430
450
|
className: "mt-5"
|
|
431
451
|
}),
|
|
432
|
-
/* @__PURE__ */
|
|
452
|
+
/* @__PURE__ */ K("p", {
|
|
433
453
|
className: "mt-4 flex items-center gap-2 border-t border-border-seam pt-4 text-xs text-text-tertiary",
|
|
434
|
-
children: [/* @__PURE__ */ W
|
|
454
|
+
children: [/* @__PURE__ */ G(W, {
|
|
435
455
|
className: "h-3.5 w-3.5 shrink-0",
|
|
436
456
|
"aria-hidden": "true"
|
|
437
457
|
}), "All sources are evaluated for accuracy, relevance, and cultural sensitivity."]
|
|
@@ -440,18 +460,18 @@ function Pe({ story: e, onAddCitation: t }) {
|
|
|
440
460
|
})]
|
|
441
461
|
});
|
|
442
462
|
}
|
|
443
|
-
function
|
|
463
|
+
function ze({ storyId: e, className: n }) {
|
|
444
464
|
let { data: r, isLoading: s, isError: c, refetch: l } = p(e);
|
|
445
|
-
return s ? /* @__PURE__ */
|
|
465
|
+
return s ? /* @__PURE__ */ G(a, {
|
|
446
466
|
label: "Loading citations…",
|
|
447
467
|
className: n
|
|
448
|
-
}) : c ? /* @__PURE__ */
|
|
468
|
+
}) : c ? /* @__PURE__ */ G("div", {
|
|
449
469
|
className: n,
|
|
450
|
-
children: /* @__PURE__ */
|
|
470
|
+
children: /* @__PURE__ */ G(i, {
|
|
451
471
|
message: "We couldn't load citations.",
|
|
452
472
|
onRetry: () => l()
|
|
453
473
|
})
|
|
454
|
-
}) : /* @__PURE__ */
|
|
474
|
+
}) : /* @__PURE__ */ G(De, {
|
|
455
475
|
className: n,
|
|
456
476
|
columns: [
|
|
457
477
|
{
|
|
@@ -459,25 +479,25 @@ function Fe({ storyId: e, className: n }) {
|
|
|
459
479
|
header: "Source",
|
|
460
480
|
priority: "primary",
|
|
461
481
|
cell: (e) => {
|
|
462
|
-
let t =
|
|
463
|
-
return /* @__PURE__ */
|
|
482
|
+
let t = P(e.sourceType), n = [e.author, e.publisher].filter((e) => e && e.trim()).join(" · ");
|
|
483
|
+
return /* @__PURE__ */ K("div", {
|
|
464
484
|
className: "flex min-w-0 items-start gap-3",
|
|
465
|
-
children: [/* @__PURE__ */
|
|
485
|
+
children: [/* @__PURE__ */ G("span", {
|
|
466
486
|
className: "grid h-9 w-9 shrink-0 place-items-center rounded-lg bg-[var(--color-accent-soft)] text-text-primary",
|
|
467
487
|
"aria-hidden": "true",
|
|
468
|
-
children: /* @__PURE__ */
|
|
469
|
-
}), /* @__PURE__ */
|
|
488
|
+
children: /* @__PURE__ */ G(t, { className: "h-4 w-4" })
|
|
489
|
+
}), /* @__PURE__ */ K("div", {
|
|
470
490
|
className: "min-w-0",
|
|
471
491
|
children: [
|
|
472
|
-
/* @__PURE__ */
|
|
492
|
+
/* @__PURE__ */ G("p", {
|
|
473
493
|
className: "font-medium text-text-primary",
|
|
474
494
|
children: e.title
|
|
475
495
|
}),
|
|
476
|
-
e.excerpt && /* @__PURE__ */
|
|
496
|
+
e.excerpt && /* @__PURE__ */ G("p", {
|
|
477
497
|
className: "mt-0.5 line-clamp-1 text-xs italic text-text-tertiary",
|
|
478
498
|
children: e.excerpt
|
|
479
499
|
}),
|
|
480
|
-
n && /* @__PURE__ */
|
|
500
|
+
n && /* @__PURE__ */ G("p", {
|
|
481
501
|
className: "mt-0.5 text-xs text-text-tertiary",
|
|
482
502
|
children: n
|
|
483
503
|
})
|
|
@@ -489,16 +509,16 @@ function Fe({ storyId: e, className: n }) {
|
|
|
489
509
|
{
|
|
490
510
|
key: "type",
|
|
491
511
|
header: "Type",
|
|
492
|
-
cell: (e) => /* @__PURE__ */
|
|
512
|
+
cell: (e) => /* @__PURE__ */ G(u, {
|
|
493
513
|
status: e.sourceType,
|
|
494
|
-
icon: /* @__PURE__ */
|
|
514
|
+
icon: /* @__PURE__ */ G(P(e.sourceType), { className: "h-3 w-3" })
|
|
495
515
|
})
|
|
496
516
|
},
|
|
497
517
|
{
|
|
498
518
|
key: "added",
|
|
499
519
|
header: "Added on",
|
|
500
520
|
priority: "hidden-on-mobile",
|
|
501
|
-
cell: (e) => /* @__PURE__ */
|
|
521
|
+
cell: (e) => /* @__PURE__ */ G("span", {
|
|
502
522
|
className: "whitespace-nowrap text-sm text-text-secondary",
|
|
503
523
|
children: o(e.createdAt)
|
|
504
524
|
})
|
|
@@ -507,10 +527,10 @@ function Fe({ storyId: e, className: n }) {
|
|
|
507
527
|
key: "verification",
|
|
508
528
|
header: "Status",
|
|
509
529
|
cell: (e) => {
|
|
510
|
-
let n =
|
|
511
|
-
return /* @__PURE__ */
|
|
530
|
+
let n = N[e.verification].icon;
|
|
531
|
+
return /* @__PURE__ */ G(u, {
|
|
512
532
|
status: e.verification,
|
|
513
|
-
icon: /* @__PURE__ */
|
|
533
|
+
icon: /* @__PURE__ */ G(n, { className: t("h-3 w-3", Ne(e.verification)) })
|
|
514
534
|
});
|
|
515
535
|
}
|
|
516
536
|
},
|
|
@@ -519,57 +539,57 @@ function Fe({ storyId: e, className: n }) {
|
|
|
519
539
|
header: "Actions",
|
|
520
540
|
headerClassName: "text-right",
|
|
521
541
|
cellClassName: "text-right",
|
|
522
|
-
cell: (e) => /* @__PURE__ */
|
|
542
|
+
cell: (e) => /* @__PURE__ */ G(Be, { citation: e })
|
|
523
543
|
}
|
|
524
544
|
],
|
|
525
545
|
data: r ?? [],
|
|
526
546
|
rowKey: (e) => e.id,
|
|
527
|
-
emptyState: /* @__PURE__ */
|
|
528
|
-
icon: /* @__PURE__ */
|
|
547
|
+
emptyState: /* @__PURE__ */ G(f, {
|
|
548
|
+
icon: /* @__PURE__ */ G(H, { className: "h-9 w-9" }),
|
|
529
549
|
title: "No citations yet",
|
|
530
550
|
description: "Add verifiable sources to ground this story in the record."
|
|
531
551
|
})
|
|
532
552
|
});
|
|
533
553
|
}
|
|
534
|
-
function
|
|
554
|
+
function Be({ citation: e }) {
|
|
535
555
|
let n = y(), r = async (t) => {
|
|
536
556
|
if (t !== e.verification) try {
|
|
537
557
|
await n.mutateAsync({
|
|
538
558
|
id: e.id,
|
|
539
559
|
verification: t
|
|
540
|
-
}),
|
|
560
|
+
}), x.success("Verification updated", s(t));
|
|
541
561
|
} catch (e) {
|
|
542
|
-
|
|
562
|
+
x.error("Could not update verification", b(e));
|
|
543
563
|
}
|
|
544
564
|
};
|
|
545
|
-
return /* @__PURE__ */
|
|
565
|
+
return /* @__PURE__ */ K(ge, { children: [/* @__PURE__ */ G(ye, {
|
|
546
566
|
asChild: !0,
|
|
547
|
-
children: /* @__PURE__ */
|
|
567
|
+
children: /* @__PURE__ */ K(q, {
|
|
548
568
|
size: "sm",
|
|
549
569
|
variant: "outline",
|
|
550
570
|
disabled: n.isPending,
|
|
551
571
|
"aria-label": `Change verification for ${e.title}`,
|
|
552
|
-
children: ["Verify ", /* @__PURE__ */
|
|
572
|
+
children: ["Verify ", /* @__PURE__ */ G(re, {
|
|
553
573
|
className: "ml-1 h-4 w-4",
|
|
554
574
|
"aria-hidden": "true"
|
|
555
575
|
})]
|
|
556
576
|
})
|
|
557
|
-
}), /* @__PURE__ */
|
|
577
|
+
}), /* @__PURE__ */ G(_e, {
|
|
558
578
|
align: "end",
|
|
559
|
-
children:
|
|
560
|
-
let i =
|
|
561
|
-
return /* @__PURE__ */
|
|
579
|
+
children: M.map((n) => {
|
|
580
|
+
let i = N[n], a = i.icon;
|
|
581
|
+
return /* @__PURE__ */ K(ve, {
|
|
562
582
|
onSelect: () => r(n),
|
|
563
583
|
className: t("gap-2", n === e.verification && "font-semibold"),
|
|
564
|
-
children: [/* @__PURE__ */
|
|
565
|
-
className: t("h-4 w-4",
|
|
584
|
+
children: [/* @__PURE__ */ G(a, {
|
|
585
|
+
className: t("h-4 w-4", Ne(n)),
|
|
566
586
|
"aria-hidden": "true"
|
|
567
587
|
}), i.label]
|
|
568
588
|
}, n);
|
|
569
589
|
})
|
|
570
590
|
})] });
|
|
571
591
|
}
|
|
572
|
-
var
|
|
592
|
+
var Ve = [
|
|
573
593
|
"ARTICLE",
|
|
574
594
|
"ESSAY",
|
|
575
595
|
"EXPLAINER",
|
|
@@ -577,135 +597,135 @@ var Le = [
|
|
|
577
597
|
"PHOTO_STORY",
|
|
578
598
|
"TIMELINE"
|
|
579
599
|
];
|
|
580
|
-
function
|
|
581
|
-
let i = v(), a = g({ pagination: { limit: 100 } }), [o, c] =
|
|
582
|
-
return
|
|
600
|
+
function He({ open: e, onOpenChange: t, story: r }) {
|
|
601
|
+
let i = v(), a = g({ pagination: { limit: 100 } }), [o, c] = L(r.title), [l, u] = L(r.summary ?? ""), [d, f] = L(r.body ?? ""), [p, m] = L(r.format), [h, _] = L(r.topicId ?? ""), [y, S] = L(r.languages), [C, w] = L(r.tags), [T, E] = L(r.readingMins ? String(r.readingMins) : ""), [O, k] = L(r.cover?.id ?? null), [j, M] = L(null), N = I(() => `${r.id}:${r.updatedAt}`, [r.id, r.updatedAt]), [P, F] = L(N);
|
|
602
|
+
return P !== N && (F(N), c(r.title), u(r.summary ?? ""), f(r.body ?? ""), m(r.format), _(r.topicId ?? ""), S(r.languages), w(r.tags), E(r.readingMins ? String(r.readingMins) : ""), k(r.cover?.id ?? null), M(null)), /* @__PURE__ */ G(xe, {
|
|
583
603
|
open: e,
|
|
584
604
|
onOpenChange: t,
|
|
585
|
-
children: /* @__PURE__ */
|
|
605
|
+
children: /* @__PURE__ */ K(Se, {
|
|
586
606
|
className: "sm:max-w-lg",
|
|
587
607
|
children: [
|
|
588
|
-
/* @__PURE__ */
|
|
589
|
-
/* @__PURE__ */
|
|
608
|
+
/* @__PURE__ */ K(Te, { children: [/* @__PURE__ */ G(Ee, { children: "Edit story" }), /* @__PURE__ */ G(Ce, { children: "Refine the story. The URL slug is fixed once created." })] }),
|
|
609
|
+
/* @__PURE__ */ K("div", {
|
|
590
610
|
className: "flex max-h-[62vh] flex-col gap-4 overflow-y-auto py-2",
|
|
591
611
|
children: [
|
|
592
|
-
/* @__PURE__ */
|
|
612
|
+
/* @__PURE__ */ K("div", {
|
|
593
613
|
className: "grid gap-1.5",
|
|
594
|
-
children: [/* @__PURE__ */
|
|
614
|
+
children: [/* @__PURE__ */ G(Y, { children: "Cover image" }), /* @__PURE__ */ G(A, {
|
|
595
615
|
folder: n.covers,
|
|
596
616
|
accept: "image/*",
|
|
597
617
|
label: "Upload cover",
|
|
598
|
-
fileId:
|
|
599
|
-
onUploaded:
|
|
600
|
-
onCleared: () =>
|
|
618
|
+
fileId: O,
|
|
619
|
+
onUploaded: k,
|
|
620
|
+
onCleared: () => k(null)
|
|
601
621
|
})]
|
|
602
622
|
}),
|
|
603
|
-
/* @__PURE__ */
|
|
623
|
+
/* @__PURE__ */ K("div", {
|
|
604
624
|
className: "grid gap-1.5",
|
|
605
|
-
children: [/* @__PURE__ */
|
|
625
|
+
children: [/* @__PURE__ */ G(Y, {
|
|
606
626
|
htmlFor: "edit-title",
|
|
607
627
|
children: "Title"
|
|
608
|
-
}), /* @__PURE__ */
|
|
628
|
+
}), /* @__PURE__ */ G(J, {
|
|
609
629
|
id: "edit-title",
|
|
610
630
|
value: o,
|
|
611
631
|
onChange: (e) => c(e.target.value)
|
|
612
632
|
})]
|
|
613
633
|
}),
|
|
614
|
-
/* @__PURE__ */
|
|
634
|
+
/* @__PURE__ */ K("div", {
|
|
615
635
|
className: "grid grid-cols-2 gap-3",
|
|
616
|
-
children: [/* @__PURE__ */
|
|
636
|
+
children: [/* @__PURE__ */ K("div", {
|
|
617
637
|
className: "grid gap-1.5",
|
|
618
|
-
children: [/* @__PURE__ */
|
|
638
|
+
children: [/* @__PURE__ */ G(Y, { children: "Format" }), /* @__PURE__ */ K(X, {
|
|
619
639
|
value: p,
|
|
620
640
|
onValueChange: (e) => m(e),
|
|
621
|
-
children: [/* @__PURE__ */
|
|
641
|
+
children: [/* @__PURE__ */ G(Oe, { children: /* @__PURE__ */ G(ke, {}) }), /* @__PURE__ */ G(Z, { children: Ve.map((e) => /* @__PURE__ */ G(Q, {
|
|
622
642
|
value: e,
|
|
623
643
|
children: s(e)
|
|
624
644
|
}, e)) })]
|
|
625
645
|
})]
|
|
626
|
-
}), /* @__PURE__ */
|
|
646
|
+
}), /* @__PURE__ */ K("div", {
|
|
627
647
|
className: "grid gap-1.5",
|
|
628
|
-
children: [/* @__PURE__ */
|
|
648
|
+
children: [/* @__PURE__ */ G(Y, {
|
|
629
649
|
htmlFor: "edit-reading",
|
|
630
650
|
children: "Reading time (min)"
|
|
631
|
-
}), /* @__PURE__ */
|
|
651
|
+
}), /* @__PURE__ */ G(J, {
|
|
632
652
|
id: "edit-reading",
|
|
633
653
|
type: "number",
|
|
634
654
|
min: 0,
|
|
635
|
-
value:
|
|
636
|
-
onChange: (e) =>
|
|
655
|
+
value: T,
|
|
656
|
+
onChange: (e) => E(e.target.value)
|
|
637
657
|
})]
|
|
638
658
|
})]
|
|
639
659
|
}),
|
|
640
|
-
/* @__PURE__ */
|
|
660
|
+
/* @__PURE__ */ K("div", {
|
|
641
661
|
className: "grid gap-1.5",
|
|
642
|
-
children: [/* @__PURE__ */
|
|
662
|
+
children: [/* @__PURE__ */ G(Y, { children: "Topic" }), /* @__PURE__ */ K(X, {
|
|
643
663
|
value: h,
|
|
644
664
|
onValueChange: _,
|
|
645
|
-
children: [/* @__PURE__ */
|
|
665
|
+
children: [/* @__PURE__ */ G(Oe, { children: /* @__PURE__ */ G(ke, { placeholder: "Choose a topic (optional)" }) }), /* @__PURE__ */ G(Z, { children: (a.data?.items ?? []).map((e) => /* @__PURE__ */ G(Q, {
|
|
646
666
|
value: e.id,
|
|
647
667
|
children: e.name
|
|
648
668
|
}, e.id)) })]
|
|
649
669
|
})]
|
|
650
670
|
}),
|
|
651
|
-
/* @__PURE__ */
|
|
671
|
+
/* @__PURE__ */ K("div", {
|
|
652
672
|
className: "grid gap-1.5",
|
|
653
|
-
children: [/* @__PURE__ */
|
|
673
|
+
children: [/* @__PURE__ */ G(Y, {
|
|
654
674
|
htmlFor: "edit-summary",
|
|
655
675
|
children: "Summary"
|
|
656
|
-
}), /* @__PURE__ */
|
|
676
|
+
}), /* @__PURE__ */ G(Ae, {
|
|
657
677
|
id: "edit-summary",
|
|
658
678
|
value: l,
|
|
659
679
|
onChange: (e) => u(e.target.value),
|
|
660
680
|
rows: 2
|
|
661
681
|
})]
|
|
662
682
|
}),
|
|
663
|
-
/* @__PURE__ */
|
|
683
|
+
/* @__PURE__ */ K("div", {
|
|
664
684
|
className: "grid gap-1.5",
|
|
665
|
-
children: [/* @__PURE__ */
|
|
685
|
+
children: [/* @__PURE__ */ G(Y, {
|
|
666
686
|
htmlFor: "edit-body",
|
|
667
687
|
children: "Body"
|
|
668
|
-
}), /* @__PURE__ */
|
|
688
|
+
}), /* @__PURE__ */ G(Ae, {
|
|
669
689
|
id: "edit-body",
|
|
670
690
|
value: d,
|
|
671
691
|
onChange: (e) => f(e.target.value),
|
|
672
692
|
rows: 6
|
|
673
693
|
})]
|
|
674
694
|
}),
|
|
675
|
-
/* @__PURE__ */
|
|
695
|
+
/* @__PURE__ */ K("div", {
|
|
676
696
|
className: "grid gap-1.5",
|
|
677
|
-
children: [/* @__PURE__ */
|
|
697
|
+
children: [/* @__PURE__ */ G(Y, {
|
|
678
698
|
htmlFor: "edit-langs",
|
|
679
699
|
children: "Languages"
|
|
680
|
-
}), /* @__PURE__ */
|
|
700
|
+
}), /* @__PURE__ */ G(D, {
|
|
681
701
|
id: "edit-langs",
|
|
682
702
|
value: y,
|
|
683
|
-
onChange:
|
|
703
|
+
onChange: S,
|
|
684
704
|
preserveCase: !0
|
|
685
705
|
})]
|
|
686
706
|
}),
|
|
687
|
-
/* @__PURE__ */
|
|
707
|
+
/* @__PURE__ */ K("div", {
|
|
688
708
|
className: "grid gap-1.5",
|
|
689
|
-
children: [/* @__PURE__ */
|
|
709
|
+
children: [/* @__PURE__ */ G(Y, {
|
|
690
710
|
htmlFor: "edit-tags",
|
|
691
711
|
children: "Tags"
|
|
692
|
-
}), /* @__PURE__ */
|
|
712
|
+
}), /* @__PURE__ */ G(D, {
|
|
693
713
|
id: "edit-tags",
|
|
694
714
|
value: C,
|
|
695
|
-
onChange:
|
|
715
|
+
onChange: w
|
|
696
716
|
})]
|
|
697
717
|
}),
|
|
698
|
-
j && /* @__PURE__ */
|
|
718
|
+
j && /* @__PURE__ */ G("p", {
|
|
699
719
|
className: "text-sm text-status-error-text",
|
|
700
720
|
children: j
|
|
701
721
|
})
|
|
702
722
|
]
|
|
703
723
|
}),
|
|
704
|
-
/* @__PURE__ */
|
|
724
|
+
/* @__PURE__ */ K(we, { children: [/* @__PURE__ */ G(q, {
|
|
705
725
|
variant: "outline",
|
|
706
726
|
onClick: () => t(!1),
|
|
707
727
|
children: "Cancel"
|
|
708
|
-
}), /* @__PURE__ */
|
|
728
|
+
}), /* @__PURE__ */ G(q, {
|
|
709
729
|
onClick: async () => {
|
|
710
730
|
if (!o.trim()) {
|
|
711
731
|
M("A title is required.");
|
|
@@ -722,12 +742,12 @@ function Re({ open: e, onOpenChange: t, story: r }) {
|
|
|
722
742
|
topicId: h || null,
|
|
723
743
|
languages: y,
|
|
724
744
|
tags: C,
|
|
725
|
-
readingMins:
|
|
726
|
-
coverFileId:
|
|
745
|
+
readingMins: T ? Number(T) : null,
|
|
746
|
+
coverFileId: O
|
|
727
747
|
}
|
|
728
|
-
}),
|
|
748
|
+
}), x.success("Story updated", o.trim()), t(!1);
|
|
729
749
|
} catch (e) {
|
|
730
|
-
M(
|
|
750
|
+
M(b(e));
|
|
731
751
|
}
|
|
732
752
|
},
|
|
733
753
|
disabled: i.isPending,
|
|
@@ -738,6 +758,6 @@ function Re({ open: e, onOpenChange: t, story: r }) {
|
|
|
738
758
|
});
|
|
739
759
|
}
|
|
740
760
|
//#endregion
|
|
741
|
-
export {
|
|
761
|
+
export { Pe as StoryDetailPage };
|
|
742
762
|
|
|
743
763
|
//# sourceMappingURL=StoryDetailPage.js.map
|