zh-web-sdk 2.14.1 → 2.16.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,10 @@
1
+ ## Description
2
+
3
+ ## Solution
4
+
5
+ ## Result
6
+
7
+ ## Checklist
8
+
9
+ - [ ] CHANGELOG.md has been updated
10
+ - [ ] Official docs have been updated
package/CHANGELOG.md CHANGED
@@ -6,6 +6,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
8
 
9
+ ## [2.16.0] - 2026-02-20
10
+
11
+ ### Added
12
+ - Add dynamic styles for "Auth into Fund" integration
13
+
14
+ ## [2.15.0] - 2026-02-18
15
+
16
+ ### Added
17
+ - Add dynamic styles for "iframe" SDKs via postMessage
18
+
9
19
  ## [2.14.0] - 2026-01-16
10
20
 
11
21
  ### Added
@@ -0,0 +1,25 @@
1
+ import { CSSProperties } from "react";
2
+ export type StyleConfig = {
3
+ appWrapperStyle: CSSProperties;
4
+ modalStyle: CSSProperties;
5
+ iframeWrapperStyle: CSSProperties;
6
+ iframeStyle: CSSProperties;
7
+ };
8
+ /**
9
+ * Hook to manage style state and updates from postMessage events.
10
+ *
11
+ * Encapsulates:
12
+ * - Style state management (current styles and loaded status)
13
+ * - Style merging logic via postMessage
14
+ * - Origin validation
15
+ * - Fallback timeout to ensure modal displays even if STYLE_CONFIG is not received
16
+ *
17
+ * @param zeroHashAppURL - The app URL used for origin validation
18
+ * @param defaultStyles - Default style configuration to use as fallback
19
+ * @returns Object containing current styles, loaded status, and handler function
20
+ */
21
+ export declare const useStyleUpdates: (zeroHashAppURL: string, defaultStyles: StyleConfig) => {
22
+ styles: StyleConfig;
23
+ stylesLoaded: boolean;
24
+ handleStyleConfig: (incomingStyles: Partial<StyleConfig>, eventOrigin: string) => boolean;
25
+ };