@inappstory/js-sdk 3.6.2 → 3.7.0-rc.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 (30) hide show
  1. package/dist/index.esm.mjs +1 -1
  2. package/dist/index.umd.js +1 -1
  3. package/dist/types/appearance-manager/appearanceCommon.d.ts +69 -3
  4. package/dist/types/appearance-manager/appearanceManager.d.ts +69 -1
  5. package/dist/types/appearance-manager/gameReader.d.ts +91 -15
  6. package/dist/types/appearance-manager/goodsWidget.d.ts +98 -17
  7. package/dist/types/appearance-manager/sharePanel.d.ts +129 -2
  8. package/dist/types/appearance-manager/storiesList.d.ts +303 -5
  9. package/dist/types/appearance-manager/storyFavoriteReader.d.ts +34 -0
  10. package/dist/types/appearance-manager/storyReader.d.ts +260 -0
  11. package/dist/types/in-app-messaging/iamErrors.d.ts +49 -45
  12. package/dist/types/in-app-messaging/inAppMessaging.d.ts +166 -0
  13. package/dist/types/inAppStoryManager.d.ts +187 -3
  14. package/dist/types/share-page/sharePage.d.ts +4 -0
  15. package/dist/types/story-list/StoryList.d.ts +30 -0
  16. package/dist/types/story-list/UGCStoryList.d.ts +30 -0
  17. package/dist/types/story-list/storyListLoadStatus.ts +46 -9
  18. package/package.json +6 -2
  19. package/plugins/banners/index.esm.mjs +1 -0
  20. package/plugins/banners/package.json +24 -0
  21. package/plugins/banners/types/banner.d.ts +197 -0
  22. package/plugins/banners/types/bannerPlace.d.ts +186 -0
  23. package/plugins/banners/types/bannerPlaceAppearance.d.ts +32 -0
  24. package/plugins/banners/types/iasBannerPlace.d.ts +77 -0
  25. package/plugins/banners/types/iasBannerPreview.d.ts +58 -0
  26. package/plugins/banners/types/iasBannersProvider.d.ts +52 -0
  27. package/plugins/banners/types/index.d.ts +29 -0
  28. package/plugins/dotLottie/iasDotLottiePlugin.umd.js +1 -1
  29. package/plugins/videoOnDemand/iasVideoOnDemandPlugin.umd.js +1 -1
  30. package/dist/types/appearance-manager/storyReader.ts +0 -73
@@ -1,103 +1,330 @@
1
1
  import { Option, RecursivePartial } from "../global";
2
2
 
3
+ /**
4
+ * Slider alignment in the stories list.
5
+ */
3
6
  export declare enum StoriesListSliderAlign {
4
7
  CENTER = "center",
5
- /** @deprecated */
8
+ /** @deprecated Use START or END instead */
6
9
  LEFT = "left",
7
- /** @deprecated */
10
+ /** @deprecated Use START or END instead */
8
11
  RIGHT = "right",
9
12
  START = "start",
10
13
  END = "end"
11
14
  }
12
15
 
16
+ /**
17
+ * Card view variants for the stories list.
18
+ */
13
19
  export declare enum StoriesListCardViewVariant {
14
20
  CIRCLE = "circle",
15
21
  QUAD = "quad",
16
22
  RECTANGLE = "rectangle"
17
23
  }
18
24
 
25
+ /**
26
+ * Text alignment options for the card title.
27
+ */
19
28
  export declare enum StoriesListCardTitleTextAlign {
20
- /** @deprecated */
29
+ /** @deprecated Use START, END, or CENTER instead */
21
30
  LEFT = "left",
22
- /** @deprecated */
31
+ /** @deprecated Use START, END, or CENTER instead */
23
32
  RIGHT = "right",
24
33
  CENTER = "center",
25
34
  START = "start",
26
35
  END = "end"
27
36
  }
28
37
 
38
+ /**
39
+ * Position options for the card title.
40
+ */
29
41
  export declare enum StoriesListCardTitlePosition {
30
42
  CARD_INSIDE_BOTTOM = "cardInsideBottom",
31
43
  CARD_OUTSIDE_TOP = "cardOutsideTop",
32
44
  CARD_OUTSIDE_BOTTOM = "cardOutsideBottom"
33
45
  }
