@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.
Files changed (234) hide show
  1. package/dist/dev/main.d.ts +2 -0
  2. package/dist/dev/main.d.ts.map +1 -0
  3. package/dist/generated/global-operations.d.ts +2 -0
  4. package/dist/generated/global-operations.d.ts.map +1 -0
  5. package/dist/generated/global-types.d.ts +18199 -0
  6. package/dist/generated/global-types.d.ts.map +1 -0
  7. package/dist/generated/wspace-operations.d.ts +2 -0
  8. package/dist/generated/wspace-operations.d.ts.map +1 -0
  9. package/dist/generated/wspace-types.d.ts +43046 -0
  10. package/dist/generated/wspace-types.d.ts.map +1 -0
  11. package/dist/index.d.ts +9 -0
  12. package/dist/index.d.ts.map +1 -0
  13. package/dist/index.js +8 -1
  14. package/dist/services/assistantApi.d.ts +15 -0
  15. package/dist/services/assistantApi.d.ts.map +1 -0
  16. package/dist/services/assistantApi.js +204 -0
  17. package/dist/services/assistantApi.js.map +1 -0
  18. package/dist/services/createSandboxAssistantTransport.d.ts +26 -0
  19. package/dist/services/createSandboxAssistantTransport.d.ts.map +1 -0
  20. package/dist/services/createSandboxAssistantTransport.js +126 -0
  21. package/dist/services/createSandboxAssistantTransport.js.map +1 -0
  22. package/dist/theculturepost/TheCulturePostRoot.d.ts +5 -0
  23. package/dist/theculturepost/TheCulturePostRoot.d.ts.map +1 -0
  24. package/dist/theculturepost/TheCulturePostRoutes.d.ts +4 -0
  25. package/dist/theculturepost/TheCulturePostRoutes.d.ts.map +1 -0
  26. package/dist/theculturepost/TheCulturePostRoutes.js +73 -40
  27. package/dist/theculturepost/TheCulturePostRoutes.js.map +1 -1
  28. package/dist/theculturepost/components/AddCitationDialog.d.ts +11 -0
  29. package/dist/theculturepost/components/AddCitationDialog.d.ts.map +1 -0
  30. package/dist/theculturepost/components/ArchiveItemCard.d.ts +9 -0
  31. package/dist/theculturepost/components/ArchiveItemCard.d.ts.map +1 -0
  32. package/dist/theculturepost/components/AudioPlayer.d.ts +22 -0
  33. package/dist/theculturepost/components/AudioPlayer.d.ts.map +1 -0
  34. package/dist/theculturepost/components/AuthorLabel.d.ts +16 -0
  35. package/dist/theculturepost/components/AuthorLabel.d.ts.map +1 -0
  36. package/dist/theculturepost/components/AuthorLabel.js +1 -1
  37. package/dist/theculturepost/components/CitationList.d.ts +27 -0
  38. package/dist/theculturepost/components/CitationList.d.ts.map +1 -0
  39. package/dist/theculturepost/components/CollectionCard.d.ts +9 -0
  40. package/dist/theculturepost/components/CollectionCard.d.ts.map +1 -0
  41. package/dist/theculturepost/components/CoverImage.d.ts +13 -0
  42. package/dist/theculturepost/components/CoverImage.d.ts.map +1 -0
  43. package/dist/theculturepost/components/CreateArchiveItemDialog.d.ts +12 -0
  44. package/dist/theculturepost/components/CreateArchiveItemDialog.d.ts.map +1 -0
  45. package/dist/theculturepost/components/CreateCollectionDialog.d.ts +10 -0
  46. package/dist/theculturepost/components/CreateCollectionDialog.d.ts.map +1 -0
  47. package/dist/theculturepost/components/CreateStoryDialog.d.ts +12 -0
  48. package/dist/theculturepost/components/CreateStoryDialog.d.ts.map +1 -0
  49. package/dist/theculturepost/components/CreateTopicDialog.d.ts +10 -0
  50. package/dist/theculturepost/components/CreateTopicDialog.d.ts.map +1 -0
  51. package/dist/theculturepost/components/DecorativeCover.d.ts +17 -0
  52. package/dist/theculturepost/components/DecorativeCover.d.ts.map +1 -0
  53. package/dist/theculturepost/components/DecorativeDivider.d.ts +14 -0
  54. package/dist/theculturepost/components/DecorativeDivider.d.ts.map +1 -0
  55. package/dist/theculturepost/components/DiscussionCard.d.ts +9 -0
  56. package/dist/theculturepost/components/DiscussionCard.d.ts.map +1 -0
  57. package/dist/theculturepost/components/EmptyState.d.ts +18 -0
  58. package/dist/theculturepost/components/EmptyState.d.ts.map +1 -0
  59. package/dist/theculturepost/components/FileImage.d.ts +18 -0
  60. package/dist/theculturepost/components/FileImage.d.ts.map +1 -0
  61. package/dist/theculturepost/components/FileUploadField.d.ts +29 -0
  62. package/dist/theculturepost/components/FileUploadField.d.ts.map +1 -0
  63. package/dist/theculturepost/components/FilterTabs.d.ts +18 -0
  64. package/dist/theculturepost/components/FilterTabs.d.ts.map +1 -0
  65. package/dist/theculturepost/components/HistoryTimeline.d.ts +20 -0
  66. package/dist/theculturepost/components/HistoryTimeline.d.ts.map +1 -0
  67. package/dist/theculturepost/components/LifecycleStepper.d.ts +11 -0
  68. package/dist/theculturepost/components/LifecycleStepper.d.ts.map +1 -0
  69. package/dist/theculturepost/components/OpenDiscussionDialog.d.ts +12 -0
  70. package/dist/theculturepost/components/OpenDiscussionDialog.d.ts.map +1 -0
  71. package/dist/theculturepost/components/OralHistoryCard.d.ts +8 -0
  72. package/dist/theculturepost/components/OralHistoryCard.d.ts.map +1 -0
  73. package/dist/theculturepost/components/OverlayBadge.d.ts +15 -0
  74. package/dist/theculturepost/components/OverlayBadge.d.ts.map +1 -0
  75. package/dist/theculturepost/components/PageHero.d.ts +26 -0
  76. package/dist/theculturepost/components/PageHero.d.ts.map +1 -0
  77. package/dist/theculturepost/components/PageLayout.d.ts +16 -0
  78. package/dist/theculturepost/components/PageLayout.d.ts.map +1 -0
  79. package/dist/theculturepost/components/Pagination.d.ts +22 -0
  80. package/dist/theculturepost/components/Pagination.d.ts.map +1 -0
  81. package/dist/theculturepost/components/RecordOralHistoryDialog.d.ts +47 -0
  82. package/dist/theculturepost/components/RecordOralHistoryDialog.d.ts.map +1 -0
  83. package/dist/theculturepost/components/ReplyThread.d.ts +20 -0
  84. package/dist/theculturepost/components/ReplyThread.d.ts.map +1 -0
  85. package/dist/theculturepost/components/ReplyThread.js +1 -1
  86. package/dist/theculturepost/components/StateViews.d.ts +24 -0
  87. package/dist/theculturepost/components/StateViews.d.ts.map +1 -0
  88. package/dist/theculturepost/components/StatusBadge.d.ts +11 -0
  89. package/dist/theculturepost/components/StatusBadge.d.ts.map +1 -0
  90. package/dist/theculturepost/components/StoryCard.d.ts +11 -0
  91. package/dist/theculturepost/components/StoryCard.d.ts.map +1 -0
  92. package/dist/theculturepost/components/Tabs.d.ts +17 -0
  93. package/dist/theculturepost/components/Tabs.d.ts.map +1 -0
  94. package/dist/theculturepost/components/TagInput.d.ts +20 -0
  95. package/dist/theculturepost/components/TagInput.d.ts.map +1 -0
  96. package/dist/theculturepost/components/TopicCard.d.ts +9 -0
  97. package/dist/theculturepost/components/TopicCard.d.ts.map +1 -0
  98. package/dist/theculturepost/components/Waveform.d.ts +23 -0
  99. package/dist/theculturepost/components/Waveform.d.ts.map +1 -0
  100. package/dist/theculturepost/components/categoryMeta.d.ts +14 -0
  101. package/dist/theculturepost/components/categoryMeta.d.ts.map +1 -0
  102. package/dist/theculturepost/components/index.d.ts +43 -0
  103. package/dist/theculturepost/components/index.d.ts.map +1 -0
  104. package/dist/theculturepost/components/kindIcon.d.ts +7 -0
  105. package/dist/theculturepost/components/kindIcon.d.ts.map +1 -0
  106. package/dist/theculturepost/components/viz/BarChart.d.ts +23 -0
  107. package/dist/theculturepost/components/viz/BarChart.d.ts.map +1 -0
  108. package/dist/theculturepost/components/viz/Donut.d.ts +25 -0
  109. package/dist/theculturepost/components/viz/Donut.d.ts.map +1 -0
  110. package/dist/theculturepost/components/viz/StatTile.d.ts +14 -0
  111. package/dist/theculturepost/components/viz/StatTile.d.ts.map +1 -0
  112. package/dist/theculturepost/components/viz/index.d.ts +11 -0
  113. package/dist/theculturepost/components/viz/index.d.ts.map +1 -0
  114. package/dist/theculturepost/context/TheCulturePostContext.d.ts +16 -0
  115. package/dist/theculturepost/context/TheCulturePostContext.d.ts.map +1 -0
  116. package/dist/theculturepost/context/index.d.ts +6 -0
  117. package/dist/theculturepost/context/index.d.ts.map +1 -0
  118. package/dist/theculturepost/hooks/index.d.ts +10 -0
  119. package/dist/theculturepost/hooks/index.d.ts.map +1 -0
  120. package/dist/theculturepost/hooks/index.js +2 -0
  121. package/dist/theculturepost/hooks/useCursorPager.d.ts +32 -0
  122. package/dist/theculturepost/hooks/useCursorPager.d.ts.map +1 -0
  123. package/dist/theculturepost/hooks/useFiles.d.ts +31 -0
  124. package/dist/theculturepost/hooks/useFiles.d.ts.map +1 -0
  125. package/dist/theculturepost/hooks/usePageAnalytics.d.ts +9 -0
  126. package/dist/theculturepost/hooks/usePageAnalytics.d.ts.map +1 -0
  127. package/dist/theculturepost/hooks/usePageAnalytics.js +34 -0
  128. package/dist/theculturepost/hooks/usePageAnalytics.js.map +1 -0
  129. package/dist/theculturepost/hooks/useTcpApi.d.ts +74 -0
  130. package/dist/theculturepost/hooks/useTcpApi.d.ts.map +1 -0
  131. package/dist/theculturepost/hooks/useTr.d.ts +8 -0
  132. package/dist/theculturepost/hooks/useTr.d.ts.map +1 -0
  133. package/dist/theculturepost/hooks/useTr.js +14 -0
  134. package/dist/theculturepost/hooks/useTr.js.map +1 -0
  135. package/dist/theculturepost/index.d.ts +9 -0
  136. package/dist/theculturepost/index.d.ts.map +1 -0
  137. package/dist/theculturepost/index.js +2 -1
  138. package/dist/theculturepost/lib/graphql-cache.d.ts +26 -0
  139. package/dist/theculturepost/lib/graphql-cache.d.ts.map +1 -0
  140. package/dist/theculturepost/lib/toast.d.ts +23 -0
  141. package/dist/theculturepost/lib/toast.d.ts.map +1 -0
  142. package/dist/theculturepost/pages/HomePage.d.ts +16 -0
  143. package/dist/theculturepost/pages/HomePage.d.ts.map +1 -0
  144. package/dist/theculturepost/pages/HomePage.js +83 -68
  145. package/dist/theculturepost/pages/HomePage.js.map +1 -1
  146. package/dist/theculturepost/pages/archive/ArchiveItemDetailPage.d.ts +12 -0
  147. package/dist/theculturepost/pages/archive/ArchiveItemDetailPage.d.ts.map +1 -0
  148. package/dist/theculturepost/pages/archive/ArchiveItemDetailPage.js +21 -21
  149. package/dist/theculturepost/pages/archive/ArchivePage.d.ts +7 -0
  150. package/dist/theculturepost/pages/archive/ArchivePage.d.ts.map +1 -0
  151. package/dist/theculturepost/pages/archive/ArchivePage.js +144 -125
  152. package/dist/theculturepost/pages/archive/ArchivePage.js.map +1 -1
  153. package/dist/theculturepost/pages/archive/CollectionDetailPage.d.ts +12 -0
  154. package/dist/theculturepost/pages/archive/CollectionDetailPage.d.ts.map +1 -0
  155. package/dist/theculturepost/pages/discussions/DiscussionDetailPage.d.ts +12 -0
  156. package/dist/theculturepost/pages/discussions/DiscussionDetailPage.d.ts.map +1 -0
  157. package/dist/theculturepost/pages/discussions/DiscussionDetailPage.js +78 -70
  158. package/dist/theculturepost/pages/discussions/DiscussionDetailPage.js.map +1 -1
  159. package/dist/theculturepost/pages/discussions/DiscussionsPage.d.ts +10 -0
  160. package/dist/theculturepost/pages/discussions/DiscussionsPage.d.ts.map +1 -0
  161. package/dist/theculturepost/pages/discussions/DiscussionsPage.js +63 -56
  162. package/dist/theculturepost/pages/discussions/DiscussionsPage.js.map +1 -1
  163. package/dist/theculturepost/pages/governance/GovernancePage.d.ts +20 -0
  164. package/dist/theculturepost/pages/governance/GovernancePage.d.ts.map +1 -0
  165. package/dist/theculturepost/pages/stories/StoriesPage.d.ts +9 -0
  166. package/dist/theculturepost/pages/stories/StoriesPage.d.ts.map +1 -0
  167. package/dist/theculturepost/pages/stories/StoriesPage.js +65 -58
  168. package/dist/theculturepost/pages/stories/StoriesPage.js.map +1 -1
  169. package/dist/theculturepost/pages/stories/StoryDetailPage.d.ts +18 -0
  170. package/dist/theculturepost/pages/stories/StoryDetailPage.d.ts.map +1 -0
  171. package/dist/theculturepost/pages/stories/StoryDetailPage.js +249 -229
  172. package/dist/theculturepost/pages/stories/StoryDetailPage.js.map +1 -1
  173. package/dist/theculturepost/pages/timeline/TimelinePage.d.ts +17 -0
  174. package/dist/theculturepost/pages/timeline/TimelinePage.d.ts.map +1 -0
  175. package/dist/theculturepost/pages/topics/TopicDetailPage.d.ts +12 -0
  176. package/dist/theculturepost/pages/topics/TopicDetailPage.d.ts.map +1 -0
  177. package/dist/theculturepost/pages/topics/TopicsPage.d.ts +12 -0
  178. package/dist/theculturepost/pages/topics/TopicsPage.d.ts.map +1 -0
  179. package/dist/theculturepost/pages/topics/TopicsPage.js +61 -52
  180. package/dist/theculturepost/pages/topics/TopicsPage.js.map +1 -1
  181. package/dist/theculturepost/styles/injectDisplayFont.d.ts +14 -0
  182. package/dist/theculturepost/styles/injectDisplayFont.d.ts.map +1 -0
  183. package/dist/theculturepost/translations/ar.d.ts +50 -0
  184. package/dist/theculturepost/translations/ar.d.ts.map +1 -0
  185. package/dist/theculturepost/translations/ar.js +54 -0
  186. package/dist/theculturepost/translations/ar.js.map +1 -0
  187. package/dist/theculturepost/translations/en.d.ts +50 -0
  188. package/dist/theculturepost/translations/en.d.ts.map +1 -0
  189. package/dist/theculturepost/translations/en.js +54 -0
  190. package/dist/theculturepost/translations/en.js.map +1 -0
  191. package/dist/theculturepost/translations/es.d.ts +50 -0
  192. package/dist/theculturepost/translations/es.d.ts.map +1 -0
  193. package/dist/theculturepost/translations/es.js +54 -0
  194. package/dist/theculturepost/translations/es.js.map +1 -0
  195. package/dist/theculturepost/translations/hi.d.ts +50 -0
  196. package/dist/theculturepost/translations/hi.d.ts.map +1 -0
  197. package/dist/theculturepost/translations/hi.js +54 -0
  198. package/dist/theculturepost/translations/hi.js.map +1 -0
  199. package/dist/theculturepost/translations/index.d.ts +7 -0
  200. package/dist/theculturepost/translations/index.d.ts.map +1 -0
  201. package/dist/theculturepost/translations/ta.d.ts +50 -0
  202. package/dist/theculturepost/translations/ta.d.ts.map +1 -0
  203. package/dist/theculturepost/translations/ta.js +54 -0
  204. package/dist/theculturepost/translations/ta.js.map +1 -0
  205. package/dist/theculturepost/translations/zh.d.ts +50 -0
  206. package/dist/theculturepost/translations/zh.d.ts.map +1 -0
  207. package/dist/theculturepost/translations/zh.js +54 -0
  208. package/dist/theculturepost/translations/zh.js.map +1 -0
  209. package/dist/theculturepost/types/index.d.ts +333 -0
  210. package/dist/theculturepost/types/index.d.ts.map +1 -0
  211. package/dist/theculturepost/utils/cn.d.ts +4 -0
  212. package/dist/theculturepost/utils/cn.d.ts.map +1 -0
  213. package/dist/theculturepost/utils/formatters.d.ts +19 -0
  214. package/dist/theculturepost/utils/formatters.d.ts.map +1 -0
  215. package/dist/theculturepost/utils/i18n.d.ts +6 -0
  216. package/dist/theculturepost/utils/i18n.d.ts.map +1 -0
  217. package/dist/theculturepost/utils/index.d.ts +11 -0
  218. package/dist/theculturepost/utils/index.d.ts.map +1 -0
  219. package/dist/theculturepost/utils/index.js +6 -0
  220. package/dist/theculturepost/utils/nativeBridge.d.ts +47 -0
  221. package/dist/theculturepost/utils/nativeBridge.d.ts.map +1 -0
  222. package/dist/theculturepost/utils/nativeBridge.js +60 -0
  223. package/dist/theculturepost/utils/nativeBridge.js.map +1 -0
  224. package/dist/theculturepost/utils/navigation.d.ts +14 -0
  225. package/dist/theculturepost/utils/navigation.d.ts.map +1 -0
  226. package/dist/theculturepost/utils/slug.d.ts +6 -0
  227. package/dist/theculturepost/utils/slug.d.ts.map +1 -0
  228. package/dist/types/assistant.d.ts +56 -0
  229. package/dist/types/assistant.d.ts.map +1 -0
  230. package/dist/utils/pageContext.d.ts +27 -0
  231. package/dist/utils/pageContext.d.ts.map +1 -0
  232. package/dist/utils/pageContext.js +47 -0
  233. package/dist/utils/pageContext.js.map +1 -0
  234. 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 { DecorativeDivider as b } from "../../components/DecorativeDivider.js";
