@ahoo-wang/fetcher-viewer 3.3.8 → 3.4.0

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.
@@ -0,0 +1,29 @@
1
+ import { ButtonProps } from 'antd';
2
+ import { RefObject, ReactNode } from 'react';
3
+ export interface FullScreenProps extends Omit<ButtonProps, 'icon' | 'onClick' | 'onChange' | 'target'> {
4
+ /**
5
+ * Target element to make fullscreen. If not provided, uses the document root element.
6
+ */
7
+ target?: RefObject<HTMLElement | null>;
8
+ /**
9
+ * Callback when fullscreen state changes
10
+ */
11
+ onChange?: (isFullscreen: boolean) => void;
12
+ /**
13
+ * Custom icon for entering fullscreen
14
+ */
15
+ enterIcon?: ReactNode;
16
+ /**
17
+ * Custom icon for exiting fullscreen
18
+ */
19
+ exitIcon?: ReactNode;
20
+ }
21
+ /**
22
+ * A button component that toggles fullscreen mode.
23
+ * Follows the existing component patterns in the viewer package.
24
+ */
25
+ export declare function Fullscreen(props: FullScreenProps): import("react/jsx-runtime").JSX.Element;
26
+ export declare namespace Fullscreen {
27
+ var displayName: string;
28
+ }
29
+ //# sourceMappingURL=Fullscreen.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Fullscreen.d.ts","sourceRoot":"","sources":["../../../src/components/fullscreen/Fullscreen.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAU,WAAW,EAAE,MAAM,MAAM,CAAC;AAG3C,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE7C,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAC3C,WAAW,EACX,MAAM,GAAG,SAAS,GAAG,UAAU,GAAG,QAAQ,CAC3C;IACC;;OAEG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IACvC;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,YAAY,EAAE,OAAO,KAAK,IAAI,CAAC;IAC3C;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,2CAqBhD;yBArBe,UAAU"}
@@ -0,0 +1,4 @@
1
+ export * from './Fullscreen';
2
+ export * from './useFullscreen';
3
+ export * from './utils';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/fullscreen/index.ts"],"names":[],"mappings":"AAaA,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC"}
@@ -0,0 +1,35 @@
1
+ import { RefObject } from 'react';
2
+ export interface UseFullscreenOptions {
3
+ /**
4
+ * Target element to make fullscreen. If not provided, uses the document root element.
5
+ */
6
+ target?: RefObject<HTMLElement | null>;
7
+ /**
8
+ * Callback when fullscreen state changes
9
+ */
10
+ onChange?: (isFullscreen: boolean) => void;
11
+ }
12
+ export interface UseFullscreenReturn {
13
+ /**
14
+ * Whether the target element is currently in fullscreen mode
15
+ */
16
+ isFullscreen: boolean;
17
+ /**
18
+ * Toggle fullscreen mode on/off
19
+ */
20
+ toggle: () => Promise<void>;
21
+ /**
22
+ * Enter fullscreen mode
23
+ */
24
+ enter: () => Promise<void>;
25
+ /**
26
+ * Exit fullscreen mode
27
+ */
28
+ exit: () => Promise<void>;
29
+ }
30
+ /**
31
+ * React hook for managing fullscreen state and actions.
32
+ * Provides cross-browser fullscreen API support with automatic state tracking.
33
+ */
34
+ export declare function useFullscreen(options?: UseFullscreenOptions): UseFullscreenReturn;
35
+ //# sourceMappingURL=useFullscreen.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFullscreen.d.ts","sourceRoot":"","sources":["../../../src/components/fullscreen/useFullscreen.ts"],"names":[],"mappings":"AAaA,OAAO,EAAoC,SAAS,EAAE,MAAM,OAAO,CAAC;AASpE,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IACvC;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,YAAY,EAAE,OAAO,KAAK,IAAI,CAAC;CAC5C;AAED,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,YAAY,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,MAAM,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5B;;OAEG;IACH,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3B;;OAEG;IACH,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC3B;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,OAAO,GAAE,oBAAyB,GACjC,mBAAmB,CA8CrB"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Get the current fullscreen element across different browsers.
3
+ * @returns The fullscreen element or null if not in fullscreen.
4
+ */
5
+ export declare function getFullscreenElement(): HTMLElement | null;
6
+ /**
7
+ * Request fullscreen for a given element.
8
+ * @param element The element to make fullscreen.
9
+ * @throws Error if fullscreen request fails.
10
+ */
11
+ export declare function enterFullscreen(element: HTMLElement): Promise<void>;
12
+ /**
13
+ * Exit fullscreen mode.
14
+ * @throws Error if fullscreen exit fails.
15
+ */
16
+ export declare function exitFullscreen(): Promise<void>;
17
+ /**
18
+ * Add fullscreen change event listeners across different browsers.
19
+ * @param callback The callback function to execute when fullscreen changes.
20
+ */
21
+ export declare function addFullscreenChangeListener(callback: () => void): void;
22
+ /**
23
+ * Remove fullscreen change event listeners across different browsers.
24
+ * @param callback The callback function to remove.
25
+ */
26
+ export declare function removeFullscreenChangeListener(callback: () => void): void;
27
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/fullscreen/utils.ts"],"names":[],"mappings":"AAaA;;;GAGG;AACH,wBAAgB,oBAAoB,IAAI,WAAW,GAAG,IAAI,CAOzD;AAED;;;;GAIG;AACH,wBAAsB,eAAe,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAiBzE;AAED;;;GAGG;AACH,wBAAsB,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC,CAiBpD;AAED;;;GAGG;AACH,wBAAgB,2BAA2B,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,IAAI,CAKtE;AAED;;;GAGG;AACH,wBAAgB,8BAA8B,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,IAAI,CAKzE"}
@@ -1,4 +1,5 @@
1
1
  export * from './TagInput';
2
2
  export * from './NumberRange';
3
3
  export * from './RemoteSelect';
4
+ export * from './fullscreen';
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAaA,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAaA,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC"}