Files
Modrinth-plus/packages/ui/src/providers/page-context.ts
Calum H. 7e149e1cf1 fix: intercom bubble positioning with bulk action bars (#5952)
* fix: intercom bubble positioning + action bar positioning with app sidebar

* fix: docs

* del: story
2026-04-30 17:04:39 +00:00

28 lines
813 B
TypeScript

import type { ComputedRef, Ref } from 'vue'
import { createContext } from '.'
export interface PageContext {
// pages may render sidebar content in #sidebar-teleport-target instead of in the main layout when true
hierarchicalSidebarAvailable: Ref<boolean>
showAds: Ref<boolean>
floatingActionBarOffsets?: {
left: Ref<string> | ComputedRef<string>
right: Ref<string> | ComputedRef<string>
}
intercomBubble?: {
width: Ref<number> | ComputedRef<number>
horizontalPadding: Ref<number> | ComputedRef<number>
requestVerticalClearance: (id: symbol, clearance: number | null) => void
}
featureFlags?: {
serverRamAsBytesAlwaysOn?: Ref<boolean>
}
openExternalUrl: (url: string) => void
}
export const [injectPageContext, providePageContext] = createContext<PageContext>(
'root',
'pageContext',
)