km-card-layout-core 0.1.3 → 0.1.4

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 (3) hide show
  1. package/dist/index.js +2 -1
  2. package/index.ts +15 -13
  3. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -21,7 +21,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
21
21
  };
22
22
  Object.defineProperty(exports, "__esModule", { value: true });
23
23
  exports.buildRenderResult = exports.buildRenderNodes = exports.resolveBindingValue = exports.normalizeLayout = exports.styleObjectToString = exports.addUnit = void 0;
24
- __exportStar(require("./interface"), exports);
24
+ __exportStar(require("./interface/index"), exports);
25
25
  /** ---------- 常量 ---------- */
26
26
  const DEFAULT_CARD_WIDTH = 343; // 默认卡片宽度(像素)
27
27
  const DEFAULT_CARD_HEIGHT = 210; // 默认卡片高度(像素)
@@ -385,3 +385,4 @@ const buildRenderResult = (layoutInput, dataInput, unit = 'px') => {
385
385
  });
386
386
  };
387
387
  exports.buildRenderResult = buildRenderResult;
388
+ __exportStar(require("./utils"), exports);
package/index.ts CHANGED
@@ -22,7 +22,7 @@ import type {
22
22
  RenderResult,
23
23
  } from './interface/render';
24
24
 
25
- export * from './interface';
25
+ export * from './interface/index';
26
26
 
27
27
  /** ---------- 常量 ---------- */
28
28
 
@@ -392,18 +392,18 @@ const buildNode = (
392
392
  };
393
393
  }
394
394
 
395
- if (el.type === 'custom') {
396
- return {
397
- id: el.id,
398
- type: el.type,
399
- wrapperStyle,
400
- contentStyle: baseStyle,
401
- visible: !!el.visible,
402
- };
403
- }
404
-
405
- return null;
406
- };
395
+ if (el.type === 'custom') {
396
+ return {
397
+ id: el.id,
398
+ type: el.type,
399
+ wrapperStyle,
400
+ contentStyle: baseStyle,
401
+ visible: !!el.visible,
402
+ };
403
+ }
404
+
405
+ return null;
406
+ };
407
407
  /**
408
408
  * 主入口:合并布局 Schema 与数据,生成供前端使用的渲染结果。
409
409
  */
@@ -456,3 +456,5 @@ export const buildRenderResult = (
456
456
  };
457
457
  });
458
458
  };
459
+
460
+ export * from './utils';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "km-card-layout-core",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
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",