@divkitframework/divkit 18.0.0 → 19.0.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 +39 -6
- 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 +1 -0
- package/typings/client-hydratable.d.ts +4 -1
- package/typings/client.d.ts +4 -1
- package/typings/common.d.ts +5 -0
- package/typings/server.d.ts +9 -2
package/README.md
CHANGED
|
@@ -203,8 +203,13 @@ Function, optional.
|
|
|
203
203
|
|
|
204
204
|
Callback for errors and warnings for manual processing.
|
|
205
205
|
|
|
206
|
-
```
|
|
207
|
-
function onError(
|
|
206
|
+
```ts
|
|
207
|
+
function onError(detauls: {
|
|
208
|
+
error: Error & {
|
|
209
|
+
level: 'error' | 'warn';
|
|
210
|
+
additional: Record<string, unknown>;
|
|
211
|
+
};
|
|
212
|
+
}) {
|
|
208
213
|
console.log(error.level, error.additional, error.message);
|
|
209
214
|
}
|
|
210
215
|
```
|
|
@@ -217,10 +222,24 @@ Function, optional.
|
|
|
217
222
|
|
|
218
223
|
Used for logging clicks (for elements with `action`) and visibility logging (for elements with `visibility_action`).
|
|
219
224
|
|
|
220
|
-
```
|
|
221
|
-
function onStat(details
|
|
222
|
-
|
|
223
|
-
|
|
225
|
+
```ts
|
|
226
|
+
function onStat(details: {
|
|
227
|
+
type: 'click' | 'visible';
|
|
228
|
+
action: Action | VisibilityAction;
|
|
229
|
+
}) {
|
|
230
|
+
}
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
#### onCustomAction
|
|
234
|
+
|
|
235
|
+
`/client` and `/client-hydratable`
|
|
236
|
+
|
|
237
|
+
Function, optional.
|
|
238
|
+
|
|
239
|
+
Callback for a component with an action that contains non-standard protocols.
|
|
240
|
+
|
|
241
|
+
```ts
|
|
242
|
+
function onCustomAction(action: Action): void {
|
|
224
243
|
}
|
|
225
244
|
```
|
|
226
245
|
|
|
@@ -230,6 +249,20 @@ function onStat(details) {
|
|
|
230
249
|
|
|
231
250
|
The default value is `auto`. Tweaks for mouse or touch events.
|
|
232
251
|
|
|
252
|
+
#### mix
|
|
253
|
+
|
|
254
|
+
String, optional.
|
|
255
|
+
|
|
256
|
+
An additional class added to the root element.
|
|
257
|
+
|
|
258
|
+
#### customization
|
|
259
|
+
|
|
260
|
+
Object, optional.
|
|
261
|
+
|
|
262
|
+
Currently supported properties:
|
|
263
|
+
* `galleryLeftClass` — left scroll button class on desktop
|
|
264
|
+
* `galleryRightClass` — right scroll button class on desktop
|
|
265
|
+
|
|
233
266
|
|
|
234
267
|
#### theme (EXPERIMENTAL)
|
|
235
268
|
|