14
- import { describeError as x, notify as S } from "../../lib/toast.js";
15
- import { Tabs as C } from "../../components/Tabs.js";
16
- import { TagInput as w } from "../../components/TagInput.js";
17
- import { OpenDiscussionDialog as T } from "../../components/OpenDiscussionDialog.js";
18
- import { LifecycleStepper as E } from "../../components/LifecycleStepper.js";
19
- import { FileUploadField as D } from "../../components/FileUploadField.js";
20
- import { CitationList as O, VERIFICATIONS as k, VERIFICATION_META as A, sourceTypeIcon as j } from "../../components/CitationList.js";
21
- import { AddCitationDialog as M } from "../../components/AddCitationDialog.js";
22
- import { Fragment as N, useMemo as P, useState as F } from "react";
23
- import { Archive as I, ArrowLeft as L, BookOpen as ee, ChevronDown as te, Clock as ne, GitBranch as R, Languages as re, Lightbulb as ie, Lock as ae, MessagesSquare as z, Pencil as oe, Plus as B, RotateCcw as se, Scroll as V, Send as H, ShieldCheck as U, Sparkles as ce, Tag as le } from "lucide-react";
24
- import { useParams as ue, useSearchParams as de } from "react-router-dom";
25
- import { Fragment as fe, jsx as W, jsxs as G } from "react/jsx-runtime";
26
- import { Button as K, DropdownMenu as pe, DropdownMenuContent as me, DropdownMenuItem as he, DropdownMenuTrigger as ge, GlassCard as q, Input as J, Label as Y, ResponsiveDialog as _e, ResponsiveDialogContent as ve, ResponsiveDialogDescription as ye, ResponsiveDialogFooter as be, ResponsiveDialogHeader as xe, ResponsiveDialogTitle as Se, ResponsiveTable as Ce, Select as X, SelectContent as Z, SelectItem as Q, SelectTrigger as $, SelectValue as we, Textarea as Te } from "@burdenoff/fe-libs/ui";
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 Ee = {
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
- }, De = {
35
+ }, Me = {
35
36
  IDEA: {
36
37
  label: "Move to Idea",
37
- icon: ie
38
+ icon: oe
38
39
  },
39
40
  DRAFT: {
40
41
  label: "Send back to Draft",
41
- icon: se
42
+ icon: le
42
43
  },
43
44
  IN_REVIEW: {
44
45
  label: "Send to Review",
45
- icon: H
46
+ icon: U
46
47
  },
47
48
  PUBLISHED: {
48
49
  label: "Publish",
49
- icon: H,
50
+ icon: U,
50
51
  primary: !0
51
52
  },
52
53
  ARCHIVED: {
53
54
  label: "Archive",
54
- icon: I
55
+ icon: te
55
56
  }
56
57
  };
