@burdenoff/microfe-theculturepost 2026.1113.6 → 2026.1122.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/generated/global-operations.d.ts +4 -1
- package/dist/generated/global-types.d.ts +2 -21
- package/dist/generated/wspace-operations.d.ts +4 -1
- package/dist/generated/wspace-types.d.ts +4 -23
- package/dist/theculturepost/TheCulturePostRoutes.js +13 -0
- package/dist/theculturepost/TheCulturePostRoutes.js.map +1 -1
- package/dist/theculturepost/components/AiContextPanel.d.ts +1 -1
- package/dist/theculturepost/components/AiContextPanel.js +146 -132
- package/dist/theculturepost/components/AiContextPanel.js.map +1 -1
- package/dist/theculturepost/components/OpenDiscussionDialog.js +60 -59
- package/dist/theculturepost/components/OpenDiscussionDialog.js.map +1 -1
- package/dist/theculturepost/components/StatusBadge.js +3 -0
- package/dist/theculturepost/components/StatusBadge.js.map +1 -1
- package/dist/theculturepost/components/index.js +2 -2
- package/dist/theculturepost/hooks/index.js +7 -7
- package/dist/theculturepost/hooks/useTcpApi.d.ts +19 -1
- package/dist/theculturepost/hooks/useTcpApi.js +110 -45
- package/dist/theculturepost/hooks/useTcpApi.js.map +1 -1
- package/dist/theculturepost/pages/discussions/DiscussionsPage.js +52 -51
- package/dist/theculturepost/pages/discussions/DiscussionsPage.js.map +1 -1
- package/dist/theculturepost/pages/governance/ContributorOnboardingPanel.d.ts +1 -0
- package/dist/theculturepost/pages/governance/ContributorOnboardingPanel.js +298 -0
- package/dist/theculturepost/pages/governance/ContributorOnboardingPanel.js.map +1 -0
- package/dist/theculturepost/pages/governance/EditorialReviewQueuePanel.d.ts +7 -0
- package/dist/theculturepost/pages/governance/EditorialReviewQueuePanel.js +185 -0
- package/dist/theculturepost/pages/governance/EditorialReviewQueuePanel.js.map +1 -0
- package/dist/theculturepost/pages/governance/GovernancePage.d.ts +11 -17
- package/dist/theculturepost/pages/governance/GovernancePage.js +324 -213
- package/dist/theculturepost/pages/governance/GovernancePage.js.map +1 -1
- package/dist/theculturepost/pages/governance/ModerationControlsPanel.d.ts +4 -0
- package/dist/theculturepost/pages/governance/ModerationControlsPanel.js +256 -0
- package/dist/theculturepost/pages/governance/ModerationControlsPanel.js.map +1 -0
- package/dist/theculturepost/pages/governance/TopicSettingsPanel.d.ts +1 -0
- package/dist/theculturepost/pages/governance/TopicSettingsPanel.js +298 -0
- package/dist/theculturepost/pages/governance/TopicSettingsPanel.js.map +1 -0
- package/dist/theculturepost/types/index.d.ts +23 -0
- package/package.json +12 -9
|
@@ -1,24 +1,5 @@
|
|
|
1
1
|
export type Maybe<T> = T | null;
|
|
2
2
|
export type InputMaybe<T> = Maybe<T>;
|
|
3
|
-
export type Exact<T extends {
|
|
4
|
-
[key: string]: unknown;
|
|
5
|
-
}> = {
|
|
6
|
-
[K in keyof T]: T[K];
|
|
7
|
-
};
|
|
8
|
-
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & {
|
|
9
|
-
[SubKey in K]?: Maybe<T[SubKey]>;
|
|
10
|
-
};
|
|
11
|
-
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & {
|
|
12
|
-
[SubKey in K]: Maybe<T[SubKey]>;
|
|
13
|
-
};
|
|
14
|
-
export type MakeEmpty<T extends {
|
|
15
|
-
[key: string]: unknown;
|
|
16
|
-
}, K extends keyof T> = {
|
|
17
|
-
[_ in K]?: never;
|
|
18
|
-
};
|
|
19
|
-
export type Incremental<T> = T | {
|
|
20
|
-
[P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never;
|
|
21
|
-
};
|
|
22
3
|
/** All built-in and custom scalars, mapped to their actual values */
|
|
23
4
|
export type Scalars = {
|
|
24
5
|
ID: {
|
|
@@ -68,8 +49,8 @@ export type Scalars = {
|
|
|
68
49
|
output: File;
|
|
69
50
|
};
|
|
70
51
|
_SubscriptionsPlaceholder: {
|
|
71
|
-
input:
|
|
72
|
-
output:
|
|
52
|
+
input: unknown;
|
|
53
|
+
output: unknown;
|
|
73
54
|
};
|
|
74
55
|
};
|
|
75
56
|
/** API Key for programmatic access */
|
|
@@ -1,24 +1,5 @@
|
|
|
1
1
|
export type Maybe<T> = T | null;
|
|
2
2
|
export type InputMaybe<T> = Maybe<T>;
|
|
3
|
-
export type Exact<T extends {
|
|
4
|
-
[key: string]: unknown;
|
|
5
|
-
}> = {
|
|
6
|
-
[K in keyof T]: T[K];
|
|
7
|
-
};
|
|
8
|
-
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & {
|
|
9
|
-
[SubKey in K]?: Maybe<T[SubKey]>;
|
|
10
|
-
};
|
|
11
|
-
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & {
|
|
12
|
-
[SubKey in K]: Maybe<T[SubKey]>;
|
|
13
|
-
};
|
|
14
|
-
export type MakeEmpty<T extends {
|
|
15
|
-
[key: string]: unknown;
|
|
16
|
-
}, K extends keyof T> = {
|
|
17
|
-
[_ in K]?: never;
|
|
18
|
-
};
|
|
19
|
-
export type Incremental<T> = T | {
|
|
20
|
-
[P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never;
|
|
21
|
-
};
|
|
22
3
|
/** All built-in and custom scalars, mapped to their actual values */
|
|
23
4
|
export type Scalars = {
|
|
24
5
|
ID: {
|
|
@@ -72,12 +53,12 @@ export type Scalars = {
|
|
|
72
53
|
output: File;
|
|
73
54
|
};
|
|
74
55
|
_ScalarsPlaceholder: {
|
|
75
|
-
input:
|
|
76
|
-
output:
|
|
56
|
+
input: unknown;
|
|
57
|
+
output: unknown;
|
|
77
58
|
};
|
|
78
59
|
_SecurityMainPlaceholder: {
|
|
79
|
-
input:
|
|
80
|
-
output:
|
|
60
|
+
input: unknown;
|
|
61
|
+
output: unknown;
|
|
81
62
|
};
|
|
82
63
|
};
|
|
83
64
|
export type A2AConnection = {
|
|
@@ -10,6 +10,7 @@ import { Spinner as f } from "@burdenoff/fe-libs/ui";
|
|
|
10
10
|
var p = {
|
|
11
11
|
home: "theculturepost.home",
|
|
12
12
|
overview: "theculturepost.overview",
|
|
13
|
+
admin: "theculturepost.admin",
|
|
13
14
|
stories: "theculturepost.stories",
|
|
14
15
|
topics: "theculturepost.topics",
|
|
15
16
|
timeline: "theculturepost.timeline",
|
|
@@ -57,6 +58,18 @@ var g = i(() => import("./pages/stories/StoriesPage.js").then((e) => ({ default:
|
|
|
57
58
|
path: "overview",
|
|
58
59
|
element: h(/* @__PURE__ */ u(T, {}), p.overview)
|
|
59
60
|
}),
|
|
61
|
+
/* @__PURE__ */ u(s, {
|
|
62
|
+
path: "overview/:tab",
|
|
63
|
+
element: h(/* @__PURE__ */ u(T, {}), p.overview)
|
|
64
|
+
}),
|
|
65
|
+
/* @__PURE__ */ u(s, {
|
|
66
|
+
path: "admin",
|
|
67
|
+
element: h(/* @__PURE__ */ u(T, { defaultTab: "review" }), p.admin)
|
|
68
|
+
}),
|
|
69
|
+
/* @__PURE__ */ u(s, {
|
|
70
|
+
path: "admin/:tab",
|
|
71
|
+
element: h(/* @__PURE__ */ u(T, {}), p.admin)
|
|
72
|
+
}),
|
|
60
73
|
/* @__PURE__ */ u(s, {
|
|
61
74
|
path: "stories",
|
|
62
75
|
element: h(/* @__PURE__ */ u(g, {}), p.stories)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TheCulturePostRoutes.js","names":["FEATURE","FeatureDisabledFallback","gated","FeatureGate","element","StoriesPage","lazy","m","StoryDetailPage","StoryCitationsPage","SavedStoriesPage","TopicsPage","TopicDetailPage","DiscussionsPage","DiscussionDetailPage","TimelinePage","GovernancePage","ArchivePage","CollectionDetailPage","ArchiveItemDetailPage","PageLoader","Spinner","TheCulturePostRoutes","useTheCulturePost","location","useLocation","normalizedBasePath","basePath","isStandalone","Suspense","Routes","Route","HomePage","Navigate"],"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';\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 StoryCitationsPage = lazy(() =>\n import('./pages/stories/StoryCitationsPage').then((m) => ({ default: m.StoryCitationsPage }))\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 <Route\n path=\"stories/:id/citations\"\n element={gated(<StoryCitationsPage />, FEATURE.stories)}\n />\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,IAAMA,IAAU;CACd,MAAM;CACN,UAAU;CACV,SAAS;CACT,QAAQ;CACR,UAAU;CACV,aAAa;CACb,SAAS;CACT,OAAO;AACT;AAEA,SAASC,IAAwC;CAC/C,OACE,kBAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CACE,kBAAC,QAAD;GAAM,WAAU;GAA0C,UAAA;EAAyB,CAAA,GACnF,kBAAC,QAAD;GAAM,WAAU;GAAU,UAAA;EAA8C,CAAA,CACrE;;AAET;AAEA,SAASC,EAAM,GAAuB,GAA4B;CAChE,OACE,kBAACC,GAAD;EAAmB;EAAM,cAAA;EAAa,UAAU,kBAACF,GAAD,CAA0B,CAAA;EACvE,UAAAG;CACU,CAAA;AAEjB;AAMA,IAAMC,IAAcC,QAClB,OAAO,iCAA8B,CAAC,MAAM,OAAO,EAAE,SAASC,EAAE,YAAY,EAAE,CAChF,GACMC,IAAkBF,QACtB,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AAQ,MAAM;IAAI,CAAA;IAE/E,kBAAC+B,GAAD;KAAO,MAAK;KAAW,SAAS7B,EAAM,kBAACa,GAAD,CAAe,CAAA,GAAGf,EAAQ,QAAQ;IAAI,CAAA;IAE5E,kBAAC+B,GAAD;KAAO,MAAK;KAAc,SAAS7B,EAAM,kBAACW,GAAD,CAAkB,CAAA,GAAGb,EAAQ,WAAW;IAAI,CAAA;IACrF,kBAAC+B,GAAD;KACE,MAAK;KACL,SAAS7B,EAAM,kBAACY,GAAD,CAAuB,CAAA,GAAGd,EAAQ,WAAW;IAC7D,CAAA;IAED,kBAAC+B,GAAD;KAAO,MAAK;KAAU,SAAS7B,EAAM,kBAACe,GAAD,CAAc,CAAA,GAAGjB,EAAQ,OAAO;IAAI,CAAA;IACzE,kBAAC+B,GAAD;KACE,MAAK;KACL,SAAS7B,EAAM,kBAACgB,GAAD,CAAuB,CAAA,GAAGlB,EAAQ,OAAO;IACzD,CAAA;IACD,kBAAC+B,GAAD;KACE,MAAK;KACL,SAAS7B,EAAM,kBAACiB,GAAD,CAAwB,CAAA,GAAGnB,EAAQ,OAAO;IAC1D,CAAA;IAED,kBAAC+B,GAAD;KAAO,MAAK;KAAI,SAAS,kBAACE,GAAD;MAAU,IAAG;MAAG,SAAA;KAAS,CAAA;IAAI,CAAA;GAChD,EAAA,CAAA;EACA,CAAA;CACP,CAAA;AAET"}
|
|
1
|
+
{"version":3,"file":"TheCulturePostRoutes.js","names":["FEATURE","FeatureDisabledFallback","gated","FeatureGate","element","StoriesPage","lazy","m","StoryDetailPage","StoryCitationsPage","SavedStoriesPage","TopicsPage","TopicDetailPage","DiscussionsPage","DiscussionDetailPage","TimelinePage","GovernancePage","ArchivePage","CollectionDetailPage","ArchiveItemDetailPage","PageLoader","Spinner","TheCulturePostRoutes","useTheCulturePost","location","useLocation","normalizedBasePath","basePath","isStandalone","Suspense","Routes","Route","HomePage","Navigate"],"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';\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 admin: 'theculturepost.admin',\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 StoryCitationsPage = lazy(() =>\n import('./pages/stories/StoryCitationsPage').then((m) => ({ default: m.StoryCitationsPage }))\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 <Route path=\"overview/:tab\" element={gated(<GovernancePage />, FEATURE.overview)} />\n <Route\n path=\"admin\"\n element={gated(<GovernancePage defaultTab=\"review\" />, FEATURE.admin)}\n />\n <Route path=\"admin/:tab\" element={gated(<GovernancePage />, FEATURE.admin)} />\n\n <Route path=\"stories\" element={gated(<StoriesPage />, FEATURE.stories)} />\n <Route path=\"stories/:id\" element={gated(<StoryDetailPage />, FEATURE.stories)} />\n <Route\n path=\"stories/:id/citations\"\n element={gated(<StoryCitationsPage />, FEATURE.stories)}\n />\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,IAAMA,IAAU;CACd,MAAM;CACN,UAAU;CACV,OAAO;CACP,SAAS;CACT,QAAQ;CACR,UAAU;CACV,aAAa;CACb,SAAS;CACT,OAAO;AACT;AAEA,SAASC,IAAwC;CAC/C,OACE,kBAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CACE,kBAAC,QAAD;GAAM,WAAU;GAA0C,UAAA;EAAyB,CAAA,GACnF,kBAAC,QAAD;GAAM,WAAU;GAAU,UAAA;EAA8C,CAA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B,GAAD;KACE,MAAK;KACL,SAAS7B,EAAM,kBAACiB,GAAD,CAAwB,CAAA,GAAGnB,EAAQ,OAAO;IAC1D,CAAA;IAED,kBAAC+B,GAAD;KAAO,MAAK;KAAI,SAAS,kBAACE,GAAD;MAAU,IAAG;MAAG,SAAA;KAAS,CAAA;IAAI,CAAA;GAChD,EAAA,CAAA;EACA,CAAA;CACP,CAAA;AAET"}
|
|
@@ -31,4 +31,4 @@ export interface AiContextSectionProps {
|
|
|
31
31
|
export declare function AiContextSection({ storyId, collectionId, oralHistoryId, useCases, title, description, className, }: AiContextSectionProps): import('react').JSX.Element;
|
|
32
32
|
export declare function AiReviewQueue({ className }: {
|
|
33
33
|
className?: string;
|
|
34
|
-
}): import('react').JSX.Element
|
|
34
|
+
}): import('react').JSX.Element;
|