diff --git a/.reports/embedded-react-sdk.api.md b/.reports/embedded-react-sdk.api.md index 12397a70d..3bfc40d2a 100644 --- a/.reports/embedded-react-sdk.api.md +++ b/.reports/embedded-react-sdk.api.md @@ -3076,7 +3076,9 @@ export type NumberStateTaxFieldProps = BaseStateTaxFieldProps & { FieldComponent?: ComponentType; }; -// @public +// Warning: (ae-internal-missing-underscore) The name "ObservabilityContextValue" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal export interface ObservabilityContextValue { observability: ObservabilityHook | undefined; } @@ -3115,10 +3117,14 @@ export interface ObservabilityMetric { // @public (undocumented) export type ObservabilityMetricUnit = 'ms' | 'count' | 'bytes' | 'percent'; -// @public +// Warning: (ae-internal-missing-underscore) The name "ObservabilityProvider" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal export const ObservabilityProvider: (input: ObservabilityProviderProps) => JSX_2.Element; -// @public +// Warning: (ae-internal-missing-underscore) The name "ObservabilityProviderProps" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal export interface ObservabilityProviderProps { // (undocumented) children: ReactNode; @@ -5442,7 +5448,9 @@ export interface UseJobFormReady extends BaseFormHookReady ObservabilityContextValue; // Warning: (ae-missing-release-tag) "usePaymentMethodForm" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) diff --git a/src/components/Base/index.ts b/src/components/Base/index.ts index 4248e3830..fd8ba38e5 100644 --- a/src/components/Base/index.ts +++ b/src/components/Base/index.ts @@ -3,8 +3,6 @@ export { BaseBoundaries, BaseLayout, type BaseComponentInterface, - type BaseLayoutProps, - type BaseBoundariesProps, type CommonComponentInterface, } from './Base' export { createCompoundContext } from './createCompoundContext' diff --git a/src/components/Flow/useFlow.ts b/src/components/Flow/useFlow.ts index 74e6ee828..63ddbabfb 100644 --- a/src/components/Flow/useFlow.ts +++ b/src/components/Flow/useFlow.ts @@ -10,7 +10,7 @@ import type { EventType } from '@/shared/constants' * * @internal */ -export interface CtaConfig { +interface CtaConfig { labelKey: string namespace?: keyof CustomTypeOptions['resources'] } diff --git a/src/contexts/LocaleProvider/LocaleProvider.tsx b/src/contexts/LocaleProvider/LocaleProvider.tsx index 0e3150eae..a54779c47 100644 --- a/src/contexts/LocaleProvider/LocaleProvider.tsx +++ b/src/contexts/LocaleProvider/LocaleProvider.tsx @@ -4,7 +4,7 @@ import { LocaleContext } from './useLocale' /** * Props for {@link LocaleProvider}: the {@link LocaleProps} settings plus any children to render within the locale scope. * - * @public + * @internal */ export interface LocaleProviderProps extends LocaleProps { children?: React.ReactNode @@ -19,7 +19,7 @@ export interface LocaleProviderProps extends LocaleProps { * * @param props - The {@link LocaleProviderProps} controlling locale, currency, and children. * @returns A `div` with `lang` set to the locale, wrapping `children` in the locale context. - * @public + * @internal */ export function LocaleProvider({ locale = 'en-US', diff --git a/src/contexts/LocaleProvider/index.ts b/src/contexts/LocaleProvider/index.ts index 60ff0807c..eea8c4f4e 100644 --- a/src/contexts/LocaleProvider/index.ts +++ b/src/contexts/LocaleProvider/index.ts @@ -1,2 +1,2 @@ export { LocaleProvider } from './LocaleProvider' -export { useLocale, type LocaleProps } from './useLocale' +export { useLocale } from './useLocale' diff --git a/src/contexts/LocaleProvider/useLocale.ts b/src/contexts/LocaleProvider/useLocale.ts index d86205d0d..a6d555877 100644 --- a/src/contexts/LocaleProvider/useLocale.ts +++ b/src/contexts/LocaleProvider/useLocale.ts @@ -8,7 +8,7 @@ import { createContext, useContext } from 'react' * rendered wrapper's `lang` attribute. `currency` is an ISO 4217 currency code (defaults to * `USD`) consumed by currency-aware inputs. * - * @public + * @internal */ export interface LocaleProps { locale?: string @@ -27,7 +27,7 @@ export const LocaleContext = createContext(null) * * @returns An object with `locale` (defaulting to `en-US`) and `currency` (defaulting to `USD`). * @throws An `Error` when called outside a {@link LocaleProvider}. - * @public + * @internal * * @example * ```tsx diff --git a/src/contexts/ObservabilityProvider/ObservabilityContext.ts b/src/contexts/ObservabilityProvider/ObservabilityContext.ts index e19e93e3c..b04a5e852 100644 --- a/src/contexts/ObservabilityProvider/ObservabilityContext.ts +++ b/src/contexts/ObservabilityProvider/ObservabilityContext.ts @@ -4,7 +4,7 @@ import type { ObservabilityHook } from '@/types/observability' /** * Value provided by the SDK's observability context, exposing the configured observability hook to descendants. * - * @public + * @internal */ export interface ObservabilityContextValue { /** The partner-supplied observability hook, or `undefined` if none was configured. */ diff --git a/src/contexts/ObservabilityProvider/ObservabilityProvider.tsx b/src/contexts/ObservabilityProvider/ObservabilityProvider.tsx index d3a8a7cba..1f10173a6 100644 --- a/src/contexts/ObservabilityProvider/ObservabilityProvider.tsx +++ b/src/contexts/ObservabilityProvider/ObservabilityProvider.tsx @@ -6,7 +6,7 @@ import type { ObservabilityHook } from '@/types/observability' /** * Props for {@link ObservabilityProvider}. * - * @public + * @internal */ export interface ObservabilityProviderProps { children: ReactNode @@ -23,7 +23,7 @@ export interface ObservabilityProviderProps { * * @param props - {@link ObservabilityProviderProps} containing the children and optional observability hook. * @returns The provider element wrapping `children` with the observability context. - * @public + * @internal */ export const ObservabilityProvider = ({ children, observability }: ObservabilityProviderProps) => { const value = useMemo(() => ({ observability }), [observability]) diff --git a/src/contexts/ObservabilityProvider/index.ts b/src/contexts/ObservabilityProvider/index.ts index 6f8125420..1e9b0c7e6 100644 --- a/src/contexts/ObservabilityProvider/index.ts +++ b/src/contexts/ObservabilityProvider/index.ts @@ -1,5 +1,4 @@ export { ObservabilityProvider } from './ObservabilityProvider' export { useObservability } from './useObservability' -export { normalizeToSDKError } from '@/types/sdkError' export type { ObservabilityProviderProps } from './ObservabilityProvider' export type { ObservabilityContextValue } from './ObservabilityContext' diff --git a/src/contexts/ObservabilityProvider/useObservability.ts b/src/contexts/ObservabilityProvider/useObservability.ts index e347df39a..6e8b169c3 100644 --- a/src/contexts/ObservabilityProvider/useObservability.ts +++ b/src/contexts/ObservabilityProvider/useObservability.ts @@ -15,7 +15,7 @@ import { useSanitizedObservability } from './useSanitizedObservability' * are dropped. * * @returns A context value whose `observability` is either the sanitized hook or `undefined`. - * @public + * @internal */ export const useObservability = (): ObservabilityContextValue => { const context = useContext(ObservabilityContext) diff --git a/src/hooks/useContainerBreakpoints/useContainerBreakpoints.ts b/src/hooks/useContainerBreakpoints/useContainerBreakpoints.ts index 275115f99..2ae009ed8 100644 --- a/src/hooks/useContainerBreakpoints/useContainerBreakpoints.ts +++ b/src/hooks/useContainerBreakpoints/useContainerBreakpoints.ts @@ -1,16 +1,8 @@ import { useState, useEffect, useRef } from 'react' import type React from 'react' -import type { BREAKPOINTS } from '@/shared/constants' import { BREAKPOINTS_VALUES } from '@/shared/constants' import { remToPx } from '@/helpers/rem' -/** - * Named breakpoint identifier (`'base'`, `'small'`, `'medium'`, or `'large'`) used by container-aware UI components. - * - * @internal - */ -export type BreakpointKey = (typeof BREAKPOINTS)[keyof typeof BREAKPOINTS] - /** * Options for {@link useContainerBreakpoints}. * diff --git a/src/hooks/useDebounce/useDebounce.ts b/src/hooks/useDebounce/useDebounce.ts deleted file mode 100644 index 2f4a22865..000000000 --- a/src/hooks/useDebounce/useDebounce.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { useEffect, useRef } from 'react' - -/** - * Returns a debounced version of `func` that delays invocation until `wait` milliseconds have elapsed since the last call. - * - * @remarks - * Each call resets the pending timer, so only the final invocation in a burst runs. The pending timer is cleared when the host component unmounts. - * - * @typeParam T - The function being debounced. - * @param func - The function to invoke after the delay. - * @param wait - Delay in milliseconds before invoking `func` after the last call. - * @returns A function that schedules `func` and discards the return value. - * @internal - */ -export function useDebounce< - // eslint-disable-next-line @typescript-eslint/no-explicit-any - T extends (...args: any[]) => any, ->(func: T, wait: number): (...args: Parameters) => void { - const timeoutRef = useRef(null) - - // Clear the existing timeout when component unmounts - useEffect( - () => () => { - if (timeoutRef.current) { - clearTimeout(timeoutRef.current) - } - }, - [timeoutRef], - ) - - return (...args: Parameters) => { - // Clear the existing timeout before setting a new one - if (timeoutRef.current) { - clearTimeout(timeoutRef.current) - } - - timeoutRef.current = setTimeout(() => { - func(...args) - }, wait) - } -} - -/** @internal */ -export default useDebounce diff --git a/src/hooks/useForkRef/index.ts b/src/hooks/useForkRef/index.ts deleted file mode 100644 index 5ab924715..000000000 --- a/src/hooks/useForkRef/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { useForkRef } from './useForkRef' diff --git a/src/hooks/useOverflowDetection/index.ts b/src/hooks/useOverflowDetection/index.ts deleted file mode 100644 index 33698cb39..000000000 --- a/src/hooks/useOverflowDetection/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { useOverflowDetection } from './useOverflowDetection' -export type { UseOverflowDetectionProps } from './useOverflowDetection' diff --git a/src/hooks/useOverflowDetection/useOverflowDetection.ts b/src/hooks/useOverflowDetection/useOverflowDetection.ts index 7f265b202..8d1f126d7 100644 --- a/src/hooks/useOverflowDetection/useOverflowDetection.ts +++ b/src/hooks/useOverflowDetection/useOverflowDetection.ts @@ -63,5 +63,3 @@ export const useOverflowDetection = ({ return isOverflowing } - -export default useOverflowDetection