km-card-layout-component-miniprogram 0.1.6 → 0.1.8

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.
Files changed (30) hide show
  1. package/example/pages/home/index.js +1 -351
  2. package/miniprogram_dist/components/card-layout/index.js +25 -188
  3. package/miniprogram_dist/components/card-layout/index.wxml +17 -9
  4. package/miniprogram_dist/components/card-layout/index.wxss +11 -8
  5. package/miniprogram_dist/vendor/km-card-layout-core/bindings.js +74 -0
  6. package/miniprogram_dist/vendor/km-card-layout-core/data.js +38 -0
  7. package/miniprogram_dist/vendor/km-card-layout-core/helpers.js +72 -0
  8. package/miniprogram_dist/vendor/km-card-layout-core/index.js +15 -366
  9. package/miniprogram_dist/vendor/km-card-layout-core/interface/index.js +1 -0
  10. package/miniprogram_dist/vendor/km-card-layout-core/layout.js +117 -0
  11. package/miniprogram_dist/vendor/km-card-layout-core/ops/changeBackground.js +135 -0
  12. package/miniprogram_dist/vendor/km-card-layout-core/render/builder.js +210 -0
  13. package/miniprogram_dist/vendor/km-card-layout-core/utils.js +25 -0
  14. package/package.json +1 -1
  15. package/script/sync-core.js +10 -2
  16. package/src/components/card-layout/index.ts +30 -278
  17. package/src/components/card-layout/index.wxml +17 -9
  18. package/src/components/card-layout/index.wxss +11 -8
  19. package/src/vendor/km-card-layout-core/bindings.ts +84 -0
  20. package/src/vendor/km-card-layout-core/data.ts +38 -0
  21. package/src/vendor/km-card-layout-core/helpers.ts +76 -0
  22. package/src/vendor/km-card-layout-core/index.ts +21 -458
  23. package/src/vendor/km-card-layout-core/interface/data/payload.ts +20 -2
  24. package/src/vendor/km-card-layout-core/interface/index.ts +1 -0
  25. package/src/vendor/km-card-layout-core/interface/render.ts +1 -0
  26. package/src/vendor/km-card-layout-core/layout.ts +129 -0
  27. package/src/vendor/km-card-layout-core/ops/changeBackground.ts +169 -0
  28. package/src/vendor/km-card-layout-core/render/builder.ts +288 -0
  29. package/src/vendor/km-card-layout-core/types.d.ts +97 -8
  30. package/src/vendor/km-card-layout-core/utils.ts +9 -0
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getTemplateBackgrounds = exports.getTemplateItems = exports.applyItemCollectBindings = exports.stripLayoutBindings = void 0;
4
+ function stripLayoutBindings(layouts = []) {
5
+ const targetLayouts = Array.isArray(layouts) ? layouts : [];
6
+ const stripElement = (el) => {
7
+ const { binding: _b, defaultValue: _d, ...rest } = el;
8
+ if (el.type === 'layout-panel') {
9
+ return {
10
+ ...rest,
11
+ children: (el.children || []).map(stripElement),
12
+ };
13
+ }
14
+ return rest;
15
+ };
16
+ return targetLayouts.map(layout => ({
17
+ ...layout,
18
+ children: (layout.children || []).map(stripElement),
19
+ }));
20
+ }
21
+ exports.stripLayoutBindings = stripLayoutBindings;
22
+ function applyItemCollectBindings(layouts = [], items = []) {
23
+ const targetLayouts = Array.isArray(layouts) ? layouts : [];
24
+ const metaMap = new Map();
25
+ const metaList = Array.isArray(items) ? items : [];
26
+ metaList.forEach(item => {
27
+ if (item && item.id !== undefined && item.id !== null) {
28
+ metaMap.set(String(item.id), item);
29
+ }
30
+ });
31
+ const assignBinding = (el) => {
32
+ const meta = metaMap.get(String(el.id));
33
+ const binding = meta && meta.bind !== undefined && meta.bind !== null
34
+ ? meta.bind
35
+ : el.binding;
36
+ const defaultValue = meta && meta.default !== undefined ? meta.default : el.defaultValue;
37
+ const key = meta && meta.key !== undefined ? meta.key : el.key;
38
+ const base = { ...el };
39
+ if (binding !== undefined)
40
+ base.binding = binding;
41
+ else
42
+ delete base.binding;
43
+ if (defaultValue !== undefined)
44
+ base.defaultValue = defaultValue;
45
+ else
46
+ delete base.defaultValue;
47
+ if (key !== undefined)
48
+ base.key = key;
49
+ else
50
+ delete base.key;
51
+ if (el.type === 'layout-panel') {
52
+ return {
53
+ ...base,
54
+ children: (el.children || []).map(assignBinding),
55
+ };
56
+ }
57
+ return base;
58
+ };
59
+ return targetLayouts.map(layout => ({
60
+ ...layout,
61
+ children: (layout.children || []).map(assignBinding),
62
+ }));
63
+ }
64
+ exports.applyItemCollectBindings = applyItemCollectBindings;
65
+ function getTemplateItems(ids, items) {
66
+ const idArray = ids.split(',').map(id => id.trim());
67
+ return items.filter(item => idArray.includes(String(item.id)));
68
+ }
69
+ exports.getTemplateItems = getTemplateItems;
70
+ function getTemplateBackgrounds(ids, items) {
71
+ const idArray = ids.split(',').map(id => id.trim());
72
+ return items.filter(item => idArray.includes(String(item.id)));
73
+ }
74
+ exports.getTemplateBackgrounds = getTemplateBackgrounds;
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.resolveBindingValue = void 0;
4
+ const helpers_1 = require("./helpers");
5
+ const pathToSegments = (path) => `${path || ''}`
6
+ .replace(/\[(\d+)\]/g, '.$1')
7
+ .split('.')
8
+ .map(p => p.trim())
9
+ .filter(Boolean);
10
+ const readByPath = (data, path) => {
11
+ if (path === undefined || path === null || path === '')
12
+ return data;
13
+ const segments = pathToSegments(path);
14
+ let cursor = data;
15
+ for (let i = 0; i < segments.length; i += 1) {
16
+ if (!(0, helpers_1.isObject)(cursor) && !Array.isArray(cursor))
17
+ return undefined;
18
+ const key = segments[i];
19
+ if (Array.isArray(cursor)) {
20
+ const idx = Number(key);
21
+ cursor = Number.isNaN(idx) ? undefined : cursor[idx];
22
+ }
23
+ else {
24
+ cursor = cursor[key];
25
+ }
26
+ if (cursor === undefined || cursor === null) {
27
+ return cursor;
28
+ }
29
+ }
30
+ return cursor;
31
+ };
32
+ const resolveBindingValue = (binding, rootData, context) => {
33
+ if (!binding)
34
+ return undefined;
35
+ const value = readByPath(rootData, binding);
36
+ return value === undefined ? undefined : value;
37
+ };
38
+ exports.resolveBindingValue = resolveBindingValue;
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isObject = exports.styleObjectToString = exports.addUnit = exports.toNumber = void 0;
4
+ const DIMENSION_PROPS = new Set([
5
+ 'width',
6
+ 'height',
7
+ 'top',
8
+ 'right',
9
+ 'bottom',
10
+ 'left',
11
+ 'padding',
12
+ 'paddingTop',
13
+ 'paddingBottom',
14
+ 'paddingLeft',
15
+ 'paddingRight',
16
+ 'margin',
17
+ 'marginTop',
18
+ 'marginBottom',
19
+ 'marginLeft',
20
+ 'marginRight',
21
+ 'fontSize',
22
+ 'lineHeight',
23
+ 'borderRadius',
24
+ 'borderWidth',
25
+ 'letterSpacing',
26
+ 'gap',
27
+ 'rowGap',
28
+ 'columnGap',
29
+ ]);
30
+ const toNumber = (value) => {
31
+ const num = Number(value);
32
+ return Number.isFinite(num) ? num : undefined;
33
+ };
34
+ exports.toNumber = toNumber;
35
+ const toKebab = (key) => key.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();
36
+ const addUnit = (value, unit) => {
37
+ if (value === undefined || value === null || value === '')
38
+ return undefined;
39
+ if (typeof value === 'number') {
40
+ const ratio = unit === 'rpx' ? 2 : 1;
41
+ return `${value * ratio}${unit}`;
42
+ }
43
+ if (typeof value === 'string') {
44
+ const parsed = Number(value);
45
+ if (Number.isFinite(parsed)) {
46
+ const ratio = unit === 'rpx' ? 2 : 1;
47
+ return `${parsed * ratio}${unit}`;
48
+ }
49
+ }
50
+ return `${value}`;
51
+ };
52
+ exports.addUnit = addUnit;
53
+ const styleObjectToString = (style, unit = 'px') => {
54
+ if (!style)
55
+ return '';
56
+ const pairs = [];
57
+ Object.keys(style).forEach(key => {
58
+ const value = style[key];
59
+ if (value === undefined || value === null || value === '')
60
+ return;
61
+ const useUnit = DIMENSION_PROPS.has(key)
62
+ ? (0, exports.addUnit)(value, unit)
63
+ : value;
64
+ if (useUnit === undefined || useUnit === null || useUnit === '')
65
+ return;
66
+ pairs.push(`${toKebab(key)}:${useUnit}`);
67
+ });
68
+ return pairs.join(';');
69
+ };
70
+ exports.styleObjectToString = styleObjectToString;
71
+ const isObject = (val) => Boolean(val) && typeof val === 'object';
72
+ exports.isObject = isObject;
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  /**
3
- * CardMaster 布局 JSON 渲染核心。
3
+ * CardMaster 布局 JSON 渲染核心
4
4
  *
5
5
  * - 平台无关:不依赖 DOM/小程序 API,方便在 Web/小程序/Node 复用。
6
- * - 职责:将布局 Schema 与业务数据合成为带内联样式的渲染树,外层只需将节点映射到各端组件。
6
+ * - 职责:将布局 Schema 与业务数据合成可渲染树,外层只需将节点映射到各端组件。
7
7
  */
