@amos.com/amos-js 0.3.0 → 0.3.2

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.
package/README.md CHANGED
@@ -181,7 +181,7 @@ form.update({
181
181
  });
182
182
  ```
183
183
 
184
- Only the variables you provide are sent; omitted variables keep their defaults.
184
+ `themeVariables` uses a **replace** model: each update that includes `themeVariables` sets the full override set. Only the variables you list are overridden; unlisted variables revert to iframe defaults. Omit `themeVariables` to leave existing overrides unchanged.
185
185
 
186
186
  ### Label placement
187
187
 
@@ -10,8 +10,10 @@ export declare function sendParentReadyMessage(iframe: Iframe): void;
10
10
  /**
11
11
  * Push appearance overrides into the embedded iframe.
12
12
  *
13
- * Only the provided `themeVariables` are sent; omitted variables keep
14
- * their defaults.
13
+ * Uses a replace model for `themeVariables`: each message that includes
14
+ * `themeVariables` sets the full override set. Only the listed variables
15
+ * are overridden; unlisted variables revert to iframe defaults. Omit
16
+ * `themeVariables` entirely to leave existing overrides unchanged.
15
17
  */
16
18
  export declare function updateAppearance({ iframe, appearance, }: {
17
19
  iframe: Iframe;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amos.com/amos-js",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "main": "dist/index.js",
5
5
  "repository": {
6
6
  "type": "git",
@@ -42,7 +42,7 @@
42
42
  "vite-plugin-dts": "4.5.4"
43
43
  },
44
44
  "dependencies": {
45
- "@amos.com/node": "0.1.6",
45
+ "@amos.com/node": "0.1.7",
46
46
  "@types/googlepay": "0.7.10"
47
47
  },
48
48
  "peerDependencies": {
package/src/messaging.ts CHANGED
@@ -19,8 +19,10 @@ export function sendParentReadyMessage(iframe: Iframe): void {
19
19
  /**
20
20
  * Push appearance overrides into the embedded iframe.
21
21
  *
22
- * Only the provided `themeVariables` are sent; omitted variables keep
23
- * their defaults.
22
+ * Uses a replace model for `themeVariables`: each message that includes
23
+ * `themeVariables` sets the full override set. Only the listed variables
24
+ * are overridden; unlisted variables revert to iframe defaults. Omit
25
+ * `themeVariables` entirely to leave existing overrides unchanged.
24
26
  */
25
27
  export function updateAppearance({
26
28
  iframe,