@burdenoff/microfe-theculturepost 2026.705.2 → 2026.709.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/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 +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -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/en.d.ts +50 -0
- package/dist/theculturepost/translations/en.d.ts.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/hi.d.ts +50 -0
- package/dist/theculturepost/translations/hi.d.ts.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/zh.d.ts +50 -0
- package/dist/theculturepost/translations/zh.d.ts.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,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Capacitor-native bridge helpers for TheCulturePost microfrontend.
|
|
3
|
+
*
|
|
4
|
+
* The app shell installs `window.__burdenoffNativeBridge`; this module provides
|
|
5
|
+
* typed, promise-based helpers that fall back to web APIs when the bridge is
|
|
6
|
+
* unavailable or the app is running in a browser.
|
|
7
|
+
*/
|
|
8
|
+
export type HapticImpactStyle = 'light' | 'medium' | 'heavy';
|
|
9
|
+
export type HapticNotificationType = 'success' | 'warning' | 'error';
|
|
10
|
+
export type ToastDuration = 'short' | 'long';
|
|
11
|
+
interface ConfirmOptions {
|
|
12
|
+
title: string;
|
|
13
|
+
message: string;
|
|
14
|
+
okButtonTitle?: string;
|
|
15
|
+
cancelButtonTitle?: string;
|
|
16
|
+
}
|
|
17
|
+
interface ShareOptions {
|
|
18
|
+
title?: string;
|
|
19
|
+
text?: string;
|
|
20
|
+
url?: string;
|
|
21
|
+
}
|
|
22
|
+
interface BurdenoffNativeBridge {
|
|
23
|
+
getPlatform(): 'ios' | 'android' | 'web';
|
|
24
|
+
isNativePlatform(): boolean;
|
|
25
|
+
impact(style?: HapticImpactStyle): Promise<void>;
|
|
26
|
+
notify(type: HapticNotificationType): Promise<void>;
|
|
27
|
+
toast(message: string, duration?: ToastDuration): Promise<boolean>;
|
|
28
|
+
confirm(options: ConfirmOptions): Promise<boolean | null>;
|
|
29
|
+
copyText(text: string): Promise<boolean>;
|
|
30
|
+
share(options: ShareOptions): Promise<boolean>;
|
|
31
|
+
openExternalUrl(url: string): Promise<void>;
|
|
32
|
+
}
|
|
33
|
+
declare global {
|
|
34
|
+
interface Window {
|
|
35
|
+
__burdenoffNativeBridge?: BurdenoffNativeBridge;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
export declare function isNativePlatform(): boolean;
|
|
39
|
+
export declare function impact(style?: HapticImpactStyle): Promise<void>;
|
|
40
|
+
export declare function notify(type: HapticNotificationType): Promise<void>;
|
|
41
|
+
export declare function nativeToast(message: string, duration?: ToastDuration): Promise<void>;
|
|
42
|
+
export declare function nativeConfirm(options: ConfirmOptions): Promise<boolean>;
|
|
43
|
+
export declare function copyText(text: string): Promise<boolean>;
|
|
44
|
+
export declare function share(options: ShareOptions): Promise<boolean>;
|
|
45
|
+
export declare function openExternalUrl(url: string): Promise<void>;
|
|
46
|
+
export {};
|
|
47
|
+
//# sourceMappingURL=nativeBridge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nativeBridge.d.ts","sourceRoot":"","sources":["../../../src/theculturepost/utils/nativeBridge.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAC7D,MAAM,MAAM,sBAAsB,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;AACrE,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,MAAM,CAAC;AAE7C,UAAU,cAAc;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,UAAU,YAAY;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,UAAU,qBAAqB;IAC7B,WAAW,IAAI,KAAK,GAAG,SAAS,GAAG,KAAK,CAAC;IACzC,gBAAgB,IAAI,OAAO,CAAC;IAC5B,MAAM,CAAC,KAAK,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACjD,MAAM,CAAC,IAAI,EAAE,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACpD,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACnE,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC;IAC1D,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACzC,KAAK,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC/C,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC7C;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,uBAAuB,CAAC,EAAE,qBAAqB,CAAC;KACjD;CACF;AAOD,wBAAgB,gBAAgB,IAAI,OAAO,CAE1C;AAED,wBAAsB,MAAM,CAAC,KAAK,GAAE,iBAA2B,GAAG,OAAO,CAAC,IAAI,CAAC,CAM9E;AAED,wBAAsB,MAAM,CAAC,IAAI,EAAE,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC,CAMxE;AAED,wBAAsB,WAAW,CAC/B,OAAO,EAAE,MAAM,EACf,QAAQ,GAAE,aAAuB,GAChC,OAAO,CAAC,IAAI,CAAC,CAWf;AAED,wBAAsB,aAAa,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC,CAW7E;AAED,wBAAsB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAwB7D;AAED,wBAAsB,KAAK,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,OAAO,CAAC,CAqBnE;AAED,wBAAsB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAWhE"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { toast as e } from "../../node_modules/sonner/dist/index.js";
|
|
2
|
+
import "../lib/toast.js";
|
|
3
|
+
//#region src/theculturepost/utils/nativeBridge.ts
|
|
4
|
+
function t() {
|
|
5
|
+
if (!(typeof window > "u")) return window.__burdenoffNativeBridge;
|
|
6
|
+
}
|
|
7
|
+
async function n(e = "light") {
|
|
8
|
+
try {
|
|
9
|
+
await t()?.impact(e);
|
|
10
|
+
} catch {}
|
|
11
|
+
}
|
|
12
|
+
async function r(n, r = "short") {
|
|
13
|
+
let i = t();
|
|
14
|
+
if (i) try {
|
|
15
|
+
await i.toast(n, r);
|
|
16
|
+
return;
|
|
17
|
+
} catch {}
|
|
18
|
+
e(n);
|
|
19
|
+
}
|
|
20
|
+
async function i(e) {
|
|
21
|
+
let n = t();
|
|
22
|
+
if (n) try {
|
|
23
|
+
if (await n.confirm(e) === !0) return !0;
|
|
24
|
+
} catch {}
|
|
25
|
+
return window.confirm(`${e.title}\n\n${e.message}`);
|
|
26
|
+
}
|
|
27
|
+
async function a(e) {
|
|
28
|
+
let n = t();
|
|
29
|
+
if (n) try {
|
|
30
|
+
return await n.copyText(e);
|
|
31
|
+
} catch {}
|
|
32
|
+
try {
|
|
33
|
+
return await navigator.clipboard.writeText(e), !0;
|
|
34
|
+
} catch {
|
|
35
|
+
let t = document.createElement("textarea");
|
|
36
|
+
t.value = e, t.style.position = "fixed", t.style.opacity = "0", document.body.appendChild(t), t.select();
|
|
37
|
+
let n = document.execCommand("copy");
|
|
38
|
+
return document.body.removeChild(t), n;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
async function o(e) {
|
|
42
|
+
let n = t();
|
|
43
|
+
if (n) try {
|
|
44
|
+
return await n.share(e);
|
|
45
|
+
} catch {}
|
|
46
|
+
if (navigator.share) try {
|
|
47
|
+
return await navigator.share({
|
|
48
|
+
title: e.title,
|
|
49
|
+
text: e.text,
|
|
50
|
+
url: e.url
|
|
51
|
+
}), !0;
|
|
52
|
+
} catch {
|
|
53
|
+
return !1;
|
|
54
|
+
}
|
|
55
|
+
return e.url ? a(e.url) : !1;
|
|
56
|
+
}
|
|
57
|
+
//#endregion
|
|
58
|
+
export { a as copyText, n as impact, i as nativeConfirm, r as nativeToast, o as share };
|
|
59
|
+
|
|
60
|
+
//# sourceMappingURL=nativeBridge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nativeBridge.js","names":[],"sources":["../../../src/theculturepost/utils/nativeBridge.ts"],"sourcesContent":["/**\n * Capacitor-native bridge helpers for TheCulturePost microfrontend.\n *\n * The app shell installs `window.__burdenoffNativeBridge`; this module provides\n * typed, promise-based helpers that fall back to web APIs when the bridge is\n * unavailable or the app is running in a browser.\n */\n\nimport { toast } from '#theculturepost/lib/toast';\n\nexport type HapticImpactStyle = 'light' | 'medium' | 'heavy';\nexport type HapticNotificationType = 'success' | 'warning' | 'error';\nexport type ToastDuration = 'short' | 'long';\n\ninterface ConfirmOptions {\n title: string;\n message: string;\n okButtonTitle?: string;\n cancelButtonTitle?: string;\n}\n\ninterface ShareOptions {\n title?: string;\n text?: string;\n url?: string;\n}\n\ninterface BurdenoffNativeBridge {\n getPlatform(): 'ios' | 'android' | 'web';\n isNativePlatform(): boolean;\n impact(style?: HapticImpactStyle): Promise<void>;\n notify(type: HapticNotificationType): Promise<void>;\n toast(message: string, duration?: ToastDuration): Promise<boolean>;\n confirm(options: ConfirmOptions): Promise<boolean | null>;\n copyText(text: string): Promise<boolean>;\n share(options: ShareOptions): Promise<boolean>;\n openExternalUrl(url: string): Promise<void>;\n}\n\ndeclare global {\n interface Window {\n __burdenoffNativeBridge?: BurdenoffNativeBridge;\n }\n}\n\nfunction getBridge(): BurdenoffNativeBridge | undefined {\n if (typeof window === 'undefined') return undefined;\n return window.__burdenoffNativeBridge;\n}\n\nexport function isNativePlatform(): boolean {\n return getBridge()?.isNativePlatform() ?? false;\n}\n\nexport async function impact(style: HapticImpactStyle = 'light'): Promise<void> {\n try {\n await getBridge()?.impact(style);\n } catch {\n // Web fallback: no haptics available.\n }\n}\n\nexport async function notify(type: HapticNotificationType): Promise<void> {\n try {\n await getBridge()?.notify(type);\n } catch {\n // Web fallback: no haptics available.\n }\n}\n\nexport async function nativeToast(\n message: string,\n duration: ToastDuration = 'short'\n): Promise<void> {\n const bridge = getBridge();\n if (bridge) {\n try {\n await bridge.toast(message, duration);\n return;\n } catch {\n // Fall through to web toast.\n }\n }\n toast(message);\n}\n\nexport async function nativeConfirm(options: ConfirmOptions): Promise<boolean> {\n const bridge = getBridge();\n if (bridge) {\n try {\n const result = await bridge.confirm(options);\n if (result === true) return true;\n } catch {\n // Fall through to web confirm.\n }\n }\n return window.confirm(`${options.title}\\n\\n${options.message}`);\n}\n\nexport async function copyText(text: string): Promise<boolean> {\n const bridge = getBridge();\n if (bridge) {\n try {\n return await bridge.copyText(text);\n } catch {\n // Fall through to web clipboard.\n }\n }\n try {\n await navigator.clipboard.writeText(text);\n return true;\n } catch {\n // Fallback for older browsers.\n const textarea = document.createElement('textarea');\n textarea.value = text;\n textarea.style.position = 'fixed';\n textarea.style.opacity = '0';\n document.body.appendChild(textarea);\n textarea.select();\n const ok = document.execCommand('copy');\n document.body.removeChild(textarea);\n return ok;\n }\n}\n\nexport async function share(options: ShareOptions): Promise<boolean> {\n const bridge = getBridge();\n if (bridge) {\n try {\n return await bridge.share(options);\n } catch {\n // Fall through to Web Share API or copy link.\n }\n }\n if (navigator.share) {\n try {\n await navigator.share({ title: options.title, text: options.text, url: options.url });\n return true;\n } catch {\n return false;\n }\n }\n if (options.url) {\n return copyText(options.url);\n }\n return false;\n}\n\nexport async function openExternalUrl(url: string): Promise<void> {\n const bridge = getBridge();\n if (bridge) {\n try {\n await bridge.openExternalUrl(url);\n return;\n } catch {\n // Fall through to window.open.\n }\n }\n window.open(url, '_blank', 'noopener,noreferrer');\n}\n"],"mappings":";;;AA6CA,SAAS,IAA+C;AAClD,cAAO,SAAW,KACtB,QAAO,OAAO;;AAOhB,eAAsB,EAAO,IAA2B,SAAwB;AAC9E,KAAI;AACF,QAAM,GAAW,EAAE,OAAO,EAAM;SAC1B;;AAaV,eAAsB,EACpB,GACA,IAA0B,SACX;CACf,IAAM,IAAS,GAAW;AAC1B,KAAI,EACF,KAAI;AACF,QAAM,EAAO,MAAM,GAAS,EAAS;AACrC;SACM;AAIV,GAAM,EAAQ;;AAGhB,eAAsB,EAAc,GAA2C;CAC7E,IAAM,IAAS,GAAW;AAC1B,KAAI,EACF,KAAI;AAEF,MADe,MAAM,EAAO,QAAQ,EAAQ,KAC7B,GAAM,QAAO;SACtB;AAIV,QAAO,OAAO,QAAQ,GAAG,EAAQ,MAAM,MAAM,EAAQ,UAAU;;AAGjE,eAAsB,EAAS,GAAgC;CAC7D,IAAM,IAAS,GAAW;AAC1B,KAAI,EACF,KAAI;AACF,SAAO,MAAM,EAAO,SAAS,EAAK;SAC5B;AAIV,KAAI;AAEF,SADA,MAAM,UAAU,UAAU,UAAU,EAAK,EAClC;SACD;EAEN,IAAM,IAAW,SAAS,cAAc,WAAW;AAKnD,EAJA,EAAS,QAAQ,GACjB,EAAS,MAAM,WAAW,SAC1B,EAAS,MAAM,UAAU,KACzB,SAAS,KAAK,YAAY,EAAS,EACnC,EAAS,QAAQ;EACjB,IAAM,IAAK,SAAS,YAAY,OAAO;AAEvC,SADA,SAAS,KAAK,YAAY,EAAS,EAC5B;;;AAIX,eAAsB,EAAM,GAAyC;CACnE,IAAM,IAAS,GAAW;AAC1B,KAAI,EACF,KAAI;AACF,SAAO,MAAM,EAAO,MAAM,EAAQ;SAC5B;AAIV,KAAI,UAAU,MACZ,KAAI;AAEF,SADA,MAAM,UAAU,MAAM;GAAE,OAAO,EAAQ;GAAO,MAAM,EAAQ;GAAM,KAAK,EAAQ;GAAK,CAAC,EAC9E;SACD;AACN,SAAO;;AAMX,QAHI,EAAQ,MACH,EAAS,EAAQ,IAAI,GAEvB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Navigation utilities for the TheCulturePost microfrontend
|
|
3
|
+
* @module theculturepost/utils
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Join basePath with a relative path, correctly handling slashes.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* joinPath('/theculturepost', 'stories') // => '/theculturepost/stories'
|
|
10
|
+
* joinPath('/theculturepost/', 'stories') // => '/theculturepost/stories'
|
|
11
|
+
* joinPath('/theculturepost', '') // => '/theculturepost'
|
|
12
|
+
*/
|
|
13
|
+
export declare function joinPath(basePath: string, relativePath: string): string;
|
|
14
|
+
//# sourceMappingURL=navigation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../../src/theculturepost/utils/navigation.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,CAOvE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slug.d.ts","sourceRoot":"","sources":["../../../src/theculturepost/utils/slug.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAO7C"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AI Assistant types for TheCulturePost microfrontend.
|
|
3
|
+
*
|
|
4
|
+
* Minimal, structural mirror of the fe-libs AssistantTransport contract.
|
|
5
|
+
*/
|
|
6
|
+
export type AssistantMode = 'assistant';
|
|
7
|
+
export interface AssistantArtifact {
|
|
8
|
+
name: string;
|
|
9
|
+
path: string;
|
|
10
|
+
type: 'file' | 'directory';
|
|
11
|
+
size: number;
|
|
12
|
+
downloadPath?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface AssistantRawMessagePart {
|
|
15
|
+
type?: string;
|
|
16
|
+
text?: string;
|
|
17
|
+
tool?: string;
|
|
18
|
+
state?: {
|
|
19
|
+
status?: string;
|
|
20
|
+
input?: unknown;
|
|
21
|
+
output?: unknown;
|
|
22
|
+
raw?: unknown;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
export interface AssistantRawMessage {
|
|
26
|
+
info?: {
|
|
27
|
+
id?: string;
|
|
28
|
+
role?: string;
|
|
29
|
+
providerID?: string;
|
|
30
|
+
modelID?: string;
|
|
31
|
+
tokens?: {
|
|
32
|
+
input: number;
|
|
33
|
+
output: number;
|
|
34
|
+
};
|
|
35
|
+
time?: {
|
|
36
|
+
created?: number;
|
|
37
|
+
completed?: number;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
parts?: AssistantRawMessagePart[];
|
|
41
|
+
}
|
|
42
|
+
export interface AssistantSandboxAuthContext {
|
|
43
|
+
accessToken?: string | null;
|
|
44
|
+
workspaceToken?: string | null;
|
|
45
|
+
userId?: string | null;
|
|
46
|
+
organizationId?: string | null;
|
|
47
|
+
}
|
|
48
|
+
export interface AssistantPromptResult {
|
|
49
|
+
response: string;
|
|
50
|
+
tokens?: {
|
|
51
|
+
input: number;
|
|
52
|
+
output: number;
|
|
53
|
+
};
|
|
54
|
+
artifacts?: AssistantArtifact[];
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=assistant.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assistant.d.ts","sourceRoot":"","sources":["../../src/types/assistant.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,MAAM,aAAa,GAAG,WAAW,CAAC;AAExC,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,uBAAuB;IACtC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE;QACN,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB,GAAG,CAAC,EAAE,OAAO,CAAC;KACf,CAAC;CACH;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,CAAC,EAAE;QACL,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,MAAM,CAAC,EAAE;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,MAAM,EAAE,MAAM,CAAA;SAAE,CAAC;QAC3C,IAAI,CAAC,EAAE;YACL,OAAO,CAAC,EAAE,MAAM,CAAC;YACjB,SAAS,CAAC,EAAE,MAAM,CAAC;SACpB,CAAC;KACH,CAAC;IACF,KAAK,CAAC,EAAE,uBAAuB,EAAE,CAAC;CACnC;AAED,MAAM,WAAW,2BAA2B;IAC1C,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAC3C,SAAS,CAAC,EAAE,iBAAiB,EAAE,CAAC;CACjC"}
|
|
@@ -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.1",
|
|
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",
|