8
8
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
9
9
  if (k2 === undefined) k2 = k;
@@ -20,368 +20,17 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
20
20
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
21
21
  };
22
22
  Object.defineProperty(exports, "__esModule", { value: true });
23
- exports.buildRenderResult = exports.buildRenderNodes = exports.resolveBindingValue = exports.normalizeLayout = exports.styleObjectToString = exports.addUnit = void 0;
23
+ exports.updateElementsStyle = exports.applyBackground = exports.applySpecialStyle = exports.resolveSpecialStyle = exports.DEFAULT_DECOR_COLOR = exports.backgroundChange = void 0;
24
24
  __exportStar(require("./interface/index"), exports);
25
- /** ---------- 常量 ---------- */
26
- const DEFAULT_CARD_WIDTH = 343; // 默认卡片宽度(像素)
27
- const DEFAULT_CARD_HEIGHT = 210; // 默认卡片高度(像素)
28
- const DIMENSION_PROPS = new Set([
29
- 'width',
30
- 'height',
31
- 'top',
32
- 'right',
33
- 'bottom',
34
- 'left',
35
- 'padding',
36
- 'paddingTop',
37
- 'paddingBottom',
38
- 'paddingLeft',
39
- 'paddingRight',
40
- 'margin',
41
- 'marginTop',
42
- 'marginBottom',
43
- 'marginLeft',
44
- 'marginRight',
45
- 'fontSize',
46
- 'lineHeight',
47
- 'borderRadius',
48
- 'borderWidth',
49
- 'letterSpacing',
50
- 'gap',
51
- 'rowGap',
52
- 'columnGap',
53
- ]);
54
- /** ---------- 基础工具 ---------- */
55
- /**
56
- * 安全转 number,非数值或 NaN 返回 undefined。
57
- */
58
- const toNumber = (value) => {
59
- const num = Number(value);
60
- return Number.isFinite(num) ? num : undefined;
61
- };
62
- /**
63
- * camelCase 转 kebab-case(用于内联样式 key)。
64
- */
65
- const toKebab = (key) => key.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();
66
- /**
67
- * 数字追加单位,非数字原样转字符串。
68
- * 数字追加单位,非数字原样转字符串。
69
- */
70
- const addUnit = (value, unit) => {
71
- if (value === undefined || value === null || value === '')
72
- return undefined;
73
- if (typeof value === 'number') {
74
- const ratio = unit === 'rpx' ? 2 : 1;
75
- return `${value * ratio}${unit}`;
76
- }
77
- if (typeof value === 'string') {
78
- const parsed = Number(value);
79
- if (Number.isFinite(parsed)) {
80
- const ratio = unit === 'rpx' ? 2 : 1;
81
- return `${parsed * ratio}${unit}`;
82
- }
83
- }
84
- return `${value}`;
85
- };
86
- exports.addUnit = addUnit;
87
- /**
88
- * 样式对象转内联样式字符串,对需要单位的字段自动补单位。
89
- */
90
- const styleObjectToString = (style, unit = 'px') => {
91
- if (!style)
92
- return '';
93
- const pairs = [];
94
- Object.keys(style).forEach(key => {
95
- const value = style[key];
96
- if (value === undefined || value === null || value === '')
97
- return;
98
- const useUnit = DIMENSION_PROPS.has(key)
99
- ? (0, exports.addUnit)(value, unit)
100
- : value;
101
- if (useUnit === undefined || useUnit === null || useUnit === '')
102
- return;
103
- pairs.push(`${toKebab(key)}:${useUnit}`);
104
- });
105
- return pairs.join(';');
106
- };
107
- exports.styleObjectToString = styleObjectToString;
108
- /**
109
- * 容错 JSON 解析:字符串用 JSON.parse,其他保持原样或返回 null。
110
- */
111
- const parseJson = (input) => {
112
- if (typeof input !== 'string')
113
- return input !== null && input !== void 0 ? input : null;
114
- try {
115
- return JSON.parse(input);
116
- }
117
- catch (err) {
118
- console.warn('[km-card-layout-core] JSON parse failed', err);
119
- return null;
120
- }
121
- };
122
- const isObject = (val) => Boolean(val) && typeof val === 'object';
123
- const getAbsLayout = (el) => el.layout && el.layout.mode === 'absolute'
124
- ? el.layout
125
- : null;
126
- /** ---------- 布局与数据解析 ---------- */
127
- /**
128
- * 归一化布局输入(对象或 JSON 字符串),补齐宽高/容器/children 默认值。
129
- */
130
- const normalizeLayout = (layout) => {
131
- if (!Array.isArray(layout))
132
- return [];
133
- return layout
134
- .map(item => {
135
- var _a, _b;
136
- if (!item || typeof item !== 'object')
137
- return null;
138
- const parsed = item;
139
- return {
140
- ...parsed,
141
- width: (_a = toNumber(parsed.width)) !== null && _a !== void 0 ? _a : DEFAULT_CARD_WIDTH,
142
- height: (_b = toNumber(parsed.height)) !== null && _b !== void 0 ? _b : DEFAULT_CARD_HEIGHT,
143
- container: parsed.container || { mode: 'absolute' },
144
- children: Array.isArray(parsed.children)
145
- ? parsed.children
146
- : [],
147
- };
148
- })
149
- .filter((v) => Boolean(v));
150
- };
151
- exports.normalizeLayout = normalizeLayout;
152
- /**
153
- * 将绑定路径拆分为片段,支持点语法与数组下标。
154
- */
155
- const pathToSegments = (path) => `${path || ''}`
156
- .replace(/\[(\d+)\]/g, '.$1')
157
- .split('.')
158
- .map(p => p.trim())
159
- .filter(Boolean);
160
- /**
161
- * 按路径访问对象/数组,缺失时返回 undefined/null。
162
- */
163
- const readByPath = (data, path) => {
164
- if (path === undefined || path === null || path === '')
165
- return data;
166
- const segments = pathToSegments(path);
167
- let cursor = data;
168
- for (let i = 0; i < segments.length; i += 1) {
169
- if (!isObject(cursor) && !Array.isArray(cursor))
170
- return undefined;
171
- const key = segments[i];
172
- if (Array.isArray(cursor)) {
173
- const idx = Number(key);
174
- cursor = Number.isNaN(idx) ? undefined : cursor[idx];
175
- }
176
- else {
177
- cursor = cursor[key];
178
- }
179
- if (cursor === undefined || cursor === null) {
180
- return cursor;
181
- }
182
- }
183
- return cursor;
184
- };
185
- /**
186
- * Resolve element binding against provided data.
187
- */
188
- const resolveBindingValue = (binding, rootData, context) => {
189
- if (!binding)
190
- return undefined;
191
- const value = readByPath(rootData, binding);
192
- return value === undefined ? undefined : value;
193
- };
194
- exports.resolveBindingValue = resolveBindingValue;
195
- /** ---------- 样式构建 ---------- */
196
- /**
197
- * 生成元素外层样式(绝对/弹性布局),始终返回内联样式字符串。
198
- */
199
- const buildWrapperStyle = (el, unit) => {
200
- var _a;
201
- const abs = getAbsLayout(el);
202
- if (abs) {
203
- const textAlign = (_a = el === null || el === void 0 ? void 0 : el.style) === null || _a === void 0 ? void 0 : _a.textAlign;
204
- return (0, exports.styleObjectToString)({
205
- position: 'absolute',
206
- left: (0, exports.addUnit)(abs.x, unit),
207
- top: (0, exports.addUnit)(abs.y, unit),
208
- width: (0, exports.addUnit)(abs.width, unit),
209
- height: (0, exports.addUnit)(abs.height, unit),
210
- zIndex: abs.zIndex,
211
- boxSizing: 'border-box',
212
- textAlign,
213
- }, unit);
214
- }
215
- return '';
216
- };
217
- /**
218
- * padding 数组/数字转 CSS 缩写字符串。
219
- */
220
- /**
221
- * 构建 layout-panel 的容器样式(绝对布局容器)。
222
- */
223
- const buildPanelStyle = (el, unit) => {
224
- const style = {
225
- display: 'block',
226
- };
227
- return (0, exports.styleObjectToString)(style, unit);
228
- };
229
- /**
230
- * 元素样式转内联字符串(自动补单位)。
231
- */
232
- const normalizeElementStyle = (style, unit) => {
233
- if (!style)
234
- return '';
235
- return (0, exports.styleObjectToString)(style, unit);
236
- };
237
- const buildTextIcon = (el, unit) => {
238
- var _a, _b, _c;
239
- const icon = el.icon;
240
- if (!icon || icon.enable === false)
241
- return undefined;
242
- const style = icon.style || 'fill';
243
- const baseName = el.key || el.binding || el.id;
244
- let name;
245
- if (style === 'dot')
246
- name = 'round';
247
- else if (style === 'line')
248
- name = baseName ? `${baseName}-line` : undefined;
249
- else
250
- name = baseName || undefined;
251
- if (!name)
252
- return undefined;
253
- const size = icon.size !== undefined && icon.size !== null
254
- ? icon.size
255
- : (_a = el.style) === null || _a === void 0 ? void 0 : _a.fontSize;
256
- const gap = icon.gap !== undefined && icon.gap !== null ? icon.gap : 4;
257
- const color = (_b = icon.color) !== null && _b !== void 0 ? _b : (typeof ((_c = el.style) === null || _c === void 0 ? void 0 : _c.color) === 'string' ? el.style.color : undefined);
258
- return {
259
- name: `${name}`,
260
- text: `${name}`,
261
- size: (0, exports.addUnit)(size, unit),
262
- gap: (0, exports.addUnit)(gap, unit),
263
- color: color,
264
- align: icon.align || 'left',
265
- };
266
- };
267
- /** ---------- 渲染树构建 ---------- */
268
- /**
269
- * 将 children 展开为渲染节点。
270
- */
271
- const buildRenderNodes = (children, rootData, unit = 'px', context = {}) => {
272
- if (!Array.isArray(children))
273
- return [];
274
- const nodes = [];
275
- children.forEach(el => {
276
- if (!el || el.visible === false)
277
- return;
278
- const node = buildNode(el, rootData, unit, context);
279
- if (node)
280
- nodes.push(node);
281
- });
282
- return nodes;
283
- };
284
- exports.buildRenderNodes = buildRenderNodes;
285
- /**
286
- * 构建单个渲染节点(layout-panel 递归处理子元素)。
287
- */
288
- const buildNode = (el, rootData, unit, context) => {
289
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
290
- if (!el || el.visible === false)
291
- return null;
292
- const wrapperStyle = buildWrapperStyle(el, unit);
293
- if (el.type === 'layout-panel') {
294
- return {
295
- id: el.id,
296
- type: el.type,
297
- visible: !!el.visible,
298
- wrapperStyle,
299
- contentStyle: buildPanelStyle(el, unit),
300
- children: (0, exports.buildRenderNodes)(el.children || [], rootData, unit, context),
301
- };
302
- }
303
- const baseStyle = normalizeElementStyle(el.style, unit);
304
- if (el.type === 'text') {
305
- const align = ((_a = el.style) === null || _a === void 0 ? void 0 : _a.textAlign) || el.align;
306
- const textStyle = align ? `${baseStyle};text-align:${align}` : baseStyle;
307
- const value = (_c = (_b = (0, exports.resolveBindingValue)(el.binding, rootData, context)) !== null && _b !== void 0 ? _b : el.defaultValue) !== null && _c !== void 0 ? _c : '';
308
- return {
309
- id: el.id,
310
- type: el.type,
311
- wrapperStyle,
312
- contentStyle: textStyle,
313
- text: `${value}`,
314
- visible: !!el.visible,
315
- icon: buildTextIcon(el, unit),
316
- };
317
- }
318
- if (el.type === 'image') {
319
- const src = (_f = (_e = (_d = (0, exports.resolveBindingValue)(el.binding, rootData, context)) !== null && _d !== void 0 ? _d : el.defaultUrl) !== null && _e !== void 0 ? _e : el.defaultValue) !== null && _f !== void 0 ? _f : '';
320
- const mode = el.fit === 'contain' ? 'aspectFit' : 'aspectFill';
321
- return {
322
- id: el.id,
323
- type: el.type,
324
- wrapperStyle,
325
- contentStyle: baseStyle,
326
- src,
327
- mode,
328
- visible: !!el.visible,
329
- };
330
- }
331
- if (el.type === 'icon') {
332
- const name = (_j = (_h = (_g = (0, exports.resolveBindingValue)(el.binding, rootData, context)) !== null && _g !== void 0 ? _g : el.name) !== null && _h !== void 0 ? _h : el.defaultValue) !== null && _j !== void 0 ? _j : '';
333
- return {
334
- id: el.id,
335
- type: el.type,
336
- wrapperStyle,
337
- contentStyle: baseStyle,
338
- name: `${name}`,
339
- text: `${name}`,
340
- visible: !!el.visible,
341
- };
342
- }
343
- if (el.type === 'custom') {
344
- return {
345
- id: el.id,
346
- type: el.type,
347
- wrapperStyle,
348
- contentStyle: baseStyle,
349
- visible: !!el.visible,
350
- };
351
- }
352
- return null;
353
- };
354
- /**
355
- * 主入口:合并布局 Schema 与数据,生成供前端使用的渲染结果。
356
- */
357
- const buildRenderResult = (layoutInput, dataInput, unit = 'px') => {
358
- const layouts = (0, exports.normalizeLayout)(layoutInput);
359
- return layouts.map(layout => {
360
- const cardStyle = (0, exports.styleObjectToString)({
361
- width: (0, exports.addUnit)(layout.width, unit),
362
- height: (0, exports.addUnit)(layout.height, unit),
363
- color: layout.fontColor,
364
- borderRadius: layout.borderRadius !== undefined
365
- ? (0, exports.addUnit)(layout.borderRadius, unit)
366
- : undefined,
367
- padding: layout.padding !== undefined
368
- ? (0, exports.addUnit)(layout.padding, unit)
369
- : undefined,
370
- position: 'relative',
371
- }, unit);
372
- const bgStyle = (0, exports.styleObjectToString)({
373
- zIndex: layout.backgroundZIndex,
374
- borderRadius: layout.borderRadius !== undefined
375
- ? (0, exports.addUnit)(layout.borderRadius, unit)
376
- : undefined,
377
- }, unit);
378
- const renderTree = (0, exports.buildRenderNodes)(layout.children || [], dataInput || {}, unit);
379
- return {
380
- renderTree,
381
- cardStyle,
382
- backgroundImage: layout.backgroundImage || '',
383
- backgroundStyle: bgStyle,
384
- };
385
- });
386
- };
387
- exports.buildRenderResult = buildRenderResult;
25
+ __exportStar(require("./helpers"), exports);
26
+ __exportStar(require("./layout"), exports);
27
+ __exportStar(require("./data"), exports);
28
+ __exportStar(require("./bindings"), exports);
29
+ var changeBackground_1 = require("./ops/changeBackground");
30
+ Object.defineProperty(exports, "backgroundChange", { enumerable: true, get: function () { return changeBackground_1.backgroundChange; } });
31
+ Object.defineProperty(exports, "DEFAULT_DECOR_COLOR", { enumerable: true, get: function () { return changeBackground_1.DEFAULT_DECOR_COLOR; } });
32
+ Object.defineProperty(exports, "resolveSpecialStyle", { enumerable: true, get: function () { return changeBackground_1.resolveSpecialStyle; } });
33
+ Object.defineProperty(exports, "applySpecialStyle", { enumerable: true, get: function () { return changeBackground_1.applySpecialStyle; } });
34
+ Object.defineProperty(exports, "applyBackground", { enumerable: true, get: function () { return changeBackground_1.applyBackground; } });
35
+ Object.defineProperty(exports, "updateElementsStyle", { enumerable: true, get: function () { return changeBackground_1.updateElementsStyle; } });
36
+ __exportStar(require("./render/builder"), exports);
@@ -17,3 +17,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./elements"), exports);
18
18
  __exportStar(require("./layout"), exports);
19
19
  __exportStar(require("./render"), exports);
20
+ __exportStar(require("./data/payload"), exports);