@divkitframework/divkit 25.2.0 → 25.3.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.
- package/README.md +13 -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 +3 -1
- package/typings/client-hydratable.d.ts +3 -1
- package/typings/client.d.ts +3 -1
- package/typings/common.d.ts +4 -0
- 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
|
@@ -150,6 +150,10 @@ export type ErrorCallback = (details: {
|
|
|
150
150
|
error: WrappedError;
|
|
151
151
|
}) => void;
|
|
152
152
|
|
|
153
|
+
export type TypefaceProvider = (fontFamily: string, opts?: {
|
|
154
|
+
fontWeight?: number;
|
|
155
|
+
}) => string;
|
|
156
|
+
|
|
153
157
|
export interface DivkitInstance {
|
|
154
158
|
$destroy(): void;
|
|
155
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;
|