@inappstory/game-center-api 1.3.1 → 1.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.
@@ -31,6 +31,7 @@ export type GameLaunchConfig = {
31
31
  fullScreen: boolean;
32
32
  widescreen: boolean;
33
33
  lang: string;
34
+ dir?: "ltr" | "rtl";
34
35
  placeholders: Array<Placeholder>;
35
36
  safeAreaInsets: {
36
37
  bottom: number;
@@ -118,6 +118,11 @@ const createInitGame = (initLocalData, mounted = () => { }) => {
118
118
  if (gameLaunchConfig_1.gameLaunchConfig?.clientConfig?.nonce) {
119
119
  (0, createNonce_1.createNonce)(gameLaunchConfig_1.gameLaunchConfig?.clientConfig?.nonce);
120
120
  }
121
+ if (gameLaunchConfig_1.gameLaunchConfig?.clientConfig?.dir) {
122
+ // for web-sdk - set dir attribute from clientConfig
123
+ // bcz web-sdk cannot access to document.documentElement inside game iFrame
124
+ window.document.documentElement.dir = gameLaunchConfig_1.gameLaunchConfig?.clientConfig?.dir;
125
+ }
121
126
  await initLocalData();
122
127
  mounted();
123
128
  window.gameLoadingInfo.state = "after call initGame";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inappstory/game-center-api",
3
- "version": "1.3.1",
3
+ "version": "1.3.2",
4
4
  "description": "",
5
5
  "dependencies": {
6
6
  "semver": "^7.3.8",