@divkitframework/divkit 27.0.0 → 27.2.0-canary-b6797445acdd32f7f9aa112e851d6aedca404a6f

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@divkitframework/divkit",
3
- "version": "27.0.0",
3
+ "version": "27.2.0-canary-b6797445acdd32f7f9aa112e851d6aedca404a6f",
4
4
  "description": "DivKit for the web",
5
5
  "keywords": [
6
6
  "server-driven-ui",
@@ -9,7 +9,8 @@ import type {
9
9
  Theme,
10
10
  Customization,
11
11
  DivExtensionClass,
12
- TypefaceProvider
12
+ TypefaceProvider,
13
+ FetchInit
13
14
  } from './common';
14
15
  import type { GlobalVariablesController, Variable } from './variables';
15
16
  import type { WrappedError } from './common';
@@ -36,6 +37,8 @@ export function render(opts: {
36
37
  extensions?: Map<string, DivExtensionClass>;
37
38
  /** EXPERIMENTAL SUPPORT */
38
39
  theme?: Theme;
40
+ fetchInit?: FetchInit;
41
+ tooltipRoot?: HTMLElement;
39
42
  }): DivkitDebugInstance;
40
43
 
41
44
  export { createVariable, createGlobalVariablesController } from './variables';
@@ -8,7 +8,8 @@ import type {
8
8
  Theme,
9
9
  Customization,
10
10
  DivExtensionClass,
11
- TypefaceProvider
11
+ TypefaceProvider,
12
+ FetchInit
12
13
  } from './common';
13
14
  import type { GlobalVariablesController } from './variables';
14
15
 
@@ -29,6 +30,8 @@ export function render(opts: {
29
30
  extensions?: Map<string, DivExtensionClass>;
30
31
  /** EXPERIMENTAL SUPPORT */
31
32
  theme?: Theme;
33
+ fetchInit?: FetchInit;
34
+ tooltipRoot?: HTMLElement;
32
35
  }): DivkitInstance;
33
36
 
34
37
  export { createVariable, createGlobalVariablesController } from './variables';
@@ -8,7 +8,8 @@ import type {
8
8
  Theme,
9
9
  Customization,
10
10
  DivExtensionClass,
11
- TypefaceProvider
11
+ TypefaceProvider,
12
+ FetchInit
12
13
  } from './common';
13
14
  import type { GlobalVariablesController } from './variables';
14
15
 
@@ -28,6 +29,8 @@ export function render(opts: {
28
29
  extensions?: Map<string, DivExtensionClass>;
29
30
  /** EXPERIMENTAL SUPPORT */
30
31
  theme?: Theme;
32
+ fetchInit?: FetchInit;
33
+ tooltipRoot?: HTMLElement;
31
34
  }): DivkitInstance;
32
35
 
33
36
  export { createVariable, createGlobalVariablesController } from './variables';
@@ -93,10 +93,17 @@ export interface DivJson {
93
93
  palette?: Palette;
94
94
  }
95
95
 
96
+ export interface DownloadCallbacks {
97
+ on_fail_actions?: Action[];
98
+ on_success_actions?: Action[];
99
+ }
100
+
96
101
  export interface Action {
97
102
  log_id: string;
98
103
  url?: string;
104
+ // referer
99
105
  payload?: Record<string, unknown>;
106
+ download_callbacks?: DownloadCallbacks;
100
107
  log_url?: string;
101
108
  target?: string;
102
109
  }
@@ -104,22 +111,22 @@ export interface Action {
104
111
  export interface VisibilityAction {
105
112
  log_id: string;
106
113
  url?: string;
107
- referer?: string;
114
+ // referer?: string;
108
115
  payload?: Record<string, string>;
116
+ download_callbacks?: DownloadCallbacks;
109
117
  visibility_percentage?: number;
110
118
  visibility_duration?: number;
111
- // download_callbacks
112
119
  log_limit?: number;
113
120
  }
114
121
 
115
122
  export interface DisappearAction {
116
123
  log_id: string;
117
124
  url?: string;
118
- referer?: string;
125
+ // referer?: string;
119
126
  payload?: Record<string, string>;
127
+ download_callbacks?: DownloadCallbacks;
120
128
  visibility_percentage?: number;
121
129
  disappear_duration?: number;
122
- // download_callbacks
123
130
  log_limit?: number;
124
131
  }
125
132
 
@@ -154,6 +161,8 @@ export type TypefaceProvider = (fontFamily: string, opts?: {
154
161
  fontWeight?: number;
155
162
  }) => string;
156
163
 
164
+ export type FetchInit = RequestInit | ((url: string) => RequestInit);
165
+
157
166
  export interface DivkitInstance {
158
167
  $destroy(): void;
159
168
  execAction(action: Action | VisibilityAction): void;