@kalamba/sdk 0.48.2 → 0.49.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.
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  BSD 3-Clause License
2
2
 
3
- Copyright (c) 2024, Kalamba Games Limited
3
+ Copyright (c) 2026, Kalamba Games Limited
4
4
 
5
5
  Redistribution and use in source and binary forms, with or without
6
6
  modification, are permitted provided that the following conditions are met:
@@ -85,6 +85,5 @@ var TimeoutError = class extends Error {
85
85
  this.name = "TimeoutError";
86
86
  }
87
87
  };
88
-
89
88
  //#endregion
90
- export { TimeoutError as i, RgsErrorAction as n, RgsErrorCode as r, RgsError as t };
89
+ export { TimeoutError as i, RgsErrorAction as n, RgsErrorCode as r, RgsError as t };
@@ -2,7 +2,6 @@
2
2
  * BSD 3-Clause License
3
3
  * Copyright (c) 2026, Kalamba Games Limited
4
4
  */
5
-
6
5
  //#region src/common/errors.ts
7
6
  const RgsErrorCode = {
8
7
  CONNECTION_ERROR: "CONNECTION_ERROR",
@@ -86,29 +85,28 @@ var TimeoutError = class extends Error {
86
85
  this.name = "TimeoutError";
87
86
  }
88
87
  };
89
-
90
88
  //#endregion
