diff --git a/.changeset/fair-beans-confess.md b/.changeset/fair-beans-confess.md new file mode 100644 index 000000000..3d7e1e85f --- /dev/null +++ b/.changeset/fair-beans-confess.md @@ -0,0 +1,5 @@ +--- +"@frontify/app-bridge-theme": minor +--- + +feat(AppBridgeTheme): cleaning context and deprecated command `NavigateToDocumentSection` diff --git a/packages/app-bridge-theme/src/registries/CommandRegistry.ts b/packages/app-bridge-theme/src/registries/CommandRegistry.ts index 60ba1e1d0..5e34dd299 100644 --- a/packages/app-bridge-theme/src/registries/CommandRegistry.ts +++ b/packages/app-bridge-theme/src/registries/CommandRegistry.ts @@ -10,7 +10,6 @@ export type CommandRegistry = CommandNameValidator<{ openAiBrandAssistantDialog: void; closeAiBrandAssistantDialog: void; navigate: string; - navigateToDocumentSection: number | string; navigateToSectionHeading: number | string; hydrateContextDocumentNavigation: number; scrollPageToTop: void; diff --git a/packages/app-bridge-theme/src/registries/commands/NavigateToDocumentSection.ts b/packages/app-bridge-theme/src/registries/commands/NavigateToDocumentSection.ts deleted file mode 100644 index 32353bd01..000000000 --- a/packages/app-bridge-theme/src/registries/commands/NavigateToDocumentSection.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* (c) Copyright Frontify Ltd., all rights reserved. */ - -import { type DispatchHandlerParameter } from '../../types'; -import { type CommandRegistry } from '../CommandRegistry'; - -/** @deprecated Use navigateToSectionHeading instead */ -export const navigateToDocumentSection = ( - sectionId: CommandRegistry['navigateToDocumentSection'], -): DispatchHandlerParameter<'navigateToDocumentSection', CommandRegistry> => ({ - name: 'navigateToDocumentSection', - payload: sectionId, -}); diff --git a/packages/app-bridge-theme/src/registries/commands/index.ts b/packages/app-bridge-theme/src/registries/commands/index.ts index de278cc80..011980b4c 100644 --- a/packages/app-bridge-theme/src/registries/commands/index.ts +++ b/packages/app-bridge-theme/src/registries/commands/index.ts @@ -3,7 +3,6 @@ export * from './AiBrandAssistantDialog'; export * from './SearchDialog'; export * from './Navigate'; -export * from './NavigateToDocumentSection'; export * from './NavigateToSectionHeading'; export * from './HydrateContextDocumentNavigation'; export * from './ScrollPageToTop'; diff --git a/packages/app-bridge-theme/src/types/Context.ts b/packages/app-bridge-theme/src/types/Context.ts index 2abf4c1c5..45c475577 100644 --- a/packages/app-bridge-theme/src/types/Context.ts +++ b/packages/app-bridge-theme/src/types/Context.ts @@ -21,9 +21,7 @@ export type TemplateContext = { templateId: string; type: ThemeTemplate } & ( ); export type Context = { - brandId: number; brandPortalLink: BrandPortalLink | null; - projectId: number; portalId: number; portalNavigation: PortalNavigationItem[] | null; documentNavigation: Record;