@burdenoff/microfe-theculturepost 2026.716.1 → 2026.721.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 (42) hide show
  1. package/dist/theculturepost/TheCulturePostRoot.d.ts.map +1 -1
  2. package/dist/theculturepost/TheCulturePostRoot.js +46 -38
  3. package/dist/theculturepost/TheCulturePostRoot.js.map +1 -1
  4. package/dist/theculturepost/TheCulturePostRoutes.d.ts.map +1 -1
  5. package/dist/theculturepost/TheCulturePostRoutes.js +19 -14
  6. package/dist/theculturepost/TheCulturePostRoutes.js.map +1 -1
  7. package/dist/theculturepost/components/CitationList.js +11 -11
  8. package/dist/theculturepost/components/CreateCollectionDialog.js +6 -6
  9. package/dist/theculturepost/components/CreateStoryDialog.js +39 -39
  10. package/dist/theculturepost/components/CreateStoryDialog.js.map +1 -1
  11. package/dist/theculturepost/components/CreateTopicDialog.js +6 -6
  12. package/dist/theculturepost/components/StoryCard.d.ts.map +1 -1
  13. package/dist/theculturepost/components/StoryCard.js +108 -85
  14. package/dist/theculturepost/components/StoryCard.js.map +1 -1
  15. package/dist/theculturepost/components/TopicCard.d.ts.map +1 -1
  16. package/dist/theculturepost/components/TopicCard.js +48 -36
  17. package/dist/theculturepost/components/TopicCard.js.map +1 -1
  18. package/dist/theculturepost/hooks/useTcpApi.d.ts +3 -0
  19. package/dist/theculturepost/hooks/useTcpApi.d.ts.map +1 -1
  20. package/dist/theculturepost/hooks/useTcpApi.js +58 -34
  21. package/dist/theculturepost/hooks/useTcpApi.js.map +1 -1
  22. package/dist/theculturepost/pages/HomePage.js +14 -14
  23. package/dist/theculturepost/pages/archive/ArchivePage.js +18 -18
  24. package/dist/theculturepost/pages/archive/CollectionDetailPage.js +5 -5
  25. package/dist/theculturepost/pages/discussions/DiscussionsPage.js +6 -6
  26. package/dist/theculturepost/pages/governance/GovernancePage.js +10 -10
  27. package/dist/theculturepost/pages/stories/SavedStoriesPage.d.ts +11 -0
  28. package/dist/theculturepost/pages/stories/SavedStoriesPage.d.ts.map +1 -0
  29. package/dist/theculturepost/pages/stories/SavedStoriesPage.js +56 -0
  30. package/dist/theculturepost/pages/stories/SavedStoriesPage.js.map +1 -0
  31. package/dist/theculturepost/pages/stories/StoriesPage.d.ts.map +1 -1
  32. package/dist/theculturepost/pages/stories/StoriesPage.js +14 -9
  33. package/dist/theculturepost/pages/stories/StoriesPage.js.map +1 -1
  34. package/dist/theculturepost/pages/stories/StoryDetailPage.d.ts.map +1 -1
  35. package/dist/theculturepost/pages/stories/StoryDetailPage.js +282 -258
  36. package/dist/theculturepost/pages/stories/StoryDetailPage.js.map +1 -1
  37. package/dist/theculturepost/pages/timeline/TimelinePage.js +5 -5
  38. package/dist/theculturepost/pages/topics/TopicDetailPage.js +18 -18
  39. package/dist/theculturepost/pages/topics/TopicsPage.js +8 -8
  40. package/dist/theculturepost/types/index.d.ts +8 -0
  41. package/dist/theculturepost/types/index.d.ts.map +1 -1
  42. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"TheCulturePostRoot.d.ts","sourceRoot":"","sources":["../../src/theculturepost/TheCulturePostRoot.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAsBhC,OAAO,KAAK,EAAE,uBAAuB,EAAW,MAAM,SAAS,CAAC;AAYhE,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,uBAAuB,CAqG1D,CAAC"}