91
- Object.defineProperty(exports, 'RgsError', {
92
- enumerable: true,
93
- get: function () {
94
- return RgsError;
95
- }
89
+ Object.defineProperty(exports, "RgsError", {
90
+ enumerable: true,
91
+ get: function() {
92
+ return RgsError;
93
+ }
96
94
  });
97
- Object.defineProperty(exports, 'RgsErrorAction', {
98
- enumerable: true,
99
- get: function () {
100
- return RgsErrorAction;
101
- }
95
+ Object.defineProperty(exports, "RgsErrorAction", {
96
+ enumerable: true,
97
+ get: function() {
98
+ return RgsErrorAction;
99
+ }
102
100
  });
103
- Object.defineProperty(exports, 'RgsErrorCode', {
104
- enumerable: true,
105
- get: function () {
106
- return RgsErrorCode;
107
- }
101
+ Object.defineProperty(exports, "RgsErrorCode", {
102
+ enumerable: true,
103
+ get: function() {
104
+ return RgsErrorCode;
105
+ }
106
+ });
107
+ Object.defineProperty(exports, "TimeoutError", {
108
+ enumerable: true,
109
+ get: function() {
110
+ return TimeoutError;
111
+ }
108
112
  });
109
- Object.defineProperty(exports, 'TimeoutError', {
110
- enumerable: true,
111
- get: function () {
112
- return TimeoutError;
113
- }
114
- });
@@ -6,7 +6,6 @@
6
6
  function coinsToMoney(coins, coinValueInCents) {
7
7
  return coins * coinValueInCents / 100;
8
8
  }
9
-
10
9
  //#endregion
11
10
  //#region ../../libs/common/src/utils/format/number.ts
12
11
  function formatNumberPure(config, number, options) {
@@ -22,20 +21,6 @@ function formatNumberPure(config, number, options) {
22
21
  return `${number}`;
23
22
  }
24
23
  }
25
-
26
- //#endregion
27
- //#region ../../libs/common/src/utils/format/currency.ts
28
- const CUSTOM_CURRENCY_CODE = "XTS";
29
- let CurrencyFormat = /* @__PURE__ */ function(CurrencyFormat) {
30
- CurrencyFormat["Currency"] = "Currency";
31
- CurrencyFormat["Number"] = "Number";
32
- return CurrencyFormat;
33
- }({});
34
- let CurrencyNumber = /* @__PURE__ */ function(CurrencyNumber) {
35
- CurrencyNumber["Coins"] = "Coins";
36
- CurrencyNumber["Money"] = "Money";
37
- return CurrencyNumber;
38
- }({});
39
24
  const CUSTOM_CURRENCIES = {
40
25
  ARSB: {
41
26
  displayAs: "ARS",
@@ -327,12 +312,12 @@ const CUSTOM_CURRENCIES = {
327
312
  minimumFractionDigits: 2
328
313
  },
329
314
  EEGP: {
330
- displayAs: "EP",
315
+ displayAs: "RC",
331
316
  maximumFractionDigits: 2,
332
317
  minimumFractionDigits: 2
333
318
  },
334
319
  EPGP: {
335
- displayAs: "PP",
320
+ displayAs: "GC",
336
321
  maximumFractionDigits: 2,
337
322
  minimumFractionDigits: 2
338
323
  },
@@ -356,6 +341,16 @@ const CUSTOM_CURRENCIES = {
356
341
  maximumFractionDigits: 2,
357
342
  minimumFractionDigits: 2
358
343
  },
344
+ PGSC: {
345
+ displayAs: "SC",
346
+ maximumFractionDigits: 2,
347
+ minimumFractionDigits: 2
348
+ },
349
+ PGGC: {
350
+ displayAs: "GC",
351
+ maximumFractionDigits: 2,
352
+ minimumFractionDigits: 2
353
+ },
359
354
  FC: {
360
355
  displayAs: "",
361
356
  maximumFractionDigits: 2,
@@ -442,6 +437,10 @@ const CUSTOM_CURRENCIES = {
442
437
  IRR: {
443
438
  maximumFractionDigits: 2,
444
439
  minimumFractionDigits: 2
440
+ },
441
+ AFN: {
442
+ maximumFractionDigits: 2,
443
+ minimumFractionDigits: 2
445
444
  }
446
445
  };
447
446
  function isCustomCurrency(currency) {
@@ -450,13 +449,13 @@ function isCustomCurrency(currency) {
450
449
  function getCurrencyNumberFormatOptions(currency) {
451
450
  if (isCustomCurrency(currency)) return {
452
451
  ...CUSTOM_CURRENCIES[currency],
453
- currency: CUSTOM_CURRENCY_CODE
452
+ currency: "XTS"
454
453
  };
455
454
  return { currency };
456
455
  }
457
456
  function formatCurrencyAsCurrency(number, currencyFormatter, currency) {
458
457
  const formattedNumber = currencyFormatter.format(+number);
459
- if (isCustomCurrency(currency)) return formattedNumber.replace(CUSTOM_CURRENCY_CODE, CUSTOM_CURRENCIES[currency]?.displayAs ?? currency);
458
+ if (isCustomCurrency(currency)) return formattedNumber.replace("XTS", CUSTOM_CURRENCIES[currency]?.displayAs ?? currency);
460
459
  return formattedNumber;
461
460
  }
462
461
  function formatCurrencyAsNumberPure(config, number, currencyFormatter) {
@@ -466,18 +465,18 @@ function formatCurrencyAsNumberPure(config, number, currencyFormatter) {
466
465
  minimumFractionDigits
467
466
  });
468
467
  }
469
- function formatCurrencyAsFallbackPure(config, number, { as } = { as: CurrencyFormat.Currency }) {
468
+ function formatCurrencyAsFallbackPure(config, number, { as } = { as: "Currency" }) {
470
469
  const { canShowCurrency, currency } = config;
471
- if (as === CurrencyFormat.Number || !canShowCurrency) return `${number}`;
470
+ if (as === "Number" || !canShowCurrency) return `${number}`;
472
471
  return `${number} ${currency}`;
473
472
  }
474
473
  function formatCurrencyPure(config, number, { as, from } = {
475
- as: CurrencyFormat.Currency,
476
- from: CurrencyNumber.Money
474
+ as: "Currency",
475
+ from: "Money"
477
476
  }, formatOptions) {
478
477
  if (!["string", "number"].includes(typeof number)) return "NaN";
479
478
  const { canShowCurrency = true, coinValueInCents = 1, currency, locales } = config;
480
- if (from === CurrencyNumber.Coins) number = coinsToMoney(+number, coinValueInCents);
479
+ if (from === "Coins") number = coinsToMoney(+number, coinValueInCents);
481
480
  try {
482
481
  const options = getCurrencyNumberFormatOptions(currency);
483
482
  const currencyFormatter = new Intl.NumberFormat(locales, {
@@ -487,13 +486,12 @@ function formatCurrencyPure(config, number, { as, from } = {
487
486
  numberingSystem: "latn",
488
487
  style: "currency"
489
488
  });
490
- if (as === CurrencyFormat.Number || !canShowCurrency) return formatCurrencyAsNumberPure(config, number, currencyFormatter);
489
+ if (as === "Number" || !canShowCurrency) return formatCurrencyAsNumberPure(config, number, currencyFormatter);
491
490
  return formatCurrencyAsCurrency(number, currencyFormatter, currency);
492
491
  } catch {
493
492
  return formatCurrencyAsFallbackPure(config, number, { as });
494
493
  }
495
494
  }
496
-
497
495
  //#endregion
498
496
  //#region src/common/i18n.ts
499
497
  var I18n = class {
@@ -505,41 +503,45 @@ var I18n = class {
505
503
  return formatNumberPure({ locales: [this.#config.ui.language] }, number, formatOptions);
506
504
  }
507
505
  formatCurrency(number, options = {
508
- as: CurrencyFormat.Currency,
509
- from: CurrencyNumber.Money
506
+ as: "Currency",
507
+ from: "Money"
510
508
  }, formatOptions) {
511
509
  return formatCurrencyPure({
512
510
  canShowCurrency: this.#config.ui.feature.showCurrency,
513
511
  coinValueInCents: this.#config.api.coinValueInCents,
514
- currency: this.#config.api.currency || CUSTOM_CURRENCY_CODE,
512
+ currency: this.#config.api.currency || "XTS",
515
513
  locales: [this.#config.ui.language]
516
514
  }, number, options, formatOptions);
517
515
  }
518
516
  formatCoins(amount, formatOptions) {
519
517
  return this.formatCurrency(amount, {
520
- as: CurrencyFormat.Number,
521
- from: CurrencyNumber.Coins
518
+ as: "Number",
519
+ from: "Coins"
522
520
  }, formatOptions);
523
521
  }
524
522
  formatCoinsWithCurrency(amount, formatOptions) {
525
523
  return this.formatCurrency(amount, {
526
- as: CurrencyFormat.Currency,
527
- from: CurrencyNumber.Coins
524
+ as: "Currency",
525
+ from: "Coins"
528
526
  }, formatOptions);
529
527
  }
530
528
  formatMoney(amount, formatOptions) {
531
529
  return this.formatCurrency(amount, {
532
- as: CurrencyFormat.Number,
533
- from: CurrencyNumber.Money
530
+ as: "Number",
531
+ from: "Money"
534
532
  }, formatOptions);
535
533
  }
536
534
  formatMoneyWithCurrency(amount, formatOptions) {
537
535
  return this.formatCurrency(amount, {
538
- as: CurrencyFormat.Currency,
539
- from: CurrencyNumber.Money
536
+ as: "Currency",
537
+ from: "Money"
540
538
  }, formatOptions);
541
539
  }
542
540
  };
543
-
544
541
  //#endregion
545
- export { I18n as t };
542
+ Object.defineProperty(exports, "I18n", {
543
+ enumerable: true,
544
+ get: function() {
545
+ return I18n;
546
+ }
547
+ });
@@ -2,12 +2,10 @@
2
2
  * BSD 3-Clause License
3
3
  * Copyright (c) 2026, Kalamba Games Limited
4
4
  */
5
-
6
5
  //#region ../../libs/common/src/utils/coinsToMoney.tsx
7
6
  function coinsToMoney(coins, coinValueInCents) {
8
7
  return coins * coinValueInCents / 100;
9
8
  }
10
-
11
9
  //#endregion
12
10
  //#region ../../libs/common/src/utils/format/number.ts
13
11
  function formatNumberPure(config, number, options) {
@@ -23,20 +21,6 @@ function formatNumberPure(config, number, options) {
23
21
  return `${number}`;
24
22
  }
25
23
  }
26
-
27
- //#endregion
28
- //#region ../../libs/common/src/utils/format/currency.ts
29
- const CUSTOM_CURRENCY_CODE = "XTS";
30
- let CurrencyFormat = /* @__PURE__ */ function(CurrencyFormat) {
31
- CurrencyFormat["Currency"] = "Currency";
32
- CurrencyFormat["Number"] = "Number";
33
- return CurrencyFormat;
34
- }({});
35
- let CurrencyNumber = /* @__PURE__ */ function(CurrencyNumber) {
36
- CurrencyNumber["Coins"] = "Coins";
37
- CurrencyNumber["Money"] = "Money";
38
- return CurrencyNumber;
39
- }({});
40
24
  const CUSTOM_CURRENCIES = {
41
25
  ARSB: {
42
26
  displayAs: "ARS",
@@ -328,12 +312,12 @@ const CUSTOM_CURRENCIES = {
328
312
  minimumFractionDigits: 2
329
313
  },
330
314
  EEGP: {
331
- displayAs: "EP",
315
+ displayAs: "RC",
332
316
  maximumFractionDigits: 2,
333
317
  minimumFractionDigits: 2
334
318
  },
335
319
  EPGP: {
336
- displayAs: "PP",
320
+ displayAs: "GC",
337
321
  maximumFractionDigits: 2,
338
322
  minimumFractionDigits: 2
339
323
  },
@@ -357,6 +341,16 @@ const CUSTOM_CURRENCIES = {
357
341
  maximumFractionDigits: 2,
358
342
  minimumFractionDigits: 2
359
343
  },
344
+ PGSC: {
345
+ displayAs: "SC",
346
+ maximumFractionDigits: 2,
347
+ minimumFractionDigits: 2
348
+ },
349
+ PGGC: {
350
+ displayAs: "GC",
351
+ maximumFractionDigits: 2,
352
+ minimumFractionDigits: 2
353
+ },
360
354
  FC: {
361
355
  displayAs: "",
362
356
  maximumFractionDigits: 2,
@@ -443,6 +437,10 @@ const CUSTOM_CURRENCIES = {
443
437
  IRR: {
444
438
  maximumFractionDigits: 2,
445
439
  minimumFractionDigits: 2
440
+ },
441
+ AFN: {
442
+ maximumFractionDigits: 2,
443
+ minimumFractionDigits: 2
446
444
  }
447
445
  };
448
446
  function isCustomCurrency(currency) {
@@ -451,13 +449,13 @@ function isCustomCurrency(currency) {
451
449
  function getCurrencyNumberFormatOptions(currency) {
452
450
  if (isCustomCurrency(currency)) return {
453
451
  ...CUSTOM_CURRENCIES[currency],
454
- currency: CUSTOM_CURRENCY_CODE
452
+ currency: "XTS"
455
453
  };
456
454
  return { currency };
457
455
  }
458
456
  function formatCurrencyAsCurrency(number, currencyFormatter, currency) {
459
457
  const formattedNumber = currencyFormatter.format(+number);
460
- if (isCustomCurrency(currency)) return formattedNumber.replace(CUSTOM_CURRENCY_CODE, CUSTOM_CURRENCIES[currency]?.displayAs ?? currency);
458
+ if (isCustomCurrency(currency)) return formattedNumber.replace("XTS", CUSTOM_CURRENCIES[currency]?.displayAs ?? currency);
461
459
  return formattedNumber;
462
460
  }
463
461
  function formatCurrencyAsNumberPure(config, number, currencyFormatter) {
@@ -467,18 +465,18 @@ function formatCurrencyAsNumberPure(config, number, currencyFormatter) {
467
465
  minimumFractionDigits
468
466
  });
469
467
  }
470
- function formatCurrencyAsFallbackPure(config, number, { as } = { as: CurrencyFormat.Currency }) {
468
+ function formatCurrencyAsFallbackPure(config, number, { as } = { as: "Currency" }) {
471
469
  const { canShowCurrency, currency } = config;
472
- if (as === CurrencyFormat.Number || !canShowCurrency) return `${number}`;
470
+ if (as === "Number" || !canShowCurrency) return `${number}`;
473
471
  return `${number} ${currency}`;
474
472
  }
475
473
  function formatCurrencyPure(config, number, { as, from } = {
476
- as: CurrencyFormat.Currency,
477
- from: CurrencyNumber.Money
474
+ as: "Currency",
475
+ from: "Money"
478
476
  }, formatOptions) {
479
477
  if (!["string", "number"].includes(typeof number)) return "NaN";
480
478
  const { canShowCurrency = true, coinValueInCents = 1, currency, locales } = config;
481
- if (from === CurrencyNumber.Coins) number = coinsToMoney(+number, coinValueInCents);
479
+ if (from === "Coins") number = coinsToMoney(+number, coinValueInCents);
482
480
  try {
483
481
  const options = getCurrencyNumberFormatOptions(currency);
484
482
  const currencyFormatter = new Intl.NumberFormat(locales, {
@@ -488,13 +486,12 @@ function formatCurrencyPure(config, number, { as, from } = {
488
486
  numberingSystem: "latn",
489
487
  style: "currency"
490
488
  });
491
- if (as === CurrencyFormat.Number || !canShowCurrency) return formatCurrencyAsNumberPure(config, number, currencyFormatter);
489
+ if (as === "Number" || !canShowCurrency) return formatCurrencyAsNumberPure(config, number, currencyFormatter);
492
490
  return formatCurrencyAsCurrency(number, currencyFormatter, currency);
493
491
  } catch {
494
492
  return formatCurrencyAsFallbackPure(config, number, { as });
495
493
  }
496
494
  }
497
-
498
495
  //#endregion
499
496
  //#region src/common/i18n.ts
500
497
  var I18n = class {
@@ -506,46 +503,40 @@ var I18n = class {
506
503
  return formatNumberPure({ locales: [this.#config.ui.language] }, number, formatOptions);
507
504
  }
508
505
  formatCurrency(number, options = {
509
- as: CurrencyFormat.Currency,
510
- from: CurrencyNumber.Money
506
+ as: "Currency",
507
+ from: "Money"
511
508
  }, formatOptions) {
512
509
  return formatCurrencyPure({
513
510
  canShowCurrency: this.#config.ui.feature.showCurrency,
514
511
  coinValueInCents: this.#config.api.coinValueInCents,
515
- currency: this.#config.api.currency || CUSTOM_CURRENCY_CODE,
512
+ currency: this.#config.api.currency || "XTS",
516
513
  locales: [this.#config.ui.language]
517
514
  }, number, options, formatOptions);
518
515
  }
519
516
  formatCoins(amount, formatOptions) {
520
517
  return this.formatCurrency(amount, {
521
- as: CurrencyFormat.Number,
522
- from: CurrencyNumber.Coins
518
+ as: "Number",
519
+ from: "Coins"
523
520
  }, formatOptions);
524
521
  }
525
522
  formatCoinsWithCurrency(amount, formatOptions) {
526
523
  return this.formatCurrency(amount, {
527
- as: CurrencyFormat.Currency,
528
- from: CurrencyNumber.Coins
524
+ as: "Currency",
525
+ from: "Coins"
529
526
  }, formatOptions);
530
527
  }
531
528
  formatMoney(amount, formatOptions) {
532
529
  return this.formatCurrency(amount, {
533
- as: CurrencyFormat.Number,
534
- from: CurrencyNumber.Money
530
+ as: "Number",
531
+ from: "Money"
535
532
  }, formatOptions);
536
533
  }
537
534
  formatMoneyWithCurrency(amount, formatOptions) {
538
535
  return this.formatCurrency(amount, {
539
- as: CurrencyFormat.Currency,
540
- from: CurrencyNumber.Money
536
+ as: "Currency",
537
+ from: "Money"
541
538
  }, formatOptions);
542
539
  }
543
540
  };
544
-
545
541
  //#endregion
546
- Object.defineProperty(exports, 'I18n', {
547
- enumerable: true,
548
- get: function () {
549
- return I18n;
550
- }
551
- });
542
+ export { I18n as t };
@@ -2,7 +2,7 @@
2
2
  * BSD 3-Clause License
3
3
  * Copyright (c) 2026, Kalamba Games Limited
4
4
  */
5
- import { A as OpenGameRequest, C as FreeRoundsResponse, N as PlayRequestEnhanced, P as PlayResponse, S as FreeRoundsRequest, W as RgsErrorWithType, _ as ForwardToPluginsMessagePayload, c as ContractPlayPayload, f as DomainMessagePayload, h as ForwardToPluginsMessage, it as WrapperState, j as OpenGameResponse, nt as WrapperConfig, q as SdkConfig, t as I18n, u as DomainMessage, w as GetBalanceResponse } from "./i18n-BSkfwQSR.js";
5
+ import { A as OpenGameRequest, C as FreeRoundsResponse, N as PlayRequestEnhanced, P as PlayResponse, S as FreeRoundsRequest, W as RgsErrorWithType, _ as ForwardToPluginsMessagePayload, c as ContractPlayPayload, f as DomainMessagePayload, h as ForwardToPluginsMessage, it as WrapperState, j as OpenGameResponse, nt as WrapperConfig, q as SdkConfig, t as I18n, u as DomainMessage, w as GetBalanceResponse } from "./i18n-C0dYZPiy.js";
6
6
 
7
7
  //#region src/common/logger.d.ts
8
8
  declare function createLogger(prefix: string, style: string): (message: string, ...args: any[]) => void;
@@ -2,7 +2,7 @@
2
2
  * BSD 3-Clause License
3
3
  * Copyright (c) 2026, Kalamba Games Limited
4
4
  */
5
- import { A as OpenGameRequest, C as FreeRoundsResponse, N as PlayRequestEnhanced, P as PlayResponse, S as FreeRoundsRequest, W as RgsErrorWithType, _ as ForwardToPluginsMessagePayload, c as ContractPlayPayload, f as DomainMessagePayload, h as ForwardToPluginsMessage, it as WrapperState, j as OpenGameResponse, nt as WrapperConfig, q as SdkConfig, t as I18n, u as DomainMessage, w as GetBalanceResponse } from "./i18n-Dmb3OPNy.cjs";
5
+ import { A as OpenGameRequest, C as FreeRoundsResponse, N as PlayRequestEnhanced, P as PlayResponse, S as FreeRoundsRequest, W as RgsErrorWithType, _ as ForwardToPluginsMessagePayload, c as ContractPlayPayload, f as DomainMessagePayload, h as ForwardToPluginsMessage, it as WrapperState, j as OpenGameResponse, nt as WrapperConfig, q as SdkConfig, t as I18n, u as DomainMessage, w as GetBalanceResponse } from "./i18n-C0dYZPiy.cjs";
6
6
 
7
7
  //#region src/common/logger.d.ts
8
8
  declare function createLogger(prefix: string, style: string): (message: string, ...args: any[]) => void;
package/dist/index.cjs CHANGED
@@ -2,14 +2,11 @@
2
2
  * BSD 3-Clause License
3
3
  * Copyright (c) 2026, Kalamba Games Limited
4
4
  */
5
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
6
- const require_errors = require('./errors-DXZbBm5R.cjs');
7
- const require_i18n = require('./i18n-C_kZhl3l.cjs');
5
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
6
+ const require_errors = require("./errors-S8tSAaOC.cjs");
7
+ const require_i18n = require("./i18n-BTrBMC_j.cjs");
8
8
  let lodash_es = require("lodash-es");
9
-
10
9
  //#region src/sdk/KalambaSdk.ts
11
- const logIn = () => {};
12
- const logOut = () => {};
13
10
  const passThroughCodec = {
14
11
  encode: (value) => value,
15
12
  decode: (value) => value
@@ -61,7 +58,7 @@ var KalambaSdk = class {
61
58
  on(message, listener, options) {
62
59
  const onMessage = function onMessage(event) {
63
60
  if (event.data.message !== `kalamba:wrapper:${message}`) return;
64
- logIn("on", event.data.message.replace(/^kalamba:/, ""), event.data.payload);
61
+ event.data.message.replace(/^kalamba:/, ""), event.data.payload;
65
62
  listener(event.data.payload);
66
63
  if (options?.once) window.removeEventListener("message", onMessage);
67
64
  };
@@ -69,7 +66,6 @@ var KalambaSdk = class {
69
66
  return () => window.removeEventListener("message", onMessage);
70
67
  }
71
68
  send(message, ...[payload]) {
72
- logOut("send", message, payload);
73
69
  this.#messagePort.postMessage({
74
70
  message: `kalamba:sdk:${message}`,
75
71
  payload
@@ -80,7 +76,7 @@ var KalambaSdk = class {
80
76
  this.on("wrapperConfigured", () => resolve(), { once: true });
81
77
  this.send("configure", {
82
78
  ...payload,
83
- sdkVersion: "0.48.2"
79
+ sdkVersion: "0.49.0"
84
80
  });
85
81
  });
86
82
  }
@@ -114,10 +110,9 @@ var KalambaSdk = class {
114
110
  else throw new require_errors.RgsError(responseData.error.data);
115
111
  }
116
112
  };
117
-
118
113
  //#endregion
119
114
  exports.I18n = require_i18n.I18n;
120
115
  exports.KalambaSdk = KalambaSdk;
121
116
  exports.RgsError = require_errors.RgsError;
122
117
  exports.RgsErrorCode = require_errors.RgsErrorCode;
123
- exports.TimeoutError = require_errors.TimeoutError;
118
+ exports.TimeoutError = require_errors.TimeoutError;
package/dist/index.d.cts CHANGED
@@ -2,7 +2,7 @@
2
2
  * BSD 3-Clause License
3
3
  * Copyright (c) 2026, Kalamba Games Limited
4
4
  */
5
- import { $ as ToRgsPluginsForwardedMessageMap, A as OpenGameRequest, B as PrefixedMessagePayload, C as FreeRoundsResponse, D as MessageMap, E as Message, F as PluginDomain, G as RgsOnlyMessagePayloadMap, H as RealityCheckConfig, I as PrefixedForwardToPluginsMessage, J as SdkError, K as RgsResponse, L as PrefixedMessage, M as PlayRequest, N as PlayRequestEnhanced, O as MessageMessageEvent, P as PlayResponse, Q as ToCasinoPluginsForwardedMessageMap, R as PrefixedMessageMap, S as FreeRoundsRequest, T as History, U as RgsErrorData, V as PrefixedMessagePayloadMap, W as RgsErrorWithType, X as Settings, Y as SdkOnlyMessagePayloadMap, Z as TelemetryOnlyMessagePayloadMap, _ as ForwardToPluginsMessagePayload, a as CashierConfig, b as FreeRound, c as ContractPlayPayload, ct as TimeoutError, d as DomainMessageMessageEvent, dt as FormatCurrencyOptions, et as ToSdkForwardedMessageMap, f as DomainMessagePayload, g as ForwardToPluginsMessageMap, h as ForwardToPluginsMessage, i as Cashier, it as WrapperState, j as OpenGameResponse, k as MessagePayload, l as DomainAllowedPayloadMap, lt as CurrencyFormat, m as DomainToMessagePayloadMap, n as AutoplayLimit, nt as WrapperConfig, o as CasinoOnlyMessagePayloadMap, ot as RgsError, p as DomainPrefix, q as SdkConfig, r as Bet, rt as WrapperOnlyMessagePayloadMap, s as ContractOpenGamePayload, st as RgsErrorCode, t as I18n, tt as ToTelemetryPluginsForwardedMessageMap, u as DomainMessage, ut as CurrencyNumber, v as ForwardToSdkMessage, w as GetBalanceResponse, x as FreeRoundsAction, y as ForwardToSdkMessagePayload, z as PrefixedMessageMessageEvent } from "./i18n-Dmb3OPNy.cjs";
5
+ import { $ as ToRgsPluginsForwardedMessageMap, A as OpenGameRequest, B as PrefixedMessagePayload, C as FreeRoundsResponse, D as MessageMap, E as Message, F as PluginDomain, G as RgsOnlyMessagePayloadMap, H as RealityCheckConfig, I as PrefixedForwardToPluginsMessage, J as SdkError, K as RgsResponse, L as PrefixedMessage, M as PlayRequest, N as PlayRequestEnhanced, O as MessageMessageEvent, P as PlayResponse, Q as ToCasinoPluginsForwardedMessageMap, R as PrefixedMessageMap, S as FreeRoundsRequest, T as History, U as RgsErrorData, V as PrefixedMessagePayloadMap, W as RgsErrorWithType, X as Settings, Y as SdkOnlyMessagePayloadMap, Z as TelemetryOnlyMessagePayloadMap, _ as ForwardToPluginsMessagePayload, a as CashierConfig, b as FreeRound, c as ContractPlayPayload, ct as TimeoutError, d as DomainMessageMessageEvent, dt as FormatCurrencyOptions, et as ToSdkForwardedMessageMap, f as DomainMessagePayload, g as ForwardToPluginsMessageMap, h as ForwardToPluginsMessage, i as Cashier, it as WrapperState, j as OpenGameResponse, k as MessagePayload, l as DomainAllowedPayloadMap, lt as CurrencyFormat, m as DomainToMessagePayloadMap, n as AutoplayLimit, nt as WrapperConfig, o as CasinoOnlyMessagePayloadMap, ot as RgsError, p as DomainPrefix, q as SdkConfig, r as Bet, rt as WrapperOnlyMessagePayloadMap, s as ContractOpenGamePayload, st as RgsErrorCode, t as I18n, tt as ToTelemetryPluginsForwardedMessageMap, u as DomainMessage, ut as CurrencyNumber, v as ForwardToSdkMessage, w as GetBalanceResponse, x as FreeRoundsAction, y as ForwardToSdkMessagePayload, z as PrefixedMessageMessageEvent } from "./i18n-C0dYZPiy.cjs";
6
6
 
7
7
  //#region src/sdk/KalambaSdk.d.ts
8
8
  type MessageType = 'openGame' | 'play';
@@ -44,4 +44,4 @@ declare class KalambaSdk<TCodecs extends Codecs = typeof defaultCodecs> {
44
44
  play(contract: ContractPlayPayload, extra?: Parameters<TCodecs['play']['request']['encode']>[0]): Promise<PlayResponse<ReturnType<TCodecs['play']['response']['decode']>>>;
45
45
  }
46
46
  //#endregion
47
- export { AutoplayLimit, Bet, Cashier, CashierConfig, CasinoOnlyMessagePayloadMap, type Codecs, ContractOpenGamePayload, ContractPlayPayload, CurrencyFormat, CurrencyNumber, DomainAllowedPayloadMap, DomainMessage, DomainMessageMessageEvent, DomainMessagePayload, DomainPrefix, DomainToMessagePayloadMap, FormatCurrencyOptions, ForwardToPluginsMessage, ForwardToPluginsMessageMap, ForwardToPluginsMessagePayload, ForwardToSdkMessage, ForwardToSdkMessagePayload, FreeRound, FreeRoundsAction, FreeRoundsRequest, FreeRoundsResponse, GetBalanceResponse, History, I18n, KalambaSdk, Message, MessageMap, MessageMessageEvent, MessagePayload, OpenGameRequest, OpenGameResponse, PlayRequest, PlayRequestEnhanced, PlayResponse, PluginDomain, PrefixedForwardToPluginsMessage, PrefixedMessage, PrefixedMessageMap, PrefixedMessageMessageEvent, PrefixedMessagePayload, PrefixedMessagePayloadMap, RealityCheckConfig, RgsError, RgsErrorCode, RgsErrorData, RgsErrorWithType, RgsOnlyMessagePayloadMap, RgsResponse, SdkConfig, SdkError, SdkOnlyMessagePayloadMap, Settings, TelemetryOnlyMessagePayloadMap, TimeoutError, ToCasinoPluginsForwardedMessageMap, ToRgsPluginsForwardedMessageMap, ToSdkForwardedMessageMap, ToTelemetryPluginsForwardedMessageMap, WrapperConfig, WrapperOnlyMessagePayloadMap, WrapperState };
47
+ export { type AutoplayLimit, type Bet, type Cashier, type CashierConfig, type CasinoOnlyMessagePayloadMap, type Codecs, type ContractOpenGamePayload, type ContractPlayPayload, type CurrencyFormat, type CurrencyNumber, type DomainAllowedPayloadMap, type DomainMessage, type DomainMessageMessageEvent, type DomainMessagePayload, type DomainPrefix, type DomainToMessagePayloadMap, type FormatCurrencyOptions, type ForwardToPluginsMessage, type ForwardToPluginsMessageMap, type ForwardToPluginsMessagePayload, type ForwardToSdkMessage, type ForwardToSdkMessagePayload, type FreeRound, type FreeRoundsAction, type FreeRoundsRequest, type FreeRoundsResponse, type GetBalanceResponse, type History, I18n, KalambaSdk, type Message, type MessageMap, type MessageMessageEvent, type MessagePayload, type OpenGameRequest, type OpenGameResponse, type PlayRequest, type PlayRequestEnhanced, type PlayResponse, type PluginDomain, type PrefixedForwardToPluginsMessage, type PrefixedMessage, type PrefixedMessageMap, type PrefixedMessageMessageEvent, type PrefixedMessagePayload, type PrefixedMessagePayloadMap, type RealityCheckConfig, RgsError, RgsErrorCode, type RgsErrorData, type RgsErrorWithType, type RgsOnlyMessagePayloadMap, type RgsResponse, type SdkConfig, type SdkError, type SdkOnlyMessagePayloadMap, type Settings, type TelemetryOnlyMessagePayloadMap, TimeoutError, type ToCasinoPluginsForwardedMessageMap, type ToRgsPluginsForwardedMessageMap, type ToSdkForwardedMessageMap, type ToTelemetryPluginsForwardedMessageMap, type WrapperConfig, type WrapperOnlyMessagePayloadMap, type WrapperState };
package/dist/index.d.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  * BSD 3-Clause License
3
3
  * Copyright (c) 2026, Kalamba Games Limited
4
4
  */
5
- import { $ as ToRgsPluginsForwardedMessageMap, A as OpenGameRequest, B as PrefixedMessagePayload, C as FreeRoundsResponse, D as MessageMap, E as Message, F as PluginDomain, G as RgsOnlyMessagePayloadMap, H as RealityCheckConfig, I as PrefixedForwardToPluginsMessage, J as SdkError, K as RgsResponse, L as PrefixedMessage, M as PlayRequest, N as PlayRequestEnhanced, O as MessageMessageEvent, P as PlayResponse, Q as ToCasinoPluginsForwardedMessageMap, R as PrefixedMessageMap, S as FreeRoundsRequest, T as History, U as RgsErrorData, V as PrefixedMessagePayloadMap, W as RgsErrorWithType, X as Settings, Y as SdkOnlyMessagePayloadMap, Z as TelemetryOnlyMessagePayloadMap, _ as ForwardToPluginsMessagePayload, a as CashierConfig, b as FreeRound, c as ContractPlayPayload, ct as TimeoutError, d as DomainMessageMessageEvent, dt as FormatCurrencyOptions, et as ToSdkForwardedMessageMap, f as DomainMessagePayload, g as ForwardToPluginsMessageMap, h as ForwardToPluginsMessage, i as Cashier, it as WrapperState, j as OpenGameResponse, k as MessagePayload, l as DomainAllowedPayloadMap, lt as CurrencyFormat, m as DomainToMessagePayloadMap, n as AutoplayLimit, nt as WrapperConfig, o as CasinoOnlyMessagePayloadMap, ot as RgsError, p as DomainPrefix, q as SdkConfig, r as Bet, rt as WrapperOnlyMessagePayloadMap, s as ContractOpenGamePayload, st as RgsErrorCode, t as I18n, tt as ToTelemetryPluginsForwardedMessageMap, u as DomainMessage, ut as CurrencyNumber, v as ForwardToSdkMessage, w as GetBalanceResponse, x as FreeRoundsAction, y as ForwardToSdkMessagePayload, z as PrefixedMessageMessageEvent } from "./i18n-BSkfwQSR.js";
5
+ import { $ as ToRgsPluginsForwardedMessageMap, A as OpenGameRequest, B as PrefixedMessagePayload, C as FreeRoundsResponse, D as MessageMap, E as Message, F as PluginDomain, G as RgsOnlyMessagePayloadMap, H as RealityCheckConfig, I as PrefixedForwardToPluginsMessage, J as SdkError, K as RgsResponse, L as PrefixedMessage, M as PlayRequest, N as PlayRequestEnhanced, O as MessageMessageEvent, P as PlayResponse, Q as ToCasinoPluginsForwardedMessageMap, R as PrefixedMessageMap, S as FreeRoundsRequest, T as History, U as RgsErrorData, V as PrefixedMessagePayloadMap, W as RgsErrorWithType, X as Settings, Y as SdkOnlyMessagePayloadMap, Z as TelemetryOnlyMessagePayloadMap, _ as ForwardToPluginsMessagePayload, a as CashierConfig, b as FreeRound, c as ContractPlayPayload, ct as TimeoutError, d as DomainMessageMessageEvent, dt as FormatCurrencyOptions, et as ToSdkForwardedMessageMap, f as DomainMessagePayload, g as ForwardToPluginsMessageMap, h as ForwardToPluginsMessage, i as Cashier, it as WrapperState, j as OpenGameResponse, k as MessagePayload, l as DomainAllowedPayloadMap, lt as CurrencyFormat, m as DomainToMessagePayloadMap, n as AutoplayLimit, nt as WrapperConfig, o as CasinoOnlyMessagePayloadMap, ot as RgsError, p as DomainPrefix, q as SdkConfig, r as Bet, rt as WrapperOnlyMessagePayloadMap, s as ContractOpenGamePayload, st as RgsErrorCode, t as I18n, tt as ToTelemetryPluginsForwardedMessageMap, u as DomainMessage, ut as CurrencyNumber, v as ForwardToSdkMessage, w as GetBalanceResponse, x as FreeRoundsAction, y as ForwardToSdkMessagePayload, z as PrefixedMessageMessageEvent } from "./i18n-C0dYZPiy.js";
6
6
 
7
7
  //#region src/sdk/KalambaSdk.d.ts
8
8
  type MessageType = 'openGame' | 'play';
@@ -44,4 +44,4 @@ declare class KalambaSdk<TCodecs extends Codecs = typeof defaultCodecs> {
44
44
  play(contract: ContractPlayPayload, extra?: Parameters<TCodecs['play']['request']['encode']>[0]): Promise<PlayResponse<ReturnType<TCodecs['play']['response']['decode']>>>;
45
45
  }
46
46
  //#endregion
47
- export { AutoplayLimit, Bet, Cashier, CashierConfig, CasinoOnlyMessagePayloadMap, type Codecs, ContractOpenGamePayload, ContractPlayPayload, CurrencyFormat, CurrencyNumber, DomainAllowedPayloadMap, DomainMessage, DomainMessageMessageEvent, DomainMessagePayload, DomainPrefix, DomainToMessagePayloadMap, FormatCurrencyOptions, ForwardToPluginsMessage, ForwardToPluginsMessageMap, ForwardToPluginsMessagePayload, ForwardToSdkMessage, ForwardToSdkMessagePayload, FreeRound, FreeRoundsAction, FreeRoundsRequest, FreeRoundsResponse, GetBalanceResponse, History, I18n, KalambaSdk, Message, MessageMap, MessageMessageEvent, MessagePayload, OpenGameRequest, OpenGameResponse, PlayRequest, PlayRequestEnhanced, PlayResponse, PluginDomain, PrefixedForwardToPluginsMessage, PrefixedMessage, PrefixedMessageMap, PrefixedMessageMessageEvent, PrefixedMessagePayload, PrefixedMessagePayloadMap, RealityCheckConfig, RgsError, RgsErrorCode, RgsErrorData, RgsErrorWithType, RgsOnlyMessagePayloadMap, RgsResponse, SdkConfig, SdkError, SdkOnlyMessagePayloadMap, Settings, TelemetryOnlyMessagePayloadMap, TimeoutError, ToCasinoPluginsForwardedMessageMap, ToRgsPluginsForwardedMessageMap, ToSdkForwardedMessageMap, ToTelemetryPluginsForwardedMessageMap, WrapperConfig, WrapperOnlyMessagePayloadMap, WrapperState };
47
+ export { type AutoplayLimit, type Bet, type Cashier, type CashierConfig, type CasinoOnlyMessagePayloadMap, type Codecs, type ContractOpenGamePayload, type ContractPlayPayload, type CurrencyFormat, type CurrencyNumber, type DomainAllowedPayloadMap, type DomainMessage, type DomainMessageMessageEvent, type DomainMessagePayload, type DomainPrefix, type DomainToMessagePayloadMap, type FormatCurrencyOptions, type ForwardToPluginsMessage, type ForwardToPluginsMessageMap, type ForwardToPluginsMessagePayload, type ForwardToSdkMessage, type ForwardToSdkMessagePayload, type FreeRound, type FreeRoundsAction, type FreeRoundsRequest, type FreeRoundsResponse, type GetBalanceResponse, type History, I18n, KalambaSdk, type Message, type MessageMap, type MessageMessageEvent, type MessagePayload, type OpenGameRequest, type OpenGameResponse, type PlayRequest, type PlayRequestEnhanced, type PlayResponse, type PluginDomain, type PrefixedForwardToPluginsMessage, type PrefixedMessage, type PrefixedMessageMap, type PrefixedMessageMessageEvent, type PrefixedMessagePayload, type PrefixedMessagePayloadMap, type RealityCheckConfig, RgsError, RgsErrorCode, type RgsErrorData, type RgsErrorWithType, type RgsOnlyMessagePayloadMap, type RgsResponse, type SdkConfig, type SdkError, type SdkOnlyMessagePayloadMap, type Settings, type TelemetryOnlyMessagePayloadMap, TimeoutError, type ToCasinoPluginsForwardedMessageMap, type ToRgsPluginsForwardedMessageMap, type ToSdkForwardedMessageMap, type ToTelemetryPluginsForwardedMessageMap, type WrapperConfig, type WrapperOnlyMessagePayloadMap, type WrapperState };
package/dist/index.js CHANGED
@@ -2,13 +2,10 @@
2
2
  * BSD 3-Clause License
3
3
  * Copyright (c) 2026, Kalamba Games Limited
4
4
  */
5
- import { i as TimeoutError, r as RgsErrorCode, t as RgsError } from "./errors-DpQKmNNj.js";
6
- import { t as I18n } from "./i18n-DBjvMtNi.js";
5
+ import { i as TimeoutError, r as RgsErrorCode, t as RgsError } from "./errors-DhpQNHiF.js";
6
+ import { t as I18n } from "./i18n-P_FeTDK5.js";
7
7
  import { merge } from "lodash-es";
8
-
9
8
  //#region src/sdk/KalambaSdk.ts
10
- const logIn = () => {};
11
- const logOut = () => {};
12
9
  const passThroughCodec = {
13
10
  encode: (value) => value,
14
11
  decode: (value) => value
@@ -60,7 +57,7 @@ var KalambaSdk = class {
60
57
  on(message, listener, options) {
61
58
  const onMessage = function onMessage(event) {
62
59
  if (event.data.message !== `kalamba:wrapper:${message}`) return;
63
- logIn("on", event.data.message.replace(/^kalamba:/, ""), event.data.payload);
60
+ event.data.message.replace(/^kalamba:/, ""), event.data.payload;
64
61
  listener(event.data.payload);
65
62
  if (options?.once) window.removeEventListener("message", onMessage);
66
63
  };
@@ -68,7 +65,6 @@ var KalambaSdk = class {
68
65
  return () => window.removeEventListener("message", onMessage);
69
66
  }
70
67
  send(message, ...[payload]) {
71
- logOut("send", message, payload);
72
68
  this.#messagePort.postMessage({
73
69
  message: `kalamba:sdk:${message}`,
74
70
  payload
@@ -79,7 +75,7 @@ var KalambaSdk = class {
79
75
  this.on("wrapperConfigured", () => resolve(), { once: true });
80
76
  this.send("configure", {
81
77
  ...payload,
82
- sdkVersion: "0.48.2"
78
+ sdkVersion: "0.49.0"
83
79
  });
84
80
  });
85
81
  }
@@ -113,6 +109,5 @@ var KalambaSdk = class {
113
109
  else throw new RgsError(responseData.error.data);
114
110
  }
115
111
  };
116
-
117
112
  //#endregion
118
- export { I18n, KalambaSdk, RgsError, RgsErrorCode, TimeoutError };
113
+ export { I18n, KalambaSdk, RgsError, RgsErrorCode, TimeoutError };
@@ -14,9 +14,9 @@ var WithLogger = class {
14
14
  log;
15
15
  constructor() {
16
16
  const ctor = new.target;
17
- this.log = createLogger(ctor.LOG_PREFIX ?? ctor.name, ctor.LOG_STYLES);
17
+ const prefix = ctor.LOG_PREFIX ?? ctor.name;
18
+ this.log = createLogger(prefix, ctor.LOG_STYLES);
18
19
  }
19
20
  };
20
-
21
21
  //#endregion
22
- export { WithLogger as t };
22
+ export { WithLogger as t };
@@ -2,7 +2,6 @@
2
2
  * BSD 3-Clause License
3
3
  * Copyright (c) 2026, Kalamba Games Limited
4
4
  */
5
-
6
5
  //#region src/common/logger.ts
7
6
  function createLogger(prefix, style) {
8
7
  return (message, ...args) => {
@@ -15,14 +14,14 @@ var WithLogger = class {
15
14
  log;
16
15
  constructor() {
17
16
  const ctor = new.target;
18
- this.log = createLogger(ctor.LOG_PREFIX ?? ctor.name, ctor.LOG_STYLES);
17
+ const prefix = ctor.LOG_PREFIX ?? ctor.name;
18
+ this.log = createLogger(prefix, ctor.LOG_STYLES);
19
19
  }
20
20
  };
21
-
22
21
  //#endregion
23
- Object.defineProperty(exports, 'WithLogger', {
24
- enumerable: true,
25
- get: function () {
26
- return WithLogger;
27
- }
28
- });
22
+ Object.defineProperty(exports, "WithLogger", {
23
+ enumerable: true,
24
+ get: function() {
25
+ return WithLogger;
26
+ }
27
+ });
package/dist/plugins.cjs CHANGED
@@ -2,10 +2,9 @@
2
2
  * BSD 3-Clause License
3
3
  * Copyright (c) 2026, Kalamba Games Limited
4
4
  */
5
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
6
- const require_i18n = require('./i18n-C_kZhl3l.cjs');
7
- const require_logger = require('./logger-BR4jdx4T.cjs');
8
-
5
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
6
+ const require_i18n = require("./i18n-BTrBMC_j.cjs");
7
+ const require_logger = require("./logger-QUIW2N_l.cjs");
9
8
  //#region src/plugins/CasinoPlugin.ts
10
9
  var CasinoPlugin = class extends require_logger.WithLogger {
11
10
  static LOG_STYLES = "color:#00aa00;font-weight:bold;";
@@ -38,7 +37,6 @@ var CasinoPlugin = class extends require_logger.WithLogger {
38
37
  });
39
38
  }
40
39
  };
41
-
42
40
  //#endregion
43
41
  //#region src/plugins/RgsPlugin.ts
44
42
  var RgsPlugin = class extends require_logger.WithLogger {
@@ -123,7 +121,6 @@ var RgsPlugin = class extends require_logger.WithLogger {
123
121
  throw new Error("Not implemented");
124
122
  }
125
123
  };
126
-
127
124
  //#endregion
128
125
  //#region src/plugins/TelemetryPlugin/index.ts
129
126
  var TelemetryPlugin = class extends require_logger.WithLogger {
@@ -150,7 +147,6 @@ var TelemetryPlugin = class extends require_logger.WithLogger {
150
147
  this.trackers.forEach((tracker) => tracker.track(event, data));
151
148
  }
152
149
  };
153
-
154
150
  //#endregion
155
151
  //#region src/plugins/TelemetryPlugin/Tracker.ts
156
152
  var Tracker = class extends require_logger.WithLogger {
@@ -163,9 +159,8 @@ var Tracker = class extends require_logger.WithLogger {
163
159
  this.sdkConfig = sdkConfig;
164
160
  }
165
161
  };
166
-
167
162
  //#endregion
168
163
  exports.CasinoPlugin = CasinoPlugin;
169
164
  exports.RgsPlugin = RgsPlugin;
170
165
  exports.TelemetryPlugin = TelemetryPlugin;
171
- exports.Tracker = Tracker;
166
+ exports.Tracker = Tracker;
@@ -2,5 +2,5 @@
2
2
  * BSD 3-Clause License
3
3
  * Copyright (c) 2026, Kalamba Games Limited
4
4
  */
5
- import { i as CasinoPlugin, n as Tracker, r as RgsPlugin, t as TelemetryPlugin } from "./index-BJYAaOQJ.cjs";
5
+ import { i as CasinoPlugin, n as Tracker, r as RgsPlugin, t as TelemetryPlugin } from "./index-DN43FHze.cjs";
6
6
  export { CasinoPlugin, RgsPlugin, TelemetryPlugin, Tracker };
package/dist/plugins.d.ts CHANGED
@@ -2,5 +2,5 @@
2
2
  * BSD 3-Clause License
3
3
  * Copyright (c) 2026, Kalamba Games Limited
4
4
  */
5
- import { i as CasinoPlugin, n as Tracker, r as RgsPlugin, t as TelemetryPlugin } from "./index-B4TGbH4C.js";
5
+ import { i as CasinoPlugin, n as Tracker, r as RgsPlugin, t as TelemetryPlugin } from "./index-Cjaz6iEv.js";
6
6
  export { CasinoPlugin, RgsPlugin, TelemetryPlugin, Tracker };
package/dist/plugins.js CHANGED
@@ -2,9 +2,8 @@
2
2
  * BSD 3-Clause License
3
3
  * Copyright (c) 2026, Kalamba Games Limited
4
4
  */
5
- import { t as I18n } from "./i18n-DBjvMtNi.js";
6
- import { t as WithLogger } from "./logger-f0OQvO5X.js";
7
-
5
+ import { t as I18n } from "./i18n-P_FeTDK5.js";
6
+ import { t as WithLogger } from "./logger-CvU7xLGv.js";
8
7
  //#region src/plugins/CasinoPlugin.ts
9
8
  var CasinoPlugin = class extends WithLogger {
10
9
  static LOG_STYLES = "color:#00aa00;font-weight:bold;";
@@ -37,7 +36,6 @@ var CasinoPlugin = class extends WithLogger {
37
36
  });
38
37
  }
39
38
  };
40
-
41
39
  //#endregion
42
40
  //#region src/plugins/RgsPlugin.ts
43
41
  var RgsPlugin = class extends WithLogger {
@@ -122,7 +120,6 @@ var RgsPlugin = class extends WithLogger {
122
120
  throw new Error("Not implemented");
123
121
  }
124
122
  };
125
-
126
123
  //#endregion
127
124
  //#region src/plugins/TelemetryPlugin/index.ts
128
125
  var TelemetryPlugin = class extends WithLogger {
@@ -149,7 +146,6 @@ var TelemetryPlugin = class extends WithLogger {
149
146
  this.trackers.forEach((tracker) => tracker.track(event, data));
150
147
  }
151
148
  };
152
-
153
149
  //#endregion
154
150
  //#region src/plugins/TelemetryPlugin/Tracker.ts
155
151
  var Tracker = class extends WithLogger {
@@ -162,6 +158,5 @@ var Tracker = class extends WithLogger {
162
158
  this.sdkConfig = sdkConfig;
163
159
  }
164
160
  };
165
-
166
161
  //#endregion
167
- export { CasinoPlugin, RgsPlugin, TelemetryPlugin, Tracker };
162
+ export { CasinoPlugin, RgsPlugin, TelemetryPlugin, Tracker };
package/dist/wrapper.cjs CHANGED
@@ -2,12 +2,11 @@
2
2
  * BSD 3-Clause License
3
3
  * Copyright (c) 2026, Kalamba Games Limited
4
4
  */
5
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
6
- const require_errors = require('./errors-DXZbBm5R.cjs');
5
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
6
+ const require_errors = require("./errors-S8tSAaOC.cjs");
7
7
  let lodash_es = require("lodash-es");
8
8
  let uuid = require("uuid");
9
9
  let zustand_vanilla = require("zustand/vanilla");
10
-
11
10
  //#region src/common/config/SdkConfigManager.ts
12
11
  var SdkConfigManager = class {
13
12
  config;
@@ -106,7 +105,6 @@ var SdkConfigManager = class {
106
105
  };
107
106
  }
108
107
  };
109
-
110
108
  //#endregion
111
109
  //#region src/common/config/KalambaSdkConfigManager.ts
112
110
  function jurisdictionConfigOverrides(config, jurisdiction) {
@@ -385,7 +383,6 @@ var KalambaSdkConfigManager = class extends SdkConfigManager {
385
383
  return this.mapUiConfig(config);
386
384
  }
387
385
  };
388
-
389
386
  //#endregion
390
387
  //#region src/common/PayloadInjectionManager.ts
391
388
  /**
@@ -421,7 +418,6 @@ var PayloadInjectionManager = class {
421
418
  return merged;
422
419
  }
423
420
  };
424
-
425
421
  //#endregion
426
422
  //#region src/wrapper/KalambaSdkWrapper.ts
427
423
  /**
@@ -437,8 +433,6 @@ function compareSemver(a, b) {
437
433
  }
438
434
  return 0;
439
435
  }
440
- const logIn = () => {};
441
- const logOut = () => {};
442
436
  var KalambaSdkWrapper = class {
443
437
  #messagePort;
444
438
  #plugins;
@@ -715,7 +709,7 @@ var KalambaSdkWrapper = class {
715
709
  messages.forEach((message) => {
716
710
  const onMessage = (event) => {
717
711
  if (event.data.message !== `kalamba:${message}`) return;
718
- logIn("wrapper:forwardToPlugins", targetDomain, event.data.message.replace(/^kalamba:/, ""), event.data.payload);
712
+ event.data.message.replace(/^kalamba:/, ""), event.data.payload;
719
713
  window.postMessage({
720
714
  message: `kalamba:wrapper-${targetDomain}:${message.replace(/^(.+):/, "")}`,
721
715
  payload: event.data.payload
@@ -728,7 +722,7 @@ var KalambaSdkWrapper = class {
728
722
  messages.forEach((message) => {
729
723
  const onMessage = (event) => {
730
724
  if (event.data.message !== `kalamba:${message}`) return;
731
- logOut("wrapper:forwardToSdk", event.data.message.replace(/^kalamba:/, ""), event.data.payload);
725
+ event.data.message.replace(/^kalamba:/, ""), event.data.payload;
732
726
  this.#messagePort.postMessage({
733
727
  message: `kalamba:wrapper:${message.replace(/^(.+):/, "")}`,
734
728
  payload: event.data.payload
@@ -740,7 +734,7 @@ var KalambaSdkWrapper = class {
740
734
  on(message, listener, options) {
741
735
  const onMessage = function onMessage(event) {
742
736
  if (!new RegExp(`^kalamba:${message.includes(":") ? "" : "(.+):"}${message}$`).test(event.data.message) || new RegExp(`^kalamba:wrapper-(.+):${message}`).test(event.data.message) || new RegExp(`^kalamba:(.+)-wrapper:${message}`).test(event.data.message)) return;
743
- logIn("on", event.data.message.replace(/^kalamba:/, ""), event.data.payload);
737
+ event.data.message.replace(/^kalamba:/, ""), event.data.payload;
744
738
  listener(event.data.payload);
745
739
  if (options?.once) window.removeEventListener("message", onMessage);
746
740
  };
@@ -748,7 +742,6 @@ var KalambaSdkWrapper = class {
748
742
  return () => window.removeEventListener("message", onMessage);
749
743
  }
750
744
  send(message, ...[payload]) {
751
- logOut("wrapper:send", message, payload);
752
745
  window.postMessage({
753
746
  message: `kalamba:wrapper:${message}`,
754
747
  payload
@@ -799,7 +792,8 @@ var KalambaSdkWrapper = class {
799
792
  }
800
793
  async requestWakeLock() {
801
794
  try {
802
- this.#wakeLock = await navigator.wakeLock.request("screen");
795
+ const wakeLock = await navigator.wakeLock.request("screen");
796
+ this.#wakeLock = wakeLock;
803
797
  } catch {}
804
798
  }
805
799
  async releaseWakeLock() {
@@ -808,8 +802,7 @@ var KalambaSdkWrapper = class {
808
802
  this.#wakeLock = void 0;
809
803
  }
810
804
  };
811
-
812
805
  //#endregion
813
806
  exports.KalambaSdkConfigManager = KalambaSdkConfigManager;
814
807
  exports.KalambaSdkWrapper = KalambaSdkWrapper;
815
- exports.SdkConfigManager = SdkConfigManager;
808
+ exports.SdkConfigManager = SdkConfigManager;
@@ -2,9 +2,8 @@
2
2
  * BSD 3-Clause License
3
3
  * Copyright (c) 2026, Kalamba Games Limited
4
4
  */
5
- import { E as Message, at as DeepPartial, b as FreeRound, f as DomainMessagePayload, it as WrapperState, k as MessagePayload, nt as WrapperConfig, q as SdkConfig, u as DomainMessage } from "./i18n-Dmb3OPNy.cjs";
6
- import { a as PayloadInjectionManager, i as CasinoPlugin, n as Tracker, r as RgsPlugin, t as TelemetryPlugin } from "./index-BJYAaOQJ.cjs";
7
- import * as zustand_vanilla0 from "zustand/vanilla";
5
+ import { E as Message, at as DeepPartial, b as FreeRound, f as DomainMessagePayload, it as WrapperState, k as MessagePayload, nt as WrapperConfig, q as SdkConfig, u as DomainMessage } from "./i18n-C0dYZPiy.cjs";
6
+ import { a as PayloadInjectionManager, i as CasinoPlugin, n as Tracker, r as RgsPlugin, t as TelemetryPlugin } from "./index-DN43FHze.cjs";
8
7
 
9
8
  //#region src/common/config/SdkConfigManager.d.ts
10
9
  declare abstract class SdkConfigManager {
@@ -66,7 +65,7 @@ declare class KalambaSdkWrapper {
66
65
  sdkConfigManager: new (...args: ConstructorParameters<typeof SdkConfigManager>) => SdkConfigManager;
67
66
  compatibility: CompatibilityOptions;
68
67
  });
69
- get store(): zustand_vanilla0.StoreApi<WrapperState>;
68
+ get store(): import("zustand/vanilla").StoreApi<WrapperState>;
70
69
  get state(): WrapperState;
71
70
  private checkCompatibility;
72
71
  forwardMessages(): void;
package/dist/wrapper.d.ts CHANGED
@@ -2,9 +2,8 @@
2
2
  * BSD 3-Clause License
3
3
  * Copyright (c) 2026, Kalamba Games Limited
4
4
  */
5
- import { E as Message, at as DeepPartial, b as FreeRound, f as DomainMessagePayload, it as WrapperState, k as MessagePayload, nt as WrapperConfig, q as SdkConfig, u as DomainMessage } from "./i18n-BSkfwQSR.js";
6
- import { a as PayloadInjectionManager, i as CasinoPlugin, n as Tracker, r as RgsPlugin, t as TelemetryPlugin } from "./index-B4TGbH4C.js";
7
- import * as zustand_vanilla0 from "zustand/vanilla";
5
+ import { E as Message, at as DeepPartial, b as FreeRound, f as DomainMessagePayload, it as WrapperState, k as MessagePayload, nt as WrapperConfig, q as SdkConfig, u as DomainMessage } from "./i18n-C0dYZPiy.js";
6
+ import { a as PayloadInjectionManager, i as CasinoPlugin, n as Tracker, r as RgsPlugin, t as TelemetryPlugin } from "./index-Cjaz6iEv.js";
8
7
 
9
8
  //#region src/common/config/SdkConfigManager.d.ts
10
9
  declare abstract class SdkConfigManager {
@@ -66,7 +65,7 @@ declare class KalambaSdkWrapper {
66
65
  sdkConfigManager: new (...args: ConstructorParameters<typeof SdkConfigManager>) => SdkConfigManager;
67
66
  compatibility: CompatibilityOptions;
68
67
  });
69
- get store(): zustand_vanilla0.StoreApi<WrapperState>;
68
+ get store(): import("zustand/vanilla").StoreApi<WrapperState>;
70
69
  get state(): WrapperState;
71
70
  private checkCompatibility;
72
71
  forwardMessages(): void;
package/dist/wrapper.js CHANGED
@@ -2,11 +2,10 @@
2
2
  * BSD 3-Clause License
3
3
  * Copyright (c) 2026, Kalamba Games Limited
4
4
  */
5
- import { n as RgsErrorAction } from "./errors-DpQKmNNj.js";
5
+ import { n as RgsErrorAction } from "./errors-DhpQNHiF.js";
6
6
  import { flow, merge, sortBy, sortedUniq } from "lodash-es";
7
7
  import { v4 } from "uuid";
8
8
  import { createStore } from "zustand/vanilla";
9
-
10
9
  //#region src/common/config/SdkConfigManager.ts
11
10
  var SdkConfigManager = class {
12
11
  config;
@@ -105,7 +104,6 @@ var SdkConfigManager = class {
105
104
  };
106
105
  }
107
106
  };
108
-
109
107
  //#endregion
110
108
  //#region src/common/config/KalambaSdkConfigManager.ts
111
109
  function jurisdictionConfigOverrides(config, jurisdiction) {
@@ -384,7 +382,6 @@ var KalambaSdkConfigManager = class extends SdkConfigManager {
384
382
  return this.mapUiConfig(config);
385
383
  }
386
384
  };
387
-
388
385
  //#endregion
389
386
  //#region src/common/PayloadInjectionManager.ts
390
387
  /**
@@ -420,7 +417,6 @@ var PayloadInjectionManager = class {
420
417
  return merged;
421
418
  }
422
419
  };
423
-
424
420
  //#endregion
425
421
  //#region src/wrapper/KalambaSdkWrapper.ts
426
422
  /**
@@ -436,8 +432,6 @@ function compareSemver(a, b) {
436
432
  }
437
433
  return 0;
438
434
  }
439
- const logIn = () => {};
440
- const logOut = () => {};
441
435
  var KalambaSdkWrapper = class {
442
436
  #messagePort;
443
437
  #plugins;
@@ -714,7 +708,7 @@ var KalambaSdkWrapper = class {
714
708
  messages.forEach((message) => {
715
709
  const onMessage = (event) => {
716
710
  if (event.data.message !== `kalamba:${message}`) return;
717
- logIn("wrapper:forwardToPlugins", targetDomain, event.data.message.replace(/^kalamba:/, ""), event.data.payload);
711
+ event.data.message.replace(/^kalamba:/, ""), event.data.payload;
718
712
  window.postMessage({
719
713
  message: `kalamba:wrapper-${targetDomain}:${message.replace(/^(.+):/, "")}`,
720
714
  payload: event.data.payload
@@ -727,7 +721,7 @@ var KalambaSdkWrapper = class {
727
721
  messages.forEach((message) => {
728
722
  const onMessage = (event) => {
729
723
  if (event.data.message !== `kalamba:${message}`) return;
730
- logOut("wrapper:forwardToSdk", event.data.message.replace(/^kalamba:/, ""), event.data.payload);
724
+ event.data.message.replace(/^kalamba:/, ""), event.data.payload;
731
725
  this.#messagePort.postMessage({
732
726
  message: `kalamba:wrapper:${message.replace(/^(.+):/, "")}`,
733
727
  payload: event.data.payload
@@ -739,7 +733,7 @@ var KalambaSdkWrapper = class {
739
733
  on(message, listener, options) {
740
734
  const onMessage = function onMessage(event) {
741
735
  if (!new RegExp(`^kalamba:${message.includes(":") ? "" : "(.+):"}${message}$`).test(event.data.message) || new RegExp(`^kalamba:wrapper-(.+):${message}`).test(event.data.message) || new RegExp(`^kalamba:(.+)-wrapper:${message}`).test(event.data.message)) return;
742
- logIn("on", event.data.message.replace(/^kalamba:/, ""), event.data.payload);
736
+ event.data.message.replace(/^kalamba:/, ""), event.data.payload;
743
737
  listener(event.data.payload);
744
738
  if (options?.once) window.removeEventListener("message", onMessage);
745
739
  };
@@ -747,7 +741,6 @@ var KalambaSdkWrapper = class {
747
741
  return () => window.removeEventListener("message", onMessage);
748
742
  }
749
743
  send(message, ...[payload]) {
750
- logOut("wrapper:send", message, payload);
751
744
  window.postMessage({
752
745
  message: `kalamba:wrapper:${message}`,
753
746
  payload
@@ -798,7 +791,8 @@ var KalambaSdkWrapper = class {
798
791
  }
799
792
  async requestWakeLock() {
800
793
  try {
801
- this.#wakeLock = await navigator.wakeLock.request("screen");
794
+ const wakeLock = await navigator.wakeLock.request("screen");
795
+ this.#wakeLock = wakeLock;
802
796
  } catch {}
803
797
  }
804
798
  async releaseWakeLock() {
@@ -807,6 +801,5 @@ var KalambaSdkWrapper = class {
807
801
  this.#wakeLock = void 0;
808
802
  }
809
803
  };
810
-
811
804
  //#endregion
812
- export { KalambaSdkConfigManager, KalambaSdkWrapper, SdkConfigManager };
805
+ export { KalambaSdkConfigManager, KalambaSdkWrapper, SdkConfigManager };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kalamba/sdk",
3
- "version": "0.48.2",
3
+ "version": "0.49.0",
4
4
  "license": "BSD-3-Clause",
5
5
  "type": "module",
6
6
  "files": [
@@ -46,8 +46,9 @@
46
46
  "@types/react-dom": "19.1.6",
47
47
  "react": "19.1.0",
48
48
  "react-dom": "19.1.0",
49
- "tsdown": "0.20.3",
50
- "vitest": "3.2.4"
49
+ "tsdown": "0.22.3",
50
+ "vitest": "4.1.9",
51
+ "@kalamba/common": "0.1.0"
51
52
  },
52
53
  "scripts": {
53
54
  "build": "tsdown",
@@ -57,4 +58,4 @@
57
58
  "test:related": "vitest related --run --passWithNoTests",
58
59
  "release": "semantic-release-monorepo"
59
60
  }
60
- }
61
+ }