@mpgd/target-config 0.13.1 → 0.14.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/index.js +31 -21
- package/dist/runtime.d.ts +3 -2
- package/dist/runtime.js +21 -1
- package/dist/viewport.d.ts +1 -1
- package/dist/viewport.js +3 -0
- package/package.json +4 -4
- package/targets.json +87 -1
package/dist/index.js
CHANGED
|
@@ -8,6 +8,8 @@ export * from './runtime.js';
|
|
|
8
8
|
export * from './viewport.js';
|
|
9
9
|
export const assertEffectiveTargetConfigMatrix = (() => {
|
|
10
10
|
const _ip0 = input => "string" === typeof input["version"];
|
|
11
|
+
const _iv0 = new Set(["apps-in-toss", "capacitor-android", "capacitor-ios", "devvit-web", "microsoft-store-pwa", "tiktok-minigame", "verse8-web", "web", "web-preview", "wechat-minigame"]);
|
|
12
|
+
const _iv1 = new Set(["app-store", "apps-in-toss", "devvit", "google-play", "microsoft-store", "tiktok-minigame", "verse8", "web", "web-preview", "wechat-minigame"]);
|
|
11
13
|
const _ip1 = input => "boolean" === typeof input["iap"];
|
|
12
14
|
const _ip2 = input => "boolean" === typeof input["rewardedAds"];
|
|
13
15
|
const _ip3 = input => "boolean" === typeof input["interstitialAds"];
|
|
@@ -24,7 +26,10 @@ export const assertEffectiveTargetConfigMatrix = (() => {
|
|
|
24
26
|
expected: "string",
|
|
25
27
|
value: input["version"]
|
|
26
28
|
}, _errorFactory);
|
|
27
|
-
const
|
|
29
|
+
const _av0 = new Set(["apps-in-toss", "capacitor-android", "capacitor-ios", "devvit-web", "microsoft-store-pwa", "tiktok-minigame", "verse8-web", "web", "web-preview", "wechat-minigame"]);
|
|
30
|
+
const _ae0 = "(\"apps-in-toss\" | \"capacitor-android\" | \"capacitor-ios\" | \"devvit-web\" | \"microsoft-store-pwa\" | \"tiktok-minigame\" | \"verse8-web\" | \"web\" | \"web-preview\" | \"wechat-minigame\")";
|
|
31
|
+
const _av1 = new Set(["app-store", "apps-in-toss", "devvit", "google-play", "microsoft-store", "tiktok-minigame", "verse8", "web", "web-preview", "wechat-minigame"]);
|
|
32
|
+
const _ae1 = "(\"app-store\" | \"apps-in-toss\" | \"devvit\" | \"google-play\" | \"microsoft-store\" | \"tiktok-minigame\" | \"verse8\" | \"web\" | \"web-preview\" | \"wechat-minigame\")";
|
|
28
33
|
const _ap1 = (input, _path, _exceptionable = true) => "boolean" === typeof input["iap"] || _assertGuard_1._assertGuard(_exceptionable, {
|
|
29
34
|
method: "typia.createAssert",
|
|
30
35
|
path: _path + ".iap",
|
|
@@ -55,7 +60,7 @@ export const assertEffectiveTargetConfigMatrix = (() => {
|
|
|
55
60
|
expected: "string",
|
|
56
61
|
value: input["id"]
|
|
57
62
|
}, _errorFactory);
|
|
58
|
-
const
|
|
63
|
+
const _ae2 = "({ readonly type: \"currency\"; readonly currency: \"coin\" | \"gem\"; readonly amount: number; } | { readonly type: \"entitlement\"; readonly entitlement: string; } | { readonly type: \"resource\"; readonly resource: string & MinLength<1>; readonly amount: number & ExclusiveMinimum<0> & Maximum<1.7976931348623157e+308>; })";
|
|
59
64
|
const _ap6 = (input, _path, _exceptionable = true) => "boolean" === typeof input["enabled"] || _assertGuard_1._assertGuard(_exceptionable, {
|
|
60
65
|
method: "typia.createAssert",
|
|
61
66
|
path: _path + ".enabled",
|
|
@@ -86,8 +91,8 @@ export const assertEffectiveTargetConfigMatrix = (() => {
|
|
|
86
91
|
expected: "number",
|
|
87
92
|
value: input["amount"]
|
|
88
93
|
}, _errorFactory);
|
|
89
|
-
const
|
|
90
|
-
const
|
|
94
|
+
const _ae3 = "(undefined | { readonly type: \"continue\"; readonly amount: number; } | { readonly type: \"currency\"; readonly amount: number; readonly currency: \"coin\" | \"gem\"; })";
|
|
95
|
+
const _ae4 = "({ readonly type: \"continue\"; readonly amount: number; } | { readonly type: \"currency\"; readonly amount: number; readonly currency: \"coin\" | \"gem\"; })";
|
|
91
96
|
const _ao0 = (input, _path, _exceptionable = true) => _ap0(input, _path, true && _exceptionable) && (("object" === typeof input.targets && null !== input.targets && false === Array.isArray(input.targets) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
92
97
|
method: "typia.createAssert",
|
|
93
98
|
path: _path + ".targets",
|
|
@@ -123,12 +128,12 @@ export const assertEffectiveTargetConfigMatrix = (() => {
|
|
|
123
128
|
}, _errorFactory)) && (("object" === typeof input.grant && null !== input.grant || _assertGuard_1._assertGuard(_exceptionable, {
|
|
124
129
|
method: "typia.createAssert",
|
|
125
130
|
path: _path + ".grant",
|
|
126
|
-
expected:
|
|
131
|
+
expected: _ae2,
|
|
127
132
|
value: input.grant
|
|
128
133
|
}, _errorFactory)) && _au0(input.grant, _path + ".grant", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
129
134
|
method: "typia.createAssert",
|
|
130
135
|
path: _path + ".grant",
|
|
131
|
-
expected:
|
|
136
|
+
expected: _ae2,
|
|
132
137
|
value: input.grant
|
|
133
138
|
}, _errorFactory)) && _ap6(input, _path, true && _exceptionable) && _ap7(input, _path, true && _exceptionable) && (undefined === input.platformProductId || "string" === typeof input.platformProductId || _assertGuard_1._assertGuard(_exceptionable, {
|
|
134
139
|
method: "typia.createAssert",
|
|
@@ -213,12 +218,12 @@ export const assertEffectiveTargetConfigMatrix = (() => {
|
|
|
213
218
|
}, _errorFactory)) && (undefined === input.reward || ("object" === typeof input.reward && null !== input.reward || _assertGuard_1._assertGuard(_exceptionable, {
|
|
214
219
|
method: "typia.createAssert",
|
|
215
220
|
path: _path + ".reward",
|
|
216
|
-
expected:
|
|
221
|
+
expected: _ae3,
|
|
217
222
|
value: input.reward
|
|
218
223
|
}, _errorFactory)) && _au1(input.reward, _path + ".reward", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
219
224
|
method: "typia.createAssert",
|
|
220
225
|
path: _path + ".reward",
|
|
221
|
-
expected:
|
|
226
|
+
expected: _ae3,
|
|
222
227
|
value: input.reward
|
|
223
228
|
}, _errorFactory)) && (("object" === typeof input.frequencyCap && null !== input.frequencyCap || _assertGuard_1._assertGuard(_exceptionable, {
|
|
224
229
|
method: "typia.createAssert",
|
|
@@ -280,7 +285,7 @@ export const assertEffectiveTargetConfigMatrix = (() => {
|
|
|
280
285
|
path: _path + ".target",
|
|
281
286
|
expected: "string",
|
|
282
287
|
value: input.target
|
|
283
|
-
}, _errorFactory)) && (
|
|
288
|
+
}, _errorFactory)) && (true === _av0.has(input.runtime) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
284
289
|
method: "typia.createAssert",
|
|
285
290
|
path: _path + ".runtime",
|
|
286
291
|
expected: _ae0,
|
|
@@ -408,10 +413,10 @@ export const assertEffectiveTargetConfigMatrix = (() => {
|
|
|
408
413
|
expected: "(\"en\" | \"ko\")",
|
|
409
414
|
value: input.fallbackLocale
|
|
410
415
|
}, _errorFactory));
|
|
411
|
-
const _ao3 = (input, _path, _exceptionable = true) =>
|
|
416
|
+
const _ao3 = (input, _path, _exceptionable = true) => true === _av1.has(input.profile) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
412
417
|
method: "typia.createAssert",
|
|
413
418
|
path: _path + ".profile",
|
|
414
|
-
expected:
|
|
419
|
+
expected: _ae1,
|
|
415
420
|
value: input.profile
|
|
416
421
|
}, _errorFactory);
|
|
417
422
|
const _ao4 = (input, _path, _exceptionable = true) => _ap1(input, _path, true && _exceptionable) && (undefined === input.bannerAds || "boolean" === typeof input.bannerAds || _assertGuard_1._assertGuard(_exceptionable, {
|
|
@@ -546,7 +551,7 @@ export const assertEffectiveTargetConfigMatrix = (() => {
|
|
|
546
551
|
return _assertGuard_1._assertGuard(_exceptionable, {
|
|
547
552
|
method: "typia.createAssert",
|
|
548
553
|
path: _path,
|
|
549
|
-
expected:
|
|
554
|
+
expected: _ae2,
|
|
550
555
|
value: input
|
|
551
556
|
}, _errorFactory);
|
|
552
557
|
})();
|
|
@@ -559,7 +564,7 @@ export const assertEffectiveTargetConfigMatrix = (() => {
|
|
|
559
564
|
return _assertGuard_1._assertGuard(_exceptionable, {
|
|
560
565
|
method: "typia.createAssert",
|
|
561
566
|
path: _path,
|
|
562
|
-
expected:
|
|
567
|
+
expected: _ae4,
|
|
563
568
|
value: input
|
|
564
569
|
}, _errorFactory);
|
|
565
570
|
})();
|
|
@@ -580,10 +585,10 @@ export const assertEffectiveTargetConfigMatrix = (() => {
|
|
|
580
585
|
const _io17 = input => _ip8(input) && _ip10(input) && _ip9(input);
|
|
581
586
|
const _io18 = input => "number" === typeof input.cooldownSeconds && (undefined === input.maxPerSession || "number" === typeof input.maxPerSession) && (undefined === input.minStageInterval || "number" === typeof input.minStageInterval);
|
|
582
587
|
const _io19 = input => "boolean" === typeof input.native && _ip6(input) && ("available" === input.reason || "capability-unsupported" === input.reason || "target-disabled" === input.reason) && (undefined === input.defaultLeaderboardId || "string" === typeof input.defaultLeaderboardId);
|
|
583
|
-
const _io2 = input => _ip0(input) && "string" === typeof input.target &&
|
|
588
|
+
const _io2 = input => _ip0(input) && "string" === typeof input.target && true === _iv0.has(input.runtime) && ("object" === typeof input.release && null !== input.release && _io3(input.release)) && ("object" === typeof input.features && null !== input.features && _io4(input.features)) && ("object" === typeof input.capabilities && null !== input.capabilities && _io5(input.capabilities)) && ("object" === typeof input.integrations && null !== input.integrations && _io6(input.integrations)) && ("object" === typeof input.policy && null !== input.policy && _io7(input.policy)) && ("object" === typeof input.sources && null !== input.sources && _io8(input.sources)) && ("object" === typeof input.monetization && null !== input.monetization && _io9(input.monetization)) && ("object" === typeof input.ads && null !== input.ads && _io14(input.ads)) && ("object" === typeof input.leaderboard && null !== input.leaderboard && _io19(input.leaderboard)) && ("object" === typeof input.storage && null !== input.storage && _io20(input.storage)) && ("object" === typeof input.localization && null !== input.localization && _io21(input.localization));
|
|
584
589
|
const _io20 = input => ("local" === input.support || "native" === input.support || "none" === input.support) && _ip6(input);
|
|
585
590
|
const _io21 = input => _ip6(input) && ("en" === input.fallbackLocale || "ko" === input.fallbackLocale);
|
|
586
|
-
const _io3 = input =>
|
|
591
|
+
const _io3 = input => true === _iv1.has(input.profile);
|
|
587
592
|
const _io4 = input => _ip1(input) && (undefined === input.bannerAds || "boolean" === typeof input.bannerAds) && _ip2(input) && _ip3(input) && "boolean" === typeof input.leaderboard && _ip4(input);
|
|
588
593
|
const _io5 = input => ("local" === input.storage || "native" === input.storage || "none" === input.storage) && _ip4(input);
|
|
589
594
|
const _io6 = input => ("approval-required" === input.identityUpgrade || "available" === input.identityUpgrade || "configuration-required" === input.identityUpgrade || "disabled" === input.identityUpgrade || "unsupported" === input.identityUpgrade) && ("approval-required" === input.presentation || "available" === input.presentation || "configuration-required" === input.presentation || "disabled" === input.presentation || "unsupported" === input.presentation) && ("approval-required" === input.sharing || "available" === input.sharing || "configuration-required" === input.sharing || "disabled" === input.sharing || "unsupported" === input.sharing) && ("approval-required" === input.inboundShare || "available" === input.inboundShare || "configuration-required" === input.inboundShare || "disabled" === input.inboundShare || "unsupported" === input.inboundShare) && ("approval-required" === input.notifications || "available" === input.notifications || "configuration-required" === input.notifications || "disabled" === input.notifications || "unsupported" === input.notifications) && ("fullscreen" === input.presentationMode || "inline-expanded" === input.presentationMode);
|
|
@@ -629,12 +634,15 @@ export const assertEffectiveTargetConfigMatrix = (() => {
|
|
|
629
634
|
};
|
|
630
635
|
})();
|
|
631
636
|
export const assertTargetConfigMatrix = (() => {
|
|
637
|
+
const _iv0 = new Set(["apps-in-toss", "capacitor-android", "capacitor-ios", "devvit-web", "microsoft-store-pwa", "tiktok-minigame", "verse8-web", "web", "web-preview", "wechat-minigame"]);
|
|
632
638
|
const _ip0 = input => "boolean" === typeof input["iap"];
|
|
633
639
|
const _ip1 = input => undefined === input["bannerAds"] || "boolean" === typeof input["bannerAds"];
|
|
634
640
|
const _ip2 = input => "boolean" === typeof input["rewardedAds"];
|
|
635
641
|
const _ip3 = input => "boolean" === typeof input["interstitialAds"];
|
|
636
642
|
const _ip4 = input => "boolean" === typeof input["localization"];
|
|
637
|
-
const
|
|
643
|
+
const _iv1 = new Set(["app-store", "apps-in-toss", "devvit", "google-play", "microsoft-store", "tiktok-minigame", "verse8", "web", "web-preview", "wechat-minigame"]);
|
|
644
|
+
const _av0 = new Set(["apps-in-toss", "capacitor-android", "capacitor-ios", "devvit-web", "microsoft-store-pwa", "tiktok-minigame", "verse8-web", "web", "web-preview", "wechat-minigame"]);
|
|
645
|
+
const _ae0 = "(\"apps-in-toss\" | \"capacitor-android\" | \"capacitor-ios\" | \"devvit-web\" | \"microsoft-store-pwa\" | \"tiktok-minigame\" | \"verse8-web\" | \"web\" | \"web-preview\" | \"wechat-minigame\")";
|
|
638
646
|
const _ap0 = (input, _path, _exceptionable = true) => "boolean" === typeof input["iap"] || _assertGuard_1._assertGuard(_exceptionable, {
|
|
639
647
|
method: "typia.createAssert",
|
|
640
648
|
path: _path + ".iap",
|
|
@@ -665,6 +673,8 @@ export const assertTargetConfigMatrix = (() => {
|
|
|
665
673
|
expected: "boolean",
|
|
666
674
|
value: input["localization"]
|
|
667
675
|
}, _errorFactory);
|
|
676
|
+
const _av1 = new Set(["app-store", "apps-in-toss", "devvit", "google-play", "microsoft-store", "tiktok-minigame", "verse8", "web", "web-preview", "wechat-minigame"]);
|
|
677
|
+
const _ae1 = "(\"app-store\" | \"apps-in-toss\" | \"devvit\" | \"google-play\" | \"microsoft-store\" | \"tiktok-minigame\" | \"verse8\" | \"web\" | \"web-preview\" | \"wechat-minigame\")";
|
|
668
678
|
const _ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.version || _assertGuard_1._assertGuard(_exceptionable, {
|
|
669
679
|
method: "typia.createAssert",
|
|
670
680
|
path: _path + ".version",
|
|
@@ -728,7 +738,7 @@ export const assertTargetConfigMatrix = (() => {
|
|
|
728
738
|
expected: "(\"fullscreen\" | \"inline-expanded\")",
|
|
729
739
|
value: input.presentationMode
|
|
730
740
|
}, _errorFactory));
|
|
731
|
-
const _ao2 = (input, _path, _exceptionable = true) => (
|
|
741
|
+
const _ao2 = (input, _path, _exceptionable = true) => (true === _av0.has(input.runtime) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
732
742
|
method: "typia.createAssert",
|
|
733
743
|
path: _path + ".runtime",
|
|
734
744
|
expected: _ae0,
|
|
@@ -839,10 +849,10 @@ export const assertTargetConfigMatrix = (() => {
|
|
|
839
849
|
expected: "boolean",
|
|
840
850
|
value: input.native
|
|
841
851
|
}, _errorFactory);
|
|
842
|
-
const _ao8 = (input, _path, _exceptionable = true) =>
|
|
852
|
+
const _ao8 = (input, _path, _exceptionable = true) => true === _av1.has(input.profile) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
843
853
|
method: "typia.createAssert",
|
|
844
854
|
path: _path + ".profile",
|
|
845
|
-
expected:
|
|
855
|
+
expected: _ae1,
|
|
846
856
|
value: input.profile
|
|
847
857
|
}, _errorFactory);
|
|
848
858
|
const _ao9 = (input, _path, _exceptionable = true) => ("boolean" === typeof input.externalPaymentAllowed || _assertGuard_1._assertGuard(_exceptionable, {
|
|
@@ -879,13 +889,13 @@ export const assertTargetConfigMatrix = (() => {
|
|
|
879
889
|
return "object" === typeof value && null !== value && _io2(value);
|
|
880
890
|
});
|
|
881
891
|
const _io10 = input => ("approval-required" === input.identityUpgrade || "available" === input.identityUpgrade || "configuration-required" === input.identityUpgrade || "disabled" === input.identityUpgrade || "unsupported" === input.identityUpgrade) && ("approval-required" === input.presentation || "available" === input.presentation || "configuration-required" === input.presentation || "disabled" === input.presentation || "unsupported" === input.presentation) && ("approval-required" === input.sharing || "available" === input.sharing || "configuration-required" === input.sharing || "disabled" === input.sharing || "unsupported" === input.sharing) && ("approval-required" === input.inboundShare || "available" === input.inboundShare || "configuration-required" === input.inboundShare || "disabled" === input.inboundShare || "unsupported" === input.inboundShare) && ("approval-required" === input.notifications || "available" === input.notifications || "configuration-required" === input.notifications || "disabled" === input.notifications || "unsupported" === input.notifications) && ("fullscreen" === input.presentationMode || "inline-expanded" === input.presentationMode);
|
|
882
|
-
const _io2 = input =>
|
|
892
|
+
const _io2 = input => true === _iv0.has(input.runtime) && ("object" === typeof input.features && null !== input.features && _io3(input.features)) && ("object" === typeof input.capabilities && null !== input.capabilities && _io4(input.capabilities)) && ("object" === typeof input.localization && null !== input.localization && _io5(input.localization)) && ("object" === typeof input.monetization && null !== input.monetization && _io6(input.monetization)) && ("object" === typeof input.leaderboard && null !== input.leaderboard && _io7(input.leaderboard)) && ("object" === typeof input.release && null !== input.release && _io8(input.release)) && ("object" === typeof input.policy && null !== input.policy && _io9(input.policy)) && (undefined === input.integrations || "object" === typeof input.integrations && null !== input.integrations && _io10(input.integrations));
|
|
883
893
|
const _io3 = input => _ip0(input) && _ip1(input) && _ip2(input) && _ip3(input) && "boolean" === typeof input.leaderboard && _ip4(input);
|
|
884
894
|
const _io4 = input => ("local" === input.storage || "native" === input.storage || "none" === input.storage) && _ip4(input);
|
|
885
895
|
const _io5 = input => "en" === input.fallbackLocale || "ko" === input.fallbackLocale;
|
|
886
896
|
const _io6 = input => _ip0(input) && _ip1(input) && _ip2(input) && _ip3(input);
|
|
887
897
|
const _io7 = input => "boolean" === typeof input.native;
|
|
888
|
-
const _io8 = input =>
|
|
898
|
+
const _io8 = input => true === _iv1.has(input.profile);
|
|
889
899
|
const _io9 = input => "boolean" === typeof input.externalPaymentAllowed && "boolean" === typeof input.remoteExecutableCodeAllowed && "boolean" === typeof input.installOtherAppCTAAllowed && "boolean" === typeof input.requiresStoreReview && "boolean" === typeof input.requiresAitReview;
|
|
890
900
|
const __is = input => "object" === typeof input && null !== input && _io0(input);
|
|
891
901
|
let _errorFactory;
|
package/dist/runtime.d.ts
CHANGED
|
@@ -4,8 +4,8 @@ import type { EffectiveTargetConfig } from './effective.js';
|
|
|
4
4
|
export type PlatformFeature = 'iap' | 'bannerAds' | 'rewardedAds' | 'interstitialAds' | 'leaderboard' | 'localization';
|
|
5
5
|
export type AdPlacementType = 'rewarded' | 'interstitial' | 'banner';
|
|
6
6
|
type PlatformConfigTarget = PlatformGateway['target'];
|
|
7
|
-
export type TargetRuntimeKind = 'web' | 'web-preview' | 'microsoft-store-pwa' | 'capacitor-android' | 'capacitor-ios' | 'apps-in-toss' | 'devvit-web' | 'verse8-web';
|
|
8
|
-
export type ReleaseProfile = 'web' | 'web-preview' | 'microsoft-store' | 'google-play' | 'app-store' | 'apps-in-toss' | 'devvit' | 'verse8';
|
|
7
|
+
export type TargetRuntimeKind = 'web' | 'web-preview' | 'microsoft-store-pwa' | 'capacitor-android' | 'capacitor-ios' | 'apps-in-toss' | 'devvit-web' | 'verse8-web' | 'wechat-minigame' | 'tiktok-minigame';
|
|
8
|
+
export type ReleaseProfile = 'web' | 'web-preview' | 'microsoft-store' | 'google-play' | 'app-store' | 'apps-in-toss' | 'devvit' | 'verse8' | 'wechat-minigame' | 'tiktok-minigame';
|
|
9
9
|
export type StorageSupport = 'local' | 'native' | 'none';
|
|
10
10
|
export type TargetIntegration = 'identityUpgrade' | 'presentation' | 'sharing' | 'inboundShare' | 'notifications';
|
|
11
11
|
export type IntegrationAvailabilityState = 'available' | 'disabled' | 'approval-required' | 'configuration-required' | 'unsupported';
|
|
@@ -134,6 +134,7 @@ export declare const defaultTargetIntegrationConfig: {
|
|
|
134
134
|
};
|
|
135
135
|
export declare function normalizeTargetIntegrationConfig(config: Partial<TargetIntegrationConfig> | undefined): TargetIntegrationConfig;
|
|
136
136
|
export declare function assertTargetIntegrationRuntimeBounds(runtime: TargetRuntimeKind, config: Partial<TargetIntegrationConfig> | undefined, label: string): TargetIntegrationConfig;
|
|
137
|
+
export declare function isMiniGameRuntime(runtime: TargetRuntimeKind): runtime is 'wechat-minigame' | 'tiktok-minigame';
|
|
137
138
|
export declare function targetConfigKeyForPlatform(target: PlatformConfigTarget): string;
|
|
138
139
|
export declare function getTargetConfig(matrix: TargetConfigMatrix, target: PlatformConfigTarget | string): TargetConfig;
|
|
139
140
|
export declare function isPlatformFeatureEnabled(config: TargetConfig, feature: PlatformFeature): boolean;
|
package/dist/runtime.js
CHANGED
|
@@ -22,6 +22,13 @@ export const targetIntegrations = [
|
|
|
22
22
|
'notifications',
|
|
23
23
|
];
|
|
24
24
|
const integrationUpperBoundsByRuntime = {
|
|
25
|
+
'tiktok-minigame': {
|
|
26
|
+
identityUpgrade: 'unsupported',
|
|
27
|
+
presentation: 'available',
|
|
28
|
+
sharing: 'available',
|
|
29
|
+
inboundShare: 'unsupported',
|
|
30
|
+
notifications: 'unsupported',
|
|
31
|
+
},
|
|
25
32
|
'verse8-web': {
|
|
26
33
|
identityUpgrade: 'unsupported',
|
|
27
34
|
presentation: 'available',
|
|
@@ -36,6 +43,13 @@ const integrationUpperBoundsByRuntime = {
|
|
|
36
43
|
inboundShare: 'available',
|
|
37
44
|
notifications: 'unsupported',
|
|
38
45
|
},
|
|
46
|
+
'wechat-minigame': {
|
|
47
|
+
identityUpgrade: 'unsupported',
|
|
48
|
+
presentation: 'available',
|
|
49
|
+
sharing: 'available',
|
|
50
|
+
inboundShare: 'unsupported',
|
|
51
|
+
notifications: 'unsupported',
|
|
52
|
+
},
|
|
39
53
|
};
|
|
40
54
|
const integrationAvailabilityStateValues = [
|
|
41
55
|
'available',
|
|
@@ -75,7 +89,10 @@ export function normalizeTargetIntegrationConfig(config) {
|
|
|
75
89
|
}
|
|
76
90
|
export function assertTargetIntegrationRuntimeBounds(runtime, config, label) {
|
|
77
91
|
const integrations = normalizeTargetIntegrationConfig(config);
|
|
78
|
-
if (runtime !== '
|
|
92
|
+
if (runtime !== 'tiktok-minigame'
|
|
93
|
+
&& runtime !== 'verse8-web'
|
|
94
|
+
&& runtime !== 'web-preview'
|
|
95
|
+
&& runtime !== 'wechat-minigame') {
|
|
79
96
|
return integrations;
|
|
80
97
|
}
|
|
81
98
|
const upperBounds = integrationUpperBoundsByRuntime[runtime];
|
|
@@ -88,6 +105,9 @@ export function assertTargetIntegrationRuntimeBounds(runtime, config, label) {
|
|
|
88
105
|
}
|
|
89
106
|
return integrations;
|
|
90
107
|
}
|
|
108
|
+
export function isMiniGameRuntime(runtime) {
|
|
109
|
+
return runtime === 'wechat-minigame' || runtime === 'tiktok-minigame';
|
|
110
|
+
}
|
|
91
111
|
function isIntegrationStateWithinUpperBound(state, upperBound) {
|
|
92
112
|
switch (upperBound) {
|
|
93
113
|
case 'available':
|
package/dist/viewport.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export type TargetViewportOrientationMismatchBehavior = 'continue' | 'letterbox'
|
|
|
8
8
|
/** Responsive width class used by target-independent game layout. */
|
|
9
9
|
export type TargetViewportSizeClass = 'compact' | 'medium' | 'expanded';
|
|
10
10
|
/** Browser or embedded host shell that owns the game surface. */
|
|
11
|
-
export type TargetViewportShell = 'browser' | 'mobile-webview' | 'embedded-webview';
|
|
11
|
+
export type TargetViewportShell = 'browser' | 'mobile-webview' | 'embedded-webview' | 'native-minigame';
|
|
12
12
|
/** Browser measurement surface used to construct the viewport snapshot. */
|
|
13
13
|
export type TargetViewportMeasurementSource = 'container' | 'visual-viewport' | 'window' | 'unknown';
|
|
14
14
|
/** Recommended placement for primary game controls. */
|
package/dist/viewport.js
CHANGED
|
@@ -65,6 +65,9 @@ export function targetViewportShellForRuntime(runtime) {
|
|
|
65
65
|
case 'devvit-web':
|
|
66
66
|
case 'verse8-web':
|
|
67
67
|
return 'embedded-webview';
|
|
68
|
+
case 'wechat-minigame':
|
|
69
|
+
case 'tiktok-minigame':
|
|
70
|
+
return 'native-minigame';
|
|
68
71
|
case 'web':
|
|
69
72
|
case 'web-preview':
|
|
70
73
|
case 'microsoft-store-pwa':
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mpgd/target-config",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"description": "Target-specific platform feature availability and effective config helpers for mpgd.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"typia": "13.0.2",
|
|
40
|
-
"@mpgd/
|
|
41
|
-
"@mpgd/platform": "0.
|
|
42
|
-
"@mpgd/
|
|
40
|
+
"@mpgd/i18n": "0.6.0",
|
|
41
|
+
"@mpgd/platform": "0.12.0",
|
|
42
|
+
"@mpgd/catalog": "0.7.2"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"ttsc": "0.18.4",
|
package/targets.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2026-
|
|
2
|
+
"version": "2026-09-01",
|
|
3
3
|
"targets": {
|
|
4
4
|
"web-preview": {
|
|
5
5
|
"runtime": "web-preview",
|
|
@@ -303,6 +303,92 @@
|
|
|
303
303
|
"requiresStoreReview": false,
|
|
304
304
|
"requiresAitReview": false
|
|
305
305
|
}
|
|
306
|
+
},
|
|
307
|
+
"wechat": {
|
|
308
|
+
"runtime": "wechat-minigame",
|
|
309
|
+
"features": {
|
|
310
|
+
"iap": false,
|
|
311
|
+
"rewardedAds": false,
|
|
312
|
+
"interstitialAds": false,
|
|
313
|
+
"leaderboard": false,
|
|
314
|
+
"localization": true
|
|
315
|
+
},
|
|
316
|
+
"capabilities": {
|
|
317
|
+
"storage": "native",
|
|
318
|
+
"localization": true
|
|
319
|
+
},
|
|
320
|
+
"localization": {
|
|
321
|
+
"fallbackLocale": "en"
|
|
322
|
+
},
|
|
323
|
+
"monetization": {
|
|
324
|
+
"iap": false,
|
|
325
|
+
"rewardedAds": false,
|
|
326
|
+
"interstitialAds": false
|
|
327
|
+
},
|
|
328
|
+
"leaderboard": {
|
|
329
|
+
"native": false
|
|
330
|
+
},
|
|
331
|
+
"release": {
|
|
332
|
+
"profile": "wechat-minigame"
|
|
333
|
+
},
|
|
334
|
+
"integrations": {
|
|
335
|
+
"identityUpgrade": "unsupported",
|
|
336
|
+
"presentation": "available",
|
|
337
|
+
"sharing": "available",
|
|
338
|
+
"inboundShare": "unsupported",
|
|
339
|
+
"notifications": "unsupported",
|
|
340
|
+
"presentationMode": "fullscreen"
|
|
341
|
+
},
|
|
342
|
+
"policy": {
|
|
343
|
+
"externalPaymentAllowed": false,
|
|
344
|
+
"remoteExecutableCodeAllowed": false,
|
|
345
|
+
"installOtherAppCTAAllowed": false,
|
|
346
|
+
"requiresStoreReview": true,
|
|
347
|
+
"requiresAitReview": false
|
|
348
|
+
}
|
|
349
|
+
},
|
|
350
|
+
"tiktok": {
|
|
351
|
+
"runtime": "tiktok-minigame",
|
|
352
|
+
"features": {
|
|
353
|
+
"iap": false,
|
|
354
|
+
"rewardedAds": false,
|
|
355
|
+
"interstitialAds": false,
|
|
356
|
+
"leaderboard": false,
|
|
357
|
+
"localization": true
|
|
358
|
+
},
|
|
359
|
+
"capabilities": {
|
|
360
|
+
"storage": "native",
|
|
361
|
+
"localization": true
|
|
362
|
+
},
|
|
363
|
+
"localization": {
|
|
364
|
+
"fallbackLocale": "en"
|
|
365
|
+
},
|
|
366
|
+
"monetization": {
|
|
367
|
+
"iap": false,
|
|
368
|
+
"rewardedAds": false,
|
|
369
|
+
"interstitialAds": false
|
|
370
|
+
},
|
|
371
|
+
"leaderboard": {
|
|
372
|
+
"native": false
|
|
373
|
+
},
|
|
374
|
+
"release": {
|
|
375
|
+
"profile": "tiktok-minigame"
|
|
376
|
+
},
|
|
377
|
+
"integrations": {
|
|
378
|
+
"identityUpgrade": "unsupported",
|
|
379
|
+
"presentation": "available",
|
|
380
|
+
"sharing": "configuration-required",
|
|
381
|
+
"inboundShare": "unsupported",
|
|
382
|
+
"notifications": "unsupported",
|
|
383
|
+
"presentationMode": "fullscreen"
|
|
384
|
+
},
|
|
385
|
+
"policy": {
|
|
386
|
+
"externalPaymentAllowed": false,
|
|
387
|
+
"remoteExecutableCodeAllowed": false,
|
|
388
|
+
"installOtherAppCTAAllowed": false,
|
|
389
|
+
"requiresStoreReview": true,
|
|
390
|
+
"requiresAitReview": false
|
|
391
|
+
}
|
|
306
392
|
}
|
|
307
393
|
}
|
|
308
394
|
}
|