34
46
 
47
+ /**
48
+ * Cover quality options for the card.
49
+ */
35
50
  export declare enum StoriesListCardCoverQuality {
36
51
  Medium = "medium",
37
52
  High = "high"
38
53
  }
39
54
 
55
+ /**
56
+ * Stories list scrolling direction.
57
+ */
40
58
  export declare enum StoriesListDirection {
59
+ /** Vertical layout */
41
60
  COLUMN = "vertical",
61
+ /** Horizontal layout */
42
62
  ROW = "horizontal"
43
63
  }
44
64
 
65
+ /**
66
+ * Configuration options for the stories list.
67
+ */
45
68
  export type StoriesListOptions = RecursivePartial<{
69
+ /**
70
+ * Direction of the stories list.
71
+ * @default StoriesListDirection.ROW
72
+ */
46
73
  direction: StoriesListDirection | "vertical" | "horizontal";
74
+
75
+ /**
76
+ * Card options.
77
+ */
47
78
  card: StoriesListCardOptions;
79
+
80
+ /**
81
+ * Favorite card options.
82
+ */
48
83
  favoriteCard: StoriesListFavoriteCardOptions;
84
+
85
+ /**
86
+ * Layout options for the list.
87
+ */
49
88
  layout: {
89
+ /**
90
+ * Height of the list (number or string, e.g., "auto").
91
+ * @default "auto"
92
+ */
50
93
  height: number | string;
94
+
95
+ /**
96
+ * Background color of the list.
97
+ * @default "transparent"
98
+ */
51
99
  backgroundColor: string;
100
+
101
+ /**
102
+ * Slider alignment.
103
+ * @default StoriesListSliderAlign.START
104
+ */
52
105
  sliderAlign: StoriesListSliderAlign | "left" | "center" | "right" | "start" | "end";
53
106
  };
107
+
108
+ /**
109
+ * Horizontal padding (left and right).
110
+ * @default 20
111
+ */
54
112
  sidePadding: number;
113
+
114
+ /**
115
+ * Top padding.
116
+ * @default 20
117
+ */
55
118
  topPadding: number;
119
+
120
+ /**
121
+ * Bottom padding.
122
+ * @default 20
123
+ */
56
124
  bottomPadding: number;
125
+
126
+ /**
127
+ * Bottom margin of the entire list container.
128
+ * @default 17
129
+ */
57
130
  bottomMargin: number;
131
+
132
+ /**
133
+ * Navigation settings.
134
+ */
58
135
  navigation: {
59
- speed: number;
136
+ /**
137
+ * Show navigation controls (arrows).
138
+ * @default false
139
+ */
60
140
  showControls: boolean;
141
+
142
+ /**
143
+ * Size of navigation controls.
144
+ * @default 48
145
+ */
61
146
  controlsSize: number;
147
+
148
+ /**
149
+ * Background color of navigation controls.
150
+ * @default "white"
151
+ */
62
152
  controlsBackgroundColor: string;
153
+
154
+ /**
155
+ * Color of navigation controls icons.
156
+ * @default "black"
157
+ */
63
158
  controlsColor: string;
64
159
  };
160
+
161
+ /**
162
+ * User-generated content card options.
163
+ */
65
164
  ugcCard: StoriesListUgcCardOptions;
165
+
166
+ /**
167
+ * Automatically scroll the list when a story is closed.
168
+ * @default true
169
+ */
66
170
  autoScrollOnStoryClose: boolean;
67
171
  }>;
68
172
 
