km-card-layout-core 0.1.15 → 0.1.16

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/package.json +1 -1
  2. package/types.d.ts +10 -1
  3. package/utils.ts +1 -8
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "km-card-layout-core",
3
- "version": "0.1.15",
3
+ "version": "0.1.16",
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",
package/types.d.ts CHANGED
@@ -12,8 +12,18 @@ import type {
12
12
  CardLayoutSchema,
13
13
  RenderNode,
14
14
  RenderResult,
15
+ TemplateItem
15
16
  } from './interface';
16
17
 
18
+ export type Config = {
19
+ showAvatar: boolean;
20
+ showLogo: boolean;
21
+ /**
22
+ * 当前背景 (0 为正面背景 1 为背面背景)
23
+ */
24
+ currentBg: TemplateBackground[];
25
+ };
26
+
17
27
  export function addUnit(
18
28
  value: string | number | undefined | null,
19
29
  unit: 'px' | 'rpx'
@@ -154,6 +164,5 @@ export function buildRenderResult(
154
164
  export function buildRenderData (
155
165
  layout: CardLayoutSchema[],
156
166
  items: TemplateItem[],
157
- dataInput: Record<string, any>,
158
167
  config: Config
159
168
  ): CardLayoutSchema[];
package/utils.ts CHANGED
@@ -6,6 +6,7 @@ import {
6
6
  TemplateItem,
7
7
  } from 'km-card-layout-core';
8
8
  import { setElementVisible } from './ops/changeBackground';
9
+ import { Config } from './types';
9
10
 
10
11
  export * from './bindings';
11
12
  export {
@@ -17,14 +18,6 @@ export {
17
18
  DEFAULT_DECOR_COLOR,
18
19
  } from './ops/changeBackground';
19
20
 
20
- export type Config = {
21
- showAvatar: boolean;
22
- showLogo: boolean;
23
- /**
24
- * 当前背景 (0 为正面背景 1 为背面背景)
25
- */
26
- currentBg: TemplateBackground[];
27
- };
28
21
 
29
22
  export function buildRenderData(
30
23
  layout: CardLayoutSchema[],