@burdenoff/microfe-theculturepost 2026.705.2 → 2026.709.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dev/main.d.ts +2 -0
- package/dist/dev/main.d.ts.map +1 -0
- package/dist/generated/global-operations.d.ts +2 -0
- package/dist/generated/global-operations.d.ts.map +1 -0
- package/dist/generated/global-types.d.ts +18199 -0
- package/dist/generated/global-types.d.ts.map +1 -0
- package/dist/generated/wspace-operations.d.ts +2 -0
- package/dist/generated/wspace-operations.d.ts.map +1 -0
- package/dist/generated/wspace-types.d.ts +43046 -0
- package/dist/generated/wspace-types.d.ts.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -1
- package/dist/services/assistantApi.d.ts +15 -0
- package/dist/services/assistantApi.d.ts.map +1 -0
- package/dist/services/assistantApi.js +204 -0
- package/dist/services/assistantApi.js.map +1 -0
- package/dist/services/createSandboxAssistantTransport.d.ts +26 -0
- package/dist/services/createSandboxAssistantTransport.d.ts.map +1 -0
- package/dist/services/createSandboxAssistantTransport.js +126 -0
- package/dist/services/createSandboxAssistantTransport.js.map +1 -0
- package/dist/theculturepost/TheCulturePostRoot.d.ts +5 -0
- package/dist/theculturepost/TheCulturePostRoot.d.ts.map +1 -0
- package/dist/theculturepost/TheCulturePostRoutes.d.ts +4 -0
- package/dist/theculturepost/TheCulturePostRoutes.d.ts.map +1 -0
- package/dist/theculturepost/TheCulturePostRoutes.js +73 -40
- package/dist/theculturepost/TheCulturePostRoutes.js.map +1 -1
- package/dist/theculturepost/components/AddCitationDialog.d.ts +11 -0
- package/dist/theculturepost/components/AddCitationDialog.d.ts.map +1 -0
- package/dist/theculturepost/components/ArchiveItemCard.d.ts +9 -0
- package/dist/theculturepost/components/ArchiveItemCard.d.ts.map +1 -0
- package/dist/theculturepost/components/AudioPlayer.d.ts +22 -0
- package/dist/theculturepost/components/AudioPlayer.d.ts.map +1 -0
- package/dist/theculturepost/components/AuthorLabel.d.ts +16 -0
- package/dist/theculturepost/components/AuthorLabel.d.ts.map +1 -0
- package/dist/theculturepost/components/AuthorLabel.js +1 -1
- package/dist/theculturepost/components/CitationList.d.ts +27 -0
- package/dist/theculturepost/components/CitationList.d.ts.map +1 -0
- package/dist/theculturepost/components/CollectionCard.d.ts +9 -0
- package/dist/theculturepost/components/CollectionCard.d.ts.map +1 -0
- package/dist/theculturepost/components/CoverImage.d.ts +13 -0
- package/dist/theculturepost/components/CoverImage.d.ts.map +1 -0
- package/dist/theculturepost/components/CreateArchiveItemDialog.d.ts +12 -0
- package/dist/theculturepost/components/CreateArchiveItemDialog.d.ts.map +1 -0
- package/dist/theculturepost/components/CreateCollectionDialog.d.ts +10 -0
- package/dist/theculturepost/components/CreateCollectionDialog.d.ts.map +1 -0
- package/dist/theculturepost/components/CreateStoryDialog.d.ts +12 -0
- package/dist/theculturepost/components/CreateStoryDialog.d.ts.map +1 -0
- package/dist/theculturepost/components/CreateTopicDialog.d.ts +10 -0
- package/dist/theculturepost/components/CreateTopicDialog.d.ts.map +1 -0
- package/dist/theculturepost/components/DecorativeCover.d.ts +17 -0
- package/dist/theculturepost/components/DecorativeCover.d.ts.map +1 -0
- package/dist/theculturepost/components/DecorativeDivider.d.ts +14 -0
- package/dist/theculturepost/components/DecorativeDivider.d.ts.map +1 -0
- package/dist/theculturepost/components/DiscussionCard.d.ts +9 -0
- package/dist/theculturepost/components/DiscussionCard.d.ts.map +1 -0
- package/dist/theculturepost/components/EmptyState.d.ts +18 -0
- package/dist/theculturepost/components/EmptyState.d.ts.map +1 -0
- package/dist/theculturepost/components/FileImage.d.ts +18 -0
- package/dist/theculturepost/components/FileImage.d.ts.map +1 -0
- package/dist/theculturepost/components/FileUploadField.d.ts +29 -0
- package/dist/theculturepost/components/FileUploadField.d.ts.map +1 -0
- package/dist/theculturepost/components/FilterTabs.d.ts +18 -0
- package/dist/theculturepost/components/FilterTabs.d.ts.map +1 -0
- package/dist/theculturepost/components/HistoryTimeline.d.ts +20 -0
- package/dist/theculturepost/components/HistoryTimeline.d.ts.map +1 -0
- package/dist/theculturepost/components/LifecycleStepper.d.ts +11 -0
- package/dist/theculturepost/components/LifecycleStepper.d.ts.map +1 -0
- package/dist/theculturepost/components/OpenDiscussionDialog.d.ts +12 -0
- package/dist/theculturepost/components/OpenDiscussionDialog.d.ts.map +1 -0
- package/dist/theculturepost/components/OralHistoryCard.d.ts +8 -0
- package/dist/theculturepost/components/OralHistoryCard.d.ts.map +1 -0
- package/dist/theculturepost/components/OverlayBadge.d.ts +15 -0
- package/dist/theculturepost/components/OverlayBadge.d.ts.map +1 -0
- package/dist/theculturepost/components/PageHero.d.ts +26 -0
- package/dist/theculturepost/components/PageHero.d.ts.map +1 -0
- package/dist/theculturepost/components/PageLayout.d.ts +16 -0
- package/dist/theculturepost/components/PageLayout.d.ts.map +1 -0
- package/dist/theculturepost/components/Pagination.d.ts +22 -0
- package/dist/theculturepost/components/Pagination.d.ts.map +1 -0
- package/dist/theculturepost/components/RecordOralHistoryDialog.d.ts +47 -0
- package/dist/theculturepost/components/RecordOralHistoryDialog.d.ts.map +1 -0
- package/dist/theculturepost/components/ReplyThread.d.ts +20 -0
- package/dist/theculturepost/components/ReplyThread.d.ts.map +1 -0
- package/dist/theculturepost/components/ReplyThread.js +1 -1
- package/dist/theculturepost/components/StateViews.d.ts +24 -0
- package/dist/theculturepost/components/StateViews.d.ts.map +1 -0
- package/dist/theculturepost/components/StatusBadge.d.ts +11 -0
- package/dist/theculturepost/components/StatusBadge.d.ts.map +1 -0
- package/dist/theculturepost/components/StoryCard.d.ts +11 -0
- package/dist/theculturepost/components/StoryCard.d.ts.map +1 -0
- package/dist/theculturepost/components/Tabs.d.ts +17 -0
- package/dist/theculturepost/components/Tabs.d.ts.map +1 -0
- package/dist/theculturepost/components/TagInput.d.ts +20 -0
- package/dist/theculturepost/components/TagInput.d.ts.map +1 -0
- package/dist/theculturepost/components/TopicCard.d.ts +9 -0
- package/dist/theculturepost/components/TopicCard.d.ts.map +1 -0
- package/dist/theculturepost/components/Waveform.d.ts +23 -0
- package/dist/theculturepost/components/Waveform.d.ts.map +1 -0
- package/dist/theculturepost/components/categoryMeta.d.ts +14 -0
- package/dist/theculturepost/components/categoryMeta.d.ts.map +1 -0
- package/dist/theculturepost/components/index.d.ts +43 -0
- package/dist/theculturepost/components/index.d.ts.map +1 -0
- package/dist/theculturepost/components/kindIcon.d.ts +7 -0
- package/dist/theculturepost/components/kindIcon.d.ts.map +1 -0
- package/dist/theculturepost/components/viz/BarChart.d.ts +23 -0
- package/dist/theculturepost/components/viz/BarChart.d.ts.map +1 -0
- package/dist/theculturepost/components/viz/Donut.d.ts +25 -0
- package/dist/theculturepost/components/viz/Donut.d.ts.map +1 -0
- package/dist/theculturepost/components/viz/StatTile.d.ts +14 -0
- package/dist/theculturepost/components/viz/StatTile.d.ts.map +1 -0
- package/dist/theculturepost/components/viz/index.d.ts +11 -0
- package/dist/theculturepost/components/viz/index.d.ts.map +1 -0
- package/dist/theculturepost/context/TheCulturePostContext.d.ts +16 -0
- package/dist/theculturepost/context/TheCulturePostContext.d.ts.map +1 -0
- package/dist/theculturepost/context/index.d.ts +6 -0
- package/dist/theculturepost/context/index.d.ts.map +1 -0
- package/dist/theculturepost/hooks/index.d.ts +10 -0
- package/dist/theculturepost/hooks/index.d.ts.map +1 -0
- package/dist/theculturepost/hooks/index.js +2 -0
- package/dist/theculturepost/hooks/useCursorPager.d.ts +32 -0
- package/dist/theculturepost/hooks/useCursorPager.d.ts.map +1 -0
- package/dist/theculturepost/hooks/useFiles.d.ts +31 -0
- package/dist/theculturepost/hooks/useFiles.d.ts.map +1 -0
- package/dist/theculturepost/hooks/usePageAnalytics.d.ts +9 -0
- package/dist/theculturepost/hooks/usePageAnalytics.d.ts.map +1 -0
- package/dist/theculturepost/hooks/usePageAnalytics.js +34 -0
- package/dist/theculturepost/hooks/usePageAnalytics.js.map +1 -0
- package/dist/theculturepost/hooks/useTcpApi.d.ts +74 -0
- package/dist/theculturepost/hooks/useTcpApi.d.ts.map +1 -0
- package/dist/theculturepost/hooks/useTr.d.ts +8 -0
- package/dist/theculturepost/hooks/useTr.d.ts.map +1 -0
- package/dist/theculturepost/hooks/useTr.js +14 -0
- package/dist/theculturepost/hooks/useTr.js.map +1 -0
- package/dist/theculturepost/index.d.ts +9 -0
- package/dist/theculturepost/index.d.ts.map +1 -0
- package/dist/theculturepost/index.js +2 -1
- package/dist/theculturepost/lib/graphql-cache.d.ts +26 -0
- package/dist/theculturepost/lib/graphql-cache.d.ts.map +1 -0
- package/dist/theculturepost/lib/toast.d.ts +23 -0
- package/dist/theculturepost/lib/toast.d.ts.map +1 -0
- package/dist/theculturepost/pages/HomePage.d.ts +16 -0
- package/dist/theculturepost/pages/HomePage.d.ts.map +1 -0
- package/dist/theculturepost/pages/HomePage.js +83 -68
- package/dist/theculturepost/pages/HomePage.js.map +1 -1
- package/dist/theculturepost/pages/archive/ArchiveItemDetailPage.d.ts +12 -0
- package/dist/theculturepost/pages/archive/ArchiveItemDetailPage.d.ts.map +1 -0
- package/dist/theculturepost/pages/archive/ArchiveItemDetailPage.js +21 -21
- package/dist/theculturepost/pages/archive/ArchivePage.d.ts +7 -0
- package/dist/theculturepost/pages/archive/ArchivePage.d.ts.map +1 -0
- package/dist/theculturepost/pages/archive/ArchivePage.js +144 -125
- package/dist/theculturepost/pages/archive/ArchivePage.js.map +1 -1
- package/dist/theculturepost/pages/archive/CollectionDetailPage.d.ts +12 -0
- package/dist/theculturepost/pages/archive/CollectionDetailPage.d.ts.map +1 -0
- package/dist/theculturepost/pages/discussions/DiscussionDetailPage.d.ts +12 -0
- package/dist/theculturepost/pages/discussions/DiscussionDetailPage.d.ts.map +1 -0
- package/dist/theculturepost/pages/discussions/DiscussionDetailPage.js +78 -70
- package/dist/theculturepost/pages/discussions/DiscussionDetailPage.js.map +1 -1
- package/dist/theculturepost/pages/discussions/DiscussionsPage.d.ts +10 -0
- package/dist/theculturepost/pages/discussions/DiscussionsPage.d.ts.map +1 -0
- package/dist/theculturepost/pages/discussions/DiscussionsPage.js +63 -56
- package/dist/theculturepost/pages/discussions/DiscussionsPage.js.map +1 -1
- package/dist/theculturepost/pages/governance/GovernancePage.d.ts +20 -0
- package/dist/theculturepost/pages/governance/GovernancePage.d.ts.map +1 -0
- package/dist/theculturepost/pages/stories/StoriesPage.d.ts +9 -0
- package/dist/theculturepost/pages/stories/StoriesPage.d.ts.map +1 -0
- package/dist/theculturepost/pages/stories/StoriesPage.js +65 -58
- package/dist/theculturepost/pages/stories/StoriesPage.js.map +1 -1
- package/dist/theculturepost/pages/stories/StoryDetailPage.d.ts +18 -0
- package/dist/theculturepost/pages/stories/StoryDetailPage.d.ts.map +1 -0
- package/dist/theculturepost/pages/stories/StoryDetailPage.js +249 -229
- package/dist/theculturepost/pages/stories/StoryDetailPage.js.map +1 -1
- package/dist/theculturepost/pages/timeline/TimelinePage.d.ts +17 -0
- package/dist/theculturepost/pages/timeline/TimelinePage.d.ts.map +1 -0
- package/dist/theculturepost/pages/topics/TopicDetailPage.d.ts +12 -0
- package/dist/theculturepost/pages/topics/TopicDetailPage.d.ts.map +1 -0
- package/dist/theculturepost/pages/topics/TopicsPage.d.ts +12 -0
- package/dist/theculturepost/pages/topics/TopicsPage.d.ts.map +1 -0
- package/dist/theculturepost/pages/topics/TopicsPage.js +61 -52
- package/dist/theculturepost/pages/topics/TopicsPage.js.map +1 -1
- package/dist/theculturepost/styles/injectDisplayFont.d.ts +14 -0
- package/dist/theculturepost/styles/injectDisplayFont.d.ts.map +1 -0
- package/dist/theculturepost/translations/ar.d.ts +50 -0
- package/dist/theculturepost/translations/ar.d.ts.map +1 -0
- package/dist/theculturepost/translations/ar.js +54 -0
- package/dist/theculturepost/translations/ar.js.map +1 -0
- package/dist/theculturepost/translations/en.d.ts +50 -0
- package/dist/theculturepost/translations/en.d.ts.map +1 -0
- package/dist/theculturepost/translations/en.js +54 -0
- package/dist/theculturepost/translations/en.js.map +1 -0
- package/dist/theculturepost/translations/es.d.ts +50 -0
- package/dist/theculturepost/translations/es.d.ts.map +1 -0
- package/dist/theculturepost/translations/es.js +54 -0
- package/dist/theculturepost/translations/es.js.map +1 -0
- package/dist/theculturepost/translations/hi.d.ts +50 -0
- package/dist/theculturepost/translations/hi.d.ts.map +1 -0
- package/dist/theculturepost/translations/hi.js +54 -0
- package/dist/theculturepost/translations/hi.js.map +1 -0
- package/dist/theculturepost/translations/index.d.ts +7 -0
- package/dist/theculturepost/translations/index.d.ts.map +1 -0
- package/dist/theculturepost/translations/ta.d.ts +50 -0
- package/dist/theculturepost/translations/ta.d.ts.map +1 -0
- package/dist/theculturepost/translations/ta.js +54 -0
- package/dist/theculturepost/translations/ta.js.map +1 -0
- package/dist/theculturepost/translations/zh.d.ts +50 -0
- package/dist/theculturepost/translations/zh.d.ts.map +1 -0
- package/dist/theculturepost/translations/zh.js +54 -0
- package/dist/theculturepost/translations/zh.js.map +1 -0
- package/dist/theculturepost/types/index.d.ts +333 -0
- package/dist/theculturepost/types/index.d.ts.map +1 -0
- package/dist/theculturepost/utils/cn.d.ts +4 -0
- package/dist/theculturepost/utils/cn.d.ts.map +1 -0
- package/dist/theculturepost/utils/formatters.d.ts +19 -0
- package/dist/theculturepost/utils/formatters.d.ts.map +1 -0
- package/dist/theculturepost/utils/i18n.d.ts +6 -0
- package/dist/theculturepost/utils/i18n.d.ts.map +1 -0
- package/dist/theculturepost/utils/index.d.ts +11 -0
- package/dist/theculturepost/utils/index.d.ts.map +1 -0
- package/dist/theculturepost/utils/index.js +6 -0
- package/dist/theculturepost/utils/nativeBridge.d.ts +47 -0
- package/dist/theculturepost/utils/nativeBridge.d.ts.map +1 -0
- package/dist/theculturepost/utils/nativeBridge.js +60 -0
- package/dist/theculturepost/utils/nativeBridge.js.map +1 -0
- package/dist/theculturepost/utils/navigation.d.ts +14 -0
- package/dist/theculturepost/utils/navigation.d.ts.map +1 -0
- package/dist/theculturepost/utils/slug.d.ts +6 -0
- package/dist/theculturepost/utils/slug.d.ts.map +1 -0
- package/dist/types/assistant.d.ts +56 -0
- package/dist/types/assistant.d.ts.map +1 -0
- package/dist/utils/pageContext.d.ts +27 -0
- package/dist/utils/pageContext.d.ts.map +1 -0
- package/dist/utils/pageContext.js +47 -0
- package/dist/utils/pageContext.js.map +1 -0
- package/package.json +29 -1
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Page context gathering for TheCulturePost AI assistant.
|
|
3
|
+
*
|
|
4
|
+
* Captures the user's current browser context to be sent alongside every
|
|
5
|
+
* assistant prompt for better AI awareness of the current screen.
|
|
6
|
+
*/
|
|
7
|
+
interface ConversationContextShape {
|
|
8
|
+
entityType?: string;
|
|
9
|
+
entityId?: string;
|
|
10
|
+
activeTab?: string;
|
|
11
|
+
metadata?: Record<string, unknown>;
|
|
12
|
+
}
|
|
13
|
+
export interface PageContext {
|
|
14
|
+
currentUrl: string;
|
|
15
|
+
currentPage: string;
|
|
16
|
+
entityType?: string;
|
|
17
|
+
entityId?: string;
|
|
18
|
+
platform: string;
|
|
19
|
+
version: string;
|
|
20
|
+
viewportSize: string;
|
|
21
|
+
userAgent: string;
|
|
22
|
+
timestamp: string;
|
|
23
|
+
}
|
|
24
|
+
export declare function resolveTheCulturePostConversationContext(pathname: string, search: string): ConversationContextShape;
|
|
25
|
+
export declare function gatherPageContext(): PageContext;
|
|
26
|
+
export {};
|
|
27
|
+
//# sourceMappingURL=pageContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pageContext.d.ts","sourceRoot":"","sources":["../../src/utils/pageContext.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,UAAU,wBAAwB;IAChC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC;AAED,MAAM,WAAW,WAAW;IAG1B,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAMD,wBAAgB,wCAAwC,CACtD,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,GACb,wBAAwB,CA6B1B;AAED,wBAAgB,iBAAiB,IAAI,WAAW,CAoB/C"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
//#region src/utils/pageContext.ts
|
|
2
|
+
function e(e, t) {
|
|
3
|
+
return t.match(e);
|
|
4
|
+
}
|
|
5
|
+
function t(t, n) {
|
|
6
|
+
let r = new URLSearchParams(n);
|
|
7
|
+
for (let [n, r] of [
|
|
8
|
+
[/^\/?theculturepost\/stories\/([^/]+)$/, "THECULTUREPOST_STORY"],
|
|
9
|
+
[/^\/?theculturepost\/topics\/([^/]+)$/, "THECULTUREPOST_TOPIC"],
|
|
10
|
+
[/^\/?theculturepost\/discussions\/([^/]+)$/, "THECULTUREPOST_DISCUSSION"],
|
|
11
|
+
[/^\/?theculturepost\/archive\/collections\/([^/]+)$/, "THECULTUREPOST_COLLECTION"],
|
|
12
|
+
[/^\/?theculturepost\/archive\/items\/([^/]+)$/, "THECULTUREPOST_ARCHIVE_ITEM"]
|
|
13
|
+
]) {
|
|
14
|
+
let i = e(n, t);
|
|
15
|
+
if (i) return {
|
|
16
|
+
entityType: r,
|
|
17
|
+
entityId: i[1],
|
|
18
|
+
metadata: { routePattern: n.source }
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
let i = r.get("tab") ?? (() => {
|
|
22
|
+
let e = t.split("/").filter(Boolean);
|
|
23
|
+
return e.length > 2 ? e[e.length - 1] : void 0;
|
|
24
|
+
})();
|
|
25
|
+
return {
|
|
26
|
+
activeTab: i ?? void 0,
|
|
27
|
+
metadata: i ? { activeTab: i } : {}
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
function n() {
|
|
31
|
+
let e = window.location.href, n = window.location.pathname.split("/").filter(Boolean).slice(0, 3).join("/") || "home", r = t(window.location.pathname, window.location.search);
|
|
32
|
+
return {
|
|
33
|
+
currentUrl: e,
|
|
34
|
+
currentPage: n,
|
|
35
|
+
entityType: r.entityType,
|
|
36
|
+
entityId: r.entityId,
|
|
37
|
+
platform: "theculturepost",
|
|
38
|
+
version: "2026.402.1",
|
|
39
|
+
viewportSize: `${window.innerWidth}x${window.innerHeight}`,
|
|
40
|
+
userAgent: navigator.userAgent,
|
|
41
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
//#endregion
|
|
45
|
+
export { n as gatherPageContext };
|
|
46
|
+
|
|
47
|
+
//# sourceMappingURL=pageContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pageContext.js","names":[],"sources":["../../src/utils/pageContext.ts"],"sourcesContent":["/**\n * Page context gathering for TheCulturePost AI assistant.\n *\n * Captures the user's current browser context to be sent alongside every\n * assistant prompt for better AI awareness of the current screen.\n */\n\ninterface ConversationContextShape {\n entityType?: string;\n entityId?: string;\n activeTab?: string;\n metadata?: Record<string, unknown>;\n}\n\nexport interface PageContext {\n // `currentUrl` (NOT `activeUrl`) — must match the agent's allowed-context-key\n // contract, otherwise the agent filters it out.\n currentUrl: string;\n currentPage: string;\n entityType?: string;\n entityId?: string;\n platform: string;\n version: string;\n viewportSize: string;\n userAgent: string;\n timestamp: string;\n}\n\nfunction matchPath(pattern: RegExp, pathname: string): RegExpMatchArray | null {\n return pathname.match(pattern);\n}\n\nexport function resolveTheCulturePostConversationContext(\n pathname: string,\n search: string\n): ConversationContextShape {\n const params = new URLSearchParams(search);\n\n const directMatches: Array<[RegExp, string]> = [\n [/^\\/?theculturepost\\/stories\\/([^/]+)$/, 'THECULTUREPOST_STORY'],\n [/^\\/?theculturepost\\/topics\\/([^/]+)$/, 'THECULTUREPOST_TOPIC'],\n [/^\\/?theculturepost\\/discussions\\/([^/]+)$/, 'THECULTUREPOST_DISCUSSION'],\n [/^\\/?theculturepost\\/archive\\/collections\\/([^/]+)$/, 'THECULTUREPOST_COLLECTION'],\n [/^\\/?theculturepost\\/archive\\/items\\/([^/]+)$/, 'THECULTUREPOST_ARCHIVE_ITEM'],\n ];\n\n for (const [pattern, entityType] of directMatches) {\n const match = matchPath(pattern, pathname);\n if (match) {\n return { entityType, entityId: match[1], metadata: { routePattern: pattern.source } };\n }\n }\n\n const activeTab =\n params.get('tab') ??\n (() => {\n const segments = pathname.split('/').filter(Boolean);\n return segments.length > 2 ? segments[segments.length - 1] : undefined;\n })();\n\n return {\n activeTab: activeTab ?? undefined,\n metadata: activeTab ? { activeTab } : {},\n };\n}\n\nexport function gatherPageContext(): PageContext {\n const url = window.location.href;\n const pathSegments = window.location.pathname.split('/').filter(Boolean);\n const currentPage = pathSegments.slice(0, 3).join('/') || 'home';\n const entity = resolveTheCulturePostConversationContext(\n window.location.pathname,\n window.location.search\n );\n\n return {\n currentUrl: url,\n currentPage,\n entityType: entity.entityType,\n entityId: entity.entityId,\n platform: 'theculturepost',\n version: import.meta.env.VITE_APP_VERSION ?? '2026.402.1',\n viewportSize: `${window.innerWidth}x${window.innerHeight}`,\n userAgent: navigator.userAgent,\n timestamp: new Date().toISOString(),\n };\n}\n"],"mappings":";AA4BA,SAAS,EAAU,GAAiB,GAA2C;AAC7E,QAAO,EAAS,MAAM,EAAQ;;AAGhC,SAAgB,EACd,GACA,GAC0B;CAC1B,IAAM,IAAS,IAAI,gBAAgB,EAAO;AAU1C,MAAK,IAAM,CAAC,GAAS,MAR0B;EAC7C,CAAC,yCAAyC,uBAAuB;EACjE,CAAC,wCAAwC,uBAAuB;EAChE,CAAC,6CAA6C,4BAA4B;EAC1E,CAAC,sDAAsD,4BAA4B;EACnF,CAAC,gDAAgD,8BAA8B;EAChF,EAEkD;EACjD,IAAM,IAAQ,EAAU,GAAS,EAAS;AAC1C,MAAI,EACF,QAAO;GAAE;GAAY,UAAU,EAAM;GAAI,UAAU,EAAE,cAAc,EAAQ,QAAQ;GAAE;;CAIzF,IAAM,IACJ,EAAO,IAAI,MAAM,WACV;EACL,IAAM,IAAW,EAAS,MAAM,IAAI,CAAC,OAAO,QAAQ;AACpD,SAAO,EAAS,SAAS,IAAI,EAAS,EAAS,SAAS,KAAK,KAAA;KAC3D;AAEN,QAAO;EACL,WAAW,KAAa,KAAA;EACxB,UAAU,IAAY,EAAE,cAAW,GAAG,EAAE;EACzC;;AAGH,SAAgB,IAAiC;CAC/C,IAAM,IAAM,OAAO,SAAS,MAEtB,IADe,OAAO,SAAS,SAAS,MAAM,IAAI,CAAC,OAAO,QAAQ,CACvC,MAAM,GAAG,EAAE,CAAC,KAAK,IAAI,IAAI,QACpD,IAAS,EACb,OAAO,SAAS,UAChB,OAAO,SAAS,OACjB;AAED,QAAO;EACL,YAAY;EACZ;EACA,YAAY,EAAO;EACnB,UAAU,EAAO;EACjB,UAAU;EACV,SAA6C;EAC7C,cAAc,GAAG,OAAO,WAAW,GAAG,OAAO;EAC7C,WAAW,UAAU;EACrB,4BAAW,IAAI,MAAM,EAAC,aAAa;EACpC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@burdenoff/microfe-theculturepost",
|
|
3
|
-
"version": "2026.
|
|
3
|
+
"version": "2026.709.2",
|
|
4
4
|
"description": "Burdenoff TheCulturePost Microfrontend",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -16,6 +16,34 @@
|
|
|
16
16
|
".": {
|
|
17
17
|
"types": "./dist/index.d.ts",
|
|
18
18
|
"import": "./dist/index.js"
|
|
19
|
+
},
|
|
20
|
+
"./services/createSandboxAssistantTransport": {
|
|
21
|
+
"types": "./dist/services/createSandboxAssistantTransport.d.ts",
|
|
22
|
+
"import": "./dist/services/createSandboxAssistantTransport.js"
|
|
23
|
+
},
|
|
24
|
+
"./translations/en": {
|
|
25
|
+
"types": "./dist/theculturepost/translations/en.d.ts",
|
|
26
|
+
"import": "./dist/theculturepost/translations/en.js"
|
|
27
|
+
},
|
|
28
|
+
"./translations/hi": {
|
|
29
|
+
"types": "./dist/theculturepost/translations/hi.d.ts",
|
|
30
|
+
"import": "./dist/theculturepost/translations/hi.js"
|
|
31
|
+
},
|
|
32
|
+
"./translations/ta": {
|
|
33
|
+
"types": "./dist/theculturepost/translations/ta.d.ts",
|
|
34
|
+
"import": "./dist/theculturepost/translations/ta.js"
|
|
35
|
+
},
|
|
36
|
+
"./translations/zh": {
|
|
37
|
+
"types": "./dist/theculturepost/translations/zh.d.ts",
|
|
38
|
+
"import": "./dist/theculturepost/translations/zh.js"
|
|
39
|
+
},
|
|
40
|
+
"./translations/es": {
|
|
41
|
+
"types": "./dist/theculturepost/translations/es.d.ts",
|
|
42
|
+
"import": "./dist/theculturepost/translations/es.js"
|
|
43
|
+
},
|
|
44
|
+
"./translations/ar": {
|
|
45
|
+
"types": "./dist/theculturepost/translations/ar.d.ts",
|
|
46
|
+
"import": "./dist/theculturepost/translations/ar.js"
|
|
19
47
|
}
|
|
20
48
|
},
|
|
21
49
|
"main": "./dist/index.js",
|