@divkitframework/divkit 28.7.0 → 28.9.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 +2 -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/common.d.ts +67 -0
- package/typings/custom.d.ts +6 -1
package/package.json
CHANGED
package/typings/common.d.ts
CHANGED
|
@@ -98,6 +98,70 @@ export interface DownloadCallbacks {
|
|
|
98
98
|
on_success_actions?: Action[];
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
+
export interface StringValue {
|
|
102
|
+
type: 'string';
|
|
103
|
+
value: string;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export interface IntegerValue {
|
|
107
|
+
type: 'integer';
|
|
108
|
+
value: number;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export interface NumberValue {
|
|
112
|
+
type: 'number';
|
|
113
|
+
value: number;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export interface ColorValue {
|
|
117
|
+
type: 'color';
|
|
118
|
+
value: string;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export interface BooleanValue {
|
|
122
|
+
type: 'boolean';
|
|
123
|
+
value: boolean;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export interface UrlValue {
|
|
127
|
+
type: 'url';
|
|
128
|
+
value: string;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export interface DictValue {
|
|
132
|
+
type: 'dict';
|
|
133
|
+
value: Record<string, unknown>;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export interface ArrayValue {
|
|
137
|
+
type: 'array';
|
|
138
|
+
value: unknown[];
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export type TypedValue = StringValue | IntegerValue | NumberValue | ColorValue |
|
|
142
|
+
BooleanValue | UrlValue | DictValue | ArrayValue;
|
|
143
|
+
|
|
144
|
+
export interface ActionSetVariable {
|
|
145
|
+
type: 'set_variable';
|
|
146
|
+
variable_name: string;
|
|
147
|
+
value: TypedValue;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export interface ActionArrayRemoveValue {
|
|
151
|
+
type: 'array_remove_value';
|
|
152
|
+
variable_name: string;
|
|
153
|
+
index: number;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export interface ActionArrayInsertValue {
|
|
157
|
+
type: 'array_insert_value';
|
|
158
|
+
variable_name: string;
|
|
159
|
+
index?: number;
|
|
160
|
+
value: TypedValue;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export type TypedAction = ActionSetVariable | ActionArrayRemoveValue | ActionArrayInsertValue;
|
|
164
|
+
|
|
101
165
|
export interface Action {
|
|
102
166
|
log_id: string;
|
|
103
167
|
url?: string;
|
|
@@ -106,6 +170,7 @@ export interface Action {
|
|
|
106
170
|
download_callbacks?: DownloadCallbacks;
|
|
107
171
|
log_url?: string;
|
|
108
172
|
target?: string;
|
|
173
|
+
typed?: TypedAction;
|
|
109
174
|
}
|
|
110
175
|
|
|
111
176
|
export interface VisibilityAction {
|
|
@@ -117,6 +182,7 @@ export interface VisibilityAction {
|
|
|
117
182
|
visibility_percentage?: number;
|
|
118
183
|
visibility_duration?: number;
|
|
119
184
|
log_limit?: number;
|
|
185
|
+
typed?: TypedAction;
|
|
120
186
|
}
|
|
121
187
|
|
|
122
188
|
export interface DisappearAction {
|
|
@@ -128,6 +194,7 @@ export interface DisappearAction {
|
|
|
128
194
|
visibility_percentage?: number;
|
|
129
195
|
disappear_duration?: number;
|
|
130
196
|
log_limit?: number;
|
|
197
|
+
typed?: TypedAction;
|
|
131
198
|
}
|
|
132
199
|
|
|
133
200
|
export type StatCallback = (details: {
|
package/typings/custom.d.ts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
|
+
export type CustomComponentTemplate = string | ((opts: {
|
|
2
|
+
props?: object;
|
|
3
|
+
variables: Map<string, string | number | boolean | unknown[] | object>;
|
|
4
|
+
}) => string);
|
|
5
|
+
|
|
1
6
|
export interface CustomComponentDescription {
|
|
2
7
|
element: string;
|
|
3
8
|
shadowRootMode?: 'open' | 'close';
|
|
4
|
-
template?:
|
|
9
|
+
template?: CustomComponentTemplate;
|
|
5
10
|
}
|