@divkitframework/divkit 24.1.0 → 24.2.0-patched-3aade27a54abf383e162eb35759cfdb40c53b4e9

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": "24.1.0",
3
+ "version": "24.2.0-patched-3aade27a54abf383e162eb35759cfdb40c53b4e9",
4
4
  "description": "DivKit for the web",
5
5
  "keywords": [
6
6
  "server-driven-ui",
@@ -112,6 +112,7 @@
112
112
  "jest": "28.1.3",
113
113
  "jest-environment-jsdom": "28.0.0",
114
114
  "jest-html-reporter": "3.6.0",
115
+ "lottie-web": "5.11.0",
115
116
  "mini-css-extract-plugin": "2.6.1",
116
117
  "peggy": "2.0.1",
117
118
  "postcss": "8.4.14",
@@ -125,5 +126,8 @@
125
126
  "webpack": "5.74.0",
126
127
  "webpack-cli": "4.10.0",
127
128
  "webpack-dev-server": "4.9.3"
129
+ },
130
+ "peerDependencies": {
131
+ "lottie-web": "5.11.0"
128
132
  }
129
133
  }
@@ -6,7 +6,8 @@ import type {
6
6
  Platform,
7
7
  CustomActionCallback,
8
8
  Theme,
9
- Customization
9
+ Customization,
10
+ DivExtension
10
11
  } from './common';
11
12
  import type { GlobalVariablesController } from './variables';
12
13
 
@@ -22,6 +23,7 @@ export function render(opts: {
22
23
  platform?: Platform;
23
24
  customization?: Customization;
24
25
  builtinProtocols?: string[];
26
+ extensions?: Map<string, typeof DivExtension>;
25
27
  /** EXPERIMENTAL SUPPORT */
26
28
  theme?: Theme;
27
29
  }): DivkitInstance;
@@ -1,3 +1,5 @@
1
+ import type { Variable } from './variables';
2
+
1
3
  export type BooleanInt = 0 | 1 | false | true;
2
4
 
3
5
  export type TemplateContext = Record<string, unknown>;
@@ -151,3 +153,16 @@ export interface Customization {
151
153
  galleryLeftClass?: string;
152
154
  galleryRightClass?: string;
153
155
  }
156
+
157
+ export interface DivExtensionContext {
158
+ variables: Map<string, Variable>;
159
+ logError(error: WrappedError): void;
160
+ }
161
+
162
+ export class DivExtension {
163
+ constructor(params: object | undefined);
164
+
165
+ mountView(node: HTMLElement, context: DivExtensionContext): void;
166
+
167
+ unmountView(node: HTMLElement, context: DivExtensionContext): void;
168
+ }