km-card-layout-core 0.1.17 → 0.1.18

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/dist/index.js CHANGED
@@ -22,7 +22,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
22
22
  Object.defineProperty(exports, "__esModule", { value: true });
23
23
  exports.updateElementsStyle = exports.applyBackground = exports.applySpecialStyle = exports.resolveSpecialStyle = exports.DEFAULT_DECOR_COLOR = exports.backgroundChange = void 0;
24
24
  exports.buildRenderData = buildRenderData;
25
- const km_card_layout_core_1 = require("km-card-layout-core");
25
+ const bindings_1 = require("./bindings");
26
26
  const changeBackground_1 = require("./ops/changeBackground");
27
27
  __exportStar(require("./interface/index"), exports);
28
28
  __exportStar(require("./helpers"), exports);
@@ -39,11 +39,11 @@ Object.defineProperty(exports, "updateElementsStyle", { enumerable: true, get: f
39
39
  __exportStar(require("./render/builder"), exports);
40
40
  function buildRenderData(layout, items, config) {
41
41
  // 绑定数据
42
- let renderLayout = (0, km_card_layout_core_1.applyItemCollectBindings)(layout, items);
42
+ let renderLayout = (0, bindings_1.applyItemCollectBindings)(layout, items);
43
43
  // 设置显示逻辑
44
44
  renderLayout = (0, changeBackground_1.setElementVisible)(renderLayout, 'avatar', config.showAvatar);
45
45
  renderLayout = (0, changeBackground_1.setElementVisible)(renderLayout, 'logo', config.showLogo);
46
46
  // 设置背景
47
- renderLayout = renderLayout.map((la, index) => (0, km_card_layout_core_1.backgroundChange)(config.currentBg[index], la));
47
+ renderLayout = renderLayout.map((la, index) => (0, changeBackground_1.backgroundChange)(config.currentBg[index], la));
48
48
  return renderLayout;
49
49
  }
package/index.ts CHANGED
@@ -5,14 +5,10 @@
5
5
  * - 职责:将布局 Schema 与业务数据合成可渲染树,外层只需将节点映射到各端组件。
6
6
  */
7
7
 
8
- import {
9
- applyItemCollectBindings,
10
- backgroundChange,
11
- CardLayoutSchema,
12
- TemplateItem,
13
- } from 'km-card-layout-core';
14
- import { setElementVisible } from './ops/changeBackground';
15
- import { Config } from './types';
8
+
9
+ import { applyItemCollectBindings } from './bindings';
10
+ import { backgroundChange, setElementVisible } from './ops/changeBackground';
11
+ import { CardLayoutSchema, Config, TemplateItem } from './types';
16
12
 
17
13
 
18
14
  export * from './interface/index';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "km-card-layout-core",
3
- "version": "0.1.17",
3
+ "version": "0.1.18",
4
4
  "description": "Shared render helpers for CardMaster layout JSON (binding resolution, layout normalization).",
5
5
  "main": "dist/index.js",
6
6
  "types": "types.d.ts",