@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/README.md +32 -0
- package/dist/browser/client-devtool.js +1 -1
- package/dist/browser/client-devtool.js.map +1 -1
- package/dist/browser/client-hydratable.js +1 -1
- package/dist/browser/client-hydratable.js.map +1 -1
- package/dist/browser/client.js +1 -1
- package/dist/browser/client.js.map +1 -1
- package/dist/client-devtool.js +1 -1
- package/dist/client-devtool.js.map +1 -1
- package/dist/client-hydratable.js +1 -1
- package/dist/client-hydratable.js.map +1 -1
- package/dist/client.css +1 -1
- package/dist/client.css.map +1 -1
- package/dist/client.js +1 -1
- package/dist/client.js.map +1 -1
- package/dist/esm/client-devtool.mjs +1 -1
- package/dist/esm/client-devtool.mjs.map +1 -1
- package/dist/esm/client-hydratable.mjs +1 -1
- package/dist/esm/client-hydratable.mjs.map +1 -1
- package/dist/esm/client.mjs +1 -1
- package/dist/esm/client.mjs.map +1 -1
- package/dist/esm/server.mjs +1 -1
- package/dist/esm/server.mjs.map +1 -1
- package/dist/server.js +1 -1
- package/dist/server.js.map +1 -1
- package/package.json +1 -1
- package/typings/client-devtool.d.ts +4 -1
- package/typings/client-hydratable.d.ts +4 -1
- package/typings/client.d.ts +4 -1
- package/typings/common.d.ts +13 -4
package/package.json
CHANGED
|
@@ -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';
|
package/typings/client.d.ts
CHANGED
|
@@ -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';
|
package/typings/common.d.ts
CHANGED
|
@@ -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;
|