Commit dist build so the package installs from git
This commit is contained in:
parent
1cb01e024e
commit
7b4e73a6ac
16 changed files with 462 additions and 0 deletions
155
dist/esm/definitions.d.ts
vendored
Normal file
155
dist/esm/definitions.d.ts
vendored
Normal file
|
|
@ -0,0 +1,155 @@
|
|||
import type { PluginListenerHandle } from '@capacitor/core';
|
||||
/** Full-screen ad formats supported by this plugin. Banners and native ads are intentionally not exposed. */
|
||||
export type AdFormat = 'rewarded' | 'interstitial';
|
||||
export interface InitOptions {
|
||||
/** LevelPlay app key from the LevelPlay dashboard (one per platform). */
|
||||
appKey: string;
|
||||
/** Optional user id, needed for server-to-server reward callbacks and the Ad Quality user journey. */
|
||||
userId?: string;
|
||||
/**
|
||||
* Enable the LevelPlay Integration Test Suite (sets the `is_test_suite=enable` meta data before init).
|
||||
* Call {@link LevelPlayPlugin.launchTestSuite} after init resolves. Never ship this enabled.
|
||||
*/
|
||||
testSuite?: boolean;
|
||||
/** Turn on mediated ad network debug logs (`setAdaptersDebug`). Development only. */
|
||||
adaptersDebug?: boolean;
|
||||
/**
|
||||
* Privacy flags applied right before init (LevelPlay recommends setting them before the SDK starts).
|
||||
* Same as calling {@link LevelPlayPlugin.setConsent} first.
|
||||
*/
|
||||
consent?: ConsentOptions;
|
||||
}
|
||||
export interface InitResult {
|
||||
/** Native LevelPlay SDK version, for example `9.6.1`. */
|
||||
sdkVersion: string;
|
||||
}
|
||||
/**
|
||||
* Privacy signals forwarded to LevelPlay (`LevelPlayPrivacySettings` on Android, `LPMPrivacySettings` on iOS).
|
||||
* Omitted fields are left untouched.
|
||||
*/
|
||||
export interface ConsentOptions {
|
||||
/** GDPR: `true` when the user consented to personalised ads / data processing. */
|
||||
gdprConsent?: boolean;
|
||||
/** CCPA / US state privacy: `true` when the user opted OUT of the sale or sharing of personal data. */
|
||||
ccpaDoNotSell?: boolean;
|
||||
/** COPPA: `true` when the user must be treated as a child (child-directed treatment). */
|
||||
coppa?: boolean;
|
||||
}
|
||||
export interface MetaDataOptions {
|
||||
key: string;
|
||||
value: string;
|
||||
}
|
||||
export interface AdUnitOptions {
|
||||
/** Ad unit id from the LevelPlay dashboard. */
|
||||
adUnitId: string;
|
||||
}
|
||||
export interface ShowOptions extends AdUnitOptions {
|
||||
/** Optional placement name configured in the LevelPlay dashboard (capping / pacing / reward per placement). */
|
||||
placementName?: string;
|
||||
}
|
||||
export interface IsReadyOptions extends AdUnitOptions {
|
||||
format: AdFormat;
|
||||
}
|
||||
export interface IsReadyResult {
|
||||
ready: boolean;
|
||||
}
|
||||
export interface Reward {
|
||||
name: string;
|
||||
amount: number;
|
||||
}
|
||||
export interface AdError {
|
||||
code: number;
|
||||
message: string;
|
||||
}
|
||||
/** Subset of the native `LevelPlayAdInfo` / `LPMAdInfo` that is useful in JavaScript. */
|
||||
export interface AdInfo {
|
||||
adId?: string;
|
||||
adUnitId: string;
|
||||
adUnitName?: string;
|
||||
adFormat?: string;
|
||||
placementName?: string;
|
||||
adNetwork?: string;
|
||||
instanceName?: string;
|
||||
instanceId?: string;
|
||||
country?: string;
|
||||
auctionId?: string;
|
||||
/** Impression revenue in USD as reported by the SDK (may be absent before display). */
|
||||
revenue?: number;
|
||||
precision?: string;
|
||||
}
|
||||
export interface ShowResult {
|
||||
/** The ad was displayed (`displayed` fired). */
|
||||
shown: boolean;
|
||||
/** Rewarded only: the reward callback fired for this show. Grant the reward only when this is true. */
|
||||
rewarded: boolean;
|
||||
reward?: Reward;
|
||||
/** Present when the ad was not ready or failed to display. */
|
||||
error?: AdError;
|
||||
adInfo?: AdInfo;
|
||||
}
|
||||
export interface AdEvent {
|
||||
format: AdFormat;
|
||||
adUnitId: string;
|
||||
adInfo?: AdInfo;
|
||||
}
|
||||
export interface AdErrorEvent extends AdEvent {
|
||||
error: AdError;
|
||||
}
|
||||
export interface AdRewardEvent extends AdEvent {
|
||||
reward: Reward;
|
||||
}
|
||||
export type TrackingStatus = 'authorized' | 'denied' | 'restricted' | 'notDetermined' | 'unavailable';
|
||||
export interface TrackingResult {
|
||||
/** iOS App Tracking Transparency status. Always `unavailable` on Android and web. */
|
||||
status: TrackingStatus;
|
||||
}
|
||||
export interface LevelPlayPlugin {
|
||||
/**
|
||||
* Initialise the LevelPlay SDK. Resolves on `onInitSuccess`, rejects with the init error otherwise.
|
||||
* Calling it again after a successful init resolves immediately. Load ads only after this resolves.
|
||||
*/
|
||||
initialize(options: InitOptions): Promise<InitResult>;
|
||||
/** Native SDK version (available before init). */
|
||||
getSdkVersion(): Promise<InitResult>;
|
||||
/** Forward GDPR / CCPA / COPPA signals. Call before {@link initialize} when you can. */
|
||||
setConsent(options: ConsentOptions): Promise<void>;
|
||||
/** Raw `LevelPlay.setMetaData(key, value)` for network-specific flags. Call before init. */
|
||||
setMetaData(options: MetaDataOptions): Promise<void>;
|
||||
/**
|
||||
* iOS: show the App Tracking Transparency prompt (needs `NSUserTrackingUsageDescription` in Info.plist) and resolve
|
||||
* with the resulting status. Call it before {@link initialize}. Android / web: resolves `unavailable`.
|
||||
*/
|
||||
requestTrackingAuthorization(): Promise<TrackingResult>;
|
||||
/** Current ATT status without prompting (iOS). Android / web: `unavailable`. */
|
||||
getTrackingAuthorizationStatus(): Promise<TrackingResult>;
|
||||
/**
|
||||
* Start loading a rewarded ad for the ad unit (the ad object is created on first use and reused).
|
||||
* Resolves once the request is issued; the outcome arrives as `loaded` / `loadFailed` events.
|
||||
*/
|
||||
loadRewarded(options: AdUnitOptions): Promise<void>;
|
||||
/**
|
||||
* Show a loaded rewarded ad. Resolves after the ad closes (or failed to display) with what happened.
|
||||
* Never rejects for "not ready": resolves `{ shown: false, error }` instead.
|
||||
*/
|
||||
showRewarded(options: ShowOptions): Promise<ShowResult>;
|
||||
/** Start loading an interstitial ad (see {@link loadRewarded}). */
|
||||
loadInterstitial(options: AdUnitOptions): Promise<void>;
|
||||
/** Show a loaded interstitial. Resolves after it closes (or failed to display). */
|
||||
showInterstitial(options: ShowOptions): Promise<ShowResult>;
|
||||
/** `isAdReady()` of the ad object for this ad unit (`false` when it was never loaded). */
|
||||
isReady(options: IsReadyOptions): Promise<IsReadyResult>;
|
||||
/** Open the LevelPlay Integration Test Suite. Requires `initialize({ testSuite: true })` first. */
|
||||
launchTestSuite(): Promise<void>;
|
||||
/** Log the LevelPlay integration helper report to the native console (development only). */
|
||||
validateIntegration(): Promise<void>;
|
||||
addListener(eventName: 'loaded', listenerFunc: (event: AdEvent) => void): Promise<PluginListenerHandle>;
|
||||
addListener(eventName: 'loadFailed', listenerFunc: (event: AdErrorEvent) => void): Promise<PluginListenerHandle>;
|
||||
addListener(eventName: 'displayed', listenerFunc: (event: AdEvent) => void): Promise<PluginListenerHandle>;
|
||||
addListener(eventName: 'displayFailed', listenerFunc: (event: AdErrorEvent) => void): Promise<PluginListenerHandle>;
|
||||
addListener(eventName: 'clicked', listenerFunc: (event: AdEvent) => void): Promise<PluginListenerHandle>;
|
||||
addListener(eventName: 'closed', listenerFunc: (event: AdEvent) => void): Promise<PluginListenerHandle>;
|
||||
addListener(eventName: 'rewarded', listenerFunc: (event: AdRewardEvent) => void): Promise<PluginListenerHandle>;
|
||||
removeAllListeners(): Promise<void>;
|
||||
}
|
||||
/** Event names emitted by the plugin. */
|
||||
export type LevelPlayEventName = 'loaded' | 'loadFailed' | 'displayed' | 'displayFailed' | 'clicked' | 'closed' | 'rewarded';
|
||||
2
dist/esm/definitions.js
vendored
Normal file
2
dist/esm/definitions.js
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
export {};
|
||||
//# sourceMappingURL=definitions.js.map
|
||||
1
dist/esm/definitions.js.map
vendored
Normal file
1
dist/esm/definitions.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
18
dist/esm/demo.d.ts
vendored
Normal file
18
dist/esm/demo.d.ts
vendored
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
/**
|
||||
* Public demo app keys and ad unit ids from Unity's official LevelPlay sample apps
|
||||
* (https://github.com/ironsource-mobile/Mediation-Demo-Apps: `Android/Kotlin/.../DemoActivity.kt` and
|
||||
* `iOS/Swift SPM/LevelPlayDemo/DemoViewController.swift`). They serve test ads and are safe for development only.
|
||||
* Replace them with your own ids from the LevelPlay dashboard before release.
|
||||
*/
|
||||
export declare const LEVELPLAY_DEMO: {
|
||||
readonly android: {
|
||||
readonly appKey: "25b63cf85";
|
||||
readonly rewarded: "syz3d8ekts22q0or";
|
||||
readonly interstitial: "h3xw38h9214adgxo";
|
||||
};
|
||||
readonly ios: {
|
||||
readonly appKey: "8545d445";
|
||||
readonly rewarded: "qwouvdrkuwivay5q";
|
||||
readonly interstitial: "wmgt0712uuux8ju4";
|
||||
};
|
||||
};
|
||||
19
dist/esm/demo.js
vendored
Normal file
19
dist/esm/demo.js
vendored
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
/**
|
||||
* Public demo app keys and ad unit ids from Unity's official LevelPlay sample apps
|
||||
* (https://github.com/ironsource-mobile/Mediation-Demo-Apps: `Android/Kotlin/.../DemoActivity.kt` and
|
||||
* `iOS/Swift SPM/LevelPlayDemo/DemoViewController.swift`). They serve test ads and are safe for development only.
|
||||
* Replace them with your own ids from the LevelPlay dashboard before release.
|
||||
*/
|
||||
export const LEVELPLAY_DEMO = {
|
||||
android: {
|
||||
appKey: '25b63cf85',
|
||||
rewarded: 'syz3d8ekts22q0or',
|
||||
interstitial: 'h3xw38h9214adgxo',
|
||||
},
|
||||
ios: {
|
||||
appKey: '8545d445',
|
||||
rewarded: 'qwouvdrkuwivay5q',
|
||||
interstitial: 'wmgt0712uuux8ju4',
|
||||
},
|
||||
};
|
||||
//# sourceMappingURL=demo.js.map
|
||||
1
dist/esm/demo.js.map
vendored
Normal file
1
dist/esm/demo.js.map
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"demo.js","sourceRoot":"","sources":["../../src/demo.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,OAAO,EAAE;QACP,MAAM,EAAE,WAAW;QACnB,QAAQ,EAAE,kBAAkB;QAC5B,YAAY,EAAE,kBAAkB;KACjC;IACD,GAAG,EAAE;QACH,MAAM,EAAE,UAAU;QAClB,QAAQ,EAAE,kBAAkB;QAC5B,YAAY,EAAE,kBAAkB;KACjC;CACO,CAAC","sourcesContent":["/**\n * Public demo app keys and ad unit ids from Unity's official LevelPlay sample apps\n * (https://github.com/ironsource-mobile/Mediation-Demo-Apps: `Android/Kotlin/.../DemoActivity.kt` and\n * `iOS/Swift SPM/LevelPlayDemo/DemoViewController.swift`). They serve test ads and are safe for development only.\n * Replace them with your own ids from the LevelPlay dashboard before release.\n */\nexport const LEVELPLAY_DEMO = {\n android: {\n appKey: '25b63cf85',\n rewarded: 'syz3d8ekts22q0or',\n interstitial: 'h3xw38h9214adgxo',\n },\n ios: {\n appKey: '8545d445',\n rewarded: 'qwouvdrkuwivay5q',\n interstitial: 'wmgt0712uuux8ju4',\n },\n} as const;\n"]}
|
||||
5
dist/esm/index.d.ts
vendored
Normal file
5
dist/esm/index.d.ts
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
import type { LevelPlayPlugin } from './definitions';
|
||||
declare const LevelPlay: LevelPlayPlugin;
|
||||
export * from './definitions';
|
||||
export { LEVELPLAY_DEMO } from './demo';
|
||||
export { LevelPlay };
|
||||
8
dist/esm/index.js
vendored
Normal file
8
dist/esm/index.js
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
import { registerPlugin } from '@capacitor/core';
|
||||
const LevelPlay = registerPlugin('LevelPlay', {
|
||||
web: () => import('./web').then((m) => new m.LevelPlayWeb()),
|
||||
});
|
||||
export * from './definitions';
|
||||
export { LEVELPLAY_DEMO } from './demo';
|
||||
export { LevelPlay };
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
dist/esm/index.js.map
vendored
Normal file
1
dist/esm/index.js.map
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,SAAS,GAAG,cAAc,CAAkB,WAAW,EAAE;IAC7D,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,YAAY,EAAE,CAAC;CAC7D,CAAC,CAAC;AAEH,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,CAAC","sourcesContent":["import { registerPlugin } from '@capacitor/core';\n\nimport type { LevelPlayPlugin } from './definitions';\n\nconst LevelPlay = registerPlugin<LevelPlayPlugin>('LevelPlay', {\n web: () => import('./web').then((m) => new m.LevelPlayWeb()),\n});\n\nexport * from './definitions';\nexport { LEVELPLAY_DEMO } from './demo';\nexport { LevelPlay };\n"]}
|
||||
22
dist/esm/web.d.ts
vendored
Normal file
22
dist/esm/web.d.ts
vendored
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
import { WebPlugin } from '@capacitor/core';
|
||||
import type { AdUnitOptions, ConsentOptions, InitOptions, InitResult, IsReadyResult, LevelPlayPlugin, MetaDataOptions, ShowResult, TrackingResult } from './definitions';
|
||||
/**
|
||||
* Web stub. LevelPlay has no web SDK: init rejects with `unimplemented`, ads are never ready and every show resolves
|
||||
* as "not shown" so callers can treat the web like a no-fill platform without special casing.
|
||||
*/
|
||||
export declare class LevelPlayWeb extends WebPlugin implements LevelPlayPlugin {
|
||||
private static readonly NO_FILL;
|
||||
initialize(_options: InitOptions): Promise<InitResult>;
|
||||
getSdkVersion(): Promise<InitResult>;
|
||||
setConsent(_options: ConsentOptions): Promise<void>;
|
||||
setMetaData(_options: MetaDataOptions): Promise<void>;
|
||||
requestTrackingAuthorization(): Promise<TrackingResult>;
|
||||
getTrackingAuthorizationStatus(): Promise<TrackingResult>;
|
||||
loadRewarded(_options: AdUnitOptions): Promise<void>;
|
||||
showRewarded(_options: AdUnitOptions): Promise<ShowResult>;
|
||||
loadInterstitial(_options: AdUnitOptions): Promise<void>;
|
||||
showInterstitial(_options: AdUnitOptions): Promise<ShowResult>;
|
||||
isReady(): Promise<IsReadyResult>;
|
||||
launchTestSuite(): Promise<void>;
|
||||
validateIntegration(): Promise<void>;
|
||||
}
|
||||
52
dist/esm/web.js
vendored
Normal file
52
dist/esm/web.js
vendored
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
import { WebPlugin } from '@capacitor/core';
|
||||
/**
|
||||
* Web stub. LevelPlay has no web SDK: init rejects with `unimplemented`, ads are never ready and every show resolves
|
||||
* as "not shown" so callers can treat the web like a no-fill platform without special casing.
|
||||
*/
|
||||
export class LevelPlayWeb extends WebPlugin {
|
||||
async initialize(_options) {
|
||||
throw this.unimplemented('LevelPlay is not available on the web.');
|
||||
}
|
||||
async getSdkVersion() {
|
||||
return { sdkVersion: 'web' };
|
||||
}
|
||||
async setConsent(_options) {
|
||||
/* nothing to forward */
|
||||
}
|
||||
async setMetaData(_options) {
|
||||
/* nothing to forward */
|
||||
}
|
||||
async requestTrackingAuthorization() {
|
||||
return { status: 'unavailable' };
|
||||
}
|
||||
async getTrackingAuthorizationStatus() {
|
||||
return { status: 'unavailable' };
|
||||
}
|
||||
async loadRewarded(_options) {
|
||||
/* never fills */
|
||||
}
|
||||
async showRewarded(_options) {
|
||||
return Object.assign({}, LevelPlayWeb.NO_FILL);
|
||||
}
|
||||
async loadInterstitial(_options) {
|
||||
/* never fills */
|
||||
}
|
||||
async showInterstitial(_options) {
|
||||
return Object.assign({}, LevelPlayWeb.NO_FILL);
|
||||
}
|
||||
async isReady() {
|
||||
return { ready: false };
|
||||
}
|
||||
async launchTestSuite() {
|
||||
throw this.unimplemented('LevelPlay is not available on the web.');
|
||||
}
|
||||
async validateIntegration() {
|
||||
/* nothing to validate */
|
||||
}
|
||||
}
|
||||
LevelPlayWeb.NO_FILL = {
|
||||
shown: false,
|
||||
rewarded: false,
|
||||
error: { code: -1, message: 'LevelPlay is not available on the web' },
|
||||
};
|
||||
//# sourceMappingURL=web.js.map
|
||||
1
dist/esm/web.js.map
vendored
Normal file
1
dist/esm/web.js.map
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAc5C;;;GAGG;AACH,MAAM,OAAO,YAAa,SAAQ,SAAS;IAOzC,KAAK,CAAC,UAAU,CAAC,QAAqB;QACpC,MAAM,IAAI,CAAC,aAAa,CAAC,wCAAwC,CAAC,CAAC;IACrE,CAAC;IAED,KAAK,CAAC,aAAa;QACjB,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC;IAC/B,CAAC;IAED,KAAK,CAAC,UAAU,CAAC,QAAwB;QACvC,wBAAwB;IAC1B,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,QAAyB;QACzC,wBAAwB;IAC1B,CAAC;IAED,KAAK,CAAC,4BAA4B;QAChC,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,CAAC;IACnC,CAAC;IAED,KAAK,CAAC,8BAA8B;QAClC,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,CAAC;IACnC,CAAC;IAED,KAAK,CAAC,YAAY,CAAC,QAAuB;QACxC,iBAAiB;IACnB,CAAC;IAED,KAAK,CAAC,YAAY,CAAC,QAAuB;QACxC,yBAAY,YAAY,CAAC,OAAO,EAAG;IACrC,CAAC;IAED,KAAK,CAAC,gBAAgB,CAAC,QAAuB;QAC5C,iBAAiB;IACnB,CAAC;IAED,KAAK,CAAC,gBAAgB,CAAC,QAAuB;QAC5C,yBAAY,YAAY,CAAC,OAAO,EAAG;IACrC,CAAC;IAED,KAAK,CAAC,OAAO;QACX,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;IAC1B,CAAC;IAED,KAAK,CAAC,eAAe;QACnB,MAAM,IAAI,CAAC,aAAa,CAAC,wCAAwC,CAAC,CAAC;IACrE,CAAC;IAED,KAAK,CAAC,mBAAmB;QACvB,yBAAyB;IAC3B,CAAC;;AAxDuB,oBAAO,GAAe;IAC5C,KAAK,EAAE,KAAK;IACZ,QAAQ,EAAE,KAAK;IACf,KAAK,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,uCAAuC,EAAE;CACtE,CAAC","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type {\n AdUnitOptions,\n ConsentOptions,\n InitOptions,\n InitResult,\n IsReadyResult,\n LevelPlayPlugin,\n MetaDataOptions,\n ShowResult,\n TrackingResult,\n} from './definitions';\n\n/**\n * Web stub. LevelPlay has no web SDK: init rejects with `unimplemented`, ads are never ready and every show resolves\n * as \"not shown\" so callers can treat the web like a no-fill platform without special casing.\n */\nexport class LevelPlayWeb extends WebPlugin implements LevelPlayPlugin {\n private static readonly NO_FILL: ShowResult = {\n shown: false,\n rewarded: false,\n error: { code: -1, message: 'LevelPlay is not available on the web' },\n };\n\n async initialize(_options: InitOptions): Promise<InitResult> {\n throw this.unimplemented('LevelPlay is not available on the web.');\n }\n\n async getSdkVersion(): Promise<InitResult> {\n return { sdkVersion: 'web' };\n }\n\n async setConsent(_options: ConsentOptions): Promise<void> {\n /* nothing to forward */\n }\n\n async setMetaData(_options: MetaDataOptions): Promise<void> {\n /* nothing to forward */\n }\n\n async requestTrackingAuthorization(): Promise<TrackingResult> {\n return { status: 'unavailable' };\n }\n\n async getTrackingAuthorizationStatus(): Promise<TrackingResult> {\n return { status: 'unavailable' };\n }\n\n async loadRewarded(_options: AdUnitOptions): Promise<void> {\n /* never fills */\n }\n\n async showRewarded(_options: AdUnitOptions): Promise<ShowResult> {\n return { ...LevelPlayWeb.NO_FILL };\n }\n\n async loadInterstitial(_options: AdUnitOptions): Promise<void> {\n /* never fills */\n }\n\n async showInterstitial(_options: AdUnitOptions): Promise<ShowResult> {\n return { ...LevelPlayWeb.NO_FILL };\n }\n\n async isReady(): Promise<IsReadyResult> {\n return { ready: false };\n }\n\n async launchTestSuite(): Promise<void> {\n throw this.unimplemented('LevelPlay is not available on the web.');\n }\n\n async validateIntegration(): Promise<void> {\n /* nothing to validate */\n }\n}\n"]}
|
||||
86
dist/plugin.cjs.js
vendored
Normal file
86
dist/plugin.cjs.js
vendored
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
'use strict';
|
||||
|
||||
var core = require('@capacitor/core');
|
||||
|
||||
/**
|
||||
* Public demo app keys and ad unit ids from Unity's official LevelPlay sample apps
|
||||
* (https://github.com/ironsource-mobile/Mediation-Demo-Apps: `Android/Kotlin/.../DemoActivity.kt` and
|
||||
* `iOS/Swift SPM/LevelPlayDemo/DemoViewController.swift`). They serve test ads and are safe for development only.
|
||||
* Replace them with your own ids from the LevelPlay dashboard before release.
|
||||
*/
|
||||
const LEVELPLAY_DEMO = {
|
||||
android: {
|
||||
appKey: '25b63cf85',
|
||||
rewarded: 'syz3d8ekts22q0or',
|
||||
interstitial: 'h3xw38h9214adgxo',
|
||||
},
|
||||
ios: {
|
||||
appKey: '8545d445',
|
||||
rewarded: 'qwouvdrkuwivay5q',
|
||||
interstitial: 'wmgt0712uuux8ju4',
|
||||
},
|
||||
};
|
||||
|
||||
const LevelPlay = core.registerPlugin('LevelPlay', {
|
||||
web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.LevelPlayWeb()),
|
||||
});
|
||||
|
||||
/**
|
||||
* Web stub. LevelPlay has no web SDK: init rejects with `unimplemented`, ads are never ready and every show resolves
|
||||
* as "not shown" so callers can treat the web like a no-fill platform without special casing.
|
||||
*/
|
||||
class LevelPlayWeb extends core.WebPlugin {
|
||||
async initialize(_options) {
|
||||
throw this.unimplemented('LevelPlay is not available on the web.');
|
||||
}
|
||||
async getSdkVersion() {
|
||||
return { sdkVersion: 'web' };
|
||||
}
|
||||
async setConsent(_options) {
|
||||
/* nothing to forward */
|
||||
}
|
||||
async setMetaData(_options) {
|
||||
/* nothing to forward */
|
||||
}
|
||||
async requestTrackingAuthorization() {
|
||||
return { status: 'unavailable' };
|
||||
}
|
||||
async getTrackingAuthorizationStatus() {
|
||||
return { status: 'unavailable' };
|
||||
}
|
||||
async loadRewarded(_options) {
|
||||
/* never fills */
|
||||
}
|
||||
async showRewarded(_options) {
|
||||
return Object.assign({}, LevelPlayWeb.NO_FILL);
|
||||
}
|
||||
async loadInterstitial(_options) {
|
||||
/* never fills */
|
||||
}
|
||||
async showInterstitial(_options) {
|
||||
return Object.assign({}, LevelPlayWeb.NO_FILL);
|
||||
}
|
||||
async isReady() {
|
||||
return { ready: false };
|
||||
}
|
||||
async launchTestSuite() {
|
||||
throw this.unimplemented('LevelPlay is not available on the web.');
|
||||
}
|
||||
async validateIntegration() {
|
||||
/* nothing to validate */
|
||||
}
|
||||
}
|
||||
LevelPlayWeb.NO_FILL = {
|
||||
shown: false,
|
||||
rewarded: false,
|
||||
error: { code: -1, message: 'LevelPlay is not available on the web' },
|
||||
};
|
||||
|
||||
var web = /*#__PURE__*/Object.freeze({
|
||||
__proto__: null,
|
||||
LevelPlayWeb: LevelPlayWeb
|
||||
});
|
||||
|
||||
exports.LEVELPLAY_DEMO = LEVELPLAY_DEMO;
|
||||
exports.LevelPlay = LevelPlay;
|
||||
//# sourceMappingURL=plugin.cjs.js.map
|
||||
1
dist/plugin.cjs.js.map
vendored
Normal file
1
dist/plugin.cjs.js.map
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"plugin.cjs.js","sources":["esm/demo.js","esm/index.js","esm/web.js"],"sourcesContent":["/**\n * Public demo app keys and ad unit ids from Unity's official LevelPlay sample apps\n * (https://github.com/ironsource-mobile/Mediation-Demo-Apps: `Android/Kotlin/.../DemoActivity.kt` and\n * `iOS/Swift SPM/LevelPlayDemo/DemoViewController.swift`). They serve test ads and are safe for development only.\n * Replace them with your own ids from the LevelPlay dashboard before release.\n */\nexport const LEVELPLAY_DEMO = {\n android: {\n appKey: '25b63cf85',\n rewarded: 'syz3d8ekts22q0or',\n interstitial: 'h3xw38h9214adgxo',\n },\n ios: {\n appKey: '8545d445',\n rewarded: 'qwouvdrkuwivay5q',\n interstitial: 'wmgt0712uuux8ju4',\n },\n};\n//# sourceMappingURL=demo.js.map","import { registerPlugin } from '@capacitor/core';\nconst LevelPlay = registerPlugin('LevelPlay', {\n web: () => import('./web').then((m) => new m.LevelPlayWeb()),\n});\nexport * from './definitions';\nexport { LEVELPLAY_DEMO } from './demo';\nexport { LevelPlay };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\n/**\n * Web stub. LevelPlay has no web SDK: init rejects with `unimplemented`, ads are never ready and every show resolves\n * as \"not shown\" so callers can treat the web like a no-fill platform without special casing.\n */\nexport class LevelPlayWeb extends WebPlugin {\n async initialize(_options) {\n throw this.unimplemented('LevelPlay is not available on the web.');\n }\n async getSdkVersion() {\n return { sdkVersion: 'web' };\n }\n async setConsent(_options) {\n /* nothing to forward */\n }\n async setMetaData(_options) {\n /* nothing to forward */\n }\n async requestTrackingAuthorization() {\n return { status: 'unavailable' };\n }\n async getTrackingAuthorizationStatus() {\n return { status: 'unavailable' };\n }\n async loadRewarded(_options) {\n /* never fills */\n }\n async showRewarded(_options) {\n return Object.assign({}, LevelPlayWeb.NO_FILL);\n }\n async loadInterstitial(_options) {\n /* never fills */\n }\n async showInterstitial(_options) {\n return Object.assign({}, LevelPlayWeb.NO_FILL);\n }\n async isReady() {\n return { ready: false };\n }\n async launchTestSuite() {\n throw this.unimplemented('LevelPlay is not available on the web.');\n }\n async validateIntegration() {\n /* nothing to validate */\n }\n}\nLevelPlayWeb.NO_FILL = {\n shown: false,\n rewarded: false,\n error: { code: -1, message: 'LevelPlay is not available on the web' },\n};\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,cAAc,GAAG;AAC9B,IAAI,OA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,CAAC,QAAQ,EAAE;AACrC;AACA,IAAI;AACJ,IAAI,MAAM,gBAAgB,CAAC,QAAQ,EAAE;AACrC,QAAQ,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,YAAY,CAAC,OAAO,CAAC;AACtD,IAAI;AACJ,IAAI,MAAM,OAAO,GAAG;AACpB,QAAQ,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE;AAC/B,IAAI;AACJ,IAAI,MAAM,eAAe,GAAG;AAC5B,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,wCAAwC,CAAC;AAC1E,IAAI;AACJ,IAAI,MAAM,mBAAmB,GAAG;AAChC;AACA,IAAI;AACJ;AACA,YAAY,CAAC,OAAO,GAAG;AACvB,IAAI,KAAK,EAAE,KAAK;AAChB,IAAI,QAAQ,EAAE,KAAK;AACnB,IAAI,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,OAAO,EAAE,uCAAuC,EAAE;AACzE,CAAC;;;;;;;;"}
|
||||
89
dist/plugin.js
vendored
Normal file
89
dist/plugin.js
vendored
Normal file
|
|
@ -0,0 +1,89 @@
|
|||
var capacitorLevelPlay = (function (exports, core) {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Public demo app keys and ad unit ids from Unity's official LevelPlay sample apps
|
||||
* (https://github.com/ironsource-mobile/Mediation-Demo-Apps: `Android/Kotlin/.../DemoActivity.kt` and
|
||||
* `iOS/Swift SPM/LevelPlayDemo/DemoViewController.swift`). They serve test ads and are safe for development only.
|
||||
* Replace them with your own ids from the LevelPlay dashboard before release.
|
||||
*/
|
||||
const LEVELPLAY_DEMO = {
|
||||
android: {
|
||||
appKey: '25b63cf85',
|
||||
rewarded: 'syz3d8ekts22q0or',
|
||||
interstitial: 'h3xw38h9214adgxo',
|
||||
},
|
||||
ios: {
|
||||
appKey: '8545d445',
|
||||
rewarded: 'qwouvdrkuwivay5q',
|
||||
interstitial: 'wmgt0712uuux8ju4',
|
||||
},
|
||||
};
|
||||
|
||||
const LevelPlay = core.registerPlugin('LevelPlay', {
|
||||
web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.LevelPlayWeb()),
|
||||
});
|
||||
|
||||
/**
|
||||
* Web stub. LevelPlay has no web SDK: init rejects with `unimplemented`, ads are never ready and every show resolves
|
||||
* as "not shown" so callers can treat the web like a no-fill platform without special casing.
|
||||
*/
|
||||
class LevelPlayWeb extends core.WebPlugin {
|
||||
async initialize(_options) {
|
||||
throw this.unimplemented('LevelPlay is not available on the web.');
|
||||
}
|
||||
async getSdkVersion() {
|
||||
return { sdkVersion: 'web' };
|
||||
}
|
||||
async setConsent(_options) {
|
||||
/* nothing to forward */
|
||||
}
|
||||
async setMetaData(_options) {
|
||||
/* nothing to forward */
|
||||
}
|
||||
async requestTrackingAuthorization() {
|
||||
return { status: 'unavailable' };
|
||||
}
|
||||
async getTrackingAuthorizationStatus() {
|
||||
return { status: 'unavailable' };
|
||||
}
|
||||
async loadRewarded(_options) {
|
||||
/* never fills */
|
||||
}
|
||||
async showRewarded(_options) {
|
||||
return Object.assign({}, LevelPlayWeb.NO_FILL);
|
||||
}
|
||||
async loadInterstitial(_options) {
|
||||
/* never fills */
|
||||
}
|
||||
async showInterstitial(_options) {
|
||||
return Object.assign({}, LevelPlayWeb.NO_FILL);
|
||||
}
|
||||
async isReady() {
|
||||
return { ready: false };
|
||||
}
|
||||
async launchTestSuite() {
|
||||
throw this.unimplemented('LevelPlay is not available on the web.');
|
||||
}
|
||||
async validateIntegration() {
|
||||
/* nothing to validate */
|
||||
}
|
||||
}
|
||||
LevelPlayWeb.NO_FILL = {
|
||||
shown: false,
|
||||
rewarded: false,
|
||||
error: { code: -1, message: 'LevelPlay is not available on the web' },
|
||||
};
|
||||
|
||||
var web = /*#__PURE__*/Object.freeze({
|
||||
__proto__: null,
|
||||
LevelPlayWeb: LevelPlayWeb
|
||||
});
|
||||
|
||||
exports.LEVELPLAY_DEMO = LEVELPLAY_DEMO;
|
||||
exports.LevelPlay = LevelPlay;
|
||||
|
||||
return exports;
|
||||
|
||||
})({}, capacitorExports);
|
||||
//# sourceMappingURL=plugin.js.map
|
||||
1
dist/plugin.js.map
vendored
Normal file
1
dist/plugin.js.map
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"plugin.js","sources":["esm/demo.js","esm/index.js","esm/web.js"],"sourcesContent":["/**\n * Public demo app keys and ad unit ids from Unity's official LevelPlay sample apps\n * (https://github.com/ironsource-mobile/Mediation-Demo-Apps: `Android/Kotlin/.../DemoActivity.kt` and\n * `iOS/Swift SPM/LevelPlayDemo/DemoViewController.swift`). They serve test ads and are safe for development only.\n * Replace them with your own ids from the LevelPlay dashboard before release.\n */\nexport const LEVELPLAY_DEMO = {\n android: {\n appKey: '25b63cf85',\n rewarded: 'syz3d8ekts22q0or',\n interstitial: 'h3xw38h9214adgxo',\n },\n ios: {\n appKey: '8545d445',\n rewarded: 'qwouvdrkuwivay5q',\n interstitial: 'wmgt0712uuux8ju4',\n },\n};\n//# sourceMappingURL=demo.js.map","import { registerPlugin } from '@capacitor/core';\nconst LevelPlay = registerPlugin('LevelPlay', {\n web: () => import('./web').then((m) => new m.LevelPlayWeb()),\n});\nexport * from './definitions';\nexport { LEVELPLAY_DEMO } from './demo';\nexport { LevelPlay };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\n/**\n * Web stub. LevelPlay has no web SDK: init rejects with `unimplemented`, ads are never ready and every show resolves\n * as \"not shown\" so callers can treat the web like a no-fill platform without special casing.\n */\nexport class LevelPlayWeb extends WebPlugin {\n async initialize(_options) {\n throw this.unimplemented('LevelPlay is not available on the web.');\n }\n async getSdkVersion() {\n return { sdkVersion: 'web' };\n }\n async setConsent(_options) {\n /* nothing to forward */\n }\n async setMetaData(_options) {\n /* nothing to forward */\n }\n async requestTrackingAuthorization() {\n return { status: 'unavailable' };\n }\n async getTrackingAuthorizationStatus() {\n return { status: 'unavailable' };\n }\n async loadRewarded(_options) {\n /* never fills */\n }\n async showRewarded(_options) {\n return Object.assign({}, LevelPlayWeb.NO_FILL);\n }\n async loadInterstitial(_options) {\n /* never fills */\n }\n async showInterstitial(_options) {\n return Object.assign({}, LevelPlayWeb.NO_FILL);\n }\n async isReady() {\n return { ready: false };\n }\n async launchTestSuite() {\n throw this.unimplemented('LevelPlay is not available on the web.');\n }\n async validateIntegration() {\n /* nothing to validate */\n }\n}\nLevelPlayWeb.NO_FILL = {\n shown: false,\n rewarded: false,\n error: { code: -1, message: 'LevelPlay is not available on the web' },\n};\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;IAAA;IACA;IACA;IACA;IACA;IACA;AACY,UAAC,cAAc,GAAG;IAC9B,IAAI,OAAO,EAAE;IACb,QAAQ,MAAM,EAAE,WAAW;IAC3B,QAAQ,QAAQ,EAAE,kBAAkB;IACpC,QAAQ,YAAY,EAAE,kBAAkB;IACxC,KAAK;IACL,IAAI,GAAG,EAAE;IACT,QAAQ,MAAM,EAAE,UAAU;IAC1B,QAAQ,QAAQ,EAAE,kBAAkB;IACpC,QAAQ,YAAY,EAAE,kBAAkB;IACxC,KAAK;IACL;;AChBK,UAAC,SAAS,GAAGA,mBAAc,CAAC,WAAW,EAAE;IAC9C,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,YAAY,EAAE,CAAC;IAChE,CAAC;;ICFD;IACA;IACA;IACA;IACO,MAAM,YAAY,SAASC,cAAS,CAAC;IAC5C,IAAI,MAAM,UAAU,CAAC,QAAQ,EAAE;IAC/B,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,wCAAwC,CAAC;IAC1E,IAAI;IACJ,IAAI,MAAM,aAAa,GAAG;IAC1B,QAAQ,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE;IACpC,IAAI;IACJ,IAAI,MAAM,UAAU,CAAC,QAAQ,EAAE;IAC/B;IACA,IAAI;IACJ,IAAI,MAAM,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