@divkitframework/divkit 25.1.0 → 25.3.0-canary-bcb1e5fa0a461f4cf07af0ade41950d30e4fac93
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 +17 -4
- 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 +3 -1
- package/typings/client-hydratable.d.ts +3 -1
- package/typings/client.d.ts +3 -1
- package/typings/common.d.ts +16 -1
- package/typings/server.d.ts +3 -1
package/package.json
CHANGED
|
@@ -8,7 +8,8 @@ import type {
|
|
|
8
8
|
CustomActionCallback,
|
|
9
9
|
Theme,
|
|
10
10
|
Customization,
|
|
11
|
-
DivExtensionClass
|
|
11
|
+
DivExtensionClass,
|
|
12
|
+
TypefaceProvider
|
|
12
13
|
} from './common';
|
|
13
14
|
import type { GlobalVariablesController, Variable } from './variables';
|
|
14
15
|
import type { WrappedError } from './common';
|
|
@@ -28,6 +29,7 @@ export function render(opts: {
|
|
|
28
29
|
onCustomAction?: CustomActionCallback;
|
|
29
30
|
onError?: ErrorCallback;
|
|
30
31
|
onComponent?: ComponentCallback;
|
|
32
|
+
typefaceProvider?: TypefaceProvider;
|
|
31
33
|
platform?: Platform;
|
|
32
34
|
customization?: Customization;
|
|
33
35
|
builtinProtocols?: string[];
|
|
@@ -7,7 +7,8 @@ import type {
|
|
|
7
7
|
CustomActionCallback,
|
|
8
8
|
Theme,
|
|
9
9
|
Customization,
|
|
10
|
-
DivExtensionClass
|
|
10
|
+
DivExtensionClass,
|
|
11
|
+
TypefaceProvider
|
|
11
12
|
} from './common';
|
|
12
13
|
import type { GlobalVariablesController } from './variables';
|
|
13
14
|
|
|
@@ -21,6 +22,7 @@ export function render(opts: {
|
|
|
21
22
|
onStat?: StatCallback;
|
|
22
23
|
onCustomAction?: CustomActionCallback;
|
|
23
24
|
onError?: ErrorCallback;
|
|
25
|
+
typefaceProvider?: TypefaceProvider;
|
|
24
26
|
platform?: Platform;
|
|
25
27
|
customization?: Customization;
|
|
26
28
|
builtinProtocols?: string[];
|
package/typings/client.d.ts
CHANGED
|
@@ -7,7 +7,8 @@ import type {
|
|
|
7
7
|
CustomActionCallback,
|
|
8
8
|
Theme,
|
|
9
9
|
Customization,
|
|
10
|
-
DivExtensionClass
|
|
10
|
+
DivExtensionClass,
|
|
11
|
+
TypefaceProvider
|
|
11
12
|
} from './common';
|
|
12
13
|
import type { GlobalVariablesController } from './variables';
|
|
13
14
|
|
|
@@ -20,6 +21,7 @@ export function render(opts: {
|
|
|
20
21
|
onStat?: StatCallback;
|
|
21
22
|
onCustomAction?: CustomActionCallback;
|
|
22
23
|
onError?: ErrorCallback;
|
|
24
|
+
typefaceProvider?: TypefaceProvider;
|
|
23
25
|
platform?: Platform;
|
|
24
26
|
customization?: Customization;
|
|
25
27
|
builtinProtocols?: string[];
|
package/typings/common.d.ts
CHANGED
|
@@ -112,9 +112,20 @@ export interface VisibilityAction {
|
|
|
112
112
|
log_limit?: number;
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
+
export interface DisappearAction {
|
|
116
|
+
log_id: string;
|
|
117
|
+
url?: string;
|
|
118
|
+
referer?: string;
|
|
119
|
+
payload?: Record<string, string>;
|
|
120
|
+
visibility_percentage?: number;
|
|
121
|
+
disappear_duration?: number;
|
|
122
|
+
// download_callbacks
|
|
123
|
+
log_limit?: number;
|
|
124
|
+
}
|
|
125
|
+
|
|
115
126
|
export type StatCallback = (details: {
|
|
116
127
|
type: string;
|
|
117
|
-
action: Action | VisibilityAction;
|
|
128
|
+
action: Action | VisibilityAction | DisappearAction;
|
|
118
129
|
}) => void;
|
|
119
130
|
|
|
120
131
|
export type CustomActionCallback = (action: Action & { url: string }) => void;
|
|
@@ -139,6 +150,10 @@ export type ErrorCallback = (details: {
|
|
|
139
150
|
error: WrappedError;
|
|
140
151
|
}) => void;
|
|
141
152
|
|
|
153
|
+
export type TypefaceProvider = (fontFamily: string, opts?: {
|
|
154
|
+
fontWeight?: number;
|
|
155
|
+
}) => string;
|
|
156
|
+
|
|
142
157
|
export interface DivkitInstance {
|
|
143
158
|
$destroy(): void;
|
|
144
159
|
execAction(action: Action | VisibilityAction): void;
|
package/typings/server.d.ts
CHANGED
|
@@ -2,7 +2,8 @@ import type {
|
|
|
2
2
|
DivJson,
|
|
3
3
|
ErrorCallback,
|
|
4
4
|
Platform,
|
|
5
|
-
Customization
|
|
5
|
+
Customization,
|
|
6
|
+
TypefaceProvider
|
|
6
7
|
} from './common';
|
|
7
8
|
|
|
8
9
|
export function render(opts: {
|
|
@@ -13,4 +14,5 @@ export function render(opts: {
|
|
|
13
14
|
customization?: Customization;
|
|
14
15
|
builtinProtocols?: string[];
|
|
15
16
|
onError?: ErrorCallback;
|
|
17
|
+
typefaceProvider?: TypefaceProvider;
|
|
16
18
|
}): string;
|