@spteck/react-controls-v2 2.6.1 → 2.6.3

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.
Files changed (67) hide show
  1. package/README.md +64 -30
  2. package/dist/LocalizationProvider-BUBYkX-c.cjs +2 -0
  3. package/dist/{LocalizationProvider-D13keh6K.js → LocalizationProvider-DZ7gAJ1G.js} +205 -23
  4. package/dist/abstractions/index.d.ts +1 -0
  5. package/dist/components/BackgroundVideo/BackgroundVideo.d.ts +25 -0
  6. package/dist/components/BackgroundVideo/IBackgroundVideoProps.d.ts +9 -0
  7. package/dist/components/BackgroundVideo/index.d.ts +3 -0
  8. package/dist/components/Dropzone/mime-types.d.ts +1 -1
  9. package/dist/components/Hero/Hero.d.ts +7 -0
  10. package/dist/components/Hero/HeroItem.d.ts +13 -0
  11. package/dist/components/Hero/HeroOverlay.d.ts +10 -0
  12. package/dist/components/Hero/IHeroProps.d.ts +106 -0
  13. package/dist/components/Hero/index.d.ts +3 -0
  14. package/dist/components/Hero/layouts/HeroCarousel.d.ts +4 -0
  15. package/dist/components/Hero/layouts/HeroFeatured.d.ts +4 -0
  16. package/dist/components/Hero/layouts/HeroFilmstrip.d.ts +4 -0
  17. package/dist/components/Hero/layouts/HeroFullscreen.d.ts +4 -0
  18. package/dist/components/Hero/layouts/HeroGrid.d.ts +4 -0
  19. package/dist/components/Hero/layouts/HeroMosaic.d.ts +4 -0
  20. package/dist/components/Hero/layouts/HeroSplit.d.ts +4 -0
  21. package/dist/components/Hero/useHeroLayout.d.ts +12 -0
  22. package/dist/components/Hero/useHeroStyles.d.ts +26 -0
  23. package/dist/components/index.d.ts +3 -1
  24. package/dist/components/stackv2/IStackV2Props.d.ts +9 -1
  25. package/dist/components/videoPlayer/VideoPlayer.d.ts +2 -2
  26. package/dist/hooks/index.d.ts +2 -0
  27. package/dist/hooks/useAIAssistant.d.ts +3 -24
  28. package/dist/hooks/useAIAssistantParser.d.ts +3 -29
  29. package/dist/hooks/useAppToast.d.ts +4 -24
  30. package/dist/hooks/useBrandCenterFonts.d.ts +2 -30
  31. package/dist/hooks/useExportData.d.ts +25 -0
  32. package/dist/hooks/useFluentEmoji.d.ts +3 -7
  33. package/dist/hooks/useGraphAPI.d.ts +3 -19
  34. package/dist/hooks/useHeroRotation.d.ts +18 -0
  35. package/dist/hooks/useIndexedDB.d.ts +4 -11
  36. package/dist/hooks/useLocalizationStrings.d.ts +2 -12
  37. package/dist/hooks/useLogging.d.ts +3 -10
  38. package/dist/hooks/usePolling.d.ts +3 -5
  39. package/dist/hooks/useTimeZoneHelper.d.ts +3 -12
  40. package/dist/index.cjs +63 -56
  41. package/dist/index.d.ts +2 -2
  42. package/dist/index.js +4773 -3994
  43. package/dist/models/IExportData.d.ts +75 -0
  44. package/dist/models/IUseAIAssistant.d.ts +48 -0
  45. package/dist/models/IUseAIAssistantParser.d.ts +28 -0
  46. package/dist/models/IUseAppToast.d.ts +81 -0
  47. package/dist/models/IUseBrandCenterFonts.d.ts +30 -0
  48. package/dist/models/IUseFluentEmoji.d.ts +25 -0
  49. package/dist/models/IUseGraphAPI.d.ts +39 -0
  50. package/dist/models/IUseHeroRotation.d.ts +11 -0
  51. package/dist/models/IUseIndexedDB.d.ts +31 -0
  52. package/dist/models/IUseLocalizationStrings.d.ts +17 -0
  53. package/dist/models/IUseLogging.d.ts +40 -0
  54. package/dist/models/IUsePolling.d.ts +9 -0
  55. package/dist/models/IUseTimeZoneHelper.d.ts +50 -0
  56. package/dist/models/index.d.ts +15 -0
  57. package/dist/providers.cjs +1 -2
  58. package/dist/providers.js +2 -189
  59. package/dist/utils/index.d.ts +1 -0
  60. package/dist/utils/useExportDataUtils.d.ts +23 -0
  61. package/package.json +5 -2
  62. package/dist/LocalizationProvider-DEmAXWvz.cjs +0 -2
  63. package/dist/components/Stack/IStackProps.d.ts +0 -12
  64. package/dist/components/Stack/Stack.d.ts +0 -4
  65. package/dist/components/Stack/StackItem.d.ts +0 -12
  66. package/dist/components/Stack/index.d.ts +0 -5
  67. package/dist/components/Stack/useStackStyles.d.ts +0 -6
