@kalamba/sdk 0.49.0 → 0.50.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/dist/{i18n-BTrBMC_j.cjs → i18n-D_7i6_7A.cjs} +10 -0
- package/dist/{i18n-P_FeTDK5.js → i18n-TnBAUfRi.js} +10 -0
- package/dist/{i18n-C0dYZPiy.d.cts → i18n-VC8rzb_Y.d.cts} +4 -6
- package/dist/{i18n-C0dYZPiy.d.ts → i18n-VC8rzb_Y.d.ts} +4 -6
- package/dist/{index-Cjaz6iEv.d.ts → index-CR7iP4Jo.d.cts} +1 -2
- package/dist/{index-DN43FHze.d.cts → index-LLE4EVbR.d.ts} +1 -2
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +2 -6
- package/dist/index.d.ts +2 -6
- package/dist/index.js +2 -2
- package/dist/plugins.cjs +22 -6
- package/dist/plugins.d.cts +1 -1
- package/dist/plugins.d.ts +1 -1
- package/dist/plugins.js +18 -2
- package/dist/wrapper.cjs +14 -4
- package/dist/wrapper.d.cts +4 -9
- package/dist/wrapper.d.ts +4 -9
- package/dist/wrapper.js +14 -4
- package/package.json +6 -5
- package/dist/logger-CvU7xLGv.js +0 -22
- package/dist/logger-QUIW2N_l.cjs +0 -27
|
@@ -351,6 +351,16 @@ const CUSTOM_CURRENCIES = {
|
|
|
351
351
|
maximumFractionDigits: 2,
|
|
352
352
|
minimumFractionDigits: 2
|
|
353
353
|
},
|
|
354
|
+
SESW: {
|
|
355
|
+
displayAs: "EP",
|
|
356
|
+
maximumFractionDigits: 2,
|
|
357
|
+
minimumFractionDigits: 2
|
|
358
|
+
},
|
|
359
|
+
GCSW: {
|
|
360
|
+
displayAs: "PP",
|
|
361
|
+
maximumFractionDigits: 2,
|
|
362
|
+
minimumFractionDigits: 2
|
|
363
|
+
},
|
|
354
364
|
FC: {
|
|
355
365
|
displayAs: "",
|
|
356
366
|
maximumFractionDigits: 2,
|
|
@@ -351,6 +351,16 @@ const CUSTOM_CURRENCIES = {
|
|
|
351
351
|
maximumFractionDigits: 2,
|
|
352
352
|
minimumFractionDigits: 2
|
|
353
353
|
},
|
|
354
|
+
SESW: {
|
|
355
|
+
displayAs: "EP",
|
|
356
|
+
maximumFractionDigits: 2,
|
|
357
|
+
minimumFractionDigits: 2
|
|
358
|
+
},
|
|
359
|
+
GCSW: {
|
|
360
|
+
displayAs: "PP",
|
|
361
|
+
maximumFractionDigits: 2,
|
|
362
|
+
minimumFractionDigits: 2
|
|
363
|
+
},
|
|
354
364
|
FC: {
|
|
355
365
|
displayAs: "",
|
|
356
366
|
maximumFractionDigits: 2,
|
|
@@ -60,10 +60,10 @@ declare class TimeoutError extends Error {
|
|
|
60
60
|
}
|
|
61
61
|
//#endregion
|
|
62
62
|
//#region src/utils.d.ts
|
|
63
|
-
type PrefixKeys<Base, Prefix extends string> = { [Key in keyof Base as `${Prefix}:${string & Key}`]: Base[Key] };
|
|
63
|
+
type PrefixKeys<Base, Prefix extends string> = { [Key in keyof Base as `${Prefix}:${string & Key}`]: Base[Key]; };
|
|
64
64
|
type PrefixTypes<Types, Prefix extends string> = `${Prefix}:${Types}`;
|
|
65
|
-
type DeepPartial<T> = T extends object ? { [P in keyof T]?: DeepPartial<T[P]
|
|
66
|
-
type NestedRecord<K extends string | number | symbol, V> = { [k in K]: V | NestedRecord<K, V
|
|
65
|
+
type DeepPartial<T> = T extends object ? { [P in keyof T]?: DeepPartial<T[P]>; } : T;
|
|
66
|
+
type NestedRecord<K extends string | number | symbol, V> = { [k in K]: V | NestedRecord<K, V>; };
|
|
67
67
|
//#endregion
|
|
68
68
|
//#region src/types.d.ts
|
|
69
69
|
type WrapperConfig = {
|
|
@@ -524,9 +524,7 @@ type RgsResponse<M extends DomainMessage<'sdk'>> = {
|
|
|
524
524
|
//#region src/common/i18n.d.ts
|
|
525
525
|
declare class I18n {
|
|
526
526
|
#private;
|
|
527
|
-
constructor({
|
|
528
|
-
config
|
|
529
|
-
}: {
|
|
527
|
+
constructor({ config }: {
|
|
530
528
|
config: SdkConfig;
|
|
531
529
|
});
|
|
532
530
|
formatNumber(number: string | number, formatOptions?: Intl.NumberFormatOptions): string;
|
|
@@ -60,10 +60,10 @@ declare class TimeoutError extends Error {
|
|
|
60
60
|
}
|
|
61
61
|
//#endregion
|
|
62
62
|
//#region src/utils.d.ts
|
|
63
|
-
type PrefixKeys<Base, Prefix extends string> = { [Key in keyof Base as `${Prefix}:${string & Key}`]: Base[Key] };
|
|
63
|
+
type PrefixKeys<Base, Prefix extends string> = { [Key in keyof Base as `${Prefix}:${string & Key}`]: Base[Key]; };
|
|
64
64
|
type PrefixTypes<Types, Prefix extends string> = `${Prefix}:${Types}`;
|
|
65
|
-
type DeepPartial<T> = T extends object ? { [P in keyof T]?: DeepPartial<T[P]
|
|
66
|
-
type NestedRecord<K extends string | number | symbol, V> = { [k in K]: V | NestedRecord<K, V
|
|
65
|
+
type DeepPartial<T> = T extends object ? { [P in keyof T]?: DeepPartial<T[P]>; } : T;
|
|
66
|
+
type NestedRecord<K extends string | number | symbol, V> = { [k in K]: V | NestedRecord<K, V>; };
|
|
67
67
|
//#endregion
|
|
68
68
|
//#region src/types.d.ts
|
|
69
69
|
type WrapperConfig = {
|
|
@@ -524,9 +524,7 @@ type RgsResponse<M extends DomainMessage<'sdk'>> = {
|
|
|
524
524
|
//#region src/common/i18n.d.ts
|
|
525
525
|
declare class I18n {
|
|
526
526
|
#private;
|
|
527
|
-
constructor({
|
|
528
|
-
config
|
|
529
|
-
}: {
|
|
527
|
+
constructor({ config }: {
|
|
530
528
|
config: SdkConfig;
|
|
531
529
|
});
|
|
532
530
|
formatNumber(number: string | number, formatOptions?: Intl.NumberFormatOptions): string;
|
|
@@ -2,8 +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-
|
|
6
|
-
|
|
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-VC8rzb_Y.cjs";
|
|
7
6
|
//#region src/common/logger.d.ts
|
|
8
7
|
declare function createLogger(prefix: string, style: string): (message: string, ...args: any[]) => void;
|
|
9
8
|
declare abstract class WithLogger {
|
|
@@ -2,8 +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-
|
|
6
|
-
|
|
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-VC8rzb_Y.js";
|
|
7
6
|
//#region src/common/logger.d.ts
|
|
8
7
|
declare function createLogger(prefix: string, style: string): (message: string, ...args: any[]) => void;
|
|
9
8
|
declare abstract class WithLogger {
|
package/dist/index.cjs
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
6
6
|
const require_errors = require("./errors-S8tSAaOC.cjs");
|
|
7
|
-
const require_i18n = require("./i18n-
|
|
7
|
+
const require_i18n = require("./i18n-D_7i6_7A.cjs");
|
|
8
8
|
let lodash_es = require("lodash-es");
|
|
9
9
|
//#region src/sdk/KalambaSdk.ts
|
|
10
10
|
const passThroughCodec = {
|
|
@@ -76,7 +76,7 @@ var KalambaSdk = class {
|
|
|
76
76
|
this.on("wrapperConfigured", () => resolve(), { once: true });
|
|
77
77
|
this.send("configure", {
|
|
78
78
|
...payload,
|
|
79
|
-
sdkVersion: "0.
|
|
79
|
+
sdkVersion: "0.50.0"
|
|
80
80
|
});
|
|
81
81
|
});
|
|
82
82
|
}
|
package/dist/index.d.cts
CHANGED
|
@@ -2,8 +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-
|
|
6
|
-
|
|
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-VC8rzb_Y.cjs";
|
|
7
6
|
//#region src/sdk/KalambaSdk.d.ts
|
|
8
7
|
type MessageType = 'openGame' | 'play';
|
|
9
8
|
type CommunicationType = 'request' | 'response';
|
|
@@ -27,10 +26,7 @@ interface AddEventListenerOptions {
|
|
|
27
26
|
}
|
|
28
27
|
declare class KalambaSdk<TCodecs extends Codecs = typeof defaultCodecs> {
|
|
29
28
|
#private;
|
|
30
|
-
constructor({
|
|
31
|
-
messagePort,
|
|
32
|
-
codecs
|
|
33
|
-
}: {
|
|
29
|
+
constructor({ messagePort, codecs }: {
|
|
34
30
|
messagePort: Window;
|
|
35
31
|
codecs?: Partial<TCodecs>;
|
|
36
32
|
});
|
package/dist/index.d.ts
CHANGED
|
@@ -2,8 +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-
|
|
6
|
-
|
|
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-VC8rzb_Y.js";
|
|
7
6
|
//#region src/sdk/KalambaSdk.d.ts
|
|
8
7
|
type MessageType = 'openGame' | 'play';
|
|
9
8
|
type CommunicationType = 'request' | 'response';
|
|
@@ -27,10 +26,7 @@ interface AddEventListenerOptions {
|
|
|
27
26
|
}
|
|
28
27
|
declare class KalambaSdk<TCodecs extends Codecs = typeof defaultCodecs> {
|
|
29
28
|
#private;
|
|
30
|
-
constructor({
|
|
31
|
-
messagePort,
|
|
32
|
-
codecs
|
|
33
|
-
}: {
|
|
29
|
+
constructor({ messagePort, codecs }: {
|
|
34
30
|
messagePort: Window;
|
|
35
31
|
codecs?: Partial<TCodecs>;
|
|
36
32
|
});
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright (c) 2026, Kalamba Games Limited
|
|
4
4
|
*/
|
|
5
5
|
import { i as TimeoutError, r as RgsErrorCode, t as RgsError } from "./errors-DhpQNHiF.js";
|
|
6
|
-
import { t as I18n } from "./i18n-
|
|
6
|
+
import { t as I18n } from "./i18n-TnBAUfRi.js";
|
|
7
7
|
import { merge } from "lodash-es";
|
|
8
8
|
//#region src/sdk/KalambaSdk.ts
|
|
9
9
|
const passThroughCodec = {
|
|
@@ -75,7 +75,7 @@ var KalambaSdk = class {
|
|
|
75
75
|
this.on("wrapperConfigured", () => resolve(), { once: true });
|
|
76
76
|
this.send("configure", {
|
|
77
77
|
...payload,
|
|
78
|
-
sdkVersion: "0.
|
|
78
|
+
sdkVersion: "0.50.0"
|
|
79
79
|
});
|
|
80
80
|
});
|
|
81
81
|
}
|
package/dist/plugins.cjs
CHANGED
|
@@ -3,10 +3,26 @@
|
|
|
3
3
|
* Copyright (c) 2026, Kalamba Games Limited
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
6
|
-
const require_i18n = require("./i18n-
|
|
7
|
-
|
|
6
|
+
const require_i18n = require("./i18n-D_7i6_7A.cjs");
|
|
7
|
+
//#region src/common/logger.ts
|
|
8
|
+
function createLogger(prefix, style) {
|
|
9
|
+
return (message, ...args) => {
|
|
10
|
+
console.log(`[%c${prefix}\x1B[m] %s`, style, message, ...args);
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
var WithLogger = class {
|
|
14
|
+
static LOG_PREFIX;
|
|
15
|
+
static LOG_STYLES = "color:#000000;font-weight:bold;";
|
|
16
|
+
log;
|
|
17
|
+
constructor() {
|
|
18
|
+
const ctor = new.target;
|
|
19
|
+
const prefix = ctor.LOG_PREFIX ?? ctor.name;
|
|
20
|
+
this.log = createLogger(prefix, ctor.LOG_STYLES);
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
//#endregion
|
|
8
24
|
//#region src/plugins/CasinoPlugin.ts
|
|
9
|
-
var CasinoPlugin = class extends
|
|
25
|
+
var CasinoPlugin = class extends WithLogger {
|
|
10
26
|
static LOG_STYLES = "color:#00aa00;font-weight:bold;";
|
|
11
27
|
config;
|
|
12
28
|
sdkConfig;
|
|
@@ -39,7 +55,7 @@ var CasinoPlugin = class extends require_logger.WithLogger {
|
|
|
39
55
|
};
|
|
40
56
|
//#endregion
|
|
41
57
|
//#region src/plugins/RgsPlugin.ts
|
|
42
|
-
var RgsPlugin = class extends
|
|
58
|
+
var RgsPlugin = class extends WithLogger {
|
|
43
59
|
static LOG_STYLES = "color:#aa0000;font-weight:bold;";
|
|
44
60
|
config;
|
|
45
61
|
sdkConfig;
|
|
@@ -123,7 +139,7 @@ var RgsPlugin = class extends require_logger.WithLogger {
|
|
|
123
139
|
};
|
|
124
140
|
//#endregion
|
|
125
141
|
//#region src/plugins/TelemetryPlugin/index.ts
|
|
126
|
-
var TelemetryPlugin = class extends
|
|
142
|
+
var TelemetryPlugin = class extends WithLogger {
|
|
127
143
|
static LOG_STYLES = "color:#0000aa;font-weight:bold;";
|
|
128
144
|
trackers;
|
|
129
145
|
config;
|
|
@@ -149,7 +165,7 @@ var TelemetryPlugin = class extends require_logger.WithLogger {
|
|
|
149
165
|
};
|
|
150
166
|
//#endregion
|
|
151
167
|
//#region src/plugins/TelemetryPlugin/Tracker.ts
|
|
152
|
-
var Tracker = class extends
|
|
168
|
+
var Tracker = class extends WithLogger {
|
|
153
169
|
static LOG_STYLES = "color:#0000aa;font-weight:bold;";
|
|
154
170
|
config;
|
|
155
171
|
sdkConfig;
|
package/dist/plugins.d.cts
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-
|
|
5
|
+
import { i as CasinoPlugin, n as Tracker, r as RgsPlugin, t as TelemetryPlugin } from "./index-CR7iP4Jo.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-
|
|
5
|
+
import { i as CasinoPlugin, n as Tracker, r as RgsPlugin, t as TelemetryPlugin } from "./index-LLE4EVbR.js";
|
|
6
6
|
export { CasinoPlugin, RgsPlugin, TelemetryPlugin, Tracker };
|
package/dist/plugins.js
CHANGED
|
@@ -2,8 +2,24 @@
|
|
|
2
2
|
* BSD 3-Clause License
|
|
3
3
|
* Copyright (c) 2026, Kalamba Games Limited
|
|
4
4
|
*/
|
|
5
|
-
import { t as I18n } from "./i18n-
|
|
6
|
-
|
|
5
|
+
import { t as I18n } from "./i18n-TnBAUfRi.js";
|
|
6
|
+
//#region src/common/logger.ts
|
|
7
|
+
function createLogger(prefix, style) {
|
|
8
|
+
return (message, ...args) => {
|
|
9
|
+
console.log(`[%c${prefix}\x1B[m] %s`, style, message, ...args);
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
var WithLogger = class {
|
|
13
|
+
static LOG_PREFIX;
|
|
14
|
+
static LOG_STYLES = "color:#000000;font-weight:bold;";
|
|
15
|
+
log;
|
|
16
|
+
constructor() {
|
|
17
|
+
const ctor = new.target;
|
|
18
|
+
const prefix = ctor.LOG_PREFIX ?? ctor.name;
|
|
19
|
+
this.log = createLogger(prefix, ctor.LOG_STYLES);
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
//#endregion
|
|
7
23
|
//#region src/plugins/CasinoPlugin.ts
|
|
8
24
|
var CasinoPlugin = class extends WithLogger {
|
|
9
25
|
static LOG_STYLES = "color:#00aa00;font-weight:bold;";
|
package/dist/wrapper.cjs
CHANGED
|
@@ -171,8 +171,7 @@ function jurisdictionConfigOverrides(config, jurisdiction) {
|
|
|
171
171
|
feature: {
|
|
172
172
|
showFastPlay: false,
|
|
173
173
|
allowQuickStop: false,
|
|
174
|
-
showFeatureBuy: false
|
|
175
|
-
showPromoPanel: false
|
|
174
|
+
showFeatureBuy: false
|
|
176
175
|
},
|
|
177
176
|
minimumSpinDuration: 5
|
|
178
177
|
};
|
|
@@ -365,9 +364,20 @@ var KalambaSdkConfigManager = class extends SdkConfigManager {
|
|
|
365
364
|
skipSplash: config.badge.loaderAutoContinue
|
|
366
365
|
};
|
|
367
366
|
}
|
|
368
|
-
|
|
367
|
+
getOperatorConfigRootUrl() {
|
|
369
368
|
const hostname = typeof window !== "undefined" ? window.location?.hostname ?? "" : "";
|
|
370
|
-
|
|
369
|
+
if (!hostname || hostname === "localhost" || hostname === "127.0.0.1") return "https://awscdn.kalamba.net/games/games/";
|
|
370
|
+
const hasMultipleDistributors = [
|
|
371
|
+
".submissions.",
|
|
372
|
+
".dev.",
|
|
373
|
+
".ci."
|
|
374
|
+
].some((env) => hostname.includes(env));
|
|
375
|
+
const url = new URL(window.location.href);
|
|
376
|
+
url.hostname = url.hostname.replace(/^v\./, "").replace(/^play\./, "games.").replace(".ci.", ".dev.");
|
|
377
|
+
return `${url.origin}/games/${hasMultipleDistributors ? "kalamba/" : ""}`;
|
|
378
|
+
}
|
|
379
|
+
async fetchOperatorConfig() {
|
|
380
|
+
const rootUrl = this.getOperatorConfigRootUrl();
|
|
371
381
|
const integration = this.mappedIntegration;
|
|
372
382
|
const brand = this.mappedBrand;
|
|
373
383
|
let config = {};
|
package/dist/wrapper.d.cts
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-
|
|
6
|
-
import { a as PayloadInjectionManager, i as CasinoPlugin, n as Tracker, r as RgsPlugin, t as TelemetryPlugin } from "./index-
|
|
7
|
-
|
|
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-VC8rzb_Y.cjs";
|
|
6
|
+
import { a as PayloadInjectionManager, i as CasinoPlugin, n as Tracker, r as RgsPlugin, t as TelemetryPlugin } from "./index-CR7iP4Jo.cjs";
|
|
8
7
|
//#region src/common/config/SdkConfigManager.d.ts
|
|
9
8
|
declare abstract class SdkConfigManager {
|
|
10
9
|
config: SdkConfig;
|
|
@@ -18,6 +17,7 @@ declare class KalambaSdkConfigManager extends SdkConfigManager {
|
|
|
18
17
|
get mappedIntegration(): string;
|
|
19
18
|
get mappedBrand(): string;
|
|
20
19
|
mapUiConfig(config: any): DeepPartial<SdkConfig['ui']>;
|
|
20
|
+
getOperatorConfigRootUrl(): string;
|
|
21
21
|
fetchOperatorConfig(): Promise<DeepPartial<SdkConfig['ui']>>;
|
|
22
22
|
}
|
|
23
23
|
//#endregion
|
|
@@ -54,12 +54,7 @@ interface Plugins {
|
|
|
54
54
|
}
|
|
55
55
|
declare class KalambaSdkWrapper {
|
|
56
56
|
#private;
|
|
57
|
-
constructor({
|
|
58
|
-
messagePort,
|
|
59
|
-
plugins,
|
|
60
|
-
sdkConfigManager,
|
|
61
|
-
compatibility
|
|
62
|
-
}: {
|
|
57
|
+
constructor({ messagePort, plugins, sdkConfigManager, compatibility }: {
|
|
63
58
|
messagePort: Window;
|
|
64
59
|
plugins: Plugins;
|
|
65
60
|
sdkConfigManager: new (...args: ConstructorParameters<typeof SdkConfigManager>) => SdkConfigManager;
|
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-
|
|
6
|
-
import { a as PayloadInjectionManager, i as CasinoPlugin, n as Tracker, r as RgsPlugin, t as TelemetryPlugin } from "./index-
|
|
7
|
-
|
|
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-VC8rzb_Y.js";
|
|
6
|
+
import { a as PayloadInjectionManager, i as CasinoPlugin, n as Tracker, r as RgsPlugin, t as TelemetryPlugin } from "./index-LLE4EVbR.js";
|
|
8
7
|
//#region src/common/config/SdkConfigManager.d.ts
|
|
9
8
|
declare abstract class SdkConfigManager {
|
|
10
9
|
config: SdkConfig;
|
|
@@ -18,6 +17,7 @@ declare class KalambaSdkConfigManager extends SdkConfigManager {
|
|
|
18
17
|
get mappedIntegration(): string;
|
|
19
18
|
get mappedBrand(): string;
|
|
20
19
|
mapUiConfig(config: any): DeepPartial<SdkConfig['ui']>;
|
|
20
|
+
getOperatorConfigRootUrl(): string;
|
|
21
21
|
fetchOperatorConfig(): Promise<DeepPartial<SdkConfig['ui']>>;
|
|
22
22
|
}
|
|
23
23
|
//#endregion
|
|
@@ -54,12 +54,7 @@ interface Plugins {
|
|
|
54
54
|
}
|
|
55
55
|
declare class KalambaSdkWrapper {
|
|
56
56
|
#private;
|
|
57
|
-
constructor({
|
|
58
|
-
messagePort,
|
|
59
|
-
plugins,
|
|
60
|
-
sdkConfigManager,
|
|
61
|
-
compatibility
|
|
62
|
-
}: {
|
|
57
|
+
constructor({ messagePort, plugins, sdkConfigManager, compatibility }: {
|
|
63
58
|
messagePort: Window;
|
|
64
59
|
plugins: Plugins;
|
|
65
60
|
sdkConfigManager: new (...args: ConstructorParameters<typeof SdkConfigManager>) => SdkConfigManager;
|
package/dist/wrapper.js
CHANGED
|
@@ -170,8 +170,7 @@ function jurisdictionConfigOverrides(config, jurisdiction) {
|
|
|
170
170
|
feature: {
|
|
171
171
|
showFastPlay: false,
|
|
172
172
|
allowQuickStop: false,
|
|
173
|
-
showFeatureBuy: false
|
|
174
|
-
showPromoPanel: false
|
|
173
|
+
showFeatureBuy: false
|
|
175
174
|
},
|
|
176
175
|
minimumSpinDuration: 5
|
|
177
176
|
};
|
|
@@ -364,9 +363,20 @@ var KalambaSdkConfigManager = class extends SdkConfigManager {
|
|
|
364
363
|
skipSplash: config.badge.loaderAutoContinue
|
|
365
364
|
};
|
|
366
365
|
}
|
|
367
|
-
|
|
366
|
+
getOperatorConfigRootUrl() {
|
|
368
367
|
const hostname = typeof window !== "undefined" ? window.location?.hostname ?? "" : "";
|
|
369
|
-
|
|
368
|
+
if (!hostname || hostname === "localhost" || hostname === "127.0.0.1") return "https://awscdn.kalamba.net/games/games/";
|
|
369
|
+
const hasMultipleDistributors = [
|
|
370
|
+
".submissions.",
|
|
371
|
+
".dev.",
|
|
372
|
+
".ci."
|
|
373
|
+
].some((env) => hostname.includes(env));
|
|
374
|
+
const url = new URL(window.location.href);
|
|
375
|
+
url.hostname = url.hostname.replace(/^v\./, "").replace(/^play\./, "games.").replace(".ci.", ".dev.");
|
|
376
|
+
return `${url.origin}/games/${hasMultipleDistributors ? "kalamba/" : ""}`;
|
|
377
|
+
}
|
|
378
|
+
async fetchOperatorConfig() {
|
|
379
|
+
const rootUrl = this.getOperatorConfigRootUrl();
|
|
370
380
|
const integration = this.mappedIntegration;
|
|
371
381
|
const brand = this.mappedBrand;
|
|
372
382
|
let config = {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kalamba/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.50.0",
|
|
4
4
|
"license": "BSD-3-Clause",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -41,14 +41,15 @@
|
|
|
41
41
|
"zustand": "5.0.11"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
+
"@kalamba/common": "workspace:*",
|
|
44
45
|
"@types/lodash-es": "4.17.12",
|
|
45
46
|
"@types/react": "19.1.6",
|
|
46
47
|
"@types/react-dom": "19.1.6",
|
|
47
48
|
"react": "19.1.0",
|
|
48
49
|
"react-dom": "19.1.0",
|
|
49
|
-
"tsdown": "0.22.
|
|
50
|
-
"
|
|
51
|
-
"
|
|
50
|
+
"tsdown": "0.22.5",
|
|
51
|
+
"typescript": "6.0.3",
|
|
52
|
+
"vitest": "4.1.9"
|
|
52
53
|
},
|
|
53
54
|
"scripts": {
|
|
54
55
|
"build": "tsdown",
|
|
@@ -58,4 +59,4 @@
|
|
|
58
59
|
"test:related": "vitest related --run --passWithNoTests",
|
|
59
60
|
"release": "semantic-release-monorepo"
|
|
60
61
|
}
|
|
61
|
-
}
|
|
62
|
+
}
|
package/dist/logger-CvU7xLGv.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* BSD 3-Clause License
|
|
3
|
-
* Copyright (c) 2026, Kalamba Games Limited
|
|
4
|
-
*/
|
|
5
|
-
//#region src/common/logger.ts
|
|
6
|
-
function createLogger(prefix, style) {
|
|
7
|
-
return (message, ...args) => {
|
|
8
|
-
console.log(`[%c${prefix}\x1B[m] %s`, style, message, ...args);
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
var WithLogger = class {
|
|
12
|
-
static LOG_PREFIX;
|
|
13
|
-
static LOG_STYLES = "color:#000000;font-weight:bold;";
|
|
14
|
-
log;
|
|
15
|
-
constructor() {
|
|
16
|
-
const ctor = new.target;
|
|
17
|
-
const prefix = ctor.LOG_PREFIX ?? ctor.name;
|
|
18
|
-
this.log = createLogger(prefix, ctor.LOG_STYLES);
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
//#endregion
|
|
22
|
-
export { WithLogger as t };
|
package/dist/logger-QUIW2N_l.cjs
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* BSD 3-Clause License
|
|
3
|
-
* Copyright (c) 2026, Kalamba Games Limited
|
|
4
|
-
*/
|
|
5
|
-
//#region src/common/logger.ts
|
|
6
|
-
function createLogger(prefix, style) {
|
|
7
|
-
return (message, ...args) => {
|
|
8
|
-
console.log(`[%c${prefix}\x1B[m] %s`, style, message, ...args);
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
var WithLogger = class {
|
|
12
|
-
static LOG_PREFIX;
|
|
13
|
-
static LOG_STYLES = "color:#000000;font-weight:bold;";
|
|
14
|
-
log;
|
|
15
|
-
constructor() {
|
|
16
|
-
const ctor = new.target;
|
|
17
|
-
const prefix = ctor.LOG_PREFIX ?? ctor.name;
|
|
18
|
-
this.log = createLogger(prefix, ctor.LOG_STYLES);
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
//#endregion
|
|
22
|
-
Object.defineProperty(exports, "WithLogger", {
|
|
23
|
-
enumerable: true,
|
|
24
|
-
get: function() {
|
|
25
|
-
return WithLogger;
|
|
26
|
-
}
|
|
27
|
-
});
|