57
- function Oe(e) {
58
- switch (A[e].accent) {
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 ke() {
66
- let { id: t } = ue(), { navigateTo: n } = e(), [o, l] = de(), f = o.get("view") === "editorial" ? "editorial" : "reading", p = (e) => {
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] = F(!1), [S, w] = F(!1), [E, D] = F(!1), O = m({
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
- }), k = O.data?.items ?? [];
75
- if (_) return /* @__PURE__ */ G("div", {
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__ */ G(K, {
78
+ children: [/* @__PURE__ */ K(q, {
78
79
  variant: "ghost",
79
80
  size: "sm",
80
81
  onClick: () => n("stories"),
81
- children: [/* @__PURE__ */ W(L, { className: "mr-1.5 h-4 w-4" }), " Stories"]
82
- }), /* @__PURE__ */ W(a, { label: "Loading story…" })]
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__ */ G("div", {
85
+ if (v || !g) return /* @__PURE__ */ K("div", {
85
86
  className: "mx-auto max-w-6xl p-4 sm:p-6",
86
- children: [/* @__PURE__ */ G(K, {
87
+ children: [/* @__PURE__ */ K(q, {
87
88
  variant: "ghost",
88
89
  size: "sm",
89
90
  onClick: () => n("stories"),
90
- children: [/* @__PURE__ */ W(L, { className: "mr-1.5 h-4 w-4" }), " Stories"]
91
- }), /* @__PURE__ */ W(i, {
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 A = /* @__PURE__ */ G(fe, { children: [
98
- /* @__PURE__ */ W(u, { status: g.format }),
99
- /* @__PURE__ */ W(u, { status: g.status }),
100
- g.topic && /* @__PURE__ */ G("button", {
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__ */ W(le, {
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__ */ W("span", {
114
+ /* @__PURE__ */ G("span", {
114
115
  className: "inline-flex items-center gap-1.5 text-xs text-text-tertiary",
115
- children: /* @__PURE__ */ W(d, {
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__ */ G("span", {
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__ */ W(ne, {
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__ */ G("span", {
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__ */ W(re, {
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
- ] }), j = [{
145
+ ] }), P = [{
145
146
  value: "reading",
146
147
  label: "Reading",
147
- icon: /* @__PURE__ */ W(ee, { className: "h-4 w-4" })
148
+ icon: /* @__PURE__ */ G(ne, { className: "h-4 w-4" })
148
149
  }, {
149
150
  value: "editorial",
150
151
  label: "Editorial",
151
- icon: /* @__PURE__ */ W(R, { className: "h-4 w-4" }),
152
+ icon: /* @__PURE__ */ G(z, { className: "h-4 w-4" }),
152
153
  count: g.citations.length
153
154
  }];
154
- return /* @__PURE__ */ G("div", {
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__ */ W(r, {
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: A,
167
- actions: /* @__PURE__ */ G(K, {
168
- variant: "outline",
169
- onClick: () => D(!0),
170
- children: [/* @__PURE__ */ W(oe, { className: "mr-1.5 h-4 w-4" }), " Edit"]
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__ */ W(C, {
174
- items: j,
175
- value: f,
176
- onChange: p
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__ */ W(Ae, {
198
+ f === "reading" ? /* @__PURE__ */ G(Fe, {
179
199
  story: g,
180
- discussions: k,
181
- discussionsLoading: O.isLoading,
200
+ discussions: M,
201
+ discussionsLoading: j.isLoading,
182
202
  onViewCitations: () => p("editorial"),
183
- onOpenDiscussion: () => w(!0),
203
+ onOpenDiscussion: () => D(!0),
184
204
  onViewAllDiscussions: () => n("discussions"),
185
205
  onOpenDiscussionItem: (e) => n(`discussions/${e.id}`)
186
- }) : /* @__PURE__ */ W(Pe, {
206
+ }) : /* @__PURE__ */ G(Re, {
187
207
  story: g,
188
208
  onAddCitation: () => x(!0)
189
209
  }),
190
- /* @__PURE__ */ W(M, {
210
+ /* @__PURE__ */ G(F, {
191
211
  open: b,
192
212
  onOpenChange: x,
193
213
  storyId: g.id
194
214
  }),
195
- /* @__PURE__ */ W(T, {
196
- open: S,
197
- onOpenChange: w,
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__ */ W(Re, {
202
- open: E,
203
- onOpenChange: D,
221
+ /* @__PURE__ */ G(He, {
222
+ open: k,
223
+ onOpenChange: A,
204
224
  story: g
205
225
  })
206
226
  ]
207
227
  });
208
228
  }
209
- function Ae({ story: e, discussions: t, discussionsLoading: n, onViewCitations: r, onOpenDiscussion: i, onViewAllDiscussions: o, onOpenDiscussionItem: s }) {
210
- return /* @__PURE__ */ G("div", {
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__ */ G("article", {
232
+ children: [/* @__PURE__ */ K("article", {
213
233
  className: "min-w-0",
214
- children: [/* @__PURE__ */ W(Me, { body: e.body }), e.tags.length > 0 && /* @__PURE__ */ W("div", {
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__ */ G("span", {
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__ */ G("aside", {
241
+ }), /* @__PURE__ */ K("aside", {
222
242
  className: "flex flex-col gap-6 lg:sticky lg:top-4 lg:self-start",
223
- children: [/* @__PURE__ */ W(je, {
243
+ children: [/* @__PURE__ */ G($, {
224
244
  title: "Citations",
225
- action: /* @__PURE__ */ W("button", {
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__ */ W(O, {
251
+ children: /* @__PURE__ */ G(j, {
232
252
  storyId: e.id,
233
253
  compact: !0
234
254
  })
235
- }), /* @__PURE__ */ W(je, {
255
+ }), /* @__PURE__ */ G($, {
236
256
  title: "Linked discussions",
237
- action: /* @__PURE__ */ W("button", {
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__ */ W(a, {
263
+ children: n ? /* @__PURE__ */ G(a, {
244
264
  label: "Loading discussions…",
245
265
  className: "min-h-[8rem]"
246
- }) : t.length === 0 ? /* @__PURE__ */ W(f, {
247
- icon: /* @__PURE__ */ W(z, { className: "h-8 w-8" }),
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__ */ G(K, {
270
+ action: /* @__PURE__ */ K(q, {
251
271
  size: "sm",
252
272
  variant: "outline",
253
273
  onClick: i,
254
- children: [/* @__PURE__ */ W(B, { className: "mr-1.5 h-4 w-4" }), " Open discussion"]
274
+ children: [/* @__PURE__ */ G(V, { className: "mr-1.5 h-4 w-4" }), " Open discussion"]
255
275
  })
256
- }) : /* @__PURE__ */ W("div", {
276
+ }) : /* @__PURE__ */ G("div", {
257
277
  className: "flex flex-col gap-3",
258
- children: t.slice(0, 5).map((e) => /* @__PURE__ */ W(Ne, {
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 je({ title: e, action: t, children: n }) {
268
- return /* @__PURE__ */ G("section", { children: [/* @__PURE__ */ G("div", {
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__ */ W("h2", {
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 Me({ body: e }) {
277
- let n = P(() => (e ?? "").split(/\n{2,}/).map((e) => e.trim()).filter(Boolean), [e]);
278
- return n.length === 0 ? /* @__PURE__ */ W("p", {
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__ */ W("div", {
301
+ }) : /* @__PURE__ */ G("div", {
282
302
  className: "max-w-prose",
283
- children: n.map((e, n) => /* @__PURE__ */ G(N, { children: [n === 1 && /* @__PURE__ */ W(b, {}), /* @__PURE__ */ W("p", {
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 Ne({ discussion: e, onOpen: t }) {
290
- return /* @__PURE__ */ W("button", {
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__ */ G("div", {
314
+ children: /* @__PURE__ */ K("div", {
295
315
  className: "flex items-start gap-2.5",
296
- children: [/* @__PURE__ */ W("span", {
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__ */ W(z, { className: "h-4 w-4" })
300
- }), /* @__PURE__ */ G("div", {
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__ */ W("p", {
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__ */ W("p", {
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__ */ G("div", {
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__ */ G("span", { children: [
334
+ /* @__PURE__ */ K("span", { children: [
315
335
  c(e.replyCount),
316
336
  " ",
317
337
  e.replyCount === 1 ? "reply" : "replies"
318
338
  ] }),
319
- /* @__PURE__ */ W("span", {
339
+ /* @__PURE__ */ G("span", {
320
340
  "aria-hidden": "true",
321
341
  children: "·"
322
342
  }),
323
- /* @__PURE__ */ W("span", { children: l(e.createdAt) }),
324
- e.isInterfaith && /* @__PURE__ */ W(u, {
343
+ /* @__PURE__ */ G("span", { children: l(e.createdAt) }),
344
+ e.isInterfaith && /* @__PURE__ */ G(u, {
325
345
  status: "Interfaith",
326
- icon: /* @__PURE__ */ W(ce, { className: "h-3 w-3" }),
346
+ icon: /* @__PURE__ */ G(de, { className: "h-3 w-3" }),
327
347
  className: "ml-0.5"
328
348
  }),
329
- e.isLocked && /* @__PURE__ */ G("span", {
349
+ e.isLocked && /* @__PURE__ */ K("span", {
330
350
  className: "inline-flex items-center gap-1 text-text-tertiary",
331
- children: [/* @__PURE__ */ W(ae, {
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 Pe({ story: e, onAddCitation: t }) {
344
- let n = _(), r = Ee[e.status] ?? [], i = async (t) => {
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
- }), S.success("Story updated", `Moved to ${s(t)}`);
369
+ }), x.success("Story updated", `Moved to ${s(t)}`);
350
370
  } catch (e) {
351
- S.error("Could not update the story", x(e));
371
+ x.error("Could not update the story", b(e));
352
372
  }
353
373
  };
354
- return /* @__PURE__ */ G("div", {
374
+ return /* @__PURE__ */ K("div", {
355
375
  className: "flex flex-col gap-6",
356
- children: [/* @__PURE__ */ G(q, {
376
+ children: [/* @__PURE__ */ K(be, {
357
377
  treatment: "plain",
358
378
  className: "p-5 sm:p-6",
359
379
  children: [
360
- /* @__PURE__ */ G("div", {
380
+ /* @__PURE__ */ K("div", {
361
381
  className: "flex items-center gap-2.5",
362
- children: [/* @__PURE__ */ W("span", {
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__ */ W(R, { className: "h-5 w-5" })
366
- }), /* @__PURE__ */ W("h2", {
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__ */ W(E, {
391
+ /* @__PURE__ */ G(k, {
372
392
  status: e.status,
373
393
  className: "mt-6"
374
394
  }),
375
- /* @__PURE__ */ G("div", {
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__ */ W("div", {
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 = De[e], r = t.icon;
381
- return /* @__PURE__ */ G(K, {
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__ */ W(r, {
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__ */ W("p", {
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__ */ G("p", {
414
+ }), /* @__PURE__ */ K("p", {
395
415
  className: "flex items-center gap-2 text-sm text-text-secondary",
396
- children: [/* @__PURE__ */ W(U, {
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__ */ G(q, {
423
+ }), /* @__PURE__ */ K(be, {
404
424
  treatment: "plain",
405
425
  className: "p-5 sm:p-6",
406
426
  children: [
407
- /* @__PURE__ */ G("div", {
427
+ /* @__PURE__ */ K("div", {
408
428
  className: "flex flex-wrap items-center justify-between gap-3",
409
- children: [/* @__PURE__ */ G("div", {
429
+ children: [/* @__PURE__ */ K("div", {
410
430
  className: "flex items-center gap-2.5",
411
- children: [/* @__PURE__ */ W("span", {
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__ */ W(V, { className: "h-5 w-5" })
415
- }), /* @__PURE__ */ G("div", { children: [/* @__PURE__ */ W("h2", {
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__ */ W("p", {
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__ */ G(K, {
442
+ }), /* @__PURE__ */ K(q, {
423
443
  variant: "outline",
424
444
  onClick: t,
425
- children: [/* @__PURE__ */ W(B, { className: "mr-1.5 h-4 w-4" }), " Add citation"]
445
+ children: [/* @__PURE__ */ G(V, { className: "mr-1.5 h-4 w-4" }), " Add citation"]
426
446
  })]
427
447
  }),
428
- /* @__PURE__ */ W(Fe, {
448
+ /* @__PURE__ */ G(ze, {
429
449
  storyId: e.id,
430
450
  className: "mt-5"
431
451
  }),
432
- /* @__PURE__ */ G("p", {
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(U, {
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 Fe({ storyId: e, className: n }) {
463
+ function ze({ storyId: e, className: n }) {
444
464
  let { data: r, isLoading: s, isError: c, refetch: l } = p(e);
445
- return s ? /* @__PURE__ */ W(a, {
465
+ return s ? /* @__PURE__ */ G(a, {
446
466
  label: "Loading citations…",
447
467
  className: n
448
- }) : c ? /* @__PURE__ */ W("div", {
468
+ }) : c ? /* @__PURE__ */ G("div", {
449
469
  className: n,
450
- children: /* @__PURE__ */ W(i, {
470
+ children: /* @__PURE__ */ G(i, {
451
471
  message: "We couldn't load citations.",
452
472
  onRetry: () => l()
453
473
  })
454
- }) : /* @__PURE__ */ W(Ce, {
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 = j(e.sourceType), n = [e.author, e.publisher].filter((e) => e && e.trim()).join(" · ");
463
- return /* @__PURE__ */ G("div", {
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__ */ W("span", {
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__ */ W(t, { className: "h-4 w-4" })
469
- }), /* @__PURE__ */ G("div", {
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__ */ W("p", {
492
+ /* @__PURE__ */ G("p", {
473
493
  className: "font-medium text-text-primary",
474
494
  children: e.title
475
495
  }),
476
- e.excerpt && /* @__PURE__ */ W("p", {
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__ */ W("p", {
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__ */ W(u, {
512
+ cell: (e) => /* @__PURE__ */ G(u, {
493
513
  status: e.sourceType,
494
- icon: /* @__PURE__ */ W(j(e.sourceType), { className: "h-3 w-3" })
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__ */ W("span", {
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 = A[e.verification].icon;
511
- return /* @__PURE__ */ W(u, {
530
+ let n = N[e.verification].icon;
531
+ return /* @__PURE__ */ G(u, {
512
532
  status: e.verification,
513
- icon: /* @__PURE__ */ W(n, { className: t("h-3 w-3", Oe(e.verification)) })
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__ */ W(Ie, { citation: e })
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__ */ W(f, {
528
- icon: /* @__PURE__ */ W(V, { className: "h-9 w-9" }),
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 Ie({ citation: e }) {
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
- }), S.success("Verification updated", s(t));
560
+ }), x.success("Verification updated", s(t));
541
561
  } catch (e) {
542
- S.error("Could not update verification", x(e));
562
+ x.error("Could not update verification", b(e));
543
563
  }
544
564
  };
545
- return /* @__PURE__ */ G(pe, { children: [/* @__PURE__ */ W(ge, {
565
+ return /* @__PURE__ */ K(ge, { children: [/* @__PURE__ */ G(ye, {
546
566
  asChild: !0,
547
- children: /* @__PURE__ */ G(K, {
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__ */ W(te, {
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__ */ W(me, {
577
+ }), /* @__PURE__ */ G(_e, {
558
578
  align: "end",
559
- children: k.map((n) => {
560
- let i = A[n], a = i.icon;
561
- return /* @__PURE__ */ G(he, {
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__ */ W(a, {
565
- className: t("h-4 w-4", Oe(n)),
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 Le = [
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 Re({ open: e, onOpenChange: t, story: r }) {
581
- let i = v(), a = g({ pagination: { limit: 100 } }), [o, c] = F(r.title), [l, u] = F(r.summary ?? ""), [d, f] = F(r.body ?? ""), [p, m] = F(r.format), [h, _] = F(r.topicId ?? ""), [y, b] = F(r.languages), [C, T] = F(r.tags), [E, O] = F(r.readingMins ? String(r.readingMins) : ""), [k, A] = F(r.cover?.id ?? null), [j, M] = F(null), N = P(() => `${r.id}:${r.updatedAt}`, [r.id, r.updatedAt]), [I, L] = F(N);
582
- return I !== N && (L(N), c(r.title), u(r.summary ?? ""), f(r.body ?? ""), m(r.format), _(r.topicId ?? ""), b(r.languages), T(r.tags), O(r.readingMins ? String(r.readingMins) : ""), A(r.cover?.id ?? null), M(null)), /* @__PURE__ */ W(_e, {
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__ */ G(ve, {
605
+ children: /* @__PURE__ */ K(Se, {
586
606
  className: "sm:max-w-lg",
587
607
  children: [
588
- /* @__PURE__ */ G(xe, { children: [/* @__PURE__ */ W(Se, { children: "Edit story" }), /* @__PURE__ */ W(ye, { children: "Refine the story. The URL slug is fixed once created." })] }),
589
- /* @__PURE__ */ G("div", {
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__ */ G("div", {
612
+ /* @__PURE__ */ K("div", {
593
613
  className: "grid gap-1.5",
594
- children: [/* @__PURE__ */ W(Y, { children: "Cover image" }), /* @__PURE__ */ W(D, {
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: k,
599
- onUploaded: A,
600
- onCleared: () => A(null)
618
+ fileId: O,
619
+ onUploaded: k,
620
+ onCleared: () => k(null)
601
621
  })]
602
622
  }),
603
- /* @__PURE__ */ G("div", {
623
+ /* @__PURE__ */ K("div", {
604
624
  className: "grid gap-1.5",
605
- children: [/* @__PURE__ */ W(Y, {
625
+ children: [/* @__PURE__ */ G(Y, {
606
626
  htmlFor: "edit-title",
607
627
  children: "Title"
608
- }), /* @__PURE__ */ W(J, {
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__ */ G("div", {
634
+ /* @__PURE__ */ K("div", {
615
635
  className: "grid grid-cols-2 gap-3",
616
- children: [/* @__PURE__ */ G("div", {
636
+ children: [/* @__PURE__ */ K("div", {
617
637
  className: "grid gap-1.5",
618
- children: [/* @__PURE__ */ W(Y, { children: "Format" }), /* @__PURE__ */ G(X, {
638
+ children: [/* @__PURE__ */ G(Y, { children: "Format" }), /* @__PURE__ */ K(X, {
619
639
  value: p,
620
640
  onValueChange: (e) => m(e),
621
- children: [/* @__PURE__ */ W($, { children: /* @__PURE__ */ W(we, {}) }), /* @__PURE__ */ W(Z, { children: Le.map((e) => /* @__PURE__ */ W(Q, {
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__ */ G("div", {
646
+ }), /* @__PURE__ */ K("div", {
627
647
  className: "grid gap-1.5",
628
- children: [/* @__PURE__ */ W(Y, {
648
+ children: [/* @__PURE__ */ G(Y, {
629
649
  htmlFor: "edit-reading",
630
650
  children: "Reading time (min)"
631
- }), /* @__PURE__ */ W(J, {
651
+ }), /* @__PURE__ */ G(J, {
632
652
  id: "edit-reading",
633
653
  type: "number",
634
654
  min: 0,
635
- value: E,
636
- onChange: (e) => O(e.target.value)
655
+ value: T,
656
+ onChange: (e) => E(e.target.value)
637
657
  })]
638
658
  })]
639
659
  }),
640
- /* @__PURE__ */ G("div", {
660
+ /* @__PURE__ */ K("div", {
641
661
  className: "grid gap-1.5",
642
- children: [/* @__PURE__ */ W(Y, { children: "Topic" }), /* @__PURE__ */ G(X, {
662
+ children: [/* @__PURE__ */ G(Y, { children: "Topic" }), /* @__PURE__ */ K(X, {
643
663
  value: h,
644
664
  onValueChange: _,
645
- children: [/* @__PURE__ */ W($, { children: /* @__PURE__ */ W(we, { placeholder: "Choose a topic (optional)" }) }), /* @__PURE__ */ W(Z, { children: (a.data?.items ?? []).map((e) => /* @__PURE__ */ W(Q, {
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__ */ G("div", {
671
+ /* @__PURE__ */ K("div", {
652
672
  className: "grid gap-1.5",
653
- children: [/* @__PURE__ */ W(Y, {
673
+ children: [/* @__PURE__ */ G(Y, {
654
674
  htmlFor: "edit-summary",
655
675
  children: "Summary"
656
- }), /* @__PURE__ */ W(Te, {
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__ */ G("div", {
683
+ /* @__PURE__ */ K("div", {
664
684
  className: "grid gap-1.5",
665
- children: [/* @__PURE__ */ W(Y, {
685
+ children: [/* @__PURE__ */ G(Y, {
666
686
  htmlFor: "edit-body",
667
687
  children: "Body"
668
- }), /* @__PURE__ */ W(Te, {
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__ */ G("div", {
695
+ /* @__PURE__ */ K("div", {
676
696
  className: "grid gap-1.5",
677
- children: [/* @__PURE__ */ W(Y, {
697
+ children: [/* @__PURE__ */ G(Y, {
678
698
  htmlFor: "edit-langs",
679
699
  children: "Languages"
680
- }), /* @__PURE__ */ W(w, {
700
+ }), /* @__PURE__ */ G(D, {
681
701
  id: "edit-langs",
682
702
  value: y,
683
- onChange: b,
703
+ onChange: S,
684
704
  preserveCase: !0
685
705
  })]
686
706
  }),
687
- /* @__PURE__ */ G("div", {
707
+ /* @__PURE__ */ K("div", {
688
708
  className: "grid gap-1.5",
689
- children: [/* @__PURE__ */ W(Y, {
709
+ children: [/* @__PURE__ */ G(Y, {
690
710
  htmlFor: "edit-tags",
691
711
  children: "Tags"
692
- }), /* @__PURE__ */ W(w, {
712
+ }), /* @__PURE__ */ G(D, {
693
713
  id: "edit-tags",
694
714
  value: C,
695
- onChange: T
715
+ onChange: w
696
716
  })]
697
717
  }),
698
- j && /* @__PURE__ */ W("p", {
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__ */ G(be, { children: [/* @__PURE__ */ W(K, {
724
+ /* @__PURE__ */ K(we, { children: [/* @__PURE__ */ G(q, {
705
725
  variant: "outline",
706
726
  onClick: () => t(!1),
707
727
  children: "Cancel"
708
- }), /* @__PURE__ */ W(K, {
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: E ? Number(E) : null,
726
- coverFileId: k
745
+ readingMins: T ? Number(T) : null,
746
+ coverFileId: O
727
747
  }
728
- }), S.success("Story updated", o.trim()), t(!1);
748
+ }), x.success("Story updated", o.trim()), t(!1);
729
749
  } catch (e) {
730
- M(x(e));
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 { ke as StoryDetailPage };
761
+ export { Pe as StoryDetailPage };
742
762
 
743
763
  //# sourceMappingURL=StoryDetailPage.js.map