@@ -0,0 +1,106 @@
1
+ import { IBaseProps } from '../baseComponentProps/IBaseProps';
2
+ export type HeroLayout = 'fullscreen' | 'split' | 'featured' | 'mosaic' | 'grid' | 'filmstrip' | 'carousel';
3
+ export type HeroTextPosition = 'top-left' | 'top-center' | 'top-right' | 'center-left' | 'center' | 'center-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
4
+ export type HeroMediaType = 'image' | 'video';
5
+ export interface IHeroItem {
6
+ /** Unique identifier for the item */
7
+ id: string;
8
+ /** Media type: image or video */
9
+ mediaType: HeroMediaType;
10
+ /** Image or video URL */
11
+ src: string;
12
+ /** Accessible alt / label text */
13
+ alt?: string;
14
+ /** Overlay title (optional) */
15
+ title?: string;
16
+ /** Overlay description (optional) */
17
+ description?: string;
18
+ /** Call-to-action button label (optional) */
19
+ callToActionLabel?: string;
20
+ /** Call-to-action target URL (optional) */
21
+ callToActionUrl?: string;
22
+ /** Position of the overlay text (default: 'bottom-left') */
23
+ textPosition?: HeroTextPosition;
24
+ /** Gradient scrim opacity 0–1 (default: 0.45) */
25
+ overlayOpacity?: number;
26
+ /**
27
+ * Auto-play the video on mount (only applies when `mediaType="video"`).
28
+ * Mutes the video automatically to satisfy browser autoplay policies.
29
+ */
30
+ autoPlay?: boolean;
31
+ /** Loop the video continuously (only applies when `mediaType="video"`). */
32
+ loop?: boolean;
33
+ /**
34
+ * Show native video player controls (only applies when `mediaType="video"`, default: `true`).
35
+ * Set to `false` for a silent autoplay background video — the overlay will fill the entire cell.
36
+ */
37
+ videoControls?: boolean;
38
+ }
39
+ export type HeroMosaicOverflowMode = 'marquee' | 'scroll';
40
+ /** Props shared by every Hero layout component. */
41
+ export interface IHeroLayoutProps {
42
+ /** Items to render in this layout. */
43
+ items: IHeroItem[];
44
+ /** Total container height, or per-cell height for grid/filmstrip. Accepts a CSS string or a number (px). */
45
+ height: string | number;
46
+ /** Full Hero props forwarded from the root Hero component. */
47
+ heroProps: IHeroProps;
48
+ /** Measured width of the Hero container in pixels (from ResizeObserver). */
49
+ containerWidth: number;
50
+ /**
51
+ * Controls how overflow items are shown on the right side of the mosaic layout.
52
+ * Only relevant when `layout="mosaic"` and `items.length > 5`.
53
+ */
54
+ mosaicOverflowMode?: HeroMosaicOverflowMode;
55
+ }
56
+ export type HeroRotationMode = 'interval' | 'refresh';
57
+ export interface IHeroRotation {
58
+ /**
59
+ * How items are rotated when the pool has more items than the layout displays:
60
+ * - `'interval'` — rotate automatically every `intervalMs` milliseconds.
61
+ * - `'refresh'` — pick a random starting position once on each component mount.
62
+ */
63
+ mode: HeroRotationMode;
64
+ /**
65
+ * Milliseconds between automatic rotations (only used when `mode='interval'`).
66
+ * Default: `5000` (5 seconds).
67
+ */
68
+ intervalMs?: number;
69
+ }
70
+ export interface IHeroProps extends IBaseProps {
71
+ /** Collection of hero items to display */
72
+ items: IHeroItem[];
73
+ /** Visual layout variant (default: 'fullscreen') */
74
+ layout?: HeroLayout;
75
+ /**
76
+ * **Only applies when `layout="mosaic"`** and `items.length > 5`.
77
+ * Controls how the overflow items are presented on the right side:
78
+ * - `'marquee'` (default): auto-scrolling vertical marquee, pauses on hover.
79
+ * - `'scroll'`: static list the user scrolls manually.
80
+ *
81
+ * Ignored for all other layouts.
82
+ */
83
+ mosaicOverflowMode?: HeroMosaicOverflowMode;
84
+ /**
85
+ * Height applied to each media cell.
86
+ * For 'grid' and 'filmstrip' this is the per-item height;
87
+ * for all other layouts it is the total container height.
88
+ * Accepts any CSS length string or a number (px). (default: '480px')
89
+ */
90
+ height?: string | number;
91
+ /** Border radius applied to each item cell (default: tokens.borderRadiusMedium) */
92
+ borderRadius?: string;
93
+ /**
94
+ * Item rotation settings for `fullscreen`, `split`, and `featured` layouts.
95
+ *
96
+ * When the pool has more items than the layout displays at once
97
+ * (>1 for fullscreen, >2 for split / featured), the visible set cycles through the pool.
98
+ *
99
+ * - `'interval'` — rotates automatically every `intervalMs` ms using `usePolling`.
100
+ * - `'refresh'` — picks a random starting position on each component mount.
101
+ *
102
+ * Ignored for mosaic, grid, filmstrip, and carousel layouts.
103
+ */
104
+ rotation?: IHeroRotation;
105
+ }
106
+ //# sourceMappingURL=IHeroProps.d.ts.map
@@ -0,0 +1,3 @@
1
+ export * from './Hero';
2
+ export * from './IHeroProps';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,4 @@
1
+ import { IHeroLayoutProps } from '../IHeroProps';
2
+ import * as React from 'react';
3
+ export declare const HeroCarousel: React.FC<IHeroLayoutProps>;
4
+ //# sourceMappingURL=HeroCarousel.d.ts.map
@@ -0,0 +1,4 @@
1
+ import { IHeroLayoutProps } from '../IHeroProps';
2
+ import * as React from 'react';
3
+ export declare const HeroFeatured: React.FC<IHeroLayoutProps>;
4
+ //# sourceMappingURL=HeroFeatured.d.ts.map
@@ -0,0 +1,4 @@
1
+ import { IHeroLayoutProps } from '../IHeroProps';
2
+ import * as React from 'react';
3
+ export declare const HeroFilmstrip: React.FC<IHeroLayoutProps>;
4
+ //# sourceMappingURL=HeroFilmstrip.d.ts.map
@@ -0,0 +1,4 @@
1
+ import { IHeroLayoutProps } from '../IHeroProps';
2
+ import * as React from 'react';
3
+ export declare const HeroFullscreen: React.FC<IHeroLayoutProps>;
4
+ //# sourceMappingURL=HeroFullscreen.d.ts.map
@@ -0,0 +1,4 @@
1
+ import { IHeroLayoutProps } from '../IHeroProps';
2
+ import * as React from 'react';
3
+ export declare const HeroGrid: React.FC<IHeroLayoutProps>;
4
+ //# sourceMappingURL=HeroGrid.d.ts.map
@@ -0,0 +1,4 @@
1
+ import { IHeroLayoutProps } from '../IHeroProps';
2
+ import * as React from 'react';
3
+ export declare const HeroMosaic: React.FC<IHeroLayoutProps>;
4
+ //# sourceMappingURL=HeroMosaic.d.ts.map
@@ -0,0 +1,4 @@
1
+ import { IHeroLayoutProps } from '../IHeroProps';
2
+ import * as React from 'react';
3
+ export declare const HeroSplit: React.FC<IHeroLayoutProps>;
4
+ //# sourceMappingURL=HeroSplit.d.ts.map
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Shared utilities for Hero layout components.
3
+ *
4
+ * Returns helpers derived from the raw `height` prop so layout
5
+ * components do not need to inline the same conversion logic.
6
+ */
7
+ export declare const useHeroLayout: (height: string | number) => {
8
+ resolvedHeight: string;
9
+ numericHeight: number;
10
+ mosaicHeight: string;
11
+ };
12
+ //# sourceMappingURL=useHeroLayout.d.ts.map
@@ -0,0 +1,26 @@
1
+ import { HeroTextPosition, HeroMediaType, IHeroProps } from './IHeroProps';
2
+ import * as React from 'react';
3
+ interface IHeroStyles {
4
+ heroRootStyles: (w: number, h: number) => React.CSSProperties;
5
+ item: string;
6
+ overlayRoot: string;
7
+ overlayScrim: (opacity: number) => string;
8
+ overlayContent: (position: HeroTextPosition) => string;
9
+ fullscreenRoot: string;
10
+ splitRoot: string;
11
+ featuredRoot: string;
12
+ mosaicWrapper: string;
13
+ mosaicPrimary: string;
14
+ mosaicRightGrid: (rightCount: number) => string;
15
+ mosaicSpanFull: string;
16
+ mosaicMarqueeLane: string;
17
+ mosaicMarqueeItem: string;
18
+ mosaicScrollLane: string;
19
+ gridRoot: string;
20
+ filmstripRoot: string;
21
+ filmstripItem: string;
22
+ carouselWrapper: string;
23
+ }
24
+ export declare const useHeroStyles: (props: IHeroProps, containerWidth: number, mediaType?: HeroMediaType) => IHeroStyles;
25
+ export {};
26
+ //# sourceMappingURL=useHeroStyles.d.ts.map
@@ -1,4 +1,6 @@
1
1
  export * from './AspectRatio';
