@burdenoff/microfe-theculturepost 2026.1014.1 → 2026.1031.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/stories/AddCitationDialog.stories.d.ts +11 -0
- package/dist/stories/AddCitationDialog.stories.d.ts.map +1 -0
- package/dist/stories/ArchiveItemCard.stories.d.ts +9 -0
- package/dist/stories/ArchiveItemCard.stories.d.ts.map +1 -0
- package/dist/stories/CitationList.stories.d.ts +13 -0
- package/dist/stories/CitationList.stories.d.ts.map +1 -0
- package/dist/stories/DiscussionCard.stories.d.ts +9 -0
- package/dist/stories/DiscussionCard.stories.d.ts.map +1 -0
- package/dist/stories/RecordOralHistoryDialog.stories.d.ts +11 -0
- package/dist/stories/RecordOralHistoryDialog.stories.d.ts.map +1 -0
- package/dist/stories/ReplyThread.stories.d.ts +12 -0
- package/dist/stories/ReplyThread.stories.d.ts.map +1 -0
- package/dist/stories/StoryCard.stories.d.ts +11 -0
- package/dist/stories/StoryCard.stories.d.ts.map +1 -0
- package/dist/stories/support/fixtures.d.ts +19 -0
- package/dist/stories/support/fixtures.d.ts.map +1 -0
- package/dist/stories/support/graphqlMock.d.ts +18 -0
- package/dist/stories/support/graphqlMock.d.ts.map +1 -0
- package/dist/stories/support/variables.d.ts +11 -0
- package/dist/stories/support/variables.d.ts.map +1 -0
- package/dist/stories/support/withTcpProviders.d.ts +13 -0
- package/dist/stories/support/withTcpProviders.d.ts.map +1 -0
- package/dist/theculturepost/TheCulturePostRoutes.d.ts.map +1 -1
- package/dist/theculturepost/TheCulturePostRoutes.js +18 -14
- package/dist/theculturepost/TheCulturePostRoutes.js.map +1 -1
- package/dist/theculturepost/components/AddCitationDialog.d.ts +12 -2
- package/dist/theculturepost/components/AddCitationDialog.d.ts.map +1 -1
- package/dist/theculturepost/components/AddCitationDialog.js +114 -92
- package/dist/theculturepost/components/AddCitationDialog.js.map +1 -1
- package/dist/theculturepost/components/AddClaimDialog.d.ts +14 -0
- package/dist/theculturepost/components/AddClaimDialog.d.ts.map +1 -0
- package/dist/theculturepost/components/AddClaimDialog.js +108 -0
- package/dist/theculturepost/components/AddClaimDialog.js.map +1 -0
- package/dist/theculturepost/components/CitationList.d.ts +10 -1
- package/dist/theculturepost/components/CitationList.d.ts.map +1 -1
- package/dist/theculturepost/components/CitationList.js +89 -85
- package/dist/theculturepost/components/CitationList.js.map +1 -1
- package/dist/theculturepost/hooks/useTcpApi.d.ts +17 -1
- package/dist/theculturepost/hooks/useTcpApi.d.ts.map +1 -1
- package/dist/theculturepost/hooks/useTcpApi.js +117 -62
- package/dist/theculturepost/hooks/useTcpApi.js.map +1 -1
- package/dist/theculturepost/pages/stories/StoryCitationsPage.d.ts +19 -0
- package/dist/theculturepost/pages/stories/StoryCitationsPage.d.ts.map +1 -0
- package/dist/theculturepost/pages/stories/StoryCitationsPage.js +319 -0
- package/dist/theculturepost/pages/stories/StoryCitationsPage.js.map +1 -0
- package/dist/theculturepost/pages/stories/StoryDetailPage.d.ts.map +1 -1
- package/dist/theculturepost/pages/stories/StoryDetailPage.js +327 -271
- package/dist/theculturepost/pages/stories/StoryDetailPage.js.map +1 -1
- package/dist/theculturepost/types/index.d.ts +34 -0
- package/dist/theculturepost/types/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { AddCitationDialog } from '../theculturepost/components/AddCitationDialog';
|
|
3
|
+
|
|
4
|
+
declare const meta: Meta<typeof AddCitationDialog>;
|
|
5
|
+
export default meta;
|
|
6
|
+
type Story = StoryObj<typeof meta>;
|
|
7
|
+
export declare const Open: Story;
|
|
8
|
+
export declare const TitleIsRequired: Story;
|
|
9
|
+
export declare const SubmitsCitationForClaim: Story;
|
|
10
|
+
export declare const ServerErrorIsShown: Story;
|
|
11
|
+
//# sourceMappingURL=AddCitationDialog.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AddCitationDialog.stories.d.ts","sourceRoot":"","sources":["../../src/stories/AddCitationDialog.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAC;AAenF,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,iBAAiB,CAUxC,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAKnC,eAAO,MAAM,IAAI,EAAE,KAQlB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAQ7B,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,KA2CrC,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,KAkBhC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { ArchiveItemCard } from '../theculturepost/components/ArchiveItemCard';
|
|
3
|
+
|
|
4
|
+
declare const meta: Meta<typeof ArchiveItemCard>;
|
|
5
|
+
export default meta;
|
|
6
|
+
type Story = StoryObj<typeof meta>;
|
|
7
|
+
export declare const Manuscript: Story;
|
|
8
|
+
export declare const MinimalMetadata: Story;
|
|
9
|
+
//# sourceMappingURL=ArchiveItemCard.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ArchiveItemCard.stories.d.ts","sourceRoot":"","sources":["../../src/stories/ArchiveItemCard.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,eAAe,EAAE,MAAM,8CAA8C,CAAC;AAG/E,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,eAAe,CAWtC,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,UAAU,EAAE,KAaxB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAkB7B,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { CitationList } from '../theculturepost/components/CitationList';
|
|
3
|
+
|
|
4
|
+
declare const meta: Meta<typeof CitationList>;
|
|
5
|
+
export default meta;
|
|
6
|
+
type Story = StoryObj<typeof meta>;
|
|
7
|
+
export declare const Sources: Story;
|
|
8
|
+
export declare const VerifyCitation: Story;
|
|
9
|
+
export declare const Compact: Story;
|
|
10
|
+
export declare const Empty: Story;
|
|
11
|
+
export declare const Loading: Story;
|
|
12
|
+
export declare const LoadErrorWithRetry: Story;
|
|
13
|
+
//# sourceMappingURL=CitationList.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CitationList.stories.d.ts","sourceRoot":"","sources":["../../src/stories/CitationList.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,YAAY,EAAiB,MAAM,2CAA2C,CAAC;AA6BxF,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,YAAY,CAKnC,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAQnC,eAAO,MAAM,OAAO,EAAE,KAsBrB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAyB5B,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAQrB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAKnB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,KAmBhC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { DiscussionCard } from '../theculturepost/components/DiscussionCard';
|
|
3
|
+
|
|
4
|
+
declare const meta: Meta<typeof DiscussionCard>;
|
|
5
|
+
export default meta;
|
|
6
|
+
type Story = StoryObj<typeof meta>;
|
|
7
|
+
export declare const Open: Story;
|
|
8
|
+
export declare const InterfaithAndLocked: Story;
|
|
9
|
+
//# sourceMappingURL=DiscussionCard.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DiscussionCard.stories.d.ts","sourceRoot":"","sources":["../../src/stories/DiscussionCard.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,cAAc,EAAE,MAAM,6CAA6C,CAAC;AAG7E,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,cAAc,CAWrC,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,IAAI,EAAE,KAalB,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,KAkBjC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { RecordOralHistoryDialog } from '../theculturepost/components/RecordOralHistoryDialog';
|
|
3
|
+
|
|
4
|
+
declare const meta: Meta<typeof RecordOralHistoryDialog>;
|
|
5
|
+
export default meta;
|
|
6
|
+
type Story = StoryObj<typeof meta>;
|
|
7
|
+
export declare const ConsentGate: Story;
|
|
8
|
+
export declare const RecordsWithCollectionAndTags: Story;
|
|
9
|
+
export declare const PreselectedCollection: Story;
|
|
10
|
+
export declare const UploadSource: Story;
|
|
11
|
+
//# sourceMappingURL=RecordOralHistoryDialog.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RecordOralHistoryDialog.stories.d.ts","sourceRoot":"","sources":["../../src/stories/RecordOralHistoryDialog.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,sDAAsD,CAAC;AAsB/F,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,uBAAuB,CAK9C,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAQnC,eAAO,MAAM,WAAW,EAAE,KAezB,CAAC;AAEF,eAAO,MAAM,4BAA4B,EAAE,KA8C1C,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,KAUnC,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAO1B,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { ReplyThread } from '../theculturepost/components/ReplyThread';
|
|
3
|
+
|
|
4
|
+
declare const meta: Meta<typeof ReplyThread>;
|
|
5
|
+
export default meta;
|
|
6
|
+
type Story = StoryObj<typeof meta>;
|
|
7
|
+
export declare const Thread: Story;
|
|
8
|
+
export declare const PostReplyWithPerspective: Story;
|
|
9
|
+
export declare const ModerateReply: Story;
|
|
10
|
+
export declare const RemovedReplyIsHidden: Story;
|
|
11
|
+
export declare const LockedAndEmpty: Story;
|
|
12
|
+
//# sourceMappingURL=ReplyThread.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReplyThread.stories.d.ts","sourceRoot":"","sources":["../../src/stories/ReplyThread.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AAyCvE,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,WAAW,CAKlC,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAUnC,eAAO,MAAM,MAAM,EAAE,KAepB,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,KAkCtC,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAoB3B,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,KAWlC,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAW5B,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { StoryCard } from '../theculturepost/components/StoryCard';
|
|
3
|
+
|
|
4
|
+
declare const meta: Meta<typeof StoryCard>;
|
|
5
|
+
export default meta;
|
|
6
|
+
type Story = StoryObj<typeof meta>;
|
|
7
|
+
export declare const Published: Story;
|
|
8
|
+
export declare const SaveToReadingList: Story;
|
|
9
|
+
export declare const Bookmarked: Story;
|
|
10
|
+
export declare const DraftWithoutStatus: Story;
|
|
11
|
+
//# sourceMappingURL=StoryCard.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StoryCard.stories.d.ts","sourceRoot":"","sources":["../../src/stories/StoryCard.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAC;AASnE,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,SAAS,CAYhC,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,SAAS,EAAE,KAkBvB,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,KAe/B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KASxB,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,KAUhC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { TcpArchiveItem, TcpCitation, TcpCollection, TcpDiscussion, TcpOralHistory, TcpReply, TcpStory, TcpStoryClaim, TcpTopic } from '../../theculturepost/types';
|
|
2
|
+
|
|
3
|
+
export declare const STORYBOOK_USER: {
|
|
4
|
+
readonly id: "user-storybook-self";
|
|
5
|
+
readonly email: "storybook@theculturepost.test";
|
|
6
|
+
readonly workspaceId: "ws-storybook";
|
|
7
|
+
};
|
|
8
|
+
export declare const topicFixture: TcpTopic;
|
|
9
|
+
export declare function makeStory(overrides?: Partial<TcpStory>): TcpStory;
|
|
10
|
+
export declare function makeArchiveItem(overrides?: Partial<TcpArchiveItem>): TcpArchiveItem;
|
|
11
|
+
export declare function makeDiscussion(overrides?: Partial<TcpDiscussion>): TcpDiscussion;
|
|
12
|
+
export declare function makeCitation(overrides?: Partial<TcpCitation>): TcpCitation;
|
|
13
|
+
export declare const citationFixtures: TcpCitation[];
|
|
14
|
+
export declare const claimFixtures: TcpStoryClaim[];
|
|
15
|
+
export declare function makeReply(overrides?: Partial<TcpReply>): TcpReply;
|
|
16
|
+
export declare const replyFixtures: TcpReply[];
|
|
17
|
+
export declare function makeCollection(overrides?: Partial<TcpCollection>): TcpCollection;
|
|
18
|
+
export declare function makeOralHistory(overrides?: Partial<TcpOralHistory>): TcpOralHistory;
|
|
19
|
+
//# sourceMappingURL=fixtures.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fixtures.d.ts","sourceRoot":"","sources":["../../../src/stories/support/fixtures.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EACV,cAAc,EACd,WAAW,EACX,aAAa,EACb,aAAa,EACb,cAAc,EACd,QAAQ,EACR,QAAQ,EACR,aAAa,EACb,QAAQ,EACT,MAAM,4BAA4B,CAAC;AAEpC,eAAO,MAAM,cAAc;;;;CAIjB,CAAC;AAMX,eAAO,MAAM,YAAY,EAAE,QAa1B,CAAC;AAEF,wBAAgB,SAAS,CAAC,SAAS,GAAE,OAAO,CAAC,QAAQ,CAAM,GAAG,QAAQ,CA2BrE;AAED,wBAAgB,eAAe,CAAC,SAAS,GAAE,OAAO,CAAC,cAAc,CAAM,GAAG,cAAc,CAoBvF;AAED,wBAAgB,cAAc,CAAC,SAAS,GAAE,OAAO,CAAC,aAAa,CAAM,GAAG,aAAa,CAkBpF;AAED,wBAAgB,YAAY,CAAC,SAAS,GAAE,OAAO,CAAC,WAAW,CAAM,GAAG,WAAW,CAqB9E;AAED,eAAO,MAAM,gBAAgB,EAAE,WAAW,EAsBzC,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,aAAa,EAWxC,CAAC;AAEF,wBAAgB,SAAS,CAAC,SAAS,GAAE,OAAO,CAAC,QAAQ,CAAM,GAAG,QAAQ,CAarE;AAED,eAAO,MAAM,aAAa,EAAE,QAAQ,EAWnC,CAAC;AAEF,wBAAgB,cAAc,CAAC,SAAS,GAAE,OAAO,CAAC,aAAa,CAAM,GAAG,aAAa,CAgBpF;AAED,wBAAgB,eAAe,CAAC,SAAS,GAAE,OAAO,CAAC,cAAc,CAAM,GAAG,cAAc,CAqBvF"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { GraphQLFetchOptions, GraphQLResponse } from '@burdenoff/fe-libs/shared/graphql';
|
|
2
|
+
|
|
3
|
+
export * from '@burdenoff/fe-libs/shared/graphql';
|
|
4
|
+
/** Resolves an operation's root field from its variables, or throws to emit a GraphQL error. */
|
|
5
|
+
export type TcpMockResolver = (variables: Record<string, unknown>) => unknown;
|
|
6
|
+
export type TcpMockResolvers = Record<string, TcpMockResolver>;
|
|
7
|
+
export interface TcpRecordedCall {
|
|
8
|
+
field: string;
|
|
9
|
+
variables: Record<string, unknown>;
|
|
10
|
+
}
|
|
11
|
+
/** Replace the active resolver set and clear the call log (one call per story render). */
|
|
12
|
+
export declare function setGraphqlMocks(next: TcpMockResolvers): void;
|
|
13
|
+
/** Calls recorded since the last `setGraphqlMocks`, optionally filtered by root field. */
|
|
14
|
+
export declare function getGraphqlCalls(field?: string): TcpRecordedCall[];
|
|
15
|
+
/** The first root selection of an operation string (`mutation X { tcpAddCitation(...) }` → `tcpAddCitation`). */
|
|
16
|
+
export declare function rootFieldOf(query: string): string | null;
|
|
17
|
+
export declare function graphqlFetch<T = unknown>(options: GraphQLFetchOptions): Promise<GraphQLResponse<T>>;
|
|
18
|
+
//# sourceMappingURL=graphqlMock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graphqlMock.d.ts","sourceRoot":"","sources":["../../../src/stories/support/graphqlMock.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAE9F,cAAc,mCAAmC,CAAC;AAElD,gGAAgG;AAChG,MAAM,MAAM,eAAe,GAAG,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC;AAE9E,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;AAE/D,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC;AAKD,0FAA0F;AAC1F,wBAAgB,eAAe,CAAC,IAAI,EAAE,gBAAgB,GAAG,IAAI,CAI5D;AAED,0FAA0F;AAC1F,wBAAgB,eAAe,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,eAAe,EAAE,CAEjE;AAID,iHAAiH;AACjH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAExD;AAED,wBAAsB,YAAY,CAAC,CAAC,GAAG,OAAO,EAC5C,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CA2B7B"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Narrow helpers for reading GraphQL variables inside story resolvers without
|
|
3
|
+
* unchecked casts.
|
|
4
|
+
*/
|
|
5
|
+
export declare function readString(variables: Record<string, unknown>, key: string): string;
|
|
6
|
+
export declare function readObject(variables: Record<string, unknown>, key: string): Record<string, unknown>;
|
|
7
|
+
/** Pick `value` out of an allowed list, rejecting anything the schema would not accept. */
|
|
8
|
+
export declare function readEnum<T extends string>(value: unknown, allowed: readonly T[]): T;
|
|
9
|
+
/** Never-settling promise, used to hold a query in its loading state. */
|
|
10
|
+
export declare function pending(): Promise<never>;
|
|
11
|
+
//# sourceMappingURL=variables.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"variables.d.ts","sourceRoot":"","sources":["../../../src/stories/support/variables.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,wBAAgB,UAAU,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAIlF;AAED,wBAAgB,UAAU,CACxB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAClC,GAAG,EAAE,MAAM,GACV,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAMzB;AAED,2FAA2F;AAC3F,wBAAgB,QAAQ,CAAC,CAAC,SAAS,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,CAAC,EAAE,GAAG,CAAC,CAInF;AAED,yEAAyE;AACzE,wBAAgB,OAAO,IAAI,OAAO,CAAC,KAAK,CAAC,CAExC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Decorator } from '@storybook/react';
|
|
2
|
+
import { TcpMockResolvers } from './graphqlMock';
|
|
3
|
+
|
|
4
|
+
/** Story parameters understood by {@link withTcpProviders}. */
|
|
5
|
+
export interface TcpStoryParameters {
|
|
6
|
+
/**
|
|
7
|
+
* Factory for the story's GraphQL resolvers. A factory (rather than a plain
|
|
8
|
+
* object) lets stateful resolvers start from a clean slate on every render.
|
|
9
|
+
*/
|
|
10
|
+
tcpGraphql?: () => TcpMockResolvers;
|
|
11
|
+
}
|
|
12
|
+
export declare const withTcpProviders: Decorator;
|
|
13
|
+
//# sourceMappingURL=withTcpProviders.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"withTcpProviders.d.ts","sourceRoot":"","sources":["../../../src/stories/support/withTcpProviders.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAGlD,OAAO,EAAmB,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAGvE,+DAA+D;AAC/D,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,gBAAgB,CAAC;CACrC;AAgCD,eAAO,MAAM,gBAAgB,EAAE,SAQ9B,CAAC"}
|
|
@@ -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;
|
|
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;AAmGnE,eAAO,MAAM,oBAAoB,EAAE,EA6DlC,CAAC"}
|
|
@@ -37,17 +37,17 @@ function h(e, t) {
|
|
|
37
37
|
children: e
|
|
38
38
|
});
|
|
39
39
|
}
|
|
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 }))),
|
|
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/StoryCitationsPage.js").then((e) => ({ default: e.StoryCitationsPage }))), y = i(() => import("./pages/stories/SavedStoriesPage.js").then((e) => ({ default: e.SavedStoriesPage }))), b = i(() => import("./pages/topics/TopicsPage.js").then((e) => ({ default: e.TopicsPage }))), x = i(() => import("./pages/topics/TopicDetailPage.js").then((e) => ({ default: e.TopicDetailPage }))), S = i(() => import("./pages/discussions/DiscussionsPage.js").then((e) => ({ default: e.DiscussionsPage }))), C = i(() => import("./pages/discussions/DiscussionDetailPage.js").then((e) => ({ default: e.DiscussionDetailPage }))), w = i(() => import("./pages/timeline/TimelinePage.js").then((e) => ({ default: e.TimelinePage }))), T = i(() => import("./pages/governance/GovernancePage.js").then((e) => ({ default: e.GovernancePage }))), E = i(() => import("./pages/archive/ArchivePage.js").then((e) => ({ default: e.ArchivePage }))), D = i(() => import("./pages/archive/CollectionDetailPage.js").then((e) => ({ default: e.CollectionDetailPage }))), O = i(() => import("./pages/archive/ArchiveItemDetailPage.js").then((e) => ({ default: e.ArchiveItemDetailPage }))), k = () => /* @__PURE__ */ u("div", {
|
|
41
41
|
className: "flex min-h-[400px] items-center justify-center",
|
|
42
42
|
children: /* @__PURE__ */ u(f, { size: "lg" })
|
|
43
|
-
}),
|
|
43
|
+
}), A = () => {
|
|
44
44
|
let { basePath: i, isStandalone: a } = e(), f = l();
|
|
45
45
|
t();
|
|
46
46
|
let m = i === "/" ? "" : (i ?? "").replace(/\/$/, "");
|
|
47
47
|
return m && !a && !(f.pathname === m || f.pathname.startsWith(m + "/")) ? null : /* @__PURE__ */ u("div", {
|
|
48
48
|
className: "flex min-h-full flex-col",
|
|
49
49
|
children: /* @__PURE__ */ u(r, {
|
|
50
|
-
fallback: /* @__PURE__ */ u(
|
|
50
|
+
fallback: /* @__PURE__ */ u(k, {}),
|
|
51
51
|
children: /* @__PURE__ */ d(c, { children: [
|
|
52
52
|
/* @__PURE__ */ u(s, {
|
|
53
53
|
index: !0,
|
|
@@ -55,7 +55,7 @@ var g = i(() => import("./pages/stories/StoriesPage.js").then((e) => ({ default:
|
|
|
55
55
|
}),
|
|
56
56
|
/* @__PURE__ */ u(s, {
|
|
57
57
|
path: "overview",
|
|
58
|
-
element: h(/* @__PURE__ */ u(
|
|
58
|
+
element: h(/* @__PURE__ */ u(T, {}), p.overview)
|
|
59
59
|
}),
|
|
60
60
|
/* @__PURE__ */ u(s, {
|
|
61
61
|
path: "stories",
|
|
@@ -65,41 +65,45 @@ var g = i(() => import("./pages/stories/StoriesPage.js").then((e) => ({ default:
|
|
|
65
65
|
path: "stories/:id",
|
|
66
66
|
element: h(/* @__PURE__ */ u(_, {}), p.stories)
|
|
67
67
|
}),
|
|
68
|
+
/* @__PURE__ */ u(s, {
|
|
69
|
+
path: "stories/:id/citations",
|
|
70
|
+
element: h(/* @__PURE__ */ u(v, {}), p.stories)
|
|
71
|
+
}),
|
|
68
72
|
/* @__PURE__ */ u(s, {
|
|
69
73
|
path: "saved",
|
|
70
|
-
element: h(/* @__PURE__ */ u(
|
|
74
|
+
element: h(/* @__PURE__ */ u(y, {}), p.saved)
|
|
71
75
|
}),
|
|
72
76
|
/* @__PURE__ */ u(s, {
|
|
73
77
|
path: "topics",
|
|
74
|
-
element: h(/* @__PURE__ */ u(
|
|
78
|
+
element: h(/* @__PURE__ */ u(b, {}), p.topics)
|
|
75
79
|
}),
|
|
76
80
|
/* @__PURE__ */ u(s, {
|
|
77
81
|
path: "topics/:id",
|
|
78
|
-
element: h(/* @__PURE__ */ u(
|
|
82
|
+
element: h(/* @__PURE__ */ u(x, {}), p.topics)
|
|
79
83
|
}),
|
|
80
84
|
/* @__PURE__ */ u(s, {
|
|
81
85
|
path: "timeline",
|
|
82
|
-
element: h(/* @__PURE__ */ u(
|
|
86
|
+
element: h(/* @__PURE__ */ u(w, {}), p.timeline)
|
|
83
87
|
}),
|
|
84
88
|
/* @__PURE__ */ u(s, {
|
|
85
89
|
path: "discussions",
|
|
86
|
-
element: h(/* @__PURE__ */ u(
|
|
90
|
+
element: h(/* @__PURE__ */ u(S, {}), p.discussions)
|
|
87
91
|
}),
|
|
88
92
|
/* @__PURE__ */ u(s, {
|
|
89
93
|
path: "discussions/:id",
|
|
90
|
-
element: h(/* @__PURE__ */ u(
|
|
94
|
+
element: h(/* @__PURE__ */ u(C, {}), p.discussions)
|
|
91
95
|
}),
|
|
92
96
|
/* @__PURE__ */ u(s, {
|
|
93
97
|
path: "archive",
|
|
94
|
-
element: h(/* @__PURE__ */ u(
|
|
98
|
+
element: h(/* @__PURE__ */ u(E, {}), p.archive)
|
|
95
99
|
}),
|
|
96
100
|
/* @__PURE__ */ u(s, {
|
|
97
101
|
path: "archive/collections/:id",
|
|
98
|
-
element: h(/* @__PURE__ */ u(
|
|
102
|
+
element: h(/* @__PURE__ */ u(D, {}), p.archive)
|
|
99
103
|
}),
|
|
100
104
|
/* @__PURE__ */ u(s, {
|
|
101
105
|
path: "archive/items/:id",
|
|
102
|
-
element: h(/* @__PURE__ */ u(
|
|
106
|
+
element: h(/* @__PURE__ */ u(O, {}), p.archive)
|
|
103
107
|
}),
|
|
104
108
|
/* @__PURE__ */ u(s, {
|
|
105
109
|
path: "*",
|
|
@@ -113,6 +117,6 @@ var g = i(() => import("./pages/stories/StoriesPage.js").then((e) => ({ default:
|
|
|
113
117
|
});
|
|
114
118
|
};
|
|
115
119
|
//#endregion
|
|
116
|
-
export {
|
|
120
|
+
export { A as TheCulturePostRoutes };
|
|
117
121
|
|
|
118
122
|
//# 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';\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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;CAElB,IAAM,IAAqB,MAAa,MAAM,MAAM,KAAY,IAAI,QAAQ,OAAO,GAAG;AAYtF,QATI,KAAsB,CAAC,KAIrB,EAFF,EAAS,aAAa,KACtB,EAAS,SAAS,WAAW,IAAqB,IAAI,IAE/C,OAKT,kBAAC,OAAD;EAAK,WAAU;YACb,kBAAC,GAAD;GAAU,UAAU,kBAAC,GAAD,EAAc,CAAA;aAChC,kBAAC,GAAD,EAAA,UAAA;IACE,kBAAC,GAAD;KAAO,OAAA;KAAM,SAAS,EAAM,kBAAC,GAAD,EAAY,CAAA,EAAE,EAAQ,KAAK;KAAI,CAAA;IAE3D,kBAAC,GAAD;KAAO,MAAK;KAAW,SAAS,EAAM,kBAAC,GAAD,EAAkB,CAAA,EAAE,EAAQ,SAAS;KAAI,CAAA;IAE/E,kBAAC,GAAD;KAAO,MAAK;KAAU,SAAS,EAAM,kBAAC,GAAD,EAAe,CAAA,EAAE,EAAQ,QAAQ;KAAI,CAAA;IAC1E,kBAAC,GAAD;KAAO,MAAK;KAAc,SAAS,EAAM,kBAAC,GAAD,EAAmB,CAAA,EAAE,EAAQ,QAAQ;KAAI,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';\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,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,IAAqB,QACzB,OAAO,yCAAsC,MAAM,OAAO,EAAE,SAAS,EAAE,oBAAoB,EAAE,CAC9F,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,EA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D;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,11 +1,21 @@
|
|
|
1
|
-
import { TcpCitation } from '../types';
|
|
1
|
+
import { TcpCitation, TcpStoryClaim } from '../types';
|
|
2
2
|
|
|
3
3
|
interface AddCitationDialogProps {
|
|
4
4
|
open: boolean;
|
|
5
5
|
onOpenChange: (open: boolean) => void;
|
|
6
6
|
storyId: string;
|
|
7
7
|
onCreated?: (citation: TcpCitation) => void;
|
|
8
|
+
/**
|
|
9
|
+
* The story's evidence-trail claims. When supplied, the dialog offers a
|
|
10
|
+
* "Supports claim" picker so the new source is linked as it is created.
|
|
11
|
+
*/
|
|
12
|
+
claims?: TcpStoryClaim[];
|
|
13
|
+
/**
|
|
14
|
+
* Claim preselected in the picker (e.g. "Add citation" on a claim row).
|
|
15
|
+
* Read on mount only — callers re-key the dialog when it changes.
|
|
16
|
+
*/
|
|
17
|
+
defaultClaimId?: string | null;
|
|
8
18
|
}
|
|
9
|
-
export declare function AddCitationDialog({ open, onOpenChange, storyId, onCreated, }: AddCitationDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare function AddCitationDialog({ open, onOpenChange, storyId, onCreated, claims, defaultClaimId, }: AddCitationDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
10
20
|
export {};
|
|
11
21
|
//# sourceMappingURL=AddCitationDialog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddCitationDialog.d.ts","sourceRoot":"","sources":["../../../src/theculturepost/components/AddCitationDialog.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA0BH,OAAO,KAAK,EAAE,WAAW,EAAiB,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"AddCitationDialog.d.ts","sourceRoot":"","sources":["../../../src/theculturepost/components/AddCitationDialog.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA0BH,OAAO,KAAK,EAAE,WAAW,EAAiB,aAAa,EAAE,MAAM,UAAU,CAAC;AAyB1E,UAAU,sBAAsB;IAC9B,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,CAAC,QAAQ,EAAE,WAAW,KAAK,IAAI,CAAC;IAC5C;;;OAGG;IACH,MAAM,CAAC,EAAE,aAAa,EAAE,CAAC;IACzB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC;AAED,wBAAgB,iBAAiB,CAAC,EAChC,IAAI,EACJ,YAAY,EACZ,OAAO,EACP,SAAS,EACT,MAAM,EACN,cAAqB,GACtB,EAAE,sBAAsB,2CAyNxB"}
|