@widgetic/embed-sdk 2.0.9 → 2.0.10

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.
@@ -9,10 +9,6 @@ export type WidgeticHostMessage = {
9
9
  compositionId: string;
10
10
  context: Record<string, string | number> | null;
11
11
  values: Record<string, string | number | boolean> | null;
12
- lang: string | null;
13
- dir: "ltr" | "rtl" | null;
14
- mode: "light" | "dark" | null;
15
- colors: Record<string, string> | null;
16
12
  mediaResolver: string | null;
17
13
  };
18
14
  export declare function buildWidgeticHostMessage(compositionId: string, fields: HostBridgeValidationResult): WidgeticHostMessage;
@@ -1,13 +1,15 @@
1
1
  /**
2
2
  * Validates `<widgetic>` host-bridge attributes (contract §1 limits).
3
+ *
4
+ * The page hands a widget its context, its values and a media resolver, and nothing about how the widget looks or
5
+ * which language it speaks: a widget keeps the language and the colours its author chose, whatever page it sits in.
6
+ * A partner's own language and colours belong to Widgetic's editors (`locale`, `messages` and `theme` of the
7
+ * `@widgetic/ui-sdk` modules), not to the widgets. So `lang`, `dir`, `mode` and `colors` on `<widgetic>` are not read
8
+ * (`lang` and `dir` stay what they are for any HTML element: they describe the tag on the page, not the widget).
3
9
  */
4
10
  export type HostBridgeFieldSnapshot = {
5
11
  context: Record<string, string | number> | null;
6
12
  values: Record<string, string | number | boolean> | null;
7
- lang: string | null;
8
- dir: "ltr" | "rtl" | null;
9
- mode: "light" | "dark" | null;
10
- colors: Record<string, string> | null;
11
13
  mediaResolver: string | null;
12
14
  };
13
15
  export type HostBridgeValidationResult = HostBridgeFieldSnapshot & {