2
+ export * from './BackgroundImage';
3
+ export * from './BackgroundVideo';
2
4
  export * from './Card';
3
5
  export * from './Carousel';
4
6
  export * from './Center';
@@ -14,7 +16,6 @@ export * from './Provider';
14
16
  export * from './RenderLabel';
15
17
  export * from './RenderSpninner';
16
18
  export * from './Space';
17
- export * from './Stack';
18
19
  export * from './adaptiveCardHost';
19
20
  export * from './aiAssistant';
20
21
  export * from './breadcrumb';
@@ -54,4 +55,5 @@ export * from './KPIControl';
54
55
  export * from './SplitPane';
55
56
  export * from './MermaidDiagram';
56
57
  export * from './fluentUIProvider';
58
+ export * from './Hero';
57
59
  //# sourceMappingURL=index.d.ts.map
@@ -61,7 +61,7 @@ export interface IStackV2Props {
61
61
  /**
62
62
  * Child components to be rendered inside the stack.
63
63
  */
64
- children: React.ReactNode;
64
+ children?: React.ReactNode;
65
65
  /**
66
66
  * Additional inline styles.
67
67
  */
@@ -73,5 +73,13 @@ export interface IStackV2Props {
73
73
  overflow?: React.CSSProperties["overflow"];
74
74
  /** background Color */
75
75
  background?: React.CSSProperties["backgroundColor"];
76
+ /** HTML id attribute */
77
+ id?: string;
78
+ /** ARIA role */
79
+ role?: React.AriaRole;
80
+ /** ARIA label */
81
+ 'aria-label'?: string;
82
+ /** ARIA hidden */
83
+ 'aria-hidden'?: boolean | 'true' | 'false';
76
84
  }
77
85
  //# sourceMappingURL=IStackV2Props.d.ts.map
@@ -40,9 +40,9 @@ export interface IVideoPlayerProps {
40
40
  tracks?: {
41
41
  kind: string;
42
42
  src: string;
43
- srcLang?: string;
43
+ srcLang: string;
44
44
  default?: boolean;
45
- label?: string;
45
+ label: string;
46
46
  }[];
47
47
  forceVideo?: boolean;
48
48
  forceAudio?: boolean;
@@ -2,6 +2,7 @@ export * from './useLogging';
2
2
  export * from './useGraphAPI';
3
3
  export * from './useIndexedDB';
4
4
  export * from './usePolling';
5
+ export * from './useHeroRotation';
5
6
  export * from './useTimeZoneHelper';
6
7
  export * from './useAIAssistantParser';
7
8
  export * from './useAIAssistant';
@@ -9,4 +10,5 @@ export * from './useLocalizationStrings';
9
10
  export * from './useBrandCenterFonts';
10
11
  export * from './useFluentEmoji';
11
12
  export * from './useAppToast';
13
+ export * from './useExportData';
12
14
  //# sourceMappingURL=index.d.ts.map
@@ -1,26 +1,5 @@
1
- export interface AIAssistantConfig {
2
- endpoint?: string;
3
- mcpServers?: Record<string, any>;
4
- conversationId?: string;
5
- requestHeaders?: Record<string, string>;
6
- }
7
- export interface AIAssistantMessage {
8
- instructions?: string;
9
- input: string;
10
- timezone?: string;
11
- locale?: string;
12
- history?: string[];
13
- mcpServers?: Record<string, any>;
14
- }
15
- export interface UseAIAssistantResult {
16
- response: string;
17
- isLoading: boolean;
18
- error: string | null;
19
- sendMessage: (message: AIAssistantMessage, onProgress?: (text: string) => void) => Promise<string>;
20
- cancelRequest: () => void;
21
- resetConversation: () => void;
22
- conversationId: string;
23
- }
1
+ import { AIAssistantConfig, IUseAIAssistantReturn } from '../models/IUseAIAssistant';
2
+ export type { AIAssistantConfig, AIAssistantMessage, IUseAIAssistantReturn, UseAIAssistantResult } from '../models/IUseAIAssistant';
24
3
  /**
25
4
  * Custom hook for interacting with AI Assistant API with SSE streaming support
26
5
  *
@@ -47,5 +26,5 @@ export interface UseAIAssistantResult {
47
26
  * };
48
27
  * ```
49
28
  */
50
- export declare const useAIAssistant: (config: AIAssistantConfig) => UseAIAssistantResult;
29
+ export declare const useAIAssistant: (config: AIAssistantConfig) => IUseAIAssistantReturn;
51
30
  //# sourceMappingURL=useAIAssistant.d.ts.map
@@ -1,31 +1,5 @@
1
- /**
2
- * Represents the parsed response from the AI Assistant SSE stream
3
- */
4
- export interface ParsedAIResponse<T = unknown> {
5
- /** Parsed JSON data (typed as unknown for flexibility) */
6
- data: T | undefined;
7
- /** Raw text content extracted from SSE */
8
- rawText: string;
9
- /** Indicates if the response is valid JSON */
10
- isJson: boolean;
11
- /** Error message if parsing failed */
12
- error?: string;
13
- }
14
- /**
15
- * Configuration options for the parser
16
- */
17
- export interface ParserOptions {
18
- /** Whether to remove markdown code blocks (default: true) */
19
- stripMarkdown?: boolean;
20
- /** Whether to log debug information (default: false) */
21
- debug?: boolean;
22
- }
23
- /**
24
- * Return type for the useAIAssistantParser hook
25
- */
26
- export interface UseAIAssistantParserReturn {
27
- parseSSEResponse: <T = unknown>(rawResponse: string, options?: ParserOptions) => ParsedAIResponse<T>;
28
- }
1
+ import { IUseAIAssistantParserReturn } from '../models/IUseAIAssistantParser';
2
+ export type { ParsedAIResponse, ParserOptions, IUseAIAssistantParserReturn, UseAIAssistantParserReturn } from '../models/IUseAIAssistantParser';
29
3
  /**
30
4
  * Custom hook for parsing Server-Sent Events (SSE) responses from AI Assistant API
31
5
  *
@@ -41,5 +15,5 @@ export interface UseAIAssistantParserReturn {
41
15
  *
42
16
  * @returns Object containing parseSSEResponse function
43
17
  */
44
- export declare const useAIAssistantParser: () => UseAIAssistantParserReturn;
18
+ export declare const useAIAssistantParser: () => IUseAIAssistantParserReturn;
45
19
  //# sourceMappingURL=useAIAssistantParser.d.ts.map
@@ -1,14 +1,5 @@
1
- import { IToastContent } from '../models/IToastContent';
2
- import { IToastOptions } from '../models/IToastOptions';
3
- import * as React from "react";
4
- export declare const toasterId = "app-toaster";
5
- export interface IAppToasterConfig {
6
- toasterId?: string;
7
- position?: "top-start" | "top" | "top-end" | "bottom-start" | "bottom" | "bottom-end";
8
- dir?: "ltr" | "rtl";
9
- pauseOnHover?: boolean;
10
- pauseOnWindowBlur?: boolean;
11
- }
1
+ import { IAppToasterConfig, IUseAppToastReturn } from '../models/IUseAppToast';
2
+ export type { IAppToasterConfig, IUseAppToastReturn } from '../models/IUseAppToast';
12
3
  /**
13
4
  * Consolidated toast hook that provides both toast functionality and the ToasterProvider component.
14
5
  * This follows React best practices by consolidating all toast-related logic in one place.
@@ -31,17 +22,6 @@ export interface IAppToasterConfig {
31
22
  * );
32
23
  * ```
33
24
  */
34
- export declare const useAppToast: (config?: IAppToasterConfig) => {
35
- showToast: (content: IToastContent, options?: IToastOptions) => string;
36
- showSuccessToast: (title: string | React.ReactNode, body?: string | React.ReactNode, options?: Omit<IToastOptions, "intent">) => string;
37
- showErrorToast: (title: string | React.ReactNode, body?: string | React.ReactNode, options?: Omit<IToastOptions, "intent">) => string;
38
- showWarningToast: (title: string | React.ReactNode, body?: string | React.ReactNode, options?: Omit<IToastOptions, "intent">) => string;
39
- showInfoToast: (title: string | React.ReactNode, body?: string | React.ReactNode, options?: Omit<IToastOptions, "intent">) => string;
40
- dismissToast: (toastId: string) => void;
41
- dismissAllToasts: () => void;
42
- updateToast: (toastId: string, content: Partial<IToastContent>, options?: Partial<IToastOptions>) => void;
43
- playToast: (toastId: string) => void;
44
- pauseToast: (toastId: string) => void;
45
- ToasterProvider: React.ComponentType;
46
- };
25
+ export declare const toasterId = "app-toaster";
26
+ export declare const useAppToast: (config?: IAppToasterConfig) => IUseAppToastReturn;
47
27
  //# sourceMappingURL=useAppToast.d.ts.map
@@ -1,33 +1,5 @@
1
- import { IBrandCenterFont } from '../abstractions/IBrandCenterFonts';
2
- /** Options for the useBrandCenterFonts hook */
3
- export interface IUseBrandCenterFontsOptions {
4
- /** SharePoint site URL (e.g. "https://contoso.sharepoint.com/sites/brand").
5
- * When omitted the hook reads it from `pageContext.web.absoluteUrl`. */
6
- siteUrl?: string;
7
- /** If true the hook will NOT fetch from Brand Center;
8
- * use `fonts` to supply a static list instead. */
9
- disabled?: boolean;
10
- /** Provide brand fonts directly instead of fetching from the API.
11
- * Useful for testing or when fonts are already available. */
12
- fonts?: IBrandCenterFont[];
13
- }
14
- /** Return value of useBrandCenterFonts */
15
- export interface IUseBrandCenterFontsReturn {
16
- /** Available Brand Center fonts (or Fluent UI defaults if Brand Center is not configured) */
17
- fonts: IBrandCenterFont[];
18
- /** Font family names ready for CSS / TypographyControl.fontFamily */
19
- fontFamilyNames: string[];
20
- /** The organization's default font (if any) */
21
- defaultFont: IBrandCenterFont | undefined;
22
- /** Whether data is currently being fetched */
23
- loading: boolean;
24
- /** Error message, if the fetch failed */
25
- error: string | undefined;
26
- /** Whether Brand Center fonts are configured for this tenant */
27
- isBrandCenterAvailable: boolean;
28
- /** Re-fetch fonts from the API */
29
- refresh: () => Promise<void>;
30
- }
1
+ import { IUseBrandCenterFontsOptions, IUseBrandCenterFontsReturn } from '../models/IUseBrandCenterFonts';
2
+ export type { IUseBrandCenterFontsOptions, IUseBrandCenterFontsReturn } from '../models/IUseBrandCenterFonts';
31
3
  /**
32
4
  * React hook that loads fonts from the SharePoint Brand Center and
33
5
  * injects `@font-face` rules so they can be used anywhere in the app
@@ -0,0 +1,25 @@
1
+ import { IUseExportData } from '../models/IExportData';
2
+ export type { IExcelHeaderStyle, ExportDataFetcher, IExportExcelOptions, IExportJSONOptions, IExportCSVOptions, IUseExportData, } from '../models/IExportData';
3
+ /**
4
+ * Provides file download helpers for Excel (`.xlsx`), JSON, and CSV,
5
+ * with a built-in progress dialog that shows during async exports.
6
+ *
7
+ * Pass a static array for instant exports, or an {@link ExportDataFetcher}
8
+ * for paginated async sources — the dialog will track progress automatically.
9
+ *
10
+ * Mount `ProgressDialog` once in your component tree:
11
+ * ```tsx
12
+ * const { exportToExcel, exportToJSON, exportToCSV, ProgressDialog } = useExportData();
13
+ *
14
+ * return (
15
+ * <>
16
+ * <Button onClick={() => exportToExcel(fetcher, { fileName: 'report', includeMetaSheet: true })}>
17
+ * Export to Excel
18
+ * </Button>
19
+ * {ProgressDialog}
20
+ * </>
21
+ * );
22
+ * ```
23
+ */
24
+ export declare const useExportData: () => IUseExportData;
25
+ //# sourceMappingURL=useExportData.d.ts.map
@@ -1,12 +1,8 @@
1
- export type TeamsReactionImageStyle = '3D' | 'Color' | 'Flat' | 'HighContrast';
2
- export interface IUseFluentEmojiResult {
3
- getEmoji: (reactionType: string, style?: TeamsReactionImageStyle) => string | undefined;
4
- getAvailableEmojis: () => string[];
5
- hasEmoji: (reactionType: string, style?: TeamsReactionImageStyle) => boolean;
6
- }
1
+ import { IUseFluentEmojiReturn } from '../models/IUseFluentEmoji';
2
+ export type { TeamsReactionImageStyle, IUseFluentEmojiReturn, IUseFluentEmojiResult } from '../models/IUseFluentEmoji';
7
3
  /**
8
4
  * Resolves a Teams/Graph reactionType such as `yes`, `yes-tone2`, `heart`, or
9
5
  * a raw Unicode emoji glyph to a Fluent emoji image URL.
10
6
  */
11
- export declare const useFluentEmoji: () => IUseFluentEmojiResult;
7
+ export declare const useFluentEmoji: () => IUseFluentEmojiReturn;
12
8
  //# sourceMappingURL=useFluentEmoji.d.ts.map
@@ -1,24 +1,8 @@
1
- import { User } from '@microsoft/microsoft-graph-types';
1
+ import { IUseGraphAPIReturn } from '../models/IUseGraphAPI';
2
+ export type { IUseGraphAPIReturn, IUserInfo } from '../models/IUseGraphAPI';
2
3
  /**
3
4
  * Hook for Microsoft Graph API operations
4
5
  * Uses the graph client from the application context
5
6
  */
6
- export declare const useGraphAPI: () => {
7
- getUser: (userId: string) => Promise<User | null>;
8
- getCurrentUser: () => Promise<User | null>;
9
- searchUsers: (query: string, top?: number) => Promise<User[]>;
10
- getUserPhoto: (userId: string) => Promise<string | null>;
11
- graphClient: import('..').IGraphProvider | undefined;
12
- };
13
- /**
14
- * User information interface for convenience
15
- */
16
- export interface IUserInfo {
17
- displayName?: string;
18
- email?: string;
19
- jobTitle?: string;
20
- officeLocation?: string;
21
- mobilePhone?: string;
22
- businessPhones?: string[];
23
- }
7
+ export declare const useGraphAPI: () => IUseGraphAPIReturn;
24
8
  //# sourceMappingURL=useGraphAPI.d.ts.map
@@ -0,0 +1,18 @@
1
+ import { IHeroItem, IHeroRotation } from '../components/Hero/IHeroProps';
2
+ export type { IUseHeroRotationOptions } from '../models/IUseHeroRotation';
3
+ /**
4
+ * Manages the visible item slice for rotating Hero layouts.
5
+ *
6
+ * @param items Full item pool provided by the consumer
7
+ * @param slots Number of items the layout shows at once
8
+ * (1 for fullscreen, 2 for split / featured)
9
+ * @param rotation Optional rotation config from `IHeroProps.rotation`
10
+ * @returns The slice of items to render right now
11
+ *
12
+ * Rotation only activates when `items.length > slots`.
13
+ * - `'interval'` mode: uses `usePolling` to advance the window by one position
14
+ * every `intervalMs` ms (default 5 000 ms).
15
+ * - `'refresh'` mode: picks a random starting index on mount and never changes it.
16
+ */
17
+ export declare function useHeroRotation(items: IHeroItem[], slots: number, rotation?: IHeroRotation): IHeroItem[];
18
+ //# sourceMappingURL=useHeroRotation.d.ts.map
@@ -1,19 +1,12 @@
1
+ import { IUseIndexedDBCacheReturn, IUseCachedDataReturn } from '../models/IUseIndexedDB';
2
+ export type { IUseIndexedDBCacheReturn, IUseCachedDataReturn } from '../models/IUseIndexedDB';
1
3
  /**
2
4
  * Hook for IndexedDB or generic storage operations
3
5
  * Uses the storage provider from the application context
4
6
  */
5
- export declare const useIndexedDBCache: <T = any>() => {
6
- getCachedData: (key: string) => Promise<T | undefined>;
7
- setCachedData: (key: string, value: T, expirationInMinutes?: number) => Promise<void>;
8
- removeCachedData: (key: string) => Promise<void>;
9
- clearCache: () => Promise<void>;
10
- };
7
+ export declare const useIndexedDBCache: <T = any>() => IUseIndexedDBCacheReturn<T>;
11
8
  /**
12
9
  * Hook for caching data with automatic retrieval and storage
13
10
  */
14
- export declare const useCachedData: <T = any>(key: string, fetcher: () => Promise<T>, expirationInMinutes?: number) => {
15
- data: T | undefined;
16
- loading: boolean;
17
- error: Error | undefined;
18
- };
11
+ export declare const useCachedData: <T = any>(key: string, fetcher: () => Promise<T>, expirationInMinutes?: number) => IUseCachedDataReturn<T>;
19
12
  //# sourceMappingURL=useIndexedDB.d.ts.map
@@ -1,16 +1,6 @@
1
1
  import { ILibraryStrings } from '../localization/ILibraryStrings';
2
- export interface ILocalizationContext {
3
- /** The underlying localization provider */
4
- provider: unknown;
5
- /** All resolved strings for the current locale */
6
- strings: ILibraryStrings;
7
- /** Current locale code */
8
- locale: string;
9
- /** Whether the current locale is RTL */
10
- isRtl: boolean;
11
- /** Change the active locale (triggers async bundle loading) */
12
- setLocale: (locale: string) => Promise<void>;
13
- }
2
+ import { ILocalizationContext } from '../models/IUseLocalizationStrings';
3
+ export type { ILocalizationContext } from '../models/IUseLocalizationStrings';
14
4
  export declare const LocalizationContext: import('react').Context<ILocalizationContext | undefined>;
15
5
  /**
16
6
  * Hook to access the full localization context
@@ -1,17 +1,10 @@
1
- import { LogLevel, ErrorType } from '../abstractions';
1
+ import { IUseLoggingReturn } from '../models/IUseLogging';
2
+ export type { IUseLoggingReturn } from '../models/IUseLogging';
2
3
  /**
3
4
  * Hook for logging operations
4
5
  * Uses the logging provider from the application context
5
6
  *
6
7
  * @returns Logging functions
7
8
  */
8
- export declare const useLogging: () => {
9
- log: (message: string, level?: LogLevel, data?: any) => void;
10
- error: (message: string, err?: Error, errorType?: ErrorType) => void;
11
- warn: (message: string, data?: any) => void;
12
- info: (message: string, data?: any) => void;
13
- verbose: (message: string, data?: any) => void;
14
- LogLevel: typeof LogLevel;
15
- ErrorType: typeof ErrorType;
16
- };
9
+ export declare const useLogging: () => IUseLoggingReturn;
17
10
  //# sourceMappingURL=useLogging.d.ts.map
@@ -1,3 +1,5 @@
1
+ import { IUsePollingReturn } from '../models/IUsePolling';
2
+ export type { IUsePollingReturn } from '../models/IUsePolling';
1
3
  /**
2
4
  * Hook for polling data at regular intervals
3
5
  *
@@ -5,9 +7,5 @@
5
7
  * @param interval - Polling interval in milliseconds
6
8
  * @param immediate - Whether to call immediately on mount
7
9
  */
8
- export declare const usePolling: (callback: () => void | Promise<void>, interval: number, immediate?: boolean) => {
9
- startPolling: () => void;
10
- stopPolling: () => void;
11
- isPolling: boolean;
12
- };
10
+ export declare const usePolling: (callback: () => void | Promise<void>, interval: number, immediate?: boolean) => IUsePollingReturn;
13
11
  //# sourceMappingURL=usePolling.d.ts.map
@@ -1,3 +1,5 @@
1
+ import { IUseTimeZoneHelperReturn } from '../models/IUseTimeZoneHelper';
2
+ export type { IUseTimeZoneHelperReturn } from '../models/IUseTimeZoneHelper';
1
3
  /**
2
4
  * Unified hook for timezone conversions and locale-aware date/time formatting.
3
5
  *
@@ -9,16 +11,5 @@
9
11
  * Falls back to the browser timezone when omitted.
10
12
  * @param locale - Optional locale code (e.g. 'en-US'). Defaults to 'en-US'.
11
13
  */
12
- export declare const useTimeZoneHelper: (timezone?: string, locale?: string) => {
13
- timeZone: string;
14
- convertToUserTimeZone: (date: Date, targetTimeZone?: string) => Date;
15
- convertFromUserTimeZone: (date: Date, sourceTimeZone?: string) => Date;
16
- formatInTimeZone: (date: Date, formatStr: string, targetTimeZone?: string) => string;
17
- getUserTimeZone: () => string;
18
- getFormatRelative: (date: Date | string) => string;
19
- convertDateToUTC: (date: Date | string) => Date;
20
- formatDate: (date: Date | string, formatString?: string) => string;
21
- getTimezoneOffset: () => number;
22
- convertToTimezone: (date: Date | string, tz?: string) => string;
23
- };
14
+ export declare const useTimeZoneHelper: (timezone?: string, locale?: string) => IUseTimeZoneHelperReturn;
24
15
  //# sourceMappingURL=useTimeZoneHelper.d.ts.map