Skip to content

Commit

Permalink
fix(react-shared-contexts): exposes internal leaks used in the API su…
Browse files Browse the repository at this point in the history
…rface (#25405)
  • Loading branch information
bsunderhus authored Oct 28, 2022
1 parent acbfdca commit 81f33ef
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "exposes internal methods and types that are used in the API surface",
"packageName": "@fluentui/react-shared-contexts",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ export const ThemeClassNameProvider_unstable: React_2.Provider<string>;
// @internal (undocumented)
export const ThemeContext_unstable: React_2.Context<ThemeContextValue_unstable>;

// @internal (undocumented)
// @public (undocumented)
export type ThemeContextValue_unstable = Theme | Partial<Theme> | undefined;

// @internal (undocumented)
export const ThemeProvider_unstable: React_2.Provider<ThemeContextValue_unstable>;

// @internal
// @public
export type TooltipVisibilityContextValue_unstable = {
visibleTooltip?: {
hide: () => void;
Expand All @@ -44,10 +44,10 @@ export const TooltipVisibilityProvider_unstable: React_2.Provider<TooltipVisibil
// @public (undocumented)
export function useFluent_unstable(): ProviderContextValue_unstable;

// @internal (undocumented)
// @public (undocumented)
export function useThemeClassName_unstable(): ThemeClassNameContextValue_unstable;

// @internal (undocumented)
// @public (undocumented)
export function useTooltipVisibility_unstable(): TooltipVisibilityContextValue_unstable;

// (No @packageDocumentation comment for this package)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ const themeClassNameContextDefaultVaue = '';
export const ThemeClassNameProvider = ThemeClassNameContext.Provider;

/**
* @internal
* @returns CSS class that applies css variables
*/
export function useThemeClassName(): ThemeClassNameContextValue {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import * as React from 'react';
import type { Theme } from '@fluentui/react-theme';

/**
* @internal
*/
export type ThemeContextValue = Theme | Partial<Theme> | undefined;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import * as React from 'react';

/**
* @internal
* The context provided by TooltipProvider
*/
export type TooltipVisibilityContextValue = {
Expand Down Expand Up @@ -29,9 +28,6 @@ const tooltipVisibilityContextDefaultValue: TooltipVisibilityContextValue = {};
*/
export const TooltipVisibilityProvider = TooltipVisibilityContext.Provider;

/**
* @internal
*/
export function useTooltipVisibility(): TooltipVisibilityContextValue {
return React.useContext(TooltipVisibilityContext) ?? tooltipVisibilityContextDefaultValue;
}

0 comments on commit 81f33ef

Please sign in to comment.