1
+ {"version":3,"file":"TheCulturePostRoot.d.ts","sourceRoot":"","sources":["../../src/theculturepost/TheCulturePostRoot.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAuBhC,OAAO,KAAK,EAAE,uBAAuB,EAAW,MAAM,SAAS,CAAC;AAYhE,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,uBAAuB,CA6G1D,CAAC"}
@@ -6,104 +6,112 @@ import { useCallback as i, useEffect as a } from "react";
6
6
  import { QueryClient as o, QueryClientProvider as s } from "@tanstack/react-query";
7
7
  import { FeatureFlagProvider as c } from "@burdenoff/fe-libs/shared/feature-flags";
8
8
  import { useI18n as l } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
9
- import { BookOpen as u, Compass as d, Landmark as f, LayoutDashboard as p, MessagesSquare as m, Milestone as h, Newspaper as g } from "lucide-react";
10
- import { jsx as _ } from "react/jsx-runtime";
9
+ import { BookOpen as u, Bookmark as d, Compass as f, Landmark as p, LayoutDashboard as m, MessagesSquare as h, Milestone as g, Newspaper as _ } from "lucide-react";
10
+ import { jsx as v } from "react/jsx-runtime";
11
11
  //#region src/theculturepost/TheCulturePostRoot.tsx
12
12
  r();
13
- var v = new o({ defaultOptions: { queries: {
13
+ var y = new o({ defaultOptions: { queries: {
14
14
  staleTime: 60 * 1e3,
15
15
  retry: 1,
16
16
  refetchOnWindowFocus: !1
17
- } } }), y = (r) => {
18
- let { registerNavItems: o, registerFooterItems: y, basePath: b = "/" } = r, { t: x } = l(), S = i((e, t) => {
19
- let n = x(e);
17
+ } } }), b = (r) => {
18
+ let { registerNavItems: o, registerFooterItems: b, basePath: x = "/" } = r, { t: S } = l(), C = i((e, t) => {
19
+ let n = S(e);
20
20
  return n === e ? t : n;
21
- }, [x]);
21
+ }, [S]);
22
22
  return a(() => {
23
23
  if (o) return o([
24
24
  {
25
25
  id: "theculturepost-home",
26
- label: S("theculturepost.nav.home", "Home"),
27
- path: e(b, ""),
28
- icon: /* @__PURE__ */ _(g, { size: 20 }),
26
+ label: C("theculturepost.nav.home", "Home"),
27
+ path: e(x, ""),
28
+ icon: /* @__PURE__ */ v(_, { size: 20 }),
29
29
  order: 0,
30
30
  group: "products"
31
31
  },
32
32
  {
33
33
  id: "theculturepost-overview",
34
- label: S("theculturepost.nav.overview", "Overview"),
35
- path: e(b, "overview"),
36
- icon: /* @__PURE__ */ _(p, { size: 20 }),
34
+ label: C("theculturepost.nav.overview", "Overview"),
35
+ path: e(x, "overview"),
36
+ icon: /* @__PURE__ */ v(m, { size: 20 }),
37
37
  order: 1,
38
38
  group: "products"
39
39
  },
40
40
  {
41
41
  id: "theculturepost-stories",
42
- label: S("theculturepost.nav.stories", "Stories"),
43
- path: e(b, "stories"),
44
- icon: /* @__PURE__ */ _(u, { size: 20 }),
42
+ label: C("theculturepost.nav.stories", "Stories"),
43
+ path: e(x, "stories"),
44
+ icon: /* @__PURE__ */ v(u, { size: 20 }),
45
45
  order: 2,
46
46
  group: "products"
47
47
  },
48
48
  {
49
49
  id: "theculturepost-topics",
50
- label: S("theculturepost.nav.topics", "Topics"),
51
- path: e(b, "topics"),
52
- icon: /* @__PURE__ */ _(d, { size: 20 }),
50
+ label: C("theculturepost.nav.topics", "Topics"),
51
+ path: e(x, "topics"),
52
+ icon: /* @__PURE__ */ v(f, { size: 20 }),
53
53
  order: 3,
54
54
  group: "products"
55
55
  },
56
56
  {
57
57
  id: "theculturepost-timeline",
58
- label: S("theculturepost.nav.timeline", "Timeline"),
59
- path: e(b, "timeline"),
60
- icon: /* @__PURE__ */ _(h, { size: 20 }),
58
+ label: C("theculturepost.nav.timeline", "Timeline"),
59
+ path: e(x, "timeline"),
60
+ icon: /* @__PURE__ */ v(g, { size: 20 }),
61
61
  order: 4,
62
62
  group: "products"
63
63
  },
64
64
  {
65
65
  id: "theculturepost-discussions",
66
- label: S("theculturepost.nav.discussions", "Discussions"),
67
- path: e(b, "discussions"),
68
- icon: /* @__PURE__ */ _(m, { size: 20 }),
66
+ label: C("theculturepost.nav.discussions", "Discussions"),
67
+ path: e(x, "discussions"),
68
+ icon: /* @__PURE__ */ v(h, { size: 20 }),
69
69
  order: 5,
70
70
  group: "products"
71
71
  },
72
72
  {
73
73
  id: "theculturepost-archive",
74
- label: S("theculturepost.nav.archive", "Archive"),
75
- path: e(b, "archive"),
76
- icon: /* @__PURE__ */ _(f, { size: 20 }),
74
+ label: C("theculturepost.nav.archive", "Archive"),
75
+ path: e(x, "archive"),
76
+ icon: /* @__PURE__ */ v(p, { size: 20 }),
77
77
  order: 6,
78
78
  group: "products"
79
+ },
80
+ {
81
+ id: "theculturepost-saved",
82
+ label: C("theculturepost.nav.saved", "Saved"),
83
+ path: e(x, "saved"),
84
+ icon: /* @__PURE__ */ v(d, { size: 20 }),
85
+ order: 7,
86
+ group: "products"
79
87
  }
80
88
  ]);
81
89
  }, [
82
90
  o,
83
- b,
84
- S
91
+ x,
92
+ C
85
93
  ]), a(() => {
86
- if (y) return y([{
94
+ if (b) return b([{
87
95
  id: "theculturepost-status",
88
- label: S("theculturepost.footer.ready", "TheCulturePost Ready"),
96
+ label: C("theculturepost.footer.ready", "TheCulturePost Ready"),
89
97
  type: "status",
90
98
  section: "left",
91
99
  order: 10
92
100
  }]);
93
- }, [y, S]), /* @__PURE__ */ _(s, {
94
- client: v,
95
- children: /* @__PURE__ */ _(c, {
101
+ }, [b, C]), /* @__PURE__ */ v(s, {
102
+ client: y,
103
+ children: /* @__PURE__ */ v(c, {
96
104
  workspaceId: null,
97
105
  gateway: "global",
98
106
  defaultEnabled: !0,
99
- children: /* @__PURE__ */ _(t, {
107
+ children: /* @__PURE__ */ v(t, {
100
108
  ...r,
101
- children: /* @__PURE__ */ _(n, {})
109
+ children: /* @__PURE__ */ v(n, {})
102
110
  })
103
111
  })
104
112
  });
105
113
  };
106
114
  //#endregion
107
- export { y as TheCulturePostRoot };
115
+ export { b as TheCulturePostRoot };
108
116
 
109
117
  //# sourceMappingURL=TheCulturePostRoot.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TheCulturePostRoot.js","names":[],"sources":["../../src/theculturepost/TheCulturePostRoot.tsx"],"sourcesContent":["/**\n * TheCulturePost Root Component\n * @module theculturepost\n *\n * Host-contract entry point. Registers the product's sidebar nav (five sections\n * that map to the wspace-theculturepost-svc `tcp*` backend) and mounts the\n * routed pages inside the shared QueryClient + FeatureFlag providers.\n */\n\nimport type { FC } from 'react';\nimport { useCallback, useEffect } from 'react';\nimport { QueryClient, QueryClientProvider } from '@tanstack/react-query';\nimport { FeatureFlagProvider } from '@burdenoff/fe-libs/shared/feature-flags';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport {\n Newspaper,\n LayoutDashboard,\n BookOpen,\n Compass,\n Milestone,\n MessagesSquare,\n Landmark,\n} from 'lucide-react';\nimport { TheCulturePostProvider } from './context/TheCulturePostContext';\nimport { TheCulturePostRoutes } from './TheCulturePostRoutes';\nimport { injectDisplayFont } from './styles/injectDisplayFont';\n\n// Ensure the `.font-display` serif utility exists in the built MFE (shells own\n// Tailwind but won't emit this custom class). Runs once, idempotently.\ninjectDisplayFont();\nimport { joinPath } from './utils/navigation';\nimport type { TheCulturePostRootProps, NavItem } from './types';\n\nconst queryClient = new QueryClient({\n defaultOptions: {\n queries: {\n staleTime: 60 * 1000,\n retry: 1,\n refetchOnWindowFocus: false,\n },\n },\n});\n\nexport const TheCulturePostRoot: FC<TheCulturePostRootProps> = (props) => {\n const { registerNavItems, registerFooterItems, basePath = '/' } = props;\n const { t: translate } = useI18n();\n const t = useCallback(\n (key: string, fallback: string): string => {\n const value = translate(key);\n return value === key ? fallback : value;\n },\n [translate]\n );\n\n // Register navigation items with the shell on mount. Ids/paths/orders match\n // the app-shell static NavRegistration block so the two are a single,\n // consistent source of truth.\n useEffect(() => {\n if (!registerNavItems) return;\n\n const navItems: NavItem[] = [\n {\n id: 'theculturepost-home',\n label: t('theculturepost.nav.home', 'Home'),\n path: joinPath(basePath, ''),\n icon: <Newspaper size={20} />,\n order: 0,\n group: 'products',\n },\n {\n id: 'theculturepost-overview',\n label: t('theculturepost.nav.overview', 'Overview'),\n path: joinPath(basePath, 'overview'),\n icon: <LayoutDashboard size={20} />,\n order: 1,\n group: 'products',\n },\n {\n id: 'theculturepost-stories',\n label: t('theculturepost.nav.stories', 'Stories'),\n path: joinPath(basePath, 'stories'),\n icon: <BookOpen size={20} />,\n order: 2,\n group: 'products',\n },\n {\n id: 'theculturepost-topics',\n label: t('theculturepost.nav.topics', 'Topics'),\n path: joinPath(basePath, 'topics'),\n icon: <Compass size={20} />,\n order: 3,\n group: 'products',\n },\n {\n id: 'theculturepost-timeline',\n label: t('theculturepost.nav.timeline', 'Timeline'),\n path: joinPath(basePath, 'timeline'),\n icon: <Milestone size={20} />,\n order: 4,\n group: 'products',\n },\n {\n id: 'theculturepost-discussions',\n label: t('theculturepost.nav.discussions', 'Discussions'),\n path: joinPath(basePath, 'discussions'),\n icon: <MessagesSquare size={20} />,\n order: 5,\n group: 'products',\n },\n {\n id: 'theculturepost-archive',\n label: t('theculturepost.nav.archive', 'Archive'),\n path: joinPath(basePath, 'archive'),\n icon: <Landmark size={20} />,\n order: 6,\n group: 'products',\n },\n ];\n\n return registerNavItems(navItems);\n }, [registerNavItems, basePath, t]);\n\n useEffect(() => {\n if (!registerFooterItems) return;\n return registerFooterItems([\n {\n id: 'theculturepost-status',\n label: t('theculturepost.footer.ready', 'TheCulturePost Ready'),\n type: 'status',\n section: 'left',\n order: 10,\n },\n ]);\n }, [registerFooterItems, t]);\n\n return (\n <QueryClientProvider client={queryClient}>\n <FeatureFlagProvider workspaceId={null} gateway=\"global\" defaultEnabled={true}>\n <TheCulturePostProvider {...props}>\n <TheCulturePostRoutes />\n </TheCulturePostProvider>\n </FeatureFlagProvider>\n </QueryClientProvider>\n );\n};\n"],"mappings":";;;;;;;;;;;AA6BA,GAAmB;AAInB,IAAM,IAAc,IAAI,EAAY,EAClC,gBAAgB,EACd,SAAS;CACP,WAAW,KAAK;CAChB,OAAO;CACP,sBAAsB;CACvB,EACF,EACF,CAAC,EAEW,KAAmD,MAAU;CACxE,IAAM,EAAE,qBAAkB,wBAAqB,cAAW,QAAQ,GAC5D,EAAE,GAAG,MAAc,GAAS,EAC5B,IAAI,GACP,GAAa,MAA6B;EACzC,IAAM,IAAQ,EAAU,EAAI;AAC5B,SAAO,MAAU,IAAM,IAAW;IAEpC,CAA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QACL,QAAO,EAAoB,CACzB;GACE,IAAI;GACJ,OAAO,EAAE,+BAA+B,uBAAuB;GAC/D,MAAM;GACN,SAAS;GACT,OAAO;GACR,CACF,CAAC;IACD,CAAC,GAAqB,EAAE,CAAC,EAG1B,kBAAC,GAAD;EAAqB,QAAQ;YAC3B,kBAAC,GAAD;GAAqB,aAAa;GAAM,SAAQ;GAAS,gBAAgB;aACvE,kBAAC,GAAD;IAAwB,GAAI;cAC1B,kBAAC,GAAD,EAAwB,CAAA;IACD,CAAA;GACL,CAAA;EACF,CAAA"}
1
+ {"version":3,"file":"TheCulturePostRoot.js","names":[],"sources":["../../src/theculturepost/TheCulturePostRoot.tsx"],"sourcesContent":["/**\n * TheCulturePost Root Component\n * @module theculturepost\n *\n * Host-contract entry point. Registers the product's sidebar nav (sections\n * that map to the wspace-theculturepost-svc `tcp*` backend) and mounts the\n * routed pages inside the shared QueryClient + FeatureFlag providers.\n */\n\nimport type { FC } from 'react';\nimport { useCallback, useEffect } from 'react';\nimport { QueryClient, QueryClientProvider } from '@tanstack/react-query';\nimport { FeatureFlagProvider } from '@burdenoff/fe-libs/shared/feature-flags';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport {\n Newspaper,\n LayoutDashboard,\n BookOpen,\n Bookmark,\n Compass,\n Milestone,\n MessagesSquare,\n Landmark,\n} from 'lucide-react';\nimport { TheCulturePostProvider } from './context/TheCulturePostContext';\nimport { TheCulturePostRoutes } from './TheCulturePostRoutes';\nimport { injectDisplayFont } from './styles/injectDisplayFont';\n\n// Ensure the `.font-display` serif utility exists in the built MFE (shells own\n// Tailwind but won't emit this custom class). Runs once, idempotently.\ninjectDisplayFont();\nimport { joinPath } from './utils/navigation';\nimport type { TheCulturePostRootProps, NavItem } from './types';\n\nconst queryClient = new QueryClient({\n defaultOptions: {\n queries: {\n staleTime: 60 * 1000,\n retry: 1,\n refetchOnWindowFocus: false,\n },\n },\n});\n\nexport const TheCulturePostRoot: FC<TheCulturePostRootProps> = (props) => {\n const { registerNavItems, registerFooterItems, basePath = '/' } = props;\n const { t: translate } = useI18n();\n const t = useCallback(\n (key: string, fallback: string): string => {\n const value = translate(key);\n return value === key ? fallback : value;\n },\n [translate]\n );\n\n // Register navigation items with the shell on mount. Ids/paths/orders match\n // the app-shell static NavRegistration block so the two are a single,\n // consistent source of truth.\n useEffect(() => {\n if (!registerNavItems) return;\n\n const navItems: NavItem[] = [\n {\n id: 'theculturepost-home',\n label: t('theculturepost.nav.home', 'Home'),\n path: joinPath(basePath, ''),\n icon: <Newspaper size={20} />,\n order: 0,\n group: 'products',\n },\n {\n id: 'theculturepost-overview',\n label: t('theculturepost.nav.overview', 'Overview'),\n path: joinPath(basePath, 'overview'),\n icon: <LayoutDashboard size={20} />,\n order: 1,\n group: 'products',\n },\n {\n id: 'theculturepost-stories',\n label: t('theculturepost.nav.stories', 'Stories'),\n path: joinPath(basePath, 'stories'),\n icon: <BookOpen size={20} />,\n order: 2,\n group: 'products',\n },\n {\n id: 'theculturepost-topics',\n label: t('theculturepost.nav.topics', 'Topics'),\n path: joinPath(basePath, 'topics'),\n icon: <Compass size={20} />,\n order: 3,\n group: 'products',\n },\n {\n id: 'theculturepost-timeline',\n label: t('theculturepost.nav.timeline', 'Timeline'),\n path: joinPath(basePath, 'timeline'),\n icon: <Milestone size={20} />,\n order: 4,\n group: 'products',\n },\n {\n id: 'theculturepost-discussions',\n label: t('theculturepost.nav.discussions', 'Discussions'),\n path: joinPath(basePath, 'discussions'),\n icon: <MessagesSquare size={20} />,\n order: 5,\n group: 'products',\n },\n {\n id: 'theculturepost-archive',\n label: t('theculturepost.nav.archive', 'Archive'),\n path: joinPath(basePath, 'archive'),\n icon: <Landmark size={20} />,\n order: 6,\n group: 'products',\n },\n {\n id: 'theculturepost-saved',\n label: t('theculturepost.nav.saved', 'Saved'),\n path: joinPath(basePath, 'saved'),\n icon: <Bookmark size={20} />,\n order: 7,\n group: 'products',\n },\n ];\n\n return registerNavItems(navItems);\n }, [registerNavItems, basePath, t]);\n\n useEffect(() => {\n if (!registerFooterItems) return;\n return registerFooterItems([\n {\n id: 'theculturepost-status',\n label: t('theculturepost.footer.ready', 'TheCulturePost Ready'),\n type: 'status',\n section: 'left',\n order: 10,\n },\n ]);\n }, [registerFooterItems, t]);\n\n return (\n <QueryClientProvider client={queryClient}>\n <FeatureFlagProvider workspaceId={null} gateway=\"global\" defaultEnabled={true}>\n <TheCulturePostProvider {...props}>\n <TheCulturePostRoutes />\n </TheCulturePostProvider>\n </FeatureFlagProvider>\n </QueryClientProvider>\n );\n};\n"],"mappings":";;;;;;;;;;;AA8BA,GAAmB;AAInB,IAAM,IAAc,IAAI,EAAY,EAClC,gBAAgB,EACd,SAAS;CACP,WAAW,KAAK;CAChB,OAAO;CACP,sBAAsB;CACvB,EACF,EACF,CAAC,EAEW,KAAmD,MAAU;CACxE,IAAM,EAAE,qBAAkB,wBAAqB,cAAW,QAAQ,GAC5D,EAAE,GAAG,MAAc,GAAS,EAC5B,IAAI,GACP,GAAa,MAA6B;EACzC,IAAM,IAAQ,EAAU,EAAI;AAC5B,SAAO,MAAU,IAAM,IAAW;IAEpC,CAAC,EAAU,CACZ;AA2FD,QAtFA,QAAgB;AACT,QAqEL,QAAO,EAnEqB;GAC1B;IACE,IAAI;IACJ,OAAO,EAAE,2BAA2B,OAAO;IAC3C,MAAM,EAAS,GAAU,GAAG;IAC5B,MAAM,kBAAC,GAAD,EAAW,MAAM,IAAM,CAAA;IAC7B,OAAO;IACP,OAAO;IACR;GACD;IACE,IAAI;IACJ,OAAO,EAAE,+BAA+B,WAAW;IACnD,MAAM,EAAS,GAAU,WAAW;IACpC,MAAM,kBAAC,GAAD,EAAiB,MAAM,IAAM,CAAA;IACnC,OAAO;IACP,OAAO;IACR;GACD;IACE,IAAI;IACJ,OAAO,EAAE,8BAA8B,UAAU;IACjD,MAAM,EAAS,GAAU,UAAU;IACnC,MAAM,kBAAC,GAAD,EAAU,MAAM,IAAM,CAAA;IAC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-1 +1 @@
1
- {"version":3,"file":"TheCulturePostRoutes.d.ts","sourceRoot":"","sources":["../../src/theculturepost/TheCulturePostRoutes.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,KAAK,EAAE,EAAqC,MAAM,OAAO,CAAC;AA4FnE,eAAO,MAAM,oBAAoB,EAAE,EAuDlC,CAAC"}
1
+ {"version":3,"file":"TheCulturePostRoutes.d.ts","sourceRoot":"","sources":["../../src/theculturepost/TheCulturePostRoutes.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,KAAK,EAAE,EAAqC,MAAM,OAAO,CAAC;AAgGnE,eAAO,MAAM,oBAAoB,EAAE,EAyDlC,CAAC"}
@@ -14,7 +14,8 @@ var p = {
14
14
  topics: "theculturepost.topics",
15
15
  timeline: "theculturepost.timeline",
16
16
  discussions: "theculturepost.discussions",
17
- archive: "theculturepost.archive"
17
+ archive: "theculturepost.archive",
18
+ saved: "theculturepost.saved"
18
19
  };
19
20
  function m() {
20
21
  return /* @__PURE__ */ d("div", {
@@ -36,17 +37,17 @@ function h(e, t) {
36
37
  children: e
37
38
  });
38
39
  }
39
- var g = i(() => import("./pages/stories/StoriesPage.js").then((e) => ({ default: e.StoriesPage }))), _ = i(() => import("./pages/stories/StoryDetailPage.js").then((e) => ({ default: e.StoryDetailPage }))), v = i(() => import("./pages/topics/TopicsPage.js").then((e) => ({ default: e.TopicsPage }))), y = i(() => import("./pages/topics/TopicDetailPage.js").then((e) => ({ default: e.TopicDetailPage }))), b = i(() => import("./pages/discussions/DiscussionsPage.js").then((e) => ({ default: e.DiscussionsPage }))), x = i(() => import("./pages/discussions/DiscussionDetailPage.js").then((e) => ({ default: e.DiscussionDetailPage }))), S = i(() => import("./pages/timeline/TimelinePage.js").then((e) => ({ default: e.TimelinePage }))), C = i(() => import("./pages/governance/GovernancePage.js").then((e) => ({ default: e.GovernancePage }))), w = i(() => import("./pages/archive/ArchivePage.js").then((e) => ({ default: e.ArchivePage }))), T = i(() => import("./pages/archive/CollectionDetailPage.js").then((e) => ({ default: e.CollectionDetailPage }))), E = i(() => import("./pages/archive/ArchiveItemDetailPage.js").then((e) => ({ default: e.ArchiveItemDetailPage }))), D = () => /* @__PURE__ */ u("div", {
40
+ var g = i(() => import("./pages/stories/StoriesPage.js").then((e) => ({ default: e.StoriesPage }))), _ = i(() => import("./pages/stories/StoryDetailPage.js").then((e) => ({ default: e.StoryDetailPage }))), v = i(() => import("./pages/stories/SavedStoriesPage.js").then((e) => ({ default: e.SavedStoriesPage }))), y = i(() => import("./pages/topics/TopicsPage.js").then((e) => ({ default: e.TopicsPage }))), b = i(() => import("./pages/topics/TopicDetailPage.js").then((e) => ({ default: e.TopicDetailPage }))), x = i(() => import("./pages/discussions/DiscussionsPage.js").then((e) => ({ default: e.DiscussionsPage }))), S = i(() => import("./pages/discussions/DiscussionDetailPage.js").then((e) => ({ default: e.DiscussionDetailPage }))), C = i(() => import("./pages/timeline/TimelinePage.js").then((e) => ({ default: e.TimelinePage }))), w = i(() => import("./pages/governance/GovernancePage.js").then((e) => ({ default: e.GovernancePage }))), T = i(() => import("./pages/archive/ArchivePage.js").then((e) => ({ default: e.ArchivePage }))), E = i(() => import("./pages/archive/CollectionDetailPage.js").then((e) => ({ default: e.CollectionDetailPage }))), D = i(() => import("./pages/archive/ArchiveItemDetailPage.js").then((e) => ({ default: e.ArchiveItemDetailPage }))), O = () => /* @__PURE__ */ u("div", {
40
41
  className: "flex min-h-[400px] items-center justify-center",
41
42
  children: /* @__PURE__ */ u(f, { size: "lg" })
42
- }), O = () => {
43
+ }), k = () => {
43
44
  let { basePath: i, isStandalone: a } = e(), f = l();
44
45
  t();
45
46
  let m = i === "/" ? "" : (i ?? "").replace(/\/$/, "");
46
47
  return m && !a && !(f.pathname === m || f.pathname.startsWith(m + "/")) ? null : /* @__PURE__ */ u("div", {
47
48
  className: "flex min-h-full flex-col",
48
49
  children: /* @__PURE__ */ u(r, {
49
- fallback: /* @__PURE__ */ u(D, {}),
50
+ fallback: /* @__PURE__ */ u(O, {}),
50
51
  children: /* @__PURE__ */ d(c, { children: [
51
52
  /* @__PURE__ */ u(s, {
52
53
  index: !0,
@@ -54,7 +55,7 @@ var g = i(() => import("./pages/stories/StoriesPage.js").then((e) => ({ default:
54
55
  }),
55
56
  /* @__PURE__ */ u(s, {
56
57
  path: "overview",
57
- element: h(/* @__PURE__ */ u(C, {}), p.overview)
58
+ element: h(/* @__PURE__ */ u(w, {}), p.overview)
58
59
  }),
59
60
  /* @__PURE__ */ u(s, {
60
61
  path: "stories",
@@ -64,37 +65,41 @@ var g = i(() => import("./pages/stories/StoriesPage.js").then((e) => ({ default:
64
65
  path: "stories/:id",
65
66
  element: h(/* @__PURE__ */ u(_, {}), p.stories)
66
67
  }),
68
+ /* @__PURE__ */ u(s, {
69
+ path: "saved",
70
+ element: h(/* @__PURE__ */ u(v, {}), p.saved)
71
+ }),
67
72
  /* @__PURE__ */ u(s, {
68
73
  path: "topics",
69
- element: h(/* @__PURE__ */ u(v, {}), p.topics)
74
+ element: h(/* @__PURE__ */ u(y, {}), p.topics)
70
75
  }),
71
76
  /* @__PURE__ */ u(s, {
72
77
  path: "topics/:id",
73
- element: h(/* @__PURE__ */ u(y, {}), p.topics)
78
+ element: h(/* @__PURE__ */ u(b, {}), p.topics)
74
79
  }),
75
80
  /* @__PURE__ */ u(s, {
76
81
  path: "timeline",
77
- element: h(/* @__PURE__ */ u(S, {}), p.timeline)
82
+ element: h(/* @__PURE__ */ u(C, {}), p.timeline)
78
83
  }),
79
84
  /* @__PURE__ */ u(s, {
80
85
  path: "discussions",
81
- element: h(/* @__PURE__ */ u(b, {}), p.discussions)
86
+ element: h(/* @__PURE__ */ u(x, {}), p.discussions)
82
87
  }),
83
88
  /* @__PURE__ */ u(s, {
84
89
  path: "discussions/:id",
85
- element: h(/* @__PURE__ */ u(x, {}), p.discussions)
90
+ element: h(/* @__PURE__ */ u(S, {}), p.discussions)
86
91
  }),
87
92
  /* @__PURE__ */ u(s, {
88
93
  path: "archive",
89
- element: h(/* @__PURE__ */ u(w, {}), p.archive)
94
+ element: h(/* @__PURE__ */ u(T, {}), p.archive)
90
95
  }),
91
96
  /* @__PURE__ */ u(s, {
92
97
  path: "archive/collections/:id",
93
- element: h(/* @__PURE__ */ u(T, {}), p.archive)
98
+ element: h(/* @__PURE__ */ u(E, {}), p.archive)
94
99
  }),
95
100
  /* @__PURE__ */ u(s, {
96
101
  path: "archive/items/:id",
97
- element: h(/* @__PURE__ */ u(E, {}), p.archive)
102
+ element: h(/* @__PURE__ */ u(D, {}), p.archive)
98
103
  }),
99
104
  /* @__PURE__ */ u(s, {
100
105
  path: "*",
@@ -108,6 +113,6 @@ var g = i(() => import("./pages/stories/StoriesPage.js").then((e) => ({ default:
108
113
  });
109
114
  };
110
115
  //#endregion
111
- export { O as TheCulturePostRoutes };
116
+ export { k as TheCulturePostRoutes };
112
117
 
113
118
  //# sourceMappingURL=TheCulturePostRoutes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TheCulturePostRoutes.js","names":[],"sources":["../../src/theculturepost/TheCulturePostRoutes.tsx"],"sourcesContent":["/**\n * TheCulturePost Routes\n * @module theculturepost\n *\n * Domain routes. The editorial home page is eager-loaded (primary landing); all\n * other pages are lazy-loaded. Every route maps to a real `tcp*` backend\n * capability.\n */\n\nimport { type FC, lazy, Suspense, type ReactElement } from 'react';\nimport { Routes, Route, Navigate, useLocation } from 'react-router-dom';\nimport { Spinner } from '@burdenoff/fe-libs/ui';\nimport { FeatureGate } from '@burdenoff/fe-libs/shared/feature-flags';\nimport { useTheCulturePost } from './context/TheCulturePostContext';\nimport { usePageAnalytics } from './hooks/usePageAnalytics';\n\nconst FEATURE = {\n home: 'theculturepost.home',\n overview: 'theculturepost.overview',\n stories: 'theculturepost.stories',\n topics: 'theculturepost.topics',\n timeline: 'theculturepost.timeline',\n discussions: 'theculturepost.discussions',\n archive: 'theculturepost.archive',\n} as const;\n\nfunction FeatureDisabledFallback(): ReactElement {\n return (\n <div className=\"flex min-h-[400px] flex-col items-center justify-center gap-3 text-text-secondary\">\n <span className=\"text-lg font-semibold text-text-primary\">Feature unavailable</span>\n <span className=\"text-sm\">This page is disabled in your workspace.</span>\n </div>\n );\n}\n\nfunction gated(element: ReactElement, flag: string): ReactElement {\n return (\n <FeatureGate flag={flag} defaultValue fallback={<FeatureDisabledFallback />}>\n {element}\n </FeatureGate>\n );\n}\n\n// Eager — primary landing\nimport { HomePage } from './pages/HomePage';\n\n// Stories\nconst StoriesPage = lazy(() =>\n import('./pages/stories/StoriesPage').then((m) => ({ default: m.StoriesPage }))\n);\nconst StoryDetailPage = lazy(() =>\n import('./pages/stories/StoryDetailPage').then((m) => ({ default: m.StoryDetailPage }))\n);\n\n// Topics\nconst TopicsPage = lazy(() =>\n import('./pages/topics/TopicsPage').then((m) => ({ default: m.TopicsPage }))\n);\nconst TopicDetailPage = lazy(() =>\n import('./pages/topics/TopicDetailPage').then((m) => ({ default: m.TopicDetailPage }))\n);\n\n// Discussions\nconst DiscussionsPage = lazy(() =>\n import('./pages/discussions/DiscussionsPage').then((m) => ({ default: m.DiscussionsPage }))\n);\nconst DiscussionDetailPage = lazy(() =>\n import('./pages/discussions/DiscussionDetailPage').then((m) => ({\n default: m.DiscussionDetailPage,\n }))\n);\n\n// Timeline\nconst TimelinePage = lazy(() =>\n import('./pages/timeline/TimelinePage').then((m) => ({ default: m.TimelinePage }))\n);\n\n// Governance / Overview\nconst GovernancePage = lazy(() =>\n import('./pages/governance/GovernancePage').then((m) => ({ default: m.GovernancePage }))\n);\n\n// Archive\nconst ArchivePage = lazy(() =>\n import('./pages/archive/ArchivePage').then((m) => ({ default: m.ArchivePage }))\n);\nconst CollectionDetailPage = lazy(() =>\n import('./pages/archive/CollectionDetailPage').then((m) => ({ default: m.CollectionDetailPage }))\n);\nconst ArchiveItemDetailPage = lazy(() =>\n import('./pages/archive/ArchiveItemDetailPage').then((m) => ({\n default: m.ArchiveItemDetailPage,\n }))\n);\n\nconst PageLoader: FC = () => (\n <div className=\"flex min-h-[400px] items-center justify-center\">\n <Spinner size=\"lg\" />\n </div>\n);\n\nexport const TheCulturePostRoutes: FC = () => {\n const { basePath, isStandalone } = useTheCulturePost();\n const location = useLocation();\n\n usePageAnalytics();\n\n const normalizedBasePath = basePath === '/' ? '' : (basePath ?? '').replace(/\\/$/, '');\n\n // Guard: only render if the current path matches basePath (integrated mode).\n if (normalizedBasePath && !isStandalone) {\n const pathMatches =\n location.pathname === normalizedBasePath ||\n location.pathname.startsWith(normalizedBasePath + '/');\n if (!pathMatches) {\n return null;\n }\n }\n\n return (\n <div className=\"flex min-h-full flex-col\">\n <Suspense fallback={<PageLoader />}>\n <Routes>\n <Route index element={gated(<HomePage />, FEATURE.home)} />\n\n <Route path=\"overview\" element={gated(<GovernancePage />, FEATURE.overview)} />\n\n <Route path=\"stories\" element={gated(<StoriesPage />, FEATURE.stories)} />\n <Route path=\"stories/:id\" element={gated(<StoryDetailPage />, FEATURE.stories)} />\n\n <Route path=\"topics\" element={gated(<TopicsPage />, FEATURE.topics)} />\n <Route path=\"topics/:id\" element={gated(<TopicDetailPage />, FEATURE.topics)} />\n\n <Route path=\"timeline\" element={gated(<TimelinePage />, FEATURE.timeline)} />\n\n <Route path=\"discussions\" element={gated(<DiscussionsPage />, FEATURE.discussions)} />\n <Route\n path=\"discussions/:id\"\n element={gated(<DiscussionDetailPage />, FEATURE.discussions)}\n />\n\n <Route path=\"archive\" element={gated(<ArchivePage />, FEATURE.archive)} />\n <Route\n path=\"archive/collections/:id\"\n element={gated(<CollectionDetailPage />, FEATURE.archive)}\n />\n <Route\n path=\"archive/items/:id\"\n element={gated(<ArchiveItemDetailPage />, FEATURE.archive)}\n />\n\n <Route path=\"*\" element={<Navigate to=\"\" replace />} />\n </Routes>\n </Suspense>\n </div>\n );\n};\n"],"mappings":";;;;;;;;;AAgBA,IAAM,IAAU;CACd,MAAM;CACN,UAAU;CACV,SAAS;CACT,QAAQ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AI,CAAA;IAE7E,kBAAC,GAAD;KAAO,MAAK;KAAc,SAAS,EAAM,kBAAC,GAAD,EAAmB,CAAA,EAAE,EAAQ,YAAY;KAAI,CAAA;IACtF,kBAAC,GAAD;KACE,MAAK;KACL,SAAS,EAAM,kBAAC,GAAD,EAAwB,CAAA,EAAE,EAAQ,YAAY;KAC7D,CAAA;IAEF,kBAAC,GAAD;KAAO,MAAK;KAAU,SAAS,EAAM,kBAAC,GAAD,EAAe,CAAA,EAAE,EAAQ,QAAQ;KAAI,CAAA;IAC1E,kBAAC,GAAD;KACE,MAAK;KACL,SAAS,EAAM,kBAAC,GAAD,EAAwB,CAAA,EAAE,EAAQ,QAAQ;KACzD,CAAA;IACF,kBAAC,GAAD;KACE,MAAK;KACL,SAAS,EAAM,kBAAC,GAAD,EAAyB,CAAA,EAAE,EAAQ,QAAQ;KAC1D,CAAA;IAEF,kBAAC,GAAD;KAAO,MAAK;KAAI,SAAS,kBAAC,GAAD;MAAU,IAAG;MAAG,SAAA;MAAU,CAAA;KAAI,CAAA;IAChD,EAAA,CAAA;GACA,CAAA;EACP,CAAA"}
1
+ {"version":3,"file":"TheCulturePostRoutes.js","names":[],"sources":["../../src/theculturepost/TheCulturePostRoutes.tsx"],"sourcesContent":["/**\n * TheCulturePost Routes\n * @module theculturepost\n *\n * Domain routes. The editorial home page is eager-loaded (primary landing); all\n * other pages are lazy-loaded. Every route maps to a real `tcp*` backend\n * capability.\n */\n\nimport { type FC, lazy, Suspense, type ReactElement } from 'react';\nimport { Routes, Route, Navigate, useLocation } from 'react-router-dom';\nimport { Spinner } from '@burdenoff/fe-libs/ui';\nimport { FeatureGate } from '@burdenoff/fe-libs/shared/feature-flags';\nimport { useTheCulturePost } from './context/TheCulturePostContext';\nimport { usePageAnalytics } from './hooks/usePageAnalytics';\n\nconst FEATURE = {\n home: 'theculturepost.home',\n overview: 'theculturepost.overview',\n stories: 'theculturepost.stories',\n topics: 'theculturepost.topics',\n timeline: 'theculturepost.timeline',\n discussions: 'theculturepost.discussions',\n archive: 'theculturepost.archive',\n saved: 'theculturepost.saved',\n} as const;\n\nfunction FeatureDisabledFallback(): ReactElement {\n return (\n <div className=\"flex min-h-[400px] flex-col items-center justify-center gap-3 text-text-secondary\">\n <span className=\"text-lg font-semibold text-text-primary\">Feature unavailable</span>\n <span className=\"text-sm\">This page is disabled in your workspace.</span>\n </div>\n );\n}\n\nfunction gated(element: ReactElement, flag: string): ReactElement {\n return (\n <FeatureGate flag={flag} defaultValue fallback={<FeatureDisabledFallback />}>\n {element}\n </FeatureGate>\n );\n}\n\n// Eager — primary landing\nimport { HomePage } from './pages/HomePage';\n\n// Stories\nconst StoriesPage = lazy(() =>\n import('./pages/stories/StoriesPage').then((m) => ({ default: m.StoriesPage }))\n);\nconst StoryDetailPage = lazy(() =>\n import('./pages/stories/StoryDetailPage').then((m) => ({ default: m.StoryDetailPage }))\n);\nconst SavedStoriesPage = lazy(() =>\n import('./pages/stories/SavedStoriesPage').then((m) => ({ default: m.SavedStoriesPage }))\n);\n\n// Topics\nconst TopicsPage = lazy(() =>\n import('./pages/topics/TopicsPage').then((m) => ({ default: m.TopicsPage }))\n);\nconst TopicDetailPage = lazy(() =>\n import('./pages/topics/TopicDetailPage').then((m) => ({ default: m.TopicDetailPage }))\n);\n\n// Discussions\nconst DiscussionsPage = lazy(() =>\n import('./pages/discussions/DiscussionsPage').then((m) => ({ default: m.DiscussionsPage }))\n);\nconst DiscussionDetailPage = lazy(() =>\n import('./pages/discussions/DiscussionDetailPage').then((m) => ({\n default: m.DiscussionDetailPage,\n }))\n);\n\n// Timeline\nconst TimelinePage = lazy(() =>\n import('./pages/timeline/TimelinePage').then((m) => ({ default: m.TimelinePage }))\n);\n\n// Governance / Overview\nconst GovernancePage = lazy(() =>\n import('./pages/governance/GovernancePage').then((m) => ({ default: m.GovernancePage }))\n);\n\n// Archive\nconst ArchivePage = lazy(() =>\n import('./pages/archive/ArchivePage').then((m) => ({ default: m.ArchivePage }))\n);\nconst CollectionDetailPage = lazy(() =>\n import('./pages/archive/CollectionDetailPage').then((m) => ({ default: m.CollectionDetailPage }))\n);\nconst ArchiveItemDetailPage = lazy(() =>\n import('./pages/archive/ArchiveItemDetailPage').then((m) => ({\n default: m.ArchiveItemDetailPage,\n }))\n);\n\nconst PageLoader: FC = () => (\n <div className=\"flex min-h-[400px] items-center justify-center\">\n <Spinner size=\"lg\" />\n </div>\n);\n\nexport const TheCulturePostRoutes: FC = () => {\n const { basePath, isStandalone } = useTheCulturePost();\n const location = useLocation();\n\n usePageAnalytics();\n\n const normalizedBasePath = basePath === '/' ? '' : (basePath ?? '').replace(/\\/$/, '');\n\n // Guard: only render if the current path matches basePath (integrated mode).\n if (normalizedBasePath && !isStandalone) {\n const pathMatches =\n location.pathname === normalizedBasePath ||\n location.pathname.startsWith(normalizedBasePath + '/');\n if (!pathMatches) {\n return null;\n }\n }\n\n return (\n <div className=\"flex min-h-full flex-col\">\n <Suspense fallback={<PageLoader />}>\n <Routes>\n <Route index element={gated(<HomePage />, FEATURE.home)} />\n\n <Route path=\"overview\" element={gated(<GovernancePage />, FEATURE.overview)} />\n\n <Route path=\"stories\" element={gated(<StoriesPage />, FEATURE.stories)} />\n <Route path=\"stories/:id\" element={gated(<StoryDetailPage />, FEATURE.stories)} />\n\n <Route path=\"saved\" element={gated(<SavedStoriesPage />, FEATURE.saved)} />\n\n <Route path=\"topics\" element={gated(<TopicsPage />, FEATURE.topics)} />\n <Route path=\"topics/:id\" element={gated(<TopicDetailPage />, FEATURE.topics)} />\n\n <Route path=\"timeline\" element={gated(<TimelinePage />, FEATURE.timeline)} />\n\n <Route path=\"discussions\" element={gated(<DiscussionsPage />, FEATURE.discussions)} />\n <Route\n path=\"discussions/:id\"\n element={gated(<DiscussionDetailPage />, FEATURE.discussions)}\n />\n\n <Route path=\"archive\" element={gated(<ArchivePage />, FEATURE.archive)} />\n <Route\n path=\"archive/collections/:id\"\n element={gated(<CollectionDetailPage />, FEATURE.archive)}\n />\n <Route\n path=\"archive/items/:id\"\n element={gated(<ArchiveItemDetailPage />, FEATURE.archive)}\n />\n\n <Route path=\"*\" element={<Navigate to=\"\" replace />} />\n </Routes>\n </Suspense>\n </div>\n );\n};\n"],"mappings":";;;;;;;;;AAgBA,IAAM,IAAU;CACd,MAAM;CACN,UAAU;CACV,SAAS;CACT,QAAQ;CACR,UAAU;CACV,aAAa;CACb,SAAS;CACT,OAAO;CACR;AAED,SAAS,IAAwC;AAC/C,QACE,kBAAC,OAAD;EAAK,WAAU;YAAf,CACE,kBAAC,QAAD;GAAM,WAAU;aAA0C;GAA0B,CAAA,EACpF,kBAAC,QAAD;GAAM,WAAU;aAAU;GAA+C,CAAA,CACrE;;;AAIV,SAAS,EAAM,GAAuB,GAA4B;AAChE,QACE,kBAAC,GAAD;EAAmB;EAAM,cAAA;EAAa,UAAU,kBAAC,GAAD,EAA2B,CAAA;YACxE;EACW,CAAA;;AAQlB,IAAM,IAAc,QAClB,OAAO,kCAA+B,MAAM,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,CAChF,EACK,IAAkB,QACtB,OAAO,sCAAmC,MAAM,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,CACxF,EACK,IAAmB,QACvB,OAAO,uCAAoC,MAAM,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAC1F,EAGK,IAAa,QACjB,OAAO,gCAA6B,MAAM,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAC7E,EACK,IAAkB,QACtB,OAAO,qCAAkC,MAAM,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,CACvF,EAGK,IAAkB,QACtB,OAAO,0CAAuC,MAAM,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAC5F,EACK,IAAuB,QAC3B,OAAO,+CAA4C,MAAM,OAAO,EAC9D,SAAS,EAAE,sBACZ,EAAE,CACJ,EAGK,IAAe,QACnB,OAAO,oCAAiC,MAAM,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,CACn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kBAAC,GAAD;KAAO,MAAK;KAAQ,SAAS,EAAM,kBAAC,GAAD,EAAoB,CAAA,EAAE,EAAQ,MAAM;KAAI,CAAA;IAE3E,kBAAC,GAAD;KAAO,MAAK;KAAS,SAAS,EAAM,kBAAC,GAAD,EAAc,CAAA,EAAE,EAAQ,OAAO;KAAI,CAAA;IACvE,kBAAC,GAAD;KAAO,MAAK;KAAa,SAAS,EAAM,kBAAC,GAAD,EAAmB,CAAA,EAAE,EAAQ,OAAO;KAAI,CAAA;IAEhF,kBAAC,GAAD;KAAO,MAAK;KAAW,SAAS,EAAM,kBAAC,GAAD,EAAgB,CAAA,EAAE,EAAQ,SAAS;KAAI,CAAA;IAE7E,kBAAC,GAAD;KAAO,MAAK;KAAc,SAAS,EAAM,kBAAC,GAAD,EAAmB,CAAA,EAAE,EAAQ,YAAY;KAAI,CAAA;IACtF,kBAAC,GAAD;KACE,MAAK;KACL,SAAS,EAAM,kBAAC,GAAD,EAAwB,CAAA,EAAE,EAAQ,YAAY;KAC7D,CAAA;IAEF,kBAAC,GAAD;KAAO,MAAK;KAAU,SAAS,EAAM,kBAAC,GAAD,EAAe,CAAA,EAAE,EAAQ,QAAQ;KAAI,CAAA;IAC1E,kBAAC,GAAD;KACE,MAAK;KACL,SAAS,EAAM,kBAAC,GAAD,EAAwB,CAAA,EAAE,EAAQ,QAAQ;KACzD,CAAA;IACF,kBAAC,GAAD;KACE,MAAK;KACL,SAAS,EAAM,kBAAC,GAAD,EAAyB,CAAA,EAAE,EAAQ,QAAQ;KAC1D,CAAA;IAEF,kBAAC,GAAD;KAAO,MAAK;KAAI,SAAS,kBAAC,GAAD;MAAU,IAAG;MAAG,SAAA;MAAU,CAAA;KAAI,CAAA;IAChD,EAAA,CAAA;GACA,CAAA;EACP,CAAA"}
@@ -2,10 +2,10 @@ import { cn as e } from "../utils/cn.js";
2
2
  import { ErrorView as t, LoadingView as n } from "./StateViews.js";
3
3
  import { formatDate as r, formatEnumLabel as i } from "../utils/formatters.js";
4
4
  import { StatusBadge as a } from "./StatusBadge.js";
5
- import { EmptyState as o } from "./EmptyState.js";
6
- import { useTcpCitations as s, useTcpVerifyCitation as c } from "../hooks/useTcpApi.js";
5
+ import { useTcpCitations as o, useTcpVerifyCitation as s } from "../hooks/useTcpApi.js";
7
6
  import "../hooks/index.js";
8
- import { describeError as l, notify as u } from "../lib/toast.js";
7
+ import { describeError as c, notify as l } from "../lib/toast.js";
8
+ import { EmptyState as u } from "./EmptyState.js";
9
9
  import { createElement as d } from "react";
10
10
  import { AlertCircle as f, BookMarked as p, BookOpen as m, Box as h, CheckCircle2 as g, ExternalLink as _, FileText as v, Globe as y, GraduationCap as b, HelpCircle as x, Landmark as S, Mic as C, Newspaper as w, Quote as T, ShieldCheck as E, XCircle as D } from "lucide-react";
11
11
  import { jsx as O, jsxs as k } from "react/jsx-runtime";
@@ -88,14 +88,14 @@ function I({ value: t, onChange: n, pending: r = !1, compact: i = !1, className:
88
88
  });
89
89
  }
90
90
  function L({ citation: t, compact: n }) {
91
- let o = c(), s = async (e) => {
91
+ let o = s(), u = async (e) => {
92
92
  if (e !== t.verification) try {
93
93
  await o.mutateAsync({
94
94
  id: t.id,
95
95
  verification: e
96
- }), u.success("Verification updated", i(e));
96
+ }), l.success("Verification updated", i(e));
97
97
  } catch (e) {
98
- u.error("Could not update verification", l(e));
98
+ l.error("Could not update verification", c(e));
99
99
  }
100
100
  }, f = [
101
101
  t.author,
@@ -175,7 +175,7 @@ function L({ citation: t, compact: n }) {
175
175
  ]
176
176
  }), /* @__PURE__ */ O(I, {
177
177
  value: t.verification,
178
- onChange: s,
178
+ onChange: u,
179
179
  pending: o.isPending,
180
180
  compact: n
181
181
  })]
@@ -217,11 +217,11 @@ function R() {
217
217
  });
218
218
  }
219
219
  function z({ storyId: r, compact: i = !1 }) {
220
- let { data: a, isLoading: c, isError: l, refetch: u } = s(r);
221
- return c ? /* @__PURE__ */ O(n, { label: "Loading citations…" }) : l ? /* @__PURE__ */ O(t, {
220
+ let { data: a, isLoading: s, isError: c, refetch: l } = o(r);
221
+ return s ? /* @__PURE__ */ O(n, { label: "Loading citations…" }) : c ? /* @__PURE__ */ O(t, {
222
222
  message: "We couldn't load citations.",
223
- onRetry: () => u()
224
- }) : !a || a.length === 0 ? /* @__PURE__ */ O(o, {
223
+ onRetry: () => l()
224
+ }) : !a || a.length === 0 ? /* @__PURE__ */ O(u, {
225
225
  icon: /* @__PURE__ */ O(p, { className: "h-9 w-9" }),
226
226
  title: "No citations yet",
227
227
  description: "Add verifiable sources to ground this story in the record."
@@ -1,8 +1,8 @@
1
1
  import { FILE_FOLDERS as e } from "../hooks/useFiles.js";
2
2
  import { useTcpCreateCollection as t } from "../hooks/useTcpApi.js";
3
3
  import "../hooks/index.js";
4
- import { slugify as n } from "../utils/slug.js";
5
- import { describeError as r, notify as i } from "../lib/toast.js";
4
+ import { describeError as n, notify as r } from "../lib/toast.js";
5
+ import { slugify as i } from "../utils/slug.js";
6
6
  import { Counter as a, MediaDropzone as o } from "./RecordOralHistoryDialog.js";
7
7
  import { useState as s } from "react";
8
8
  import { jsx as c, jsxs as l } from "react/jsx-runtime";
@@ -10,7 +10,7 @@ import { Button as u, Input as d, Label as f, ResponsiveDialog as p, ResponsiveD
10
10
  //#region src/theculturepost/components/CreateCollectionDialog.tsx
11
11
  var b = 160, x = 120, S = 600;
12
12
  function C({ open: C, onOpenChange: w, onCreated: T }) {
13
- let E = t(), [D, O] = s(""), [k, A] = s(""), [j, M] = s(!1), [N, P] = s(""), [F, I] = s(""), [L, R] = s(null), [z, B] = s(null), V = j ? k : n(D), H = () => {
13
+ let E = t(), [D, O] = s(""), [k, A] = s(""), [j, M] = s(!1), [N, P] = s(""), [F, I] = s(""), [L, R] = s(null), [z, B] = s(null), V = j ? k : i(D), H = () => {
14
14
  O(""), A(""), M(!1), P(""), I(""), R(null), B(null);
15
15
  };
16
16
  return /* @__PURE__ */ c(p, {
@@ -67,7 +67,7 @@ function C({ open: C, onOpenChange: w, onCreated: T }) {
67
67
  id: "collection-slug",
68
68
  value: V,
69
69
  onChange: (e) => {
70
- M(!0), A(n(e.target.value));
70
+ M(!0), A(i(e.target.value));
71
71
  },
72
72
  placeholder: "temple-manuscripts-of-the-kaveri-delta"
73
73
  })]
@@ -134,9 +134,9 @@ function C({ open: C, onOpenChange: w, onCreated: T }) {
134
134
  description: F.trim() || null,
135
135
  coverFileId: L?.id ?? null
136
136
  });
137
- i.success("Collection created", e.name), w(!1), H(), T?.(e);
137
+ r.success("Collection created", e.name), w(!1), H(), T?.(e);
138
138
  } catch (e) {
139
- B(r(e));
139
+ B(n(e));
140
140
  }
141
141
  },
142
142
  disabled: E.isPending,