@adhese/sdk-devtools 0.5.2 → 0.6.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.
Files changed (2) hide show
  1. package/dist/index.d.ts +81 -10
  2. package/package.json +3 -3
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import * as react from 'react';
2
2
  import { ReactElement } from 'react';
3
- import { ComputedRef, Ref, MaybeRef } from '@vue/runtime-core';
4
3
  import * as zod from 'zod';
5
4
  import { TypeOf, ZodType } from 'zod';
5
+ import { ComputedRef, Ref, MaybeRef } from '@vue/runtime-core';
6
6
 
7
7
  /**
8
8
  * Merge two types together. The resulting type will have all properties of both types, but if a property is present in
@@ -57,6 +57,72 @@ type EventManager<Events extends Record<string, unknown>> = {
57
57
  */
58
58
  declare function createEventManager<Events extends Record<Name, unknown>, Name extends Readonly<string | number | symbol> = keyof Events>(): EventManager<Events>;
59
59
 
60
+ declare class Config {
61
+ auto?: boolean;
62
+ debug?: boolean;
63
+ renderFile?: string;
64
+ cdn?: string;
65
+ msgFile?: string;
66
+ root?: string;
67
+ to?: number;
68
+ constructor(options?: {
69
+ auto?: boolean;
70
+ debug?: boolean;
71
+ renderFile?: string;
72
+ cdn?: string;
73
+ msgFile?: string;
74
+ root?: string;
75
+ to?: number;
76
+ });
77
+ }
78
+ declare class Position {
79
+ html: string;
80
+ id: string;
81
+ src: string;
82
+ meta?: Record<string, unknown>;
83
+ config?: Record<string, unknown>;
84
+ constructor(config: {
85
+ id: string;
86
+ src?: string;
87
+ html: string;
88
+ config?: PosConfig;
89
+ });
90
+ }
91
+ declare class PosConfig {
92
+ id: string;
93
+ dest: string;
94
+ constructor(posIDorObj: string | {
95
+ bg?: string;
96
+ css?: string;
97
+ dest?: string;
98
+ h?: number;
99
+ id?: string;
100
+ size?: string;
101
+ tgt?: string;
102
+ w?: number;
103
+ z?: number;
104
+ supports?: Record<string, unknown>;
105
+ }, destID?: string, baseConf?: {
106
+ bg?: string;
107
+ css?: string;
108
+ dest?: string;
109
+ h?: number;
110
+ id?: string;
111
+ size?: string;
112
+ tgt?: string;
113
+ w?: number;
114
+ z?: number;
115
+ supports?: Record<string, unknown>;
116
+ });
117
+ }
118
+
119
+ type SafeFrame = {
120
+ config: Config;
121
+ addPosition(positions: Ad, element: HTMLElement): Position;
122
+ render(position: Position): Promise<void>;
123
+ dispose(): void;
124
+ };
125
+
60
126
  type SlotManager = {
61
127
  /**
62
128
  * Returns all slots that are currently registered and rendered.
@@ -119,8 +185,8 @@ declare const baseSchema: zod.ZodObject<{
119
185
  mediaType: string;
120
186
  prebid?: unknown;
121
187
  }>>;
122
- height: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodLiteral<"">, zod.ZodNumber]>, string | undefined, string | number>>;
123
- id: zod.ZodOptional<zod.ZodString>;
188
+ height: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodLiteral<"">]>, number | undefined, string>>;
189
+ id: zod.ZodString;
124
190
  impressionCounter: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodLiteral<"">]>, URL | undefined, string>>;
125
191
  libId: zod.ZodOptional<zod.ZodString>;
126
192
  orderId: zod.ZodOptional<zod.ZodString>;
@@ -132,6 +198,7 @@ declare const baseSchema: zod.ZodObject<{
132
198
  poolPath: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodLiteral<"">]>, URL | undefined, string>>;
133
199
  preview: zod.ZodOptional<zod.ZodUnion<[zod.ZodBoolean, zod.ZodLiteral<"">]>>;
134
200
  priority: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodLiteral<"">]>, number | undefined, string>>;
201
+ sfSrc: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodLiteral<"">]>, URL | undefined, string>>;
135
202
  share: zod.ZodOptional<zod.ZodString>;
136
203
  slotID: zod.ZodString;
137
204
  slotName: zod.ZodString;
@@ -144,10 +211,11 @@ declare const baseSchema: zod.ZodObject<{
144
211
  trackingUrl: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodLiteral<"">]>, URL | undefined, string>>;
145
212
  url: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodLiteral<"">]>, URL | undefined, string>>;
146
213
  viewableImpressionCounter: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodLiteral<"">]>, URL | undefined, string>>;
147
- width: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodLiteral<"">, zod.ZodNumber]>, string | undefined, string | number>>;
214
+ width: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodLiteral<"">]>, number | undefined, string>>;
148
215
  widthLarge: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodLiteral<"">, zod.ZodNumber]>, string | undefined, string | number>>;
149
216
  }, "strip", zod.ZodTypeAny, {
150
217
  adType: string;
218
+ id: string;
151
219
  origin: "JERLICIA" | "DALE";
152
220
  slotID: string;
153
221
  slotName: string;
@@ -173,8 +241,7 @@ declare const baseSchema: zod.ZodObject<{
173
241
  mediaType: string;
174
242
  prebid?: unknown;
175
243
  } | undefined;
176
- height?: string | undefined;
177
- id?: string | undefined;
244
+ height?: number | undefined;
178
245
  impressionCounter?: URL | undefined;
179
246
  libId?: string | undefined;
180
247
  orderId?: string | undefined;
@@ -185,6 +252,7 @@ declare const baseSchema: zod.ZodObject<{
185
252
  poolPath?: URL | undefined;
186
253
  preview?: boolean | "" | undefined;
187
254
  priority?: number | undefined;
255
+ sfSrc?: URL | undefined;
188
256
  share?: string | undefined;
189
257
  swfSrc?: URL | undefined;
190
258
  tag?: string | Record<string, unknown> | readonly unknown[] | undefined;
@@ -195,10 +263,11 @@ declare const baseSchema: zod.ZodObject<{
195
263
  trackingUrl?: URL | undefined;
196
264
  url?: URL | undefined;
197
265
  viewableImpressionCounter?: URL | undefined;
198
- width?: string | undefined;
266
+ width?: number | undefined;
199
267
  widthLarge?: string | undefined;
200
268
  }, {
201
269
  adType: string;
270
+ id: string;
202
271
  origin: "JERLICIA" | "DALE";
203
272
  slotID: string;
204
273
  slotName: string;
@@ -224,8 +293,7 @@ declare const baseSchema: zod.ZodObject<{
224
293
  mediaType: string;
225
294
  prebid?: unknown;
226
295
  } | undefined;
227
- height?: string | number | undefined;
228
- id?: string | undefined;
296
+ height?: string | undefined;
229
297
  impressionCounter?: string | undefined;
230
298
  libId?: string | undefined;
231
299
  orderId?: string | undefined;
@@ -236,6 +304,7 @@ declare const baseSchema: zod.ZodObject<{
236
304
  poolPath?: string | undefined;
237
305
  preview?: boolean | "" | undefined;
238
306
  priority?: string | undefined;
307
+ sfSrc?: string | undefined;
239
308
  share?: string | undefined;
240
309
  swfSrc?: string | undefined;
241
310
  tag?: string | undefined;
@@ -246,7 +315,7 @@ declare const baseSchema: zod.ZodObject<{
246
315
  trackingUrl?: string | undefined;
247
316
  url?: string | undefined;
248
317
  viewableImpressionCounter?: string | undefined;
249
- width?: string | number | undefined;
318
+ width?: string | undefined;
250
319
  widthLarge?: string | number | undefined;
251
320
  }>;
252
321
  type AdResponse = (TypeOf<typeof baseSchema> & {
@@ -534,6 +603,7 @@ type AdheseOptions = {
534
603
  * The query detector options for the Adhese instance.
535
604
  */
536
605
  queries?: Record<string, string>;
606
+ safeFrame?: boolean;
537
607
  } & ({
538
608
  viewabilityTracking?: true;
539
609
  /**
@@ -630,6 +700,7 @@ type AdheseContext = Partial<Pick<Adhese, 'events' | 'getAll' | 'get' | 'paramet
630
700
  options: Readonly<MergedOptions>;
631
701
  logger: typeof logger;
632
702
  debug: boolean;
703
+ safeFrame?: SafeFrame;
633
704
  };
634
705
 
635
706
  declare function Devtools$1({ adheseContext }: {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@adhese/sdk-devtools",
3
3
  "type": "module",
4
- "version": "0.5.2",
4
+ "version": "0.6.0",
5
5
  "description": "Adhese SDK Devtools",
6
6
  "license": "GPL-3.0",
7
7
  "repository": {
@@ -40,7 +40,7 @@
40
40
  "tailwindcss-animate": "^1.0.7"
41
41
  },
42
42
  "devDependencies": {
43
- "@types/react": "^18.2.74",
44
- "@types/react-dom": "^18.2.23"
43
+ "@types/react": "^18.2.75",
44
+ "@types/react-dom": "^18.2.24"
45
45
  }
46
46
  }