173
+ /**
174
+ * Options for individual story cards.
175
+ */
69
176
  export type StoriesListCardOptions = RecursivePartial<{
70
177
  title: {
178
+ /**
179
+ * Padding around the title.
180
+ * @default 10.6
181
+ */
71
182
  padding: string | number;
183
+
184
+ /**
185
+ * CSS font property for the title.
186
+ * @default '16px system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"'
187
+ */
72
188
  font: string;
189
+
190
+ /**
191
+ * Whether to display the title.
192
+ * @default true
193
+ */
73
194
  display: boolean;
195
+
196
+ /**
197
+ * Text alignment for the title.
198
+ * @default StoriesListCardTitleTextAlign.START
199
+ */
74
200
  textAlign: StoriesListCardTitleTextAlign | "left" | "center" | "right" | "start" | "end";
201
+
202
+ /**
203
+ * Position of the title relative to the card.
204
+ * @default StoriesListCardTitlePosition.CARD_INSIDE_BOTTOM
205
+ */
75
206
  position: StoriesListCardTitlePosition | "cardInsideBottom" | "cardOutsideTop" | "cardOutsideBottom";
207
+
208
+ /**
209
+ * Maximum number of lines shown in the title.
210
+ * @default 4
211
+ */
76
212
  lineClamp: number;
77
213
  };
214
+
215
+ /**
216
+ * Gap between cards.
217
+ * @default 10
218
+ */
78
219
  gap: number;
220
+
221
+ /**
222
+ * Card height in pixels.
223
+ * @default 178
224
+ */
79
225
  height: number;
226
+
227
+ /**
228
+ * Aspect ratio of the card (width / height).
229
+ * @default null
230
+ */
80
231
  aspectRatio: number;
232
+
233
+ /**
234
+ * Quality of the card cover image.
235
+ * @default StoriesListCardCoverQuality.High
236
+ */
81
237
  coverQuality: StoriesListCardCoverQuality | "medium" | "high";
238
+
239
+ /**
240
+ * Enables lazy loading for the card cover image.
241
+ * @default false
242
+ */
82
243
  coverLazyLoading: boolean;
244
+
245
+ /**
246
+ * Visual variant of the card.
247
+ * @default StoriesListCardViewVariant.RECTANGLE
248
+ */
83
249
  variant: StoriesListCardViewVariant | "circle" | "quad" | "rectangle";
250
+
251
+ /**
252
+ * Card border settings.
253
+ */
84
254
  border: {
255
+ /**
256
+ * Border radius in pixels.
257
+ * @default 21
258
+ */
85
259
  radius: number;
260
+
261
+ /**
262
+ * Border color.
263
+ * @default "black"
264
+ */
86
265
  color: string;
266
+
267
+ /**
268
+ * Border width in pixels.
269
+ * @default 2
270
+ */
87
271
  width: number;
272
+
273
+ /**
274
+ * Gap between border and card content in pixels.
275
+ * @default 5
276
+ */
88
277
  gap: number;
278
+
279
+ /**
280
+ * Border gradient, if applicable.
281
+ * @default null
282
+ */
89
283
  gradient: string;
90
284
  };
285
+
286
+ /**
287
+ * CSS box-shadow property for the card.
288
+ * @default null
289
+ */
91
290
  boxShadow: string;
291
+
292
+ /**
293
+ * CSS drop-shadow property for the card.
294
+ * @default null
295
+ */
92
296
  dropShadow: string;
297
+
298
+ /**
299
+ * Opacity of the card (0 to 1).
300
+ * @default null
301
+ */
93
302
  opacity: number;
303
+
304
+ /**
305
+ * Mask settings for the card.
306
+ */
94
307
  mask: {
308
+ /**
309
+ * Mask color.
310
+ * @default null
311
+ */
95
312
  color: string;
313
+
314
+ /**
315
+ * Linear gradient for the mask.
316
+ * @default null
317
+ */
96
318
  linearGradient: {
97
319
  direction: string;
98
320
  points: Array<string>;
99
321
  };
100
322
  };
323
+
324
+ /**
325
+ * SVG masks for the card.
326
+ * @default null
327
+ */
101
328
  svgMask: {
102
329
  cardMask: string;
103
330
  overlayMask: Array<{
@@ -105,24 +332,95 @@ export type StoriesListCardOptions = RecursivePartial<{
105
332
  background: string;
106
333
  }>;
107
334
  };
335
+
336
+ /**
337
+ * Styles applied to the card when it is in the "opened" state.
338
+ */
108
339
  opened: {
340
+ /**
341
+ * Border settings for the opened card.
342
+ * These override the default border settings when the card is opened.
343
+ * All properties are optional and if null, the default card border settings are used.
344
+ */
109
345
  border: {
346
+ /**
347
+ * Border radius for the opened card.
348
+ * @default null (inherits from default card border radius)
349
+ */
110
350
  radius: number;
351
+
352
+ /**
353
+ * Border color for the opened card.
354
+ * @default null (inherits from default card border color)
355
+ */
111
356
  color: string;
357
+
358
+ /**
359
+ * Border width for the opened card.
360
+ * @default null (inherits from default card border width)
361
+ */
112
362
  width: number;
363
+
364
+ /**
365
+ * Gap between border and content for the opened card.
366
+ * @default null (inherits from default card border gap)
367
+ */
113
368
  gap: number;
369
+
370
+ /**
371
+ * Border gradient for the opened card.
372
+ * @default null (inherits from default card border gradient)
373
+ */
114
374
  gradient: string;
115
375
  };
376
+
377
+ /**
378
+ * CSS box-shadow property for the opened card.
379
+ * This shadow is applied instead of the default boxShadow when the card is opened.
380
+ * @default null (inherits from default card boxShadow)
381
+ */
116
382
  boxShadow: string;
383
+
384
+ /**
385
+ * CSS drop-shadow property for the opened card.
386
+ * Overrides default dropShadow when opened.
387
+ * @default null (inherits from default card dropShadow)
388
+ */
117
389
  dropShadow: string;
390
+
391
+ /**
392
+ * Opacity of the opened card (0 to 1).
393
+ * Overrides default opacity when opened.
394
+ * @default null (inherits from default card opacity)
395
+ */
118
396
  opacity: number;
397
+
398
+ /**
399
+ * Mask settings for the opened card.
400
+ * Overrides default mask when opened.
401
+ */
119
402
  mask: {
403
+ /**
404
+ * Mask color for the opened card.
405
+ * @default null (inherits from default mask color)
406
+ */
120
407
  color: string;
408
+
409
+ /**
410
+ * Linear gradient mask for the opened card.
411
+ * @default null (inherits from default mask linear gradient)
412
+ */
121
413
  linearGradient: {
122
414
  direction: string;
123
415
  points: Array<string>;
124
416
  };
125
417
  };
418
+
419
+ /**
420
+ * SVG masks for the opened card.
421
+ * Overrides default svgMask when opened.
422
+ * @default null (inherits from default svgMask)
423
+ */
126
424
  svgMask: {
127
425
  cardMask: string;
128
426
  overlayMask: Array<{
@@ -1,20 +1,54 @@
1
1
  import { RecursivePartial } from "../global";
2
2
  import { CloseButtonPosition } from "./appearanceCommon";
3
3
 
4
+ /**
5
+ * Configuration options for customizing the appearance of the favorite story reader component.
6
+ */
4
7
  export type StoryFavoriteReaderOptions = RecursivePartial<{
8
+ /**
9
+ * Title block styling.
10
+ */
5
11
  title: {
12
+ /** Text content of the title. */
6
13
  content: string;
14
+
15
+ /** Font used for the title. */
7
16
  font: string;
17
+
18
+ /** Text color of the title. */
8
19
  color: string;
20
+
21
+ /** Background color behind the title. */
9
22
  backgroundColor: string;
10
23
  };
24
+
25
+ /**
26
+ * Position of the close button (e.g., top-left, top-right).
27
+ */
11
28
  closeButtonPosition: CloseButtonPosition;
29
+
30
+ /**
31
+ * Styling for the close button.
32
+ */
12
33
  closeButton: {
13
34
  svgSrc: {
35
+ /** Source URL or inline SVG for the button's default (base) state. */
14
36
  baseState: string;
15
37
  };
16
38
  };
39
+
40
+ /**
41
+ * Offset from the top of the header (in pixels).
42
+ */
17
43
  headerTopOffset: number;
44
+
45
+ /**
46
+ * Offset from the bottom of the screen/component (in pixels).
47
+ */
18
48
  bottomOffset: number;
49
+
50
+ /**
51
+ * Background color of the favorite story reader.
52
+ */
19
53
  backgroundColor: string;
20
54
  }>;